diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..cdf8f56 Binary files /dev/null and b/.DS_Store differ diff --git a/.env b/.env new file mode 100644 index 0000000..64cb3cd --- /dev/null +++ b/.env @@ -0,0 +1,8 @@ +DB_HOST=localhost +DB_USER=root +DB_PASS=Natalia@18 +DB_NAME=elohimstudio_db + +# Affirm credentials, if needed +AFFIRM_PUBLIC_KEY=YOUR_PUBLIC_KEY +AFFIRM_PRIVATE_KEY=... \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b512c09..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/README b/README new file mode 100644 index 0000000..3d9d02c --- /dev/null +++ b/README @@ -0,0 +1,235 @@ + ┌─────────────┐ ┌─────────────────────────┐ + │ Visitor │ │ Third-Party Services │ + │ (Browser) │ │ (Affirm, Analytics, etc.) + └──────┬───────┘ └─────────┬───────────────┘ + │ │ + (1) Requests │ │ (7) Analytics + ▼ ▼ + ┌─────────────┐ ┌─────────────────────────┐ + │ Front End │ │ Analytics Dashboard │ + │(HTML/CSS/JS)│ │(Google Analytics, etc.) │ + └──────┬───────┘ └─────────┬───────────────┘ + │ (2) Form Submissions │ (8) Data Queries + ▼ ▼ + ┌──────────────────────────────────┐ + │ Back End │ + │ (Node/Express or Serverless) │ + └──────┬──────────────────────────┘ + │ (3) Validate Data + ▼ + ┌──────────────────────────────────┐ + │ SQL Database (e.g. │ + │ MySQL/PostgreSQL/Azure SQL) │ + └──────┬──────────────────────────┘ + │ (4) Insert / Retrieve + ▼ + ┌──────────────────────────────────┐ + │ Referral Logic & Other Tables │ + │ (e.g. signups, sessions, etc.) │ + └──────┬──────────────────────────┘ + │ (5) Confirmation / Results + ▼ + ┌─────────────┐ + │ Admin or │ + │ You! │ + └─────────────┘ + + Below is a high-level website pipeline showing how visitors interact with your site, how data (e.g., signups, referrals) is processed and stored, and how you can gather analytics in a SQL database. This pipeline also outlines adding a referral program and analytics so you can track user signups, page views, and more. + +⸻ + +1. Overview Diagram + +A typical pipeline for your photography website might look like this: + + ┌─────────────┐ ┌─────────────────────────┐ + │ Visitor │ │ Third-Party Services │ + │ (Browser) │ │ (Affirm, Analytics, etc.) + └──────┬───────┘ └─────────┬───────────────┘ + │ │ + (1) Requests │ │ (7) Analytics + ▼ ▼ + ┌─────────────┐ ┌─────────────────────────┐ + │ Front End │ │ Analytics Dashboard │ + │(HTML/CSS/JS)│ │(Google Analytics, etc.) │ + └──────┬───────┘ └─────────┬───────────────┘ + │ (2) Form Submissions │ (8) Data Queries + ▼ ▼ + ┌──────────────────────────────────┐ + │ Back End │ + │ (Node/Express or Serverless) │ + └──────┬──────────────────────────┘ + │ (3) Validate Data + ▼ + ┌──────────────────────────────────┐ + │ SQL Database (e.g. │ + │ MySQL/PostgreSQL/Azure SQL) │ + └──────┬──────────────────────────┘ + │ (4) Insert / Retrieve + ▼ + ┌──────────────────────────────────┐ + │ Referral Logic & Other Tables │ + │ (e.g. signups, sessions, etc.) │ + └──────┬──────────────────────────┘ + │ (5) Confirmation / Results + ▼ + ┌─────────────┐ + │ Admin or │ + │ You! │ + └─────────────┘ + +Key Steps: + 1. Visitor loads the site (front end). + 2. Form submissions (e.g., “Book a Photoshoot,” “Sign up,” or “Referral”) go to your back end. + 3. The back end validates data and calls your SQL database to insert or retrieve info (e.g., user info, referral codes). + 4. Data is stored in structured tables (like users, referrals, bookings). + 5. The user receives a confirmation (like “Thank you, we’ll be in touch!”). + 6. Analytics events (like page views, signups) can be tracked via Google Analytics or a custom solution. + 7. You can use an analytics dashboard to visualize traffic, conversions, etc. + 8. You can query the SQL database for advanced analytics or integrate with BI tools to track your referral program and leads. + +⸻ + +2. Front End (Client-Side) + • HTML/CSS/JS (or a framework like React, Next.js, Vue, etc.): + • Displays your hero, packages, portfolio and any sign-up forms. + • Referral program link or code input: a user might come with a referral link (e.g., ?ref=ABC123) or type in a referral code on a sign-up form. + • Affirm integration for buy-now-pay-later can appear on relevant package purchase flows. + • Form Handling: + • Book a photoshoot or Sign up forms gather user data (name, email, event details, referral code, etc.). + • Data is sent to your back end via fetch/XHR or a traditional form submit. + • Analytics Tracking: + • Google Analytics snippet or a privacy-friendly alternative (e.g., Plausible, Matomo) for page views, button clicks, sign-up conversions, etc. + • Optionally track custom events (e.g., “Clicked on Affirm,” “Submitted referral code”). + +⸻ + +3. Back End + +You have two main approaches: + +A. Traditional Server (Node + Express or similar) + 1. Endpoints for form submissions, e.g. POST /api/book or POST /api/signup. + 2. Validates incoming data (e.g., ensuring email is valid, checking referral code). + 3. Stores user data in the SQL database. + 4. Handles business logic: e.g., if a referral code is valid, add referral credit to the referrer’s record. + 5. Sends an email confirmation or triggers a payment flow (like Affirm or Stripe). + +B. Serverless Functions (AWS Lambda, Azure Functions, Netlify, Vercel, etc.) + 1. Each function is an endpoint. For instance, POST /api/book is a single function that runs on submission. + 2. Same steps as above: data validation, DB insertion, referral logic. + 3. Scales automatically, often simpler to deploy for smaller projects. + +In either approach, the back end communicates with your SQL database to read/write user data. + +⸻ + +4. SQL Database + +A relational database (like MySQL, PostgreSQL, or Azure SQL) is used to store: + • Users table: + • id, name, email, signup_date, etc. + • Possibly store referral_code or referred_by if someone was referred. + • Bookings table: + • id, user_id, event_type (wedding, portrait, etc.), date, location, package_selected, etc. + • Referrals table (optional, or you can store it in Users): + • id, referrer_user_id, referred_user_id, referral_code, status (pending, completed), reward_amount, etc. + • Analytics table (optional if you want to store custom events in your own DB): + • id, event_name, timestamp, user_id, page_url, etc. + +Referral Program logic: + • When a new user signs up with ref=CODE123, the back end: + 1. Looks up the user who owns CODE123. + 2. Creates a record in Referrals linking the new user to the existing user. + 3. Possibly sets a reward or discount for both parties (e.g., “Referrer gets $50 off next shoot,” “Referee gets 10% discount.”) + +Data Security: + • Use parameterized queries or an ORM (Sequelize, TypeORM, Prisma) to avoid SQL injection. + • Store sensitive data (like user emails) securely. + • Ensure compliance with privacy laws if storing personal data. + +⸻ + +5. Analytics & Dashboard + 1. Google Analytics (GA4) or another tool: + • Add the tracking code snippet to your site. + • Track page views, conversions (like signups, bookings), and referral link usage. + • GA automatically collects a lot of data, which you can view in the GA dashboard. + 2. SQL-based Analytics: + • If you want deeper analysis, store sign-up or event data in your own tables. + • Use a BI tool (Tableau, Power BI, Metabase, Redash, etc.) to connect to your SQL DB. + • Create custom dashboards showing signups over time, referrals, booking types, etc. + 3. Admin Panel (Optional): + • Build a secure admin panel or use a headless BI tool to see your data. + • View all users, bookings, referrals, and analytics in one place. + • Mark referrals as “paid out” or “completed.” + • Adjust user roles or statuses. + +⸻ + +6. Putting It All Together + 1. Visitor lands on your site. + 2. Analytics logs a page view. + 3. If the visitor clicks “Book Now” or “Sign Up,” a form is displayed. + 4. The visitor enters details + optional referral code. + 5. Front End sends this data via POST to your Back End. + 6. The Back End: + • Validates data. + • Checks if referral code is valid (looking it up in your Users or Referrals table). + • Inserts the new user or booking into your SQL DB. + • If valid referral, updates the referrer’s record or the Referrals table. + 7. Confirmation is sent back to the user (and possibly an email). + 8. Analytics logs a “sign-up” or “booking” event. + 9. You can then log in to your admin or analytics dashboard to see who signed up, if a referral was used, etc. + 10. Over time, you can query your SQL DB to generate insights: e.g., “How many referred signups do we get monthly?” or “Which referral codes are the most successful?” + +⸻ + +7. Considerations & Recommendations + • Data Privacy & Security: + • Ensure you’re following relevant data protection laws (GDPR, CCPA if applicable). + • Use HTTPS for all form submissions. + • Scalability: + • If you expect many signups, ensure your DB can handle the load. + • Use caching or load balancing if needed. + • Referral Program Implementation: + • Decide on the incentive (discount, cash reward, freebies). + • Decide if you want to auto-apply the reward or require manual admin approval. + • Possibly track “referral success” if the referred user completes a booking or payment. + • Payment & Affirm: + • If you accept online payments, you might integrate Stripe or PayPal. + • For Affirm BNPL, you already have a snippet. Make sure the final order data is also stored in your DB to track revenue and user details. + • Analytics Depth: + • If you want advanced funnel tracking (e.g., “X% of users who see the packages page actually book a shoot”), set up Goals or Conversions in GA4 or your chosen analytics platform. + • If you want raw event data in SQL, you can create an Events table. + +⸻ + +Example Tech Stack + • Front End: + • React/Next.js or pure HTML/CSS/JS with a build system. + • Affirm snippet, Google Analytics snippet. + • Back End: + • Node.js with Express or a serverless platform (AWS Lambda, Vercel, Netlify). + • APIs: POST /api/signup, POST /api/booking, etc. + • Database: + • MySQL, PostgreSQL, or a managed cloud SQL solution (Azure SQL, AWS RDS, etc.). + • Admin Panel: + • Could be a separate Next.js/React app or a simple server-rendered admin behind login. + • Alternatively, use a self-hosted analytics dashboard like Metabase to visualize data from your DB. + • Referral Program: + • Each user has a referral_code (e.g., random string or user ID–based). + • New signups can provide that code. + • Logic in back end updates the referrals table. + +⸻ + +Conclusion + +By combining a front-end website (with sign-up forms and referral code fields), a back end (handling logic, database writes, Affirm integration), a SQL database (storing user data, referrals, bookings), and an analytics layer (Google Analytics, plus optional custom SQL queries), you’ll have a complete pipeline. You can: + • Track signups, bookings, and conversions. + • Offer a referral program with unique codes and store them in your DB. + • Analyze data in real time or via a dashboard. + • Grow your photography business with insights into which categories (weddings, corporate, etc.) or which referrals generate the most leads. + +This setup is flexible: you can start small (simple form + single DB table) and scale up as your user base grows, adding more advanced analytics, referral incentives, or specialized admin dashboards. \ No newline at end of file diff --git a/db/schema.sql b/db/schema.sql new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn new file mode 120000 index 0000000..cf76760 --- /dev/null +++ b/node_modules/.bin/acorn @@ -0,0 +1 @@ +../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/.bin/esbuild b/node_modules/.bin/esbuild new file mode 120000 index 0000000..c83ac07 --- /dev/null +++ b/node_modules/.bin/esbuild @@ -0,0 +1 @@ +../esbuild/bin/esbuild \ No newline at end of file diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime new file mode 120000 index 0000000..fbb7ee0 --- /dev/null +++ b/node_modules/.bin/mime @@ -0,0 +1 @@ +../mime/cli.js \ No newline at end of file diff --git a/node_modules/.bin/miniflare b/node_modules/.bin/miniflare new file mode 120000 index 0000000..69b1982 --- /dev/null +++ b/node_modules/.bin/miniflare @@ -0,0 +1 @@ +../miniflare/bootstrap.js \ No newline at end of file diff --git a/node_modules/.bin/mustache b/node_modules/.bin/mustache new file mode 120000 index 0000000..f8b7197 --- /dev/null +++ b/node_modules/.bin/mustache @@ -0,0 +1 @@ +../mustache/bin/mustache \ No newline at end of file diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver new file mode 120000 index 0000000..5aaadf4 --- /dev/null +++ b/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/.bin/workerd b/node_modules/.bin/workerd new file mode 120000 index 0000000..1b2e13a --- /dev/null +++ b/node_modules/.bin/workerd @@ -0,0 +1 @@ +../workerd/bin/workerd \ No newline at end of file diff --git a/node_modules/.bin/wrangler b/node_modules/.bin/wrangler new file mode 120000 index 0000000..dc4c14f --- /dev/null +++ b/node_modules/.bin/wrangler @@ -0,0 +1 @@ +../wrangler/bin/wrangler.js \ No newline at end of file diff --git a/node_modules/.bin/wrangler2 b/node_modules/.bin/wrangler2 new file mode 120000 index 0000000..dc4c14f --- /dev/null +++ b/node_modules/.bin/wrangler2 @@ -0,0 +1 @@ +../wrangler/bin/wrangler.js \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..a06b59c --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,1513 @@ +{ + "name": "elohimstudio", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@cloudflare/kv-asset-handler": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.4.0.tgz", + "integrity": "sha512-+tv3z+SPp+gqTIcImN9o0hqE9xyfQjI1XD9pL6NuKjua9B1y7mNYv0S9cP+QEbA4ppVgGZEmKOvHX5G5Ei1CVA==", + "license": "MIT OR Apache-2.0", + "dependencies": { + "mime": "^3.0.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@cloudflare/unenv-preset": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@cloudflare/unenv-preset/-/unenv-preset-2.0.2.tgz", + "integrity": "sha512-nyzYnlZjjV5xT3LizahG1Iu6mnrCaxglJ04rZLpDwlDVDZ7v46lNsfxhV3A/xtfgQuSHmLnc6SVI+KwBpc3Lwg==", + "dev": true, + "license": "MIT OR Apache-2.0", + "peerDependencies": { + "unenv": "2.0.0-rc.14", + "workerd": "^1.20250124.0" + }, + "peerDependenciesMeta": { + "workerd": { + "optional": true + } + } + }, + "node_modules/@cloudflare/workerd-darwin-arm64": { + "version": "1.20250317.0", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20250317.0.tgz", + "integrity": "sha512-ypn2/SIK7LAouYx5oB0NNhzb3h+ZdXtDh94VCcsNV81xAVdDXKp6xvTnqY8CWjGfuKWJocbRZVZvU+Lquhuujg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", + "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", + "integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz", + "integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", + "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/as-table": { + "version": "1.0.55", + "resolved": "https://registry.npmjs.org/as-table/-/as-table-1.0.55.tgz", + "integrity": "sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "printable-characters": "^1.0.42" + } + }, + "node_modules/blake3-wasm": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz", + "integrity": "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==", + "dev": true, + "license": "MIT" + }, + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "license": "MIT" + }, + "node_modules/data-uri-to-buffer": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-2.0.2.tgz", + "integrity": "sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/defu": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", + "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", + "dev": true, + "license": "MIT" + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detect-libc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", + "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", + "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.24.2", + "@esbuild/android-arm": "0.24.2", + "@esbuild/android-arm64": "0.24.2", + "@esbuild/android-x64": "0.24.2", + "@esbuild/darwin-arm64": "0.24.2", + "@esbuild/darwin-x64": "0.24.2", + "@esbuild/freebsd-arm64": "0.24.2", + "@esbuild/freebsd-x64": "0.24.2", + "@esbuild/linux-arm": "0.24.2", + "@esbuild/linux-arm64": "0.24.2", + "@esbuild/linux-ia32": "0.24.2", + "@esbuild/linux-loong64": "0.24.2", + "@esbuild/linux-mips64el": "0.24.2", + "@esbuild/linux-ppc64": "0.24.2", + "@esbuild/linux-riscv64": "0.24.2", + "@esbuild/linux-s390x": "0.24.2", + "@esbuild/linux-x64": "0.24.2", + "@esbuild/netbsd-arm64": "0.24.2", + "@esbuild/netbsd-x64": "0.24.2", + "@esbuild/openbsd-arm64": "0.24.2", + "@esbuild/openbsd-x64": "0.24.2", + "@esbuild/sunos-x64": "0.24.2", + "@esbuild/win32-arm64": "0.24.2", + "@esbuild/win32-ia32": "0.24.2", + "@esbuild/win32-x64": "0.24.2" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/exit-hook": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-2.2.1.tgz", + "integrity": "sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/express": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.12", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/exsolve": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.0.4.tgz", + "integrity": "sha512-xsZH6PXaER4XoV+NiT7JHp1bJodJVT+cxeSH1G0f0tlT0lJqYuHUP3bUx2HtfTDvOagMINYp8rsqusxud3RXhw==", + "dev": true, + "license": "MIT" + }, + "node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-source": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/get-source/-/get-source-2.0.12.tgz", + "integrity": "sha512-X5+4+iD+HoSeEED+uwrQ07BOQr0kEDFMVqqpBuI+RaZBpBpHCuXxo70bjar6f0b0u/DQJsJ7ssurpP0V60Az+w==", + "dev": true, + "license": "Unlicense", + "dependencies": { + "data-uri-to-buffer": "^2.0.0", + "source-map": "^0.6.1" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/miniflare": { + "version": "4.20250317.1", + "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-4.20250317.1.tgz", + "integrity": "sha512-FFReRGco05fkgAB/x9VmxTuQ3KXW4JcpKkpuMZJn+JoZ2dd8hY5J1W9HBI4tSwfQ+hVyd9X7oXbn4BimoD3i8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "0.8.1", + "acorn": "8.14.0", + "acorn-walk": "8.3.2", + "exit-hook": "2.2.1", + "glob-to-regexp": "0.4.1", + "stoppable": "1.1.0", + "undici": "^5.28.5", + "workerd": "1.20250317.0", + "ws": "8.18.0", + "youch": "3.2.3", + "zod": "3.22.3" + }, + "bin": { + "miniflare": "bootstrap.js" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/mustache": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", + "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", + "dev": true, + "license": "MIT", + "bin": { + "mustache": "bin/mustache" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ohash": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.11.tgz", + "integrity": "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/printable-characters": { + "version": "1.0.42", + "resolved": "https://registry.npmjs.org/printable-characters/-/printable-characters-1.0.42.tgz", + "integrity": "sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==", + "dev": true, + "license": "Unlicense" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "optional": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/sharp": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz", + "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.3", + "semver": "^7.6.3" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.33.5", + "@img/sharp-darwin-x64": "0.33.5", + "@img/sharp-libvips-darwin-arm64": "1.0.4", + "@img/sharp-libvips-darwin-x64": "1.0.4", + "@img/sharp-libvips-linux-arm": "1.0.5", + "@img/sharp-libvips-linux-arm64": "1.0.4", + "@img/sharp-libvips-linux-s390x": "1.0.4", + "@img/sharp-libvips-linux-x64": "1.0.4", + "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", + "@img/sharp-libvips-linuxmusl-x64": "1.0.4", + "@img/sharp-linux-arm": "0.33.5", + "@img/sharp-linux-arm64": "0.33.5", + "@img/sharp-linux-s390x": "0.33.5", + "@img/sharp-linux-x64": "0.33.5", + "@img/sharp-linuxmusl-arm64": "0.33.5", + "@img/sharp-linuxmusl-x64": "0.33.5", + "@img/sharp-wasm32": "0.33.5", + "@img/sharp-win32-ia32": "0.33.5", + "@img/sharp-win32-x64": "0.33.5" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stacktracey": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/stacktracey/-/stacktracey-2.1.8.tgz", + "integrity": "sha512-Kpij9riA+UNg7TnphqjH7/CzctQ/owJGNbFkfEeve4Z4uxT5+JapVLFXcsurIfN34gnTWZNJ/f7NMG0E8JDzTw==", + "dev": true, + "license": "Unlicense", + "dependencies": { + "as-table": "^1.0.36", + "get-source": "^2.0.12" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/stoppable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", + "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4", + "npm": ">=6" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ufo": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", + "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/undici": { + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz", + "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, + "node_modules/unenv": { + "version": "2.0.0-rc.14", + "resolved": "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.14.tgz", + "integrity": "sha512-od496pShMen7nOy5VmVJCnq8rptd45vh6Nx/r2iPbrba6pa6p+tS2ywuIHRZ/OBvSbQZB0kWvpO9XBNVFXHD3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "defu": "^6.1.4", + "exsolve": "^1.0.1", + "ohash": "^2.0.10", + "pathe": "^2.0.3", + "ufo": "^1.5.4" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/workerd": { + "version": "1.20250317.0", + "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20250317.0.tgz", + "integrity": "sha512-m+aqA4RS/jsIaml0KuTi96UBlkx1vC0mcLClGKPFNPiMStK75hVQxUhupXEMI4knHtb/vgNQyPFMKAJtxW5c6w==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "bin": { + "workerd": "bin/workerd" + }, + "engines": { + "node": ">=16" + }, + "optionalDependencies": { + "@cloudflare/workerd-darwin-64": "1.20250317.0", + "@cloudflare/workerd-darwin-arm64": "1.20250317.0", + "@cloudflare/workerd-linux-64": "1.20250317.0", + "@cloudflare/workerd-linux-arm64": "1.20250317.0", + "@cloudflare/workerd-windows-64": "1.20250317.0" + } + }, + "node_modules/wrangler": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.2.0.tgz", + "integrity": "sha512-wY+jq6tsaBVrxCesJ9NF9R63T+96W6Ht9xEkAdw9JnkstUWM6lGywMOeupYP8Ji8x4roNa98XrT0Gw8qu+QRNQ==", + "dev": true, + "license": "MIT OR Apache-2.0", + "dependencies": { + "@cloudflare/kv-asset-handler": "0.4.0", + "@cloudflare/unenv-preset": "2.0.2", + "blake3-wasm": "2.1.5", + "esbuild": "0.24.2", + "miniflare": "4.20250317.1", + "path-to-regexp": "6.3.0", + "unenv": "2.0.0-rc.14", + "workerd": "1.20250317.0" + }, + "bin": { + "wrangler": "bin/wrangler.js", + "wrangler2": "bin/wrangler.js" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2", + "sharp": "^0.33.5" + }, + "peerDependencies": { + "@cloudflare/workers-types": "^4.20250317.0" + }, + "peerDependenciesMeta": { + "@cloudflare/workers-types": { + "optional": true + } + } + }, + "node_modules/wrangler/node_modules/path-to-regexp": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", + "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/youch": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/youch/-/youch-3.2.3.tgz", + "integrity": "sha512-ZBcWz/uzZaQVdCvfV4uk616Bbpf2ee+F/AvuKDR5EwX/Y4v06xWdtMluqTD7+KlZdM93lLm9gMZYo0sKBS0pgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cookie": "^0.5.0", + "mustache": "^4.2.0", + "stacktracey": "^2.1.8" + } + }, + "node_modules/youch/node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/zod": { + "version": "3.22.3", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.3.tgz", + "integrity": "sha512-EjIevzuJRiRPbVH4mGc8nApb/lVLKVpmUhAaR5R5doKGfAnGJ6Gr3CViAVjP+4FWSxCsybeWQdcgCtbX+7oZug==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/node_modules/@cloudflare/kv-asset-handler/README.md b/node_modules/@cloudflare/kv-asset-handler/README.md new file mode 100644 index 0000000..467b4e4 --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/README.md @@ -0,0 +1,346 @@ +# @cloudflare/kv-asset-handler + +[![npm](https://img.shields.io/npm/v/@cloudflare/kv-asset-handler.svg)](https://www.npmjs.com/package/@cloudflare/kv-asset-handler)   +[![Run npm tests](https://github.com/cloudflare/kv-asset-handler/actions/workflows/test.yml/badge.svg)](https://github.com/cloudflare/kv-asset-handler/actions/workflows/test.yml)   +[![Lint Markdown](https://github.com/cloudflare/kv-asset-handler/actions/workflows/lint.yml/badge.svg)](https://github.com/cloudflare/kv-asset-handler/actions/workflows/lint.yml)   + +`kv-asset-handler` is an open-source library for managing the retrieval of static assets from [Workers KV](https://developers.cloudflare.com/workers/runtime-apis/kv) inside of a [Cloudflare Workers](https://workers.dev) function. `kv-asset-handler` is designed for use with [Workers Sites](https://developers.cloudflare.com/workers/platform/sites), a feature included in [Wrangler](https://github.com/cloudflare/wrangler), our command-line tool for deploying Workers projects. + +`kv-asset-handler` runs as part of a Cloudflare Workers function, so it allows you to customize _how_ and _when_ your static assets are loaded, as well as customize how those assets behave before they're sent to the client. + +Most users and sites will not need these customizations, and just want to serve their statically built applications. For that simple use-case, you can check out [Cloudflare Pages](https://pages.cloudflare.com), our batteries-included approach to deploying static sites on Cloudflare's edge network. Workers Sites was designed as a precursor to Cloudflare Pages, so check out Pages if you just want to deploy your static site without any special customizations! + +For users who _do_ want to customize their assets, and want to build complex experiences on top of their static assets, `kv-asset-handler` (and the default [Workers Sites template](https://github.com/cloudflare/worker-sites-template), which is provided for use with Wrangler + Workers Sites) allows you to customize caching behavior, headers, and anything else about how your Workers function loads the static assets for your site stored in Workers KV. + +The Cloudflare Workers Discord server is an active place where Workers users get help, share feedback, and collaborate on making our platform better. The `#workers` channel in particular is a great place to chat about `kv-asset-handler`, and building cool experiences for your users using these tools! If you have questions, want to share what you're working on, or give feedback, [join us in Discord and say hello](https://discord.cloudflare.com)! + +- [Installation](#installation) +- [Usage](#usage) +- [`getAssetFromKV`](#getassetfromkv) + - [Example](#example) + * [Return](#return) + * [Optional Arguments](#optional-arguments) + - [`mapRequestToAsset`](#maprequesttoasset) + - [Example](#example-1) + - [`cacheControl`](#cachecontrol) + - [`browserTTL`](#browserttl) + - [`edgeTTL`](#edgettl) + - [`bypassCache`](#bypasscache) + - [`ASSET_NAMESPACE` (required for ES Modules)](#asset_namespace-required-for-es-modules) + - [`ASSET_MANIFEST` (required for ES Modules)](#asset_manifest-required-for-es-modules) + - [`defaultETag`](#defaultetag-optional) + +* [Helper functions](#helper-functions) + - [`mapRequestToAsset`](#maprequesttoasset-1) + - [`serveSinglePageApp`](#servesinglepageapp) +* [Cache revalidation and etags](#cache-revalidation-and-etags) + +## Installation + +Add this package to your `package.json` by running this in the root of your +project's directory: + +``` +npm i @cloudflare/kv-asset-handler +``` + +## Usage + +This package was designed to work with [Worker Sites](https://workers.cloudflare.com/sites). + +## `getAssetFromKV` + +getAssetFromKV(Evt) => Promise + +`getAssetFromKV` is an async function that takes an `Evt` object (containing a `Request` and a [`waitUntil`](https://developers.cloudflare.com/workers/runtime-apis/fetch-event#waituntil)) and returns a `Response` object if the request matches an asset in KV, otherwise it will throw a `KVError`. + +#### Example + +This example checks for the existence of a value in KV, and returns it if it's there, and returns a 404 if it is not. It also serves index.html from `/`. + +### Return + +`getAssetFromKV` returns a `Promise` with `Response` being the body of the asset requested. + +Known errors to be thrown are: + +- MethodNotAllowedError +- NotFoundError +- InternalError + +#### ES Modules + +```js +import manifestJSON from "__STATIC_CONTENT_MANIFEST"; +import { + getAssetFromKV, + MethodNotAllowedError, + NotFoundError, +} from "@cloudflare/kv-asset-handler"; + +const assetManifest = JSON.parse(manifestJSON); + +export default { + async fetch(request, env, ctx) { + if (request.url.includes("/docs")) { + try { + return await getAssetFromKV( + { + request, + waitUntil(promise) { + return ctx.waitUntil(promise); + }, + }, + { + ASSET_NAMESPACE: env.__STATIC_CONTENT, + ASSET_MANIFEST: assetManifest, + } + ); + } catch (e) { + if (e instanceof NotFoundError) { + // ... + } else if (e instanceof MethodNotAllowedError) { + // ... + } else { + return new Response("An unexpected error occurred", { status: 500 }); + } + } + } else return fetch(request); + }, +}; +``` + +#### Service Worker + +```js +import { + getAssetFromKV, + MethodNotAllowedError, + NotFoundError, +} from "@cloudflare/kv-asset-handler"; + +addEventListener("fetch", (event) => { + event.respondWith(handleEvent(event)); +}); + +async function handleEvent(event) { + if (event.request.url.includes("/docs")) { + try { + return await getAssetFromKV(event); + } catch (e) { + if (e instanceof NotFoundError) { + // ... + } else if (e instanceof MethodNotAllowedError) { + // ... + } else { + return new Response("An unexpected error occurred", { status: 500 }); + } + } + } else return fetch(event.request); +} +``` + +### Optional Arguments + +You can customize the behavior of `getAssetFromKV` by passing the following properties as an object into the second argument. + +``` +getAssetFromKV(event, { mapRequestToAsset: ... }) +``` + +#### `mapRequestToAsset` + +mapRequestToAsset(Request) => Request + +Maps the incoming request to the value that will be looked up in Cloudflare's KV + +By default, mapRequestToAsset is set to the exported function [`mapRequestToAsset`](#maprequesttoasset-1). This works for most static site generators, but you can customize this behavior by passing your own function as `mapRequestToAsset`. The function should take a `Request` object as its only argument, and return a new `Request` object with an updated path to be looked up in the asset manifest/KV. + +For SPA mapping pass in the [`serveSinglePageApp`](#servesinglepageapp) function + +#### Example + +Strip `/docs` from any incoming request before looking up an asset in Cloudflare's KV. + +```js +import { getAssetFromKV, mapRequestToAsset } from '@cloudflare/kv-asset-handler' +... +const customKeyModifier = request => { + let url = request.url + //custom key mapping optional + url = url.replace('/docs', '').replace(/^\/+/, '') + return mapRequestToAsset(new Request(url, request)) +} +let asset = await getAssetFromKV(event, { mapRequestToAsset: customKeyModifier }) +``` + +#### `cacheControl` + +type: object + +`cacheControl` allows you to configure options for both the Cloudflare Cache accessed by your Worker, and the browser cache headers sent along with your Workers' responses. The default values are as follows: + +```javascript +let cacheControl = { + browserTTL: null, // do not set cache control ttl on responses + edgeTTL: 2 * 60 * 60 * 24, // 2 days + bypassCache: false, // do not bypass Cloudflare's cache +}; +``` + +##### `browserTTL` + +type: number | null +nullable: true + +Sets the `Cache-Control: max-age` header on the response returned from the Worker. By default set to `null` which will not add the header at all. + +##### `edgeTTL` + +type: number | null +nullable: true + +Sets the `Cache-Control: max-age` header on the response used as the edge cache key. By default set to 2 days (`2 * 60 * 60 * 24`). When null will not cache on the edge at all. + +##### `bypassCache` + +type: boolean + +Determines whether to cache requests on Cloudflare's edge cache. By default set to `false` (recommended for production builds). Useful for development when you need to eliminate the cache's effect on testing. + +#### `ASSET_NAMESPACE` (required for ES Modules) + +type: KV Namespace Binding + +The binding name to the KV Namespace populated with key/value entries of files for the Worker to serve. By default, Workers Sites uses a [binding to a Workers KV Namespace](https://developers.cloudflare.com/workers/reference/storage/api/#namespaces) named `__STATIC_CONTENT`. + +It is further assumed that this namespace consists of static assets such as HTML, CSS, JavaScript, or image files, keyed off of a relative path that roughly matches the assumed URL pathname of the incoming request. + +In ES Modules format, this argument is required, and can be gotten from `env`. + +##### ES Module + +```js +return getAssetFromKV( + { + request, + waitUntil(promise) { + return ctx.waitUntil(promise) + }, + }, + { + ASSET_NAMESPACE: env.__STATIC_CONTENT, + }, +) +``` + +##### Service Worker + +``` +return getAssetFromKV(event, { ASSET_NAMESPACE: MY_NAMESPACE }) +``` + +#### `ASSET_MANIFEST` (required for ES Modules) + +type: text blob (JSON formatted) or object + +The mapping of requested file path to the key stored on Cloudflare. + +Workers Sites with Wrangler bundles up a text blob that maps request paths to content-hashed keys that are generated by Wrangler as a cache-busting measure. If this option/binding is not present, the function will fallback to using the raw pathname to look up your asset in KV. If, for whatever reason, you have rolled your own implementation of this, you can include your own by passing a stringified JSON object where the keys are expected paths, and the values are the expected keys in your KV namespace. + +In ES Modules format, this argument is required, and can be imported. + +##### ES Module + +```js +import manifestJSON from '__STATIC_CONTENT_MANIFEST' +let manifest = JSON.parse(manifestJSON) +manifest['index.html'] = 'index.special.html' + +return getAssetFromKV( + { + request, + waitUntil(promise) { + return ctx.waitUntil(promise) + }, + }, + { + ASSET_MANIFEST: manifest, + // ... + }, +) +``` + +##### Service Worker + +``` +let assetManifest = { "index.html": "index.special.html" } +return getAssetFromKV(event, { ASSET_MANIFEST: assetManifest }) +``` + +#### `defaultMimeType` (optional) + +type: string + +This is the mime type that will be used for files with unrecognized or missing extensions. The default value is `'text/plain'`. + +If you are serving a static site and would like to use extensionless HTML files instead of index.html files, set this to `'text/html'`. + +#### `defaultDocument` (optional) + +type: string + +This is the default document that will be concatenated for requests ends in `'/'` or without a valid mime type like `'/about'` or `'/about.me'`. The default value is `'index.html'`. + +#### `defaultETag` (optional) + +type: `'strong' | 'weak'` + +This determines the format of the response [ETag header](https://developer.mozilla.org/docs/Web/HTTP/Headers/ETag). If the resource is in the cache, the ETag will always be weakened before being returned. +The default value is `'strong'`. + +# Helper functions + +## `mapRequestToAsset` + +mapRequestToAsset(Request) => Request + +The default function for mapping incoming requests to keys in Cloudflare's KV. + +Takes any path that ends in `/` or evaluates to an HTML file and appends `index.html` or `/index.html` for lookup in your Workers KV namespace. + +## `serveSinglePageApp` + +serveSinglePageApp(Request) => Request + +A custom handler for mapping requests to a single root: `index.html`. The most common use case is single-page applications - frameworks with in-app routing - such as React Router, VueJS, etc. It takes zero arguments. + +```js +import { getAssetFromKV, serveSinglePageApp } from '@cloudflare/kv-asset-handler' +... +let asset = await getAssetFromKV(event, { mapRequestToAsset: serveSinglePageApp }) +``` + +# Cache revalidation and etags + +All responses served from cache (including those with `cf-cache-status: MISS`) include an `etag` response header that identifies the version of the resource. The `etag` value is identical to the path key used in the `ASSET_MANIFEST`. It is updated each time an asset changes and looks like this: `etag: ..` (ex. `etag: index.54321.html`). + +Resources served with an `etag` allow browsers to use the `if-none-match` request header to make conditional requests for that resource in the future. This has two major benefits: + +- When a request's `if-none-match` value matches the `etag` of the resource in Cloudflare cache, Cloudflare will send a `304 Not Modified` response without a body, saving bandwidth. +- Changes to a file on the server are immediately reflected in the browser - even when the cache control directive `max-age` is unexpired. + +#### Disable the `etag` + +To turn `etags` **off**, you must bypass cache: + +```js +/* Turn etags off */ +let cacheControl = { + bypassCache: true, +}; +``` + +#### Syntax and comparison context + +`kv-asset-handler` sets and evaluates etags as [strong validators](https://developer.mozilla.org/en-US/docs/Web/HTTP/Conditional_requests#Strong_validation). To preserve `etag` integrity, the format of the value deviates from the [RFC2616 recommendation to enclose the `etag` with quotation marks](https://tools.ietf.org/html/rfc2616#section-3.11). This is intentional. Cloudflare cache applies the `W/` prefix to all `etags` that use quoted-strings -- a process that converts the `etag` to a "weak validator" when served to a client. diff --git a/node_modules/@cloudflare/kv-asset-handler/dist/index.d.ts b/node_modules/@cloudflare/kv-asset-handler/dist/index.d.ts new file mode 100644 index 0000000..7ba16cb --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/dist/index.d.ts @@ -0,0 +1,36 @@ +import { CacheControl, InternalError, MethodNotAllowedError, NotFoundError, Options } from "./types"; +declare global { + const __STATIC_CONTENT: KVNamespace | undefined, __STATIC_CONTENT_MANIFEST: string; +} +/** + * maps the path of incoming request to the request pathKey to look up + * in bucket and in cache + * e.g. for a path '/' returns '/index.html' which serves + * the content of bucket/index.html + * @param {Request} request incoming request + */ +declare const mapRequestToAsset: (request: Request, options?: Partial) => Request>; +/** + * maps the path of incoming request to /index.html if it evaluates to + * any HTML file. + * @param {Request} request incoming request + */ +declare function serveSinglePageApp(request: Request, options?: Partial): Request; +/** + * takes the path of the incoming request, gathers the appropriate content from KV, and returns + * the response + * + * @param {FetchEvent} event the fetch event of the triggered request + * @param {{mapRequestToAsset: (string: Request) => Request, cacheControl: {bypassCache:boolean, edgeTTL: number, browserTTL:number}, ASSET_NAMESPACE: any, ASSET_MANIFEST:any}} [options] configurable options + * @param {CacheControl} [options.cacheControl] determine how to cache on Cloudflare and the browser + * @param {typeof(options.mapRequestToAsset)} [options.mapRequestToAsset] maps the path of incoming request to the request pathKey to look up + * @param {Object | string} [options.ASSET_NAMESPACE] the binding to the namespace that script references + * @param {any} [options.ASSET_MANIFEST] the map of the key to cache and store in KV + * */ +type Evt = { + request: Request; + waitUntil: (promise: Promise) => void; +}; +declare const getAssetFromKV: (event: Evt, options?: Partial) => Promise; +export { getAssetFromKV, mapRequestToAsset, serveSinglePageApp }; +export { Options, CacheControl, MethodNotAllowedError, NotFoundError, InternalError, }; diff --git a/node_modules/@cloudflare/kv-asset-handler/dist/index.js b/node_modules/@cloudflare/kv-asset-handler/dist/index.js new file mode 100644 index 0000000..b056153 --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/dist/index.js @@ -0,0 +1,308 @@ +"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.InternalError = exports.NotFoundError = exports.MethodNotAllowedError = exports.mapRequestToAsset = exports.getAssetFromKV = void 0; +exports.serveSinglePageApp = serveSinglePageApp; +const mime = __importStar(require("mime")); +const types_1 = require("./types"); +Object.defineProperty(exports, "InternalError", { enumerable: true, get: function () { return types_1.InternalError; } }); +Object.defineProperty(exports, "MethodNotAllowedError", { enumerable: true, get: function () { return types_1.MethodNotAllowedError; } }); +Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return types_1.NotFoundError; } }); +const defaultCacheControl = { + browserTTL: null, + edgeTTL: 2 * 60 * 60 * 24, // 2 days + bypassCache: false, // do not bypass Cloudflare's cache +}; +const parseStringAsObject = (maybeString) => typeof maybeString === "string" + ? JSON.parse(maybeString) + : maybeString; +const getAssetFromKVDefaultOptions = { + ASSET_NAMESPACE: typeof __STATIC_CONTENT !== "undefined" ? __STATIC_CONTENT : undefined, + ASSET_MANIFEST: typeof __STATIC_CONTENT_MANIFEST !== "undefined" + ? parseStringAsObject(__STATIC_CONTENT_MANIFEST) + : {}, + cacheControl: defaultCacheControl, + defaultMimeType: "text/plain", + defaultDocument: "index.html", + pathIsEncoded: false, + defaultETag: "strong", +}; +function assignOptions(options) { + // Assign any missing options passed in to the default + // options.mapRequestToAsset is handled manually later + return Object.assign({}, getAssetFromKVDefaultOptions, options); +} +/** + * maps the path of incoming request to the request pathKey to look up + * in bucket and in cache + * e.g. for a path '/' returns '/index.html' which serves + * the content of bucket/index.html + * @param {Request} request incoming request + */ +const mapRequestToAsset = (request, options) => { + options = assignOptions(options); + const parsedUrl = new URL(request.url); + let pathname = parsedUrl.pathname; + if (pathname.endsWith("/")) { + // If path looks like a directory append options.defaultDocument + // e.g. If path is /about/ -> /about/index.html + pathname = pathname.concat(options.defaultDocument); + } + else if (!mime.getType(pathname)) { + // If path doesn't look like valid content + // e.g. /about.me -> /about.me/index.html + pathname = pathname.concat("/" + options.defaultDocument); + } + parsedUrl.pathname = pathname; + return new Request(parsedUrl.toString(), request); +}; +exports.mapRequestToAsset = mapRequestToAsset; +/** + * maps the path of incoming request to /index.html if it evaluates to + * any HTML file. + * @param {Request} request incoming request + */ +function serveSinglePageApp(request, options) { + options = assignOptions(options); + // First apply the default handler, which already has logic to detect + // paths that should map to HTML files. + request = mapRequestToAsset(request, options); + const parsedUrl = new URL(request.url); + // Detect if the default handler decided to map to + // a HTML file in some specific directory. + if (parsedUrl.pathname.endsWith(".html")) { + // If expected HTML file was missing, just return the root index.html (or options.defaultDocument) + return new Request(`${parsedUrl.origin}/${options.defaultDocument}`, request); + } + else { + // The default handler decided this is not an HTML page. It's probably + // an image, CSS, or JS file. Leave it as-is. + return request; + } +} +const getAssetFromKV = async (event, options) => { + options = assignOptions(options); + const request = event.request; + const ASSET_NAMESPACE = options.ASSET_NAMESPACE; + const ASSET_MANIFEST = parseStringAsObject(options.ASSET_MANIFEST); + if (typeof ASSET_NAMESPACE === "undefined") { + throw new types_1.InternalError(`there is no KV namespace bound to the script`); + } + const rawPathKey = new URL(request.url).pathname.replace(/^\/+/, ""); // strip any preceding /'s + let pathIsEncoded = options.pathIsEncoded; + let requestKey; + // if options.mapRequestToAsset is explicitly passed in, always use it and assume user has own intentions + // otherwise handle request as normal, with default mapRequestToAsset below + if (options.mapRequestToAsset) { + requestKey = options.mapRequestToAsset(request); + } + else if (ASSET_MANIFEST[rawPathKey]) { + requestKey = request; + } + else if (ASSET_MANIFEST[decodeURIComponent(rawPathKey)]) { + pathIsEncoded = true; + requestKey = request; + } + else { + const mappedRequest = mapRequestToAsset(request); + const mappedRawPathKey = new URL(mappedRequest.url).pathname.replace(/^\/+/, ""); + if (ASSET_MANIFEST[decodeURIComponent(mappedRawPathKey)]) { + pathIsEncoded = true; + requestKey = mappedRequest; + } + else { + // use default mapRequestToAsset + requestKey = mapRequestToAsset(request, options); + } + } + const SUPPORTED_METHODS = ["GET", "HEAD"]; + if (!SUPPORTED_METHODS.includes(requestKey.method)) { + throw new types_1.MethodNotAllowedError(`${requestKey.method} is not a valid request method`); + } + const parsedUrl = new URL(requestKey.url); + const pathname = pathIsEncoded + ? decodeURIComponent(parsedUrl.pathname) + : parsedUrl.pathname; // decode percentage encoded path only when necessary + // pathKey is the file path to look up in the manifest + let pathKey = pathname.replace(/^\/+/, ""); // remove prepended / + // @ts-expect-error we should pick cf types here + const cache = caches.default; + let mimeType = mime.getType(pathKey) || options.defaultMimeType; + if (mimeType.startsWith("text") || mimeType === "application/javascript") { + mimeType += "; charset=utf-8"; + } + let shouldEdgeCache = false; // false if storing in KV by raw file path i.e. no hash + // check manifest for map from file path to hash + if (typeof ASSET_MANIFEST !== "undefined") { + if (ASSET_MANIFEST[pathKey]) { + pathKey = ASSET_MANIFEST[pathKey]; + // if path key is in asset manifest, we can assume it contains a content hash and can be cached + shouldEdgeCache = true; + } + } + // TODO this excludes search params from cache, investigate ideal behavior + const cacheKey = new Request(`${parsedUrl.origin}/${pathKey}`, request); + // if argument passed in for cacheControl is a function then + // evaluate that function. otherwise return the Object passed in + // or default Object + const evalCacheOpts = (() => { + switch (typeof options.cacheControl) { + case "function": + return options.cacheControl(request); + case "object": + return options.cacheControl; + default: + return defaultCacheControl; + } + })(); + // formats the etag depending on the response context. if the entityId + // is invalid, returns an empty string (instead of null) to prevent the + // the potentially disastrous scenario where the value of the Etag resp + // header is "null". Could be modified in future to base64 encode etc + const formatETag = (entityId = pathKey, validatorType = options.defaultETag) => { + if (!entityId) { + return ""; + } + switch (validatorType) { + case "weak": + if (!entityId.startsWith("W/")) { + if (entityId.startsWith(`"`) && entityId.endsWith(`"`)) { + return `W/${entityId}`; + } + return `W/"${entityId}"`; + } + return entityId; + case "strong": + if (entityId.startsWith(`W/"`)) { + entityId = entityId.replace("W/", ""); + } + if (!entityId.endsWith(`"`)) { + entityId = `"${entityId}"`; + } + return entityId; + default: + return ""; + } + }; + options.cacheControl = Object.assign({}, defaultCacheControl, evalCacheOpts); + // override shouldEdgeCache if options say to bypassCache + if (options.cacheControl.bypassCache || + options.cacheControl.edgeTTL === null || + request.method == "HEAD") { + shouldEdgeCache = false; + } + // only set max-age if explicitly passed in a number as an arg + const shouldSetBrowserCache = typeof options.cacheControl.browserTTL === "number"; + let response = null; + if (shouldEdgeCache) { + response = await cache.match(cacheKey); + } + if (response) { + if (response.status > 300 && response.status < 400) { + if (response.body && "cancel" in Object.getPrototypeOf(response.body)) { + // Body exists and environment supports readable streams + response.body.cancel(); + } + else { + // Environment doesnt support readable streams, or null repsonse body. Nothing to do + } + response = new Response(null, response); + } + else { + // fixes #165 + const opts = { + headers: new Headers(response.headers), + status: 0, + statusText: "", + }; + opts.headers.set("cf-cache-status", "HIT"); + if (response.status) { + opts.status = response.status; + opts.statusText = response.statusText; + } + else if (opts.headers.has("Content-Range")) { + opts.status = 206; + opts.statusText = "Partial Content"; + } + else { + opts.status = 200; + opts.statusText = "OK"; + } + response = new Response(response.body, opts); + } + } + else { + const body = await ASSET_NAMESPACE.get(pathKey, "arrayBuffer"); + if (body === null) { + throw new types_1.NotFoundError(`could not find ${pathKey} in your content namespace`); + } + response = new Response(body); + if (shouldEdgeCache) { + response.headers.set("Accept-Ranges", "bytes"); + response.headers.set("Content-Length", String(body.byteLength)); + // set etag before cache insertion + if (!response.headers.has("etag")) { + response.headers.set("etag", formatETag(pathKey)); + } + // determine Cloudflare cache behavior + response.headers.set("Cache-Control", `max-age=${options.cacheControl.edgeTTL}`); + event.waitUntil(cache.put(cacheKey, response.clone())); + response.headers.set("CF-Cache-Status", "MISS"); + } + } + response.headers.set("Content-Type", mimeType); + if (response.status === 304) { + const etag = formatETag(response.headers.get("etag")); + const ifNoneMatch = cacheKey.headers.get("if-none-match"); + const proxyCacheStatus = response.headers.get("CF-Cache-Status"); + if (etag) { + if (ifNoneMatch && ifNoneMatch === etag && proxyCacheStatus === "MISS") { + response.headers.set("CF-Cache-Status", "EXPIRED"); + } + else { + response.headers.set("CF-Cache-Status", "REVALIDATED"); + } + response.headers.set("etag", formatETag(etag, "weak")); + } + } + if (shouldSetBrowserCache) { + response.headers.set("Cache-Control", `max-age=${options.cacheControl.browserTTL}`); + } + else { + response.headers.delete("Cache-Control"); + } + return response; +}; +exports.getAssetFromKV = getAssetFromKV; diff --git a/node_modules/@cloudflare/kv-asset-handler/dist/mocks.d.ts b/node_modules/@cloudflare/kv-asset-handler/dist/mocks.d.ts new file mode 100644 index 0000000..1a41f5d --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/dist/mocks.d.ts @@ -0,0 +1,14 @@ +export declare const getEvent: (request: Request) => Pick; +export declare const mockKV: (kvStore: Record) => { + get: (path: string) => string; +}; +export declare const mockManifest: () => string; +export declare const mockCaches: () => { + default: { + match(key: Request): Promise; + put(key: Request, val: Response): Promise; + }; +}; +export declare function mockRequestScope(): void; +export declare function mockGlobalScope(): void; +export declare const sleep: (milliseconds: number) => Promise; diff --git a/node_modules/@cloudflare/kv-asset-handler/dist/mocks.js b/node_modules/@cloudflare/kv-asset-handler/dist/mocks.js new file mode 100644 index 0000000..39e0369 --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/dist/mocks.js @@ -0,0 +1,153 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sleep = exports.mockCaches = exports.mockManifest = exports.mockKV = exports.getEvent = void 0; +exports.mockRequestScope = mockRequestScope; +exports.mockGlobalScope = mockGlobalScope; +const service_worker_mock_1 = __importDefault(require("service-worker-mock")); +const HASH = "123HASHBROWN"; +const getEvent = (request) => { + const waitUntil = async (maybePromise) => { + await maybePromise; + }; + return { + request, + waitUntil, + }; +}; +exports.getEvent = getEvent; +const store = { + "key1.123HASHBROWN.txt": "val1", + "key1.123HASHBROWN.png": "val1", + "index.123HASHBROWN.html": "index.html", + "cache.123HASHBROWN.html": "cache me if you can", + "测试.123HASHBROWN.html": "My filename is non-ascii", + "%not-really-percent-encoded.123HASHBROWN.html": "browser percent encoded", + "%2F.123HASHBROWN.html": "user percent encoded", + "你好.123HASHBROWN.html": "I shouldnt be served", + "%E4%BD%A0%E5%A5%BD.123HASHBROWN.html": "Im important", + "nohash.txt": "no hash but still got some result", + "sub/blah.123HASHBROWN.png": "picturedis", + "sub/index.123HASHBROWN.html": "picturedis", + "client.123HASHBROWN": "important file", + "client.123HASHBROWN/index.html": "Im here but serve my big bro above", + "image.123HASHBROWN.png": "imagepng", + "image.123HASHBROWN.webp": "imagewebp", + "你好/index.123HASHBROWN.html": "My path is non-ascii", +}; +const mockKV = (kvStore) => { + return { + get: (path) => kvStore[path] || null, + }; +}; +exports.mockKV = mockKV; +const mockManifest = () => { + return JSON.stringify({ + "key1.txt": `key1.${HASH}.txt`, + "key1.png": `key1.${HASH}.png`, + "cache.html": `cache.${HASH}.html`, + "测试.html": `测试.${HASH}.html`, + "你好.html": `你好.${HASH}.html`, + "%not-really-percent-encoded.html": `%not-really-percent-encoded.${HASH}.html`, + "%2F.html": `%2F.${HASH}.html`, + "%E4%BD%A0%E5%A5%BD.html": `%E4%BD%A0%E5%A5%BD.${HASH}.html`, + "index.html": `index.${HASH}.html`, + "sub/blah.png": `sub/blah.${HASH}.png`, + "sub/index.html": `sub/index.${HASH}.html`, + client: `client.${HASH}`, + "client/index.html": `client.${HASH}`, + "image.png": `image.${HASH}.png`, + "image.webp": `image.${HASH}.webp`, + "你好/index.html": `你好/index.${HASH}.html`, + }); +}; +exports.mockManifest = mockManifest; +const cacheStore = new Map(); +const mockCaches = () => { + return { + default: { + async match(key) { + const cacheKey = { + url: key.url, + headers: {}, + }; + let response; + if (key.headers.has("if-none-match")) { + const makeStrongEtag = key.headers + .get("if-none-match") + .replace("W/", ""); + Reflect.set(cacheKey.headers, "etag", makeStrongEtag); + response = cacheStore.get(JSON.stringify(cacheKey)); + } + else { + // if client doesn't send if-none-match, we need to iterate through these keys + // and just test the URL + const activeCacheKeys = Array.from(cacheStore.keys()); + for (const cacheStoreKey of activeCacheKeys) { + if (JSON.parse(cacheStoreKey).url === key.url) { + response = cacheStore.get(cacheStoreKey); + } + } + } + // TODO: write test to accomodate for rare scenarios with where range requests accomodate etags + if (response && !key.headers.has("if-none-match")) { + // this appears overly verbose, but is necessary to document edge cache behavior + // The Range request header triggers the response header Content-Range ... + const range = key.headers.get("range"); + if (range) { + response.headers.set("content-range", `bytes ${range.split("=").pop()}/${response.headers.get("content-length")}`); + } + // ... which we are using in this repository to set status 206 + if (response.headers.has("content-range")) { + // @ts-expect-error overridding status in this mock + response.status = 206; + } + else { + // @ts-expect-error overridding status in this mock + response.status = 200; + } + const etag = response.headers.get("etag"); + if (etag && !etag.includes("W/")) { + response.headers.set("etag", `W/${etag}`); + } + } + return response; + }, + async put(key, val) { + const headers = new Headers(val.headers); + const url = new URL(key.url); + const resWithBody = new Response(val.body, { headers, status: 200 }); + const resNoBody = new Response(null, { headers, status: 304 }); + const cacheKey = { + url: key.url, + headers: { + etag: `"${url.pathname.replace("/", "")}"`, + }, + }; + cacheStore.set(JSON.stringify(cacheKey), resNoBody); + cacheKey.headers = {}; + cacheStore.set(JSON.stringify(cacheKey), resWithBody); + return; + }, + }, + }; +}; +exports.mockCaches = mockCaches; +// mocks functionality used inside worker request +function mockRequestScope() { + Object.assign(globalThis, (0, service_worker_mock_1.default)()); + Object.assign(globalThis, { __STATIC_CONTENT_MANIFEST: (0, exports.mockManifest)() }); + Object.assign(globalThis, { __STATIC_CONTENT: (0, exports.mockKV)(store) }); + Object.assign(globalThis, { caches: (0, exports.mockCaches)() }); +} +// mocks functionality used on global isolate scope. such as the KV namespace bind +function mockGlobalScope() { + Object.assign(globalThis, { __STATIC_CONTENT_MANIFEST: (0, exports.mockManifest)() }); + Object.assign(globalThis, { __STATIC_CONTENT: (0, exports.mockKV)(store) }); +} +const sleep = (milliseconds) => { + return new Promise((resolve) => setTimeout(resolve, milliseconds)); +}; +exports.sleep = sleep; diff --git a/node_modules/@cloudflare/kv-asset-handler/dist/types.d.ts b/node_modules/@cloudflare/kv-asset-handler/dist/types.d.ts new file mode 100644 index 0000000..0a8ac55 --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/dist/types.d.ts @@ -0,0 +1,29 @@ +export type CacheControl = { + browserTTL: number; + edgeTTL: number; + bypassCache: boolean; +}; +export type AssetManifestType = Record; +export type Options = { + cacheControl: ((req: Request) => Partial) | Partial; + ASSET_NAMESPACE: KVNamespace; + ASSET_MANIFEST: AssetManifestType | string; + mapRequestToAsset?: (req: Request, options?: Partial) => Request; + defaultMimeType: string; + defaultDocument: string; + pathIsEncoded: boolean; + defaultETag: "strong" | "weak"; +}; +export declare class KVError extends Error { + constructor(message?: string, status?: number); + status: number; +} +export declare class MethodNotAllowedError extends KVError { + constructor(message?: string, status?: number); +} +export declare class NotFoundError extends KVError { + constructor(message?: string, status?: number); +} +export declare class InternalError extends KVError { + constructor(message?: string, status?: number); +} diff --git a/node_modules/@cloudflare/kv-asset-handler/dist/types.js b/node_modules/@cloudflare/kv-asset-handler/dist/types.js new file mode 100644 index 0000000..e8ea0ab --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/dist/types.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.InternalError = exports.NotFoundError = exports.MethodNotAllowedError = exports.KVError = void 0; +class KVError extends Error { + constructor(message, status = 500) { + super(message); + // see: typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html + Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain + this.name = KVError.name; // stack traces display correctly now + this.status = status; + } + status; +} +exports.KVError = KVError; +class MethodNotAllowedError extends KVError { + constructor(message = `Not a valid request method`, status = 405) { + super(message, status); + } +} +exports.MethodNotAllowedError = MethodNotAllowedError; +class NotFoundError extends KVError { + constructor(message = `Not Found`, status = 404) { + super(message, status); + } +} +exports.NotFoundError = NotFoundError; +class InternalError extends KVError { + constructor(message = `Internal Error in KV Asset Handler`, status = 500) { + super(message, status); + } +} +exports.InternalError = InternalError; diff --git a/node_modules/@cloudflare/kv-asset-handler/package.json b/node_modules/@cloudflare/kv-asset-handler/package.json new file mode 100644 index 0000000..c3bba98 --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/package.json @@ -0,0 +1,63 @@ +{ + "name": "@cloudflare/kv-asset-handler", + "version": "0.4.0", + "description": "Routes requests to KV assets", + "keywords": [ + "kv", + "cloudflare", + "workers", + "wrangler", + "assets" + ], + "homepage": "https://github.com/cloudflare/workers-sdk#readme", + "bugs": { + "url": "https://github.com/cloudflare/workers-sdk/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/cloudflare/workers-sdk.git", + "directory": "packages/kv-asset-handler" + }, + "license": "MIT OR Apache-2.0", + "author": "wrangler@cloudflare.com", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "src", + "dist", + "!src/test", + "!dist/test" + ], + "dependencies": { + "mime": "^3.0.0" + }, + "devDependencies": { + "@ava/typescript": "^4.1.0", + "@cloudflare/workers-types": "^4.20250310.0", + "@types/mime": "^3.0.4", + "@types/node": "^18.19.75", + "@types/service-worker-mock": "^2.0.1", + "ava": "^6.0.1", + "service-worker-mock": "^2.0.5" + }, + "engines": { + "node": ">=18.0.0" + }, + "volta": { + "extends": "../../package.json" + }, + "publishConfig": { + "access": "public" + }, + "workers-sdk": { + "prerelease": true + }, + "scripts": { + "build": "tsc -d", + "check:lint": "eslint . --max-warnings=0", + "check:type": "tsc", + "pretest": "npm run build", + "test": "ava dist/test/*.js --verbose", + "test:ci": "npm run build && ava dist/test/*.js --verbose" + } +} \ No newline at end of file diff --git a/node_modules/@cloudflare/kv-asset-handler/src/index.ts b/node_modules/@cloudflare/kv-asset-handler/src/index.ts new file mode 100644 index 0000000..6ad9156 --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/src/index.ts @@ -0,0 +1,356 @@ +import * as mime from "mime"; +import { + CacheControl, + InternalError, + MethodNotAllowedError, + NotFoundError, + Options, +} from "./types"; +import type { AssetManifestType } from "./types"; + +declare global { + const __STATIC_CONTENT: KVNamespace | undefined, + __STATIC_CONTENT_MANIFEST: string; +} + +const defaultCacheControl: CacheControl = { + browserTTL: null, + edgeTTL: 2 * 60 * 60 * 24, // 2 days + bypassCache: false, // do not bypass Cloudflare's cache +}; + +const parseStringAsObject = (maybeString: string | T): T => + typeof maybeString === "string" + ? (JSON.parse(maybeString) as T) + : maybeString; + +const getAssetFromKVDefaultOptions: Partial = { + ASSET_NAMESPACE: + typeof __STATIC_CONTENT !== "undefined" ? __STATIC_CONTENT : undefined, + ASSET_MANIFEST: + typeof __STATIC_CONTENT_MANIFEST !== "undefined" + ? parseStringAsObject(__STATIC_CONTENT_MANIFEST) + : {}, + cacheControl: defaultCacheControl, + defaultMimeType: "text/plain", + defaultDocument: "index.html", + pathIsEncoded: false, + defaultETag: "strong", +}; + +function assignOptions(options?: Partial): Options { + // Assign any missing options passed in to the default + // options.mapRequestToAsset is handled manually later + return Object.assign({}, getAssetFromKVDefaultOptions, options); +} + +/** + * maps the path of incoming request to the request pathKey to look up + * in bucket and in cache + * e.g. for a path '/' returns '/index.html' which serves + * the content of bucket/index.html + * @param {Request} request incoming request + */ +const mapRequestToAsset = (request: Request, options?: Partial) => { + options = assignOptions(options); + + const parsedUrl = new URL(request.url); + let pathname = parsedUrl.pathname; + + if (pathname.endsWith("/")) { + // If path looks like a directory append options.defaultDocument + // e.g. If path is /about/ -> /about/index.html + pathname = pathname.concat(options.defaultDocument); + } else if (!mime.getType(pathname)) { + // If path doesn't look like valid content + // e.g. /about.me -> /about.me/index.html + pathname = pathname.concat("/" + options.defaultDocument); + } + + parsedUrl.pathname = pathname; + return new Request(parsedUrl.toString(), request); +}; + +/** + * maps the path of incoming request to /index.html if it evaluates to + * any HTML file. + * @param {Request} request incoming request + */ +function serveSinglePageApp( + request: Request, + options?: Partial +): Request { + options = assignOptions(options); + + // First apply the default handler, which already has logic to detect + // paths that should map to HTML files. + request = mapRequestToAsset(request, options); + + const parsedUrl = new URL(request.url); + + // Detect if the default handler decided to map to + // a HTML file in some specific directory. + if (parsedUrl.pathname.endsWith(".html")) { + // If expected HTML file was missing, just return the root index.html (or options.defaultDocument) + return new Request( + `${parsedUrl.origin}/${options.defaultDocument}`, + request + ); + } else { + // The default handler decided this is not an HTML page. It's probably + // an image, CSS, or JS file. Leave it as-is. + return request; + } +} + +/** + * takes the path of the incoming request, gathers the appropriate content from KV, and returns + * the response + * + * @param {FetchEvent} event the fetch event of the triggered request + * @param {{mapRequestToAsset: (string: Request) => Request, cacheControl: {bypassCache:boolean, edgeTTL: number, browserTTL:number}, ASSET_NAMESPACE: any, ASSET_MANIFEST:any}} [options] configurable options + * @param {CacheControl} [options.cacheControl] determine how to cache on Cloudflare and the browser + * @param {typeof(options.mapRequestToAsset)} [options.mapRequestToAsset] maps the path of incoming request to the request pathKey to look up + * @param {Object | string} [options.ASSET_NAMESPACE] the binding to the namespace that script references + * @param {any} [options.ASSET_MANIFEST] the map of the key to cache and store in KV + * */ + +type Evt = { + request: Request; + waitUntil: (promise: Promise) => void; +}; + +const getAssetFromKV = async ( + event: Evt, + options?: Partial +): Promise => { + options = assignOptions(options); + + const request = event.request; + const ASSET_NAMESPACE = options.ASSET_NAMESPACE; + const ASSET_MANIFEST = parseStringAsObject( + options.ASSET_MANIFEST + ); + + if (typeof ASSET_NAMESPACE === "undefined") { + throw new InternalError(`there is no KV namespace bound to the script`); + } + + const rawPathKey = new URL(request.url).pathname.replace(/^\/+/, ""); // strip any preceding /'s + let pathIsEncoded = options.pathIsEncoded; + let requestKey; + // if options.mapRequestToAsset is explicitly passed in, always use it and assume user has own intentions + // otherwise handle request as normal, with default mapRequestToAsset below + if (options.mapRequestToAsset) { + requestKey = options.mapRequestToAsset(request); + } else if (ASSET_MANIFEST[rawPathKey]) { + requestKey = request; + } else if (ASSET_MANIFEST[decodeURIComponent(rawPathKey)]) { + pathIsEncoded = true; + requestKey = request; + } else { + const mappedRequest = mapRequestToAsset(request); + const mappedRawPathKey = new URL(mappedRequest.url).pathname.replace( + /^\/+/, + "" + ); + if (ASSET_MANIFEST[decodeURIComponent(mappedRawPathKey)]) { + pathIsEncoded = true; + requestKey = mappedRequest; + } else { + // use default mapRequestToAsset + requestKey = mapRequestToAsset(request, options); + } + } + + const SUPPORTED_METHODS = ["GET", "HEAD"]; + if (!SUPPORTED_METHODS.includes(requestKey.method)) { + throw new MethodNotAllowedError( + `${requestKey.method} is not a valid request method` + ); + } + + const parsedUrl = new URL(requestKey.url); + const pathname = pathIsEncoded + ? decodeURIComponent(parsedUrl.pathname) + : parsedUrl.pathname; // decode percentage encoded path only when necessary + + // pathKey is the file path to look up in the manifest + let pathKey = pathname.replace(/^\/+/, ""); // remove prepended / + + // @ts-expect-error we should pick cf types here + const cache = caches.default; + let mimeType = mime.getType(pathKey) || options.defaultMimeType; + if (mimeType.startsWith("text") || mimeType === "application/javascript") { + mimeType += "; charset=utf-8"; + } + + let shouldEdgeCache = false; // false if storing in KV by raw file path i.e. no hash + // check manifest for map from file path to hash + if (typeof ASSET_MANIFEST !== "undefined") { + if (ASSET_MANIFEST[pathKey]) { + pathKey = ASSET_MANIFEST[pathKey]; + // if path key is in asset manifest, we can assume it contains a content hash and can be cached + shouldEdgeCache = true; + } + } + + // TODO this excludes search params from cache, investigate ideal behavior + const cacheKey = new Request(`${parsedUrl.origin}/${pathKey}`, request); + + // if argument passed in for cacheControl is a function then + // evaluate that function. otherwise return the Object passed in + // or default Object + const evalCacheOpts = (() => { + switch (typeof options.cacheControl) { + case "function": + return options.cacheControl(request); + case "object": + return options.cacheControl; + default: + return defaultCacheControl; + } + })(); + + // formats the etag depending on the response context. if the entityId + // is invalid, returns an empty string (instead of null) to prevent the + // the potentially disastrous scenario where the value of the Etag resp + // header is "null". Could be modified in future to base64 encode etc + const formatETag = ( + entityId: string = pathKey, + validatorType: string = options.defaultETag + ) => { + if (!entityId) { + return ""; + } + switch (validatorType) { + case "weak": + if (!entityId.startsWith("W/")) { + if (entityId.startsWith(`"`) && entityId.endsWith(`"`)) { + return `W/${entityId}`; + } + return `W/"${entityId}"`; + } + return entityId; + case "strong": + if (entityId.startsWith(`W/"`)) { + entityId = entityId.replace("W/", ""); + } + if (!entityId.endsWith(`"`)) { + entityId = `"${entityId}"`; + } + return entityId; + default: + return ""; + } + }; + + options.cacheControl = Object.assign({}, defaultCacheControl, evalCacheOpts); + + // override shouldEdgeCache if options say to bypassCache + if ( + options.cacheControl.bypassCache || + options.cacheControl.edgeTTL === null || + request.method == "HEAD" + ) { + shouldEdgeCache = false; + } + // only set max-age if explicitly passed in a number as an arg + const shouldSetBrowserCache = + typeof options.cacheControl.browserTTL === "number"; + + let response = null; + if (shouldEdgeCache) { + response = await cache.match(cacheKey); + } + + if (response) { + if (response.status > 300 && response.status < 400) { + if (response.body && "cancel" in Object.getPrototypeOf(response.body)) { + // Body exists and environment supports readable streams + response.body.cancel(); + } else { + // Environment doesnt support readable streams, or null repsonse body. Nothing to do + } + response = new Response(null, response); + } else { + // fixes #165 + const opts = { + headers: new Headers(response.headers), + status: 0, + statusText: "", + }; + + opts.headers.set("cf-cache-status", "HIT"); + + if (response.status) { + opts.status = response.status; + opts.statusText = response.statusText; + } else if (opts.headers.has("Content-Range")) { + opts.status = 206; + opts.statusText = "Partial Content"; + } else { + opts.status = 200; + opts.statusText = "OK"; + } + response = new Response(response.body, opts); + } + } else { + const body = await ASSET_NAMESPACE.get(pathKey, "arrayBuffer"); + if (body === null) { + throw new NotFoundError( + `could not find ${pathKey} in your content namespace` + ); + } + response = new Response(body); + + if (shouldEdgeCache) { + response.headers.set("Accept-Ranges", "bytes"); + response.headers.set("Content-Length", String(body.byteLength)); + // set etag before cache insertion + if (!response.headers.has("etag")) { + response.headers.set("etag", formatETag(pathKey)); + } + // determine Cloudflare cache behavior + response.headers.set( + "Cache-Control", + `max-age=${options.cacheControl.edgeTTL}` + ); + event.waitUntil(cache.put(cacheKey, response.clone())); + response.headers.set("CF-Cache-Status", "MISS"); + } + } + response.headers.set("Content-Type", mimeType); + + if (response.status === 304) { + const etag = formatETag(response.headers.get("etag")); + const ifNoneMatch = cacheKey.headers.get("if-none-match"); + const proxyCacheStatus = response.headers.get("CF-Cache-Status"); + if (etag) { + if (ifNoneMatch && ifNoneMatch === etag && proxyCacheStatus === "MISS") { + response.headers.set("CF-Cache-Status", "EXPIRED"); + } else { + response.headers.set("CF-Cache-Status", "REVALIDATED"); + } + response.headers.set("etag", formatETag(etag, "weak")); + } + } + if (shouldSetBrowserCache) { + response.headers.set( + "Cache-Control", + `max-age=${options.cacheControl.browserTTL}` + ); + } else { + response.headers.delete("Cache-Control"); + } + return response; +}; + +export { getAssetFromKV, mapRequestToAsset, serveSinglePageApp }; +export { + Options, + CacheControl, + MethodNotAllowedError, + NotFoundError, + InternalError, +}; diff --git a/node_modules/@cloudflare/kv-asset-handler/src/mocks.ts b/node_modules/@cloudflare/kv-asset-handler/src/mocks.ts new file mode 100644 index 0000000..fb8c0fa --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/src/mocks.ts @@ -0,0 +1,156 @@ +import makeServiceWorkerEnv from "service-worker-mock"; + +const HASH = "123HASHBROWN"; + +export const getEvent = ( + request: Request +): Pick => { + const waitUntil = async (maybePromise: unknown) => { + await maybePromise; + }; + return { + request, + waitUntil, + }; +}; +const store = { + "key1.123HASHBROWN.txt": "val1", + "key1.123HASHBROWN.png": "val1", + "index.123HASHBROWN.html": "index.html", + "cache.123HASHBROWN.html": "cache me if you can", + "测试.123HASHBROWN.html": "My filename is non-ascii", + "%not-really-percent-encoded.123HASHBROWN.html": "browser percent encoded", + "%2F.123HASHBROWN.html": "user percent encoded", + "你好.123HASHBROWN.html": "I shouldnt be served", + "%E4%BD%A0%E5%A5%BD.123HASHBROWN.html": "Im important", + "nohash.txt": "no hash but still got some result", + "sub/blah.123HASHBROWN.png": "picturedis", + "sub/index.123HASHBROWN.html": "picturedis", + "client.123HASHBROWN": "important file", + "client.123HASHBROWN/index.html": "Im here but serve my big bro above", + "image.123HASHBROWN.png": "imagepng", + "image.123HASHBROWN.webp": "imagewebp", + "你好/index.123HASHBROWN.html": "My path is non-ascii", +}; +export const mockKV = (kvStore: Record) => { + return { + get: (path: string) => kvStore[path] || null, + }; +}; + +export const mockManifest = () => { + return JSON.stringify({ + "key1.txt": `key1.${HASH}.txt`, + "key1.png": `key1.${HASH}.png`, + "cache.html": `cache.${HASH}.html`, + "测试.html": `测试.${HASH}.html`, + "你好.html": `你好.${HASH}.html`, + "%not-really-percent-encoded.html": `%not-really-percent-encoded.${HASH}.html`, + "%2F.html": `%2F.${HASH}.html`, + "%E4%BD%A0%E5%A5%BD.html": `%E4%BD%A0%E5%A5%BD.${HASH}.html`, + "index.html": `index.${HASH}.html`, + "sub/blah.png": `sub/blah.${HASH}.png`, + "sub/index.html": `sub/index.${HASH}.html`, + client: `client.${HASH}`, + "client/index.html": `client.${HASH}`, + "image.png": `image.${HASH}.png`, + "image.webp": `image.${HASH}.webp`, + "你好/index.html": `你好/index.${HASH}.html`, + }); +}; + +const cacheStore = new Map(); +interface CacheKey { + url: string; + headers: HeadersInit; +} +export const mockCaches = () => { + return { + default: { + async match(key: Request) { + const cacheKey: CacheKey = { + url: key.url, + headers: {}, + }; + let response; + if (key.headers.has("if-none-match")) { + const makeStrongEtag = key.headers + .get("if-none-match") + .replace("W/", ""); + Reflect.set(cacheKey.headers, "etag", makeStrongEtag); + response = cacheStore.get(JSON.stringify(cacheKey)); + } else { + // if client doesn't send if-none-match, we need to iterate through these keys + // and just test the URL + const activeCacheKeys: Array = Array.from(cacheStore.keys()); + for (const cacheStoreKey of activeCacheKeys) { + if (JSON.parse(cacheStoreKey).url === key.url) { + response = cacheStore.get(cacheStoreKey); + } + } + } + // TODO: write test to accomodate for rare scenarios with where range requests accomodate etags + if (response && !key.headers.has("if-none-match")) { + // this appears overly verbose, but is necessary to document edge cache behavior + // The Range request header triggers the response header Content-Range ... + const range = key.headers.get("range"); + if (range) { + response.headers.set( + "content-range", + `bytes ${range.split("=").pop()}/${response.headers.get( + "content-length" + )}` + ); + } + // ... which we are using in this repository to set status 206 + if (response.headers.has("content-range")) { + // @ts-expect-error overridding status in this mock + response.status = 206; + } else { + // @ts-expect-error overridding status in this mock + response.status = 200; + } + const etag = response.headers.get("etag"); + if (etag && !etag.includes("W/")) { + response.headers.set("etag", `W/${etag}`); + } + } + return response; + }, + async put(key: Request, val: Response) { + const headers = new Headers(val.headers); + const url = new URL(key.url); + const resWithBody = new Response(val.body, { headers, status: 200 }); + const resNoBody = new Response(null, { headers, status: 304 }); + const cacheKey: CacheKey = { + url: key.url, + headers: { + etag: `"${url.pathname.replace("/", "")}"`, + }, + }; + cacheStore.set(JSON.stringify(cacheKey), resNoBody); + cacheKey.headers = {}; + cacheStore.set(JSON.stringify(cacheKey), resWithBody); + return; + }, + }, + }; +}; + +// mocks functionality used inside worker request +export function mockRequestScope() { + Object.assign(globalThis, makeServiceWorkerEnv()); + Object.assign(globalThis, { __STATIC_CONTENT_MANIFEST: mockManifest() }); + Object.assign(globalThis, { __STATIC_CONTENT: mockKV(store) }); + Object.assign(globalThis, { caches: mockCaches() }); +} + +// mocks functionality used on global isolate scope. such as the KV namespace bind +export function mockGlobalScope() { + Object.assign(globalThis, { __STATIC_CONTENT_MANIFEST: mockManifest() }); + Object.assign(globalThis, { __STATIC_CONTENT: mockKV(store) }); +} + +export const sleep = (milliseconds: number) => { + return new Promise((resolve) => setTimeout(resolve, milliseconds)); +}; diff --git a/node_modules/@cloudflare/kv-asset-handler/src/types.ts b/node_modules/@cloudflare/kv-asset-handler/src/types.ts new file mode 100644 index 0000000..8976709 --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/src/types.ts @@ -0,0 +1,52 @@ +export type CacheControl = { + browserTTL: number; + edgeTTL: number; + bypassCache: boolean; +}; + +export type AssetManifestType = Record; + +export type Options = { + cacheControl: + | ((req: Request) => Partial) + | Partial; + ASSET_NAMESPACE: KVNamespace; + ASSET_MANIFEST: AssetManifestType | string; + mapRequestToAsset?: (req: Request, options?: Partial) => Request; + defaultMimeType: string; + defaultDocument: string; + pathIsEncoded: boolean; + defaultETag: "strong" | "weak"; +}; + +export class KVError extends Error { + constructor(message?: string, status: number = 500) { + super(message); + // see: typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html + Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain + this.name = KVError.name; // stack traces display correctly now + this.status = status; + } + status: number; +} +export class MethodNotAllowedError extends KVError { + constructor( + message: string = `Not a valid request method`, + status: number = 405 + ) { + super(message, status); + } +} +export class NotFoundError extends KVError { + constructor(message: string = `Not Found`, status: number = 404) { + super(message, status); + } +} +export class InternalError extends KVError { + constructor( + message: string = `Internal Error in KV Asset Handler`, + status: number = 500 + ) { + super(message, status); + } +} diff --git a/node_modules/@cloudflare/unenv-preset/README.md b/node_modules/@cloudflare/unenv-preset/README.md new file mode 100644 index 0000000..7d79e92 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/README.md @@ -0,0 +1,20 @@ +# @cloudflare/unenv-preset + +[unenv](https://github.com/unjs/unenv) preset for cloudflare. + +unenv provides polyfills to add [Node.js](https://nodejs.org/) compatibility for any JavaScript runtime, including browsers and edge workers. + +## Usage + +```ts +import { cloudflare } from "@cloudflare/unenv-preset"; +import { defineEnv } from "unenv"; + +const { env } = defineEnv({ + presets: [cloudflare], +}); + +const { alias, inject, external, polyfill } = env; +``` + +See the unenv [README](https://github.com/unjs/unenv/blob/main/README.md) for more details. diff --git a/node_modules/@cloudflare/unenv-preset/dist/index.d.mts b/node_modules/@cloudflare/unenv-preset/dist/index.d.mts new file mode 100644 index 0000000..7f41f07 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/index.d.mts @@ -0,0 +1,5 @@ +import { Preset } from 'unenv'; + +declare const cloudflare: Preset; + +export { cloudflare }; diff --git a/node_modules/@cloudflare/unenv-preset/dist/index.d.ts b/node_modules/@cloudflare/unenv-preset/dist/index.d.ts new file mode 100644 index 0000000..7f41f07 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/index.d.ts @@ -0,0 +1,5 @@ +import { Preset } from 'unenv'; + +declare const cloudflare: Preset; + +export { cloudflare }; diff --git a/node_modules/@cloudflare/unenv-preset/dist/index.mjs b/node_modules/@cloudflare/unenv-preset/dist/index.mjs new file mode 100644 index 0000000..8e76775 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/index.mjs @@ -0,0 +1,88 @@ + + +// -- Unbuild CommonJS Shims -- +import __cjs_url__ from 'url'; +import __cjs_path__ from 'path'; +import __cjs_mod__ from 'module'; +const __filename = __cjs_url__.fileURLToPath(import.meta.url); +const __dirname = __cjs_path__.dirname(__filename); +const require = __cjs_mod__.createRequire(import.meta.url); +const version = "2.0.2"; + +const nodeCompatModules = [ + "_stream_duplex", + "_stream_passthrough", + "_stream_readable", + "_stream_transform", + "_stream_writable", + "assert", + "assert/strict", + "buffer", + "diagnostics_channel", + "dns", + "dns/promises", + "events", + "net", + "path", + "path/posix", + "path/win32", + "querystring", + "stream", + "stream/consumers", + "stream/promises", + "stream/web", + "string_decoder", + "timers", + "timers/promises", + "url", + "util/types", + "zlib" +]; +const hybridNodeCompatModules = [ + "async_hooks", + "console", + "crypto", + "module", + "process", + "util" +]; +const cloudflare = { + meta: { + name: "unenv:cloudflare", + version, + url: __filename + }, + alias: { + // `nodeCompatModules` are implemented in workerd. + // Create aliases to override polyfills defined in based environments. + ...Object.fromEntries( + nodeCompatModules.flatMap((p) => [ + [p, p], + [`node:${p}`, `node:${p}`] + ]) + ), + // The `node:sys` module is just a deprecated alias for `node:util` which we implemented using a hybrid polyfill + sys: "@cloudflare/unenv-preset/node/util", + "node:sys": "@cloudflare/unenv-preset/node/util", + // `hybridNodeCompatModules` are implemented by the cloudflare preset. + ...Object.fromEntries( + hybridNodeCompatModules.flatMap((m) => [ + [m, `@cloudflare/unenv-preset/node/${m}`], + [`node:${m}`, `@cloudflare/unenv-preset/node/${m}`] + ]) + ) + }, + inject: { + // Setting symbols implemented by workerd to `false` so that `inject`s defined in base presets are not used. + Buffer: false, + global: false, + clearImmediate: false, + setImmediate: false, + console: "@cloudflare/unenv-preset/node/console", + process: "@cloudflare/unenv-preset/node/process" + }, + polyfill: ["@cloudflare/unenv-preset/polyfill/performance"], + external: nodeCompatModules.flatMap((p) => [p, `node:${p}`]) +}; + +export { cloudflare }; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/async_hooks.d.ts b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/async_hooks.d.ts new file mode 100644 index 0000000..f5e0ef7 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/async_hooks.d.ts @@ -0,0 +1,4 @@ +export { asyncWrapProviders, createHook, executionAsyncId, executionAsyncResource, triggerAsyncId, } from "unenv/node/async_hooks"; +export declare const AsyncLocalStorage: typeof import("async_hooks").AsyncLocalStorage, AsyncResource: typeof import("async_hooks").AsyncResource; +declare const _default: any; +export default _default; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/async_hooks.mjs b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/async_hooks.mjs new file mode 100644 index 0000000..e6c8c40 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/async_hooks.mjs @@ -0,0 +1,32 @@ +import { + asyncWrapProviders, + createHook, + executionAsyncId, + executionAsyncResource, + triggerAsyncId +} from "unenv/node/async_hooks"; +export { + asyncWrapProviders, + createHook, + executionAsyncId, + executionAsyncResource, + triggerAsyncId +} from "unenv/node/async_hooks"; +const workerdAsyncHooks = process.getBuiltinModule("node:async_hooks"); +export const { AsyncLocalStorage, AsyncResource } = workerdAsyncHooks; +export default { + /** + * manually unroll unenv-polyfilled-symbols to make it tree-shakeable + */ + // @ts-expect-error @types/node is missing this one - this is a bug in typings + asyncWrapProviders, + createHook, + executionAsyncId, + executionAsyncResource, + triggerAsyncId, + /** + * manually unroll workerd-polyfilled-symbols to make it tree-shakeable + */ + AsyncLocalStorage, + AsyncResource +}; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.d.ts b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.d.ts new file mode 100644 index 0000000..4889256 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.d.ts @@ -0,0 +1,4 @@ +export { Console, _ignoreErrors, _stderr, _stderrErrorHandler, _stdout, _stdoutErrorHandler, _times, } from "unenv/node/console"; +export declare const assert: any, clear: any, context: any, count: any, countReset: any, createTask: any, debug: any, dir: any, dirxml: any, error: any, group: any, groupCollapsed: any, groupEnd: any, info: any, log: any, profile: any, profileEnd: any, table: any, time: any, timeEnd: any, timeLog: any, timeStamp: any, trace: any, warn: any; +declare const _default: any; +export default _default; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs new file mode 100644 index 0000000..fe65525 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs @@ -0,0 +1,57 @@ +import { + _ignoreErrors, + _stderr, + _stderrErrorHandler, + _stdout, + _stdoutErrorHandler, + _times, + Console +} from "unenv/node/console"; +export { + Console, + _ignoreErrors, + _stderr, + _stderrErrorHandler, + _stdout, + _stdoutErrorHandler, + _times +} from "unenv/node/console"; +const workerdConsole = globalThis["console"]; +export const { + assert, + clear, + // @ts-expect-error undocumented public API + context, + count, + countReset, + // @ts-expect-error undocumented public API + createTask, + debug, + dir, + dirxml, + error, + group, + groupCollapsed, + groupEnd, + info, + log, + profile, + profileEnd, + table, + time, + timeEnd, + timeLog, + timeStamp, + trace, + warn +} = workerdConsole; +Object.assign(workerdConsole, { + Console, + _ignoreErrors, + _stderr, + _stderrErrorHandler, + _stdout, + _stdoutErrorHandler, + _times +}); +export default workerdConsole; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.d.ts b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.d.ts new file mode 100644 index 0000000..c30ba44 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.d.ts @@ -0,0 +1,6 @@ +export { Cipher, Cipheriv, Decipher, Decipheriv, ECDH, Sign, Verify, constants, createCipheriv, createDecipheriv, createECDH, createSign, createVerify, diffieHellman, getCipherInfo, hash, privateDecrypt, privateEncrypt, publicDecrypt, publicEncrypt, sign, verify, } from "unenv/node/crypto"; +export declare const Certificate: typeof import("crypto").Certificate, DiffieHellman: typeof import("crypto").DiffieHellman, DiffieHellmanGroup: import("crypto").DiffieHellmanGroupConstructor, Hash: typeof import("crypto").Hash, Hmac: typeof import("crypto").Hmac, KeyObject: typeof import("crypto").KeyObject, X509Certificate: typeof import("crypto").X509Certificate, checkPrime: typeof import("crypto").checkPrime, checkPrimeSync: typeof import("crypto").checkPrimeSync, createDiffieHellman: typeof import("crypto").createDiffieHellman, createDiffieHellmanGroup: typeof import("crypto").createDiffieHellmanGroup, createHash: typeof import("crypto").createHash, createHmac: typeof import("crypto").createHmac, createPrivateKey: typeof import("crypto").createPrivateKey, createPublicKey: typeof import("crypto").createPublicKey, createSecretKey: typeof import("crypto").createSecretKey, generateKey: typeof import("crypto").generateKey, generateKeyPair: typeof import("crypto").generateKeyPair, generateKeyPairSync: typeof import("crypto").generateKeyPairSync, generateKeySync: typeof import("crypto").generateKeySync, generatePrime: typeof import("crypto").generatePrime, generatePrimeSync: typeof import("crypto").generatePrimeSync, getCiphers: typeof import("crypto").getCiphers, getCurves: typeof import("crypto").getCurves, getDiffieHellman: typeof import("crypto").getDiffieHellman, getFips: typeof import("crypto").getFips, getHashes: typeof import("crypto").getHashes, hkdf: typeof import("crypto").hkdf, hkdfSync: typeof import("crypto").hkdfSync, pbkdf2: typeof import("crypto").pbkdf2, pbkdf2Sync: typeof import("crypto").pbkdf2Sync, randomBytes: typeof import("crypto").randomBytes, randomFill: typeof import("crypto").randomFill, randomFillSync: typeof import("crypto").randomFillSync, randomInt: typeof import("crypto").randomInt, randomUUID: typeof import("crypto").randomUUID, scrypt: typeof import("crypto").scrypt, scryptSync: typeof import("crypto").scryptSync, secureHeapUsed: typeof import("crypto").secureHeapUsed, setEngine: typeof import("crypto").setEngine, setFips: typeof import("crypto").setFips, subtle: import("crypto").webcrypto.SubtleCrypto, timingSafeEqual: typeof import("crypto").timingSafeEqual; +export declare const getRandomValues: any; +export declare const webcrypto: any; +declare const _default: any; +export default _default; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.mjs b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.mjs new file mode 100644 index 0000000..9197a29 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.mjs @@ -0,0 +1,209 @@ +import { + Cipher, + Cipheriv, + constants, + createCipher, + createCipheriv, + createDecipher, + createDecipheriv, + createECDH, + createSign, + createVerify, + Decipher, + Decipheriv, + diffieHellman, + ECDH, + getCipherInfo, + hash, + privateDecrypt, + privateEncrypt, + pseudoRandomBytes, + publicDecrypt, + publicEncrypt, + Sign, + sign, + webcrypto as unenvCryptoWebcrypto, + Verify, + verify +} from "unenv/node/crypto"; +export { + Cipher, + Cipheriv, + Decipher, + Decipheriv, + ECDH, + Sign, + Verify, + constants, + createCipheriv, + createDecipheriv, + createECDH, + createSign, + createVerify, + diffieHellman, + getCipherInfo, + hash, + privateDecrypt, + privateEncrypt, + publicDecrypt, + publicEncrypt, + sign, + verify +} from "unenv/node/crypto"; +const workerdCrypto = process.getBuiltinModule("node:crypto"); +export const { + Certificate, + DiffieHellman, + DiffieHellmanGroup, + Hash, + Hmac, + KeyObject, + X509Certificate, + checkPrime, + checkPrimeSync, + createDiffieHellman, + createDiffieHellmanGroup, + createHash, + createHmac, + createPrivateKey, + createPublicKey, + createSecretKey, + generateKey, + generateKeyPair, + generateKeyPairSync, + generateKeySync, + generatePrime, + generatePrimeSync, + getCiphers, + getCurves, + getDiffieHellman, + getFips, + getHashes, + hkdf, + hkdfSync, + pbkdf2, + pbkdf2Sync, + randomBytes, + randomFill, + randomFillSync, + randomInt, + randomUUID, + scrypt, + scryptSync, + secureHeapUsed, + setEngine, + setFips, + subtle, + timingSafeEqual +} = workerdCrypto; +export const getRandomValues = workerdCrypto.getRandomValues.bind( + workerdCrypto.webcrypto +); +export const webcrypto = { + // @ts-expect-error unenv has unknown type + CryptoKey: unenvCryptoWebcrypto.CryptoKey, + getRandomValues, + randomUUID, + subtle +}; +const fips = workerdCrypto.fips; +export default { + /** + * manually unroll unenv-polyfilled-symbols to make it tree-shakeable + */ + Certificate, + Cipher, + Cipheriv, + Decipher, + Decipheriv, + ECDH, + Sign, + Verify, + X509Certificate, + // @ts-expect-error @types/node is out of date - this is a bug in typings + constants, + // @ts-expect-error unenv has unknown type + createCipheriv, + // @ts-expect-error unenv has unknown type + createDecipheriv, + // @ts-expect-error unenv has unknown type + createECDH, + // @ts-expect-error unenv has unknown type + createSign, + // @ts-expect-error unenv has unknown type + createVerify, + // @ts-expect-error unenv has unknown type + diffieHellman, + // @ts-expect-error unenv has unknown type + getCipherInfo, + // @ts-expect-error unenv has unknown type + hash, + // @ts-expect-error unenv has unknown type + privateDecrypt, + // @ts-expect-error unenv has unknown type + privateEncrypt, + // @ts-expect-error unenv has unknown type + publicDecrypt, + // @ts-expect-error unenv has unknown type + publicEncrypt, + scrypt, + scryptSync, + // @ts-expect-error unenv has unknown type + sign, + // @ts-expect-error unenv has unknown type + verify, + // default-only export from unenv + // @ts-expect-error unenv has unknown type + createCipher, + // @ts-expect-error unenv has unknown type + createDecipher, + // @ts-expect-error unenv has unknown type + pseudoRandomBytes, + /** + * manually unroll workerd-polyfilled-symbols to make it tree-shakeable + */ + DiffieHellman, + DiffieHellmanGroup, + Hash, + Hmac, + KeyObject, + checkPrime, + checkPrimeSync, + createDiffieHellman, + createDiffieHellmanGroup, + createHash, + createHmac, + createPrivateKey, + createPublicKey, + createSecretKey, + generateKey, + generateKeyPair, + generateKeyPairSync, + generateKeySync, + generatePrime, + generatePrimeSync, + getCiphers, + getCurves, + getDiffieHellman, + getFips, + getHashes, + getRandomValues, + hkdf, + hkdfSync, + pbkdf2, + pbkdf2Sync, + randomBytes, + randomFill, + randomFillSync, + randomInt, + randomUUID, + secureHeapUsed, + setEngine, + setFips, + subtle, + timingSafeEqual, + // default-only export from workerd + fips, + // special-cased deep merged symbols + webcrypto +}; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/module.d.ts b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/module.d.ts new file mode 100644 index 0000000..9f07732 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/module.d.ts @@ -0,0 +1,31 @@ +import type nodeModule from "node:module"; +export { Module, SourceMap, _cache, _extensions, _debug, _pathCache, _findPath, _initPaths, _load, _nodeModulePaths, _preloadModules, _resolveFilename, _resolveLookupPaths, builtinModules, constants, enableCompileCache, findSourceMap, getCompileCacheDir, globalPaths, isBuiltin, register, runMain, syncBuiltinESMExports, wrap, } from "unenv/node/module"; +export declare const createRequire: typeof nodeModule.createRequire; +declare const _default: { + Module: any; + SourceMap: any; + _cache: any; + _extensions: any; + _debug: any; + _pathCache: any; + _findPath: any; + _initPaths: any; + _load: any; + _nodeModulePaths: any; + _preloadModules: any; + _resolveFilename: any; + _resolveLookupPaths: any; + builtinModules: any; + enableCompileCache: any; + constants: any; + createRequire: any; + findSourceMap: any; + getCompileCacheDir: any; + globalPaths: any; + isBuiltin: any; + register: any; + runMain: any; + syncBuiltinESMExports: any; + wrap: any; +}; +export default _default; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/module.mjs b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/module.mjs new file mode 100644 index 0000000..c54d05e --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/module.mjs @@ -0,0 +1,94 @@ +import { notImplemented } from "unenv/_internal/utils"; +import { + _cache, + _debug, + _extensions, + _findPath, + _initPaths, + _load, + _nodeModulePaths, + _pathCache, + _preloadModules, + _resolveFilename, + _resolveLookupPaths, + builtinModules, + constants, + enableCompileCache, + findSourceMap, + getCompileCacheDir, + globalPaths, + isBuiltin, + Module, + register, + runMain, + SourceMap, + syncBuiltinESMExports, + wrap +} from "unenv/node/module"; +export { + Module, + SourceMap, + _cache, + _extensions, + _debug, + _pathCache, + _findPath, + _initPaths, + _load, + _nodeModulePaths, + _preloadModules, + _resolveFilename, + _resolveLookupPaths, + builtinModules, + constants, + enableCompileCache, + findSourceMap, + getCompileCacheDir, + globalPaths, + isBuiltin, + register, + runMain, + syncBuiltinESMExports, + wrap +} from "unenv/node/module"; +const workerdModule = process.getBuiltinModule("node:module"); +export const createRequire = (file) => { + return Object.assign(workerdModule.createRequire(file), { + resolve: Object.assign( + /* @__PURE__ */ notImplemented("module.require.resolve"), + { + paths: /* @__PURE__ */ notImplemented("module.require.resolve.paths") + } + ), + cache: /* @__PURE__ */ Object.create(null), + extensions: _extensions, + main: void 0 + }); +}; +export default { + Module, + SourceMap, + _cache, + _extensions, + _debug, + _pathCache, + _findPath, + _initPaths, + _load, + _nodeModulePaths, + _preloadModules, + _resolveFilename, + _resolveLookupPaths, + builtinModules, + enableCompileCache, + constants, + createRequire, + findSourceMap, + getCompileCacheDir, + globalPaths, + isBuiltin, + register, + runMain, + syncBuiltinESMExports, + wrap +}; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.d.ts b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.d.ts new file mode 100644 index 0000000..359f6c7 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.d.ts @@ -0,0 +1,11 @@ +export declare const getBuiltinModule: NodeJS.Process["getBuiltinModule"]; +export declare const exit: { + (code?: number): never; + (code?: number | string | null | undefined): never; +}, platform: NodeJS.Platform, nextTick: { + (callback: Function, ...args: any[]): void; + (callback: Function, ...args: any[]): void; +}; +export declare const abort: any, addListener: any, allowedNodeEnvironmentFlags: any, hasUncaughtExceptionCaptureCallback: any, setUncaughtExceptionCaptureCallback: any, loadEnvFile: any, sourceMapsEnabled: any, arch: any, argv: any, argv0: any, chdir: any, config: any, connected: any, constrainedMemory: any, availableMemory: any, cpuUsage: any, cwd: any, debugPort: any, dlopen: any, disconnect: any, emit: any, emitWarning: any, env: any, eventNames: any, execArgv: any, execPath: any, finalization: any, features: any, getActiveResourcesInfo: any, getMaxListeners: any, hrtime: any, kill: any, listeners: any, listenerCount: any, memoryUsage: any, on: any, off: any, once: any, pid: any, ppid: any, prependListener: any, prependOnceListener: any, rawListeners: any, release: any, removeAllListeners: any, removeListener: any, report: any, resourceUsage: any, setMaxListeners: any, setSourceMapsEnabled: any, stderr: any, stdin: any, stdout: any, title: any, throwDeprecation: any, traceDeprecation: any, umask: any, uptime: any, version: any, versions: any, domain: any, initgroups: any, moduleLoadList: any, reallyExit: any, openStdin: any, assert: any, binding: any, send: any, exitCode: any, channel: any, getegid: any, geteuid: any, getgid: any, getgroups: any, getuid: any, setegid: any, seteuid: any, setgid: any, setgroups: any, setuid: any, permission: any, mainModule: any, _events: any, _eventsCount: any, _exiting: any, _maxListeners: any, _debugEnd: any, _debugProcess: any, _fatalException: any, _getActiveHandles: any, _getActiveRequests: any, _kill: any, _preload_modules: any, _rawDebug: any, _startProfilerIdleNotifier: any, _stopProfilerIdleNotifier: any, _tickCallback: any, _disconnect: any, _handleQueue: any, _pendingMessage: any, _channel: any, _send: any, _linkedBinding: any; +declare const _default: NodeJS.Process; +export default _default; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs new file mode 100644 index 0000000..427913a --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs @@ -0,0 +1,228 @@ +import { hrtime as UnenvHrTime } from "unenv/node/internal/process/hrtime"; +import { Process as UnenvProcess } from "unenv/node/internal/process/process"; +const globalProcess = globalThis["process"]; +export const getBuiltinModule = globalProcess.getBuiltinModule; +export const { exit, platform, nextTick } = getBuiltinModule( + "node:process" +); +const unenvProcess = new UnenvProcess({ + env: globalProcess.env, + hrtime: UnenvHrTime, + nextTick +}); +export const { + abort, + addListener, + allowedNodeEnvironmentFlags, + hasUncaughtExceptionCaptureCallback, + setUncaughtExceptionCaptureCallback, + loadEnvFile, + sourceMapsEnabled, + arch, + argv, + argv0, + chdir, + config, + connected, + constrainedMemory, + availableMemory, + cpuUsage, + cwd, + debugPort, + dlopen, + disconnect, + emit, + emitWarning, + env, + eventNames, + execArgv, + execPath, + finalization, + features, + getActiveResourcesInfo, + getMaxListeners, + hrtime, + kill, + listeners, + listenerCount, + memoryUsage, + on, + off, + once, + pid, + ppid, + prependListener, + prependOnceListener, + rawListeners, + release, + removeAllListeners, + removeListener, + report, + resourceUsage, + setMaxListeners, + setSourceMapsEnabled, + stderr, + stdin, + stdout, + title, + throwDeprecation, + traceDeprecation, + umask, + uptime, + version, + versions, + domain, + initgroups, + moduleLoadList, + reallyExit, + openStdin, + assert, + binding, + send, + exitCode, + channel, + getegid, + geteuid, + getgid, + getgroups, + getuid, + setegid, + seteuid, + setgid, + setgroups, + setuid, + permission, + mainModule, + _events, + _eventsCount, + _exiting, + _maxListeners, + _debugEnd, + _debugProcess, + _fatalException, + _getActiveHandles, + _getActiveRequests, + _kill, + _preload_modules, + _rawDebug, + _startProfilerIdleNotifier, + _stopProfilerIdleNotifier, + _tickCallback, + _disconnect, + _handleQueue, + _pendingMessage, + _channel, + _send, + _linkedBinding +} = unenvProcess; +const _process = { + abort, + addListener, + allowedNodeEnvironmentFlags, + hasUncaughtExceptionCaptureCallback, + setUncaughtExceptionCaptureCallback, + loadEnvFile, + sourceMapsEnabled, + arch, + argv, + argv0, + chdir, + config, + connected, + constrainedMemory, + availableMemory, + cpuUsage, + cwd, + debugPort, + dlopen, + disconnect, + emit, + emitWarning, + env, + eventNames, + execArgv, + execPath, + exit, + finalization, + features, + getBuiltinModule, + getActiveResourcesInfo, + getMaxListeners, + hrtime, + kill, + listeners, + listenerCount, + memoryUsage, + nextTick, + on, + off, + once, + pid, + platform, + ppid, + prependListener, + prependOnceListener, + rawListeners, + release, + removeAllListeners, + removeListener, + report, + resourceUsage, + setMaxListeners, + setSourceMapsEnabled, + stderr, + stdin, + stdout, + title, + throwDeprecation, + traceDeprecation, + umask, + uptime, + version, + versions, + // @ts-expect-error old API + domain, + initgroups, + moduleLoadList, + reallyExit, + openStdin, + assert, + binding, + send, + exitCode, + channel, + getegid, + geteuid, + getgid, + getgroups, + getuid, + setegid, + seteuid, + setgid, + setgroups, + setuid, + permission, + mainModule, + _events, + _eventsCount, + _exiting, + _maxListeners, + _debugEnd, + _debugProcess, + _fatalException, + _getActiveHandles, + _getActiveRequests, + _kill, + _preload_modules, + _rawDebug, + _startProfilerIdleNotifier, + _stopProfilerIdleNotifier, + _tickCallback, + _disconnect, + _handleQueue, + _pendingMessage, + _channel, + _send, + _linkedBinding +}; +export default _process; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/util.d.ts b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/util.d.ts new file mode 100644 index 0000000..518aceb --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/util.d.ts @@ -0,0 +1,5 @@ +export { _errnoException, _exceptionWithHostPort, getSystemErrorMap, getSystemErrorName, isBoolean, isBuffer, isDate, isError, isFunction, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isUndefined, parseEnv, styleText, } from "unenv/node/util"; +export declare const MIMEParams: typeof import("util").MIMEParams, MIMEType: typeof import("util").MIMEType, TextDecoder: typeof import("util").TextDecoder, TextEncoder: typeof import("util").TextEncoder, _extend: any, aborted: typeof import("util").aborted, callbackify: typeof import("util").callbackify, debug: typeof import("util").debuglog, debuglog: typeof import("util").debuglog, deprecate: typeof import("util").deprecate, format: typeof import("util").format, formatWithOptions: typeof import("util").formatWithOptions, getCallSite: any, inherits: typeof import("util").inherits, inspect: typeof import("util").inspect, isArray: typeof import("util").isArray, isDeepStrictEqual: typeof import("util").isDeepStrictEqual, log: typeof import("util").log, parseArgs: typeof import("util").parseArgs, promisify: typeof import("util").promisify, stripVTControlCharacters: typeof import("util").stripVTControlCharacters, toUSVString: typeof import("util").toUSVString, transferableAbortController: typeof import("util").transferableAbortController, transferableAbortSignal: typeof import("util").transferableAbortSignal; +export declare const types: typeof import("node:util/types"); +declare const _default: any; +export default _default; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/util.mjs b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/util.mjs new file mode 100644 index 0000000..a66bb7b --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/util.mjs @@ -0,0 +1,132 @@ +import { + _errnoException, + _exceptionWithHostPort, + getSystemErrorMap, + getSystemErrorName, + isBoolean, + isBuffer, + isDate, + isError, + isFunction, + isNull, + isNullOrUndefined, + isNumber, + isObject, + isPrimitive, + isRegExp, + isString, + isSymbol, + isUndefined, + parseEnv, + styleText +} from "unenv/node/util"; +export { + _errnoException, + _exceptionWithHostPort, + getSystemErrorMap, + getSystemErrorName, + isBoolean, + isBuffer, + isDate, + isError, + isFunction, + isNull, + isNullOrUndefined, + isNumber, + isObject, + isPrimitive, + isRegExp, + isString, + isSymbol, + isUndefined, + parseEnv, + styleText +} from "unenv/node/util"; +const workerdUtil = process.getBuiltinModule("node:util"); +export const { + MIMEParams, + MIMEType, + TextDecoder, + TextEncoder, + // @ts-expect-error missing types? + _extend, + aborted, + callbackify, + debug, + debuglog, + deprecate, + format, + formatWithOptions, + // @ts-expect-error unknown type + getCallSite, + inherits, + inspect, + isArray, + isDeepStrictEqual, + log, + parseArgs, + promisify, + stripVTControlCharacters, + toUSVString, + transferableAbortController, + transferableAbortSignal +} = workerdUtil; +export const types = workerdUtil.types; +export default { + /** + * manually unroll unenv-polyfilled-symbols to make it tree-shakeable + */ + _errnoException, + _exceptionWithHostPort, + // @ts-expect-error unenv has unknown type + getSystemErrorMap, + // @ts-expect-error unenv has unknown type + getSystemErrorName, + isBoolean, + isBuffer, + isDate, + isError, + isFunction, + isNull, + isNullOrUndefined, + isNumber, + isObject, + isPrimitive, + isRegExp, + isString, + isSymbol, + isUndefined, + // @ts-expect-error unenv has unknown type + parseEnv, + // @ts-expect-error unenv has unknown type + styleText, + /** + * manually unroll workerd-polyfilled-symbols to make it tree-shakeable + */ + _extend, + aborted, + callbackify, + debug, + debuglog, + deprecate, + format, + formatWithOptions, + getCallSite, + inherits, + inspect, + isArray, + isDeepStrictEqual, + log, + MIMEParams, + MIMEType, + parseArgs, + promisify, + stripVTControlCharacters, + TextDecoder, + TextEncoder, + toUSVString, + transferableAbortController, + transferableAbortSignal, + // special-cased deep merged symbols + types +}; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/package.json b/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/package.json new file mode 100644 index 0000000..74a558a --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/package.json @@ -0,0 +1,3 @@ +{ + "sideEffects": true +} diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.d.ts b/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs b/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs new file mode 100644 index 0000000..0ab1692 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs @@ -0,0 +1,18 @@ +import { + performance, + Performance, + PerformanceEntry, + PerformanceMark, + PerformanceMeasure, + PerformanceObserver, + PerformanceObserverEntryList, + PerformanceResourceTiming +} from "node:perf_hooks"; +globalThis.performance = performance; +globalThis.Performance = Performance; +globalThis.PerformanceEntry = PerformanceEntry; +globalThis.PerformanceMark = PerformanceMark; +globalThis.PerformanceMeasure = PerformanceMeasure; +globalThis.PerformanceObserver = PerformanceObserver; +globalThis.PerformanceObserverEntryList = PerformanceObserverEntryList; +globalThis.PerformanceResourceTiming = PerformanceResourceTiming; diff --git a/node_modules/@cloudflare/unenv-preset/package.json b/node_modules/@cloudflare/unenv-preset/package.json new file mode 100644 index 0000000..47bba97 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/package.json @@ -0,0 +1,70 @@ +{ + "name": "@cloudflare/unenv-preset", + "version": "2.0.2", + "description": "cloudflare preset for unenv", + "keywords": [ + "cloudflare", + "workers", + "cloudflare workers", + "Node.js", + "unenv", + "polyfills" + ], + "homepage": "https://github.com/cloudflare/workers-sdk#readme", + "bugs": { + "url": "https://github.com/cloudflare/workers-sdk/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/cloudflare/workers-sdk.git", + "directory": "packages/unenv-preset" + }, + "license": "MIT OR Apache-2.0", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./*": { + "types": "./dist/runtime/*.d.mts", + "default": "./dist/runtime/*.mjs" + }, + "./package.json": "./package.json" + }, + "types": "./dist/index.d.ts", + "files": [ + "dist" + ], + "devDependencies": { + "@types/node-unenv": "npm:@types/node@^22.13.9", + "typescript": "^5.7.2", + "unbuild": "^3.2.0", + "undici": "^5.28.5", + "vitest": "~3.0.5", + "wrangler": "3.114.0" + }, + "peerDependencies": { + "unenv": "2.0.0-rc.14", + "workerd": "^1.20250124.0" + }, + "peerDependenciesMeta": { + "workerd": { + "optional": true + } + }, + "publishConfig": { + "access": "public" + }, + "workers-sdk": { + "prerelease": true + }, + "scripts": { + "build": "unbuild", + "check:lint": "eslint", + "check:type": "tsc --noEmit", + "test:ci": "vitest run", + "test:watch": "vitest" + } +} \ No newline at end of file diff --git a/node_modules/@cloudflare/workerd-darwin-arm64/README.md b/node_modules/@cloudflare/workerd-darwin-arm64/README.md new file mode 100644 index 0000000..bf9bc65 --- /dev/null +++ b/node_modules/@cloudflare/workerd-darwin-arm64/README.md @@ -0,0 +1,6 @@ +# 👷 `workerd` for macOS ARM 64-bit, Cloudflare's JavaScript/Wasm Runtime + +`workerd` is a JavaScript / Wasm server runtime based on the same code that powers +[Cloudflare Workers](https://workers.dev). + +See https://github.com/cloudflare/workerd for details. diff --git a/node_modules/@cloudflare/workerd-darwin-arm64/bin/workerd b/node_modules/@cloudflare/workerd-darwin-arm64/bin/workerd new file mode 100755 index 0000000..b165aec Binary files /dev/null and b/node_modules/@cloudflare/workerd-darwin-arm64/bin/workerd differ diff --git a/node_modules/@cloudflare/workerd-darwin-arm64/package.json b/node_modules/@cloudflare/workerd-darwin-arm64/package.json new file mode 100644 index 0000000..2247d2c --- /dev/null +++ b/node_modules/@cloudflare/workerd-darwin-arm64/package.json @@ -0,0 +1,17 @@ +{ + "name": "@cloudflare/workerd-darwin-arm64", + "description": "👷 workerd for macOS ARM 64-bit, Cloudflare's JavaScript/Wasm Runtime", + "repository": "https://github.com/cloudflare/workerd", + "license": "Apache-2.0", + "preferUnplugged": false, + "engines": { + "node": ">=16" + }, + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ], + "version": "1.20250317.0" +} diff --git a/node_modules/@cspotcode/source-map-support/LICENSE.md b/node_modules/@cspotcode/source-map-support/LICENSE.md new file mode 100644 index 0000000..6247ca9 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Evan Wallace + +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. diff --git a/node_modules/@cspotcode/source-map-support/README.md b/node_modules/@cspotcode/source-map-support/README.md new file mode 100644 index 0000000..f739070 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/README.md @@ -0,0 +1,289 @@ +# Source Map Support + +[![NPM version](https://img.shields.io/npm/v/@cspotcode/source-map-support.svg?style=flat)](https://npmjs.org/package/@cspotcode/source-map-support) +[![NPM downloads](https://img.shields.io/npm/dm/@cspotcode/source-map-support.svg?style=flat)](https://npmjs.org/package/@cspotcode/source-map-support) +[![Build status](https://img.shields.io/github/workflow/status/cspotcode/node-source-map-support/Continuous%20Integration)](https://github.com/cspotcode/node-source-map-support/actions?query=workflow%3A%22Continuous+Integration%22) + +This module provides source map support for stack traces in node via the [V8 stack trace API](https://github.com/v8/v8/wiki/Stack-Trace-API). It uses the [source-map](https://github.com/mozilla/source-map) module to replace the paths and line numbers of source-mapped files with their original paths and line numbers. The output mimics node's stack trace format with the goal of making every compile-to-JS language more of a first-class citizen. Source maps are completely general (not specific to any one language) so you can use source maps with multiple compile-to-JS languages in the same node process. + +## Installation and Usage + +#### Node support + +``` +$ npm install @cspotcode/source-map-support +``` + +Source maps can be generated using libraries such as [source-map-index-generator](https://github.com/twolfson/source-map-index-generator). Once you have a valid source map, place a source mapping comment somewhere in the file (usually done automatically or with an option by your transpiler): + +``` +//# sourceMappingURL=path/to/source.map +``` + +If multiple sourceMappingURL comments exist in one file, the last sourceMappingURL comment will be +respected (e.g. if a file mentions the comment in code, or went through multiple transpilers). +The path should either be absolute or relative to the compiled file. + +From here you have two options. + +##### CLI Usage + +```bash +node -r @cspotcode/source-map-support/register compiled.js +# Or to enable hookRequire +node -r @cspotcode/source-map-support/register-hook-require compiled.js +``` + +##### Programmatic Usage + +Put the following line at the top of the compiled file. + +```js +require('@cspotcode/source-map-support').install(); +``` + +It is also possible to install the source map support directly by +requiring the `register` module which can be handy with ES6: + +```js +import '@cspotcode/source-map-support/register' + +// Instead of: +import sourceMapSupport from '@cspotcode/source-map-support' +sourceMapSupport.install() +``` +Note: if you're using babel-register, it includes source-map-support already. + +It is also very useful with Mocha: + +``` +$ mocha --require @cspotcode/source-map-support/register tests/ +``` + +#### Browser support + +This library also works in Chrome. While the DevTools console already supports source maps, the V8 engine doesn't and `Error.prototype.stack` will be incorrect without this library. Everything will just work if you deploy your source files using [browserify](http://browserify.org/). Just make sure to pass the `--debug` flag to the browserify command so your source maps are included in the bundled code. + +This library also works if you use another build process or just include the source files directly. In this case, include the file `browser-source-map-support.js` in your page and call `sourceMapSupport.install()`. It contains the whole library already bundled for the browser using browserify. + +```html + + +``` + +This library also works if you use AMD (Asynchronous Module Definition), which is used in tools like [RequireJS](http://requirejs.org/). Just list `browser-source-map-support` as a dependency: + +```html + +``` + +## Options + +This module installs two things: a change to the `stack` property on `Error` objects and a handler for uncaught exceptions that mimics node's default exception handler (the handler can be seen in the demos below). You may want to disable the handler if you have your own uncaught exception handler. This can be done by passing an argument to the installer: + +```js +require('@cspotcode/source-map-support').install({ + handleUncaughtExceptions: false +}); +``` + +This module loads source maps from the filesystem by default. You can provide alternate loading behavior through a callback as shown below. For example, [Meteor](https://github.com/meteor) keeps all source maps cached in memory to avoid disk access. + +```js +require('@cspotcode/source-map-support').install({ + retrieveSourceMap: function(source) { + if (source === 'compiled.js') { + return { + url: 'original.js', + map: fs.readFileSync('compiled.js.map', 'utf8') + }; + } + return null; + } +}); +``` + +The module will by default assume a browser environment if XMLHttpRequest and window are defined. If either of these do not exist it will instead assume a node environment. +In some rare cases, e.g. when running a browser emulation and where both variables are also set, you can explictly specify the environment to be either 'browser' or 'node'. + +```js +require('@cspotcode/source-map-support').install({ + environment: 'node' +}); +``` + +To support files with inline source maps, the `hookRequire` options can be specified, which will monitor all source files for inline source maps. + + +```js +require('@cspotcode/source-map-support').install({ + hookRequire: true +}); +``` + +This monkey patches the `require` module loading chain, so is not enabled by default and is not recommended for any sort of production usage. + +## Demos + +#### Basic Demo + +original.js: + +```js +throw new Error('test'); // This is the original code +``` + +compiled.js: + +```js +require('@cspotcode/source-map-support').install(); + +throw new Error('test'); // This is the compiled code +// The next line defines the sourceMapping. +//# sourceMappingURL=compiled.js.map +``` + +compiled.js.map: + +```json +{ + "version": 3, + "file": "compiled.js", + "sources": ["original.js"], + "names": [], + "mappings": ";;AAAA,MAAM,IAAI" +} +``` + +Run compiled.js using node (notice how the stack trace uses original.js instead of compiled.js): + +``` +$ node compiled.js + +original.js:1 +throw new Error('test'); // This is the original code + ^ +Error: test + at Object. (original.js:1:7) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) + at node.js:901:3 +``` + +#### TypeScript Demo + +demo.ts: + +```typescript +declare function require(name: string); +require('@cspotcode/source-map-support').install(); +class Foo { + constructor() { this.bar(); } + bar() { throw new Error('this is a demo'); } +} +new Foo(); +``` + +Compile and run the file using the TypeScript compiler from the terminal: + +``` +$ npm install source-map-support typescript +$ node_modules/typescript/bin/tsc -sourcemap demo.ts +$ node demo.js + +demo.ts:5 + bar() { throw new Error('this is a demo'); } + ^ +Error: this is a demo + at Foo.bar (demo.ts:5:17) + at new Foo (demo.ts:4:24) + at Object. (demo.ts:7:1) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) + at node.js:901:3 +``` + +There is also the option to use `-r source-map-support/register` with typescript, without the need add the `require('@cspotcode/source-map-support').install()` in the code base: + +``` +$ npm install source-map-support typescript +$ node_modules/typescript/bin/tsc -sourcemap demo.ts +$ node -r source-map-support/register demo.js + +demo.ts:5 + bar() { throw new Error('this is a demo'); } + ^ +Error: this is a demo + at Foo.bar (demo.ts:5:17) + at new Foo (demo.ts:4:24) + at Object. (demo.ts:7:1) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) + at node.js:901:3 +``` + +#### CoffeeScript Demo + +demo.coffee: + +```coffee +require('@cspotcode/source-map-support').install() +foo = -> + bar = -> throw new Error 'this is a demo' + bar() +foo() +``` + +Compile and run the file using the CoffeeScript compiler from the terminal: + +```sh +$ npm install @cspotcode/source-map-support coffeescript +$ node_modules/.bin/coffee --map --compile demo.coffee +$ node demo.js + +demo.coffee:3 + bar = -> throw new Error 'this is a demo' + ^ +Error: this is a demo + at bar (demo.coffee:3:22) + at foo (demo.coffee:4:3) + at Object. (demo.coffee:5:1) + at Object. (demo.coffee:1:1) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) +``` + +## Tests + +This repo contains both automated tests for node and manual tests for the browser. The automated tests can be run using mocha (type `mocha` in the root directory). To run the manual tests: + +* Build the tests using `build.js` +* Launch the HTTP server (`npm run serve-tests`) and visit + * http://127.0.0.1:1336/amd-test + * http://127.0.0.1:1336/browser-test + * http://127.0.0.1:1336/browserify-test - **Currently not working** due to a bug with browserify (see [pull request #66](https://github.com/evanw/node-source-map-support/pull/66) for details). +* For `header-test`, run `server.js` inside that directory and visit http://127.0.0.1:1337/ + +## License + +This code is available under the [MIT license](http://opensource.org/licenses/MIT). diff --git a/node_modules/@cspotcode/source-map-support/browser-source-map-support.js b/node_modules/@cspotcode/source-map-support/browser-source-map-support.js new file mode 100644 index 0000000..782da50 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/browser-source-map-support.js @@ -0,0 +1,114 @@ +/* + * Support for source maps in V8 stack traces + * https://github.com/evanw/node-source-map-support + */ +/* + The buffer module from node.js, for the browser. + + @author Feross Aboukhadijeh + license MIT +*/ +(this.define||function(R,U){this.sourceMapSupport=U()})("browser-source-map-support",function(R){(function e(C,J,A){function p(f,c){if(!J[f]){if(!C[f]){var l="function"==typeof require&&require;if(!c&&l)return l(f,!0);if(t)return t(f,!0);throw Error("Cannot find module '"+f+"'");}l=J[f]={exports:{}};C[f][0].call(l.exports,function(q){var r=C[f][1][q];return p(r?r:q)},l,l.exports,e,C,J,A)}return J[f].exports}for(var t="function"==typeof require&&require,m=0;mm)return-1;if(58>m)return m-48+52;if(91>m)return m-65;if(123>m)return m-97+26}var t="undefined"!==typeof Uint8Array?Uint8Array:Array;e.toByteArray=function(m){function f(d){q[k++]=d}if(0>16);f((u&65280)>>8);f(u&255)}2===l?(u=p(m.charAt(c))<<2|p(m.charAt(c+1))>>4,f(u&255)):1===l&&(u=p(m.charAt(c))<<10|p(m.charAt(c+1))<<4|p(m.charAt(c+2))>>2,f(u>>8&255),f(u&255));return q};e.fromByteArray=function(m){var f=m.length%3,c="",l;var q=0;for(l=m.length-f;q> +18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r&63);c+=r}switch(f){case 1:r=m[m.length-1];c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<<4&63);c+="==";break;case 2:r=(m[m.length-2]<<8)+ +m[m.length-1],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>10),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>4&63),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<<2&63),c+="="}return c}})("undefined"===typeof A?this.base64js={}:A)},{}],3:[function(C,J,A){},{}],4:[function(C,J,A){(function(e){var p=Object.prototype.toString,t="function"===typeof e.alloc&&"function"===typeof e.allocUnsafe&&"function"=== +typeof e.from;J.exports=function(m,f,c){if("number"===typeof m)throw new TypeError('"value" argument must not be a number');if("ArrayBuffer"===p.call(m).slice(8,-1)){f>>>=0;var l=m.byteLength-f;if(0>l)throw new RangeError("'offset' is out of bounds");if(void 0===c)c=l;else if(c>>>=0,c>l)throw new RangeError("'length' is out of bounds");return t?e.from(m.slice(f,f+c)):new e(new Uint8Array(m.slice(f,f+c)))}if("string"===typeof m){c=f;if("string"!==typeof c||""===c)c="utf8";if(!e.isEncoding(c))throw new TypeError('"encoding" must be a valid string encoding'); +return t?e.from(m,c):new e(m,c)}return t?e.from(m):new e(m)}}).call(this,C("buffer").Buffer)},{buffer:5}],5:[function(C,J,A){function e(a,b,h){if(!(this instanceof e))return new e(a,b,h);var w=typeof a;if("number"===w)var y=0>>0:0;else if("string"===w){if("base64"===b)for(a=(a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")).replace(L,"");0!==a.length%4;)a+="=";y=e.byteLength(a,b)}else if("object"===w&&null!==a)"Buffer"===a.type&&z(a.data)&&(a=a.data),y=0<+a.length?Math.floor(+a.length):0;else throw new TypeError("must start with number, buffer, array or string"); +if(this.length>G)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+G.toString(16)+" bytes");if(e.TYPED_ARRAY_SUPPORT)var I=e._augment(new Uint8Array(y));else I=this,I.length=y,I._isBuffer=!0;if(e.TYPED_ARRAY_SUPPORT&&"number"===typeof a.byteLength)I._set(a);else{var K=a;if(z(K)||e.isBuffer(K)||K&&"object"===typeof K&&"number"===typeof K.length)if(e.isBuffer(a))for(b=0;ba)throw new RangeError("offset is not uint");if(a+b>h)throw new RangeError("Trying to access beyond buffer length");}function m(a,b,h,w,y,I){if(!e.isBuffer(a))throw new TypeError("buffer must be a Buffer instance");if(b>y||ba.length)throw new TypeError("index out of range"); +}function f(a,b,h,w){0>b&&(b=65535+b+1);for(var y=0,I=Math.min(a.length-h,2);y>>8*(w?y:1-y)}function c(a,b,h,w){0>b&&(b=4294967295+b+1);for(var y=0,I=Math.min(a.length-h,4);y>>8*(w?y:3-y)&255}function l(a,b,h,w,y,I){if(b>y||ba.length)throw new TypeError("index out of range");}function q(a,b,h,w,y){y||l(a,b,h,4,3.4028234663852886E38,-3.4028234663852886E38);v.write(a,b,h,w,23,4);return h+4}function r(a, +b,h,w,y){y||l(a,b,h,8,1.7976931348623157E308,-1.7976931348623157E308);v.write(a,b,h,w,52,8);return h+8}function k(a){for(var b=[],h=0;h=w)b.push(w);else{var y=h;55296<=w&&57343>=w&&h++;w=encodeURIComponent(a.slice(y,h+1)).substr(1).split("%");for(y=0;y=b.length||y>=a.length);y++)b[y+ +h]=a[y];return y}function g(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}var n=C("base64-js"),v=C("ieee754"),z=C("is-array");A.Buffer=e;A.SlowBuffer=e;A.INSPECT_MAX_BYTES=50;e.poolSize=8192;var G=1073741823;e.TYPED_ARRAY_SUPPORT=function(){try{var a=new ArrayBuffer(0),b=new Uint8Array(a);b.foo=function(){return 42};return 42===b.foo()&&"function"===typeof b.subarray&&0===(new Uint8Array(1)).subarray(1,1).byteLength}catch(h){return!1}}();e.isBuffer=function(a){return!(null== +a||!a._isBuffer)};e.compare=function(a,b){if(!e.isBuffer(a)||!e.isBuffer(b))throw new TypeError("Arguments must be Buffers");for(var h=a.length,w=b.length,y=0,I=Math.min(h,w);y>>1;break;case "utf8":case "utf-8":h=k(a).length;break;case "base64":h=n.toByteArray(a).length; +break;default:h=a.length}return h};e.prototype.length=void 0;e.prototype.parent=void 0;e.prototype.toString=function(a,b,h){var w=!1;b>>>=0;h=void 0===h||Infinity===h?this.length:h>>>0;a||(a="utf8");0>b&&(b=0);h>this.length&&(h=this.length);if(h<=b)return"";for(;;)switch(a){case "hex":a=b;b=h;h=this.length;if(!a||0>a)a=0;if(!b||0>b||b>h)b=h;w="";for(h=a;hw?"0"+w.toString(16):w.toString(16),w=a+w;return w;case "utf8":case "utf-8":w=a="";for(h=Math.min(this.length,h);b= +this[b]?(a+=g(w)+String.fromCharCode(this[b]),w=""):w+="%"+this[b].toString(16);return a+g(w);case "ascii":return p(this,b,h);case "binary":return p(this,b,h);case "base64":return b=0===b&&h===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(b,h)),b;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":b=this.slice(b,h);h="";for(a=0;ab&&(a+=" ... "));return""};e.prototype.compare=function(a){if(!e.isBuffer(a))throw new TypeError("Argument must be a Buffer");return e.compare(this,a)};e.prototype.get=function(a){console.log(".get() is deprecated. Access using array indexes instead."); +return this.readUInt8(a)};e.prototype.set=function(a,b){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(a,b)};e.prototype.write=function(a,b,h,w){if(isFinite(b))isFinite(h)||(w=h,h=void 0);else{var y=w;w=b;b=h;h=y}b=Number(b)||0;y=this.length-b;h?(h=Number(h),h>y&&(h=y)):h=y;w=String(w||"utf8").toLowerCase();switch(w){case "hex":b=Number(b)||0;w=this.length-b;h?(h=Number(h),h>w&&(h=w)):h=w;w=a.length;if(0!==w%2)throw Error("Invalid hex string");h>w/ +2&&(h=w/2);for(w=0;w>8;K%=256;y.push(K);y.push(w)}a=d(y,this,b,h,2);break;default:throw new TypeError("Unknown encoding: "+ +w);}return a};e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};e.prototype.slice=function(a,b){var h=this.length;a=~~a;b=void 0===b?h:~~b;0>a?(a+=h,0>a&&(a=0)):a>h&&(a=h);0>b?(b+=h,0>b&&(b=0)):b>h&&(b=h);b>>=0;h||m(this,a,b,1,255,0);e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));this[b]=a;return b+1};e.prototype.writeUInt16LE=function(a, +b,h){a=+a;b>>>=0;h||m(this,a,b,2,65535,0);e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):f(this,a,b,!0);return b+2};e.prototype.writeUInt16BE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,2,65535,0);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):f(this,a,b,!1);return b+2};e.prototype.writeUInt32LE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,4,4294967295,0);e.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=a):c(this,a,b,!0);return b+4};e.prototype.writeUInt32BE=function(a, +b,h){a=+a;b>>>=0;h||m(this,a,b,4,4294967295,0);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a):c(this,a,b,!1);return b+4};e.prototype.writeInt8=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,1,127,-128);e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));0>a&&(a=255+a+1);this[b]=a;return b+1};e.prototype.writeInt16LE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,2,32767,-32768);e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):f(this,a,b,!0);return b+2};e.prototype.writeInt16BE=function(a, +b,h){a=+a;b>>>=0;h||m(this,a,b,2,32767,-32768);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):f(this,a,b,!1);return b+2};e.prototype.writeInt32LE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,4,2147483647,-2147483648);e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):c(this,a,b,!0);return b+4};e.prototype.writeInt32BE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,4,2147483647,-2147483648);0>a&&(a=4294967295+a+1);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+ +2]=a>>>8,this[b+3]=a):c(this,a,b,!1);return b+4};e.prototype.writeFloatLE=function(a,b,h){return q(this,a,b,!0,h)};e.prototype.writeFloatBE=function(a,b,h){return q(this,a,b,!1,h)};e.prototype.writeDoubleLE=function(a,b,h){return r(this,a,b,!0,h)};e.prototype.writeDoubleBE=function(a,b,h){return r(this,a,b,!1,h)};e.prototype.copy=function(a,b,h,w){h||(h=0);w||0===w||(w=this.length);b||(b=0);if(w!==h&&0!==a.length&&0!==this.length){if(wb||b>=a.length)throw new TypeError("targetStart out of bounds"); +if(0>h||h>=this.length)throw new TypeError("sourceStart out of bounds");if(0>w||w>this.length)throw new TypeError("sourceEnd out of bounds");w>this.length&&(w=this.length);a.length-bw||!e.TYPED_ARRAY_SUPPORT)for(var y=0;yb||b>=this.length)throw new TypeError("start out of bounds"); +if(0>h||h>this.length)throw new TypeError("end out of bounds");if("number"===typeof a)for(;b>1,r=-7;f=t?f-1:0;var k=t?-1:1,u=e[p+f];f+=k;t=u&(1<<-r)-1;u>>=-r;for(r+=c;0>=-r;for(r+=m;0>1,u=23===f?Math.pow(2,-24)-Math.pow(2,-77):0;c=m?0:c-1;var d=m?1:-1,g=0>p||0===p&&0>1/p?1:0;p=Math.abs(p);isNaN(p)||Infinity===p?(p=isNaN(p)?1:0,m=r):(m=Math.floor(Math.log(p)/Math.LN2),1>p*(l=Math.pow(2,-m))&&(m--,l*=2),p=1<=m+k?p+u/l:p+u*Math.pow(2,1-k),2<=p*l&&(m++,l/=2),m+k>=r?(p=0,m=r):1<=m+k?(p=(p*l-1)*Math.pow(2,f),m+=k):(p=p*Math.pow(2,k-1)*Math.pow(2,f),m=0));for(;8<=f;e[t+c]=p&255,c+= +d,p/=256,f-=8);m=m<z?[]:n.slice(v,z-v+1)}c=A.resolve(c).substr(1);l=A.resolve(l).substr(1); +for(var r=q(c.split("/")),k=q(l.split("/")),u=Math.min(r.length,k.length),d=u,g=0;gl&&(l=c.length+l);return c.substr(l,q)}}).call(this,C("g5I+bs"))},{"g5I+bs":9}],9:[function(C,J,A){function e(){}C=J.exports={};C.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(t){return window.setImmediate(t)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var p=[];window.addEventListener("message",function(t){var m=t.source;m!==window&&null!== +m||"process-tick"!==t.data||(t.stopPropagation(),0p?(-p<<1)+1:p<<1;do p=m&31,m>>>=5,0=f)throw Error("Expected more digits in base 64 VLQ value.");var q=e.decode(p.charCodeAt(t++));if(-1===q)throw Error("Invalid base64 digit: "+p.charAt(t-1));var r=!!(q&32);q&=31;c+=q<>1;m.value=1===(c&1)?-p:p;m.rest=t}},{"./base64":12}],12:[function(C, +J,A){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");A.encode=function(p){if(0<=p&&p=p?p-65:97<=p&&122>=p?p-97+26:48<=p&&57>=p?p-48+52:43==p?62:47==p?63:-1}},{}],13:[function(C,J,A){function e(p,t,m,f,c,l){var q=Math.floor((t-p)/2)+p,r=c(m,f[q],!0);return 0===r?q:0p?-1:p}A.GREATEST_LOWER_BOUND=1;A.LEAST_UPPER_BOUND=2;A.search=function(p,t,m,f){if(0===t.length)return-1;p=e(-1,t.length,p,t,m,f||A.GREATEST_LOWER_BOUND);if(0>p)return-1;for(;0<=p-1&&0===m(t[p],t[p-1],!0);)--p;return p}},{}],14:[function(C,J,A){function e(){this._array=[];this._sorted=!0;this._last={generatedLine:-1,generatedColumn:0}}var p=C("./util");e.prototype.unsortedForEach=function(t,m){this._array.forEach(t,m)};e.prototype.add=function(t){var m=this._last,f=m.generatedLine, +c=t.generatedLine,l=m.generatedColumn,q=t.generatedColumn;c>f||c==f&&q>=l||0>=p.compareByGeneratedPositionsInflated(m,t)?this._last=t:this._sorted=!1;this._array.push(t)};e.prototype.toArray=function(){this._sorted||(this._array.sort(p.compareByGeneratedPositionsInflated),this._sorted=!0);return this._array};A.MappingList=e},{"./util":19}],15:[function(C,J,A){function e(t,m,f){var c=t[m];t[m]=t[f];t[f]=c}function p(t,m,f,c){if(f=m(t[r],q)&&(l+=1,e(t,l,r));e(t,l+1,r);l+=1;p(t,m,f,l-1);p(t,m,l+1,c)}}A.quickSort=function(t,m){p(t,m,0,t.length-1)}},{}],16:[function(C,J,A){function e(k,u){var d=k;"string"===typeof k&&(d=f.parseSourceMapInput(k));return null!=d.sections?new m(d,u):new p(d,u)}function p(k,u){var d=k;"string"===typeof k&&(d=f.parseSourceMapInput(k));var g=f.getArg(d,"version"),n=f.getArg(d,"sources"),v=f.getArg(d,"names",[]),z=f.getArg(d,"sourceRoot",null),G=f.getArg(d,"sourcesContent",null),D=f.getArg(d, +"mappings");d=f.getArg(d,"file",null);if(g!=this._version)throw Error("Unsupported version: "+g);z&&(z=f.normalize(z));n=n.map(String).map(f.normalize).map(function(L){return z&&f.isAbsolute(z)&&f.isAbsolute(L)?f.relative(z,L):L});this._names=l.fromArray(v.map(String),!0);this._sources=l.fromArray(n,!0);this.sourceRoot=z;this.sourcesContent=G;this._mappings=D;this._sourceMapURL=u;this.file=d}function t(){this.generatedColumn=this.generatedLine=0;this.name=this.originalColumn=this.originalLine=this.source= +null}function m(k,u){var d=k;"string"===typeof k&&(d=f.parseSourceMapInput(k));var g=f.getArg(d,"version");d=f.getArg(d,"sections");if(g!=this._version)throw Error("Unsupported version: "+g);this._sources=new l;this._names=new l;var n={line:-1,column:0};this._sections=d.map(function(v){if(v.url)throw Error("Support for url field in sections not implemented.");var z=f.getArg(v,"offset"),G=f.getArg(z,"line"),D=f.getArg(z,"column");if(G=k[d])throw new TypeError("Line must be greater than or equal to 1, got "+ +k[d]);if(0>k[g])throw new TypeError("Column must be greater than or equal to 0, got "+k[g]);return c.search(k,u,n,v)};p.prototype.computeColumnSpans=function(){for(var k=0;k=this._sources.size()&&!this.sourcesContent.some(function(k){return null==k}):!1};p.prototype.sourceContentFor=function(k,u){if(!this.sourcesContent)return null;var d=k;null!=this.sourceRoot&&(d=f.relative(this.sourceRoot,d));if(this._sources.has(d))return this.sourcesContent[this._sources.indexOf(d)]; +var g=this.sources,n;for(n=0;n +g||95!==d.charCodeAt(g-1)||95!==d.charCodeAt(g-2)||111!==d.charCodeAt(g-3)||116!==d.charCodeAt(g-4)||111!==d.charCodeAt(g-5)||114!==d.charCodeAt(g-6)||112!==d.charCodeAt(g-7)||95!==d.charCodeAt(g-8)||95!==d.charCodeAt(g-9))return!1;for(g-=10;0<=g;g--)if(36!==d.charCodeAt(g))return!1;return!0}function r(d,g){return d===g?0:null===d?1:null===g?-1:d>g?1:-1}A.getArg=function(d,g,n){if(g in d)return d[g];if(3===arguments.length)return n;throw Error('"'+g+'" is a required argument.');};var k=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/, +u=/^data:.+,.+$/;A.urlParse=e;A.urlGenerate=p;A.normalize=t;A.join=m;A.isAbsolute=function(d){return"/"===d.charAt(0)||k.test(d)};A.relative=function(d,g){""===d&&(d=".");d=d.replace(/\/$/,"");for(var n=0;0!==g.indexOf(d+"/");){var v=d.lastIndexOf("/");if(0>v)return g;d=d.slice(0,v);if(d.match(/^([^\/]+:\/)?\/*$/))return g;++n}return Array(n+1).join("../")+g.substr(d.length+1)};C=!("__proto__"in Object.create(null));A.toSetString=C?f:c;A.fromSetString=C?f:l;A.compareByOriginalPositions=function(d, +g,n){var v=r(d.source,g.source);if(0!==v)return v;v=d.originalLine-g.originalLine;if(0!==v)return v;v=d.originalColumn-g.originalColumn;if(0!==v||n)return v;v=d.generatedColumn-g.generatedColumn;if(0!==v)return v;v=d.generatedLine-g.generatedLine;return 0!==v?v:r(d.name,g.name)};A.compareByGeneratedPositionsDeflated=function(d,g,n){var v=d.generatedLine-g.generatedLine;if(0!==v)return v;v=d.generatedColumn-g.generatedColumn;if(0!==v||n)return v;v=r(d.source,g.source);if(0!==v)return v;v=d.originalLine- +g.originalLine;if(0!==v)return v;v=d.originalColumn-g.originalColumn;return 0!==v?v:r(d.name,g.name)};A.compareByGeneratedPositionsInflated=function(d,g){var n=d.generatedLine-g.generatedLine;if(0!==n)return n;n=d.generatedColumn-g.generatedColumn;if(0!==n)return n;n=r(d.source,g.source);if(0!==n)return n;n=d.originalLine-g.originalLine;if(0!==n)return n;n=d.originalColumn-g.originalColumn;return 0!==n?n:r(d.name,g.name)};A.parseSourceMapInput=function(d){return JSON.parse(d.replace(/^\)]}'[^\n]*\n/, +""))};A.computeSourceURL=function(d,g,n){g=g||"";d&&("/"!==d[d.length-1]&&"/"!==g[0]&&(d+="/"),g=d+g);if(n){d=e(n);if(!d)throw Error("sourceMapURL could not be parsed");d.path&&(n=d.path.lastIndexOf("/"),0<=n&&(d.path=d.path.substring(0,n+1)));g=m(p(d),g)}return t(g)}},{}],20:[function(C,J,A){A.SourceMapGenerator=C("./lib/source-map-generator").SourceMapGenerator;A.SourceMapConsumer=C("./lib/source-map-consumer").SourceMapConsumer;A.SourceNode=C("./lib/source-node").SourceNode},{"./lib/source-map-consumer":16, +"./lib/source-map-generator":17,"./lib/source-node":18}],21:[function(C,J,A){(function(e){function p(){return"browser"===a?!0:"node"===a?!1:"undefined"!==typeof window&&"function"===typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type)}function t(x){return function(B){for(var F=0;F";B=this.getLineNumber();null!=B&&(x+=":"+B,(B= +this.getColumnNumber())&&(x+=":"+B))}B="";var F=this.getFunctionName(),E=!0,H=this.isConstructor();if(this.isToplevel()||H)H?B+="new "+(F||""):F?B+=F:(B+=x,E=!1);else{H=this.getTypeName();"[object Object]"===H&&(H="null");var M=this.getMethodName();F?(H&&0!=F.indexOf(H)&&(B+=H+"."),B+=F,M&&F.indexOf("."+M)!=F.length-M.length-1&&(B+=" [as "+M+"]")):B+=H+"."+(M||"")}E&&(B+=" ("+x+")");return B}function q(x){var B={};Object.getOwnPropertyNames(Object.getPrototypeOf(x)).forEach(function(F){B[F]= +/^(?:is|get)/.test(F)?function(){return x[F].call(x)}:x[F]});B.toString=l;return B}function r(x,B){void 0===B&&(B={nextPosition:null,curPosition:null});if(x.isNative())return B.curPosition=null,x;var F=x.getFileName()||x.getScriptNameOrSourceURL();if(F){var E=x.getLineNumber(),H=x.getColumnNumber()-1,M=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,S=M.test;var V="object"===typeof e&&null!==e?e.version:"";M=S.call(M,V)?0:62;1===E&&H>M&&!p()&&!x.isEval()&&(H-=M);var O= +f({source:F,line:E,column:H});B.curPosition=O;x=q(x);var T=x.getFunctionName;x.getFunctionName=function(){return null==B.nextPosition?T():B.nextPosition.name||T()};x.getFileName=function(){return O.source};x.getLineNumber=function(){return O.line};x.getColumnNumber=function(){return O.column+1};x.getScriptNameOrSourceURL=function(){return O.source};return x}var Q=x.isEval()&&x.getEvalOrigin();Q&&(Q=c(Q),x=q(x),x.getEvalOrigin=function(){return Q});return x}function k(x,B){L&&(b={},h={});for(var F= +(x.name||"Error")+": "+(x.message||""),E={nextPosition:null,curPosition:null},H=[],M=B.length-1;0<=M;M--)H.push("\n at "+r(B[M],E)),E.nextPosition=E.curPosition;E.curPosition=E.nextPosition=null;return F+H.reverse().join("")}function u(x){var B=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(x.stack);if(B){x=B[1];var F=+B[2];B=+B[3];var E=b[x];if(!E&&v&&v.existsSync(x))try{E=v.readFileSync(x,"utf8")}catch(H){E=""}if(E&&(E=E.split(/(?:\r\n|\r|\n)/)[F-1]))return x+":"+F+"\n"+E+"\n"+Array(B).join(" ")+ +"^"}return null}function d(){var x=e.emit;e.emit=function(B){if("uncaughtException"===B){var F=arguments[1]&&arguments[1].stack,E=0=12" + }, + "volta": { + "node": "16.11.0", + "npm": "7.24.2" + } +} diff --git a/node_modules/@cspotcode/source-map-support/register-hook-require.d.ts b/node_modules/@cspotcode/source-map-support/register-hook-require.d.ts new file mode 100755 index 0000000..a787e69 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/register-hook-require.d.ts @@ -0,0 +1,7 @@ +// tslint:disable:no-useless-files + +// For following usage: +// import '@cspotcode/source-map-support/register-hook-require' +// Instead of: +// import sourceMapSupport from '@cspotcode/source-map-support' +// sourceMapSupport.install({hookRequire: true}) diff --git a/node_modules/@cspotcode/source-map-support/register-hook-require.js b/node_modules/@cspotcode/source-map-support/register-hook-require.js new file mode 100644 index 0000000..6bc12ab --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/register-hook-require.js @@ -0,0 +1,3 @@ +require('./').install({ + hookRequire: true +}); diff --git a/node_modules/@cspotcode/source-map-support/register.d.ts b/node_modules/@cspotcode/source-map-support/register.d.ts new file mode 100755 index 0000000..063cd7c --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/register.d.ts @@ -0,0 +1,7 @@ +// tslint:disable:no-useless-files + +// For following usage: +// import '@cspotcode/source-map-support/register' +// Instead of: +// import sourceMapSupport from '@cspotcode/source-map-support' +// sourceMapSupport.install() diff --git a/node_modules/@cspotcode/source-map-support/register.js b/node_modules/@cspotcode/source-map-support/register.js new file mode 100644 index 0000000..4f68e67 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/register.js @@ -0,0 +1 @@ +require('./').install(); diff --git a/node_modules/@cspotcode/source-map-support/source-map-support.d.ts b/node_modules/@cspotcode/source-map-support/source-map-support.d.ts new file mode 100755 index 0000000..d8cb9d8 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/source-map-support.d.ts @@ -0,0 +1,76 @@ +// Type definitions for source-map-support 0.5 +// Project: https://github.com/evanw/node-source-map-support +// Definitions by: Bart van der Schoor +// Jason Cheatham +// Alcedo Nathaniel De Guzman Jr +// Griffin Yourick +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface RawSourceMap { + version: 3; + sources: string[]; + names: string[]; + sourceRoot?: string; + sourcesContent?: string[]; + mappings: string; + file: string; +} + +/** + * Output of retrieveSourceMap(). + * From source-map-support: + * The map field may be either a string or the parsed JSON object (i.e., + * it must be a valid argument to the SourceMapConsumer constructor). + */ +export interface UrlAndMap { + url: string; + map: string | RawSourceMap; +} + +/** + * Options to install(). + */ +export interface Options { + handleUncaughtExceptions?: boolean | undefined; + hookRequire?: boolean | undefined; + emptyCacheBetweenOperations?: boolean | undefined; + environment?: 'auto' | 'browser' | 'node' | undefined; + overrideRetrieveFile?: boolean | undefined; + overrideRetrieveSourceMap?: boolean | undefined; + retrieveFile?(path: string): string; + retrieveSourceMap?(source: string): UrlAndMap | null; + /** + * Set false to disable redirection of require / import `source-map-support` to `@cspotcode/source-map-support` + */ + redirectConflictingLibrary?: boolean; + /** + * Callback will be called every time we redirect due to `redirectConflictingLibrary` + * This allows consumers to log helpful warnings if they choose. + * @param parent NodeJS.Module which made the require() or require.resolve() call + * @param options options object internally passed to node's `_resolveFilename` hook + */ + onConflictingLibraryRedirect?: (request: string, parent: any, isMain: boolean, options: any, redirectedRequest: string) => void; +} + +export interface Position { + source: string; + line: number; + column: number; +} + +export function wrapCallSite(frame: any /* StackFrame */): any /* StackFrame */; +export function getErrorSource(error: Error): string | null; +export function mapSourcePosition(position: Position): Position; +export function retrieveSourceMap(source: string): UrlAndMap | null; +export function resetRetrieveHandlers(): void; + +/** + * Install SourceMap support. + * @param options Can be used to e.g. disable uncaughtException handler. + */ +export function install(options?: Options): void; + +/** + * Uninstall SourceMap support. + */ +export function uninstall(): void; diff --git a/node_modules/@cspotcode/source-map-support/source-map-support.js b/node_modules/@cspotcode/source-map-support/source-map-support.js new file mode 100644 index 0000000..ad830b6 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/source-map-support.js @@ -0,0 +1,938 @@ +const { TraceMap, originalPositionFor, AnyMap } = require('@jridgewell/trace-mapping'); +var path = require('path'); +const { fileURLToPath, pathToFileURL } = require('url'); +var util = require('util'); + +var fs; +try { + fs = require('fs'); + if (!fs.existsSync || !fs.readFileSync) { + // fs doesn't have all methods we need + fs = null; + } +} catch (err) { + /* nop */ +} + +/** + * Requires a module which is protected against bundler minification. + * + * @param {NodeModule} mod + * @param {string} request + */ +function dynamicRequire(mod, request) { + return mod.require(request); +} + +/** + * @typedef {{ + * enabled: boolean; + * originalValue: any; + * installedValue: any; + * }} HookState + * Used for installing and uninstalling hooks + */ + +// Increment this if the format of sharedData changes in a breaking way. +var sharedDataVersion = 1; + +/** + * @template T + * @param {T} defaults + * @returns {T} + */ +function initializeSharedData(defaults) { + var sharedDataKey = 'source-map-support/sharedData'; + if (typeof Symbol !== 'undefined') { + sharedDataKey = Symbol.for(sharedDataKey); + } + var sharedData = this[sharedDataKey]; + if (!sharedData) { + sharedData = { version: sharedDataVersion }; + if (Object.defineProperty) { + Object.defineProperty(this, sharedDataKey, { value: sharedData }); + } else { + this[sharedDataKey] = sharedData; + } + } + if (sharedDataVersion !== sharedData.version) { + throw new Error("Multiple incompatible instances of source-map-support were loaded"); + } + for (var key in defaults) { + if (!(key in sharedData)) { + sharedData[key] = defaults[key]; + } + } + return sharedData; +} + +// If multiple instances of source-map-support are loaded into the same +// context, they shouldn't overwrite each other. By storing handlers, caches, +// and other state on a shared object, different instances of +// source-map-support can work together in a limited way. This does require +// that future versions of source-map-support continue to support the fields on +// this object. If this internal contract ever needs to be broken, increment +// sharedDataVersion. (This version number is not the same as any of the +// package's version numbers, which should reflect the *external* API of +// source-map-support.) +var sharedData = initializeSharedData({ + + // Only install once if called multiple times + // Remember how the environment looked before installation so we can restore if able + /** @type {HookState} */ + errorPrepareStackTraceHook: undefined, + /** @type {HookState} */ + processEmitHook: undefined, + /** @type {HookState} */ + moduleResolveFilenameHook: undefined, + + /** @type {Array<(request: string, parent: any, isMain: boolean, options: any, redirectedRequest: string) => void>} */ + onConflictingLibraryRedirectArr: [], + + // If true, the caches are reset before a stack trace formatting operation + emptyCacheBetweenOperations: false, + + // Maps a file path to a string containing the file contents + fileContentsCache: Object.create(null), + + // Maps a file path to a source map for that file + /** @type {Record C:/dir/file + '/'; // file:///root-dir/file -> /root-dir/file + }); + } + const key = getCacheKey(path); + if(hasFileContentsCacheFromKey(key)) { + return getFileContentsCacheFromKey(key); + } + + var contents = ''; + try { + if (!fs) { + // Use SJAX if we are in the browser + var xhr = new XMLHttpRequest(); + xhr.open('GET', path, /** async */ false); + xhr.send(null); + if (xhr.readyState === 4 && xhr.status === 200) { + contents = xhr.responseText; + } + } else if (fs.existsSync(path)) { + // Otherwise, use the filesystem + contents = fs.readFileSync(path, 'utf8'); + } + } catch (er) { + /* ignore any errors */ + } + + return setFileContentsCache(path, contents); +}); + +// Support URLs relative to a directory, but be careful about a protocol prefix +// in case we are in the browser (i.e. directories may start with "http://" or "file:///") +function supportRelativeURL(file, url) { + if(!file) return url; + // given that this happens within error formatting codepath, probably best to + // fallback instead of throwing if anything goes wrong + try { + // if should output a URL + if(isAbsoluteUrl(file) || isSchemeRelativeUrl(file)) { + if(isAbsoluteUrl(url) || isSchemeRelativeUrl(url)) { + return new URL(url, file).toString(); + } + if(path.isAbsolute(url)) { + return new URL(pathToFileURL(url), file).toString(); + } + // url is relative path or URL + return new URL(url.replace(/\\/g, '/'), file).toString(); + } + // if should output a path (unless URL is something like https://) + if(path.isAbsolute(file)) { + if(isFileUrl(url)) { + return fileURLToPath(url); + } + if(isSchemeRelativeUrl(url)) { + return fileURLToPath(new URL(url, 'file://')); + } + if(isAbsoluteUrl(url)) { + // url is a non-file URL + // Go with the URL + return url; + } + if(path.isAbsolute(url)) { + // Normalize at all? decodeURI or normalize slashes? + return path.normalize(url); + } + // url is relative path or URL + return path.join(file, '..', decodeURI(url)); + } + // If we get here, file is relative. + // Shouldn't happen since node identifies modules with absolute paths or URLs. + // But we can take a stab at returning something meaningful anyway. + if(isAbsoluteUrl(url) || isSchemeRelativeUrl(url)) { + return url; + } + return path.join(file, '..', url); + } catch(e) { + return url; + } +} + +// Return pathOrUrl in the same style as matchStyleOf: either a file URL or a native path +function matchStyleOfPathOrUrl(matchStyleOf, pathOrUrl) { + try { + if(isAbsoluteUrl(matchStyleOf) || isSchemeRelativeUrl(matchStyleOf)) { + if(isAbsoluteUrl(pathOrUrl) || isSchemeRelativeUrl(pathOrUrl)) return pathOrUrl; + if(path.isAbsolute(pathOrUrl)) return pathToFileURL(pathOrUrl).toString(); + } else if(path.isAbsolute(matchStyleOf)) { + if(isAbsoluteUrl(pathOrUrl) || isSchemeRelativeUrl(pathOrUrl)) { + return fileURLToPath(new URL(pathOrUrl, 'file://')); + } + } + return pathOrUrl; + } catch(e) { + return pathOrUrl; + } +} + +function retrieveSourceMapURL(source) { + var fileData; + + if (isInBrowser()) { + try { + var xhr = new XMLHttpRequest(); + xhr.open('GET', source, false); + xhr.send(null); + fileData = xhr.readyState === 4 ? xhr.responseText : null; + + // Support providing a sourceMappingURL via the SourceMap header + var sourceMapHeader = xhr.getResponseHeader("SourceMap") || + xhr.getResponseHeader("X-SourceMap"); + if (sourceMapHeader) { + return sourceMapHeader; + } + } catch (e) { + } + } + + // Get the URL of the source map + fileData = retrieveFile(tryFileURLToPath(source)); + var re = /(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg; + // Keep executing the search to find the *last* sourceMappingURL to avoid + // picking up sourceMappingURLs from comments, strings, etc. + var lastMatch, match; + while (match = re.exec(fileData)) lastMatch = match; + if (!lastMatch) return null; + return lastMatch[1]; +}; + +// Can be overridden by the retrieveSourceMap option to install. Takes a +// generated source filename; returns a {map, optional url} object, or null if +// there is no source map. The map field may be either a string or the parsed +// JSON object (ie, it must be a valid argument to the SourceMapConsumer +// constructor). +/** @type {(source: string) => import('./source-map-support').UrlAndMap | null} */ +var retrieveSourceMap = handlerExec(sharedData.retrieveMapHandlers, sharedData.internalRetrieveMapHandlers); +sharedData.internalRetrieveMapHandlers.push(function(source) { + var sourceMappingURL = retrieveSourceMapURL(source); + if (!sourceMappingURL) return null; + + // Read the contents of the source map + var sourceMapData; + if (reSourceMap.test(sourceMappingURL)) { + // Support source map URL as a data url + var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(',') + 1); + sourceMapData = Buffer.from(rawData, "base64").toString(); + sourceMappingURL = source; + } else { + // Support source map URLs relative to the source URL + sourceMappingURL = supportRelativeURL(source, sourceMappingURL); + sourceMapData = retrieveFile(tryFileURLToPath(sourceMappingURL)); + } + + if (!sourceMapData) { + return null; + } + + return { + url: sourceMappingURL, + map: sourceMapData + }; +}); + +function mapSourcePosition(position) { + var sourceMap = getSourceMapCache(position.source); + if (!sourceMap) { + // Call the (overrideable) retrieveSourceMap function to get the source map. + var urlAndMap = retrieveSourceMap(position.source); + if (urlAndMap) { + sourceMap = setSourceMapCache(position.source, { + url: urlAndMap.url, + map: new AnyMap(urlAndMap.map, urlAndMap.url) + }); + + // Overwrite trace-mapping's resolutions, because they do not handle + // Windows paths the way we want. + // TODO Remove now that windows path support was added to resolve-uri and thus trace-mapping? + sourceMap.map.resolvedSources = sourceMap.map.sources.map(s => supportRelativeURL(sourceMap.url, s)); + + // Load all sources stored inline with the source map into the file cache + // to pretend like they are already loaded. They may not exist on disk. + if (sourceMap.map.sourcesContent) { + sourceMap.map.resolvedSources.forEach(function(resolvedSource, i) { + var contents = sourceMap.map.sourcesContent[i]; + if (contents) { + setFileContentsCache(resolvedSource, contents); + } + }); + } + } else { + sourceMap = setSourceMapCache(position.source, { + url: null, + map: null + }); + } + } + + // Resolve the source URL relative to the URL of the source map + if (sourceMap && sourceMap.map) { + var originalPosition = originalPositionFor(sourceMap.map, position); + + // Only return the original position if a matching line was found. If no + // matching line is found then we return position instead, which will cause + // the stack trace to print the path and line for the compiled file. It is + // better to give a precise location in the compiled file than a vague + // location in the original file. + if (originalPosition.source !== null) { + // originalPosition.source has *already* been resolved against sourceMap.url + // so is *already* as absolute as possible. + // However, we want to ensure we output in same format as input: URL or native path + originalPosition.source = matchStyleOfPathOrUrl( + position.source, originalPosition.source); + return originalPosition; + } + } + + return position; +} + +// Parses code generated by FormatEvalOrigin(), a function inside V8: +// https://code.google.com/p/v8/source/browse/trunk/src/messages.js +function mapEvalOrigin(origin) { + // Most eval() calls are in this format + var match = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin); + if (match) { + var position = mapSourcePosition({ + source: match[2], + line: +match[3], + column: match[4] - 1 + }); + return 'eval at ' + match[1] + ' (' + position.source + ':' + + position.line + ':' + (position.column + 1) + ')'; + } + + // Parse nested eval() calls using recursion + match = /^eval at ([^(]+) \((.+)\)$/.exec(origin); + if (match) { + return 'eval at ' + match[1] + ' (' + mapEvalOrigin(match[2]) + ')'; + } + + // Make sure we still return useful information if we didn't find anything + return origin; +} + +// This is copied almost verbatim from the V8 source code at +// https://code.google.com/p/v8/source/browse/trunk/src/messages.js +// Update 2022-04-29: +// https://github.com/v8/v8/blob/98f6f100c5ab8e390e51422747c4ef644d5ac6f2/src/builtins/builtins-callsite.cc#L175-L179 +// https://github.com/v8/v8/blob/98f6f100c5ab8e390e51422747c4ef644d5ac6f2/src/objects/call-site-info.cc#L795-L804 +// https://github.com/v8/v8/blob/98f6f100c5ab8e390e51422747c4ef644d5ac6f2/src/objects/call-site-info.cc#L717-L750 +// The implementation of wrapCallSite() used to just forward to the actual source +// code of CallSite.prototype.toString but unfortunately a new release of V8 +// did something to the prototype chain and broke the shim. The only fix I +// could find was copy/paste. +function CallSiteToString() { + var fileName; + var fileLocation = ""; + if (this.isNative()) { + fileLocation = "native"; + } else { + fileName = this.getScriptNameOrSourceURL(); + if (!fileName && this.isEval()) { + fileLocation = this.getEvalOrigin(); + fileLocation += ", "; // Expecting source position to follow. + } + + if (fileName) { + fileLocation += fileName; + } else { + // Source code does not originate from a file and is not native, but we + // can still get the source position inside the source string, e.g. in + // an eval string. + fileLocation += ""; + } + var lineNumber = this.getLineNumber(); + if (lineNumber != null) { + fileLocation += ":" + lineNumber; + var columnNumber = this.getColumnNumber(); + if (columnNumber) { + fileLocation += ":" + columnNumber; + } + } + } + + var line = ""; + var isAsync = this.isAsync ? this.isAsync() : false; + if(isAsync) { + line += 'async '; + var isPromiseAll = this.isPromiseAll ? this.isPromiseAll() : false; + var isPromiseAny = this.isPromiseAny ? this.isPromiseAny() : false; + if(isPromiseAny || isPromiseAll) { + line += isPromiseAll ? 'Promise.all (index ' : 'Promise.any (index '; + var promiseIndex = this.getPromiseIndex(); + line += promiseIndex + ')'; + } + } + var functionName = this.getFunctionName(); + var addSuffix = true; + var isConstructor = this.isConstructor(); + var isMethodCall = !(this.isToplevel() || isConstructor); + if (isMethodCall) { + var typeName = this.getTypeName(); + // Fixes shim to be backward compatable with Node v0 to v4 + if (typeName === "[object Object]") { + typeName = "null"; + } + var methodName = this.getMethodName(); + if (functionName) { + if (typeName && functionName.indexOf(typeName) != 0) { + line += typeName + "."; + } + line += functionName; + if (methodName && functionName.indexOf("." + methodName) != functionName.length - methodName.length - 1) { + line += " [as " + methodName + "]"; + } + } else { + line += typeName + "." + (methodName || ""); + } + } else if (isConstructor) { + line += "new " + (functionName || ""); + } else if (functionName) { + line += functionName; + } else { + line += fileLocation; + addSuffix = false; + } + if (addSuffix) { + line += " (" + fileLocation + ")"; + } + return line; +} + +function cloneCallSite(frame) { + var object = {}; + Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) { + object[name] = /^(?:is|get)/.test(name) ? function() { return frame[name].call(frame); } : frame[name]; + }); + object.toString = CallSiteToString; + return object; +} + +function wrapCallSite(frame, state) { + // provides interface backward compatibility + if (state === undefined) { + state = { nextPosition: null, curPosition: null } + } + if(frame.isNative()) { + state.curPosition = null; + return frame; + } + + // Most call sites will return the source file from getFileName(), but code + // passed to eval() ending in "//# sourceURL=..." will return the source file + // from getScriptNameOrSourceURL() instead + var source = frame.getFileName() || frame.getScriptNameOrSourceURL(); + if (source) { + // v8 does not expose its internal isWasm, etc methods, so we do this instead. + if(source.startsWith('wasm://')) { + state.curPosition = null; + return frame; + } + + var line = frame.getLineNumber(); + var column = frame.getColumnNumber() - 1; + + // Fix position in Node where some (internal) code is prepended. + // See https://github.com/evanw/node-source-map-support/issues/36 + // Header removed in node at ^10.16 || >=11.11.0 + // v11 is not an LTS candidate, we can just test the one version with it. + // Test node versions for: 10.16-19, 10.20+, 12-19, 20-99, 100+, or 11.11 + var noHeader = /^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/; + var headerLength = noHeader.test(process.version) ? 0 : 62; + if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) { + column -= headerLength; + } + + var position = mapSourcePosition({ + source: source, + line: line, + column: column + }); + state.curPosition = position; + frame = cloneCallSite(frame); + var originalFunctionName = frame.getFunctionName; + frame.getFunctionName = function() { + if (state.nextPosition == null) { + return originalFunctionName(); + } + return state.nextPosition.name || originalFunctionName(); + }; + frame.getFileName = function() { return position.source; }; + frame.getLineNumber = function() { return position.line; }; + frame.getColumnNumber = function() { return position.column + 1; }; + frame.getScriptNameOrSourceURL = function() { return position.source; }; + return frame; + } + + // Code called using eval() needs special handling + var origin = frame.isEval() && frame.getEvalOrigin(); + if (origin) { + origin = mapEvalOrigin(origin); + frame = cloneCallSite(frame); + frame.getEvalOrigin = function() { return origin; }; + return frame; + } + + // If we get here then we were unable to change the source position + return frame; +} + +var kIsNodeError = undefined; +try { + // Get a deliberate ERR_INVALID_ARG_TYPE + // TODO is there a better way to reliably get an instance of NodeError? + path.resolve(123); +} catch(e) { + const symbols = Object.getOwnPropertySymbols(e); + const symbol = symbols.find(function (s) {return s.toString().indexOf('kIsNodeError') >= 0}); + if(symbol) kIsNodeError = symbol; +} + +const ErrorPrototypeToString = (err) =>Error.prototype.toString.call(err); + +/** @param {HookState} hookState */ +function createPrepareStackTrace(hookState) { + return prepareStackTrace; + + // This function is part of the V8 stack trace API, for more info see: + // https://v8.dev/docs/stack-trace-api + function prepareStackTrace(error, stack) { + if(!hookState.enabled) return hookState.originalValue.apply(this, arguments); + + if (sharedData.emptyCacheBetweenOperations) { + clearCaches(); + } + + // node gives its own errors special treatment. Mimic that behavior + // https://github.com/nodejs/node/blob/3cbaabc4622df1b4009b9d026a1a970bdbae6e89/lib/internal/errors.js#L118-L128 + // https://github.com/nodejs/node/pull/39182 + var errorString; + if (kIsNodeError) { + if(kIsNodeError in error) { + errorString = `${error.name} [${error.code}]: ${error.message}`; + } else { + errorString = ErrorPrototypeToString(error); + } + } else { + var name = error.name || 'Error'; + var message = error.message || ''; + errorString = message ? name + ": " + message : name; + } + + var state = { nextPosition: null, curPosition: null }; + var processedStack = []; + for (var i = stack.length - 1; i >= 0; i--) { + processedStack.push('\n at ' + wrapCallSite(stack[i], state)); + state.nextPosition = state.curPosition; + } + state.curPosition = state.nextPosition = null; + return errorString + processedStack.reverse().join(''); + } +} + +// Generate position and snippet of original source with pointer +function getErrorSource(error) { + var match = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error.stack); + if (match) { + var source = match[1]; + var line = +match[2]; + var column = +match[3]; + + // Support the inline sourceContents inside the source map + var contents = getFileContentsCache(source); + + const sourceAsPath = tryFileURLToPath(source); + + // Support files on disk + if (!contents && fs && fs.existsSync(sourceAsPath)) { + try { + contents = fs.readFileSync(sourceAsPath, 'utf8'); + } catch (er) { + contents = ''; + } + } + + // Format the line from the original source code like node does + if (contents) { + var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1]; + if (code) { + return source + ':' + line + '\n' + code + '\n' + + new Array(column).join(' ') + '^'; + } + } + } + return null; +} + +function printFatalErrorUponExit (error) { + var source = getErrorSource(error); + + // Ensure error is printed synchronously and not truncated + if (process.stderr._handle && process.stderr._handle.setBlocking) { + process.stderr._handle.setBlocking(true); + } + + if (source) { + console.error(source); + } + + // Matches node's behavior for colorized output + console.error( + util.inspect(error, { + customInspect: false, + colors: process.stderr.isTTY + }) + ); +} + +function shimEmitUncaughtException () { + const originalValue = process.emit; + var hook = sharedData.processEmitHook = { + enabled: true, + originalValue, + installedValue: undefined + }; + var isTerminatingDueToFatalException = false; + var fatalException; + + process.emit = sharedData.processEmitHook.installedValue = function (type) { + const hadListeners = originalValue.apply(this, arguments); + if(hook.enabled) { + if (type === 'uncaughtException' && !hadListeners) { + isTerminatingDueToFatalException = true; + fatalException = arguments[1]; + process.exit(1); + } + if (type === 'exit' && isTerminatingDueToFatalException) { + printFatalErrorUponExit(fatalException); + } + } + return hadListeners; + }; +} + +var originalRetrieveFileHandlers = sharedData.retrieveFileHandlers.slice(0); +var originalRetrieveMapHandlers = sharedData.retrieveMapHandlers.slice(0); + +exports.wrapCallSite = wrapCallSite; +exports.getErrorSource = getErrorSource; +exports.mapSourcePosition = mapSourcePosition; +exports.retrieveSourceMap = retrieveSourceMap; + +exports.install = function(options) { + options = options || {}; + + if (options.environment) { + environment = options.environment; + if (["node", "browser", "auto"].indexOf(environment) === -1) { + throw new Error("environment " + environment + " was unknown. Available options are {auto, browser, node}") + } + } + + // Use dynamicRequire to avoid including in browser bundles + var Module = dynamicRequire(module, 'module'); + + // Redirect subsequent imports of "source-map-support" + // to this package + const {redirectConflictingLibrary = true, onConflictingLibraryRedirect} = options; + if(redirectConflictingLibrary) { + if (!sharedData.moduleResolveFilenameHook) { + const originalValue = Module._resolveFilename; + const moduleResolveFilenameHook = sharedData.moduleResolveFilenameHook = { + enabled: true, + originalValue, + installedValue: undefined, + } + Module._resolveFilename = sharedData.moduleResolveFilenameHook.installedValue = function (request, parent, isMain, options) { + if (moduleResolveFilenameHook.enabled) { + // Match all source-map-support entrypoints: source-map-support, source-map-support/register + let requestRedirect; + if (request === 'source-map-support') { + requestRedirect = './'; + } else if (request === 'source-map-support/register') { + requestRedirect = './register'; + } + + if (requestRedirect !== undefined) { + const newRequest = require.resolve(requestRedirect); + for (const cb of sharedData.onConflictingLibraryRedirectArr) { + cb(request, parent, isMain, options, newRequest); + } + request = newRequest; + } + } + + return originalValue.call(this, request, parent, isMain, options); + } + } + if (onConflictingLibraryRedirect) { + sharedData.onConflictingLibraryRedirectArr.push(onConflictingLibraryRedirect); + } + } + + // Allow sources to be found by methods other than reading the files + // directly from disk. + if (options.retrieveFile) { + if (options.overrideRetrieveFile) { + sharedData.retrieveFileHandlers.length = 0; + } + + sharedData.retrieveFileHandlers.unshift(options.retrieveFile); + } + + // Allow source maps to be found by methods other than reading the files + // directly from disk. + if (options.retrieveSourceMap) { + if (options.overrideRetrieveSourceMap) { + sharedData.retrieveMapHandlers.length = 0; + } + + sharedData.retrieveMapHandlers.unshift(options.retrieveSourceMap); + } + + // Support runtime transpilers that include inline source maps + if (options.hookRequire && !isInBrowser()) { + var $compile = Module.prototype._compile; + + if (!$compile.__sourceMapSupport) { + Module.prototype._compile = function(content, filename) { + setFileContentsCache(filename, content); + setSourceMapCache(filename, undefined); + return $compile.call(this, content, filename); + }; + + Module.prototype._compile.__sourceMapSupport = true; + } + } + + // Configure options + if (!sharedData.emptyCacheBetweenOperations) { + sharedData.emptyCacheBetweenOperations = 'emptyCacheBetweenOperations' in options ? + options.emptyCacheBetweenOperations : false; + } + + + // Install the error reformatter + if (!sharedData.errorPrepareStackTraceHook) { + const originalValue = Error.prepareStackTrace; + sharedData.errorPrepareStackTraceHook = { + enabled: true, + originalValue, + installedValue: undefined + }; + Error.prepareStackTrace = sharedData.errorPrepareStackTraceHook.installedValue = createPrepareStackTrace(sharedData.errorPrepareStackTraceHook); + } + + if (!sharedData.processEmitHook) { + var installHandler = 'handleUncaughtExceptions' in options ? + options.handleUncaughtExceptions : true; + + // Do not override 'uncaughtException' with our own handler in Node.js + // Worker threads. Workers pass the error to the main thread as an event, + // rather than printing something to stderr and exiting. + try { + // We need to use `dynamicRequire` because `require` on it's own will be optimized by WebPack/Browserify. + var worker_threads = dynamicRequire(module, 'worker_threads'); + if (worker_threads.isMainThread === false) { + installHandler = false; + } + } catch(e) {} + + // Provide the option to not install the uncaught exception handler. This is + // to support other uncaught exception handlers (in test frameworks, for + // example). If this handler is not installed and there are no other uncaught + // exception handlers, uncaught exceptions will be caught by node's built-in + // exception handler and the process will still be terminated. However, the + // generated JavaScript code will be shown above the stack trace instead of + // the original source code. + if (installHandler && hasGlobalProcessEventEmitter()) { + shimEmitUncaughtException(); + } + } +}; + +exports.uninstall = function() { + if(sharedData.processEmitHook) { + // Disable behavior + sharedData.processEmitHook.enabled = false; + // If possible, remove our hook function. May not be possible if subsequent third-party hooks have wrapped around us. + if(process.emit === sharedData.processEmitHook.installedValue) { + process.emit = sharedData.processEmitHook.originalValue; + } + sharedData.processEmitHook = undefined; + } + if(sharedData.errorPrepareStackTraceHook) { + // Disable behavior + sharedData.errorPrepareStackTraceHook.enabled = false; + // If possible or necessary, remove our hook function. + // In vanilla environments, prepareStackTrace is `undefined`. + // We cannot delegate to `undefined` the way we can to a function w/`.apply()`; our only option is to remove the function. + // If we are the *first* hook installed, and another was installed on top of us, we have no choice but to remove both. + if(Error.prepareStackTrace === sharedData.errorPrepareStackTraceHook.installedValue || typeof sharedData.errorPrepareStackTraceHook.originalValue !== 'function') { + Error.prepareStackTrace = sharedData.errorPrepareStackTraceHook.originalValue; + } + sharedData.errorPrepareStackTraceHook = undefined; + } + if (sharedData.moduleResolveFilenameHook) { + // Disable behavior + sharedData.moduleResolveFilenameHook.enabled = false; + // If possible, remove our hook function. May not be possible if subsequent third-party hooks have wrapped around us. + var Module = dynamicRequire(module, 'module'); + if(Module._resolveFilename === sharedData.moduleResolveFilenameHook.installedValue) { + Module._resolveFilename = sharedData.moduleResolveFilenameHook.originalValue; + } + sharedData.moduleResolveFilenameHook = undefined; + } + sharedData.onConflictingLibraryRedirectArr.length = 0; +} + +exports.resetRetrieveHandlers = function() { + sharedData.retrieveFileHandlers.length = 0; + sharedData.retrieveMapHandlers.length = 0; +} diff --git a/node_modules/@esbuild/darwin-arm64/README.md b/node_modules/@esbuild/darwin-arm64/README.md new file mode 100644 index 0000000..c2c0398 --- /dev/null +++ b/node_modules/@esbuild/darwin-arm64/README.md @@ -0,0 +1,3 @@ +# esbuild + +This is the macOS ARM 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details. diff --git a/node_modules/@esbuild/darwin-arm64/bin/esbuild b/node_modules/@esbuild/darwin-arm64/bin/esbuild new file mode 100755 index 0000000..d24f405 Binary files /dev/null and b/node_modules/@esbuild/darwin-arm64/bin/esbuild differ diff --git a/node_modules/@esbuild/darwin-arm64/package.json b/node_modules/@esbuild/darwin-arm64/package.json new file mode 100644 index 0000000..fe5d745 --- /dev/null +++ b/node_modules/@esbuild/darwin-arm64/package.json @@ -0,0 +1,20 @@ +{ + "name": "@esbuild/darwin-arm64", + "version": "0.24.2", + "description": "The macOS ARM 64-bit binary for esbuild, a JavaScript bundler.", + "repository": { + "type": "git", + "url": "git+https://github.com/evanw/esbuild.git" + }, + "license": "MIT", + "preferUnplugged": true, + "engines": { + "node": ">=18" + }, + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ] +} diff --git a/node_modules/@fastify/busboy/LICENSE b/node_modules/@fastify/busboy/LICENSE new file mode 100644 index 0000000..290762e --- /dev/null +++ b/node_modules/@fastify/busboy/LICENSE @@ -0,0 +1,19 @@ +Copyright Brian White. All rights reserved. + +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. \ No newline at end of file diff --git a/node_modules/@fastify/busboy/README.md b/node_modules/@fastify/busboy/README.md new file mode 100644 index 0000000..ece3cc8 --- /dev/null +++ b/node_modules/@fastify/busboy/README.md @@ -0,0 +1,271 @@ +# busboy + +
+ +[![Build Status](https://github.com/fastify/busboy/actions/workflows/ci.yml/badge.svg)](https://github.com/fastify/busboy/actions) +[![Coverage Status](https://coveralls.io/repos/fastify/busboy/badge.svg?branch=master)](https://coveralls.io/r/fastify/busboy?branch=master) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) +[![Security Responsible Disclosure](https://img.shields.io/badge/Security-Responsible%20Disclosure-yellow.svg)](https://github.com/fastify/.github/blob/main/SECURITY.md) + +
+ +
+ +[![NPM version](https://img.shields.io/npm/v/@fastify/busboy.svg?style=flat)](https://www.npmjs.com/package/@fastify/busboy) +[![NPM downloads](https://img.shields.io/npm/dm/@fastify/busboy.svg?style=flat)](https://www.npmjs.com/package/@fastify/busboy) + +
+ +Description +=========== + +A Node.js module for parsing incoming HTML form data. + +This is an officially supported fork by [fastify](https://github.com/fastify/) organization of the amazing library [originally created](https://github.com/mscdex/busboy) by Brian White, +aimed at addressing long-standing issues with it. + +Benchmark (Mean time for 500 Kb payload, 2000 cycles, 1000 cycle warmup): + +| Library | Version | Mean time in nanoseconds (less is better) | +|-----------------------|---------|-------------------------------------------| +| busboy | 0.3.1 | `340114` | +| @fastify/busboy | 1.0.0 | `270984` | + +[Changelog](https://github.com/fastify/busboy/blob/master/CHANGELOG.md) since busboy 0.31. + +Requirements +============ + +* [Node.js](http://nodejs.org/) 10+ + + +Install +======= + + npm i @fastify/busboy + + +Examples +======== + +* Parsing (multipart) with default options: + +```javascript +const http = require('node:http'); +const { inspect } = require('node:util'); +const Busboy = require('busboy'); + +http.createServer((req, res) => { + if (req.method === 'POST') { + const busboy = new Busboy({ headers: req.headers }); + busboy.on('file', (fieldname, file, filename, encoding, mimetype) => { + console.log(`File [${fieldname}]: filename: ${filename}, encoding: ${encoding}, mimetype: ${mimetype}`); + file.on('data', data => { + console.log(`File [${fieldname}] got ${data.length} bytes`); + }); + file.on('end', () => { + console.log(`File [${fieldname}] Finished`); + }); + }); + busboy.on('field', (fieldname, val, fieldnameTruncated, valTruncated, encoding, mimetype) => { + console.log(`Field [${fieldname}]: value: ${inspect(val)}`); + }); + busboy.on('finish', () => { + console.log('Done parsing form!'); + res.writeHead(303, { Connection: 'close', Location: '/' }); + res.end(); + }); + req.pipe(busboy); + } else if (req.method === 'GET') { + res.writeHead(200, { Connection: 'close' }); + res.end(` +
+
+
+ +
+ `); + } +}).listen(8000, () => { + console.log('Listening for requests'); +}); + +// Example output, using http://nodejs.org/images/ryan-speaker.jpg as the file: +// +// Listening for requests +// File [filefield]: filename: ryan-speaker.jpg, encoding: binary +// File [filefield] got 11971 bytes +// Field [textfield]: value: 'testing! :-)' +// File [filefield] Finished +// Done parsing form! +``` + +* Save all incoming files to disk: + +```javascript +const http = require('node:http'); +const path = require('node:path'); +const os = require('node:os'); +const fs = require('node:fs'); + +const Busboy = require('busboy'); + +http.createServer(function(req, res) { + if (req.method === 'POST') { + const busboy = new Busboy({ headers: req.headers }); + busboy.on('file', function(fieldname, file, filename, encoding, mimetype) { + var saveTo = path.join(os.tmpdir(), path.basename(fieldname)); + file.pipe(fs.createWriteStream(saveTo)); + }); + busboy.on('finish', function() { + res.writeHead(200, { 'Connection': 'close' }); + res.end("That's all folks!"); + }); + return req.pipe(busboy); + } + res.writeHead(404); + res.end(); +}).listen(8000, function() { + console.log('Listening for requests'); +}); +``` + +* Parsing (urlencoded) with default options: + +```javascript +const http = require('node:http'); +const { inspect } = require('node:util'); + +const Busboy = require('busboy'); + +http.createServer(function(req, res) { + if (req.method === 'POST') { + const busboy = new Busboy({ headers: req.headers }); + busboy.on('file', function(fieldname, file, filename, encoding, mimetype) { + console.log('File [' + fieldname + ']: filename: ' + filename); + file.on('data', function(data) { + console.log('File [' + fieldname + '] got ' + data.length + ' bytes'); + }); + file.on('end', function() { + console.log('File [' + fieldname + '] Finished'); + }); + }); + busboy.on('field', function(fieldname, val, fieldnameTruncated, valTruncated) { + console.log('Field [' + fieldname + ']: value: ' + inspect(val)); + }); + busboy.on('finish', function() { + console.log('Done parsing form!'); + res.writeHead(303, { Connection: 'close', Location: '/' }); + res.end(); + }); + req.pipe(busboy); + } else if (req.method === 'GET') { + res.writeHead(200, { Connection: 'close' }); + res.end('\ +
\ +
\ +
\ + Node.js rules!
\ + \ +
\ + '); + } +}).listen(8000, function() { + console.log('Listening for requests'); +}); + +// Example output: +// +// Listening for requests +// Field [textfield]: value: 'testing! :-)' +// Field [selectfield]: value: '9001' +// Field [checkfield]: value: 'on' +// Done parsing form! +``` + + +API +=== + +_Busboy_ is a _Writable_ stream + +Busboy (special) events +----------------------- + +* **file**(< _string_ >fieldname, < _ReadableStream_ >stream, < _string_ >filename, < _string_ >transferEncoding, < _string_ >mimeType) - Emitted for each new file form field found. `transferEncoding` contains the 'Content-Transfer-Encoding' value for the file stream. `mimeType` contains the 'Content-Type' value for the file stream. + * Note: if you listen for this event, you should always handle the `stream` no matter if you care about the file contents or not (e.g. you can simply just do `stream.resume();` if you want to discard the contents), otherwise the 'finish' event will never fire on the Busboy instance. However, if you don't care about **any** incoming files, you can simply not listen for the 'file' event at all and any/all files will be automatically and safely discarded (these discarded files do still count towards `files` and `parts` limits). + * If a configured file size limit was reached, `stream` will both have a boolean property `truncated` (best checked at the end of the stream) and emit a 'limit' event to notify you when this happens. + * The property `bytesRead` informs about the number of bytes that have been read so far. + +* **field**(< _string_ >fieldname, < _string_ >value, < _boolean_ >fieldnameTruncated, < _boolean_ >valueTruncated, < _string_ >transferEncoding, < _string_ >mimeType) - Emitted for each new non-file field found. + +* **partsLimit**() - Emitted when specified `parts` limit has been reached. No more 'file' or 'field' events will be emitted. + +* **filesLimit**() - Emitted when specified `files` limit has been reached. No more 'file' events will be emitted. + +* **fieldsLimit**() - Emitted when specified `fields` limit has been reached. No more 'field' events will be emitted. + + +Busboy methods +-------------- + +* **(constructor)**(< _object_ >config) - Creates and returns a new Busboy instance. + + * The constructor takes the following valid `config` settings: + + * **headers** - _object_ - These are the HTTP headers of the incoming request, which are used by individual parsers. + + * **autoDestroy** - _boolean_ - Whether this stream should automatically call .destroy() on itself after ending. (Default: false). + + * **highWaterMark** - _integer_ - highWaterMark to use for this Busboy instance (Default: WritableStream default). + + * **fileHwm** - _integer_ - highWaterMark to use for file streams (Default: ReadableStream default). + + * **defCharset** - _string_ - Default character set to use when one isn't defined (Default: 'utf8'). + + * **preservePath** - _boolean_ - If paths in the multipart 'filename' field shall be preserved. (Default: false). + + * **isPartAFile** - __function__ - Use this function to override the default file detection functionality. It has following parameters: + + * fieldName - __string__ The name of the field. + + * contentType - __string__ The content-type of the part, e.g. `text/plain`, `image/jpeg`, `application/octet-stream` + + * fileName - __string__ The name of a file supplied by the part. + + (Default: `(fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined)`) + + * **limits** - _object_ - Various limits on incoming data. Valid properties are: + + * **fieldNameSize** - _integer_ - Max field name size (in bytes) (Default: 100 bytes). + + * **fieldSize** - _integer_ - Max field value size (in bytes) (Default: 1 MiB, which is 1024 x 1024 bytes). + + * **fields** - _integer_ - Max number of non-file fields (Default: Infinity). + + * **fileSize** - _integer_ - For multipart forms, the max file size (in bytes) (Default: Infinity). + + * **files** - _integer_ - For multipart forms, the max number of file fields (Default: Infinity). + + * **parts** - _integer_ - For multipart forms, the max number of parts (fields + files) (Default: Infinity). + + * **headerPairs** - _integer_ - For multipart forms, the max number of header key=>value pairs to parse **Default:** 2000 + + * **headerSize** - _integer_ - For multipart forms, the max size of a multipart header **Default:** 81920. + + * The constructor can throw errors: + + * **Busboy expected an options-Object.** - Busboy expected an Object as first parameters. + + * **Busboy expected an options-Object with headers-attribute.** - The first parameter is lacking of a headers-attribute. + + * **Limit $limit is not a valid number** - Busboy expected the desired limit to be of type number. Busboy throws this Error to prevent a potential security issue by falling silently back to the Busboy-defaults. Potential source for this Error can be the direct use of environment variables without transforming them to the type number. + + * **Unsupported Content-Type.** - The `Content-Type` isn't one Busboy can parse. + + * **Missing Content-Type-header.** - The provided headers don't include `Content-Type` at all. diff --git a/node_modules/@fastify/busboy/deps/dicer/LICENSE b/node_modules/@fastify/busboy/deps/dicer/LICENSE new file mode 100644 index 0000000..290762e --- /dev/null +++ b/node_modules/@fastify/busboy/deps/dicer/LICENSE @@ -0,0 +1,19 @@ +Copyright Brian White. All rights reserved. + +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. \ No newline at end of file diff --git a/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js b/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js new file mode 100644 index 0000000..3c8c081 --- /dev/null +++ b/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js @@ -0,0 +1,213 @@ +'use strict' + +const WritableStream = require('node:stream').Writable +const inherits = require('node:util').inherits + +const StreamSearch = require('../../streamsearch/sbmh') + +const PartStream = require('./PartStream') +const HeaderParser = require('./HeaderParser') + +const DASH = 45 +const B_ONEDASH = Buffer.from('-') +const B_CRLF = Buffer.from('\r\n') +const EMPTY_FN = function () {} + +function Dicer (cfg) { + if (!(this instanceof Dicer)) { return new Dicer(cfg) } + WritableStream.call(this, cfg) + + if (!cfg || (!cfg.headerFirst && typeof cfg.boundary !== 'string')) { throw new TypeError('Boundary required') } + + if (typeof cfg.boundary === 'string') { this.setBoundary(cfg.boundary) } else { this._bparser = undefined } + + this._headerFirst = cfg.headerFirst + + this._dashes = 0 + this._parts = 0 + this._finished = false + this._realFinish = false + this._isPreamble = true + this._justMatched = false + this._firstWrite = true + this._inHeader = true + this._part = undefined + this._cb = undefined + this._ignoreData = false + this._partOpts = { highWaterMark: cfg.partHwm } + this._pause = false + + const self = this + this._hparser = new HeaderParser(cfg) + this._hparser.on('header', function (header) { + self._inHeader = false + self._part.emit('header', header) + }) +} +inherits(Dicer, WritableStream) + +Dicer.prototype.emit = function (ev) { + if (ev === 'finish' && !this._realFinish) { + if (!this._finished) { + const self = this + process.nextTick(function () { + self.emit('error', new Error('Unexpected end of multipart data')) + if (self._part && !self._ignoreData) { + const type = (self._isPreamble ? 'Preamble' : 'Part') + self._part.emit('error', new Error(type + ' terminated early due to unexpected end of multipart data')) + self._part.push(null) + process.nextTick(function () { + self._realFinish = true + self.emit('finish') + self._realFinish = false + }) + return + } + self._realFinish = true + self.emit('finish') + self._realFinish = false + }) + } + } else { WritableStream.prototype.emit.apply(this, arguments) } +} + +Dicer.prototype._write = function (data, encoding, cb) { + // ignore unexpected data (e.g. extra trailer data after finished) + if (!this._hparser && !this._bparser) { return cb() } + + if (this._headerFirst && this._isPreamble) { + if (!this._part) { + this._part = new PartStream(this._partOpts) + if (this.listenerCount('preamble') !== 0) { this.emit('preamble', this._part) } else { this._ignore() } + } + const r = this._hparser.push(data) + if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() } + } + + // allows for "easier" testing + if (this._firstWrite) { + this._bparser.push(B_CRLF) + this._firstWrite = false + } + + this._bparser.push(data) + + if (this._pause) { this._cb = cb } else { cb() } +} + +Dicer.prototype.reset = function () { + this._part = undefined + this._bparser = undefined + this._hparser = undefined +} + +Dicer.prototype.setBoundary = function (boundary) { + const self = this + this._bparser = new StreamSearch('\r\n--' + boundary) + this._bparser.on('info', function (isMatch, data, start, end) { + self._oninfo(isMatch, data, start, end) + }) +} + +Dicer.prototype._ignore = function () { + if (this._part && !this._ignoreData) { + this._ignoreData = true + this._part.on('error', EMPTY_FN) + // we must perform some kind of read on the stream even though we are + // ignoring the data, otherwise node's Readable stream will not emit 'end' + // after pushing null to the stream + this._part.resume() + } +} + +Dicer.prototype._oninfo = function (isMatch, data, start, end) { + let buf; const self = this; let i = 0; let r; let shouldWriteMore = true + + if (!this._part && this._justMatched && data) { + while (this._dashes < 2 && (start + i) < end) { + if (data[start + i] === DASH) { + ++i + ++this._dashes + } else { + if (this._dashes) { buf = B_ONEDASH } + this._dashes = 0 + break + } + } + if (this._dashes === 2) { + if ((start + i) < end && this.listenerCount('trailer') !== 0) { this.emit('trailer', data.slice(start + i, end)) } + this.reset() + this._finished = true + // no more parts will be added + if (self._parts === 0) { + self._realFinish = true + self.emit('finish') + self._realFinish = false + } + } + if (this._dashes) { return } + } + if (this._justMatched) { this._justMatched = false } + if (!this._part) { + this._part = new PartStream(this._partOpts) + this._part._read = function (n) { + self._unpause() + } + if (this._isPreamble && this.listenerCount('preamble') !== 0) { + this.emit('preamble', this._part) + } else if (this._isPreamble !== true && this.listenerCount('part') !== 0) { + this.emit('part', this._part) + } else { + this._ignore() + } + if (!this._isPreamble) { this._inHeader = true } + } + if (data && start < end && !this._ignoreData) { + if (this._isPreamble || !this._inHeader) { + if (buf) { shouldWriteMore = this._part.push(buf) } + shouldWriteMore = this._part.push(data.slice(start, end)) + if (!shouldWriteMore) { this._pause = true } + } else if (!this._isPreamble && this._inHeader) { + if (buf) { this._hparser.push(buf) } + r = this._hparser.push(data.slice(start, end)) + if (!this._inHeader && r !== undefined && r < end) { this._oninfo(false, data, start + r, end) } + } + } + if (isMatch) { + this._hparser.reset() + if (this._isPreamble) { this._isPreamble = false } else { + if (start !== end) { + ++this._parts + this._part.on('end', function () { + if (--self._parts === 0) { + if (self._finished) { + self._realFinish = true + self.emit('finish') + self._realFinish = false + } else { + self._unpause() + } + } + }) + } + } + this._part.push(null) + this._part = undefined + this._ignoreData = false + this._justMatched = true + this._dashes = 0 + } +} + +Dicer.prototype._unpause = function () { + if (!this._pause) { return } + + this._pause = false + if (this._cb) { + const cb = this._cb + this._cb = undefined + cb() + } +} + +module.exports = Dicer diff --git a/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js b/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js new file mode 100644 index 0000000..65f667b --- /dev/null +++ b/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js @@ -0,0 +1,100 @@ +'use strict' + +const EventEmitter = require('node:events').EventEmitter +const inherits = require('node:util').inherits +const getLimit = require('../../../lib/utils/getLimit') + +const StreamSearch = require('../../streamsearch/sbmh') + +const B_DCRLF = Buffer.from('\r\n\r\n') +const RE_CRLF = /\r\n/g +const RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/ // eslint-disable-line no-control-regex + +function HeaderParser (cfg) { + EventEmitter.call(this) + + cfg = cfg || {} + const self = this + this.nread = 0 + this.maxed = false + this.npairs = 0 + this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000) + this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024) + this.buffer = '' + this.header = {} + this.finished = false + this.ss = new StreamSearch(B_DCRLF) + this.ss.on('info', function (isMatch, data, start, end) { + if (data && !self.maxed) { + if (self.nread + end - start >= self.maxHeaderSize) { + end = self.maxHeaderSize - self.nread + start + self.nread = self.maxHeaderSize + self.maxed = true + } else { self.nread += (end - start) } + + self.buffer += data.toString('binary', start, end) + } + if (isMatch) { self._finish() } + }) +} +inherits(HeaderParser, EventEmitter) + +HeaderParser.prototype.push = function (data) { + const r = this.ss.push(data) + if (this.finished) { return r } +} + +HeaderParser.prototype.reset = function () { + this.finished = false + this.buffer = '' + this.header = {} + this.ss.reset() +} + +HeaderParser.prototype._finish = function () { + if (this.buffer) { this._parseHeader() } + this.ss.matches = this.ss.maxMatches + const header = this.header + this.header = {} + this.buffer = '' + this.finished = true + this.nread = this.npairs = 0 + this.maxed = false + this.emit('header', header) +} + +HeaderParser.prototype._parseHeader = function () { + if (this.npairs === this.maxHeaderPairs) { return } + + const lines = this.buffer.split(RE_CRLF) + const len = lines.length + let m, h + + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var + if (lines[i].length === 0) { continue } + if (lines[i][0] === '\t' || lines[i][0] === ' ') { + // folded header content + // RFC2822 says to just remove the CRLF and not the whitespace following + // it, so we follow the RFC and include the leading whitespace ... + if (h) { + this.header[h][this.header[h].length - 1] += lines[i] + continue + } + } + + const posColon = lines[i].indexOf(':') + if ( + posColon === -1 || + posColon === 0 + ) { + return + } + m = RE_HDR.exec(lines[i]) + h = m[1].toLowerCase() + this.header[h] = this.header[h] || [] + this.header[h].push((m[2] || '')) + if (++this.npairs === this.maxHeaderPairs) { break } + } +} + +module.exports = HeaderParser diff --git a/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js b/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js new file mode 100644 index 0000000..c91da1c --- /dev/null +++ b/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js @@ -0,0 +1,13 @@ +'use strict' + +const inherits = require('node:util').inherits +const ReadableStream = require('node:stream').Readable + +function PartStream (opts) { + ReadableStream.call(this, opts) +} +inherits(PartStream, ReadableStream) + +PartStream.prototype._read = function (n) {} + +module.exports = PartStream diff --git a/node_modules/@fastify/busboy/deps/dicer/lib/dicer.d.ts b/node_modules/@fastify/busboy/deps/dicer/lib/dicer.d.ts new file mode 100644 index 0000000..3c5b896 --- /dev/null +++ b/node_modules/@fastify/busboy/deps/dicer/lib/dicer.d.ts @@ -0,0 +1,164 @@ +// Type definitions for dicer 0.2 +// Project: https://github.com/mscdex/dicer +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 +/// + +import stream = require("stream"); + +// tslint:disable:unified-signatures + +/** + * A very fast streaming multipart parser for node.js. + * Dicer is a WritableStream + * + * Dicer (special) events: + * - on('finish', ()) - Emitted when all parts have been parsed and the Dicer instance has been ended. + * - on('part', (stream: PartStream)) - Emitted when a new part has been found. + * - on('preamble', (stream: PartStream)) - Emitted for preamble if you should happen to need it (can usually be ignored). + * - on('trailer', (data: Buffer)) - Emitted when trailing data was found after the terminating boundary (as with the preamble, this can usually be ignored too). + */ +export class Dicer extends stream.Writable { + /** + * Creates and returns a new Dicer instance with the following valid config settings: + * + * @param config The configuration to use + */ + constructor(config: Dicer.Config); + /** + * Sets the boundary to use for parsing and performs some initialization needed for parsing. + * You should only need to use this if you set headerFirst to true in the constructor and are parsing the boundary from the preamble header. + * + * @param boundary The boundary to use + */ + setBoundary(boundary: string): void; + addListener(event: "finish", listener: () => void): this; + addListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; + addListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + addListener(event: "trailer", listener: (data: Buffer) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "pipe", listener: (src: stream.Readable) => void): this; + addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + addListener(event: string, listener: (...args: any[]) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "part", listener: (stream: Dicer.PartStream) => void): this; + on(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + on(event: "trailer", listener: (data: Buffer) => void): this; + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "pipe", listener: (src: stream.Readable) => void): this; + on(event: "unpipe", listener: (src: stream.Readable) => void): this; + on(event: string, listener: (...args: any[]) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "part", listener: (stream: Dicer.PartStream) => void): this; + once(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + once(event: "trailer", listener: (data: Buffer) => void): this; + once(event: "close", listener: () => void): this; + once(event: "drain", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "pipe", listener: (src: stream.Readable) => void): this; + once(event: "unpipe", listener: (src: stream.Readable) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; + prependListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + prependListener(event: "trailer", listener: (data: Buffer) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; + prependOnceListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + prependOnceListener(event: "trailer", listener: (data: Buffer) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + removeListener(event: "finish", listener: () => void): this; + removeListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; + removeListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + removeListener(event: "trailer", listener: (data: Buffer) => void): this; + removeListener(event: "close", listener: () => void): this; + removeListener(event: "drain", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: "pipe", listener: (src: stream.Readable) => void): this; + removeListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + removeListener(event: string, listener: (...args: any[]) => void): this; +} + +declare namespace Dicer { + interface Config { + /** + * This is the boundary used to detect the beginning of a new part. + */ + boundary?: string | undefined; + /** + * If true, preamble header parsing will be performed first. + */ + headerFirst?: boolean | undefined; + /** + * The maximum number of header key=>value pairs to parse Default: 2000 (same as node's http). + */ + maxHeaderPairs?: number | undefined; + } + + /** + * PartStream is a _ReadableStream_ + * + * PartStream (special) events: + * - on('header', (header: object)) - An object containing the header for this particular part. Each property value is an array of one or more string values. + */ + interface PartStream extends stream.Readable { + addListener(event: "header", listener: (header: object) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "readable", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: string, listener: (...args: any[]) => void): this; + on(event: "header", listener: (header: object) => void): this; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "end", listener: () => void): this; + on(event: "readable", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: string, listener: (...args: any[]) => void): this; + once(event: "header", listener: (header: object) => void): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "end", listener: () => void): this; + once(event: "readable", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "header", listener: (header: object) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "readable", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "header", listener: (header: object) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "readable", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + removeListener(event: "header", listener: (header: object) => void): this; + removeListener(event: "close", listener: () => void): this; + removeListener(event: "data", listener: (chunk: Buffer | string) => void): this; + removeListener(event: "end", listener: () => void): this; + removeListener(event: "readable", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: string, listener: (...args: any[]) => void): this; + } +} \ No newline at end of file diff --git a/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js b/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js new file mode 100644 index 0000000..b90c0e8 --- /dev/null +++ b/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js @@ -0,0 +1,228 @@ +'use strict' + +/** + * Copyright Brian White. All rights reserved. + * + * @see https://github.com/mscdex/streamsearch + * + * 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. + * + * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation + * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool + */ +const EventEmitter = require('node:events').EventEmitter +const inherits = require('node:util').inherits + +function SBMH (needle) { + if (typeof needle === 'string') { + needle = Buffer.from(needle) + } + + if (!Buffer.isBuffer(needle)) { + throw new TypeError('The needle has to be a String or a Buffer.') + } + + const needleLength = needle.length + + if (needleLength === 0) { + throw new Error('The needle cannot be an empty String/Buffer.') + } + + if (needleLength > 256) { + throw new Error('The needle cannot have a length bigger than 256.') + } + + this.maxMatches = Infinity + this.matches = 0 + + this._occ = new Array(256) + .fill(needleLength) // Initialize occurrence table. + this._lookbehind_size = 0 + this._needle = needle + this._bufpos = 0 + + this._lookbehind = Buffer.alloc(needleLength) + + // Populate occurrence table with analysis of the needle, + // ignoring last letter. + for (var i = 0; i < needleLength - 1; ++i) { // eslint-disable-line no-var + this._occ[needle[i]] = needleLength - 1 - i + } +} +inherits(SBMH, EventEmitter) + +SBMH.prototype.reset = function () { + this._lookbehind_size = 0 + this.matches = 0 + this._bufpos = 0 +} + +SBMH.prototype.push = function (chunk, pos) { + if (!Buffer.isBuffer(chunk)) { + chunk = Buffer.from(chunk, 'binary') + } + const chlen = chunk.length + this._bufpos = pos || 0 + let r + while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk) } + return r +} + +SBMH.prototype._sbmh_feed = function (data) { + const len = data.length + const needle = this._needle + const needleLength = needle.length + const lastNeedleChar = needle[needleLength - 1] + + // Positive: points to a position in `data` + // pos == 3 points to data[3] + // Negative: points to a position in the lookbehind buffer + // pos == -2 points to lookbehind[lookbehind_size - 2] + let pos = -this._lookbehind_size + let ch + + if (pos < 0) { + // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool + // search with character lookup code that considers both the + // lookbehind buffer and the current round's haystack data. + // + // Loop until + // there is a match. + // or until + // we've moved past the position that requires the + // lookbehind buffer. In this case we switch to the + // optimized loop. + // or until + // the character to look at lies outside the haystack. + while (pos < 0 && pos <= len - needleLength) { + ch = this._sbmh_lookup_char(data, pos + needleLength - 1) + + if ( + ch === lastNeedleChar && + this._sbmh_memcmp(data, pos, needleLength - 1) + ) { + this._lookbehind_size = 0 + ++this.matches + this.emit('info', true) + + return (this._bufpos = pos + needleLength) + } + pos += this._occ[ch] + } + + // No match. + + if (pos < 0) { + // There's too few data for Boyer-Moore-Horspool to run, + // so let's use a different algorithm to skip as much as + // we can. + // Forward pos until + // the trailing part of lookbehind + data + // looks like the beginning of the needle + // or until + // pos == 0 + while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { ++pos } + } + + if (pos >= 0) { + // Discard lookbehind buffer. + this.emit('info', false, this._lookbehind, 0, this._lookbehind_size) + this._lookbehind_size = 0 + } else { + // Cut off part of the lookbehind buffer that has + // been processed and append the entire haystack + // into it. + const bytesToCutOff = this._lookbehind_size + pos + if (bytesToCutOff > 0) { + // The cut off data is guaranteed not to contain the needle. + this.emit('info', false, this._lookbehind, 0, bytesToCutOff) + } + + this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff, + this._lookbehind_size - bytesToCutOff) + this._lookbehind_size -= bytesToCutOff + + data.copy(this._lookbehind, this._lookbehind_size) + this._lookbehind_size += len + + this._bufpos = len + return len + } + } + + pos += (pos >= 0) * this._bufpos + + // Lookbehind buffer is now empty. We only need to check if the + // needle is in the haystack. + if (data.indexOf(needle, pos) !== -1) { + pos = data.indexOf(needle, pos) + ++this.matches + if (pos > 0) { this.emit('info', true, data, this._bufpos, pos) } else { this.emit('info', true) } + + return (this._bufpos = pos + needleLength) + } else { + pos = len - needleLength + } + + // There was no match. If there's trailing haystack data that we cannot + // match yet using the Boyer-Moore-Horspool algorithm (because the trailing + // data is less than the needle size) then match using a modified + // algorithm that starts matching from the beginning instead of the end. + // Whatever trailing data is left after running this algorithm is added to + // the lookbehind buffer. + while ( + pos < len && + ( + data[pos] !== needle[0] || + ( + (Buffer.compare( + data.subarray(pos, pos + len - pos), + needle.subarray(0, len - pos) + ) !== 0) + ) + ) + ) { + ++pos + } + if (pos < len) { + data.copy(this._lookbehind, 0, pos, pos + (len - pos)) + this._lookbehind_size = len - pos + } + + // Everything until pos is guaranteed not to contain needle data. + if (pos > 0) { this.emit('info', false, data, this._bufpos, pos < len ? pos : len) } + + this._bufpos = len + return len +} + +SBMH.prototype._sbmh_lookup_char = function (data, pos) { + return (pos < 0) + ? this._lookbehind[this._lookbehind_size + pos] + : data[pos] +} + +SBMH.prototype._sbmh_memcmp = function (data, pos, len) { + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var + if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false } + } + return true +} + +module.exports = SBMH diff --git a/node_modules/@fastify/busboy/lib/main.d.ts b/node_modules/@fastify/busboy/lib/main.d.ts new file mode 100644 index 0000000..91b6448 --- /dev/null +++ b/node_modules/@fastify/busboy/lib/main.d.ts @@ -0,0 +1,196 @@ +// Definitions by: Jacob Baskin +// BendingBender +// Igor Savin + +/// + +import * as http from 'http'; +import { Readable, Writable } from 'stream'; +export { Dicer } from "../deps/dicer/lib/dicer"; + +export const Busboy: BusboyConstructor; +export default Busboy; + +export interface BusboyConfig { + /** + * These are the HTTP headers of the incoming request, which are used by individual parsers. + */ + headers: BusboyHeaders; + /** + * `highWaterMark` to use for this Busboy instance. + * @default WritableStream default. + */ + highWaterMark?: number | undefined; + /** + * highWaterMark to use for file streams. + * @default ReadableStream default. + */ + fileHwm?: number | undefined; + /** + * Default character set to use when one isn't defined. + * @default 'utf8' + */ + defCharset?: string | undefined; + /** + * Detect if a Part is a file. + * + * By default a file is detected if contentType + * is application/octet-stream or fileName is not + * undefined. + * + * Modify this to handle e.g. Blobs. + */ + isPartAFile?: (fieldName: string | undefined, contentType: string | undefined, fileName: string | undefined) => boolean; + /** + * If paths in the multipart 'filename' field shall be preserved. + * @default false + */ + preservePath?: boolean | undefined; + /** + * Various limits on incoming data. + */ + limits?: + | { + /** + * Max field name size (in bytes) + * @default 100 bytes + */ + fieldNameSize?: number | undefined; + /** + * Max field value size (in bytes) + * @default 1MB + */ + fieldSize?: number | undefined; + /** + * Max number of non-file fields + * @default Infinity + */ + fields?: number | undefined; + /** + * For multipart forms, the max file size (in bytes) + * @default Infinity + */ + fileSize?: number | undefined; + /** + * For multipart forms, the max number of file fields + * @default Infinity + */ + files?: number | undefined; + /** + * For multipart forms, the max number of parts (fields + files) + * @default Infinity + */ + parts?: number | undefined; + /** + * For multipart forms, the max number of header key=>value pairs to parse + * @default 2000 + */ + headerPairs?: number | undefined; + + /** + * For multipart forms, the max size of a header part + * @default 81920 + */ + headerSize?: number | undefined; + } + | undefined; +} + +export type BusboyHeaders = { 'content-type': string } & http.IncomingHttpHeaders; + +export interface BusboyFileStream extends + Readable { + + truncated: boolean; + + /** + * The number of bytes that have been read so far. + */ + bytesRead: number; +} + +export interface Busboy extends Writable { + addListener(event: Event, listener: BusboyEvents[Event]): this; + + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + on(event: Event, listener: BusboyEvents[Event]): this; + + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: Event, listener: BusboyEvents[Event]): this; + + once(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener(event: Event, listener: BusboyEvents[Event]): this; + + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + + off(event: Event, listener: BusboyEvents[Event]): this; + + off(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: Event, listener: BusboyEvents[Event]): this; + + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: Event, listener: BusboyEvents[Event]): this; + + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; +} + +export interface BusboyEvents { + /** + * Emitted for each new file form field found. + * + * * Note: if you listen for this event, you should always handle the `stream` no matter if you care about the + * file contents or not (e.g. you can simply just do `stream.resume();` if you want to discard the contents), + * otherwise the 'finish' event will never fire on the Busboy instance. However, if you don't care about **any** + * incoming files, you can simply not listen for the 'file' event at all and any/all files will be automatically + * and safely discarded (these discarded files do still count towards `files` and `parts` limits). + * * If a configured file size limit was reached, `stream` will both have a boolean property `truncated` + * (best checked at the end of the stream) and emit a 'limit' event to notify you when this happens. + * + * @param listener.transferEncoding Contains the 'Content-Transfer-Encoding' value for the file stream. + * @param listener.mimeType Contains the 'Content-Type' value for the file stream. + */ + file: ( + fieldname: string, + stream: BusboyFileStream, + filename: string, + transferEncoding: string, + mimeType: string, + ) => void; + /** + * Emitted for each new non-file field found. + */ + field: ( + fieldname: string, + value: string, + fieldnameTruncated: boolean, + valueTruncated: boolean, + transferEncoding: string, + mimeType: string, + ) => void; + finish: () => void; + /** + * Emitted when specified `parts` limit has been reached. No more 'file' or 'field' events will be emitted. + */ + partsLimit: () => void; + /** + * Emitted when specified `files` limit has been reached. No more 'file' events will be emitted. + */ + filesLimit: () => void; + /** + * Emitted when specified `fields` limit has been reached. No more 'field' events will be emitted. + */ + fieldsLimit: () => void; + error: (error: unknown) => void; +} + +export interface BusboyConstructor { + (options: BusboyConfig): Busboy; + + new(options: BusboyConfig): Busboy; +} + diff --git a/node_modules/@fastify/busboy/lib/main.js b/node_modules/@fastify/busboy/lib/main.js new file mode 100644 index 0000000..8794beb --- /dev/null +++ b/node_modules/@fastify/busboy/lib/main.js @@ -0,0 +1,85 @@ +'use strict' + +const WritableStream = require('node:stream').Writable +const { inherits } = require('node:util') +const Dicer = require('../deps/dicer/lib/Dicer') + +const MultipartParser = require('./types/multipart') +const UrlencodedParser = require('./types/urlencoded') +const parseParams = require('./utils/parseParams') + +function Busboy (opts) { + if (!(this instanceof Busboy)) { return new Busboy(opts) } + + if (typeof opts !== 'object') { + throw new TypeError('Busboy expected an options-Object.') + } + if (typeof opts.headers !== 'object') { + throw new TypeError('Busboy expected an options-Object with headers-attribute.') + } + if (typeof opts.headers['content-type'] !== 'string') { + throw new TypeError('Missing Content-Type-header.') + } + + const { + headers, + ...streamOptions + } = opts + + this.opts = { + autoDestroy: false, + ...streamOptions + } + WritableStream.call(this, this.opts) + + this._done = false + this._parser = this.getParserByHeaders(headers) + this._finished = false +} +inherits(Busboy, WritableStream) + +Busboy.prototype.emit = function (ev) { + if (ev === 'finish') { + if (!this._done) { + this._parser?.end() + return + } else if (this._finished) { + return + } + this._finished = true + } + WritableStream.prototype.emit.apply(this, arguments) +} + +Busboy.prototype.getParserByHeaders = function (headers) { + const parsed = parseParams(headers['content-type']) + + const cfg = { + defCharset: this.opts.defCharset, + fileHwm: this.opts.fileHwm, + headers, + highWaterMark: this.opts.highWaterMark, + isPartAFile: this.opts.isPartAFile, + limits: this.opts.limits, + parsedConType: parsed, + preservePath: this.opts.preservePath + } + + if (MultipartParser.detect.test(parsed[0])) { + return new MultipartParser(this, cfg) + } + if (UrlencodedParser.detect.test(parsed[0])) { + return new UrlencodedParser(this, cfg) + } + throw new Error('Unsupported Content-Type.') +} + +Busboy.prototype._write = function (chunk, encoding, cb) { + this._parser.write(chunk, cb) +} + +module.exports = Busboy +module.exports.default = Busboy +module.exports.Busboy = Busboy + +module.exports.Dicer = Dicer diff --git a/node_modules/@fastify/busboy/lib/types/multipart.js b/node_modules/@fastify/busboy/lib/types/multipart.js new file mode 100644 index 0000000..d691eca --- /dev/null +++ b/node_modules/@fastify/busboy/lib/types/multipart.js @@ -0,0 +1,306 @@ +'use strict' + +// TODO: +// * support 1 nested multipart level +// (see second multipart example here: +// http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data) +// * support limits.fieldNameSize +// -- this will require modifications to utils.parseParams + +const { Readable } = require('node:stream') +const { inherits } = require('node:util') + +const Dicer = require('../../deps/dicer/lib/Dicer') + +const parseParams = require('../utils/parseParams') +const decodeText = require('../utils/decodeText') +const basename = require('../utils/basename') +const getLimit = require('../utils/getLimit') + +const RE_BOUNDARY = /^boundary$/i +const RE_FIELD = /^form-data$/i +const RE_CHARSET = /^charset$/i +const RE_FILENAME = /^filename$/i +const RE_NAME = /^name$/i + +Multipart.detect = /^multipart\/form-data/i +function Multipart (boy, cfg) { + let i + let len + const self = this + let boundary + const limits = cfg.limits + const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined)) + const parsedConType = cfg.parsedConType || [] + const defCharset = cfg.defCharset || 'utf8' + const preservePath = cfg.preservePath + const fileOpts = { highWaterMark: cfg.fileHwm } + + for (i = 0, len = parsedConType.length; i < len; ++i) { + if (Array.isArray(parsedConType[i]) && + RE_BOUNDARY.test(parsedConType[i][0])) { + boundary = parsedConType[i][1] + break + } + } + + function checkFinished () { + if (nends === 0 && finished && !boy._done) { + finished = false + self.end() + } + } + + if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') } + + const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) + const fileSizeLimit = getLimit(limits, 'fileSize', Infinity) + const filesLimit = getLimit(limits, 'files', Infinity) + const fieldsLimit = getLimit(limits, 'fields', Infinity) + const partsLimit = getLimit(limits, 'parts', Infinity) + const headerPairsLimit = getLimit(limits, 'headerPairs', 2000) + const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024) + + let nfiles = 0 + let nfields = 0 + let nends = 0 + let curFile + let curField + let finished = false + + this._needDrain = false + this._pause = false + this._cb = undefined + this._nparts = 0 + this._boy = boy + + const parserCfg = { + boundary, + maxHeaderPairs: headerPairsLimit, + maxHeaderSize: headerSizeLimit, + partHwm: fileOpts.highWaterMark, + highWaterMark: cfg.highWaterMark + } + + this.parser = new Dicer(parserCfg) + this.parser.on('drain', function () { + self._needDrain = false + if (self._cb && !self._pause) { + const cb = self._cb + self._cb = undefined + cb() + } + }).on('part', function onPart (part) { + if (++self._nparts > partsLimit) { + self.parser.removeListener('part', onPart) + self.parser.on('part', skipPart) + boy.hitPartsLimit = true + boy.emit('partsLimit') + return skipPart(part) + } + + // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let + // us emit 'end' early since we know the part has ended if we are already + // seeing the next part + if (curField) { + const field = curField + field.emit('end') + field.removeAllListeners('end') + } + + part.on('header', function (header) { + let contype + let fieldname + let parsed + let charset + let encoding + let filename + let nsize = 0 + + if (header['content-type']) { + parsed = parseParams(header['content-type'][0]) + if (parsed[0]) { + contype = parsed[0].toLowerCase() + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_CHARSET.test(parsed[i][0])) { + charset = parsed[i][1].toLowerCase() + break + } + } + } + } + + if (contype === undefined) { contype = 'text/plain' } + if (charset === undefined) { charset = defCharset } + + if (header['content-disposition']) { + parsed = parseParams(header['content-disposition'][0]) + if (!RE_FIELD.test(parsed[0])) { return skipPart(part) } + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_NAME.test(parsed[i][0])) { + fieldname = parsed[i][1] + } else if (RE_FILENAME.test(parsed[i][0])) { + filename = parsed[i][1] + if (!preservePath) { filename = basename(filename) } + } + } + } else { return skipPart(part) } + + if (header['content-transfer-encoding']) { encoding = header['content-transfer-encoding'][0].toLowerCase() } else { encoding = '7bit' } + + let onData, + onEnd + + if (isPartAFile(fieldname, contype, filename)) { + // file/binary field + if (nfiles === filesLimit) { + if (!boy.hitFilesLimit) { + boy.hitFilesLimit = true + boy.emit('filesLimit') + } + return skipPart(part) + } + + ++nfiles + + if (boy.listenerCount('file') === 0) { + self.parser._ignore() + return + } + + ++nends + const file = new FileStream(fileOpts) + curFile = file + file.on('end', function () { + --nends + self._pause = false + checkFinished() + if (self._cb && !self._needDrain) { + const cb = self._cb + self._cb = undefined + cb() + } + }) + file._read = function (n) { + if (!self._pause) { return } + self._pause = false + if (self._cb && !self._needDrain) { + const cb = self._cb + self._cb = undefined + cb() + } + } + boy.emit('file', fieldname, file, filename, encoding, contype) + + onData = function (data) { + if ((nsize += data.length) > fileSizeLimit) { + const extralen = fileSizeLimit - nsize + data.length + if (extralen > 0) { file.push(data.slice(0, extralen)) } + file.truncated = true + file.bytesRead = fileSizeLimit + part.removeAllListeners('data') + file.emit('limit') + return + } else if (!file.push(data)) { self._pause = true } + + file.bytesRead = nsize + } + + onEnd = function () { + curFile = undefined + file.push(null) + } + } else { + // non-file field + if (nfields === fieldsLimit) { + if (!boy.hitFieldsLimit) { + boy.hitFieldsLimit = true + boy.emit('fieldsLimit') + } + return skipPart(part) + } + + ++nfields + ++nends + let buffer = '' + let truncated = false + curField = part + + onData = function (data) { + if ((nsize += data.length) > fieldSizeLimit) { + const extralen = (fieldSizeLimit - (nsize - data.length)) + buffer += data.toString('binary', 0, extralen) + truncated = true + part.removeAllListeners('data') + } else { buffer += data.toString('binary') } + } + + onEnd = function () { + curField = undefined + if (buffer.length) { buffer = decodeText(buffer, 'binary', charset) } + boy.emit('field', fieldname, buffer, false, truncated, encoding, contype) + --nends + checkFinished() + } + } + + /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become + broken. Streams2/streams3 is a huge black box of confusion, but + somehow overriding the sync state seems to fix things again (and still + seems to work for previous node versions). + */ + part._readableState.sync = false + + part.on('data', onData) + part.on('end', onEnd) + }).on('error', function (err) { + if (curFile) { curFile.emit('error', err) } + }) + }).on('error', function (err) { + boy.emit('error', err) + }).on('finish', function () { + finished = true + checkFinished() + }) +} + +Multipart.prototype.write = function (chunk, cb) { + const r = this.parser.write(chunk) + if (r && !this._pause) { + cb() + } else { + this._needDrain = !r + this._cb = cb + } +} + +Multipart.prototype.end = function () { + const self = this + + if (self.parser.writable) { + self.parser.end() + } else if (!self._boy._done) { + process.nextTick(function () { + self._boy._done = true + self._boy.emit('finish') + }) + } +} + +function skipPart (part) { + part.resume() +} + +function FileStream (opts) { + Readable.call(this, opts) + + this.bytesRead = 0 + + this.truncated = false +} + +inherits(FileStream, Readable) + +FileStream.prototype._read = function (n) {} + +module.exports = Multipart diff --git a/node_modules/@fastify/busboy/lib/types/urlencoded.js b/node_modules/@fastify/busboy/lib/types/urlencoded.js new file mode 100644 index 0000000..6f5f784 --- /dev/null +++ b/node_modules/@fastify/busboy/lib/types/urlencoded.js @@ -0,0 +1,190 @@ +'use strict' + +const Decoder = require('../utils/Decoder') +const decodeText = require('../utils/decodeText') +const getLimit = require('../utils/getLimit') + +const RE_CHARSET = /^charset$/i + +UrlEncoded.detect = /^application\/x-www-form-urlencoded/i +function UrlEncoded (boy, cfg) { + const limits = cfg.limits + const parsedConType = cfg.parsedConType + this.boy = boy + + this.fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) + this.fieldNameSizeLimit = getLimit(limits, 'fieldNameSize', 100) + this.fieldsLimit = getLimit(limits, 'fields', Infinity) + + let charset + for (var i = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var + if (Array.isArray(parsedConType[i]) && + RE_CHARSET.test(parsedConType[i][0])) { + charset = parsedConType[i][1].toLowerCase() + break + } + } + + if (charset === undefined) { charset = cfg.defCharset || 'utf8' } + + this.decoder = new Decoder() + this.charset = charset + this._fields = 0 + this._state = 'key' + this._checkingBytes = true + this._bytesKey = 0 + this._bytesVal = 0 + this._key = '' + this._val = '' + this._keyTrunc = false + this._valTrunc = false + this._hitLimit = false +} + +UrlEncoded.prototype.write = function (data, cb) { + if (this._fields === this.fieldsLimit) { + if (!this.boy.hitFieldsLimit) { + this.boy.hitFieldsLimit = true + this.boy.emit('fieldsLimit') + } + return cb() + } + + let idxeq; let idxamp; let i; let p = 0; const len = data.length + + while (p < len) { + if (this._state === 'key') { + idxeq = idxamp = undefined + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { ++p } + if (data[i] === 0x3D/* = */) { + idxeq = i + break + } else if (data[i] === 0x26/* & */) { + idxamp = i + break + } + if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { + this._hitLimit = true + break + } else if (this._checkingBytes) { ++this._bytesKey } + } + + if (idxeq !== undefined) { + // key with assignment + if (idxeq > p) { this._key += this.decoder.write(data.toString('binary', p, idxeq)) } + this._state = 'val' + + this._hitLimit = false + this._checkingBytes = true + this._val = '' + this._bytesVal = 0 + this._valTrunc = false + this.decoder.reset() + + p = idxeq + 1 + } else if (idxamp !== undefined) { + // key with no assignment + ++this._fields + let key; const keyTrunc = this._keyTrunc + if (idxamp > p) { key = (this._key += this.decoder.write(data.toString('binary', p, idxamp))) } else { key = this._key } + + this._hitLimit = false + this._checkingBytes = true + this._key = '' + this._bytesKey = 0 + this._keyTrunc = false + this.decoder.reset() + + if (key.length) { + this.boy.emit('field', decodeText(key, 'binary', this.charset), + '', + keyTrunc, + false) + } + + p = idxamp + 1 + if (this._fields === this.fieldsLimit) { return cb() } + } else if (this._hitLimit) { + // we may not have hit the actual limit if there are encoded bytes... + if (i > p) { this._key += this.decoder.write(data.toString('binary', p, i)) } + p = i + if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { + // yep, we actually did hit the limit + this._checkingBytes = false + this._keyTrunc = true + } + } else { + if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) } + p = len + } + } else { + idxamp = undefined + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { ++p } + if (data[i] === 0x26/* & */) { + idxamp = i + break + } + if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { + this._hitLimit = true + break + } else if (this._checkingBytes) { ++this._bytesVal } + } + + if (idxamp !== undefined) { + ++this._fields + if (idxamp > p) { this._val += this.decoder.write(data.toString('binary', p, idxamp)) } + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + decodeText(this._val, 'binary', this.charset), + this._keyTrunc, + this._valTrunc) + this._state = 'key' + + this._hitLimit = false + this._checkingBytes = true + this._key = '' + this._bytesKey = 0 + this._keyTrunc = false + this.decoder.reset() + + p = idxamp + 1 + if (this._fields === this.fieldsLimit) { return cb() } + } else if (this._hitLimit) { + // we may not have hit the actual limit if there are encoded bytes... + if (i > p) { this._val += this.decoder.write(data.toString('binary', p, i)) } + p = i + if ((this._val === '' && this.fieldSizeLimit === 0) || + (this._bytesVal = this._val.length) === this.fieldSizeLimit) { + // yep, we actually did hit the limit + this._checkingBytes = false + this._valTrunc = true + } + } else { + if (p < len) { this._val += this.decoder.write(data.toString('binary', p)) } + p = len + } + } + } + cb() +} + +UrlEncoded.prototype.end = function () { + if (this.boy._done) { return } + + if (this._state === 'key' && this._key.length > 0) { + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + '', + this._keyTrunc, + false) + } else if (this._state === 'val') { + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + decodeText(this._val, 'binary', this.charset), + this._keyTrunc, + this._valTrunc) + } + this.boy._done = true + this.boy.emit('finish') +} + +module.exports = UrlEncoded diff --git a/node_modules/@fastify/busboy/lib/utils/Decoder.js b/node_modules/@fastify/busboy/lib/utils/Decoder.js new file mode 100644 index 0000000..7917678 --- /dev/null +++ b/node_modules/@fastify/busboy/lib/utils/Decoder.js @@ -0,0 +1,54 @@ +'use strict' + +const RE_PLUS = /\+/g + +const HEX = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +] + +function Decoder () { + this.buffer = undefined +} +Decoder.prototype.write = function (str) { + // Replace '+' with ' ' before decoding + str = str.replace(RE_PLUS, ' ') + let res = '' + let i = 0; let p = 0; const len = str.length + for (; i < len; ++i) { + if (this.buffer !== undefined) { + if (!HEX[str.charCodeAt(i)]) { + res += '%' + this.buffer + this.buffer = undefined + --i // retry character + } else { + this.buffer += str[i] + ++p + if (this.buffer.length === 2) { + res += String.fromCharCode(parseInt(this.buffer, 16)) + this.buffer = undefined + } + } + } else if (str[i] === '%') { + if (i > p) { + res += str.substring(p, i) + p = i + } + this.buffer = '' + ++p + } + } + if (p < len && this.buffer === undefined) { res += str.substring(p) } + return res +} +Decoder.prototype.reset = function () { + this.buffer = undefined +} + +module.exports = Decoder diff --git a/node_modules/@fastify/busboy/lib/utils/basename.js b/node_modules/@fastify/busboy/lib/utils/basename.js new file mode 100644 index 0000000..db58819 --- /dev/null +++ b/node_modules/@fastify/busboy/lib/utils/basename.js @@ -0,0 +1,14 @@ +'use strict' + +module.exports = function basename (path) { + if (typeof path !== 'string') { return '' } + for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var + switch (path.charCodeAt(i)) { + case 0x2F: // '/' + case 0x5C: // '\' + path = path.slice(i + 1) + return (path === '..' || path === '.' ? '' : path) + } + } + return (path === '..' || path === '.' ? '' : path) +} diff --git a/node_modules/@fastify/busboy/lib/utils/decodeText.js b/node_modules/@fastify/busboy/lib/utils/decodeText.js new file mode 100644 index 0000000..eac7d35 --- /dev/null +++ b/node_modules/@fastify/busboy/lib/utils/decodeText.js @@ -0,0 +1,114 @@ +'use strict' + +// Node has always utf-8 +const utf8Decoder = new TextDecoder('utf-8') +const textDecoders = new Map([ + ['utf-8', utf8Decoder], + ['utf8', utf8Decoder] +]) + +function getDecoder (charset) { + let lc + while (true) { + switch (charset) { + case 'utf-8': + case 'utf8': + return decoders.utf8 + case 'latin1': + case 'ascii': // TODO: Make these a separate, strict decoder? + case 'us-ascii': + case 'iso-8859-1': + case 'iso8859-1': + case 'iso88591': + case 'iso_8859-1': + case 'windows-1252': + case 'iso_8859-1:1987': + case 'cp1252': + case 'x-cp1252': + return decoders.latin1 + case 'utf16le': + case 'utf-16le': + case 'ucs2': + case 'ucs-2': + return decoders.utf16le + case 'base64': + return decoders.base64 + default: + if (lc === undefined) { + lc = true + charset = charset.toLowerCase() + continue + } + return decoders.other.bind(charset) + } + } +} + +const decoders = { + utf8: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + return data.utf8Slice(0, data.length) + }, + + latin1: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + return data + } + return data.latin1Slice(0, data.length) + }, + + utf16le: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + return data.ucs2Slice(0, data.length) + }, + + base64: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + return data.base64Slice(0, data.length) + }, + + other: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + + if (textDecoders.has(this.toString())) { + try { + return textDecoders.get(this).decode(data) + } catch {} + } + return typeof data === 'string' + ? data + : data.toString() + } +} + +function decodeText (text, sourceEncoding, destEncoding) { + if (text) { + return getDecoder(destEncoding)(text, sourceEncoding) + } + return text +} + +module.exports = decodeText diff --git a/node_modules/@fastify/busboy/lib/utils/getLimit.js b/node_modules/@fastify/busboy/lib/utils/getLimit.js new file mode 100644 index 0000000..cb64fd6 --- /dev/null +++ b/node_modules/@fastify/busboy/lib/utils/getLimit.js @@ -0,0 +1,16 @@ +'use strict' + +module.exports = function getLimit (limits, name, defaultLimit) { + if ( + !limits || + limits[name] === undefined || + limits[name] === null + ) { return defaultLimit } + + if ( + typeof limits[name] !== 'number' || + isNaN(limits[name]) + ) { throw new TypeError('Limit ' + name + ' is not a valid number') } + + return limits[name] +} diff --git a/node_modules/@fastify/busboy/lib/utils/parseParams.js b/node_modules/@fastify/busboy/lib/utils/parseParams.js new file mode 100644 index 0000000..1698e62 --- /dev/null +++ b/node_modules/@fastify/busboy/lib/utils/parseParams.js @@ -0,0 +1,196 @@ +/* eslint-disable object-property-newline */ +'use strict' + +const decodeText = require('./decodeText') + +const RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g + +const EncodedLookup = { + '%00': '\x00', '%01': '\x01', '%02': '\x02', '%03': '\x03', '%04': '\x04', + '%05': '\x05', '%06': '\x06', '%07': '\x07', '%08': '\x08', '%09': '\x09', + '%0a': '\x0a', '%0A': '\x0a', '%0b': '\x0b', '%0B': '\x0b', '%0c': '\x0c', + '%0C': '\x0c', '%0d': '\x0d', '%0D': '\x0d', '%0e': '\x0e', '%0E': '\x0e', + '%0f': '\x0f', '%0F': '\x0f', '%10': '\x10', '%11': '\x11', '%12': '\x12', + '%13': '\x13', '%14': '\x14', '%15': '\x15', '%16': '\x16', '%17': '\x17', + '%18': '\x18', '%19': '\x19', '%1a': '\x1a', '%1A': '\x1a', '%1b': '\x1b', + '%1B': '\x1b', '%1c': '\x1c', '%1C': '\x1c', '%1d': '\x1d', '%1D': '\x1d', + '%1e': '\x1e', '%1E': '\x1e', '%1f': '\x1f', '%1F': '\x1f', '%20': '\x20', + '%21': '\x21', '%22': '\x22', '%23': '\x23', '%24': '\x24', '%25': '\x25', + '%26': '\x26', '%27': '\x27', '%28': '\x28', '%29': '\x29', '%2a': '\x2a', + '%2A': '\x2a', '%2b': '\x2b', '%2B': '\x2b', '%2c': '\x2c', '%2C': '\x2c', + '%2d': '\x2d', '%2D': '\x2d', '%2e': '\x2e', '%2E': '\x2e', '%2f': '\x2f', + '%2F': '\x2f', '%30': '\x30', '%31': '\x31', '%32': '\x32', '%33': '\x33', + '%34': '\x34', '%35': '\x35', '%36': '\x36', '%37': '\x37', '%38': '\x38', + '%39': '\x39', '%3a': '\x3a', '%3A': '\x3a', '%3b': '\x3b', '%3B': '\x3b', + '%3c': '\x3c', '%3C': '\x3c', '%3d': '\x3d', '%3D': '\x3d', '%3e': '\x3e', + '%3E': '\x3e', '%3f': '\x3f', '%3F': '\x3f', '%40': '\x40', '%41': '\x41', + '%42': '\x42', '%43': '\x43', '%44': '\x44', '%45': '\x45', '%46': '\x46', + '%47': '\x47', '%48': '\x48', '%49': '\x49', '%4a': '\x4a', '%4A': '\x4a', + '%4b': '\x4b', '%4B': '\x4b', '%4c': '\x4c', '%4C': '\x4c', '%4d': '\x4d', + '%4D': '\x4d', '%4e': '\x4e', '%4E': '\x4e', '%4f': '\x4f', '%4F': '\x4f', + '%50': '\x50', '%51': '\x51', '%52': '\x52', '%53': '\x53', '%54': '\x54', + '%55': '\x55', '%56': '\x56', '%57': '\x57', '%58': '\x58', '%59': '\x59', + '%5a': '\x5a', '%5A': '\x5a', '%5b': '\x5b', '%5B': '\x5b', '%5c': '\x5c', + '%5C': '\x5c', '%5d': '\x5d', '%5D': '\x5d', '%5e': '\x5e', '%5E': '\x5e', + '%5f': '\x5f', '%5F': '\x5f', '%60': '\x60', '%61': '\x61', '%62': '\x62', + '%63': '\x63', '%64': '\x64', '%65': '\x65', '%66': '\x66', '%67': '\x67', + '%68': '\x68', '%69': '\x69', '%6a': '\x6a', '%6A': '\x6a', '%6b': '\x6b', + '%6B': '\x6b', '%6c': '\x6c', '%6C': '\x6c', '%6d': '\x6d', '%6D': '\x6d', + '%6e': '\x6e', '%6E': '\x6e', '%6f': '\x6f', '%6F': '\x6f', '%70': '\x70', + '%71': '\x71', '%72': '\x72', '%73': '\x73', '%74': '\x74', '%75': '\x75', + '%76': '\x76', '%77': '\x77', '%78': '\x78', '%79': '\x79', '%7a': '\x7a', + '%7A': '\x7a', '%7b': '\x7b', '%7B': '\x7b', '%7c': '\x7c', '%7C': '\x7c', + '%7d': '\x7d', '%7D': '\x7d', '%7e': '\x7e', '%7E': '\x7e', '%7f': '\x7f', + '%7F': '\x7f', '%80': '\x80', '%81': '\x81', '%82': '\x82', '%83': '\x83', + '%84': '\x84', '%85': '\x85', '%86': '\x86', '%87': '\x87', '%88': '\x88', + '%89': '\x89', '%8a': '\x8a', '%8A': '\x8a', '%8b': '\x8b', '%8B': '\x8b', + '%8c': '\x8c', '%8C': '\x8c', '%8d': '\x8d', '%8D': '\x8d', '%8e': '\x8e', + '%8E': '\x8e', '%8f': '\x8f', '%8F': '\x8f', '%90': '\x90', '%91': '\x91', + '%92': '\x92', '%93': '\x93', '%94': '\x94', '%95': '\x95', '%96': '\x96', + '%97': '\x97', '%98': '\x98', '%99': '\x99', '%9a': '\x9a', '%9A': '\x9a', + '%9b': '\x9b', '%9B': '\x9b', '%9c': '\x9c', '%9C': '\x9c', '%9d': '\x9d', + '%9D': '\x9d', '%9e': '\x9e', '%9E': '\x9e', '%9f': '\x9f', '%9F': '\x9f', + '%a0': '\xa0', '%A0': '\xa0', '%a1': '\xa1', '%A1': '\xa1', '%a2': '\xa2', + '%A2': '\xa2', '%a3': '\xa3', '%A3': '\xa3', '%a4': '\xa4', '%A4': '\xa4', + '%a5': '\xa5', '%A5': '\xa5', '%a6': '\xa6', '%A6': '\xa6', '%a7': '\xa7', + '%A7': '\xa7', '%a8': '\xa8', '%A8': '\xa8', '%a9': '\xa9', '%A9': '\xa9', + '%aa': '\xaa', '%Aa': '\xaa', '%aA': '\xaa', '%AA': '\xaa', '%ab': '\xab', + '%Ab': '\xab', '%aB': '\xab', '%AB': '\xab', '%ac': '\xac', '%Ac': '\xac', + '%aC': '\xac', '%AC': '\xac', '%ad': '\xad', '%Ad': '\xad', '%aD': '\xad', + '%AD': '\xad', '%ae': '\xae', '%Ae': '\xae', '%aE': '\xae', '%AE': '\xae', + '%af': '\xaf', '%Af': '\xaf', '%aF': '\xaf', '%AF': '\xaf', '%b0': '\xb0', + '%B0': '\xb0', '%b1': '\xb1', '%B1': '\xb1', '%b2': '\xb2', '%B2': '\xb2', + '%b3': '\xb3', '%B3': '\xb3', '%b4': '\xb4', '%B4': '\xb4', '%b5': '\xb5', + '%B5': '\xb5', '%b6': '\xb6', '%B6': '\xb6', '%b7': '\xb7', '%B7': '\xb7', + '%b8': '\xb8', '%B8': '\xb8', '%b9': '\xb9', '%B9': '\xb9', '%ba': '\xba', + '%Ba': '\xba', '%bA': '\xba', '%BA': '\xba', '%bb': '\xbb', '%Bb': '\xbb', + '%bB': '\xbb', '%BB': '\xbb', '%bc': '\xbc', '%Bc': '\xbc', '%bC': '\xbc', + '%BC': '\xbc', '%bd': '\xbd', '%Bd': '\xbd', '%bD': '\xbd', '%BD': '\xbd', + '%be': '\xbe', '%Be': '\xbe', '%bE': '\xbe', '%BE': '\xbe', '%bf': '\xbf', + '%Bf': '\xbf', '%bF': '\xbf', '%BF': '\xbf', '%c0': '\xc0', '%C0': '\xc0', + '%c1': '\xc1', '%C1': '\xc1', '%c2': '\xc2', '%C2': '\xc2', '%c3': '\xc3', + '%C3': '\xc3', '%c4': '\xc4', '%C4': '\xc4', '%c5': '\xc5', '%C5': '\xc5', + '%c6': '\xc6', '%C6': '\xc6', '%c7': '\xc7', '%C7': '\xc7', '%c8': '\xc8', + '%C8': '\xc8', '%c9': '\xc9', '%C9': '\xc9', '%ca': '\xca', '%Ca': '\xca', + '%cA': '\xca', '%CA': '\xca', '%cb': '\xcb', '%Cb': '\xcb', '%cB': '\xcb', + '%CB': '\xcb', '%cc': '\xcc', '%Cc': '\xcc', '%cC': '\xcc', '%CC': '\xcc', + '%cd': '\xcd', '%Cd': '\xcd', '%cD': '\xcd', '%CD': '\xcd', '%ce': '\xce', + '%Ce': '\xce', '%cE': '\xce', '%CE': '\xce', '%cf': '\xcf', '%Cf': '\xcf', + '%cF': '\xcf', '%CF': '\xcf', '%d0': '\xd0', '%D0': '\xd0', '%d1': '\xd1', + '%D1': '\xd1', '%d2': '\xd2', '%D2': '\xd2', '%d3': '\xd3', '%D3': '\xd3', + '%d4': '\xd4', '%D4': '\xd4', '%d5': '\xd5', '%D5': '\xd5', '%d6': '\xd6', + '%D6': '\xd6', '%d7': '\xd7', '%D7': '\xd7', '%d8': '\xd8', '%D8': '\xd8', + '%d9': '\xd9', '%D9': '\xd9', '%da': '\xda', '%Da': '\xda', '%dA': '\xda', + '%DA': '\xda', '%db': '\xdb', '%Db': '\xdb', '%dB': '\xdb', '%DB': '\xdb', + '%dc': '\xdc', '%Dc': '\xdc', '%dC': '\xdc', '%DC': '\xdc', '%dd': '\xdd', + '%Dd': '\xdd', '%dD': '\xdd', '%DD': '\xdd', '%de': '\xde', '%De': '\xde', + '%dE': '\xde', '%DE': '\xde', '%df': '\xdf', '%Df': '\xdf', '%dF': '\xdf', + '%DF': '\xdf', '%e0': '\xe0', '%E0': '\xe0', '%e1': '\xe1', '%E1': '\xe1', + '%e2': '\xe2', '%E2': '\xe2', '%e3': '\xe3', '%E3': '\xe3', '%e4': '\xe4', + '%E4': '\xe4', '%e5': '\xe5', '%E5': '\xe5', '%e6': '\xe6', '%E6': '\xe6', + '%e7': '\xe7', '%E7': '\xe7', '%e8': '\xe8', '%E8': '\xe8', '%e9': '\xe9', + '%E9': '\xe9', '%ea': '\xea', '%Ea': '\xea', '%eA': '\xea', '%EA': '\xea', + '%eb': '\xeb', '%Eb': '\xeb', '%eB': '\xeb', '%EB': '\xeb', '%ec': '\xec', + '%Ec': '\xec', '%eC': '\xec', '%EC': '\xec', '%ed': '\xed', '%Ed': '\xed', + '%eD': '\xed', '%ED': '\xed', '%ee': '\xee', '%Ee': '\xee', '%eE': '\xee', + '%EE': '\xee', '%ef': '\xef', '%Ef': '\xef', '%eF': '\xef', '%EF': '\xef', + '%f0': '\xf0', '%F0': '\xf0', '%f1': '\xf1', '%F1': '\xf1', '%f2': '\xf2', + '%F2': '\xf2', '%f3': '\xf3', '%F3': '\xf3', '%f4': '\xf4', '%F4': '\xf4', + '%f5': '\xf5', '%F5': '\xf5', '%f6': '\xf6', '%F6': '\xf6', '%f7': '\xf7', + '%F7': '\xf7', '%f8': '\xf8', '%F8': '\xf8', '%f9': '\xf9', '%F9': '\xf9', + '%fa': '\xfa', '%Fa': '\xfa', '%fA': '\xfa', '%FA': '\xfa', '%fb': '\xfb', + '%Fb': '\xfb', '%fB': '\xfb', '%FB': '\xfb', '%fc': '\xfc', '%Fc': '\xfc', + '%fC': '\xfc', '%FC': '\xfc', '%fd': '\xfd', '%Fd': '\xfd', '%fD': '\xfd', + '%FD': '\xfd', '%fe': '\xfe', '%Fe': '\xfe', '%fE': '\xfe', '%FE': '\xfe', + '%ff': '\xff', '%Ff': '\xff', '%fF': '\xff', '%FF': '\xff' +} + +function encodedReplacer (match) { + return EncodedLookup[match] +} + +const STATE_KEY = 0 +const STATE_VALUE = 1 +const STATE_CHARSET = 2 +const STATE_LANG = 3 + +function parseParams (str) { + const res = [] + let state = STATE_KEY + let charset = '' + let inquote = false + let escaping = false + let p = 0 + let tmp = '' + const len = str.length + + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var + const char = str[i] + if (char === '\\' && inquote) { + if (escaping) { escaping = false } else { + escaping = true + continue + } + } else if (char === '"') { + if (!escaping) { + if (inquote) { + inquote = false + state = STATE_KEY + } else { inquote = true } + continue + } else { escaping = false } + } else { + if (escaping && inquote) { tmp += '\\' } + escaping = false + if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") { + if (state === STATE_CHARSET) { + state = STATE_LANG + charset = tmp.substring(1) + } else { state = STATE_VALUE } + tmp = '' + continue + } else if (state === STATE_KEY && + (char === '*' || char === '=') && + res.length) { + state = char === '*' + ? STATE_CHARSET + : STATE_VALUE + res[p] = [tmp, undefined] + tmp = '' + continue + } else if (!inquote && char === ';') { + state = STATE_KEY + if (charset) { + if (tmp.length) { + tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), + 'binary', + charset) + } + charset = '' + } else if (tmp.length) { + tmp = decodeText(tmp, 'binary', 'utf8') + } + if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp } + tmp = '' + ++p + continue + } else if (!inquote && (char === ' ' || char === '\t')) { continue } + } + tmp += char + } + if (charset && tmp.length) { + tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), + 'binary', + charset) + } else if (tmp) { + tmp = decodeText(tmp, 'binary', 'utf8') + } + + if (res[p] === undefined) { + if (tmp) { res[p] = tmp } + } else { res[p][1] = tmp } + + return res +} + +module.exports = parseParams diff --git a/node_modules/@fastify/busboy/package.json b/node_modules/@fastify/busboy/package.json new file mode 100644 index 0000000..83693ac --- /dev/null +++ b/node_modules/@fastify/busboy/package.json @@ -0,0 +1,86 @@ +{ + "name": "@fastify/busboy", + "version": "2.1.1", + "private": false, + "author": "Brian White ", + "contributors": [ + { + "name": "Igor Savin", + "email": "kibertoad@gmail.com", + "url": "https://github.com/kibertoad" + }, + { + "name": "Aras Abbasi", + "email": "aras.abbasi@gmail.com", + "url": "https://github.com/uzlopak" + } + ], + "description": "A streaming parser for HTML form data for node.js", + "main": "lib/main", + "type": "commonjs", + "types": "lib/main.d.ts", + "scripts": { + "bench:busboy": "cd benchmarks && npm install && npm run benchmark-fastify", + "bench:dicer": "node bench/dicer/dicer-bench-multipart-parser.js", + "coveralls": "nyc report --reporter=lcov", + "lint": "npm run lint:standard", + "lint:everything": "npm run lint && npm run test:types", + "lint:fix": "standard --fix", + "lint:standard": "standard --verbose | snazzy", + "test:mocha": "tap", + "test:types": "tsd", + "test:coverage": "nyc npm run test", + "test": "npm run test:mocha" + }, + "engines": { + "node": ">=14" + }, + "devDependencies": { + "@types/node": "^20.1.0", + "busboy": "^1.0.0", + "photofinish": "^1.8.0", + "snazzy": "^9.0.0", + "standard": "^17.0.0", + "tap": "^16.3.8", + "tinybench": "^2.5.1", + "tsd": "^0.30.0", + "typescript": "^5.0.2" + }, + "keywords": [ + "uploads", + "forms", + "multipart", + "form-data" + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/busboy.git" + }, + "tsd": { + "directory": "test/types", + "compilerOptions": { + "esModuleInterop": false, + "module": "commonjs", + "target": "ES2017" + } + }, + "standard": { + "globals": [ + "describe", + "it" + ], + "ignore": [ + "bench" + ] + }, + "files": [ + "README.md", + "LICENSE", + "lib/*", + "deps/encoding/*", + "deps/dicer/lib", + "deps/streamsearch/", + "deps/dicer/LICENSE" + ] +} diff --git a/node_modules/@img/sharp-darwin-arm64/LICENSE b/node_modules/@img/sharp-darwin-arm64/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/node_modules/@img/sharp-darwin-arm64/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@img/sharp-darwin-arm64/README.md b/node_modules/@img/sharp-darwin-arm64/README.md new file mode 100644 index 0000000..8220bf7 --- /dev/null +++ b/node_modules/@img/sharp-darwin-arm64/README.md @@ -0,0 +1,18 @@ +# `@img/sharp-darwin-arm64` + +Prebuilt sharp for use with macOS 64-bit ARM. + +## Licensing + +Copyright 2013 Lovell Fuller and others. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +[https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node b/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node new file mode 100755 index 0000000..4297c20 Binary files /dev/null and b/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node differ diff --git a/node_modules/@img/sharp-darwin-arm64/package.json b/node_modules/@img/sharp-darwin-arm64/package.json new file mode 100644 index 0000000..3092b05 --- /dev/null +++ b/node_modules/@img/sharp-darwin-arm64/package.json @@ -0,0 +1,40 @@ +{ + "name": "@img/sharp-darwin-arm64", + "version": "0.33.5", + "description": "Prebuilt sharp for use with macOS 64-bit ARM", + "author": "Lovell Fuller ", + "homepage": "https://sharp.pixelplumbing.com", + "repository": { + "type": "git", + "url": "git+https://github.com/lovell/sharp.git", + "directory": "npm/darwin-arm64" + }, + "license": "Apache-2.0", + "funding": { + "url": "https://opencollective.com/libvips" + }, + "preferUnplugged": true, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.0.4" + }, + "files": [ + "lib" + ], + "publishConfig": { + "access": "public" + }, + "type": "commonjs", + "exports": { + "./sharp.node": "./lib/sharp-darwin-arm64.node", + "./package": "./package.json" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ] +} diff --git a/node_modules/@img/sharp-libvips-darwin-arm64/README.md b/node_modules/@img/sharp-libvips-darwin-arm64/README.md new file mode 100644 index 0000000..7516f72 --- /dev/null +++ b/node_modules/@img/sharp-libvips-darwin-arm64/README.md @@ -0,0 +1,46 @@ +# `@img/sharp-libvips-darwin-arm64` + +Prebuilt libvips and dependencies for use with sharp on macOS 64-bit ARM. + +## Licensing + +This software contains third-party libraries +used under the terms of the following licences: + +| Library | Used under the terms of | +|---------------|-----------------------------------------------------------------------------------------------------------| +| aom | BSD 2-Clause + [Alliance for Open Media Patent License 1.0](https://aomedia.org/license/patent-license/) | +| cairo | Mozilla Public License 2.0 | +| cgif | MIT Licence | +| expat | MIT Licence | +| fontconfig | [fontconfig Licence](https://gitlab.freedesktop.org/fontconfig/fontconfig/blob/main/COPYING) (BSD-like) | +| freetype | [freetype Licence](https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/FTL.TXT) (BSD-like) | +| fribidi | LGPLv3 | +| glib | LGPLv3 | +| harfbuzz | MIT Licence | +| highway | Apache-2.0 License, BSD 3-Clause | +| lcms | MIT Licence | +| libarchive | BSD 2-Clause | +| libexif | LGPLv3 | +| libffi | MIT Licence | +| libheif | LGPLv3 | +| libimagequant | [BSD 2-Clause](https://github.com/lovell/libimagequant/blob/main/COPYRIGHT) | +| libnsgif | MIT Licence | +| libpng | [libpng License](https://github.com/pnggroup/libpng/blob/master/LICENSE) | +| librsvg | LGPLv3 | +| libspng | [BSD 2-Clause, libpng License](https://github.com/randy408/libspng/blob/master/LICENSE) | +| libtiff | [libtiff License](https://gitlab.com/libtiff/libtiff/blob/master/LICENSE.md) (BSD-like) | +| libvips | LGPLv3 | +| libwebp | New BSD License | +| libxml2 | MIT Licence | +| mozjpeg | [zlib License, IJG License, BSD-3-Clause](https://github.com/mozilla/mozjpeg/blob/master/LICENSE.md) | +| pango | LGPLv3 | +| pixman | MIT Licence | +| proxy-libintl | LGPLv3 | +| zlib-ng | [zlib Licence](https://github.com/zlib-ng/zlib-ng/blob/develop/LICENSE.md) | + +Use of libraries under the terms of the LGPLv3 is via the +"any later version" clause of the LGPLv2 or LGPLv2.1. + +Please report any errors or omissions via +https://github.com/lovell/sharp-libvips/issues/new diff --git a/node_modules/@img/sharp-libvips-darwin-arm64/lib/glib-2.0/include/glibconfig.h b/node_modules/@img/sharp-libvips-darwin-arm64/lib/glib-2.0/include/glibconfig.h new file mode 100644 index 0000000..46a5b30 --- /dev/null +++ b/node_modules/@img/sharp-libvips-darwin-arm64/lib/glib-2.0/include/glibconfig.h @@ -0,0 +1,220 @@ +/* glibconfig.h + * + * This is a generated file. Please modify 'glibconfig.h.in' + */ + +#ifndef __GLIBCONFIG_H__ +#define __GLIBCONFIG_H__ + +#include + +#include +#include +#define GLIB_HAVE_ALLOCA_H + +#define GLIB_STATIC_COMPILATION 1 +#define GOBJECT_STATIC_COMPILATION 1 +#define GIO_STATIC_COMPILATION 1 +#define GMODULE_STATIC_COMPILATION 1 +#define GI_STATIC_COMPILATION 1 +#define G_INTL_STATIC_COMPILATION 1 +#define FFI_STATIC_BUILD 1 + +/* Specifies that GLib's g_print*() functions wrap the + * system printf functions. This is useful to know, for example, + * when using glibc's register_printf_function(). + */ +#define GLIB_USING_SYSTEM_PRINTF + +G_BEGIN_DECLS + +#define G_MINFLOAT FLT_MIN +#define G_MAXFLOAT FLT_MAX +#define G_MINDOUBLE DBL_MIN +#define G_MAXDOUBLE DBL_MAX +#define G_MINSHORT SHRT_MIN +#define G_MAXSHORT SHRT_MAX +#define G_MAXUSHORT USHRT_MAX +#define G_MININT INT_MIN +#define G_MAXINT INT_MAX +#define G_MAXUINT UINT_MAX +#define G_MINLONG LONG_MIN +#define G_MAXLONG LONG_MAX +#define G_MAXULONG ULONG_MAX + +typedef signed char gint8; +typedef unsigned char guint8; + +typedef signed short gint16; +typedef unsigned short guint16; + +#define G_GINT16_MODIFIER "h" +#define G_GINT16_FORMAT "hi" +#define G_GUINT16_FORMAT "hu" + + +typedef signed int gint32; +typedef unsigned int guint32; + +#define G_GINT32_MODIFIER "" +#define G_GINT32_FORMAT "i" +#define G_GUINT32_FORMAT "u" + + +#define G_HAVE_GINT64 1 /* deprecated, always true */ + +G_GNUC_EXTENSION typedef signed long long gint64; +G_GNUC_EXTENSION typedef unsigned long long guint64; + +#define G_GINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##LL)) +#define G_GUINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##ULL)) + +#define G_GINT64_MODIFIER "ll" +#define G_GINT64_FORMAT "lli" +#define G_GUINT64_FORMAT "llu" + + +#define GLIB_SIZEOF_VOID_P 8 +#define GLIB_SIZEOF_LONG 8 +#define GLIB_SIZEOF_SIZE_T 8 +#define GLIB_SIZEOF_SSIZE_T 8 + +typedef signed long gssize; +typedef unsigned long gsize; +#define G_GSIZE_MODIFIER "l" +#define G_GSSIZE_MODIFIER "l" +#define G_GSIZE_FORMAT "lu" +#define G_GSSIZE_FORMAT "li" + +#define G_MAXSIZE G_MAXULONG +#define G_MINSSIZE G_MINLONG +#define G_MAXSSIZE G_MAXLONG + +typedef gint64 goffset; +#define G_MINOFFSET G_MININT64 +#define G_MAXOFFSET G_MAXINT64 + +#define G_GOFFSET_MODIFIER G_GINT64_MODIFIER +#define G_GOFFSET_FORMAT G_GINT64_FORMAT +#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val) + +#define G_POLLFD_FORMAT "%d" + +#define GPOINTER_TO_INT(p) ((gint) (glong) (p)) +#define GPOINTER_TO_UINT(p) ((guint) (gulong) (p)) + +#define GINT_TO_POINTER(i) ((gpointer) (glong) (i)) +#define GUINT_TO_POINTER(u) ((gpointer) (gulong) (u)) + +typedef signed long gintptr; +typedef unsigned long guintptr; + +#define G_GINTPTR_MODIFIER "l" +#define G_GINTPTR_FORMAT "li" +#define G_GUINTPTR_FORMAT "lu" + +#define GLIB_MAJOR_VERSION 2 +#define GLIB_MINOR_VERSION 81 +#define GLIB_MICRO_VERSION 1 + +#define G_OS_UNIX + +#define G_VA_COPY va_copy + + +#define G_HAVE_ISO_VARARGS 1 + +/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi + * is passed ISO vararg support is turned off, and there is no work + * around to turn it on, so we unconditionally turn it off. + */ +#if __GNUC__ == 2 && __GNUC_MINOR__ == 95 +# undef G_HAVE_ISO_VARARGS +#endif + +#define G_HAVE_GROWING_STACK 0 + +#ifndef _MSC_VER +# define G_HAVE_GNUC_VARARGS 1 +#endif + +#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) +#define G_GNUC_INTERNAL __attribute__((visibility("hidden"))) +#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) +#define G_GNUC_INTERNAL __hidden +#elif defined (__GNUC__) && defined (G_HAVE_GNUC_VISIBILITY) +#define G_GNUC_INTERNAL __attribute__((visibility("hidden"))) +#else +#define G_GNUC_INTERNAL +#endif + +#define G_THREADS_ENABLED +#define G_THREADS_IMPL_POSIX + +#define G_ATOMIC_LOCK_FREE + +#define GINT16_TO_LE(val) ((gint16) (val)) +#define GUINT16_TO_LE(val) ((guint16) (val)) +#define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val)) +#define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val)) + +#define GINT32_TO_LE(val) ((gint32) (val)) +#define GUINT32_TO_LE(val) ((guint32) (val)) +#define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val)) +#define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val)) + +#define GINT64_TO_LE(val) ((gint64) (val)) +#define GUINT64_TO_LE(val) ((guint64) (val)) +#define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val)) +#define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val)) + +#define GLONG_TO_LE(val) ((glong) GINT64_TO_LE (val)) +#define GULONG_TO_LE(val) ((gulong) GUINT64_TO_LE (val)) +#define GLONG_TO_BE(val) ((glong) GINT64_TO_BE (val)) +#define GULONG_TO_BE(val) ((gulong) GUINT64_TO_BE (val)) +#define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val)) +#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val)) +#define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val)) +#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val)) +#define GSIZE_TO_LE(val) ((gsize) GUINT64_TO_LE (val)) +#define GSSIZE_TO_LE(val) ((gssize) GINT64_TO_LE (val)) +#define GSIZE_TO_BE(val) ((gsize) GUINT64_TO_BE (val)) +#define GSSIZE_TO_BE(val) ((gssize) GINT64_TO_BE (val)) +#define G_BYTE_ORDER G_LITTLE_ENDIAN + +#define GLIB_SYSDEF_POLLIN =1 +#define GLIB_SYSDEF_POLLOUT =4 +#define GLIB_SYSDEF_POLLPRI =2 +#define GLIB_SYSDEF_POLLHUP =16 +#define GLIB_SYSDEF_POLLERR =8 +#define GLIB_SYSDEF_POLLNVAL =32 + +/* No way to disable deprecation warnings for macros, so only emit deprecation + * warnings on platforms where usage of this macro is broken */ +#if defined(__APPLE__) || defined(_MSC_VER) || defined(__CYGWIN__) +#define G_MODULE_SUFFIX "so" GLIB_DEPRECATED_MACRO_IN_2_76 +#else +#define G_MODULE_SUFFIX "so" +#endif + +typedef int GPid; +#define G_PID_FORMAT "i" + +#define GLIB_SYSDEF_AF_UNIX 1 +#define GLIB_SYSDEF_AF_INET 2 +#define GLIB_SYSDEF_AF_INET6 30 + +#define GLIB_SYSDEF_MSG_OOB 1 +#define GLIB_SYSDEF_MSG_PEEK 2 +#define GLIB_SYSDEF_MSG_DONTROUTE 4 + +#define G_DIR_SEPARATOR '/' +#define G_DIR_SEPARATOR_S "/" +#define G_SEARCHPATH_SEPARATOR ':' +#define G_SEARCHPATH_SEPARATOR_S ":" + +#undef G_HAVE_FREE_SIZED + +G_END_DECLS + +#endif /* __GLIBCONFIG_H__ */ diff --git a/node_modules/@img/sharp-libvips-darwin-arm64/lib/index.js b/node_modules/@img/sharp-libvips-darwin-arm64/lib/index.js new file mode 100644 index 0000000..5092b4d --- /dev/null +++ b/node_modules/@img/sharp-libvips-darwin-arm64/lib/index.js @@ -0,0 +1 @@ +module.exports = __dirname; diff --git a/node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.42.dylib b/node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.42.dylib new file mode 100644 index 0000000..941c7d6 Binary files /dev/null and b/node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.42.dylib differ diff --git a/node_modules/@img/sharp-libvips-darwin-arm64/package.json b/node_modules/@img/sharp-libvips-darwin-arm64/package.json new file mode 100644 index 0000000..b76bdb6 --- /dev/null +++ b/node_modules/@img/sharp-libvips-darwin-arm64/package.json @@ -0,0 +1,36 @@ +{ + "name": "@img/sharp-libvips-darwin-arm64", + "version": "1.0.4", + "description": "Prebuilt libvips and dependencies for use with sharp on macOS 64-bit ARM", + "author": "Lovell Fuller ", + "homepage": "https://sharp.pixelplumbing.com", + "repository": { + "type": "git", + "url": "git+https://github.com/lovell/sharp-libvips.git", + "directory": "npm/darwin-arm64" + }, + "license": "LGPL-3.0-or-later", + "funding": { + "url": "https://opencollective.com/libvips" + }, + "preferUnplugged": true, + "publishConfig": { + "access": "public" + }, + "files": [ + "lib", + "versions.json" + ], + "type": "commonjs", + "exports": { + "./lib": "./lib/index.js", + "./package": "./package.json", + "./versions": "./versions.json" + }, + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ] +} diff --git a/node_modules/@img/sharp-libvips-darwin-arm64/versions.json b/node_modules/@img/sharp-libvips-darwin-arm64/versions.json new file mode 100644 index 0000000..0b50c29 --- /dev/null +++ b/node_modules/@img/sharp-libvips-darwin-arm64/versions.json @@ -0,0 +1,30 @@ +{ + "aom": "3.9.1", + "archive": "3.7.4", + "cairo": "1.18.0", + "cgif": "0.4.1", + "exif": "0.6.24", + "expat": "2.6.2", + "ffi": "3.4.6", + "fontconfig": "2.15.0", + "freetype": "2.13.2", + "fribidi": "1.0.15", + "glib": "2.81.1", + "harfbuzz": "9.0.0", + "heif": "1.18.2", + "highway": "1.2.0", + "imagequant": "2.4.1", + "lcms": "2.16", + "mozjpeg": "4.1.5", + "pango": "1.54.0", + "pixman": "0.43.4", + "png": "1.6.43", + "proxy-libintl": "0.4", + "rsvg": "2.58.93", + "spng": "0.7.4", + "tiff": "4.6.0", + "vips": "8.15.3", + "webp": "1.4.0", + "xml": "2.13.3", + "zlib-ng": "2.2.1" +} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/LICENSE b/node_modules/@jridgewell/resolve-uri/LICENSE new file mode 100644 index 0000000..0a81b2a --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/LICENSE @@ -0,0 +1,19 @@ +Copyright 2019 Justin Ridgewell + +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. \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/README.md b/node_modules/@jridgewell/resolve-uri/README.md new file mode 100644 index 0000000..2fe70df --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/README.md @@ -0,0 +1,40 @@ +# @jridgewell/resolve-uri + +> Resolve a URI relative to an optional base URI + +Resolve any combination of absolute URIs, protocol-realtive URIs, absolute paths, or relative paths. + +## Installation + +```sh +npm install @jridgewell/resolve-uri +``` + +## Usage + +```typescript +function resolve(input: string, base?: string): string; +``` + +```js +import resolve from '@jridgewell/resolve-uri'; + +resolve('foo', 'https://example.com'); // => 'https://example.com/foo' +``` + +| Input | Base | Resolution | Explanation | +|-----------------------|-------------------------|--------------------------------|--------------------------------------------------------------| +| `https://example.com` | _any_ | `https://example.com/` | Input is normalized only | +| `//example.com` | `https://base.com/` | `https://example.com/` | Input inherits the base's protocol | +| `//example.com` | _rest_ | `//example.com/` | Input is normalized only | +| `/example` | `https://base.com/` | `https://base.com/example` | Input inherits the base's origin | +| `/example` | `//base.com/` | `//base.com/example` | Input inherits the base's host and remains protocol relative | +| `/example` | _rest_ | `/example` | Input is normalized only | +| `example` | `https://base.com/dir/` | `https://base.com/dir/example` | Input is joined with the base | +| `example` | `https://base.com/file` | `https://base.com/example` | Input is joined with the base without its file | +| `example` | `//base.com/dir/` | `//base.com/dir/example` | Input is joined with the base's last directory | +| `example` | `//base.com/file` | `//base.com/example` | Input is joined with the base without its file | +| `example` | `/base/dir/` | `/base/dir/example` | Input is joined with the base's last directory | +| `example` | `/base/file` | `/base/example` | Input is joined with the base without its file | +| `example` | `base/dir/` | `base/dir/example` | Input is joined with the base's last directory | +| `example` | `base/file` | `base/example` | Input is joined with the base without its file | diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs new file mode 100644 index 0000000..e958e88 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs @@ -0,0 +1,232 @@ +// Matches the scheme of a URL, eg "http://" +const schemeRegex = /^[\w+.-]+:\/\//; +/** + * Matches the parts of a URL: + * 1. Scheme, including ":", guaranteed. + * 2. User/password, including "@", optional. + * 3. Host, guaranteed. + * 4. Port, including ":", optional. + * 5. Path, including "/", optional. + * 6. Query, including "?", optional. + * 7. Hash, including "#", optional. + */ +const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; +/** + * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start + * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). + * + * 1. Host, optional. + * 2. Path, which may include "/", guaranteed. + * 3. Query, including "?", optional. + * 4. Hash, including "#", optional. + */ +const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; +function isAbsoluteUrl(input) { + return schemeRegex.test(input); +} +function isSchemeRelativeUrl(input) { + return input.startsWith('//'); +} +function isAbsolutePath(input) { + return input.startsWith('/'); +} +function isFileUrl(input) { + return input.startsWith('file:'); +} +function isRelative(input) { + return /^[.?#]/.test(input); +} +function parseAbsoluteUrl(input) { + const match = urlRegex.exec(input); + return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); +} +function parseFileUrl(input) { + const match = fileRegex.exec(input); + const path = match[2]; + return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); +} +function makeUrl(scheme, user, host, port, path, query, hash) { + return { + scheme, + user, + host, + port, + path, + query, + hash, + type: 7 /* Absolute */, + }; +} +function parseUrl(input) { + if (isSchemeRelativeUrl(input)) { + const url = parseAbsoluteUrl('http:' + input); + url.scheme = ''; + url.type = 6 /* SchemeRelative */; + return url; + } + if (isAbsolutePath(input)) { + const url = parseAbsoluteUrl('http://foo.com' + input); + url.scheme = ''; + url.host = ''; + url.type = 5 /* AbsolutePath */; + return url; + } + if (isFileUrl(input)) + return parseFileUrl(input); + if (isAbsoluteUrl(input)) + return parseAbsoluteUrl(input); + const url = parseAbsoluteUrl('http://foo.com/' + input); + url.scheme = ''; + url.host = ''; + url.type = input + ? input.startsWith('?') + ? 3 /* Query */ + : input.startsWith('#') + ? 2 /* Hash */ + : 4 /* RelativePath */ + : 1 /* Empty */; + return url; +} +function stripPathFilename(path) { + // If a path ends with a parent directory "..", then it's a relative path with excess parent + // paths. It's not a file, so we can't strip it. + if (path.endsWith('/..')) + return path; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); +} +function mergePaths(url, base) { + normalizePath(base, base.type); + // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative + // path). + if (url.path === '/') { + url.path = base.path; + } + else { + // Resolution happens relative to the base path's directory, not the file. + url.path = stripPathFilename(base.path) + url.path; + } +} +/** + * The path can have empty directories "//", unneeded parents "foo/..", or current directory + * "foo/.". We need to normalize to a standard representation. + */ +function normalizePath(url, type) { + const rel = type <= 4 /* RelativePath */; + const pieces = url.path.split('/'); + // We need to preserve the first piece always, so that we output a leading slash. The item at + // pieces[0] is an empty string. + let pointer = 1; + // Positive is the number of real directories we've output, used for popping a parent directory. + // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". + let positive = 0; + // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will + // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a + // real directory, we won't need to append, unless the other conditions happen again. + let addTrailingSlash = false; + for (let i = 1; i < pieces.length; i++) { + const piece = pieces[i]; + // An empty directory, could be a trailing slash, or just a double "//" in the path. + if (!piece) { + addTrailingSlash = true; + continue; + } + // If we encounter a real directory, then we don't need to append anymore. + addTrailingSlash = false; + // A current directory, which we can always drop. + if (piece === '.') + continue; + // A parent directory, we need to see if there are any real directories we can pop. Else, we + // have an excess of parents, and we'll need to keep the "..". + if (piece === '..') { + if (positive) { + addTrailingSlash = true; + positive--; + pointer--; + } + else if (rel) { + // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute + // URL, protocol relative URL, or an absolute path, we don't need to keep excess. + pieces[pointer++] = piece; + } + continue; + } + // We've encountered a real directory. Move it to the next insertion pointer, which accounts for + // any popped or dropped directories. + pieces[pointer++] = piece; + positive++; + } + let path = ''; + for (let i = 1; i < pointer; i++) { + path += '/' + pieces[i]; + } + if (!path || (addTrailingSlash && !path.endsWith('/..'))) { + path += '/'; + } + url.path = path; +} +/** + * Attempts to resolve `input` URL/path relative to `base`. + */ +function resolve(input, base) { + if (!input && !base) + return ''; + const url = parseUrl(input); + let inputType = url.type; + if (base && inputType !== 7 /* Absolute */) { + const baseUrl = parseUrl(base); + const baseType = baseUrl.type; + switch (inputType) { + case 1 /* Empty */: + url.hash = baseUrl.hash; + // fall through + case 2 /* Hash */: + url.query = baseUrl.query; + // fall through + case 3 /* Query */: + case 4 /* RelativePath */: + mergePaths(url, baseUrl); + // fall through + case 5 /* AbsolutePath */: + // The host, user, and port are joined, you can't copy one without the others. + url.user = baseUrl.user; + url.host = baseUrl.host; + url.port = baseUrl.port; + // fall through + case 6 /* SchemeRelative */: + // The input doesn't have a schema at least, so we need to copy at least that over. + url.scheme = baseUrl.scheme; + } + if (baseType > inputType) + inputType = baseType; + } + normalizePath(url, inputType); + const queryHash = url.query + url.hash; + switch (inputType) { + // This is impossible, because of the empty checks at the start of the function. + // case UrlType.Empty: + case 2 /* Hash */: + case 3 /* Query */: + return queryHash; + case 4 /* RelativePath */: { + // The first char is always a "/", and we need it to be relative. + const path = url.path.slice(1); + if (!path) + return queryHash || '.'; + if (isRelative(base || input) && !isRelative(path)) { + // If base started with a leading ".", or there is no base and input started with a ".", + // then we need to ensure that the relative path starts with a ".". We don't know if + // relative starts with a "..", though, so check before prepending. + return './' + path + queryHash; + } + return path + queryHash; + } + case 5 /* AbsolutePath */: + return url.path + queryHash; + default: + return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; + } +} + +export { resolve as default }; +//# sourceMappingURL=resolve-uri.mjs.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map new file mode 100644 index 0000000..1de97d0 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve-uri.mjs","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":"AAAA;AACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAErC;;;;;;;;;;AAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;AAE5F;;;;;;;;;AASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;AAuBpF,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAa;IACxC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC;AAED,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa;IACrC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;IACpC,OAAO,OAAO,CACZ,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAA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I,GAAG,CAAC;YAEnC,IAAI,UAAU,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;;;;gBAIlD,OAAO,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;aAChC;YAED,OAAO,IAAI,GAAG,SAAS,CAAC;SACzB;QAED;YACE,OAAO,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;QAE9B;YACE,OAAO,GAAG,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;KACpF;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js new file mode 100644 index 0000000..a783049 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js @@ -0,0 +1,240 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.resolveURI = factory()); +})(this, (function () { 'use strict'; + + // Matches the scheme of a URL, eg "http://" + const schemeRegex = /^[\w+.-]+:\/\//; + /** + * Matches the parts of a URL: + * 1. Scheme, including ":", guaranteed. + * 2. User/password, including "@", optional. + * 3. Host, guaranteed. + * 4. Port, including ":", optional. + * 5. Path, including "/", optional. + * 6. Query, including "?", optional. + * 7. Hash, including "#", optional. + */ + const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; + /** + * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start + * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). + * + * 1. Host, optional. + * 2. Path, which may include "/", guaranteed. + * 3. Query, including "?", optional. + * 4. Hash, including "#", optional. + */ + const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; + function isAbsoluteUrl(input) { + return schemeRegex.test(input); + } + function isSchemeRelativeUrl(input) { + return input.startsWith('//'); + } + function isAbsolutePath(input) { + return input.startsWith('/'); + } + function isFileUrl(input) { + return input.startsWith('file:'); + } + function isRelative(input) { + return /^[.?#]/.test(input); + } + function parseAbsoluteUrl(input) { + const match = urlRegex.exec(input); + return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); + } + function parseFileUrl(input) { + const match = fileRegex.exec(input); + const path = match[2]; + return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); + } + function makeUrl(scheme, user, host, port, path, query, hash) { + return { + scheme, + user, + host, + port, + path, + query, + hash, + type: 7 /* Absolute */, + }; + } + function parseUrl(input) { + if (isSchemeRelativeUrl(input)) { + const url = parseAbsoluteUrl('http:' + input); + url.scheme = ''; + url.type = 6 /* SchemeRelative */; + return url; + } + if (isAbsolutePath(input)) { + const url = parseAbsoluteUrl('http://foo.com' + input); + url.scheme = ''; + url.host = ''; + url.type = 5 /* AbsolutePath */; + return url; + } + if (isFileUrl(input)) + return parseFileUrl(input); + if (isAbsoluteUrl(input)) + return parseAbsoluteUrl(input); + const url = parseAbsoluteUrl('http://foo.com/' + input); + url.scheme = ''; + url.host = ''; + url.type = input + ? input.startsWith('?') + ? 3 /* Query */ + : input.startsWith('#') + ? 2 /* Hash */ + : 4 /* RelativePath */ + : 1 /* Empty */; + return url; + } + function stripPathFilename(path) { + // If a path ends with a parent directory "..", then it's a relative path with excess parent + // paths. It's not a file, so we can't strip it. + if (path.endsWith('/..')) + return path; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); + } + function mergePaths(url, base) { + normalizePath(base, base.type); + // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative + // path). + if (url.path === '/') { + url.path = base.path; + } + else { + // Resolution happens relative to the base path's directory, not the file. + url.path = stripPathFilename(base.path) + url.path; + } + } + /** + * The path can have empty directories "//", unneeded parents "foo/..", or current directory + * "foo/.". We need to normalize to a standard representation. + */ + function normalizePath(url, type) { + const rel = type <= 4 /* RelativePath */; + const pieces = url.path.split('/'); + // We need to preserve the first piece always, so that we output a leading slash. The item at + // pieces[0] is an empty string. + let pointer = 1; + // Positive is the number of real directories we've output, used for popping a parent directory. + // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". + let positive = 0; + // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will + // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a + // real directory, we won't need to append, unless the other conditions happen again. + let addTrailingSlash = false; + for (let i = 1; i < pieces.length; i++) { + const piece = pieces[i]; + // An empty directory, could be a trailing slash, or just a double "//" in the path. + if (!piece) { + addTrailingSlash = true; + continue; + } + // If we encounter a real directory, then we don't need to append anymore. + addTrailingSlash = false; + // A current directory, which we can always drop. + if (piece === '.') + continue; + // A parent directory, we need to see if there are any real directories we can pop. Else, we + // have an excess of parents, and we'll need to keep the "..". + if (piece === '..') { + if (positive) { + addTrailingSlash = true; + positive--; + pointer--; + } + else if (rel) { + // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute + // URL, protocol relative URL, or an absolute path, we don't need to keep excess. + pieces[pointer++] = piece; + } + continue; + } + // We've encountered a real directory. Move it to the next insertion pointer, which accounts for + // any popped or dropped directories. + pieces[pointer++] = piece; + positive++; + } + let path = ''; + for (let i = 1; i < pointer; i++) { + path += '/' + pieces[i]; + } + if (!path || (addTrailingSlash && !path.endsWith('/..'))) { + path += '/'; + } + url.path = path; + } + /** + * Attempts to resolve `input` URL/path relative to `base`. + */ + function resolve(input, base) { + if (!input && !base) + return ''; + const url = parseUrl(input); + let inputType = url.type; + if (base && inputType !== 7 /* Absolute */) { + const baseUrl = parseUrl(base); + const baseType = baseUrl.type; + switch (inputType) { + case 1 /* Empty */: + url.hash = baseUrl.hash; + // fall through + case 2 /* Hash */: + url.query = baseUrl.query; + // fall through + case 3 /* Query */: + case 4 /* RelativePath */: + mergePaths(url, baseUrl); + // fall through + case 5 /* AbsolutePath */: + // The host, user, and port are joined, you can't copy one without the others. + url.user = baseUrl.user; + url.host = baseUrl.host; + url.port = baseUrl.port; + // fall through + case 6 /* SchemeRelative */: + // The input doesn't have a schema at least, so we need to copy at least that over. + url.scheme = baseUrl.scheme; + } + if (baseType > inputType) + inputType = baseType; + } + normalizePath(url, inputType); + const queryHash = url.query + url.hash; + switch (inputType) { + // This is impossible, because of the empty checks at the start of the function. + // case UrlType.Empty: + case 2 /* Hash */: + case 3 /* Query */: + return queryHash; + case 4 /* RelativePath */: { + // The first char is always a "/", and we need it to be relative. + const path = url.path.slice(1); + if (!path) + return queryHash || '.'; + if (isRelative(base || input) && !isRelative(path)) { + // If base started with a leading ".", or there is no base and input started with a ".", + // then we need to ensure that the relative path starts with a ".". We don't know if + // relative starts with a "..", though, so check before prepending. + return './' + path + queryHash; + } + return path + queryHash; + } + case 5 /* AbsolutePath */: + return url.path + queryHash; + default: + return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; + } + } + + return resolve; + +})); +//# sourceMappingURL=resolve-uri.umd.js.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map new file mode 100644 index 0000000..70a37f2 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve-uri.umd.js","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":";;;;;;IAAA;IACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;IAErC;;;;;;;;;;IAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;IAE5F;;;;;;;;;IASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;IAuBpF,SAAS,aAAa,CAAC,KAAa;QAClC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,SAAS,mBAAmB,CAAC,KAAa;QACxC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,SAAS,cAAc,CAAC,KAAa;QACnC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,SAAS,SAAS,CAAC,KAAa;QAC9B,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAED,SAAS,UAAU,CAAC,KAAa;QAC/B,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CA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,SAAS,GAAG,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC;QACvC,QAAQ,SAAS;;;YAIf,kBAAkB;YAClB;gBACE,OAAO,SAAS,CAAC;YAEnB,2BAA2B;;gBAEzB,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAE/B,IAAI,CAAC,IAAI;oBAAE,OAAO,SAAS,IAAI,GAAG,CAAC;gBAEnC,IAAI,UAAU,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;;;;oBAIlD,OAAO,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;iBAChC;gBAED,OAAO,IAAI,GAAG,SAAS,CAAC;aACzB;YAED;gBACE,OAAO,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;YAE9B;gBACE,OAAO,GAAG,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;SACpF;IACH;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts b/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts new file mode 100644 index 0000000..b7f0b3b --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts @@ -0,0 +1,4 @@ +/** + * Attempts to resolve `input` URL/path relative to `base`. + */ +export default function resolve(input: string, base: string | undefined): string; diff --git a/node_modules/@jridgewell/resolve-uri/package.json b/node_modules/@jridgewell/resolve-uri/package.json new file mode 100644 index 0000000..02a4c51 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/package.json @@ -0,0 +1,69 @@ +{ + "name": "@jridgewell/resolve-uri", + "version": "3.1.2", + "description": "Resolve a URI relative to an optional base URI", + "keywords": [ + "resolve", + "uri", + "url", + "path" + ], + "author": "Justin Ridgewell ", + "license": "MIT", + "repository": "https://github.com/jridgewell/resolve-uri", + "main": "dist/resolve-uri.umd.js", + "module": "dist/resolve-uri.mjs", + "types": "dist/types/resolve-uri.d.ts", + "exports": { + ".": [ + { + "types": "./dist/types/resolve-uri.d.ts", + "browser": "./dist/resolve-uri.umd.js", + "require": "./dist/resolve-uri.umd.js", + "import": "./dist/resolve-uri.mjs" + }, + "./dist/resolve-uri.umd.js" + ], + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "engines": { + "node": ">=6.0.0" + }, + "scripts": { + "prebuild": "rm -rf dist", + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.js", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "pretest": "run-s build:rollup", + "test": "run-s -n test:lint test:only", + "test:debug": "mocha --inspect-brk", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "mocha", + "test:coverage": "c8 mocha", + "test:watch": "mocha --watch", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build" + }, + "devDependencies": { + "@jridgewell/resolve-uri-latest": "npm:@jridgewell/resolve-uri@*", + "@rollup/plugin-typescript": "8.3.0", + "@typescript-eslint/eslint-plugin": "5.10.0", + "@typescript-eslint/parser": "5.10.0", + "c8": "7.11.0", + "eslint": "8.7.0", + "eslint-config-prettier": "8.3.0", + "mocha": "9.2.0", + "npm-run-all": "4.1.5", + "prettier": "2.5.1", + "rollup": "2.66.0", + "typescript": "4.5.5" + } +} diff --git a/node_modules/@jridgewell/sourcemap-codec/LICENSE b/node_modules/@jridgewell/sourcemap-codec/LICENSE new file mode 100644 index 0000000..a331065 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2015 Rich Harris + +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. diff --git a/node_modules/@jridgewell/sourcemap-codec/README.md b/node_modules/@jridgewell/sourcemap-codec/README.md new file mode 100644 index 0000000..b3e0708 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/README.md @@ -0,0 +1,264 @@ +# @jridgewell/sourcemap-codec + +Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit). + + +## Why? + +Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap. + +This package makes the process slightly easier. + + +## Installation + +```bash +npm install @jridgewell/sourcemap-codec +``` + + +## Usage + +```js +import { encode, decode } from '@jridgewell/sourcemap-codec'; + +var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); + +assert.deepEqual( decoded, [ + // the first line (of the generated code) has no mappings, + // as shown by the starting semi-colon (which separates lines) + [], + + // the second line contains four (comma-separated) segments + [ + // segments are encoded as you'd expect: + // [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ] + + // i.e. the first segment begins at column 2, and maps back to the second column + // of the second line (both zero-based) of the 0th source, and uses the 0th + // name in the `map.names` array + [ 2, 0, 2, 2, 0 ], + + // the remaining segments are 4-length rather than 5-length, + // because they don't map a name + [ 4, 0, 2, 4 ], + [ 6, 0, 2, 5 ], + [ 7, 0, 2, 7 ] + ], + + // the final line contains two segments + [ + [ 2, 1, 10, 19 ], + [ 12, 1, 11, 20 ] + ] +]); + +var encoded = encode( decoded ); +assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); +``` + +## Benchmarks + +``` +node v20.10.0 + +amp.js.map - 45120 segments + +Decode Memory Usage: +local code 5815135 bytes +@jridgewell/sourcemap-codec 1.4.15 5868160 bytes +sourcemap-codec 5492584 bytes +source-map-0.6.1 13569984 bytes +source-map-0.8.0 6390584 bytes +chrome dev tools 8011136 bytes +Smallest memory usage is sourcemap-codec + +Decode speed: +decode: local code x 492 ops/sec ±1.22% (90 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 499 ops/sec ±1.16% (89 runs sampled) +decode: sourcemap-codec x 376 ops/sec ±1.66% (89 runs sampled) +decode: source-map-0.6.1 x 34.99 ops/sec ±0.94% (48 runs sampled) +decode: source-map-0.8.0 x 351 ops/sec ±0.07% (95 runs sampled) +chrome dev tools x 165 ops/sec ±0.91% (86 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 + +Encode Memory Usage: +local code 444248 bytes +@jridgewell/sourcemap-codec 1.4.15 623024 bytes +sourcemap-codec 8696280 bytes +source-map-0.6.1 8745176 bytes +source-map-0.8.0 8736624 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 796 ops/sec ±0.11% (97 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 795 ops/sec ±0.25% (98 runs sampled) +encode: sourcemap-codec x 231 ops/sec ±0.83% (86 runs sampled) +encode: source-map-0.6.1 x 166 ops/sec ±0.57% (86 runs sampled) +encode: source-map-0.8.0 x 203 ops/sec ±0.45% (88 runs sampled) +Fastest is encode: local code,encode: @jridgewell/sourcemap-codec 1.4.15 + + +*** + + +babel.min.js.map - 347793 segments + +Decode Memory Usage: +local code 35424960 bytes +@jridgewell/sourcemap-codec 1.4.15 35424696 bytes +sourcemap-codec 36033464 bytes +source-map-0.6.1 62253704 bytes +source-map-0.8.0 43843920 bytes +chrome dev tools 45111400 bytes +Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15 + +Decode speed: +decode: local code x 38.18 ops/sec ±5.44% (52 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 38.36 ops/sec ±5.02% (52 runs sampled) +decode: sourcemap-codec x 34.05 ops/sec ±4.45% (47 runs sampled) +decode: source-map-0.6.1 x 4.31 ops/sec ±2.76% (15 runs sampled) +decode: source-map-0.8.0 x 55.60 ops/sec ±0.13% (73 runs sampled) +chrome dev tools x 16.94 ops/sec ±3.78% (46 runs sampled) +Fastest is decode: source-map-0.8.0 + +Encode Memory Usage: +local code 2606016 bytes +@jridgewell/sourcemap-codec 1.4.15 2626440 bytes +sourcemap-codec 21152576 bytes +source-map-0.6.1 25023928 bytes +source-map-0.8.0 25256448 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 127 ops/sec ±0.18% (83 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 128 ops/sec ±0.26% (83 runs sampled) +encode: sourcemap-codec x 29.31 ops/sec ±2.55% (53 runs sampled) +encode: source-map-0.6.1 x 18.85 ops/sec ±3.19% (36 runs sampled) +encode: source-map-0.8.0 x 19.34 ops/sec ±1.97% (36 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec 1.4.15 + + +*** + + +preact.js.map - 1992 segments + +Decode Memory Usage: +local code 261696 bytes +@jridgewell/sourcemap-codec 1.4.15 244296 bytes +sourcemap-codec 302816 bytes +source-map-0.6.1 939176 bytes +source-map-0.8.0 336 bytes +chrome dev tools 587368 bytes +Smallest memory usage is source-map-0.8.0 + +Decode speed: +decode: local code x 17,782 ops/sec ±0.32% (97 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 17,863 ops/sec ±0.40% (100 runs sampled) +decode: sourcemap-codec x 12,453 ops/sec ±0.27% (101 runs sampled) +decode: source-map-0.6.1 x 1,288 ops/sec ±1.05% (96 runs sampled) +decode: source-map-0.8.0 x 9,289 ops/sec ±0.27% (101 runs sampled) +chrome dev tools x 4,769 ops/sec ±0.18% (100 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 + +Encode Memory Usage: +local code 262944 bytes +@jridgewell/sourcemap-codec 1.4.15 25544 bytes +sourcemap-codec 323048 bytes +source-map-0.6.1 507808 bytes +source-map-0.8.0 507480 bytes +Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15 + +Encode speed: +encode: local code x 24,207 ops/sec ±0.79% (95 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 24,288 ops/sec ±0.48% (96 runs sampled) +encode: sourcemap-codec x 6,761 ops/sec ±0.21% (100 runs sampled) +encode: source-map-0.6.1 x 5,374 ops/sec ±0.17% (99 runs sampled) +encode: source-map-0.8.0 x 5,633 ops/sec ±0.32% (99 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec 1.4.15,encode: local code + + +*** + + +react.js.map - 5726 segments + +Decode Memory Usage: +local code 678816 bytes +@jridgewell/sourcemap-codec 1.4.15 678816 bytes +sourcemap-codec 816400 bytes +source-map-0.6.1 2288864 bytes +source-map-0.8.0 721360 bytes +chrome dev tools 1012512 bytes +Smallest memory usage is local code + +Decode speed: +decode: local code x 6,178 ops/sec ±0.19% (98 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 6,261 ops/sec ±0.22% (100 runs sampled) +decode: sourcemap-codec x 4,472 ops/sec ±0.90% (99 runs sampled) +decode: source-map-0.6.1 x 449 ops/sec ±0.31% (95 runs sampled) +decode: source-map-0.8.0 x 3,219 ops/sec ±0.13% (100 runs sampled) +chrome dev tools x 1,743 ops/sec ±0.20% (99 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 + +Encode Memory Usage: +local code 140960 bytes +@jridgewell/sourcemap-codec 1.4.15 159808 bytes +sourcemap-codec 969304 bytes +source-map-0.6.1 930520 bytes +source-map-0.8.0 930248 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 8,013 ops/sec ±0.19% (100 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 7,989 ops/sec ±0.20% (101 runs sampled) +encode: sourcemap-codec x 2,472 ops/sec ±0.21% (99 runs sampled) +encode: source-map-0.6.1 x 2,200 ops/sec ±0.17% (99 runs sampled) +encode: source-map-0.8.0 x 2,220 ops/sec ±0.37% (99 runs sampled) +Fastest is encode: local code + + +*** + + +vscode.map - 2141001 segments + +Decode Memory Usage: +local code 198955264 bytes +@jridgewell/sourcemap-codec 1.4.15 199175352 bytes +sourcemap-codec 199102688 bytes +source-map-0.6.1 386323432 bytes +source-map-0.8.0 244116432 bytes +chrome dev tools 293734280 bytes +Smallest memory usage is local code + +Decode speed: +decode: local code x 3.90 ops/sec ±22.21% (15 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 3.95 ops/sec ±23.53% (15 runs sampled) +decode: sourcemap-codec x 3.82 ops/sec ±17.94% (14 runs sampled) +decode: source-map-0.6.1 x 0.61 ops/sec ±7.81% (6 runs sampled) +decode: source-map-0.8.0 x 9.54 ops/sec ±0.28% (28 runs sampled) +chrome dev tools x 2.18 ops/sec ±10.58% (10 runs sampled) +Fastest is decode: source-map-0.8.0 + +Encode Memory Usage: +local code 13509880 bytes +@jridgewell/sourcemap-codec 1.4.15 13537648 bytes +sourcemap-codec 32540104 bytes +source-map-0.6.1 127531040 bytes +source-map-0.8.0 127535312 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 20.10 ops/sec ±0.19% (38 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 20.26 ops/sec ±0.32% (38 runs sampled) +encode: sourcemap-codec x 5.44 ops/sec ±1.64% (18 runs sampled) +encode: source-map-0.6.1 x 2.30 ops/sec ±4.79% (10 runs sampled) +encode: source-map-0.8.0 x 2.46 ops/sec ±6.53% (10 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec 1.4.15 +``` + +# License + +MIT diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs new file mode 100644 index 0000000..60e17b3 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs @@ -0,0 +1,424 @@ +const comma = ','.charCodeAt(0); +const semicolon = ';'.charCodeAt(0); +const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +const intToChar = new Uint8Array(64); // 64 possible chars. +const charToInt = new Uint8Array(128); // z is 122 in ASCII +for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; +} +function decodeInteger(reader, relative) { + let value = 0; + let shift = 0; + let integer = 0; + do { + const c = reader.next(); + integer = charToInt[c]; + value |= (integer & 31) << shift; + shift += 5; + } while (integer & 32); + const shouldNegate = value & 1; + value >>>= 1; + if (shouldNegate) { + value = -0x80000000 | -value; + } + return relative + value; +} +function encodeInteger(builder, num, relative) { + let delta = num - relative; + delta = delta < 0 ? (-delta << 1) | 1 : delta << 1; + do { + let clamped = delta & 0b011111; + delta >>>= 5; + if (delta > 0) + clamped |= 0b100000; + builder.write(intToChar[clamped]); + } while (delta > 0); + return num; +} +function hasMoreVlq(reader, max) { + if (reader.pos >= max) + return false; + return reader.peek() !== comma; +} + +const bufLength = 1024 * 16; +// Provide a fallback for older environments. +const td = typeof TextDecoder !== 'undefined' + ? /* #__PURE__ */ new TextDecoder() + : typeof Buffer !== 'undefined' + ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + }, + } + : { + decode(buf) { + let out = ''; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + }, + }; +class StringWriter { + constructor() { + this.pos = 0; + this.out = ''; + this.buffer = new Uint8Array(bufLength); + } + write(v) { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + flush() { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } +} +class StringReader { + constructor(buffer) { + this.pos = 0; + this.buffer = buffer; + } + next() { + return this.buffer.charCodeAt(this.pos++); + } + peek() { + return this.buffer.charCodeAt(this.pos); + } + indexOf(char) { + const { buffer, pos } = this; + const idx = buffer.indexOf(char, pos); + return idx === -1 ? buffer.length : idx; + } +} + +const EMPTY = []; +function decodeOriginalScopes(input) { + const { length } = input; + const reader = new StringReader(input); + const scopes = []; + const stack = []; + let line = 0; + for (; reader.pos < length; reader.pos++) { + line = decodeInteger(reader, line); + const column = decodeInteger(reader, 0); + if (!hasMoreVlq(reader, length)) { + const last = stack.pop(); + last[2] = line; + last[3] = column; + continue; + } + const kind = decodeInteger(reader, 0); + const fields = decodeInteger(reader, 0); + const hasName = fields & 0b0001; + const scope = (hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]); + let vars = EMPTY; + if (hasMoreVlq(reader, length)) { + vars = []; + do { + const varsIndex = decodeInteger(reader, 0); + vars.push(varsIndex); + } while (hasMoreVlq(reader, length)); + } + scope.vars = vars; + scopes.push(scope); + stack.push(scope); + } + return scopes; +} +function encodeOriginalScopes(scopes) { + const writer = new StringWriter(); + for (let i = 0; i < scopes.length;) { + i = _encodeOriginalScopes(scopes, i, writer, [0]); + } + return writer.flush(); +} +function _encodeOriginalScopes(scopes, index, writer, state) { + const scope = scopes[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; + if (index > 0) + writer.write(comma); + state[0] = encodeInteger(writer, startLine, state[0]); + encodeInteger(writer, startColumn, 0); + encodeInteger(writer, kind, 0); + const fields = scope.length === 6 ? 0b0001 : 0; + encodeInteger(writer, fields, 0); + if (scope.length === 6) + encodeInteger(writer, scope[5], 0); + for (const v of vars) { + encodeInteger(writer, v, 0); + } + for (index++; index < scopes.length;) { + const next = scopes[index]; + const { 0: l, 1: c } = next; + if (l > endLine || (l === endLine && c >= endColumn)) { + break; + } + index = _encodeOriginalScopes(scopes, index, writer, state); + } + writer.write(comma); + state[0] = encodeInteger(writer, endLine, state[0]); + encodeInteger(writer, endColumn, 0); + return index; +} +function decodeGeneratedRanges(input) { + const { length } = input; + const reader = new StringReader(input); + const ranges = []; + const stack = []; + let genLine = 0; + let definitionSourcesIndex = 0; + let definitionScopeIndex = 0; + let callsiteSourcesIndex = 0; + let callsiteLine = 0; + let callsiteColumn = 0; + let bindingLine = 0; + let bindingColumn = 0; + do { + const semi = reader.indexOf(';'); + let genColumn = 0; + for (; reader.pos < semi; reader.pos++) { + genColumn = decodeInteger(reader, genColumn); + if (!hasMoreVlq(reader, semi)) { + const last = stack.pop(); + last[2] = genLine; + last[3] = genColumn; + continue; + } + const fields = decodeInteger(reader, 0); + const hasDefinition = fields & 0b0001; + const hasCallsite = fields & 0b0010; + const hasScope = fields & 0b0100; + let callsite = null; + let bindings = EMPTY; + let range; + if (hasDefinition) { + const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); + definitionScopeIndex = decodeInteger(reader, definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0); + definitionSourcesIndex = defSourcesIndex; + range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex]; + } + else { + range = [genLine, genColumn, 0, 0]; + } + range.isScope = !!hasScope; + if (hasCallsite) { + const prevCsi = callsiteSourcesIndex; + const prevLine = callsiteLine; + callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); + const sameSource = prevCsi === callsiteSourcesIndex; + callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); + callsiteColumn = decodeInteger(reader, sameSource && prevLine === callsiteLine ? callsiteColumn : 0); + callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; + } + range.callsite = callsite; + if (hasMoreVlq(reader, semi)) { + bindings = []; + do { + bindingLine = genLine; + bindingColumn = genColumn; + const expressionsCount = decodeInteger(reader, 0); + let expressionRanges; + if (expressionsCount < -1) { + expressionRanges = [[decodeInteger(reader, 0)]]; + for (let i = -1; i > expressionsCount; i--) { + const prevBl = bindingLine; + bindingLine = decodeInteger(reader, bindingLine); + bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); + const expression = decodeInteger(reader, 0); + expressionRanges.push([expression, bindingLine, bindingColumn]); + } + } + else { + expressionRanges = [[expressionsCount]]; + } + bindings.push(expressionRanges); + } while (hasMoreVlq(reader, semi)); + } + range.bindings = bindings; + ranges.push(range); + stack.push(range); + } + genLine++; + reader.pos = semi + 1; + } while (reader.pos < length); + return ranges; +} +function encodeGeneratedRanges(ranges) { + if (ranges.length === 0) + return ''; + const writer = new StringWriter(); + for (let i = 0; i < ranges.length;) { + i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); + } + return writer.flush(); +} +function _encodeGeneratedRanges(ranges, index, writer, state) { + const range = ranges[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, isScope, callsite, bindings, } = range; + if (state[0] < startLine) { + catchupLine(writer, state[0], startLine); + state[0] = startLine; + state[1] = 0; + } + else if (index > 0) { + writer.write(comma); + } + state[1] = encodeInteger(writer, range[1], state[1]); + const fields = (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0); + encodeInteger(writer, fields, 0); + if (range.length === 6) { + const { 4: sourcesIndex, 5: scopesIndex } = range; + if (sourcesIndex !== state[2]) { + state[3] = 0; + } + state[2] = encodeInteger(writer, sourcesIndex, state[2]); + state[3] = encodeInteger(writer, scopesIndex, state[3]); + } + if (callsite) { + const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; + if (sourcesIndex !== state[4]) { + state[5] = 0; + state[6] = 0; + } + else if (callLine !== state[5]) { + state[6] = 0; + } + state[4] = encodeInteger(writer, sourcesIndex, state[4]); + state[5] = encodeInteger(writer, callLine, state[5]); + state[6] = encodeInteger(writer, callColumn, state[6]); + } + if (bindings) { + for (const binding of bindings) { + if (binding.length > 1) + encodeInteger(writer, -binding.length, 0); + const expression = binding[0][0]; + encodeInteger(writer, expression, 0); + let bindingStartLine = startLine; + let bindingStartColumn = startColumn; + for (let i = 1; i < binding.length; i++) { + const expRange = binding[i]; + bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine); + bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn); + encodeInteger(writer, expRange[0], 0); + } + } + } + for (index++; index < ranges.length;) { + const next = ranges[index]; + const { 0: l, 1: c } = next; + if (l > endLine || (l === endLine && c >= endColumn)) { + break; + } + index = _encodeGeneratedRanges(ranges, index, writer, state); + } + if (state[0] < endLine) { + catchupLine(writer, state[0], endLine); + state[0] = endLine; + state[1] = 0; + } + else { + writer.write(comma); + } + state[1] = encodeInteger(writer, endColumn, state[1]); + return index; +} +function catchupLine(writer, lastLine, line) { + do { + writer.write(semicolon); + } while (++lastLine < line); +} + +function decode(mappings) { + const { length } = mappings; + const reader = new StringReader(mappings); + const decoded = []; + let genColumn = 0; + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + do { + const semi = reader.indexOf(';'); + const line = []; + let sorted = true; + let lastCol = 0; + genColumn = 0; + while (reader.pos < semi) { + let seg; + genColumn = decodeInteger(reader, genColumn); + if (genColumn < lastCol) + sorted = false; + lastCol = genColumn; + if (hasMoreVlq(reader, semi)) { + sourcesIndex = decodeInteger(reader, sourcesIndex); + sourceLine = decodeInteger(reader, sourceLine); + sourceColumn = decodeInteger(reader, sourceColumn); + if (hasMoreVlq(reader, semi)) { + namesIndex = decodeInteger(reader, namesIndex); + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; + } + else { + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; + } + } + else { + seg = [genColumn]; + } + line.push(seg); + reader.pos++; + } + if (!sorted) + sort(line); + decoded.push(line); + reader.pos = semi + 1; + } while (reader.pos <= length); + return decoded; +} +function sort(line) { + line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[0] - b[0]; +} +function encode(decoded) { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) + writer.write(semicolon); + if (line.length === 0) + continue; + let genColumn = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) + writer.write(comma); + genColumn = encodeInteger(writer, segment[0], genColumn); + if (segment.length === 1) + continue; + sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); + sourceLine = encodeInteger(writer, segment[2], sourceLine); + sourceColumn = encodeInteger(writer, segment[3], sourceColumn); + if (segment.length === 4) + continue; + namesIndex = encodeInteger(writer, segment[4], namesIndex); + } + } + return writer.flush(); +} + +export { decode, decodeGeneratedRanges, decodeOriginalScopes, encode, encodeGeneratedRanges, encodeOriginalScopes }; +//# sourceMappingURL=sourcemap-codec.mjs.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map new file mode 100644 index 0000000..7388228 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-codec.mjs","sources":["../src/vlq.ts","../src/strings.ts","../src/scopes.ts","../src/sourcemap-codec.ts"],"sourcesContent":["import type { StringReader, StringWriter } from './strings';\n\nexport const comma = ','.charCodeAt(0);\nexport const semicolon = ';'.charCodeAt(0);\n\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst intToChar = new Uint8Array(64); // 64 possible chars.\nconst charToInt = new Uint8Array(128); // z is 122 in ASCII\n\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\n\nexport function decodeInteger(reader: StringReader, relative: number): number {\n let value = 0;\n let shift = 0;\n let integer = 0;\n\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n\n const shouldNegate = value & 1;\n value >>>= 1;\n\n if (shouldNegate) {\n value = -0x80000000 | -value;\n }\n\n return relative + value;\n}\n\nexport function encodeInteger(builder: StringWriter, num: number, relative: number): number {\n let delta = num - relative;\n\n delta = delta < 0 ? (-delta << 1) | 1 : delta << 1;\n do {\n let clamped = delta & 0b011111;\n delta >>>= 5;\n if (delta > 0) clamped |= 0b100000;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n\n return num;\n}\n\nexport function hasMoreVlq(reader: StringReader, max: number) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\n","const bufLength = 1024 * 16;\n\n// Provide a fallback for older environments.\nconst td =\n typeof TextDecoder !== 'undefined'\n ? /* #__PURE__ */ new TextDecoder()\n : typeof Buffer !== 'undefined'\n ? {\n decode(buf: Uint8Array): string {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n },\n }\n : {\n decode(buf: Uint8Array): string {\n let out = '';\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n },\n };\n\nexport class StringWriter {\n pos = 0;\n private out = '';\n private buffer = new Uint8Array(bufLength);\n\n write(v: number): void {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n\n flush(): string {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n}\n\nexport class StringReader {\n pos = 0;\n private declare buffer: string;\n\n constructor(buffer: string) {\n this.buffer = buffer;\n }\n\n next(): number {\n return this.buffer.charCodeAt(this.pos++);\n }\n\n peek(): number {\n return this.buffer.charCodeAt(this.pos);\n }\n\n indexOf(char: string): number {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n}\n","import { StringReader, StringWriter } from './strings';\nimport { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';\n\nconst EMPTY: any[] = [];\n\ntype Line = number;\ntype Column = number;\ntype Kind = number;\ntype Name = number;\ntype Var = number;\ntype SourcesIndex = number;\ntype ScopesIndex = number;\n\ntype Mix = (A & O) | (B & O);\n\nexport type OriginalScope = Mix<\n [Line, Column, Line, Column, Kind],\n [Line, Column, Line, Column, Kind, Name],\n { vars: Var[] }\n>;\n\nexport type GeneratedRange = Mix<\n [Line, Column, Line, Column],\n [Line, Column, Line, Column, SourcesIndex, ScopesIndex],\n {\n callsite: CallSite | null;\n bindings: Binding[];\n isScope: boolean;\n }\n>;\nexport type CallSite = [SourcesIndex, Line, Column];\ntype Binding = BindingExpressionRange[];\nexport type BindingExpressionRange = [Name] | [Name, Line, Column];\n\nexport function decodeOriginalScopes(input: string): OriginalScope[] {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes: OriginalScope[] = [];\n const stack: OriginalScope[] = [];\n let line = 0;\n\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop()!;\n last[2] = line;\n last[3] = column;\n continue;\n }\n\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 0b0001;\n\n const scope: OriginalScope = (\n hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]\n ) as OriginalScope;\n\n let vars: Var[] = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n\n scopes.push(scope);\n stack.push(scope);\n }\n\n return scopes;\n}\n\nexport function encodeOriginalScopes(scopes: OriginalScope[]): string {\n const writer = new StringWriter();\n\n for (let i = 0; i < scopes.length; ) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeOriginalScopes(\n scopes: OriginalScope[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenColumn\n ],\n): number {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n\n if (index > 0) writer.write(comma);\n\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n\n const fields = scope.length === 6 ? 0b0001 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6) encodeInteger(writer, scope[5], 0);\n\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n\n for (index++; index < scopes.length; ) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n\n return index;\n}\n\nexport function decodeGeneratedRanges(input: string): GeneratedRange[] {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges: GeneratedRange[] = [];\n const stack: GeneratedRange[] = [];\n\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n\n do {\n const semi = reader.indexOf(';');\n let genColumn = 0;\n\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop()!;\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 0b0001;\n const hasCallsite = fields & 0b0010;\n const hasScope = fields & 0b0100;\n\n let callsite: CallSite | null = null;\n let bindings: Binding[] = EMPTY;\n let range: GeneratedRange;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(\n reader,\n definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0,\n );\n\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex] as GeneratedRange;\n } else {\n range = [genLine, genColumn, 0, 0] as GeneratedRange;\n }\n\n range.isScope = !!hasScope;\n\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(\n reader,\n sameSource && prevLine === callsiteLine ? callsiteColumn : 0,\n );\n\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges: BindingExpressionRange[];\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n } else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n\n ranges.push(range);\n stack.push(range);\n }\n\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n\n return ranges;\n}\n\nexport function encodeGeneratedRanges(ranges: GeneratedRange[]): string {\n if (ranges.length === 0) return '';\n\n const writer = new StringWriter();\n\n for (let i = 0; i < ranges.length; ) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeGeneratedRanges(\n ranges: GeneratedRange[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenLine\n number, // GenColumn\n number, // DefSourcesIndex\n number, // DefScopesIndex\n number, // CallSourcesIndex\n number, // CallLine\n number, // CallColumn\n ],\n): number {\n const range = ranges[index];\n const {\n 0: startLine,\n 1: startColumn,\n 2: endLine,\n 3: endColumn,\n isScope,\n callsite,\n bindings,\n } = range;\n\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n } else if (index > 0) {\n writer.write(comma);\n }\n\n state[1] = encodeInteger(writer, range[1], state[1]);\n\n const fields =\n (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0);\n encodeInteger(writer, fields, 0);\n\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite!;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n } else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1) encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1]!, bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2]!, bindingStartColumn);\n encodeInteger(writer, expRange[0]!, 0);\n }\n }\n }\n\n for (index++; index < ranges.length; ) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n } else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n\n return index;\n}\n\nfunction catchupLine(writer: StringWriter, lastLine: number, line: number) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n","import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';\nimport { StringWriter, StringReader } from './strings';\n\nexport {\n decodeOriginalScopes,\n encodeOriginalScopes,\n decodeGeneratedRanges,\n encodeGeneratedRanges,\n} from './scopes';\nexport type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes';\n\nexport type SourceMapSegment =\n | [number]\n | [number, number, number, number]\n | [number, number, number, number, number];\nexport type SourceMapLine = SourceMapSegment[];\nexport type SourceMapMappings = SourceMapLine[];\n\nexport function decode(mappings: string): SourceMapMappings {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded: SourceMapMappings = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n do {\n const semi = reader.indexOf(';');\n const line: SourceMapLine = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n\n while (reader.pos < semi) {\n let seg: SourceMapSegment;\n\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n\n line.push(seg);\n reader.pos++;\n }\n\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n\n return decoded;\n}\n\nfunction sort(line: SourceMapSegment[]) {\n line.sort(sortComparator);\n}\n\nfunction sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {\n return a[0] - b[0];\n}\n\nexport function encode(decoded: SourceMapMappings): string;\nexport function encode(decoded: Readonly): string;\nexport function encode(decoded: Readonly): string {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) writer.write(semicolon);\n if (line.length === 0) continue;\n\n let genColumn = 0;\n\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0) writer.write(comma);\n\n genColumn = encodeInteger(writer, segment[0], genColumn);\n\n if (segment.length === 1) continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceCol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GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;YAC/D,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;YAC3D,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;YAE/D,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;gBAAE,SAAS;YACnC,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;SAC5D;KACF;IAED,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;AACxB;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js new file mode 100644 index 0000000..93caf17 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js @@ -0,0 +1,439 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sourcemapCodec = {})); +})(this, (function (exports) { 'use strict'; + + const comma = ','.charCodeAt(0); + const semicolon = ';'.charCodeAt(0); + const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + const intToChar = new Uint8Array(64); // 64 possible chars. + const charToInt = new Uint8Array(128); // z is 122 in ASCII + for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; + } + function decodeInteger(reader, relative) { + let value = 0; + let shift = 0; + let integer = 0; + do { + const c = reader.next(); + integer = charToInt[c]; + value |= (integer & 31) << shift; + shift += 5; + } while (integer & 32); + const shouldNegate = value & 1; + value >>>= 1; + if (shouldNegate) { + value = -0x80000000 | -value; + } + return relative + value; + } + function encodeInteger(builder, num, relative) { + let delta = num - relative; + delta = delta < 0 ? (-delta << 1) | 1 : delta << 1; + do { + let clamped = delta & 0b011111; + delta >>>= 5; + if (delta > 0) + clamped |= 0b100000; + builder.write(intToChar[clamped]); + } while (delta > 0); + return num; + } + function hasMoreVlq(reader, max) { + if (reader.pos >= max) + return false; + return reader.peek() !== comma; + } + + const bufLength = 1024 * 16; + // Provide a fallback for older environments. + const td = typeof TextDecoder !== 'undefined' + ? /* #__PURE__ */ new TextDecoder() + : typeof Buffer !== 'undefined' + ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + }, + } + : { + decode(buf) { + let out = ''; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + }, + }; + class StringWriter { + constructor() { + this.pos = 0; + this.out = ''; + this.buffer = new Uint8Array(bufLength); + } + write(v) { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + flush() { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } + } + class StringReader { + constructor(buffer) { + this.pos = 0; + this.buffer = buffer; + } + next() { + return this.buffer.charCodeAt(this.pos++); + } + peek() { + return this.buffer.charCodeAt(this.pos); + } + indexOf(char) { + const { buffer, pos } = this; + const idx = buffer.indexOf(char, pos); + return idx === -1 ? buffer.length : idx; + } + } + + const EMPTY = []; + function decodeOriginalScopes(input) { + const { length } = input; + const reader = new StringReader(input); + const scopes = []; + const stack = []; + let line = 0; + for (; reader.pos < length; reader.pos++) { + line = decodeInteger(reader, line); + const column = decodeInteger(reader, 0); + if (!hasMoreVlq(reader, length)) { + const last = stack.pop(); + last[2] = line; + last[3] = column; + continue; + } + const kind = decodeInteger(reader, 0); + const fields = decodeInteger(reader, 0); + const hasName = fields & 0b0001; + const scope = (hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]); + let vars = EMPTY; + if (hasMoreVlq(reader, length)) { + vars = []; + do { + const varsIndex = decodeInteger(reader, 0); + vars.push(varsIndex); + } while (hasMoreVlq(reader, length)); + } + scope.vars = vars; + scopes.push(scope); + stack.push(scope); + } + return scopes; + } + function encodeOriginalScopes(scopes) { + const writer = new StringWriter(); + for (let i = 0; i < scopes.length;) { + i = _encodeOriginalScopes(scopes, i, writer, [0]); + } + return writer.flush(); + } + function _encodeOriginalScopes(scopes, index, writer, state) { + const scope = scopes[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; + if (index > 0) + writer.write(comma); + state[0] = encodeInteger(writer, startLine, state[0]); + encodeInteger(writer, startColumn, 0); + encodeInteger(writer, kind, 0); + const fields = scope.length === 6 ? 0b0001 : 0; + encodeInteger(writer, fields, 0); + if (scope.length === 6) + encodeInteger(writer, scope[5], 0); + for (const v of vars) { + encodeInteger(writer, v, 0); + } + for (index++; index < scopes.length;) { + const next = scopes[index]; + const { 0: l, 1: c } = next; + if (l > endLine || (l === endLine && c >= endColumn)) { + break; + } + index = _encodeOriginalScopes(scopes, index, writer, state); + } + writer.write(comma); + state[0] = encodeInteger(writer, endLine, state[0]); + encodeInteger(writer, endColumn, 0); + return index; + } + function decodeGeneratedRanges(input) { + const { length } = input; + const reader = new StringReader(input); + const ranges = []; + const stack = []; + let genLine = 0; + let definitionSourcesIndex = 0; + let definitionScopeIndex = 0; + let callsiteSourcesIndex = 0; + let callsiteLine = 0; + let callsiteColumn = 0; + let bindingLine = 0; + let bindingColumn = 0; + do { + const semi = reader.indexOf(';'); + let genColumn = 0; + for (; reader.pos < semi; reader.pos++) { + genColumn = decodeInteger(reader, genColumn); + if (!hasMoreVlq(reader, semi)) { + const last = stack.pop(); + last[2] = genLine; + last[3] = genColumn; + continue; + } + const fields = decodeInteger(reader, 0); + const hasDefinition = fields & 0b0001; + const hasCallsite = fields & 0b0010; + const hasScope = fields & 0b0100; + let callsite = null; + let bindings = EMPTY; + let range; + if (hasDefinition) { + const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); + definitionScopeIndex = decodeInteger(reader, definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0); + definitionSourcesIndex = defSourcesIndex; + range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex]; + } + else { + range = [genLine, genColumn, 0, 0]; + } + range.isScope = !!hasScope; + if (hasCallsite) { + const prevCsi = callsiteSourcesIndex; + const prevLine = callsiteLine; + callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); + const sameSource = prevCsi === callsiteSourcesIndex; + callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); + callsiteColumn = decodeInteger(reader, sameSource && prevLine === callsiteLine ? callsiteColumn : 0); + callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; + } + range.callsite = callsite; + if (hasMoreVlq(reader, semi)) { + bindings = []; + do { + bindingLine = genLine; + bindingColumn = genColumn; + const expressionsCount = decodeInteger(reader, 0); + let expressionRanges; + if (expressionsCount < -1) { + expressionRanges = [[decodeInteger(reader, 0)]]; + for (let i = -1; i > expressionsCount; i--) { + const prevBl = bindingLine; + bindingLine = decodeInteger(reader, bindingLine); + bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); + const expression = decodeInteger(reader, 0); + expressionRanges.push([expression, bindingLine, bindingColumn]); + } + } + else { + expressionRanges = [[expressionsCount]]; + } + bindings.push(expressionRanges); + } while (hasMoreVlq(reader, semi)); + } + range.bindings = bindings; + ranges.push(range); + stack.push(range); + } + genLine++; + reader.pos = semi + 1; + } while (reader.pos < length); + return ranges; + } + function encodeGeneratedRanges(ranges) { + if (ranges.length === 0) + return ''; + const writer = new StringWriter(); + for (let i = 0; i < ranges.length;) { + i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); + } + return writer.flush(); + } + function _encodeGeneratedRanges(ranges, index, writer, state) { + const range = ranges[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, isScope, callsite, bindings, } = range; + if (state[0] < startLine) { + catchupLine(writer, state[0], startLine); + state[0] = startLine; + state[1] = 0; + } + else if (index > 0) { + writer.write(comma); + } + state[1] = encodeInteger(writer, range[1], state[1]); + const fields = (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0); + encodeInteger(writer, fields, 0); + if (range.length === 6) { + const { 4: sourcesIndex, 5: scopesIndex } = range; + if (sourcesIndex !== state[2]) { + state[3] = 0; + } + state[2] = encodeInteger(writer, sourcesIndex, state[2]); + state[3] = encodeInteger(writer, scopesIndex, state[3]); + } + if (callsite) { + const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; + if (sourcesIndex !== state[4]) { + state[5] = 0; + state[6] = 0; + } + else if (callLine !== state[5]) { + state[6] = 0; + } + state[4] = encodeInteger(writer, sourcesIndex, state[4]); + state[5] = encodeInteger(writer, callLine, state[5]); + state[6] = encodeInteger(writer, callColumn, state[6]); + } + if (bindings) { + for (const binding of bindings) { + if (binding.length > 1) + encodeInteger(writer, -binding.length, 0); + const expression = binding[0][0]; + encodeInteger(writer, expression, 0); + let bindingStartLine = startLine; + let bindingStartColumn = startColumn; + for (let i = 1; i < binding.length; i++) { + const expRange = binding[i]; + bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine); + bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn); + encodeInteger(writer, expRange[0], 0); + } + } + } + for (index++; index < ranges.length;) { + const next = ranges[index]; + const { 0: l, 1: c } = next; + if (l > endLine || (l === endLine && c >= endColumn)) { + break; + } + index = _encodeGeneratedRanges(ranges, index, writer, state); + } + if (state[0] < endLine) { + catchupLine(writer, state[0], endLine); + state[0] = endLine; + state[1] = 0; + } + else { + writer.write(comma); + } + state[1] = encodeInteger(writer, endColumn, state[1]); + return index; + } + function catchupLine(writer, lastLine, line) { + do { + writer.write(semicolon); + } while (++lastLine < line); + } + + function decode(mappings) { + const { length } = mappings; + const reader = new StringReader(mappings); + const decoded = []; + let genColumn = 0; + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + do { + const semi = reader.indexOf(';'); + const line = []; + let sorted = true; + let lastCol = 0; + genColumn = 0; + while (reader.pos < semi) { + let seg; + genColumn = decodeInteger(reader, genColumn); + if (genColumn < lastCol) + sorted = false; + lastCol = genColumn; + if (hasMoreVlq(reader, semi)) { + sourcesIndex = decodeInteger(reader, sourcesIndex); + sourceLine = decodeInteger(reader, sourceLine); + sourceColumn = decodeInteger(reader, sourceColumn); + if (hasMoreVlq(reader, semi)) { + namesIndex = decodeInteger(reader, namesIndex); + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; + } + else { + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; + } + } + else { + seg = [genColumn]; + } + line.push(seg); + reader.pos++; + } + if (!sorted) + sort(line); + decoded.push(line); + reader.pos = semi + 1; + } while (reader.pos <= length); + return decoded; + } + function sort(line) { + line.sort(sortComparator); + } + function sortComparator(a, b) { + return a[0] - b[0]; + } + function encode(decoded) { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) + writer.write(semicolon); + if (line.length === 0) + continue; + let genColumn = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) + writer.write(comma); + genColumn = encodeInteger(writer, segment[0], genColumn); + if (segment.length === 1) + continue; + sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); + sourceLine = encodeInteger(writer, segment[2], sourceLine); + sourceColumn = encodeInteger(writer, segment[3], sourceColumn); + if (segment.length === 4) + continue; + namesIndex = encodeInteger(writer, segment[4], namesIndex); + } + } + return writer.flush(); + } + + exports.decode = decode; + exports.decodeGeneratedRanges = decodeGeneratedRanges; + exports.decodeOriginalScopes = decodeOriginalScopes; + exports.encode = encode; + exports.encodeGeneratedRanges = encodeGeneratedRanges; + exports.encodeOriginalScopes = encodeOriginalScopes; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=sourcemap-codec.umd.js.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map new file mode 100644 index 0000000..65b3674 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-codec.umd.js","sources":["../src/vlq.ts","../src/strings.ts","../src/scopes.ts","../src/sourcemap-codec.ts"],"sourcesContent":["import type { StringReader, StringWriter } from './strings';\n\nexport const comma = ','.charCodeAt(0);\nexport const semicolon = ';'.charCodeAt(0);\n\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst intToChar = new Uint8Array(64); // 64 possible chars.\nconst charToInt = new Uint8Array(128); // z is 122 in ASCII\n\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\n\nexport function decodeInteger(reader: StringReader, relative: number): number {\n let value = 0;\n let shift = 0;\n let integer = 0;\n\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n\n const shouldNegate = value & 1;\n value >>>= 1;\n\n if (shouldNegate) {\n value = -0x80000000 | -value;\n }\n\n return relative + value;\n}\n\nexport function encodeInteger(builder: StringWriter, num: number, relative: number): number {\n let delta = num - relative;\n\n delta = delta < 0 ? (-delta << 1) | 1 : delta << 1;\n do {\n let clamped = delta & 0b011111;\n delta >>>= 5;\n if (delta > 0) clamped |= 0b100000;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n\n return num;\n}\n\nexport function hasMoreVlq(reader: StringReader, max: number) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\n","const bufLength = 1024 * 16;\n\n// Provide a fallback for older environments.\nconst td =\n typeof TextDecoder !== 'undefined'\n ? /* #__PURE__ */ new TextDecoder()\n : typeof Buffer !== 'undefined'\n ? {\n decode(buf: Uint8Array): string {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n },\n }\n : {\n decode(buf: Uint8Array): string {\n let out = '';\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n },\n };\n\nexport class StringWriter {\n pos = 0;\n private out = '';\n private buffer = new Uint8Array(bufLength);\n\n write(v: number): void {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n\n flush(): string {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n}\n\nexport class StringReader {\n pos = 0;\n private declare buffer: string;\n\n constructor(buffer: string) {\n this.buffer = buffer;\n }\n\n next(): number {\n return this.buffer.charCodeAt(this.pos++);\n }\n\n peek(): number {\n return this.buffer.charCodeAt(this.pos);\n }\n\n indexOf(char: string): number {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n}\n","import { StringReader, StringWriter } from './strings';\nimport { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';\n\nconst EMPTY: any[] = [];\n\ntype Line = number;\ntype Column = number;\ntype Kind = number;\ntype Name = number;\ntype Var = number;\ntype SourcesIndex = number;\ntype ScopesIndex = number;\n\ntype Mix = (A & O) | (B & O);\n\nexport type OriginalScope = Mix<\n [Line, Column, Line, Column, Kind],\n [Line, Column, Line, Column, Kind, Name],\n { vars: Var[] }\n>;\n\nexport type GeneratedRange = Mix<\n [Line, Column, Line, Column],\n [Line, Column, Line, Column, SourcesIndex, ScopesIndex],\n {\n callsite: CallSite | null;\n bindings: Binding[];\n isScope: boolean;\n }\n>;\nexport type CallSite = [SourcesIndex, Line, Column];\ntype Binding = BindingExpressionRange[];\nexport type BindingExpressionRange = [Name] | [Name, Line, Column];\n\nexport function decodeOriginalScopes(input: string): OriginalScope[] {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes: OriginalScope[] = [];\n const stack: OriginalScope[] = [];\n let line = 0;\n\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop()!;\n last[2] = line;\n last[3] = column;\n continue;\n }\n\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 0b0001;\n\n const scope: OriginalScope = (\n hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]\n ) as OriginalScope;\n\n let vars: Var[] = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n\n scopes.push(scope);\n stack.push(scope);\n }\n\n return scopes;\n}\n\nexport function encodeOriginalScopes(scopes: OriginalScope[]): string {\n const writer = new StringWriter();\n\n for (let i = 0; i < scopes.length; ) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeOriginalScopes(\n scopes: OriginalScope[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenColumn\n ],\n): number {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n\n if (index > 0) writer.write(comma);\n\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n\n const fields = scope.length === 6 ? 0b0001 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6) encodeInteger(writer, scope[5], 0);\n\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n\n for (index++; index < scopes.length; ) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n\n return index;\n}\n\nexport function decodeGeneratedRanges(input: string): GeneratedRange[] {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges: GeneratedRange[] = [];\n const stack: GeneratedRange[] = [];\n\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n\n do {\n const semi = reader.indexOf(';');\n let genColumn = 0;\n\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop()!;\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 0b0001;\n const hasCallsite = fields & 0b0010;\n const hasScope = fields & 0b0100;\n\n let callsite: CallSite | null = null;\n let bindings: Binding[] = EMPTY;\n let range: GeneratedRange;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(\n reader,\n definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0,\n );\n\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex] as GeneratedRange;\n } else {\n range = [genLine, genColumn, 0, 0] as GeneratedRange;\n }\n\n range.isScope = !!hasScope;\n\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(\n reader,\n sameSource && prevLine === callsiteLine ? callsiteColumn : 0,\n );\n\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges: BindingExpressionRange[];\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n } else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n\n ranges.push(range);\n stack.push(range);\n }\n\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n\n return ranges;\n}\n\nexport function encodeGeneratedRanges(ranges: GeneratedRange[]): string {\n if (ranges.length === 0) return '';\n\n const writer = new StringWriter();\n\n for (let i = 0; i < ranges.length; ) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeGeneratedRanges(\n ranges: GeneratedRange[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenLine\n number, // GenColumn\n number, // DefSourcesIndex\n number, // DefScopesIndex\n number, // CallSourcesIndex\n number, // CallLine\n number, // CallColumn\n ],\n): number {\n const range = ranges[index];\n const {\n 0: startLine,\n 1: startColumn,\n 2: endLine,\n 3: endColumn,\n isScope,\n callsite,\n bindings,\n } = range;\n\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n } else if (index > 0) {\n writer.write(comma);\n }\n\n state[1] = encodeInteger(writer, range[1], state[1]);\n\n const fields =\n (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0);\n encodeInteger(writer, fields, 0);\n\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite!;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n } else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1) encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1]!, bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2]!, bindingStartColumn);\n encodeInteger(writer, expRange[0]!, 0);\n }\n }\n }\n\n for (index++; index < ranges.length; ) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n } else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n\n return index;\n}\n\nfunction catchupLine(writer: StringWriter, lastLine: number, line: number) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n","import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';\nimport { StringWriter, StringReader } from './strings';\n\nexport {\n decodeOriginalScopes,\n encodeOriginalScopes,\n decodeGeneratedRanges,\n encodeGeneratedRanges,\n} from './scopes';\nexport type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes';\n\nexport type SourceMapSegment =\n | [number]\n | [number, number, number, number]\n | [number, number, number, number, number];\nexport type SourceMapLine = SourceMapSegment[];\nexport type SourceMapMappings = SourceMapLine[];\n\nexport function decode(mappings: string): SourceMapMappings {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded: SourceMapMappings = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n do {\n const semi = reader.indexOf(';');\n const line: SourceMapLine = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n\n while (reader.pos < semi) {\n let seg: SourceMapSegment;\n\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n\n line.push(seg);\n reader.pos++;\n }\n\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n\n return decoded;\n}\n\nfunction sort(line: SourceMapSegment[]) {\n line.sort(sortComparator);\n}\n\nfunction sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {\n return a[0] - b[0];\n}\n\nexport function encode(decoded: SourceMapMappings): string;\nexport function encode(decoded: Readonly): string;\nexport function encode(decoded: Readonly): string {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) writer.write(semicolon);\n if (line.length === 0) continue;\n\n let genColumn = 0;\n\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0) writer.write(comma);\n\n genColumn = encodeInteger(writer, segment[0], genColumn);\n\n if (segment.length === 1) continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n\n if (segment.length === 4) continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n\n return writer.flush();\n}\n"],"names":[],"mappings":";;;;;;IAEO,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,SAAS,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAE3C,MAAM,KAAK,GAAG,kEAAkE,CAAC;IACjF,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IACrC,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;IAEtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9B,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACjB,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;KAClB;aAEe,aAAa,CAAC,MAAoB,EAAE,QAAgB;QAClE,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,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gBAAE,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YACnC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;gBAAE,SAAS;YAEhC,IAAI,SAAS,GAAG,CAAC,CAAC;YAElB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACpC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;gBACxB,IAAI,CAAC,GAAG,CAAC;oBAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBAE/B,SAAS,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;gBAEzD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;oBAAE,SAAS;gBACnC,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;gBAC/D,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;gBAC3D,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;gBAE/D,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;oBAAE,SAAS;gBACnC,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;aAC5D;SACF;QAED,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;IACxB;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/types/scopes.d.ts b/node_modules/@jridgewell/sourcemap-codec/dist/types/scopes.d.ts new file mode 100644 index 0000000..d156fab --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/types/scopes.d.ts @@ -0,0 +1,49 @@ +declare type Line = number; +declare type Column = number; +declare type Kind = number; +declare type Name = number; +declare type Var = number; +declare type SourcesIndex = number; +declare type ScopesIndex = number; +declare type Mix = (A & O) | (B & O); +export declare type OriginalScope = Mix<[ + Line, + Column, + Line, + Column, + Kind +], [ + Line, + Column, + Line, + Column, + Kind, + Name +], { + vars: Var[]; +}>; +export declare type GeneratedRange = Mix<[ + Line, + Column, + Line, + Column +], [ + Line, + Column, + Line, + Column, + SourcesIndex, + ScopesIndex +], { + callsite: CallSite | null; + bindings: Binding[]; + isScope: boolean; +}>; +export declare type CallSite = [SourcesIndex, Line, Column]; +declare type Binding = BindingExpressionRange[]; +export declare type BindingExpressionRange = [Name] | [Name, Line, Column]; +export declare function decodeOriginalScopes(input: string): OriginalScope[]; +export declare function encodeOriginalScopes(scopes: OriginalScope[]): string; +export declare function decodeGeneratedRanges(input: string): GeneratedRange[]; +export declare function encodeGeneratedRanges(ranges: GeneratedRange[]): string; +export {}; diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts b/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts new file mode 100644 index 0000000..336e658 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts @@ -0,0 +1,8 @@ +export { decodeOriginalScopes, encodeOriginalScopes, decodeGeneratedRanges, encodeGeneratedRanges, } from './scopes'; +export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes'; +export declare type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number]; +export declare type SourceMapLine = SourceMapSegment[]; +export declare type SourceMapMappings = SourceMapLine[]; +export declare function decode(mappings: string): SourceMapMappings; +export declare function encode(decoded: SourceMapMappings): string; +export declare function encode(decoded: Readonly): string; diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/types/strings.d.ts b/node_modules/@jridgewell/sourcemap-codec/dist/types/strings.d.ts new file mode 100644 index 0000000..78bd88e --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/types/strings.d.ts @@ -0,0 +1,15 @@ +export declare class StringWriter { + pos: number; + private out; + private buffer; + write(v: number): void; + flush(): string; +} +export declare class StringReader { + pos: number; + private buffer; + constructor(buffer: string); + next(): number; + peek(): number; + indexOf(char: string): number; +} diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/types/vlq.d.ts b/node_modules/@jridgewell/sourcemap-codec/dist/types/vlq.d.ts new file mode 100644 index 0000000..450ee57 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/types/vlq.d.ts @@ -0,0 +1,6 @@ +import type { StringReader, StringWriter } from './strings'; +export declare const comma: number; +export declare const semicolon: number; +export declare function decodeInteger(reader: StringReader, relative: number): number; +export declare function encodeInteger(builder: StringWriter, num: number, relative: number): number; +export declare function hasMoreVlq(reader: StringReader, max: number): boolean; diff --git a/node_modules/@jridgewell/sourcemap-codec/package.json b/node_modules/@jridgewell/sourcemap-codec/package.json new file mode 100644 index 0000000..7168efc --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/package.json @@ -0,0 +1,75 @@ +{ + "name": "@jridgewell/sourcemap-codec", + "version": "1.5.0", + "description": "Encode/decode sourcemap mappings", + "keywords": [ + "sourcemap", + "vlq" + ], + "main": "dist/sourcemap-codec.umd.js", + "module": "dist/sourcemap-codec.mjs", + "types": "dist/types/sourcemap-codec.d.ts", + "files": [ + "dist" + ], + "exports": { + ".": [ + { + "types": "./dist/types/sourcemap-codec.d.ts", + "browser": "./dist/sourcemap-codec.umd.js", + "require": "./dist/sourcemap-codec.umd.js", + "import": "./dist/sourcemap-codec.mjs" + }, + "./dist/sourcemap-codec.umd.js" + ], + "./package.json": "./package.json" + }, + "scripts": { + "benchmark": "run-s build:rollup benchmark:*", + "benchmark:install": "cd benchmark && npm install", + "benchmark:only": "node --expose-gc benchmark/index.js", + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.js", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "prebuild": "rm -rf dist", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build", + "test": "run-s -n test:lint test:only", + "test:debug": "mocha --inspect-brk", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "mocha", + "test:coverage": "c8 mocha", + "test:watch": "mocha --watch" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/jridgewell/sourcemap-codec.git" + }, + "author": "Rich Harris", + "license": "MIT", + "devDependencies": { + "@rollup/plugin-typescript": "8.3.0", + "@types/mocha": "10.0.6", + "@types/node": "17.0.15", + "@typescript-eslint/eslint-plugin": "5.10.0", + "@typescript-eslint/parser": "5.10.0", + "benchmark": "2.1.4", + "c8": "7.11.2", + "eslint": "8.7.0", + "eslint-config-prettier": "8.3.0", + "mocha": "9.2.0", + "npm-run-all": "4.1.5", + "prettier": "2.5.1", + "rollup": "2.64.0", + "source-map": "0.6.1", + "source-map-js": "1.0.2", + "sourcemap-codec": "1.4.8", + "tsx": "4.7.1", + "typescript": "4.5.4" + } +} diff --git a/node_modules/@jridgewell/trace-mapping/LICENSE b/node_modules/@jridgewell/trace-mapping/LICENSE new file mode 100644 index 0000000..37bb488 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/LICENSE @@ -0,0 +1,19 @@ +Copyright 2022 Justin Ridgewell + +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. diff --git a/node_modules/@jridgewell/trace-mapping/README.md b/node_modules/@jridgewell/trace-mapping/README.md new file mode 100644 index 0000000..8286cee --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/README.md @@ -0,0 +1,193 @@ +# @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 } from '@jridgewell/trace-mapping'; + +const tracer = new TraceMap({ + version: 3, + sources: ['input.js'], + names: ['foo'], + mappings: 'KAyCIA', +}); + +// 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 generated = generatedPositionFor(tracer, { + source: 'input.js', + line: 42, + column: 4, +}); +assert.deepEqual(generated, { + line: 1, + column: 5, +}); +``` + +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 v18.0.0 + +amp.js.map +trace-mapping: decoded JSON input x 183 ops/sec ±0.41% (87 runs sampled) +trace-mapping: encoded JSON input x 384 ops/sec ±0.89% (89 runs sampled) +trace-mapping: decoded Object input x 3,085 ops/sec ±0.24% (100 runs sampled) +trace-mapping: encoded Object input x 452 ops/sec ±0.80% (84 runs sampled) +source-map-js: encoded Object input x 88.82 ops/sec ±0.45% (77 runs sampled) +source-map-0.6.1: encoded Object input x 38.39 ops/sec ±1.88% (52 runs sampled) +Fastest is trace-mapping: decoded Object input + +trace-mapping: decoded originalPositionFor x 4,025,347 ops/sec ±0.15% (97 runs sampled) +trace-mapping: encoded originalPositionFor x 3,333,136 ops/sec ±1.26% (90 runs sampled) +source-map-js: encoded originalPositionFor x 824,978 ops/sec ±1.06% (94 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 741,300 ops/sec ±0.93% (92 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 2,587,603 ops/sec ±0.75% (97 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + +*** + +babel.min.js.map +trace-mapping: decoded JSON input x 17.43 ops/sec ±8.81% (33 runs sampled) +trace-mapping: encoded JSON input x 34.18 ops/sec ±4.67% (50 runs sampled) +trace-mapping: decoded Object input x 1,010 ops/sec ±0.41% (98 runs sampled) +trace-mapping: encoded Object input x 39.45 ops/sec ±4.01% (52 runs sampled) +source-map-js: encoded Object input x 6.57 ops/sec ±3.04% (21 runs sampled) +source-map-0.6.1: encoded Object input x 4.23 ops/sec ±2.93% (15 runs sampled) +Fastest is trace-mapping: decoded Object input + +trace-mapping: decoded originalPositionFor x 7,576,265 ops/sec ±0.74% (96 runs sampled) +trace-mapping: encoded originalPositionFor x 5,019,743 ops/sec ±0.74% (94 runs sampled) +source-map-js: encoded originalPositionFor x 3,396,137 ops/sec ±42.32% (95 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 3,753,176 ops/sec ±0.72% (95 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 6,423,633 ops/sec ±0.74% (95 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + +*** + +preact.js.map +trace-mapping: decoded JSON input x 3,499 ops/sec ±0.18% (98 runs sampled) +trace-mapping: encoded JSON input x 6,078 ops/sec ±0.25% (99 runs sampled) +trace-mapping: decoded Object input x 254,788 ops/sec ±0.13% (100 runs sampled) +trace-mapping: encoded Object input x 14,063 ops/sec ±0.27% (94 runs sampled) +source-map-js: encoded Object input x 2,465 ops/sec ±0.25% (98 runs sampled) +source-map-0.6.1: encoded Object input x 1,174 ops/sec ±1.90% (95 runs sampled) +Fastest is trace-mapping: decoded Object input + +trace-mapping: decoded originalPositionFor x 7,720,171 ops/sec ±0.14% (97 runs sampled) +trace-mapping: encoded originalPositionFor x 6,864,485 ops/sec ±0.16% (101 runs sampled) +source-map-js: encoded originalPositionFor x 2,387,219 ops/sec ±0.28% (98 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 1,565,339 ops/sec ±0.32% (101 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 3,819,732 ops/sec ±0.38% (98 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + +*** + +react.js.map +trace-mapping: decoded JSON input x 1,719 ops/sec ±0.19% (99 runs sampled) +trace-mapping: encoded JSON input x 4,284 ops/sec ±0.51% (99 runs sampled) +trace-mapping: decoded Object input x 94,668 ops/sec ±0.08% (99 runs sampled) +trace-mapping: encoded Object input x 5,287 ops/sec ±0.24% (99 runs sampled) +source-map-js: encoded Object input x 814 ops/sec ±0.20% (98 runs sampled) +source-map-0.6.1: encoded Object input x 429 ops/sec ±0.24% (94 runs sampled) +Fastest is trace-mapping: decoded Object input + +trace-mapping: decoded originalPositionFor x 28,927,989 ops/sec ±0.61% (94 runs sampled) +trace-mapping: encoded originalPositionFor x 27,394,475 ops/sec ±0.55% (97 runs sampled) +source-map-js: encoded originalPositionFor x 16,856,730 ops/sec ±0.45% (96 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 12,258,950 ops/sec ±0.41% (97 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 22,272,990 ops/sec ±0.58% (95 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor +``` + +[source-map]: https://www.npmjs.com/package/source-map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs new file mode 100644 index 0000000..8fce400 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs @@ -0,0 +1,514 @@ +import { encode, decode } from '@jridgewell/sourcemap-codec'; +import resolveUri from '@jridgewell/resolve-uri'; + +function resolve(input, base) { + // The base is always treated as a directory, if it's not empty. + // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 + // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 + if (base && !base.endsWith('/')) + base += '/'; + return resolveUri(input, base); +} + +/** + * Removes everything after the last "/", but leaves the slash. + */ +function stripFilename(path) { + if (!path) + return ''; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); +} + +const COLUMN = 0; +const SOURCES_INDEX = 1; +const SOURCE_LINE = 2; +const SOURCE_COLUMN = 3; +const NAMES_INDEX = 4; +const REV_GENERATED_LINE = 1; +const REV_GENERATED_COLUMN = 2; + +function maybeSort(mappings, owned) { + const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); + if (unsortedIndex === mappings.length) + return mappings; + // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If + // not, we do not want to modify the consumer's input array. + if (!owned) + mappings = mappings.slice(); + for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { + mappings[i] = sortSegments(mappings[i], owned); + } + return mappings; +} +function nextUnsortedSegmentLine(mappings, start) { + for (let i = start; i < mappings.length; i++) { + if (!isSorted(mappings[i])) + return i; + } + return mappings.length; +} +function isSorted(line) { + for (let j = 1; j < line.length; j++) { + if (line[j][COLUMN] < line[j - 1][COLUMN]) { + return false; + } + } + return true; +} +function sortSegments(line, owned) { + if (!owned) + line = line.slice(); + return line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[COLUMN] - b[COLUMN]; +} + +let found = false; +/** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ +function binarySearch(haystack, needle, low, high) { + while (low <= high) { + const mid = low + ((high - low) >> 1); + const cmp = haystack[mid][COLUMN] - needle; + if (cmp === 0) { + found = true; + return mid; + } + if (cmp < 0) { + low = mid + 1; + } + else { + high = mid - 1; + } + } + found = false; + return low - 1; +} +function upperBound(haystack, needle, index) { + for (let i = index + 1; i < haystack.length; i++, index++) { + if (haystack[i][COLUMN] !== needle) + break; + } + return index; +} +function lowerBound(haystack, needle, index) { + for (let i = index - 1; i >= 0; i--, index--) { + if (haystack[i][COLUMN] !== needle) + break; + } + return index; +} +function memoizedState() { + return { + lastKey: -1, + lastNeedle: -1, + lastIndex: -1, + }; +} +/** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ +function memoizedBinarySearch(haystack, needle, state, key) { + const { lastKey, lastNeedle, lastIndex } = state; + let low = 0; + let high = haystack.length - 1; + if (key === lastKey) { + if (needle === lastNeedle) { + found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; + return lastIndex; + } + if (needle >= lastNeedle) { + // lastIndex may be -1 if the previous needle was not found. + low = lastIndex === -1 ? 0 : lastIndex; + } + else { + high = lastIndex; + } + } + state.lastKey = key; + state.lastNeedle = needle; + return (state.lastIndex = binarySearch(haystack, needle, low, high)); +} + +// Rebuilds the original source files, with mappings that are ordered by source line/column instead +// of generated line/column. +function buildBySources(decoded, memos) { + const sources = memos.map(buildNullArray); + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + if (seg.length === 1) + continue; + const sourceIndex = seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + const originalSource = sources[sourceIndex]; + const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = [])); + const memo = memos[sourceIndex]; + // The binary search either found a match, or it found the left-index just before where the + // segment should go. Either way, we want to insert after that. And there may be multiple + // generated segments associated with an original location, so there may need to move several + // indexes before we find where we need to insert. + const index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine)); + insert(originalLine, (memo.lastIndex = index + 1), [sourceColumn, i, seg[COLUMN]]); + } + } + return sources; +} +function insert(array, index, value) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; +} +// Null arrays allow us to use ordered index keys without actually allocating contiguous memory like +// a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations. +// Numeric properties on objects are magically sorted in ascending order by the engine regardless of +// the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending +// order when iterating with for-in. +function buildNullArray() { + return { __proto__: null }; +} + +const AnyMap = function (map, mapUrl) { + const parsed = typeof map === 'string' ? JSON.parse(map) : map; + if (!('sections' in parsed)) + return new TraceMap(parsed, mapUrl); + const mappings = []; + const sources = []; + const sourcesContent = []; + const names = []; + const { sections } = parsed; + let i = 0; + for (; i < sections.length - 1; i++) { + const no = sections[i + 1].offset; + addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, no.line, no.column); + } + if (sections.length > 0) { + addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, Infinity, Infinity); + } + const joined = { + version: 3, + file: parsed.file, + names, + sources, + sourcesContent, + mappings, + }; + return presortedDecodedMap(joined); +}; +function addSection(section, mapUrl, mappings, sources, sourcesContent, names, stopLine, stopColumn) { + const map = AnyMap(section.map, mapUrl); + const { line: lineOffset, column: columnOffset } = section.offset; + const sourcesOffset = sources.length; + const namesOffset = names.length; + const decoded = decodedMappings(map); + const { resolvedSources } = map; + append(sources, resolvedSources); + append(sourcesContent, map.sourcesContent || fillSourcesContent(resolvedSources.length)); + append(names, map.names); + // If this section jumps forwards several lines, we need to add lines to the output mappings catch up. + for (let i = mappings.length; i <= lineOffset; i++) + mappings.push([]); + // We can only add so many lines before we step into the range that the next section's map + // controls. When we get to the last line, then we'll start checking the segments to see if + // they've crossed into the column range. + const stopI = stopLine - lineOffset; + const len = Math.min(decoded.length, stopI + 1); + for (let i = 0; i < len; i++) { + const line = decoded[i]; + // On the 0th loop, the line will already exist due to a previous section, or the line catch up + // loop above. + const out = i === 0 ? mappings[lineOffset] : (mappings[lineOffset + i] = []); + // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the + // map can be multiple lines), it doesn't. + const cOffset = i === 0 ? columnOffset : 0; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const column = cOffset + seg[COLUMN]; + // If this segment steps into the column range that the next section's map controls, we need + // to stop early. + if (i === stopI && column >= stopColumn) + break; + if (seg.length === 1) { + out.push([column]); + continue; + } + const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + if (seg.length === 4) { + out.push([column, sourcesIndex, sourceLine, sourceColumn]); + continue; + } + out.push([column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]); + } + } +} +function append(arr, other) { + for (let i = 0; i < other.length; i++) + arr.push(other[i]); +} +// Sourcemaps don't need to have sourcesContent, and if they don't, we need to create an array of +// equal length to the sources. This is because the sources and sourcesContent are paired arrays, +// where `sourcesContent[i]` is the content of the `sources[i]` file. If we didn't, then joined +// sourcemap would desynchronize the sources/contents. +function fillSourcesContent(len) { + const sourcesContent = []; + for (let i = 0; i < len; i++) + sourcesContent[i] = null; + return sourcesContent; +} + +const INVALID_ORIGINAL_MAPPING = Object.freeze({ + source: null, + line: null, + column: null, + name: null, +}); +const INVALID_GENERATED_MAPPING = Object.freeze({ + line: null, + column: null, +}); +const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; +const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; +const LEAST_UPPER_BOUND = -1; +const GREATEST_LOWER_BOUND = 1; +/** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ +let encodedMappings; +/** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ +let decodedMappings; +/** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ +let traceSegment; +/** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ +let originalPositionFor; +/** + * Finds the source/line/column directly after the mapping returned by originalPositionFor, provided + * the found mapping is from the same source and line as the originalPositionFor mapping. + * + * Eg, in the code `let id = 1`, `originalPositionAfter` could find the mapping associated with `1` + * using the same needle that would return `id` when calling `originalPositionFor`. + */ +let generatedPositionFor; +/** + * Iterates each mapping in generated position order. + */ +let eachMapping; +/** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ +let presortedDecodedMap; +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +let decodedMap; +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +let encodedMap; +class TraceMap { + constructor(map, mapUrl) { + this._decodedMemo = memoizedState(); + this._bySources = undefined; + this._bySourceMemos = undefined; + const isString = typeof map === 'string'; + if (!isString && map.constructor === TraceMap) + return map; + const parsed = (isString ? JSON.parse(map) : map); + const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; + this.version = version; + this.file = file; + this.names = names; + this.sourceRoot = sourceRoot; + this.sources = sources; + this.sourcesContent = sourcesContent; + if (sourceRoot || mapUrl) { + const from = resolve(sourceRoot || '', stripFilename(mapUrl)); + this.resolvedSources = sources.map((s) => resolve(s || '', from)); + } + else { + this.resolvedSources = sources.map((s) => s || ''); + } + const { mappings } = parsed; + if (typeof mappings === 'string') { + this._encoded = mappings; + this._decoded = undefined; + } + else { + this._encoded = undefined; + this._decoded = maybeSort(mappings, isString); + } + } +} +(() => { + encodedMappings = (map) => { + var _a; + return ((_a = map._encoded) !== null && _a !== void 0 ? _a : (map._encoded = encode(map._decoded))); + }; + decodedMappings = (map) => { + return (map._decoded || (map._decoded = decode(map._encoded))); + }; + traceSegment = (map, line, column) => { + const decoded = decodedMappings(map); + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) + return null; + return traceSegmentInternal(decoded[line], map._decodedMemo, line, column, GREATEST_LOWER_BOUND); + }; + originalPositionFor = (map, { line, column, bias }) => { + line--; + if (line < 0) + throw new Error(LINE_GTR_ZERO); + if (column < 0) + throw new Error(COL_GTR_EQ_ZERO); + const decoded = decodedMappings(map); + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) + return INVALID_ORIGINAL_MAPPING; + const segment = traceSegmentInternal(decoded[line], map._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND); + if (segment == null) + return INVALID_ORIGINAL_MAPPING; + if (segment.length == 1) + return INVALID_ORIGINAL_MAPPING; + const { names, resolvedSources } = map; + return { + source: resolvedSources[segment[SOURCES_INDEX]], + line: segment[SOURCE_LINE] + 1, + column: segment[SOURCE_COLUMN], + name: segment.length === 5 ? names[segment[NAMES_INDEX]] : null, + }; + }; + generatedPositionFor = (map, { source, line, column, bias }) => { + line--; + if (line < 0) + throw new Error(LINE_GTR_ZERO); + if (column < 0) + throw new Error(COL_GTR_EQ_ZERO); + const { sources, resolvedSources } = map; + let sourceIndex = sources.indexOf(source); + if (sourceIndex === -1) + sourceIndex = resolvedSources.indexOf(source); + if (sourceIndex === -1) + return INVALID_GENERATED_MAPPING; + const generated = (map._bySources || (map._bySources = buildBySources(decodedMappings(map), (map._bySourceMemos = sources.map(memoizedState))))); + const memos = map._bySourceMemos; + const segments = generated[sourceIndex][line]; + if (segments == null) + return INVALID_GENERATED_MAPPING; + const segment = traceSegmentInternal(segments, memos[sourceIndex], line, column, bias || GREATEST_LOWER_BOUND); + if (segment == null) + return INVALID_GENERATED_MAPPING; + return { + line: segment[REV_GENERATED_LINE] + 1, + column: segment[REV_GENERATED_COLUMN], + }; + }; + eachMapping = (map, cb) => { + const decoded = decodedMappings(map); + const { names, resolvedSources } = map; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const generatedLine = i + 1; + const generatedColumn = seg[0]; + let source = null; + let originalLine = null; + let originalColumn = null; + let name = null; + if (seg.length !== 1) { + source = resolvedSources[seg[1]]; + originalLine = seg[2] + 1; + originalColumn = seg[3]; + } + if (seg.length === 5) + name = names[seg[4]]; + cb({ + generatedLine, + generatedColumn, + source, + originalLine, + originalColumn, + name, + }); + } + } + }; + presortedDecodedMap = (map, mapUrl) => { + const clone = Object.assign({}, map); + clone.mappings = []; + const tracer = new TraceMap(clone, mapUrl); + tracer._decoded = map.mappings; + return tracer; + }; + decodedMap = (map) => { + return { + version: 3, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings: decodedMappings(map), + }; + }; + encodedMap = (map) => { + return { + version: 3, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings: encodedMappings(map), + }; + }; +})(); +function traceSegmentInternal(segments, memo, line, column, bias) { + let index = memoizedBinarySearch(segments, column, memo, line); + if (found) { + index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); + } + else if (bias === LEAST_UPPER_BOUND) + index++; + if (index === -1 || index === segments.length) + return null; + return segments[index]; +} + +export { AnyMap, GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap, decodedMap, decodedMappings, eachMapping, encodedMap, encodedMappings, generatedPositionFor, originalPositionFor, presortedDecodedMap, traceSegment }; +//# sourceMappingURL=trace-mapping.mjs.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map new file mode 100644 index 0000000..fec7769 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"trace-mapping.mjs","sources":["../../src/resolve.ts","../../src/strip-filename.ts","../../src/sourcemap-segment.ts","../../src/sort.ts","../../src/binary-search.ts","../../src/by-source.ts","../../src/any-map.ts","../../src/trace-mapping.ts"],"s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,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/D,IAAIA,KAAO,EAAE;QACX,KAAK,GAAG,CAAC,IAAI,KAAK,iBAAiB,GAAG,UAAU,GAAG,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;KACzF;SAAM,IAAI,IAAI,KAAK,iBAAiB;QAAE,KAAK,EAAE,CAAC;IAE/C,IAAI,KAAK,KAAK,CAAC,CAAC,IAAI,KAAK,KAAK,QAAQ,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAC3D,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;AACzB;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js new file mode 100644 index 0000000..8b755bd --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js @@ -0,0 +1,528 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@jridgewell/sourcemap-codec'), require('@jridgewell/resolve-uri')) : + typeof define === 'function' && define.amd ? define(['exports', '@jridgewell/sourcemap-codec', '@jridgewell/resolve-uri'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.traceMapping = {}, global.sourcemapCodec, global.resolveURI)); +})(this, (function (exports, sourcemapCodec, resolveUri) { 'use strict'; + + function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + + var resolveUri__default = /*#__PURE__*/_interopDefaultLegacy(resolveUri); + + function resolve(input, base) { + // The base is always treated as a directory, if it's not empty. + // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 + // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 + if (base && !base.endsWith('/')) + base += '/'; + return resolveUri__default["default"](input, base); + } + + /** + * Removes everything after the last "/", but leaves the slash. + */ + function stripFilename(path) { + if (!path) + return ''; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); + } + + const COLUMN = 0; + const SOURCES_INDEX = 1; + const SOURCE_LINE = 2; + const SOURCE_COLUMN = 3; + const NAMES_INDEX = 4; + const REV_GENERATED_LINE = 1; + const REV_GENERATED_COLUMN = 2; + + function maybeSort(mappings, owned) { + const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); + if (unsortedIndex === mappings.length) + return mappings; + // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If + // not, we do not want to modify the consumer's input array. + if (!owned) + mappings = mappings.slice(); + for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { + mappings[i] = sortSegments(mappings[i], owned); + } + return mappings; + } + function nextUnsortedSegmentLine(mappings, start) { + for (let i = start; i < mappings.length; i++) { + if (!isSorted(mappings[i])) + return i; + } + return mappings.length; + } + function isSorted(line) { + for (let j = 1; j < line.length; j++) { + if (line[j][COLUMN] < line[j - 1][COLUMN]) { + return false; + } + } + return true; + } + function sortSegments(line, owned) { + if (!owned) + line = line.slice(); + return line.sort(sortComparator); + } + function sortComparator(a, b) { + return a[COLUMN] - b[COLUMN]; + } + + let found = false; + /** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ + function binarySearch(haystack, needle, low, high) { + while (low <= high) { + const mid = low + ((high - low) >> 1); + const cmp = haystack[mid][COLUMN] - needle; + if (cmp === 0) { + found = true; + return mid; + } + if (cmp < 0) { + low = mid + 1; + } + else { + high = mid - 1; + } + } + found = false; + return low - 1; + } + function upperBound(haystack, needle, index) { + for (let i = index + 1; i < haystack.length; i++, index++) { + if (haystack[i][COLUMN] !== needle) + break; + } + return index; + } + function lowerBound(haystack, needle, index) { + for (let i = index - 1; i >= 0; i--, index--) { + if (haystack[i][COLUMN] !== needle) + break; + } + return index; + } + function memoizedState() { + return { + lastKey: -1, + lastNeedle: -1, + lastIndex: -1, + }; + } + /** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ + function memoizedBinarySearch(haystack, needle, state, key) { + const { lastKey, lastNeedle, lastIndex } = state; + let low = 0; + let high = haystack.length - 1; + if (key === lastKey) { + if (needle === lastNeedle) { + found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; + return lastIndex; + } + if (needle >= lastNeedle) { + // lastIndex may be -1 if the previous needle was not found. + low = lastIndex === -1 ? 0 : lastIndex; + } + else { + high = lastIndex; + } + } + state.lastKey = key; + state.lastNeedle = needle; + return (state.lastIndex = binarySearch(haystack, needle, low, high)); + } + + // Rebuilds the original source files, with mappings that are ordered by source line/column instead + // of generated line/column. + function buildBySources(decoded, memos) { + const sources = memos.map(buildNullArray); + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + if (seg.length === 1) + continue; + const sourceIndex = seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + const originalSource = sources[sourceIndex]; + const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = [])); + const memo = memos[sourceIndex]; + // The binary search either found a match, or it found the left-index just before where the + // segment should go. Either way, we want to insert after that. And there may be multiple + // generated segments associated with an original location, so there may need to move several + // indexes before we find where we need to insert. + const index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine)); + insert(originalLine, (memo.lastIndex = index + 1), [sourceColumn, i, seg[COLUMN]]); + } + } + return sources; + } + function insert(array, index, value) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; + } + // Null arrays allow us to use ordered index keys without actually allocating contiguous memory like + // a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations. + // Numeric properties on objects are magically sorted in ascending order by the engine regardless of + // the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending + // order when iterating with for-in. + function buildNullArray() { + return { __proto__: null }; + } + + const AnyMap = function (map, mapUrl) { + const parsed = typeof map === 'string' ? JSON.parse(map) : map; + if (!('sections' in parsed)) + return new TraceMap(parsed, mapUrl); + const mappings = []; + const sources = []; + const sourcesContent = []; + const names = []; + const { sections } = parsed; + let i = 0; + for (; i < sections.length - 1; i++) { + const no = sections[i + 1].offset; + addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, no.line, no.column); + } + if (sections.length > 0) { + addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, Infinity, Infinity); + } + const joined = { + version: 3, + file: parsed.file, + names, + sources, + sourcesContent, + mappings, + }; + return exports.presortedDecodedMap(joined); + }; + function addSection(section, mapUrl, mappings, sources, sourcesContent, names, stopLine, stopColumn) { + const map = AnyMap(section.map, mapUrl); + const { line: lineOffset, column: columnOffset } = section.offset; + const sourcesOffset = sources.length; + const namesOffset = names.length; + const decoded = exports.decodedMappings(map); + const { resolvedSources } = map; + append(sources, resolvedSources); + append(sourcesContent, map.sourcesContent || fillSourcesContent(resolvedSources.length)); + append(names, map.names); + // If this section jumps forwards several lines, we need to add lines to the output mappings catch up. + for (let i = mappings.length; i <= lineOffset; i++) + mappings.push([]); + // We can only add so many lines before we step into the range that the next section's map + // controls. When we get to the last line, then we'll start checking the segments to see if + // they've crossed into the column range. + const stopI = stopLine - lineOffset; + const len = Math.min(decoded.length, stopI + 1); + for (let i = 0; i < len; i++) { + const line = decoded[i]; + // On the 0th loop, the line will already exist due to a previous section, or the line catch up + // loop above. + const out = i === 0 ? mappings[lineOffset] : (mappings[lineOffset + i] = []); + // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the + // map can be multiple lines), it doesn't. + const cOffset = i === 0 ? columnOffset : 0; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const column = cOffset + seg[COLUMN]; + // If this segment steps into the column range that the next section's map controls, we need + // to stop early. + if (i === stopI && column >= stopColumn) + break; + if (seg.length === 1) { + out.push([column]); + continue; + } + const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + if (seg.length === 4) { + out.push([column, sourcesIndex, sourceLine, sourceColumn]); + continue; + } + out.push([column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]); + } + } + } + function append(arr, other) { + for (let i = 0; i < other.length; i++) + arr.push(other[i]); + } + // Sourcemaps don't need to have sourcesContent, and if they don't, we need to create an array of + // equal length to the sources. This is because the sources and sourcesContent are paired arrays, + // where `sourcesContent[i]` is the content of the `sources[i]` file. If we didn't, then joined + // sourcemap would desynchronize the sources/contents. + function fillSourcesContent(len) { + const sourcesContent = []; + for (let i = 0; i < len; i++) + sourcesContent[i] = null; + return sourcesContent; + } + + const INVALID_ORIGINAL_MAPPING = Object.freeze({ + source: null, + line: null, + column: null, + name: null, + }); + const INVALID_GENERATED_MAPPING = Object.freeze({ + line: null, + column: null, + }); + const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; + const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; + const LEAST_UPPER_BOUND = -1; + const GREATEST_LOWER_BOUND = 1; + /** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ + exports.encodedMappings = void 0; + /** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ + exports.decodedMappings = void 0; + /** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ + exports.traceSegment = void 0; + /** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ + exports.originalPositionFor = void 0; + /** + * Finds the source/line/column directly after the mapping returned by originalPositionFor, provided + * the found mapping is from the same source and line as the originalPositionFor mapping. + * + * Eg, in the code `let id = 1`, `originalPositionAfter` could find the mapping associated with `1` + * using the same needle that would return `id` when calling `originalPositionFor`. + */ + exports.generatedPositionFor = void 0; + /** + * Iterates each mapping in generated position order. + */ + exports.eachMapping = void 0; + /** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ + exports.presortedDecodedMap = void 0; + /** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ + exports.decodedMap = void 0; + /** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ + exports.encodedMap = void 0; + class TraceMap { + constructor(map, mapUrl) { + this._decodedMemo = memoizedState(); + this._bySources = undefined; + this._bySourceMemos = undefined; + const isString = typeof map === 'string'; + if (!isString && map.constructor === TraceMap) + return map; + const parsed = (isString ? JSON.parse(map) : map); + const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; + this.version = version; + this.file = file; + this.names = names; + this.sourceRoot = sourceRoot; + this.sources = sources; + this.sourcesContent = sourcesContent; + if (sourceRoot || mapUrl) { + const from = resolve(sourceRoot || '', stripFilename(mapUrl)); + this.resolvedSources = sources.map((s) => resolve(s || '', from)); + } + else { + this.resolvedSources = sources.map((s) => s || ''); + } + const { mappings } = parsed; + if (typeof mappings === 'string') { + this._encoded = mappings; + this._decoded = undefined; + } + else { + this._encoded = undefined; + this._decoded = maybeSort(mappings, isString); + } + } + } + (() => { + exports.encodedMappings = (map) => { + var _a; + return ((_a = map._encoded) !== null && _a !== void 0 ? _a : (map._encoded = sourcemapCodec.encode(map._decoded))); + }; + exports.decodedMappings = (map) => { + return (map._decoded || (map._decoded = sourcemapCodec.decode(map._encoded))); + }; + exports.traceSegment = (map, line, column) => { + const decoded = exports.decodedMappings(map); + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) + return null; + return traceSegmentInternal(decoded[line], map._decodedMemo, line, column, GREATEST_LOWER_BOUND); + }; + exports.originalPositionFor = (map, { line, column, bias }) => { + line--; + if (line < 0) + throw new Error(LINE_GTR_ZERO); + if (column < 0) + throw new Error(COL_GTR_EQ_ZERO); + const decoded = exports.decodedMappings(map); + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) + return INVALID_ORIGINAL_MAPPING; + const segment = traceSegmentInternal(decoded[line], map._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND); + if (segment == null) + return INVALID_ORIGINAL_MAPPING; + if (segment.length == 1) + return INVALID_ORIGINAL_MAPPING; + const { names, resolvedSources } = map; + return { + source: resolvedSources[segment[SOURCES_INDEX]], + line: segment[SOURCE_LINE] + 1, + column: segment[SOURCE_COLUMN], + name: segment.length === 5 ? names[segment[NAMES_INDEX]] : null, + }; + }; + exports.generatedPositionFor = (map, { source, line, column, bias }) => { + line--; + if (line < 0) + throw new Error(LINE_GTR_ZERO); + if (column < 0) + throw new Error(COL_GTR_EQ_ZERO); + const { sources, resolvedSources } = map; + let sourceIndex = sources.indexOf(source); + if (sourceIndex === -1) + sourceIndex = resolvedSources.indexOf(source); + if (sourceIndex === -1) + return INVALID_GENERATED_MAPPING; + const generated = (map._bySources || (map._bySources = buildBySources(exports.decodedMappings(map), (map._bySourceMemos = sources.map(memoizedState))))); + const memos = map._bySourceMemos; + const segments = generated[sourceIndex][line]; + if (segments == null) + return INVALID_GENERATED_MAPPING; + const segment = traceSegmentInternal(segments, memos[sourceIndex], line, column, bias || GREATEST_LOWER_BOUND); + if (segment == null) + return INVALID_GENERATED_MAPPING; + return { + line: segment[REV_GENERATED_LINE] + 1, + column: segment[REV_GENERATED_COLUMN], + }; + }; + exports.eachMapping = (map, cb) => { + const decoded = exports.decodedMappings(map); + const { names, resolvedSources } = map; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const generatedLine = i + 1; + const generatedColumn = seg[0]; + let source = null; + let originalLine = null; + let originalColumn = null; + let name = null; + if (seg.length !== 1) { + source = resolvedSources[seg[1]]; + originalLine = seg[2] + 1; + originalColumn = seg[3]; + } + if (seg.length === 5) + name = names[seg[4]]; + cb({ + generatedLine, + generatedColumn, + source, + originalLine, + originalColumn, + name, + }); + } + } + }; + exports.presortedDecodedMap = (map, mapUrl) => { + const clone = Object.assign({}, map); + clone.mappings = []; + const tracer = new TraceMap(clone, mapUrl); + tracer._decoded = map.mappings; + return tracer; + }; + exports.decodedMap = (map) => { + return { + version: 3, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings: exports.decodedMappings(map), + }; + }; + exports.encodedMap = (map) => { + return { + version: 3, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings: exports.encodedMappings(map), + }; + }; + })(); + function traceSegmentInternal(segments, memo, line, column, bias) { + let index = memoizedBinarySearch(segments, column, memo, line); + if (found) { + index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); + } + else if (bias === LEAST_UPPER_BOUND) + index++; + if (index === -1 || index === segments.length) + return null; + return segments[index]; + } + + exports.AnyMap = AnyMap; + exports.GREATEST_LOWER_BOUND = GREATEST_LOWER_BOUND; + exports.LEAST_UPPER_BOUND = LEAST_UPPER_BOUND; + exports.TraceMap = TraceMap; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=trace-mapping.umd.js.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map new file mode 100644 index 0000000..4ef72e7 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"trace-mapping.umd.js","sources":["../../src/resolve.ts","../../src/strip-filename.ts","../../src/sourcemap-segment.ts","../../src/sort.ts","../../src/binary-search.ts","../../src/by-source.ts","../../src/any-map.ts","../../src/trace-mapping.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["resolveUri","presortedDecodedMap","decodedMappings","encodedMappings","traceSegment","originalPositionFor","generatedPositionFor","eachMapping","decodedMap","encodedMap","encode","decode","bsFound"],"mappings":";;;;;;;;;;aAEwB,OAAO,CAAC,KAAa,EAAE,IAAwB;;;;QAIrE,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,IAAI,IAAI,GAAG,CAAC;QAE7C,OAAOA,8BAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACjC;;ICTA;;;aAGwB,aAAa,CAAC,IAA+B;QACnE,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IAClC;;ICQO,MAAM,MAAM,GAAG,CAAC,CAAC;IACjB,MAAM,aAAa,GAAG,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,CAAC,CAAC;IACtB,MAAM,aAAa,GAAG,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,CAAC,CAAC;IAEtB,MAAM,kBAAkB,GAAG,CAAC,CAAC;IAC7B,MAAM,oBAAoB,GAAG,CAAC;;aClBb,SAAS,CAC/B,QAA8B,EAC9B,KAAc;QAEd,MAAM,aAAa,GAAG,uBAAuB,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QAC3D,IAAI,aAAa,KAAK,QAAQ,CAAC,MAAM;YAAE,OAAO,QAAQ,CAAC;;;QAIvD,IAAI,CAAC,KAAK;YAAE,QAAQ,GAAG,QAAQ,CAAC,KAAK,EAAE,C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AAC,IAAI;gBACd,KAAK,EAAE,GAAG,CAAC,KAAK;gBAChB,UAAU,EAAE,GAAG,CAAC,UAAU;gBAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;gBACpB,cAAc,EAAE,GAAG,CAAC,cAAc;gBAClC,QAAQ,EAAEN,uBAAe,CAAC,GAAG,CAAC;aAC/B,CAAC;SACH,CAAC;IACJ,CAAC,GAAA,CAAA;IAiBH,SAAS,oBAAoB,CAC3B,QAA+C,EAC/C,IAAe,EACf,IAAY,EACZ,MAAc,EACd,IAA4D;QAE5D,IAAI,KAAK,GAAG,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC/D,IAAIS,KAAO,EAAE;YACX,KAAK,GAAG,CAAC,IAAI,KAAK,iBAAiB,GAAG,UAAU,GAAG,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;SACzF;aAAM,IAAI,IAAI,KAAK,iBAAiB;YAAE,KAAK,EAAE,CAAC;QAE/C,IAAI,KAAK,KAAK,CAAC,CAAC,IAAI,KAAK,KAAK,QAAQ,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAC3D,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzB;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts new file mode 100644 index 0000000..08bca6b --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts @@ -0,0 +1,8 @@ +import { TraceMap } from './trace-mapping'; +import type { SectionedSourceMapInput } from './types'; +declare type AnyMap = { + new (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap; + (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap; +}; +export declare const AnyMap: AnyMap; +export {}; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts new file mode 100644 index 0000000..88820e5 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts @@ -0,0 +1,32 @@ +import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment'; +export declare type MemoState = { + lastKey: number; + lastNeedle: number; + lastIndex: number; +}; +export declare let found: boolean; +/** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ +export declare function binarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, low: number, high: number): number; +export declare function upperBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; +export declare function lowerBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; +export declare function memoizedState(): MemoState; +/** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ +export declare function memoizedBinarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, state: MemoState, key: number): number; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts new file mode 100644 index 0000000..8d1e538 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts @@ -0,0 +1,7 @@ +import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment'; +import type { MemoState } from './binary-search'; +export declare type Source = { + __proto__: null; + [line: number]: Exclude[]; +}; +export default function buildBySources(decoded: readonly SourceMapSegment[][], memos: MemoState[]): Source[]; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts new file mode 100644 index 0000000..cf7d4f8 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts @@ -0,0 +1 @@ +export default function resolve(input: string, base: string | undefined): string; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts new file mode 100644 index 0000000..2bfb5dc --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts @@ -0,0 +1,2 @@ +import type { SourceMapSegment } from './sourcemap-segment'; +export default function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][]; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts new file mode 100644 index 0000000..6d70924 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts @@ -0,0 +1,16 @@ +declare type GeneratedColumn = number; +declare type SourcesIndex = number; +declare type SourceLine = number; +declare type SourceColumn = number; +declare type NamesIndex = number; +declare type GeneratedLine = number; +export declare type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; +export declare type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn]; +export declare const COLUMN = 0; +export declare const SOURCES_INDEX = 1; +export declare const SOURCE_LINE = 2; +export declare const SOURCE_COLUMN = 3; +export declare const NAMES_INDEX = 4; +export declare const REV_GENERATED_LINE = 1; +export declare const REV_GENERATED_COLUMN = 2; +export {}; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts new file mode 100644 index 0000000..bead5c1 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts @@ -0,0 +1,4 @@ +/** + * Removes everything after the last "/", but leaves the slash. + */ +export default function stripFilename(path: string | undefined | null): string; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts new file mode 100644 index 0000000..8cd4574 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts @@ -0,0 +1,70 @@ +import type { SourceMapSegment } from './sourcemap-segment'; +import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping } from './types'; +export type { SourceMapSegment } from './sourcemap-segment'; +export type { SourceMapInput, SectionedSourceMapInput, DecodedSourceMap, EncodedSourceMap, SectionedSourceMap, InvalidOriginalMapping, OriginalMapping as Mapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, EachMapping, } from './types'; +export declare const LEAST_UPPER_BOUND = -1; +export declare const GREATEST_LOWER_BOUND = 1; +/** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ +export declare let encodedMappings: (map: TraceMap) => EncodedSourceMap['mappings']; +/** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ +export declare let decodedMappings: (map: TraceMap) => Readonly; +/** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ +export declare let traceSegment: (map: TraceMap, line: number, column: number) => Readonly | null; +/** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ +export declare let originalPositionFor: (map: TraceMap, needle: Needle) => OriginalMapping | InvalidOriginalMapping; +/** + * Finds the source/line/column directly after the mapping returned by originalPositionFor, provided + * the found mapping is from the same source and line as the originalPositionFor mapping. + * + * Eg, in the code `let id = 1`, `originalPositionAfter` could find the mapping associated with `1` + * using the same needle that would return `id` when calling `originalPositionFor`. + */ +export declare let generatedPositionFor: (map: TraceMap, needle: SourceNeedle) => GeneratedMapping | InvalidGeneratedMapping; +/** + * Iterates each mapping in generated position order. + */ +export declare let eachMapping: (map: TraceMap, cb: (mapping: EachMapping) => void) => void; +/** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ +export declare let presortedDecodedMap: (map: DecodedSourceMap, mapUrl?: string) => TraceMap; +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare let decodedMap: (map: TraceMap) => Omit & { + mappings: readonly SourceMapSegment[][]; +}; +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare let encodedMap: (map: TraceMap) => EncodedSourceMap; +export { AnyMap } from './any-map'; +export declare class TraceMap implements SourceMap { + version: SourceMapV3['version']; + file: SourceMapV3['file']; + names: SourceMapV3['names']; + sourceRoot: SourceMapV3['sourceRoot']; + sources: SourceMapV3['sources']; + sourcesContent: SourceMapV3['sourcesContent']; + resolvedSources: string[]; + private _encoded; + private _decoded; + private _decodedMemo; + private _bySources; + private _bySourceMemos; + constructor(map: SourceMapInput, mapUrl?: string | null); +} diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts new file mode 100644 index 0000000..2cc90c0 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts @@ -0,0 +1,85 @@ +import type { SourceMapSegment } from './sourcemap-segment'; +import type { TraceMap } from './trace-mapping'; +export interface SourceMapV3 { + file?: string | null; + names: string[]; + sourceRoot?: string; + sources: (string | null)[]; + sourcesContent?: (string | null)[]; + version: 3; +} +export interface EncodedSourceMap extends SourceMapV3 { + mappings: string; +} +export interface DecodedSourceMap extends SourceMapV3 { + mappings: SourceMapSegment[][]; +} +export interface Section { + offset: { + line: number; + column: number; + }; + map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap; +} +export interface SectionedSourceMap { + file?: string | null; + sections: Section[]; + version: 3; +} +export declare type OriginalMapping = { + source: string | null; + line: number; + column: number; + name: string | null; +}; +export declare type InvalidOriginalMapping = { + source: null; + line: null; + column: null; + name: null; +}; +export declare type GeneratedMapping = { + line: number; + column: number; +}; +export declare type InvalidGeneratedMapping = { + line: null; + column: null; +}; +export declare type SourceMapInput = string | EncodedSourceMap | DecodedSourceMap | TraceMap; +export declare type SectionedSourceMapInput = SourceMapInput | SectionedSourceMap; +export declare type Needle = { + line: number; + column: number; + bias?: 1 | -1; +}; +export declare type SourceNeedle = { + source: string; + line: number; + column: number; + bias?: 1 | -1; +}; +export declare type EachMapping = { + generatedLine: number; + generatedColumn: number; + source: null; + originalLine: null; + originalColumn: null; + name: null; +} | { + generatedLine: number; + generatedColumn: number; + source: string | null; + originalLine: number; + originalColumn: number; + name: string | null; +}; +export declare abstract class SourceMap { + version: SourceMapV3['version']; + file: SourceMapV3['file']; + names: SourceMapV3['names']; + sourceRoot: SourceMapV3['sourceRoot']; + sources: SourceMapV3['sources']; + sourcesContent: SourceMapV3['sourcesContent']; + resolvedSources: SourceMapV3['sources']; +} diff --git a/node_modules/@jridgewell/trace-mapping/package.json b/node_modules/@jridgewell/trace-mapping/package.json new file mode 100644 index 0000000..a957780 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/package.json @@ -0,0 +1,70 @@ +{ + "name": "@jridgewell/trace-mapping", + "version": "0.3.9", + "description": "Trace the original position through a source map", + "keywords": [ + "source", + "map" + ], + "main": "dist/trace-mapping.umd.js", + "module": "dist/trace-mapping.mjs", + "typings": "dist/types/trace-mapping.d.ts", + "files": [ + "dist" + ], + "exports": { + ".": { + "browser": "./dist/trace-mapping.umd.js", + "require": "./dist/trace-mapping.umd.js", + "import": "./dist/trace-mapping.mjs" + }, + "./package.json": "./package.json" + }, + "author": "Justin Ridgewell ", + "repository": { + "type": "git", + "url": "git+https://github.com/jridgewell/trace-mapping.git" + }, + "license": "MIT", + "scripts": { + "benchmark": "run-s build:rollup benchmark:*", + "benchmark:install": "cd benchmark && npm install", + "benchmark:only": "node benchmark/index.mjs", + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.js", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "prebuild": "rm -rf dist", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build", + "test": "run-s -n test:lint test:only", + "test:debug": "ava debug", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts' '**/*.md'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "c8 ava", + "test:watch": "ava --watch" + }, + "devDependencies": { + "@rollup/plugin-typescript": "8.3.0", + "@typescript-eslint/eslint-plugin": "5.10.0", + "@typescript-eslint/parser": "5.10.0", + "ava": "4.0.1", + "benchmark": "2.1.4", + "c8": "7.11.0", + "esbuild": "0.14.14", + "esbuild-node-loader": "0.6.4", + "eslint": "8.7.0", + "eslint-config-prettier": "8.3.0", + "npm-run-all": "4.1.5", + "prettier": "2.5.1", + "rollup": "2.64.0", + "typescript": "4.5.4" + }, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } +} diff --git a/node_modules/accepts/HISTORY.md b/node_modules/accepts/HISTORY.md new file mode 100644 index 0000000..cb5990c --- /dev/null +++ b/node_modules/accepts/HISTORY.md @@ -0,0 +1,243 @@ +1.3.8 / 2022-02-02 +================== + + * deps: mime-types@~2.1.34 + - deps: mime-db@~1.51.0 + * deps: negotiator@0.6.3 + +1.3.7 / 2019-04-29 +================== + + * deps: negotiator@0.6.2 + - Fix sorting charset, encoding, and language with extra parameters + +1.3.6 / 2019-04-28 +================== + + * deps: mime-types@~2.1.24 + - deps: mime-db@~1.40.0 + +1.3.5 / 2018-02-28 +================== + + * deps: mime-types@~2.1.18 + - deps: mime-db@~1.33.0 + +1.3.4 / 2017-08-22 +================== + + * deps: mime-types@~2.1.16 + - deps: mime-db@~1.29.0 + +1.3.3 / 2016-05-02 +================== + + * deps: mime-types@~2.1.11 + - deps: mime-db@~1.23.0 + * deps: negotiator@0.6.1 + - perf: improve `Accept` parsing speed + - perf: improve `Accept-Charset` parsing speed + - perf: improve `Accept-Encoding` parsing speed + - perf: improve `Accept-Language` parsing speed + +1.3.2 / 2016-03-08 +================== + + * deps: mime-types@~2.1.10 + - Fix extension of `application/dash+xml` + - Update primary extension for `audio/mp4` + - deps: mime-db@~1.22.0 + +1.3.1 / 2016-01-19 +================== + + * deps: mime-types@~2.1.9 + - deps: mime-db@~1.21.0 + +1.3.0 / 2015-09-29 +================== + + * deps: mime-types@~2.1.7 + - deps: mime-db@~1.19.0 + * deps: negotiator@0.6.0 + - Fix including type extensions in parameters in `Accept` parsing + - Fix parsing `Accept` parameters with quoted equals + - Fix parsing `Accept` parameters with quoted semicolons + - Lazy-load modules from main entry point + - perf: delay type concatenation until needed + - perf: enable strict mode + - perf: hoist regular expressions + - perf: remove closures getting spec properties + - perf: remove a closure from media type parsing + - perf: remove property delete from media type parsing + +1.2.13 / 2015-09-06 +=================== + + * deps: mime-types@~2.1.6 + - deps: mime-db@~1.18.0 + +1.2.12 / 2015-07-30 +=================== + + * deps: mime-types@~2.1.4 + - deps: mime-db@~1.16.0 + +1.2.11 / 2015-07-16 +=================== + + * deps: mime-types@~2.1.3 + - deps: mime-db@~1.15.0 + +1.2.10 / 2015-07-01 +=================== + + * deps: mime-types@~2.1.2 + - deps: mime-db@~1.14.0 + +1.2.9 / 2015-06-08 +================== + + * deps: mime-types@~2.1.1 + - perf: fix deopt during mapping + +1.2.8 / 2015-06-07 +================== + + * deps: mime-types@~2.1.0 + - deps: mime-db@~1.13.0 + * perf: avoid argument reassignment & argument slice + * perf: avoid negotiator recursive construction + * perf: enable strict mode + * perf: remove unnecessary bitwise operator + +1.2.7 / 2015-05-10 +================== + + * deps: negotiator@0.5.3 + - Fix media type parameter matching to be case-insensitive + +1.2.6 / 2015-05-07 +================== + + * deps: mime-types@~2.0.11 + - deps: mime-db@~1.9.1 + * deps: negotiator@0.5.2 + - Fix comparing media types with quoted values + - Fix splitting media types with quoted commas + +1.2.5 / 2015-03-13 +================== + + * deps: mime-types@~2.0.10 + - deps: mime-db@~1.8.0 + +1.2.4 / 2015-02-14 +================== + + * Support Node.js 0.6 + * deps: mime-types@~2.0.9 + - deps: mime-db@~1.7.0 + * deps: negotiator@0.5.1 + - Fix preference sorting to be stable for long acceptable lists + +1.2.3 / 2015-01-31 +================== + + * deps: mime-types@~2.0.8 + - deps: mime-db@~1.6.0 + +1.2.2 / 2014-12-30 +================== + + * deps: mime-types@~2.0.7 + - deps: mime-db@~1.5.0 + +1.2.1 / 2014-12-30 +================== + + * deps: mime-types@~2.0.5 + - deps: mime-db@~1.3.1 + +1.2.0 / 2014-12-19 +================== + + * deps: negotiator@0.5.0 + - Fix list return order when large accepted list + - Fix missing identity encoding when q=0 exists + - Remove dynamic building of Negotiator class + +1.1.4 / 2014-12-10 +================== + + * deps: mime-types@~2.0.4 + - deps: mime-db@~1.3.0 + +1.1.3 / 2014-11-09 +================== + + * deps: mime-types@~2.0.3 + - deps: mime-db@~1.2.0 + +1.1.2 / 2014-10-14 +================== + + * deps: negotiator@0.4.9 + - Fix error when media type has invalid parameter + +1.1.1 / 2014-09-28 +================== + + * deps: mime-types@~2.0.2 + - deps: mime-db@~1.1.0 + * deps: negotiator@0.4.8 + - Fix all negotiations to be case-insensitive + - Stable sort preferences of same quality according to client order + +1.1.0 / 2014-09-02 +================== + + * update `mime-types` + +1.0.7 / 2014-07-04 +================== + + * Fix wrong type returned from `type` when match after unknown extension + +1.0.6 / 2014-06-24 +================== + + * deps: negotiator@0.4.7 + +1.0.5 / 2014-06-20 +================== + + * fix crash when unknown extension given + +1.0.4 / 2014-06-19 +================== + + * use `mime-types` + +1.0.3 / 2014-06-11 +================== + + * deps: negotiator@0.4.6 + - Order by specificity when quality is the same + +1.0.2 / 2014-05-29 +================== + + * Fix interpretation when header not in request + * deps: pin negotiator@0.4.5 + +1.0.1 / 2014-01-18 +================== + + * Identity encoding isn't always acceptable + * deps: negotiator@~0.4.0 + +1.0.0 / 2013-12-27 +================== + + * Genesis diff --git a/node_modules/accepts/LICENSE b/node_modules/accepts/LICENSE new file mode 100644 index 0000000..0616607 --- /dev/null +++ b/node_modules/accepts/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +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. diff --git a/node_modules/accepts/README.md b/node_modules/accepts/README.md new file mode 100644 index 0000000..82680c5 --- /dev/null +++ b/node_modules/accepts/README.md @@ -0,0 +1,140 @@ +# accepts + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][github-actions-ci-image]][github-actions-ci-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator). +Extracted from [koa](https://www.npmjs.com/package/koa) for general use. + +In addition to negotiator, it allows: + +- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])` + as well as `('text/html', 'application/json')`. +- Allows type shorthands such as `json`. +- Returns `false` when no types match +- Treats non-existent headers as `*` + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install accepts +``` + +## API + +```js +var accepts = require('accepts') +``` + +### accepts(req) + +Create a new `Accepts` object for the given `req`. + +#### .charset(charsets) + +Return the first accepted charset. If nothing in `charsets` is accepted, +then `false` is returned. + +#### .charsets() + +Return the charsets that the request accepts, in the order of the client's +preference (most preferred first). + +#### .encoding(encodings) + +Return the first accepted encoding. If nothing in `encodings` is accepted, +then `false` is returned. + +#### .encodings() + +Return the encodings that the request accepts, in the order of the client's +preference (most preferred first). + +#### .language(languages) + +Return the first accepted language. If nothing in `languages` is accepted, +then `false` is returned. + +#### .languages() + +Return the languages that the request accepts, in the order of the client's +preference (most preferred first). + +#### .type(types) + +Return the first accepted type (and it is returned as the same text as what +appears in the `types` array). If nothing in `types` is accepted, then `false` +is returned. + +The `types` array can contain full MIME types or file extensions. Any value +that is not a full MIME types is passed to `require('mime-types').lookup`. + +#### .types() + +Return the types that the request accepts, in the order of the client's +preference (most preferred first). + +## Examples + +### Simple type negotiation + +This simple example shows how to use `accepts` to return a different typed +respond body based on what the client wants to accept. The server lists it's +preferences in order and will get back the best match between the client and +server. + +```js +var accepts = require('accepts') +var http = require('http') + +function app (req, res) { + var accept = accepts(req) + + // the order of this list is significant; should be server preferred order + switch (accept.type(['json', 'html'])) { + case 'json': + res.setHeader('Content-Type', 'application/json') + res.write('{"hello":"world!"}') + break + case 'html': + res.setHeader('Content-Type', 'text/html') + res.write('hello, world!') + break + default: + // the fallback is text/plain, so no need to specify it above + res.setHeader('Content-Type', 'text/plain') + res.write('hello, world!') + break + } + + res.end() +} + +http.createServer(app).listen(3000) +``` + +You can test this out with the cURL program: +```sh +curl -I -H'Accept: text/html' http://localhost:3000/ +``` + +## License + +[MIT](LICENSE) + +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master +[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master +[github-actions-ci-image]: https://badgen.net/github/checks/jshttp/accepts/master?label=ci +[github-actions-ci-url]: https://github.com/jshttp/accepts/actions/workflows/ci.yml +[node-version-image]: https://badgen.net/npm/node/accepts +[node-version-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/accepts +[npm-url]: https://npmjs.org/package/accepts +[npm-version-image]: https://badgen.net/npm/v/accepts diff --git a/node_modules/accepts/index.js b/node_modules/accepts/index.js new file mode 100644 index 0000000..e9b2f63 --- /dev/null +++ b/node_modules/accepts/index.js @@ -0,0 +1,238 @@ +/*! + * accepts + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var Negotiator = require('negotiator') +var mime = require('mime-types') + +/** + * Module exports. + * @public + */ + +module.exports = Accepts + +/** + * Create a new Accepts object for the given req. + * + * @param {object} req + * @public + */ + +function Accepts (req) { + if (!(this instanceof Accepts)) { + return new Accepts(req) + } + + this.headers = req.headers + this.negotiator = new Negotiator(req) +} + +/** + * Check if the given `type(s)` is acceptable, returning + * the best match when true, otherwise `undefined`, in which + * case you should respond with 406 "Not Acceptable". + * + * The `type` value may be a single mime type string + * such as "application/json", the extension name + * such as "json" or an array `["json", "html", "text/plain"]`. When a list + * or array is given the _best_ match, if any is returned. + * + * Examples: + * + * // Accept: text/html + * this.types('html'); + * // => "html" + * + * // Accept: text/*, application/json + * this.types('html'); + * // => "html" + * this.types('text/html'); + * // => "text/html" + * this.types('json', 'text'); + * // => "json" + * this.types('application/json'); + * // => "application/json" + * + * // Accept: text/*, application/json + * this.types('image/png'); + * this.types('png'); + * // => undefined + * + * // Accept: text/*;q=.5, application/json + * this.types(['html', 'json']); + * this.types('html', 'json'); + * // => "json" + * + * @param {String|Array} types... + * @return {String|Array|Boolean} + * @public + */ + +Accepts.prototype.type = +Accepts.prototype.types = function (types_) { + var types = types_ + + // support flattened arguments + if (types && !Array.isArray(types)) { + types = new Array(arguments.length) + for (var i = 0; i < types.length; i++) { + types[i] = arguments[i] + } + } + + // no types, return all requested types + if (!types || types.length === 0) { + return this.negotiator.mediaTypes() + } + + // no accept header, return first given type + if (!this.headers.accept) { + return types[0] + } + + var mimes = types.map(extToMime) + var accepts = this.negotiator.mediaTypes(mimes.filter(validMime)) + var first = accepts[0] + + return first + ? types[mimes.indexOf(first)] + : false +} + +/** + * Return accepted encodings or best fit based on `encodings`. + * + * Given `Accept-Encoding: gzip, deflate` + * an array sorted by quality is returned: + * + * ['gzip', 'deflate'] + * + * @param {String|Array} encodings... + * @return {String|Array} + * @public + */ + +Accepts.prototype.encoding = +Accepts.prototype.encodings = function (encodings_) { + var encodings = encodings_ + + // support flattened arguments + if (encodings && !Array.isArray(encodings)) { + encodings = new Array(arguments.length) + for (var i = 0; i < encodings.length; i++) { + encodings[i] = arguments[i] + } + } + + // no encodings, return all requested encodings + if (!encodings || encodings.length === 0) { + return this.negotiator.encodings() + } + + return this.negotiator.encodings(encodings)[0] || false +} + +/** + * Return accepted charsets or best fit based on `charsets`. + * + * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5` + * an array sorted by quality is returned: + * + * ['utf-8', 'utf-7', 'iso-8859-1'] + * + * @param {String|Array} charsets... + * @return {String|Array} + * @public + */ + +Accepts.prototype.charset = +Accepts.prototype.charsets = function (charsets_) { + var charsets = charsets_ + + // support flattened arguments + if (charsets && !Array.isArray(charsets)) { + charsets = new Array(arguments.length) + for (var i = 0; i < charsets.length; i++) { + charsets[i] = arguments[i] + } + } + + // no charsets, return all requested charsets + if (!charsets || charsets.length === 0) { + return this.negotiator.charsets() + } + + return this.negotiator.charsets(charsets)[0] || false +} + +/** + * Return accepted languages or best fit based on `langs`. + * + * Given `Accept-Language: en;q=0.8, es, pt` + * an array sorted by quality is returned: + * + * ['es', 'pt', 'en'] + * + * @param {String|Array} langs... + * @return {Array|String} + * @public + */ + +Accepts.prototype.lang = +Accepts.prototype.langs = +Accepts.prototype.language = +Accepts.prototype.languages = function (languages_) { + var languages = languages_ + + // support flattened arguments + if (languages && !Array.isArray(languages)) { + languages = new Array(arguments.length) + for (var i = 0; i < languages.length; i++) { + languages[i] = arguments[i] + } + } + + // no languages, return all requested languages + if (!languages || languages.length === 0) { + return this.negotiator.languages() + } + + return this.negotiator.languages(languages)[0] || false +} + +/** + * Convert extnames to mime. + * + * @param {String} type + * @return {String} + * @private + */ + +function extToMime (type) { + return type.indexOf('/') === -1 + ? mime.lookup(type) + : type +} + +/** + * Check if mime is valid. + * + * @param {String} type + * @return {String} + * @private + */ + +function validMime (type) { + return typeof type === 'string' +} diff --git a/node_modules/accepts/package.json b/node_modules/accepts/package.json new file mode 100644 index 0000000..0f2d15d --- /dev/null +++ b/node_modules/accepts/package.json @@ -0,0 +1,47 @@ +{ + "name": "accepts", + "description": "Higher-level content negotiation", + "version": "1.3.8", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)" + ], + "license": "MIT", + "repository": "jshttp/accepts", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "devDependencies": { + "deep-equal": "1.0.1", + "eslint": "7.32.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "4.3.1", + "eslint-plugin-standard": "4.1.0", + "mocha": "9.2.0", + "nyc": "15.1.0" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + }, + "keywords": [ + "content", + "negotiation", + "accept", + "accepts" + ] +} diff --git a/node_modules/acorn-walk/CHANGELOG.md b/node_modules/acorn-walk/CHANGELOG.md new file mode 100644 index 0000000..0b4eea8 --- /dev/null +++ b/node_modules/acorn-walk/CHANGELOG.md @@ -0,0 +1,181 @@ +## 8.3.1 (2023-12-06) + +### Bug fixes + +Add `Function` and `Class` to the `AggregateType` type, so that they can be used in walkers without raising a type error. + +Visitor functions are now called in such a way that their `this` refers to the object they are part of. + +## 8.3.0 (2023-10-26) + +### New features + +Use a set of new, much more precise, TypeScript types. + +## 8.2.0 (2021-09-06) + +### New features + +Add support for walking ES2022 class static blocks. + +## 8.1.1 (2021-06-29) + +### Bug fixes + +Include `base` in the type declarations. + +## 8.1.0 (2021-04-24) + +### New features + +Support node types for class fields and private methods. + +## 8.0.2 (2021-01-25) + +### Bug fixes + +Adjust package.json to work with Node 12.16.0 and 13.0-13.6. + +## 8.0.0 (2021-01-05) + +### Bug fixes + +Fix a bug where `full` and `fullAncestor` would skip nodes with overridden types. + +## 8.0.0 (2020-08-12) + +### New features + +The package can now be loaded directly as an ECMAScript module in node 13+. + +## 7.2.0 (2020-06-17) + +### New features + +Support optional chaining and nullish coalescing. + +Support `import.meta`. + +Add support for `export * as ns from "source"`. + +## 7.1.1 (2020-02-13) + +### Bug fixes + +Clean up the type definitions to actually work well with the main parser. + +## 7.1.0 (2020-02-11) + +### New features + +Add a TypeScript definition file for the library. + +## 7.0.0 (2017-08-12) + +### New features + +Support walking `ImportExpression` nodes. + +## 6.2.0 (2017-07-04) + +### New features + +Add support for `Import` nodes. + +## 6.1.0 (2018-09-28) + +### New features + +The walker now walks `TemplateElement` nodes. + +## 6.0.1 (2018-09-14) + +### Bug fixes + +Fix bad "main" field in package.json. + +## 6.0.0 (2018-09-14) + +### Breaking changes + +This is now a separate package, `acorn-walk`, rather than part of the main `acorn` package. + +The `ScopeBody` and `ScopeExpression` meta-node-types are no longer supported. + +## 5.7.1 (2018-06-15) + +### Bug fixes + +Make sure the walker and bin files are rebuilt on release (the previous release didn't get the up-to-date versions). + +## 5.7.0 (2018-06-15) + +### Bug fixes + +Fix crash in walker when walking a binding-less catch node. + +## 5.6.2 (2018-06-05) + +### Bug fixes + +In the walker, go back to allowing the `baseVisitor` argument to be null to default to the default base everywhere. + +## 5.6.1 (2018-06-01) + +### Bug fixes + +Fix regression when passing `null` as fourth argument to `walk.recursive`. + +## 5.6.0 (2018-05-31) + +### Bug fixes + +Fix a bug in the walker that caused a crash when walking an object pattern spread. + +## 5.5.1 (2018-03-06) + +### Bug fixes + +Fix regression in walker causing property values in object patterns to be walked as expressions. + +## 5.5.0 (2018-02-27) + +### Bug fixes + +Support object spread in the AST walker. + +## 5.4.1 (2018-02-02) + +### Bug fixes + +5.4.0 somehow accidentally included an old version of walk.js. + +## 5.2.0 (2017-10-30) + +### Bug fixes + +The `full` and `fullAncestor` walkers no longer visit nodes multiple times. + +## 5.1.0 (2017-07-05) + +### New features + +New walker functions `full` and `fullAncestor`. + +## 3.2.0 (2016-06-07) + +### New features + +Make it possible to use `visit.ancestor` with a walk state. + +## 3.1.0 (2016-04-18) + +### New features + +The walker now allows defining handlers for `CatchClause` nodes. + +## 2.5.2 (2015-10-27) + +### Fixes + +Fix bug where the walker walked an exported `let` statement as an expression. diff --git a/node_modules/acorn-walk/LICENSE b/node_modules/acorn-walk/LICENSE new file mode 100644 index 0000000..d6be6db --- /dev/null +++ b/node_modules/acorn-walk/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (C) 2012-2020 by various contributors (see AUTHORS) + +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. diff --git a/node_modules/acorn-walk/README.md b/node_modules/acorn-walk/README.md new file mode 100644 index 0000000..3c18a2c --- /dev/null +++ b/node_modules/acorn-walk/README.md @@ -0,0 +1,124 @@ +# Acorn AST walker + +An abstract syntax tree walker for the +[ESTree](https://github.com/estree/estree) format. + +## Community + +Acorn is open source software released under an +[MIT license](https://github.com/acornjs/acorn/blob/master/acorn-walk/LICENSE). + +You are welcome to +[report bugs](https://github.com/acornjs/acorn/issues) or create pull +requests on [github](https://github.com/acornjs/acorn). + +## Installation + +The easiest way to install acorn is from [`npm`](https://www.npmjs.com/): + +```sh +npm install acorn-walk +``` + +Alternately, you can download the source and build acorn yourself: + +```sh +git clone https://github.com/acornjs/acorn.git +cd acorn +npm install +``` + +## Interface + +An algorithm for recursing through a syntax tree is stored as an +object, with a property for each tree node type holding a function +that will recurse through such a node. There are several ways to run +such a walker. + +**simple**`(node, visitors, base, state)` does a 'simple' walk over a +tree. `node` should be the AST node to walk, and `visitors` an object +with properties whose names correspond to node types in the [ESTree +spec](https://github.com/estree/estree). The properties should contain +functions that will be called with the node object and, if applicable +the state at that point. The last two arguments are optional. `base` +is a walker algorithm, and `state` is a start state. The default +walker will simply visit all statements and expressions and not +produce a meaningful state. (An example of a use of state is to track +scope at each point in the tree.) + +```js +const acorn = require("acorn") +const walk = require("acorn-walk") + +walk.simple(acorn.parse("let x = 10"), { + Literal(node) { + console.log(`Found a literal: ${node.value}`) + } +}) +``` + +**ancestor**`(node, visitors, base, state)` does a 'simple' walk over +a tree, building up an array of ancestor nodes (including the current node) +and passing the array to the callbacks as a third parameter. + +```js +const acorn = require("acorn") +const walk = require("acorn-walk") + +walk.ancestor(acorn.parse("foo('hi')"), { + Literal(_node, _state, ancestors) { + console.log("This literal's ancestors are:", ancestors.map(n => n.type)) + } +}) +``` + +**recursive**`(node, state, functions, base)` does a 'recursive' +walk, where the walker functions are responsible for continuing the +walk on the child nodes of their target node. `state` is the start +state, and `functions` should contain an object that maps node types +to walker functions. Such functions are called with `(node, state, c)` +arguments, and can cause the walk to continue on a sub-node by calling +the `c` argument on it with `(node, state)` arguments. The optional +`base` argument provides the fallback walker functions for node types +that aren't handled in the `functions` object. If not given, the +default walkers will be used. + +**make**`(functions, base)` builds a new walker object by using the +walker functions in `functions` and filling in the missing ones by +taking defaults from `base`. + +**full**`(node, callback, base, state)` does a 'full' walk over a +tree, calling the callback with the arguments (node, state, type) for +each node + +**fullAncestor**`(node, callback, base, state)` does a 'full' walk +over a tree, building up an array of ancestor nodes (including the +current node) and passing the array to the callbacks as a third +parameter. + +```js +const acorn = require("acorn") +const walk = require("acorn-walk") + +walk.full(acorn.parse("1 + 1"), node => { + console.log(`There's a ${node.type} node at ${node.ch}`) +}) +``` + +**findNodeAt**`(node, start, end, test, base, state)` tries to locate +a node in a tree at the given start and/or end offsets, which +satisfies the predicate `test`. `start` and `end` can be either `null` +(as wildcard) or a number. `test` may be a string (indicating a node +type) or a function that takes `(nodeType, node)` arguments and +returns a boolean indicating whether this node is interesting. `base` +and `state` are optional, and can be used to specify a custom walker. +Nodes are tested from inner to outer, so if two nodes match the +boundaries, the inner one will be preferred. + +**findNodeAround**`(node, pos, test, base, state)` is a lot like +`findNodeAt`, but will match any node that exists 'around' (spanning) +the given position. + +**findNodeAfter**`(node, pos, test, base, state)` is similar to +`findNodeAround`, but will match all nodes *after* the given position +(testing outer nodes before inner nodes). diff --git a/node_modules/acorn-walk/dist/walk.d.mts b/node_modules/acorn-walk/dist/walk.d.mts new file mode 100644 index 0000000..e07a6af --- /dev/null +++ b/node_modules/acorn-walk/dist/walk.d.mts @@ -0,0 +1,177 @@ +import * as acorn from "acorn" + +export type FullWalkerCallback = ( + node: acorn.Node, + state: TState, + type: string +) => void + +export type FullAncestorWalkerCallback = ( + node: acorn.Node, + state: TState, + ancestors: acorn.Node[], + type: string +) => void + +type AggregateType = { + Expression: acorn.Expression, + Statement: acorn.Statement, + Function: acorn.Function, + Class: acorn.Class, + Pattern: acorn.Pattern, + ForInit: acorn.VariableDeclaration | acorn.Expression +} + +export type SimpleVisitors = { + [type in acorn.AnyNode["type"]]?: (node: Extract, state: TState) => void +} & { + [type in keyof AggregateType]?: (node: AggregateType[type], state: TState) => void +} + +export type AncestorVisitors = { + [type in acorn.AnyNode["type"]]?: ( node: Extract, state: TState, ancestors: acorn.Node[] +) => void +} & { + [type in keyof AggregateType]?: (node: AggregateType[type], state: TState, ancestors: acorn.Node[]) => void +} + +export type WalkerCallback = (node: acorn.Node, state: TState) => void + +export type RecursiveVisitors = { + [type in acorn.AnyNode["type"]]?: ( node: Extract, state: TState, callback: WalkerCallback) => void +} & { + [type in keyof AggregateType]?: (node: AggregateType[type], state: TState, callback: WalkerCallback) => void +} + +export type FindPredicate = (type: string, node: acorn.Node) => boolean + +export interface Found { + node: acorn.Node, + state: TState +} + +/** + * does a 'simple' walk over a tree + * @param node the AST node to walk + * @param visitors an object with properties whose names correspond to node types in the {@link https://github.com/estree/estree | ESTree spec}. The properties should contain functions that will be called with the node object and, if applicable the state at that point. + * @param base a walker algorithm + * @param state a start state. The default walker will simply visit all statements and expressions and not produce a meaningful state. (An example of a use of state is to track scope at each point in the tree.) + */ +export function simple( + node: acorn.Node, + visitors: SimpleVisitors, + base?: RecursiveVisitors, + state?: TState +): void + +/** + * does a 'simple' walk over a tree, building up an array of ancestor nodes (including the current node) and passing the array to the callbacks as a third parameter. + * @param node + * @param visitors + * @param base + * @param state + */ +export function ancestor( + node: acorn.Node, + visitors: AncestorVisitors, + base?: RecursiveVisitors, + state?: TState + ): void + +/** + * does a 'recursive' walk, where the walker functions are responsible for continuing the walk on the child nodes of their target node. + * @param node + * @param state the start state + * @param functions contain an object that maps node types to walker functions + * @param base provides the fallback walker functions for node types that aren't handled in the {@link functions} object. If not given, the default walkers will be used. + */ +export function recursive( + node: acorn.Node, + state: TState, + functions: RecursiveVisitors, + base?: RecursiveVisitors +): void + +/** + * does a 'full' walk over a tree, calling the {@link callback} with the arguments (node, state, type) for each node + * @param node + * @param callback + * @param base + * @param state + */ +export function full( + node: acorn.Node, + callback: FullWalkerCallback, + base?: RecursiveVisitors, + state?: TState +): void + +/** + * does a 'full' walk over a tree, building up an array of ancestor nodes (including the current node) and passing the array to the callbacks as a third parameter. + * @param node + * @param callback + * @param base + * @param state + */ +export function fullAncestor( + node: acorn.Node, + callback: FullAncestorWalkerCallback, + base?: RecursiveVisitors, + state?: TState +): void + +/** + * builds a new walker object by using the walker functions in {@link functions} and filling in the missing ones by taking defaults from {@link base}. + * @param functions + * @param base + */ +export function make( + functions: RecursiveVisitors, + base?: RecursiveVisitors +): RecursiveVisitors + +/** + * tries to locate a node in a tree at the given start and/or end offsets, which satisfies the predicate test. {@link start} and {@link end} can be either `null` (as wildcard) or a `number`. {@link test} may be a string (indicating a node type) or a function that takes (nodeType, node) arguments and returns a boolean indicating whether this node is interesting. {@link base} and {@link state} are optional, and can be used to specify a custom walker. Nodes are tested from inner to outer, so if two nodes match the boundaries, the inner one will be preferred. + * @param node + * @param start + * @param end + * @param type + * @param base + * @param state + */ +export function findNodeAt( + node: acorn.Node, + start: number | undefined, + end?: number | undefined, + type?: FindPredicate | string, + base?: RecursiveVisitors, + state?: TState +): Found | undefined + +/** + * like {@link findNodeAt}, but will match any node that exists 'around' (spanning) the given position. + * @param node + * @param start + * @param type + * @param base + * @param state + */ +export function findNodeAround( + node: acorn.Node, + start: number | undefined, + type?: FindPredicate | string, + base?: RecursiveVisitors, + state?: TState +): Found | undefined + +/** + * Find the outermost matching node after a given position. + */ +export const findNodeAfter: typeof findNodeAround + +/** + * Find the outermost matching node before a given position. + */ +export const findNodeBefore: typeof findNodeAround + +export const base: RecursiveVisitors diff --git a/node_modules/acorn-walk/dist/walk.d.ts b/node_modules/acorn-walk/dist/walk.d.ts new file mode 100644 index 0000000..e07a6af --- /dev/null +++ b/node_modules/acorn-walk/dist/walk.d.ts @@ -0,0 +1,177 @@ +import * as acorn from "acorn" + +export type FullWalkerCallback = ( + node: acorn.Node, + state: TState, + type: string +) => void + +export type FullAncestorWalkerCallback = ( + node: acorn.Node, + state: TState, + ancestors: acorn.Node[], + type: string +) => void + +type AggregateType = { + Expression: acorn.Expression, + Statement: acorn.Statement, + Function: acorn.Function, + Class: acorn.Class, + Pattern: acorn.Pattern, + ForInit: acorn.VariableDeclaration | acorn.Expression +} + +export type SimpleVisitors = { + [type in acorn.AnyNode["type"]]?: (node: Extract, state: TState) => void +} & { + [type in keyof AggregateType]?: (node: AggregateType[type], state: TState) => void +} + +export type AncestorVisitors = { + [type in acorn.AnyNode["type"]]?: ( node: Extract, state: TState, ancestors: acorn.Node[] +) => void +} & { + [type in keyof AggregateType]?: (node: AggregateType[type], state: TState, ancestors: acorn.Node[]) => void +} + +export type WalkerCallback = (node: acorn.Node, state: TState) => void + +export type RecursiveVisitors = { + [type in acorn.AnyNode["type"]]?: ( node: Extract, state: TState, callback: WalkerCallback) => void +} & { + [type in keyof AggregateType]?: (node: AggregateType[type], state: TState, callback: WalkerCallback) => void +} + +export type FindPredicate = (type: string, node: acorn.Node) => boolean + +export interface Found { + node: acorn.Node, + state: TState +} + +/** + * does a 'simple' walk over a tree + * @param node the AST node to walk + * @param visitors an object with properties whose names correspond to node types in the {@link https://github.com/estree/estree | ESTree spec}. The properties should contain functions that will be called with the node object and, if applicable the state at that point. + * @param base a walker algorithm + * @param state a start state. The default walker will simply visit all statements and expressions and not produce a meaningful state. (An example of a use of state is to track scope at each point in the tree.) + */ +export function simple( + node: acorn.Node, + visitors: SimpleVisitors, + base?: RecursiveVisitors, + state?: TState +): void + +/** + * does a 'simple' walk over a tree, building up an array of ancestor nodes (including the current node) and passing the array to the callbacks as a third parameter. + * @param node + * @param visitors + * @param base + * @param state + */ +export function ancestor( + node: acorn.Node, + visitors: AncestorVisitors, + base?: RecursiveVisitors, + state?: TState + ): void + +/** + * does a 'recursive' walk, where the walker functions are responsible for continuing the walk on the child nodes of their target node. + * @param node + * @param state the start state + * @param functions contain an object that maps node types to walker functions + * @param base provides the fallback walker functions for node types that aren't handled in the {@link functions} object. If not given, the default walkers will be used. + */ +export function recursive( + node: acorn.Node, + state: TState, + functions: RecursiveVisitors, + base?: RecursiveVisitors +): void + +/** + * does a 'full' walk over a tree, calling the {@link callback} with the arguments (node, state, type) for each node + * @param node + * @param callback + * @param base + * @param state + */ +export function full( + node: acorn.Node, + callback: FullWalkerCallback, + base?: RecursiveVisitors, + state?: TState +): void + +/** + * does a 'full' walk over a tree, building up an array of ancestor nodes (including the current node) and passing the array to the callbacks as a third parameter. + * @param node + * @param callback + * @param base + * @param state + */ +export function fullAncestor( + node: acorn.Node, + callback: FullAncestorWalkerCallback, + base?: RecursiveVisitors, + state?: TState +): void + +/** + * builds a new walker object by using the walker functions in {@link functions} and filling in the missing ones by taking defaults from {@link base}. + * @param functions + * @param base + */ +export function make( + functions: RecursiveVisitors, + base?: RecursiveVisitors +): RecursiveVisitors + +/** + * tries to locate a node in a tree at the given start and/or end offsets, which satisfies the predicate test. {@link start} and {@link end} can be either `null` (as wildcard) or a `number`. {@link test} may be a string (indicating a node type) or a function that takes (nodeType, node) arguments and returns a boolean indicating whether this node is interesting. {@link base} and {@link state} are optional, and can be used to specify a custom walker. Nodes are tested from inner to outer, so if two nodes match the boundaries, the inner one will be preferred. + * @param node + * @param start + * @param end + * @param type + * @param base + * @param state + */ +export function findNodeAt( + node: acorn.Node, + start: number | undefined, + end?: number | undefined, + type?: FindPredicate | string, + base?: RecursiveVisitors, + state?: TState +): Found | undefined + +/** + * like {@link findNodeAt}, but will match any node that exists 'around' (spanning) the given position. + * @param node + * @param start + * @param type + * @param base + * @param state + */ +export function findNodeAround( + node: acorn.Node, + start: number | undefined, + type?: FindPredicate | string, + base?: RecursiveVisitors, + state?: TState +): Found | undefined + +/** + * Find the outermost matching node after a given position. + */ +export const findNodeAfter: typeof findNodeAround + +/** + * Find the outermost matching node before a given position. + */ +export const findNodeBefore: typeof findNodeAround + +export const base: RecursiveVisitors diff --git a/node_modules/acorn-walk/dist/walk.js b/node_modules/acorn-walk/dist/walk.js new file mode 100644 index 0000000..580df64 --- /dev/null +++ b/node_modules/acorn-walk/dist/walk.js @@ -0,0 +1,461 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.acorn = global.acorn || {}, global.acorn.walk = {}))); +})(this, (function (exports) { 'use strict'; + + // AST walker module for ESTree compatible trees + + // A simple walk is one where you simply specify callbacks to be + // called on specific nodes. The last two arguments are optional. A + // simple use would be + // + // walk.simple(myTree, { + // Expression: function(node) { ... } + // }); + // + // to do something with all expressions. All ESTree node types + // can be used to identify node types, as well as Expression and + // Statement, which denote categories of nodes. + // + // The base argument can be used to pass a custom (recursive) + // walker, and state can be used to give this walked an initial + // state. + + function simple(node, visitors, baseVisitor, state, override) { + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { + var type = override || node.type; + baseVisitor[type](node, st, c); + if (visitors[type]) { visitors[type](node, st); } + })(node, state, override); + } + + // An ancestor walk keeps an array of ancestor nodes (including the + // current node) and passes them to the callback as third parameter + // (and also as state parameter when no other state is present). + function ancestor(node, visitors, baseVisitor, state, override) { + var ancestors = []; + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { + var type = override || node.type; + var isNew = node !== ancestors[ancestors.length - 1]; + if (isNew) { ancestors.push(node); } + baseVisitor[type](node, st, c); + if (visitors[type]) { visitors[type](node, st || ancestors, ancestors); } + if (isNew) { ancestors.pop(); } + })(node, state, override); + } + + // A recursive walk is one where your functions override the default + // walkers. They can modify and replace the state parameter that's + // threaded through the walk, and can opt how and whether to walk + // their child nodes (by calling their third argument on these + // nodes). + function recursive(node, state, funcs, baseVisitor, override) { + var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor + ;(function c(node, st, override) { + visitor[override || node.type](node, st, c); + })(node, state, override); + } + + function makeTest(test) { + if (typeof test === "string") + { return function (type) { return type === test; } } + else if (!test) + { return function () { return true; } } + else + { return test } + } + + var Found = function Found(node, state) { this.node = node; this.state = state; }; + + // A full walk triggers the callback on each node + function full(node, callback, baseVisitor, state, override) { + if (!baseVisitor) { baseVisitor = base; } + var last + ;(function c(node, st, override) { + var type = override || node.type; + baseVisitor[type](node, st, c); + if (last !== node) { + callback(node, st, type); + last = node; + } + })(node, state, override); + } + + // An fullAncestor walk is like an ancestor walk, but triggers + // the callback on each node + function fullAncestor(node, callback, baseVisitor, state) { + if (!baseVisitor) { baseVisitor = base; } + var ancestors = [], last + ;(function c(node, st, override) { + var type = override || node.type; + var isNew = node !== ancestors[ancestors.length - 1]; + if (isNew) { ancestors.push(node); } + baseVisitor[type](node, st, c); + if (last !== node) { + callback(node, st || ancestors, ancestors, type); + last = node; + } + if (isNew) { ancestors.pop(); } + })(node, state); + } + + // Find a node with a given start, end, and type (all are optional, + // null can be used as wildcard). Returns a {node, state} object, or + // undefined when it doesn't find a matching node. + function findNodeAt(node, start, end, test, baseVisitor, state) { + if (!baseVisitor) { baseVisitor = base; } + test = makeTest(test); + try { + (function c(node, st, override) { + var type = override || node.type; + if ((start == null || node.start <= start) && + (end == null || node.end >= end)) + { baseVisitor[type](node, st, c); } + if ((start == null || node.start === start) && + (end == null || node.end === end) && + test(type, node)) + { throw new Found(node, st) } + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } + } + + // Find the innermost node of a given type that contains the given + // position. Interface similar to findNodeAt. + function findNodeAround(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + try { + (function c(node, st, override) { + var type = override || node.type; + if (node.start > pos || node.end < pos) { return } + baseVisitor[type](node, st, c); + if (test(type, node)) { throw new Found(node, st) } + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } + } + + // Find the outermost matching node after a given position. + function findNodeAfter(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + try { + (function c(node, st, override) { + if (node.end < pos) { return } + var type = override || node.type; + if (node.start >= pos && test(type, node)) { throw new Found(node, st) } + baseVisitor[type](node, st, c); + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } + } + + // Find the outermost matching node before a given position. + function findNodeBefore(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + var max + ;(function c(node, st, override) { + if (node.start > pos) { return } + var type = override || node.type; + if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) + { max = new Found(node, st); } + baseVisitor[type](node, st, c); + })(node, state); + return max + } + + // Used to create a custom walker. Will fill in all missing node + // type properties with the defaults. + function make(funcs, baseVisitor) { + var visitor = Object.create(baseVisitor || base); + for (var type in funcs) { visitor[type] = funcs[type]; } + return visitor + } + + function skipThrough(node, st, c) { c(node, st); } + function ignore(_node, _st, _c) {} + + // Node walkers. + + var base = {}; + + base.Program = base.BlockStatement = base.StaticBlock = function (node, st, c) { + for (var i = 0, list = node.body; i < list.length; i += 1) + { + var stmt = list[i]; + + c(stmt, st, "Statement"); + } + }; + base.Statement = skipThrough; + base.EmptyStatement = ignore; + base.ExpressionStatement = base.ParenthesizedExpression = base.ChainExpression = + function (node, st, c) { return c(node.expression, st, "Expression"); }; + base.IfStatement = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.consequent, st, "Statement"); + if (node.alternate) { c(node.alternate, st, "Statement"); } + }; + base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); }; + base.BreakStatement = base.ContinueStatement = ignore; + base.WithStatement = function (node, st, c) { + c(node.object, st, "Expression"); + c(node.body, st, "Statement"); + }; + base.SwitchStatement = function (node, st, c) { + c(node.discriminant, st, "Expression"); + for (var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1) { + var cs = list$1[i$1]; + + if (cs.test) { c(cs.test, st, "Expression"); } + for (var i = 0, list = cs.consequent; i < list.length; i += 1) + { + var cons = list[i]; + + c(cons, st, "Statement"); + } + } + }; + base.SwitchCase = function (node, st, c) { + if (node.test) { c(node.test, st, "Expression"); } + for (var i = 0, list = node.consequent; i < list.length; i += 1) + { + var cons = list[i]; + + c(cons, st, "Statement"); + } + }; + base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) { + if (node.argument) { c(node.argument, st, "Expression"); } + }; + base.ThrowStatement = base.SpreadElement = + function (node, st, c) { return c(node.argument, st, "Expression"); }; + base.TryStatement = function (node, st, c) { + c(node.block, st, "Statement"); + if (node.handler) { c(node.handler, st); } + if (node.finalizer) { c(node.finalizer, st, "Statement"); } + }; + base.CatchClause = function (node, st, c) { + if (node.param) { c(node.param, st, "Pattern"); } + c(node.body, st, "Statement"); + }; + base.WhileStatement = base.DoWhileStatement = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.body, st, "Statement"); + }; + base.ForStatement = function (node, st, c) { + if (node.init) { c(node.init, st, "ForInit"); } + if (node.test) { c(node.test, st, "Expression"); } + if (node.update) { c(node.update, st, "Expression"); } + c(node.body, st, "Statement"); + }; + base.ForInStatement = base.ForOfStatement = function (node, st, c) { + c(node.left, st, "ForInit"); + c(node.right, st, "Expression"); + c(node.body, st, "Statement"); + }; + base.ForInit = function (node, st, c) { + if (node.type === "VariableDeclaration") { c(node, st); } + else { c(node, st, "Expression"); } + }; + base.DebuggerStatement = ignore; + + base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); }; + base.VariableDeclaration = function (node, st, c) { + for (var i = 0, list = node.declarations; i < list.length; i += 1) + { + var decl = list[i]; + + c(decl, st); + } + }; + base.VariableDeclarator = function (node, st, c) { + c(node.id, st, "Pattern"); + if (node.init) { c(node.init, st, "Expression"); } + }; + + base.Function = function (node, st, c) { + if (node.id) { c(node.id, st, "Pattern"); } + for (var i = 0, list = node.params; i < list.length; i += 1) + { + var param = list[i]; + + c(param, st, "Pattern"); + } + c(node.body, st, node.expression ? "Expression" : "Statement"); + }; + + base.Pattern = function (node, st, c) { + if (node.type === "Identifier") + { c(node, st, "VariablePattern"); } + else if (node.type === "MemberExpression") + { c(node, st, "MemberPattern"); } + else + { c(node, st); } + }; + base.VariablePattern = ignore; + base.MemberPattern = skipThrough; + base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); }; + base.ArrayPattern = function (node, st, c) { + for (var i = 0, list = node.elements; i < list.length; i += 1) { + var elt = list[i]; + + if (elt) { c(elt, st, "Pattern"); } + } + }; + base.ObjectPattern = function (node, st, c) { + for (var i = 0, list = node.properties; i < list.length; i += 1) { + var prop = list[i]; + + if (prop.type === "Property") { + if (prop.computed) { c(prop.key, st, "Expression"); } + c(prop.value, st, "Pattern"); + } else if (prop.type === "RestElement") { + c(prop.argument, st, "Pattern"); + } + } + }; + + base.Expression = skipThrough; + base.ThisExpression = base.Super = base.MetaProperty = ignore; + base.ArrayExpression = function (node, st, c) { + for (var i = 0, list = node.elements; i < list.length; i += 1) { + var elt = list[i]; + + if (elt) { c(elt, st, "Expression"); } + } + }; + base.ObjectExpression = function (node, st, c) { + for (var i = 0, list = node.properties; i < list.length; i += 1) + { + var prop = list[i]; + + c(prop, st); + } + }; + base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration; + base.SequenceExpression = function (node, st, c) { + for (var i = 0, list = node.expressions; i < list.length; i += 1) + { + var expr = list[i]; + + c(expr, st, "Expression"); + } + }; + base.TemplateLiteral = function (node, st, c) { + for (var i = 0, list = node.quasis; i < list.length; i += 1) + { + var quasi = list[i]; + + c(quasi, st); + } + + for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) + { + var expr = list$1[i$1]; + + c(expr, st, "Expression"); + } + }; + base.TemplateElement = ignore; + base.UnaryExpression = base.UpdateExpression = function (node, st, c) { + c(node.argument, st, "Expression"); + }; + base.BinaryExpression = base.LogicalExpression = function (node, st, c) { + c(node.left, st, "Expression"); + c(node.right, st, "Expression"); + }; + base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) { + c(node.left, st, "Pattern"); + c(node.right, st, "Expression"); + }; + base.ConditionalExpression = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.consequent, st, "Expression"); + c(node.alternate, st, "Expression"); + }; + base.NewExpression = base.CallExpression = function (node, st, c) { + c(node.callee, st, "Expression"); + if (node.arguments) + { for (var i = 0, list = node.arguments; i < list.length; i += 1) + { + var arg = list[i]; + + c(arg, st, "Expression"); + } } + }; + base.MemberExpression = function (node, st, c) { + c(node.object, st, "Expression"); + if (node.computed) { c(node.property, st, "Expression"); } + }; + base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { + if (node.declaration) + { c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); } + if (node.source) { c(node.source, st, "Expression"); } + }; + base.ExportAllDeclaration = function (node, st, c) { + if (node.exported) + { c(node.exported, st); } + c(node.source, st, "Expression"); + }; + base.ImportDeclaration = function (node, st, c) { + for (var i = 0, list = node.specifiers; i < list.length; i += 1) + { + var spec = list[i]; + + c(spec, st); + } + c(node.source, st, "Expression"); + }; + base.ImportExpression = function (node, st, c) { + c(node.source, st, "Expression"); + }; + base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.PrivateIdentifier = base.Literal = ignore; + + base.TaggedTemplateExpression = function (node, st, c) { + c(node.tag, st, "Expression"); + c(node.quasi, st, "Expression"); + }; + base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); }; + base.Class = function (node, st, c) { + if (node.id) { c(node.id, st, "Pattern"); } + if (node.superClass) { c(node.superClass, st, "Expression"); } + c(node.body, st); + }; + base.ClassBody = function (node, st, c) { + for (var i = 0, list = node.body; i < list.length; i += 1) + { + var elt = list[i]; + + c(elt, st); + } + }; + base.MethodDefinition = base.PropertyDefinition = base.Property = function (node, st, c) { + if (node.computed) { c(node.key, st, "Expression"); } + if (node.value) { c(node.value, st, "Expression"); } + }; + + exports.ancestor = ancestor; + exports.base = base; + exports.findNodeAfter = findNodeAfter; + exports.findNodeAround = findNodeAround; + exports.findNodeAt = findNodeAt; + exports.findNodeBefore = findNodeBefore; + exports.full = full; + exports.fullAncestor = fullAncestor; + exports.make = make; + exports.recursive = recursive; + exports.simple = simple; + +})); diff --git a/node_modules/acorn-walk/dist/walk.mjs b/node_modules/acorn-walk/dist/walk.mjs new file mode 100644 index 0000000..19eebc0 --- /dev/null +++ b/node_modules/acorn-walk/dist/walk.mjs @@ -0,0 +1,443 @@ +// AST walker module for ESTree compatible trees + +// A simple walk is one where you simply specify callbacks to be +// called on specific nodes. The last two arguments are optional. A +// simple use would be +// +// walk.simple(myTree, { +// Expression: function(node) { ... } +// }); +// +// to do something with all expressions. All ESTree node types +// can be used to identify node types, as well as Expression and +// Statement, which denote categories of nodes. +// +// The base argument can be used to pass a custom (recursive) +// walker, and state can be used to give this walked an initial +// state. + +function simple(node, visitors, baseVisitor, state, override) { + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { + var type = override || node.type; + baseVisitor[type](node, st, c); + if (visitors[type]) { visitors[type](node, st); } + })(node, state, override); +} + +// An ancestor walk keeps an array of ancestor nodes (including the +// current node) and passes them to the callback as third parameter +// (and also as state parameter when no other state is present). +function ancestor(node, visitors, baseVisitor, state, override) { + var ancestors = []; + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { + var type = override || node.type; + var isNew = node !== ancestors[ancestors.length - 1]; + if (isNew) { ancestors.push(node); } + baseVisitor[type](node, st, c); + if (visitors[type]) { visitors[type](node, st || ancestors, ancestors); } + if (isNew) { ancestors.pop(); } + })(node, state, override); +} + +// A recursive walk is one where your functions override the default +// walkers. They can modify and replace the state parameter that's +// threaded through the walk, and can opt how and whether to walk +// their child nodes (by calling their third argument on these +// nodes). +function recursive(node, state, funcs, baseVisitor, override) { + var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor + ;(function c(node, st, override) { + visitor[override || node.type](node, st, c); + })(node, state, override); +} + +function makeTest(test) { + if (typeof test === "string") + { return function (type) { return type === test; } } + else if (!test) + { return function () { return true; } } + else + { return test } +} + +var Found = function Found(node, state) { this.node = node; this.state = state; }; + +// A full walk triggers the callback on each node +function full(node, callback, baseVisitor, state, override) { + if (!baseVisitor) { baseVisitor = base; } + var last + ;(function c(node, st, override) { + var type = override || node.type; + baseVisitor[type](node, st, c); + if (last !== node) { + callback(node, st, type); + last = node; + } + })(node, state, override); +} + +// An fullAncestor walk is like an ancestor walk, but triggers +// the callback on each node +function fullAncestor(node, callback, baseVisitor, state) { + if (!baseVisitor) { baseVisitor = base; } + var ancestors = [], last + ;(function c(node, st, override) { + var type = override || node.type; + var isNew = node !== ancestors[ancestors.length - 1]; + if (isNew) { ancestors.push(node); } + baseVisitor[type](node, st, c); + if (last !== node) { + callback(node, st || ancestors, ancestors, type); + last = node; + } + if (isNew) { ancestors.pop(); } + })(node, state); +} + +// Find a node with a given start, end, and type (all are optional, +// null can be used as wildcard). Returns a {node, state} object, or +// undefined when it doesn't find a matching node. +function findNodeAt(node, start, end, test, baseVisitor, state) { + if (!baseVisitor) { baseVisitor = base; } + test = makeTest(test); + try { + (function c(node, st, override) { + var type = override || node.type; + if ((start == null || node.start <= start) && + (end == null || node.end >= end)) + { baseVisitor[type](node, st, c); } + if ((start == null || node.start === start) && + (end == null || node.end === end) && + test(type, node)) + { throw new Found(node, st) } + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } +} + +// Find the innermost node of a given type that contains the given +// position. Interface similar to findNodeAt. +function findNodeAround(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + try { + (function c(node, st, override) { + var type = override || node.type; + if (node.start > pos || node.end < pos) { return } + baseVisitor[type](node, st, c); + if (test(type, node)) { throw new Found(node, st) } + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } +} + +// Find the outermost matching node after a given position. +function findNodeAfter(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + try { + (function c(node, st, override) { + if (node.end < pos) { return } + var type = override || node.type; + if (node.start >= pos && test(type, node)) { throw new Found(node, st) } + baseVisitor[type](node, st, c); + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } +} + +// Find the outermost matching node before a given position. +function findNodeBefore(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + var max + ;(function c(node, st, override) { + if (node.start > pos) { return } + var type = override || node.type; + if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) + { max = new Found(node, st); } + baseVisitor[type](node, st, c); + })(node, state); + return max +} + +// Used to create a custom walker. Will fill in all missing node +// type properties with the defaults. +function make(funcs, baseVisitor) { + var visitor = Object.create(baseVisitor || base); + for (var type in funcs) { visitor[type] = funcs[type]; } + return visitor +} + +function skipThrough(node, st, c) { c(node, st); } +function ignore(_node, _st, _c) {} + +// Node walkers. + +var base = {}; + +base.Program = base.BlockStatement = base.StaticBlock = function (node, st, c) { + for (var i = 0, list = node.body; i < list.length; i += 1) + { + var stmt = list[i]; + + c(stmt, st, "Statement"); + } +}; +base.Statement = skipThrough; +base.EmptyStatement = ignore; +base.ExpressionStatement = base.ParenthesizedExpression = base.ChainExpression = + function (node, st, c) { return c(node.expression, st, "Expression"); }; +base.IfStatement = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.consequent, st, "Statement"); + if (node.alternate) { c(node.alternate, st, "Statement"); } +}; +base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); }; +base.BreakStatement = base.ContinueStatement = ignore; +base.WithStatement = function (node, st, c) { + c(node.object, st, "Expression"); + c(node.body, st, "Statement"); +}; +base.SwitchStatement = function (node, st, c) { + c(node.discriminant, st, "Expression"); + for (var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1) { + var cs = list$1[i$1]; + + if (cs.test) { c(cs.test, st, "Expression"); } + for (var i = 0, list = cs.consequent; i < list.length; i += 1) + { + var cons = list[i]; + + c(cons, st, "Statement"); + } + } +}; +base.SwitchCase = function (node, st, c) { + if (node.test) { c(node.test, st, "Expression"); } + for (var i = 0, list = node.consequent; i < list.length; i += 1) + { + var cons = list[i]; + + c(cons, st, "Statement"); + } +}; +base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) { + if (node.argument) { c(node.argument, st, "Expression"); } +}; +base.ThrowStatement = base.SpreadElement = + function (node, st, c) { return c(node.argument, st, "Expression"); }; +base.TryStatement = function (node, st, c) { + c(node.block, st, "Statement"); + if (node.handler) { c(node.handler, st); } + if (node.finalizer) { c(node.finalizer, st, "Statement"); } +}; +base.CatchClause = function (node, st, c) { + if (node.param) { c(node.param, st, "Pattern"); } + c(node.body, st, "Statement"); +}; +base.WhileStatement = base.DoWhileStatement = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.body, st, "Statement"); +}; +base.ForStatement = function (node, st, c) { + if (node.init) { c(node.init, st, "ForInit"); } + if (node.test) { c(node.test, st, "Expression"); } + if (node.update) { c(node.update, st, "Expression"); } + c(node.body, st, "Statement"); +}; +base.ForInStatement = base.ForOfStatement = function (node, st, c) { + c(node.left, st, "ForInit"); + c(node.right, st, "Expression"); + c(node.body, st, "Statement"); +}; +base.ForInit = function (node, st, c) { + if (node.type === "VariableDeclaration") { c(node, st); } + else { c(node, st, "Expression"); } +}; +base.DebuggerStatement = ignore; + +base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); }; +base.VariableDeclaration = function (node, st, c) { + for (var i = 0, list = node.declarations; i < list.length; i += 1) + { + var decl = list[i]; + + c(decl, st); + } +}; +base.VariableDeclarator = function (node, st, c) { + c(node.id, st, "Pattern"); + if (node.init) { c(node.init, st, "Expression"); } +}; + +base.Function = function (node, st, c) { + if (node.id) { c(node.id, st, "Pattern"); } + for (var i = 0, list = node.params; i < list.length; i += 1) + { + var param = list[i]; + + c(param, st, "Pattern"); + } + c(node.body, st, node.expression ? "Expression" : "Statement"); +}; + +base.Pattern = function (node, st, c) { + if (node.type === "Identifier") + { c(node, st, "VariablePattern"); } + else if (node.type === "MemberExpression") + { c(node, st, "MemberPattern"); } + else + { c(node, st); } +}; +base.VariablePattern = ignore; +base.MemberPattern = skipThrough; +base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); }; +base.ArrayPattern = function (node, st, c) { + for (var i = 0, list = node.elements; i < list.length; i += 1) { + var elt = list[i]; + + if (elt) { c(elt, st, "Pattern"); } + } +}; +base.ObjectPattern = function (node, st, c) { + for (var i = 0, list = node.properties; i < list.length; i += 1) { + var prop = list[i]; + + if (prop.type === "Property") { + if (prop.computed) { c(prop.key, st, "Expression"); } + c(prop.value, st, "Pattern"); + } else if (prop.type === "RestElement") { + c(prop.argument, st, "Pattern"); + } + } +}; + +base.Expression = skipThrough; +base.ThisExpression = base.Super = base.MetaProperty = ignore; +base.ArrayExpression = function (node, st, c) { + for (var i = 0, list = node.elements; i < list.length; i += 1) { + var elt = list[i]; + + if (elt) { c(elt, st, "Expression"); } + } +}; +base.ObjectExpression = function (node, st, c) { + for (var i = 0, list = node.properties; i < list.length; i += 1) + { + var prop = list[i]; + + c(prop, st); + } +}; +base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration; +base.SequenceExpression = function (node, st, c) { + for (var i = 0, list = node.expressions; i < list.length; i += 1) + { + var expr = list[i]; + + c(expr, st, "Expression"); + } +}; +base.TemplateLiteral = function (node, st, c) { + for (var i = 0, list = node.quasis; i < list.length; i += 1) + { + var quasi = list[i]; + + c(quasi, st); + } + + for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) + { + var expr = list$1[i$1]; + + c(expr, st, "Expression"); + } +}; +base.TemplateElement = ignore; +base.UnaryExpression = base.UpdateExpression = function (node, st, c) { + c(node.argument, st, "Expression"); +}; +base.BinaryExpression = base.LogicalExpression = function (node, st, c) { + c(node.left, st, "Expression"); + c(node.right, st, "Expression"); +}; +base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) { + c(node.left, st, "Pattern"); + c(node.right, st, "Expression"); +}; +base.ConditionalExpression = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.consequent, st, "Expression"); + c(node.alternate, st, "Expression"); +}; +base.NewExpression = base.CallExpression = function (node, st, c) { + c(node.callee, st, "Expression"); + if (node.arguments) + { for (var i = 0, list = node.arguments; i < list.length; i += 1) + { + var arg = list[i]; + + c(arg, st, "Expression"); + } } +}; +base.MemberExpression = function (node, st, c) { + c(node.object, st, "Expression"); + if (node.computed) { c(node.property, st, "Expression"); } +}; +base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { + if (node.declaration) + { c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); } + if (node.source) { c(node.source, st, "Expression"); } +}; +base.ExportAllDeclaration = function (node, st, c) { + if (node.exported) + { c(node.exported, st); } + c(node.source, st, "Expression"); +}; +base.ImportDeclaration = function (node, st, c) { + for (var i = 0, list = node.specifiers; i < list.length; i += 1) + { + var spec = list[i]; + + c(spec, st); + } + c(node.source, st, "Expression"); +}; +base.ImportExpression = function (node, st, c) { + c(node.source, st, "Expression"); +}; +base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.PrivateIdentifier = base.Literal = ignore; + +base.TaggedTemplateExpression = function (node, st, c) { + c(node.tag, st, "Expression"); + c(node.quasi, st, "Expression"); +}; +base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); }; +base.Class = function (node, st, c) { + if (node.id) { c(node.id, st, "Pattern"); } + if (node.superClass) { c(node.superClass, st, "Expression"); } + c(node.body, st); +}; +base.ClassBody = function (node, st, c) { + for (var i = 0, list = node.body; i < list.length; i += 1) + { + var elt = list[i]; + + c(elt, st); + } +}; +base.MethodDefinition = base.PropertyDefinition = base.Property = function (node, st, c) { + if (node.computed) { c(node.key, st, "Expression"); } + if (node.value) { c(node.value, st, "Expression"); } +}; + +export { ancestor, base, findNodeAfter, findNodeAround, findNodeAt, findNodeBefore, full, fullAncestor, make, recursive, simple }; diff --git a/node_modules/acorn-walk/package.json b/node_modules/acorn-walk/package.json new file mode 100644 index 0000000..9d3b7e5 --- /dev/null +++ b/node_modules/acorn-walk/package.json @@ -0,0 +1,47 @@ +{ + "name": "acorn-walk", + "description": "ECMAScript (ESTree) AST walker", + "homepage": "https://github.com/acornjs/acorn", + "main": "dist/walk.js", + "types": "dist/walk.d.ts", + "module": "dist/walk.mjs", + "exports": { + ".": [ + { + "import": "./dist/walk.mjs", + "require": "./dist/walk.js", + "default": "./dist/walk.js" + }, + "./dist/walk.js" + ], + "./package.json": "./package.json" + }, + "version": "8.3.2", + "engines": { + "node": ">=0.4.0" + }, + "maintainers": [ + { + "name": "Marijn Haverbeke", + "email": "marijnh@gmail.com", + "web": "https://marijnhaverbeke.nl" + }, + { + "name": "Ingvar Stepanyan", + "email": "me@rreverser.com", + "web": "https://rreverser.com/" + }, + { + "name": "Adrian Heine", + "web": "http://adrianheine.de" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/acornjs/acorn.git" + }, + "scripts": { + "prepare": "cd ..; npm run build:walk" + }, + "license": "MIT" +} diff --git a/node_modules/acorn/CHANGELOG.md b/node_modules/acorn/CHANGELOG.md new file mode 100644 index 0000000..3137186 --- /dev/null +++ b/node_modules/acorn/CHANGELOG.md @@ -0,0 +1,928 @@ +## 8.14.0 (2024-10-27) + +### New features + +Support ES2025 import attributes. + +Support ES2025 RegExp modifiers. + +### Bug fixes + +Support some missing Unicode properties. + +## 8.13.0 (2024-10-16) + +### New features + +Upgrade to Unicode 16.0. + +## 8.12.1 (2024-07-03) + +### Bug fixes + +Fix a regression that caused Acorn to no longer run on Node versions <8.10. + +## 8.12.0 (2024-06-14) + +### New features + +Support ES2025 duplicate capture group names in regular expressions. + +### Bug fixes + +Include `VariableDeclarator` in the `AnyNode` type so that walker objects can refer to it without getting a type error. + +Properly raise a parse error for invalid `for`/`of` statements using `async` as binding name. + +Properly recognize \"use strict\" when preceded by a string with an escaped newline. + +Mark the `Parser` constructor as protected, not private, so plugins can extend it without type errors. + +Fix a bug where some invalid `delete` expressions were let through when the operand was parenthesized and `preserveParens` was enabled. + +Properly normalize line endings in raw strings of invalid template tokens. + +Properly track line numbers for escaped newlines in strings. + +Fix a bug that broke line number accounting after a template literal with invalid escape sequences. + +## 8.11.3 (2023-12-29) + +### Bug fixes + +Add `Function` and `Class` to the `AggregateType` type, so that they can be used in walkers without raising a type error. + +Make sure `onToken` get an `import` keyword token when parsing `import.meta`. + +Fix a bug where `.loc.start` could be undefined for `new.target` `meta` nodes. + +## 8.11.2 (2023-10-27) + +### Bug fixes + +Fix a bug that caused regular expressions after colon tokens to not be properly tokenized in some circumstances. + +## 8.11.1 (2023-10-26) + +### Bug fixes + +Fix a regression where `onToken` would receive 'name' tokens for 'new' keyword tokens. + +## 8.11.0 (2023-10-26) + +### Bug fixes + +Fix an issue where tokenizing (without parsing) an object literal with a property named `class` or `function` could, in some circumstance, put the tokenizer into an invalid state. + +Fix an issue where a slash after a call to a propery named the same as some keywords would be tokenized as a regular expression. + +### New features + +Upgrade to Unicode 15.1. + +Use a set of new, much more precise, TypeScript types. + +## 8.10.0 (2023-07-05) + +### New features + +Add a `checkPrivateFields` option that disables strict checking of private property use. + +## 8.9.0 (2023-06-16) + +### Bug fixes + +Forbid dynamic import after `new`, even when part of a member expression. + +### New features + +Add Unicode properties for ES2023. + +Add support for the `v` flag to regular expressions. + +## 8.8.2 (2023-01-23) + +### Bug fixes + +Fix a bug that caused `allowHashBang` to be set to false when not provided, even with `ecmaVersion >= 14`. + +Fix an exception when passing no option object to `parse` or `new Parser`. + +Fix incorrect parse error on `if (0) let\n[astral identifier char]`. + +## 8.8.1 (2022-10-24) + +### Bug fixes + +Make type for `Comment` compatible with estree types. + +## 8.8.0 (2022-07-21) + +### Bug fixes + +Allow parentheses around spread args in destructuring object assignment. + +Fix an issue where the tree contained `directive` properties in when parsing with a language version that doesn't support them. + +### New features + +Support hashbang comments by default in ECMAScript 2023 and later. + +## 8.7.1 (2021-04-26) + +### Bug fixes + +Stop handling `"use strict"` directives in ECMAScript versions before 5. + +Fix an issue where duplicate quoted export names in `export *` syntax were incorrectly checked. + +Add missing type for `tokTypes`. + +## 8.7.0 (2021-12-27) + +### New features + +Support quoted export names. + +Upgrade to Unicode 14. + +Add support for Unicode 13 properties in regular expressions. + +### Bug fixes + +Use a loop to find line breaks, because the existing regexp search would overrun the end of the searched range and waste a lot of time in minified code. + +## 8.6.0 (2021-11-18) + +### Bug fixes + +Fix a bug where an object literal with multiple `__proto__` properties would incorrectly be accepted if a later property value held an assigment. + +### New features + +Support class private fields with the `in` operator. + +## 8.5.0 (2021-09-06) + +### Bug fixes + +Improve context-dependent tokenization in a number of corner cases. + +Fix location tracking after a 0x2028 or 0x2029 character in a string literal (which before did not increase the line number). + +Fix an issue where arrow function bodies in for loop context would inappropriately consume `in` operators. + +Fix wrong end locations stored on SequenceExpression nodes. + +Implement restriction that `for`/`of` loop LHS can't start with `let`. + +### New features + +Add support for ES2022 class static blocks. + +Allow multiple input files to be passed to the CLI tool. + +## 8.4.1 (2021-06-24) + +### Bug fixes + +Fix a bug where `allowAwaitOutsideFunction` would allow `await` in class field initializers, and setting `ecmaVersion` to 13 or higher would allow top-level await in non-module sources. + +## 8.4.0 (2021-06-11) + +### New features + +A new option, `allowSuperOutsideMethod`, can be used to suppress the error when `super` is used in the wrong context. + +## 8.3.0 (2021-05-31) + +### New features + +Default `allowAwaitOutsideFunction` to true for ECMAScript 2022 an higher. + +Add support for the `d` ([indices](https://github.com/tc39/proposal-regexp-match-indices)) regexp flag. + +## 8.2.4 (2021-05-04) + +### Bug fixes + +Fix spec conformity in corner case 'for await (async of ...)'. + +## 8.2.3 (2021-05-04) + +### Bug fixes + +Fix an issue where the library couldn't parse 'for (async of ...)'. + +Fix a bug in UTF-16 decoding that would read characters incorrectly in some circumstances. + +## 8.2.2 (2021-04-29) + +### Bug fixes + +Fix a bug where a class field initialized to an async arrow function wouldn't allow await inside it. Same issue existed for generator arrow functions with yield. + +## 8.2.1 (2021-04-24) + +### Bug fixes + +Fix a regression introduced in 8.2.0 where static or async class methods with keyword names fail to parse. + +## 8.2.0 (2021-04-24) + +### New features + +Add support for ES2022 class fields and private methods. + +## 8.1.1 (2021-04-12) + +### Various + +Stop shipping source maps in the NPM package. + +## 8.1.0 (2021-03-09) + +### Bug fixes + +Fix a spurious error in nested destructuring arrays. + +### New features + +Expose `allowAwaitOutsideFunction` in CLI interface. + +Make `allowImportExportAnywhere` also apply to `import.meta`. + +## 8.0.5 (2021-01-25) + +### Bug fixes + +Adjust package.json to work with Node 12.16.0 and 13.0-13.6. + +## 8.0.4 (2020-10-05) + +### Bug fixes + +Make `await x ** y` an error, following the spec. + +Fix potentially exponential regular expression. + +## 8.0.3 (2020-10-02) + +### Bug fixes + +Fix a wasteful loop during `Parser` creation when setting `ecmaVersion` to `"latest"`. + +## 8.0.2 (2020-09-30) + +### Bug fixes + +Make the TypeScript types reflect the current allowed values for `ecmaVersion`. + +Fix another regexp/division tokenizer issue. + +## 8.0.1 (2020-08-12) + +### Bug fixes + +Provide the correct value in the `version` export. + +## 8.0.0 (2020-08-12) + +### Bug fixes + +Disallow expressions like `(a = b) = c`. + +Make non-octal escape sequences a syntax error in strict mode. + +### New features + +The package can now be loaded directly as an ECMAScript module in node 13+. + +Update to the set of Unicode properties from ES2021. + +### Breaking changes + +The `ecmaVersion` option is now required. For the moment, omitting it will still work with a warning, but that will change in a future release. + +Some changes to method signatures that may be used by plugins. + +## 7.4.0 (2020-08-03) + +### New features + +Add support for logical assignment operators. + +Add support for numeric separators. + +## 7.3.1 (2020-06-11) + +### Bug fixes + +Make the string in the `version` export match the actual library version. + +## 7.3.0 (2020-06-11) + +### Bug fixes + +Fix a bug that caused parsing of object patterns with a property named `set` that had a default value to fail. + +### New features + +Add support for optional chaining (`?.`). + +## 7.2.0 (2020-05-09) + +### Bug fixes + +Fix precedence issue in parsing of async arrow functions. + +### New features + +Add support for nullish coalescing. + +Add support for `import.meta`. + +Support `export * as ...` syntax. + +Upgrade to Unicode 13. + +## 6.4.1 (2020-03-09) + +### Bug fixes + +More carefully check for valid UTF16 surrogate pairs in regexp validator. + +## 7.1.1 (2020-03-01) + +### Bug fixes + +Treat `\8` and `\9` as invalid escapes in template strings. + +Allow unicode escapes in property names that are keywords. + +Don't error on an exponential operator expression as argument to `await`. + +More carefully check for valid UTF16 surrogate pairs in regexp validator. + +## 7.1.0 (2019-09-24) + +### Bug fixes + +Disallow trailing object literal commas when ecmaVersion is less than 5. + +### New features + +Add a static `acorn` property to the `Parser` class that contains the entire module interface, to allow plugins to access the instance of the library that they are acting on. + +## 7.0.0 (2019-08-13) + +### Breaking changes + +Changes the node format for dynamic imports to use the `ImportExpression` node type, as defined in [ESTree](https://github.com/estree/estree/blob/master/es2020.md#importexpression). + +Makes 10 (ES2019) the default value for the `ecmaVersion` option. + +## 6.3.0 (2019-08-12) + +### New features + +`sourceType: "module"` can now be used even when `ecmaVersion` is less than 6, to parse module-style code that otherwise conforms to an older standard. + +## 6.2.1 (2019-07-21) + +### Bug fixes + +Fix bug causing Acorn to treat some characters as identifier characters that shouldn't be treated as such. + +Fix issue where setting the `allowReserved` option to `"never"` allowed reserved words in some circumstances. + +## 6.2.0 (2019-07-04) + +### Bug fixes + +Improve valid assignment checking in `for`/`in` and `for`/`of` loops. + +Disallow binding `let` in patterns. + +### New features + +Support bigint syntax with `ecmaVersion` >= 11. + +Support dynamic `import` syntax with `ecmaVersion` >= 11. + +Upgrade to Unicode version 12. + +## 6.1.1 (2019-02-27) + +### Bug fixes + +Fix bug that caused parsing default exports of with names to fail. + +## 6.1.0 (2019-02-08) + +### Bug fixes + +Fix scope checking when redefining a `var` as a lexical binding. + +### New features + +Split up `parseSubscripts` to use an internal `parseSubscript` method to make it easier to extend with plugins. + +## 6.0.7 (2019-02-04) + +### Bug fixes + +Check that exported bindings are defined. + +Don't treat `\u180e` as a whitespace character. + +Check for duplicate parameter names in methods. + +Don't allow shorthand properties when they are generators or async methods. + +Forbid binding `await` in async arrow function's parameter list. + +## 6.0.6 (2019-01-30) + +### Bug fixes + +The content of class declarations and expressions is now always parsed in strict mode. + +Don't allow `let` or `const` to bind the variable name `let`. + +Treat class declarations as lexical. + +Don't allow a generator function declaration as the sole body of an `if` or `else`. + +Ignore `"use strict"` when after an empty statement. + +Allow string line continuations with special line terminator characters. + +Treat `for` bodies as part of the `for` scope when checking for conflicting bindings. + +Fix bug with parsing `yield` in a `for` loop initializer. + +Implement special cases around scope checking for functions. + +## 6.0.5 (2019-01-02) + +### Bug fixes + +Fix TypeScript type for `Parser.extend` and add `allowAwaitOutsideFunction` to options type. + +Don't treat `let` as a keyword when the next token is `{` on the next line. + +Fix bug that broke checking for parentheses around an object pattern in a destructuring assignment when `preserveParens` was on. + +## 6.0.4 (2018-11-05) + +### Bug fixes + +Further improvements to tokenizing regular expressions in corner cases. + +## 6.0.3 (2018-11-04) + +### Bug fixes + +Fix bug in tokenizing an expression-less return followed by a function followed by a regular expression. + +Remove stray symlink in the package tarball. + +## 6.0.2 (2018-09-26) + +### Bug fixes + +Fix bug where default expressions could fail to parse inside an object destructuring assignment expression. + +## 6.0.1 (2018-09-14) + +### Bug fixes + +Fix wrong value in `version` export. + +## 6.0.0 (2018-09-14) + +### Bug fixes + +Better handle variable-redefinition checks for catch bindings and functions directly under if statements. + +Forbid `new.target` in top-level arrow functions. + +Fix issue with parsing a regexp after `yield` in some contexts. + +### New features + +The package now comes with TypeScript definitions. + +### Breaking changes + +The default value of the `ecmaVersion` option is now 9 (2018). + +Plugins work differently, and will have to be rewritten to work with this version. + +The loose parser and walker have been moved into separate packages (`acorn-loose` and `acorn-walk`). + +## 5.7.3 (2018-09-10) + +### Bug fixes + +Fix failure to tokenize regexps after expressions like `x.of`. + +Better error message for unterminated template literals. + +## 5.7.2 (2018-08-24) + +### Bug fixes + +Properly handle `allowAwaitOutsideFunction` in for statements. + +Treat function declarations at the top level of modules like let bindings. + +Don't allow async function declarations as the only statement under a label. + +## 5.7.0 (2018-06-15) + +### New features + +Upgraded to Unicode 11. + +## 5.6.0 (2018-05-31) + +### New features + +Allow U+2028 and U+2029 in string when ECMAVersion >= 10. + +Allow binding-less catch statements when ECMAVersion >= 10. + +Add `allowAwaitOutsideFunction` option for parsing top-level `await`. + +## 5.5.3 (2018-03-08) + +### Bug fixes + +A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps. + +## 5.5.2 (2018-03-08) + +### Bug fixes + +A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0. + +## 5.5.1 (2018-03-06) + +### Bug fixes + +Fix misleading error message for octal escapes in template strings. + +## 5.5.0 (2018-02-27) + +### New features + +The identifier character categorization is now based on Unicode version 10. + +Acorn will now validate the content of regular expressions, including new ES9 features. + +## 5.4.0 (2018-02-01) + +### Bug fixes + +Disallow duplicate or escaped flags on regular expressions. + +Disallow octal escapes in strings in strict mode. + +### New features + +Add support for async iteration. + +Add support for object spread and rest. + +## 5.3.0 (2017-12-28) + +### Bug fixes + +Fix parsing of floating point literals with leading zeroes in loose mode. + +Allow duplicate property names in object patterns. + +Don't allow static class methods named `prototype`. + +Disallow async functions directly under `if` or `else`. + +Parse right-hand-side of `for`/`of` as an assignment expression. + +Stricter parsing of `for`/`in`. + +Don't allow unicode escapes in contextual keywords. + +### New features + +Parsing class members was factored into smaller methods to allow plugins to hook into it. + +## 5.2.1 (2017-10-30) + +### Bug fixes + +Fix a token context corruption bug. + +## 5.2.0 (2017-10-30) + +### Bug fixes + +Fix token context tracking for `class` and `function` in property-name position. + +Make sure `%*` isn't parsed as a valid operator. + +Allow shorthand properties `get` and `set` to be followed by default values. + +Disallow `super` when not in callee or object position. + +### New features + +Support [`directive` property](https://github.com/estree/estree/compare/b3de58c9997504d6fba04b72f76e6dd1619ee4eb...1da8e603237144f44710360f8feb7a9977e905e0) on directive expression statements. + +## 5.1.2 (2017-09-04) + +### Bug fixes + +Disable parsing of legacy HTML-style comments in modules. + +Fix parsing of async methods whose names are keywords. + +## 5.1.1 (2017-07-06) + +### Bug fixes + +Fix problem with disambiguating regexp and division after a class. + +## 5.1.0 (2017-07-05) + +### Bug fixes + +Fix tokenizing of regexps in an object-desctructuring `for`/`of` loop and after `yield`. + +Parse zero-prefixed numbers with non-octal digits as decimal. + +Allow object/array patterns in rest parameters. + +Don't error when `yield` is used as a property name. + +Allow `async` as a shorthand object property. + +### New features + +Implement the [template literal revision proposal](https://github.com/tc39/proposal-template-literal-revision) for ES9. + +## 5.0.3 (2017-04-01) + +### Bug fixes + +Fix spurious duplicate variable definition errors for named functions. + +## 5.0.2 (2017-03-30) + +### Bug fixes + +A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error. + +## 5.0.0 (2017-03-28) + +### Bug fixes + +Raise an error for duplicated lexical bindings. + +Fix spurious error when an assignement expression occurred after a spread expression. + +Accept regular expressions after `of` (in `for`/`of`), `yield` (in a generator), and braced arrow functions. + +Allow labels in front or `var` declarations, even in strict mode. + +### Breaking changes + +Parse declarations following `export default` as declaration nodes, not expressions. This means that class and function declarations nodes can now have `null` as their `id`. + +## 4.0.11 (2017-02-07) + +### Bug fixes + +Allow all forms of member expressions to be parenthesized as lvalue. + +## 4.0.10 (2017-02-07) + +### Bug fixes + +Don't expect semicolons after default-exported functions or classes, even when they are expressions. + +Check for use of `'use strict'` directives in non-simple parameter functions, even when already in strict mode. + +## 4.0.9 (2017-02-06) + +### Bug fixes + +Fix incorrect error raised for parenthesized simple assignment targets, so that `(x) = 1` parses again. + +## 4.0.8 (2017-02-03) + +### Bug fixes + +Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet. + +## 4.0.7 (2017-02-02) + +### Bug fixes + +Accept invalidly rejected code like `(x).y = 2` again. + +Don't raise an error when a function _inside_ strict code has a non-simple parameter list. + +## 4.0.6 (2017-02-02) + +### Bug fixes + +Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check. + +## 4.0.5 (2017-02-02) + +### Bug fixes + +Disallow parenthesized pattern expressions. + +Allow keywords as export names. + +Don't allow the `async` keyword to be parenthesized. + +Properly raise an error when a keyword contains a character escape. + +Allow `"use strict"` to appear after other string literal expressions. + +Disallow labeled declarations. + +## 4.0.4 (2016-12-19) + +### Bug fixes + +Fix crash when `export` was followed by a keyword that can't be +exported. + +## 4.0.3 (2016-08-16) + +### Bug fixes + +Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode. + +Properly parse properties named `async` in ES2017 mode. + +Fix bug where reserved words were broken in ES2017 mode. + +## 4.0.2 (2016-08-11) + +### Bug fixes + +Don't ignore period or 'e' characters after octal numbers. + +Fix broken parsing for call expressions in default parameter values of arrow functions. + +## 4.0.1 (2016-08-08) + +### Bug fixes + +Fix false positives in duplicated export name errors. + +## 4.0.0 (2016-08-07) + +### Breaking changes + +The default `ecmaVersion` option value is now 7. + +A number of internal method signatures changed, so plugins might need to be updated. + +### Bug fixes + +The parser now raises errors on duplicated export names. + +`arguments` and `eval` can now be used in shorthand properties. + +Duplicate parameter names in non-simple argument lists now always produce an error. + +### New features + +The `ecmaVersion` option now also accepts year-style version numbers +(2015, etc). + +Support for `async`/`await` syntax when `ecmaVersion` is >= 8. + +Support for trailing commas in call expressions when `ecmaVersion` is >= 8. + +## 3.3.0 (2016-07-25) + +### Bug fixes + +Fix bug in tokenizing of regexp operator after a function declaration. + +Fix parser crash when parsing an array pattern with a hole. + +### New features + +Implement check against complex argument lists in functions that enable strict mode in ES7. + +## 3.2.0 (2016-06-07) + +### Bug fixes + +Improve handling of lack of unicode regexp support in host +environment. + +Properly reject shorthand properties whose name is a keyword. + +### New features + +Visitors created with `visit.make` now have their base as _prototype_, rather than copying properties into a fresh object. + +## 3.1.0 (2016-04-18) + +### Bug fixes + +Properly tokenize the division operator directly after a function expression. + +Allow trailing comma in destructuring arrays. + +## 3.0.4 (2016-02-25) + +### Fixes + +Allow update expressions as left-hand-side of the ES7 exponential operator. + +## 3.0.2 (2016-02-10) + +### Fixes + +Fix bug that accidentally made `undefined` a reserved word when parsing ES7. + +## 3.0.0 (2016-02-10) + +### Breaking changes + +The default value of the `ecmaVersion` option is now 6 (used to be 5). + +Support for comprehension syntax (which was dropped from the draft spec) has been removed. + +### Fixes + +`let` and `yield` are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code. + +A parenthesized class or function expression after `export default` is now parsed correctly. + +### New features + +When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`). + +The identifier character ranges are now based on Unicode 8.0.0. + +Plugins can now override the `raiseRecoverable` method to override the way non-critical errors are handled. + +## 2.7.0 (2016-01-04) + +### Fixes + +Stop allowing rest parameters in setters. + +Disallow `y` rexexp flag in ES5. + +Disallow `\00` and `\000` escapes in strict mode. + +Raise an error when an import name is a reserved word. + +## 2.6.2 (2015-11-10) + +### Fixes + +Don't crash when no options object is passed. + +## 2.6.0 (2015-11-09) + +### Fixes + +Add `await` as a reserved word in module sources. + +Disallow `yield` in a parameter default value for a generator. + +Forbid using a comma after a rest pattern in an array destructuring. + +### New features + +Support parsing stdin in command-line tool. + +## 2.5.0 (2015-10-27) + +### Fixes + +Fix tokenizer support in the command-line tool. + +Stop allowing `new.target` outside of functions. + +Remove legacy `guard` and `guardedHandler` properties from try nodes. + +Stop allowing multiple `__proto__` properties on an object literal in strict mode. + +Don't allow rest parameters to be non-identifier patterns. + +Check for duplicate paramter names in arrow functions. diff --git a/node_modules/acorn/LICENSE b/node_modules/acorn/LICENSE new file mode 100644 index 0000000..9d71cc6 --- /dev/null +++ b/node_modules/acorn/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (C) 2012-2022 by various contributors (see AUTHORS) + +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. diff --git a/node_modules/acorn/README.md b/node_modules/acorn/README.md new file mode 100644 index 0000000..f7ff966 --- /dev/null +++ b/node_modules/acorn/README.md @@ -0,0 +1,282 @@ +# Acorn + +A tiny, fast JavaScript parser written in JavaScript. + +## Community + +Acorn is open source software released under an +[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE). + +You are welcome to +[report bugs](https://github.com/acornjs/acorn/issues) or create pull +requests on [github](https://github.com/acornjs/acorn). + +## Installation + +The easiest way to install acorn is from [`npm`](https://www.npmjs.com/): + +```sh +npm install acorn +``` + +Alternately, you can download the source and build acorn yourself: + +```sh +git clone https://github.com/acornjs/acorn.git +cd acorn +npm install +``` + +## Interface + +**parse**`(input, options)` is the main interface to the library. The +`input` parameter is a string, `options` must be an object setting +some of the options listed below. The return value will be an abstract +syntax tree object as specified by the [ESTree +spec](https://github.com/estree/estree). + +```javascript +let acorn = require("acorn"); +console.log(acorn.parse("1 + 1", {ecmaVersion: 2020})); +``` + +When encountering a syntax error, the parser will raise a +`SyntaxError` object with a meaningful message. The error object will +have a `pos` property that indicates the string offset at which the +error occurred, and a `loc` object that contains a `{line, column}` +object referring to that same position. + +Options are provided by in a second argument, which should be an +object containing any of these fields (only `ecmaVersion` is +required): + +- **ecmaVersion**: Indicates the ECMAScript version to parse. Can be a + number, either in year (`2022`) or plain version number (`6`) form, + or `"latest"` (the latest the library supports). This influences + support for strict mode, the set of reserved words, and support for + new syntax features. + + **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being + implemented by Acorn. Other proposed new features must be + implemented through plugins. + +- **sourceType**: Indicate the mode the code should be parsed in. Can be + either `"script"` or `"module"`. This influences global strict mode + and parsing of `import` and `export` declarations. + + **NOTE**: If set to `"module"`, then static `import` / `export` syntax + will be valid, even if `ecmaVersion` is less than 6. + +- **onInsertedSemicolon**: If given a callback, that callback will be + called whenever a missing semicolon is inserted by the parser. The + callback will be given the character offset of the point where the + semicolon is inserted as argument, and if `locations` is on, also a + `{line, column}` object representing this position. + +- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing + commas. + +- **allowReserved**: If `false`, using a reserved word will generate + an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher + versions. When given the value `"never"`, reserved words and + keywords can also not be used as property names (as in Internet + Explorer's old parser). + +- **allowReturnOutsideFunction**: By default, a return statement at + the top level raises an error. Set this to `true` to accept such + code. + +- **allowImportExportEverywhere**: By default, `import` and `export` + declarations can only appear at a program's top level. Setting this + option to `true` allows them anywhere where a statement is allowed, + and also allows `import.meta` expressions to appear in scripts + (when `sourceType` is not `"module"`). + +- **allowAwaitOutsideFunction**: If `false`, `await` expressions can + only appear inside `async` functions. Defaults to `true` in modules + for `ecmaVersion` 2022 and later, `false` for lower versions. + Setting this option to `true` allows to have top-level `await` + expressions. They are still not allowed in non-`async` functions, + though. + +- **allowSuperOutsideMethod**: By default, `super` outside a method + raises an error. Set this to `true` to accept such code. + +- **allowHashBang**: When this is enabled, if the code starts with the + characters `#!` (as in a shellscript), the first line will be + treated as a comment. Defaults to true when `ecmaVersion` >= 2023. + +- **checkPrivateFields**: By default, the parser will verify that + private properties are only used in places where they are valid and + have been declared. Set this to false to turn such checks off. + +- **locations**: When `true`, each node has a `loc` object attached + with `start` and `end` subobjects, each of which contains the + one-based line and zero-based column numbers in `{line, column}` + form. Default is `false`. + +- **onToken**: If a function is passed for this option, each found + token will be passed in same format as tokens returned from + `tokenizer().getToken()`. + + If array is passed, each found token is pushed to it. + + Note that you are not allowed to call the parser from the + callback—that will corrupt its internal state. + +- **onComment**: If a function is passed for this option, whenever a + comment is encountered the function will be called with the + following parameters: + + - `block`: `true` if the comment is a block comment, false if it + is a line comment. + - `text`: The content of the comment. + - `start`: Character offset of the start of the comment. + - `end`: Character offset of the end of the comment. + + When the `locations` options is on, the `{line, column}` locations + of the comment’s start and end are passed as two additional + parameters. + + If array is passed for this option, each found comment is pushed + to it as object in Esprima format: + + ```javascript + { + "type": "Line" | "Block", + "value": "comment text", + "start": Number, + "end": Number, + // If `locations` option is on: + "loc": { + "start": {line: Number, column: Number} + "end": {line: Number, column: Number} + }, + // If `ranges` option is on: + "range": [Number, Number] + } + ``` + + Note that you are not allowed to call the parser from the + callback—that will corrupt its internal state. + +- **ranges**: Nodes have their start and end characters offsets + recorded in `start` and `end` properties (directly on the node, + rather than the `loc` object, which holds line/column data. To also + add a + [semi-standardized](https://bugzilla.mozilla.org/show_bug.cgi?id=745678) + `range` property holding a `[start, end]` array with the same + numbers, set the `ranges` option to `true`. + +- **program**: It is possible to parse multiple files into a single + AST by passing the tree produced by parsing the first file as the + `program` option in subsequent parses. This will add the toplevel + forms of the parsed file to the "Program" (top) node of an existing + parse tree. + +- **sourceFile**: When the `locations` option is `true`, you can pass + this option to add a `source` attribute in every node’s `loc` + object. Note that the contents of this option are not examined or + processed in any way; you are free to use whatever format you + choose. + +- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property + will be added (regardless of the `location` option) directly to the + nodes, rather than the `loc` object. + +- **preserveParens**: If this option is `true`, parenthesized expressions + are represented by (non-standard) `ParenthesizedExpression` nodes + that have a single `expression` property containing the expression + inside parentheses. + +**parseExpressionAt**`(input, offset, options)` will parse a single +expression in a string, and return its AST. It will not complain if +there is more of the string left after the expression. + +**tokenizer**`(input, options)` returns an object with a `getToken` +method that can be called repeatedly to get the next token, a `{start, +end, type, value}` object (with added `loc` property when the +`locations` option is enabled and `range` property when the `ranges` +option is enabled). When the token's type is `tokTypes.eof`, you +should stop calling the method, since it will keep returning that same +token forever. + +Note that tokenizing JavaScript without parsing it is, in modern +versions of the language, not really possible due to the way syntax is +overloaded in ways that can only be disambiguated by the parse +context. This package applies a bunch of heuristics to try and do a +reasonable job, but you are advised to use `parse` with the `onToken` +option instead of this. + +In ES6 environment, returned result can be used as any other +protocol-compliant iterable: + +```javascript +for (let token of acorn.tokenizer(str)) { + // iterate over the tokens +} + +// transform code to array of tokens: +var tokens = [...acorn.tokenizer(str)]; +``` + +**tokTypes** holds an object mapping names to the token type objects +that end up in the `type` properties of tokens. + +**getLineInfo**`(input, offset)` can be used to get a `{line, +column}` object for a given program string and offset. + +### The `Parser` class + +Instances of the **`Parser`** class contain all the state and logic +that drives a parse. It has static methods `parse`, +`parseExpressionAt`, and `tokenizer` that match the top-level +functions by the same name. + +When extending the parser with plugins, you need to call these methods +on the extended version of the class. To extend a parser with plugins, +you can use its static `extend` method. + +```javascript +var acorn = require("acorn"); +var jsx = require("acorn-jsx"); +var JSXParser = acorn.Parser.extend(jsx()); +JSXParser.parse("foo()", {ecmaVersion: 2020}); +``` + +The `extend` method takes any number of plugin values, and returns a +new `Parser` class that includes the extra parser logic provided by +the plugins. + +## Command line interface + +The `bin/acorn` utility can be used to parse a file from the command +line. It accepts as arguments its input file and the following +options: + +- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|--ecma10`: Sets the ECMAScript version + to parse. Default is version 9. + +- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise. + +- `--locations`: Attaches a "loc" object to each node with "start" and + "end" subobjects, each of which contains the one-based line and + zero-based column numbers in `{line, column}` form. + +- `--allow-hash-bang`: If the code starts with the characters #! (as + in a shellscript), the first line will be treated as a comment. + +- `--allow-await-outside-function`: Allows top-level `await` expressions. + See the `allowAwaitOutsideFunction` option for more information. + +- `--compact`: No whitespace is used in the AST output. + +- `--silent`: Do not output the AST, just return the exit status. + +- `--help`: Print the usage information and quit. + +The utility spits out the syntax tree as JSON data. + +## Existing plugins + + - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx) diff --git a/node_modules/acorn/bin/acorn b/node_modules/acorn/bin/acorn new file mode 100755 index 0000000..3ef3c12 --- /dev/null +++ b/node_modules/acorn/bin/acorn @@ -0,0 +1,4 @@ +#!/usr/bin/env node +"use strict" + +require("../dist/bin.js") diff --git a/node_modules/acorn/dist/acorn.d.mts b/node_modules/acorn/dist/acorn.d.mts new file mode 100644 index 0000000..81f4e38 --- /dev/null +++ b/node_modules/acorn/dist/acorn.d.mts @@ -0,0 +1,866 @@ +export interface Node { + start: number + end: number + type: string + range?: [number, number] + loc?: SourceLocation | null +} + +export interface SourceLocation { + source?: string | null + start: Position + end: Position +} + +export interface Position { + /** 1-based */ + line: number + /** 0-based */ + column: number +} + +export interface Identifier extends Node { + type: "Identifier" + name: string +} + +export interface Literal extends Node { + type: "Literal" + value?: string | boolean | null | number | RegExp | bigint + raw?: string + regex?: { + pattern: string + flags: string + } + bigint?: string +} + +export interface Program extends Node { + type: "Program" + body: Array + sourceType: "script" | "module" +} + +export interface Function extends Node { + id?: Identifier | null + params: Array + body: BlockStatement | Expression + generator: boolean + expression: boolean + async: boolean +} + +export interface ExpressionStatement extends Node { + type: "ExpressionStatement" + expression: Expression | Literal + directive?: string +} + +export interface BlockStatement extends Node { + type: "BlockStatement" + body: Array +} + +export interface EmptyStatement extends Node { + type: "EmptyStatement" +} + +export interface DebuggerStatement extends Node { + type: "DebuggerStatement" +} + +export interface WithStatement extends Node { + type: "WithStatement" + object: Expression + body: Statement +} + +export interface ReturnStatement extends Node { + type: "ReturnStatement" + argument?: Expression | null +} + +export interface LabeledStatement extends Node { + type: "LabeledStatement" + label: Identifier + body: Statement +} + +export interface BreakStatement extends Node { + type: "BreakStatement" + label?: Identifier | null +} + +export interface ContinueStatement extends Node { + type: "ContinueStatement" + label?: Identifier | null +} + +export interface IfStatement extends Node { + type: "IfStatement" + test: Expression + consequent: Statement + alternate?: Statement | null +} + +export interface SwitchStatement extends Node { + type: "SwitchStatement" + discriminant: Expression + cases: Array +} + +export interface SwitchCase extends Node { + type: "SwitchCase" + test?: Expression | null + consequent: Array +} + +export interface ThrowStatement extends Node { + type: "ThrowStatement" + argument: Expression +} + +export interface TryStatement extends Node { + type: "TryStatement" + block: BlockStatement + handler?: CatchClause | null + finalizer?: BlockStatement | null +} + +export interface CatchClause extends Node { + type: "CatchClause" + param?: Pattern | null + body: BlockStatement +} + +export interface WhileStatement extends Node { + type: "WhileStatement" + test: Expression + body: Statement +} + +export interface DoWhileStatement extends Node { + type: "DoWhileStatement" + body: Statement + test: Expression +} + +export interface ForStatement extends Node { + type: "ForStatement" + init?: VariableDeclaration | Expression | null + test?: Expression | null + update?: Expression | null + body: Statement +} + +export interface ForInStatement extends Node { + type: "ForInStatement" + left: VariableDeclaration | Pattern + right: Expression + body: Statement +} + +export interface FunctionDeclaration extends Function { + type: "FunctionDeclaration" + id: Identifier + body: BlockStatement +} + +export interface VariableDeclaration extends Node { + type: "VariableDeclaration" + declarations: Array + kind: "var" | "let" | "const" +} + +export interface VariableDeclarator extends Node { + type: "VariableDeclarator" + id: Pattern + init?: Expression | null +} + +export interface ThisExpression extends Node { + type: "ThisExpression" +} + +export interface ArrayExpression extends Node { + type: "ArrayExpression" + elements: Array +} + +export interface ObjectExpression extends Node { + type: "ObjectExpression" + properties: Array +} + +export interface Property extends Node { + type: "Property" + key: Expression + value: Expression + kind: "init" | "get" | "set" + method: boolean + shorthand: boolean + computed: boolean +} + +export interface FunctionExpression extends Function { + type: "FunctionExpression" + body: BlockStatement +} + +export interface UnaryExpression extends Node { + type: "UnaryExpression" + operator: UnaryOperator + prefix: boolean + argument: Expression +} + +export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete" + +export interface UpdateExpression extends Node { + type: "UpdateExpression" + operator: UpdateOperator + argument: Expression + prefix: boolean +} + +export type UpdateOperator = "++" | "--" + +export interface BinaryExpression extends Node { + type: "BinaryExpression" + operator: BinaryOperator + left: Expression | PrivateIdentifier + right: Expression +} + +export type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "in" | "instanceof" | "**" + +export interface AssignmentExpression extends Node { + type: "AssignmentExpression" + operator: AssignmentOperator + left: Pattern + right: Expression +} + +export type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "**=" | "||=" | "&&=" | "??=" + +export interface LogicalExpression extends Node { + type: "LogicalExpression" + operator: LogicalOperator + left: Expression + right: Expression +} + +export type LogicalOperator = "||" | "&&" | "??" + +export interface MemberExpression extends Node { + type: "MemberExpression" + object: Expression | Super + property: Expression | PrivateIdentifier + computed: boolean + optional: boolean +} + +export interface ConditionalExpression extends Node { + type: "ConditionalExpression" + test: Expression + alternate: Expression + consequent: Expression +} + +export interface CallExpression extends Node { + type: "CallExpression" + callee: Expression | Super + arguments: Array + optional: boolean +} + +export interface NewExpression extends Node { + type: "NewExpression" + callee: Expression + arguments: Array +} + +export interface SequenceExpression extends Node { + type: "SequenceExpression" + expressions: Array +} + +export interface ForOfStatement extends Node { + type: "ForOfStatement" + left: VariableDeclaration | Pattern + right: Expression + body: Statement + await: boolean +} + +export interface Super extends Node { + type: "Super" +} + +export interface SpreadElement extends Node { + type: "SpreadElement" + argument: Expression +} + +export interface ArrowFunctionExpression extends Function { + type: "ArrowFunctionExpression" +} + +export interface YieldExpression extends Node { + type: "YieldExpression" + argument?: Expression | null + delegate: boolean +} + +export interface TemplateLiteral extends Node { + type: "TemplateLiteral" + quasis: Array + expressions: Array +} + +export interface TaggedTemplateExpression extends Node { + type: "TaggedTemplateExpression" + tag: Expression + quasi: TemplateLiteral +} + +export interface TemplateElement extends Node { + type: "TemplateElement" + tail: boolean + value: { + cooked?: string | null + raw: string + } +} + +export interface AssignmentProperty extends Node { + type: "Property" + key: Expression + value: Pattern + kind: "init" + method: false + shorthand: boolean + computed: boolean +} + +export interface ObjectPattern extends Node { + type: "ObjectPattern" + properties: Array +} + +export interface ArrayPattern extends Node { + type: "ArrayPattern" + elements: Array +} + +export interface RestElement extends Node { + type: "RestElement" + argument: Pattern +} + +export interface AssignmentPattern extends Node { + type: "AssignmentPattern" + left: Pattern + right: Expression +} + +export interface Class extends Node { + id?: Identifier | null + superClass?: Expression | null + body: ClassBody +} + +export interface ClassBody extends Node { + type: "ClassBody" + body: Array +} + +export interface MethodDefinition extends Node { + type: "MethodDefinition" + key: Expression | PrivateIdentifier + value: FunctionExpression + kind: "constructor" | "method" | "get" | "set" + computed: boolean + static: boolean +} + +export interface ClassDeclaration extends Class { + type: "ClassDeclaration" + id: Identifier +} + +export interface ClassExpression extends Class { + type: "ClassExpression" +} + +export interface MetaProperty extends Node { + type: "MetaProperty" + meta: Identifier + property: Identifier +} + +export interface ImportDeclaration extends Node { + type: "ImportDeclaration" + specifiers: Array + source: Literal + attributes: Array +} + +export interface ImportSpecifier extends Node { + type: "ImportSpecifier" + imported: Identifier | Literal + local: Identifier +} + +export interface ImportDefaultSpecifier extends Node { + type: "ImportDefaultSpecifier" + local: Identifier +} + +export interface ImportNamespaceSpecifier extends Node { + type: "ImportNamespaceSpecifier" + local: Identifier +} + +export interface ImportAttribute extends Node { + type: "ImportAttribute" + key: Identifier | Literal + value: Literal +} + +export interface ExportNamedDeclaration extends Node { + type: "ExportNamedDeclaration" + declaration?: Declaration | null + specifiers: Array + source?: Literal | null + attributes: Array +} + +export interface ExportSpecifier extends Node { + type: "ExportSpecifier" + exported: Identifier | Literal + local: Identifier | Literal +} + +export interface AnonymousFunctionDeclaration extends Function { + type: "FunctionDeclaration" + id: null + body: BlockStatement +} + +export interface AnonymousClassDeclaration extends Class { + type: "ClassDeclaration" + id: null +} + +export interface ExportDefaultDeclaration extends Node { + type: "ExportDefaultDeclaration" + declaration: AnonymousFunctionDeclaration | FunctionDeclaration | AnonymousClassDeclaration | ClassDeclaration | Expression +} + +export interface ExportAllDeclaration extends Node { + type: "ExportAllDeclaration" + source: Literal + exported?: Identifier | Literal | null + attributes: Array +} + +export interface AwaitExpression extends Node { + type: "AwaitExpression" + argument: Expression +} + +export interface ChainExpression extends Node { + type: "ChainExpression" + expression: MemberExpression | CallExpression +} + +export interface ImportExpression extends Node { + type: "ImportExpression" + source: Expression + options: Expression | null +} + +export interface ParenthesizedExpression extends Node { + type: "ParenthesizedExpression" + expression: Expression +} + +export interface PropertyDefinition extends Node { + type: "PropertyDefinition" + key: Expression | PrivateIdentifier + value?: Expression | null + computed: boolean + static: boolean +} + +export interface PrivateIdentifier extends Node { + type: "PrivateIdentifier" + name: string +} + +export interface StaticBlock extends Node { + type: "StaticBlock" + body: Array +} + +export type Statement = +| ExpressionStatement +| BlockStatement +| EmptyStatement +| DebuggerStatement +| WithStatement +| ReturnStatement +| LabeledStatement +| BreakStatement +| ContinueStatement +| IfStatement +| SwitchStatement +| ThrowStatement +| TryStatement +| WhileStatement +| DoWhileStatement +| ForStatement +| ForInStatement +| ForOfStatement +| Declaration + +export type Declaration = +| FunctionDeclaration +| VariableDeclaration +| ClassDeclaration + +export type Expression = +| Identifier +| Literal +| ThisExpression +| ArrayExpression +| ObjectExpression +| FunctionExpression +| UnaryExpression +| UpdateExpression +| BinaryExpression +| AssignmentExpression +| LogicalExpression +| MemberExpression +| ConditionalExpression +| CallExpression +| NewExpression +| SequenceExpression +| ArrowFunctionExpression +| YieldExpression +| TemplateLiteral +| TaggedTemplateExpression +| ClassExpression +| MetaProperty +| AwaitExpression +| ChainExpression +| ImportExpression +| ParenthesizedExpression + +export type Pattern = +| Identifier +| MemberExpression +| ObjectPattern +| ArrayPattern +| RestElement +| AssignmentPattern + +export type ModuleDeclaration = +| ImportDeclaration +| ExportNamedDeclaration +| ExportDefaultDeclaration +| ExportAllDeclaration + +export type AnyNode = Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportAttribute | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock | VariableDeclarator + +export function parse(input: string, options: Options): Program + +export function parseExpressionAt(input: string, pos: number, options: Options): Expression + +export function tokenizer(input: string, options: Options): { + getToken(): Token + [Symbol.iterator](): Iterator +} + +export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | "latest" + +export interface Options { + /** + * `ecmaVersion` indicates the ECMAScript version to parse. Can be a + * number, either in year (`2022`) or plain version number (`6`) form, + * or `"latest"` (the latest the library supports). This influences + * support for strict mode, the set of reserved words, and support for + * new syntax features. + */ + ecmaVersion: ecmaVersion + + /** + * `sourceType` indicates the mode the code should be parsed in. + * Can be either `"script"` or `"module"`. This influences global + * strict mode and parsing of `import` and `export` declarations. + */ + sourceType?: "script" | "module" + + /** + * a callback that will be called when a semicolon is automatically inserted. + * @param lastTokEnd the position of the comma as an offset + * @param lastTokEndLoc location if {@link locations} is enabled + */ + onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void + + /** + * similar to `onInsertedSemicolon`, but for trailing commas + * @param lastTokEnd the position of the comma as an offset + * @param lastTokEndLoc location if `locations` is enabled + */ + onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void + + /** + * By default, reserved words are only enforced if ecmaVersion >= 5. + * Set `allowReserved` to a boolean value to explicitly turn this on + * an off. When this option has the value "never", reserved words + * and keywords can also not be used as property names. + */ + allowReserved?: boolean | "never" + + /** + * When enabled, a return at the top level is not considered an error. + */ + allowReturnOutsideFunction?: boolean + + /** + * When enabled, import/export statements are not constrained to + * appearing at the top of the program, and an import.meta expression + * in a script isn't considered an error. + */ + allowImportExportEverywhere?: boolean + + /** + * By default, `await` identifiers are allowed to appear at the top-level scope only if {@link ecmaVersion} >= 2022. + * When enabled, await identifiers are allowed to appear at the top-level scope, + * but they are still not allowed in non-async functions. + */ + allowAwaitOutsideFunction?: boolean + + /** + * When enabled, super identifiers are not constrained to + * appearing in methods and do not raise an error when they appear elsewhere. + */ + allowSuperOutsideMethod?: boolean + + /** + * When enabled, hashbang directive in the beginning of file is + * allowed and treated as a line comment. Enabled by default when + * {@link ecmaVersion} >= 2023. + */ + allowHashBang?: boolean + + /** + * By default, the parser will verify that private properties are + * only used in places where they are valid and have been declared. + * Set this to false to turn such checks off. + */ + checkPrivateFields?: boolean + + /** + * When `locations` is on, `loc` properties holding objects with + * `start` and `end` properties as {@link Position} objects will be attached to the + * nodes. + */ + locations?: boolean + + /** + * a callback that will cause Acorn to call that export function with object in the same + * format as tokens returned from `tokenizer().getToken()`. Note + * that you are not allowed to call the parser from the + * callback—that will corrupt its internal state. + */ + onToken?: ((token: Token) => void) | Token[] + + + /** + * This takes a export function or an array. + * + * When a export function is passed, Acorn will call that export function with `(block, text, start, + * end)` parameters whenever a comment is skipped. `block` is a + * boolean indicating whether this is a block (`/* *\/`) comment, + * `text` is the content of the comment, and `start` and `end` are + * character offsets that denote the start and end of the comment. + * When the {@link locations} option is on, two more parameters are + * passed, the full locations of {@link Position} export type of the start and + * end of the comments. + * + * When a array is passed, each found comment of {@link Comment} export type is pushed to the array. + * + * Note that you are not allowed to call the + * parser from the callback—that will corrupt its internal state. + */ + onComment?: (( + isBlock: boolean, text: string, start: number, end: number, startLoc?: Position, + endLoc?: Position + ) => void) | Comment[] + + /** + * Nodes have their start and end characters offsets recorded in + * `start` and `end` properties (directly on the node, rather than + * the `loc` object, which holds line/column data. To also add a + * [semi-standardized][range] `range` property holding a `[start, + * end]` array with the same numbers, set the `ranges` option to + * `true`. + */ + ranges?: boolean + + /** + * It is possible to parse multiple files into a single AST by + * passing the tree produced by parsing the first file as + * `program` option in subsequent parses. This will add the + * toplevel forms of the parsed file to the `Program` (top) node + * of an existing parse tree. + */ + program?: Node + + /** + * When {@link locations} is on, you can pass this to record the source + * file in every node's `loc` object. + */ + sourceFile?: string + + /** + * This value, if given, is stored in every node, whether {@link locations} is on or off. + */ + directSourceFile?: string + + /** + * When enabled, parenthesized expressions are represented by + * (non-standard) ParenthesizedExpression nodes + */ + preserveParens?: boolean +} + +export class Parser { + options: Options + input: string + + protected constructor(options: Options, input: string, startPos?: number) + parse(): Program + + static parse(input: string, options: Options): Program + static parseExpressionAt(input: string, pos: number, options: Options): Expression + static tokenizer(input: string, options: Options): { + getToken(): Token + [Symbol.iterator](): Iterator + } + static extend(...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser +} + +export const defaultOptions: Options + +export function getLineInfo(input: string, offset: number): Position + +export class TokenType { + label: string + keyword: string | undefined +} + +export const tokTypes: { + num: TokenType + regexp: TokenType + string: TokenType + name: TokenType + privateId: TokenType + eof: TokenType + + bracketL: TokenType + bracketR: TokenType + braceL: TokenType + braceR: TokenType + parenL: TokenType + parenR: TokenType + comma: TokenType + semi: TokenType + colon: TokenType + dot: TokenType + question: TokenType + questionDot: TokenType + arrow: TokenType + template: TokenType + invalidTemplate: TokenType + ellipsis: TokenType + backQuote: TokenType + dollarBraceL: TokenType + + eq: TokenType + assign: TokenType + incDec: TokenType + prefix: TokenType + logicalOR: TokenType + logicalAND: TokenType + bitwiseOR: TokenType + bitwiseXOR: TokenType + bitwiseAND: TokenType + equality: TokenType + relational: TokenType + bitShift: TokenType + plusMin: TokenType + modulo: TokenType + star: TokenType + slash: TokenType + starstar: TokenType + coalesce: TokenType + + _break: TokenType + _case: TokenType + _catch: TokenType + _continue: TokenType + _debugger: TokenType + _default: TokenType + _do: TokenType + _else: TokenType + _finally: TokenType + _for: TokenType + _function: TokenType + _if: TokenType + _return: TokenType + _switch: TokenType + _throw: TokenType + _try: TokenType + _var: TokenType + _const: TokenType + _while: TokenType + _with: TokenType + _new: TokenType + _this: TokenType + _super: TokenType + _class: TokenType + _extends: TokenType + _export: TokenType + _import: TokenType + _null: TokenType + _true: TokenType + _false: TokenType + _in: TokenType + _instanceof: TokenType + _typeof: TokenType + _void: TokenType + _delete: TokenType +} + +export interface Comment { + type: "Line" | "Block" + value: string + start: number + end: number + loc?: SourceLocation + range?: [number, number] +} + +export class Token { + type: TokenType + start: number + end: number + loc?: SourceLocation + range?: [number, number] +} + +export const version: string diff --git a/node_modules/acorn/dist/acorn.d.ts b/node_modules/acorn/dist/acorn.d.ts new file mode 100644 index 0000000..81f4e38 --- /dev/null +++ b/node_modules/acorn/dist/acorn.d.ts @@ -0,0 +1,866 @@ +export interface Node { + start: number + end: number + type: string + range?: [number, number] + loc?: SourceLocation | null +} + +export interface SourceLocation { + source?: string | null + start: Position + end: Position +} + +export interface Position { + /** 1-based */ + line: number + /** 0-based */ + column: number +} + +export interface Identifier extends Node { + type: "Identifier" + name: string +} + +export interface Literal extends Node { + type: "Literal" + value?: string | boolean | null | number | RegExp | bigint + raw?: string + regex?: { + pattern: string + flags: string + } + bigint?: string +} + +export interface Program extends Node { + type: "Program" + body: Array + sourceType: "script" | "module" +} + +export interface Function extends Node { + id?: Identifier | null + params: Array + body: BlockStatement | Expression + generator: boolean + expression: boolean + async: boolean +} + +export interface ExpressionStatement extends Node { + type: "ExpressionStatement" + expression: Expression | Literal + directive?: string +} + +export interface BlockStatement extends Node { + type: "BlockStatement" + body: Array +} + +export interface EmptyStatement extends Node { + type: "EmptyStatement" +} + +export interface DebuggerStatement extends Node { + type: "DebuggerStatement" +} + +export interface WithStatement extends Node { + type: "WithStatement" + object: Expression + body: Statement +} + +export interface ReturnStatement extends Node { + type: "ReturnStatement" + argument?: Expression | null +} + +export interface LabeledStatement extends Node { + type: "LabeledStatement" + label: Identifier + body: Statement +} + +export interface BreakStatement extends Node { + type: "BreakStatement" + label?: Identifier | null +} + +export interface ContinueStatement extends Node { + type: "ContinueStatement" + label?: Identifier | null +} + +export interface IfStatement extends Node { + type: "IfStatement" + test: Expression + consequent: Statement + alternate?: Statement | null +} + +export interface SwitchStatement extends Node { + type: "SwitchStatement" + discriminant: Expression + cases: Array +} + +export interface SwitchCase extends Node { + type: "SwitchCase" + test?: Expression | null + consequent: Array +} + +export interface ThrowStatement extends Node { + type: "ThrowStatement" + argument: Expression +} + +export interface TryStatement extends Node { + type: "TryStatement" + block: BlockStatement + handler?: CatchClause | null + finalizer?: BlockStatement | null +} + +export interface CatchClause extends Node { + type: "CatchClause" + param?: Pattern | null + body: BlockStatement +} + +export interface WhileStatement extends Node { + type: "WhileStatement" + test: Expression + body: Statement +} + +export interface DoWhileStatement extends Node { + type: "DoWhileStatement" + body: Statement + test: Expression +} + +export interface ForStatement extends Node { + type: "ForStatement" + init?: VariableDeclaration | Expression | null + test?: Expression | null + update?: Expression | null + body: Statement +} + +export interface ForInStatement extends Node { + type: "ForInStatement" + left: VariableDeclaration | Pattern + right: Expression + body: Statement +} + +export interface FunctionDeclaration extends Function { + type: "FunctionDeclaration" + id: Identifier + body: BlockStatement +} + +export interface VariableDeclaration extends Node { + type: "VariableDeclaration" + declarations: Array + kind: "var" | "let" | "const" +} + +export interface VariableDeclarator extends Node { + type: "VariableDeclarator" + id: Pattern + init?: Expression | null +} + +export interface ThisExpression extends Node { + type: "ThisExpression" +} + +export interface ArrayExpression extends Node { + type: "ArrayExpression" + elements: Array +} + +export interface ObjectExpression extends Node { + type: "ObjectExpression" + properties: Array +} + +export interface Property extends Node { + type: "Property" + key: Expression + value: Expression + kind: "init" | "get" | "set" + method: boolean + shorthand: boolean + computed: boolean +} + +export interface FunctionExpression extends Function { + type: "FunctionExpression" + body: BlockStatement +} + +export interface UnaryExpression extends Node { + type: "UnaryExpression" + operator: UnaryOperator + prefix: boolean + argument: Expression +} + +export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete" + +export interface UpdateExpression extends Node { + type: "UpdateExpression" + operator: UpdateOperator + argument: Expression + prefix: boolean +} + +export type UpdateOperator = "++" | "--" + +export interface BinaryExpression extends Node { + type: "BinaryExpression" + operator: BinaryOperator + left: Expression | PrivateIdentifier + right: Expression +} + +export type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "in" | "instanceof" | "**" + +export interface AssignmentExpression extends Node { + type: "AssignmentExpression" + operator: AssignmentOperator + left: Pattern + right: Expression +} + +export type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "**=" | "||=" | "&&=" | "??=" + +export interface LogicalExpression extends Node { + type: "LogicalExpression" + operator: LogicalOperator + left: Expression + right: Expression +} + +export type LogicalOperator = "||" | "&&" | "??" + +export interface MemberExpression extends Node { + type: "MemberExpression" + object: Expression | Super + property: Expression | PrivateIdentifier + computed: boolean + optional: boolean +} + +export interface ConditionalExpression extends Node { + type: "ConditionalExpression" + test: Expression + alternate: Expression + consequent: Expression +} + +export interface CallExpression extends Node { + type: "CallExpression" + callee: Expression | Super + arguments: Array + optional: boolean +} + +export interface NewExpression extends Node { + type: "NewExpression" + callee: Expression + arguments: Array +} + +export interface SequenceExpression extends Node { + type: "SequenceExpression" + expressions: Array +} + +export interface ForOfStatement extends Node { + type: "ForOfStatement" + left: VariableDeclaration | Pattern + right: Expression + body: Statement + await: boolean +} + +export interface Super extends Node { + type: "Super" +} + +export interface SpreadElement extends Node { + type: "SpreadElement" + argument: Expression +} + +export interface ArrowFunctionExpression extends Function { + type: "ArrowFunctionExpression" +} + +export interface YieldExpression extends Node { + type: "YieldExpression" + argument?: Expression | null + delegate: boolean +} + +export interface TemplateLiteral extends Node { + type: "TemplateLiteral" + quasis: Array + expressions: Array +} + +export interface TaggedTemplateExpression extends Node { + type: "TaggedTemplateExpression" + tag: Expression + quasi: TemplateLiteral +} + +export interface TemplateElement extends Node { + type: "TemplateElement" + tail: boolean + value: { + cooked?: string | null + raw: string + } +} + +export interface AssignmentProperty extends Node { + type: "Property" + key: Expression + value: Pattern + kind: "init" + method: false + shorthand: boolean + computed: boolean +} + +export interface ObjectPattern extends Node { + type: "ObjectPattern" + properties: Array +} + +export interface ArrayPattern extends Node { + type: "ArrayPattern" + elements: Array +} + +export interface RestElement extends Node { + type: "RestElement" + argument: Pattern +} + +export interface AssignmentPattern extends Node { + type: "AssignmentPattern" + left: Pattern + right: Expression +} + +export interface Class extends Node { + id?: Identifier | null + superClass?: Expression | null + body: ClassBody +} + +export interface ClassBody extends Node { + type: "ClassBody" + body: Array +} + +export interface MethodDefinition extends Node { + type: "MethodDefinition" + key: Expression | PrivateIdentifier + value: FunctionExpression + kind: "constructor" | "method" | "get" | "set" + computed: boolean + static: boolean +} + +export interface ClassDeclaration extends Class { + type: "ClassDeclaration" + id: Identifier +} + +export interface ClassExpression extends Class { + type: "ClassExpression" +} + +export interface MetaProperty extends Node { + type: "MetaProperty" + meta: Identifier + property: Identifier +} + +export interface ImportDeclaration extends Node { + type: "ImportDeclaration" + specifiers: Array + source: Literal + attributes: Array +} + +export interface ImportSpecifier extends Node { + type: "ImportSpecifier" + imported: Identifier | Literal + local: Identifier +} + +export interface ImportDefaultSpecifier extends Node { + type: "ImportDefaultSpecifier" + local: Identifier +} + +export interface ImportNamespaceSpecifier extends Node { + type: "ImportNamespaceSpecifier" + local: Identifier +} + +export interface ImportAttribute extends Node { + type: "ImportAttribute" + key: Identifier | Literal + value: Literal +} + +export interface ExportNamedDeclaration extends Node { + type: "ExportNamedDeclaration" + declaration?: Declaration | null + specifiers: Array + source?: Literal | null + attributes: Array +} + +export interface ExportSpecifier extends Node { + type: "ExportSpecifier" + exported: Identifier | Literal + local: Identifier | Literal +} + +export interface AnonymousFunctionDeclaration extends Function { + type: "FunctionDeclaration" + id: null + body: BlockStatement +} + +export interface AnonymousClassDeclaration extends Class { + type: "ClassDeclaration" + id: null +} + +export interface ExportDefaultDeclaration extends Node { + type: "ExportDefaultDeclaration" + declaration: AnonymousFunctionDeclaration | FunctionDeclaration | AnonymousClassDeclaration | ClassDeclaration | Expression +} + +export interface ExportAllDeclaration extends Node { + type: "ExportAllDeclaration" + source: Literal + exported?: Identifier | Literal | null + attributes: Array +} + +export interface AwaitExpression extends Node { + type: "AwaitExpression" + argument: Expression +} + +export interface ChainExpression extends Node { + type: "ChainExpression" + expression: MemberExpression | CallExpression +} + +export interface ImportExpression extends Node { + type: "ImportExpression" + source: Expression + options: Expression | null +} + +export interface ParenthesizedExpression extends Node { + type: "ParenthesizedExpression" + expression: Expression +} + +export interface PropertyDefinition extends Node { + type: "PropertyDefinition" + key: Expression | PrivateIdentifier + value?: Expression | null + computed: boolean + static: boolean +} + +export interface PrivateIdentifier extends Node { + type: "PrivateIdentifier" + name: string +} + +export interface StaticBlock extends Node { + type: "StaticBlock" + body: Array +} + +export type Statement = +| ExpressionStatement +| BlockStatement +| EmptyStatement +| DebuggerStatement +| WithStatement +| ReturnStatement +| LabeledStatement +| BreakStatement +| ContinueStatement +| IfStatement +| SwitchStatement +| ThrowStatement +| TryStatement +| WhileStatement +| DoWhileStatement +| ForStatement +| ForInStatement +| ForOfStatement +| Declaration + +export type Declaration = +| FunctionDeclaration +| VariableDeclaration +| ClassDeclaration + +export type Expression = +| Identifier +| Literal +| ThisExpression +| ArrayExpression +| ObjectExpression +| FunctionExpression +| UnaryExpression +| UpdateExpression +| BinaryExpression +| AssignmentExpression +| LogicalExpression +| MemberExpression +| ConditionalExpression +| CallExpression +| NewExpression +| SequenceExpression +| ArrowFunctionExpression +| YieldExpression +| TemplateLiteral +| TaggedTemplateExpression +| ClassExpression +| MetaProperty +| AwaitExpression +| ChainExpression +| ImportExpression +| ParenthesizedExpression + +export type Pattern = +| Identifier +| MemberExpression +| ObjectPattern +| ArrayPattern +| RestElement +| AssignmentPattern + +export type ModuleDeclaration = +| ImportDeclaration +| ExportNamedDeclaration +| ExportDefaultDeclaration +| ExportAllDeclaration + +export type AnyNode = Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportAttribute | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock | VariableDeclarator + +export function parse(input: string, options: Options): Program + +export function parseExpressionAt(input: string, pos: number, options: Options): Expression + +export function tokenizer(input: string, options: Options): { + getToken(): Token + [Symbol.iterator](): Iterator +} + +export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | "latest" + +export interface Options { + /** + * `ecmaVersion` indicates the ECMAScript version to parse. Can be a + * number, either in year (`2022`) or plain version number (`6`) form, + * or `"latest"` (the latest the library supports). This influences + * support for strict mode, the set of reserved words, and support for + * new syntax features. + */ + ecmaVersion: ecmaVersion + + /** + * `sourceType` indicates the mode the code should be parsed in. + * Can be either `"script"` or `"module"`. This influences global + * strict mode and parsing of `import` and `export` declarations. + */ + sourceType?: "script" | "module" + + /** + * a callback that will be called when a semicolon is automatically inserted. + * @param lastTokEnd the position of the comma as an offset + * @param lastTokEndLoc location if {@link locations} is enabled + */ + onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void + + /** + * similar to `onInsertedSemicolon`, but for trailing commas + * @param lastTokEnd the position of the comma as an offset + * @param lastTokEndLoc location if `locations` is enabled + */ + onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void + + /** + * By default, reserved words are only enforced if ecmaVersion >= 5. + * Set `allowReserved` to a boolean value to explicitly turn this on + * an off. When this option has the value "never", reserved words + * and keywords can also not be used as property names. + */ + allowReserved?: boolean | "never" + + /** + * When enabled, a return at the top level is not considered an error. + */ + allowReturnOutsideFunction?: boolean + + /** + * When enabled, import/export statements are not constrained to + * appearing at the top of the program, and an import.meta expression + * in a script isn't considered an error. + */ + allowImportExportEverywhere?: boolean + + /** + * By default, `await` identifiers are allowed to appear at the top-level scope only if {@link ecmaVersion} >= 2022. + * When enabled, await identifiers are allowed to appear at the top-level scope, + * but they are still not allowed in non-async functions. + */ + allowAwaitOutsideFunction?: boolean + + /** + * When enabled, super identifiers are not constrained to + * appearing in methods and do not raise an error when they appear elsewhere. + */ + allowSuperOutsideMethod?: boolean + + /** + * When enabled, hashbang directive in the beginning of file is + * allowed and treated as a line comment. Enabled by default when + * {@link ecmaVersion} >= 2023. + */ + allowHashBang?: boolean + + /** + * By default, the parser will verify that private properties are + * only used in places where they are valid and have been declared. + * Set this to false to turn such checks off. + */ + checkPrivateFields?: boolean + + /** + * When `locations` is on, `loc` properties holding objects with + * `start` and `end` properties as {@link Position} objects will be attached to the + * nodes. + */ + locations?: boolean + + /** + * a callback that will cause Acorn to call that export function with object in the same + * format as tokens returned from `tokenizer().getToken()`. Note + * that you are not allowed to call the parser from the + * callback—that will corrupt its internal state. + */ + onToken?: ((token: Token) => void) | Token[] + + + /** + * This takes a export function or an array. + * + * When a export function is passed, Acorn will call that export function with `(block, text, start, + * end)` parameters whenever a comment is skipped. `block` is a + * boolean indicating whether this is a block (`/* *\/`) comment, + * `text` is the content of the comment, and `start` and `end` are + * character offsets that denote the start and end of the comment. + * When the {@link locations} option is on, two more parameters are + * passed, the full locations of {@link Position} export type of the start and + * end of the comments. + * + * When a array is passed, each found comment of {@link Comment} export type is pushed to the array. + * + * Note that you are not allowed to call the + * parser from the callback—that will corrupt its internal state. + */ + onComment?: (( + isBlock: boolean, text: string, start: number, end: number, startLoc?: Position, + endLoc?: Position + ) => void) | Comment[] + + /** + * Nodes have their start and end characters offsets recorded in + * `start` and `end` properties (directly on the node, rather than + * the `loc` object, which holds line/column data. To also add a + * [semi-standardized][range] `range` property holding a `[start, + * end]` array with the same numbers, set the `ranges` option to + * `true`. + */ + ranges?: boolean + + /** + * It is possible to parse multiple files into a single AST by + * passing the tree produced by parsing the first file as + * `program` option in subsequent parses. This will add the + * toplevel forms of the parsed file to the `Program` (top) node + * of an existing parse tree. + */ + program?: Node + + /** + * When {@link locations} is on, you can pass this to record the source + * file in every node's `loc` object. + */ + sourceFile?: string + + /** + * This value, if given, is stored in every node, whether {@link locations} is on or off. + */ + directSourceFile?: string + + /** + * When enabled, parenthesized expressions are represented by + * (non-standard) ParenthesizedExpression nodes + */ + preserveParens?: boolean +} + +export class Parser { + options: Options + input: string + + protected constructor(options: Options, input: string, startPos?: number) + parse(): Program + + static parse(input: string, options: Options): Program + static parseExpressionAt(input: string, pos: number, options: Options): Expression + static tokenizer(input: string, options: Options): { + getToken(): Token + [Symbol.iterator](): Iterator + } + static extend(...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser +} + +export const defaultOptions: Options + +export function getLineInfo(input: string, offset: number): Position + +export class TokenType { + label: string + keyword: string | undefined +} + +export const tokTypes: { + num: TokenType + regexp: TokenType + string: TokenType + name: TokenType + privateId: TokenType + eof: TokenType + + bracketL: TokenType + bracketR: TokenType + braceL: TokenType + braceR: TokenType + parenL: TokenType + parenR: TokenType + comma: TokenType + semi: TokenType + colon: TokenType + dot: TokenType + question: TokenType + questionDot: TokenType + arrow: TokenType + template: TokenType + invalidTemplate: TokenType + ellipsis: TokenType + backQuote: TokenType + dollarBraceL: TokenType + + eq: TokenType + assign: TokenType + incDec: TokenType + prefix: TokenType + logicalOR: TokenType + logicalAND: TokenType + bitwiseOR: TokenType + bitwiseXOR: TokenType + bitwiseAND: TokenType + equality: TokenType + relational: TokenType + bitShift: TokenType + plusMin: TokenType + modulo: TokenType + star: TokenType + slash: TokenType + starstar: TokenType + coalesce: TokenType + + _break: TokenType + _case: TokenType + _catch: TokenType + _continue: TokenType + _debugger: TokenType + _default: TokenType + _do: TokenType + _else: TokenType + _finally: TokenType + _for: TokenType + _function: TokenType + _if: TokenType + _return: TokenType + _switch: TokenType + _throw: TokenType + _try: TokenType + _var: TokenType + _const: TokenType + _while: TokenType + _with: TokenType + _new: TokenType + _this: TokenType + _super: TokenType + _class: TokenType + _extends: TokenType + _export: TokenType + _import: TokenType + _null: TokenType + _true: TokenType + _false: TokenType + _in: TokenType + _instanceof: TokenType + _typeof: TokenType + _void: TokenType + _delete: TokenType +} + +export interface Comment { + type: "Line" | "Block" + value: string + start: number + end: number + loc?: SourceLocation + range?: [number, number] +} + +export class Token { + type: TokenType + start: number + end: number + loc?: SourceLocation + range?: [number, number] +} + +export const version: string diff --git a/node_modules/acorn/dist/acorn.js b/node_modules/acorn/dist/acorn.js new file mode 100644 index 0000000..2bfc15b --- /dev/null +++ b/node_modules/acorn/dist/acorn.js @@ -0,0 +1,6174 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.acorn = {})); +})(this, (function (exports) { 'use strict'; + + // This file was generated. Do not modify manually! + var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; + + // This file was generated. Do not modify manually! + var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; + + // This file was generated. Do not modify manually! + var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0897-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65"; + + // This file was generated. Do not modify manually! + var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c8a\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7cd\ua7d0\ua7d1\ua7d3\ua7d5-\ua7dc\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; + + // These are a run-length and offset encoded representation of the + // >0xffff code points that are a valid part of identifiers. The + // offset starts at 0x10000, and each pair of numbers represents an + // offset to the next range, and then a size of the range. + + // Reserved word lists for various dialects of the language + + var reservedWords = { + 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", + 5: "class enum extends super const export import", + 6: "enum", + strict: "implements interface let package private protected public static yield", + strictBind: "eval arguments" + }; + + // And the keywords + + var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; + + var keywords$1 = { + 5: ecma5AndLessKeywords, + "5module": ecma5AndLessKeywords + " export import", + 6: ecma5AndLessKeywords + " const class extends export import super" + }; + + var keywordRelationalOperator = /^in(stanceof)?$/; + + // ## Character categories + + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + + // This has a complexity linear to the value of the code. The + // assumption is that looking up astral identifier characters is + // rare. + function isInAstralSet(code, set) { + var pos = 0x10000; + for (var i = 0; i < set.length; i += 2) { + pos += set[i]; + if (pos > code) { return false } + pos += set[i + 1]; + if (pos >= code) { return true } + } + return false + } + + // Test whether a given character code starts an identifier. + + function isIdentifierStart(code, astral) { + if (code < 65) { return code === 36 } + if (code < 91) { return true } + if (code < 97) { return code === 95 } + if (code < 123) { return true } + if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) } + if (astral === false) { return false } + return isInAstralSet(code, astralIdentifierStartCodes) + } + + // Test whether a given character is part of an identifier. + + function isIdentifierChar(code, astral) { + if (code < 48) { return code === 36 } + if (code < 58) { return true } + if (code < 65) { return false } + if (code < 91) { return true } + if (code < 97) { return code === 95 } + if (code < 123) { return true } + if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) } + if (astral === false) { return false } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) + } + + // ## Token types + + // The assignment of fine-grained, information-carrying type objects + // allows the tokenizer to store the information it has about a + // token in a way that is very cheap for the parser to look up. + + // All token type variables start with an underscore, to make them + // easy to recognize. + + // The `beforeExpr` property is used to disambiguate between regular + // expressions and divisions. It is set on all token types that can + // be followed by an expression (thus, a slash after them would be a + // regular expression). + // + // The `startsExpr` property is used to check if the token ends a + // `yield` expression. It is set on all token types that either can + // directly start an expression (like a quotation mark) or can + // continue an expression (like the body of a string). + // + // `isLoop` marks a keyword as starting a loop, which is important + // to know when parsing a label, in order to allow or disallow + // continue jumps to that label. + + var TokenType = function TokenType(label, conf) { + if ( conf === void 0 ) conf = {}; + + this.label = label; + this.keyword = conf.keyword; + this.beforeExpr = !!conf.beforeExpr; + this.startsExpr = !!conf.startsExpr; + this.isLoop = !!conf.isLoop; + this.isAssign = !!conf.isAssign; + this.prefix = !!conf.prefix; + this.postfix = !!conf.postfix; + this.binop = conf.binop || null; + this.updateContext = null; + }; + + function binop(name, prec) { + return new TokenType(name, {beforeExpr: true, binop: prec}) + } + var beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true}; + + // Map keyword names to token types. + + var keywords = {}; + + // Succinct definitions of keyword token types + function kw(name, options) { + if ( options === void 0 ) options = {}; + + options.keyword = name; + return keywords[name] = new TokenType(name, options) + } + + var types$1 = { + num: new TokenType("num", startsExpr), + regexp: new TokenType("regexp", startsExpr), + string: new TokenType("string", startsExpr), + name: new TokenType("name", startsExpr), + privateId: new TokenType("privateId", startsExpr), + eof: new TokenType("eof"), + + // Punctuation token types. + bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), + bracketR: new TokenType("]"), + braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), + braceR: new TokenType("}"), + parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), + parenR: new TokenType(")"), + comma: new TokenType(",", beforeExpr), + semi: new TokenType(";", beforeExpr), + colon: new TokenType(":", beforeExpr), + dot: new TokenType("."), + question: new TokenType("?", beforeExpr), + questionDot: new TokenType("?."), + arrow: new TokenType("=>", beforeExpr), + template: new TokenType("template"), + invalidTemplate: new TokenType("invalidTemplate"), + ellipsis: new TokenType("...", beforeExpr), + backQuote: new TokenType("`", startsExpr), + dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), + + // Operators. These carry several kinds of properties to help the + // parser use them properly (the presence of these properties is + // what categorizes them as operators). + // + // `binop`, when present, specifies that this operator is a binary + // operator, and will refer to its precedence. + // + // `prefix` and `postfix` mark the operator as a prefix or postfix + // unary operator. + // + // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as + // binary operators with a very low precedence, that should result + // in AssignmentExpression nodes. + + eq: new TokenType("=", {beforeExpr: true, isAssign: true}), + assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), + incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), + prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}), + logicalOR: binop("||", 1), + logicalAND: binop("&&", 2), + bitwiseOR: binop("|", 3), + bitwiseXOR: binop("^", 4), + bitwiseAND: binop("&", 5), + equality: binop("==/!=/===/!==", 6), + relational: binop("/<=/>=", 7), + bitShift: binop("<>/>>>", 8), + plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), + modulo: binop("%", 10), + star: binop("*", 10), + slash: binop("/", 10), + starstar: new TokenType("**", {beforeExpr: true}), + coalesce: binop("??", 1), + + // Keyword token types. + _break: kw("break"), + _case: kw("case", beforeExpr), + _catch: kw("catch"), + _continue: kw("continue"), + _debugger: kw("debugger"), + _default: kw("default", beforeExpr), + _do: kw("do", {isLoop: true, beforeExpr: true}), + _else: kw("else", beforeExpr), + _finally: kw("finally"), + _for: kw("for", {isLoop: true}), + _function: kw("function", startsExpr), + _if: kw("if"), + _return: kw("return", beforeExpr), + _switch: kw("switch"), + _throw: kw("throw", beforeExpr), + _try: kw("try"), + _var: kw("var"), + _const: kw("const"), + _while: kw("while", {isLoop: true}), + _with: kw("with"), + _new: kw("new", {beforeExpr: true, startsExpr: true}), + _this: kw("this", startsExpr), + _super: kw("super", startsExpr), + _class: kw("class", startsExpr), + _extends: kw("extends", beforeExpr), + _export: kw("export"), + _import: kw("import", startsExpr), + _null: kw("null", startsExpr), + _true: kw("true", startsExpr), + _false: kw("false", startsExpr), + _in: kw("in", {beforeExpr: true, binop: 7}), + _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), + _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), + _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), + _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) + }; + + // Matches a whole line break (where CRLF is considered a single + // line break). Used to count lines. + + var lineBreak = /\r\n?|\n|\u2028|\u2029/; + var lineBreakG = new RegExp(lineBreak.source, "g"); + + function isNewLine(code) { + return code === 10 || code === 13 || code === 0x2028 || code === 0x2029 + } + + function nextLineBreak(code, from, end) { + if ( end === void 0 ) end = code.length; + + for (var i = from; i < end; i++) { + var next = code.charCodeAt(i); + if (isNewLine(next)) + { return i < end - 1 && next === 13 && code.charCodeAt(i + 1) === 10 ? i + 2 : i + 1 } + } + return -1 + } + + var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; + + var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; + + var ref = Object.prototype; + var hasOwnProperty = ref.hasOwnProperty; + var toString = ref.toString; + + var hasOwn = Object.hasOwn || (function (obj, propName) { return ( + hasOwnProperty.call(obj, propName) + ); }); + + var isArray = Array.isArray || (function (obj) { return ( + toString.call(obj) === "[object Array]" + ); }); + + var regexpCache = Object.create(null); + + function wordsRegexp(words) { + return regexpCache[words] || (regexpCache[words] = new RegExp("^(?:" + words.replace(/ /g, "|") + ")$")) + } + + function codePointToString(code) { + // UTF-16 Decoding + if (code <= 0xFFFF) { return String.fromCharCode(code) } + code -= 0x10000; + return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00) + } + + var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/; + + // These are used when `options.locations` is on, for the + // `startLoc` and `endLoc` properties. + + var Position = function Position(line, col) { + this.line = line; + this.column = col; + }; + + Position.prototype.offset = function offset (n) { + return new Position(this.line, this.column + n) + }; + + var SourceLocation = function SourceLocation(p, start, end) { + this.start = start; + this.end = end; + if (p.sourceFile !== null) { this.source = p.sourceFile; } + }; + + // The `getLineInfo` function is mostly useful when the + // `locations` option is off (for performance reasons) and you + // want to find the line/column position for a given character + // offset. `input` should be the code string that the offset refers + // into. + + function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + var nextBreak = nextLineBreak(input, cur, offset); + if (nextBreak < 0) { return new Position(line, offset - cur) } + ++line; + cur = nextBreak; + } + } + + // A second argument must be given to configure the parser process. + // These options are recognized (only `ecmaVersion` is required): + + var defaultOptions = { + // `ecmaVersion` indicates the ECMAScript version to parse. Must be + // either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 + // (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` + // (the latest version the library supports). This influences + // support for strict mode, the set of reserved words, and support + // for new syntax features. + ecmaVersion: null, + // `sourceType` indicates the mode the code should be parsed in. + // Can be either `"script"` or `"module"`. This influences global + // strict mode and parsing of `import` and `export` declarations. + sourceType: "script", + // `onInsertedSemicolon` can be a callback that will be called when + // a semicolon is automatically inserted. It will be passed the + // position of the inserted semicolon as an offset, and if + // `locations` is enabled, it is given the location as a `{line, + // column}` object as second argument. + onInsertedSemicolon: null, + // `onTrailingComma` is similar to `onInsertedSemicolon`, but for + // trailing commas. + onTrailingComma: null, + // By default, reserved words are only enforced if ecmaVersion >= 5. + // Set `allowReserved` to a boolean value to explicitly turn this on + // an off. When this option has the value "never", reserved words + // and keywords can also not be used as property names. + allowReserved: null, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program, and an import.meta expression + // in a script isn't considered an error. + allowImportExportEverywhere: false, + // By default, await identifiers are allowed to appear at the top-level scope only if ecmaVersion >= 2022. + // When enabled, await identifiers are allowed to appear at the top-level scope, + // but they are still not allowed in non-async functions. + allowAwaitOutsideFunction: null, + // When enabled, super identifiers are not constrained to + // appearing in methods and do not raise an error when they appear elsewhere. + allowSuperOutsideMethod: null, + // When enabled, hashbang directive in the beginning of file is + // allowed and treated as a line comment. Enabled by default when + // `ecmaVersion` >= 2023. + allowHashBang: false, + // By default, the parser will verify that private properties are + // only used in places where they are valid and have been declared. + // Set this to false to turn such checks off. + checkPrivateFields: true, + // When `locations` is on, `loc` properties holding objects with + // `start` and `end` properties in `{line, column}` form (with + // line being 1-based and column 0-based) will be attached to the + // nodes. + locations: false, + // A function can be passed as `onToken` option, which will + // cause Acorn to call that function with object in the same + // format as tokens returned from `tokenizer().getToken()`. Note + // that you are not allowed to call the parser from the + // callback—that will corrupt its internal state. + onToken: null, + // A function can be passed as `onComment` option, which will + // cause Acorn to call that function with `(block, text, start, + // end)` parameters whenever a comment is skipped. `block` is a + // boolean indicating whether this is a block (`/* */`) comment, + // `text` is the content of the comment, and `start` and `end` are + // character offsets that denote the start and end of the comment. + // When the `locations` option is on, two more parameters are + // passed, the full `{line, column}` locations of the start and + // end of the comments. Note that you are not allowed to call the + // parser from the callback—that will corrupt its internal state. + // When this option has an array as value, objects representing the + // comments are pushed to it. + onComment: null, + // Nodes have their start and end characters offsets recorded in + // `start` and `end` properties (directly on the node, rather than + // the `loc` object, which holds line/column data. To also add a + // [semi-standardized][range] `range` property holding a `[start, + // end]` array with the same numbers, set the `ranges` option to + // `true`. + // + // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + ranges: false, + // It is possible to parse multiple files into a single AST by + // passing the tree produced by parsing the first file as + // `program` option in subsequent parses. This will add the + // toplevel forms of the parsed file to the `Program` (top) node + // of an existing parse tree. + program: null, + // When `locations` is on, you can pass this to record the source + // file in every node's `loc` object. + sourceFile: null, + // This value, if given, is stored in every node, whether + // `locations` is on or off. + directSourceFile: null, + // When enabled, parenthesized expressions are represented by + // (non-standard) ParenthesizedExpression nodes + preserveParens: false + }; + + // Interpret and default an options object + + var warnedAboutEcmaVersion = false; + + function getOptions(opts) { + var options = {}; + + for (var opt in defaultOptions) + { options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions[opt]; } + + if (options.ecmaVersion === "latest") { + options.ecmaVersion = 1e8; + } else if (options.ecmaVersion == null) { + if (!warnedAboutEcmaVersion && typeof console === "object" && console.warn) { + warnedAboutEcmaVersion = true; + console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future."); + } + options.ecmaVersion = 11; + } else if (options.ecmaVersion >= 2015) { + options.ecmaVersion -= 2009; + } + + if (options.allowReserved == null) + { options.allowReserved = options.ecmaVersion < 5; } + + if (!opts || opts.allowHashBang == null) + { options.allowHashBang = options.ecmaVersion >= 14; } + + if (isArray(options.onToken)) { + var tokens = options.onToken; + options.onToken = function (token) { return tokens.push(token); }; + } + if (isArray(options.onComment)) + { options.onComment = pushComment(options, options.onComment); } + + return options + } + + function pushComment(options, array) { + return function(block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? "Block" : "Line", + value: text, + start: start, + end: end + }; + if (options.locations) + { comment.loc = new SourceLocation(this, startLoc, endLoc); } + if (options.ranges) + { comment.range = [start, end]; } + array.push(comment); + } + } + + // Each scope gets a bitset that may contain these flags + var + SCOPE_TOP = 1, + SCOPE_FUNCTION = 2, + SCOPE_ASYNC = 4, + SCOPE_GENERATOR = 8, + SCOPE_ARROW = 16, + SCOPE_SIMPLE_CATCH = 32, + SCOPE_SUPER = 64, + SCOPE_DIRECT_SUPER = 128, + SCOPE_CLASS_STATIC_BLOCK = 256, + SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK; + + function functionFlags(async, generator) { + return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0) + } + + // Used in checkLVal* and declareName to determine the type of a binding + var + BIND_NONE = 0, // Not a binding + BIND_VAR = 1, // Var-style binding + BIND_LEXICAL = 2, // Let- or const-style binding + BIND_FUNCTION = 3, // Function declaration + BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding + BIND_OUTSIDE = 5; // Special case for function names as bound inside the function + + var Parser = function Parser(options, input, startPos) { + this.options = options = getOptions(options); + this.sourceFile = options.sourceFile; + this.keywords = wordsRegexp(keywords$1[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]); + var reserved = ""; + if (options.allowReserved !== true) { + reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3]; + if (options.sourceType === "module") { reserved += " await"; } + } + this.reservedWords = wordsRegexp(reserved); + var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; + this.reservedWordsStrict = wordsRegexp(reservedStrict); + this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); + this.input = String(input); + + // Used to signal to callers of `readWord1` whether the word + // contained any escape sequences. This is needed because words with + // escape sequences must not be interpreted as keywords. + this.containsEsc = false; + + // Set up token state + + // The current position of the tokenizer in the input. + if (startPos) { + this.pos = startPos; + this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; + this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; + } else { + this.pos = this.lineStart = 0; + this.curLine = 1; + } + + // Properties of the current token: + // Its type + this.type = types$1.eof; + // For tokens that include more information than their type, the value + this.value = null; + // Its start and end offset + this.start = this.end = this.pos; + // And, if locations are used, the {line, column} object + // corresponding to those offsets + this.startLoc = this.endLoc = this.curPosition(); + + // Position information for the previous token + this.lastTokEndLoc = this.lastTokStartLoc = null; + this.lastTokStart = this.lastTokEnd = this.pos; + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + this.context = this.initialContext(); + this.exprAllowed = true; + + // Figure out if it's a module code. + this.inModule = options.sourceType === "module"; + this.strict = this.inModule || this.strictDirective(this.pos); + + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1; + this.potentialArrowInForAwait = false; + + // Positions to delayed-check that yield/await does not exist in default parameters. + this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; + // Labels in scope. + this.labels = []; + // Thus-far undefined exports. + this.undefinedExports = Object.create(null); + + // If enabled, skip leading hashbang line. + if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") + { this.skipLineComment(2); } + + // Scope tracking for duplicate variable names (see scope.js) + this.scopeStack = []; + this.enterScope(SCOPE_TOP); + + // For RegExp validation + this.regexpState = null; + + // The stack of private names. + // Each element has two properties: 'declared' and 'used'. + // When it exited from the outermost class definition, all used private names must be declared. + this.privateNameStack = []; + }; + + var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },canAwait: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true },allowNewDotTarget: { configurable: true },inClassStaticBlock: { configurable: true } }; + + Parser.prototype.parse = function parse () { + var node = this.options.program || this.startNode(); + this.nextToken(); + return this.parseTopLevel(node) + }; + + prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 }; + + prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 && !this.currentVarScope().inClassFieldInit }; + + prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 && !this.currentVarScope().inClassFieldInit }; + + prototypeAccessors.canAwait.get = function () { + for (var i = this.scopeStack.length - 1; i >= 0; i--) { + var scope = this.scopeStack[i]; + if (scope.inClassFieldInit || scope.flags & SCOPE_CLASS_STATIC_BLOCK) { return false } + if (scope.flags & SCOPE_FUNCTION) { return (scope.flags & SCOPE_ASYNC) > 0 } + } + return (this.inModule && this.options.ecmaVersion >= 13) || this.options.allowAwaitOutsideFunction + }; + + prototypeAccessors.allowSuper.get = function () { + var ref = this.currentThisScope(); + var flags = ref.flags; + var inClassFieldInit = ref.inClassFieldInit; + return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod + }; + + prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }; + + prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) }; + + prototypeAccessors.allowNewDotTarget.get = function () { + var ref = this.currentThisScope(); + var flags = ref.flags; + var inClassFieldInit = ref.inClassFieldInit; + return (flags & (SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK)) > 0 || inClassFieldInit + }; + + prototypeAccessors.inClassStaticBlock.get = function () { + return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0 + }; + + Parser.extend = function extend () { + var plugins = [], len = arguments.length; + while ( len-- ) plugins[ len ] = arguments[ len ]; + + var cls = this; + for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); } + return cls + }; + + Parser.parse = function parse (input, options) { + return new this(options, input).parse() + }; + + Parser.parseExpressionAt = function parseExpressionAt (input, pos, options) { + var parser = new this(options, input, pos); + parser.nextToken(); + return parser.parseExpression() + }; + + Parser.tokenizer = function tokenizer (input, options) { + return new this(options, input) + }; + + Object.defineProperties( Parser.prototype, prototypeAccessors ); + + var pp$9 = Parser.prototype; + + // ## Parser utilities + + var literal = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/; + pp$9.strictDirective = function(start) { + if (this.options.ecmaVersion < 5) { return false } + for (;;) { + // Try to find string literal. + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + var match = literal.exec(this.input.slice(start)); + if (!match) { return false } + if ((match[1] || match[2]) === "use strict") { + skipWhiteSpace.lastIndex = start + match[0].length; + var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length; + var next = this.input.charAt(end); + return next === ";" || next === "}" || + (lineBreak.test(spaceAfter[0]) && + !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=")) + } + start += match[0].length; + + // Skip semicolon, if any. + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + if (this.input[start] === ";") + { start++; } + } + }; + + // Predicate that tests whether the next token is of the given + // type, and if yes, consumes it as a side effect. + + pp$9.eat = function(type) { + if (this.type === type) { + this.next(); + return true + } else { + return false + } + }; + + // Tests whether parsed token is a contextual keyword. + + pp$9.isContextual = function(name) { + return this.type === types$1.name && this.value === name && !this.containsEsc + }; + + // Consumes contextual keyword if possible. + + pp$9.eatContextual = function(name) { + if (!this.isContextual(name)) { return false } + this.next(); + return true + }; + + // Asserts that following token is given contextual keyword. + + pp$9.expectContextual = function(name) { + if (!this.eatContextual(name)) { this.unexpected(); } + }; + + // Test whether a semicolon can be inserted at the current position. + + pp$9.canInsertSemicolon = function() { + return this.type === types$1.eof || + this.type === types$1.braceR || + lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + }; + + pp$9.insertSemicolon = function() { + if (this.canInsertSemicolon()) { + if (this.options.onInsertedSemicolon) + { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } + return true + } + }; + + // Consume a semicolon, or, failing that, see if we are allowed to + // pretend that there is a semicolon at this position. + + pp$9.semicolon = function() { + if (!this.eat(types$1.semi) && !this.insertSemicolon()) { this.unexpected(); } + }; + + pp$9.afterTrailingComma = function(tokType, notNext) { + if (this.type === tokType) { + if (this.options.onTrailingComma) + { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } + if (!notNext) + { this.next(); } + return true + } + }; + + // Expect a token of a given type. If found, consume it, otherwise, + // raise an unexpected token error. + + pp$9.expect = function(type) { + this.eat(type) || this.unexpected(); + }; + + // Raise an unexpected token error. + + pp$9.unexpected = function(pos) { + this.raise(pos != null ? pos : this.start, "Unexpected token"); + }; + + var DestructuringErrors = function DestructuringErrors() { + this.shorthandAssign = + this.trailingComma = + this.parenthesizedAssign = + this.parenthesizedBind = + this.doubleProto = + -1; + }; + + pp$9.checkPatternErrors = function(refDestructuringErrors, isAssign) { + if (!refDestructuringErrors) { return } + if (refDestructuringErrors.trailingComma > -1) + { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } + var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; + if (parens > -1) { this.raiseRecoverable(parens, isAssign ? "Assigning to rvalue" : "Parenthesized pattern"); } + }; + + pp$9.checkExpressionErrors = function(refDestructuringErrors, andThrow) { + if (!refDestructuringErrors) { return false } + var shorthandAssign = refDestructuringErrors.shorthandAssign; + var doubleProto = refDestructuringErrors.doubleProto; + if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 } + if (shorthandAssign >= 0) + { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } + if (doubleProto >= 0) + { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } + }; + + pp$9.checkYieldAwaitInDefaultParams = function() { + if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) + { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } + if (this.awaitPos) + { this.raise(this.awaitPos, "Await expression cannot be a default value"); } + }; + + pp$9.isSimpleAssignTarget = function(expr) { + if (expr.type === "ParenthesizedExpression") + { return this.isSimpleAssignTarget(expr.expression) } + return expr.type === "Identifier" || expr.type === "MemberExpression" + }; + + var pp$8 = Parser.prototype; + + // ### Statement parsing + + // Parse a program. Initializes the parser, reads any number of + // statements, and wraps them in a Program node. Optionally takes a + // `program` argument. If present, the statements will be appended + // to its body instead of creating a new node. + + pp$8.parseTopLevel = function(node) { + var exports = Object.create(null); + if (!node.body) { node.body = []; } + while (this.type !== types$1.eof) { + var stmt = this.parseStatement(null, true, exports); + node.body.push(stmt); + } + if (this.inModule) + { for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1) + { + var name = list[i]; + + this.raiseRecoverable(this.undefinedExports[name].start, ("Export '" + name + "' is not defined")); + } } + this.adaptDirectivePrologue(node.body); + this.next(); + node.sourceType = this.options.sourceType; + return this.finishNode(node, "Program") + }; + + var loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"}; + + pp$8.isLet = function(context) { + if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false } + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + // For ambiguous cases, determine if a LexicalDeclaration (or only a + // Statement) is allowed here. If context is not empty then only a Statement + // is allowed. However, `let [` is an explicit negative lookahead for + // ExpressionStatement, so special-case it first. + if (nextCh === 91 || nextCh === 92) { return true } // '[', '\' + if (context) { return false } + + if (nextCh === 123 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } // '{', astral + if (isIdentifierStart(nextCh, true)) { + var pos = next + 1; + while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) { ++pos; } + if (nextCh === 92 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } + var ident = this.input.slice(next, pos); + if (!keywordRelationalOperator.test(ident)) { return true } + } + return false + }; + + // check 'async [no LineTerminator here] function' + // - 'async /*foo*/ function' is OK. + // - 'async /*\n*/ function' is invalid. + pp$8.isAsyncFunction = function() { + if (this.options.ecmaVersion < 8 || !this.isContextual("async")) + { return false } + + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, after; + return !lineBreak.test(this.input.slice(this.pos, next)) && + this.input.slice(next, next + 8) === "function" && + (next + 8 === this.input.length || + !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 0xd7ff && after < 0xdc00)) + }; + + // Parse a single statement. + // + // If expecting a statement and finding a slash operator, parse a + // regular expression literal. This is to handle cases like + // `if (foo) /blah/.exec(foo)`, where looking at the previous token + // does not help. + + pp$8.parseStatement = function(context, topLevel, exports) { + var starttype = this.type, node = this.startNode(), kind; + + if (this.isLet(context)) { + starttype = types$1._var; + kind = "let"; + } + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case types$1._break: case types$1._continue: return this.parseBreakContinueStatement(node, starttype.keyword) + case types$1._debugger: return this.parseDebuggerStatement(node) + case types$1._do: return this.parseDoStatement(node) + case types$1._for: return this.parseForStatement(node) + case types$1._function: + // Function as sole body of either an if statement or a labeled statement + // works, but not when it is part of a labeled statement that is the sole + // body of an if statement. + if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { this.unexpected(); } + return this.parseFunctionStatement(node, false, !context) + case types$1._class: + if (context) { this.unexpected(); } + return this.parseClass(node, true) + case types$1._if: return this.parseIfStatement(node) + case types$1._return: return this.parseReturnStatement(node) + case types$1._switch: return this.parseSwitchStatement(node) + case types$1._throw: return this.parseThrowStatement(node) + case types$1._try: return this.parseTryStatement(node) + case types$1._const: case types$1._var: + kind = kind || this.value; + if (context && kind !== "var") { this.unexpected(); } + return this.parseVarStatement(node, kind) + case types$1._while: return this.parseWhileStatement(node) + case types$1._with: return this.parseWithStatement(node) + case types$1.braceL: return this.parseBlock(true, node) + case types$1.semi: return this.parseEmptyStatement(node) + case types$1._export: + case types$1._import: + if (this.options.ecmaVersion > 10 && starttype === types$1._import) { + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + if (nextCh === 40 || nextCh === 46) // '(' or '.' + { return this.parseExpressionStatement(node, this.parseExpression()) } + } + + if (!this.options.allowImportExportEverywhere) { + if (!topLevel) + { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } + if (!this.inModule) + { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } + } + return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports) + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + default: + if (this.isAsyncFunction()) { + if (context) { this.unexpected(); } + this.next(); + return this.parseFunctionStatement(node, true, !context) + } + + var maybeName = this.value, expr = this.parseExpression(); + if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon)) + { return this.parseLabeledStatement(node, maybeName, expr, context) } + else { return this.parseExpressionStatement(node, expr) } + } + }; + + pp$8.parseBreakContinueStatement = function(node, keyword) { + var isBreak = keyword === "break"; + this.next(); + if (this.eat(types$1.semi) || this.insertSemicolon()) { node.label = null; } + else if (this.type !== types$1.name) { this.unexpected(); } + else { + node.label = this.parseIdent(); + this.semicolon(); + } + + // Verify that there is an actual destination to break or + // continue to. + var i = 0; + for (; i < this.labels.length; ++i) { + var lab = this.labels[i]; + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) { break } + if (node.label && isBreak) { break } + } + } + if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") + }; + + pp$8.parseDebuggerStatement = function(node) { + this.next(); + this.semicolon(); + return this.finishNode(node, "DebuggerStatement") + }; + + pp$8.parseDoStatement = function(node) { + this.next(); + this.labels.push(loopLabel); + node.body = this.parseStatement("do"); + this.labels.pop(); + this.expect(types$1._while); + node.test = this.parseParenExpression(); + if (this.options.ecmaVersion >= 6) + { this.eat(types$1.semi); } + else + { this.semicolon(); } + return this.finishNode(node, "DoWhileStatement") + }; + + // Disambiguating between a `for` and a `for`/`in` or `for`/`of` + // loop is non-trivial. Basically, we have to parse the init `var` + // statement or expression, disallowing the `in` operator (see + // the second parameter to `parseExpression`), and then check + // whether the next token is `in` or `of`. When there is no init + // part (semicolon immediately after the opening parenthesis), it + // is a regular `for` loop. + + pp$8.parseForStatement = function(node) { + this.next(); + var awaitAt = (this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await")) ? this.lastTokStart : -1; + this.labels.push(loopLabel); + this.enterScope(0); + this.expect(types$1.parenL); + if (this.type === types$1.semi) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, null) + } + var isLet = this.isLet(); + if (this.type === types$1._var || this.type === types$1._const || isLet) { + var init$1 = this.startNode(), kind = isLet ? "let" : this.value; + this.next(); + this.parseVar(init$1, true, kind); + this.finishNode(init$1, "VariableDeclaration"); + if ((this.type === types$1._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1) { + if (this.options.ecmaVersion >= 9) { + if (this.type === types$1._in) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + } else { node.await = awaitAt > -1; } + } + return this.parseForIn(node, init$1) + } + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, init$1) + } + var startsWithLet = this.isContextual("let"), isForOf = false; + var containsEsc = this.containsEsc; + var refDestructuringErrors = new DestructuringErrors; + var initPos = this.start; + var init = awaitAt > -1 + ? this.parseExprSubscripts(refDestructuringErrors, "await") + : this.parseExpression(true, refDestructuringErrors); + if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + if (awaitAt > -1) { // implies `ecmaVersion >= 9` (see declaration of awaitAt) + if (this.type === types$1._in) { this.unexpected(awaitAt); } + node.await = true; + } else if (isForOf && this.options.ecmaVersion >= 8) { + if (init.start === initPos && !containsEsc && init.type === "Identifier" && init.name === "async") { this.unexpected(); } + else if (this.options.ecmaVersion >= 9) { node.await = false; } + } + if (startsWithLet && isForOf) { this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."); } + this.toAssignable(init, false, refDestructuringErrors); + this.checkLValPattern(init); + return this.parseForIn(node, init) + } else { + this.checkExpressionErrors(refDestructuringErrors, true); + } + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, init) + }; + + pp$8.parseFunctionStatement = function(node, isAsync, declarationPosition) { + this.next(); + return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync) + }; + + pp$8.parseIfStatement = function(node) { + this.next(); + node.test = this.parseParenExpression(); + // allow function declarations in branches, but only in non-strict mode + node.consequent = this.parseStatement("if"); + node.alternate = this.eat(types$1._else) ? this.parseStatement("if") : null; + return this.finishNode(node, "IfStatement") + }; + + pp$8.parseReturnStatement = function(node) { + if (!this.inFunction && !this.options.allowReturnOutsideFunction) + { this.raise(this.start, "'return' outside of function"); } + this.next(); + + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. + + if (this.eat(types$1.semi) || this.insertSemicolon()) { node.argument = null; } + else { node.argument = this.parseExpression(); this.semicolon(); } + return this.finishNode(node, "ReturnStatement") + }; + + pp$8.parseSwitchStatement = function(node) { + this.next(); + node.discriminant = this.parseParenExpression(); + node.cases = []; + this.expect(types$1.braceL); + this.labels.push(switchLabel); + this.enterScope(0); + + // Statements under must be grouped (by label) in SwitchCase + // nodes. `cur` is used to keep the node that we are currently + // adding statements to. + + var cur; + for (var sawDefault = false; this.type !== types$1.braceR;) { + if (this.type === types$1._case || this.type === types$1._default) { + var isCase = this.type === types$1._case; + if (cur) { this.finishNode(cur, "SwitchCase"); } + node.cases.push(cur = this.startNode()); + cur.consequent = []; + this.next(); + if (isCase) { + cur.test = this.parseExpression(); + } else { + if (sawDefault) { this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); } + sawDefault = true; + cur.test = null; + } + this.expect(types$1.colon); + } else { + if (!cur) { this.unexpected(); } + cur.consequent.push(this.parseStatement(null)); + } + } + this.exitScope(); + if (cur) { this.finishNode(cur, "SwitchCase"); } + this.next(); // Closing brace + this.labels.pop(); + return this.finishNode(node, "SwitchStatement") + }; + + pp$8.parseThrowStatement = function(node) { + this.next(); + if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) + { this.raise(this.lastTokEnd, "Illegal newline after throw"); } + node.argument = this.parseExpression(); + this.semicolon(); + return this.finishNode(node, "ThrowStatement") + }; + + // Reused empty array added for node fields that are always empty. + + var empty$1 = []; + + pp$8.parseCatchClauseParam = function() { + var param = this.parseBindingAtom(); + var simple = param.type === "Identifier"; + this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); + this.checkLValPattern(param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); + this.expect(types$1.parenR); + + return param + }; + + pp$8.parseTryStatement = function(node) { + this.next(); + node.block = this.parseBlock(); + node.handler = null; + if (this.type === types$1._catch) { + var clause = this.startNode(); + this.next(); + if (this.eat(types$1.parenL)) { + clause.param = this.parseCatchClauseParam(); + } else { + if (this.options.ecmaVersion < 10) { this.unexpected(); } + clause.param = null; + this.enterScope(0); + } + clause.body = this.parseBlock(false); + this.exitScope(); + node.handler = this.finishNode(clause, "CatchClause"); + } + node.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null; + if (!node.handler && !node.finalizer) + { this.raise(node.start, "Missing catch or finally clause"); } + return this.finishNode(node, "TryStatement") + }; + + pp$8.parseVarStatement = function(node, kind, allowMissingInitializer) { + this.next(); + this.parseVar(node, false, kind, allowMissingInitializer); + this.semicolon(); + return this.finishNode(node, "VariableDeclaration") + }; + + pp$8.parseWhileStatement = function(node) { + this.next(); + node.test = this.parseParenExpression(); + this.labels.push(loopLabel); + node.body = this.parseStatement("while"); + this.labels.pop(); + return this.finishNode(node, "WhileStatement") + }; + + pp$8.parseWithStatement = function(node) { + if (this.strict) { this.raise(this.start, "'with' in strict mode"); } + this.next(); + node.object = this.parseParenExpression(); + node.body = this.parseStatement("with"); + return this.finishNode(node, "WithStatement") + }; + + pp$8.parseEmptyStatement = function(node) { + this.next(); + return this.finishNode(node, "EmptyStatement") + }; + + pp$8.parseLabeledStatement = function(node, maybeName, expr, context) { + for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1) + { + var label = list[i$1]; + + if (label.name === maybeName) + { this.raise(expr.start, "Label '" + maybeName + "' is already declared"); + } } + var kind = this.type.isLoop ? "loop" : this.type === types$1._switch ? "switch" : null; + for (var i = this.labels.length - 1; i >= 0; i--) { + var label$1 = this.labels[i]; + if (label$1.statementStart === node.start) { + // Update information about previous labels on this node + label$1.statementStart = this.start; + label$1.kind = kind; + } else { break } + } + this.labels.push({name: maybeName, kind: kind, statementStart: this.start}); + node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); + this.labels.pop(); + node.label = expr; + return this.finishNode(node, "LabeledStatement") + }; + + pp$8.parseExpressionStatement = function(node, expr) { + node.expression = expr; + this.semicolon(); + return this.finishNode(node, "ExpressionStatement") + }; + + // Parse a semicolon-enclosed block of statements, handling `"use + // strict"` declarations when `allowStrict` is true (used for + // function bodies). + + pp$8.parseBlock = function(createNewLexicalScope, node, exitStrict) { + if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true; + if ( node === void 0 ) node = this.startNode(); + + node.body = []; + this.expect(types$1.braceL); + if (createNewLexicalScope) { this.enterScope(0); } + while (this.type !== types$1.braceR) { + var stmt = this.parseStatement(null); + node.body.push(stmt); + } + if (exitStrict) { this.strict = false; } + this.next(); + if (createNewLexicalScope) { this.exitScope(); } + return this.finishNode(node, "BlockStatement") + }; + + // Parse a regular `for` loop. The disambiguation code in + // `parseStatement` will already have parsed the init statement or + // expression. + + pp$8.parseFor = function(node, init) { + node.init = init; + this.expect(types$1.semi); + node.test = this.type === types$1.semi ? null : this.parseExpression(); + this.expect(types$1.semi); + node.update = this.type === types$1.parenR ? null : this.parseExpression(); + this.expect(types$1.parenR); + node.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node, "ForStatement") + }; + + // Parse a `for`/`in` and `for`/`of` loop, which are almost + // same from parser's perspective. + + pp$8.parseForIn = function(node, init) { + var isForIn = this.type === types$1._in; + this.next(); + + if ( + init.type === "VariableDeclaration" && + init.declarations[0].init != null && + ( + !isForIn || + this.options.ecmaVersion < 8 || + this.strict || + init.kind !== "var" || + init.declarations[0].id.type !== "Identifier" + ) + ) { + this.raise( + init.start, + ((isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer") + ); + } + node.left = init; + node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); + this.expect(types$1.parenR); + node.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement") + }; + + // Parse a list of variable declarations. + + pp$8.parseVar = function(node, isFor, kind, allowMissingInitializer) { + node.declarations = []; + node.kind = kind; + for (;;) { + var decl = this.startNode(); + this.parseVarId(decl, kind); + if (this.eat(types$1.eq)) { + decl.init = this.parseMaybeAssign(isFor); + } else if (!allowMissingInitializer && kind === "const" && !(this.type === types$1._in || (this.options.ecmaVersion >= 6 && this.isContextual("of")))) { + this.unexpected(); + } else if (!allowMissingInitializer && decl.id.type !== "Identifier" && !(isFor && (this.type === types$1._in || this.isContextual("of")))) { + this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); + } else { + decl.init = null; + } + node.declarations.push(this.finishNode(decl, "VariableDeclarator")); + if (!this.eat(types$1.comma)) { break } + } + return node + }; + + pp$8.parseVarId = function(decl, kind) { + decl.id = this.parseBindingAtom(); + this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); + }; + + var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4; + + // Parse a function declaration or literal (depending on the + // `statement & FUNC_STATEMENT`). + + // Remove `allowExpressionBody` for 7.0.0, as it is only called with false + pp$8.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) { + this.initFunction(node); + if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { + if (this.type === types$1.star && (statement & FUNC_HANGING_STATEMENT)) + { this.unexpected(); } + node.generator = this.eat(types$1.star); + } + if (this.options.ecmaVersion >= 8) + { node.async = !!isAsync; } + + if (statement & FUNC_STATEMENT) { + node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types$1.name ? null : this.parseIdent(); + if (node.id && !(statement & FUNC_HANGING_STATEMENT)) + // If it is a regular function declaration in sloppy mode, then it is + // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding + // mode depends on properties of the current scope (see + // treatFunctionsAsVar). + { this.checkLValSimple(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } + } + + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(node.async, node.generator)); + + if (!(statement & FUNC_STATEMENT)) + { node.id = this.type === types$1.name ? this.parseIdent() : null; } + + this.parseFunctionParams(node); + this.parseFunctionBody(node, allowExpressionBody, false, forInit); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression") + }; + + pp$8.parseFunctionParams = function(node) { + this.expect(types$1.parenL); + node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + }; + + // Parse a class declaration or literal (depending on the + // `isStatement` parameter). + + pp$8.parseClass = function(node, isStatement) { + this.next(); + + // ecma-262 14.6 Class Definitions + // A class definition is always strict mode code. + var oldStrict = this.strict; + this.strict = true; + + this.parseClassId(node, isStatement); + this.parseClassSuper(node); + var privateNameMap = this.enterClassBody(); + var classBody = this.startNode(); + var hadConstructor = false; + classBody.body = []; + this.expect(types$1.braceL); + while (this.type !== types$1.braceR) { + var element = this.parseClassElement(node.superClass !== null); + if (element) { + classBody.body.push(element); + if (element.type === "MethodDefinition" && element.kind === "constructor") { + if (hadConstructor) { this.raiseRecoverable(element.start, "Duplicate constructor in the same class"); } + hadConstructor = true; + } else if (element.key && element.key.type === "PrivateIdentifier" && isPrivateNameConflicted(privateNameMap, element)) { + this.raiseRecoverable(element.key.start, ("Identifier '#" + (element.key.name) + "' has already been declared")); + } + } + } + this.strict = oldStrict; + this.next(); + node.body = this.finishNode(classBody, "ClassBody"); + this.exitClassBody(); + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") + }; + + pp$8.parseClassElement = function(constructorAllowsSuper) { + if (this.eat(types$1.semi)) { return null } + + var ecmaVersion = this.options.ecmaVersion; + var node = this.startNode(); + var keyName = ""; + var isGenerator = false; + var isAsync = false; + var kind = "method"; + var isStatic = false; + + if (this.eatContextual("static")) { + // Parse static init block + if (ecmaVersion >= 13 && this.eat(types$1.braceL)) { + this.parseClassStaticBlock(node); + return node + } + if (this.isClassElementNameStart() || this.type === types$1.star) { + isStatic = true; + } else { + keyName = "static"; + } + } + node.static = isStatic; + if (!keyName && ecmaVersion >= 8 && this.eatContextual("async")) { + if ((this.isClassElementNameStart() || this.type === types$1.star) && !this.canInsertSemicolon()) { + isAsync = true; + } else { + keyName = "async"; + } + } + if (!keyName && (ecmaVersion >= 9 || !isAsync) && this.eat(types$1.star)) { + isGenerator = true; + } + if (!keyName && !isAsync && !isGenerator) { + var lastValue = this.value; + if (this.eatContextual("get") || this.eatContextual("set")) { + if (this.isClassElementNameStart()) { + kind = lastValue; + } else { + keyName = lastValue; + } + } + } + + // Parse element name + if (keyName) { + // 'async', 'get', 'set', or 'static' were not a keyword contextually. + // The last token is any of those. Make it the element name. + node.computed = false; + node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc); + node.key.name = keyName; + this.finishNode(node.key, "Identifier"); + } else { + this.parseClassElementName(node); + } + + // Parse element value + if (ecmaVersion < 13 || this.type === types$1.parenL || kind !== "method" || isGenerator || isAsync) { + var isConstructor = !node.static && checkKeyName(node, "constructor"); + var allowsDirectSuper = isConstructor && constructorAllowsSuper; + // Couldn't move this check into the 'parseClassMethod' method for backward compatibility. + if (isConstructor && kind !== "method") { this.raise(node.key.start, "Constructor can't have get/set modifier"); } + node.kind = isConstructor ? "constructor" : kind; + this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper); + } else { + this.parseClassField(node); + } + + return node + }; + + pp$8.isClassElementNameStart = function() { + return ( + this.type === types$1.name || + this.type === types$1.privateId || + this.type === types$1.num || + this.type === types$1.string || + this.type === types$1.bracketL || + this.type.keyword + ) + }; + + pp$8.parseClassElementName = function(element) { + if (this.type === types$1.privateId) { + if (this.value === "constructor") { + this.raise(this.start, "Classes can't have an element named '#constructor'"); + } + element.computed = false; + element.key = this.parsePrivateIdent(); + } else { + this.parsePropertyName(element); + } + }; + + pp$8.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) { + // Check key and flags + var key = method.key; + if (method.kind === "constructor") { + if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); } + if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); } + } else if (method.static && checkKeyName(method, "prototype")) { + this.raise(key.start, "Classes may not have a static property named prototype"); + } + + // Parse value + var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); + + // Check value + if (method.kind === "get" && value.params.length !== 0) + { this.raiseRecoverable(value.start, "getter should have no params"); } + if (method.kind === "set" && value.params.length !== 1) + { this.raiseRecoverable(value.start, "setter should have exactly one param"); } + if (method.kind === "set" && value.params[0].type === "RestElement") + { this.raiseRecoverable(value.params[0].start, "Setter cannot use rest params"); } + + return this.finishNode(method, "MethodDefinition") + }; + + pp$8.parseClassField = function(field) { + if (checkKeyName(field, "constructor")) { + this.raise(field.key.start, "Classes can't have a field named 'constructor'"); + } else if (field.static && checkKeyName(field, "prototype")) { + this.raise(field.key.start, "Classes can't have a static field named 'prototype'"); + } + + if (this.eat(types$1.eq)) { + // To raise SyntaxError if 'arguments' exists in the initializer. + var scope = this.currentThisScope(); + var inClassFieldInit = scope.inClassFieldInit; + scope.inClassFieldInit = true; + field.value = this.parseMaybeAssign(); + scope.inClassFieldInit = inClassFieldInit; + } else { + field.value = null; + } + this.semicolon(); + + return this.finishNode(field, "PropertyDefinition") + }; + + pp$8.parseClassStaticBlock = function(node) { + node.body = []; + + var oldLabels = this.labels; + this.labels = []; + this.enterScope(SCOPE_CLASS_STATIC_BLOCK | SCOPE_SUPER); + while (this.type !== types$1.braceR) { + var stmt = this.parseStatement(null); + node.body.push(stmt); + } + this.next(); + this.exitScope(); + this.labels = oldLabels; + + return this.finishNode(node, "StaticBlock") + }; + + pp$8.parseClassId = function(node, isStatement) { + if (this.type === types$1.name) { + node.id = this.parseIdent(); + if (isStatement) + { this.checkLValSimple(node.id, BIND_LEXICAL, false); } + } else { + if (isStatement === true) + { this.unexpected(); } + node.id = null; + } + }; + + pp$8.parseClassSuper = function(node) { + node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(null, false) : null; + }; + + pp$8.enterClassBody = function() { + var element = {declared: Object.create(null), used: []}; + this.privateNameStack.push(element); + return element.declared + }; + + pp$8.exitClassBody = function() { + var ref = this.privateNameStack.pop(); + var declared = ref.declared; + var used = ref.used; + if (!this.options.checkPrivateFields) { return } + var len = this.privateNameStack.length; + var parent = len === 0 ? null : this.privateNameStack[len - 1]; + for (var i = 0; i < used.length; ++i) { + var id = used[i]; + if (!hasOwn(declared, id.name)) { + if (parent) { + parent.used.push(id); + } else { + this.raiseRecoverable(id.start, ("Private field '#" + (id.name) + "' must be declared in an enclosing class")); + } + } + } + }; + + function isPrivateNameConflicted(privateNameMap, element) { + var name = element.key.name; + var curr = privateNameMap[name]; + + var next = "true"; + if (element.type === "MethodDefinition" && (element.kind === "get" || element.kind === "set")) { + next = (element.static ? "s" : "i") + element.kind; + } + + // `class { get #a(){}; static set #a(_){} }` is also conflict. + if ( + curr === "iget" && next === "iset" || + curr === "iset" && next === "iget" || + curr === "sget" && next === "sset" || + curr === "sset" && next === "sget" + ) { + privateNameMap[name] = "true"; + return false + } else if (!curr) { + privateNameMap[name] = next; + return false + } else { + return true + } + } + + function checkKeyName(node, name) { + var computed = node.computed; + var key = node.key; + return !computed && ( + key.type === "Identifier" && key.name === name || + key.type === "Literal" && key.value === name + ) + } + + // Parses module export declaration. + + pp$8.parseExportAllDeclaration = function(node, exports) { + if (this.options.ecmaVersion >= 11) { + if (this.eatContextual("as")) { + node.exported = this.parseModuleExportName(); + this.checkExport(exports, node.exported, this.lastTokStart); + } else { + node.exported = null; + } + } + this.expectContextual("from"); + if (this.type !== types$1.string) { this.unexpected(); } + node.source = this.parseExprAtom(); + if (this.options.ecmaVersion >= 16) + { node.attributes = this.parseWithClause(); } + this.semicolon(); + return this.finishNode(node, "ExportAllDeclaration") + }; + + pp$8.parseExport = function(node, exports) { + this.next(); + // export * from '...' + if (this.eat(types$1.star)) { + return this.parseExportAllDeclaration(node, exports) + } + if (this.eat(types$1._default)) { // export default ... + this.checkExport(exports, "default", this.lastTokStart); + node.declaration = this.parseExportDefaultDeclaration(); + return this.finishNode(node, "ExportDefaultDeclaration") + } + // export var|const|let|function|class ... + if (this.shouldParseExportStatement()) { + node.declaration = this.parseExportDeclaration(node); + if (node.declaration.type === "VariableDeclaration") + { this.checkVariableExport(exports, node.declaration.declarations); } + else + { this.checkExport(exports, node.declaration.id, node.declaration.id.start); } + node.specifiers = []; + node.source = null; + } else { // export { x, y as z } [from '...'] + node.declaration = null; + node.specifiers = this.parseExportSpecifiers(exports); + if (this.eatContextual("from")) { + if (this.type !== types$1.string) { this.unexpected(); } + node.source = this.parseExprAtom(); + if (this.options.ecmaVersion >= 16) + { node.attributes = this.parseWithClause(); } + } else { + for (var i = 0, list = node.specifiers; i < list.length; i += 1) { + // check for keywords used as local names + var spec = list[i]; + + this.checkUnreserved(spec.local); + // check if export is defined + this.checkLocalExport(spec.local); + + if (spec.local.type === "Literal") { + this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`."); + } + } + + node.source = null; + } + this.semicolon(); + } + return this.finishNode(node, "ExportNamedDeclaration") + }; + + pp$8.parseExportDeclaration = function(node) { + return this.parseStatement(null) + }; + + pp$8.parseExportDefaultDeclaration = function() { + var isAsync; + if (this.type === types$1._function || (isAsync = this.isAsyncFunction())) { + var fNode = this.startNode(); + this.next(); + if (isAsync) { this.next(); } + return this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync) + } else if (this.type === types$1._class) { + var cNode = this.startNode(); + return this.parseClass(cNode, "nullableID") + } else { + var declaration = this.parseMaybeAssign(); + this.semicolon(); + return declaration + } + }; + + pp$8.checkExport = function(exports, name, pos) { + if (!exports) { return } + if (typeof name !== "string") + { name = name.type === "Identifier" ? name.name : name.value; } + if (hasOwn(exports, name)) + { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); } + exports[name] = true; + }; + + pp$8.checkPatternExport = function(exports, pat) { + var type = pat.type; + if (type === "Identifier") + { this.checkExport(exports, pat, pat.start); } + else if (type === "ObjectPattern") + { for (var i = 0, list = pat.properties; i < list.length; i += 1) + { + var prop = list[i]; + + this.checkPatternExport(exports, prop); + } } + else if (type === "ArrayPattern") + { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { + var elt = list$1[i$1]; + + if (elt) { this.checkPatternExport(exports, elt); } + } } + else if (type === "Property") + { this.checkPatternExport(exports, pat.value); } + else if (type === "AssignmentPattern") + { this.checkPatternExport(exports, pat.left); } + else if (type === "RestElement") + { this.checkPatternExport(exports, pat.argument); } + }; + + pp$8.checkVariableExport = function(exports, decls) { + if (!exports) { return } + for (var i = 0, list = decls; i < list.length; i += 1) + { + var decl = list[i]; + + this.checkPatternExport(exports, decl.id); + } + }; + + pp$8.shouldParseExportStatement = function() { + return this.type.keyword === "var" || + this.type.keyword === "const" || + this.type.keyword === "class" || + this.type.keyword === "function" || + this.isLet() || + this.isAsyncFunction() + }; + + // Parses a comma-separated list of module exports. + + pp$8.parseExportSpecifier = function(exports) { + var node = this.startNode(); + node.local = this.parseModuleExportName(); + + node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local; + this.checkExport( + exports, + node.exported, + node.exported.start + ); + + return this.finishNode(node, "ExportSpecifier") + }; + + pp$8.parseExportSpecifiers = function(exports) { + var nodes = [], first = true; + // export { x, y as z } [from '...'] + this.expect(types$1.braceL); + while (!this.eat(types$1.braceR)) { + if (!first) { + this.expect(types$1.comma); + if (this.afterTrailingComma(types$1.braceR)) { break } + } else { first = false; } + + nodes.push(this.parseExportSpecifier(exports)); + } + return nodes + }; + + // Parses import declaration. + + pp$8.parseImport = function(node) { + this.next(); + + // import '...' + if (this.type === types$1.string) { + node.specifiers = empty$1; + node.source = this.parseExprAtom(); + } else { + node.specifiers = this.parseImportSpecifiers(); + this.expectContextual("from"); + node.source = this.type === types$1.string ? this.parseExprAtom() : this.unexpected(); + } + if (this.options.ecmaVersion >= 16) + { node.attributes = this.parseWithClause(); } + this.semicolon(); + return this.finishNode(node, "ImportDeclaration") + }; + + // Parses a comma-separated list of module imports. + + pp$8.parseImportSpecifier = function() { + var node = this.startNode(); + node.imported = this.parseModuleExportName(); + + if (this.eatContextual("as")) { + node.local = this.parseIdent(); + } else { + this.checkUnreserved(node.imported); + node.local = node.imported; + } + this.checkLValSimple(node.local, BIND_LEXICAL); + + return this.finishNode(node, "ImportSpecifier") + }; + + pp$8.parseImportDefaultSpecifier = function() { + // import defaultObj, { x, y as z } from '...' + var node = this.startNode(); + node.local = this.parseIdent(); + this.checkLValSimple(node.local, BIND_LEXICAL); + return this.finishNode(node, "ImportDefaultSpecifier") + }; + + pp$8.parseImportNamespaceSpecifier = function() { + var node = this.startNode(); + this.next(); + this.expectContextual("as"); + node.local = this.parseIdent(); + this.checkLValSimple(node.local, BIND_LEXICAL); + return this.finishNode(node, "ImportNamespaceSpecifier") + }; + + pp$8.parseImportSpecifiers = function() { + var nodes = [], first = true; + if (this.type === types$1.name) { + nodes.push(this.parseImportDefaultSpecifier()); + if (!this.eat(types$1.comma)) { return nodes } + } + if (this.type === types$1.star) { + nodes.push(this.parseImportNamespaceSpecifier()); + return nodes + } + this.expect(types$1.braceL); + while (!this.eat(types$1.braceR)) { + if (!first) { + this.expect(types$1.comma); + if (this.afterTrailingComma(types$1.braceR)) { break } + } else { first = false; } + + nodes.push(this.parseImportSpecifier()); + } + return nodes + }; + + pp$8.parseWithClause = function() { + var nodes = []; + if (!this.eat(types$1._with)) { + return nodes + } + this.expect(types$1.braceL); + var attributeKeys = {}; + var first = true; + while (!this.eat(types$1.braceR)) { + if (!first) { + this.expect(types$1.comma); + if (this.afterTrailingComma(types$1.braceR)) { break } + } else { first = false; } + + var attr = this.parseImportAttribute(); + var keyName = attr.key.type === "Identifier" ? attr.key.name : attr.key.value; + if (hasOwn(attributeKeys, keyName)) + { this.raiseRecoverable(attr.key.start, "Duplicate attribute key '" + keyName + "'"); } + attributeKeys[keyName] = true; + nodes.push(attr); + } + return nodes + }; + + pp$8.parseImportAttribute = function() { + var node = this.startNode(); + node.key = this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never"); + this.expect(types$1.colon); + if (this.type !== types$1.string) { + this.unexpected(); + } + node.value = this.parseExprAtom(); + return this.finishNode(node, "ImportAttribute") + }; + + pp$8.parseModuleExportName = function() { + if (this.options.ecmaVersion >= 13 && this.type === types$1.string) { + var stringLiteral = this.parseLiteral(this.value); + if (loneSurrogate.test(stringLiteral.value)) { + this.raise(stringLiteral.start, "An export name cannot include a lone surrogate."); + } + return stringLiteral + } + return this.parseIdent(true) + }; + + // Set `ExpressionStatement#directive` property for directive prologues. + pp$8.adaptDirectivePrologue = function(statements) { + for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { + statements[i].directive = statements[i].expression.raw.slice(1, -1); + } + }; + pp$8.isDirectiveCandidate = function(statement) { + return ( + this.options.ecmaVersion >= 5 && + statement.type === "ExpressionStatement" && + statement.expression.type === "Literal" && + typeof statement.expression.value === "string" && + // Reject parenthesized strings. + (this.input[statement.start] === "\"" || this.input[statement.start] === "'") + ) + }; + + var pp$7 = Parser.prototype; + + // Convert existing expression atom to assignable pattern + // if possible. + + pp$7.toAssignable = function(node, isBinding, refDestructuringErrors) { + if (this.options.ecmaVersion >= 6 && node) { + switch (node.type) { + case "Identifier": + if (this.inAsync && node.name === "await") + { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); } + break + + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": + break + + case "ObjectExpression": + node.type = "ObjectPattern"; + if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + for (var i = 0, list = node.properties; i < list.length; i += 1) { + var prop = list[i]; + + this.toAssignable(prop, isBinding); + // Early error: + // AssignmentRestProperty[Yield, Await] : + // `...` DestructuringAssignmentTarget[Yield, Await] + // + // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|. + if ( + prop.type === "RestElement" && + (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") + ) { + this.raise(prop.argument.start, "Unexpected token"); + } + } + break + + case "Property": + // AssignmentProperty has type === "Property" + if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } + this.toAssignable(node.value, isBinding); + break + + case "ArrayExpression": + node.type = "ArrayPattern"; + if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + this.toAssignableList(node.elements, isBinding); + break + + case "SpreadElement": + node.type = "RestElement"; + this.toAssignable(node.argument, isBinding); + if (node.argument.type === "AssignmentPattern") + { this.raise(node.argument.start, "Rest elements cannot have a default value"); } + break + + case "AssignmentExpression": + if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } + node.type = "AssignmentPattern"; + delete node.operator; + this.toAssignable(node.left, isBinding); + break + + case "ParenthesizedExpression": + this.toAssignable(node.expression, isBinding, refDestructuringErrors); + break + + case "ChainExpression": + this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side"); + break + + case "MemberExpression": + if (!isBinding) { break } + + default: + this.raise(node.start, "Assigning to rvalue"); + } + } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + return node + }; + + // Convert list of expression atoms to binding list. + + pp$7.toAssignableList = function(exprList, isBinding) { + var end = exprList.length; + for (var i = 0; i < end; i++) { + var elt = exprList[i]; + if (elt) { this.toAssignable(elt, isBinding); } + } + if (end) { + var last = exprList[end - 1]; + if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") + { this.unexpected(last.argument.start); } + } + return exprList + }; + + // Parses spread element. + + pp$7.parseSpread = function(refDestructuringErrors) { + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssign(false, refDestructuringErrors); + return this.finishNode(node, "SpreadElement") + }; + + pp$7.parseRestBinding = function() { + var node = this.startNode(); + this.next(); + + // RestElement inside of a function parameter must be an identifier + if (this.options.ecmaVersion === 6 && this.type !== types$1.name) + { this.unexpected(); } + + node.argument = this.parseBindingAtom(); + + return this.finishNode(node, "RestElement") + }; + + // Parses lvalue (assignable) atom. + + pp$7.parseBindingAtom = function() { + if (this.options.ecmaVersion >= 6) { + switch (this.type) { + case types$1.bracketL: + var node = this.startNode(); + this.next(); + node.elements = this.parseBindingList(types$1.bracketR, true, true); + return this.finishNode(node, "ArrayPattern") + + case types$1.braceL: + return this.parseObj(true) + } + } + return this.parseIdent() + }; + + pp$7.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowModifiers) { + var elts = [], first = true; + while (!this.eat(close)) { + if (first) { first = false; } + else { this.expect(types$1.comma); } + if (allowEmpty && this.type === types$1.comma) { + elts.push(null); + } else if (allowTrailingComma && this.afterTrailingComma(close)) { + break + } else if (this.type === types$1.ellipsis) { + var rest = this.parseRestBinding(); + this.parseBindingListItem(rest); + elts.push(rest); + if (this.type === types$1.comma) { this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"); } + this.expect(close); + break + } else { + elts.push(this.parseAssignableListItem(allowModifiers)); + } + } + return elts + }; + + pp$7.parseAssignableListItem = function(allowModifiers) { + var elem = this.parseMaybeDefault(this.start, this.startLoc); + this.parseBindingListItem(elem); + return elem + }; + + pp$7.parseBindingListItem = function(param) { + return param + }; + + // Parses assignment pattern around given atom if possible. + + pp$7.parseMaybeDefault = function(startPos, startLoc, left) { + left = left || this.parseBindingAtom(); + if (this.options.ecmaVersion < 6 || !this.eat(types$1.eq)) { return left } + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.right = this.parseMaybeAssign(); + return this.finishNode(node, "AssignmentPattern") + }; + + // The following three functions all verify that a node is an lvalue — + // something that can be bound, or assigned to. In order to do so, they perform + // a variety of checks: + // + // - Check that none of the bound/assigned-to identifiers are reserved words. + // - Record name declarations for bindings in the appropriate scope. + // - Check duplicate argument names, if checkClashes is set. + // + // If a complex binding pattern is encountered (e.g., object and array + // destructuring), the entire pattern is recursively checked. + // + // There are three versions of checkLVal*() appropriate for different + // circumstances: + // + // - checkLValSimple() shall be used if the syntactic construct supports + // nothing other than identifiers and member expressions. Parenthesized + // expressions are also correctly handled. This is generally appropriate for + // constructs for which the spec says + // + // > It is a Syntax Error if AssignmentTargetType of [the production] is not + // > simple. + // + // It is also appropriate for checking if an identifier is valid and not + // defined elsewhere, like import declarations or function/class identifiers. + // + // Examples where this is used include: + // a += …; + // import a from '…'; + // where a is the node to be checked. + // + // - checkLValPattern() shall be used if the syntactic construct supports + // anything checkLValSimple() supports, as well as object and array + // destructuring patterns. This is generally appropriate for constructs for + // which the spec says + // + // > It is a Syntax Error if [the production] is neither an ObjectLiteral nor + // > an ArrayLiteral and AssignmentTargetType of [the production] is not + // > simple. + // + // Examples where this is used include: + // (a = …); + // const a = …; + // try { … } catch (a) { … } + // where a is the node to be checked. + // + // - checkLValInnerPattern() shall be used if the syntactic construct supports + // anything checkLValPattern() supports, as well as default assignment + // patterns, rest elements, and other constructs that may appear within an + // object or array destructuring pattern. + // + // As a special case, function parameters also use checkLValInnerPattern(), + // as they also support defaults and rest constructs. + // + // These functions deliberately support both assignment and binding constructs, + // as the logic for both is exceedingly similar. If the node is the target of + // an assignment, then bindingType should be set to BIND_NONE. Otherwise, it + // should be set to the appropriate BIND_* constant, like BIND_VAR or + // BIND_LEXICAL. + // + // If the function is called with a non-BIND_NONE bindingType, then + // additionally a checkClashes object may be specified to allow checking for + // duplicate argument names. checkClashes is ignored if the provided construct + // is an assignment (i.e., bindingType is BIND_NONE). + + pp$7.checkLValSimple = function(expr, bindingType, checkClashes) { + if ( bindingType === void 0 ) bindingType = BIND_NONE; + + var isBind = bindingType !== BIND_NONE; + + switch (expr.type) { + case "Identifier": + if (this.strict && this.reservedWordsStrictBind.test(expr.name)) + { this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } + if (isBind) { + if (bindingType === BIND_LEXICAL && expr.name === "let") + { this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); } + if (checkClashes) { + if (hasOwn(checkClashes, expr.name)) + { this.raiseRecoverable(expr.start, "Argument name clash"); } + checkClashes[expr.name] = true; + } + if (bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } + } + break + + case "ChainExpression": + this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side"); + break + + case "MemberExpression": + if (isBind) { this.raiseRecoverable(expr.start, "Binding member expression"); } + break + + case "ParenthesizedExpression": + if (isBind) { this.raiseRecoverable(expr.start, "Binding parenthesized expression"); } + return this.checkLValSimple(expr.expression, bindingType, checkClashes) + + default: + this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue"); + } + }; + + pp$7.checkLValPattern = function(expr, bindingType, checkClashes) { + if ( bindingType === void 0 ) bindingType = BIND_NONE; + + switch (expr.type) { + case "ObjectPattern": + for (var i = 0, list = expr.properties; i < list.length; i += 1) { + var prop = list[i]; + + this.checkLValInnerPattern(prop, bindingType, checkClashes); + } + break + + case "ArrayPattern": + for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { + var elem = list$1[i$1]; + + if (elem) { this.checkLValInnerPattern(elem, bindingType, checkClashes); } + } + break + + default: + this.checkLValSimple(expr, bindingType, checkClashes); + } + }; + + pp$7.checkLValInnerPattern = function(expr, bindingType, checkClashes) { + if ( bindingType === void 0 ) bindingType = BIND_NONE; + + switch (expr.type) { + case "Property": + // AssignmentProperty has type === "Property" + this.checkLValInnerPattern(expr.value, bindingType, checkClashes); + break + + case "AssignmentPattern": + this.checkLValPattern(expr.left, bindingType, checkClashes); + break + + case "RestElement": + this.checkLValPattern(expr.argument, bindingType, checkClashes); + break + + default: + this.checkLValPattern(expr, bindingType, checkClashes); + } + }; + + // The algorithm used to determine whether a regexp can appear at a + // given point in the program is loosely based on sweet.js' approach. + // See https://github.com/mozilla/sweet.js/wiki/design + + + var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { + this.token = token; + this.isExpr = !!isExpr; + this.preserveSpace = !!preserveSpace; + this.override = override; + this.generator = !!generator; + }; + + var types = { + b_stat: new TokContext("{", false), + b_expr: new TokContext("{", true), + b_tmpl: new TokContext("${", false), + p_stat: new TokContext("(", false), + p_expr: new TokContext("(", true), + q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), + f_stat: new TokContext("function", false), + f_expr: new TokContext("function", true), + f_expr_gen: new TokContext("function", true, false, null, true), + f_gen: new TokContext("function", false, false, null, true) + }; + + var pp$6 = Parser.prototype; + + pp$6.initialContext = function() { + return [types.b_stat] + }; + + pp$6.curContext = function() { + return this.context[this.context.length - 1] + }; + + pp$6.braceIsBlock = function(prevType) { + var parent = this.curContext(); + if (parent === types.f_expr || parent === types.f_stat) + { return true } + if (prevType === types$1.colon && (parent === types.b_stat || parent === types.b_expr)) + { return !parent.isExpr } + + // The check for `tt.name && exprAllowed` detects whether we are + // after a `yield` or `of` construct. See the `updateContext` for + // `tt.name`. + if (prevType === types$1._return || prevType === types$1.name && this.exprAllowed) + { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) } + if (prevType === types$1._else || prevType === types$1.semi || prevType === types$1.eof || prevType === types$1.parenR || prevType === types$1.arrow) + { return true } + if (prevType === types$1.braceL) + { return parent === types.b_stat } + if (prevType === types$1._var || prevType === types$1._const || prevType === types$1.name) + { return false } + return !this.exprAllowed + }; + + pp$6.inGeneratorContext = function() { + for (var i = this.context.length - 1; i >= 1; i--) { + var context = this.context[i]; + if (context.token === "function") + { return context.generator } + } + return false + }; + + pp$6.updateContext = function(prevType) { + var update, type = this.type; + if (type.keyword && prevType === types$1.dot) + { this.exprAllowed = false; } + else if (update = type.updateContext) + { update.call(this, prevType); } + else + { this.exprAllowed = type.beforeExpr; } + }; + + // Used to handle edge cases when token context could not be inferred correctly during tokenization phase + + pp$6.overrideContext = function(tokenCtx) { + if (this.curContext() !== tokenCtx) { + this.context[this.context.length - 1] = tokenCtx; + } + }; + + // Token-specific context update code + + types$1.parenR.updateContext = types$1.braceR.updateContext = function() { + if (this.context.length === 1) { + this.exprAllowed = true; + return + } + var out = this.context.pop(); + if (out === types.b_stat && this.curContext().token === "function") { + out = this.context.pop(); + } + this.exprAllowed = !out.isExpr; + }; + + types$1.braceL.updateContext = function(prevType) { + this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr); + this.exprAllowed = true; + }; + + types$1.dollarBraceL.updateContext = function() { + this.context.push(types.b_tmpl); + this.exprAllowed = true; + }; + + types$1.parenL.updateContext = function(prevType) { + var statementParens = prevType === types$1._if || prevType === types$1._for || prevType === types$1._with || prevType === types$1._while; + this.context.push(statementParens ? types.p_stat : types.p_expr); + this.exprAllowed = true; + }; + + types$1.incDec.updateContext = function() { + // tokExprAllowed stays unchanged + }; + + types$1._function.updateContext = types$1._class.updateContext = function(prevType) { + if (prevType.beforeExpr && prevType !== types$1._else && + !(prevType === types$1.semi && this.curContext() !== types.p_stat) && + !(prevType === types$1._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && + !((prevType === types$1.colon || prevType === types$1.braceL) && this.curContext() === types.b_stat)) + { this.context.push(types.f_expr); } + else + { this.context.push(types.f_stat); } + this.exprAllowed = false; + }; + + types$1.colon.updateContext = function() { + if (this.curContext().token === "function") { this.context.pop(); } + this.exprAllowed = true; + }; + + types$1.backQuote.updateContext = function() { + if (this.curContext() === types.q_tmpl) + { this.context.pop(); } + else + { this.context.push(types.q_tmpl); } + this.exprAllowed = false; + }; + + types$1.star.updateContext = function(prevType) { + if (prevType === types$1._function) { + var index = this.context.length - 1; + if (this.context[index] === types.f_expr) + { this.context[index] = types.f_expr_gen; } + else + { this.context[index] = types.f_gen; } + } + this.exprAllowed = true; + }; + + types$1.name.updateContext = function(prevType) { + var allowed = false; + if (this.options.ecmaVersion >= 6 && prevType !== types$1.dot) { + if (this.value === "of" && !this.exprAllowed || + this.value === "yield" && this.inGeneratorContext()) + { allowed = true; } + } + this.exprAllowed = allowed; + }; + + // A recursive descent parser operates by defining functions for all + // syntactic elements, and recursively calling those, each function + // advancing the input stream and returning an AST node. Precedence + // of constructs (for example, the fact that `!x[1]` means `!(x[1])` + // instead of `(!x)[1]` is handled by the fact that the parser + // function that parses unary prefix operators is called first, and + // in turn calls the function that parses `[]` subscripts — that + // way, it'll receive the node for `x[1]` already parsed, and wraps + // *that* in the unary operator node. + // + // Acorn uses an [operator precedence parser][opp] to handle binary + // operator precedence, because it is much more compact than using + // the technique outlined above, which uses different, nesting + // functions to specify precedence, for all of the ten binary + // precedence levels that JavaScript defines. + // + // [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser + + + var pp$5 = Parser.prototype; + + // Check if property name clashes with already added. + // Object/class getters and setters are not allowed to clash — + // either with each other or with an init property — and in + // strict mode, init properties are also not allowed to be repeated. + + pp$5.checkPropClash = function(prop, propHash, refDestructuringErrors) { + if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") + { return } + if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) + { return } + var key = prop.key; + var name; + switch (key.type) { + case "Identifier": name = key.name; break + case "Literal": name = String(key.value); break + default: return + } + var kind = prop.kind; + if (this.options.ecmaVersion >= 6) { + if (name === "__proto__" && kind === "init") { + if (propHash.proto) { + if (refDestructuringErrors) { + if (refDestructuringErrors.doubleProto < 0) { + refDestructuringErrors.doubleProto = key.start; + } + } else { + this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); + } + } + propHash.proto = true; + } + return + } + name = "$" + name; + var other = propHash[name]; + if (other) { + var redefinition; + if (kind === "init") { + redefinition = this.strict && other.init || other.get || other.set; + } else { + redefinition = other.init || other[kind]; + } + if (redefinition) + { this.raiseRecoverable(key.start, "Redefinition of property"); } + } else { + other = propHash[name] = { + init: false, + get: false, + set: false + }; + } + other[kind] = true; + }; + + // ### Expression parsing + + // These nest, from the most general expression type at the top to + // 'atomic', nondivisible expression types at the bottom. Most of + // the functions will simply let the function(s) below them parse, + // and, *if* the syntactic construct they handle is present, wrap + // the AST node that the inner parser gave them in another node. + + // Parse a full expression. The optional arguments are used to + // forbid the `in` operator (in for loops initalization expressions) + // and provide reference for storing '=' operator inside shorthand + // property assignment in contexts where both object expression + // and object pattern might appear (so it's possible to raise + // delayed syntax error at correct position). + + pp$5.parseExpression = function(forInit, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeAssign(forInit, refDestructuringErrors); + if (this.type === types$1.comma) { + var node = this.startNodeAt(startPos, startLoc); + node.expressions = [expr]; + while (this.eat(types$1.comma)) { node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors)); } + return this.finishNode(node, "SequenceExpression") + } + return expr + }; + + // Parse an assignment expression. This includes applications of + // operators like `+=`. + + pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) { + if (this.isContextual("yield")) { + if (this.inGenerator) { return this.parseYield(forInit) } + // The tokenizer will assume an expression is allowed after + // `yield`, but this isn't that kind of yield + else { this.exprAllowed = false; } + } + + var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1; + if (refDestructuringErrors) { + oldParenAssign = refDestructuringErrors.parenthesizedAssign; + oldTrailingComma = refDestructuringErrors.trailingComma; + oldDoubleProto = refDestructuringErrors.doubleProto; + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1; + } else { + refDestructuringErrors = new DestructuringErrors; + ownDestructuringErrors = true; + } + + var startPos = this.start, startLoc = this.startLoc; + if (this.type === types$1.parenL || this.type === types$1.name) { + this.potentialArrowAt = this.start; + this.potentialArrowInForAwait = forInit === "await"; + } + var left = this.parseMaybeConditional(forInit, refDestructuringErrors); + if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } + if (this.type.isAssign) { + var node = this.startNodeAt(startPos, startLoc); + node.operator = this.value; + if (this.type === types$1.eq) + { left = this.toAssignable(left, false, refDestructuringErrors); } + if (!ownDestructuringErrors) { + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1; + } + if (refDestructuringErrors.shorthandAssign >= left.start) + { refDestructuringErrors.shorthandAssign = -1; } // reset because shorthand default was used correctly + if (this.type === types$1.eq) + { this.checkLValPattern(left); } + else + { this.checkLValSimple(left); } + node.left = left; + this.next(); + node.right = this.parseMaybeAssign(forInit); + if (oldDoubleProto > -1) { refDestructuringErrors.doubleProto = oldDoubleProto; } + return this.finishNode(node, "AssignmentExpression") + } else { + if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } + } + if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } + if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } + return left + }; + + // Parse a ternary conditional (`?:`) operator. + + pp$5.parseMaybeConditional = function(forInit, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprOps(forInit, refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + if (this.eat(types$1.question)) { + var node = this.startNodeAt(startPos, startLoc); + node.test = expr; + node.consequent = this.parseMaybeAssign(); + this.expect(types$1.colon); + node.alternate = this.parseMaybeAssign(forInit); + return this.finishNode(node, "ConditionalExpression") + } + return expr + }; + + // Start the precedence parser. + + pp$5.parseExprOps = function(forInit, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeUnary(refDestructuringErrors, false, false, forInit); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit) + }; + + // Parse binary operators with the operator precedence parsing + // algorithm. `left` is the left-hand side of the operator. + // `minPrec` provides context that allows the function to stop and + // defer further parser to one of its callers when it encounters an + // operator that has a lower precedence than the set it is parsing. + + pp$5.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) { + var prec = this.type.binop; + if (prec != null && (!forInit || this.type !== types$1._in)) { + if (prec > minPrec) { + var logical = this.type === types$1.logicalOR || this.type === types$1.logicalAND; + var coalesce = this.type === types$1.coalesce; + if (coalesce) { + // Handle the precedence of `tt.coalesce` as equal to the range of logical expressions. + // In other words, `node.right` shouldn't contain logical expressions in order to check the mixed error. + prec = types$1.logicalAND.binop; + } + var op = this.value; + this.next(); + var startPos = this.start, startLoc = this.startLoc; + var right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit); + var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce); + if ((logical && this.type === types$1.coalesce) || (coalesce && (this.type === types$1.logicalOR || this.type === types$1.logicalAND))) { + this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"); + } + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit) + } + } + return left + }; + + pp$5.buildBinary = function(startPos, startLoc, left, right, op, logical) { + if (right.type === "PrivateIdentifier") { this.raise(right.start, "Private identifier can only be left side of binary expression"); } + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.operator = op; + node.right = right; + return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") + }; + + // Parse unary operators, both prefix and postfix. + + pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) { + var startPos = this.start, startLoc = this.startLoc, expr; + if (this.isContextual("await") && this.canAwait) { + expr = this.parseAwait(forInit); + sawUnary = true; + } else if (this.type.prefix) { + var node = this.startNode(), update = this.type === types$1.incDec; + node.operator = this.value; + node.prefix = true; + this.next(); + node.argument = this.parseMaybeUnary(null, true, update, forInit); + this.checkExpressionErrors(refDestructuringErrors, true); + if (update) { this.checkLValSimple(node.argument); } + else if (this.strict && node.operator === "delete" && isLocalVariableAccess(node.argument)) + { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } + else if (node.operator === "delete" && isPrivateFieldAccess(node.argument)) + { this.raiseRecoverable(node.start, "Private fields can not be deleted"); } + else { sawUnary = true; } + expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); + } else if (!sawUnary && this.type === types$1.privateId) { + if ((forInit || this.privateNameStack.length === 0) && this.options.checkPrivateFields) { this.unexpected(); } + expr = this.parsePrivateIdent(); + // only could be private fields in 'in', such as #x in obj + if (this.type !== types$1._in) { this.unexpected(); } + } else { + expr = this.parseExprSubscripts(refDestructuringErrors, forInit); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + while (this.type.postfix && !this.canInsertSemicolon()) { + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.operator = this.value; + node$1.prefix = false; + node$1.argument = expr; + this.checkLValSimple(expr); + this.next(); + expr = this.finishNode(node$1, "UpdateExpression"); + } + } + + if (!incDec && this.eat(types$1.starstar)) { + if (sawUnary) + { this.unexpected(this.lastTokStart); } + else + { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false) } + } else { + return expr + } + }; + + function isLocalVariableAccess(node) { + return ( + node.type === "Identifier" || + node.type === "ParenthesizedExpression" && isLocalVariableAccess(node.expression) + ) + } + + function isPrivateFieldAccess(node) { + return ( + node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" || + node.type === "ChainExpression" && isPrivateFieldAccess(node.expression) || + node.type === "ParenthesizedExpression" && isPrivateFieldAccess(node.expression) + ) + } + + // Parse call, dot, and `[]`-subscript expressions. + + pp$5.parseExprSubscripts = function(refDestructuringErrors, forInit) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprAtom(refDestructuringErrors, forInit); + if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") + { return expr } + var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit); + if (refDestructuringErrors && result.type === "MemberExpression") { + if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } + if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } + if (refDestructuringErrors.trailingComma >= result.start) { refDestructuringErrors.trailingComma = -1; } + } + return result + }; + + pp$5.parseSubscripts = function(base, startPos, startLoc, noCalls, forInit) { + var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && + this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && + this.potentialArrowAt === base.start; + var optionalChained = false; + + while (true) { + var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit); + + if (element.optional) { optionalChained = true; } + if (element === base || element.type === "ArrowFunctionExpression") { + if (optionalChained) { + var chainNode = this.startNodeAt(startPos, startLoc); + chainNode.expression = element; + element = this.finishNode(chainNode, "ChainExpression"); + } + return element + } + + base = element; + } + }; + + pp$5.shouldParseAsyncArrow = function() { + return !this.canInsertSemicolon() && this.eat(types$1.arrow) + }; + + pp$5.parseSubscriptAsyncArrow = function(startPos, startLoc, exprList, forInit) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true, forInit) + }; + + pp$5.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) { + var optionalSupported = this.options.ecmaVersion >= 11; + var optional = optionalSupported && this.eat(types$1.questionDot); + if (noCalls && optional) { this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions"); } + + var computed = this.eat(types$1.bracketL); + if (computed || (optional && this.type !== types$1.parenL && this.type !== types$1.backQuote) || this.eat(types$1.dot)) { + var node = this.startNodeAt(startPos, startLoc); + node.object = base; + if (computed) { + node.property = this.parseExpression(); + this.expect(types$1.bracketR); + } else if (this.type === types$1.privateId && base.type !== "Super") { + node.property = this.parsePrivateIdent(); + } else { + node.property = this.parseIdent(this.options.allowReserved !== "never"); + } + node.computed = !!computed; + if (optionalSupported) { + node.optional = optional; + } + base = this.finishNode(node, "MemberExpression"); + } else if (!noCalls && this.eat(types$1.parenL)) { + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + var exprList = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors); + if (maybeAsyncArrow && !optional && this.shouldParseAsyncArrow()) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + if (this.awaitIdentPos > 0) + { this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); } + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.parseSubscriptAsyncArrow(startPos, startLoc, exprList, forInit) + } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.callee = base; + node$1.arguments = exprList; + if (optionalSupported) { + node$1.optional = optional; + } + base = this.finishNode(node$1, "CallExpression"); + } else if (this.type === types$1.backQuote) { + if (optional || optionalChained) { + this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions"); + } + var node$2 = this.startNodeAt(startPos, startLoc); + node$2.tag = base; + node$2.quasi = this.parseTemplate({isTagged: true}); + base = this.finishNode(node$2, "TaggedTemplateExpression"); + } + return base + }; + + // Parse an atomic expression — either a single token that is an + // expression, an expression started by a keyword like `function` or + // `new`, or an expression wrapped in punctuation like `()`, `[]`, + // or `{}`. + + pp$5.parseExprAtom = function(refDestructuringErrors, forInit, forNew) { + // If a division operator appears in an expression position, the + // tokenizer got confused, and we force it to read a regexp instead. + if (this.type === types$1.slash) { this.readRegexp(); } + + var node, canBeArrow = this.potentialArrowAt === this.start; + switch (this.type) { + case types$1._super: + if (!this.allowSuper) + { this.raise(this.start, "'super' keyword outside a method"); } + node = this.startNode(); + this.next(); + if (this.type === types$1.parenL && !this.allowDirectSuper) + { this.raise(node.start, "super() call outside constructor of a subclass"); } + // The `super` keyword can appear at below: + // SuperProperty: + // super [ Expression ] + // super . IdentifierName + // SuperCall: + // super ( Arguments ) + if (this.type !== types$1.dot && this.type !== types$1.bracketL && this.type !== types$1.parenL) + { this.unexpected(); } + return this.finishNode(node, "Super") + + case types$1._this: + node = this.startNode(); + this.next(); + return this.finishNode(node, "ThisExpression") + + case types$1.name: + var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; + var id = this.parseIdent(false); + if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types$1._function)) { + this.overrideContext(types.f_expr); + return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true, forInit) + } + if (canBeArrow && !this.canInsertSemicolon()) { + if (this.eat(types$1.arrow)) + { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false, forInit) } + if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types$1.name && !containsEsc && + (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) { + id = this.parseIdent(false); + if (this.canInsertSemicolon() || !this.eat(types$1.arrow)) + { this.unexpected(); } + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true, forInit) + } + } + return id + + case types$1.regexp: + var value = this.value; + node = this.parseLiteral(value.value); + node.regex = {pattern: value.pattern, flags: value.flags}; + return node + + case types$1.num: case types$1.string: + return this.parseLiteral(this.value) + + case types$1._null: case types$1._true: case types$1._false: + node = this.startNode(); + node.value = this.type === types$1._null ? null : this.type === types$1._true; + node.raw = this.type.keyword; + this.next(); + return this.finishNode(node, "Literal") + + case types$1.parenL: + var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit); + if (refDestructuringErrors) { + if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) + { refDestructuringErrors.parenthesizedAssign = start; } + if (refDestructuringErrors.parenthesizedBind < 0) + { refDestructuringErrors.parenthesizedBind = start; } + } + return expr + + case types$1.bracketL: + node = this.startNode(); + this.next(); + node.elements = this.parseExprList(types$1.bracketR, true, true, refDestructuringErrors); + return this.finishNode(node, "ArrayExpression") + + case types$1.braceL: + this.overrideContext(types.b_expr); + return this.parseObj(false, refDestructuringErrors) + + case types$1._function: + node = this.startNode(); + this.next(); + return this.parseFunction(node, 0) + + case types$1._class: + return this.parseClass(this.startNode(), false) + + case types$1._new: + return this.parseNew() + + case types$1.backQuote: + return this.parseTemplate() + + case types$1._import: + if (this.options.ecmaVersion >= 11) { + return this.parseExprImport(forNew) + } else { + return this.unexpected() + } + + default: + return this.parseExprAtomDefault() + } + }; + + pp$5.parseExprAtomDefault = function() { + this.unexpected(); + }; + + pp$5.parseExprImport = function(forNew) { + var node = this.startNode(); + + // Consume `import` as an identifier for `import.meta`. + // Because `this.parseIdent(true)` doesn't check escape sequences, it needs the check of `this.containsEsc`. + if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword import"); } + this.next(); + + if (this.type === types$1.parenL && !forNew) { + return this.parseDynamicImport(node) + } else if (this.type === types$1.dot) { + var meta = this.startNodeAt(node.start, node.loc && node.loc.start); + meta.name = "import"; + node.meta = this.finishNode(meta, "Identifier"); + return this.parseImportMeta(node) + } else { + this.unexpected(); + } + }; + + pp$5.parseDynamicImport = function(node) { + this.next(); // skip `(` + + // Parse node.source. + node.source = this.parseMaybeAssign(); + + if (this.options.ecmaVersion >= 16) { + if (!this.eat(types$1.parenR)) { + this.expect(types$1.comma); + if (!this.afterTrailingComma(types$1.parenR)) { + node.options = this.parseMaybeAssign(); + if (!this.eat(types$1.parenR)) { + this.expect(types$1.comma); + if (!this.afterTrailingComma(types$1.parenR)) { + this.unexpected(); + } + } + } else { + node.options = null; + } + } else { + node.options = null; + } + } else { + // Verify ending. + if (!this.eat(types$1.parenR)) { + var errorPos = this.start; + if (this.eat(types$1.comma) && this.eat(types$1.parenR)) { + this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()"); + } else { + this.unexpected(errorPos); + } + } + } + + return this.finishNode(node, "ImportExpression") + }; + + pp$5.parseImportMeta = function(node) { + this.next(); // skip `.` + + var containsEsc = this.containsEsc; + node.property = this.parseIdent(true); + + if (node.property.name !== "meta") + { this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'"); } + if (containsEsc) + { this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters"); } + if (this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere) + { this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module"); } + + return this.finishNode(node, "MetaProperty") + }; + + pp$5.parseLiteral = function(value) { + var node = this.startNode(); + node.value = value; + node.raw = this.input.slice(this.start, this.end); + if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1).replace(/_/g, ""); } + this.next(); + return this.finishNode(node, "Literal") + }; + + pp$5.parseParenExpression = function() { + this.expect(types$1.parenL); + var val = this.parseExpression(); + this.expect(types$1.parenR); + return val + }; + + pp$5.shouldParseArrow = function(exprList) { + return !this.canInsertSemicolon() + }; + + pp$5.parseParenAndDistinguishExpression = function(canBeArrow, forInit) { + var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; + if (this.options.ecmaVersion >= 6) { + this.next(); + + var innerStartPos = this.start, innerStartLoc = this.startLoc; + var exprList = [], first = true, lastIsComma = false; + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; + this.yieldPos = 0; + this.awaitPos = 0; + // Do not save awaitIdentPos to allow checking awaits nested in parameters + while (this.type !== types$1.parenR) { + first ? first = false : this.expect(types$1.comma); + if (allowTrailingComma && this.afterTrailingComma(types$1.parenR, true)) { + lastIsComma = true; + break + } else if (this.type === types$1.ellipsis) { + spreadStart = this.start; + exprList.push(this.parseParenItem(this.parseRestBinding())); + if (this.type === types$1.comma) { + this.raiseRecoverable( + this.start, + "Comma is not permitted after the rest element" + ); + } + break + } else { + exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); + } + } + var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc; + this.expect(types$1.parenR); + + if (canBeArrow && this.shouldParseArrow(exprList) && this.eat(types$1.arrow)) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + return this.parseParenArrowList(startPos, startLoc, exprList, forInit) + } + + if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); } + if (spreadStart) { this.unexpected(spreadStart); } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc); + val.expressions = exprList; + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); + } else { + val = exprList[0]; + } + } else { + val = this.parseParenExpression(); + } + + if (this.options.preserveParens) { + var par = this.startNodeAt(startPos, startLoc); + par.expression = val; + return this.finishNode(par, "ParenthesizedExpression") + } else { + return val + } + }; + + pp$5.parseParenItem = function(item) { + return item + }; + + pp$5.parseParenArrowList = function(startPos, startLoc, exprList, forInit) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, false, forInit) + }; + + // New's precedence is slightly tricky. It must allow its argument to + // be a `[]` or dot subscript expression, but not a call — at least, + // not without wrapping it in parentheses. Thus, it uses the noCalls + // argument to parseSubscripts to prevent it from consuming the + // argument list. + + var empty = []; + + pp$5.parseNew = function() { + if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword new"); } + var node = this.startNode(); + this.next(); + if (this.options.ecmaVersion >= 6 && this.type === types$1.dot) { + var meta = this.startNodeAt(node.start, node.loc && node.loc.start); + meta.name = "new"; + node.meta = this.finishNode(meta, "Identifier"); + this.next(); + var containsEsc = this.containsEsc; + node.property = this.parseIdent(true); + if (node.property.name !== "target") + { this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'"); } + if (containsEsc) + { this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters"); } + if (!this.allowNewDotTarget) + { this.raiseRecoverable(node.start, "'new.target' can only be used in functions and class static block"); } + return this.finishNode(node, "MetaProperty") + } + var startPos = this.start, startLoc = this.startLoc; + node.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), startPos, startLoc, true, false); + if (this.eat(types$1.parenL)) { node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false); } + else { node.arguments = empty; } + return this.finishNode(node, "NewExpression") + }; + + // Parse template expression. + + pp$5.parseTemplateElement = function(ref) { + var isTagged = ref.isTagged; + + var elem = this.startNode(); + if (this.type === types$1.invalidTemplate) { + if (!isTagged) { + this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); + } + elem.value = { + raw: this.value.replace(/\r\n?/g, "\n"), + cooked: null + }; + } else { + elem.value = { + raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), + cooked: this.value + }; + } + this.next(); + elem.tail = this.type === types$1.backQuote; + return this.finishNode(elem, "TemplateElement") + }; + + pp$5.parseTemplate = function(ref) { + if ( ref === void 0 ) ref = {}; + var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false; + + var node = this.startNode(); + this.next(); + node.expressions = []; + var curElt = this.parseTemplateElement({isTagged: isTagged}); + node.quasis = [curElt]; + while (!curElt.tail) { + if (this.type === types$1.eof) { this.raise(this.pos, "Unterminated template literal"); } + this.expect(types$1.dollarBraceL); + node.expressions.push(this.parseExpression()); + this.expect(types$1.braceR); + node.quasis.push(curElt = this.parseTemplateElement({isTagged: isTagged})); + } + this.next(); + return this.finishNode(node, "TemplateLiteral") + }; + + pp$5.isAsyncProp = function(prop) { + return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && + (this.type === types$1.name || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types$1.star)) && + !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + }; + + // Parse an object literal or binding pattern. + + pp$5.parseObj = function(isPattern, refDestructuringErrors) { + var node = this.startNode(), first = true, propHash = {}; + node.properties = []; + this.next(); + while (!this.eat(types$1.braceR)) { + if (!first) { + this.expect(types$1.comma); + if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$1.braceR)) { break } + } else { first = false; } + + var prop = this.parseProperty(isPattern, refDestructuringErrors); + if (!isPattern) { this.checkPropClash(prop, propHash, refDestructuringErrors); } + node.properties.push(prop); + } + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") + }; + + pp$5.parseProperty = function(isPattern, refDestructuringErrors) { + var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; + if (this.options.ecmaVersion >= 9 && this.eat(types$1.ellipsis)) { + if (isPattern) { + prop.argument = this.parseIdent(false); + if (this.type === types$1.comma) { + this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"); + } + return this.finishNode(prop, "RestElement") + } + // Parse argument. + prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); + // To disallow trailing comma via `this.toAssignable()`. + if (this.type === types$1.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { + refDestructuringErrors.trailingComma = this.start; + } + // Finish + return this.finishNode(prop, "SpreadElement") + } + if (this.options.ecmaVersion >= 6) { + prop.method = false; + prop.shorthand = false; + if (isPattern || refDestructuringErrors) { + startPos = this.start; + startLoc = this.startLoc; + } + if (!isPattern) + { isGenerator = this.eat(types$1.star); } + } + var containsEsc = this.containsEsc; + this.parsePropertyName(prop); + if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { + isAsync = true; + isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star); + this.parsePropertyName(prop); + } else { + isAsync = false; + } + this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); + return this.finishNode(prop, "Property") + }; + + pp$5.parseGetterSetter = function(prop) { + prop.kind = prop.key.name; + this.parsePropertyName(prop); + prop.value = this.parseMethod(false); + var paramCount = prop.kind === "get" ? 0 : 1; + if (prop.value.params.length !== paramCount) { + var start = prop.value.start; + if (prop.kind === "get") + { this.raiseRecoverable(start, "getter should have no params"); } + else + { this.raiseRecoverable(start, "setter should have exactly one param"); } + } else { + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") + { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); } + } + }; + + pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { + if ((isGenerator || isAsync) && this.type === types$1.colon) + { this.unexpected(); } + + if (this.eat(types$1.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); + prop.kind = "init"; + } else if (this.options.ecmaVersion >= 6 && this.type === types$1.parenL) { + if (isPattern) { this.unexpected(); } + prop.kind = "init"; + prop.method = true; + prop.value = this.parseMethod(isGenerator, isAsync); + } else if (!isPattern && !containsEsc && + this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && + (prop.key.name === "get" || prop.key.name === "set") && + (this.type !== types$1.comma && this.type !== types$1.braceR && this.type !== types$1.eq)) { + if (isGenerator || isAsync) { this.unexpected(); } + this.parseGetterSetter(prop); + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + if (isGenerator || isAsync) { this.unexpected(); } + this.checkUnreserved(prop.key); + if (prop.key.name === "await" && !this.awaitIdentPos) + { this.awaitIdentPos = startPos; } + prop.kind = "init"; + if (isPattern) { + prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)); + } else if (this.type === types$1.eq && refDestructuringErrors) { + if (refDestructuringErrors.shorthandAssign < 0) + { refDestructuringErrors.shorthandAssign = this.start; } + prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)); + } else { + prop.value = this.copyNode(prop.key); + } + prop.shorthand = true; + } else { this.unexpected(); } + }; + + pp$5.parsePropertyName = function(prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(types$1.bracketL)) { + prop.computed = true; + prop.key = this.parseMaybeAssign(); + this.expect(types$1.bracketR); + return prop.key + } else { + prop.computed = false; + } + } + return prop.key = this.type === types$1.num || this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never") + }; + + // Initialize empty function node. + + pp$5.initFunction = function(node) { + node.id = null; + if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; } + if (this.options.ecmaVersion >= 8) { node.async = false; } + }; + + // Parse object or class method. + + pp$5.parseMethod = function(isGenerator, isAsync, allowDirectSuper) { + var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + + this.initFunction(node); + if (this.options.ecmaVersion >= 6) + { node.generator = isGenerator; } + if (this.options.ecmaVersion >= 8) + { node.async = !!isAsync; } + + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); + + this.expect(types$1.parenL); + node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + this.parseFunctionBody(node, false, true, false); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, "FunctionExpression") + }; + + // Parse arrow function expression with given parameters. + + pp$5.parseArrowExpression = function(node, params, isAsync, forInit) { + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + + this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); + this.initFunction(node); + if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } + + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + + node.params = this.toAssignableList(params, true); + this.parseFunctionBody(node, true, false, forInit); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, "ArrowFunctionExpression") + }; + + // Parse function body and check parameters. + + pp$5.parseFunctionBody = function(node, isArrowFunction, isMethod, forInit) { + var isExpression = isArrowFunction && this.type !== types$1.braceL; + var oldStrict = this.strict, useStrict = false; + + if (isExpression) { + node.body = this.parseMaybeAssign(forInit); + node.expression = true; + this.checkParams(node, false); + } else { + var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); + if (!oldStrict || nonSimple) { + useStrict = this.strictDirective(this.end); + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + if (useStrict && nonSimple) + { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } + } + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldLabels = this.labels; + this.labels = []; + if (useStrict) { this.strict = true; } + + // Add the params to varDeclaredNames to ensure that an error is thrown + // if a let/const declaration in the function clashes with one of the params. + this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); + // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' + if (this.strict && node.id) { this.checkLValSimple(node.id, BIND_OUTSIDE); } + node.body = this.parseBlock(false, undefined, useStrict && !oldStrict); + node.expression = false; + this.adaptDirectivePrologue(node.body.body); + this.labels = oldLabels; + } + this.exitScope(); + }; + + pp$5.isSimpleParamList = function(params) { + for (var i = 0, list = params; i < list.length; i += 1) + { + var param = list[i]; + + if (param.type !== "Identifier") { return false + } } + return true + }; + + // Checks function params for various disallowed patterns such as using "eval" + // or "arguments" and duplicate parameters. + + pp$5.checkParams = function(node, allowDuplicates) { + var nameHash = Object.create(null); + for (var i = 0, list = node.params; i < list.length; i += 1) + { + var param = list[i]; + + this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash); + } + }; + + // Parses a comma-separated list of expressions, and returns them as + // an array. `close` is the token type that ends the list, and + // `allowEmpty` can be turned on to allow subsequent commas with + // nothing in between them to be parsed as `null` (which is needed + // for array literals). + + pp$5.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { + var elts = [], first = true; + while (!this.eat(close)) { + if (!first) { + this.expect(types$1.comma); + if (allowTrailingComma && this.afterTrailingComma(close)) { break } + } else { first = false; } + + var elt = (void 0); + if (allowEmpty && this.type === types$1.comma) + { elt = null; } + else if (this.type === types$1.ellipsis) { + elt = this.parseSpread(refDestructuringErrors); + if (refDestructuringErrors && this.type === types$1.comma && refDestructuringErrors.trailingComma < 0) + { refDestructuringErrors.trailingComma = this.start; } + } else { + elt = this.parseMaybeAssign(false, refDestructuringErrors); + } + elts.push(elt); + } + return elts + }; + + pp$5.checkUnreserved = function(ref) { + var start = ref.start; + var end = ref.end; + var name = ref.name; + + if (this.inGenerator && name === "yield") + { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); } + if (this.inAsync && name === "await") + { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); } + if (this.currentThisScope().inClassFieldInit && name === "arguments") + { this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer"); } + if (this.inClassStaticBlock && (name === "arguments" || name === "await")) + { this.raise(start, ("Cannot use " + name + " in class static initialization block")); } + if (this.keywords.test(name)) + { this.raise(start, ("Unexpected keyword '" + name + "'")); } + if (this.options.ecmaVersion < 6 && + this.input.slice(start, end).indexOf("\\") !== -1) { return } + var re = this.strict ? this.reservedWordsStrict : this.reservedWords; + if (re.test(name)) { + if (!this.inAsync && name === "await") + { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); } + this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); + } + }; + + // Parse the next token as an identifier. If `liberal` is true (used + // when parsing properties), it will also convert keywords into + // identifiers. + + pp$5.parseIdent = function(liberal) { + var node = this.parseIdentNode(); + this.next(!!liberal); + this.finishNode(node, "Identifier"); + if (!liberal) { + this.checkUnreserved(node); + if (node.name === "await" && !this.awaitIdentPos) + { this.awaitIdentPos = node.start; } + } + return node + }; + + pp$5.parseIdentNode = function() { + var node = this.startNode(); + if (this.type === types$1.name) { + node.name = this.value; + } else if (this.type.keyword) { + node.name = this.type.keyword; + + // To fix https://github.com/acornjs/acorn/issues/575 + // `class` and `function` keywords push new context into this.context. + // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name. + // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword + if ((node.name === "class" || node.name === "function") && + (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { + this.context.pop(); + } + this.type = types$1.name; + } else { + this.unexpected(); + } + return node + }; + + pp$5.parsePrivateIdent = function() { + var node = this.startNode(); + if (this.type === types$1.privateId) { + node.name = this.value; + } else { + this.unexpected(); + } + this.next(); + this.finishNode(node, "PrivateIdentifier"); + + // For validating existence + if (this.options.checkPrivateFields) { + if (this.privateNameStack.length === 0) { + this.raise(node.start, ("Private field '#" + (node.name) + "' must be declared in an enclosing class")); + } else { + this.privateNameStack[this.privateNameStack.length - 1].used.push(node); + } + } + + return node + }; + + // Parses yield expression inside generator. + + pp$5.parseYield = function(forInit) { + if (!this.yieldPos) { this.yieldPos = this.start; } + + var node = this.startNode(); + this.next(); + if (this.type === types$1.semi || this.canInsertSemicolon() || (this.type !== types$1.star && !this.type.startsExpr)) { + node.delegate = false; + node.argument = null; + } else { + node.delegate = this.eat(types$1.star); + node.argument = this.parseMaybeAssign(forInit); + } + return this.finishNode(node, "YieldExpression") + }; + + pp$5.parseAwait = function(forInit) { + if (!this.awaitPos) { this.awaitPos = this.start; } + + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeUnary(null, true, false, forInit); + return this.finishNode(node, "AwaitExpression") + }; + + var pp$4 = Parser.prototype; + + // This function is used to raise exceptions on parse errors. It + // takes an offset integer (into the current `input`) to indicate + // the location of the error, attaches the position to the end + // of the error message, and then raises a `SyntaxError` with that + // message. + + pp$4.raise = function(pos, message) { + var loc = getLineInfo(this.input, pos); + message += " (" + loc.line + ":" + loc.column + ")"; + var err = new SyntaxError(message); + err.pos = pos; err.loc = loc; err.raisedAt = this.pos; + throw err + }; + + pp$4.raiseRecoverable = pp$4.raise; + + pp$4.curPosition = function() { + if (this.options.locations) { + return new Position(this.curLine, this.pos - this.lineStart) + } + }; + + var pp$3 = Parser.prototype; + + var Scope = function Scope(flags) { + this.flags = flags; + // A list of var-declared names in the current lexical scope + this.var = []; + // A list of lexically-declared names in the current lexical scope + this.lexical = []; + // A list of lexically-declared FunctionDeclaration names in the current lexical scope + this.functions = []; + // A switch to disallow the identifier reference 'arguments' + this.inClassFieldInit = false; + }; + + // The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names. + + pp$3.enterScope = function(flags) { + this.scopeStack.push(new Scope(flags)); + }; + + pp$3.exitScope = function() { + this.scopeStack.pop(); + }; + + // The spec says: + // > At the top level of a function, or script, function declarations are + // > treated like var declarations rather than like lexical declarations. + pp$3.treatFunctionsAsVarInScope = function(scope) { + return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP) + }; + + pp$3.declareName = function(name, bindingType, pos) { + var redeclared = false; + if (bindingType === BIND_LEXICAL) { + var scope = this.currentScope(); + redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; + scope.lexical.push(name); + if (this.inModule && (scope.flags & SCOPE_TOP)) + { delete this.undefinedExports[name]; } + } else if (bindingType === BIND_SIMPLE_CATCH) { + var scope$1 = this.currentScope(); + scope$1.lexical.push(name); + } else if (bindingType === BIND_FUNCTION) { + var scope$2 = this.currentScope(); + if (this.treatFunctionsAsVar) + { redeclared = scope$2.lexical.indexOf(name) > -1; } + else + { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; } + scope$2.functions.push(name); + } else { + for (var i = this.scopeStack.length - 1; i >= 0; --i) { + var scope$3 = this.scopeStack[i]; + if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) || + !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) { + redeclared = true; + break + } + scope$3.var.push(name); + if (this.inModule && (scope$3.flags & SCOPE_TOP)) + { delete this.undefinedExports[name]; } + if (scope$3.flags & SCOPE_VAR) { break } + } + } + if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); } + }; + + pp$3.checkLocalExport = function(id) { + // scope.functions must be empty as Module code is always strict. + if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && + this.scopeStack[0].var.indexOf(id.name) === -1) { + this.undefinedExports[id.name] = id; + } + }; + + pp$3.currentScope = function() { + return this.scopeStack[this.scopeStack.length - 1] + }; + + pp$3.currentVarScope = function() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR) { return scope } + } + }; + + // Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`. + pp$3.currentThisScope = function() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope } + } + }; + + var Node = function Node(parser, pos, loc) { + this.type = ""; + this.start = pos; + this.end = 0; + if (parser.options.locations) + { this.loc = new SourceLocation(parser, loc); } + if (parser.options.directSourceFile) + { this.sourceFile = parser.options.directSourceFile; } + if (parser.options.ranges) + { this.range = [pos, 0]; } + }; + + // Start an AST node, attaching a start offset. + + var pp$2 = Parser.prototype; + + pp$2.startNode = function() { + return new Node(this, this.start, this.startLoc) + }; + + pp$2.startNodeAt = function(pos, loc) { + return new Node(this, pos, loc) + }; + + // Finish an AST node, adding `type` and `end` properties. + + function finishNodeAt(node, type, pos, loc) { + node.type = type; + node.end = pos; + if (this.options.locations) + { node.loc.end = loc; } + if (this.options.ranges) + { node.range[1] = pos; } + return node + } + + pp$2.finishNode = function(node, type) { + return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) + }; + + // Finish node at given position + + pp$2.finishNodeAt = function(node, type, pos, loc) { + return finishNodeAt.call(this, node, type, pos, loc) + }; + + pp$2.copyNode = function(node) { + var newNode = new Node(this, node.start, this.startLoc); + for (var prop in node) { newNode[prop] = node[prop]; } + return newNode + }; + + // This file was generated by "bin/generate-unicode-script-values.js". Do not modify manually! + var scriptValuesAddedInUnicode = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz"; + + // This file contains Unicode properties extracted from the ECMAScript specification. + // The lists are extracted like so: + // $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText) + + // #table-binary-unicode-properties + var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; + var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic"; + var ecma11BinaryProperties = ecma10BinaryProperties; + var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict"; + var ecma13BinaryProperties = ecma12BinaryProperties; + var ecma14BinaryProperties = ecma13BinaryProperties; + + var unicodeBinaryProperties = { + 9: ecma9BinaryProperties, + 10: ecma10BinaryProperties, + 11: ecma11BinaryProperties, + 12: ecma12BinaryProperties, + 13: ecma13BinaryProperties, + 14: ecma14BinaryProperties + }; + + // #table-binary-unicode-properties-of-strings + var ecma14BinaryPropertiesOfStrings = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"; + + var unicodeBinaryPropertiesOfStrings = { + 9: "", + 10: "", + 11: "", + 12: "", + 13: "", + 14: ecma14BinaryPropertiesOfStrings + }; + + // #table-unicode-general-category-values + var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; + + // #table-unicode-script-values + var ecma9ScriptValues = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; + var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"; + var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"; + var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi"; + var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith"; + var ecma14ScriptValues = ecma13ScriptValues + " " + scriptValuesAddedInUnicode; + + var unicodeScriptValues = { + 9: ecma9ScriptValues, + 10: ecma10ScriptValues, + 11: ecma11ScriptValues, + 12: ecma12ScriptValues, + 13: ecma13ScriptValues, + 14: ecma14ScriptValues + }; + + var data = {}; + function buildUnicodeData(ecmaVersion) { + var d = data[ecmaVersion] = { + binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues), + binaryOfStrings: wordsRegexp(unicodeBinaryPropertiesOfStrings[ecmaVersion]), + nonBinary: { + General_Category: wordsRegexp(unicodeGeneralCategoryValues), + Script: wordsRegexp(unicodeScriptValues[ecmaVersion]) + } + }; + d.nonBinary.Script_Extensions = d.nonBinary.Script; + + d.nonBinary.gc = d.nonBinary.General_Category; + d.nonBinary.sc = d.nonBinary.Script; + d.nonBinary.scx = d.nonBinary.Script_Extensions; + } + + for (var i = 0, list = [9, 10, 11, 12, 13, 14]; i < list.length; i += 1) { + var ecmaVersion = list[i]; + + buildUnicodeData(ecmaVersion); + } + + var pp$1 = Parser.prototype; + + // Track disjunction structure to determine whether a duplicate + // capture group name is allowed because it is in a separate branch. + var BranchID = function BranchID(parent, base) { + // Parent disjunction branch + this.parent = parent; + // Identifies this set of sibling branches + this.base = base || this; + }; + + BranchID.prototype.separatedFrom = function separatedFrom (alt) { + // A branch is separate from another branch if they or any of + // their parents are siblings in a given disjunction + for (var self = this; self; self = self.parent) { + for (var other = alt; other; other = other.parent) { + if (self.base === other.base && self !== other) { return true } + } + } + return false + }; + + BranchID.prototype.sibling = function sibling () { + return new BranchID(this.parent, this.base) + }; + + var RegExpValidationState = function RegExpValidationState(parser) { + this.parser = parser; + this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : ""); + this.unicodeProperties = data[parser.options.ecmaVersion >= 14 ? 14 : parser.options.ecmaVersion]; + this.source = ""; + this.flags = ""; + this.start = 0; + this.switchU = false; + this.switchV = false; + this.switchN = false; + this.pos = 0; + this.lastIntValue = 0; + this.lastStringValue = ""; + this.lastAssertionIsQuantifiable = false; + this.numCapturingParens = 0; + this.maxBackReference = 0; + this.groupNames = Object.create(null); + this.backReferenceNames = []; + this.branchID = null; + }; + + RegExpValidationState.prototype.reset = function reset (start, pattern, flags) { + var unicodeSets = flags.indexOf("v") !== -1; + var unicode = flags.indexOf("u") !== -1; + this.start = start | 0; + this.source = pattern + ""; + this.flags = flags; + if (unicodeSets && this.parser.options.ecmaVersion >= 15) { + this.switchU = true; + this.switchV = true; + this.switchN = true; + } else { + this.switchU = unicode && this.parser.options.ecmaVersion >= 6; + this.switchV = false; + this.switchN = unicode && this.parser.options.ecmaVersion >= 9; + } + }; + + RegExpValidationState.prototype.raise = function raise (message) { + this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message)); + }; + + // If u flag is given, this returns the code point at the index (it combines a surrogate pair). + // Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). + RegExpValidationState.prototype.at = function at (i, forceU) { + if ( forceU === void 0 ) forceU = false; + + var s = this.source; + var l = s.length; + if (i >= l) { + return -1 + } + var c = s.charCodeAt(i); + if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { + return c + } + var next = s.charCodeAt(i + 1); + return next >= 0xDC00 && next <= 0xDFFF ? (c << 10) + next - 0x35FDC00 : c + }; + + RegExpValidationState.prototype.nextIndex = function nextIndex (i, forceU) { + if ( forceU === void 0 ) forceU = false; + + var s = this.source; + var l = s.length; + if (i >= l) { + return l + } + var c = s.charCodeAt(i), next; + if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l || + (next = s.charCodeAt(i + 1)) < 0xDC00 || next > 0xDFFF) { + return i + 1 + } + return i + 2 + }; + + RegExpValidationState.prototype.current = function current (forceU) { + if ( forceU === void 0 ) forceU = false; + + return this.at(this.pos, forceU) + }; + + RegExpValidationState.prototype.lookahead = function lookahead (forceU) { + if ( forceU === void 0 ) forceU = false; + + return this.at(this.nextIndex(this.pos, forceU), forceU) + }; + + RegExpValidationState.prototype.advance = function advance (forceU) { + if ( forceU === void 0 ) forceU = false; + + this.pos = this.nextIndex(this.pos, forceU); + }; + + RegExpValidationState.prototype.eat = function eat (ch, forceU) { + if ( forceU === void 0 ) forceU = false; + + if (this.current(forceU) === ch) { + this.advance(forceU); + return true + } + return false + }; + + RegExpValidationState.prototype.eatChars = function eatChars (chs, forceU) { + if ( forceU === void 0 ) forceU = false; + + var pos = this.pos; + for (var i = 0, list = chs; i < list.length; i += 1) { + var ch = list[i]; + + var current = this.at(pos, forceU); + if (current === -1 || current !== ch) { + return false + } + pos = this.nextIndex(pos, forceU); + } + this.pos = pos; + return true + }; + + /** + * Validate the flags part of a given RegExpLiteral. + * + * @param {RegExpValidationState} state The state to validate RegExp. + * @returns {void} + */ + pp$1.validateRegExpFlags = function(state) { + var validFlags = state.validFlags; + var flags = state.flags; + + var u = false; + var v = false; + + for (var i = 0; i < flags.length; i++) { + var flag = flags.charAt(i); + if (validFlags.indexOf(flag) === -1) { + this.raise(state.start, "Invalid regular expression flag"); + } + if (flags.indexOf(flag, i + 1) > -1) { + this.raise(state.start, "Duplicate regular expression flag"); + } + if (flag === "u") { u = true; } + if (flag === "v") { v = true; } + } + if (this.options.ecmaVersion >= 15 && u && v) { + this.raise(state.start, "Invalid regular expression flag"); + } + }; + + function hasProp(obj) { + for (var _ in obj) { return true } + return false + } + + /** + * Validate the pattern part of a given RegExpLiteral. + * + * @param {RegExpValidationState} state The state to validate RegExp. + * @returns {void} + */ + pp$1.validateRegExpPattern = function(state) { + this.regexp_pattern(state); + + // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of + // parsing contains a |GroupName|, reparse with the goal symbol + // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError* + // exception if _P_ did not conform to the grammar, if any elements of _P_ + // were not matched by the parse, or if any Early Error conditions exist. + if (!state.switchN && this.options.ecmaVersion >= 9 && hasProp(state.groupNames)) { + state.switchN = true; + this.regexp_pattern(state); + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern + pp$1.regexp_pattern = function(state) { + state.pos = 0; + state.lastIntValue = 0; + state.lastStringValue = ""; + state.lastAssertionIsQuantifiable = false; + state.numCapturingParens = 0; + state.maxBackReference = 0; + state.groupNames = Object.create(null); + state.backReferenceNames.length = 0; + state.branchID = null; + + this.regexp_disjunction(state); + + if (state.pos !== state.source.length) { + // Make the same messages as V8. + if (state.eat(0x29 /* ) */)) { + state.raise("Unmatched ')'"); + } + if (state.eat(0x5D /* ] */) || state.eat(0x7D /* } */)) { + state.raise("Lone quantifier brackets"); + } + } + if (state.maxBackReference > state.numCapturingParens) { + state.raise("Invalid escape"); + } + for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { + var name = list[i]; + + if (!state.groupNames[name]) { + state.raise("Invalid named capture referenced"); + } + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction + pp$1.regexp_disjunction = function(state) { + var trackDisjunction = this.options.ecmaVersion >= 16; + if (trackDisjunction) { state.branchID = new BranchID(state.branchID, null); } + this.regexp_alternative(state); + while (state.eat(0x7C /* | */)) { + if (trackDisjunction) { state.branchID = state.branchID.sibling(); } + this.regexp_alternative(state); + } + if (trackDisjunction) { state.branchID = state.branchID.parent; } + + // Make the same message as V8. + if (this.regexp_eatQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + if (state.eat(0x7B /* { */)) { + state.raise("Lone quantifier brackets"); + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative + pp$1.regexp_alternative = function(state) { + while (state.pos < state.source.length && this.regexp_eatTerm(state)) {} + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term + pp$1.regexp_eatTerm = function(state) { + if (this.regexp_eatAssertion(state)) { + // Handle `QuantifiableAssertion Quantifier` alternative. + // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion + // is a QuantifiableAssertion. + if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { + // Make the same message as V8. + if (state.switchU) { + state.raise("Invalid quantifier"); + } + } + return true + } + + if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { + this.regexp_eatQuantifier(state); + return true + } + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion + pp$1.regexp_eatAssertion = function(state) { + var start = state.pos; + state.lastAssertionIsQuantifiable = false; + + // ^, $ + if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) { + return true + } + + // \b \B + if (state.eat(0x5C /* \ */)) { + if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) { + return true + } + state.pos = start; + } + + // Lookahead / Lookbehind + if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) { + var lookbehind = false; + if (this.options.ecmaVersion >= 9) { + lookbehind = state.eat(0x3C /* < */); + } + if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) { + this.regexp_disjunction(state); + if (!state.eat(0x29 /* ) */)) { + state.raise("Unterminated group"); + } + state.lastAssertionIsQuantifiable = !lookbehind; + return true + } + } + + state.pos = start; + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier + pp$1.regexp_eatQuantifier = function(state, noError) { + if ( noError === void 0 ) noError = false; + + if (this.regexp_eatQuantifierPrefix(state, noError)) { + state.eat(0x3F /* ? */); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix + pp$1.regexp_eatQuantifierPrefix = function(state, noError) { + return ( + state.eat(0x2A /* * */) || + state.eat(0x2B /* + */) || + state.eat(0x3F /* ? */) || + this.regexp_eatBracedQuantifier(state, noError) + ) + }; + pp$1.regexp_eatBracedQuantifier = function(state, noError) { + var start = state.pos; + if (state.eat(0x7B /* { */)) { + var min = 0, max = -1; + if (this.regexp_eatDecimalDigits(state)) { + min = state.lastIntValue; + if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) { + max = state.lastIntValue; + } + if (state.eat(0x7D /* } */)) { + // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term + if (max !== -1 && max < min && !noError) { + state.raise("numbers out of order in {} quantifier"); + } + return true + } + } + if (state.switchU && !noError) { + state.raise("Incomplete quantifier"); + } + state.pos = start; + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Atom + pp$1.regexp_eatAtom = function(state) { + return ( + this.regexp_eatPatternCharacters(state) || + state.eat(0x2E /* . */) || + this.regexp_eatReverseSolidusAtomEscape(state) || + this.regexp_eatCharacterClass(state) || + this.regexp_eatUncapturingGroup(state) || + this.regexp_eatCapturingGroup(state) + ) + }; + pp$1.regexp_eatReverseSolidusAtomEscape = function(state) { + var start = state.pos; + if (state.eat(0x5C /* \ */)) { + if (this.regexp_eatAtomEscape(state)) { + return true + } + state.pos = start; + } + return false + }; + pp$1.regexp_eatUncapturingGroup = function(state) { + var start = state.pos; + if (state.eat(0x28 /* ( */)) { + if (state.eat(0x3F /* ? */)) { + if (this.options.ecmaVersion >= 16) { + var addModifiers = this.regexp_eatModifiers(state); + var hasHyphen = state.eat(0x2D /* - */); + if (addModifiers || hasHyphen) { + for (var i = 0; i < addModifiers.length; i++) { + var modifier = addModifiers.charAt(i); + if (addModifiers.indexOf(modifier, i + 1) > -1) { + state.raise("Duplicate regular expression modifiers"); + } + } + if (hasHyphen) { + var removeModifiers = this.regexp_eatModifiers(state); + if (!addModifiers && !removeModifiers && state.current() === 0x3A /* : */) { + state.raise("Invalid regular expression modifiers"); + } + for (var i$1 = 0; i$1 < removeModifiers.length; i$1++) { + var modifier$1 = removeModifiers.charAt(i$1); + if ( + removeModifiers.indexOf(modifier$1, i$1 + 1) > -1 || + addModifiers.indexOf(modifier$1) > -1 + ) { + state.raise("Duplicate regular expression modifiers"); + } + } + } + } + } + if (state.eat(0x3A /* : */)) { + this.regexp_disjunction(state); + if (state.eat(0x29 /* ) */)) { + return true + } + state.raise("Unterminated group"); + } + } + state.pos = start; + } + return false + }; + pp$1.regexp_eatCapturingGroup = function(state) { + if (state.eat(0x28 /* ( */)) { + if (this.options.ecmaVersion >= 9) { + this.regexp_groupSpecifier(state); + } else if (state.current() === 0x3F /* ? */) { + state.raise("Invalid group"); + } + this.regexp_disjunction(state); + if (state.eat(0x29 /* ) */)) { + state.numCapturingParens += 1; + return true + } + state.raise("Unterminated group"); + } + return false + }; + // RegularExpressionModifiers :: + // [empty] + // RegularExpressionModifiers RegularExpressionModifier + pp$1.regexp_eatModifiers = function(state) { + var modifiers = ""; + var ch = 0; + while ((ch = state.current()) !== -1 && isRegularExpressionModifier(ch)) { + modifiers += codePointToString(ch); + state.advance(); + } + return modifiers + }; + // RegularExpressionModifier :: one of + // `i` `m` `s` + function isRegularExpressionModifier(ch) { + return ch === 0x69 /* i */ || ch === 0x6d /* m */ || ch === 0x73 /* s */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom + pp$1.regexp_eatExtendedAtom = function(state) { + return ( + state.eat(0x2E /* . */) || + this.regexp_eatReverseSolidusAtomEscape(state) || + this.regexp_eatCharacterClass(state) || + this.regexp_eatUncapturingGroup(state) || + this.regexp_eatCapturingGroup(state) || + this.regexp_eatInvalidBracedQuantifier(state) || + this.regexp_eatExtendedPatternCharacter(state) + ) + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier + pp$1.regexp_eatInvalidBracedQuantifier = function(state) { + if (this.regexp_eatBracedQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter + pp$1.regexp_eatSyntaxCharacter = function(state) { + var ch = state.current(); + if (isSyntaxCharacter(ch)) { + state.lastIntValue = ch; + state.advance(); + return true + } + return false + }; + function isSyntaxCharacter(ch) { + return ( + ch === 0x24 /* $ */ || + ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || + ch === 0x2E /* . */ || + ch === 0x3F /* ? */ || + ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || + ch >= 0x7B /* { */ && ch <= 0x7D /* } */ + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter + // But eat eager. + pp$1.regexp_eatPatternCharacters = function(state) { + var start = state.pos; + var ch = 0; + while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { + state.advance(); + } + return state.pos !== start + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter + pp$1.regexp_eatExtendedPatternCharacter = function(state) { + var ch = state.current(); + if ( + ch !== -1 && + ch !== 0x24 /* $ */ && + !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && + ch !== 0x2E /* . */ && + ch !== 0x3F /* ? */ && + ch !== 0x5B /* [ */ && + ch !== 0x5E /* ^ */ && + ch !== 0x7C /* | */ + ) { + state.advance(); + return true + } + return false + }; + + // GroupSpecifier :: + // [empty] + // `?` GroupName + pp$1.regexp_groupSpecifier = function(state) { + if (state.eat(0x3F /* ? */)) { + if (!this.regexp_eatGroupName(state)) { state.raise("Invalid group"); } + var trackDisjunction = this.options.ecmaVersion >= 16; + var known = state.groupNames[state.lastStringValue]; + if (known) { + if (trackDisjunction) { + for (var i = 0, list = known; i < list.length; i += 1) { + var altID = list[i]; + + if (!altID.separatedFrom(state.branchID)) + { state.raise("Duplicate capture group name"); } + } + } else { + state.raise("Duplicate capture group name"); + } + } + if (trackDisjunction) { + (known || (state.groupNames[state.lastStringValue] = [])).push(state.branchID); + } else { + state.groupNames[state.lastStringValue] = true; + } + } + }; + + // GroupName :: + // `<` RegExpIdentifierName `>` + // Note: this updates `state.lastStringValue` property with the eaten name. + pp$1.regexp_eatGroupName = function(state) { + state.lastStringValue = ""; + if (state.eat(0x3C /* < */)) { + if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) { + return true + } + state.raise("Invalid capture group name"); + } + return false + }; + + // RegExpIdentifierName :: + // RegExpIdentifierStart + // RegExpIdentifierName RegExpIdentifierPart + // Note: this updates `state.lastStringValue` property with the eaten name. + pp$1.regexp_eatRegExpIdentifierName = function(state) { + state.lastStringValue = ""; + if (this.regexp_eatRegExpIdentifierStart(state)) { + state.lastStringValue += codePointToString(state.lastIntValue); + while (this.regexp_eatRegExpIdentifierPart(state)) { + state.lastStringValue += codePointToString(state.lastIntValue); + } + return true + } + return false + }; + + // RegExpIdentifierStart :: + // UnicodeIDStart + // `$` + // `_` + // `\` RegExpUnicodeEscapeSequence[+U] + pp$1.regexp_eatRegExpIdentifierStart = function(state) { + var start = state.pos; + var forceU = this.options.ecmaVersion >= 11; + var ch = state.current(forceU); + state.advance(forceU); + + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierStart(ch)) { + state.lastIntValue = ch; + return true + } + + state.pos = start; + return false + }; + function isRegExpIdentifierStart(ch) { + return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ + } + + // RegExpIdentifierPart :: + // UnicodeIDContinue + // `$` + // `_` + // `\` RegExpUnicodeEscapeSequence[+U] + // + // + pp$1.regexp_eatRegExpIdentifierPart = function(state) { + var start = state.pos; + var forceU = this.options.ecmaVersion >= 11; + var ch = state.current(forceU); + state.advance(forceU); + + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierPart(ch)) { + state.lastIntValue = ch; + return true + } + + state.pos = start; + return false + }; + function isRegExpIdentifierPart(ch) { + return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape + pp$1.regexp_eatAtomEscape = function(state) { + if ( + this.regexp_eatBackReference(state) || + this.regexp_eatCharacterClassEscape(state) || + this.regexp_eatCharacterEscape(state) || + (state.switchN && this.regexp_eatKGroupName(state)) + ) { + return true + } + if (state.switchU) { + // Make the same message as V8. + if (state.current() === 0x63 /* c */) { + state.raise("Invalid unicode escape"); + } + state.raise("Invalid escape"); + } + return false + }; + pp$1.regexp_eatBackReference = function(state) { + var start = state.pos; + if (this.regexp_eatDecimalEscape(state)) { + var n = state.lastIntValue; + if (state.switchU) { + // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape + if (n > state.maxBackReference) { + state.maxBackReference = n; + } + return true + } + if (n <= state.numCapturingParens) { + return true + } + state.pos = start; + } + return false + }; + pp$1.regexp_eatKGroupName = function(state) { + if (state.eat(0x6B /* k */)) { + if (this.regexp_eatGroupName(state)) { + state.backReferenceNames.push(state.lastStringValue); + return true + } + state.raise("Invalid named reference"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape + pp$1.regexp_eatCharacterEscape = function(state) { + return ( + this.regexp_eatControlEscape(state) || + this.regexp_eatCControlLetter(state) || + this.regexp_eatZero(state) || + this.regexp_eatHexEscapeSequence(state) || + this.regexp_eatRegExpUnicodeEscapeSequence(state, false) || + (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || + this.regexp_eatIdentityEscape(state) + ) + }; + pp$1.regexp_eatCControlLetter = function(state) { + var start = state.pos; + if (state.eat(0x63 /* c */)) { + if (this.regexp_eatControlLetter(state)) { + return true + } + state.pos = start; + } + return false + }; + pp$1.regexp_eatZero = function(state) { + if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) { + state.lastIntValue = 0; + state.advance(); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape + pp$1.regexp_eatControlEscape = function(state) { + var ch = state.current(); + if (ch === 0x74 /* t */) { + state.lastIntValue = 0x09; /* \t */ + state.advance(); + return true + } + if (ch === 0x6E /* n */) { + state.lastIntValue = 0x0A; /* \n */ + state.advance(); + return true + } + if (ch === 0x76 /* v */) { + state.lastIntValue = 0x0B; /* \v */ + state.advance(); + return true + } + if (ch === 0x66 /* f */) { + state.lastIntValue = 0x0C; /* \f */ + state.advance(); + return true + } + if (ch === 0x72 /* r */) { + state.lastIntValue = 0x0D; /* \r */ + state.advance(); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter + pp$1.regexp_eatControlLetter = function(state) { + var ch = state.current(); + if (isControlLetter(ch)) { + state.lastIntValue = ch % 0x20; + state.advance(); + return true + } + return false + }; + function isControlLetter(ch) { + return ( + (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) || + (ch >= 0x61 /* a */ && ch <= 0x7A /* z */) + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence + pp$1.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) { + if ( forceU === void 0 ) forceU = false; + + var start = state.pos; + var switchU = forceU || state.switchU; + + if (state.eat(0x75 /* u */)) { + if (this.regexp_eatFixedHexDigits(state, 4)) { + var lead = state.lastIntValue; + if (switchU && lead >= 0xD800 && lead <= 0xDBFF) { + var leadSurrogateEnd = state.pos; + if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { + var trail = state.lastIntValue; + if (trail >= 0xDC00 && trail <= 0xDFFF) { + state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return true + } + } + state.pos = leadSurrogateEnd; + state.lastIntValue = lead; + } + return true + } + if ( + switchU && + state.eat(0x7B /* { */) && + this.regexp_eatHexDigits(state) && + state.eat(0x7D /* } */) && + isValidUnicode(state.lastIntValue) + ) { + return true + } + if (switchU) { + state.raise("Invalid unicode escape"); + } + state.pos = start; + } + + return false + }; + function isValidUnicode(ch) { + return ch >= 0 && ch <= 0x10FFFF + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape + pp$1.regexp_eatIdentityEscape = function(state) { + if (state.switchU) { + if (this.regexp_eatSyntaxCharacter(state)) { + return true + } + if (state.eat(0x2F /* / */)) { + state.lastIntValue = 0x2F; /* / */ + return true + } + return false + } + + var ch = state.current(); + if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) { + state.lastIntValue = ch; + state.advance(); + return true + } + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape + pp$1.regexp_eatDecimalEscape = function(state) { + state.lastIntValue = 0; + var ch = state.current(); + if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) { + do { + state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + state.advance(); + } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) + return true + } + return false + }; + + // Return values used by character set parsing methods, needed to + // forbid negation of sets that can match strings. + var CharSetNone = 0; // Nothing parsed + var CharSetOk = 1; // Construct parsed, cannot contain strings + var CharSetString = 2; // Construct parsed, can contain strings + + // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape + pp$1.regexp_eatCharacterClassEscape = function(state) { + var ch = state.current(); + + if (isCharacterClassEscape(ch)) { + state.lastIntValue = -1; + state.advance(); + return CharSetOk + } + + var negate = false; + if ( + state.switchU && + this.options.ecmaVersion >= 9 && + ((negate = ch === 0x50 /* P */) || ch === 0x70 /* p */) + ) { + state.lastIntValue = -1; + state.advance(); + var result; + if ( + state.eat(0x7B /* { */) && + (result = this.regexp_eatUnicodePropertyValueExpression(state)) && + state.eat(0x7D /* } */) + ) { + if (negate && result === CharSetString) { state.raise("Invalid property name"); } + return result + } + state.raise("Invalid property name"); + } + + return CharSetNone + }; + + function isCharacterClassEscape(ch) { + return ( + ch === 0x64 /* d */ || + ch === 0x44 /* D */ || + ch === 0x73 /* s */ || + ch === 0x53 /* S */ || + ch === 0x77 /* w */ || + ch === 0x57 /* W */ + ) + } + + // UnicodePropertyValueExpression :: + // UnicodePropertyName `=` UnicodePropertyValue + // LoneUnicodePropertyNameOrValue + pp$1.regexp_eatUnicodePropertyValueExpression = function(state) { + var start = state.pos; + + // UnicodePropertyName `=` UnicodePropertyValue + if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) { + var name = state.lastStringValue; + if (this.regexp_eatUnicodePropertyValue(state)) { + var value = state.lastStringValue; + this.regexp_validateUnicodePropertyNameAndValue(state, name, value); + return CharSetOk + } + } + state.pos = start; + + // LoneUnicodePropertyNameOrValue + if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { + var nameOrValue = state.lastStringValue; + return this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue) + } + return CharSetNone + }; + + pp$1.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) { + if (!hasOwn(state.unicodeProperties.nonBinary, name)) + { state.raise("Invalid property name"); } + if (!state.unicodeProperties.nonBinary[name].test(value)) + { state.raise("Invalid property value"); } + }; + + pp$1.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { + if (state.unicodeProperties.binary.test(nameOrValue)) { return CharSetOk } + if (state.switchV && state.unicodeProperties.binaryOfStrings.test(nameOrValue)) { return CharSetString } + state.raise("Invalid property name"); + }; + + // UnicodePropertyName :: + // UnicodePropertyNameCharacters + pp$1.regexp_eatUnicodePropertyName = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyNameCharacter(ch = state.current())) { + state.lastStringValue += codePointToString(ch); + state.advance(); + } + return state.lastStringValue !== "" + }; + + function isUnicodePropertyNameCharacter(ch) { + return isControlLetter(ch) || ch === 0x5F /* _ */ + } + + // UnicodePropertyValue :: + // UnicodePropertyValueCharacters + pp$1.regexp_eatUnicodePropertyValue = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyValueCharacter(ch = state.current())) { + state.lastStringValue += codePointToString(ch); + state.advance(); + } + return state.lastStringValue !== "" + }; + function isUnicodePropertyValueCharacter(ch) { + return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch) + } + + // LoneUnicodePropertyNameOrValue :: + // UnicodePropertyValueCharacters + pp$1.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { + return this.regexp_eatUnicodePropertyValue(state) + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass + pp$1.regexp_eatCharacterClass = function(state) { + if (state.eat(0x5B /* [ */)) { + var negate = state.eat(0x5E /* ^ */); + var result = this.regexp_classContents(state); + if (!state.eat(0x5D /* ] */)) + { state.raise("Unterminated character class"); } + if (negate && result === CharSetString) + { state.raise("Negated character class may contain strings"); } + return true + } + return false + }; + + // https://tc39.es/ecma262/#prod-ClassContents + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges + pp$1.regexp_classContents = function(state) { + if (state.current() === 0x5D /* ] */) { return CharSetOk } + if (state.switchV) { return this.regexp_classSetExpression(state) } + this.regexp_nonEmptyClassRanges(state); + return CharSetOk + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges + // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash + pp$1.regexp_nonEmptyClassRanges = function(state) { + while (this.regexp_eatClassAtom(state)) { + var left = state.lastIntValue; + if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) { + var right = state.lastIntValue; + if (state.switchU && (left === -1 || right === -1)) { + state.raise("Invalid character class"); + } + if (left !== -1 && right !== -1 && left > right) { + state.raise("Range out of order in character class"); + } + } + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash + pp$1.regexp_eatClassAtom = function(state) { + var start = state.pos; + + if (state.eat(0x5C /* \ */)) { + if (this.regexp_eatClassEscape(state)) { + return true + } + if (state.switchU) { + // Make the same message as V8. + var ch$1 = state.current(); + if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) { + state.raise("Invalid class escape"); + } + state.raise("Invalid escape"); + } + state.pos = start; + } + + var ch = state.current(); + if (ch !== 0x5D /* ] */) { + state.lastIntValue = ch; + state.advance(); + return true + } + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape + pp$1.regexp_eatClassEscape = function(state) { + var start = state.pos; + + if (state.eat(0x62 /* b */)) { + state.lastIntValue = 0x08; /* */ + return true + } + + if (state.switchU && state.eat(0x2D /* - */)) { + state.lastIntValue = 0x2D; /* - */ + return true + } + + if (!state.switchU && state.eat(0x63 /* c */)) { + if (this.regexp_eatClassControlLetter(state)) { + return true + } + state.pos = start; + } + + return ( + this.regexp_eatCharacterClassEscape(state) || + this.regexp_eatCharacterEscape(state) + ) + }; + + // https://tc39.es/ecma262/#prod-ClassSetExpression + // https://tc39.es/ecma262/#prod-ClassUnion + // https://tc39.es/ecma262/#prod-ClassIntersection + // https://tc39.es/ecma262/#prod-ClassSubtraction + pp$1.regexp_classSetExpression = function(state) { + var result = CharSetOk, subResult; + if (this.regexp_eatClassSetRange(state)) ; else if (subResult = this.regexp_eatClassSetOperand(state)) { + if (subResult === CharSetString) { result = CharSetString; } + // https://tc39.es/ecma262/#prod-ClassIntersection + var start = state.pos; + while (state.eatChars([0x26, 0x26] /* && */)) { + if ( + state.current() !== 0x26 /* & */ && + (subResult = this.regexp_eatClassSetOperand(state)) + ) { + if (subResult !== CharSetString) { result = CharSetOk; } + continue + } + state.raise("Invalid character in character class"); + } + if (start !== state.pos) { return result } + // https://tc39.es/ecma262/#prod-ClassSubtraction + while (state.eatChars([0x2D, 0x2D] /* -- */)) { + if (this.regexp_eatClassSetOperand(state)) { continue } + state.raise("Invalid character in character class"); + } + if (start !== state.pos) { return result } + } else { + state.raise("Invalid character in character class"); + } + // https://tc39.es/ecma262/#prod-ClassUnion + for (;;) { + if (this.regexp_eatClassSetRange(state)) { continue } + subResult = this.regexp_eatClassSetOperand(state); + if (!subResult) { return result } + if (subResult === CharSetString) { result = CharSetString; } + } + }; + + // https://tc39.es/ecma262/#prod-ClassSetRange + pp$1.regexp_eatClassSetRange = function(state) { + var start = state.pos; + if (this.regexp_eatClassSetCharacter(state)) { + var left = state.lastIntValue; + if (state.eat(0x2D /* - */) && this.regexp_eatClassSetCharacter(state)) { + var right = state.lastIntValue; + if (left !== -1 && right !== -1 && left > right) { + state.raise("Range out of order in character class"); + } + return true + } + state.pos = start; + } + return false + }; + + // https://tc39.es/ecma262/#prod-ClassSetOperand + pp$1.regexp_eatClassSetOperand = function(state) { + if (this.regexp_eatClassSetCharacter(state)) { return CharSetOk } + return this.regexp_eatClassStringDisjunction(state) || this.regexp_eatNestedClass(state) + }; + + // https://tc39.es/ecma262/#prod-NestedClass + pp$1.regexp_eatNestedClass = function(state) { + var start = state.pos; + if (state.eat(0x5B /* [ */)) { + var negate = state.eat(0x5E /* ^ */); + var result = this.regexp_classContents(state); + if (state.eat(0x5D /* ] */)) { + if (negate && result === CharSetString) { + state.raise("Negated character class may contain strings"); + } + return result + } + state.pos = start; + } + if (state.eat(0x5C /* \ */)) { + var result$1 = this.regexp_eatCharacterClassEscape(state); + if (result$1) { + return result$1 + } + state.pos = start; + } + return null + }; + + // https://tc39.es/ecma262/#prod-ClassStringDisjunction + pp$1.regexp_eatClassStringDisjunction = function(state) { + var start = state.pos; + if (state.eatChars([0x5C, 0x71] /* \q */)) { + if (state.eat(0x7B /* { */)) { + var result = this.regexp_classStringDisjunctionContents(state); + if (state.eat(0x7D /* } */)) { + return result + } + } else { + // Make the same message as V8. + state.raise("Invalid escape"); + } + state.pos = start; + } + return null + }; + + // https://tc39.es/ecma262/#prod-ClassStringDisjunctionContents + pp$1.regexp_classStringDisjunctionContents = function(state) { + var result = this.regexp_classString(state); + while (state.eat(0x7C /* | */)) { + if (this.regexp_classString(state) === CharSetString) { result = CharSetString; } + } + return result + }; + + // https://tc39.es/ecma262/#prod-ClassString + // https://tc39.es/ecma262/#prod-NonEmptyClassString + pp$1.regexp_classString = function(state) { + var count = 0; + while (this.regexp_eatClassSetCharacter(state)) { count++; } + return count === 1 ? CharSetOk : CharSetString + }; + + // https://tc39.es/ecma262/#prod-ClassSetCharacter + pp$1.regexp_eatClassSetCharacter = function(state) { + var start = state.pos; + if (state.eat(0x5C /* \ */)) { + if ( + this.regexp_eatCharacterEscape(state) || + this.regexp_eatClassSetReservedPunctuator(state) + ) { + return true + } + if (state.eat(0x62 /* b */)) { + state.lastIntValue = 0x08; /* */ + return true + } + state.pos = start; + return false + } + var ch = state.current(); + if (ch < 0 || ch === state.lookahead() && isClassSetReservedDoublePunctuatorCharacter(ch)) { return false } + if (isClassSetSyntaxCharacter(ch)) { return false } + state.advance(); + state.lastIntValue = ch; + return true + }; + + // https://tc39.es/ecma262/#prod-ClassSetReservedDoublePunctuator + function isClassSetReservedDoublePunctuatorCharacter(ch) { + return ( + ch === 0x21 /* ! */ || + ch >= 0x23 /* # */ && ch <= 0x26 /* & */ || + ch >= 0x2A /* * */ && ch <= 0x2C /* , */ || + ch === 0x2E /* . */ || + ch >= 0x3A /* : */ && ch <= 0x40 /* @ */ || + ch === 0x5E /* ^ */ || + ch === 0x60 /* ` */ || + ch === 0x7E /* ~ */ + ) + } + + // https://tc39.es/ecma262/#prod-ClassSetSyntaxCharacter + function isClassSetSyntaxCharacter(ch) { + return ( + ch === 0x28 /* ( */ || + ch === 0x29 /* ) */ || + ch === 0x2D /* - */ || + ch === 0x2F /* / */ || + ch >= 0x5B /* [ */ && ch <= 0x5D /* ] */ || + ch >= 0x7B /* { */ && ch <= 0x7D /* } */ + ) + } + + // https://tc39.es/ecma262/#prod-ClassSetReservedPunctuator + pp$1.regexp_eatClassSetReservedPunctuator = function(state) { + var ch = state.current(); + if (isClassSetReservedPunctuator(ch)) { + state.lastIntValue = ch; + state.advance(); + return true + } + return false + }; + + // https://tc39.es/ecma262/#prod-ClassSetReservedPunctuator + function isClassSetReservedPunctuator(ch) { + return ( + ch === 0x21 /* ! */ || + ch === 0x23 /* # */ || + ch === 0x25 /* % */ || + ch === 0x26 /* & */ || + ch === 0x2C /* , */ || + ch === 0x2D /* - */ || + ch >= 0x3A /* : */ && ch <= 0x3E /* > */ || + ch === 0x40 /* @ */ || + ch === 0x60 /* ` */ || + ch === 0x7E /* ~ */ + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter + pp$1.regexp_eatClassControlLetter = function(state) { + var ch = state.current(); + if (isDecimalDigit(ch) || ch === 0x5F /* _ */) { + state.lastIntValue = ch % 0x20; + state.advance(); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence + pp$1.regexp_eatHexEscapeSequence = function(state) { + var start = state.pos; + if (state.eat(0x78 /* x */)) { + if (this.regexp_eatFixedHexDigits(state, 2)) { + return true + } + if (state.switchU) { + state.raise("Invalid escape"); + } + state.pos = start; + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits + pp$1.regexp_eatDecimalDigits = function(state) { + var start = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isDecimalDigit(ch = state.current())) { + state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + state.advance(); + } + return state.pos !== start + }; + function isDecimalDigit(ch) { + return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits + pp$1.regexp_eatHexDigits = function(state) { + var start = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isHexDigit(ch = state.current())) { + state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); + state.advance(); + } + return state.pos !== start + }; + function isHexDigit(ch) { + return ( + (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) || + (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) || + (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) + ) + } + function hexToInt(ch) { + if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) { + return 10 + (ch - 0x41 /* A */) + } + if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) { + return 10 + (ch - 0x61 /* a */) + } + return ch - 0x30 /* 0 */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence + // Allows only 0-377(octal) i.e. 0-255(decimal). + pp$1.regexp_eatLegacyOctalEscapeSequence = function(state) { + if (this.regexp_eatOctalDigit(state)) { + var n1 = state.lastIntValue; + if (this.regexp_eatOctalDigit(state)) { + var n2 = state.lastIntValue; + if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { + state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; + } else { + state.lastIntValue = n1 * 8 + n2; + } + } else { + state.lastIntValue = n1; + } + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit + pp$1.regexp_eatOctalDigit = function(state) { + var ch = state.current(); + if (isOctalDigit(ch)) { + state.lastIntValue = ch - 0x30; /* 0 */ + state.advance(); + return true + } + state.lastIntValue = 0; + return false + }; + function isOctalDigit(ch) { + return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit + // And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence + pp$1.regexp_eatFixedHexDigits = function(state, length) { + var start = state.pos; + state.lastIntValue = 0; + for (var i = 0; i < length; ++i) { + var ch = state.current(); + if (!isHexDigit(ch)) { + state.pos = start; + return false + } + state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); + state.advance(); + } + return true + }; + + // Object type used to represent tokens. Note that normally, tokens + // simply exist as properties on the parser object. This is only + // used for the onToken callback and the external tokenizer. + + var Token = function Token(p) { + this.type = p.type; + this.value = p.value; + this.start = p.start; + this.end = p.end; + if (p.options.locations) + { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } + if (p.options.ranges) + { this.range = [p.start, p.end]; } + }; + + // ## Tokenizer + + var pp = Parser.prototype; + + // Move to the next token + + pp.next = function(ignoreEscapeSequenceInKeyword) { + if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc) + { this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword); } + if (this.options.onToken) + { this.options.onToken(new Token(this)); } + + this.lastTokEnd = this.end; + this.lastTokStart = this.start; + this.lastTokEndLoc = this.endLoc; + this.lastTokStartLoc = this.startLoc; + this.nextToken(); + }; + + pp.getToken = function() { + this.next(); + return new Token(this) + }; + + // If we're in an ES6 environment, make parsers iterable + if (typeof Symbol !== "undefined") + { pp[Symbol.iterator] = function() { + var this$1$1 = this; + + return { + next: function () { + var token = this$1$1.getToken(); + return { + done: token.type === types$1.eof, + value: token + } + } + } + }; } + + // Toggle strict mode. Re-reads the next number or string to please + // pedantic tests (`"use strict"; 010;` should fail). + + // Read a single token, updating the parser object's token-related + // properties. + + pp.nextToken = function() { + var curContext = this.curContext(); + if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } + + this.start = this.pos; + if (this.options.locations) { this.startLoc = this.curPosition(); } + if (this.pos >= this.input.length) { return this.finishToken(types$1.eof) } + + if (curContext.override) { return curContext.override(this) } + else { this.readToken(this.fullCharCodeAtPos()); } + }; + + pp.readToken = function(code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) + { return this.readWord() } + + return this.getTokenFromCode(code) + }; + + pp.fullCharCodeAtPos = function() { + var code = this.input.charCodeAt(this.pos); + if (code <= 0xd7ff || code >= 0xdc00) { return code } + var next = this.input.charCodeAt(this.pos + 1); + return next <= 0xdbff || next >= 0xe000 ? code : (code << 10) + next - 0x35fdc00 + }; + + pp.skipBlockComment = function() { + var startLoc = this.options.onComment && this.curPosition(); + var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); + if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); } + this.pos = end + 2; + if (this.options.locations) { + for (var nextBreak = (void 0), pos = start; (nextBreak = nextLineBreak(this.input, pos, this.pos)) > -1;) { + ++this.curLine; + pos = this.lineStart = nextBreak; + } + } + if (this.options.onComment) + { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, + startLoc, this.curPosition()); } + }; + + pp.skipLineComment = function(startSkip) { + var start = this.pos; + var startLoc = this.options.onComment && this.curPosition(); + var ch = this.input.charCodeAt(this.pos += startSkip); + while (this.pos < this.input.length && !isNewLine(ch)) { + ch = this.input.charCodeAt(++this.pos); + } + if (this.options.onComment) + { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, + startLoc, this.curPosition()); } + }; + + // Called at the start of the parse and after every token. Skips + // whitespace and comments, and. + + pp.skipSpace = function() { + loop: while (this.pos < this.input.length) { + var ch = this.input.charCodeAt(this.pos); + switch (ch) { + case 32: case 160: // ' ' + ++this.pos; + break + case 13: + if (this.input.charCodeAt(this.pos + 1) === 10) { + ++this.pos; + } + case 10: case 8232: case 8233: + ++this.pos; + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + break + case 47: // '/' + switch (this.input.charCodeAt(this.pos + 1)) { + case 42: // '*' + this.skipBlockComment(); + break + case 47: + this.skipLineComment(2); + break + default: + break loop + } + break + default: + if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this.pos; + } else { + break loop + } + } + } + }; + + // Called at the end of every token. Sets `end`, `val`, and + // maintains `context` and `exprAllowed`, and skips the space after + // the token, so that the next one's `start` will point at the + // right position. + + pp.finishToken = function(type, val) { + this.end = this.pos; + if (this.options.locations) { this.endLoc = this.curPosition(); } + var prevType = this.type; + this.type = type; + this.value = val; + + this.updateContext(prevType); + }; + + // ### Token reading + + // This is the function that is called to fetch the next token. It + // is somewhat obscure, because it works in character codes rather + // than characters, and because operator parsing has been inlined + // into it. + // + // All in the name of speed. + // + pp.readToken_dot = function() { + var next = this.input.charCodeAt(this.pos + 1); + if (next >= 48 && next <= 57) { return this.readNumber(true) } + var next2 = this.input.charCodeAt(this.pos + 2); + if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' + this.pos += 3; + return this.finishToken(types$1.ellipsis) + } else { + ++this.pos; + return this.finishToken(types$1.dot) + } + }; + + pp.readToken_slash = function() { // '/' + var next = this.input.charCodeAt(this.pos + 1); + if (this.exprAllowed) { ++this.pos; return this.readRegexp() } + if (next === 61) { return this.finishOp(types$1.assign, 2) } + return this.finishOp(types$1.slash, 1) + }; + + pp.readToken_mult_modulo_exp = function(code) { // '%*' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + var tokentype = code === 42 ? types$1.star : types$1.modulo; + + // exponentiation operator ** and **= + if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) { + ++size; + tokentype = types$1.starstar; + next = this.input.charCodeAt(this.pos + 2); + } + + if (next === 61) { return this.finishOp(types$1.assign, size + 1) } + return this.finishOp(tokentype, size) + }; + + pp.readToken_pipe_amp = function(code) { // '|&' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { + if (this.options.ecmaVersion >= 12) { + var next2 = this.input.charCodeAt(this.pos + 2); + if (next2 === 61) { return this.finishOp(types$1.assign, 3) } + } + return this.finishOp(code === 124 ? types$1.logicalOR : types$1.logicalAND, 2) + } + if (next === 61) { return this.finishOp(types$1.assign, 2) } + return this.finishOp(code === 124 ? types$1.bitwiseOR : types$1.bitwiseAND, 1) + }; + + pp.readToken_caret = function() { // '^' + var next = this.input.charCodeAt(this.pos + 1); + if (next === 61) { return this.finishOp(types$1.assign, 2) } + return this.finishOp(types$1.bitwiseXOR, 1) + }; + + pp.readToken_plus_min = function(code) { // '+-' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { + if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && + (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { + // A `-->` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken() + } + return this.finishOp(types$1.incDec, 2) + } + if (next === 61) { return this.finishOp(types$1.assign, 2) } + return this.finishOp(types$1.plusMin, 1) + }; + + pp.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types$1.assign, size + 1) } + return this.finishOp(types$1.bitShift, size) + } + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { + // `` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken() + } + return this.finishOp(types$1.incDec, 2) + } + if (next === 61) { return this.finishOp(types$1.assign, 2) } + return this.finishOp(types$1.plusMin, 1) +}; + +pp.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types$1.assign, size + 1) } + return this.finishOp(types$1.bitShift, size) + } + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { + // ` + +[npm-version-src]: https://img.shields.io/npm/v/defu?style=flat&colorA=18181B&colorB=F0DB4F +[npm-version-href]: https://npmjs.com/package/defu +[npm-downloads-src]: https://img.shields.io/npm/dm/defu?style=flat&colorA=18181B&colorB=F0DB4F +[npm-downloads-href]: https://npmjs.com/package/defu +[codecov-src]: https://img.shields.io/codecov/c/gh/unjs/defu/main?style=flat&colorA=18181B&colorB=F0DB4F +[codecov-href]: https://codecov.io/gh/unjs/defu +[bundle-src]: https://img.shields.io/bundlephobia/minzip/defu?style=flat&colorA=18181B&colorB=F0DB4F +[bundle-href]: https://bundlephobia.com/result?p=defu +[license-src]: https://img.shields.io/github/license/unjs/defu.svg?style=flat&colorA=18181B&colorB=F0DB4F +[license-href]: https://github.com/unjs/defu/blob/main/LICENSE diff --git a/node_modules/defu/dist/defu.cjs b/node_modules/defu/dist/defu.cjs new file mode 100644 index 0000000..72b30c4 --- /dev/null +++ b/node_modules/defu/dist/defu.cjs @@ -0,0 +1,77 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function isPlainObject(value) { + if (value === null || typeof value !== "object") { + return false; + } + const prototype = Object.getPrototypeOf(value); + if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) { + return false; + } + if (Symbol.iterator in value) { + return false; + } + if (Symbol.toStringTag in value) { + return Object.prototype.toString.call(value) === "[object Module]"; + } + return true; +} + +function _defu(baseObject, defaults, namespace = ".", merger) { + if (!isPlainObject(defaults)) { + return _defu(baseObject, {}, namespace, merger); + } + const object = Object.assign({}, defaults); + for (const key in baseObject) { + if (key === "__proto__" || key === "constructor") { + continue; + } + const value = baseObject[key]; + if (value === null || value === void 0) { + continue; + } + if (merger && merger(object, key, value, namespace)) { + continue; + } + if (Array.isArray(value) && Array.isArray(object[key])) { + object[key] = [...value, ...object[key]]; + } else if (isPlainObject(value) && isPlainObject(object[key])) { + object[key] = _defu( + value, + object[key], + (namespace ? `${namespace}.` : "") + key.toString(), + merger + ); + } else { + object[key] = value; + } + } + return object; +} +function createDefu(merger) { + return (...arguments_) => ( + // eslint-disable-next-line unicorn/no-array-reduce + arguments_.reduce((p, c) => _defu(p, c, "", merger), {}) + ); +} +const defu = createDefu(); +const defuFn = createDefu((object, key, currentValue) => { + if (object[key] !== void 0 && typeof currentValue === "function") { + object[key] = currentValue(object[key]); + return true; + } +}); +const defuArrayFn = createDefu((object, key, currentValue) => { + if (Array.isArray(object[key]) && typeof currentValue === "function") { + object[key] = currentValue(object[key]); + return true; + } +}); + +exports.createDefu = createDefu; +exports.default = defu; +exports.defu = defu; +exports.defuArrayFn = defuArrayFn; +exports.defuFn = defuFn; diff --git a/node_modules/defu/dist/defu.d.cts b/node_modules/defu/dist/defu.d.cts new file mode 100644 index 0000000..4a17b83 --- /dev/null +++ b/node_modules/defu/dist/defu.d.cts @@ -0,0 +1,25 @@ +type Input = Record; +type IgnoredInput = boolean | number | null | any[] | Record | undefined; +type Merger = (object: T, key: keyof T, value: T[K], namespace: string) => any; +type nullish = null | undefined | void; +type MergeObjects = Destination extends Defaults ? Destination : Omit & Omit & { + -readonly [Key in keyof Destination & keyof Defaults]: Destination[Key] extends nullish ? Defaults[Key] extends nullish ? nullish : Defaults[Key] : Defaults[Key] extends nullish ? Destination[Key] : Merge; +}; +type Defu> = D extends [infer F, ...infer Rest] ? F extends Input ? Rest extends Array ? Defu, Rest> : MergeObjects : F extends IgnoredInput ? Rest extends Array ? Defu : S : S : S; +type DefuFn = >(source: Source, ...defaults: Defaults) => Defu; +interface DefuInstance { + >(source: Source | IgnoredInput, ...defaults: Defaults): Defu; + fn: DefuFn; + arrayFn: DefuFn; + extend(merger?: Merger): DefuFn; +} +type MergeArrays = Destination extends Array ? Source extends Array ? Array : Source | Array : Source | Destination; +type Merge = Destination extends nullish ? Defaults extends nullish ? nullish : Defaults : Defaults extends nullish ? Destination : Destination extends Array ? Defaults extends Array ? MergeArrays : Destination | Defaults : Destination extends Function ? Destination | Defaults : Destination extends RegExp ? Destination | Defaults : Destination extends Promise ? Destination | Defaults : Defaults extends Function ? Destination | Defaults : Defaults extends RegExp ? Destination | Defaults : Defaults extends Promise ? Destination | Defaults : Destination extends Input ? Defaults extends Input ? MergeObjects : Destination | Defaults : Destination | Defaults; + +declare function createDefu(merger?: Merger): DefuFn; +declare const defu: DefuInstance; + +declare const defuFn: DefuFn; +declare const defuArrayFn: DefuFn; + +export { type Defu, createDefu, defu as default, defu, defuArrayFn, defuFn }; diff --git a/node_modules/defu/dist/defu.d.mts b/node_modules/defu/dist/defu.d.mts new file mode 100644 index 0000000..4a17b83 --- /dev/null +++ b/node_modules/defu/dist/defu.d.mts @@ -0,0 +1,25 @@ +type Input = Record; +type IgnoredInput = boolean | number | null | any[] | Record | undefined; +type Merger = (object: T, key: keyof T, value: T[K], namespace: string) => any; +type nullish = null | undefined | void; +type MergeObjects = Destination extends Defaults ? Destination : Omit & Omit & { + -readonly [Key in keyof Destination & keyof Defaults]: Destination[Key] extends nullish ? Defaults[Key] extends nullish ? nullish : Defaults[Key] : Defaults[Key] extends nullish ? Destination[Key] : Merge; +}; +type Defu> = D extends [infer F, ...infer Rest] ? F extends Input ? Rest extends Array ? Defu, Rest> : MergeObjects : F extends IgnoredInput ? Rest extends Array ? Defu : S : S : S; +type DefuFn = >(source: Source, ...defaults: Defaults) => Defu; +interface DefuInstance { + >(source: Source | IgnoredInput, ...defaults: Defaults): Defu; + fn: DefuFn; + arrayFn: DefuFn; + extend(merger?: Merger): DefuFn; +} +type MergeArrays = Destination extends Array ? Source extends Array ? Array : Source | Array : Source | Destination; +type Merge = Destination extends nullish ? Defaults extends nullish ? nullish : Defaults : Defaults extends nullish ? Destination : Destination extends Array ? Defaults extends Array ? MergeArrays : Destination | Defaults : Destination extends Function ? Destination | Defaults : Destination extends RegExp ? Destination | Defaults : Destination extends Promise ? Destination | Defaults : Defaults extends Function ? Destination | Defaults : Defaults extends RegExp ? Destination | Defaults : Defaults extends Promise ? Destination | Defaults : Destination extends Input ? Defaults extends Input ? MergeObjects : Destination | Defaults : Destination | Defaults; + +declare function createDefu(merger?: Merger): DefuFn; +declare const defu: DefuInstance; + +declare const defuFn: DefuFn; +declare const defuArrayFn: DefuFn; + +export { type Defu, createDefu, defu as default, defu, defuArrayFn, defuFn }; diff --git a/node_modules/defu/dist/defu.d.ts b/node_modules/defu/dist/defu.d.ts new file mode 100644 index 0000000..4a17b83 --- /dev/null +++ b/node_modules/defu/dist/defu.d.ts @@ -0,0 +1,25 @@ +type Input = Record; +type IgnoredInput = boolean | number | null | any[] | Record | undefined; +type Merger = (object: T, key: keyof T, value: T[K], namespace: string) => any; +type nullish = null | undefined | void; +type MergeObjects = Destination extends Defaults ? Destination : Omit & Omit & { + -readonly [Key in keyof Destination & keyof Defaults]: Destination[Key] extends nullish ? Defaults[Key] extends nullish ? nullish : Defaults[Key] : Defaults[Key] extends nullish ? Destination[Key] : Merge; +}; +type Defu> = D extends [infer F, ...infer Rest] ? F extends Input ? Rest extends Array ? Defu, Rest> : MergeObjects : F extends IgnoredInput ? Rest extends Array ? Defu : S : S : S; +type DefuFn = >(source: Source, ...defaults: Defaults) => Defu; +interface DefuInstance { + >(source: Source | IgnoredInput, ...defaults: Defaults): Defu; + fn: DefuFn; + arrayFn: DefuFn; + extend(merger?: Merger): DefuFn; +} +type MergeArrays = Destination extends Array ? Source extends Array ? Array : Source | Array : Source | Destination; +type Merge = Destination extends nullish ? Defaults extends nullish ? nullish : Defaults : Defaults extends nullish ? Destination : Destination extends Array ? Defaults extends Array ? MergeArrays : Destination | Defaults : Destination extends Function ? Destination | Defaults : Destination extends RegExp ? Destination | Defaults : Destination extends Promise ? Destination | Defaults : Defaults extends Function ? Destination | Defaults : Defaults extends RegExp ? Destination | Defaults : Defaults extends Promise ? Destination | Defaults : Destination extends Input ? Defaults extends Input ? MergeObjects : Destination | Defaults : Destination | Defaults; + +declare function createDefu(merger?: Merger): DefuFn; +declare const defu: DefuInstance; + +declare const defuFn: DefuFn; +declare const defuArrayFn: DefuFn; + +export { type Defu, createDefu, defu as default, defu, defuArrayFn, defuFn }; diff --git a/node_modules/defu/dist/defu.mjs b/node_modules/defu/dist/defu.mjs new file mode 100644 index 0000000..889b83a --- /dev/null +++ b/node_modules/defu/dist/defu.mjs @@ -0,0 +1,69 @@ +function isPlainObject(value) { + if (value === null || typeof value !== "object") { + return false; + } + const prototype = Object.getPrototypeOf(value); + if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) { + return false; + } + if (Symbol.iterator in value) { + return false; + } + if (Symbol.toStringTag in value) { + return Object.prototype.toString.call(value) === "[object Module]"; + } + return true; +} + +function _defu(baseObject, defaults, namespace = ".", merger) { + if (!isPlainObject(defaults)) { + return _defu(baseObject, {}, namespace, merger); + } + const object = Object.assign({}, defaults); + for (const key in baseObject) { + if (key === "__proto__" || key === "constructor") { + continue; + } + const value = baseObject[key]; + if (value === null || value === void 0) { + continue; + } + if (merger && merger(object, key, value, namespace)) { + continue; + } + if (Array.isArray(value) && Array.isArray(object[key])) { + object[key] = [...value, ...object[key]]; + } else if (isPlainObject(value) && isPlainObject(object[key])) { + object[key] = _defu( + value, + object[key], + (namespace ? `${namespace}.` : "") + key.toString(), + merger + ); + } else { + object[key] = value; + } + } + return object; +} +function createDefu(merger) { + return (...arguments_) => ( + // eslint-disable-next-line unicorn/no-array-reduce + arguments_.reduce((p, c) => _defu(p, c, "", merger), {}) + ); +} +const defu = createDefu(); +const defuFn = createDefu((object, key, currentValue) => { + if (object[key] !== void 0 && typeof currentValue === "function") { + object[key] = currentValue(object[key]); + return true; + } +}); +const defuArrayFn = createDefu((object, key, currentValue) => { + if (Array.isArray(object[key]) && typeof currentValue === "function") { + object[key] = currentValue(object[key]); + return true; + } +}); + +export { createDefu, defu as default, defu, defuArrayFn, defuFn }; diff --git a/node_modules/defu/lib/defu.cjs b/node_modules/defu/lib/defu.cjs new file mode 100644 index 0000000..5212929 --- /dev/null +++ b/node_modules/defu/lib/defu.cjs @@ -0,0 +1,11 @@ +const { defu, createDefu, defuFn, defuArrayFn } = require('../dist/defu.cjs'); + +module.exports = defu; + +module.exports.defu = defu; +module.exports.default = defu; + +module.exports.createDefu = createDefu; +module.exports.defuFn = defuFn; +module.exports.defuArrayFn = defuArrayFn; + diff --git a/node_modules/defu/package.json b/node_modules/defu/package.json new file mode 100644 index 0000000..ce8db25 --- /dev/null +++ b/node_modules/defu/package.json @@ -0,0 +1,43 @@ +{ + "name": "defu", + "version": "6.1.4", + "description": "Recursively assign default properties. Lightweight and Fast!", + "repository": "unjs/defu", + "license": "MIT", + "exports": { + ".": { + "types": "./dist/defu.d.ts", + "import": "./dist/defu.mjs", + "require": "./lib/defu.cjs" + } + }, + "main": "./lib/defu.cjs", + "module": "./dist/defu.mjs", + "types": "./dist/defu.d.ts", + "files": [ + "dist", + "lib" + ], + "devDependencies": { + "@types/node": "^20.10.6", + "@vitest/coverage-v8": "^1.1.3", + "changelogen": "^0.5.5", + "eslint": "^8.56.0", + "eslint-config-unjs": "^0.2.1", + "expect-type": "^0.17.3", + "prettier": "^3.1.1", + "typescript": "^5.3.3", + "unbuild": "^2.0.0", + "vitest": "^1.1.3" + }, + "packageManager": "pnpm@8.10.2", + "scripts": { + "build": "unbuild", + "dev": "vitest", + "lint": "eslint --ext .ts src && prettier -c src test", + "lint:fix": "eslint --ext .ts src --fix && prettier -w src test", + "release": "pnpm test && changelogen --release && git push --follow-tags && pnpm publish", + "test": "pnpm lint && pnpm vitest run", + "test:types": "tsc --noEmit" + } +} \ No newline at end of file diff --git a/node_modules/depd/History.md b/node_modules/depd/History.md new file mode 100644 index 0000000..cd9ebaa --- /dev/null +++ b/node_modules/depd/History.md @@ -0,0 +1,103 @@ +2.0.0 / 2018-10-26 +================== + + * Drop support for Node.js 0.6 + * Replace internal `eval` usage with `Function` constructor + * Use instance methods on `process` to check for listeners + +1.1.2 / 2018-01-11 +================== + + * perf: remove argument reassignment + * Support Node.js 0.6 to 9.x + +1.1.1 / 2017-07-27 +================== + + * Remove unnecessary `Buffer` loading + * Support Node.js 0.6 to 8.x + +1.1.0 / 2015-09-14 +================== + + * Enable strict mode in more places + * Support io.js 3.x + * Support io.js 2.x + * Support web browser loading + - Requires bundler like Browserify or webpack + +1.0.1 / 2015-04-07 +================== + + * Fix `TypeError`s when under `'use strict'` code + * Fix useless type name on auto-generated messages + * Support io.js 1.x + * Support Node.js 0.12 + +1.0.0 / 2014-09-17 +================== + + * No changes + +0.4.5 / 2014-09-09 +================== + + * Improve call speed to functions using the function wrapper + * Support Node.js 0.6 + +0.4.4 / 2014-07-27 +================== + + * Work-around v8 generating empty stack traces + +0.4.3 / 2014-07-26 +================== + + * Fix exception when global `Error.stackTraceLimit` is too low + +0.4.2 / 2014-07-19 +================== + + * Correct call site for wrapped functions and properties + +0.4.1 / 2014-07-19 +================== + + * Improve automatic message generation for function properties + +0.4.0 / 2014-07-19 +================== + + * Add `TRACE_DEPRECATION` environment variable + * Remove non-standard grey color from color output + * Support `--no-deprecation` argument + * Support `--trace-deprecation` argument + * Support `deprecate.property(fn, prop, message)` + +0.3.0 / 2014-06-16 +================== + + * Add `NO_DEPRECATION` environment variable + +0.2.0 / 2014-06-15 +================== + + * Add `deprecate.property(obj, prop, message)` + * Remove `supports-color` dependency for node.js 0.8 + +0.1.0 / 2014-06-15 +================== + + * Add `deprecate.function(fn, message)` + * Add `process.on('deprecation', fn)` emitter + * Automatically generate message when omitted from `deprecate()` + +0.0.1 / 2014-06-15 +================== + + * Fix warning for dynamic calls at singe call site + +0.0.0 / 2014-06-15 +================== + + * Initial implementation diff --git a/node_modules/depd/LICENSE b/node_modules/depd/LICENSE new file mode 100644 index 0000000..248de7a --- /dev/null +++ b/node_modules/depd/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014-2018 Douglas Christopher Wilson + +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. diff --git a/node_modules/depd/Readme.md b/node_modules/depd/Readme.md new file mode 100644 index 0000000..043d1ca --- /dev/null +++ b/node_modules/depd/Readme.md @@ -0,0 +1,280 @@ +# depd + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Linux Build][travis-image]][travis-url] +[![Windows Build][appveyor-image]][appveyor-url] +[![Coverage Status][coveralls-image]][coveralls-url] + +Deprecate all the things + +> With great modules comes great responsibility; mark things deprecated! + +## Install + +This module is installed directly using `npm`: + +```sh +$ npm install depd +``` + +This module can also be bundled with systems like +[Browserify](http://browserify.org/) or [webpack](https://webpack.github.io/), +though by default this module will alter it's API to no longer display or +track deprecations. + +## API + + + +```js +var deprecate = require('depd')('my-module') +``` + +This library allows you to display deprecation messages to your users. +This library goes above and beyond with deprecation warnings by +introspection of the call stack (but only the bits that it is interested +in). + +Instead of just warning on the first invocation of a deprecated +function and never again, this module will warn on the first invocation +of a deprecated function per unique call site, making it ideal to alert +users of all deprecated uses across the code base, rather than just +whatever happens to execute first. + +The deprecation warnings from this module also include the file and line +information for the call into the module that the deprecated function was +in. + +**NOTE** this library has a similar interface to the `debug` module, and +this module uses the calling file to get the boundary for the call stacks, +so you should always create a new `deprecate` object in each file and not +within some central file. + +### depd(namespace) + +Create a new deprecate function that uses the given namespace name in the +messages and will display the call site prior to the stack entering the +file this function was called from. It is highly suggested you use the +name of your module as the namespace. + +### deprecate(message) + +Call this function from deprecated code to display a deprecation message. +This message will appear once per unique caller site. Caller site is the +first call site in the stack in a different file from the caller of this +function. + +If the message is omitted, a message is generated for you based on the site +of the `deprecate()` call and will display the name of the function called, +similar to the name displayed in a stack trace. + +### deprecate.function(fn, message) + +Call this function to wrap a given function in a deprecation message on any +call to the function. An optional message can be supplied to provide a custom +message. + +### deprecate.property(obj, prop, message) + +Call this function to wrap a given property on object in a deprecation message +on any accessing or setting of the property. An optional message can be supplied +to provide a custom message. + +The method must be called on the object where the property belongs (not +inherited from the prototype). + +If the property is a data descriptor, it will be converted to an accessor +descriptor in order to display the deprecation message. + +### process.on('deprecation', fn) + +This module will allow easy capturing of deprecation errors by emitting the +errors as the type "deprecation" on the global `process`. If there are no +listeners for this type, the errors are written to STDERR as normal, but if +there are any listeners, nothing will be written to STDERR and instead only +emitted. From there, you can write the errors in a different format or to a +logging source. + +The error represents the deprecation and is emitted only once with the same +rules as writing to STDERR. The error has the following properties: + + - `message` - This is the message given by the library + - `name` - This is always `'DeprecationError'` + - `namespace` - This is the namespace the deprecation came from + - `stack` - This is the stack of the call to the deprecated thing + +Example `error.stack` output: + +``` +DeprecationError: my-cool-module deprecated oldfunction + at Object. ([eval]-wrapper:6:22) + at Module._compile (module.js:456:26) + at evalScript (node.js:532:25) + at startup (node.js:80:7) + at node.js:902:3 +``` + +### process.env.NO_DEPRECATION + +As a user of modules that are deprecated, the environment variable `NO_DEPRECATION` +is provided as a quick solution to silencing deprecation warnings from being +output. The format of this is similar to that of `DEBUG`: + +```sh +$ NO_DEPRECATION=my-module,othermod node app.js +``` + +This will suppress deprecations from being output for "my-module" and "othermod". +The value is a list of comma-separated namespaces. To suppress every warning +across all namespaces, use the value `*` for a namespace. + +Providing the argument `--no-deprecation` to the `node` executable will suppress +all deprecations (only available in Node.js 0.8 or higher). + +**NOTE** This will not suppress the deperecations given to any "deprecation" +event listeners, just the output to STDERR. + +### process.env.TRACE_DEPRECATION + +As a user of modules that are deprecated, the environment variable `TRACE_DEPRECATION` +is provided as a solution to getting more detailed location information in deprecation +warnings by including the entire stack trace. The format of this is the same as +`NO_DEPRECATION`: + +```sh +$ TRACE_DEPRECATION=my-module,othermod node app.js +``` + +This will include stack traces for deprecations being output for "my-module" and +"othermod". The value is a list of comma-separated namespaces. To trace every +warning across all namespaces, use the value `*` for a namespace. + +Providing the argument `--trace-deprecation` to the `node` executable will trace +all deprecations (only available in Node.js 0.8 or higher). + +**NOTE** This will not trace the deperecations silenced by `NO_DEPRECATION`. + +## Display + +![message](files/message.png) + +When a user calls a function in your library that you mark deprecated, they +will see the following written to STDERR (in the given colors, similar colors +and layout to the `debug` module): + +``` +bright cyan bright yellow +| | reset cyan +| | | | +▼ ▼ ▼ ▼ +my-cool-module deprecated oldfunction [eval]-wrapper:6:22 +▲ ▲ ▲ ▲ +| | | | +namespace | | location of mycoolmod.oldfunction() call + | deprecation message + the word "deprecated" +``` + +If the user redirects their STDERR to a file or somewhere that does not support +colors, they see (similar layout to the `debug` module): + +``` +Sun, 15 Jun 2014 05:21:37 GMT my-cool-module deprecated oldfunction at [eval]-wrapper:6:22 +▲ ▲ ▲ ▲ ▲ +| | | | | +timestamp of message namespace | | location of mycoolmod.oldfunction() call + | deprecation message + the word "deprecated" +``` + +## Examples + +### Deprecating all calls to a function + +This will display a deprecated message about "oldfunction" being deprecated +from "my-module" on STDERR. + +```js +var deprecate = require('depd')('my-cool-module') + +// message automatically derived from function name +// Object.oldfunction +exports.oldfunction = deprecate.function(function oldfunction () { + // all calls to function are deprecated +}) + +// specific message +exports.oldfunction = deprecate.function(function () { + // all calls to function are deprecated +}, 'oldfunction') +``` + +### Conditionally deprecating a function call + +This will display a deprecated message about "weirdfunction" being deprecated +from "my-module" on STDERR when called with less than 2 arguments. + +```js +var deprecate = require('depd')('my-cool-module') + +exports.weirdfunction = function () { + if (arguments.length < 2) { + // calls with 0 or 1 args are deprecated + deprecate('weirdfunction args < 2') + } +} +``` + +When calling `deprecate` as a function, the warning is counted per call site +within your own module, so you can display different deprecations depending +on different situations and the users will still get all the warnings: + +```js +var deprecate = require('depd')('my-cool-module') + +exports.weirdfunction = function () { + if (arguments.length < 2) { + // calls with 0 or 1 args are deprecated + deprecate('weirdfunction args < 2') + } else if (typeof arguments[0] !== 'string') { + // calls with non-string first argument are deprecated + deprecate('weirdfunction non-string first arg') + } +} +``` + +### Deprecating property access + +This will display a deprecated message about "oldprop" being deprecated +from "my-module" on STDERR when accessed. A deprecation will be displayed +when setting the value and when getting the value. + +```js +var deprecate = require('depd')('my-cool-module') + +exports.oldprop = 'something' + +// message automatically derives from property name +deprecate.property(exports, 'oldprop') + +// explicit message +deprecate.property(exports, 'oldprop', 'oldprop >= 0.10') +``` + +## License + +[MIT](LICENSE) + +[appveyor-image]: https://badgen.net/appveyor/ci/dougwilson/nodejs-depd/master?label=windows +[appveyor-url]: https://ci.appveyor.com/project/dougwilson/nodejs-depd +[coveralls-image]: https://badgen.net/coveralls/c/github/dougwilson/nodejs-depd/master +[coveralls-url]: https://coveralls.io/r/dougwilson/nodejs-depd?branch=master +[node-image]: https://badgen.net/npm/node/depd +[node-url]: https://nodejs.org/en/download/ +[npm-downloads-image]: https://badgen.net/npm/dm/depd +[npm-url]: https://npmjs.org/package/depd +[npm-version-image]: https://badgen.net/npm/v/depd +[travis-image]: https://badgen.net/travis/dougwilson/nodejs-depd/master?label=linux +[travis-url]: https://travis-ci.org/dougwilson/nodejs-depd diff --git a/node_modules/depd/index.js b/node_modules/depd/index.js new file mode 100644 index 0000000..1bf2fcf --- /dev/null +++ b/node_modules/depd/index.js @@ -0,0 +1,538 @@ +/*! + * depd + * Copyright(c) 2014-2018 Douglas Christopher Wilson + * MIT Licensed + */ + +/** + * Module dependencies. + */ + +var relative = require('path').relative + +/** + * Module exports. + */ + +module.exports = depd + +/** + * Get the path to base files on. + */ + +var basePath = process.cwd() + +/** + * Determine if namespace is contained in the string. + */ + +function containsNamespace (str, namespace) { + var vals = str.split(/[ ,]+/) + var ns = String(namespace).toLowerCase() + + for (var i = 0; i < vals.length; i++) { + var val = vals[i] + + // namespace contained + if (val && (val === '*' || val.toLowerCase() === ns)) { + return true + } + } + + return false +} + +/** + * Convert a data descriptor to accessor descriptor. + */ + +function convertDataDescriptorToAccessor (obj, prop, message) { + var descriptor = Object.getOwnPropertyDescriptor(obj, prop) + var value = descriptor.value + + descriptor.get = function getter () { return value } + + if (descriptor.writable) { + descriptor.set = function setter (val) { return (value = val) } + } + + delete descriptor.value + delete descriptor.writable + + Object.defineProperty(obj, prop, descriptor) + + return descriptor +} + +/** + * Create arguments string to keep arity. + */ + +function createArgumentsString (arity) { + var str = '' + + for (var i = 0; i < arity; i++) { + str += ', arg' + i + } + + return str.substr(2) +} + +/** + * Create stack string from stack. + */ + +function createStackString (stack) { + var str = this.name + ': ' + this.namespace + + if (this.message) { + str += ' deprecated ' + this.message + } + + for (var i = 0; i < stack.length; i++) { + str += '\n at ' + stack[i].toString() + } + + return str +} + +/** + * Create deprecate for namespace in caller. + */ + +function depd (namespace) { + if (!namespace) { + throw new TypeError('argument namespace is required') + } + + var stack = getStack() + var site = callSiteLocation(stack[1]) + var file = site[0] + + function deprecate (message) { + // call to self as log + log.call(deprecate, message) + } + + deprecate._file = file + deprecate._ignored = isignored(namespace) + deprecate._namespace = namespace + deprecate._traced = istraced(namespace) + deprecate._warned = Object.create(null) + + deprecate.function = wrapfunction + deprecate.property = wrapproperty + + return deprecate +} + +/** + * Determine if event emitter has listeners of a given type. + * + * The way to do this check is done three different ways in Node.js >= 0.8 + * so this consolidates them into a minimal set using instance methods. + * + * @param {EventEmitter} emitter + * @param {string} type + * @returns {boolean} + * @private + */ + +function eehaslisteners (emitter, type) { + var count = typeof emitter.listenerCount !== 'function' + ? emitter.listeners(type).length + : emitter.listenerCount(type) + + return count > 0 +} + +/** + * Determine if namespace is ignored. + */ + +function isignored (namespace) { + if (process.noDeprecation) { + // --no-deprecation support + return true + } + + var str = process.env.NO_DEPRECATION || '' + + // namespace ignored + return containsNamespace(str, namespace) +} + +/** + * Determine if namespace is traced. + */ + +function istraced (namespace) { + if (process.traceDeprecation) { + // --trace-deprecation support + return true + } + + var str = process.env.TRACE_DEPRECATION || '' + + // namespace traced + return containsNamespace(str, namespace) +} + +/** + * Display deprecation message. + */ + +function log (message, site) { + var haslisteners = eehaslisteners(process, 'deprecation') + + // abort early if no destination + if (!haslisteners && this._ignored) { + return + } + + var caller + var callFile + var callSite + var depSite + var i = 0 + var seen = false + var stack = getStack() + var file = this._file + + if (site) { + // provided site + depSite = site + callSite = callSiteLocation(stack[1]) + callSite.name = depSite.name + file = callSite[0] + } else { + // get call site + i = 2 + depSite = callSiteLocation(stack[i]) + callSite = depSite + } + + // get caller of deprecated thing in relation to file + for (; i < stack.length; i++) { + caller = callSiteLocation(stack[i]) + callFile = caller[0] + + if (callFile === file) { + seen = true + } else if (callFile === this._file) { + file = this._file + } else if (seen) { + break + } + } + + var key = caller + ? depSite.join(':') + '__' + caller.join(':') + : undefined + + if (key !== undefined && key in this._warned) { + // already warned + return + } + + this._warned[key] = true + + // generate automatic message from call site + var msg = message + if (!msg) { + msg = callSite === depSite || !callSite.name + ? defaultMessage(depSite) + : defaultMessage(callSite) + } + + // emit deprecation if listeners exist + if (haslisteners) { + var err = DeprecationError(this._namespace, msg, stack.slice(i)) + process.emit('deprecation', err) + return + } + + // format and write message + var format = process.stderr.isTTY + ? formatColor + : formatPlain + var output = format.call(this, msg, caller, stack.slice(i)) + process.stderr.write(output + '\n', 'utf8') +} + +/** + * Get call site location as array. + */ + +function callSiteLocation (callSite) { + var file = callSite.getFileName() || '' + var line = callSite.getLineNumber() + var colm = callSite.getColumnNumber() + + if (callSite.isEval()) { + file = callSite.getEvalOrigin() + ', ' + file + } + + var site = [file, line, colm] + + site.callSite = callSite + site.name = callSite.getFunctionName() + + return site +} + +/** + * Generate a default message from the site. + */ + +function defaultMessage (site) { + var callSite = site.callSite + var funcName = site.name + + // make useful anonymous name + if (!funcName) { + funcName = '' + } + + var context = callSite.getThis() + var typeName = context && callSite.getTypeName() + + // ignore useless type name + if (typeName === 'Object') { + typeName = undefined + } + + // make useful type name + if (typeName === 'Function') { + typeName = context.name || typeName + } + + return typeName && callSite.getMethodName() + ? typeName + '.' + funcName + : funcName +} + +/** + * Format deprecation message without color. + */ + +function formatPlain (msg, caller, stack) { + var timestamp = new Date().toUTCString() + + var formatted = timestamp + + ' ' + this._namespace + + ' deprecated ' + msg + + // add stack trace + if (this._traced) { + for (var i = 0; i < stack.length; i++) { + formatted += '\n at ' + stack[i].toString() + } + + return formatted + } + + if (caller) { + formatted += ' at ' + formatLocation(caller) + } + + return formatted +} + +/** + * Format deprecation message with color. + */ + +function formatColor (msg, caller, stack) { + var formatted = '\x1b[36;1m' + this._namespace + '\x1b[22;39m' + // bold cyan + ' \x1b[33;1mdeprecated\x1b[22;39m' + // bold yellow + ' \x1b[0m' + msg + '\x1b[39m' // reset + + // add stack trace + if (this._traced) { + for (var i = 0; i < stack.length; i++) { + formatted += '\n \x1b[36mat ' + stack[i].toString() + '\x1b[39m' // cyan + } + + return formatted + } + + if (caller) { + formatted += ' \x1b[36m' + formatLocation(caller) + '\x1b[39m' // cyan + } + + return formatted +} + +/** + * Format call site location. + */ + +function formatLocation (callSite) { + return relative(basePath, callSite[0]) + + ':' + callSite[1] + + ':' + callSite[2] +} + +/** + * Get the stack as array of call sites. + */ + +function getStack () { + var limit = Error.stackTraceLimit + var obj = {} + var prep = Error.prepareStackTrace + + Error.prepareStackTrace = prepareObjectStackTrace + Error.stackTraceLimit = Math.max(10, limit) + + // capture the stack + Error.captureStackTrace(obj) + + // slice this function off the top + var stack = obj.stack.slice(1) + + Error.prepareStackTrace = prep + Error.stackTraceLimit = limit + + return stack +} + +/** + * Capture call site stack from v8. + */ + +function prepareObjectStackTrace (obj, stack) { + return stack +} + +/** + * Return a wrapped function in a deprecation message. + */ + +function wrapfunction (fn, message) { + if (typeof fn !== 'function') { + throw new TypeError('argument fn must be a function') + } + + var args = createArgumentsString(fn.length) + var stack = getStack() + var site = callSiteLocation(stack[1]) + + site.name = fn.name + + // eslint-disable-next-line no-new-func + var deprecatedfn = new Function('fn', 'log', 'deprecate', 'message', 'site', + '"use strict"\n' + + 'return function (' + args + ') {' + + 'log.call(deprecate, message, site)\n' + + 'return fn.apply(this, arguments)\n' + + '}')(fn, log, this, message, site) + + return deprecatedfn +} + +/** + * Wrap property in a deprecation message. + */ + +function wrapproperty (obj, prop, message) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new TypeError('argument obj must be object') + } + + var descriptor = Object.getOwnPropertyDescriptor(obj, prop) + + if (!descriptor) { + throw new TypeError('must call property on owner object') + } + + if (!descriptor.configurable) { + throw new TypeError('property must be configurable') + } + + var deprecate = this + var stack = getStack() + var site = callSiteLocation(stack[1]) + + // set site name + site.name = prop + + // convert data descriptor + if ('value' in descriptor) { + descriptor = convertDataDescriptorToAccessor(obj, prop, message) + } + + var get = descriptor.get + var set = descriptor.set + + // wrap getter + if (typeof get === 'function') { + descriptor.get = function getter () { + log.call(deprecate, message, site) + return get.apply(this, arguments) + } + } + + // wrap setter + if (typeof set === 'function') { + descriptor.set = function setter () { + log.call(deprecate, message, site) + return set.apply(this, arguments) + } + } + + Object.defineProperty(obj, prop, descriptor) +} + +/** + * Create DeprecationError for deprecation + */ + +function DeprecationError (namespace, message, stack) { + var error = new Error() + var stackString + + Object.defineProperty(error, 'constructor', { + value: DeprecationError + }) + + Object.defineProperty(error, 'message', { + configurable: true, + enumerable: false, + value: message, + writable: true + }) + + Object.defineProperty(error, 'name', { + enumerable: false, + configurable: true, + value: 'DeprecationError', + writable: true + }) + + Object.defineProperty(error, 'namespace', { + configurable: true, + enumerable: false, + value: namespace, + writable: true + }) + + Object.defineProperty(error, 'stack', { + configurable: true, + enumerable: false, + get: function () { + if (stackString !== undefined) { + return stackString + } + + // prepare stack trace + return (stackString = createStackString.call(this, stack)) + }, + set: function setter (val) { + stackString = val + } + }) + + return error +} diff --git a/node_modules/depd/lib/browser/index.js b/node_modules/depd/lib/browser/index.js new file mode 100644 index 0000000..6be45cc --- /dev/null +++ b/node_modules/depd/lib/browser/index.js @@ -0,0 +1,77 @@ +/*! + * depd + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = depd + +/** + * Create deprecate for namespace in caller. + */ + +function depd (namespace) { + if (!namespace) { + throw new TypeError('argument namespace is required') + } + + function deprecate (message) { + // no-op in browser + } + + deprecate._file = undefined + deprecate._ignored = true + deprecate._namespace = namespace + deprecate._traced = false + deprecate._warned = Object.create(null) + + deprecate.function = wrapfunction + deprecate.property = wrapproperty + + return deprecate +} + +/** + * Return a wrapped function in a deprecation message. + * + * This is a no-op version of the wrapper, which does nothing but call + * validation. + */ + +function wrapfunction (fn, message) { + if (typeof fn !== 'function') { + throw new TypeError('argument fn must be a function') + } + + return fn +} + +/** + * Wrap property in a deprecation message. + * + * This is a no-op version of the wrapper, which does nothing but call + * validation. + */ + +function wrapproperty (obj, prop, message) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new TypeError('argument obj must be object') + } + + var descriptor = Object.getOwnPropertyDescriptor(obj, prop) + + if (!descriptor) { + throw new TypeError('must call property on owner object') + } + + if (!descriptor.configurable) { + throw new TypeError('property must be configurable') + } +} diff --git a/node_modules/depd/package.json b/node_modules/depd/package.json new file mode 100644 index 0000000..3857e19 --- /dev/null +++ b/node_modules/depd/package.json @@ -0,0 +1,45 @@ +{ + "name": "depd", + "description": "Deprecate all the things", + "version": "2.0.0", + "author": "Douglas Christopher Wilson ", + "license": "MIT", + "keywords": [ + "deprecate", + "deprecated" + ], + "repository": "dougwilson/nodejs-depd", + "browser": "lib/browser/index.js", + "devDependencies": { + "benchmark": "2.1.4", + "beautify-benchmark": "0.2.4", + "eslint": "5.7.0", + "eslint-config-standard": "12.0.0", + "eslint-plugin-import": "2.14.0", + "eslint-plugin-markdown": "1.0.0-beta.7", + "eslint-plugin-node": "7.0.1", + "eslint-plugin-promise": "4.0.1", + "eslint-plugin-standard": "4.0.0", + "istanbul": "0.4.5", + "mocha": "5.2.0", + "safe-buffer": "5.1.2", + "uid-safe": "2.1.5" + }, + "files": [ + "lib/", + "History.md", + "LICENSE", + "index.js", + "Readme.md" + ], + "engines": { + "node": ">= 0.8" + }, + "scripts": { + "bench": "node benchmark/index.js", + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --bail test/", + "test-ci": "istanbul cover --print=none node_modules/mocha/bin/_mocha -- --reporter spec test/ && istanbul report lcovonly text-summary", + "test-cov": "istanbul cover --print=none node_modules/mocha/bin/_mocha -- --reporter dot test/ && istanbul report lcov text-summary" + } +} diff --git a/node_modules/destroy/LICENSE b/node_modules/destroy/LICENSE new file mode 100644 index 0000000..0e2c35f --- /dev/null +++ b/node_modules/destroy/LICENSE @@ -0,0 +1,23 @@ + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.com +Copyright (c) 2015-2022 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. diff --git a/node_modules/destroy/README.md b/node_modules/destroy/README.md new file mode 100644 index 0000000..e7701ae --- /dev/null +++ b/node_modules/destroy/README.md @@ -0,0 +1,63 @@ +# destroy + +[![NPM version][npm-image]][npm-url] +[![Build Status][github-actions-ci-image]][github-actions-ci-url] +[![Test coverage][coveralls-image]][coveralls-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +Destroy a stream. + +This module is meant to ensure a stream gets destroyed, handling different APIs +and Node.js bugs. + +## API + +```js +var destroy = require('destroy') +``` + +### destroy(stream [, suppress]) + +Destroy the given stream, and optionally suppress any future `error` events. + +In most cases, this is identical to a simple `stream.destroy()` call. The rules +are as follows for a given stream: + + 1. If the `stream` is an instance of `ReadStream`, then call `stream.destroy()` + and add a listener to the `open` event to call `stream.close()` if it is + fired. This is for a Node.js bug that will leak a file descriptor if + `.destroy()` is called before `open`. + 2. If the `stream` is an instance of a zlib stream, then call `stream.destroy()` + and close the underlying zlib handle if open, otherwise call `stream.close()`. + This is for consistency across Node.js versions and a Node.js bug that will + leak a native zlib handle. + 3. If the `stream` is not an instance of `Stream`, then nothing happens. + 4. If the `stream` has a `.destroy()` method, then call it. + +The function returns the `stream` passed in as the argument. + +## Example + +```js +var destroy = require('destroy') + +var fs = require('fs') +var stream = fs.createReadStream('package.json') + +// ... and later +destroy(stream) +``` + +[npm-image]: https://img.shields.io/npm/v/destroy.svg?style=flat-square +[npm-url]: https://npmjs.org/package/destroy +[github-tag]: http://img.shields.io/github/tag/stream-utils/destroy.svg?style=flat-square +[github-url]: https://github.com/stream-utils/destroy/tags +[coveralls-image]: https://img.shields.io/coveralls/stream-utils/destroy.svg?style=flat-square +[coveralls-url]: https://coveralls.io/r/stream-utils/destroy?branch=master +[license-image]: http://img.shields.io/npm/l/destroy.svg?style=flat-square +[license-url]: LICENSE.md +[downloads-image]: http://img.shields.io/npm/dm/destroy.svg?style=flat-square +[downloads-url]: https://npmjs.org/package/destroy +[github-actions-ci-image]: https://img.shields.io/github/workflow/status/stream-utils/destroy/ci/master?label=ci&style=flat-square +[github-actions-ci-url]: https://github.com/stream-utils/destroy/actions/workflows/ci.yml diff --git a/node_modules/destroy/index.js b/node_modules/destroy/index.js new file mode 100644 index 0000000..7fd5c09 --- /dev/null +++ b/node_modules/destroy/index.js @@ -0,0 +1,209 @@ +/*! + * destroy + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var EventEmitter = require('events').EventEmitter +var ReadStream = require('fs').ReadStream +var Stream = require('stream') +var Zlib = require('zlib') + +/** + * Module exports. + * @public + */ + +module.exports = destroy + +/** + * Destroy the given stream, and optionally suppress any future `error` events. + * + * @param {object} stream + * @param {boolean} suppress + * @public + */ + +function destroy (stream, suppress) { + if (isFsReadStream(stream)) { + destroyReadStream(stream) + } else if (isZlibStream(stream)) { + destroyZlibStream(stream) + } else if (hasDestroy(stream)) { + stream.destroy() + } + + if (isEventEmitter(stream) && suppress) { + stream.removeAllListeners('error') + stream.addListener('error', noop) + } + + return stream +} + +/** + * Destroy a ReadStream. + * + * @param {object} stream + * @private + */ + +function destroyReadStream (stream) { + stream.destroy() + + if (typeof stream.close === 'function') { + // node.js core bug work-around + stream.on('open', onOpenClose) + } +} + +/** + * Close a Zlib stream. + * + * Zlib streams below Node.js 4.5.5 have a buggy implementation + * of .close() when zlib encountered an error. + * + * @param {object} stream + * @private + */ + +function closeZlibStream (stream) { + if (stream._hadError === true) { + var prop = stream._binding === null + ? '_binding' + : '_handle' + + stream[prop] = { + close: function () { this[prop] = null } + } + } + + stream.close() +} + +/** + * Destroy a Zlib stream. + * + * Zlib streams don't have a destroy function in Node.js 6. On top of that + * simply calling destroy on a zlib stream in Node.js 8+ will result in a + * memory leak. So until that is fixed, we need to call both close AND destroy. + * + * PR to fix memory leak: https://github.com/nodejs/node/pull/23734 + * + * In Node.js 6+8, it's important that destroy is called before close as the + * stream would otherwise emit the error 'zlib binding closed'. + * + * @param {object} stream + * @private + */ + +function destroyZlibStream (stream) { + if (typeof stream.destroy === 'function') { + // node.js core bug work-around + // istanbul ignore if: node.js 0.8 + if (stream._binding) { + // node.js < 0.10.0 + stream.destroy() + if (stream._processing) { + stream._needDrain = true + stream.once('drain', onDrainClearBinding) + } else { + stream._binding.clear() + } + } else if (stream._destroy && stream._destroy !== Stream.Transform.prototype._destroy) { + // node.js >= 12, ^11.1.0, ^10.15.1 + stream.destroy() + } else if (stream._destroy && typeof stream.close === 'function') { + // node.js 7, 8 + stream.destroyed = true + stream.close() + } else { + // fallback + // istanbul ignore next + stream.destroy() + } + } else if (typeof stream.close === 'function') { + // node.js < 8 fallback + closeZlibStream(stream) + } +} + +/** + * Determine if stream has destroy. + * @private + */ + +function hasDestroy (stream) { + return stream instanceof Stream && + typeof stream.destroy === 'function' +} + +/** + * Determine if val is EventEmitter. + * @private + */ + +function isEventEmitter (val) { + return val instanceof EventEmitter +} + +/** + * Determine if stream is fs.ReadStream stream. + * @private + */ + +function isFsReadStream (stream) { + return stream instanceof ReadStream +} + +/** + * Determine if stream is Zlib stream. + * @private + */ + +function isZlibStream (stream) { + return stream instanceof Zlib.Gzip || + stream instanceof Zlib.Gunzip || + stream instanceof Zlib.Deflate || + stream instanceof Zlib.DeflateRaw || + stream instanceof Zlib.Inflate || + stream instanceof Zlib.InflateRaw || + stream instanceof Zlib.Unzip +} + +/** + * No-op function. + * @private + */ + +function noop () {} + +/** + * On drain handler to clear binding. + * @private + */ + +// istanbul ignore next: node.js 0.8 +function onDrainClearBinding () { + this._binding.clear() +} + +/** + * On open handler to close stream. + * @private + */ + +function onOpenClose () { + if (typeof this.fd === 'number') { + // actually close down the fd + this.close() + } +} diff --git a/node_modules/destroy/package.json b/node_modules/destroy/package.json new file mode 100644 index 0000000..c85e438 --- /dev/null +++ b/node_modules/destroy/package.json @@ -0,0 +1,48 @@ +{ + "name": "destroy", + "description": "destroy a stream if possible", + "version": "1.2.0", + "author": { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com", + "twitter": "https://twitter.com/jongleberry" + }, + "contributors": [ + "Douglas Christopher Wilson " + ], + "license": "MIT", + "repository": "stream-utils/destroy", + "devDependencies": { + "eslint": "7.32.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "5.2.0", + "eslint-plugin-standard": "4.1.0", + "mocha": "9.2.2", + "nyc": "15.1.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec", + "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + }, + "files": [ + "index.js", + "LICENSE" + ], + "keywords": [ + "stream", + "streams", + "destroy", + "cleanup", + "leak", + "fd" + ] +} diff --git a/node_modules/detect-libc/LICENSE b/node_modules/detect-libc/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/node_modules/detect-libc/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/detect-libc/README.md b/node_modules/detect-libc/README.md new file mode 100644 index 0000000..23212fd --- /dev/null +++ b/node_modules/detect-libc/README.md @@ -0,0 +1,163 @@ +# detect-libc + +Node.js module to detect details of the C standard library (libc) +implementation provided by a given Linux system. + +Currently supports detection of GNU glibc and MUSL libc. + +Provides asychronous and synchronous functions for the +family (e.g. `glibc`, `musl`) and version (e.g. `1.23`, `1.2.3`). + +The version numbers of libc implementations +are not guaranteed to be semver-compliant. + +For previous v1.x releases, please see the +[v1](https://github.com/lovell/detect-libc/tree/v1) branch. + +## Install + +```sh +npm install detect-libc +``` + +## API + +### GLIBC + +```ts +const GLIBC: string = 'glibc'; +``` + +A String constant containing the value `glibc`. + +### MUSL + +```ts +const MUSL: string = 'musl'; +``` + +A String constant containing the value `musl`. + +### family + +```ts +function family(): Promise; +``` + +Resolves asychronously with: + +* `glibc` or `musl` when the libc family can be determined +* `null` when the libc family cannot be determined +* `null` when run on a non-Linux platform + +```js +const { family, GLIBC, MUSL } = require('detect-libc'); + +switch (await family()) { + case GLIBC: ... + case MUSL: ... + case null: ... +} +``` + +### familySync + +```ts +function familySync(): string | null; +``` + +Synchronous version of `family()`. + +```js +const { familySync, GLIBC, MUSL } = require('detect-libc'); + +switch (familySync()) { + case GLIBC: ... + case MUSL: ... + case null: ... +} +``` + +### version + +```ts +function version(): Promise; +``` + +Resolves asychronously with: + +* The version when it can be determined +* `null` when the libc family cannot be determined +* `null` when run on a non-Linux platform + +```js +const { version } = require('detect-libc'); + +const v = await version(); +if (v) { + const [major, minor, patch] = v.split('.'); +} +``` + +### versionSync + +```ts +function versionSync(): string | null; +``` + +Synchronous version of `version()`. + +```js +const { versionSync } = require('detect-libc'); + +const v = versionSync(); +if (v) { + const [major, minor, patch] = v.split('.'); +} +``` + +### isNonGlibcLinux + +```ts +function isNonGlibcLinux(): Promise; +``` + +Resolves asychronously with: + +* `false` when the libc family is `glibc` +* `true` when the libc family is not `glibc` +* `false` when run on a non-Linux platform + +```js +const { isNonGlibcLinux } = require('detect-libc'); + +if (await isNonGlibcLinux()) { ... } +``` + +### isNonGlibcLinuxSync + +```ts +function isNonGlibcLinuxSync(): boolean; +``` + +Synchronous version of `isNonGlibcLinux()`. + +```js +const { isNonGlibcLinuxSync } = require('detect-libc'); + +if (isNonGlibcLinuxSync()) { ... } +``` + +## Licensing + +Copyright 2017 Lovell Fuller and others. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0.html) + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/node_modules/detect-libc/index.d.ts b/node_modules/detect-libc/index.d.ts new file mode 100644 index 0000000..4c0fb2b --- /dev/null +++ b/node_modules/detect-libc/index.d.ts @@ -0,0 +1,14 @@ +// Copyright 2017 Lovell Fuller and others. +// SPDX-License-Identifier: Apache-2.0 + +export const GLIBC: 'glibc'; +export const MUSL: 'musl'; + +export function family(): Promise; +export function familySync(): string | null; + +export function isNonGlibcLinux(): Promise; +export function isNonGlibcLinuxSync(): boolean; + +export function version(): Promise; +export function versionSync(): string | null; diff --git a/node_modules/detect-libc/lib/detect-libc.js b/node_modules/detect-libc/lib/detect-libc.js new file mode 100644 index 0000000..fe49987 --- /dev/null +++ b/node_modules/detect-libc/lib/detect-libc.js @@ -0,0 +1,267 @@ +// Copyright 2017 Lovell Fuller and others. +// SPDX-License-Identifier: Apache-2.0 + +'use strict'; + +const childProcess = require('child_process'); +const { isLinux, getReport } = require('./process'); +const { LDD_PATH, readFile, readFileSync } = require('./filesystem'); + +let cachedFamilyFilesystem; +let cachedVersionFilesystem; + +const command = 'getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true'; +let commandOut = ''; + +const safeCommand = () => { + if (!commandOut) { + return new Promise((resolve) => { + childProcess.exec(command, (err, out) => { + commandOut = err ? ' ' : out; + resolve(commandOut); + }); + }); + } + return commandOut; +}; + +const safeCommandSync = () => { + if (!commandOut) { + try { + commandOut = childProcess.execSync(command, { encoding: 'utf8' }); + } catch (_err) { + commandOut = ' '; + } + } + return commandOut; +}; + +/** + * A String constant containing the value `glibc`. + * @type {string} + * @public + */ +const GLIBC = 'glibc'; + +/** + * A Regexp constant to get the GLIBC Version. + * @type {string} + */ +const RE_GLIBC_VERSION = /LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i; + +/** + * A String constant containing the value `musl`. + * @type {string} + * @public + */ +const MUSL = 'musl'; + +const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-'); + +const familyFromReport = () => { + const report = getReport(); + if (report.header && report.header.glibcVersionRuntime) { + return GLIBC; + } + if (Array.isArray(report.sharedObjects)) { + if (report.sharedObjects.some(isFileMusl)) { + return MUSL; + } + } + return null; +}; + +const familyFromCommand = (out) => { + const [getconf, ldd1] = out.split(/[\r\n]+/); + if (getconf && getconf.includes(GLIBC)) { + return GLIBC; + } + if (ldd1 && ldd1.includes(MUSL)) { + return MUSL; + } + return null; +}; + +const getFamilyFromLddContent = (content) => { + if (content.includes('musl')) { + return MUSL; + } + if (content.includes('GNU C Library')) { + return GLIBC; + } + return null; +}; + +const familyFromFilesystem = async () => { + if (cachedFamilyFilesystem !== undefined) { + return cachedFamilyFilesystem; + } + cachedFamilyFilesystem = null; + try { + const lddContent = await readFile(LDD_PATH); + cachedFamilyFilesystem = getFamilyFromLddContent(lddContent); + } catch (e) {} + return cachedFamilyFilesystem; +}; + +const familyFromFilesystemSync = () => { + if (cachedFamilyFilesystem !== undefined) { + return cachedFamilyFilesystem; + } + cachedFamilyFilesystem = null; + try { + const lddContent = readFileSync(LDD_PATH); + cachedFamilyFilesystem = getFamilyFromLddContent(lddContent); + } catch (e) {} + return cachedFamilyFilesystem; +}; + +/** + * Resolves with the libc family when it can be determined, `null` otherwise. + * @returns {Promise} + */ +const family = async () => { + let family = null; + if (isLinux()) { + family = await familyFromFilesystem(); + if (!family) { + family = familyFromReport(); + } + if (!family) { + const out = await safeCommand(); + family = familyFromCommand(out); + } + } + return family; +}; + +/** + * Returns the libc family when it can be determined, `null` otherwise. + * @returns {?string} + */ +const familySync = () => { + let family = null; + if (isLinux()) { + family = familyFromFilesystemSync(); + if (!family) { + family = familyFromReport(); + } + if (!family) { + const out = safeCommandSync(); + family = familyFromCommand(out); + } + } + return family; +}; + +/** + * Resolves `true` only when the platform is Linux and the libc family is not `glibc`. + * @returns {Promise} + */ +const isNonGlibcLinux = async () => isLinux() && await family() !== GLIBC; + +/** + * Returns `true` only when the platform is Linux and the libc family is not `glibc`. + * @returns {boolean} + */ +const isNonGlibcLinuxSync = () => isLinux() && familySync() !== GLIBC; + +const versionFromFilesystem = async () => { + if (cachedVersionFilesystem !== undefined) { + return cachedVersionFilesystem; + } + cachedVersionFilesystem = null; + try { + const lddContent = await readFile(LDD_PATH); + const versionMatch = lddContent.match(RE_GLIBC_VERSION); + if (versionMatch) { + cachedVersionFilesystem = versionMatch[1]; + } + } catch (e) {} + return cachedVersionFilesystem; +}; + +const versionFromFilesystemSync = () => { + if (cachedVersionFilesystem !== undefined) { + return cachedVersionFilesystem; + } + cachedVersionFilesystem = null; + try { + const lddContent = readFileSync(LDD_PATH); + const versionMatch = lddContent.match(RE_GLIBC_VERSION); + if (versionMatch) { + cachedVersionFilesystem = versionMatch[1]; + } + } catch (e) {} + return cachedVersionFilesystem; +}; + +const versionFromReport = () => { + const report = getReport(); + if (report.header && report.header.glibcVersionRuntime) { + return report.header.glibcVersionRuntime; + } + return null; +}; + +const versionSuffix = (s) => s.trim().split(/\s+/)[1]; + +const versionFromCommand = (out) => { + const [getconf, ldd1, ldd2] = out.split(/[\r\n]+/); + if (getconf && getconf.includes(GLIBC)) { + return versionSuffix(getconf); + } + if (ldd1 && ldd2 && ldd1.includes(MUSL)) { + return versionSuffix(ldd2); + } + return null; +}; + +/** + * Resolves with the libc version when it can be determined, `null` otherwise. + * @returns {Promise} + */ +const version = async () => { + let version = null; + if (isLinux()) { + version = await versionFromFilesystem(); + if (!version) { + version = versionFromReport(); + } + if (!version) { + const out = await safeCommand(); + version = versionFromCommand(out); + } + } + return version; +}; + +/** + * Returns the libc version when it can be determined, `null` otherwise. + * @returns {?string} + */ +const versionSync = () => { + let version = null; + if (isLinux()) { + version = versionFromFilesystemSync(); + if (!version) { + version = versionFromReport(); + } + if (!version) { + const out = safeCommandSync(); + version = versionFromCommand(out); + } + } + return version; +}; + +module.exports = { + GLIBC, + MUSL, + family, + familySync, + isNonGlibcLinux, + isNonGlibcLinuxSync, + version, + versionSync +}; diff --git a/node_modules/detect-libc/lib/filesystem.js b/node_modules/detect-libc/lib/filesystem.js new file mode 100644 index 0000000..de7e007 --- /dev/null +++ b/node_modules/detect-libc/lib/filesystem.js @@ -0,0 +1,41 @@ +// Copyright 2017 Lovell Fuller and others. +// SPDX-License-Identifier: Apache-2.0 + +'use strict'; + +const fs = require('fs'); + +/** + * The path where we can find the ldd + */ +const LDD_PATH = '/usr/bin/ldd'; + +/** + * Read the content of a file synchronous + * + * @param {string} path + * @returns {string} + */ +const readFileSync = (path) => fs.readFileSync(path, 'utf-8'); + +/** + * Read the content of a file + * + * @param {string} path + * @returns {Promise} + */ +const readFile = (path) => new Promise((resolve, reject) => { + fs.readFile(path, 'utf-8', (err, data) => { + if (err) { + reject(err); + } else { + resolve(data); + } + }); +}); + +module.exports = { + LDD_PATH, + readFileSync, + readFile +}; diff --git a/node_modules/detect-libc/lib/process.js b/node_modules/detect-libc/lib/process.js new file mode 100644 index 0000000..ee78ad2 --- /dev/null +++ b/node_modules/detect-libc/lib/process.js @@ -0,0 +1,24 @@ +// Copyright 2017 Lovell Fuller and others. +// SPDX-License-Identifier: Apache-2.0 + +'use strict'; + +const isLinux = () => process.platform === 'linux'; + +let report = null; +const getReport = () => { + if (!report) { + /* istanbul ignore next */ + if (isLinux() && process.report) { + const orig = process.report.excludeNetwork; + process.report.excludeNetwork = true; + report = process.report.getReport(); + process.report.excludeNetwork = orig; + } else { + report = {}; + } + } + return report; +}; + +module.exports = { isLinux, getReport }; diff --git a/node_modules/detect-libc/package.json b/node_modules/detect-libc/package.json new file mode 100644 index 0000000..d5adec3 --- /dev/null +++ b/node_modules/detect-libc/package.json @@ -0,0 +1,40 @@ +{ + "name": "detect-libc", + "version": "2.0.3", + "description": "Node.js module to detect the C standard library (libc) implementation family and version", + "main": "lib/detect-libc.js", + "files": [ + "lib/", + "index.d.ts" + ], + "scripts": { + "test": "semistandard && nyc --reporter=text --check-coverage --branches=100 ava test/unit.js", + "bench": "node benchmark/detect-libc", + "bench:calls": "node benchmark/call-familySync.js && sleep 1 && node benchmark/call-isNonGlibcLinuxSync.js && sleep 1 && node benchmark/call-versionSync.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/lovell/detect-libc" + }, + "keywords": [ + "libc", + "glibc", + "musl" + ], + "author": "Lovell Fuller ", + "contributors": [ + "Niklas Salmoukas ", + "Vinícius Lourenço " + ], + "license": "Apache-2.0", + "devDependencies": { + "ava": "^2.4.0", + "benchmark": "^2.1.4", + "nyc": "^15.1.0", + "proxyquire": "^2.1.3", + "semistandard": "^14.2.3" + }, + "engines": { + "node": ">=8" + } +} diff --git a/node_modules/dunder-proto/.eslintrc b/node_modules/dunder-proto/.eslintrc new file mode 100644 index 0000000..3b5d9e9 --- /dev/null +++ b/node_modules/dunder-proto/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/dunder-proto/.github/FUNDING.yml b/node_modules/dunder-proto/.github/FUNDING.yml new file mode 100644 index 0000000..8a1d7b0 --- /dev/null +++ b/node_modules/dunder-proto/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/dunder-proto +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/dunder-proto/.nycrc b/node_modules/dunder-proto/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/dunder-proto/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/dunder-proto/CHANGELOG.md b/node_modules/dunder-proto/CHANGELOG.md new file mode 100644 index 0000000..9b8b2f8 --- /dev/null +++ b/node_modules/dunder-proto/CHANGELOG.md @@ -0,0 +1,24 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.1](https://github.com/es-shims/dunder-proto/compare/v1.0.0...v1.0.1) - 2024-12-16 + +### Commits + +- [Fix] do not crash when `--disable-proto=throw` [`6c367d9`](https://github.com/es-shims/dunder-proto/commit/6c367d919bc1604778689a297bbdbfea65752847) +- [Tests] ensure noproto tests only use the current version of dunder-proto [`b02365b`](https://github.com/es-shims/dunder-proto/commit/b02365b9cf889c4a2cac7be0c3cfc90a789af36c) +- [Dev Deps] update `@arethetypeswrong/cli`, `@types/tape` [`e3c5c3b`](https://github.com/es-shims/dunder-proto/commit/e3c5c3bd81cf8cef7dff2eca19e558f0e307f666) +- [Deps] update `call-bind-apply-helpers` [`19f1da0`](https://github.com/es-shims/dunder-proto/commit/19f1da028b8dd0d05c85bfd8f7eed2819b686450) + +## v1.0.0 - 2024-12-06 + +### Commits + +- Initial implementation, tests, readme, types [`a5b74b0`](https://github.com/es-shims/dunder-proto/commit/a5b74b0082f5270cb0905cd9a2e533cee7498373) +- Initial commit [`73fb5a3`](https://github.com/es-shims/dunder-proto/commit/73fb5a353b51ac2ab00c9fdeb0114daffd4c07a8) +- npm init [`80152dc`](https://github.com/es-shims/dunder-proto/commit/80152dc98155da4eb046d9f67a87ed96e8280a1d) +- Only apps should have lockfiles [`03e6660`](https://github.com/es-shims/dunder-proto/commit/03e6660a1d70dc401f3e217a031475ec537243dd) diff --git a/node_modules/dunder-proto/LICENSE b/node_modules/dunder-proto/LICENSE new file mode 100644 index 0000000..34995e7 --- /dev/null +++ b/node_modules/dunder-proto/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 ECMAScript Shims + +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. diff --git a/node_modules/dunder-proto/README.md b/node_modules/dunder-proto/README.md new file mode 100644 index 0000000..44b80a2 --- /dev/null +++ b/node_modules/dunder-proto/README.md @@ -0,0 +1,54 @@ +# dunder-proto [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +If available, the `Object.prototype.__proto__` accessor and mutator, call-bound. + +## Getting started + +```sh +npm install --save dunder-proto +``` + +## Usage/Examples + +```js +const assert = require('assert'); +const getDunder = require('dunder-proto/get'); +const setDunder = require('dunder-proto/set'); + +const obj = {}; + +assert.equal('toString' in obj, true); +assert.equal(getDunder(obj), Object.prototype); + +setDunder(obj, null); + +assert.equal('toString' in obj, false); +assert.equal(getDunder(obj), null); +``` + +## Tests + +Clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/dunder-proto +[npm-version-svg]: https://versionbadg.es/es-shims/dunder-proto.svg +[deps-svg]: https://david-dm.org/es-shims/dunder-proto.svg +[deps-url]: https://david-dm.org/es-shims/dunder-proto +[dev-deps-svg]: https://david-dm.org/es-shims/dunder-proto/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/dunder-proto#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/dunder-proto.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/dunder-proto.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/dunder-proto.svg +[downloads-url]: https://npm-stat.com/charts.html?package=dunder-proto +[codecov-image]: https://codecov.io/gh/es-shims/dunder-proto/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/dunder-proto/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/dunder-proto +[actions-url]: https://github.com/es-shims/dunder-proto/actions diff --git a/node_modules/dunder-proto/get.d.ts b/node_modules/dunder-proto/get.d.ts new file mode 100644 index 0000000..c7e14d2 --- /dev/null +++ b/node_modules/dunder-proto/get.d.ts @@ -0,0 +1,5 @@ +declare function getDunderProto(target: {}): object | null; + +declare const x: false | typeof getDunderProto; + +export = x; \ No newline at end of file diff --git a/node_modules/dunder-proto/get.js b/node_modules/dunder-proto/get.js new file mode 100644 index 0000000..45093df --- /dev/null +++ b/node_modules/dunder-proto/get.js @@ -0,0 +1,30 @@ +'use strict'; + +var callBind = require('call-bind-apply-helpers'); +var gOPD = require('gopd'); + +var hasProtoAccessor; +try { + // eslint-disable-next-line no-extra-parens, no-proto + hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype; +} catch (e) { + if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { + throw e; + } +} + +// eslint-disable-next-line no-extra-parens +var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); + +var $Object = Object; +var $getPrototypeOf = $Object.getPrototypeOf; + +/** @type {import('./get')} */ +module.exports = desc && typeof desc.get === 'function' + ? callBind([desc.get]) + : typeof $getPrototypeOf === 'function' + ? /** @type {import('./get')} */ function getDunder(value) { + // eslint-disable-next-line eqeqeq + return $getPrototypeOf(value == null ? value : $Object(value)); + } + : false; diff --git a/node_modules/dunder-proto/package.json b/node_modules/dunder-proto/package.json new file mode 100644 index 0000000..04a4036 --- /dev/null +++ b/node_modules/dunder-proto/package.json @@ -0,0 +1,76 @@ +{ + "name": "dunder-proto", + "version": "1.0.1", + "description": "If available, the `Object.prototype.__proto__` accessor and mutator, call-bound", + "main": false, + "exports": { + "./get": "./get.js", + "./set": "./set.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=.js,.mjs .", + "postlint": "tsc -p . && attw -P", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx npm@'>= 10.2' audit --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/es-shims/dunder-proto.git" + }, + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/es-shims/dunder-proto/issues" + }, + "homepage": "https://github.com/es-shims/dunder-proto#readme", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.17.1", + "@ljharb/eslint-config": "^21.1.1", + "@ljharb/tsconfig": "^0.2.2", + "@types/tape": "^5.7.0", + "auto-changelog": "^2.5.0", + "encoding": "^0.1.13", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "testling": { + "files": "test/index.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/dunder-proto/set.d.ts b/node_modules/dunder-proto/set.d.ts new file mode 100644 index 0000000..16bfdfe --- /dev/null +++ b/node_modules/dunder-proto/set.d.ts @@ -0,0 +1,5 @@ +declare function setDunderProto

(target: {}, proto: P): P; + +declare const x: false | typeof setDunderProto; + +export = x; \ No newline at end of file diff --git a/node_modules/dunder-proto/set.js b/node_modules/dunder-proto/set.js new file mode 100644 index 0000000..6085b6e --- /dev/null +++ b/node_modules/dunder-proto/set.js @@ -0,0 +1,35 @@ +'use strict'; + +var callBind = require('call-bind-apply-helpers'); +var gOPD = require('gopd'); +var $TypeError = require('es-errors/type'); + +/** @type {{ __proto__?: object | null }} */ +var obj = {}; +try { + obj.__proto__ = null; // eslint-disable-line no-proto +} catch (e) { + if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { + throw e; + } +} + +var hasProtoMutator = !('toString' in obj); + +// eslint-disable-next-line no-extra-parens +var desc = gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); + +/** @type {import('./set')} */ +module.exports = hasProtoMutator && ( +// eslint-disable-next-line no-extra-parens + (!!desc && typeof desc.set === 'function' && /** @type {import('./set')} */ (callBind([desc.set]))) + || /** @type {import('./set')} */ function setDunder(object, proto) { + // this is node v0.10 or older, which doesn't have Object.setPrototypeOf and has undeniable __proto__ + if (object == null) { // eslint-disable-line eqeqeq + throw new $TypeError('set Object.prototype.__proto__ called on null or undefined'); + } + // eslint-disable-next-line no-proto, no-param-reassign, no-extra-parens + /** @type {{ __proto__?: object | null }} */ (object).__proto__ = proto; + return proto; + } +); diff --git a/node_modules/dunder-proto/test/get.js b/node_modules/dunder-proto/test/get.js new file mode 100644 index 0000000..253f183 --- /dev/null +++ b/node_modules/dunder-proto/test/get.js @@ -0,0 +1,34 @@ +'use strict'; + +var test = require('tape'); + +var getDunderProto = require('../get'); + +test('getDunderProto', { skip: !getDunderProto }, function (t) { + if (!getDunderProto) { + throw 'should never happen; this is just for type narrowing'; // eslint-disable-line no-throw-literal + } + + // @ts-expect-error + t['throws'](function () { getDunderProto(); }, TypeError, 'throws if no argument'); + // @ts-expect-error + t['throws'](function () { getDunderProto(undefined); }, TypeError, 'throws with undefined'); + // @ts-expect-error + t['throws'](function () { getDunderProto(null); }, TypeError, 'throws with null'); + + t.equal(getDunderProto({}), Object.prototype); + t.equal(getDunderProto([]), Array.prototype); + t.equal(getDunderProto(function () {}), Function.prototype); + t.equal(getDunderProto(/./g), RegExp.prototype); + t.equal(getDunderProto(42), Number.prototype); + t.equal(getDunderProto(true), Boolean.prototype); + t.equal(getDunderProto('foo'), String.prototype); + + t.end(); +}); + +test('no dunder proto', { skip: !!getDunderProto }, function (t) { + t.notOk('__proto__' in Object.prototype, 'no __proto__ in Object.prototype'); + + t.end(); +}); diff --git a/node_modules/dunder-proto/test/index.js b/node_modules/dunder-proto/test/index.js new file mode 100644 index 0000000..08ff36f --- /dev/null +++ b/node_modules/dunder-proto/test/index.js @@ -0,0 +1,4 @@ +'use strict'; + +require('./get'); +require('./set'); diff --git a/node_modules/dunder-proto/test/set.js b/node_modules/dunder-proto/test/set.js new file mode 100644 index 0000000..c3bfe4d --- /dev/null +++ b/node_modules/dunder-proto/test/set.js @@ -0,0 +1,50 @@ +'use strict'; + +var test = require('tape'); + +var setDunderProto = require('../set'); + +test('setDunderProto', { skip: !setDunderProto }, function (t) { + if (!setDunderProto) { + throw 'should never happen; this is just for type narrowing'; // eslint-disable-line no-throw-literal + } + + // @ts-expect-error + t['throws'](function () { setDunderProto(); }, TypeError, 'throws if no arguments'); + // @ts-expect-error + t['throws'](function () { setDunderProto(undefined); }, TypeError, 'throws with undefined and nothing'); + // @ts-expect-error + t['throws'](function () { setDunderProto(undefined, undefined); }, TypeError, 'throws with undefined and undefined'); + // @ts-expect-error + t['throws'](function () { setDunderProto(null); }, TypeError, 'throws with null and undefined'); + // @ts-expect-error + t['throws'](function () { setDunderProto(null, undefined); }, TypeError, 'throws with null and undefined'); + + /** @type {{ inherited?: boolean }} */ + var obj = {}; + t.ok('toString' in obj, 'object initially has toString'); + + setDunderProto(obj, null); + t.notOk('toString' in obj, 'object no longer has toString'); + + t.notOk('inherited' in obj, 'object lacks inherited property'); + setDunderProto(obj, { inherited: true }); + t.equal(obj.inherited, true, 'object has inherited property'); + + t.end(); +}); + +test('no dunder proto', { skip: !!setDunderProto }, function (t) { + if ('__proto__' in Object.prototype) { + t['throws']( + // @ts-expect-error + function () { ({}).__proto__ = null; }, // eslint-disable-line no-proto + Error, + 'throws when setting Object.prototype.__proto__' + ); + } else { + t.notOk('__proto__' in Object.prototype, 'no __proto__ in Object.prototype'); + } + + t.end(); +}); diff --git a/node_modules/dunder-proto/tsconfig.json b/node_modules/dunder-proto/tsconfig.json new file mode 100644 index 0000000..dabbe23 --- /dev/null +++ b/node_modules/dunder-proto/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + "target": "ES2021", + }, + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/ee-first/LICENSE b/node_modules/ee-first/LICENSE new file mode 100644 index 0000000..a7ae8ee --- /dev/null +++ b/node_modules/ee-first/LICENSE @@ -0,0 +1,22 @@ + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.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. diff --git a/node_modules/ee-first/README.md b/node_modules/ee-first/README.md new file mode 100644 index 0000000..cbd2478 --- /dev/null +++ b/node_modules/ee-first/README.md @@ -0,0 +1,80 @@ +# EE First + +[![NPM version][npm-image]][npm-url] +[![Build status][travis-image]][travis-url] +[![Test coverage][coveralls-image]][coveralls-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] +[![Gittip][gittip-image]][gittip-url] + +Get the first event in a set of event emitters and event pairs, +then clean up after itself. + +## Install + +```sh +$ npm install ee-first +``` + +## API + +```js +var first = require('ee-first') +``` + +### first(arr, listener) + +Invoke `listener` on the first event from the list specified in `arr`. `arr` is +an array of arrays, with each array in the format `[ee, ...event]`. `listener` +will be called only once, the first time any of the given events are emitted. If +`error` is one of the listened events, then if that fires first, the `listener` +will be given the `err` argument. + +The `listener` is invoked as `listener(err, ee, event, args)`, where `err` is the +first argument emitted from an `error` event, if applicable; `ee` is the event +emitter that fired; `event` is the string event name that fired; and `args` is an +array of the arguments that were emitted on the event. + +```js +var ee1 = new EventEmitter() +var ee2 = new EventEmitter() + +first([ + [ee1, 'close', 'end', 'error'], + [ee2, 'error'] +], function (err, ee, event, args) { + // listener invoked +}) +``` + +#### .cancel() + +The group of listeners can be cancelled before being invoked and have all the event +listeners removed from the underlying event emitters. + +```js +var thunk = first([ + [ee1, 'close', 'end', 'error'], + [ee2, 'error'] +], function (err, ee, event, args) { + // listener invoked +}) + +// cancel and clean up +thunk.cancel() +``` + +[npm-image]: https://img.shields.io/npm/v/ee-first.svg?style=flat-square +[npm-url]: https://npmjs.org/package/ee-first +[github-tag]: http://img.shields.io/github/tag/jonathanong/ee-first.svg?style=flat-square +[github-url]: https://github.com/jonathanong/ee-first/tags +[travis-image]: https://img.shields.io/travis/jonathanong/ee-first.svg?style=flat-square +[travis-url]: https://travis-ci.org/jonathanong/ee-first +[coveralls-image]: https://img.shields.io/coveralls/jonathanong/ee-first.svg?style=flat-square +[coveralls-url]: https://coveralls.io/r/jonathanong/ee-first?branch=master +[license-image]: http://img.shields.io/npm/l/ee-first.svg?style=flat-square +[license-url]: LICENSE.md +[downloads-image]: http://img.shields.io/npm/dm/ee-first.svg?style=flat-square +[downloads-url]: https://npmjs.org/package/ee-first +[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square +[gittip-url]: https://www.gittip.com/jonathanong/ diff --git a/node_modules/ee-first/index.js b/node_modules/ee-first/index.js new file mode 100644 index 0000000..501287c --- /dev/null +++ b/node_modules/ee-first/index.js @@ -0,0 +1,95 @@ +/*! + * ee-first + * Copyright(c) 2014 Jonathan Ong + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = first + +/** + * Get the first event in a set of event emitters and event pairs. + * + * @param {array} stuff + * @param {function} done + * @public + */ + +function first(stuff, done) { + if (!Array.isArray(stuff)) + throw new TypeError('arg must be an array of [ee, events...] arrays') + + var cleanups = [] + + for (var i = 0; i < stuff.length; i++) { + var arr = stuff[i] + + if (!Array.isArray(arr) || arr.length < 2) + throw new TypeError('each array member must be [ee, events...]') + + var ee = arr[0] + + for (var j = 1; j < arr.length; j++) { + var event = arr[j] + var fn = listener(event, callback) + + // listen to the event + ee.on(event, fn) + // push this listener to the list of cleanups + cleanups.push({ + ee: ee, + event: event, + fn: fn, + }) + } + } + + function callback() { + cleanup() + done.apply(null, arguments) + } + + function cleanup() { + var x + for (var i = 0; i < cleanups.length; i++) { + x = cleanups[i] + x.ee.removeListener(x.event, x.fn) + } + } + + function thunk(fn) { + done = fn + } + + thunk.cancel = cleanup + + return thunk +} + +/** + * Create the event listener. + * @private + */ + +function listener(event, done) { + return function onevent(arg1) { + var args = new Array(arguments.length) + var ee = this + var err = event === 'error' + ? arg1 + : null + + // copy args to prevent arguments escaping scope + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + + done(err, ee, event, args) + } +} diff --git a/node_modules/ee-first/package.json b/node_modules/ee-first/package.json new file mode 100644 index 0000000..b6d0b7d --- /dev/null +++ b/node_modules/ee-first/package.json @@ -0,0 +1,29 @@ +{ + "name": "ee-first", + "description": "return the first event in a set of ee/event pairs", + "version": "1.1.1", + "author": { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com", + "twitter": "https://twitter.com/jongleberry" + }, + "contributors": [ + "Douglas Christopher Wilson " + ], + "license": "MIT", + "repository": "jonathanong/ee-first", + "devDependencies": { + "istanbul": "0.3.9", + "mocha": "2.2.5" + }, + "files": [ + "index.js", + "LICENSE" + ], + "scripts": { + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + } +} diff --git a/node_modules/encodeurl/LICENSE b/node_modules/encodeurl/LICENSE new file mode 100644 index 0000000..8812229 --- /dev/null +++ b/node_modules/encodeurl/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2016 Douglas Christopher Wilson + +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. diff --git a/node_modules/encodeurl/README.md b/node_modules/encodeurl/README.md new file mode 100644 index 0000000..3842493 --- /dev/null +++ b/node_modules/encodeurl/README.md @@ -0,0 +1,109 @@ +# Encode URL + +Encode a URL to a percent-encoded form, excluding already-encoded sequences. + +## Installation + +```sh +npm install encodeurl +``` + +## API + +```js +var encodeUrl = require('encodeurl') +``` + +### encodeUrl(url) + +Encode a URL to a percent-encoded form, excluding already-encoded sequences. + +This function accepts a URL and encodes all the non-URL code points (as UTF-8 byte sequences). It will not encode the "%" character unless it is not part of a valid sequence (`%20` will be left as-is, but `%foo` will be encoded as `%25foo`). + +This encode is meant to be "safe" and does not throw errors. It will try as hard as it can to properly encode the given URL, including replacing any raw, unpaired surrogate pairs with the Unicode replacement character prior to encoding. + +## Examples + +### Encode a URL containing user-controlled data + +```js +var encodeUrl = require('encodeurl') +var escapeHtml = require('escape-html') + +http.createServer(function onRequest (req, res) { + // get encoded form of inbound url + var url = encodeUrl(req.url) + + // create html message + var body = '

Location ' + escapeHtml(url) + ' not found

' + + // send a 404 + res.statusCode = 404 + res.setHeader('Content-Type', 'text/html; charset=UTF-8') + res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8'))) + res.end(body, 'utf-8') +}) +``` + +### Encode a URL for use in a header field + +```js +var encodeUrl = require('encodeurl') +var escapeHtml = require('escape-html') +var url = require('url') + +http.createServer(function onRequest (req, res) { + // parse inbound url + var href = url.parse(req) + + // set new host for redirect + href.host = 'localhost' + href.protocol = 'https:' + href.slashes = true + + // create location header + var location = encodeUrl(url.format(href)) + + // create html message + var body = '

Redirecting to new site: ' + escapeHtml(location) + '

' + + // send a 301 + res.statusCode = 301 + res.setHeader('Content-Type', 'text/html; charset=UTF-8') + res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8'))) + res.setHeader('Location', location) + res.end(body, 'utf-8') +}) +``` + +## Similarities + +This function is _similar_ to the intrinsic function `encodeURI`. However, it will not encode: + +* The `\`, `^`, or `|` characters +* The `%` character when it's part of a valid sequence +* `[` and `]` (for IPv6 hostnames) +* Replaces raw, unpaired surrogate pairs with the Unicode replacement character + +As a result, the encoding aligns closely with the behavior in the [WHATWG URL specification][whatwg-url]. However, this package only encodes strings and does not do any URL parsing or formatting. + +It is expected that any output from `new URL(url)` will not change when used with this package, as the output has already been encoded. Additionally, if we were to encode before `new URL(url)`, we do not expect the before and after encoded formats to be parsed any differently. + +## Testing + +```sh +$ npm test +$ npm run lint +``` + +## References + +- [RFC 3986: Uniform Resource Identifier (URI): Generic Syntax][rfc-3986] +- [WHATWG URL Living Standard][whatwg-url] + +[rfc-3986]: https://tools.ietf.org/html/rfc3986 +[whatwg-url]: https://url.spec.whatwg.org/ + +## License + +[MIT](LICENSE) diff --git a/node_modules/encodeurl/index.js b/node_modules/encodeurl/index.js new file mode 100644 index 0000000..a49ee5a --- /dev/null +++ b/node_modules/encodeurl/index.js @@ -0,0 +1,60 @@ +/*! + * encodeurl + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = encodeUrl + +/** + * RegExp to match non-URL code points, *after* encoding (i.e. not including "%") + * and including invalid escape sequences. + * @private + */ + +var ENCODE_CHARS_REGEXP = /(?:[^\x21\x23-\x3B\x3D\x3F-\x5F\x61-\x7A\x7C\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g + +/** + * RegExp to match unmatched surrogate pair. + * @private + */ + +var UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g + +/** + * String to replace unmatched surrogate pair with. + * @private + */ + +var UNMATCHED_SURROGATE_PAIR_REPLACE = '$1\uFFFD$2' + +/** + * Encode a URL to a percent-encoded form, excluding already-encoded sequences. + * + * This function will take an already-encoded URL and encode all the non-URL + * code points. This function will not encode the "%" character unless it is + * not part of a valid sequence (`%20` will be left as-is, but `%foo` will + * be encoded as `%25foo`). + * + * This encode is meant to be "safe" and does not throw errors. It will try as + * hard as it can to properly encode the given URL, including replacing any raw, + * unpaired surrogate pairs with the Unicode replacement character prior to + * encoding. + * + * @param {string} url + * @return {string} + * @public + */ + +function encodeUrl (url) { + return String(url) + .replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE) + .replace(ENCODE_CHARS_REGEXP, encodeURI) +} diff --git a/node_modules/encodeurl/package.json b/node_modules/encodeurl/package.json new file mode 100644 index 0000000..3133822 --- /dev/null +++ b/node_modules/encodeurl/package.json @@ -0,0 +1,40 @@ +{ + "name": "encodeurl", + "description": "Encode a URL to a percent-encoded form, excluding already-encoded sequences", + "version": "2.0.0", + "contributors": [ + "Douglas Christopher Wilson " + ], + "license": "MIT", + "keywords": [ + "encode", + "encodeurl", + "url" + ], + "repository": "pillarjs/encodeurl", + "devDependencies": { + "eslint": "5.11.1", + "eslint-config-standard": "12.0.0", + "eslint-plugin-import": "2.14.0", + "eslint-plugin-node": "7.0.1", + "eslint-plugin-promise": "4.0.1", + "eslint-plugin-standard": "4.0.0", + "istanbul": "0.4.5", + "mocha": "2.5.3" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "engines": { + "node": ">= 0.8" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + } +} diff --git a/node_modules/es-define-property/.eslintrc b/node_modules/es-define-property/.eslintrc new file mode 100644 index 0000000..46f3b12 --- /dev/null +++ b/node_modules/es-define-property/.eslintrc @@ -0,0 +1,13 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "new-cap": ["error", { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/es-define-property/.github/FUNDING.yml b/node_modules/es-define-property/.github/FUNDING.yml new file mode 100644 index 0000000..4445451 --- /dev/null +++ b/node_modules/es-define-property/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/es-define-property +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/es-define-property/.nycrc b/node_modules/es-define-property/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/es-define-property/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/es-define-property/CHANGELOG.md b/node_modules/es-define-property/CHANGELOG.md new file mode 100644 index 0000000..5f60cc0 --- /dev/null +++ b/node_modules/es-define-property/CHANGELOG.md @@ -0,0 +1,29 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.1](https://github.com/ljharb/es-define-property/compare/v1.0.0...v1.0.1) - 2024-12-06 + +### Commits + +- [types] use shared tsconfig [`954a663`](https://github.com/ljharb/es-define-property/commit/954a66360326e508a0e5daa4b07493d58f5e110e) +- [actions] split out node 10-20, and 20+ [`3a8e84b`](https://github.com/ljharb/es-define-property/commit/3a8e84b23883f26ff37b3e82ff283834228e18c6) +- [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/get-intrinsic`, `@types/tape`, `auto-changelog`, `gopd`, `tape` [`86ae27b`](https://github.com/ljharb/es-define-property/commit/86ae27bb8cc857b23885136fad9cbe965ae36612) +- [Refactor] avoid using `get-intrinsic` [`02480c0`](https://github.com/ljharb/es-define-property/commit/02480c0353ef6118965282977c3864aff53d98b1) +- [Tests] replace `aud` with `npm audit` [`f6093ff`](https://github.com/ljharb/es-define-property/commit/f6093ff74ab51c98015c2592cd393bd42478e773) +- [Tests] configure testling [`7139e66`](https://github.com/ljharb/es-define-property/commit/7139e66959247a56086d9977359caef27c6849e7) +- [Dev Deps] update `tape` [`b901b51`](https://github.com/ljharb/es-define-property/commit/b901b511a75e001a40ce1a59fef7d9ffcfc87482) +- [Tests] fix types in tests [`469d269`](https://github.com/ljharb/es-define-property/commit/469d269fd141b1e773ec053a9fa35843493583e0) +- [Dev Deps] add missing peer dep [`733acfb`](https://github.com/ljharb/es-define-property/commit/733acfb0c4c96edf337e470b89a25a5b3724c352) + +## v1.0.0 - 2024-02-12 + +### Commits + +- Initial implementation, tests, readme, types [`3e154e1`](https://github.com/ljharb/es-define-property/commit/3e154e11a2fee09127220f5e503bf2c0a31dd480) +- Initial commit [`07d98de`](https://github.com/ljharb/es-define-property/commit/07d98de34a4dc31ff5e83a37c0c3f49e0d85cd50) +- npm init [`c4eb634`](https://github.com/ljharb/es-define-property/commit/c4eb6348b0d3886aac36cef34ad2ee0665ea6f3e) +- Only apps should have lockfiles [`7af86ec`](https://github.com/ljharb/es-define-property/commit/7af86ec1d311ec0b17fdfe616a25f64276903856) diff --git a/node_modules/es-define-property/LICENSE b/node_modules/es-define-property/LICENSE new file mode 100644 index 0000000..f82f389 --- /dev/null +++ b/node_modules/es-define-property/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Jordan Harband + +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. diff --git a/node_modules/es-define-property/README.md b/node_modules/es-define-property/README.md new file mode 100644 index 0000000..9b291bd --- /dev/null +++ b/node_modules/es-define-property/README.md @@ -0,0 +1,49 @@ +# es-define-property [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +`Object.defineProperty`, but not IE 8's broken one. + +## Example + +```js +const assert = require('assert'); + +const $defineProperty = require('es-define-property'); + +if ($defineProperty) { + assert.equal($defineProperty, Object.defineProperty); +} else if (Object.defineProperty) { + assert.equal($defineProperty, false, 'this is IE 8'); +} else { + assert.equal($defineProperty, false, 'this is an ES3 engine'); +} +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/es-define-property +[npm-version-svg]: https://versionbadg.es/ljharb/es-define-property.svg +[deps-svg]: https://david-dm.org/ljharb/es-define-property.svg +[deps-url]: https://david-dm.org/ljharb/es-define-property +[dev-deps-svg]: https://david-dm.org/ljharb/es-define-property/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/es-define-property#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/es-define-property.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/es-define-property.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/es-define-property.svg +[downloads-url]: https://npm-stat.com/charts.html?package=es-define-property +[codecov-image]: https://codecov.io/gh/ljharb/es-define-property/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/es-define-property/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-define-property +[actions-url]: https://github.com/ljharb/es-define-property/actions diff --git a/node_modules/es-define-property/index.d.ts b/node_modules/es-define-property/index.d.ts new file mode 100644 index 0000000..6012247 --- /dev/null +++ b/node_modules/es-define-property/index.d.ts @@ -0,0 +1,3 @@ +declare const defineProperty: false | typeof Object.defineProperty; + +export = defineProperty; \ No newline at end of file diff --git a/node_modules/es-define-property/index.js b/node_modules/es-define-property/index.js new file mode 100644 index 0000000..e0a2925 --- /dev/null +++ b/node_modules/es-define-property/index.js @@ -0,0 +1,14 @@ +'use strict'; + +/** @type {import('.')} */ +var $defineProperty = Object.defineProperty || false; +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = false; + } +} + +module.exports = $defineProperty; diff --git a/node_modules/es-define-property/package.json b/node_modules/es-define-property/package.json new file mode 100644 index 0000000..fbed187 --- /dev/null +++ b/node_modules/es-define-property/package.json @@ -0,0 +1,81 @@ +{ + "name": "es-define-property", + "version": "1.0.1", + "description": "`Object.defineProperty`, but not IE 8's broken one.", + "main": "index.js", + "types": "./index.d.ts", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx npm@'>= 10.2' audit --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/es-define-property.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "object", + "define", + "property", + "defineProperty", + "Object.defineProperty" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/es-define-property/issues" + }, + "homepage": "https://github.com/ljharb/es-define-property#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.1", + "@ljharb/tsconfig": "^0.2.2", + "@types/gopd": "^1.0.3", + "@types/tape": "^5.6.5", + "auto-changelog": "^2.5.0", + "encoding": "^0.1.13", + "eslint": "^8.8.0", + "evalmd": "^0.0.19", + "gopd": "^1.2.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "engines": { + "node": ">= 0.4" + }, + "testling": { + "files": "test/index.js" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/es-define-property/test/index.js b/node_modules/es-define-property/test/index.js new file mode 100644 index 0000000..b4b4688 --- /dev/null +++ b/node_modules/es-define-property/test/index.js @@ -0,0 +1,56 @@ +'use strict'; + +var $defineProperty = require('../'); + +var test = require('tape'); +var gOPD = require('gopd'); + +test('defineProperty: supported', { skip: !$defineProperty }, function (t) { + t.plan(4); + + t.equal(typeof $defineProperty, 'function', 'defineProperty is supported'); + if ($defineProperty && gOPD) { // this `if` check is just to shut TS up + /** @type {{ a: number, b?: number, c?: number }} */ + var o = { a: 1 }; + + $defineProperty(o, 'b', { enumerable: true, value: 2 }); + t.deepEqual( + gOPD(o, 'b'), + { + configurable: false, + enumerable: true, + value: 2, + writable: false + }, + 'property descriptor is as expected' + ); + + $defineProperty(o, 'c', { enumerable: false, value: 3, writable: true }); + t.deepEqual( + gOPD(o, 'c'), + { + configurable: false, + enumerable: false, + value: 3, + writable: true + }, + 'property descriptor is as expected' + ); + } + + t.equal($defineProperty, Object.defineProperty, 'defineProperty is Object.defineProperty'); + + t.end(); +}); + +test('defineProperty: not supported', { skip: !!$defineProperty }, function (t) { + t.notOk($defineProperty, 'defineProperty is not supported'); + + t.match( + typeof $defineProperty, + /^(?:undefined|boolean)$/, + '`typeof defineProperty` is `undefined` or `boolean`' + ); + + t.end(); +}); diff --git a/node_modules/es-define-property/tsconfig.json b/node_modules/es-define-property/tsconfig.json new file mode 100644 index 0000000..5a49992 --- /dev/null +++ b/node_modules/es-define-property/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + "target": "es2022", + }, + "exclude": [ + "coverage", + "test/list-exports" + ], +} diff --git a/node_modules/es-errors/.eslintrc b/node_modules/es-errors/.eslintrc new file mode 100644 index 0000000..3b5d9e9 --- /dev/null +++ b/node_modules/es-errors/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/es-errors/.github/FUNDING.yml b/node_modules/es-errors/.github/FUNDING.yml new file mode 100644 index 0000000..f1b8805 --- /dev/null +++ b/node_modules/es-errors/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/es-errors +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/es-errors/CHANGELOG.md b/node_modules/es-errors/CHANGELOG.md new file mode 100644 index 0000000..204a9e9 --- /dev/null +++ b/node_modules/es-errors/CHANGELOG.md @@ -0,0 +1,40 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.3.0](https://github.com/ljharb/es-errors/compare/v1.2.1...v1.3.0) - 2024-02-05 + +### Commits + +- [New] add `EvalError` and `URIError` [`1927627`](https://github.com/ljharb/es-errors/commit/1927627ba68cb6c829d307231376c967db53acdf) + +## [v1.2.1](https://github.com/ljharb/es-errors/compare/v1.2.0...v1.2.1) - 2024-02-04 + +### Commits + +- [Fix] add missing `exports` entry [`5bb5f28`](https://github.com/ljharb/es-errors/commit/5bb5f280f98922701109d6ebb82eea2257cecc7e) + +## [v1.2.0](https://github.com/ljharb/es-errors/compare/v1.1.0...v1.2.0) - 2024-02-04 + +### Commits + +- [New] add `ReferenceError` [`6d8cf5b`](https://github.com/ljharb/es-errors/commit/6d8cf5bbb6f3f598d02cf6f30e468ba2caa8e143) + +## [v1.1.0](https://github.com/ljharb/es-errors/compare/v1.0.0...v1.1.0) - 2024-02-04 + +### Commits + +- [New] add base Error [`2983ab6`](https://github.com/ljharb/es-errors/commit/2983ab65f7bc5441276cb021dc3aa03c78881698) + +## v1.0.0 - 2024-02-03 + +### Commits + +- Initial implementation, tests, readme, type [`8f47631`](https://github.com/ljharb/es-errors/commit/8f476317e9ad76f40ad648081829b1a1a3a1288b) +- Initial commit [`ea5d099`](https://github.com/ljharb/es-errors/commit/ea5d099ef18e550509ab9e2be000526afd81c385) +- npm init [`6f5ebf9`](https://github.com/ljharb/es-errors/commit/6f5ebf9cead474dadd72b9e63dad315820a089ae) +- Only apps should have lockfiles [`e1a0aeb`](https://github.com/ljharb/es-errors/commit/e1a0aeb7b80f5cfc56be54d6b2100e915d47def8) +- [meta] add `sideEffects` flag [`a9c7d46`](https://github.com/ljharb/es-errors/commit/a9c7d460a492f1d8a241c836bc25a322a19cc043) diff --git a/node_modules/es-errors/LICENSE b/node_modules/es-errors/LICENSE new file mode 100644 index 0000000..f82f389 --- /dev/null +++ b/node_modules/es-errors/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Jordan Harband + +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. diff --git a/node_modules/es-errors/README.md b/node_modules/es-errors/README.md new file mode 100644 index 0000000..8dbfacf --- /dev/null +++ b/node_modules/es-errors/README.md @@ -0,0 +1,55 @@ +# es-errors [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +A simple cache for a few of the JS Error constructors. + +## Example + +```js +const assert = require('assert'); + +const Base = require('es-errors'); +const Eval = require('es-errors/eval'); +const Range = require('es-errors/range'); +const Ref = require('es-errors/ref'); +const Syntax = require('es-errors/syntax'); +const Type = require('es-errors/type'); +const URI = require('es-errors/uri'); + +assert.equal(Base, Error); +assert.equal(Eval, EvalError); +assert.equal(Range, RangeError); +assert.equal(Ref, ReferenceError); +assert.equal(Syntax, SyntaxError); +assert.equal(Type, TypeError); +assert.equal(URI, URIError); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/es-errors +[npm-version-svg]: https://versionbadg.es/ljharb/es-errors.svg +[deps-svg]: https://david-dm.org/ljharb/es-errors.svg +[deps-url]: https://david-dm.org/ljharb/es-errors +[dev-deps-svg]: https://david-dm.org/ljharb/es-errors/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/es-errors#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/es-errors.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/es-errors.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/es-errors.svg +[downloads-url]: https://npm-stat.com/charts.html?package=es-errors +[codecov-image]: https://codecov.io/gh/ljharb/es-errors/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/es-errors/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-errors +[actions-url]: https://github.com/ljharb/es-errors/actions diff --git a/node_modules/es-errors/eval.d.ts b/node_modules/es-errors/eval.d.ts new file mode 100644 index 0000000..e4210e0 --- /dev/null +++ b/node_modules/es-errors/eval.d.ts @@ -0,0 +1,3 @@ +declare const EvalError: EvalErrorConstructor; + +export = EvalError; diff --git a/node_modules/es-errors/eval.js b/node_modules/es-errors/eval.js new file mode 100644 index 0000000..725ccb6 --- /dev/null +++ b/node_modules/es-errors/eval.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./eval')} */ +module.exports = EvalError; diff --git a/node_modules/es-errors/index.d.ts b/node_modules/es-errors/index.d.ts new file mode 100644 index 0000000..69bdbc9 --- /dev/null +++ b/node_modules/es-errors/index.d.ts @@ -0,0 +1,3 @@ +declare const Error: ErrorConstructor; + +export = Error; diff --git a/node_modules/es-errors/index.js b/node_modules/es-errors/index.js new file mode 100644 index 0000000..cc0c521 --- /dev/null +++ b/node_modules/es-errors/index.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('.')} */ +module.exports = Error; diff --git a/node_modules/es-errors/package.json b/node_modules/es-errors/package.json new file mode 100644 index 0000000..ff8c2a5 --- /dev/null +++ b/node_modules/es-errors/package.json @@ -0,0 +1,80 @@ +{ + "name": "es-errors", + "version": "1.3.0", + "description": "A simple cache for a few of the JS Error constructors.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./eval": "./eval.js", + "./range": "./range.js", + "./ref": "./ref.js", + "./syntax": "./syntax.js", + "./type": "./type.js", + "./uri": "./uri.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "posttest": "aud --production", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/es-errors.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "error", + "typeerror", + "syntaxerror", + "rangeerror" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/es-errors/issues" + }, + "homepage": "https://github.com/ljharb/es-errors#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eclint": "^2.8.1", + "eslint": "^8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.4", + "typescript": "next" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/es-errors/range.d.ts b/node_modules/es-errors/range.d.ts new file mode 100644 index 0000000..3a12e86 --- /dev/null +++ b/node_modules/es-errors/range.d.ts @@ -0,0 +1,3 @@ +declare const RangeError: RangeErrorConstructor; + +export = RangeError; diff --git a/node_modules/es-errors/range.js b/node_modules/es-errors/range.js new file mode 100644 index 0000000..2044fe0 --- /dev/null +++ b/node_modules/es-errors/range.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./range')} */ +module.exports = RangeError; diff --git a/node_modules/es-errors/ref.d.ts b/node_modules/es-errors/ref.d.ts new file mode 100644 index 0000000..a13107e --- /dev/null +++ b/node_modules/es-errors/ref.d.ts @@ -0,0 +1,3 @@ +declare const ReferenceError: ReferenceErrorConstructor; + +export = ReferenceError; diff --git a/node_modules/es-errors/ref.js b/node_modules/es-errors/ref.js new file mode 100644 index 0000000..d7c430f --- /dev/null +++ b/node_modules/es-errors/ref.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./ref')} */ +module.exports = ReferenceError; diff --git a/node_modules/es-errors/syntax.d.ts b/node_modules/es-errors/syntax.d.ts new file mode 100644 index 0000000..6a0c53c --- /dev/null +++ b/node_modules/es-errors/syntax.d.ts @@ -0,0 +1,3 @@ +declare const SyntaxError: SyntaxErrorConstructor; + +export = SyntaxError; diff --git a/node_modules/es-errors/syntax.js b/node_modules/es-errors/syntax.js new file mode 100644 index 0000000..5f5fdde --- /dev/null +++ b/node_modules/es-errors/syntax.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./syntax')} */ +module.exports = SyntaxError; diff --git a/node_modules/es-errors/test/index.js b/node_modules/es-errors/test/index.js new file mode 100644 index 0000000..1ff0277 --- /dev/null +++ b/node_modules/es-errors/test/index.js @@ -0,0 +1,19 @@ +'use strict'; + +var test = require('tape'); + +var E = require('../'); +var R = require('../range'); +var Ref = require('../ref'); +var S = require('../syntax'); +var T = require('../type'); + +test('errors', function (t) { + t.equal(E, Error); + t.equal(R, RangeError); + t.equal(Ref, ReferenceError); + t.equal(S, SyntaxError); + t.equal(T, TypeError); + + t.end(); +}); diff --git a/node_modules/es-errors/tsconfig.json b/node_modules/es-errors/tsconfig.json new file mode 100644 index 0000000..99dfeb6 --- /dev/null +++ b/node_modules/es-errors/tsconfig.json @@ -0,0 +1,49 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": ["types"], /* Specify multiple folders that act like `./node_modules/@types`. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow `import x from y` when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + + /* Completeness */ + // "skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/es-errors/type.d.ts b/node_modules/es-errors/type.d.ts new file mode 100644 index 0000000..576fb51 --- /dev/null +++ b/node_modules/es-errors/type.d.ts @@ -0,0 +1,3 @@ +declare const TypeError: TypeErrorConstructor + +export = TypeError; diff --git a/node_modules/es-errors/type.js b/node_modules/es-errors/type.js new file mode 100644 index 0000000..9769e44 --- /dev/null +++ b/node_modules/es-errors/type.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./type')} */ +module.exports = TypeError; diff --git a/node_modules/es-errors/uri.d.ts b/node_modules/es-errors/uri.d.ts new file mode 100644 index 0000000..c3261c9 --- /dev/null +++ b/node_modules/es-errors/uri.d.ts @@ -0,0 +1,3 @@ +declare const URIError: URIErrorConstructor; + +export = URIError; diff --git a/node_modules/es-errors/uri.js b/node_modules/es-errors/uri.js new file mode 100644 index 0000000..e9cd1c7 --- /dev/null +++ b/node_modules/es-errors/uri.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./uri')} */ +module.exports = URIError; diff --git a/node_modules/es-object-atoms/.eslintrc b/node_modules/es-object-atoms/.eslintrc new file mode 100644 index 0000000..d90a1bc --- /dev/null +++ b/node_modules/es-object-atoms/.eslintrc @@ -0,0 +1,16 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "eqeqeq": ["error", "allow-null"], + "id-length": "off", + "new-cap": ["error", { + "capIsNewExceptions": [ + "RequireObjectCoercible", + "ToObject", + ], + }], + }, +} diff --git a/node_modules/es-object-atoms/.github/FUNDING.yml b/node_modules/es-object-atoms/.github/FUNDING.yml new file mode 100644 index 0000000..352bfda --- /dev/null +++ b/node_modules/es-object-atoms/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/es-object +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/es-object-atoms/CHANGELOG.md b/node_modules/es-object-atoms/CHANGELOG.md new file mode 100644 index 0000000..fdd2abe --- /dev/null +++ b/node_modules/es-object-atoms/CHANGELOG.md @@ -0,0 +1,37 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.1](https://github.com/ljharb/es-object-atoms/compare/v1.1.0...v1.1.1) - 2025-01-14 + +### Commits + +- [types] `ToObject`: improve types [`cfe8c8a`](https://github.com/ljharb/es-object-atoms/commit/cfe8c8a105c44820cb22e26f62d12ef0ad9715c8) + +## [v1.1.0](https://github.com/ljharb/es-object-atoms/compare/v1.0.1...v1.1.0) - 2025-01-14 + +### Commits + +- [New] add `isObject` [`51e4042`](https://github.com/ljharb/es-object-atoms/commit/51e4042df722eb3165f40dc5f4bf33d0197ecb07) + +## [v1.0.1](https://github.com/ljharb/es-object-atoms/compare/v1.0.0...v1.0.1) - 2025-01-13 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/tape`, `auto-changelog`, `tape` [`38ab9eb`](https://github.com/ljharb/es-object-atoms/commit/38ab9eb00b62c2f4668644f5e513d9b414ebd595) +- [types] improve types [`7d1beb8`](https://github.com/ljharb/es-object-atoms/commit/7d1beb887958b78b6a728a210a1c8370ab7e2aa1) +- [Tests] replace `aud` with `npm audit` [`25863ba`](https://github.com/ljharb/es-object-atoms/commit/25863baf99178f1d1ad33d1120498db28631907e) +- [Dev Deps] add missing peer dep [`c012309`](https://github.com/ljharb/es-object-atoms/commit/c0123091287e6132d6f4240496340c427433df28) + +## v1.0.0 - 2024-03-16 + +### Commits + +- Initial implementation, tests, readme, types [`f1499db`](https://github.com/ljharb/es-object-atoms/commit/f1499db7d3e1741e64979c61d645ab3137705e82) +- Initial commit [`99eedc7`](https://github.com/ljharb/es-object-atoms/commit/99eedc7b5fde38a50a28d3c8b724706e3e4c5f6a) +- [meta] rename repo [`fc851fa`](https://github.com/ljharb/es-object-atoms/commit/fc851fa70616d2d182aaf0bd02c2ed7084dea8fa) +- npm init [`b909377`](https://github.com/ljharb/es-object-atoms/commit/b909377c50049bd0ec575562d20b0f9ebae8947f) +- Only apps should have lockfiles [`7249edd`](https://github.com/ljharb/es-object-atoms/commit/7249edd2178c1b9ddfc66ffcc6d07fdf0d28efc1) diff --git a/node_modules/es-object-atoms/LICENSE b/node_modules/es-object-atoms/LICENSE new file mode 100644 index 0000000..f82f389 --- /dev/null +++ b/node_modules/es-object-atoms/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Jordan Harband + +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. diff --git a/node_modules/es-object-atoms/README.md b/node_modules/es-object-atoms/README.md new file mode 100644 index 0000000..447695b --- /dev/null +++ b/node_modules/es-object-atoms/README.md @@ -0,0 +1,63 @@ +# es-object-atoms [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +ES Object-related atoms: Object, ToObject, RequireObjectCoercible. + +## Example + +```js +const assert = require('assert'); + +const $Object = require('es-object-atoms'); +const isObject = require('es-object-atoms/isObject'); +const ToObject = require('es-object-atoms/ToObject'); +const RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible'); + +assert.equal($Object, Object); +assert.throws(() => ToObject(null), TypeError); +assert.throws(() => ToObject(undefined), TypeError); +assert.throws(() => RequireObjectCoercible(null), TypeError); +assert.throws(() => RequireObjectCoercible(undefined), TypeError); + +assert.equal(isObject(undefined), false); +assert.equal(isObject(null), false); +assert.equal(isObject({}), true); +assert.equal(isObject([]), true); +assert.equal(isObject(function () {}), true); + +assert.deepEqual(RequireObjectCoercible(true), true); +assert.deepEqual(ToObject(true), Object(true)); + +const obj = {}; +assert.equal(RequireObjectCoercible(obj), obj); +assert.equal(ToObject(obj), obj); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/es-object-atoms +[npm-version-svg]: https://versionbadg.es/ljharb/es-object-atoms.svg +[deps-svg]: https://david-dm.org/ljharb/es-object-atoms.svg +[deps-url]: https://david-dm.org/ljharb/es-object-atoms +[dev-deps-svg]: https://david-dm.org/ljharb/es-object-atoms/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/es-object-atoms#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/es-object-atoms.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/es-object-atoms.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/es-object.svg +[downloads-url]: https://npm-stat.com/charts.html?package=es-object-atoms +[codecov-image]: https://codecov.io/gh/ljharb/es-object-atoms/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/es-object-atoms/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-object-atoms +[actions-url]: https://github.com/ljharb/es-object-atoms/actions diff --git a/node_modules/es-object-atoms/RequireObjectCoercible.d.ts b/node_modules/es-object-atoms/RequireObjectCoercible.d.ts new file mode 100644 index 0000000..7e26c45 --- /dev/null +++ b/node_modules/es-object-atoms/RequireObjectCoercible.d.ts @@ -0,0 +1,3 @@ +declare function RequireObjectCoercible(value: T, optMessage?: string): T; + +export = RequireObjectCoercible; diff --git a/node_modules/es-object-atoms/RequireObjectCoercible.js b/node_modules/es-object-atoms/RequireObjectCoercible.js new file mode 100644 index 0000000..8e191c6 --- /dev/null +++ b/node_modules/es-object-atoms/RequireObjectCoercible.js @@ -0,0 +1,11 @@ +'use strict'; + +var $TypeError = require('es-errors/type'); + +/** @type {import('./RequireObjectCoercible')} */ +module.exports = function RequireObjectCoercible(value) { + if (value == null) { + throw new $TypeError((arguments.length > 0 && arguments[1]) || ('Cannot call method on ' + value)); + } + return value; +}; diff --git a/node_modules/es-object-atoms/ToObject.d.ts b/node_modules/es-object-atoms/ToObject.d.ts new file mode 100644 index 0000000..d6dd302 --- /dev/null +++ b/node_modules/es-object-atoms/ToObject.d.ts @@ -0,0 +1,7 @@ +declare function ToObject(value: number): Number; +declare function ToObject(value: boolean): Boolean; +declare function ToObject(value: string): String; +declare function ToObject(value: bigint): BigInt; +declare function ToObject(value: T): T; + +export = ToObject; diff --git a/node_modules/es-object-atoms/ToObject.js b/node_modules/es-object-atoms/ToObject.js new file mode 100644 index 0000000..2b99a7d --- /dev/null +++ b/node_modules/es-object-atoms/ToObject.js @@ -0,0 +1,10 @@ +'use strict'; + +var $Object = require('./'); +var RequireObjectCoercible = require('./RequireObjectCoercible'); + +/** @type {import('./ToObject')} */ +module.exports = function ToObject(value) { + RequireObjectCoercible(value); + return $Object(value); +}; diff --git a/node_modules/es-object-atoms/index.d.ts b/node_modules/es-object-atoms/index.d.ts new file mode 100644 index 0000000..8bdbfc8 --- /dev/null +++ b/node_modules/es-object-atoms/index.d.ts @@ -0,0 +1,3 @@ +declare const Object: ObjectConstructor; + +export = Object; diff --git a/node_modules/es-object-atoms/index.js b/node_modules/es-object-atoms/index.js new file mode 100644 index 0000000..1d33cef --- /dev/null +++ b/node_modules/es-object-atoms/index.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('.')} */ +module.exports = Object; diff --git a/node_modules/es-object-atoms/isObject.d.ts b/node_modules/es-object-atoms/isObject.d.ts new file mode 100644 index 0000000..43bee3b --- /dev/null +++ b/node_modules/es-object-atoms/isObject.d.ts @@ -0,0 +1,3 @@ +declare function isObject(x: unknown): x is object; + +export = isObject; diff --git a/node_modules/es-object-atoms/isObject.js b/node_modules/es-object-atoms/isObject.js new file mode 100644 index 0000000..ec49bf1 --- /dev/null +++ b/node_modules/es-object-atoms/isObject.js @@ -0,0 +1,6 @@ +'use strict'; + +/** @type {import('./isObject')} */ +module.exports = function isObject(x) { + return !!x && (typeof x === 'function' || typeof x === 'object'); +}; diff --git a/node_modules/es-object-atoms/package.json b/node_modules/es-object-atoms/package.json new file mode 100644 index 0000000..f4cec71 --- /dev/null +++ b/node_modules/es-object-atoms/package.json @@ -0,0 +1,80 @@ +{ + "name": "es-object-atoms", + "version": "1.1.1", + "description": "ES Object-related atoms: Object, ToObject, RequireObjectCoercible", + "main": "index.js", + "exports": { + ".": "./index.js", + "./RequireObjectCoercible": "./RequireObjectCoercible.js", + "./isObject": "./isObject.js", + "./ToObject": "./ToObject.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "posttest": "npx npm@\">= 10.2\" audit --production", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/es-object-atoms.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "object", + "toobject", + "coercible" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/es-object-atoms/issues" + }, + "homepage": "https://github.com/ljharb/es-object-atoms#readme", + "dependencies": { + "es-errors": "^1.3.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.1", + "@ljharb/tsconfig": "^0.2.3", + "@types/tape": "^5.8.1", + "auto-changelog": "^2.5.0", + "eclint": "^2.8.1", + "encoding": "^0.1.13", + "eslint": "^8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/es-object-atoms/test/index.js b/node_modules/es-object-atoms/test/index.js new file mode 100644 index 0000000..430b705 --- /dev/null +++ b/node_modules/es-object-atoms/test/index.js @@ -0,0 +1,38 @@ +'use strict'; + +var test = require('tape'); + +var $Object = require('../'); +var isObject = require('../isObject'); +var ToObject = require('../ToObject'); +var RequireObjectCoercible = require('..//RequireObjectCoercible'); + +test('errors', function (t) { + t.equal($Object, Object); + // @ts-expect-error + t['throws'](function () { ToObject(null); }, TypeError); + // @ts-expect-error + t['throws'](function () { ToObject(undefined); }, TypeError); + // @ts-expect-error + t['throws'](function () { RequireObjectCoercible(null); }, TypeError); + // @ts-expect-error + t['throws'](function () { RequireObjectCoercible(undefined); }, TypeError); + + t.deepEqual(RequireObjectCoercible(true), true); + t.deepEqual(ToObject(true), Object(true)); + t.deepEqual(ToObject(42), Object(42)); + var f = function () {}; + t.equal(ToObject(f), f); + + t.equal(isObject(undefined), false); + t.equal(isObject(null), false); + t.equal(isObject({}), true); + t.equal(isObject([]), true); + t.equal(isObject(function () {}), true); + + var obj = {}; + t.equal(RequireObjectCoercible(obj), obj); + t.equal(ToObject(obj), obj); + + t.end(); +}); diff --git a/node_modules/es-object-atoms/tsconfig.json b/node_modules/es-object-atoms/tsconfig.json new file mode 100644 index 0000000..1f73cb7 --- /dev/null +++ b/node_modules/es-object-atoms/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + "target": "es5", + }, +} diff --git a/node_modules/esbuild/LICENSE.md b/node_modules/esbuild/LICENSE.md new file mode 100644 index 0000000..2027e8d --- /dev/null +++ b/node_modules/esbuild/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Evan Wallace + +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. diff --git a/node_modules/esbuild/README.md b/node_modules/esbuild/README.md new file mode 100644 index 0000000..93863d1 --- /dev/null +++ b/node_modules/esbuild/README.md @@ -0,0 +1,3 @@ +# esbuild + +This is a JavaScript bundler and minifier. See https://github.com/evanw/esbuild and the [JavaScript API documentation](https://esbuild.github.io/api/) for details. diff --git a/node_modules/esbuild/bin/esbuild b/node_modules/esbuild/bin/esbuild new file mode 100755 index 0000000..d24f405 Binary files /dev/null and b/node_modules/esbuild/bin/esbuild differ diff --git a/node_modules/esbuild/install.js b/node_modules/esbuild/install.js new file mode 100644 index 0000000..5954864 --- /dev/null +++ b/node_modules/esbuild/install.js @@ -0,0 +1,287 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); + +// lib/npm/node-platform.ts +var fs = require("fs"); +var os = require("os"); +var path = require("path"); +var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH; +var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild"; +var knownWindowsPackages = { + "win32 arm64 LE": "@esbuild/win32-arm64", + "win32 ia32 LE": "@esbuild/win32-ia32", + "win32 x64 LE": "@esbuild/win32-x64" +}; +var knownUnixlikePackages = { + "aix ppc64 BE": "@esbuild/aix-ppc64", + "android arm64 LE": "@esbuild/android-arm64", + "darwin arm64 LE": "@esbuild/darwin-arm64", + "darwin x64 LE": "@esbuild/darwin-x64", + "freebsd arm64 LE": "@esbuild/freebsd-arm64", + "freebsd x64 LE": "@esbuild/freebsd-x64", + "linux arm LE": "@esbuild/linux-arm", + "linux arm64 LE": "@esbuild/linux-arm64", + "linux ia32 LE": "@esbuild/linux-ia32", + "linux mips64el LE": "@esbuild/linux-mips64el", + "linux ppc64 LE": "@esbuild/linux-ppc64", + "linux riscv64 LE": "@esbuild/linux-riscv64", + "linux s390x BE": "@esbuild/linux-s390x", + "linux x64 LE": "@esbuild/linux-x64", + "linux loong64 LE": "@esbuild/linux-loong64", + "netbsd arm64 LE": "@esbuild/netbsd-arm64", + "netbsd x64 LE": "@esbuild/netbsd-x64", + "openbsd arm64 LE": "@esbuild/openbsd-arm64", + "openbsd x64 LE": "@esbuild/openbsd-x64", + "sunos x64 LE": "@esbuild/sunos-x64" +}; +var knownWebAssemblyFallbackPackages = { + "android arm LE": "@esbuild/android-arm", + "android x64 LE": "@esbuild/android-x64" +}; +function pkgAndSubpathForCurrentPlatform() { + let pkg; + let subpath; + let isWASM = false; + let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`; + if (platformKey in knownWindowsPackages) { + pkg = knownWindowsPackages[platformKey]; + subpath = "esbuild.exe"; + } else if (platformKey in knownUnixlikePackages) { + pkg = knownUnixlikePackages[platformKey]; + subpath = "bin/esbuild"; + } else if (platformKey in knownWebAssemblyFallbackPackages) { + pkg = knownWebAssemblyFallbackPackages[platformKey]; + subpath = "bin/esbuild"; + isWASM = true; + } else { + throw new Error(`Unsupported platform: ${platformKey}`); + } + return { pkg, subpath, isWASM }; +} +function downloadedBinPath(pkg, subpath) { + const esbuildLibDir = path.dirname(require.resolve("esbuild")); + return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`); +} + +// lib/npm/node-install.ts +var fs2 = require("fs"); +var os2 = require("os"); +var path2 = require("path"); +var zlib = require("zlib"); +var https = require("https"); +var child_process = require("child_process"); +var versionFromPackageJSON = require(path2.join(__dirname, "package.json")).version; +var toPath = path2.join(__dirname, "bin", "esbuild"); +var isToPathJS = true; +function validateBinaryVersion(...command) { + command.push("--version"); + let stdout; + try { + stdout = child_process.execFileSync(command.shift(), command, { + // Without this, this install script strangely crashes with the error + // "EACCES: permission denied, write" but only on Ubuntu Linux when node is + // installed from the Snap Store. This is not a problem when you download + // the official version of node. The problem appears to be that stderr + // (i.e. file descriptor 2) isn't writable? + // + // More info: + // - https://snapcraft.io/ (what the Snap Store is) + // - https://nodejs.org/dist/ (download the official version of node) + // - https://github.com/evanw/esbuild/issues/1711#issuecomment-1027554035 + // + stdio: "pipe" + }).toString().trim(); + } catch (err) { + if (os2.platform() === "darwin" && /_SecTrustEvaluateWithError/.test(err + "")) { + let os3 = "this version of macOS"; + try { + os3 = "macOS " + child_process.execFileSync("sw_vers", ["-productVersion"]).toString().trim(); + } catch { + } + throw new Error(`The "esbuild" package cannot be installed because ${os3} is too outdated. + +The Go compiler (which esbuild relies on) no longer supports ${os3}, +which means the "esbuild" binary executable can't be run. You can either: + + * Update your version of macOS to one that the Go compiler supports + * Use the "esbuild-wasm" package instead of the "esbuild" package + * Build esbuild yourself using an older version of the Go compiler +`); + } + throw err; + } + if (stdout !== versionFromPackageJSON) { + throw new Error(`Expected ${JSON.stringify(versionFromPackageJSON)} but got ${JSON.stringify(stdout)}`); + } +} +function isYarn() { + const { npm_config_user_agent } = process.env; + if (npm_config_user_agent) { + return /\byarn\//.test(npm_config_user_agent); + } + return false; +} +function fetch(url) { + return new Promise((resolve, reject) => { + https.get(url, (res) => { + if ((res.statusCode === 301 || res.statusCode === 302) && res.headers.location) + return fetch(res.headers.location).then(resolve, reject); + if (res.statusCode !== 200) + return reject(new Error(`Server responded with ${res.statusCode}`)); + let chunks = []; + res.on("data", (chunk) => chunks.push(chunk)); + res.on("end", () => resolve(Buffer.concat(chunks))); + }).on("error", reject); + }); +} +function extractFileFromTarGzip(buffer, subpath) { + try { + buffer = zlib.unzipSync(buffer); + } catch (err) { + throw new Error(`Invalid gzip data in archive: ${err && err.message || err}`); + } + let str = (i, n) => String.fromCharCode(...buffer.subarray(i, i + n)).replace(/\0.*$/, ""); + let offset = 0; + subpath = `package/${subpath}`; + while (offset < buffer.length) { + let name = str(offset, 100); + let size = parseInt(str(offset + 124, 12), 8); + offset += 512; + if (!isNaN(size)) { + if (name === subpath) return buffer.subarray(offset, offset + size); + offset += size + 511 & ~511; + } + } + throw new Error(`Could not find ${JSON.stringify(subpath)} in archive`); +} +function installUsingNPM(pkg, subpath, binPath) { + const env = { ...process.env, npm_config_global: void 0 }; + const esbuildLibDir = path2.dirname(require.resolve("esbuild")); + const installDir = path2.join(esbuildLibDir, "npm-install"); + fs2.mkdirSync(installDir); + try { + fs2.writeFileSync(path2.join(installDir, "package.json"), "{}"); + child_process.execSync( + `npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${versionFromPackageJSON}`, + { cwd: installDir, stdio: "pipe", env } + ); + const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath); + fs2.renameSync(installedBinPath, binPath); + } finally { + try { + removeRecursive(installDir); + } catch { + } + } +} +function removeRecursive(dir) { + for (const entry of fs2.readdirSync(dir)) { + const entryPath = path2.join(dir, entry); + let stats; + try { + stats = fs2.lstatSync(entryPath); + } catch { + continue; + } + if (stats.isDirectory()) removeRecursive(entryPath); + else fs2.unlinkSync(entryPath); + } + fs2.rmdirSync(dir); +} +function applyManualBinaryPathOverride(overridePath) { + const pathString = JSON.stringify(overridePath); + fs2.writeFileSync(toPath, `#!/usr/bin/env node +require('child_process').execFileSync(${pathString}, process.argv.slice(2), { stdio: 'inherit' }); +`); + const libMain = path2.join(__dirname, "lib", "main.js"); + const code = fs2.readFileSync(libMain, "utf8"); + fs2.writeFileSync(libMain, `var ESBUILD_BINARY_PATH = ${pathString}; +${code}`); +} +function maybeOptimizePackage(binPath) { + if (os2.platform() !== "win32" && !isYarn()) { + const tempPath = path2.join(__dirname, "bin-esbuild"); + try { + fs2.linkSync(binPath, tempPath); + fs2.renameSync(tempPath, toPath); + isToPathJS = false; + fs2.unlinkSync(tempPath); + } catch { + } + } +} +async function downloadDirectlyFromNPM(pkg, subpath, binPath) { + const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${versionFromPackageJSON}.tgz`; + console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`); + try { + fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath)); + fs2.chmodSync(binPath, 493); + } catch (e) { + console.error(`[esbuild] Failed to download ${JSON.stringify(url)}: ${e && e.message || e}`); + throw e; + } +} +async function checkAndPreparePackage() { + if (isValidBinaryPath(ESBUILD_BINARY_PATH)) { + if (!fs2.existsSync(ESBUILD_BINARY_PATH)) { + console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`); + } else { + applyManualBinaryPathOverride(ESBUILD_BINARY_PATH); + return; + } + } + const { pkg, subpath } = pkgAndSubpathForCurrentPlatform(); + let binPath; + try { + binPath = require.resolve(`${pkg}/${subpath}`); + } catch (e) { + console.error(`[esbuild] Failed to find package "${pkg}" on the file system + +This can happen if you use the "--no-optional" flag. The "optionalDependencies" +package.json feature is used by esbuild to install the correct binary executable +for your current platform. This install script will now attempt to work around +this. If that fails, you need to remove the "--no-optional" flag to use esbuild. +`); + binPath = downloadedBinPath(pkg, subpath); + try { + console.error(`[esbuild] Trying to install package "${pkg}" using npm`); + installUsingNPM(pkg, subpath, binPath); + } catch (e2) { + console.error(`[esbuild] Failed to install package "${pkg}" using npm: ${e2 && e2.message || e2}`); + try { + await downloadDirectlyFromNPM(pkg, subpath, binPath); + } catch (e3) { + throw new Error(`Failed to install package "${pkg}"`); + } + } + } + maybeOptimizePackage(binPath); +} +checkAndPreparePackage().then(() => { + if (isToPathJS) { + validateBinaryVersion(process.execPath, toPath); + } else { + validateBinaryVersion(toPath); + } +}); diff --git a/node_modules/esbuild/lib/main.d.ts b/node_modules/esbuild/lib/main.d.ts new file mode 100644 index 0000000..c705307 --- /dev/null +++ b/node_modules/esbuild/lib/main.d.ts @@ -0,0 +1,705 @@ +export type Platform = 'browser' | 'node' | 'neutral' +export type Format = 'iife' | 'cjs' | 'esm' +export type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'local-css' | 'text' | 'ts' | 'tsx' +export type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent' +export type Charset = 'ascii' | 'utf8' +export type Drop = 'console' | 'debugger' + +interface CommonOptions { + /** Documentation: https://esbuild.github.io/api/#sourcemap */ + sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both' + /** Documentation: https://esbuild.github.io/api/#legal-comments */ + legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external' + /** Documentation: https://esbuild.github.io/api/#source-root */ + sourceRoot?: string + /** Documentation: https://esbuild.github.io/api/#sources-content */ + sourcesContent?: boolean + + /** Documentation: https://esbuild.github.io/api/#format */ + format?: Format + /** Documentation: https://esbuild.github.io/api/#global-name */ + globalName?: string + /** Documentation: https://esbuild.github.io/api/#target */ + target?: string | string[] + /** Documentation: https://esbuild.github.io/api/#supported */ + supported?: Record + /** Documentation: https://esbuild.github.io/api/#platform */ + platform?: Platform + + /** Documentation: https://esbuild.github.io/api/#mangle-props */ + mangleProps?: RegExp + /** Documentation: https://esbuild.github.io/api/#mangle-props */ + reserveProps?: RegExp + /** Documentation: https://esbuild.github.io/api/#mangle-props */ + mangleQuoted?: boolean + /** Documentation: https://esbuild.github.io/api/#mangle-props */ + mangleCache?: Record + /** Documentation: https://esbuild.github.io/api/#drop */ + drop?: Drop[] + /** Documentation: https://esbuild.github.io/api/#drop-labels */ + dropLabels?: string[] + /** Documentation: https://esbuild.github.io/api/#minify */ + minify?: boolean + /** Documentation: https://esbuild.github.io/api/#minify */ + minifyWhitespace?: boolean + /** Documentation: https://esbuild.github.io/api/#minify */ + minifyIdentifiers?: boolean + /** Documentation: https://esbuild.github.io/api/#minify */ + minifySyntax?: boolean + /** Documentation: https://esbuild.github.io/api/#line-limit */ + lineLimit?: number + /** Documentation: https://esbuild.github.io/api/#charset */ + charset?: Charset + /** Documentation: https://esbuild.github.io/api/#tree-shaking */ + treeShaking?: boolean + /** Documentation: https://esbuild.github.io/api/#ignore-annotations */ + ignoreAnnotations?: boolean + + /** Documentation: https://esbuild.github.io/api/#jsx */ + jsx?: 'transform' | 'preserve' | 'automatic' + /** Documentation: https://esbuild.github.io/api/#jsx-factory */ + jsxFactory?: string + /** Documentation: https://esbuild.github.io/api/#jsx-fragment */ + jsxFragment?: string + /** Documentation: https://esbuild.github.io/api/#jsx-import-source */ + jsxImportSource?: string + /** Documentation: https://esbuild.github.io/api/#jsx-development */ + jsxDev?: boolean + /** Documentation: https://esbuild.github.io/api/#jsx-side-effects */ + jsxSideEffects?: boolean + + /** Documentation: https://esbuild.github.io/api/#define */ + define?: { [key: string]: string } + /** Documentation: https://esbuild.github.io/api/#pure */ + pure?: string[] + /** Documentation: https://esbuild.github.io/api/#keep-names */ + keepNames?: boolean + + /** Documentation: https://esbuild.github.io/api/#color */ + color?: boolean + /** Documentation: https://esbuild.github.io/api/#log-level */ + logLevel?: LogLevel + /** Documentation: https://esbuild.github.io/api/#log-limit */ + logLimit?: number + /** Documentation: https://esbuild.github.io/api/#log-override */ + logOverride?: Record + + /** Documentation: https://esbuild.github.io/api/#tsconfig-raw */ + tsconfigRaw?: string | TsconfigRaw +} + +export interface TsconfigRaw { + compilerOptions?: { + alwaysStrict?: boolean + baseUrl?: string + experimentalDecorators?: boolean + importsNotUsedAsValues?: 'remove' | 'preserve' | 'error' + jsx?: 'preserve' | 'react-native' | 'react' | 'react-jsx' | 'react-jsxdev' + jsxFactory?: string + jsxFragmentFactory?: string + jsxImportSource?: string + paths?: Record + preserveValueImports?: boolean + strict?: boolean + target?: string + useDefineForClassFields?: boolean + verbatimModuleSyntax?: boolean + } +} + +export interface BuildOptions extends CommonOptions { + /** Documentation: https://esbuild.github.io/api/#bundle */ + bundle?: boolean + /** Documentation: https://esbuild.github.io/api/#splitting */ + splitting?: boolean + /** Documentation: https://esbuild.github.io/api/#preserve-symlinks */ + preserveSymlinks?: boolean + /** Documentation: https://esbuild.github.io/api/#outfile */ + outfile?: string + /** Documentation: https://esbuild.github.io/api/#metafile */ + metafile?: boolean + /** Documentation: https://esbuild.github.io/api/#outdir */ + outdir?: string + /** Documentation: https://esbuild.github.io/api/#outbase */ + outbase?: string + /** Documentation: https://esbuild.github.io/api/#external */ + external?: string[] + /** Documentation: https://esbuild.github.io/api/#packages */ + packages?: 'bundle' | 'external' + /** Documentation: https://esbuild.github.io/api/#alias */ + alias?: Record + /** Documentation: https://esbuild.github.io/api/#loader */ + loader?: { [ext: string]: Loader } + /** Documentation: https://esbuild.github.io/api/#resolve-extensions */ + resolveExtensions?: string[] + /** Documentation: https://esbuild.github.io/api/#main-fields */ + mainFields?: string[] + /** Documentation: https://esbuild.github.io/api/#conditions */ + conditions?: string[] + /** Documentation: https://esbuild.github.io/api/#write */ + write?: boolean + /** Documentation: https://esbuild.github.io/api/#allow-overwrite */ + allowOverwrite?: boolean + /** Documentation: https://esbuild.github.io/api/#tsconfig */ + tsconfig?: string + /** Documentation: https://esbuild.github.io/api/#out-extension */ + outExtension?: { [ext: string]: string } + /** Documentation: https://esbuild.github.io/api/#public-path */ + publicPath?: string + /** Documentation: https://esbuild.github.io/api/#entry-names */ + entryNames?: string + /** Documentation: https://esbuild.github.io/api/#chunk-names */ + chunkNames?: string + /** Documentation: https://esbuild.github.io/api/#asset-names */ + assetNames?: string + /** Documentation: https://esbuild.github.io/api/#inject */ + inject?: string[] + /** Documentation: https://esbuild.github.io/api/#banner */ + banner?: { [type: string]: string } + /** Documentation: https://esbuild.github.io/api/#footer */ + footer?: { [type: string]: string } + /** Documentation: https://esbuild.github.io/api/#entry-points */ + entryPoints?: string[] | Record | { in: string, out: string }[] + /** Documentation: https://esbuild.github.io/api/#stdin */ + stdin?: StdinOptions + /** Documentation: https://esbuild.github.io/plugins/ */ + plugins?: Plugin[] + /** Documentation: https://esbuild.github.io/api/#working-directory */ + absWorkingDir?: string + /** Documentation: https://esbuild.github.io/api/#node-paths */ + nodePaths?: string[]; // The "NODE_PATH" variable from Node.js +} + +export interface StdinOptions { + contents: string | Uint8Array + resolveDir?: string + sourcefile?: string + loader?: Loader +} + +export interface Message { + id: string + pluginName: string + text: string + location: Location | null + notes: Note[] + + /** + * Optional user-specified data that is passed through unmodified. You can + * use this to stash the original error, for example. + */ + detail: any +} + +export interface Note { + text: string + location: Location | null +} + +export interface Location { + file: string + namespace: string + /** 1-based */ + line: number + /** 0-based, in bytes */ + column: number + /** in bytes */ + length: number + lineText: string + suggestion: string +} + +export interface OutputFile { + path: string + contents: Uint8Array + hash: string + /** "contents" as text (changes automatically with "contents") */ + readonly text: string +} + +export interface BuildResult { + errors: Message[] + warnings: Message[] + /** Only when "write: false" */ + outputFiles: OutputFile[] | (ProvidedOptions['write'] extends false ? never : undefined) + /** Only when "metafile: true" */ + metafile: Metafile | (ProvidedOptions['metafile'] extends true ? never : undefined) + /** Only when "mangleCache" is present */ + mangleCache: Record | (ProvidedOptions['mangleCache'] extends Object ? never : undefined) +} + +export interface BuildFailure extends Error { + errors: Message[] + warnings: Message[] +} + +/** Documentation: https://esbuild.github.io/api/#serve-arguments */ +export interface ServeOptions { + port?: number + host?: string + servedir?: string + keyfile?: string + certfile?: string + fallback?: string + onRequest?: (args: ServeOnRequestArgs) => void +} + +export interface ServeOnRequestArgs { + remoteAddress: string + method: string + path: string + status: number + /** The time to generate the response, not to send it */ + timeInMS: number +} + +/** Documentation: https://esbuild.github.io/api/#serve-return-values */ +export interface ServeResult { + port: number + host: string +} + +export interface TransformOptions extends CommonOptions { + /** Documentation: https://esbuild.github.io/api/#sourcefile */ + sourcefile?: string + /** Documentation: https://esbuild.github.io/api/#loader */ + loader?: Loader + /** Documentation: https://esbuild.github.io/api/#banner */ + banner?: string + /** Documentation: https://esbuild.github.io/api/#footer */ + footer?: string +} + +export interface TransformResult { + code: string + map: string + warnings: Message[] + /** Only when "mangleCache" is present */ + mangleCache: Record | (ProvidedOptions['mangleCache'] extends Object ? never : undefined) + /** Only when "legalComments" is "external" */ + legalComments: string | (ProvidedOptions['legalComments'] extends 'external' ? never : undefined) +} + +export interface TransformFailure extends Error { + errors: Message[] + warnings: Message[] +} + +export interface Plugin { + name: string + setup: (build: PluginBuild) => (void | Promise) +} + +export interface PluginBuild { + /** Documentation: https://esbuild.github.io/plugins/#build-options */ + initialOptions: BuildOptions + + /** Documentation: https://esbuild.github.io/plugins/#resolve */ + resolve(path: string, options?: ResolveOptions): Promise + + /** Documentation: https://esbuild.github.io/plugins/#on-start */ + onStart(callback: () => + (OnStartResult | null | void | Promise)): void + + /** Documentation: https://esbuild.github.io/plugins/#on-end */ + onEnd(callback: (result: BuildResult) => + (OnEndResult | null | void | Promise)): void + + /** Documentation: https://esbuild.github.io/plugins/#on-resolve */ + onResolve(options: OnResolveOptions, callback: (args: OnResolveArgs) => + (OnResolveResult | null | undefined | Promise)): void + + /** Documentation: https://esbuild.github.io/plugins/#on-load */ + onLoad(options: OnLoadOptions, callback: (args: OnLoadArgs) => + (OnLoadResult | null | undefined | Promise)): void + + /** Documentation: https://esbuild.github.io/plugins/#on-dispose */ + onDispose(callback: () => void): void + + // This is a full copy of the esbuild library in case you need it + esbuild: { + context: typeof context, + build: typeof build, + buildSync: typeof buildSync, + transform: typeof transform, + transformSync: typeof transformSync, + formatMessages: typeof formatMessages, + formatMessagesSync: typeof formatMessagesSync, + analyzeMetafile: typeof analyzeMetafile, + analyzeMetafileSync: typeof analyzeMetafileSync, + initialize: typeof initialize, + version: typeof version, + } +} + +/** Documentation: https://esbuild.github.io/plugins/#resolve-options */ +export interface ResolveOptions { + pluginName?: string + importer?: string + namespace?: string + resolveDir?: string + kind?: ImportKind + pluginData?: any + with?: Record +} + +/** Documentation: https://esbuild.github.io/plugins/#resolve-results */ +export interface ResolveResult { + errors: Message[] + warnings: Message[] + + path: string + external: boolean + sideEffects: boolean + namespace: string + suffix: string + pluginData: any +} + +export interface OnStartResult { + errors?: PartialMessage[] + warnings?: PartialMessage[] +} + +export interface OnEndResult { + errors?: PartialMessage[] + warnings?: PartialMessage[] +} + +/** Documentation: https://esbuild.github.io/plugins/#on-resolve-options */ +export interface OnResolveOptions { + filter: RegExp + namespace?: string +} + +/** Documentation: https://esbuild.github.io/plugins/#on-resolve-arguments */ +export interface OnResolveArgs { + path: string + importer: string + namespace: string + resolveDir: string + kind: ImportKind + pluginData: any + with: Record +} + +export type ImportKind = + | 'entry-point' + + // JS + | 'import-statement' + | 'require-call' + | 'dynamic-import' + | 'require-resolve' + + // CSS + | 'import-rule' + | 'composes-from' + | 'url-token' + +/** Documentation: https://esbuild.github.io/plugins/#on-resolve-results */ +export interface OnResolveResult { + pluginName?: string + + errors?: PartialMessage[] + warnings?: PartialMessage[] + + path?: string + external?: boolean + sideEffects?: boolean + namespace?: string + suffix?: string + pluginData?: any + + watchFiles?: string[] + watchDirs?: string[] +} + +/** Documentation: https://esbuild.github.io/plugins/#on-load-options */ +export interface OnLoadOptions { + filter: RegExp + namespace?: string +} + +/** Documentation: https://esbuild.github.io/plugins/#on-load-arguments */ +export interface OnLoadArgs { + path: string + namespace: string + suffix: string + pluginData: any + with: Record +} + +/** Documentation: https://esbuild.github.io/plugins/#on-load-results */ +export interface OnLoadResult { + pluginName?: string + + errors?: PartialMessage[] + warnings?: PartialMessage[] + + contents?: string | Uint8Array + resolveDir?: string + loader?: Loader + pluginData?: any + + watchFiles?: string[] + watchDirs?: string[] +} + +export interface PartialMessage { + id?: string + pluginName?: string + text?: string + location?: Partial | null + notes?: PartialNote[] + detail?: any +} + +export interface PartialNote { + text?: string + location?: Partial | null +} + +/** Documentation: https://esbuild.github.io/api/#metafile */ +export interface Metafile { + inputs: { + [path: string]: { + bytes: number + imports: { + path: string + kind: ImportKind + external?: boolean + original?: string + with?: Record + }[] + format?: 'cjs' | 'esm' + with?: Record + } + } + outputs: { + [path: string]: { + bytes: number + inputs: { + [path: string]: { + bytesInOutput: number + } + } + imports: { + path: string + kind: ImportKind | 'file-loader' + external?: boolean + }[] + exports: string[] + entryPoint?: string + cssBundle?: string + } + } +} + +export interface FormatMessagesOptions { + kind: 'error' | 'warning' + color?: boolean + terminalWidth?: number +} + +export interface AnalyzeMetafileOptions { + color?: boolean + verbose?: boolean +} + +export interface WatchOptions { +} + +export interface BuildContext { + /** Documentation: https://esbuild.github.io/api/#rebuild */ + rebuild(): Promise> + + /** Documentation: https://esbuild.github.io/api/#watch */ + watch(options?: WatchOptions): Promise + + /** Documentation: https://esbuild.github.io/api/#serve */ + serve(options?: ServeOptions): Promise + + cancel(): Promise + dispose(): Promise +} + +// This is a TypeScript type-level function which replaces any keys in "In" +// that aren't in "Out" with "never". We use this to reject properties with +// typos in object literals. See: https://stackoverflow.com/questions/49580725 +type SameShape = In & { [Key in Exclude]: never } + +/** + * This function invokes the "esbuild" command-line tool for you. It returns a + * promise that either resolves with a "BuildResult" object or rejects with a + * "BuildFailure" object. + * + * - Works in node: yes + * - Works in browser: yes + * + * Documentation: https://esbuild.github.io/api/#build + */ +export declare function build(options: SameShape): Promise> + +/** + * This is the advanced long-running form of "build" that supports additional + * features such as watch mode and a local development server. + * + * - Works in node: yes + * - Works in browser: no + * + * Documentation: https://esbuild.github.io/api/#build + */ +export declare function context(options: SameShape): Promise> + +/** + * This function transforms a single JavaScript file. It can be used to minify + * JavaScript, convert TypeScript/JSX to JavaScript, or convert newer JavaScript + * to older JavaScript. It returns a promise that is either resolved with a + * "TransformResult" object or rejected with a "TransformFailure" object. + * + * - Works in node: yes + * - Works in browser: yes + * + * Documentation: https://esbuild.github.io/api/#transform + */ +export declare function transform(input: string | Uint8Array, options?: SameShape): Promise> + +/** + * Converts log messages to formatted message strings suitable for printing in + * the terminal. This allows you to reuse the built-in behavior of esbuild's + * log message formatter. This is a batch-oriented API for efficiency. + * + * - Works in node: yes + * - Works in browser: yes + */ +export declare function formatMessages(messages: PartialMessage[], options: FormatMessagesOptions): Promise + +/** + * Pretty-prints an analysis of the metafile JSON to a string. This is just for + * convenience to be able to match esbuild's pretty-printing exactly. If you want + * to customize it, you can just inspect the data in the metafile yourself. + * + * - Works in node: yes + * - Works in browser: yes + * + * Documentation: https://esbuild.github.io/api/#analyze + */ +export declare function analyzeMetafile(metafile: Metafile | string, options?: AnalyzeMetafileOptions): Promise + +/** + * A synchronous version of "build". + * + * - Works in node: yes + * - Works in browser: no + * + * Documentation: https://esbuild.github.io/api/#build + */ +export declare function buildSync(options: SameShape): BuildResult + +/** + * A synchronous version of "transform". + * + * - Works in node: yes + * - Works in browser: no + * + * Documentation: https://esbuild.github.io/api/#transform + */ +export declare function transformSync(input: string | Uint8Array, options?: SameShape): TransformResult + +/** + * A synchronous version of "formatMessages". + * + * - Works in node: yes + * - Works in browser: no + */ +export declare function formatMessagesSync(messages: PartialMessage[], options: FormatMessagesOptions): string[] + +/** + * A synchronous version of "analyzeMetafile". + * + * - Works in node: yes + * - Works in browser: no + * + * Documentation: https://esbuild.github.io/api/#analyze + */ +export declare function analyzeMetafileSync(metafile: Metafile | string, options?: AnalyzeMetafileOptions): string + +/** + * This configures the browser-based version of esbuild. It is necessary to + * call this first and wait for the returned promise to be resolved before + * making other API calls when using esbuild in the browser. + * + * - Works in node: yes + * - Works in browser: yes ("options" is required) + * + * Documentation: https://esbuild.github.io/api/#browser + */ +export declare function initialize(options: InitializeOptions): Promise + +export interface InitializeOptions { + /** + * The URL of the "esbuild.wasm" file. This must be provided when running + * esbuild in the browser. + */ + wasmURL?: string | URL + + /** + * The result of calling "new WebAssembly.Module(buffer)" where "buffer" + * is a typed array or ArrayBuffer containing the binary code of the + * "esbuild.wasm" file. + * + * You can use this as an alternative to "wasmURL" for environments where it's + * not possible to download the WebAssembly module. + */ + wasmModule?: WebAssembly.Module + + /** + * By default esbuild runs the WebAssembly-based browser API in a web worker + * to avoid blocking the UI thread. This can be disabled by setting "worker" + * to false. + */ + worker?: boolean +} + +export let version: string + +// Call this function to terminate esbuild's child process. The child process +// is not terminated and re-created after each API call because it's more +// efficient to keep it around when there are multiple API calls. +// +// In node this happens automatically before the parent node process exits. So +// you only need to call this if you know you will not make any more esbuild +// API calls and you want to clean up resources. +// +// Unlike node, Deno lacks the necessary APIs to clean up child processes +// automatically. You must manually call stop() in Deno when you're done +// using esbuild or Deno will continue running forever. +// +// Another reason you might want to call this is if you are using esbuild from +// within a Deno test. Deno fails tests that create a child process without +// killing it before the test ends, so you have to call this function (and +// await the returned promise) in every Deno test that uses esbuild. +export declare function stop(): Promise + +// Note: These declarations exist to avoid type errors when you omit "dom" from +// "lib" in your "tsconfig.json" file. TypeScript confusingly declares the +// global "WebAssembly" type in "lib.dom.d.ts" even though it has nothing to do +// with the browser DOM and is present in many non-browser JavaScript runtimes +// (e.g. node and deno). Declaring it here allows esbuild's API to be used in +// these scenarios. +// +// There's an open issue about getting this problem corrected (although these +// declarations will need to remain even if this is fixed for backward +// compatibility with older TypeScript versions): +// +// https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/826 +// +declare global { + namespace WebAssembly { + interface Module { + } + } + interface URL { + } +} diff --git a/node_modules/esbuild/lib/main.js b/node_modules/esbuild/lib/main.js new file mode 100644 index 0000000..45daeda --- /dev/null +++ b/node_modules/esbuild/lib/main.js @@ -0,0 +1,2245 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// lib/npm/node.ts +var node_exports = {}; +__export(node_exports, { + analyzeMetafile: () => analyzeMetafile, + analyzeMetafileSync: () => analyzeMetafileSync, + build: () => build, + buildSync: () => buildSync, + context: () => context, + default: () => node_default, + formatMessages: () => formatMessages, + formatMessagesSync: () => formatMessagesSync, + initialize: () => initialize, + stop: () => stop, + transform: () => transform, + transformSync: () => transformSync, + version: () => version +}); +module.exports = __toCommonJS(node_exports); + +// lib/shared/stdio_protocol.ts +function encodePacket(packet) { + let visit = (value) => { + if (value === null) { + bb.write8(0); + } else if (typeof value === "boolean") { + bb.write8(1); + bb.write8(+value); + } else if (typeof value === "number") { + bb.write8(2); + bb.write32(value | 0); + } else if (typeof value === "string") { + bb.write8(3); + bb.write(encodeUTF8(value)); + } else if (value instanceof Uint8Array) { + bb.write8(4); + bb.write(value); + } else if (value instanceof Array) { + bb.write8(5); + bb.write32(value.length); + for (let item of value) { + visit(item); + } + } else { + let keys = Object.keys(value); + bb.write8(6); + bb.write32(keys.length); + for (let key of keys) { + bb.write(encodeUTF8(key)); + visit(value[key]); + } + } + }; + let bb = new ByteBuffer(); + bb.write32(0); + bb.write32(packet.id << 1 | +!packet.isRequest); + visit(packet.value); + writeUInt32LE(bb.buf, bb.len - 4, 0); + return bb.buf.subarray(0, bb.len); +} +function decodePacket(bytes) { + let visit = () => { + switch (bb.read8()) { + case 0: + return null; + case 1: + return !!bb.read8(); + case 2: + return bb.read32(); + case 3: + return decodeUTF8(bb.read()); + case 4: + return bb.read(); + case 5: { + let count = bb.read32(); + let value2 = []; + for (let i = 0; i < count; i++) { + value2.push(visit()); + } + return value2; + } + case 6: { + let count = bb.read32(); + let value2 = {}; + for (let i = 0; i < count; i++) { + value2[decodeUTF8(bb.read())] = visit(); + } + return value2; + } + default: + throw new Error("Invalid packet"); + } + }; + let bb = new ByteBuffer(bytes); + let id = bb.read32(); + let isRequest = (id & 1) === 0; + id >>>= 1; + let value = visit(); + if (bb.ptr !== bytes.length) { + throw new Error("Invalid packet"); + } + return { id, isRequest, value }; +} +var ByteBuffer = class { + constructor(buf = new Uint8Array(1024)) { + this.buf = buf; + this.len = 0; + this.ptr = 0; + } + _write(delta) { + if (this.len + delta > this.buf.length) { + let clone = new Uint8Array((this.len + delta) * 2); + clone.set(this.buf); + this.buf = clone; + } + this.len += delta; + return this.len - delta; + } + write8(value) { + let offset = this._write(1); + this.buf[offset] = value; + } + write32(value) { + let offset = this._write(4); + writeUInt32LE(this.buf, value, offset); + } + write(bytes) { + let offset = this._write(4 + bytes.length); + writeUInt32LE(this.buf, bytes.length, offset); + this.buf.set(bytes, offset + 4); + } + _read(delta) { + if (this.ptr + delta > this.buf.length) { + throw new Error("Invalid packet"); + } + this.ptr += delta; + return this.ptr - delta; + } + read8() { + return this.buf[this._read(1)]; + } + read32() { + return readUInt32LE(this.buf, this._read(4)); + } + read() { + let length = this.read32(); + let bytes = new Uint8Array(length); + let ptr = this._read(bytes.length); + bytes.set(this.buf.subarray(ptr, ptr + length)); + return bytes; + } +}; +var encodeUTF8; +var decodeUTF8; +var encodeInvariant; +if (typeof TextEncoder !== "undefined" && typeof TextDecoder !== "undefined") { + let encoder = new TextEncoder(); + let decoder = new TextDecoder(); + encodeUTF8 = (text) => encoder.encode(text); + decodeUTF8 = (bytes) => decoder.decode(bytes); + encodeInvariant = 'new TextEncoder().encode("")'; +} else if (typeof Buffer !== "undefined") { + encodeUTF8 = (text) => Buffer.from(text); + decodeUTF8 = (bytes) => { + let { buffer, byteOffset, byteLength } = bytes; + return Buffer.from(buffer, byteOffset, byteLength).toString(); + }; + encodeInvariant = 'Buffer.from("")'; +} else { + throw new Error("No UTF-8 codec found"); +} +if (!(encodeUTF8("") instanceof Uint8Array)) + throw new Error(`Invariant violation: "${encodeInvariant} instanceof Uint8Array" is incorrectly false + +This indicates that your JavaScript environment is broken. You cannot use +esbuild in this environment because esbuild relies on this invariant. This +is not a problem with esbuild. You need to fix your environment instead. +`); +function readUInt32LE(buffer, offset) { + return buffer[offset++] | buffer[offset++] << 8 | buffer[offset++] << 16 | buffer[offset++] << 24; +} +function writeUInt32LE(buffer, value, offset) { + buffer[offset++] = value; + buffer[offset++] = value >> 8; + buffer[offset++] = value >> 16; + buffer[offset++] = value >> 24; +} + +// lib/shared/common.ts +var quote = JSON.stringify; +var buildLogLevelDefault = "warning"; +var transformLogLevelDefault = "silent"; +function validateTarget(target) { + validateStringValue(target, "target"); + if (target.indexOf(",") >= 0) throw new Error(`Invalid target: ${target}`); + return target; +} +var canBeAnything = () => null; +var mustBeBoolean = (value) => typeof value === "boolean" ? null : "a boolean"; +var mustBeString = (value) => typeof value === "string" ? null : "a string"; +var mustBeRegExp = (value) => value instanceof RegExp ? null : "a RegExp object"; +var mustBeInteger = (value) => typeof value === "number" && value === (value | 0) ? null : "an integer"; +var mustBeFunction = (value) => typeof value === "function" ? null : "a function"; +var mustBeArray = (value) => Array.isArray(value) ? null : "an array"; +var mustBeObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? null : "an object"; +var mustBeEntryPoints = (value) => typeof value === "object" && value !== null ? null : "an array or an object"; +var mustBeWebAssemblyModule = (value) => value instanceof WebAssembly.Module ? null : "a WebAssembly.Module"; +var mustBeObjectOrNull = (value) => typeof value === "object" && !Array.isArray(value) ? null : "an object or null"; +var mustBeStringOrBoolean = (value) => typeof value === "string" || typeof value === "boolean" ? null : "a string or a boolean"; +var mustBeStringOrObject = (value) => typeof value === "string" || typeof value === "object" && value !== null && !Array.isArray(value) ? null : "a string or an object"; +var mustBeStringOrArray = (value) => typeof value === "string" || Array.isArray(value) ? null : "a string or an array"; +var mustBeStringOrUint8Array = (value) => typeof value === "string" || value instanceof Uint8Array ? null : "a string or a Uint8Array"; +var mustBeStringOrURL = (value) => typeof value === "string" || value instanceof URL ? null : "a string or a URL"; +function getFlag(object, keys, key, mustBeFn) { + let value = object[key]; + keys[key + ""] = true; + if (value === void 0) return void 0; + let mustBe = mustBeFn(value); + if (mustBe !== null) throw new Error(`${quote(key)} must be ${mustBe}`); + return value; +} +function checkForInvalidFlags(object, keys, where) { + for (let key in object) { + if (!(key in keys)) { + throw new Error(`Invalid option ${where}: ${quote(key)}`); + } + } +} +function validateInitializeOptions(options) { + let keys = /* @__PURE__ */ Object.create(null); + let wasmURL = getFlag(options, keys, "wasmURL", mustBeStringOrURL); + let wasmModule = getFlag(options, keys, "wasmModule", mustBeWebAssemblyModule); + let worker = getFlag(options, keys, "worker", mustBeBoolean); + checkForInvalidFlags(options, keys, "in initialize() call"); + return { + wasmURL, + wasmModule, + worker + }; +} +function validateMangleCache(mangleCache) { + let validated; + if (mangleCache !== void 0) { + validated = /* @__PURE__ */ Object.create(null); + for (let key in mangleCache) { + let value = mangleCache[key]; + if (typeof value === "string" || value === false) { + validated[key] = value; + } else { + throw new Error(`Expected ${quote(key)} in mangle cache to map to either a string or false`); + } + } + } + return validated; +} +function pushLogFlags(flags, options, keys, isTTY2, logLevelDefault) { + let color = getFlag(options, keys, "color", mustBeBoolean); + let logLevel = getFlag(options, keys, "logLevel", mustBeString); + let logLimit = getFlag(options, keys, "logLimit", mustBeInteger); + if (color !== void 0) flags.push(`--color=${color}`); + else if (isTTY2) flags.push(`--color=true`); + flags.push(`--log-level=${logLevel || logLevelDefault}`); + flags.push(`--log-limit=${logLimit || 0}`); +} +function validateStringValue(value, what, key) { + if (typeof value !== "string") { + throw new Error(`Expected value for ${what}${key !== void 0 ? " " + quote(key) : ""} to be a string, got ${typeof value} instead`); + } + return value; +} +function pushCommonFlags(flags, options, keys) { + let legalComments = getFlag(options, keys, "legalComments", mustBeString); + let sourceRoot = getFlag(options, keys, "sourceRoot", mustBeString); + let sourcesContent = getFlag(options, keys, "sourcesContent", mustBeBoolean); + let target = getFlag(options, keys, "target", mustBeStringOrArray); + let format = getFlag(options, keys, "format", mustBeString); + let globalName = getFlag(options, keys, "globalName", mustBeString); + let mangleProps = getFlag(options, keys, "mangleProps", mustBeRegExp); + let reserveProps = getFlag(options, keys, "reserveProps", mustBeRegExp); + let mangleQuoted = getFlag(options, keys, "mangleQuoted", mustBeBoolean); + let minify = getFlag(options, keys, "minify", mustBeBoolean); + let minifySyntax = getFlag(options, keys, "minifySyntax", mustBeBoolean); + let minifyWhitespace = getFlag(options, keys, "minifyWhitespace", mustBeBoolean); + let minifyIdentifiers = getFlag(options, keys, "minifyIdentifiers", mustBeBoolean); + let lineLimit = getFlag(options, keys, "lineLimit", mustBeInteger); + let drop = getFlag(options, keys, "drop", mustBeArray); + let dropLabels = getFlag(options, keys, "dropLabels", mustBeArray); + let charset = getFlag(options, keys, "charset", mustBeString); + let treeShaking = getFlag(options, keys, "treeShaking", mustBeBoolean); + let ignoreAnnotations = getFlag(options, keys, "ignoreAnnotations", mustBeBoolean); + let jsx = getFlag(options, keys, "jsx", mustBeString); + let jsxFactory = getFlag(options, keys, "jsxFactory", mustBeString); + let jsxFragment = getFlag(options, keys, "jsxFragment", mustBeString); + let jsxImportSource = getFlag(options, keys, "jsxImportSource", mustBeString); + let jsxDev = getFlag(options, keys, "jsxDev", mustBeBoolean); + let jsxSideEffects = getFlag(options, keys, "jsxSideEffects", mustBeBoolean); + let define = getFlag(options, keys, "define", mustBeObject); + let logOverride = getFlag(options, keys, "logOverride", mustBeObject); + let supported = getFlag(options, keys, "supported", mustBeObject); + let pure = getFlag(options, keys, "pure", mustBeArray); + let keepNames = getFlag(options, keys, "keepNames", mustBeBoolean); + let platform = getFlag(options, keys, "platform", mustBeString); + let tsconfigRaw = getFlag(options, keys, "tsconfigRaw", mustBeStringOrObject); + if (legalComments) flags.push(`--legal-comments=${legalComments}`); + if (sourceRoot !== void 0) flags.push(`--source-root=${sourceRoot}`); + if (sourcesContent !== void 0) flags.push(`--sources-content=${sourcesContent}`); + if (target) { + if (Array.isArray(target)) flags.push(`--target=${Array.from(target).map(validateTarget).join(",")}`); + else flags.push(`--target=${validateTarget(target)}`); + } + if (format) flags.push(`--format=${format}`); + if (globalName) flags.push(`--global-name=${globalName}`); + if (platform) flags.push(`--platform=${platform}`); + if (tsconfigRaw) flags.push(`--tsconfig-raw=${typeof tsconfigRaw === "string" ? tsconfigRaw : JSON.stringify(tsconfigRaw)}`); + if (minify) flags.push("--minify"); + if (minifySyntax) flags.push("--minify-syntax"); + if (minifyWhitespace) flags.push("--minify-whitespace"); + if (minifyIdentifiers) flags.push("--minify-identifiers"); + if (lineLimit) flags.push(`--line-limit=${lineLimit}`); + if (charset) flags.push(`--charset=${charset}`); + if (treeShaking !== void 0) flags.push(`--tree-shaking=${treeShaking}`); + if (ignoreAnnotations) flags.push(`--ignore-annotations`); + if (drop) for (let what of drop) flags.push(`--drop:${validateStringValue(what, "drop")}`); + if (dropLabels) flags.push(`--drop-labels=${Array.from(dropLabels).map((what) => validateStringValue(what, "dropLabels")).join(",")}`); + if (mangleProps) flags.push(`--mangle-props=${mangleProps.source}`); + if (reserveProps) flags.push(`--reserve-props=${reserveProps.source}`); + if (mangleQuoted !== void 0) flags.push(`--mangle-quoted=${mangleQuoted}`); + if (jsx) flags.push(`--jsx=${jsx}`); + if (jsxFactory) flags.push(`--jsx-factory=${jsxFactory}`); + if (jsxFragment) flags.push(`--jsx-fragment=${jsxFragment}`); + if (jsxImportSource) flags.push(`--jsx-import-source=${jsxImportSource}`); + if (jsxDev) flags.push(`--jsx-dev`); + if (jsxSideEffects) flags.push(`--jsx-side-effects`); + if (define) { + for (let key in define) { + if (key.indexOf("=") >= 0) throw new Error(`Invalid define: ${key}`); + flags.push(`--define:${key}=${validateStringValue(define[key], "define", key)}`); + } + } + if (logOverride) { + for (let key in logOverride) { + if (key.indexOf("=") >= 0) throw new Error(`Invalid log override: ${key}`); + flags.push(`--log-override:${key}=${validateStringValue(logOverride[key], "log override", key)}`); + } + } + if (supported) { + for (let key in supported) { + if (key.indexOf("=") >= 0) throw new Error(`Invalid supported: ${key}`); + const value = supported[key]; + if (typeof value !== "boolean") throw new Error(`Expected value for supported ${quote(key)} to be a boolean, got ${typeof value} instead`); + flags.push(`--supported:${key}=${value}`); + } + } + if (pure) for (let fn of pure) flags.push(`--pure:${validateStringValue(fn, "pure")}`); + if (keepNames) flags.push(`--keep-names`); +} +function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeDefault) { + var _a2; + let flags = []; + let entries = []; + let keys = /* @__PURE__ */ Object.create(null); + let stdinContents = null; + let stdinResolveDir = null; + pushLogFlags(flags, options, keys, isTTY2, logLevelDefault); + pushCommonFlags(flags, options, keys); + let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean); + let bundle = getFlag(options, keys, "bundle", mustBeBoolean); + let splitting = getFlag(options, keys, "splitting", mustBeBoolean); + let preserveSymlinks = getFlag(options, keys, "preserveSymlinks", mustBeBoolean); + let metafile = getFlag(options, keys, "metafile", mustBeBoolean); + let outfile = getFlag(options, keys, "outfile", mustBeString); + let outdir = getFlag(options, keys, "outdir", mustBeString); + let outbase = getFlag(options, keys, "outbase", mustBeString); + let tsconfig = getFlag(options, keys, "tsconfig", mustBeString); + let resolveExtensions = getFlag(options, keys, "resolveExtensions", mustBeArray); + let nodePathsInput = getFlag(options, keys, "nodePaths", mustBeArray); + let mainFields = getFlag(options, keys, "mainFields", mustBeArray); + let conditions = getFlag(options, keys, "conditions", mustBeArray); + let external = getFlag(options, keys, "external", mustBeArray); + let packages = getFlag(options, keys, "packages", mustBeString); + let alias = getFlag(options, keys, "alias", mustBeObject); + let loader = getFlag(options, keys, "loader", mustBeObject); + let outExtension = getFlag(options, keys, "outExtension", mustBeObject); + let publicPath = getFlag(options, keys, "publicPath", mustBeString); + let entryNames = getFlag(options, keys, "entryNames", mustBeString); + let chunkNames = getFlag(options, keys, "chunkNames", mustBeString); + let assetNames = getFlag(options, keys, "assetNames", mustBeString); + let inject = getFlag(options, keys, "inject", mustBeArray); + let banner = getFlag(options, keys, "banner", mustBeObject); + let footer = getFlag(options, keys, "footer", mustBeObject); + let entryPoints = getFlag(options, keys, "entryPoints", mustBeEntryPoints); + let absWorkingDir = getFlag(options, keys, "absWorkingDir", mustBeString); + let stdin = getFlag(options, keys, "stdin", mustBeObject); + let write = (_a2 = getFlag(options, keys, "write", mustBeBoolean)) != null ? _a2 : writeDefault; + let allowOverwrite = getFlag(options, keys, "allowOverwrite", mustBeBoolean); + let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject); + keys.plugins = true; + checkForInvalidFlags(options, keys, `in ${callName}() call`); + if (sourcemap) flags.push(`--sourcemap${sourcemap === true ? "" : `=${sourcemap}`}`); + if (bundle) flags.push("--bundle"); + if (allowOverwrite) flags.push("--allow-overwrite"); + if (splitting) flags.push("--splitting"); + if (preserveSymlinks) flags.push("--preserve-symlinks"); + if (metafile) flags.push(`--metafile`); + if (outfile) flags.push(`--outfile=${outfile}`); + if (outdir) flags.push(`--outdir=${outdir}`); + if (outbase) flags.push(`--outbase=${outbase}`); + if (tsconfig) flags.push(`--tsconfig=${tsconfig}`); + if (packages) flags.push(`--packages=${packages}`); + if (resolveExtensions) { + let values = []; + for (let value of resolveExtensions) { + validateStringValue(value, "resolve extension"); + if (value.indexOf(",") >= 0) throw new Error(`Invalid resolve extension: ${value}`); + values.push(value); + } + flags.push(`--resolve-extensions=${values.join(",")}`); + } + if (publicPath) flags.push(`--public-path=${publicPath}`); + if (entryNames) flags.push(`--entry-names=${entryNames}`); + if (chunkNames) flags.push(`--chunk-names=${chunkNames}`); + if (assetNames) flags.push(`--asset-names=${assetNames}`); + if (mainFields) { + let values = []; + for (let value of mainFields) { + validateStringValue(value, "main field"); + if (value.indexOf(",") >= 0) throw new Error(`Invalid main field: ${value}`); + values.push(value); + } + flags.push(`--main-fields=${values.join(",")}`); + } + if (conditions) { + let values = []; + for (let value of conditions) { + validateStringValue(value, "condition"); + if (value.indexOf(",") >= 0) throw new Error(`Invalid condition: ${value}`); + values.push(value); + } + flags.push(`--conditions=${values.join(",")}`); + } + if (external) for (let name of external) flags.push(`--external:${validateStringValue(name, "external")}`); + if (alias) { + for (let old in alias) { + if (old.indexOf("=") >= 0) throw new Error(`Invalid package name in alias: ${old}`); + flags.push(`--alias:${old}=${validateStringValue(alias[old], "alias", old)}`); + } + } + if (banner) { + for (let type in banner) { + if (type.indexOf("=") >= 0) throw new Error(`Invalid banner file type: ${type}`); + flags.push(`--banner:${type}=${validateStringValue(banner[type], "banner", type)}`); + } + } + if (footer) { + for (let type in footer) { + if (type.indexOf("=") >= 0) throw new Error(`Invalid footer file type: ${type}`); + flags.push(`--footer:${type}=${validateStringValue(footer[type], "footer", type)}`); + } + } + if (inject) for (let path3 of inject) flags.push(`--inject:${validateStringValue(path3, "inject")}`); + if (loader) { + for (let ext in loader) { + if (ext.indexOf("=") >= 0) throw new Error(`Invalid loader extension: ${ext}`); + flags.push(`--loader:${ext}=${validateStringValue(loader[ext], "loader", ext)}`); + } + } + if (outExtension) { + for (let ext in outExtension) { + if (ext.indexOf("=") >= 0) throw new Error(`Invalid out extension: ${ext}`); + flags.push(`--out-extension:${ext}=${validateStringValue(outExtension[ext], "out extension", ext)}`); + } + } + if (entryPoints) { + if (Array.isArray(entryPoints)) { + for (let i = 0, n = entryPoints.length; i < n; i++) { + let entryPoint = entryPoints[i]; + if (typeof entryPoint === "object" && entryPoint !== null) { + let entryPointKeys = /* @__PURE__ */ Object.create(null); + let input = getFlag(entryPoint, entryPointKeys, "in", mustBeString); + let output = getFlag(entryPoint, entryPointKeys, "out", mustBeString); + checkForInvalidFlags(entryPoint, entryPointKeys, "in entry point at index " + i); + if (input === void 0) throw new Error('Missing property "in" for entry point at index ' + i); + if (output === void 0) throw new Error('Missing property "out" for entry point at index ' + i); + entries.push([output, input]); + } else { + entries.push(["", validateStringValue(entryPoint, "entry point at index " + i)]); + } + } + } else { + for (let key in entryPoints) { + entries.push([key, validateStringValue(entryPoints[key], "entry point", key)]); + } + } + } + if (stdin) { + let stdinKeys = /* @__PURE__ */ Object.create(null); + let contents = getFlag(stdin, stdinKeys, "contents", mustBeStringOrUint8Array); + let resolveDir = getFlag(stdin, stdinKeys, "resolveDir", mustBeString); + let sourcefile = getFlag(stdin, stdinKeys, "sourcefile", mustBeString); + let loader2 = getFlag(stdin, stdinKeys, "loader", mustBeString); + checkForInvalidFlags(stdin, stdinKeys, 'in "stdin" object'); + if (sourcefile) flags.push(`--sourcefile=${sourcefile}`); + if (loader2) flags.push(`--loader=${loader2}`); + if (resolveDir) stdinResolveDir = resolveDir; + if (typeof contents === "string") stdinContents = encodeUTF8(contents); + else if (contents instanceof Uint8Array) stdinContents = contents; + } + let nodePaths = []; + if (nodePathsInput) { + for (let value of nodePathsInput) { + value += ""; + nodePaths.push(value); + } + } + return { + entries, + flags, + write, + stdinContents, + stdinResolveDir, + absWorkingDir, + nodePaths, + mangleCache: validateMangleCache(mangleCache) + }; +} +function flagsForTransformOptions(callName, options, isTTY2, logLevelDefault) { + let flags = []; + let keys = /* @__PURE__ */ Object.create(null); + pushLogFlags(flags, options, keys, isTTY2, logLevelDefault); + pushCommonFlags(flags, options, keys); + let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean); + let sourcefile = getFlag(options, keys, "sourcefile", mustBeString); + let loader = getFlag(options, keys, "loader", mustBeString); + let banner = getFlag(options, keys, "banner", mustBeString); + let footer = getFlag(options, keys, "footer", mustBeString); + let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject); + checkForInvalidFlags(options, keys, `in ${callName}() call`); + if (sourcemap) flags.push(`--sourcemap=${sourcemap === true ? "external" : sourcemap}`); + if (sourcefile) flags.push(`--sourcefile=${sourcefile}`); + if (loader) flags.push(`--loader=${loader}`); + if (banner) flags.push(`--banner=${banner}`); + if (footer) flags.push(`--footer=${footer}`); + return { + flags, + mangleCache: validateMangleCache(mangleCache) + }; +} +function createChannel(streamIn) { + const requestCallbacksByKey = {}; + const closeData = { didClose: false, reason: "" }; + let responseCallbacks = {}; + let nextRequestID = 0; + let nextBuildKey = 0; + let stdout = new Uint8Array(16 * 1024); + let stdoutUsed = 0; + let readFromStdout = (chunk) => { + let limit = stdoutUsed + chunk.length; + if (limit > stdout.length) { + let swap = new Uint8Array(limit * 2); + swap.set(stdout); + stdout = swap; + } + stdout.set(chunk, stdoutUsed); + stdoutUsed += chunk.length; + let offset = 0; + while (offset + 4 <= stdoutUsed) { + let length = readUInt32LE(stdout, offset); + if (offset + 4 + length > stdoutUsed) { + break; + } + offset += 4; + handleIncomingPacket(stdout.subarray(offset, offset + length)); + offset += length; + } + if (offset > 0) { + stdout.copyWithin(0, offset, stdoutUsed); + stdoutUsed -= offset; + } + }; + let afterClose = (error) => { + closeData.didClose = true; + if (error) closeData.reason = ": " + (error.message || error); + const text = "The service was stopped" + closeData.reason; + for (let id in responseCallbacks) { + responseCallbacks[id](text, null); + } + responseCallbacks = {}; + }; + let sendRequest = (refs, value, callback) => { + if (closeData.didClose) return callback("The service is no longer running" + closeData.reason, null); + let id = nextRequestID++; + responseCallbacks[id] = (error, response) => { + try { + callback(error, response); + } finally { + if (refs) refs.unref(); + } + }; + if (refs) refs.ref(); + streamIn.writeToStdin(encodePacket({ id, isRequest: true, value })); + }; + let sendResponse = (id, value) => { + if (closeData.didClose) throw new Error("The service is no longer running" + closeData.reason); + streamIn.writeToStdin(encodePacket({ id, isRequest: false, value })); + }; + let handleRequest = async (id, request) => { + try { + if (request.command === "ping") { + sendResponse(id, {}); + return; + } + if (typeof request.key === "number") { + const requestCallbacks = requestCallbacksByKey[request.key]; + if (!requestCallbacks) { + return; + } + const callback = requestCallbacks[request.command]; + if (callback) { + await callback(id, request); + return; + } + } + throw new Error(`Invalid command: ` + request.command); + } catch (e) { + const errors = [extractErrorMessageV8(e, streamIn, null, void 0, "")]; + try { + sendResponse(id, { errors }); + } catch { + } + } + }; + let isFirstPacket = true; + let handleIncomingPacket = (bytes) => { + if (isFirstPacket) { + isFirstPacket = false; + let binaryVersion = String.fromCharCode(...bytes); + if (binaryVersion !== "0.24.2") { + throw new Error(`Cannot start service: Host version "${"0.24.2"}" does not match binary version ${quote(binaryVersion)}`); + } + return; + } + let packet = decodePacket(bytes); + if (packet.isRequest) { + handleRequest(packet.id, packet.value); + } else { + let callback = responseCallbacks[packet.id]; + delete responseCallbacks[packet.id]; + if (packet.value.error) callback(packet.value.error, {}); + else callback(null, packet.value); + } + }; + let buildOrContext = ({ callName, refs, options, isTTY: isTTY2, defaultWD: defaultWD2, callback }) => { + let refCount = 0; + const buildKey = nextBuildKey++; + const requestCallbacks = {}; + const buildRefs = { + ref() { + if (++refCount === 1) { + if (refs) refs.ref(); + } + }, + unref() { + if (--refCount === 0) { + delete requestCallbacksByKey[buildKey]; + if (refs) refs.unref(); + } + } + }; + requestCallbacksByKey[buildKey] = requestCallbacks; + buildRefs.ref(); + buildOrContextImpl( + callName, + buildKey, + sendRequest, + sendResponse, + buildRefs, + streamIn, + requestCallbacks, + options, + isTTY2, + defaultWD2, + (err, res) => { + try { + callback(err, res); + } finally { + buildRefs.unref(); + } + } + ); + }; + let transform2 = ({ callName, refs, input, options, isTTY: isTTY2, fs: fs3, callback }) => { + const details = createObjectStash(); + let start = (inputPath) => { + try { + if (typeof input !== "string" && !(input instanceof Uint8Array)) + throw new Error('The input to "transform" must be a string or a Uint8Array'); + let { + flags, + mangleCache + } = flagsForTransformOptions(callName, options, isTTY2, transformLogLevelDefault); + let request = { + command: "transform", + flags, + inputFS: inputPath !== null, + input: inputPath !== null ? encodeUTF8(inputPath) : typeof input === "string" ? encodeUTF8(input) : input + }; + if (mangleCache) request.mangleCache = mangleCache; + sendRequest(refs, request, (error, response) => { + if (error) return callback(new Error(error), null); + let errors = replaceDetailsInMessages(response.errors, details); + let warnings = replaceDetailsInMessages(response.warnings, details); + let outstanding = 1; + let next = () => { + if (--outstanding === 0) { + let result = { + warnings, + code: response.code, + map: response.map, + mangleCache: void 0, + legalComments: void 0 + }; + if ("legalComments" in response) result.legalComments = response == null ? void 0 : response.legalComments; + if (response.mangleCache) result.mangleCache = response == null ? void 0 : response.mangleCache; + callback(null, result); + } + }; + if (errors.length > 0) return callback(failureErrorWithLog("Transform failed", errors, warnings), null); + if (response.codeFS) { + outstanding++; + fs3.readFile(response.code, (err, contents) => { + if (err !== null) { + callback(err, null); + } else { + response.code = contents; + next(); + } + }); + } + if (response.mapFS) { + outstanding++; + fs3.readFile(response.map, (err, contents) => { + if (err !== null) { + callback(err, null); + } else { + response.map = contents; + next(); + } + }); + } + next(); + }); + } catch (e) { + let flags = []; + try { + pushLogFlags(flags, options, {}, isTTY2, transformLogLevelDefault); + } catch { + } + const error = extractErrorMessageV8(e, streamIn, details, void 0, ""); + sendRequest(refs, { command: "error", flags, error }, () => { + error.detail = details.load(error.detail); + callback(failureErrorWithLog("Transform failed", [error], []), null); + }); + } + }; + if ((typeof input === "string" || input instanceof Uint8Array) && input.length > 1024 * 1024) { + let next = start; + start = () => fs3.writeFile(input, next); + } + start(null); + }; + let formatMessages2 = ({ callName, refs, messages, options, callback }) => { + if (!options) throw new Error(`Missing second argument in ${callName}() call`); + let keys = {}; + let kind = getFlag(options, keys, "kind", mustBeString); + let color = getFlag(options, keys, "color", mustBeBoolean); + let terminalWidth = getFlag(options, keys, "terminalWidth", mustBeInteger); + checkForInvalidFlags(options, keys, `in ${callName}() call`); + if (kind === void 0) throw new Error(`Missing "kind" in ${callName}() call`); + if (kind !== "error" && kind !== "warning") throw new Error(`Expected "kind" to be "error" or "warning" in ${callName}() call`); + let request = { + command: "format-msgs", + messages: sanitizeMessages(messages, "messages", null, "", terminalWidth), + isWarning: kind === "warning" + }; + if (color !== void 0) request.color = color; + if (terminalWidth !== void 0) request.terminalWidth = terminalWidth; + sendRequest(refs, request, (error, response) => { + if (error) return callback(new Error(error), null); + callback(null, response.messages); + }); + }; + let analyzeMetafile2 = ({ callName, refs, metafile, options, callback }) => { + if (options === void 0) options = {}; + let keys = {}; + let color = getFlag(options, keys, "color", mustBeBoolean); + let verbose = getFlag(options, keys, "verbose", mustBeBoolean); + checkForInvalidFlags(options, keys, `in ${callName}() call`); + let request = { + command: "analyze-metafile", + metafile + }; + if (color !== void 0) request.color = color; + if (verbose !== void 0) request.verbose = verbose; + sendRequest(refs, request, (error, response) => { + if (error) return callback(new Error(error), null); + callback(null, response.result); + }); + }; + return { + readFromStdout, + afterClose, + service: { + buildOrContext, + transform: transform2, + formatMessages: formatMessages2, + analyzeMetafile: analyzeMetafile2 + } + }; +} +function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, options, isTTY2, defaultWD2, callback) { + const details = createObjectStash(); + const isContext = callName === "context"; + const handleError = (e, pluginName) => { + const flags = []; + try { + pushLogFlags(flags, options, {}, isTTY2, buildLogLevelDefault); + } catch { + } + const message = extractErrorMessageV8(e, streamIn, details, void 0, pluginName); + sendRequest(refs, { command: "error", flags, error: message }, () => { + message.detail = details.load(message.detail); + callback(failureErrorWithLog(isContext ? "Context failed" : "Build failed", [message], []), null); + }); + }; + let plugins; + if (typeof options === "object") { + const value = options.plugins; + if (value !== void 0) { + if (!Array.isArray(value)) return handleError(new Error(`"plugins" must be an array`), ""); + plugins = value; + } + } + if (plugins && plugins.length > 0) { + if (streamIn.isSync) return handleError(new Error("Cannot use plugins in synchronous API calls"), ""); + handlePlugins( + buildKey, + sendRequest, + sendResponse, + refs, + streamIn, + requestCallbacks, + options, + plugins, + details + ).then( + (result) => { + if (!result.ok) return handleError(result.error, result.pluginName); + try { + buildOrContextContinue(result.requestPlugins, result.runOnEndCallbacks, result.scheduleOnDisposeCallbacks); + } catch (e) { + handleError(e, ""); + } + }, + (e) => handleError(e, "") + ); + return; + } + try { + buildOrContextContinue(null, (result, done) => done([], []), () => { + }); + } catch (e) { + handleError(e, ""); + } + function buildOrContextContinue(requestPlugins, runOnEndCallbacks, scheduleOnDisposeCallbacks) { + const writeDefault = streamIn.hasFS; + const { + entries, + flags, + write, + stdinContents, + stdinResolveDir, + absWorkingDir, + nodePaths, + mangleCache + } = flagsForBuildOptions(callName, options, isTTY2, buildLogLevelDefault, writeDefault); + if (write && !streamIn.hasFS) throw new Error(`The "write" option is unavailable in this environment`); + const request = { + command: "build", + key: buildKey, + entries, + flags, + write, + stdinContents, + stdinResolveDir, + absWorkingDir: absWorkingDir || defaultWD2, + nodePaths, + context: isContext + }; + if (requestPlugins) request.plugins = requestPlugins; + if (mangleCache) request.mangleCache = mangleCache; + const buildResponseToResult = (response, callback2) => { + const result = { + errors: replaceDetailsInMessages(response.errors, details), + warnings: replaceDetailsInMessages(response.warnings, details), + outputFiles: void 0, + metafile: void 0, + mangleCache: void 0 + }; + const originalErrors = result.errors.slice(); + const originalWarnings = result.warnings.slice(); + if (response.outputFiles) result.outputFiles = response.outputFiles.map(convertOutputFiles); + if (response.metafile) result.metafile = JSON.parse(response.metafile); + if (response.mangleCache) result.mangleCache = response.mangleCache; + if (response.writeToStdout !== void 0) console.log(decodeUTF8(response.writeToStdout).replace(/\n$/, "")); + runOnEndCallbacks(result, (onEndErrors, onEndWarnings) => { + if (originalErrors.length > 0 || onEndErrors.length > 0) { + const error = failureErrorWithLog("Build failed", originalErrors.concat(onEndErrors), originalWarnings.concat(onEndWarnings)); + return callback2(error, null, onEndErrors, onEndWarnings); + } + callback2(null, result, onEndErrors, onEndWarnings); + }); + }; + let latestResultPromise; + let provideLatestResult; + if (isContext) + requestCallbacks["on-end"] = (id, request2) => new Promise((resolve) => { + buildResponseToResult(request2, (err, result, onEndErrors, onEndWarnings) => { + const response = { + errors: onEndErrors, + warnings: onEndWarnings + }; + if (provideLatestResult) provideLatestResult(err, result); + latestResultPromise = void 0; + provideLatestResult = void 0; + sendResponse(id, response); + resolve(); + }); + }); + sendRequest(refs, request, (error, response) => { + if (error) return callback(new Error(error), null); + if (!isContext) { + return buildResponseToResult(response, (err, res) => { + scheduleOnDisposeCallbacks(); + return callback(err, res); + }); + } + if (response.errors.length > 0) { + return callback(failureErrorWithLog("Context failed", response.errors, response.warnings), null); + } + let didDispose = false; + const result = { + rebuild: () => { + if (!latestResultPromise) latestResultPromise = new Promise((resolve, reject) => { + let settlePromise; + provideLatestResult = (err, result2) => { + if (!settlePromise) settlePromise = () => err ? reject(err) : resolve(result2); + }; + const triggerAnotherBuild = () => { + const request2 = { + command: "rebuild", + key: buildKey + }; + sendRequest(refs, request2, (error2, response2) => { + if (error2) { + reject(new Error(error2)); + } else if (settlePromise) { + settlePromise(); + } else { + triggerAnotherBuild(); + } + }); + }; + triggerAnotherBuild(); + }); + return latestResultPromise; + }, + watch: (options2 = {}) => new Promise((resolve, reject) => { + if (!streamIn.hasFS) throw new Error(`Cannot use the "watch" API in this environment`); + const keys = {}; + checkForInvalidFlags(options2, keys, `in watch() call`); + const request2 = { + command: "watch", + key: buildKey + }; + sendRequest(refs, request2, (error2) => { + if (error2) reject(new Error(error2)); + else resolve(void 0); + }); + }), + serve: (options2 = {}) => new Promise((resolve, reject) => { + if (!streamIn.hasFS) throw new Error(`Cannot use the "serve" API in this environment`); + const keys = {}; + const port = getFlag(options2, keys, "port", mustBeInteger); + const host = getFlag(options2, keys, "host", mustBeString); + const servedir = getFlag(options2, keys, "servedir", mustBeString); + const keyfile = getFlag(options2, keys, "keyfile", mustBeString); + const certfile = getFlag(options2, keys, "certfile", mustBeString); + const fallback = getFlag(options2, keys, "fallback", mustBeString); + const onRequest = getFlag(options2, keys, "onRequest", mustBeFunction); + checkForInvalidFlags(options2, keys, `in serve() call`); + const request2 = { + command: "serve", + key: buildKey, + onRequest: !!onRequest + }; + if (port !== void 0) request2.port = port; + if (host !== void 0) request2.host = host; + if (servedir !== void 0) request2.servedir = servedir; + if (keyfile !== void 0) request2.keyfile = keyfile; + if (certfile !== void 0) request2.certfile = certfile; + if (fallback !== void 0) request2.fallback = fallback; + sendRequest(refs, request2, (error2, response2) => { + if (error2) return reject(new Error(error2)); + if (onRequest) { + requestCallbacks["serve-request"] = (id, request3) => { + onRequest(request3.args); + sendResponse(id, {}); + }; + } + resolve(response2); + }); + }), + cancel: () => new Promise((resolve) => { + if (didDispose) return resolve(); + const request2 = { + command: "cancel", + key: buildKey + }; + sendRequest(refs, request2, () => { + resolve(); + }); + }), + dispose: () => new Promise((resolve) => { + if (didDispose) return resolve(); + didDispose = true; + const request2 = { + command: "dispose", + key: buildKey + }; + sendRequest(refs, request2, () => { + resolve(); + scheduleOnDisposeCallbacks(); + refs.unref(); + }); + }) + }; + refs.ref(); + callback(null, result); + }); + } +} +var handlePlugins = async (buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, initialOptions, plugins, details) => { + let onStartCallbacks = []; + let onEndCallbacks = []; + let onResolveCallbacks = {}; + let onLoadCallbacks = {}; + let onDisposeCallbacks = []; + let nextCallbackID = 0; + let i = 0; + let requestPlugins = []; + let isSetupDone = false; + plugins = [...plugins]; + for (let item of plugins) { + let keys = {}; + if (typeof item !== "object") throw new Error(`Plugin at index ${i} must be an object`); + const name = getFlag(item, keys, "name", mustBeString); + if (typeof name !== "string" || name === "") throw new Error(`Plugin at index ${i} is missing a name`); + try { + let setup = getFlag(item, keys, "setup", mustBeFunction); + if (typeof setup !== "function") throw new Error(`Plugin is missing a setup function`); + checkForInvalidFlags(item, keys, `on plugin ${quote(name)}`); + let plugin = { + name, + onStart: false, + onEnd: false, + onResolve: [], + onLoad: [] + }; + i++; + let resolve = (path3, options = {}) => { + if (!isSetupDone) throw new Error('Cannot call "resolve" before plugin setup has completed'); + if (typeof path3 !== "string") throw new Error(`The path to resolve must be a string`); + let keys2 = /* @__PURE__ */ Object.create(null); + let pluginName = getFlag(options, keys2, "pluginName", mustBeString); + let importer = getFlag(options, keys2, "importer", mustBeString); + let namespace = getFlag(options, keys2, "namespace", mustBeString); + let resolveDir = getFlag(options, keys2, "resolveDir", mustBeString); + let kind = getFlag(options, keys2, "kind", mustBeString); + let pluginData = getFlag(options, keys2, "pluginData", canBeAnything); + let importAttributes = getFlag(options, keys2, "with", mustBeObject); + checkForInvalidFlags(options, keys2, "in resolve() call"); + return new Promise((resolve2, reject) => { + const request = { + command: "resolve", + path: path3, + key: buildKey, + pluginName: name + }; + if (pluginName != null) request.pluginName = pluginName; + if (importer != null) request.importer = importer; + if (namespace != null) request.namespace = namespace; + if (resolveDir != null) request.resolveDir = resolveDir; + if (kind != null) request.kind = kind; + else throw new Error(`Must specify "kind" when calling "resolve"`); + if (pluginData != null) request.pluginData = details.store(pluginData); + if (importAttributes != null) request.with = sanitizeStringMap(importAttributes, "with"); + sendRequest(refs, request, (error, response) => { + if (error !== null) reject(new Error(error)); + else resolve2({ + errors: replaceDetailsInMessages(response.errors, details), + warnings: replaceDetailsInMessages(response.warnings, details), + path: response.path, + external: response.external, + sideEffects: response.sideEffects, + namespace: response.namespace, + suffix: response.suffix, + pluginData: details.load(response.pluginData) + }); + }); + }); + }; + let promise = setup({ + initialOptions, + resolve, + onStart(callback) { + let registeredText = `This error came from the "onStart" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onStart"); + onStartCallbacks.push({ name, callback, note: registeredNote }); + plugin.onStart = true; + }, + onEnd(callback) { + let registeredText = `This error came from the "onEnd" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onEnd"); + onEndCallbacks.push({ name, callback, note: registeredNote }); + plugin.onEnd = true; + }, + onResolve(options, callback) { + let registeredText = `This error came from the "onResolve" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onResolve"); + let keys2 = {}; + let filter = getFlag(options, keys2, "filter", mustBeRegExp); + let namespace = getFlag(options, keys2, "namespace", mustBeString); + checkForInvalidFlags(options, keys2, `in onResolve() call for plugin ${quote(name)}`); + if (filter == null) throw new Error(`onResolve() call is missing a filter`); + let id = nextCallbackID++; + onResolveCallbacks[id] = { name, callback, note: registeredNote }; + plugin.onResolve.push({ id, filter: filter.source, namespace: namespace || "" }); + }, + onLoad(options, callback) { + let registeredText = `This error came from the "onLoad" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onLoad"); + let keys2 = {}; + let filter = getFlag(options, keys2, "filter", mustBeRegExp); + let namespace = getFlag(options, keys2, "namespace", mustBeString); + checkForInvalidFlags(options, keys2, `in onLoad() call for plugin ${quote(name)}`); + if (filter == null) throw new Error(`onLoad() call is missing a filter`); + let id = nextCallbackID++; + onLoadCallbacks[id] = { name, callback, note: registeredNote }; + plugin.onLoad.push({ id, filter: filter.source, namespace: namespace || "" }); + }, + onDispose(callback) { + onDisposeCallbacks.push(callback); + }, + esbuild: streamIn.esbuild + }); + if (promise) await promise; + requestPlugins.push(plugin); + } catch (e) { + return { ok: false, error: e, pluginName: name }; + } + } + requestCallbacks["on-start"] = async (id, request) => { + details.clear(); + let response = { errors: [], warnings: [] }; + await Promise.all(onStartCallbacks.map(async ({ name, callback, note }) => { + try { + let result = await callback(); + if (result != null) { + if (typeof result !== "object") throw new Error(`Expected onStart() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let errors = getFlag(result, keys, "errors", mustBeArray); + let warnings = getFlag(result, keys, "warnings", mustBeArray); + checkForInvalidFlags(result, keys, `from onStart() callback in plugin ${quote(name)}`); + if (errors != null) response.errors.push(...sanitizeMessages(errors, "errors", details, name, void 0)); + if (warnings != null) response.warnings.push(...sanitizeMessages(warnings, "warnings", details, name, void 0)); + } + } catch (e) { + response.errors.push(extractErrorMessageV8(e, streamIn, details, note && note(), name)); + } + })); + sendResponse(id, response); + }; + requestCallbacks["on-resolve"] = async (id, request) => { + let response = {}, name = "", callback, note; + for (let id2 of request.ids) { + try { + ({ name, callback, note } = onResolveCallbacks[id2]); + let result = await callback({ + path: request.path, + importer: request.importer, + namespace: request.namespace, + resolveDir: request.resolveDir, + kind: request.kind, + pluginData: details.load(request.pluginData), + with: request.with + }); + if (result != null) { + if (typeof result !== "object") throw new Error(`Expected onResolve() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let pluginName = getFlag(result, keys, "pluginName", mustBeString); + let path3 = getFlag(result, keys, "path", mustBeString); + let namespace = getFlag(result, keys, "namespace", mustBeString); + let suffix = getFlag(result, keys, "suffix", mustBeString); + let external = getFlag(result, keys, "external", mustBeBoolean); + let sideEffects = getFlag(result, keys, "sideEffects", mustBeBoolean); + let pluginData = getFlag(result, keys, "pluginData", canBeAnything); + let errors = getFlag(result, keys, "errors", mustBeArray); + let warnings = getFlag(result, keys, "warnings", mustBeArray); + let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray); + let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray); + checkForInvalidFlags(result, keys, `from onResolve() callback in plugin ${quote(name)}`); + response.id = id2; + if (pluginName != null) response.pluginName = pluginName; + if (path3 != null) response.path = path3; + if (namespace != null) response.namespace = namespace; + if (suffix != null) response.suffix = suffix; + if (external != null) response.external = external; + if (sideEffects != null) response.sideEffects = sideEffects; + if (pluginData != null) response.pluginData = details.store(pluginData); + if (errors != null) response.errors = sanitizeMessages(errors, "errors", details, name, void 0); + if (warnings != null) response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0); + if (watchFiles != null) response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles"); + if (watchDirs != null) response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs"); + break; + } + } catch (e) { + response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] }; + break; + } + } + sendResponse(id, response); + }; + requestCallbacks["on-load"] = async (id, request) => { + let response = {}, name = "", callback, note; + for (let id2 of request.ids) { + try { + ({ name, callback, note } = onLoadCallbacks[id2]); + let result = await callback({ + path: request.path, + namespace: request.namespace, + suffix: request.suffix, + pluginData: details.load(request.pluginData), + with: request.with + }); + if (result != null) { + if (typeof result !== "object") throw new Error(`Expected onLoad() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let pluginName = getFlag(result, keys, "pluginName", mustBeString); + let contents = getFlag(result, keys, "contents", mustBeStringOrUint8Array); + let resolveDir = getFlag(result, keys, "resolveDir", mustBeString); + let pluginData = getFlag(result, keys, "pluginData", canBeAnything); + let loader = getFlag(result, keys, "loader", mustBeString); + let errors = getFlag(result, keys, "errors", mustBeArray); + let warnings = getFlag(result, keys, "warnings", mustBeArray); + let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray); + let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray); + checkForInvalidFlags(result, keys, `from onLoad() callback in plugin ${quote(name)}`); + response.id = id2; + if (pluginName != null) response.pluginName = pluginName; + if (contents instanceof Uint8Array) response.contents = contents; + else if (contents != null) response.contents = encodeUTF8(contents); + if (resolveDir != null) response.resolveDir = resolveDir; + if (pluginData != null) response.pluginData = details.store(pluginData); + if (loader != null) response.loader = loader; + if (errors != null) response.errors = sanitizeMessages(errors, "errors", details, name, void 0); + if (warnings != null) response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0); + if (watchFiles != null) response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles"); + if (watchDirs != null) response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs"); + break; + } + } catch (e) { + response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] }; + break; + } + } + sendResponse(id, response); + }; + let runOnEndCallbacks = (result, done) => done([], []); + if (onEndCallbacks.length > 0) { + runOnEndCallbacks = (result, done) => { + (async () => { + const onEndErrors = []; + const onEndWarnings = []; + for (const { name, callback, note } of onEndCallbacks) { + let newErrors; + let newWarnings; + try { + const value = await callback(result); + if (value != null) { + if (typeof value !== "object") throw new Error(`Expected onEnd() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let errors = getFlag(value, keys, "errors", mustBeArray); + let warnings = getFlag(value, keys, "warnings", mustBeArray); + checkForInvalidFlags(value, keys, `from onEnd() callback in plugin ${quote(name)}`); + if (errors != null) newErrors = sanitizeMessages(errors, "errors", details, name, void 0); + if (warnings != null) newWarnings = sanitizeMessages(warnings, "warnings", details, name, void 0); + } + } catch (e) { + newErrors = [extractErrorMessageV8(e, streamIn, details, note && note(), name)]; + } + if (newErrors) { + onEndErrors.push(...newErrors); + try { + result.errors.push(...newErrors); + } catch { + } + } + if (newWarnings) { + onEndWarnings.push(...newWarnings); + try { + result.warnings.push(...newWarnings); + } catch { + } + } + } + done(onEndErrors, onEndWarnings); + })(); + }; + } + let scheduleOnDisposeCallbacks = () => { + for (const cb of onDisposeCallbacks) { + setTimeout(() => cb(), 0); + } + }; + isSetupDone = true; + return { + ok: true, + requestPlugins, + runOnEndCallbacks, + scheduleOnDisposeCallbacks + }; +}; +function createObjectStash() { + const map = /* @__PURE__ */ new Map(); + let nextID = 0; + return { + clear() { + map.clear(); + }, + load(id) { + return map.get(id); + }, + store(value) { + if (value === void 0) return -1; + const id = nextID++; + map.set(id, value); + return id; + } + }; +} +function extractCallerV8(e, streamIn, ident) { + let note; + let tried = false; + return () => { + if (tried) return note; + tried = true; + try { + let lines = (e.stack + "").split("\n"); + lines.splice(1, 1); + let location = parseStackLinesV8(streamIn, lines, ident); + if (location) { + note = { text: e.message, location }; + return note; + } + } catch { + } + }; +} +function extractErrorMessageV8(e, streamIn, stash, note, pluginName) { + let text = "Internal error"; + let location = null; + try { + text = (e && e.message || e) + ""; + } catch { + } + try { + location = parseStackLinesV8(streamIn, (e.stack + "").split("\n"), ""); + } catch { + } + return { id: "", pluginName, text, location, notes: note ? [note] : [], detail: stash ? stash.store(e) : -1 }; +} +function parseStackLinesV8(streamIn, lines, ident) { + let at = " at "; + if (streamIn.readFileSync && !lines[0].startsWith(at) && lines[1].startsWith(at)) { + for (let i = 1; i < lines.length; i++) { + let line = lines[i]; + if (!line.startsWith(at)) continue; + line = line.slice(at.length); + while (true) { + let match = /^(?:new |async )?\S+ \((.*)\)$/.exec(line); + if (match) { + line = match[1]; + continue; + } + match = /^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(line); + if (match) { + line = match[1]; + continue; + } + match = /^(\S+):(\d+):(\d+)$/.exec(line); + if (match) { + let contents; + try { + contents = streamIn.readFileSync(match[1], "utf8"); + } catch { + break; + } + let lineText = contents.split(/\r\n|\r|\n|\u2028|\u2029/)[+match[2] - 1] || ""; + let column = +match[3] - 1; + let length = lineText.slice(column, column + ident.length) === ident ? ident.length : 0; + return { + file: match[1], + namespace: "file", + line: +match[2], + column: encodeUTF8(lineText.slice(0, column)).length, + length: encodeUTF8(lineText.slice(column, column + length)).length, + lineText: lineText + "\n" + lines.slice(1).join("\n"), + suggestion: "" + }; + } + break; + } + } + } + return null; +} +function failureErrorWithLog(text, errors, warnings) { + let limit = 5; + text += errors.length < 1 ? "" : ` with ${errors.length} error${errors.length < 2 ? "" : "s"}:` + errors.slice(0, limit + 1).map((e, i) => { + if (i === limit) return "\n..."; + if (!e.location) return ` +error: ${e.text}`; + let { file, line, column } = e.location; + let pluginText = e.pluginName ? `[plugin: ${e.pluginName}] ` : ""; + return ` +${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`; + }).join(""); + let error = new Error(text); + for (const [key, value] of [["errors", errors], ["warnings", warnings]]) { + Object.defineProperty(error, key, { + configurable: true, + enumerable: true, + get: () => value, + set: (value2) => Object.defineProperty(error, key, { + configurable: true, + enumerable: true, + value: value2 + }) + }); + } + return error; +} +function replaceDetailsInMessages(messages, stash) { + for (const message of messages) { + message.detail = stash.load(message.detail); + } + return messages; +} +function sanitizeLocation(location, where, terminalWidth) { + if (location == null) return null; + let keys = {}; + let file = getFlag(location, keys, "file", mustBeString); + let namespace = getFlag(location, keys, "namespace", mustBeString); + let line = getFlag(location, keys, "line", mustBeInteger); + let column = getFlag(location, keys, "column", mustBeInteger); + let length = getFlag(location, keys, "length", mustBeInteger); + let lineText = getFlag(location, keys, "lineText", mustBeString); + let suggestion = getFlag(location, keys, "suggestion", mustBeString); + checkForInvalidFlags(location, keys, where); + if (lineText) { + const relevantASCII = lineText.slice( + 0, + (column && column > 0 ? column : 0) + (length && length > 0 ? length : 0) + (terminalWidth && terminalWidth > 0 ? terminalWidth : 80) + ); + if (!/[\x7F-\uFFFF]/.test(relevantASCII) && !/\n/.test(lineText)) { + lineText = relevantASCII; + } + } + return { + file: file || "", + namespace: namespace || "", + line: line || 0, + column: column || 0, + length: length || 0, + lineText: lineText || "", + suggestion: suggestion || "" + }; +} +function sanitizeMessages(messages, property, stash, fallbackPluginName, terminalWidth) { + let messagesClone = []; + let index = 0; + for (const message of messages) { + let keys = {}; + let id = getFlag(message, keys, "id", mustBeString); + let pluginName = getFlag(message, keys, "pluginName", mustBeString); + let text = getFlag(message, keys, "text", mustBeString); + let location = getFlag(message, keys, "location", mustBeObjectOrNull); + let notes = getFlag(message, keys, "notes", mustBeArray); + let detail = getFlag(message, keys, "detail", canBeAnything); + let where = `in element ${index} of "${property}"`; + checkForInvalidFlags(message, keys, where); + let notesClone = []; + if (notes) { + for (const note of notes) { + let noteKeys = {}; + let noteText = getFlag(note, noteKeys, "text", mustBeString); + let noteLocation = getFlag(note, noteKeys, "location", mustBeObjectOrNull); + checkForInvalidFlags(note, noteKeys, where); + notesClone.push({ + text: noteText || "", + location: sanitizeLocation(noteLocation, where, terminalWidth) + }); + } + } + messagesClone.push({ + id: id || "", + pluginName: pluginName || fallbackPluginName, + text: text || "", + location: sanitizeLocation(location, where, terminalWidth), + notes: notesClone, + detail: stash ? stash.store(detail) : -1 + }); + index++; + } + return messagesClone; +} +function sanitizeStringArray(values, property) { + const result = []; + for (const value of values) { + if (typeof value !== "string") throw new Error(`${quote(property)} must be an array of strings`); + result.push(value); + } + return result; +} +function sanitizeStringMap(map, property) { + const result = /* @__PURE__ */ Object.create(null); + for (const key in map) { + const value = map[key]; + if (typeof value !== "string") throw new Error(`key ${quote(key)} in object ${quote(property)} must be a string`); + result[key] = value; + } + return result; +} +function convertOutputFiles({ path: path3, contents, hash }) { + let text = null; + return { + path: path3, + contents, + hash, + get text() { + const binary = this.contents; + if (text === null || binary !== contents) { + contents = binary; + text = decodeUTF8(binary); + } + return text; + } + }; +} + +// lib/npm/node-platform.ts +var fs = require("fs"); +var os = require("os"); +var path = require("path"); +var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH; +var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild"; +var packageDarwin_arm64 = "@esbuild/darwin-arm64"; +var packageDarwin_x64 = "@esbuild/darwin-x64"; +var knownWindowsPackages = { + "win32 arm64 LE": "@esbuild/win32-arm64", + "win32 ia32 LE": "@esbuild/win32-ia32", + "win32 x64 LE": "@esbuild/win32-x64" +}; +var knownUnixlikePackages = { + "aix ppc64 BE": "@esbuild/aix-ppc64", + "android arm64 LE": "@esbuild/android-arm64", + "darwin arm64 LE": "@esbuild/darwin-arm64", + "darwin x64 LE": "@esbuild/darwin-x64", + "freebsd arm64 LE": "@esbuild/freebsd-arm64", + "freebsd x64 LE": "@esbuild/freebsd-x64", + "linux arm LE": "@esbuild/linux-arm", + "linux arm64 LE": "@esbuild/linux-arm64", + "linux ia32 LE": "@esbuild/linux-ia32", + "linux mips64el LE": "@esbuild/linux-mips64el", + "linux ppc64 LE": "@esbuild/linux-ppc64", + "linux riscv64 LE": "@esbuild/linux-riscv64", + "linux s390x BE": "@esbuild/linux-s390x", + "linux x64 LE": "@esbuild/linux-x64", + "linux loong64 LE": "@esbuild/linux-loong64", + "netbsd arm64 LE": "@esbuild/netbsd-arm64", + "netbsd x64 LE": "@esbuild/netbsd-x64", + "openbsd arm64 LE": "@esbuild/openbsd-arm64", + "openbsd x64 LE": "@esbuild/openbsd-x64", + "sunos x64 LE": "@esbuild/sunos-x64" +}; +var knownWebAssemblyFallbackPackages = { + "android arm LE": "@esbuild/android-arm", + "android x64 LE": "@esbuild/android-x64" +}; +function pkgAndSubpathForCurrentPlatform() { + let pkg; + let subpath; + let isWASM = false; + let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`; + if (platformKey in knownWindowsPackages) { + pkg = knownWindowsPackages[platformKey]; + subpath = "esbuild.exe"; + } else if (platformKey in knownUnixlikePackages) { + pkg = knownUnixlikePackages[platformKey]; + subpath = "bin/esbuild"; + } else if (platformKey in knownWebAssemblyFallbackPackages) { + pkg = knownWebAssemblyFallbackPackages[platformKey]; + subpath = "bin/esbuild"; + isWASM = true; + } else { + throw new Error(`Unsupported platform: ${platformKey}`); + } + return { pkg, subpath, isWASM }; +} +function pkgForSomeOtherPlatform() { + const libMainJS = require.resolve("esbuild"); + const nodeModulesDirectory = path.dirname(path.dirname(path.dirname(libMainJS))); + if (path.basename(nodeModulesDirectory) === "node_modules") { + for (const unixKey in knownUnixlikePackages) { + try { + const pkg = knownUnixlikePackages[unixKey]; + if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg; + } catch { + } + } + for (const windowsKey in knownWindowsPackages) { + try { + const pkg = knownWindowsPackages[windowsKey]; + if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg; + } catch { + } + } + } + return null; +} +function downloadedBinPath(pkg, subpath) { + const esbuildLibDir = path.dirname(require.resolve("esbuild")); + return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`); +} +function generateBinPath() { + if (isValidBinaryPath(ESBUILD_BINARY_PATH)) { + if (!fs.existsSync(ESBUILD_BINARY_PATH)) { + console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`); + } else { + return { binPath: ESBUILD_BINARY_PATH, isWASM: false }; + } + } + const { pkg, subpath, isWASM } = pkgAndSubpathForCurrentPlatform(); + let binPath; + try { + binPath = require.resolve(`${pkg}/${subpath}`); + } catch (e) { + binPath = downloadedBinPath(pkg, subpath); + if (!fs.existsSync(binPath)) { + try { + require.resolve(pkg); + } catch { + const otherPkg = pkgForSomeOtherPlatform(); + if (otherPkg) { + let suggestions = ` +Specifically the "${otherPkg}" package is present but this platform +needs the "${pkg}" package instead. People often get into this +situation by installing esbuild on Windows or macOS and copying "node_modules" +into a Docker image that runs Linux, or by copying "node_modules" between +Windows and WSL environments. + +If you are installing with npm, you can try not copying the "node_modules" +directory when you copy the files over, and running "npm ci" or "npm install" +on the destination platform after the copy. Or you could consider using yarn +instead of npm which has built-in support for installing a package on multiple +platforms simultaneously. + +If you are installing with yarn, you can try listing both this platform and the +other platform in your ".yarnrc.yml" file using the "supportedArchitectures" +feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures +Keep in mind that this means multiple copies of esbuild will be present. +`; + if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) { + suggestions = ` +Specifically the "${otherPkg}" package is present but this platform +needs the "${pkg}" package instead. People often get into this +situation by installing esbuild with npm running inside of Rosetta 2 and then +trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta +2 is Apple's on-the-fly x86_64-to-arm64 translation service). + +If you are installing with npm, you can try ensuring that both npm and node are +not running under Rosetta 2 and then reinstalling esbuild. This likely involves +changing how you installed npm and/or node. For example, installing node with +the universal installer here should work: https://nodejs.org/en/download/. Or +you could consider using yarn instead of npm which has built-in support for +installing a package on multiple platforms simultaneously. + +If you are installing with yarn, you can try listing both "arm64" and "x64" +in your ".yarnrc.yml" file using the "supportedArchitectures" feature: +https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures +Keep in mind that this means multiple copies of esbuild will be present. +`; + } + throw new Error(` +You installed esbuild for another platform than the one you're currently using. +This won't work because esbuild is written with native code and needs to +install a platform-specific binary executable. +${suggestions} +Another alternative is to use the "esbuild-wasm" package instead, which works +the same way on all platforms. But it comes with a heavy performance cost and +can sometimes be 10x slower than the "esbuild" package, so you may also not +want to do that. +`); + } + throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild. + +If you are installing esbuild with npm, make sure that you don't specify the +"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature +of "package.json" is used by esbuild to install the correct binary executable +for your current platform.`); + } + throw e; + } + } + if (/\.zip\//.test(binPath)) { + let pnpapi; + try { + pnpapi = require("pnpapi"); + } catch (e) { + } + if (pnpapi) { + const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation; + const binTargetPath = path.join( + root, + "node_modules", + ".cache", + "esbuild", + `pnpapi-${pkg.replace("/", "-")}-${"0.24.2"}-${path.basename(subpath)}` + ); + if (!fs.existsSync(binTargetPath)) { + fs.mkdirSync(path.dirname(binTargetPath), { recursive: true }); + fs.copyFileSync(binPath, binTargetPath); + fs.chmodSync(binTargetPath, 493); + } + return { binPath: binTargetPath, isWASM }; + } + } + return { binPath, isWASM }; +} + +// lib/npm/node.ts +var child_process = require("child_process"); +var crypto = require("crypto"); +var path2 = require("path"); +var fs2 = require("fs"); +var os2 = require("os"); +var tty = require("tty"); +var worker_threads; +if (process.env.ESBUILD_WORKER_THREADS !== "0") { + try { + worker_threads = require("worker_threads"); + } catch { + } + let [major, minor] = process.versions.node.split("."); + if ( + // { + if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) { + throw new Error( + `The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle. + +More information: The file containing the code for esbuild's JavaScript API (${__filename}) does not appear to be inside the esbuild package on the file system, which usually means that the esbuild package was bundled into another file. This is problematic because the API needs to run a binary executable inside the esbuild package which is located using a relative path from the API code to the executable. If the esbuild package is bundled, the relative path will be incorrect and the executable won't be found.` + ); + } + if (false) { + return ["node", [path2.join(__dirname, "..", "bin", "esbuild")]]; + } else { + const { binPath, isWASM } = generateBinPath(); + if (isWASM) { + return ["node", [binPath]]; + } else { + return [binPath, []]; + } + } +}; +var isTTY = () => tty.isatty(2); +var fsSync = { + readFile(tempFile, callback) { + try { + let contents = fs2.readFileSync(tempFile, "utf8"); + try { + fs2.unlinkSync(tempFile); + } catch { + } + callback(null, contents); + } catch (err) { + callback(err, null); + } + }, + writeFile(contents, callback) { + try { + let tempFile = randomFileName(); + fs2.writeFileSync(tempFile, contents); + callback(tempFile); + } catch { + callback(null); + } + } +}; +var fsAsync = { + readFile(tempFile, callback) { + try { + fs2.readFile(tempFile, "utf8", (err, contents) => { + try { + fs2.unlink(tempFile, () => callback(err, contents)); + } catch { + callback(err, contents); + } + }); + } catch (err) { + callback(err, null); + } + }, + writeFile(contents, callback) { + try { + let tempFile = randomFileName(); + fs2.writeFile(tempFile, contents, (err) => err !== null ? callback(null) : callback(tempFile)); + } catch { + callback(null); + } + } +}; +var version = "0.24.2"; +var build = (options) => ensureServiceIsRunning().build(options); +var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions); +var transform = (input, options) => ensureServiceIsRunning().transform(input, options); +var formatMessages = (messages, options) => ensureServiceIsRunning().formatMessages(messages, options); +var analyzeMetafile = (messages, options) => ensureServiceIsRunning().analyzeMetafile(messages, options); +var buildSync = (options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.buildSync(options); + } + let result; + runServiceSync((service) => service.buildOrContext({ + callName: "buildSync", + refs: null, + options, + isTTY: isTTY(), + defaultWD, + callback: (err, res) => { + if (err) throw err; + result = res; + } + })); + return result; +}; +var transformSync = (input, options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.transformSync(input, options); + } + let result; + runServiceSync((service) => service.transform({ + callName: "transformSync", + refs: null, + input, + options: options || {}, + isTTY: isTTY(), + fs: fsSync, + callback: (err, res) => { + if (err) throw err; + result = res; + } + })); + return result; +}; +var formatMessagesSync = (messages, options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.formatMessagesSync(messages, options); + } + let result; + runServiceSync((service) => service.formatMessages({ + callName: "formatMessagesSync", + refs: null, + messages, + options, + callback: (err, res) => { + if (err) throw err; + result = res; + } + })); + return result; +}; +var analyzeMetafileSync = (metafile, options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.analyzeMetafileSync(metafile, options); + } + let result; + runServiceSync((service) => service.analyzeMetafile({ + callName: "analyzeMetafileSync", + refs: null, + metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile), + options, + callback: (err, res) => { + if (err) throw err; + result = res; + } + })); + return result; +}; +var stop = () => { + if (stopService) stopService(); + if (workerThreadService) workerThreadService.stop(); + return Promise.resolve(); +}; +var initializeWasCalled = false; +var initialize = (options) => { + options = validateInitializeOptions(options || {}); + if (options.wasmURL) throw new Error(`The "wasmURL" option only works in the browser`); + if (options.wasmModule) throw new Error(`The "wasmModule" option only works in the browser`); + if (options.worker) throw new Error(`The "worker" option only works in the browser`); + if (initializeWasCalled) throw new Error('Cannot call "initialize" more than once'); + ensureServiceIsRunning(); + initializeWasCalled = true; + return Promise.resolve(); +}; +var defaultWD = process.cwd(); +var longLivedService; +var stopService; +var ensureServiceIsRunning = () => { + if (longLivedService) return longLivedService; + let [command, args] = esbuildCommandAndArgs(); + let child = child_process.spawn(command, args.concat(`--service=${"0.24.2"}`, "--ping"), { + windowsHide: true, + stdio: ["pipe", "pipe", "inherit"], + cwd: defaultWD + }); + let { readFromStdout, afterClose, service } = createChannel({ + writeToStdin(bytes) { + child.stdin.write(bytes, (err) => { + if (err) afterClose(err); + }); + }, + readFileSync: fs2.readFileSync, + isSync: false, + hasFS: true, + esbuild: node_exports + }); + child.stdin.on("error", afterClose); + child.on("error", afterClose); + const stdin = child.stdin; + const stdout = child.stdout; + stdout.on("data", readFromStdout); + stdout.on("end", afterClose); + stopService = () => { + stdin.destroy(); + stdout.destroy(); + child.kill(); + initializeWasCalled = false; + longLivedService = void 0; + stopService = void 0; + }; + let refCount = 0; + child.unref(); + if (stdin.unref) { + stdin.unref(); + } + if (stdout.unref) { + stdout.unref(); + } + const refs = { + ref() { + if (++refCount === 1) child.ref(); + }, + unref() { + if (--refCount === 0) child.unref(); + } + }; + longLivedService = { + build: (options) => new Promise((resolve, reject) => { + service.buildOrContext({ + callName: "build", + refs, + options, + isTTY: isTTY(), + defaultWD, + callback: (err, res) => err ? reject(err) : resolve(res) + }); + }), + context: (options) => new Promise((resolve, reject) => service.buildOrContext({ + callName: "context", + refs, + options, + isTTY: isTTY(), + defaultWD, + callback: (err, res) => err ? reject(err) : resolve(res) + })), + transform: (input, options) => new Promise((resolve, reject) => service.transform({ + callName: "transform", + refs, + input, + options: options || {}, + isTTY: isTTY(), + fs: fsAsync, + callback: (err, res) => err ? reject(err) : resolve(res) + })), + formatMessages: (messages, options) => new Promise((resolve, reject) => service.formatMessages({ + callName: "formatMessages", + refs, + messages, + options, + callback: (err, res) => err ? reject(err) : resolve(res) + })), + analyzeMetafile: (metafile, options) => new Promise((resolve, reject) => service.analyzeMetafile({ + callName: "analyzeMetafile", + refs, + metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile), + options, + callback: (err, res) => err ? reject(err) : resolve(res) + })) + }; + return longLivedService; +}; +var runServiceSync = (callback) => { + let [command, args] = esbuildCommandAndArgs(); + let stdin = new Uint8Array(); + let { readFromStdout, afterClose, service } = createChannel({ + writeToStdin(bytes) { + if (stdin.length !== 0) throw new Error("Must run at most one command"); + stdin = bytes; + }, + isSync: true, + hasFS: true, + esbuild: node_exports + }); + callback(service); + let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.24.2"}`), { + cwd: defaultWD, + windowsHide: true, + input: stdin, + // We don't know how large the output could be. If it's too large, the + // command will fail with ENOBUFS. Reserve 16mb for now since that feels + // like it should be enough. Also allow overriding this with an environment + // variable. + maxBuffer: +process.env.ESBUILD_MAX_BUFFER || 16 * 1024 * 1024 + }); + readFromStdout(stdout); + afterClose(null); +}; +var randomFileName = () => { + return path2.join(os2.tmpdir(), `esbuild-${crypto.randomBytes(32).toString("hex")}`); +}; +var workerThreadService = null; +var startWorkerThreadService = (worker_threads2) => { + let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel(); + let worker = new worker_threads2.Worker(__filename, { + workerData: { workerPort, defaultWD, esbuildVersion: "0.24.2" }, + transferList: [workerPort], + // From node's documentation: https://nodejs.org/api/worker_threads.html + // + // Take care when launching worker threads from preload scripts (scripts loaded + // and run using the `-r` command line flag). Unless the `execArgv` option is + // explicitly set, new Worker threads automatically inherit the command line flags + // from the running process and will preload the same preload scripts as the main + // thread. If the preload script unconditionally launches a worker thread, every + // thread spawned will spawn another until the application crashes. + // + execArgv: [] + }); + let nextID = 0; + let fakeBuildError = (text) => { + let error = new Error(`Build failed with 1 error: +error: ${text}`); + let errors = [{ id: "", pluginName: "", text, location: null, notes: [], detail: void 0 }]; + error.errors = errors; + error.warnings = []; + return error; + }; + let validateBuildSyncOptions = (options) => { + if (!options) return; + let plugins = options.plugins; + if (plugins && plugins.length > 0) throw fakeBuildError(`Cannot use plugins in synchronous API calls`); + }; + let applyProperties = (object, properties) => { + for (let key in properties) { + object[key] = properties[key]; + } + }; + let runCallSync = (command, args) => { + let id = nextID++; + let sharedBuffer = new SharedArrayBuffer(8); + let sharedBufferView = new Int32Array(sharedBuffer); + let msg = { sharedBuffer, id, command, args }; + worker.postMessage(msg); + let status = Atomics.wait(sharedBufferView, 0, 0); + if (status !== "ok" && status !== "not-equal") throw new Error("Internal error: Atomics.wait() failed: " + status); + let { message: { id: id2, resolve, reject, properties } } = worker_threads2.receiveMessageOnPort(mainPort); + if (id !== id2) throw new Error(`Internal error: Expected id ${id} but got id ${id2}`); + if (reject) { + applyProperties(reject, properties); + throw reject; + } + return resolve; + }; + worker.unref(); + return { + buildSync(options) { + validateBuildSyncOptions(options); + return runCallSync("build", [options]); + }, + transformSync(input, options) { + return runCallSync("transform", [input, options]); + }, + formatMessagesSync(messages, options) { + return runCallSync("formatMessages", [messages, options]); + }, + analyzeMetafileSync(metafile, options) { + return runCallSync("analyzeMetafile", [metafile, options]); + }, + stop() { + worker.terminate(); + workerThreadService = null; + } + }; +}; +var startSyncServiceWorker = () => { + let workerPort = worker_threads.workerData.workerPort; + let parentPort = worker_threads.parentPort; + let extractProperties = (object) => { + let properties = {}; + if (object && typeof object === "object") { + for (let key in object) { + properties[key] = object[key]; + } + } + return properties; + }; + try { + let service = ensureServiceIsRunning(); + defaultWD = worker_threads.workerData.defaultWD; + parentPort.on("message", (msg) => { + (async () => { + let { sharedBuffer, id, command, args } = msg; + let sharedBufferView = new Int32Array(sharedBuffer); + try { + switch (command) { + case "build": + workerPort.postMessage({ id, resolve: await service.build(args[0]) }); + break; + case "transform": + workerPort.postMessage({ id, resolve: await service.transform(args[0], args[1]) }); + break; + case "formatMessages": + workerPort.postMessage({ id, resolve: await service.formatMessages(args[0], args[1]) }); + break; + case "analyzeMetafile": + workerPort.postMessage({ id, resolve: await service.analyzeMetafile(args[0], args[1]) }); + break; + default: + throw new Error(`Invalid command: ${command}`); + } + } catch (reject) { + workerPort.postMessage({ id, reject, properties: extractProperties(reject) }); + } + Atomics.add(sharedBufferView, 0, 1); + Atomics.notify(sharedBufferView, 0, Infinity); + })(); + }); + } catch (reject) { + parentPort.on("message", (msg) => { + let { sharedBuffer, id } = msg; + let sharedBufferView = new Int32Array(sharedBuffer); + workerPort.postMessage({ id, reject, properties: extractProperties(reject) }); + Atomics.add(sharedBufferView, 0, 1); + Atomics.notify(sharedBufferView, 0, Infinity); + }); + } +}; +if (isInternalWorkerThread) { + startSyncServiceWorker(); +} +var node_default = node_exports; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + analyzeMetafile, + analyzeMetafileSync, + build, + buildSync, + context, + formatMessages, + formatMessagesSync, + initialize, + stop, + transform, + transformSync, + version +}); diff --git a/node_modules/esbuild/package.json b/node_modules/esbuild/package.json new file mode 100644 index 0000000..163880f --- /dev/null +++ b/node_modules/esbuild/package.json @@ -0,0 +1,48 @@ +{ + "name": "esbuild", + "version": "0.24.2", + "description": "An extremely fast JavaScript and CSS bundler and minifier.", + "repository": { + "type": "git", + "url": "git+https://github.com/evanw/esbuild.git" + }, + "scripts": { + "postinstall": "node install.js" + }, + "main": "lib/main.js", + "types": "lib/main.d.ts", + "engines": { + "node": ">=18" + }, + "bin": { + "esbuild": "bin/esbuild" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.24.2", + "@esbuild/android-arm": "0.24.2", + "@esbuild/android-arm64": "0.24.2", + "@esbuild/android-x64": "0.24.2", + "@esbuild/darwin-arm64": "0.24.2", + "@esbuild/darwin-x64": "0.24.2", + "@esbuild/freebsd-arm64": "0.24.2", + "@esbuild/freebsd-x64": "0.24.2", + "@esbuild/linux-arm": "0.24.2", + "@esbuild/linux-arm64": "0.24.2", + "@esbuild/linux-ia32": "0.24.2", + "@esbuild/linux-loong64": "0.24.2", + "@esbuild/linux-mips64el": "0.24.2", + "@esbuild/linux-ppc64": "0.24.2", + "@esbuild/linux-riscv64": "0.24.2", + "@esbuild/linux-s390x": "0.24.2", + "@esbuild/linux-x64": "0.24.2", + "@esbuild/netbsd-arm64": "0.24.2", + "@esbuild/netbsd-x64": "0.24.2", + "@esbuild/openbsd-arm64": "0.24.2", + "@esbuild/openbsd-x64": "0.24.2", + "@esbuild/sunos-x64": "0.24.2", + "@esbuild/win32-arm64": "0.24.2", + "@esbuild/win32-ia32": "0.24.2", + "@esbuild/win32-x64": "0.24.2" + }, + "license": "MIT" +} diff --git a/node_modules/escape-html/LICENSE b/node_modules/escape-html/LICENSE new file mode 100644 index 0000000..2e70de9 --- /dev/null +++ b/node_modules/escape-html/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2012-2013 TJ Holowaychuk +Copyright (c) 2015 Andreas Lubbe +Copyright (c) 2015 Tiancheng "Timothy" Gu + +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. diff --git a/node_modules/escape-html/Readme.md b/node_modules/escape-html/Readme.md new file mode 100644 index 0000000..653d9ea --- /dev/null +++ b/node_modules/escape-html/Readme.md @@ -0,0 +1,43 @@ + +# escape-html + + Escape string for use in HTML + +## Example + +```js +var escape = require('escape-html'); +var html = escape('foo & bar'); +// -> foo & bar +``` + +## Benchmark + +``` +$ npm run-script bench + +> escape-html@1.0.3 bench nodejs-escape-html +> node benchmark/index.js + + + http_parser@1.0 + node@0.10.33 + v8@3.14.5.9 + ares@1.9.0-DEV + uv@0.10.29 + zlib@1.2.3 + modules@11 + openssl@1.0.1j + + 1 test completed. + 2 tests completed. + 3 tests completed. + + no special characters x 19,435,271 ops/sec ±0.85% (187 runs sampled) + single special character x 6,132,421 ops/sec ±0.67% (194 runs sampled) + many special characters x 3,175,826 ops/sec ±0.65% (193 runs sampled) +``` + +## License + + MIT \ No newline at end of file diff --git a/node_modules/escape-html/index.js b/node_modules/escape-html/index.js new file mode 100644 index 0000000..bf9e226 --- /dev/null +++ b/node_modules/escape-html/index.js @@ -0,0 +1,78 @@ +/*! + * escape-html + * Copyright(c) 2012-2013 TJ Holowaychuk + * Copyright(c) 2015 Andreas Lubbe + * Copyright(c) 2015 Tiancheng "Timothy" Gu + * MIT Licensed + */ + +'use strict'; + +/** + * Module variables. + * @private + */ + +var matchHtmlRegExp = /["'&<>]/; + +/** + * Module exports. + * @public + */ + +module.exports = escapeHtml; + +/** + * Escape special characters in the given string of html. + * + * @param {string} string The string to escape for inserting into HTML + * @return {string} + * @public + */ + +function escapeHtml(string) { + var str = '' + string; + var match = matchHtmlRegExp.exec(str); + + if (!match) { + return str; + } + + var escape; + var html = ''; + var index = 0; + var lastIndex = 0; + + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: // " + escape = '"'; + break; + case 38: // & + escape = '&'; + break; + case 39: // ' + escape = '''; + break; + case 60: // < + escape = '<'; + break; + case 62: // > + escape = '>'; + break; + default: + continue; + } + + if (lastIndex !== index) { + html += str.substring(lastIndex, index); + } + + lastIndex = index + 1; + html += escape; + } + + return lastIndex !== index + ? html + str.substring(lastIndex, index) + : html; +} diff --git a/node_modules/escape-html/package.json b/node_modules/escape-html/package.json new file mode 100644 index 0000000..57ec7bd --- /dev/null +++ b/node_modules/escape-html/package.json @@ -0,0 +1,24 @@ +{ + "name": "escape-html", + "description": "Escape string for use in HTML", + "version": "1.0.3", + "license": "MIT", + "keywords": [ + "escape", + "html", + "utility" + ], + "repository": "component/escape-html", + "devDependencies": { + "benchmark": "1.0.0", + "beautify-benchmark": "0.2.4" + }, + "files": [ + "LICENSE", + "Readme.md", + "index.js" + ], + "scripts": { + "bench": "node benchmark/index.js" + } +} diff --git a/node_modules/etag/HISTORY.md b/node_modules/etag/HISTORY.md new file mode 100644 index 0000000..222b293 --- /dev/null +++ b/node_modules/etag/HISTORY.md @@ -0,0 +1,83 @@ +1.8.1 / 2017-09-12 +================== + + * perf: replace regular expression with substring + +1.8.0 / 2017-02-18 +================== + + * Use SHA1 instead of MD5 for ETag hashing + - Improves performance for larger entities + - Works with FIPS 140-2 OpenSSL configuration + +1.7.0 / 2015-06-08 +================== + + * Always include entity length in ETags for hash length extensions + * Generate non-Stats ETags using MD5 only (no longer CRC32) + * Improve stat performance by removing hashing + * Remove base64 padding in ETags to shorten + * Use MD5 instead of MD4 in weak ETags over 1KB + +1.6.0 / 2015-05-10 +================== + + * Improve support for JXcore + * Remove requirement of `atime` in the stats object + * Support "fake" stats objects in environments without `fs` + +1.5.1 / 2014-11-19 +================== + + * deps: crc@3.2.1 + - Minor fixes + +1.5.0 / 2014-10-14 +================== + + * Improve string performance + * Slightly improve speed for weak ETags over 1KB + +1.4.0 / 2014-09-21 +================== + + * Support "fake" stats objects + * Support Node.js 0.6 + +1.3.1 / 2014-09-14 +================== + + * Use the (new and improved) `crc` for crc32 + +1.3.0 / 2014-08-29 +================== + + * Default strings to strong ETags + * Improve speed for weak ETags over 1KB + +1.2.1 / 2014-08-29 +================== + + * Use the (much faster) `buffer-crc32` for crc32 + +1.2.0 / 2014-08-24 +================== + + * Add support for file stat objects + +1.1.0 / 2014-08-24 +================== + + * Add fast-path for empty entity + * Add weak ETag generation + * Shrink size of generated ETags + +1.0.1 / 2014-08-24 +================== + + * Fix behavior of string containing Unicode + +1.0.0 / 2014-05-18 +================== + + * Initial release diff --git a/node_modules/etag/LICENSE b/node_modules/etag/LICENSE new file mode 100644 index 0000000..cab251c --- /dev/null +++ b/node_modules/etag/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014-2016 Douglas Christopher Wilson + +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. diff --git a/node_modules/etag/README.md b/node_modules/etag/README.md new file mode 100644 index 0000000..09c2169 --- /dev/null +++ b/node_modules/etag/README.md @@ -0,0 +1,159 @@ +# etag + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Create simple HTTP ETags + +This module generates HTTP ETags (as defined in RFC 7232) for use in +HTTP responses. + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install etag +``` + +## API + + + +```js +var etag = require('etag') +``` + +### etag(entity, [options]) + +Generate a strong ETag for the given entity. This should be the complete +body of the entity. Strings, `Buffer`s, and `fs.Stats` are accepted. By +default, a strong ETag is generated except for `fs.Stats`, which will +generate a weak ETag (this can be overwritten by `options.weak`). + + + +```js +res.setHeader('ETag', etag(body)) +``` + +#### Options + +`etag` accepts these properties in the options object. + +##### weak + +Specifies if the generated ETag will include the weak validator mark (that +is, the leading `W/`). The actual entity tag is the same. The default value +is `false`, unless the `entity` is `fs.Stats`, in which case it is `true`. + +## Testing + +```sh +$ npm test +``` + +## Benchmark + +```bash +$ npm run-script bench + +> etag@1.8.1 bench nodejs-etag +> node benchmark/index.js + + http_parser@2.7.0 + node@6.11.1 + v8@5.1.281.103 + uv@1.11.0 + zlib@1.2.11 + ares@1.10.1-DEV + icu@58.2 + modules@48 + openssl@1.0.2k + +> node benchmark/body0-100b.js + + 100B body + + 4 tests completed. + + buffer - strong x 258,647 ops/sec ±1.07% (180 runs sampled) + buffer - weak x 263,812 ops/sec ±0.61% (184 runs sampled) + string - strong x 259,955 ops/sec ±1.19% (185 runs sampled) + string - weak x 264,356 ops/sec ±1.09% (184 runs sampled) + +> node benchmark/body1-1kb.js + + 1KB body + + 4 tests completed. + + buffer - strong x 189,018 ops/sec ±1.12% (182 runs sampled) + buffer - weak x 190,586 ops/sec ±0.81% (186 runs sampled) + string - strong x 144,272 ops/sec ±0.96% (188 runs sampled) + string - weak x 145,380 ops/sec ±1.43% (187 runs sampled) + +> node benchmark/body2-5kb.js + + 5KB body + + 4 tests completed. + + buffer - strong x 92,435 ops/sec ±0.42% (188 runs sampled) + buffer - weak x 92,373 ops/sec ±0.58% (189 runs sampled) + string - strong x 48,850 ops/sec ±0.56% (186 runs sampled) + string - weak x 49,380 ops/sec ±0.56% (190 runs sampled) + +> node benchmark/body3-10kb.js + + 10KB body + + 4 tests completed. + + buffer - strong x 55,989 ops/sec ±0.93% (188 runs sampled) + buffer - weak x 56,148 ops/sec ±0.55% (190 runs sampled) + string - strong x 27,345 ops/sec ±0.43% (188 runs sampled) + string - weak x 27,496 ops/sec ±0.45% (190 runs sampled) + +> node benchmark/body4-100kb.js + + 100KB body + + 4 tests completed. + + buffer - strong x 7,083 ops/sec ±0.22% (190 runs sampled) + buffer - weak x 7,115 ops/sec ±0.26% (191 runs sampled) + string - strong x 3,068 ops/sec ±0.34% (190 runs sampled) + string - weak x 3,096 ops/sec ±0.35% (190 runs sampled) + +> node benchmark/stats.js + + stat + + 4 tests completed. + + real - strong x 871,642 ops/sec ±0.34% (189 runs sampled) + real - weak x 867,613 ops/sec ±0.39% (190 runs sampled) + fake - strong x 401,051 ops/sec ±0.40% (189 runs sampled) + fake - weak x 400,100 ops/sec ±0.47% (188 runs sampled) +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/etag.svg +[npm-url]: https://npmjs.org/package/etag +[node-version-image]: https://img.shields.io/node/v/etag.svg +[node-version-url]: https://nodejs.org/en/download/ +[travis-image]: https://img.shields.io/travis/jshttp/etag/master.svg +[travis-url]: https://travis-ci.org/jshttp/etag +[coveralls-image]: https://img.shields.io/coveralls/jshttp/etag/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/etag?branch=master +[downloads-image]: https://img.shields.io/npm/dm/etag.svg +[downloads-url]: https://npmjs.org/package/etag diff --git a/node_modules/etag/index.js b/node_modules/etag/index.js new file mode 100644 index 0000000..2a585c9 --- /dev/null +++ b/node_modules/etag/index.js @@ -0,0 +1,131 @@ +/*! + * etag + * Copyright(c) 2014-2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = etag + +/** + * Module dependencies. + * @private + */ + +var crypto = require('crypto') +var Stats = require('fs').Stats + +/** + * Module variables. + * @private + */ + +var toString = Object.prototype.toString + +/** + * Generate an entity tag. + * + * @param {Buffer|string} entity + * @return {string} + * @private + */ + +function entitytag (entity) { + if (entity.length === 0) { + // fast-path empty + return '"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"' + } + + // compute hash of entity + var hash = crypto + .createHash('sha1') + .update(entity, 'utf8') + .digest('base64') + .substring(0, 27) + + // compute length of entity + var len = typeof entity === 'string' + ? Buffer.byteLength(entity, 'utf8') + : entity.length + + return '"' + len.toString(16) + '-' + hash + '"' +} + +/** + * Create a simple ETag. + * + * @param {string|Buffer|Stats} entity + * @param {object} [options] + * @param {boolean} [options.weak] + * @return {String} + * @public + */ + +function etag (entity, options) { + if (entity == null) { + throw new TypeError('argument entity is required') + } + + // support fs.Stats object + var isStats = isstats(entity) + var weak = options && typeof options.weak === 'boolean' + ? options.weak + : isStats + + // validate argument + if (!isStats && typeof entity !== 'string' && !Buffer.isBuffer(entity)) { + throw new TypeError('argument entity must be string, Buffer, or fs.Stats') + } + + // generate entity tag + var tag = isStats + ? stattag(entity) + : entitytag(entity) + + return weak + ? 'W/' + tag + : tag +} + +/** + * Determine if object is a Stats object. + * + * @param {object} obj + * @return {boolean} + * @api private + */ + +function isstats (obj) { + // genuine fs.Stats + if (typeof Stats === 'function' && obj instanceof Stats) { + return true + } + + // quack quack + return obj && typeof obj === 'object' && + 'ctime' in obj && toString.call(obj.ctime) === '[object Date]' && + 'mtime' in obj && toString.call(obj.mtime) === '[object Date]' && + 'ino' in obj && typeof obj.ino === 'number' && + 'size' in obj && typeof obj.size === 'number' +} + +/** + * Generate a tag for a stat. + * + * @param {object} stat + * @return {string} + * @private + */ + +function stattag (stat) { + var mtime = stat.mtime.getTime().toString(16) + var size = stat.size.toString(16) + + return '"' + size + '-' + mtime + '"' +} diff --git a/node_modules/etag/package.json b/node_modules/etag/package.json new file mode 100644 index 0000000..b06ab80 --- /dev/null +++ b/node_modules/etag/package.json @@ -0,0 +1,47 @@ +{ + "name": "etag", + "description": "Create simple HTTP ETags", + "version": "1.8.1", + "contributors": [ + "Douglas Christopher Wilson ", + "David Björklund " + ], + "license": "MIT", + "keywords": [ + "etag", + "http", + "res" + ], + "repository": "jshttp/etag", + "devDependencies": { + "beautify-benchmark": "0.2.4", + "benchmark": "2.1.4", + "eslint": "3.19.0", + "eslint-config-standard": "10.2.1", + "eslint-plugin-import": "2.7.0", + "eslint-plugin-markdown": "1.0.0-beta.6", + "eslint-plugin-node": "5.1.1", + "eslint-plugin-promise": "3.5.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "1.21.5", + "safe-buffer": "5.1.1", + "seedrandom": "2.4.3" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "bench": "node benchmark/index.js", + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + } +} diff --git a/node_modules/exit-hook/index.d.ts b/node_modules/exit-hook/index.d.ts new file mode 100644 index 0000000..f7aed97 --- /dev/null +++ b/node_modules/exit-hook/index.d.ts @@ -0,0 +1,37 @@ +/** +Run some code when the process exits. + +The `process.on('exit')` event doesn't catch all the ways a process can exit. + +This package is useful for cleaning up before exiting. + +@param callback - The callback to execute when the process exits. +@returns A function that removes the hook when called. + +@example +``` +import exitHook = require('exit-hook'); + +exitHook(() => { + console.log('Exiting'); +}); + +// You can add multiple hooks, even across files +exitHook(() => { + console.log('Exiting 2'); +}); + +throw new Error('🦄'); + +//=> 'Exiting' +//=> 'Exiting 2' + +// Removing an exit hook: +const unsubscribe = exitHook(() => {}); + +unsubscribe(); +``` +*/ +declare function exitHook(callback: () => void): () => void; + +export = exitHook; diff --git a/node_modules/exit-hook/index.js b/node_modules/exit-hook/index.js new file mode 100644 index 0000000..fc309b0 --- /dev/null +++ b/node_modules/exit-hook/index.js @@ -0,0 +1,46 @@ +'use strict'; + +const callbacks = new Set(); +let isCalled = false; +let isRegistered = false; + +function exit(exit, signal) { + if (isCalled) { + return; + } + + isCalled = true; + + for (const callback of callbacks) { + callback(); + } + + if (exit === true) { + process.exit(128 + signal); // eslint-disable-line unicorn/no-process-exit + } +} + +module.exports = callback => { + callbacks.add(callback); + + if (!isRegistered) { + isRegistered = true; + + process.once('exit', exit); + process.once('SIGINT', exit.bind(null, true, 2)); + process.once('SIGTERM', exit.bind(null, true, 15)); + + // PM2 Cluster shutdown message. Caught to support async handlers with pm2, needed because + // explicitly calling process.exit() doesn't trigger the beforeExit event, and the exit + // event cannot support async handlers, since the event loop is never called after it. + process.on('message', message => { + if (message === 'shutdown') { + exit(true, -128); + } + }); + } + + return () => { + callbacks.delete(callback); + }; +}; diff --git a/node_modules/exit-hook/license b/node_modules/exit-hook/license new file mode 100644 index 0000000..fa7ceba --- /dev/null +++ b/node_modules/exit-hook/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.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. diff --git a/node_modules/exit-hook/package.json b/node_modules/exit-hook/package.json new file mode 100644 index 0000000..3ef0ea8 --- /dev/null +++ b/node_modules/exit-hook/package.json @@ -0,0 +1,45 @@ +{ + "name": "exit-hook", + "version": "2.2.1", + "description": "Run some code when the process exits", + "license": "MIT", + "repository": "sindresorhus/exit-hook", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "exit", + "quit", + "process", + "hook", + "graceful", + "handler", + "shutdown", + "sigterm", + "sigint", + "terminate", + "kill", + "stop", + "event", + "signal" + ], + "devDependencies": { + "ava": "^1.4.1", + "execa": "^1.0.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/exit-hook/readme.md b/node_modules/exit-hook/readme.md new file mode 100644 index 0000000..e9eb7a2 --- /dev/null +++ b/node_modules/exit-hook/readme.md @@ -0,0 +1,67 @@ +# exit-hook + +> Run some code when the process exits + +The `process.on('exit')` event doesn't catch all the ways a process can exit. + +This package is useful for cleaning up before exiting. + +## Install + +``` +$ npm install exit-hook +``` + +## Usage + +```js +const exitHook = require('exit-hook'); + +exitHook(() => { + console.log('Exiting'); +}); + +// You can add multiple hooks, even across files +exitHook(() => { + console.log('Exiting 2'); +}); + +throw new Error('🦄'); + +//=> 'Exiting' +//=> 'Exiting 2' +``` + +Removing an exit hook: + +```js +const exitHook = require('exit-hook'); + +const unsubscribe = exitHook(() => {}); + +unsubscribe(); +``` + +## API + +### exitHook(callback) + +Returns a function that removes the hook when called. + +#### callback + +Type: `Function` + +The callback to execute when the process exits. + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/node_modules/express/History.md b/node_modules/express/History.md new file mode 100644 index 0000000..c234f52 --- /dev/null +++ b/node_modules/express/History.md @@ -0,0 +1,3656 @@ +4.21.2 / 2024-11-06 +========== + + * deps: path-to-regexp@0.1.12 + - Fix backtracking protection + * deps: path-to-regexp@0.1.11 + - Throws an error on invalid path values + +4.21.1 / 2024-10-08 +========== + + * Backported a fix for [CVE-2024-47764](https://nvd.nist.gov/vuln/detail/CVE-2024-47764) + + +4.21.0 / 2024-09-11 +========== + + * Deprecate `res.location("back")` and `res.redirect("back")` magic string + * deps: serve-static@1.16.2 + * includes send@0.19.0 + * deps: finalhandler@1.3.1 + * deps: qs@6.13.0 + +4.20.0 / 2024-09-10 +========== + * deps: serve-static@0.16.0 + * Remove link renderization in html while redirecting + * deps: send@0.19.0 + * Remove link renderization in html while redirecting + * deps: body-parser@0.6.0 + * add `depth` option to customize the depth level in the parser + * IMPORTANT: The default `depth` level for parsing URL-encoded data is now `32` (previously was `Infinity`) + * Remove link renderization in html while using `res.redirect` + * deps: path-to-regexp@0.1.10 + - Adds support for named matching groups in the routes using a regex + - Adds backtracking protection to parameters without regexes defined + * deps: encodeurl@~2.0.0 + - Removes encoding of `\`, `|`, and `^` to align better with URL spec + * Deprecate passing `options.maxAge` and `options.expires` to `res.clearCookie` + - Will be ignored in v5, clearCookie will set a cookie with an expires in the past to instruct clients to delete the cookie + +4.19.2 / 2024-03-25 +========== + + * Improved fix for open redirect allow list bypass + +4.19.1 / 2024-03-20 +========== + + * Allow passing non-strings to res.location with new encoding handling checks + +4.19.0 / 2024-03-20 +========== + + * Prevent open redirect allow list bypass due to encodeurl + * deps: cookie@0.6.0 + +4.18.3 / 2024-02-29 +========== + + * Fix routing requests without method + * deps: body-parser@1.20.2 + - Fix strict json error message on Node.js 19+ + - deps: content-type@~1.0.5 + - deps: raw-body@2.5.2 + * deps: cookie@0.6.0 + - Add `partitioned` option + +4.18.2 / 2022-10-08 +=================== + + * Fix regression routing a large stack in a single route + * deps: body-parser@1.20.1 + - deps: qs@6.11.0 + - perf: remove unnecessary object clone + * deps: qs@6.11.0 + +4.18.1 / 2022-04-29 +=================== + + * Fix hanging on large stack of sync routes + +4.18.0 / 2022-04-25 +=================== + + * Add "root" option to `res.download` + * Allow `options` without `filename` in `res.download` + * Deprecate string and non-integer arguments to `res.status` + * Fix behavior of `null`/`undefined` as `maxAge` in `res.cookie` + * Fix handling very large stacks of sync middleware + * Ignore `Object.prototype` values in settings through `app.set`/`app.get` + * Invoke `default` with same arguments as types in `res.format` + * Support proper 205 responses using `res.send` + * Use `http-errors` for `res.format` error + * deps: body-parser@1.20.0 + - Fix error message for json parse whitespace in `strict` + - Fix internal error when inflated body exceeds limit + - Prevent loss of async hooks context + - Prevent hanging when request already read + - deps: depd@2.0.0 + - deps: http-errors@2.0.0 + - deps: on-finished@2.4.1 + - deps: qs@6.10.3 + - deps: raw-body@2.5.1 + * deps: cookie@0.5.0 + - Add `priority` option + - Fix `expires` option to reject invalid dates + * deps: depd@2.0.0 + - Replace internal `eval` usage with `Function` constructor + - Use instance methods on `process` to check for listeners + * deps: finalhandler@1.2.0 + - Remove set content headers that break response + - deps: on-finished@2.4.1 + - deps: statuses@2.0.1 + * deps: on-finished@2.4.1 + - Prevent loss of async hooks context + * deps: qs@6.10.3 + * deps: send@0.18.0 + - Fix emitted 416 error missing headers property + - Limit the headers removed for 304 response + - deps: depd@2.0.0 + - deps: destroy@1.2.0 + - deps: http-errors@2.0.0 + - deps: on-finished@2.4.1 + - deps: statuses@2.0.1 + * deps: serve-static@1.15.0 + - deps: send@0.18.0 + * deps: statuses@2.0.1 + - Remove code 306 + - Rename `425 Unordered Collection` to standard `425 Too Early` + +4.17.3 / 2022-02-16 +=================== + + * deps: accepts@~1.3.8 + - deps: mime-types@~2.1.34 + - deps: negotiator@0.6.3 + * deps: body-parser@1.19.2 + - deps: bytes@3.1.2 + - deps: qs@6.9.7 + - deps: raw-body@2.4.3 + * deps: cookie@0.4.2 + * deps: qs@6.9.7 + * Fix handling of `__proto__` keys + * pref: remove unnecessary regexp for trust proxy + +4.17.2 / 2021-12-16 +=================== + + * Fix handling of `undefined` in `res.jsonp` + * Fix handling of `undefined` when `"json escape"` is enabled + * Fix incorrect middleware execution with unanchored `RegExp`s + * Fix `res.jsonp(obj, status)` deprecation message + * Fix typo in `res.is` JSDoc + * deps: body-parser@1.19.1 + - deps: bytes@3.1.1 + - deps: http-errors@1.8.1 + - deps: qs@6.9.6 + - deps: raw-body@2.4.2 + - deps: safe-buffer@5.2.1 + - deps: type-is@~1.6.18 + * deps: content-disposition@0.5.4 + - deps: safe-buffer@5.2.1 + * deps: cookie@0.4.1 + - Fix `maxAge` option to reject invalid values + * deps: proxy-addr@~2.0.7 + - Use `req.socket` over deprecated `req.connection` + - deps: forwarded@0.2.0 + - deps: ipaddr.js@1.9.1 + * deps: qs@6.9.6 + * deps: safe-buffer@5.2.1 + * deps: send@0.17.2 + - deps: http-errors@1.8.1 + - deps: ms@2.1.3 + - pref: ignore empty http tokens + * deps: serve-static@1.14.2 + - deps: send@0.17.2 + * deps: setprototypeof@1.2.0 + +4.17.1 / 2019-05-25 +=================== + + * Revert "Improve error message for `null`/`undefined` to `res.status`" + +4.17.0 / 2019-05-16 +=================== + + * Add `express.raw` to parse bodies into `Buffer` + * Add `express.text` to parse bodies into string + * Improve error message for non-strings to `res.sendFile` + * Improve error message for `null`/`undefined` to `res.status` + * Support multiple hosts in `X-Forwarded-Host` + * deps: accepts@~1.3.7 + * deps: body-parser@1.19.0 + - Add encoding MIK + - Add petabyte (`pb`) support + - Fix parsing array brackets after index + - deps: bytes@3.1.0 + - deps: http-errors@1.7.2 + - deps: iconv-lite@0.4.24 + - deps: qs@6.7.0 + - deps: raw-body@2.4.0 + - deps: type-is@~1.6.17 + * deps: content-disposition@0.5.3 + * deps: cookie@0.4.0 + - Add `SameSite=None` support + * deps: finalhandler@~1.1.2 + - Set stricter `Content-Security-Policy` header + - deps: parseurl@~1.3.3 + - deps: statuses@~1.5.0 + * deps: parseurl@~1.3.3 + * deps: proxy-addr@~2.0.5 + - deps: ipaddr.js@1.9.0 + * deps: qs@6.7.0 + - Fix parsing array brackets after index + * deps: range-parser@~1.2.1 + * deps: send@0.17.1 + - Set stricter CSP header in redirect & error responses + - deps: http-errors@~1.7.2 + - deps: mime@1.6.0 + - deps: ms@2.1.1 + - deps: range-parser@~1.2.1 + - deps: statuses@~1.5.0 + - perf: remove redundant `path.normalize` call + * deps: serve-static@1.14.1 + - Set stricter CSP header in redirect response + - deps: parseurl@~1.3.3 + - deps: send@0.17.1 + * deps: setprototypeof@1.1.1 + * deps: statuses@~1.5.0 + - Add `103 Early Hints` + * deps: type-is@~1.6.18 + - deps: mime-types@~2.1.24 + - perf: prevent internal `throw` on invalid type + +4.16.4 / 2018-10-10 +=================== + + * Fix issue where `"Request aborted"` may be logged in `res.sendfile` + * Fix JSDoc for `Router` constructor + * deps: body-parser@1.18.3 + - Fix deprecation warnings on Node.js 10+ + - Fix stack trace for strict json parse error + - deps: depd@~1.1.2 + - deps: http-errors@~1.6.3 + - deps: iconv-lite@0.4.23 + - deps: qs@6.5.2 + - deps: raw-body@2.3.3 + - deps: type-is@~1.6.16 + * deps: proxy-addr@~2.0.4 + - deps: ipaddr.js@1.8.0 + * deps: qs@6.5.2 + * deps: safe-buffer@5.1.2 + +4.16.3 / 2018-03-12 +=================== + + * deps: accepts@~1.3.5 + - deps: mime-types@~2.1.18 + * deps: depd@~1.1.2 + - perf: remove argument reassignment + * deps: encodeurl@~1.0.2 + - Fix encoding `%` as last character + * deps: finalhandler@1.1.1 + - Fix 404 output for bad / missing pathnames + - deps: encodeurl@~1.0.2 + - deps: statuses@~1.4.0 + * deps: proxy-addr@~2.0.3 + - deps: ipaddr.js@1.6.0 + * deps: send@0.16.2 + - Fix incorrect end tag in default error & redirects + - deps: depd@~1.1.2 + - deps: encodeurl@~1.0.2 + - deps: statuses@~1.4.0 + * deps: serve-static@1.13.2 + - Fix incorrect end tag in redirects + - deps: encodeurl@~1.0.2 + - deps: send@0.16.2 + * deps: statuses@~1.4.0 + * deps: type-is@~1.6.16 + - deps: mime-types@~2.1.18 + +4.16.2 / 2017-10-09 +=================== + + * Fix `TypeError` in `res.send` when given `Buffer` and `ETag` header set + * perf: skip parsing of entire `X-Forwarded-Proto` header + +4.16.1 / 2017-09-29 +=================== + + * deps: send@0.16.1 + * deps: serve-static@1.13.1 + - Fix regression when `root` is incorrectly set to a file + - deps: send@0.16.1 + +4.16.0 / 2017-09-28 +=================== + + * Add `"json escape"` setting for `res.json` and `res.jsonp` + * Add `express.json` and `express.urlencoded` to parse bodies + * Add `options` argument to `res.download` + * Improve error message when autoloading invalid view engine + * Improve error messages when non-function provided as middleware + * Skip `Buffer` encoding when not generating ETag for small response + * Use `safe-buffer` for improved Buffer API + * deps: accepts@~1.3.4 + - deps: mime-types@~2.1.16 + * deps: content-type@~1.0.4 + - perf: remove argument reassignment + - perf: skip parameter parsing when no parameters + * deps: etag@~1.8.1 + - perf: replace regular expression with substring + * deps: finalhandler@1.1.0 + - Use `res.headersSent` when available + * deps: parseurl@~1.3.2 + - perf: reduce overhead for full URLs + - perf: unroll the "fast-path" `RegExp` + * deps: proxy-addr@~2.0.2 + - Fix trimming leading / trailing OWS in `X-Forwarded-For` + - deps: forwarded@~0.1.2 + - deps: ipaddr.js@1.5.2 + - perf: reduce overhead when no `X-Forwarded-For` header + * deps: qs@6.5.1 + - Fix parsing & compacting very deep objects + * deps: send@0.16.0 + - Add 70 new types for file extensions + - Add `immutable` option + - Fix missing `` in default error & redirects + - Set charset as "UTF-8" for .js and .json + - Use instance methods on steam to check for listeners + - deps: mime@1.4.1 + - perf: improve path validation speed + * deps: serve-static@1.13.0 + - Add 70 new types for file extensions + - Add `immutable` option + - Set charset as "UTF-8" for .js and .json + - deps: send@0.16.0 + * deps: setprototypeof@1.1.0 + * deps: utils-merge@1.0.1 + * deps: vary@~1.1.2 + - perf: improve header token parsing speed + * perf: re-use options object when generating ETags + * perf: remove dead `.charset` set in `res.jsonp` + +4.15.5 / 2017-09-24 +=================== + + * deps: debug@2.6.9 + * deps: finalhandler@~1.0.6 + - deps: debug@2.6.9 + - deps: parseurl@~1.3.2 + * deps: fresh@0.5.2 + - Fix handling of modified headers with invalid dates + - perf: improve ETag match loop + - perf: improve `If-None-Match` token parsing + * deps: send@0.15.6 + - Fix handling of modified headers with invalid dates + - deps: debug@2.6.9 + - deps: etag@~1.8.1 + - deps: fresh@0.5.2 + - perf: improve `If-Match` token parsing + * deps: serve-static@1.12.6 + - deps: parseurl@~1.3.2 + - deps: send@0.15.6 + - perf: improve slash collapsing + +4.15.4 / 2017-08-06 +=================== + + * deps: debug@2.6.8 + * deps: depd@~1.1.1 + - Remove unnecessary `Buffer` loading + * deps: finalhandler@~1.0.4 + - deps: debug@2.6.8 + * deps: proxy-addr@~1.1.5 + - Fix array argument being altered + - deps: ipaddr.js@1.4.0 + * deps: qs@6.5.0 + * deps: send@0.15.4 + - deps: debug@2.6.8 + - deps: depd@~1.1.1 + - deps: http-errors@~1.6.2 + * deps: serve-static@1.12.4 + - deps: send@0.15.4 + +4.15.3 / 2017-05-16 +=================== + + * Fix error when `res.set` cannot add charset to `Content-Type` + * deps: debug@2.6.7 + - Fix `DEBUG_MAX_ARRAY_LENGTH` + - deps: ms@2.0.0 + * deps: finalhandler@~1.0.3 + - Fix missing `` in HTML document + - deps: debug@2.6.7 + * deps: proxy-addr@~1.1.4 + - deps: ipaddr.js@1.3.0 + * deps: send@0.15.3 + - deps: debug@2.6.7 + - deps: ms@2.0.0 + * deps: serve-static@1.12.3 + - deps: send@0.15.3 + * deps: type-is@~1.6.15 + - deps: mime-types@~2.1.15 + * deps: vary@~1.1.1 + - perf: hoist regular expression + +4.15.2 / 2017-03-06 +=================== + + * deps: qs@6.4.0 + - Fix regression parsing keys starting with `[` + +4.15.1 / 2017-03-05 +=================== + + * deps: send@0.15.1 + - Fix issue when `Date.parse` does not return `NaN` on invalid date + - Fix strict violation in broken environments + * deps: serve-static@1.12.1 + - Fix issue when `Date.parse` does not return `NaN` on invalid date + - deps: send@0.15.1 + +4.15.0 / 2017-03-01 +=================== + + * Add debug message when loading view engine + * Add `next("router")` to exit from router + * Fix case where `router.use` skipped requests routes did not + * Remove usage of `res._headers` private field + - Improves compatibility with Node.js 8 nightly + * Skip routing when `req.url` is not set + * Use `%o` in path debug to tell types apart + * Use `Object.create` to setup request & response prototypes + * Use `setprototypeof` module to replace `__proto__` setting + * Use `statuses` instead of `http` module for status messages + * deps: debug@2.6.1 + - Allow colors in workers + - Deprecated `DEBUG_FD` environment variable set to `3` or higher + - Fix error when running under React Native + - Use same color for same namespace + - deps: ms@0.7.2 + * deps: etag@~1.8.0 + - Use SHA1 instead of MD5 for ETag hashing + - Works with FIPS 140-2 OpenSSL configuration + * deps: finalhandler@~1.0.0 + - Fix exception when `err` cannot be converted to a string + - Fully URL-encode the pathname in the 404 + - Only include the pathname in the 404 message + - Send complete HTML document + - Set `Content-Security-Policy: default-src 'self'` header + - deps: debug@2.6.1 + * deps: fresh@0.5.0 + - Fix false detection of `no-cache` request directive + - Fix incorrect result when `If-None-Match` has both `*` and ETags + - Fix weak `ETag` matching to match spec + - perf: delay reading header values until needed + - perf: enable strict mode + - perf: hoist regular expressions + - perf: remove duplicate conditional + - perf: remove unnecessary boolean coercions + - perf: skip checking modified time if ETag check failed + - perf: skip parsing `If-None-Match` when no `ETag` header + - perf: use `Date.parse` instead of `new Date` + * deps: qs@6.3.1 + - Fix array parsing from skipping empty values + - Fix compacting nested arrays + * deps: send@0.15.0 + - Fix false detection of `no-cache` request directive + - Fix incorrect result when `If-None-Match` has both `*` and ETags + - Fix weak `ETag` matching to match spec + - Remove usage of `res._headers` private field + - Support `If-Match` and `If-Unmodified-Since` headers + - Use `res.getHeaderNames()` when available + - Use `res.headersSent` when available + - deps: debug@2.6.1 + - deps: etag@~1.8.0 + - deps: fresh@0.5.0 + - deps: http-errors@~1.6.1 + * deps: serve-static@1.12.0 + - Fix false detection of `no-cache` request directive + - Fix incorrect result when `If-None-Match` has both `*` and ETags + - Fix weak `ETag` matching to match spec + - Remove usage of `res._headers` private field + - Send complete HTML document in redirect response + - Set default CSP header in redirect response + - Support `If-Match` and `If-Unmodified-Since` headers + - Use `res.getHeaderNames()` when available + - Use `res.headersSent` when available + - deps: send@0.15.0 + * perf: add fast match path for `*` route + * perf: improve `req.ips` performance + +4.14.1 / 2017-01-28 +=================== + + * deps: content-disposition@0.5.2 + * deps: finalhandler@0.5.1 + - Fix exception when `err.headers` is not an object + - deps: statuses@~1.3.1 + - perf: hoist regular expressions + - perf: remove duplicate validation path + * deps: proxy-addr@~1.1.3 + - deps: ipaddr.js@1.2.0 + * deps: send@0.14.2 + - deps: http-errors@~1.5.1 + - deps: ms@0.7.2 + - deps: statuses@~1.3.1 + * deps: serve-static@~1.11.2 + - deps: send@0.14.2 + * deps: type-is@~1.6.14 + - deps: mime-types@~2.1.13 + +4.14.0 / 2016-06-16 +=================== + + * Add `acceptRanges` option to `res.sendFile`/`res.sendfile` + * Add `cacheControl` option to `res.sendFile`/`res.sendfile` + * Add `options` argument to `req.range` + - Includes the `combine` option + * Encode URL in `res.location`/`res.redirect` if not already encoded + * Fix some redirect handling in `res.sendFile`/`res.sendfile` + * Fix Windows absolute path check using forward slashes + * Improve error with invalid arguments to `req.get()` + * Improve performance for `res.json`/`res.jsonp` in most cases + * Improve `Range` header handling in `res.sendFile`/`res.sendfile` + * deps: accepts@~1.3.3 + - Fix including type extensions in parameters in `Accept` parsing + - Fix parsing `Accept` parameters with quoted equals + - Fix parsing `Accept` parameters with quoted semicolons + - Many performance improvements + - deps: mime-types@~2.1.11 + - deps: negotiator@0.6.1 + * deps: content-type@~1.0.2 + - perf: enable strict mode + * deps: cookie@0.3.1 + - Add `sameSite` option + - Fix cookie `Max-Age` to never be a floating point number + - Improve error message when `encode` is not a function + - Improve error message when `expires` is not a `Date` + - Throw better error for invalid argument to parse + - Throw on invalid values provided to `serialize` + - perf: enable strict mode + - perf: hoist regular expression + - perf: use for loop in parse + - perf: use string concatenation for serialization + * deps: finalhandler@0.5.0 + - Change invalid or non-numeric status code to 500 + - Overwrite status message to match set status code + - Prefer `err.statusCode` if `err.status` is invalid + - Set response headers from `err.headers` object + - Use `statuses` instead of `http` module for status messages + * deps: proxy-addr@~1.1.2 + - Fix accepting various invalid netmasks + - Fix IPv6-mapped IPv4 validation edge cases + - IPv4 netmasks must be contiguous + - IPv6 addresses cannot be used as a netmask + - deps: ipaddr.js@1.1.1 + * deps: qs@6.2.0 + - Add `decoder` option in `parse` function + * deps: range-parser@~1.2.0 + - Add `combine` option to combine overlapping ranges + - Fix incorrectly returning -1 when there is at least one valid range + - perf: remove internal function + * deps: send@0.14.1 + - Add `acceptRanges` option + - Add `cacheControl` option + - Attempt to combine multiple ranges into single range + - Correctly inherit from `Stream` class + - Fix `Content-Range` header in 416 responses when using `start`/`end` options + - Fix `Content-Range` header missing from default 416 responses + - Fix redirect error when `path` contains raw non-URL characters + - Fix redirect when `path` starts with multiple forward slashes + - Ignore non-byte `Range` headers + - deps: http-errors@~1.5.0 + - deps: range-parser@~1.2.0 + - deps: statuses@~1.3.0 + - perf: remove argument reassignment + * deps: serve-static@~1.11.1 + - Add `acceptRanges` option + - Add `cacheControl` option + - Attempt to combine multiple ranges into single range + - Fix redirect error when `req.url` contains raw non-URL characters + - Ignore non-byte `Range` headers + - Use status code 301 for redirects + - deps: send@0.14.1 + * deps: type-is@~1.6.13 + - Fix type error when given invalid type to match against + - deps: mime-types@~2.1.11 + * deps: vary@~1.1.0 + - Only accept valid field names in the `field` argument + * perf: use strict equality when possible + +4.13.4 / 2016-01-21 +=================== + + * deps: content-disposition@0.5.1 + - perf: enable strict mode + * deps: cookie@0.1.5 + - Throw on invalid values provided to `serialize` + * deps: depd@~1.1.0 + - Support web browser loading + - perf: enable strict mode + * deps: escape-html@~1.0.3 + - perf: enable strict mode + - perf: optimize string replacement + - perf: use faster string coercion + * deps: finalhandler@0.4.1 + - deps: escape-html@~1.0.3 + * deps: merge-descriptors@1.0.1 + - perf: enable strict mode + * deps: methods@~1.1.2 + - perf: enable strict mode + * deps: parseurl@~1.3.1 + - perf: enable strict mode + * deps: proxy-addr@~1.0.10 + - deps: ipaddr.js@1.0.5 + - perf: enable strict mode + * deps: range-parser@~1.0.3 + - perf: enable strict mode + * deps: send@0.13.1 + - deps: depd@~1.1.0 + - deps: destroy@~1.0.4 + - deps: escape-html@~1.0.3 + - deps: range-parser@~1.0.3 + * deps: serve-static@~1.10.2 + - deps: escape-html@~1.0.3 + - deps: parseurl@~1.3.0 + - deps: send@0.13.1 + +4.13.3 / 2015-08-02 +=================== + + * Fix infinite loop condition using `mergeParams: true` + * Fix inner numeric indices incorrectly altering parent `req.params` + +4.13.2 / 2015-07-31 +=================== + + * deps: accepts@~1.2.12 + - deps: mime-types@~2.1.4 + * deps: array-flatten@1.1.1 + - perf: enable strict mode + * deps: path-to-regexp@0.1.7 + - Fix regression with escaped round brackets and matching groups + * deps: type-is@~1.6.6 + - deps: mime-types@~2.1.4 + +4.13.1 / 2015-07-05 +=================== + + * deps: accepts@~1.2.10 + - deps: mime-types@~2.1.2 + * deps: qs@4.0.0 + - Fix dropping parameters like `hasOwnProperty` + - Fix various parsing edge cases + * deps: type-is@~1.6.4 + - deps: mime-types@~2.1.2 + - perf: enable strict mode + - perf: remove argument reassignment + +4.13.0 / 2015-06-20 +=================== + + * Add settings to debug output + * Fix `res.format` error when only `default` provided + * Fix issue where `next('route')` in `app.param` would incorrectly skip values + * Fix hiding platform issues with `decodeURIComponent` + - Only `URIError`s are a 400 + * Fix using `*` before params in routes + * Fix using capture groups before params in routes + * Simplify `res.cookie` to call `res.append` + * Use `array-flatten` module for flattening arrays + * deps: accepts@~1.2.9 + - deps: mime-types@~2.1.1 + - perf: avoid argument reassignment & argument slice + - perf: avoid negotiator recursive construction + - perf: enable strict mode + - perf: remove unnecessary bitwise operator + * deps: cookie@0.1.3 + - perf: deduce the scope of try-catch deopt + - perf: remove argument reassignments + * deps: escape-html@1.0.2 + * deps: etag@~1.7.0 + - Always include entity length in ETags for hash length extensions + - Generate non-Stats ETags using MD5 only (no longer CRC32) + - Improve stat performance by removing hashing + - Improve support for JXcore + - Remove base64 padding in ETags to shorten + - Support "fake" stats objects in environments without fs + - Use MD5 instead of MD4 in weak ETags over 1KB + * deps: finalhandler@0.4.0 + - Fix a false-positive when unpiping in Node.js 0.8 + - Support `statusCode` property on `Error` objects + - Use `unpipe` module for unpiping requests + - deps: escape-html@1.0.2 + - deps: on-finished@~2.3.0 + - perf: enable strict mode + - perf: remove argument reassignment + * deps: fresh@0.3.0 + - Add weak `ETag` matching support + * deps: on-finished@~2.3.0 + - Add defined behavior for HTTP `CONNECT` requests + - Add defined behavior for HTTP `Upgrade` requests + - deps: ee-first@1.1.1 + * deps: path-to-regexp@0.1.6 + * deps: send@0.13.0 + - Allow Node.js HTTP server to set `Date` response header + - Fix incorrectly removing `Content-Location` on 304 response + - Improve the default redirect response headers + - Send appropriate headers on default error response + - Use `http-errors` for standard emitted errors + - Use `statuses` instead of `http` module for status messages + - deps: escape-html@1.0.2 + - deps: etag@~1.7.0 + - deps: fresh@0.3.0 + - deps: on-finished@~2.3.0 + - perf: enable strict mode + - perf: remove unnecessary array allocations + * deps: serve-static@~1.10.0 + - Add `fallthrough` option + - Fix reading options from options prototype + - Improve the default redirect response headers + - Malformed URLs now `next()` instead of 400 + - deps: escape-html@1.0.2 + - deps: send@0.13.0 + - perf: enable strict mode + - perf: remove argument reassignment + * deps: type-is@~1.6.3 + - deps: mime-types@~2.1.1 + - perf: reduce try block size + - perf: remove bitwise operations + * perf: enable strict mode + * perf: isolate `app.render` try block + * perf: remove argument reassignments in application + * perf: remove argument reassignments in request prototype + * perf: remove argument reassignments in response prototype + * perf: remove argument reassignments in routing + * perf: remove argument reassignments in `View` + * perf: skip attempting to decode zero length string + * perf: use saved reference to `http.STATUS_CODES` + +4.12.4 / 2015-05-17 +=================== + + * deps: accepts@~1.2.7 + - deps: mime-types@~2.0.11 + - deps: negotiator@0.5.3 + * deps: debug@~2.2.0 + - deps: ms@0.7.1 + * deps: depd@~1.0.1 + * deps: etag@~1.6.0 + - Improve support for JXcore + - Support "fake" stats objects in environments without `fs` + * deps: finalhandler@0.3.6 + - deps: debug@~2.2.0 + - deps: on-finished@~2.2.1 + * deps: on-finished@~2.2.1 + - Fix `isFinished(req)` when data buffered + * deps: proxy-addr@~1.0.8 + - deps: ipaddr.js@1.0.1 + * deps: qs@2.4.2 + - Fix allowing parameters like `constructor` + * deps: send@0.12.3 + - deps: debug@~2.2.0 + - deps: depd@~1.0.1 + - deps: etag@~1.6.0 + - deps: ms@0.7.1 + - deps: on-finished@~2.2.1 + * deps: serve-static@~1.9.3 + - deps: send@0.12.3 + * deps: type-is@~1.6.2 + - deps: mime-types@~2.0.11 + +4.12.3 / 2015-03-17 +=================== + + * deps: accepts@~1.2.5 + - deps: mime-types@~2.0.10 + * deps: debug@~2.1.3 + - Fix high intensity foreground color for bold + - deps: ms@0.7.0 + * deps: finalhandler@0.3.4 + - deps: debug@~2.1.3 + * deps: proxy-addr@~1.0.7 + - deps: ipaddr.js@0.1.9 + * deps: qs@2.4.1 + - Fix error when parameter `hasOwnProperty` is present + * deps: send@0.12.2 + - Throw errors early for invalid `extensions` or `index` options + - deps: debug@~2.1.3 + * deps: serve-static@~1.9.2 + - deps: send@0.12.2 + * deps: type-is@~1.6.1 + - deps: mime-types@~2.0.10 + +4.12.2 / 2015-03-02 +=================== + + * Fix regression where `"Request aborted"` is logged using `res.sendFile` + +4.12.1 / 2015-03-01 +=================== + + * Fix constructing application with non-configurable prototype properties + * Fix `ECONNRESET` errors from `res.sendFile` usage + * Fix `req.host` when using "trust proxy" hops count + * Fix `req.protocol`/`req.secure` when using "trust proxy" hops count + * Fix wrong `code` on aborted connections from `res.sendFile` + * deps: merge-descriptors@1.0.0 + +4.12.0 / 2015-02-23 +=================== + + * Fix `"trust proxy"` setting to inherit when app is mounted + * Generate `ETag`s for all request responses + - No longer restricted to only responses for `GET` and `HEAD` requests + * Use `content-type` to parse `Content-Type` headers + * deps: accepts@~1.2.4 + - Fix preference sorting to be stable for long acceptable lists + - deps: mime-types@~2.0.9 + - deps: negotiator@0.5.1 + * deps: cookie-signature@1.0.6 + * deps: send@0.12.1 + - Always read the stat size from the file + - Fix mutating passed-in `options` + - deps: mime@1.3.4 + * deps: serve-static@~1.9.1 + - deps: send@0.12.1 + * deps: type-is@~1.6.0 + - fix argument reassignment + - fix false-positives in `hasBody` `Transfer-Encoding` check + - support wildcard for both type and subtype (`*/*`) + - deps: mime-types@~2.0.9 + +4.11.2 / 2015-02-01 +=================== + + * Fix `res.redirect` double-calling `res.end` for `HEAD` requests + * deps: accepts@~1.2.3 + - deps: mime-types@~2.0.8 + * deps: proxy-addr@~1.0.6 + - deps: ipaddr.js@0.1.8 + * deps: type-is@~1.5.6 + - deps: mime-types@~2.0.8 + +4.11.1 / 2015-01-20 +=================== + + * deps: send@0.11.1 + - Fix root path disclosure + * deps: serve-static@~1.8.1 + - Fix redirect loop in Node.js 0.11.14 + - Fix root path disclosure + - deps: send@0.11.1 + +4.11.0 / 2015-01-13 +=================== + + * Add `res.append(field, val)` to append headers + * Deprecate leading `:` in `name` for `app.param(name, fn)` + * Deprecate `req.param()` -- use `req.params`, `req.body`, or `req.query` instead + * Deprecate `app.param(fn)` + * Fix `OPTIONS` responses to include the `HEAD` method properly + * Fix `res.sendFile` not always detecting aborted connection + * Match routes iteratively to prevent stack overflows + * deps: accepts@~1.2.2 + - deps: mime-types@~2.0.7 + - deps: negotiator@0.5.0 + * deps: send@0.11.0 + - deps: debug@~2.1.1 + - deps: etag@~1.5.1 + - deps: ms@0.7.0 + - deps: on-finished@~2.2.0 + * deps: serve-static@~1.8.0 + - deps: send@0.11.0 + +4.10.8 / 2015-01-13 +=================== + + * Fix crash from error within `OPTIONS` response handler + * deps: proxy-addr@~1.0.5 + - deps: ipaddr.js@0.1.6 + +4.10.7 / 2015-01-04 +=================== + + * Fix `Allow` header for `OPTIONS` to not contain duplicate methods + * Fix incorrect "Request aborted" for `res.sendFile` when `HEAD` or 304 + * deps: debug@~2.1.1 + * deps: finalhandler@0.3.3 + - deps: debug@~2.1.1 + - deps: on-finished@~2.2.0 + * deps: methods@~1.1.1 + * deps: on-finished@~2.2.0 + * deps: serve-static@~1.7.2 + - Fix potential open redirect when mounted at root + * deps: type-is@~1.5.5 + - deps: mime-types@~2.0.7 + +4.10.6 / 2014-12-12 +=================== + + * Fix exception in `req.fresh`/`req.stale` without response headers + +4.10.5 / 2014-12-10 +=================== + + * Fix `res.send` double-calling `res.end` for `HEAD` requests + * deps: accepts@~1.1.4 + - deps: mime-types@~2.0.4 + * deps: type-is@~1.5.4 + - deps: mime-types@~2.0.4 + +4.10.4 / 2014-11-24 +=================== + + * Fix `res.sendfile` logging standard write errors + +4.10.3 / 2014-11-23 +=================== + + * Fix `res.sendFile` logging standard write errors + * deps: etag@~1.5.1 + * deps: proxy-addr@~1.0.4 + - deps: ipaddr.js@0.1.5 + * deps: qs@2.3.3 + - Fix `arrayLimit` behavior + +4.10.2 / 2014-11-09 +=================== + + * Correctly invoke async router callback asynchronously + * deps: accepts@~1.1.3 + - deps: mime-types@~2.0.3 + * deps: type-is@~1.5.3 + - deps: mime-types@~2.0.3 + +4.10.1 / 2014-10-28 +=================== + + * Fix handling of URLs containing `://` in the path + * deps: qs@2.3.2 + - Fix parsing of mixed objects and values + +4.10.0 / 2014-10-23 +=================== + + * Add support for `app.set('views', array)` + - Views are looked up in sequence in array of directories + * Fix `res.send(status)` to mention `res.sendStatus(status)` + * Fix handling of invalid empty URLs + * Use `content-disposition` module for `res.attachment`/`res.download` + - Sends standards-compliant `Content-Disposition` header + - Full Unicode support + * Use `path.resolve` in view lookup + * deps: debug@~2.1.0 + - Implement `DEBUG_FD` env variable support + * deps: depd@~1.0.0 + * deps: etag@~1.5.0 + - Improve string performance + - Slightly improve speed for weak ETags over 1KB + * deps: finalhandler@0.3.2 + - Terminate in progress response only on error + - Use `on-finished` to determine request status + - deps: debug@~2.1.0 + - deps: on-finished@~2.1.1 + * deps: on-finished@~2.1.1 + - Fix handling of pipelined requests + * deps: qs@2.3.0 + - Fix parsing of mixed implicit and explicit arrays + * deps: send@0.10.1 + - deps: debug@~2.1.0 + - deps: depd@~1.0.0 + - deps: etag@~1.5.0 + - deps: on-finished@~2.1.1 + * deps: serve-static@~1.7.1 + - deps: send@0.10.1 + +4.9.8 / 2014-10-17 +================== + + * Fix `res.redirect` body when redirect status specified + * deps: accepts@~1.1.2 + - Fix error when media type has invalid parameter + - deps: negotiator@0.4.9 + +4.9.7 / 2014-10-10 +================== + + * Fix using same param name in array of paths + +4.9.6 / 2014-10-08 +================== + + * deps: accepts@~1.1.1 + - deps: mime-types@~2.0.2 + - deps: negotiator@0.4.8 + * deps: serve-static@~1.6.4 + - Fix redirect loop when index file serving disabled + * deps: type-is@~1.5.2 + - deps: mime-types@~2.0.2 + +4.9.5 / 2014-09-24 +================== + + * deps: etag@~1.4.0 + * deps: proxy-addr@~1.0.3 + - Use `forwarded` npm module + * deps: send@0.9.3 + - deps: etag@~1.4.0 + * deps: serve-static@~1.6.3 + - deps: send@0.9.3 + +4.9.4 / 2014-09-19 +================== + + * deps: qs@2.2.4 + - Fix issue with object keys starting with numbers truncated + +4.9.3 / 2014-09-18 +================== + + * deps: proxy-addr@~1.0.2 + - Fix a global leak when multiple subnets are trusted + - deps: ipaddr.js@0.1.3 + +4.9.2 / 2014-09-17 +================== + + * Fix regression for empty string `path` in `app.use` + * Fix `router.use` to accept array of middleware without path + * Improve error message for bad `app.use` arguments + +4.9.1 / 2014-09-16 +================== + + * Fix `app.use` to accept array of middleware without path + * deps: depd@0.4.5 + * deps: etag@~1.3.1 + * deps: send@0.9.2 + - deps: depd@0.4.5 + - deps: etag@~1.3.1 + - deps: range-parser@~1.0.2 + * deps: serve-static@~1.6.2 + - deps: send@0.9.2 + +4.9.0 / 2014-09-08 +================== + + * Add `res.sendStatus` + * Invoke callback for sendfile when client aborts + - Applies to `res.sendFile`, `res.sendfile`, and `res.download` + - `err` will be populated with request aborted error + * Support IP address host in `req.subdomains` + * Use `etag` to generate `ETag` headers + * deps: accepts@~1.1.0 + - update `mime-types` + * deps: cookie-signature@1.0.5 + * deps: debug@~2.0.0 + * deps: finalhandler@0.2.0 + - Set `X-Content-Type-Options: nosniff` header + - deps: debug@~2.0.0 + * deps: fresh@0.2.4 + * deps: media-typer@0.3.0 + - Throw error when parameter format invalid on parse + * deps: qs@2.2.3 + - Fix issue where first empty value in array is discarded + * deps: range-parser@~1.0.2 + * deps: send@0.9.1 + - Add `lastModified` option + - Use `etag` to generate `ETag` header + - deps: debug@~2.0.0 + - deps: fresh@0.2.4 + * deps: serve-static@~1.6.1 + - Add `lastModified` option + - deps: send@0.9.1 + * deps: type-is@~1.5.1 + - fix `hasbody` to be true for `content-length: 0` + - deps: media-typer@0.3.0 + - deps: mime-types@~2.0.1 + * deps: vary@~1.0.0 + - Accept valid `Vary` header string as `field` + +4.8.8 / 2014-09-04 +================== + + * deps: send@0.8.5 + - Fix a path traversal issue when using `root` + - Fix malicious path detection for empty string path + * deps: serve-static@~1.5.4 + - deps: send@0.8.5 + +4.8.7 / 2014-08-29 +================== + + * deps: qs@2.2.2 + - Remove unnecessary cloning + +4.8.6 / 2014-08-27 +================== + + * deps: qs@2.2.0 + - Array parsing fix + - Performance improvements + +4.8.5 / 2014-08-18 +================== + + * deps: send@0.8.3 + - deps: destroy@1.0.3 + - deps: on-finished@2.1.0 + * deps: serve-static@~1.5.3 + - deps: send@0.8.3 + +4.8.4 / 2014-08-14 +================== + + * deps: qs@1.2.2 + * deps: send@0.8.2 + - Work around `fd` leak in Node.js 0.10 for `fs.ReadStream` + * deps: serve-static@~1.5.2 + - deps: send@0.8.2 + +4.8.3 / 2014-08-10 +================== + + * deps: parseurl@~1.3.0 + * deps: qs@1.2.1 + * deps: serve-static@~1.5.1 + - Fix parsing of weird `req.originalUrl` values + - deps: parseurl@~1.3.0 + - deps: utils-merge@1.0.0 + +4.8.2 / 2014-08-07 +================== + + * deps: qs@1.2.0 + - Fix parsing array of objects + +4.8.1 / 2014-08-06 +================== + + * fix incorrect deprecation warnings on `res.download` + * deps: qs@1.1.0 + - Accept urlencoded square brackets + - Accept empty values in implicit array notation + +4.8.0 / 2014-08-05 +================== + + * add `res.sendFile` + - accepts a file system path instead of a URL + - requires an absolute path or `root` option specified + * deprecate `res.sendfile` -- use `res.sendFile` instead + * support mounted app as any argument to `app.use()` + * deps: qs@1.0.2 + - Complete rewrite + - Limits array length to 20 + - Limits object depth to 5 + - Limits parameters to 1,000 + * deps: send@0.8.1 + - Add `extensions` option + * deps: serve-static@~1.5.0 + - Add `extensions` option + - deps: send@0.8.1 + +4.7.4 / 2014-08-04 +================== + + * fix `res.sendfile` regression for serving directory index files + * deps: send@0.7.4 + - Fix incorrect 403 on Windows and Node.js 0.11 + - Fix serving index files without root dir + * deps: serve-static@~1.4.4 + - deps: send@0.7.4 + +4.7.3 / 2014-08-04 +================== + + * deps: send@0.7.3 + - Fix incorrect 403 on Windows and Node.js 0.11 + * deps: serve-static@~1.4.3 + - Fix incorrect 403 on Windows and Node.js 0.11 + - deps: send@0.7.3 + +4.7.2 / 2014-07-27 +================== + + * deps: depd@0.4.4 + - Work-around v8 generating empty stack traces + * deps: send@0.7.2 + - deps: depd@0.4.4 + * deps: serve-static@~1.4.2 + +4.7.1 / 2014-07-26 +================== + + * deps: depd@0.4.3 + - Fix exception when global `Error.stackTraceLimit` is too low + * deps: send@0.7.1 + - deps: depd@0.4.3 + * deps: serve-static@~1.4.1 + +4.7.0 / 2014-07-25 +================== + + * fix `req.protocol` for proxy-direct connections + * configurable query parser with `app.set('query parser', parser)` + - `app.set('query parser', 'extended')` parse with "qs" module + - `app.set('query parser', 'simple')` parse with "querystring" core module + - `app.set('query parser', false)` disable query string parsing + - `app.set('query parser', true)` enable simple parsing + * deprecate `res.json(status, obj)` -- use `res.status(status).json(obj)` instead + * deprecate `res.jsonp(status, obj)` -- use `res.status(status).jsonp(obj)` instead + * deprecate `res.send(status, body)` -- use `res.status(status).send(body)` instead + * deps: debug@1.0.4 + * deps: depd@0.4.2 + - Add `TRACE_DEPRECATION` environment variable + - Remove non-standard grey color from color output + - Support `--no-deprecation` argument + - Support `--trace-deprecation` argument + * deps: finalhandler@0.1.0 + - Respond after request fully read + - deps: debug@1.0.4 + * deps: parseurl@~1.2.0 + - Cache URLs based on original value + - Remove no-longer-needed URL mis-parse work-around + - Simplify the "fast-path" `RegExp` + * deps: send@0.7.0 + - Add `dotfiles` option + - Cap `maxAge` value to 1 year + - deps: debug@1.0.4 + - deps: depd@0.4.2 + * deps: serve-static@~1.4.0 + - deps: parseurl@~1.2.0 + - deps: send@0.7.0 + * perf: prevent multiple `Buffer` creation in `res.send` + +4.6.1 / 2014-07-12 +================== + + * fix `subapp.mountpath` regression for `app.use(subapp)` + +4.6.0 / 2014-07-11 +================== + + * accept multiple callbacks to `app.use()` + * add explicit "Rosetta Flash JSONP abuse" protection + - previous versions are not vulnerable; this is just explicit protection + * catch errors in multiple `req.param(name, fn)` handlers + * deprecate `res.redirect(url, status)` -- use `res.redirect(status, url)` instead + * fix `res.send(status, num)` to send `num` as json (not error) + * remove unnecessary escaping when `res.jsonp` returns JSON response + * support non-string `path` in `app.use(path, fn)` + - supports array of paths + - supports `RegExp` + * router: fix optimization on router exit + * router: refactor location of `try` blocks + * router: speed up standard `app.use(fn)` + * deps: debug@1.0.3 + - Add support for multiple wildcards in namespaces + * deps: finalhandler@0.0.3 + - deps: debug@1.0.3 + * deps: methods@1.1.0 + - add `CONNECT` + * deps: parseurl@~1.1.3 + - faster parsing of href-only URLs + * deps: path-to-regexp@0.1.3 + * deps: send@0.6.0 + - deps: debug@1.0.3 + * deps: serve-static@~1.3.2 + - deps: parseurl@~1.1.3 + - deps: send@0.6.0 + * perf: fix arguments reassign deopt in some `res` methods + +4.5.1 / 2014-07-06 +================== + + * fix routing regression when altering `req.method` + +4.5.0 / 2014-07-04 +================== + + * add deprecation message to non-plural `req.accepts*` + * add deprecation message to `res.send(body, status)` + * add deprecation message to `res.vary()` + * add `headers` option to `res.sendfile` + - use to set headers on successful file transfer + * add `mergeParams` option to `Router` + - merges `req.params` from parent routes + * add `req.hostname` -- correct name for what `req.host` returns + * deprecate things with `depd` module + * deprecate `req.host` -- use `req.hostname` instead + * fix behavior when handling request without routes + * fix handling when `route.all` is only route + * invoke `router.param()` only when route matches + * restore `req.params` after invoking router + * use `finalhandler` for final response handling + * use `media-typer` to alter content-type charset + * deps: accepts@~1.0.7 + * deps: send@0.5.0 + - Accept string for `maxage` (converted by `ms`) + - Include link in default redirect response + * deps: serve-static@~1.3.0 + - Accept string for `maxAge` (converted by `ms`) + - Add `setHeaders` option + - Include HTML link in redirect response + - deps: send@0.5.0 + * deps: type-is@~1.3.2 + +4.4.5 / 2014-06-26 +================== + + * deps: cookie-signature@1.0.4 + - fix for timing attacks + +4.4.4 / 2014-06-20 +================== + + * fix `res.attachment` Unicode filenames in Safari + * fix "trim prefix" debug message in `express:router` + * deps: accepts@~1.0.5 + * deps: buffer-crc32@0.2.3 + +4.4.3 / 2014-06-11 +================== + + * fix persistence of modified `req.params[name]` from `app.param()` + * deps: accepts@1.0.3 + - deps: negotiator@0.4.6 + * deps: debug@1.0.2 + * deps: send@0.4.3 + - Do not throw uncatchable error on file open race condition + - Use `escape-html` for HTML escaping + - deps: debug@1.0.2 + - deps: finished@1.2.2 + - deps: fresh@0.2.2 + * deps: serve-static@1.2.3 + - Do not throw uncatchable error on file open race condition + - deps: send@0.4.3 + +4.4.2 / 2014-06-09 +================== + + * fix catching errors from top-level handlers + * use `vary` module for `res.vary` + * deps: debug@1.0.1 + * deps: proxy-addr@1.0.1 + * deps: send@0.4.2 + - fix "event emitter leak" warnings + - deps: debug@1.0.1 + - deps: finished@1.2.1 + * deps: serve-static@1.2.2 + - fix "event emitter leak" warnings + - deps: send@0.4.2 + * deps: type-is@1.2.1 + +4.4.1 / 2014-06-02 +================== + + * deps: methods@1.0.1 + * deps: send@0.4.1 + - Send `max-age` in `Cache-Control` in correct format + * deps: serve-static@1.2.1 + - use `escape-html` for escaping + - deps: send@0.4.1 + +4.4.0 / 2014-05-30 +================== + + * custom etag control with `app.set('etag', val)` + - `app.set('etag', function(body, encoding){ return '"etag"' })` custom etag generation + - `app.set('etag', 'weak')` weak tag + - `app.set('etag', 'strong')` strong etag + - `app.set('etag', false)` turn off + - `app.set('etag', true)` standard etag + * mark `res.send` ETag as weak and reduce collisions + * update accepts to 1.0.2 + - Fix interpretation when header not in request + * update send to 0.4.0 + - Calculate ETag with md5 for reduced collisions + - Ignore stream errors after request ends + - deps: debug@0.8.1 + * update serve-static to 1.2.0 + - Calculate ETag with md5 for reduced collisions + - Ignore stream errors after request ends + - deps: send@0.4.0 + +4.3.2 / 2014-05-28 +================== + + * fix handling of errors from `router.param()` callbacks + +4.3.1 / 2014-05-23 +================== + + * revert "fix behavior of multiple `app.VERB` for the same path" + - this caused a regression in the order of route execution + +4.3.0 / 2014-05-21 +================== + + * add `req.baseUrl` to access the path stripped from `req.url` in routes + * fix behavior of multiple `app.VERB` for the same path + * fix issue routing requests among sub routers + * invoke `router.param()` only when necessary instead of every match + * proper proxy trust with `app.set('trust proxy', trust)` + - `app.set('trust proxy', 1)` trust first hop + - `app.set('trust proxy', 'loopback')` trust loopback addresses + - `app.set('trust proxy', '10.0.0.1')` trust single IP + - `app.set('trust proxy', '10.0.0.1/16')` trust subnet + - `app.set('trust proxy', '10.0.0.1, 10.0.0.2')` trust list + - `app.set('trust proxy', false)` turn off + - `app.set('trust proxy', true)` trust everything + * set proper `charset` in `Content-Type` for `res.send` + * update type-is to 1.2.0 + - support suffix matching + +4.2.0 / 2014-05-11 +================== + + * deprecate `app.del()` -- use `app.delete()` instead + * deprecate `res.json(obj, status)` -- use `res.json(status, obj)` instead + - the edge-case `res.json(status, num)` requires `res.status(status).json(num)` + * deprecate `res.jsonp(obj, status)` -- use `res.jsonp(status, obj)` instead + - the edge-case `res.jsonp(status, num)` requires `res.status(status).jsonp(num)` + * fix `req.next` when inside router instance + * include `ETag` header in `HEAD` requests + * keep previous `Content-Type` for `res.jsonp` + * support PURGE method + - add `app.purge` + - add `router.purge` + - include PURGE in `app.all` + * update debug to 0.8.0 + - add `enable()` method + - change from stderr to stdout + * update methods to 1.0.0 + - add PURGE + +4.1.2 / 2014-05-08 +================== + + * fix `req.host` for IPv6 literals + * fix `res.jsonp` error if callback param is object + +4.1.1 / 2014-04-27 +================== + + * fix package.json to reflect supported node version + +4.1.0 / 2014-04-24 +================== + + * pass options from `res.sendfile` to `send` + * preserve casing of headers in `res.header` and `res.set` + * support unicode file names in `res.attachment` and `res.download` + * update accepts to 1.0.1 + - deps: negotiator@0.4.0 + * update cookie to 0.1.2 + - Fix for maxAge == 0 + - made compat with expires field + * update send to 0.3.0 + - Accept API options in options object + - Coerce option types + - Control whether to generate etags + - Default directory access to 403 when index disabled + - Fix sending files with dots without root set + - Include file path in etag + - Make "Can't set headers after they are sent." catchable + - Send full entity-body for multi range requests + - Set etags to "weak" + - Support "If-Range" header + - Support multiple index paths + - deps: mime@1.2.11 + * update serve-static to 1.1.0 + - Accept options directly to `send` module + - Resolve relative paths at middleware setup + - Use parseurl to parse the URL from request + - deps: send@0.3.0 + * update type-is to 1.1.0 + - add non-array values support + - add `multipart` as a shorthand + +4.0.0 / 2014-04-09 +================== + + * remove: + - node 0.8 support + - connect and connect's patches except for charset handling + - express(1) - moved to [express-generator](https://github.com/expressjs/generator) + - `express.createServer()` - it has been deprecated for a long time. Use `express()` + - `app.configure` - use logic in your own app code + - `app.router` - is removed + - `req.auth` - use `basic-auth` instead + - `req.accepted*` - use `req.accepts*()` instead + - `res.location` - relative URL resolution is removed + - `res.charset` - include the charset in the content type when using `res.set()` + - all bundled middleware except `static` + * change: + - `app.route` -> `app.mountpath` when mounting an express app in another express app + - `json spaces` no longer enabled by default in development + - `req.accepts*` -> `req.accepts*s` - i.e. `req.acceptsEncoding` -> `req.acceptsEncodings` + - `req.params` is now an object instead of an array + - `res.locals` is no longer a function. It is a plain js object. Treat it as such. + - `res.headerSent` -> `res.headersSent` to match node.js ServerResponse object + * refactor: + - `req.accepts*` with [accepts](https://github.com/expressjs/accepts) + - `req.is` with [type-is](https://github.com/expressjs/type-is) + - [path-to-regexp](https://github.com/component/path-to-regexp) + * add: + - `app.router()` - returns the app Router instance + - `app.route()` - Proxy to the app's `Router#route()` method to create a new route + - Router & Route - public API + +3.21.2 / 2015-07-31 +=================== + + * deps: connect@2.30.2 + - deps: body-parser@~1.13.3 + - deps: compression@~1.5.2 + - deps: errorhandler@~1.4.2 + - deps: method-override@~2.3.5 + - deps: serve-index@~1.7.2 + - deps: type-is@~1.6.6 + - deps: vhost@~3.0.1 + * deps: vary@~1.0.1 + - Fix setting empty header from empty `field` + - perf: enable strict mode + - perf: remove argument reassignments + +3.21.1 / 2015-07-05 +=================== + + * deps: basic-auth@~1.0.3 + * deps: connect@2.30.1 + - deps: body-parser@~1.13.2 + - deps: compression@~1.5.1 + - deps: errorhandler@~1.4.1 + - deps: morgan@~1.6.1 + - deps: pause@0.1.0 + - deps: qs@4.0.0 + - deps: serve-index@~1.7.1 + - deps: type-is@~1.6.4 + +3.21.0 / 2015-06-18 +=================== + + * deps: basic-auth@1.0.2 + - perf: enable strict mode + - perf: hoist regular expression + - perf: parse with regular expressions + - perf: remove argument reassignment + * deps: connect@2.30.0 + - deps: body-parser@~1.13.1 + - deps: bytes@2.1.0 + - deps: compression@~1.5.0 + - deps: cookie@0.1.3 + - deps: cookie-parser@~1.3.5 + - deps: csurf@~1.8.3 + - deps: errorhandler@~1.4.0 + - deps: express-session@~1.11.3 + - deps: finalhandler@0.4.0 + - deps: fresh@0.3.0 + - deps: morgan@~1.6.0 + - deps: serve-favicon@~2.3.0 + - deps: serve-index@~1.7.0 + - deps: serve-static@~1.10.0 + - deps: type-is@~1.6.3 + * deps: cookie@0.1.3 + - perf: deduce the scope of try-catch deopt + - perf: remove argument reassignments + * deps: escape-html@1.0.2 + * deps: etag@~1.7.0 + - Always include entity length in ETags for hash length extensions + - Generate non-Stats ETags using MD5 only (no longer CRC32) + - Improve stat performance by removing hashing + - Improve support for JXcore + - Remove base64 padding in ETags to shorten + - Support "fake" stats objects in environments without fs + - Use MD5 instead of MD4 in weak ETags over 1KB + * deps: fresh@0.3.0 + - Add weak `ETag` matching support + * deps: mkdirp@0.5.1 + - Work in global strict mode + * deps: send@0.13.0 + - Allow Node.js HTTP server to set `Date` response header + - Fix incorrectly removing `Content-Location` on 304 response + - Improve the default redirect response headers + - Send appropriate headers on default error response + - Use `http-errors` for standard emitted errors + - Use `statuses` instead of `http` module for status messages + - deps: escape-html@1.0.2 + - deps: etag@~1.7.0 + - deps: fresh@0.3.0 + - deps: on-finished@~2.3.0 + - perf: enable strict mode + - perf: remove unnecessary array allocations + +3.20.3 / 2015-05-17 +=================== + + * deps: connect@2.29.2 + - deps: body-parser@~1.12.4 + - deps: compression@~1.4.4 + - deps: connect-timeout@~1.6.2 + - deps: debug@~2.2.0 + - deps: depd@~1.0.1 + - deps: errorhandler@~1.3.6 + - deps: finalhandler@0.3.6 + - deps: method-override@~2.3.3 + - deps: morgan@~1.5.3 + - deps: qs@2.4.2 + - deps: response-time@~2.3.1 + - deps: serve-favicon@~2.2.1 + - deps: serve-index@~1.6.4 + - deps: serve-static@~1.9.3 + - deps: type-is@~1.6.2 + * deps: debug@~2.2.0 + - deps: ms@0.7.1 + * deps: depd@~1.0.1 + * deps: proxy-addr@~1.0.8 + - deps: ipaddr.js@1.0.1 + * deps: send@0.12.3 + - deps: debug@~2.2.0 + - deps: depd@~1.0.1 + - deps: etag@~1.6.0 + - deps: ms@0.7.1 + - deps: on-finished@~2.2.1 + +3.20.2 / 2015-03-16 +=================== + + * deps: connect@2.29.1 + - deps: body-parser@~1.12.2 + - deps: compression@~1.4.3 + - deps: connect-timeout@~1.6.1 + - deps: debug@~2.1.3 + - deps: errorhandler@~1.3.5 + - deps: express-session@~1.10.4 + - deps: finalhandler@0.3.4 + - deps: method-override@~2.3.2 + - deps: morgan@~1.5.2 + - deps: qs@2.4.1 + - deps: serve-index@~1.6.3 + - deps: serve-static@~1.9.2 + - deps: type-is@~1.6.1 + * deps: debug@~2.1.3 + - Fix high intensity foreground color for bold + - deps: ms@0.7.0 + * deps: merge-descriptors@1.0.0 + * deps: proxy-addr@~1.0.7 + - deps: ipaddr.js@0.1.9 + * deps: send@0.12.2 + - Throw errors early for invalid `extensions` or `index` options + - deps: debug@~2.1.3 + +3.20.1 / 2015-02-28 +=================== + + * Fix `req.host` when using "trust proxy" hops count + * Fix `req.protocol`/`req.secure` when using "trust proxy" hops count + +3.20.0 / 2015-02-18 +=================== + + * Fix `"trust proxy"` setting to inherit when app is mounted + * Generate `ETag`s for all request responses + - No longer restricted to only responses for `GET` and `HEAD` requests + * Use `content-type` to parse `Content-Type` headers + * deps: connect@2.29.0 + - Use `content-type` to parse `Content-Type` headers + - deps: body-parser@~1.12.0 + - deps: compression@~1.4.1 + - deps: connect-timeout@~1.6.0 + - deps: cookie-parser@~1.3.4 + - deps: cookie-signature@1.0.6 + - deps: csurf@~1.7.0 + - deps: errorhandler@~1.3.4 + - deps: express-session@~1.10.3 + - deps: http-errors@~1.3.1 + - deps: response-time@~2.3.0 + - deps: serve-index@~1.6.2 + - deps: serve-static@~1.9.1 + - deps: type-is@~1.6.0 + * deps: cookie-signature@1.0.6 + * deps: send@0.12.1 + - Always read the stat size from the file + - Fix mutating passed-in `options` + - deps: mime@1.3.4 + +3.19.2 / 2015-02-01 +=================== + + * deps: connect@2.28.3 + - deps: compression@~1.3.1 + - deps: csurf@~1.6.6 + - deps: errorhandler@~1.3.3 + - deps: express-session@~1.10.2 + - deps: serve-index@~1.6.1 + - deps: type-is@~1.5.6 + * deps: proxy-addr@~1.0.6 + - deps: ipaddr.js@0.1.8 + +3.19.1 / 2015-01-20 +=================== + + * deps: connect@2.28.2 + - deps: body-parser@~1.10.2 + - deps: serve-static@~1.8.1 + * deps: send@0.11.1 + - Fix root path disclosure + +3.19.0 / 2015-01-09 +=================== + + * Fix `OPTIONS` responses to include the `HEAD` method property + * Use `readline` for prompt in `express(1)` + * deps: commander@2.6.0 + * deps: connect@2.28.1 + - deps: body-parser@~1.10.1 + - deps: compression@~1.3.0 + - deps: connect-timeout@~1.5.0 + - deps: csurf@~1.6.4 + - deps: debug@~2.1.1 + - deps: errorhandler@~1.3.2 + - deps: express-session@~1.10.1 + - deps: finalhandler@0.3.3 + - deps: method-override@~2.3.1 + - deps: morgan@~1.5.1 + - deps: serve-favicon@~2.2.0 + - deps: serve-index@~1.6.0 + - deps: serve-static@~1.8.0 + - deps: type-is@~1.5.5 + * deps: debug@~2.1.1 + * deps: methods@~1.1.1 + * deps: proxy-addr@~1.0.5 + - deps: ipaddr.js@0.1.6 + * deps: send@0.11.0 + - deps: debug@~2.1.1 + - deps: etag@~1.5.1 + - deps: ms@0.7.0 + - deps: on-finished@~2.2.0 + +3.18.6 / 2014-12-12 +=================== + + * Fix exception in `req.fresh`/`req.stale` without response headers + +3.18.5 / 2014-12-11 +=================== + + * deps: connect@2.27.6 + - deps: compression@~1.2.2 + - deps: express-session@~1.9.3 + - deps: http-errors@~1.2.8 + - deps: serve-index@~1.5.3 + - deps: type-is@~1.5.4 + +3.18.4 / 2014-11-23 +=================== + + * deps: connect@2.27.4 + - deps: body-parser@~1.9.3 + - deps: compression@~1.2.1 + - deps: errorhandler@~1.2.3 + - deps: express-session@~1.9.2 + - deps: qs@2.3.3 + - deps: serve-favicon@~2.1.7 + - deps: serve-static@~1.5.1 + - deps: type-is@~1.5.3 + * deps: etag@~1.5.1 + * deps: proxy-addr@~1.0.4 + - deps: ipaddr.js@0.1.5 + +3.18.3 / 2014-11-09 +=================== + + * deps: connect@2.27.3 + - Correctly invoke async callback asynchronously + - deps: csurf@~1.6.3 + +3.18.2 / 2014-10-28 +=================== + + * deps: connect@2.27.2 + - Fix handling of URLs containing `://` in the path + - deps: body-parser@~1.9.2 + - deps: qs@2.3.2 + +3.18.1 / 2014-10-22 +=================== + + * Fix internal `utils.merge` deprecation warnings + * deps: connect@2.27.1 + - deps: body-parser@~1.9.1 + - deps: express-session@~1.9.1 + - deps: finalhandler@0.3.2 + - deps: morgan@~1.4.1 + - deps: qs@2.3.0 + - deps: serve-static@~1.7.1 + * deps: send@0.10.1 + - deps: on-finished@~2.1.1 + +3.18.0 / 2014-10-17 +=================== + + * Use `content-disposition` module for `res.attachment`/`res.download` + - Sends standards-compliant `Content-Disposition` header + - Full Unicode support + * Use `etag` module to generate `ETag` headers + * deps: connect@2.27.0 + - Use `http-errors` module for creating errors + - Use `utils-merge` module for merging objects + - deps: body-parser@~1.9.0 + - deps: compression@~1.2.0 + - deps: connect-timeout@~1.4.0 + - deps: debug@~2.1.0 + - deps: depd@~1.0.0 + - deps: express-session@~1.9.0 + - deps: finalhandler@0.3.1 + - deps: method-override@~2.3.0 + - deps: morgan@~1.4.0 + - deps: response-time@~2.2.0 + - deps: serve-favicon@~2.1.6 + - deps: serve-index@~1.5.0 + - deps: serve-static@~1.7.0 + * deps: debug@~2.1.0 + - Implement `DEBUG_FD` env variable support + * deps: depd@~1.0.0 + * deps: send@0.10.0 + - deps: debug@~2.1.0 + - deps: depd@~1.0.0 + - deps: etag@~1.5.0 + +3.17.8 / 2014-10-15 +=================== + + * deps: connect@2.26.6 + - deps: compression@~1.1.2 + - deps: csurf@~1.6.2 + - deps: errorhandler@~1.2.2 + +3.17.7 / 2014-10-08 +=================== + + * deps: connect@2.26.5 + - Fix accepting non-object arguments to `logger` + - deps: serve-static@~1.6.4 + +3.17.6 / 2014-10-02 +=================== + + * deps: connect@2.26.4 + - deps: morgan@~1.3.2 + - deps: type-is@~1.5.2 + +3.17.5 / 2014-09-24 +=================== + + * deps: connect@2.26.3 + - deps: body-parser@~1.8.4 + - deps: serve-favicon@~2.1.5 + - deps: serve-static@~1.6.3 + * deps: proxy-addr@~1.0.3 + - Use `forwarded` npm module + * deps: send@0.9.3 + - deps: etag@~1.4.0 + +3.17.4 / 2014-09-19 +=================== + + * deps: connect@2.26.2 + - deps: body-parser@~1.8.3 + - deps: qs@2.2.4 + +3.17.3 / 2014-09-18 +=================== + + * deps: proxy-addr@~1.0.2 + - Fix a global leak when multiple subnets are trusted + - deps: ipaddr.js@0.1.3 + +3.17.2 / 2014-09-15 +=================== + + * Use `crc` instead of `buffer-crc32` for speed + * deps: connect@2.26.1 + - deps: body-parser@~1.8.2 + - deps: depd@0.4.5 + - deps: express-session@~1.8.2 + - deps: morgan@~1.3.1 + - deps: serve-favicon@~2.1.3 + - deps: serve-static@~1.6.2 + * deps: depd@0.4.5 + * deps: send@0.9.2 + - deps: depd@0.4.5 + - deps: etag@~1.3.1 + - deps: range-parser@~1.0.2 + +3.17.1 / 2014-09-08 +=================== + + * Fix error in `req.subdomains` on empty host + +3.17.0 / 2014-09-08 +=================== + + * Support `X-Forwarded-Host` in `req.subdomains` + * Support IP address host in `req.subdomains` + * deps: connect@2.26.0 + - deps: body-parser@~1.8.1 + - deps: compression@~1.1.0 + - deps: connect-timeout@~1.3.0 + - deps: cookie-parser@~1.3.3 + - deps: cookie-signature@1.0.5 + - deps: csurf@~1.6.1 + - deps: debug@~2.0.0 + - deps: errorhandler@~1.2.0 + - deps: express-session@~1.8.1 + - deps: finalhandler@0.2.0 + - deps: fresh@0.2.4 + - deps: media-typer@0.3.0 + - deps: method-override@~2.2.0 + - deps: morgan@~1.3.0 + - deps: qs@2.2.3 + - deps: serve-favicon@~2.1.3 + - deps: serve-index@~1.2.1 + - deps: serve-static@~1.6.1 + - deps: type-is@~1.5.1 + - deps: vhost@~3.0.0 + * deps: cookie-signature@1.0.5 + * deps: debug@~2.0.0 + * deps: fresh@0.2.4 + * deps: media-typer@0.3.0 + - Throw error when parameter format invalid on parse + * deps: range-parser@~1.0.2 + * deps: send@0.9.1 + - Add `lastModified` option + - Use `etag` to generate `ETag` header + - deps: debug@~2.0.0 + - deps: fresh@0.2.4 + * deps: vary@~1.0.0 + - Accept valid `Vary` header string as `field` + +3.16.10 / 2014-09-04 +==================== + + * deps: connect@2.25.10 + - deps: serve-static@~1.5.4 + * deps: send@0.8.5 + - Fix a path traversal issue when using `root` + - Fix malicious path detection for empty string path + +3.16.9 / 2014-08-29 +=================== + + * deps: connect@2.25.9 + - deps: body-parser@~1.6.7 + - deps: qs@2.2.2 + +3.16.8 / 2014-08-27 +=================== + + * deps: connect@2.25.8 + - deps: body-parser@~1.6.6 + - deps: csurf@~1.4.1 + - deps: qs@2.2.0 + +3.16.7 / 2014-08-18 +=================== + + * deps: connect@2.25.7 + - deps: body-parser@~1.6.5 + - deps: express-session@~1.7.6 + - deps: morgan@~1.2.3 + - deps: serve-static@~1.5.3 + * deps: send@0.8.3 + - deps: destroy@1.0.3 + - deps: on-finished@2.1.0 + +3.16.6 / 2014-08-14 +=================== + + * deps: connect@2.25.6 + - deps: body-parser@~1.6.4 + - deps: qs@1.2.2 + - deps: serve-static@~1.5.2 + * deps: send@0.8.2 + - Work around `fd` leak in Node.js 0.10 for `fs.ReadStream` + +3.16.5 / 2014-08-11 +=================== + + * deps: connect@2.25.5 + - Fix backwards compatibility in `logger` + +3.16.4 / 2014-08-10 +=================== + + * Fix original URL parsing in `res.location` + * deps: connect@2.25.4 + - Fix `query` middleware breaking with argument + - deps: body-parser@~1.6.3 + - deps: compression@~1.0.11 + - deps: connect-timeout@~1.2.2 + - deps: express-session@~1.7.5 + - deps: method-override@~2.1.3 + - deps: on-headers@~1.0.0 + - deps: parseurl@~1.3.0 + - deps: qs@1.2.1 + - deps: response-time@~2.0.1 + - deps: serve-index@~1.1.6 + - deps: serve-static@~1.5.1 + * deps: parseurl@~1.3.0 + +3.16.3 / 2014-08-07 +=================== + + * deps: connect@2.25.3 + - deps: multiparty@3.3.2 + +3.16.2 / 2014-08-07 +=================== + + * deps: connect@2.25.2 + - deps: body-parser@~1.6.2 + - deps: qs@1.2.0 + +3.16.1 / 2014-08-06 +=================== + + * deps: connect@2.25.1 + - deps: body-parser@~1.6.1 + - deps: qs@1.1.0 + +3.16.0 / 2014-08-05 +=================== + + * deps: connect@2.25.0 + - deps: body-parser@~1.6.0 + - deps: compression@~1.0.10 + - deps: csurf@~1.4.0 + - deps: express-session@~1.7.4 + - deps: qs@1.0.2 + - deps: serve-static@~1.5.0 + * deps: send@0.8.1 + - Add `extensions` option + +3.15.3 / 2014-08-04 +=================== + + * fix `res.sendfile` regression for serving directory index files + * deps: connect@2.24.3 + - deps: serve-index@~1.1.5 + - deps: serve-static@~1.4.4 + * deps: send@0.7.4 + - Fix incorrect 403 on Windows and Node.js 0.11 + - Fix serving index files without root dir + +3.15.2 / 2014-07-27 +=================== + + * deps: connect@2.24.2 + - deps: body-parser@~1.5.2 + - deps: depd@0.4.4 + - deps: express-session@~1.7.2 + - deps: morgan@~1.2.2 + - deps: serve-static@~1.4.2 + * deps: depd@0.4.4 + - Work-around v8 generating empty stack traces + * deps: send@0.7.2 + - deps: depd@0.4.4 + +3.15.1 / 2014-07-26 +=================== + + * deps: connect@2.24.1 + - deps: body-parser@~1.5.1 + - deps: depd@0.4.3 + - deps: express-session@~1.7.1 + - deps: morgan@~1.2.1 + - deps: serve-index@~1.1.4 + - deps: serve-static@~1.4.1 + * deps: depd@0.4.3 + - Fix exception when global `Error.stackTraceLimit` is too low + * deps: send@0.7.1 + - deps: depd@0.4.3 + +3.15.0 / 2014-07-22 +=================== + + * Fix `req.protocol` for proxy-direct connections + * Pass options from `res.sendfile` to `send` + * deps: connect@2.24.0 + - deps: body-parser@~1.5.0 + - deps: compression@~1.0.9 + - deps: connect-timeout@~1.2.1 + - deps: debug@1.0.4 + - deps: depd@0.4.2 + - deps: express-session@~1.7.0 + - deps: finalhandler@0.1.0 + - deps: method-override@~2.1.2 + - deps: morgan@~1.2.0 + - deps: multiparty@3.3.1 + - deps: parseurl@~1.2.0 + - deps: serve-static@~1.4.0 + * deps: debug@1.0.4 + * deps: depd@0.4.2 + - Add `TRACE_DEPRECATION` environment variable + - Remove non-standard grey color from color output + - Support `--no-deprecation` argument + - Support `--trace-deprecation` argument + * deps: parseurl@~1.2.0 + - Cache URLs based on original value + - Remove no-longer-needed URL mis-parse work-around + - Simplify the "fast-path" `RegExp` + * deps: send@0.7.0 + - Add `dotfiles` option + - Cap `maxAge` value to 1 year + - deps: debug@1.0.4 + - deps: depd@0.4.2 + +3.14.0 / 2014-07-11 +=================== + + * add explicit "Rosetta Flash JSONP abuse" protection + - previous versions are not vulnerable; this is just explicit protection + * deprecate `res.redirect(url, status)` -- use `res.redirect(status, url)` instead + * fix `res.send(status, num)` to send `num` as json (not error) + * remove unnecessary escaping when `res.jsonp` returns JSON response + * deps: basic-auth@1.0.0 + - support empty password + - support empty username + * deps: connect@2.23.0 + - deps: debug@1.0.3 + - deps: express-session@~1.6.4 + - deps: method-override@~2.1.0 + - deps: parseurl@~1.1.3 + - deps: serve-static@~1.3.1 + * deps: debug@1.0.3 + - Add support for multiple wildcards in namespaces + * deps: methods@1.1.0 + - add `CONNECT` + * deps: parseurl@~1.1.3 + - faster parsing of href-only URLs + +3.13.0 / 2014-07-03 +=================== + + * add deprecation message to `app.configure` + * add deprecation message to `req.auth` + * use `basic-auth` to parse `Authorization` header + * deps: connect@2.22.0 + - deps: csurf@~1.3.0 + - deps: express-session@~1.6.1 + - deps: multiparty@3.3.0 + - deps: serve-static@~1.3.0 + * deps: send@0.5.0 + - Accept string for `maxage` (converted by `ms`) + - Include link in default redirect response + +3.12.1 / 2014-06-26 +=================== + + * deps: connect@2.21.1 + - deps: cookie-parser@1.3.2 + - deps: cookie-signature@1.0.4 + - deps: express-session@~1.5.2 + - deps: type-is@~1.3.2 + * deps: cookie-signature@1.0.4 + - fix for timing attacks + +3.12.0 / 2014-06-21 +=================== + + * use `media-typer` to alter content-type charset + * deps: connect@2.21.0 + - deprecate `connect(middleware)` -- use `app.use(middleware)` instead + - deprecate `connect.createServer()` -- use `connect()` instead + - fix `res.setHeader()` patch to work with get -> append -> set pattern + - deps: compression@~1.0.8 + - deps: errorhandler@~1.1.1 + - deps: express-session@~1.5.0 + - deps: serve-index@~1.1.3 + +3.11.0 / 2014-06-19 +=================== + + * deprecate things with `depd` module + * deps: buffer-crc32@0.2.3 + * deps: connect@2.20.2 + - deprecate `verify` option to `json` -- use `body-parser` npm module instead + - deprecate `verify` option to `urlencoded` -- use `body-parser` npm module instead + - deprecate things with `depd` module + - use `finalhandler` for final response handling + - use `media-typer` to parse `content-type` for charset + - deps: body-parser@1.4.3 + - deps: connect-timeout@1.1.1 + - deps: cookie-parser@1.3.1 + - deps: csurf@1.2.2 + - deps: errorhandler@1.1.0 + - deps: express-session@1.4.0 + - deps: multiparty@3.2.9 + - deps: serve-index@1.1.2 + - deps: type-is@1.3.1 + - deps: vhost@2.0.0 + +3.10.5 / 2014-06-11 +=================== + + * deps: connect@2.19.6 + - deps: body-parser@1.3.1 + - deps: compression@1.0.7 + - deps: debug@1.0.2 + - deps: serve-index@1.1.1 + - deps: serve-static@1.2.3 + * deps: debug@1.0.2 + * deps: send@0.4.3 + - Do not throw uncatchable error on file open race condition + - Use `escape-html` for HTML escaping + - deps: debug@1.0.2 + - deps: finished@1.2.2 + - deps: fresh@0.2.2 + +3.10.4 / 2014-06-09 +=================== + + * deps: connect@2.19.5 + - fix "event emitter leak" warnings + - deps: csurf@1.2.1 + - deps: debug@1.0.1 + - deps: serve-static@1.2.2 + - deps: type-is@1.2.1 + * deps: debug@1.0.1 + * deps: send@0.4.2 + - fix "event emitter leak" warnings + - deps: finished@1.2.1 + - deps: debug@1.0.1 + +3.10.3 / 2014-06-05 +=================== + + * use `vary` module for `res.vary` + * deps: connect@2.19.4 + - deps: errorhandler@1.0.2 + - deps: method-override@2.0.2 + - deps: serve-favicon@2.0.1 + * deps: debug@1.0.0 + +3.10.2 / 2014-06-03 +=================== + + * deps: connect@2.19.3 + - deps: compression@1.0.6 + +3.10.1 / 2014-06-03 +=================== + + * deps: connect@2.19.2 + - deps: compression@1.0.4 + * deps: proxy-addr@1.0.1 + +3.10.0 / 2014-06-02 +=================== + + * deps: connect@2.19.1 + - deprecate `methodOverride()` -- use `method-override` npm module instead + - deps: body-parser@1.3.0 + - deps: method-override@2.0.1 + - deps: multiparty@3.2.8 + - deps: response-time@2.0.0 + - deps: serve-static@1.2.1 + * deps: methods@1.0.1 + * deps: send@0.4.1 + - Send `max-age` in `Cache-Control` in correct format + +3.9.0 / 2014-05-30 +================== + + * custom etag control with `app.set('etag', val)` + - `app.set('etag', function(body, encoding){ return '"etag"' })` custom etag generation + - `app.set('etag', 'weak')` weak tag + - `app.set('etag', 'strong')` strong etag + - `app.set('etag', false)` turn off + - `app.set('etag', true)` standard etag + * Include ETag in HEAD requests + * mark `res.send` ETag as weak and reduce collisions + * update connect to 2.18.0 + - deps: compression@1.0.3 + - deps: serve-index@1.1.0 + - deps: serve-static@1.2.0 + * update send to 0.4.0 + - Calculate ETag with md5 for reduced collisions + - Ignore stream errors after request ends + - deps: debug@0.8.1 + +3.8.1 / 2014-05-27 +================== + + * update connect to 2.17.3 + - deps: body-parser@1.2.2 + - deps: express-session@1.2.1 + - deps: method-override@1.0.2 + +3.8.0 / 2014-05-21 +================== + + * keep previous `Content-Type` for `res.jsonp` + * set proper `charset` in `Content-Type` for `res.send` + * update connect to 2.17.1 + - fix `res.charset` appending charset when `content-type` has one + - deps: express-session@1.2.0 + - deps: morgan@1.1.1 + - deps: serve-index@1.0.3 + +3.7.0 / 2014-05-18 +================== + + * proper proxy trust with `app.set('trust proxy', trust)` + - `app.set('trust proxy', 1)` trust first hop + - `app.set('trust proxy', 'loopback')` trust loopback addresses + - `app.set('trust proxy', '10.0.0.1')` trust single IP + - `app.set('trust proxy', '10.0.0.1/16')` trust subnet + - `app.set('trust proxy', '10.0.0.1, 10.0.0.2')` trust list + - `app.set('trust proxy', false)` turn off + - `app.set('trust proxy', true)` trust everything + * update connect to 2.16.2 + - deprecate `res.headerSent` -- use `res.headersSent` + - deprecate `res.on("header")` -- use on-headers module instead + - fix edge-case in `res.appendHeader` that would append in wrong order + - json: use body-parser + - urlencoded: use body-parser + - dep: bytes@1.0.0 + - dep: cookie-parser@1.1.0 + - dep: csurf@1.2.0 + - dep: express-session@1.1.0 + - dep: method-override@1.0.1 + +3.6.0 / 2014-05-09 +================== + + * deprecate `app.del()` -- use `app.delete()` instead + * deprecate `res.json(obj, status)` -- use `res.json(status, obj)` instead + - the edge-case `res.json(status, num)` requires `res.status(status).json(num)` + * deprecate `res.jsonp(obj, status)` -- use `res.jsonp(status, obj)` instead + - the edge-case `res.jsonp(status, num)` requires `res.status(status).jsonp(num)` + * support PURGE method + - add `app.purge` + - add `router.purge` + - include PURGE in `app.all` + * update connect to 2.15.0 + * Add `res.appendHeader` + * Call error stack even when response has been sent + * Patch `res.headerSent` to return Boolean + * Patch `res.headersSent` for node.js 0.8 + * Prevent default 404 handler after response sent + * dep: compression@1.0.2 + * dep: connect-timeout@1.1.0 + * dep: debug@^0.8.0 + * dep: errorhandler@1.0.1 + * dep: express-session@1.0.4 + * dep: morgan@1.0.1 + * dep: serve-favicon@2.0.0 + * dep: serve-index@1.0.2 + * update debug to 0.8.0 + * add `enable()` method + * change from stderr to stdout + * update methods to 1.0.0 + - add PURGE + * update mkdirp to 0.5.0 + +3.5.3 / 2014-05-08 +================== + + * fix `req.host` for IPv6 literals + * fix `res.jsonp` error if callback param is object + +3.5.2 / 2014-04-24 +================== + + * update connect to 2.14.5 + * update cookie to 0.1.2 + * update mkdirp to 0.4.0 + * update send to 0.3.0 + +3.5.1 / 2014-03-25 +================== + + * pin less-middleware in generated app + +3.5.0 / 2014-03-06 +================== + + * bump deps + +3.4.8 / 2014-01-13 +================== + + * prevent incorrect automatic OPTIONS responses #1868 @dpatti + * update binary and examples for jade 1.0 #1876 @yossi, #1877 @reqshark, #1892 @matheusazzi + * throw 400 in case of malformed paths @rlidwka + +3.4.7 / 2013-12-10 +================== + + * update connect + +3.4.6 / 2013-12-01 +================== + + * update connect (raw-body) + +3.4.5 / 2013-11-27 +================== + + * update connect + * res.location: remove leading ./ #1802 @kapouer + * res.redirect: fix `res.redirect('toString') #1829 @michaelficarra + * res.send: always send ETag when content-length > 0 + * router: add Router.all() method + +3.4.4 / 2013-10-29 +================== + + * update connect + * update supertest + * update methods + * express(1): replace bodyParser() with urlencoded() and json() #1795 @chirag04 + +3.4.3 / 2013-10-23 +================== + + * update connect + +3.4.2 / 2013-10-18 +================== + + * update connect + * downgrade commander + +3.4.1 / 2013-10-15 +================== + + * update connect + * update commander + * jsonp: check if callback is a function + * router: wrap encodeURIComponent in a try/catch #1735 (@lxe) + * res.format: now includes charset @1747 (@sorribas) + * res.links: allow multiple calls @1746 (@sorribas) + +3.4.0 / 2013-09-07 +================== + + * add res.vary(). Closes #1682 + * update connect + +3.3.8 / 2013-09-02 +================== + + * update connect + +3.3.7 / 2013-08-28 +================== + + * update connect + +3.3.6 / 2013-08-27 +================== + + * Revert "remove charset from json responses. Closes #1631" (causes issues in some clients) + * add: req.accepts take an argument list + +3.3.4 / 2013-07-08 +================== + + * update send and connect + +3.3.3 / 2013-07-04 +================== + + * update connect + +3.3.2 / 2013-07-03 +================== + + * update connect + * update send + * remove .version export + +3.3.1 / 2013-06-27 +================== + + * update connect + +3.3.0 / 2013-06-26 +================== + + * update connect + * add support for multiple X-Forwarded-Proto values. Closes #1646 + * change: remove charset from json responses. Closes #1631 + * change: return actual booleans from req.accept* functions + * fix jsonp callback array throw + +3.2.6 / 2013-06-02 +================== + + * update connect + +3.2.5 / 2013-05-21 +================== + + * update connect + * update node-cookie + * add: throw a meaningful error when there is no default engine + * change generation of ETags with res.send() to GET requests only. Closes #1619 + +3.2.4 / 2013-05-09 +================== + + * fix `req.subdomains` when no Host is present + * fix `req.host` when no Host is present, return undefined + +3.2.3 / 2013-05-07 +================== + + * update connect / qs + +3.2.2 / 2013-05-03 +================== + + * update qs + +3.2.1 / 2013-04-29 +================== + + * add app.VERB() paths array deprecation warning + * update connect + * update qs and remove all ~ semver crap + * fix: accept number as value of Signed Cookie + +3.2.0 / 2013-04-15 +================== + + * add "view" constructor setting to override view behaviour + * add req.acceptsEncoding(name) + * add req.acceptedEncodings + * revert cookie signature change causing session race conditions + * fix sorting of Accept values of the same quality + +3.1.2 / 2013-04-12 +================== + + * add support for custom Accept parameters + * update cookie-signature + +3.1.1 / 2013-04-01 +================== + + * add X-Forwarded-Host support to `req.host` + * fix relative redirects + * update mkdirp + * update buffer-crc32 + * remove legacy app.configure() method from app template. + +3.1.0 / 2013-01-25 +================== + + * add support for leading "." in "view engine" setting + * add array support to `res.set()` + * add node 0.8.x to travis.yml + * add "subdomain offset" setting for tweaking `req.subdomains` + * add `res.location(url)` implementing `res.redirect()`-like setting of Location + * use app.get() for x-powered-by setting for inheritance + * fix colons in passwords for `req.auth` + +3.0.6 / 2013-01-04 +================== + + * add http verb methods to Router + * update connect + * fix mangling of the `res.cookie()` options object + * fix jsonp whitespace escape. Closes #1132 + +3.0.5 / 2012-12-19 +================== + + * add throwing when a non-function is passed to a route + * fix: explicitly remove Transfer-Encoding header from 204 and 304 responses + * revert "add 'etag' option" + +3.0.4 / 2012-12-05 +================== + + * add 'etag' option to disable `res.send()` Etags + * add escaping of urls in text/plain in `res.redirect()` + for old browsers interpreting as html + * change crc32 module for a more liberal license + * update connect + +3.0.3 / 2012-11-13 +================== + + * update connect + * update cookie module + * fix cookie max-age + +3.0.2 / 2012-11-08 +================== + + * add OPTIONS to cors example. Closes #1398 + * fix route chaining regression. Closes #1397 + +3.0.1 / 2012-11-01 +================== + + * update connect + +3.0.0 / 2012-10-23 +================== + + * add `make clean` + * add "Basic" check to req.auth + * add `req.auth` test coverage + * add cb && cb(payload) to `res.jsonp()`. Closes #1374 + * add backwards compat for `res.redirect()` status. Closes #1336 + * add support for `res.json()` to retain previously defined Content-Types. Closes #1349 + * update connect + * change `res.redirect()` to utilize a pathname-relative Location again. Closes #1382 + * remove non-primitive string support for `res.send()` + * fix view-locals example. Closes #1370 + * fix route-separation example + +3.0.0rc5 / 2012-09-18 +================== + + * update connect + * add redis search example + * add static-files example + * add "x-powered-by" setting (`app.disable('x-powered-by')`) + * add "application/octet-stream" redirect Accept test case. Closes #1317 + +3.0.0rc4 / 2012-08-30 +================== + + * add `res.jsonp()`. Closes #1307 + * add "verbose errors" option to error-pages example + * add another route example to express(1) so people are not so confused + * add redis online user activity tracking example + * update connect dep + * fix etag quoting. Closes #1310 + * fix error-pages 404 status + * fix jsonp callback char restrictions + * remove old OPTIONS default response + +3.0.0rc3 / 2012-08-13 +================== + + * update connect dep + * fix signed cookies to work with `connect.cookieParser()` ("s:" prefix was missing) [tnydwrds] + * fix `res.render()` clobbering of "locals" + +3.0.0rc2 / 2012-08-03 +================== + + * add CORS example + * update connect dep + * deprecate `.createServer()` & remove old stale examples + * fix: escape `res.redirect()` link + * fix vhost example + +3.0.0rc1 / 2012-07-24 +================== + + * add more examples to view-locals + * add scheme-relative redirects (`res.redirect("//foo.com")`) support + * update cookie dep + * update connect dep + * update send dep + * fix `express(1)` -h flag, use -H for hogan. Closes #1245 + * fix `res.sendfile()` socket error handling regression + +3.0.0beta7 / 2012-07-16 +================== + + * update connect dep for `send()` root normalization regression + +3.0.0beta6 / 2012-07-13 +================== + + * add `err.view` property for view errors. Closes #1226 + * add "jsonp callback name" setting + * add support for "/foo/:bar*" non-greedy matches + * change `res.sendfile()` to use `send()` module + * change `res.send` to use "response-send" module + * remove `app.locals.use` and `res.locals.use`, use regular middleware + +3.0.0beta5 / 2012-07-03 +================== + + * add "make check" support + * add route-map example + * add `res.json(obj, status)` support back for BC + * add "methods" dep, remove internal methods module + * update connect dep + * update auth example to utilize cores pbkdf2 + * updated tests to use "supertest" + +3.0.0beta4 / 2012-06-25 +================== + + * Added `req.auth` + * Added `req.range(size)` + * Added `res.links(obj)` + * Added `res.send(body, status)` support back for backwards compat + * Added `.default()` support to `res.format()` + * Added 2xx / 304 check to `req.fresh` + * Revert "Added + support to the router" + * Fixed `res.send()` freshness check, respect res.statusCode + +3.0.0beta3 / 2012-06-15 +================== + + * Added hogan `--hjs` to express(1) [nullfirm] + * Added another example to content-negotiation + * Added `fresh` dep + * Changed: `res.send()` always checks freshness + * Fixed: expose connects mime module. Closes #1165 + +3.0.0beta2 / 2012-06-06 +================== + + * Added `+` support to the router + * Added `req.host` + * Changed `req.param()` to check route first + * Update connect dep + +3.0.0beta1 / 2012-06-01 +================== + + * Added `res.format()` callback to override default 406 behaviour + * Fixed `res.redirect()` 406. Closes #1154 + +3.0.0alpha5 / 2012-05-30 +================== + + * Added `req.ip` + * Added `{ signed: true }` option to `res.cookie()` + * Removed `res.signedCookie()` + * Changed: dont reverse `req.ips` + * Fixed "trust proxy" setting check for `req.ips` + +3.0.0alpha4 / 2012-05-09 +================== + + * Added: allow `[]` in jsonp callback. Closes #1128 + * Added `PORT` env var support in generated template. Closes #1118 [benatkin] + * Updated: connect 2.2.2 + +3.0.0alpha3 / 2012-05-04 +================== + + * Added public `app.routes`. Closes #887 + * Added _view-locals_ example + * Added _mvc_ example + * Added `res.locals.use()`. Closes #1120 + * Added conditional-GET support to `res.send()` + * Added: coerce `res.set()` values to strings + * Changed: moved `static()` in generated apps below router + * Changed: `res.send()` only set ETag when not previously set + * Changed connect 2.2.1 dep + * Changed: `make test` now runs unit / acceptance tests + * Fixed req/res proto inheritance + +3.0.0alpha2 / 2012-04-26 +================== + + * Added `make benchmark` back + * Added `res.send()` support for `String` objects + * Added client-side data exposing example + * Added `res.header()` and `req.header()` aliases for BC + * Added `express.createServer()` for BC + * Perf: memoize parsed urls + * Perf: connect 2.2.0 dep + * Changed: make `expressInit()` middleware self-aware + * Fixed: use app.get() for all core settings + * Fixed redis session example + * Fixed session example. Closes #1105 + * Fixed generated express dep. Closes #1078 + +3.0.0alpha1 / 2012-04-15 +================== + + * Added `app.locals.use(callback)` + * Added `app.locals` object + * Added `app.locals(obj)` + * Added `res.locals` object + * Added `res.locals(obj)` + * Added `res.format()` for content-negotiation + * Added `app.engine()` + * Added `res.cookie()` JSON cookie support + * Added "trust proxy" setting + * Added `req.subdomains` + * Added `req.protocol` + * Added `req.secure` + * Added `req.path` + * Added `req.ips` + * Added `req.fresh` + * Added `req.stale` + * Added comma-delimited / array support for `req.accepts()` + * Added debug instrumentation + * Added `res.set(obj)` + * Added `res.set(field, value)` + * Added `res.get(field)` + * Added `app.get(setting)`. Closes #842 + * Added `req.acceptsLanguage()` + * Added `req.acceptsCharset()` + * Added `req.accepted` + * Added `req.acceptedLanguages` + * Added `req.acceptedCharsets` + * Added "json replacer" setting + * Added "json spaces" setting + * Added X-Forwarded-Proto support to `res.redirect()`. Closes #92 + * Added `--less` support to express(1) + * Added `express.response` prototype + * Added `express.request` prototype + * Added `express.application` prototype + * Added `app.path()` + * Added `app.render()` + * Added `res.type()` to replace `res.contentType()` + * Changed: `res.redirect()` to add relative support + * Changed: enable "jsonp callback" by default + * Changed: renamed "case sensitive routes" to "case sensitive routing" + * Rewrite of all tests with mocha + * Removed "root" setting + * Removed `res.redirect('home')` support + * Removed `req.notify()` + * Removed `app.register()` + * Removed `app.redirect()` + * Removed `app.is()` + * Removed `app.helpers()` + * Removed `app.dynamicHelpers()` + * Fixed `res.sendfile()` with non-GET. Closes #723 + * Fixed express(1) public dir for windows. Closes #866 + +2.5.9/ 2012-04-02 +================== + + * Added support for PURGE request method [pbuyle] + * Fixed `express(1)` generated app `app.address()` before `listening` [mmalecki] + +2.5.8 / 2012-02-08 +================== + + * Update mkdirp dep. Closes #991 + +2.5.7 / 2012-02-06 +================== + + * Fixed `app.all` duplicate DELETE requests [mscdex] + +2.5.6 / 2012-01-13 +================== + + * Updated hamljs dev dep. Closes #953 + +2.5.5 / 2012-01-08 +================== + + * Fixed: set `filename` on cached templates [matthewleon] + +2.5.4 / 2012-01-02 +================== + + * Fixed `express(1)` eol on 0.4.x. Closes #947 + +2.5.3 / 2011-12-30 +================== + + * Fixed `req.is()` when a charset is present + +2.5.2 / 2011-12-10 +================== + + * Fixed: express(1) LF -> CRLF for windows + +2.5.1 / 2011-11-17 +================== + + * Changed: updated connect to 1.8.x + * Removed sass.js support from express(1) + +2.5.0 / 2011-10-24 +================== + + * Added ./routes dir for generated app by default + * Added npm install reminder to express(1) app gen + * Added 0.5.x support + * Removed `make test-cov` since it wont work with node 0.5.x + * Fixed express(1) public dir for windows. Closes #866 + +2.4.7 / 2011-10-05 +================== + + * Added mkdirp to express(1). Closes #795 + * Added simple _json-config_ example + * Added shorthand for the parsed request's pathname via `req.path` + * Changed connect dep to 1.7.x to fix npm issue... + * Fixed `res.redirect()` __HEAD__ support. [reported by xerox] + * Fixed `req.flash()`, only escape args + * Fixed absolute path checking on windows. Closes #829 [reported by andrewpmckenzie] + +2.4.6 / 2011-08-22 +================== + + * Fixed multiple param callback regression. Closes #824 [reported by TroyGoode] + +2.4.5 / 2011-08-19 +================== + + * Added support for routes to handle errors. Closes #809 + * Added `app.routes.all()`. Closes #803 + * Added "basepath" setting to work in conjunction with reverse proxies etc. + * Refactored `Route` to use a single array of callbacks + * Added support for multiple callbacks for `app.param()`. Closes #801 +Closes #805 + * Changed: removed .call(self) for route callbacks + * Dependency: `qs >= 0.3.1` + * Fixed `res.redirect()` on windows due to `join()` usage. Closes #808 + +2.4.4 / 2011-08-05 +================== + + * Fixed `res.header()` intention of a set, even when `undefined` + * Fixed `*`, value no longer required + * Fixed `res.send(204)` support. Closes #771 + +2.4.3 / 2011-07-14 +================== + + * Added docs for `status` option special-case. Closes #739 + * Fixed `options.filename`, exposing the view path to template engines + +2.4.2. / 2011-07-06 +================== + + * Revert "removed jsonp stripping" for XSS + +2.4.1 / 2011-07-06 +================== + + * Added `res.json()` JSONP support. Closes #737 + * Added _extending-templates_ example. Closes #730 + * Added "strict routing" setting for trailing slashes + * Added support for multiple envs in `app.configure()` calls. Closes #735 + * Changed: `res.send()` using `res.json()` + * Changed: when cookie `path === null` don't default it + * Changed; default cookie path to "home" setting. Closes #731 + * Removed _pids/logs_ creation from express(1) + +2.4.0 / 2011-06-28 +================== + + * Added chainable `res.status(code)` + * Added `res.json()`, an explicit version of `res.send(obj)` + * Added simple web-service example + +2.3.12 / 2011-06-22 +================== + + * \#express is now on freenode! come join! + * Added `req.get(field, param)` + * Added links to Japanese documentation, thanks @hideyukisaito! + * Added; the `express(1)` generated app outputs the env + * Added `content-negotiation` example + * Dependency: connect >= 1.5.1 < 2.0.0 + * Fixed view layout bug. Closes #720 + * Fixed; ignore body on 304. Closes #701 + +2.3.11 / 2011-06-04 +================== + + * Added `npm test` + * Removed generation of dummy test file from `express(1)` + * Fixed; `express(1)` adds express as a dep + * Fixed; prune on `prepublish` + +2.3.10 / 2011-05-27 +================== + + * Added `req.route`, exposing the current route + * Added _package.json_ generation support to `express(1)` + * Fixed call to `app.param()` function for optional params. Closes #682 + +2.3.9 / 2011-05-25 +================== + + * Fixed bug-ish with `../' in `res.partial()` calls + +2.3.8 / 2011-05-24 +================== + + * Fixed `app.options()` + +2.3.7 / 2011-05-23 +================== + + * Added route `Collection`, ex: `app.get('/user/:id').remove();` + * Added support for `app.param(fn)` to define param logic + * Removed `app.param()` support for callback with return value + * Removed module.parent check from express(1) generated app. Closes #670 + * Refactored router. Closes #639 + +2.3.6 / 2011-05-20 +================== + + * Changed; using devDependencies instead of git submodules + * Fixed redis session example + * Fixed markdown example + * Fixed view caching, should not be enabled in development + +2.3.5 / 2011-05-20 +================== + + * Added export `.view` as alias for `.View` + +2.3.4 / 2011-05-08 +================== + + * Added `./examples/say` + * Fixed `res.sendfile()` bug preventing the transfer of files with spaces + +2.3.3 / 2011-05-03 +================== + + * Added "case sensitive routes" option. + * Changed; split methods supported per rfc [slaskis] + * Fixed route-specific middleware when using the same callback function several times + +2.3.2 / 2011-04-27 +================== + + * Fixed view hints + +2.3.1 / 2011-04-26 +================== + + * Added `app.match()` as `app.match.all()` + * Added `app.lookup()` as `app.lookup.all()` + * Added `app.remove()` for `app.remove.all()` + * Added `app.remove.VERB()` + * Fixed template caching collision issue. Closes #644 + * Moved router over from connect and started refactor + +2.3.0 / 2011-04-25 +================== + + * Added options support to `res.clearCookie()` + * Added `res.helpers()` as alias of `res.locals()` + * Added; json defaults to UTF-8 with `res.send()`. Closes #632. [Daniel * Dependency `connect >= 1.4.0` + * Changed; auto set Content-Type in res.attachement [Aaron Heckmann] + * Renamed "cache views" to "view cache". Closes #628 + * Fixed caching of views when using several apps. Closes #637 + * Fixed gotcha invoking `app.param()` callbacks once per route middleware. +Closes #638 + * Fixed partial lookup precedence. Closes #631 +Shaw] + +2.2.2 / 2011-04-12 +================== + + * Added second callback support for `res.download()` connection errors + * Fixed `filename` option passing to template engine + +2.2.1 / 2011-04-04 +================== + + * Added `layout(path)` helper to change the layout within a view. Closes #610 + * Fixed `partial()` collection object support. + Previously only anything with `.length` would work. + When `.length` is present one must still be aware of holes, + however now `{ collection: {foo: 'bar'}}` is valid, exposes + `keyInCollection` and `keysInCollection`. + + * Performance improved with better view caching + * Removed `request` and `response` locals + * Changed; errorHandler page title is now `Express` instead of `Connect` + +2.2.0 / 2011-03-30 +================== + + * Added `app.lookup.VERB()`, ex `app.lookup.put('/user/:id')`. Closes #606 + * Added `app.match.VERB()`, ex `app.match.put('/user/12')`. Closes #606 + * Added `app.VERB(path)` as alias of `app.lookup.VERB()`. + * Dependency `connect >= 1.2.0` + +2.1.1 / 2011-03-29 +================== + + * Added; expose `err.view` object when failing to locate a view + * Fixed `res.partial()` call `next(err)` when no callback is given [reported by aheckmann] + * Fixed; `res.send(undefined)` responds with 204 [aheckmann] + +2.1.0 / 2011-03-24 +================== + + * Added `/_?` partial lookup support. Closes #447 + * Added `request`, `response`, and `app` local variables + * Added `settings` local variable, containing the app's settings + * Added `req.flash()` exception if `req.session` is not available + * Added `res.send(bool)` support (json response) + * Fixed stylus example for latest version + * Fixed; wrap try/catch around `res.render()` + +2.0.0 / 2011-03-17 +================== + + * Fixed up index view path alternative. + * Changed; `res.locals()` without object returns the locals + +2.0.0rc3 / 2011-03-17 +================== + + * Added `res.locals(obj)` to compliment `res.local(key, val)` + * Added `res.partial()` callback support + * Fixed recursive error reporting issue in `res.render()` + +2.0.0rc2 / 2011-03-17 +================== + + * Changed; `partial()` "locals" are now optional + * Fixed `SlowBuffer` support. Closes #584 [reported by tyrda01] + * Fixed .filename view engine option [reported by drudge] + * Fixed blog example + * Fixed `{req,res}.app` reference when mounting [Ben Weaver] + +2.0.0rc / 2011-03-14 +================== + + * Fixed; expose `HTTPSServer` constructor + * Fixed express(1) default test charset. Closes #579 [reported by secoif] + * Fixed; default charset to utf-8 instead of utf8 for lame IE [reported by NickP] + +2.0.0beta3 / 2011-03-09 +================== + + * Added support for `res.contentType()` literal + The original `res.contentType('.json')`, + `res.contentType('application/json')`, and `res.contentType('json')` + will work now. + * Added `res.render()` status option support back + * Added charset option for `res.render()` + * Added `.charset` support (via connect 1.0.4) + * Added view resolution hints when in development and a lookup fails + * Added layout lookup support relative to the page view. + For example while rendering `./views/user/index.jade` if you create + `./views/user/layout.jade` it will be used in favour of the root layout. + * Fixed `res.redirect()`. RFC states absolute url [reported by unlink] + * Fixed; default `res.send()` string charset to utf8 + * Removed `Partial` constructor (not currently used) + +2.0.0beta2 / 2011-03-07 +================== + + * Added res.render() `.locals` support back to aid in migration process + * Fixed flash example + +2.0.0beta / 2011-03-03 +================== + + * Added HTTPS support + * Added `res.cookie()` maxAge support + * Added `req.header()` _Referrer_ / _Referer_ special-case, either works + * Added mount support for `res.redirect()`, now respects the mount-point + * Added `union()` util, taking place of `merge(clone())` combo + * Added stylus support to express(1) generated app + * Added secret to session middleware used in examples and generated app + * Added `res.local(name, val)` for progressive view locals + * Added default param support to `req.param(name, default)` + * Added `app.disabled()` and `app.enabled()` + * Added `app.register()` support for omitting leading ".", either works + * Added `res.partial()`, using the same interface as `partial()` within a view. Closes #539 + * Added `app.param()` to map route params to async/sync logic + * Added; aliased `app.helpers()` as `app.locals()`. Closes #481 + * Added extname with no leading "." support to `res.contentType()` + * Added `cache views` setting, defaulting to enabled in "production" env + * Added index file partial resolution, eg: partial('user') may try _views/user/index.jade_. + * Added `req.accepts()` support for extensions + * Changed; `res.download()` and `res.sendfile()` now utilize Connect's + static file server `connect.static.send()`. + * Changed; replaced `connect.utils.mime()` with npm _mime_ module + * Changed; allow `req.query` to be pre-defined (via middleware or other parent + * Changed view partial resolution, now relative to parent view + * Changed view engine signature. no longer `engine.render(str, options, callback)`, now `engine.compile(str, options) -> Function`, the returned function accepts `fn(locals)`. + * Fixed `req.param()` bug returning Array.prototype methods. Closes #552 + * Fixed; using `Stream#pipe()` instead of `sys.pump()` in `res.sendfile()` + * Fixed; using _qs_ module instead of _querystring_ + * Fixed; strip unsafe chars from jsonp callbacks + * Removed "stream threshold" setting + +1.0.8 / 2011-03-01 +================== + + * Allow `req.query` to be pre-defined (via middleware or other parent app) + * "connect": ">= 0.5.0 < 1.0.0". Closes #547 + * Removed the long deprecated __EXPRESS_ENV__ support + +1.0.7 / 2011-02-07 +================== + + * Fixed `render()` setting inheritance. + Mounted apps would not inherit "view engine" + +1.0.6 / 2011-02-07 +================== + + * Fixed `view engine` setting bug when period is in dirname + +1.0.5 / 2011-02-05 +================== + + * Added secret to generated app `session()` call + +1.0.4 / 2011-02-05 +================== + + * Added `qs` dependency to _package.json_ + * Fixed namespaced `require()`s for latest connect support + +1.0.3 / 2011-01-13 +================== + + * Remove unsafe characters from JSONP callback names [Ryan Grove] + +1.0.2 / 2011-01-10 +================== + + * Removed nested require, using `connect.router` + +1.0.1 / 2010-12-29 +================== + + * Fixed for middleware stacked via `createServer()` + previously the `foo` middleware passed to `createServer(foo)` + would not have access to Express methods such as `res.send()` + or props like `req.query` etc. + +1.0.0 / 2010-11-16 +================== + + * Added; deduce partial object names from the last segment. + For example by default `partial('forum/post', postObject)` will + give you the _post_ object, providing a meaningful default. + * Added http status code string representation to `res.redirect()` body + * Added; `res.redirect()` supporting _text/plain_ and _text/html_ via __Accept__. + * Added `req.is()` to aid in content negotiation + * Added partial local inheritance [suggested by masylum]. Closes #102 + providing access to parent template locals. + * Added _-s, --session[s]_ flag to express(1) to add session related middleware + * Added _--template_ flag to express(1) to specify the + template engine to use. + * Added _--css_ flag to express(1) to specify the + stylesheet engine to use (or just plain css by default). + * Added `app.all()` support [thanks aheckmann] + * Added partial direct object support. + You may now `partial('user', user)` providing the "user" local, + vs previously `partial('user', { object: user })`. + * Added _route-separation_ example since many people question ways + to do this with CommonJS modules. Also view the _blog_ example for + an alternative. + * Performance; caching view path derived partial object names + * Fixed partial local inheritance precedence. [reported by Nick Poulden] Closes #454 + * Fixed jsonp support; _text/javascript_ as per mailinglist discussion + +1.0.0rc4 / 2010-10-14 +================== + + * Added _NODE_ENV_ support, _EXPRESS_ENV_ is deprecated and will be removed in 1.0.0 + * Added route-middleware support (very helpful, see the [docs](http://expressjs.com/guide.html#Route-Middleware)) + * Added _jsonp callback_ setting to enable/disable jsonp autowrapping [Dav Glass] + * Added callback query check on response.send to autowrap JSON objects for simple webservice implementations [Dav Glass] + * Added `partial()` support for array-like collections. Closes #434 + * Added support for swappable querystring parsers + * Added session usage docs. Closes #443 + * Added dynamic helper caching. Closes #439 [suggested by maritz] + * Added authentication example + * Added basic Range support to `res.sendfile()` (and `res.download()` etc) + * Changed; `express(1)` generated app using 2 spaces instead of 4 + * Default env to "development" again [aheckmann] + * Removed _context_ option is no more, use "scope" + * Fixed; exposing _./support_ libs to examples so they can run without installs + * Fixed mvc example + +1.0.0rc3 / 2010-09-20 +================== + + * Added confirmation for `express(1)` app generation. Closes #391 + * Added extending of flash formatters via `app.flashFormatters` + * Added flash formatter support. Closes #411 + * Added streaming support to `res.sendfile()` using `sys.pump()` when >= "stream threshold" + * Added _stream threshold_ setting for `res.sendfile()` + * Added `res.send()` __HEAD__ support + * Added `res.clearCookie()` + * Added `res.cookie()` + * Added `res.render()` headers option + * Added `res.redirect()` response bodies + * Added `res.render()` status option support. Closes #425 [thanks aheckmann] + * Fixed `res.sendfile()` responding with 403 on malicious path + * Fixed `res.download()` bug; when an error occurs remove _Content-Disposition_ + * Fixed; mounted apps settings now inherit from parent app [aheckmann] + * Fixed; stripping Content-Length / Content-Type when 204 + * Fixed `res.send()` 204. Closes #419 + * Fixed multiple _Set-Cookie_ headers via `res.header()`. Closes #402 + * Fixed bug messing with error handlers when `listenFD()` is called instead of `listen()`. [thanks guillermo] + + +1.0.0rc2 / 2010-08-17 +================== + + * Added `app.register()` for template engine mapping. Closes #390 + * Added `res.render()` callback support as second argument (no options) + * Added callback support to `res.download()` + * Added callback support for `res.sendfile()` + * Added support for middleware access via `express.middlewareName()` vs `connect.middlewareName()` + * Added "partials" setting to docs + * Added default expresso tests to `express(1)` generated app. Closes #384 + * Fixed `res.sendfile()` error handling, defer via `next()` + * Fixed `res.render()` callback when a layout is used [thanks guillermo] + * Fixed; `make install` creating ~/.node_libraries when not present + * Fixed issue preventing error handlers from being defined anywhere. Closes #387 + +1.0.0rc / 2010-07-28 +================== + + * Added mounted hook. Closes #369 + * Added connect dependency to _package.json_ + + * Removed "reload views" setting and support code + development env never caches, production always caches. + + * Removed _param_ in route callbacks, signature is now + simply (req, res, next), previously (req, res, params, next). + Use _req.params_ for path captures, _req.query_ for GET params. + + * Fixed "home" setting + * Fixed middleware/router precedence issue. Closes #366 + * Fixed; _configure()_ callbacks called immediately. Closes #368 + +1.0.0beta2 / 2010-07-23 +================== + + * Added more examples + * Added; exporting `Server` constructor + * Added `Server#helpers()` for view locals + * Added `Server#dynamicHelpers()` for dynamic view locals. Closes #349 + * Added support for absolute view paths + * Added; _home_ setting defaults to `Server#route` for mounted apps. Closes #363 + * Added Guillermo Rauch to the contributor list + * Added support for "as" for non-collection partials. Closes #341 + * Fixed _install.sh_, ensuring _~/.node_libraries_ exists. Closes #362 [thanks jf] + * Fixed `res.render()` exceptions, now passed to `next()` when no callback is given [thanks guillermo] + * Fixed instanceof `Array` checks, now `Array.isArray()` + * Fixed express(1) expansion of public dirs. Closes #348 + * Fixed middleware precedence. Closes #345 + * Fixed view watcher, now async [thanks aheckmann] + +1.0.0beta / 2010-07-15 +================== + + * Re-write + - much faster + - much lighter + - Check [ExpressJS.com](http://expressjs.com) for migration guide and updated docs + +0.14.0 / 2010-06-15 +================== + + * Utilize relative requires + * Added Static bufferSize option [aheckmann] + * Fixed caching of view and partial subdirectories [aheckmann] + * Fixed mime.type() comments now that ".ext" is not supported + * Updated haml submodule + * Updated class submodule + * Removed bin/express + +0.13.0 / 2010-06-01 +================== + + * Added node v0.1.97 compatibility + * Added support for deleting cookies via Request#cookie('key', null) + * Updated haml submodule + * Fixed not-found page, now using charset utf-8 + * Fixed show-exceptions page, now using charset utf-8 + * Fixed view support due to fs.readFile Buffers + * Changed; mime.type() no longer accepts ".type" due to node extname() changes + +0.12.0 / 2010-05-22 +================== + + * Added node v0.1.96 compatibility + * Added view `helpers` export which act as additional local variables + * Updated haml submodule + * Changed ETag; removed inode, modified time only + * Fixed LF to CRLF for setting multiple cookies + * Fixed cookie compilation; values are now urlencoded + * Fixed cookies parsing; accepts quoted values and url escaped cookies + +0.11.0 / 2010-05-06 +================== + + * Added support for layouts using different engines + - this.render('page.html.haml', { layout: 'super-cool-layout.html.ejs' }) + - this.render('page.html.haml', { layout: 'foo' }) // assumes 'foo.html.haml' + - this.render('page.html.haml', { layout: false }) // no layout + * Updated ext submodule + * Updated haml submodule + * Fixed EJS partial support by passing along the context. Issue #307 + +0.10.1 / 2010-05-03 +================== + + * Fixed binary uploads. + +0.10.0 / 2010-04-30 +================== + + * Added charset support via Request#charset (automatically assigned to 'UTF-8' when respond()'s + encoding is set to 'utf8' or 'utf-8'). + * Added "encoding" option to Request#render(). Closes #299 + * Added "dump exceptions" setting, which is enabled by default. + * Added simple ejs template engine support + * Added error response support for text/plain, application/json. Closes #297 + * Added callback function param to Request#error() + * Added Request#sendHead() + * Added Request#stream() + * Added support for Request#respond(304, null) for empty response bodies + * Added ETag support to Request#sendfile() + * Added options to Request#sendfile(), passed to fs.createReadStream() + * Added filename arg to Request#download() + * Performance enhanced due to pre-reversing plugins so that plugins.reverse() is not called on each request + * Performance enhanced by preventing several calls to toLowerCase() in Router#match() + * Changed; Request#sendfile() now streams + * Changed; Renamed Request#halt() to Request#respond(). Closes #289 + * Changed; Using sys.inspect() instead of JSON.encode() for error output + * Changed; run() returns the http.Server instance. Closes #298 + * Changed; Defaulting Server#host to null (INADDR_ANY) + * Changed; Logger "common" format scale of 0.4f + * Removed Logger "request" format + * Fixed; Catching ENOENT in view caching, preventing error when "views/partials" is not found + * Fixed several issues with http client + * Fixed Logger Content-Length output + * Fixed bug preventing Opera from retaining the generated session id. Closes #292 + +0.9.0 / 2010-04-14 +================== + + * Added DSL level error() route support + * Added DSL level notFound() route support + * Added Request#error() + * Added Request#notFound() + * Added Request#render() callback function. Closes #258 + * Added "max upload size" setting + * Added "magic" variables to collection partials (\_\_index\_\_, \_\_length\_\_, \_\_isFirst\_\_, \_\_isLast\_\_). Closes #254 + * Added [haml.js](http://github.com/visionmedia/haml.js) submodule; removed haml-js + * Added callback function support to Request#halt() as 3rd/4th arg + * Added preprocessing of route param wildcards using param(). Closes #251 + * Added view partial support (with collections etc.) + * Fixed bug preventing falsey params (such as ?page=0). Closes #286 + * Fixed setting of multiple cookies. Closes #199 + * Changed; view naming convention is now NAME.TYPE.ENGINE (for example page.html.haml) + * Changed; session cookie is now httpOnly + * Changed; Request is no longer global + * Changed; Event is no longer global + * Changed; "sys" module is no longer global + * Changed; moved Request#download to Static plugin where it belongs + * Changed; Request instance created before body parsing. Closes #262 + * Changed; Pre-caching views in memory when "cache view contents" is enabled. Closes #253 + * Changed; Pre-caching view partials in memory when "cache view partials" is enabled + * Updated support to node --version 0.1.90 + * Updated dependencies + * Removed set("session cookie") in favour of use(Session, { cookie: { ... }}) + * Removed utils.mixin(); use Object#mergeDeep() + +0.8.0 / 2010-03-19 +================== + + * Added coffeescript example app. Closes #242 + * Changed; cache api now async friendly. Closes #240 + * Removed deprecated 'express/static' support. Use 'express/plugins/static' + +0.7.6 / 2010-03-19 +================== + + * Added Request#isXHR. Closes #229 + * Added `make install` (for the executable) + * Added `express` executable for setting up simple app templates + * Added "GET /public/*" to Static plugin, defaulting to /public + * Added Static plugin + * Fixed; Request#render() only calls cache.get() once + * Fixed; Namespacing View caches with "view:" + * Fixed; Namespacing Static caches with "static:" + * Fixed; Both example apps now use the Static plugin + * Fixed set("views"). Closes #239 + * Fixed missing space for combined log format + * Deprecated Request#sendfile() and 'express/static' + * Removed Server#running + +0.7.5 / 2010-03-16 +================== + + * Added Request#flash() support without args, now returns all flashes + * Updated ext submodule + +0.7.4 / 2010-03-16 +================== + + * Fixed session reaper + * Changed; class.js replacing js-oo Class implementation (quite a bit faster, no browser cruft) + +0.7.3 / 2010-03-16 +================== + + * Added package.json + * Fixed requiring of haml / sass due to kiwi removal + +0.7.2 / 2010-03-16 +================== + + * Fixed GIT submodules (HAH!) + +0.7.1 / 2010-03-16 +================== + + * Changed; Express now using submodules again until a PM is adopted + * Changed; chat example using millisecond conversions from ext + +0.7.0 / 2010-03-15 +================== + + * Added Request#pass() support (finds the next matching route, or the given path) + * Added Logger plugin (default "common" format replaces CommonLogger) + * Removed Profiler plugin + * Removed CommonLogger plugin + +0.6.0 / 2010-03-11 +================== + + * Added seed.yml for kiwi package management support + * Added HTTP client query string support when method is GET. Closes #205 + + * Added support for arbitrary view engines. + For example "foo.engine.html" will now require('engine'), + the exports from this module are cached after the first require(). + + * Added async plugin support + + * Removed usage of RESTful route funcs as http client + get() etc, use http.get() and friends + + * Removed custom exceptions + +0.5.0 / 2010-03-10 +================== + + * Added ext dependency (library of js extensions) + * Removed extname() / basename() utils. Use path module + * Removed toArray() util. Use arguments.values + * Removed escapeRegexp() util. Use RegExp.escape() + * Removed process.mixin() dependency. Use utils.mixin() + * Removed Collection + * Removed ElementCollection + * Shameless self promotion of ebook "Advanced JavaScript" (http://dev-mag.com) ;) + +0.4.0 / 2010-02-11 +================== + + * Added flash() example to sample upload app + * Added high level restful http client module (express/http) + * Changed; RESTful route functions double as HTTP clients. Closes #69 + * Changed; throwing error when routes are added at runtime + * Changed; defaulting render() context to the current Request. Closes #197 + * Updated haml submodule + +0.3.0 / 2010-02-11 +================== + + * Updated haml / sass submodules. Closes #200 + * Added flash message support. Closes #64 + * Added accepts() now allows multiple args. fixes #117 + * Added support for plugins to halt. Closes #189 + * Added alternate layout support. Closes #119 + * Removed Route#run(). Closes #188 + * Fixed broken specs due to use(Cookie) missing + +0.2.1 / 2010-02-05 +================== + + * Added "plot" format option for Profiler (for gnuplot processing) + * Added request number to Profiler plugin + * Fixed binary encoding for multipart file uploads, was previously defaulting to UTF8 + * Fixed issue with routes not firing when not files are present. Closes #184 + * Fixed process.Promise -> events.Promise + +0.2.0 / 2010-02-03 +================== + + * Added parseParam() support for name[] etc. (allows for file inputs with "multiple" attr) Closes #180 + * Added Both Cache and Session option "reapInterval" may be "reapEvery". Closes #174 + * Added expiration support to cache api with reaper. Closes #133 + * Added cache Store.Memory#reap() + * Added Cache; cache api now uses first class Cache instances + * Added abstract session Store. Closes #172 + * Changed; cache Memory.Store#get() utilizing Collection + * Renamed MemoryStore -> Store.Memory + * Fixed use() of the same plugin several time will always use latest options. Closes #176 + +0.1.0 / 2010-02-03 +================== + + * Changed; Hooks (before / after) pass request as arg as well as evaluated in their context + * Updated node support to 0.1.27 Closes #169 + * Updated dirname(__filename) -> __dirname + * Updated libxmljs support to v0.2.0 + * Added session support with memory store / reaping + * Added quick uid() helper + * Added multi-part upload support + * Added Sass.js support / submodule + * Added production env caching view contents and static files + * Added static file caching. Closes #136 + * Added cache plugin with memory stores + * Added support to StaticFile so that it works with non-textual files. + * Removed dirname() helper + * Removed several globals (now their modules must be required) + +0.0.2 / 2010-01-10 +================== + + * Added view benchmarks; currently haml vs ejs + * Added Request#attachment() specs. Closes #116 + * Added use of node's parseQuery() util. Closes #123 + * Added `make init` for submodules + * Updated Haml + * Updated sample chat app to show messages on load + * Updated libxmljs parseString -> parseHtmlString + * Fixed `make init` to work with older versions of git + * Fixed specs can now run independent specs for those who can't build deps. Closes #127 + * Fixed issues introduced by the node url module changes. Closes 126. + * Fixed two assertions failing due to Collection#keys() returning strings + * Fixed faulty Collection#toArray() spec due to keys() returning strings + * Fixed `make test` now builds libxmljs.node before testing + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/node_modules/express/LICENSE b/node_modules/express/LICENSE new file mode 100644 index 0000000..aa927e4 --- /dev/null +++ b/node_modules/express/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2009-2014 TJ Holowaychuk +Copyright (c) 2013-2014 Roman Shtylman +Copyright (c) 2014-2015 Douglas Christopher Wilson + +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. diff --git a/node_modules/express/Readme.md b/node_modules/express/Readme.md new file mode 100644 index 0000000..bc108d5 --- /dev/null +++ b/node_modules/express/Readme.md @@ -0,0 +1,260 @@ +[![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](http://expressjs.com/) + +**Fast, unopinionated, minimalist web framework for [Node.js](http://nodejs.org).** + +**This project has a [Code of Conduct][].** + +## Table of contents + +* [Installation](#Installation) +* [Features](#Features) +* [Docs & Community](#docs--community) +* [Quick Start](#Quick-Start) +* [Running Tests](#Running-Tests) +* [Philosophy](#Philosophy) +* [Examples](#Examples) +* [Contributing to Express](#Contributing) +* [TC (Technical Committee)](#tc-technical-committee) +* [Triagers](#triagers) +* [License](#license) + + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Install Size][npm-install-size-image]][npm-install-size-url] +[![NPM Downloads][npm-downloads-image]][npm-downloads-url] +[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer] + + +```js +const express = require('express') +const app = express() + +app.get('/', function (req, res) { + res.send('Hello World') +}) + +app.listen(3000) +``` + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). + +Before installing, [download and install Node.js](https://nodejs.org/en/download/). +Node.js 0.10 or higher is required. + +If this is a brand new project, make sure to create a `package.json` first with +the [`npm init` command](https://docs.npmjs.com/creating-a-package-json-file). + +Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```console +$ npm install express +``` + +Follow [our installing guide](http://expressjs.com/en/starter/installing.html) +for more information. + +## Features + + * Robust routing + * Focus on high performance + * Super-high test coverage + * HTTP helpers (redirection, caching, etc) + * View system supporting 14+ template engines + * Content negotiation + * Executable for generating applications quickly + +## Docs & Community + + * [Website and Documentation](http://expressjs.com/) - [[website repo](https://github.com/expressjs/expressjs.com)] + * [#express](https://web.libera.chat/#express) on [Libera Chat](https://libera.chat) IRC + * [GitHub Organization](https://github.com/expressjs) for Official Middleware & Modules + * Visit the [Wiki](https://github.com/expressjs/express/wiki) + * [Google Group](https://groups.google.com/group/express-js) for discussion + * [Gitter](https://gitter.im/expressjs/express) for support and discussion + +**PROTIP** Be sure to read [Migrating from 3.x to 4.x](https://github.com/expressjs/express/wiki/Migrating-from-3.x-to-4.x) as well as [New features in 4.x](https://github.com/expressjs/express/wiki/New-features-in-4.x). + +## Quick Start + + The quickest way to get started with express is to utilize the executable [`express(1)`](https://github.com/expressjs/generator) to generate an application as shown below: + + Install the executable. The executable's major version will match Express's: + +```console +$ npm install -g express-generator@4 +``` + + Create the app: + +```console +$ express /tmp/foo && cd /tmp/foo +``` + + Install dependencies: + +```console +$ npm install +``` + + Start the server: + +```console +$ npm start +``` + + View the website at: http://localhost:3000 + +## Philosophy + + The Express philosophy is to provide small, robust tooling for HTTP servers, making + it a great solution for single page applications, websites, hybrids, or public + HTTP APIs. + + Express does not force you to use any specific ORM or template engine. With support for over + 14 template engines via [Consolidate.js](https://github.com/tj/consolidate.js), + you can quickly craft your perfect framework. + +## Examples + + To view the examples, clone the Express repo and install the dependencies: + +```console +$ git clone https://github.com/expressjs/express.git --depth 1 +$ cd express +$ npm install +``` + + Then run whichever example you want: + +```console +$ node examples/content-negotiation +``` + +## Contributing + + [![Linux Build][github-actions-ci-image]][github-actions-ci-url] + [![Windows Build][appveyor-image]][appveyor-url] + [![Test Coverage][coveralls-image]][coveralls-url] + +The Express.js project welcomes all constructive contributions. Contributions take many forms, +from code for bug fixes and enhancements, to additions and fixes to documentation, additional +tests, triaging incoming pull requests and issues, and more! + +See the [Contributing Guide](Contributing.md) for more technical details on contributing. + +### Security Issues + +If you discover a security vulnerability in Express, please see [Security Policies and Procedures](Security.md). + +### Running Tests + +To run the test suite, first install the dependencies, then run `npm test`: + +```console +$ npm install +$ npm test +``` + +## People + +The original author of Express is [TJ Holowaychuk](https://github.com/tj) + +[List of all contributors](https://github.com/expressjs/express/graphs/contributors) + +### TC (Technical Committee) + +* [UlisesGascon](https://github.com/UlisesGascon) - **Ulises Gascón** (he/him) +* [jonchurch](https://github.com/jonchurch) - **Jon Church** +* [wesleytodd](https://github.com/wesleytodd) - **Wes Todd** +* [LinusU](https://github.com/LinusU) - **Linus Unnebäck** +* [blakeembrey](https://github.com/blakeembrey) - **Blake Embrey** +* [sheplu](https://github.com/sheplu) - **Jean Burellier** +* [crandmck](https://github.com/crandmck) - **Rand McKinney** +* [ctcpip](https://github.com/ctcpip) - **Chris de Almeida** + +
+TC emeriti members + +#### TC emeriti members + + * [dougwilson](https://github.com/dougwilson) - **Douglas Wilson** + * [hacksparrow](https://github.com/hacksparrow) - **Hage Yaapa** + * [jonathanong](https://github.com/jonathanong) - **jongleberry** + * [niftylettuce](https://github.com/niftylettuce) - **niftylettuce** + * [troygoode](https://github.com/troygoode) - **Troy Goode** +
+ + +### Triagers + +* [aravindvnair99](https://github.com/aravindvnair99) - **Aravind Nair** +* [carpasse](https://github.com/carpasse) - **Carlos Serrano** +* [CBID2](https://github.com/CBID2) - **Christine Belzie** +* [enyoghasim](https://github.com/enyoghasim) - **David Enyoghasim** +* [UlisesGascon](https://github.com/UlisesGascon) - **Ulises Gascón** (he/him) +* [mertcanaltin](https://github.com/mertcanaltin) - **Mert Can Altin** +* [0ss](https://github.com/0ss) - **Salah** +* [import-brain](https://github.com/import-brain) - **Eric Cheng** (he/him) +* [3imed-jaberi](https://github.com/3imed-jaberi) - **Imed Jaberi** +* [dakshkhetan](https://github.com/dakshkhetan) - **Daksh Khetan** (he/him) +* [lucasraziel](https://github.com/lucasraziel) - **Lucas Soares Do Rego** +* [IamLizu](https://github.com/IamLizu) - **S M Mahmudul Hasan** (he/him) +* [Sushmeet](https://github.com/Sushmeet) - **Sushmeet Sunger** + +
+Triagers emeriti members + +#### Emeritus Triagers + + * [AuggieH](https://github.com/AuggieH) - **Auggie Hudak** + * [G-Rath](https://github.com/G-Rath) - **Gareth Jones** + * [MohammadXroid](https://github.com/MohammadXroid) - **Mohammad Ayashi** + * [NawafSwe](https://github.com/NawafSwe) - **Nawaf Alsharqi** + * [NotMoni](https://github.com/NotMoni) - **Moni** + * [VigneshMurugan](https://github.com/VigneshMurugan) - **Vignesh Murugan** + * [davidmashe](https://github.com/davidmashe) - **David Ashe** + * [digitaIfabric](https://github.com/digitaIfabric) - **David** + * [e-l-i-s-e](https://github.com/e-l-i-s-e) - **Elise Bonner** + * [fed135](https://github.com/fed135) - **Frederic Charette** + * [firmanJS](https://github.com/firmanJS) - **Firman Abdul Hakim** + * [getspooky](https://github.com/getspooky) - **Yasser Ameur** + * [ghinks](https://github.com/ghinks) - **Glenn** + * [ghousemohamed](https://github.com/ghousemohamed) - **Ghouse Mohamed** + * [gireeshpunathil](https://github.com/gireeshpunathil) - **Gireesh Punathil** + * [jake32321](https://github.com/jake32321) - **Jake Reed** + * [jonchurch](https://github.com/jonchurch) - **Jon Church** + * [lekanikotun](https://github.com/lekanikotun) - **Troy Goode** + * [marsonya](https://github.com/marsonya) - **Lekan Ikotun** + * [mastermatt](https://github.com/mastermatt) - **Matt R. Wilson** + * [maxakuru](https://github.com/maxakuru) - **Max Edell** + * [mlrawlings](https://github.com/mlrawlings) - **Michael Rawlings** + * [rodion-arr](https://github.com/rodion-arr) - **Rodion Abdurakhimov** + * [sheplu](https://github.com/sheplu) - **Jean Burellier** + * [tarunyadav1](https://github.com/tarunyadav1) - **Tarun yadav** + * [tunniclm](https://github.com/tunniclm) - **Mike Tunnicliffe** +
+ + +## License + + [MIT](LICENSE) + +[appveyor-image]: https://badgen.net/appveyor/ci/dougwilson/express/master?label=windows +[appveyor-url]: https://ci.appveyor.com/project/dougwilson/express +[coveralls-image]: https://badgen.net/coveralls/c/github/expressjs/express/master +[coveralls-url]: https://coveralls.io/r/expressjs/express?branch=master +[github-actions-ci-image]: https://badgen.net/github/checks/expressjs/express/master?label=linux +[github-actions-ci-url]: https://github.com/expressjs/express/actions/workflows/ci.yml +[npm-downloads-image]: https://badgen.net/npm/dm/express +[npm-downloads-url]: https://npmcharts.com/compare/express?minimal=true +[npm-install-size-image]: https://badgen.net/packagephobia/install/express +[npm-install-size-url]: https://packagephobia.com/result?p=express +[npm-url]: https://npmjs.org/package/express +[npm-version-image]: https://badgen.net/npm/v/express +[ossf-scorecard-badge]: https://api.scorecard.dev/projects/github.com/expressjs/express/badge +[ossf-scorecard-visualizer]: https://ossf.github.io/scorecard-visualizer/#/projects/github.com/expressjs/express +[Code of Conduct]: https://github.com/expressjs/express/blob/master/Code-Of-Conduct.md diff --git a/node_modules/express/index.js b/node_modules/express/index.js new file mode 100644 index 0000000..d219b0c --- /dev/null +++ b/node_modules/express/index.js @@ -0,0 +1,11 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +module.exports = require('./lib/express'); diff --git a/node_modules/express/lib/application.js b/node_modules/express/lib/application.js new file mode 100644 index 0000000..ebb30b5 --- /dev/null +++ b/node_modules/express/lib/application.js @@ -0,0 +1,661 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @private + */ + +var finalhandler = require('finalhandler'); +var Router = require('./router'); +var methods = require('methods'); +var middleware = require('./middleware/init'); +var query = require('./middleware/query'); +var debug = require('debug')('express:application'); +var View = require('./view'); +var http = require('http'); +var compileETag = require('./utils').compileETag; +var compileQueryParser = require('./utils').compileQueryParser; +var compileTrust = require('./utils').compileTrust; +var deprecate = require('depd')('express'); +var flatten = require('array-flatten'); +var merge = require('utils-merge'); +var resolve = require('path').resolve; +var setPrototypeOf = require('setprototypeof') + +/** + * Module variables. + * @private + */ + +var hasOwnProperty = Object.prototype.hasOwnProperty +var slice = Array.prototype.slice; + +/** + * Application prototype. + */ + +var app = exports = module.exports = {}; + +/** + * Variable for trust proxy inheritance back-compat + * @private + */ + +var trustProxyDefaultSymbol = '@@symbol:trust_proxy_default'; + +/** + * Initialize the server. + * + * - setup default configuration + * - setup default middleware + * - setup route reflection methods + * + * @private + */ + +app.init = function init() { + this.cache = {}; + this.engines = {}; + this.settings = {}; + + this.defaultConfiguration(); +}; + +/** + * Initialize application configuration. + * @private + */ + +app.defaultConfiguration = function defaultConfiguration() { + var env = process.env.NODE_ENV || 'development'; + + // default settings + this.enable('x-powered-by'); + this.set('etag', 'weak'); + this.set('env', env); + this.set('query parser', 'extended'); + this.set('subdomain offset', 2); + this.set('trust proxy', false); + + // trust proxy inherit back-compat + Object.defineProperty(this.settings, trustProxyDefaultSymbol, { + configurable: true, + value: true + }); + + debug('booting in %s mode', env); + + this.on('mount', function onmount(parent) { + // inherit trust proxy + if (this.settings[trustProxyDefaultSymbol] === true + && typeof parent.settings['trust proxy fn'] === 'function') { + delete this.settings['trust proxy']; + delete this.settings['trust proxy fn']; + } + + // inherit protos + setPrototypeOf(this.request, parent.request) + setPrototypeOf(this.response, parent.response) + setPrototypeOf(this.engines, parent.engines) + setPrototypeOf(this.settings, parent.settings) + }); + + // setup locals + this.locals = Object.create(null); + + // top-most app is mounted at / + this.mountpath = '/'; + + // default locals + this.locals.settings = this.settings; + + // default configuration + this.set('view', View); + this.set('views', resolve('views')); + this.set('jsonp callback name', 'callback'); + + if (env === 'production') { + this.enable('view cache'); + } + + Object.defineProperty(this, 'router', { + get: function() { + throw new Error('\'app.router\' is deprecated!\nPlease see the 3.x to 4.x migration guide for details on how to update your app.'); + } + }); +}; + +/** + * lazily adds the base router if it has not yet been added. + * + * We cannot add the base router in the defaultConfiguration because + * it reads app settings which might be set after that has run. + * + * @private + */ +app.lazyrouter = function lazyrouter() { + if (!this._router) { + this._router = new Router({ + caseSensitive: this.enabled('case sensitive routing'), + strict: this.enabled('strict routing') + }); + + this._router.use(query(this.get('query parser fn'))); + this._router.use(middleware.init(this)); + } +}; + +/** + * Dispatch a req, res pair into the application. Starts pipeline processing. + * + * If no callback is provided, then default error handlers will respond + * in the event of an error bubbling through the stack. + * + * @private + */ + +app.handle = function handle(req, res, callback) { + var router = this._router; + + // final handler + var done = callback || finalhandler(req, res, { + env: this.get('env'), + onerror: logerror.bind(this) + }); + + // no routes + if (!router) { + debug('no routes defined on app'); + done(); + return; + } + + router.handle(req, res, done); +}; + +/** + * Proxy `Router#use()` to add middleware to the app router. + * See Router#use() documentation for details. + * + * If the _fn_ parameter is an express app, then it will be + * mounted at the _route_ specified. + * + * @public + */ + +app.use = function use(fn) { + var offset = 0; + var path = '/'; + + // default path to '/' + // disambiguate app.use([fn]) + if (typeof fn !== 'function') { + var arg = fn; + + while (Array.isArray(arg) && arg.length !== 0) { + arg = arg[0]; + } + + // first arg is the path + if (typeof arg !== 'function') { + offset = 1; + path = fn; + } + } + + var fns = flatten(slice.call(arguments, offset)); + + if (fns.length === 0) { + throw new TypeError('app.use() requires a middleware function') + } + + // setup router + this.lazyrouter(); + var router = this._router; + + fns.forEach(function (fn) { + // non-express app + if (!fn || !fn.handle || !fn.set) { + return router.use(path, fn); + } + + debug('.use app under %s', path); + fn.mountpath = path; + fn.parent = this; + + // restore .app property on req and res + router.use(path, function mounted_app(req, res, next) { + var orig = req.app; + fn.handle(req, res, function (err) { + setPrototypeOf(req, orig.request) + setPrototypeOf(res, orig.response) + next(err); + }); + }); + + // mounted an app + fn.emit('mount', this); + }, this); + + return this; +}; + +/** + * Proxy to the app `Router#route()` + * Returns a new `Route` instance for the _path_. + * + * Routes are isolated middleware stacks for specific paths. + * See the Route api docs for details. + * + * @public + */ + +app.route = function route(path) { + this.lazyrouter(); + return this._router.route(path); +}; + +/** + * Register the given template engine callback `fn` + * as `ext`. + * + * By default will `require()` the engine based on the + * file extension. For example if you try to render + * a "foo.ejs" file Express will invoke the following internally: + * + * app.engine('ejs', require('ejs').__express); + * + * For engines that do not provide `.__express` out of the box, + * or if you wish to "map" a different extension to the template engine + * you may use this method. For example mapping the EJS template engine to + * ".html" files: + * + * app.engine('html', require('ejs').renderFile); + * + * In this case EJS provides a `.renderFile()` method with + * the same signature that Express expects: `(path, options, callback)`, + * though note that it aliases this method as `ejs.__express` internally + * so if you're using ".ejs" extensions you don't need to do anything. + * + * Some template engines do not follow this convention, the + * [Consolidate.js](https://github.com/tj/consolidate.js) + * library was created to map all of node's popular template + * engines to follow this convention, thus allowing them to + * work seamlessly within Express. + * + * @param {String} ext + * @param {Function} fn + * @return {app} for chaining + * @public + */ + +app.engine = function engine(ext, fn) { + if (typeof fn !== 'function') { + throw new Error('callback function required'); + } + + // get file extension + var extension = ext[0] !== '.' + ? '.' + ext + : ext; + + // store engine + this.engines[extension] = fn; + + return this; +}; + +/** + * Proxy to `Router#param()` with one added api feature. The _name_ parameter + * can be an array of names. + * + * See the Router#param() docs for more details. + * + * @param {String|Array} name + * @param {Function} fn + * @return {app} for chaining + * @public + */ + +app.param = function param(name, fn) { + this.lazyrouter(); + + if (Array.isArray(name)) { + for (var i = 0; i < name.length; i++) { + this.param(name[i], fn); + } + + return this; + } + + this._router.param(name, fn); + + return this; +}; + +/** + * Assign `setting` to `val`, or return `setting`'s value. + * + * app.set('foo', 'bar'); + * app.set('foo'); + * // => "bar" + * + * Mounted servers inherit their parent server's settings. + * + * @param {String} setting + * @param {*} [val] + * @return {Server} for chaining + * @public + */ + +app.set = function set(setting, val) { + if (arguments.length === 1) { + // app.get(setting) + var settings = this.settings + + while (settings && settings !== Object.prototype) { + if (hasOwnProperty.call(settings, setting)) { + return settings[setting] + } + + settings = Object.getPrototypeOf(settings) + } + + return undefined + } + + debug('set "%s" to %o', setting, val); + + // set value + this.settings[setting] = val; + + // trigger matched settings + switch (setting) { + case 'etag': + this.set('etag fn', compileETag(val)); + break; + case 'query parser': + this.set('query parser fn', compileQueryParser(val)); + break; + case 'trust proxy': + this.set('trust proxy fn', compileTrust(val)); + + // trust proxy inherit back-compat + Object.defineProperty(this.settings, trustProxyDefaultSymbol, { + configurable: true, + value: false + }); + + break; + } + + return this; +}; + +/** + * Return the app's absolute pathname + * based on the parent(s) that have + * mounted it. + * + * For example if the application was + * mounted as "/admin", which itself + * was mounted as "/blog" then the + * return value would be "/blog/admin". + * + * @return {String} + * @private + */ + +app.path = function path() { + return this.parent + ? this.parent.path() + this.mountpath + : ''; +}; + +/** + * Check if `setting` is enabled (truthy). + * + * app.enabled('foo') + * // => false + * + * app.enable('foo') + * app.enabled('foo') + * // => true + * + * @param {String} setting + * @return {Boolean} + * @public + */ + +app.enabled = function enabled(setting) { + return Boolean(this.set(setting)); +}; + +/** + * Check if `setting` is disabled. + * + * app.disabled('foo') + * // => true + * + * app.enable('foo') + * app.disabled('foo') + * // => false + * + * @param {String} setting + * @return {Boolean} + * @public + */ + +app.disabled = function disabled(setting) { + return !this.set(setting); +}; + +/** + * Enable `setting`. + * + * @param {String} setting + * @return {app} for chaining + * @public + */ + +app.enable = function enable(setting) { + return this.set(setting, true); +}; + +/** + * Disable `setting`. + * + * @param {String} setting + * @return {app} for chaining + * @public + */ + +app.disable = function disable(setting) { + return this.set(setting, false); +}; + +/** + * Delegate `.VERB(...)` calls to `router.VERB(...)`. + */ + +methods.forEach(function(method){ + app[method] = function(path){ + if (method === 'get' && arguments.length === 1) { + // app.get(setting) + return this.set(path); + } + + this.lazyrouter(); + + var route = this._router.route(path); + route[method].apply(route, slice.call(arguments, 1)); + return this; + }; +}); + +/** + * Special-cased "all" method, applying the given route `path`, + * middleware, and callback to _every_ HTTP method. + * + * @param {String} path + * @param {Function} ... + * @return {app} for chaining + * @public + */ + +app.all = function all(path) { + this.lazyrouter(); + + var route = this._router.route(path); + var args = slice.call(arguments, 1); + + for (var i = 0; i < methods.length; i++) { + route[methods[i]].apply(route, args); + } + + return this; +}; + +// del -> delete alias + +app.del = deprecate.function(app.delete, 'app.del: Use app.delete instead'); + +/** + * Render the given view `name` name with `options` + * and a callback accepting an error and the + * rendered template string. + * + * Example: + * + * app.render('email', { name: 'Tobi' }, function(err, html){ + * // ... + * }) + * + * @param {String} name + * @param {Object|Function} options or fn + * @param {Function} callback + * @public + */ + +app.render = function render(name, options, callback) { + var cache = this.cache; + var done = callback; + var engines = this.engines; + var opts = options; + var renderOptions = {}; + var view; + + // support callback function as second arg + if (typeof options === 'function') { + done = options; + opts = {}; + } + + // merge app.locals + merge(renderOptions, this.locals); + + // merge options._locals + if (opts._locals) { + merge(renderOptions, opts._locals); + } + + // merge options + merge(renderOptions, opts); + + // set .cache unless explicitly provided + if (renderOptions.cache == null) { + renderOptions.cache = this.enabled('view cache'); + } + + // primed cache + if (renderOptions.cache) { + view = cache[name]; + } + + // view + if (!view) { + var View = this.get('view'); + + view = new View(name, { + defaultEngine: this.get('view engine'), + root: this.get('views'), + engines: engines + }); + + if (!view.path) { + var dirs = Array.isArray(view.root) && view.root.length > 1 + ? 'directories "' + view.root.slice(0, -1).join('", "') + '" or "' + view.root[view.root.length - 1] + '"' + : 'directory "' + view.root + '"' + var err = new Error('Failed to lookup view "' + name + '" in views ' + dirs); + err.view = view; + return done(err); + } + + // prime the cache + if (renderOptions.cache) { + cache[name] = view; + } + } + + // render + tryRender(view, renderOptions, done); +}; + +/** + * Listen for connections. + * + * A node `http.Server` is returned, with this + * application (which is a `Function`) as its + * callback. If you wish to create both an HTTP + * and HTTPS server you may do so with the "http" + * and "https" modules as shown here: + * + * var http = require('http') + * , https = require('https') + * , express = require('express') + * , app = express(); + * + * http.createServer(app).listen(80); + * https.createServer({ ... }, app).listen(443); + * + * @return {http.Server} + * @public + */ + +app.listen = function listen() { + var server = http.createServer(this); + return server.listen.apply(server, arguments); +}; + +/** + * Log error using console.error. + * + * @param {Error} err + * @private + */ + +function logerror(err) { + /* istanbul ignore next */ + if (this.get('env') !== 'test') console.error(err.stack || err.toString()); +} + +/** + * Try rendering a view. + * @private + */ + +function tryRender(view, options, callback) { + try { + view.render(options, callback); + } catch (err) { + callback(err); + } +} diff --git a/node_modules/express/lib/express.js b/node_modules/express/lib/express.js new file mode 100644 index 0000000..d188a16 --- /dev/null +++ b/node_modules/express/lib/express.js @@ -0,0 +1,116 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + */ + +var bodyParser = require('body-parser') +var EventEmitter = require('events').EventEmitter; +var mixin = require('merge-descriptors'); +var proto = require('./application'); +var Route = require('./router/route'); +var Router = require('./router'); +var req = require('./request'); +var res = require('./response'); + +/** + * Expose `createApplication()`. + */ + +exports = module.exports = createApplication; + +/** + * Create an express application. + * + * @return {Function} + * @api public + */ + +function createApplication() { + var app = function(req, res, next) { + app.handle(req, res, next); + }; + + mixin(app, EventEmitter.prototype, false); + mixin(app, proto, false); + + // expose the prototype that will get set on requests + app.request = Object.create(req, { + app: { configurable: true, enumerable: true, writable: true, value: app } + }) + + // expose the prototype that will get set on responses + app.response = Object.create(res, { + app: { configurable: true, enumerable: true, writable: true, value: app } + }) + + app.init(); + return app; +} + +/** + * Expose the prototypes. + */ + +exports.application = proto; +exports.request = req; +exports.response = res; + +/** + * Expose constructors. + */ + +exports.Route = Route; +exports.Router = Router; + +/** + * Expose middleware + */ + +exports.json = bodyParser.json +exports.query = require('./middleware/query'); +exports.raw = bodyParser.raw +exports.static = require('serve-static'); +exports.text = bodyParser.text +exports.urlencoded = bodyParser.urlencoded + +/** + * Replace removed middleware with an appropriate error message. + */ + +var removedMiddlewares = [ + 'bodyParser', + 'compress', + 'cookieSession', + 'session', + 'logger', + 'cookieParser', + 'favicon', + 'responseTime', + 'errorHandler', + 'timeout', + 'methodOverride', + 'vhost', + 'csrf', + 'directory', + 'limit', + 'multipart', + 'staticCache' +] + +removedMiddlewares.forEach(function (name) { + Object.defineProperty(exports, name, { + get: function () { + throw new Error('Most middleware (like ' + name + ') is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware.'); + }, + configurable: true + }); +}); diff --git a/node_modules/express/lib/middleware/init.js b/node_modules/express/lib/middleware/init.js new file mode 100644 index 0000000..dfd0427 --- /dev/null +++ b/node_modules/express/lib/middleware/init.js @@ -0,0 +1,43 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @private + */ + +var setPrototypeOf = require('setprototypeof') + +/** + * Initialization middleware, exposing the + * request and response to each other, as well + * as defaulting the X-Powered-By header field. + * + * @param {Function} app + * @return {Function} + * @api private + */ + +exports.init = function(app){ + return function expressInit(req, res, next){ + if (app.enabled('x-powered-by')) res.setHeader('X-Powered-By', 'Express'); + req.res = res; + res.req = req; + req.next = next; + + setPrototypeOf(req, app.request) + setPrototypeOf(res, app.response) + + res.locals = res.locals || Object.create(null); + + next(); + }; +}; + diff --git a/node_modules/express/lib/middleware/query.js b/node_modules/express/lib/middleware/query.js new file mode 100644 index 0000000..7e91669 --- /dev/null +++ b/node_modules/express/lib/middleware/query.js @@ -0,0 +1,47 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + */ + +var merge = require('utils-merge') +var parseUrl = require('parseurl'); +var qs = require('qs'); + +/** + * @param {Object} options + * @return {Function} + * @api public + */ + +module.exports = function query(options) { + var opts = merge({}, options) + var queryparse = qs.parse; + + if (typeof options === 'function') { + queryparse = options; + opts = undefined; + } + + if (opts !== undefined && opts.allowPrototypes === undefined) { + // back-compat for qs module + opts.allowPrototypes = true; + } + + return function query(req, res, next){ + if (!req.query) { + var val = parseUrl(req).query; + req.query = queryparse(val, opts); + } + + next(); + }; +}; diff --git a/node_modules/express/lib/request.js b/node_modules/express/lib/request.js new file mode 100644 index 0000000..3f1eeca --- /dev/null +++ b/node_modules/express/lib/request.js @@ -0,0 +1,525 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @private + */ + +var accepts = require('accepts'); +var deprecate = require('depd')('express'); +var isIP = require('net').isIP; +var typeis = require('type-is'); +var http = require('http'); +var fresh = require('fresh'); +var parseRange = require('range-parser'); +var parse = require('parseurl'); +var proxyaddr = require('proxy-addr'); + +/** + * Request prototype. + * @public + */ + +var req = Object.create(http.IncomingMessage.prototype) + +/** + * Module exports. + * @public + */ + +module.exports = req + +/** + * Return request header. + * + * The `Referrer` header field is special-cased, + * both `Referrer` and `Referer` are interchangeable. + * + * Examples: + * + * req.get('Content-Type'); + * // => "text/plain" + * + * req.get('content-type'); + * // => "text/plain" + * + * req.get('Something'); + * // => undefined + * + * Aliased as `req.header()`. + * + * @param {String} name + * @return {String} + * @public + */ + +req.get = +req.header = function header(name) { + if (!name) { + throw new TypeError('name argument is required to req.get'); + } + + if (typeof name !== 'string') { + throw new TypeError('name must be a string to req.get'); + } + + var lc = name.toLowerCase(); + + switch (lc) { + case 'referer': + case 'referrer': + return this.headers.referrer + || this.headers.referer; + default: + return this.headers[lc]; + } +}; + +/** + * To do: update docs. + * + * Check if the given `type(s)` is acceptable, returning + * the best match when true, otherwise `undefined`, in which + * case you should respond with 406 "Not Acceptable". + * + * The `type` value may be a single MIME type string + * such as "application/json", an extension name + * such as "json", a comma-delimited list such as "json, html, text/plain", + * an argument list such as `"json", "html", "text/plain"`, + * or an array `["json", "html", "text/plain"]`. When a list + * or array is given, the _best_ match, if any is returned. + * + * Examples: + * + * // Accept: text/html + * req.accepts('html'); + * // => "html" + * + * // Accept: text/*, application/json + * req.accepts('html'); + * // => "html" + * req.accepts('text/html'); + * // => "text/html" + * req.accepts('json, text'); + * // => "json" + * req.accepts('application/json'); + * // => "application/json" + * + * // Accept: text/*, application/json + * req.accepts('image/png'); + * req.accepts('png'); + * // => undefined + * + * // Accept: text/*;q=.5, application/json + * req.accepts(['html', 'json']); + * req.accepts('html', 'json'); + * req.accepts('html, json'); + * // => "json" + * + * @param {String|Array} type(s) + * @return {String|Array|Boolean} + * @public + */ + +req.accepts = function(){ + var accept = accepts(this); + return accept.types.apply(accept, arguments); +}; + +/** + * Check if the given `encoding`s are accepted. + * + * @param {String} ...encoding + * @return {String|Array} + * @public + */ + +req.acceptsEncodings = function(){ + var accept = accepts(this); + return accept.encodings.apply(accept, arguments); +}; + +req.acceptsEncoding = deprecate.function(req.acceptsEncodings, + 'req.acceptsEncoding: Use acceptsEncodings instead'); + +/** + * Check if the given `charset`s are acceptable, + * otherwise you should respond with 406 "Not Acceptable". + * + * @param {String} ...charset + * @return {String|Array} + * @public + */ + +req.acceptsCharsets = function(){ + var accept = accepts(this); + return accept.charsets.apply(accept, arguments); +}; + +req.acceptsCharset = deprecate.function(req.acceptsCharsets, + 'req.acceptsCharset: Use acceptsCharsets instead'); + +/** + * Check if the given `lang`s are acceptable, + * otherwise you should respond with 406 "Not Acceptable". + * + * @param {String} ...lang + * @return {String|Array} + * @public + */ + +req.acceptsLanguages = function(){ + var accept = accepts(this); + return accept.languages.apply(accept, arguments); +}; + +req.acceptsLanguage = deprecate.function(req.acceptsLanguages, + 'req.acceptsLanguage: Use acceptsLanguages instead'); + +/** + * Parse Range header field, capping to the given `size`. + * + * Unspecified ranges such as "0-" require knowledge of your resource length. In + * the case of a byte range this is of course the total number of bytes. If the + * Range header field is not given `undefined` is returned, `-1` when unsatisfiable, + * and `-2` when syntactically invalid. + * + * When ranges are returned, the array has a "type" property which is the type of + * range that is required (most commonly, "bytes"). Each array element is an object + * with a "start" and "end" property for the portion of the range. + * + * The "combine" option can be set to `true` and overlapping & adjacent ranges + * will be combined into a single range. + * + * NOTE: remember that ranges are inclusive, so for example "Range: users=0-3" + * should respond with 4 users when available, not 3. + * + * @param {number} size + * @param {object} [options] + * @param {boolean} [options.combine=false] + * @return {number|array} + * @public + */ + +req.range = function range(size, options) { + var range = this.get('Range'); + if (!range) return; + return parseRange(size, range, options); +}; + +/** + * Return the value of param `name` when present or `defaultValue`. + * + * - Checks route placeholders, ex: _/user/:id_ + * - Checks body params, ex: id=12, {"id":12} + * - Checks query string params, ex: ?id=12 + * + * To utilize request bodies, `req.body` + * should be an object. This can be done by using + * the `bodyParser()` middleware. + * + * @param {String} name + * @param {Mixed} [defaultValue] + * @return {String} + * @public + */ + +req.param = function param(name, defaultValue) { + var params = this.params || {}; + var body = this.body || {}; + var query = this.query || {}; + + var args = arguments.length === 1 + ? 'name' + : 'name, default'; + deprecate('req.param(' + args + '): Use req.params, req.body, or req.query instead'); + + if (null != params[name] && params.hasOwnProperty(name)) return params[name]; + if (null != body[name]) return body[name]; + if (null != query[name]) return query[name]; + + return defaultValue; +}; + +/** + * Check if the incoming request contains the "Content-Type" + * header field, and it contains the given mime `type`. + * + * Examples: + * + * // With Content-Type: text/html; charset=utf-8 + * req.is('html'); + * req.is('text/html'); + * req.is('text/*'); + * // => true + * + * // When Content-Type is application/json + * req.is('json'); + * req.is('application/json'); + * req.is('application/*'); + * // => true + * + * req.is('html'); + * // => false + * + * @param {String|Array} types... + * @return {String|false|null} + * @public + */ + +req.is = function is(types) { + var arr = types; + + // support flattened arguments + if (!Array.isArray(types)) { + arr = new Array(arguments.length); + for (var i = 0; i < arr.length; i++) { + arr[i] = arguments[i]; + } + } + + return typeis(this, arr); +}; + +/** + * Return the protocol string "http" or "https" + * when requested with TLS. When the "trust proxy" + * setting trusts the socket address, the + * "X-Forwarded-Proto" header field will be trusted + * and used if present. + * + * If you're running behind a reverse proxy that + * supplies https for you this may be enabled. + * + * @return {String} + * @public + */ + +defineGetter(req, 'protocol', function protocol(){ + var proto = this.connection.encrypted + ? 'https' + : 'http'; + var trust = this.app.get('trust proxy fn'); + + if (!trust(this.connection.remoteAddress, 0)) { + return proto; + } + + // Note: X-Forwarded-Proto is normally only ever a + // single value, but this is to be safe. + var header = this.get('X-Forwarded-Proto') || proto + var index = header.indexOf(',') + + return index !== -1 + ? header.substring(0, index).trim() + : header.trim() +}); + +/** + * Short-hand for: + * + * req.protocol === 'https' + * + * @return {Boolean} + * @public + */ + +defineGetter(req, 'secure', function secure(){ + return this.protocol === 'https'; +}); + +/** + * Return the remote address from the trusted proxy. + * + * The is the remote address on the socket unless + * "trust proxy" is set. + * + * @return {String} + * @public + */ + +defineGetter(req, 'ip', function ip(){ + var trust = this.app.get('trust proxy fn'); + return proxyaddr(this, trust); +}); + +/** + * When "trust proxy" is set, trusted proxy addresses + client. + * + * For example if the value were "client, proxy1, proxy2" + * you would receive the array `["client", "proxy1", "proxy2"]` + * where "proxy2" is the furthest down-stream and "proxy1" and + * "proxy2" were trusted. + * + * @return {Array} + * @public + */ + +defineGetter(req, 'ips', function ips() { + var trust = this.app.get('trust proxy fn'); + var addrs = proxyaddr.all(this, trust); + + // reverse the order (to farthest -> closest) + // and remove socket address + addrs.reverse().pop() + + return addrs +}); + +/** + * Return subdomains as an array. + * + * Subdomains are the dot-separated parts of the host before the main domain of + * the app. By default, the domain of the app is assumed to be the last two + * parts of the host. This can be changed by setting "subdomain offset". + * + * For example, if the domain is "tobi.ferrets.example.com": + * If "subdomain offset" is not set, req.subdomains is `["ferrets", "tobi"]`. + * If "subdomain offset" is 3, req.subdomains is `["tobi"]`. + * + * @return {Array} + * @public + */ + +defineGetter(req, 'subdomains', function subdomains() { + var hostname = this.hostname; + + if (!hostname) return []; + + var offset = this.app.get('subdomain offset'); + var subdomains = !isIP(hostname) + ? hostname.split('.').reverse() + : [hostname]; + + return subdomains.slice(offset); +}); + +/** + * Short-hand for `url.parse(req.url).pathname`. + * + * @return {String} + * @public + */ + +defineGetter(req, 'path', function path() { + return parse(this).pathname; +}); + +/** + * Parse the "Host" header field to a hostname. + * + * When the "trust proxy" setting trusts the socket + * address, the "X-Forwarded-Host" header field will + * be trusted. + * + * @return {String} + * @public + */ + +defineGetter(req, 'hostname', function hostname(){ + var trust = this.app.get('trust proxy fn'); + var host = this.get('X-Forwarded-Host'); + + if (!host || !trust(this.connection.remoteAddress, 0)) { + host = this.get('Host'); + } else if (host.indexOf(',') !== -1) { + // Note: X-Forwarded-Host is normally only ever a + // single value, but this is to be safe. + host = host.substring(0, host.indexOf(',')).trimRight() + } + + if (!host) return; + + // IPv6 literal support + var offset = host[0] === '[' + ? host.indexOf(']') + 1 + : 0; + var index = host.indexOf(':', offset); + + return index !== -1 + ? host.substring(0, index) + : host; +}); + +// TODO: change req.host to return host in next major + +defineGetter(req, 'host', deprecate.function(function host(){ + return this.hostname; +}, 'req.host: Use req.hostname instead')); + +/** + * Check if the request is fresh, aka + * Last-Modified and/or the ETag + * still match. + * + * @return {Boolean} + * @public + */ + +defineGetter(req, 'fresh', function(){ + var method = this.method; + var res = this.res + var status = res.statusCode + + // GET or HEAD for weak freshness validation only + if ('GET' !== method && 'HEAD' !== method) return false; + + // 2xx or 304 as per rfc2616 14.26 + if ((status >= 200 && status < 300) || 304 === status) { + return fresh(this.headers, { + 'etag': res.get('ETag'), + 'last-modified': res.get('Last-Modified') + }) + } + + return false; +}); + +/** + * Check if the request is stale, aka + * "Last-Modified" and / or the "ETag" for the + * resource has changed. + * + * @return {Boolean} + * @public + */ + +defineGetter(req, 'stale', function stale(){ + return !this.fresh; +}); + +/** + * Check if the request was an _XMLHttpRequest_. + * + * @return {Boolean} + * @public + */ + +defineGetter(req, 'xhr', function xhr(){ + var val = this.get('X-Requested-With') || ''; + return val.toLowerCase() === 'xmlhttprequest'; +}); + +/** + * Helper function for creating a getter on an object. + * + * @param {Object} obj + * @param {String} name + * @param {Function} getter + * @private + */ +function defineGetter(obj, name, getter) { + Object.defineProperty(obj, name, { + configurable: true, + enumerable: true, + get: getter + }); +} diff --git a/node_modules/express/lib/response.js b/node_modules/express/lib/response.js new file mode 100644 index 0000000..2b654f4 --- /dev/null +++ b/node_modules/express/lib/response.js @@ -0,0 +1,1179 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @private + */ + +var Buffer = require('safe-buffer').Buffer +var contentDisposition = require('content-disposition'); +var createError = require('http-errors') +var deprecate = require('depd')('express'); +var encodeUrl = require('encodeurl'); +var escapeHtml = require('escape-html'); +var http = require('http'); +var isAbsolute = require('./utils').isAbsolute; +var onFinished = require('on-finished'); +var path = require('path'); +var statuses = require('statuses') +var merge = require('utils-merge'); +var sign = require('cookie-signature').sign; +var normalizeType = require('./utils').normalizeType; +var normalizeTypes = require('./utils').normalizeTypes; +var setCharset = require('./utils').setCharset; +var cookie = require('cookie'); +var send = require('send'); +var extname = path.extname; +var mime = send.mime; +var resolve = path.resolve; +var vary = require('vary'); + +/** + * Response prototype. + * @public + */ + +var res = Object.create(http.ServerResponse.prototype) + +/** + * Module exports. + * @public + */ + +module.exports = res + +/** + * Module variables. + * @private + */ + +var charsetRegExp = /;\s*charset\s*=/; + +/** + * Set status `code`. + * + * @param {Number} code + * @return {ServerResponse} + * @public + */ + +res.status = function status(code) { + if ((typeof code === 'string' || Math.floor(code) !== code) && code > 99 && code < 1000) { + deprecate('res.status(' + JSON.stringify(code) + '): use res.status(' + Math.floor(code) + ') instead') + } + this.statusCode = code; + return this; +}; + +/** + * Set Link header field with the given `links`. + * + * Examples: + * + * res.links({ + * next: 'http://api.example.com/users?page=2', + * last: 'http://api.example.com/users?page=5' + * }); + * + * @param {Object} links + * @return {ServerResponse} + * @public + */ + +res.links = function(links){ + var link = this.get('Link') || ''; + if (link) link += ', '; + return this.set('Link', link + Object.keys(links).map(function(rel){ + return '<' + links[rel] + '>; rel="' + rel + '"'; + }).join(', ')); +}; + +/** + * Send a response. + * + * Examples: + * + * res.send(Buffer.from('wahoo')); + * res.send({ some: 'json' }); + * res.send('

some html

'); + * + * @param {string|number|boolean|object|Buffer} body + * @public + */ + +res.send = function send(body) { + var chunk = body; + var encoding; + var req = this.req; + var type; + + // settings + var app = this.app; + + // allow status / body + if (arguments.length === 2) { + // res.send(body, status) backwards compat + if (typeof arguments[0] !== 'number' && typeof arguments[1] === 'number') { + deprecate('res.send(body, status): Use res.status(status).send(body) instead'); + this.statusCode = arguments[1]; + } else { + deprecate('res.send(status, body): Use res.status(status).send(body) instead'); + this.statusCode = arguments[0]; + chunk = arguments[1]; + } + } + + // disambiguate res.send(status) and res.send(status, num) + if (typeof chunk === 'number' && arguments.length === 1) { + // res.send(status) will set status message as text string + if (!this.get('Content-Type')) { + this.type('txt'); + } + + deprecate('res.send(status): Use res.sendStatus(status) instead'); + this.statusCode = chunk; + chunk = statuses.message[chunk] + } + + switch (typeof chunk) { + // string defaulting to html + case 'string': + if (!this.get('Content-Type')) { + this.type('html'); + } + break; + case 'boolean': + case 'number': + case 'object': + if (chunk === null) { + chunk = ''; + } else if (Buffer.isBuffer(chunk)) { + if (!this.get('Content-Type')) { + this.type('bin'); + } + } else { + return this.json(chunk); + } + break; + } + + // write strings in utf-8 + if (typeof chunk === 'string') { + encoding = 'utf8'; + type = this.get('Content-Type'); + + // reflect this in content-type + if (typeof type === 'string') { + this.set('Content-Type', setCharset(type, 'utf-8')); + } + } + + // determine if ETag should be generated + var etagFn = app.get('etag fn') + var generateETag = !this.get('ETag') && typeof etagFn === 'function' + + // populate Content-Length + var len + if (chunk !== undefined) { + if (Buffer.isBuffer(chunk)) { + // get length of Buffer + len = chunk.length + } else if (!generateETag && chunk.length < 1000) { + // just calculate length when no ETag + small chunk + len = Buffer.byteLength(chunk, encoding) + } else { + // convert chunk to Buffer and calculate + chunk = Buffer.from(chunk, encoding) + encoding = undefined; + len = chunk.length + } + + this.set('Content-Length', len); + } + + // populate ETag + var etag; + if (generateETag && len !== undefined) { + if ((etag = etagFn(chunk, encoding))) { + this.set('ETag', etag); + } + } + + // freshness + if (req.fresh) this.statusCode = 304; + + // strip irrelevant headers + if (204 === this.statusCode || 304 === this.statusCode) { + this.removeHeader('Content-Type'); + this.removeHeader('Content-Length'); + this.removeHeader('Transfer-Encoding'); + chunk = ''; + } + + // alter headers for 205 + if (this.statusCode === 205) { + this.set('Content-Length', '0') + this.removeHeader('Transfer-Encoding') + chunk = '' + } + + if (req.method === 'HEAD') { + // skip body for HEAD + this.end(); + } else { + // respond + this.end(chunk, encoding); + } + + return this; +}; + +/** + * Send JSON response. + * + * Examples: + * + * res.json(null); + * res.json({ user: 'tj' }); + * + * @param {string|number|boolean|object} obj + * @public + */ + +res.json = function json(obj) { + var val = obj; + + // allow status / body + if (arguments.length === 2) { + // res.json(body, status) backwards compat + if (typeof arguments[1] === 'number') { + deprecate('res.json(obj, status): Use res.status(status).json(obj) instead'); + this.statusCode = arguments[1]; + } else { + deprecate('res.json(status, obj): Use res.status(status).json(obj) instead'); + this.statusCode = arguments[0]; + val = arguments[1]; + } + } + + // settings + var app = this.app; + var escape = app.get('json escape') + var replacer = app.get('json replacer'); + var spaces = app.get('json spaces'); + var body = stringify(val, replacer, spaces, escape) + + // content-type + if (!this.get('Content-Type')) { + this.set('Content-Type', 'application/json'); + } + + return this.send(body); +}; + +/** + * Send JSON response with JSONP callback support. + * + * Examples: + * + * res.jsonp(null); + * res.jsonp({ user: 'tj' }); + * + * @param {string|number|boolean|object} obj + * @public + */ + +res.jsonp = function jsonp(obj) { + var val = obj; + + // allow status / body + if (arguments.length === 2) { + // res.jsonp(body, status) backwards compat + if (typeof arguments[1] === 'number') { + deprecate('res.jsonp(obj, status): Use res.status(status).jsonp(obj) instead'); + this.statusCode = arguments[1]; + } else { + deprecate('res.jsonp(status, obj): Use res.status(status).jsonp(obj) instead'); + this.statusCode = arguments[0]; + val = arguments[1]; + } + } + + // settings + var app = this.app; + var escape = app.get('json escape') + var replacer = app.get('json replacer'); + var spaces = app.get('json spaces'); + var body = stringify(val, replacer, spaces, escape) + var callback = this.req.query[app.get('jsonp callback name')]; + + // content-type + if (!this.get('Content-Type')) { + this.set('X-Content-Type-Options', 'nosniff'); + this.set('Content-Type', 'application/json'); + } + + // fixup callback + if (Array.isArray(callback)) { + callback = callback[0]; + } + + // jsonp + if (typeof callback === 'string' && callback.length !== 0) { + this.set('X-Content-Type-Options', 'nosniff'); + this.set('Content-Type', 'text/javascript'); + + // restrict callback charset + callback = callback.replace(/[^\[\]\w$.]/g, ''); + + if (body === undefined) { + // empty argument + body = '' + } else if (typeof body === 'string') { + // replace chars not allowed in JavaScript that are in JSON + body = body + .replace(/\u2028/g, '\\u2028') + .replace(/\u2029/g, '\\u2029') + } + + // the /**/ is a specific security mitigation for "Rosetta Flash JSONP abuse" + // the typeof check is just to reduce client error noise + body = '/**/ typeof ' + callback + ' === \'function\' && ' + callback + '(' + body + ');'; + } + + return this.send(body); +}; + +/** + * Send given HTTP status code. + * + * Sets the response status to `statusCode` and the body of the + * response to the standard description from node's http.STATUS_CODES + * or the statusCode number if no description. + * + * Examples: + * + * res.sendStatus(200); + * + * @param {number} statusCode + * @public + */ + +res.sendStatus = function sendStatus(statusCode) { + var body = statuses.message[statusCode] || String(statusCode) + + this.statusCode = statusCode; + this.type('txt'); + + return this.send(body); +}; + +/** + * Transfer the file at the given `path`. + * + * Automatically sets the _Content-Type_ response header field. + * The callback `callback(err)` is invoked when the transfer is complete + * or when an error occurs. Be sure to check `res.headersSent` + * if you wish to attempt responding, as the header and some data + * may have already been transferred. + * + * Options: + * + * - `maxAge` defaulting to 0 (can be string converted by `ms`) + * - `root` root directory for relative filenames + * - `headers` object of headers to serve with file + * - `dotfiles` serve dotfiles, defaulting to false; can be `"allow"` to send them + * + * Other options are passed along to `send`. + * + * Examples: + * + * The following example illustrates how `res.sendFile()` may + * be used as an alternative for the `static()` middleware for + * dynamic situations. The code backing `res.sendFile()` is actually + * the same code, so HTTP cache support etc is identical. + * + * app.get('/user/:uid/photos/:file', function(req, res){ + * var uid = req.params.uid + * , file = req.params.file; + * + * req.user.mayViewFilesFrom(uid, function(yes){ + * if (yes) { + * res.sendFile('/uploads/' + uid + '/' + file); + * } else { + * res.send(403, 'Sorry! you cant see that.'); + * } + * }); + * }); + * + * @public + */ + +res.sendFile = function sendFile(path, options, callback) { + var done = callback; + var req = this.req; + var res = this; + var next = req.next; + var opts = options || {}; + + if (!path) { + throw new TypeError('path argument is required to res.sendFile'); + } + + if (typeof path !== 'string') { + throw new TypeError('path must be a string to res.sendFile') + } + + // support function as second arg + if (typeof options === 'function') { + done = options; + opts = {}; + } + + if (!opts.root && !isAbsolute(path)) { + throw new TypeError('path must be absolute or specify root to res.sendFile'); + } + + // create file stream + var pathname = encodeURI(path); + var file = send(req, pathname, opts); + + // transfer + sendfile(res, file, opts, function (err) { + if (done) return done(err); + if (err && err.code === 'EISDIR') return next(); + + // next() all but write errors + if (err && err.code !== 'ECONNABORTED' && err.syscall !== 'write') { + next(err); + } + }); +}; + +/** + * Transfer the file at the given `path`. + * + * Automatically sets the _Content-Type_ response header field. + * The callback `callback(err)` is invoked when the transfer is complete + * or when an error occurs. Be sure to check `res.headersSent` + * if you wish to attempt responding, as the header and some data + * may have already been transferred. + * + * Options: + * + * - `maxAge` defaulting to 0 (can be string converted by `ms`) + * - `root` root directory for relative filenames + * - `headers` object of headers to serve with file + * - `dotfiles` serve dotfiles, defaulting to false; can be `"allow"` to send them + * + * Other options are passed along to `send`. + * + * Examples: + * + * The following example illustrates how `res.sendfile()` may + * be used as an alternative for the `static()` middleware for + * dynamic situations. The code backing `res.sendfile()` is actually + * the same code, so HTTP cache support etc is identical. + * + * app.get('/user/:uid/photos/:file', function(req, res){ + * var uid = req.params.uid + * , file = req.params.file; + * + * req.user.mayViewFilesFrom(uid, function(yes){ + * if (yes) { + * res.sendfile('/uploads/' + uid + '/' + file); + * } else { + * res.send(403, 'Sorry! you cant see that.'); + * } + * }); + * }); + * + * @public + */ + +res.sendfile = function (path, options, callback) { + var done = callback; + var req = this.req; + var res = this; + var next = req.next; + var opts = options || {}; + + // support function as second arg + if (typeof options === 'function') { + done = options; + opts = {}; + } + + // create file stream + var file = send(req, path, opts); + + // transfer + sendfile(res, file, opts, function (err) { + if (done) return done(err); + if (err && err.code === 'EISDIR') return next(); + + // next() all but write errors + if (err && err.code !== 'ECONNABORTED' && err.syscall !== 'write') { + next(err); + } + }); +}; + +res.sendfile = deprecate.function(res.sendfile, + 'res.sendfile: Use res.sendFile instead'); + +/** + * Transfer the file at the given `path` as an attachment. + * + * Optionally providing an alternate attachment `filename`, + * and optional callback `callback(err)`. The callback is invoked + * when the data transfer is complete, or when an error has + * occurred. Be sure to check `res.headersSent` if you plan to respond. + * + * Optionally providing an `options` object to use with `res.sendFile()`. + * This function will set the `Content-Disposition` header, overriding + * any `Content-Disposition` header passed as header options in order + * to set the attachment and filename. + * + * This method uses `res.sendFile()`. + * + * @public + */ + +res.download = function download (path, filename, options, callback) { + var done = callback; + var name = filename; + var opts = options || null + + // support function as second or third arg + if (typeof filename === 'function') { + done = filename; + name = null; + opts = null + } else if (typeof options === 'function') { + done = options + opts = null + } + + // support optional filename, where options may be in it's place + if (typeof filename === 'object' && + (typeof options === 'function' || options === undefined)) { + name = null + opts = filename + } + + // set Content-Disposition when file is sent + var headers = { + 'Content-Disposition': contentDisposition(name || path) + }; + + // merge user-provided headers + if (opts && opts.headers) { + var keys = Object.keys(opts.headers) + for (var i = 0; i < keys.length; i++) { + var key = keys[i] + if (key.toLowerCase() !== 'content-disposition') { + headers[key] = opts.headers[key] + } + } + } + + // merge user-provided options + opts = Object.create(opts) + opts.headers = headers + + // Resolve the full path for sendFile + var fullPath = !opts.root + ? resolve(path) + : path + + // send file + return this.sendFile(fullPath, opts, done) +}; + +/** + * Set _Content-Type_ response header with `type` through `mime.lookup()` + * when it does not contain "/", or set the Content-Type to `type` otherwise. + * + * Examples: + * + * res.type('.html'); + * res.type('html'); + * res.type('json'); + * res.type('application/json'); + * res.type('png'); + * + * @param {String} type + * @return {ServerResponse} for chaining + * @public + */ + +res.contentType = +res.type = function contentType(type) { + var ct = type.indexOf('/') === -1 + ? mime.lookup(type) + : type; + + return this.set('Content-Type', ct); +}; + +/** + * Respond to the Acceptable formats using an `obj` + * of mime-type callbacks. + * + * This method uses `req.accepted`, an array of + * acceptable types ordered by their quality values. + * When "Accept" is not present the _first_ callback + * is invoked, otherwise the first match is used. When + * no match is performed the server responds with + * 406 "Not Acceptable". + * + * Content-Type is set for you, however if you choose + * you may alter this within the callback using `res.type()` + * or `res.set('Content-Type', ...)`. + * + * res.format({ + * 'text/plain': function(){ + * res.send('hey'); + * }, + * + * 'text/html': function(){ + * res.send('

hey

'); + * }, + * + * 'application/json': function () { + * res.send({ message: 'hey' }); + * } + * }); + * + * In addition to canonicalized MIME types you may + * also use extnames mapped to these types: + * + * res.format({ + * text: function(){ + * res.send('hey'); + * }, + * + * html: function(){ + * res.send('

hey

'); + * }, + * + * json: function(){ + * res.send({ message: 'hey' }); + * } + * }); + * + * By default Express passes an `Error` + * with a `.status` of 406 to `next(err)` + * if a match is not made. If you provide + * a `.default` callback it will be invoked + * instead. + * + * @param {Object} obj + * @return {ServerResponse} for chaining + * @public + */ + +res.format = function(obj){ + var req = this.req; + var next = req.next; + + var keys = Object.keys(obj) + .filter(function (v) { return v !== 'default' }) + + var key = keys.length > 0 + ? req.accepts(keys) + : false; + + this.vary("Accept"); + + if (key) { + this.set('Content-Type', normalizeType(key).value); + obj[key](req, this, next); + } else if (obj.default) { + obj.default(req, this, next) + } else { + next(createError(406, { + types: normalizeTypes(keys).map(function (o) { return o.value }) + })) + } + + return this; +}; + +/** + * Set _Content-Disposition_ header to _attachment_ with optional `filename`. + * + * @param {String} filename + * @return {ServerResponse} + * @public + */ + +res.attachment = function attachment(filename) { + if (filename) { + this.type(extname(filename)); + } + + this.set('Content-Disposition', contentDisposition(filename)); + + return this; +}; + +/** + * Append additional header `field` with value `val`. + * + * Example: + * + * res.append('Link', ['', '']); + * res.append('Set-Cookie', 'foo=bar; Path=/; HttpOnly'); + * res.append('Warning', '199 Miscellaneous warning'); + * + * @param {String} field + * @param {String|Array} val + * @return {ServerResponse} for chaining + * @public + */ + +res.append = function append(field, val) { + var prev = this.get(field); + var value = val; + + if (prev) { + // concat the new and prev vals + value = Array.isArray(prev) ? prev.concat(val) + : Array.isArray(val) ? [prev].concat(val) + : [prev, val] + } + + return this.set(field, value); +}; + +/** + * Set header `field` to `val`, or pass + * an object of header fields. + * + * Examples: + * + * res.set('Foo', ['bar', 'baz']); + * res.set('Accept', 'application/json'); + * res.set({ Accept: 'text/plain', 'X-API-Key': 'tobi' }); + * + * Aliased as `res.header()`. + * + * @param {String|Object} field + * @param {String|Array} val + * @return {ServerResponse} for chaining + * @public + */ + +res.set = +res.header = function header(field, val) { + if (arguments.length === 2) { + var value = Array.isArray(val) + ? val.map(String) + : String(val); + + // add charset to content-type + if (field.toLowerCase() === 'content-type') { + if (Array.isArray(value)) { + throw new TypeError('Content-Type cannot be set to an Array'); + } + if (!charsetRegExp.test(value)) { + var charset = mime.charsets.lookup(value.split(';')[0]); + if (charset) value += '; charset=' + charset.toLowerCase(); + } + } + + this.setHeader(field, value); + } else { + for (var key in field) { + this.set(key, field[key]); + } + } + return this; +}; + +/** + * Get value for header `field`. + * + * @param {String} field + * @return {String} + * @public + */ + +res.get = function(field){ + return this.getHeader(field); +}; + +/** + * Clear cookie `name`. + * + * @param {String} name + * @param {Object} [options] + * @return {ServerResponse} for chaining + * @public + */ + +res.clearCookie = function clearCookie(name, options) { + if (options) { + if (options.maxAge) { + deprecate('res.clearCookie: Passing "options.maxAge" is deprecated. In v5.0.0 of Express, this option will be ignored, as res.clearCookie will automatically set cookies to expire immediately. Please update your code to omit this option.'); + } + if (options.expires) { + deprecate('res.clearCookie: Passing "options.expires" is deprecated. In v5.0.0 of Express, this option will be ignored, as res.clearCookie will automatically set cookies to expire immediately. Please update your code to omit this option.'); + } + } + var opts = merge({ expires: new Date(1), path: '/' }, options); + + return this.cookie(name, '', opts); +}; + +/** + * Set cookie `name` to `value`, with the given `options`. + * + * Options: + * + * - `maxAge` max-age in milliseconds, converted to `expires` + * - `signed` sign the cookie + * - `path` defaults to "/" + * + * Examples: + * + * // "Remember Me" for 15 minutes + * res.cookie('rememberme', '1', { expires: new Date(Date.now() + 900000), httpOnly: true }); + * + * // same as above + * res.cookie('rememberme', '1', { maxAge: 900000, httpOnly: true }) + * + * @param {String} name + * @param {String|Object} value + * @param {Object} [options] + * @return {ServerResponse} for chaining + * @public + */ + +res.cookie = function (name, value, options) { + var opts = merge({}, options); + var secret = this.req.secret; + var signed = opts.signed; + + if (signed && !secret) { + throw new Error('cookieParser("secret") required for signed cookies'); + } + + var val = typeof value === 'object' + ? 'j:' + JSON.stringify(value) + : String(value); + + if (signed) { + val = 's:' + sign(val, secret); + } + + if (opts.maxAge != null) { + var maxAge = opts.maxAge - 0 + + if (!isNaN(maxAge)) { + opts.expires = new Date(Date.now() + maxAge) + opts.maxAge = Math.floor(maxAge / 1000) + } + } + + if (opts.path == null) { + opts.path = '/'; + } + + this.append('Set-Cookie', cookie.serialize(name, String(val), opts)); + + return this; +}; + +/** + * Set the location header to `url`. + * + * The given `url` can also be "back", which redirects + * to the _Referrer_ or _Referer_ headers or "/". + * + * Examples: + * + * res.location('/foo/bar').; + * res.location('http://example.com'); + * res.location('../login'); + * + * @param {String} url + * @return {ServerResponse} for chaining + * @public + */ + +res.location = function location(url) { + var loc; + + // "back" is an alias for the referrer + if (url === 'back') { + deprecate('res.location("back"): use res.location(req.get("Referrer") || "/") and refer to https://dub.sh/security-redirect for best practices'); + loc = this.req.get('Referrer') || '/'; + } else { + loc = String(url); + } + + return this.set('Location', encodeUrl(loc)); +}; + +/** + * Redirect to the given `url` with optional response `status` + * defaulting to 302. + * + * The resulting `url` is determined by `res.location()`, so + * it will play nicely with mounted apps, relative paths, + * `"back"` etc. + * + * Examples: + * + * res.redirect('/foo/bar'); + * res.redirect('http://example.com'); + * res.redirect(301, 'http://example.com'); + * res.redirect('../login'); // /blog/post/1 -> /blog/login + * + * @public + */ + +res.redirect = function redirect(url) { + var address = url; + var body; + var status = 302; + + // allow status / url + if (arguments.length === 2) { + if (typeof arguments[0] === 'number') { + status = arguments[0]; + address = arguments[1]; + } else { + deprecate('res.redirect(url, status): Use res.redirect(status, url) instead'); + status = arguments[1]; + } + } + + // Set location header + address = this.location(address).get('Location'); + + // Support text/{plain,html} by default + this.format({ + text: function(){ + body = statuses.message[status] + '. Redirecting to ' + address + }, + + html: function(){ + var u = escapeHtml(address); + body = '

' + statuses.message[status] + '. Redirecting to ' + u + '

' + }, + + default: function(){ + body = ''; + } + }); + + // Respond + this.statusCode = status; + this.set('Content-Length', Buffer.byteLength(body)); + + if (this.req.method === 'HEAD') { + this.end(); + } else { + this.end(body); + } +}; + +/** + * Add `field` to Vary. If already present in the Vary set, then + * this call is simply ignored. + * + * @param {Array|String} field + * @return {ServerResponse} for chaining + * @public + */ + +res.vary = function(field){ + // checks for back-compat + if (!field || (Array.isArray(field) && !field.length)) { + deprecate('res.vary(): Provide a field name'); + return this; + } + + vary(this, field); + + return this; +}; + +/** + * Render `view` with the given `options` and optional callback `fn`. + * When a callback function is given a response will _not_ be made + * automatically, otherwise a response of _200_ and _text/html_ is given. + * + * Options: + * + * - `cache` boolean hinting to the engine it should cache + * - `filename` filename of the view being rendered + * + * @public + */ + +res.render = function render(view, options, callback) { + var app = this.req.app; + var done = callback; + var opts = options || {}; + var req = this.req; + var self = this; + + // support callback function as second arg + if (typeof options === 'function') { + done = options; + opts = {}; + } + + // merge res.locals + opts._locals = self.locals; + + // default callback to respond + done = done || function (err, str) { + if (err) return req.next(err); + self.send(str); + }; + + // render + app.render(view, opts, done); +}; + +// pipe the send file stream +function sendfile(res, file, options, callback) { + var done = false; + var streaming; + + // request aborted + function onaborted() { + if (done) return; + done = true; + + var err = new Error('Request aborted'); + err.code = 'ECONNABORTED'; + callback(err); + } + + // directory + function ondirectory() { + if (done) return; + done = true; + + var err = new Error('EISDIR, read'); + err.code = 'EISDIR'; + callback(err); + } + + // errors + function onerror(err) { + if (done) return; + done = true; + callback(err); + } + + // ended + function onend() { + if (done) return; + done = true; + callback(); + } + + // file + function onfile() { + streaming = false; + } + + // finished + function onfinish(err) { + if (err && err.code === 'ECONNRESET') return onaborted(); + if (err) return onerror(err); + if (done) return; + + setImmediate(function () { + if (streaming !== false && !done) { + onaborted(); + return; + } + + if (done) return; + done = true; + callback(); + }); + } + + // streaming + function onstream() { + streaming = true; + } + + file.on('directory', ondirectory); + file.on('end', onend); + file.on('error', onerror); + file.on('file', onfile); + file.on('stream', onstream); + onFinished(res, onfinish); + + if (options.headers) { + // set headers on successful transfer + file.on('headers', function headers(res) { + var obj = options.headers; + var keys = Object.keys(obj); + + for (var i = 0; i < keys.length; i++) { + var k = keys[i]; + res.setHeader(k, obj[k]); + } + }); + } + + // pipe + file.pipe(res); +} + +/** + * Stringify JSON, like JSON.stringify, but v8 optimized, with the + * ability to escape characters that can trigger HTML sniffing. + * + * @param {*} value + * @param {function} replacer + * @param {number} spaces + * @param {boolean} escape + * @returns {string} + * @private + */ + +function stringify (value, replacer, spaces, escape) { + // v8 checks arguments.length for optimizing simple call + // https://bugs.chromium.org/p/v8/issues/detail?id=4730 + var json = replacer || spaces + ? JSON.stringify(value, replacer, spaces) + : JSON.stringify(value); + + if (escape && typeof json === 'string') { + json = json.replace(/[<>&]/g, function (c) { + switch (c.charCodeAt(0)) { + case 0x3c: + return '\\u003c' + case 0x3e: + return '\\u003e' + case 0x26: + return '\\u0026' + /* istanbul ignore next: unreachable default */ + default: + return c + } + }) + } + + return json +} diff --git a/node_modules/express/lib/router/index.js b/node_modules/express/lib/router/index.js new file mode 100644 index 0000000..abb3a6f --- /dev/null +++ b/node_modules/express/lib/router/index.js @@ -0,0 +1,673 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @private + */ + +var Route = require('./route'); +var Layer = require('./layer'); +var methods = require('methods'); +var mixin = require('utils-merge'); +var debug = require('debug')('express:router'); +var deprecate = require('depd')('express'); +var flatten = require('array-flatten'); +var parseUrl = require('parseurl'); +var setPrototypeOf = require('setprototypeof') + +/** + * Module variables. + * @private + */ + +var objectRegExp = /^\[object (\S+)\]$/; +var slice = Array.prototype.slice; +var toString = Object.prototype.toString; + +/** + * Initialize a new `Router` with the given `options`. + * + * @param {Object} [options] + * @return {Router} which is a callable function + * @public + */ + +var proto = module.exports = function(options) { + var opts = options || {}; + + function router(req, res, next) { + router.handle(req, res, next); + } + + // mixin Router class functions + setPrototypeOf(router, proto) + + router.params = {}; + router._params = []; + router.caseSensitive = opts.caseSensitive; + router.mergeParams = opts.mergeParams; + router.strict = opts.strict; + router.stack = []; + + return router; +}; + +/** + * Map the given param placeholder `name`(s) to the given callback. + * + * Parameter mapping is used to provide pre-conditions to routes + * which use normalized placeholders. For example a _:user_id_ parameter + * could automatically load a user's information from the database without + * any additional code, + * + * The callback uses the same signature as middleware, the only difference + * being that the value of the placeholder is passed, in this case the _id_ + * of the user. Once the `next()` function is invoked, just like middleware + * it will continue on to execute the route, or subsequent parameter functions. + * + * Just like in middleware, you must either respond to the request or call next + * to avoid stalling the request. + * + * app.param('user_id', function(req, res, next, id){ + * User.find(id, function(err, user){ + * if (err) { + * return next(err); + * } else if (!user) { + * return next(new Error('failed to load user')); + * } + * req.user = user; + * next(); + * }); + * }); + * + * @param {String} name + * @param {Function} fn + * @return {app} for chaining + * @public + */ + +proto.param = function param(name, fn) { + // param logic + if (typeof name === 'function') { + deprecate('router.param(fn): Refactor to use path params'); + this._params.push(name); + return; + } + + // apply param functions + var params = this._params; + var len = params.length; + var ret; + + if (name[0] === ':') { + deprecate('router.param(' + JSON.stringify(name) + ', fn): Use router.param(' + JSON.stringify(name.slice(1)) + ', fn) instead') + name = name.slice(1) + } + + for (var i = 0; i < len; ++i) { + if (ret = params[i](name, fn)) { + fn = ret; + } + } + + // ensure we end up with a + // middleware function + if ('function' !== typeof fn) { + throw new Error('invalid param() call for ' + name + ', got ' + fn); + } + + (this.params[name] = this.params[name] || []).push(fn); + return this; +}; + +/** + * Dispatch a req, res into the router. + * @private + */ + +proto.handle = function handle(req, res, out) { + var self = this; + + debug('dispatching %s %s', req.method, req.url); + + var idx = 0; + var protohost = getProtohost(req.url) || '' + var removed = ''; + var slashAdded = false; + var sync = 0 + var paramcalled = {}; + + // store options for OPTIONS request + // only used if OPTIONS request + var options = []; + + // middleware and routes + var stack = self.stack; + + // manage inter-router variables + var parentParams = req.params; + var parentUrl = req.baseUrl || ''; + var done = restore(out, req, 'baseUrl', 'next', 'params'); + + // setup next layer + req.next = next; + + // for options requests, respond with a default if nothing else responds + if (req.method === 'OPTIONS') { + done = wrap(done, function(old, err) { + if (err || options.length === 0) return old(err); + sendOptionsResponse(res, options, old); + }); + } + + // setup basic req values + req.baseUrl = parentUrl; + req.originalUrl = req.originalUrl || req.url; + + next(); + + function next(err) { + var layerError = err === 'route' + ? null + : err; + + // remove added slash + if (slashAdded) { + req.url = req.url.slice(1) + slashAdded = false; + } + + // restore altered req.url + if (removed.length !== 0) { + req.baseUrl = parentUrl; + req.url = protohost + removed + req.url.slice(protohost.length) + removed = ''; + } + + // signal to exit router + if (layerError === 'router') { + setImmediate(done, null) + return + } + + // no more matching layers + if (idx >= stack.length) { + setImmediate(done, layerError); + return; + } + + // max sync stack + if (++sync > 100) { + return setImmediate(next, err) + } + + // get pathname of request + var path = getPathname(req); + + if (path == null) { + return done(layerError); + } + + // find next matching layer + var layer; + var match; + var route; + + while (match !== true && idx < stack.length) { + layer = stack[idx++]; + match = matchLayer(layer, path); + route = layer.route; + + if (typeof match !== 'boolean') { + // hold on to layerError + layerError = layerError || match; + } + + if (match !== true) { + continue; + } + + if (!route) { + // process non-route handlers normally + continue; + } + + if (layerError) { + // routes do not match with a pending error + match = false; + continue; + } + + var method = req.method; + var has_method = route._handles_method(method); + + // build up automatic options response + if (!has_method && method === 'OPTIONS') { + appendMethods(options, route._options()); + } + + // don't even bother matching route + if (!has_method && method !== 'HEAD') { + match = false; + } + } + + // no match + if (match !== true) { + return done(layerError); + } + + // store route for dispatch on change + if (route) { + req.route = route; + } + + // Capture one-time layer values + req.params = self.mergeParams + ? mergeParams(layer.params, parentParams) + : layer.params; + var layerPath = layer.path; + + // this should be done for the layer + self.process_params(layer, paramcalled, req, res, function (err) { + if (err) { + next(layerError || err) + } else if (route) { + layer.handle_request(req, res, next) + } else { + trim_prefix(layer, layerError, layerPath, path) + } + + sync = 0 + }); + } + + function trim_prefix(layer, layerError, layerPath, path) { + if (layerPath.length !== 0) { + // Validate path is a prefix match + if (layerPath !== path.slice(0, layerPath.length)) { + next(layerError) + return + } + + // Validate path breaks on a path separator + var c = path[layerPath.length] + if (c && c !== '/' && c !== '.') return next(layerError) + + // Trim off the part of the url that matches the route + // middleware (.use stuff) needs to have the path stripped + debug('trim prefix (%s) from url %s', layerPath, req.url); + removed = layerPath; + req.url = protohost + req.url.slice(protohost.length + removed.length) + + // Ensure leading slash + if (!protohost && req.url[0] !== '/') { + req.url = '/' + req.url; + slashAdded = true; + } + + // Setup base URL (no trailing slash) + req.baseUrl = parentUrl + (removed[removed.length - 1] === '/' + ? removed.substring(0, removed.length - 1) + : removed); + } + + debug('%s %s : %s', layer.name, layerPath, req.originalUrl); + + if (layerError) { + layer.handle_error(layerError, req, res, next); + } else { + layer.handle_request(req, res, next); + } + } +}; + +/** + * Process any parameters for the layer. + * @private + */ + +proto.process_params = function process_params(layer, called, req, res, done) { + var params = this.params; + + // captured parameters from the layer, keys and values + var keys = layer.keys; + + // fast track + if (!keys || keys.length === 0) { + return done(); + } + + var i = 0; + var name; + var paramIndex = 0; + var key; + var paramVal; + var paramCallbacks; + var paramCalled; + + // process params in order + // param callbacks can be async + function param(err) { + if (err) { + return done(err); + } + + if (i >= keys.length ) { + return done(); + } + + paramIndex = 0; + key = keys[i++]; + name = key.name; + paramVal = req.params[name]; + paramCallbacks = params[name]; + paramCalled = called[name]; + + if (paramVal === undefined || !paramCallbacks) { + return param(); + } + + // param previously called with same value or error occurred + if (paramCalled && (paramCalled.match === paramVal + || (paramCalled.error && paramCalled.error !== 'route'))) { + // restore value + req.params[name] = paramCalled.value; + + // next param + return param(paramCalled.error); + } + + called[name] = paramCalled = { + error: null, + match: paramVal, + value: paramVal + }; + + paramCallback(); + } + + // single param callbacks + function paramCallback(err) { + var fn = paramCallbacks[paramIndex++]; + + // store updated value + paramCalled.value = req.params[key.name]; + + if (err) { + // store error + paramCalled.error = err; + param(err); + return; + } + + if (!fn) return param(); + + try { + fn(req, res, paramCallback, paramVal, key.name); + } catch (e) { + paramCallback(e); + } + } + + param(); +}; + +/** + * Use the given middleware function, with optional path, defaulting to "/". + * + * Use (like `.all`) will run for any http METHOD, but it will not add + * handlers for those methods so OPTIONS requests will not consider `.use` + * functions even if they could respond. + * + * The other difference is that _route_ path is stripped and not visible + * to the handler function. The main effect of this feature is that mounted + * handlers can operate without any code changes regardless of the "prefix" + * pathname. + * + * @public + */ + +proto.use = function use(fn) { + var offset = 0; + var path = '/'; + + // default path to '/' + // disambiguate router.use([fn]) + if (typeof fn !== 'function') { + var arg = fn; + + while (Array.isArray(arg) && arg.length !== 0) { + arg = arg[0]; + } + + // first arg is the path + if (typeof arg !== 'function') { + offset = 1; + path = fn; + } + } + + var callbacks = flatten(slice.call(arguments, offset)); + + if (callbacks.length === 0) { + throw new TypeError('Router.use() requires a middleware function') + } + + for (var i = 0; i < callbacks.length; i++) { + var fn = callbacks[i]; + + if (typeof fn !== 'function') { + throw new TypeError('Router.use() requires a middleware function but got a ' + gettype(fn)) + } + + // add the middleware + debug('use %o %s', path, fn.name || '') + + var layer = new Layer(path, { + sensitive: this.caseSensitive, + strict: false, + end: false + }, fn); + + layer.route = undefined; + + this.stack.push(layer); + } + + return this; +}; + +/** + * Create a new Route for the given path. + * + * Each route contains a separate middleware stack and VERB handlers. + * + * See the Route api documentation for details on adding handlers + * and middleware to routes. + * + * @param {String} path + * @return {Route} + * @public + */ + +proto.route = function route(path) { + var route = new Route(path); + + var layer = new Layer(path, { + sensitive: this.caseSensitive, + strict: this.strict, + end: true + }, route.dispatch.bind(route)); + + layer.route = route; + + this.stack.push(layer); + return route; +}; + +// create Router#VERB functions +methods.concat('all').forEach(function(method){ + proto[method] = function(path){ + var route = this.route(path) + route[method].apply(route, slice.call(arguments, 1)); + return this; + }; +}); + +// append methods to a list of methods +function appendMethods(list, addition) { + for (var i = 0; i < addition.length; i++) { + var method = addition[i]; + if (list.indexOf(method) === -1) { + list.push(method); + } + } +} + +// get pathname of request +function getPathname(req) { + try { + return parseUrl(req).pathname; + } catch (err) { + return undefined; + } +} + +// Get get protocol + host for a URL +function getProtohost(url) { + if (typeof url !== 'string' || url.length === 0 || url[0] === '/') { + return undefined + } + + var searchIndex = url.indexOf('?') + var pathLength = searchIndex !== -1 + ? searchIndex + : url.length + var fqdnIndex = url.slice(0, pathLength).indexOf('://') + + return fqdnIndex !== -1 + ? url.substring(0, url.indexOf('/', 3 + fqdnIndex)) + : undefined +} + +// get type for error message +function gettype(obj) { + var type = typeof obj; + + if (type !== 'object') { + return type; + } + + // inspect [[Class]] for objects + return toString.call(obj) + .replace(objectRegExp, '$1'); +} + +/** + * Match path to a layer. + * + * @param {Layer} layer + * @param {string} path + * @private + */ + +function matchLayer(layer, path) { + try { + return layer.match(path); + } catch (err) { + return err; + } +} + +// merge params with parent params +function mergeParams(params, parent) { + if (typeof parent !== 'object' || !parent) { + return params; + } + + // make copy of parent for base + var obj = mixin({}, parent); + + // simple non-numeric merging + if (!(0 in params) || !(0 in parent)) { + return mixin(obj, params); + } + + var i = 0; + var o = 0; + + // determine numeric gaps + while (i in params) { + i++; + } + + while (o in parent) { + o++; + } + + // offset numeric indices in params before merge + for (i--; i >= 0; i--) { + params[i + o] = params[i]; + + // create holes for the merge when necessary + if (i < o) { + delete params[i]; + } + } + + return mixin(obj, params); +} + +// restore obj props after function +function restore(fn, obj) { + var props = new Array(arguments.length - 2); + var vals = new Array(arguments.length - 2); + + for (var i = 0; i < props.length; i++) { + props[i] = arguments[i + 2]; + vals[i] = obj[props[i]]; + } + + return function () { + // restore vals + for (var i = 0; i < props.length; i++) { + obj[props[i]] = vals[i]; + } + + return fn.apply(this, arguments); + }; +} + +// send an OPTIONS response +function sendOptionsResponse(res, options, next) { + try { + var body = options.join(','); + res.set('Allow', body); + res.send(body); + } catch (err) { + next(err); + } +} + +// wrap a function +function wrap(old, fn) { + return function proxy() { + var args = new Array(arguments.length + 1); + + args[0] = old; + for (var i = 0, len = arguments.length; i < len; i++) { + args[i + 1] = arguments[i]; + } + + fn.apply(this, args); + }; +} diff --git a/node_modules/express/lib/router/layer.js b/node_modules/express/lib/router/layer.js new file mode 100644 index 0000000..4dc8e86 --- /dev/null +++ b/node_modules/express/lib/router/layer.js @@ -0,0 +1,181 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @private + */ + +var pathRegexp = require('path-to-regexp'); +var debug = require('debug')('express:router:layer'); + +/** + * Module variables. + * @private + */ + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * Module exports. + * @public + */ + +module.exports = Layer; + +function Layer(path, options, fn) { + if (!(this instanceof Layer)) { + return new Layer(path, options, fn); + } + + debug('new %o', path) + var opts = options || {}; + + this.handle = fn; + this.name = fn.name || ''; + this.params = undefined; + this.path = undefined; + this.regexp = pathRegexp(path, this.keys = [], opts); + + // set fast path flags + this.regexp.fast_star = path === '*' + this.regexp.fast_slash = path === '/' && opts.end === false +} + +/** + * Handle the error for the layer. + * + * @param {Error} error + * @param {Request} req + * @param {Response} res + * @param {function} next + * @api private + */ + +Layer.prototype.handle_error = function handle_error(error, req, res, next) { + var fn = this.handle; + + if (fn.length !== 4) { + // not a standard error handler + return next(error); + } + + try { + fn(error, req, res, next); + } catch (err) { + next(err); + } +}; + +/** + * Handle the request for the layer. + * + * @param {Request} req + * @param {Response} res + * @param {function} next + * @api private + */ + +Layer.prototype.handle_request = function handle(req, res, next) { + var fn = this.handle; + + if (fn.length > 3) { + // not a standard request handler + return next(); + } + + try { + fn(req, res, next); + } catch (err) { + next(err); + } +}; + +/** + * Check if this route matches `path`, if so + * populate `.params`. + * + * @param {String} path + * @return {Boolean} + * @api private + */ + +Layer.prototype.match = function match(path) { + var match + + if (path != null) { + // fast path non-ending match for / (any path matches) + if (this.regexp.fast_slash) { + this.params = {} + this.path = '' + return true + } + + // fast path for * (everything matched in a param) + if (this.regexp.fast_star) { + this.params = {'0': decode_param(path)} + this.path = path + return true + } + + // match the path + match = this.regexp.exec(path) + } + + if (!match) { + this.params = undefined; + this.path = undefined; + return false; + } + + // store values + this.params = {}; + this.path = match[0] + + var keys = this.keys; + var params = this.params; + + for (var i = 1; i < match.length; i++) { + var key = keys[i - 1]; + var prop = key.name; + var val = decode_param(match[i]) + + if (val !== undefined || !(hasOwnProperty.call(params, prop))) { + params[prop] = val; + } + } + + return true; +}; + +/** + * Decode param value. + * + * @param {string} val + * @return {string} + * @private + */ + +function decode_param(val) { + if (typeof val !== 'string' || val.length === 0) { + return val; + } + + try { + return decodeURIComponent(val); + } catch (err) { + if (err instanceof URIError) { + err.message = 'Failed to decode param \'' + val + '\''; + err.status = err.statusCode = 400; + } + + throw err; + } +} diff --git a/node_modules/express/lib/router/route.js b/node_modules/express/lib/router/route.js new file mode 100644 index 0000000..a65756d --- /dev/null +++ b/node_modules/express/lib/router/route.js @@ -0,0 +1,230 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @private + */ + +var debug = require('debug')('express:router:route'); +var flatten = require('array-flatten'); +var Layer = require('./layer'); +var methods = require('methods'); + +/** + * Module variables. + * @private + */ + +var slice = Array.prototype.slice; +var toString = Object.prototype.toString; + +/** + * Module exports. + * @public + */ + +module.exports = Route; + +/** + * Initialize `Route` with the given `path`, + * + * @param {String} path + * @public + */ + +function Route(path) { + this.path = path; + this.stack = []; + + debug('new %o', path) + + // route handlers for various http methods + this.methods = {}; +} + +/** + * Determine if the route handles a given method. + * @private + */ + +Route.prototype._handles_method = function _handles_method(method) { + if (this.methods._all) { + return true; + } + + // normalize name + var name = typeof method === 'string' + ? method.toLowerCase() + : method + + if (name === 'head' && !this.methods['head']) { + name = 'get'; + } + + return Boolean(this.methods[name]); +}; + +/** + * @return {Array} supported HTTP methods + * @private + */ + +Route.prototype._options = function _options() { + var methods = Object.keys(this.methods); + + // append automatic head + if (this.methods.get && !this.methods.head) { + methods.push('head'); + } + + for (var i = 0; i < methods.length; i++) { + // make upper case + methods[i] = methods[i].toUpperCase(); + } + + return methods; +}; + +/** + * dispatch req, res into this route + * @private + */ + +Route.prototype.dispatch = function dispatch(req, res, done) { + var idx = 0; + var stack = this.stack; + var sync = 0 + + if (stack.length === 0) { + return done(); + } + var method = typeof req.method === 'string' + ? req.method.toLowerCase() + : req.method + + if (method === 'head' && !this.methods['head']) { + method = 'get'; + } + + req.route = this; + + next(); + + function next(err) { + // signal to exit route + if (err && err === 'route') { + return done(); + } + + // signal to exit router + if (err && err === 'router') { + return done(err) + } + + // max sync stack + if (++sync > 100) { + return setImmediate(next, err) + } + + var layer = stack[idx++] + + // end of layers + if (!layer) { + return done(err) + } + + if (layer.method && layer.method !== method) { + next(err) + } else if (err) { + layer.handle_error(err, req, res, next); + } else { + layer.handle_request(req, res, next); + } + + sync = 0 + } +}; + +/** + * Add a handler for all HTTP verbs to this route. + * + * Behaves just like middleware and can respond or call `next` + * to continue processing. + * + * You can use multiple `.all` call to add multiple handlers. + * + * function check_something(req, res, next){ + * next(); + * }; + * + * function validate_user(req, res, next){ + * next(); + * }; + * + * route + * .all(validate_user) + * .all(check_something) + * .get(function(req, res, next){ + * res.send('hello world'); + * }); + * + * @param {function} handler + * @return {Route} for chaining + * @api public + */ + +Route.prototype.all = function all() { + var handles = flatten(slice.call(arguments)); + + for (var i = 0; i < handles.length; i++) { + var handle = handles[i]; + + if (typeof handle !== 'function') { + var type = toString.call(handle); + var msg = 'Route.all() requires a callback function but got a ' + type + throw new TypeError(msg); + } + + var layer = Layer('/', {}, handle); + layer.method = undefined; + + this.methods._all = true; + this.stack.push(layer); + } + + return this; +}; + +methods.forEach(function(method){ + Route.prototype[method] = function(){ + var handles = flatten(slice.call(arguments)); + + for (var i = 0; i < handles.length; i++) { + var handle = handles[i]; + + if (typeof handle !== 'function') { + var type = toString.call(handle); + var msg = 'Route.' + method + '() requires a callback function but got a ' + type + throw new Error(msg); + } + + debug('%s %o', method, this.path) + + var layer = Layer('/', {}, handle); + layer.method = method; + + this.methods[method] = true; + this.stack.push(layer); + } + + return this; + }; +}); diff --git a/node_modules/express/lib/utils.js b/node_modules/express/lib/utils.js new file mode 100644 index 0000000..56e12b9 --- /dev/null +++ b/node_modules/express/lib/utils.js @@ -0,0 +1,303 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @api private + */ + +var Buffer = require('safe-buffer').Buffer +var contentDisposition = require('content-disposition'); +var contentType = require('content-type'); +var deprecate = require('depd')('express'); +var flatten = require('array-flatten'); +var mime = require('send').mime; +var etag = require('etag'); +var proxyaddr = require('proxy-addr'); +var qs = require('qs'); +var querystring = require('querystring'); + +/** + * Return strong ETag for `body`. + * + * @param {String|Buffer} body + * @param {String} [encoding] + * @return {String} + * @api private + */ + +exports.etag = createETagGenerator({ weak: false }) + +/** + * Return weak ETag for `body`. + * + * @param {String|Buffer} body + * @param {String} [encoding] + * @return {String} + * @api private + */ + +exports.wetag = createETagGenerator({ weak: true }) + +/** + * Check if `path` looks absolute. + * + * @param {String} path + * @return {Boolean} + * @api private + */ + +exports.isAbsolute = function(path){ + if ('/' === path[0]) return true; + if (':' === path[1] && ('\\' === path[2] || '/' === path[2])) return true; // Windows device path + if ('\\\\' === path.substring(0, 2)) return true; // Microsoft Azure absolute path +}; + +/** + * Flatten the given `arr`. + * + * @param {Array} arr + * @return {Array} + * @api private + */ + +exports.flatten = deprecate.function(flatten, + 'utils.flatten: use array-flatten npm module instead'); + +/** + * Normalize the given `type`, for example "html" becomes "text/html". + * + * @param {String} type + * @return {Object} + * @api private + */ + +exports.normalizeType = function(type){ + return ~type.indexOf('/') + ? acceptParams(type) + : { value: mime.lookup(type), params: {} }; +}; + +/** + * Normalize `types`, for example "html" becomes "text/html". + * + * @param {Array} types + * @return {Array} + * @api private + */ + +exports.normalizeTypes = function(types){ + var ret = []; + + for (var i = 0; i < types.length; ++i) { + ret.push(exports.normalizeType(types[i])); + } + + return ret; +}; + +/** + * Generate Content-Disposition header appropriate for the filename. + * non-ascii filenames are urlencoded and a filename* parameter is added + * + * @param {String} filename + * @return {String} + * @api private + */ + +exports.contentDisposition = deprecate.function(contentDisposition, + 'utils.contentDisposition: use content-disposition npm module instead'); + +/** + * Parse accept params `str` returning an + * object with `.value`, `.quality` and `.params`. + * + * @param {String} str + * @return {Object} + * @api private + */ + +function acceptParams (str) { + var parts = str.split(/ *; */); + var ret = { value: parts[0], quality: 1, params: {} } + + for (var i = 1; i < parts.length; ++i) { + var pms = parts[i].split(/ *= */); + if ('q' === pms[0]) { + ret.quality = parseFloat(pms[1]); + } else { + ret.params[pms[0]] = pms[1]; + } + } + + return ret; +} + +/** + * Compile "etag" value to function. + * + * @param {Boolean|String|Function} val + * @return {Function} + * @api private + */ + +exports.compileETag = function(val) { + var fn; + + if (typeof val === 'function') { + return val; + } + + switch (val) { + case true: + case 'weak': + fn = exports.wetag; + break; + case false: + break; + case 'strong': + fn = exports.etag; + break; + default: + throw new TypeError('unknown value for etag function: ' + val); + } + + return fn; +} + +/** + * Compile "query parser" value to function. + * + * @param {String|Function} val + * @return {Function} + * @api private + */ + +exports.compileQueryParser = function compileQueryParser(val) { + var fn; + + if (typeof val === 'function') { + return val; + } + + switch (val) { + case true: + case 'simple': + fn = querystring.parse; + break; + case false: + fn = newObject; + break; + case 'extended': + fn = parseExtendedQueryString; + break; + default: + throw new TypeError('unknown value for query parser function: ' + val); + } + + return fn; +} + +/** + * Compile "proxy trust" value to function. + * + * @param {Boolean|String|Number|Array|Function} val + * @return {Function} + * @api private + */ + +exports.compileTrust = function(val) { + if (typeof val === 'function') return val; + + if (val === true) { + // Support plain true/false + return function(){ return true }; + } + + if (typeof val === 'number') { + // Support trusting hop count + return function(a, i){ return i < val }; + } + + if (typeof val === 'string') { + // Support comma-separated values + val = val.split(',') + .map(function (v) { return v.trim() }) + } + + return proxyaddr.compile(val || []); +} + +/** + * Set the charset in a given Content-Type string. + * + * @param {String} type + * @param {String} charset + * @return {String} + * @api private + */ + +exports.setCharset = function setCharset(type, charset) { + if (!type || !charset) { + return type; + } + + // parse type + var parsed = contentType.parse(type); + + // set charset + parsed.parameters.charset = charset; + + // format type + return contentType.format(parsed); +}; + +/** + * Create an ETag generator function, generating ETags with + * the given options. + * + * @param {object} options + * @return {function} + * @private + */ + +function createETagGenerator (options) { + return function generateETag (body, encoding) { + var buf = !Buffer.isBuffer(body) + ? Buffer.from(body, encoding) + : body + + return etag(buf, options) + } +} + +/** + * Parse an extended query string with qs. + * + * @param {String} str + * @return {Object} + * @private + */ + +function parseExtendedQueryString(str) { + return qs.parse(str, { + allowPrototypes: true + }); +} + +/** + * Return new empty object. + * + * @return {Object} + * @api private + */ + +function newObject() { + return {}; +} diff --git a/node_modules/express/lib/view.js b/node_modules/express/lib/view.js new file mode 100644 index 0000000..c08ab4d --- /dev/null +++ b/node_modules/express/lib/view.js @@ -0,0 +1,182 @@ +/*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @private + */ + +var debug = require('debug')('express:view'); +var path = require('path'); +var fs = require('fs'); + +/** + * Module variables. + * @private + */ + +var dirname = path.dirname; +var basename = path.basename; +var extname = path.extname; +var join = path.join; +var resolve = path.resolve; + +/** + * Module exports. + * @public + */ + +module.exports = View; + +/** + * Initialize a new `View` with the given `name`. + * + * Options: + * + * - `defaultEngine` the default template engine name + * - `engines` template engine require() cache + * - `root` root path for view lookup + * + * @param {string} name + * @param {object} options + * @public + */ + +function View(name, options) { + var opts = options || {}; + + this.defaultEngine = opts.defaultEngine; + this.ext = extname(name); + this.name = name; + this.root = opts.root; + + if (!this.ext && !this.defaultEngine) { + throw new Error('No default engine was specified and no extension was provided.'); + } + + var fileName = name; + + if (!this.ext) { + // get extension from default engine name + this.ext = this.defaultEngine[0] !== '.' + ? '.' + this.defaultEngine + : this.defaultEngine; + + fileName += this.ext; + } + + if (!opts.engines[this.ext]) { + // load engine + var mod = this.ext.slice(1) + debug('require "%s"', mod) + + // default engine export + var fn = require(mod).__express + + if (typeof fn !== 'function') { + throw new Error('Module "' + mod + '" does not provide a view engine.') + } + + opts.engines[this.ext] = fn + } + + // store loaded engine + this.engine = opts.engines[this.ext]; + + // lookup path + this.path = this.lookup(fileName); +} + +/** + * Lookup view by the given `name` + * + * @param {string} name + * @private + */ + +View.prototype.lookup = function lookup(name) { + var path; + var roots = [].concat(this.root); + + debug('lookup "%s"', name); + + for (var i = 0; i < roots.length && !path; i++) { + var root = roots[i]; + + // resolve the path + var loc = resolve(root, name); + var dir = dirname(loc); + var file = basename(loc); + + // resolve the file + path = this.resolve(dir, file); + } + + return path; +}; + +/** + * Render with the given options. + * + * @param {object} options + * @param {function} callback + * @private + */ + +View.prototype.render = function render(options, callback) { + debug('render "%s"', this.path); + this.engine(this.path, options, callback); +}; + +/** + * Resolve the file within the given directory. + * + * @param {string} dir + * @param {string} file + * @private + */ + +View.prototype.resolve = function resolve(dir, file) { + var ext = this.ext; + + // . + var path = join(dir, file); + var stat = tryStat(path); + + if (stat && stat.isFile()) { + return path; + } + + // /index. + path = join(dir, basename(file, ext), 'index' + ext); + stat = tryStat(path); + + if (stat && stat.isFile()) { + return path; + } +}; + +/** + * Return a stat, maybe. + * + * @param {string} path + * @return {fs.Stats} + * @private + */ + +function tryStat(path) { + debug('stat "%s"', path); + + try { + return fs.statSync(path); + } catch (e) { + return undefined; + } +} diff --git a/node_modules/express/package.json b/node_modules/express/package.json new file mode 100644 index 0000000..60f65fe --- /dev/null +++ b/node_modules/express/package.json @@ -0,0 +1,102 @@ +{ + "name": "express", + "description": "Fast, unopinionated, minimalist web framework", + "version": "4.21.2", + "author": "TJ Holowaychuk ", + "contributors": [ + "Aaron Heckmann ", + "Ciaran Jessup ", + "Douglas Christopher Wilson ", + "Guillermo Rauch ", + "Jonathan Ong ", + "Roman Shtylman ", + "Young Jae Sim " + ], + "license": "MIT", + "repository": "expressjs/express", + "homepage": "http://expressjs.com/", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + }, + "keywords": [ + "express", + "framework", + "sinatra", + "web", + "http", + "rest", + "restful", + "router", + "app", + "api" + ], + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.12", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "devDependencies": { + "after": "0.8.2", + "connect-redis": "3.4.2", + "cookie-parser": "1.4.6", + "cookie-session": "2.0.0", + "ejs": "3.1.9", + "eslint": "8.47.0", + "express-session": "1.17.2", + "hbs": "4.2.0", + "marked": "0.7.0", + "method-override": "3.0.0", + "mocha": "10.2.0", + "morgan": "1.10.0", + "nyc": "15.1.0", + "pbkdf2-password": "1.2.1", + "supertest": "6.3.0", + "vhost": "~3.0.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "files": [ + "LICENSE", + "History.md", + "Readme.md", + "index.js", + "lib/" + ], + "scripts": { + "lint": "eslint .", + "test": "mocha --require test/support/env --reporter spec --bail --check-leaks test/ test/acceptance/", + "test-ci": "nyc --exclude examples --exclude test --exclude benchmarks --reporter=lcovonly --reporter=text npm test", + "test-cov": "nyc --exclude examples --exclude test --exclude benchmarks --reporter=html --reporter=text npm test", + "test-tap": "mocha --require test/support/env --reporter tap --check-leaks test/ test/acceptance/" + } +} diff --git a/node_modules/exsolve/LICENSE b/node_modules/exsolve/LICENSE new file mode 100644 index 0000000..77cb553 --- /dev/null +++ b/node_modules/exsolve/LICENSE @@ -0,0 +1,111 @@ +MIT License + +Copyright (c) Pooya Parsa + +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. + +--- + +This is a derivative work based on: +. + +--- + +This is a derivative work based on: +. + +Which is licensed: + +""" +(The MIT License) + +Copyright (c) 2021 Titus Wormer + +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. +""" + +--- + +This is a derivative work based on: +. + +Which is licensed: + +""" +Copyright Node.js contributors. All rights reserved. + +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. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +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. +""" diff --git a/node_modules/exsolve/README.md b/node_modules/exsolve/README.md new file mode 100644 index 0000000..b284c9d --- /dev/null +++ b/node_modules/exsolve/README.md @@ -0,0 +1,213 @@ +# exsolve + +[![npm version](https://img.shields.io/npm/v/exsolve?color=yellow)](https://npmjs.com/package/exsolve) +[![npm downloads](https://img.shields.io/npm/dm/exsolve?color=yellow)](https://npm.chart.dev/exsolve) +[![pkg size](https://img.shields.io/npm/unpacked-size/exsolve?color=yellow)](https://packagephobia.com/result?p=exsolve) + +> Module resolution utilities for Node.js (based on previous work in [unjs/mlly](https://github.com/unjs/mlly), [wooorm/import-meta-resolve](https://github.com/wooorm/import-meta-resolve), and the upstream [Node.js](https://github.com/nodejs/node) implementation). + +This library exposes an API similar to [`import.meta.resolve`](https://nodejs.org/api/esm.html#importmetaresolvespecifier) based on Node.js's upstream implementation and [resolution algorithm](https://nodejs.org/api/esm.html#esm_resolution_algorithm). It supports all built-in functionalities—import maps, export maps, CJS, and ESM—with some additions: + +- Pure JS with no native dependencies (only Node.js is required). +- Built-in resolve [cache](#resolve-cache). +- Throws an error (or [try](#try)) if the resolved path does not exist in the filesystem. +- Can override the default [conditions](#conditions). +- Can resolve [from](#from) one or more parent URLs. +- Can resolve with custom [suffixes](#suffixes). +- Can resolve with custom [extensions](#extensions). + +## Usage + +Install the package: + +```sh +# ✨ Auto-detect (npm, yarn, pnpm, bun, deno) +npx nypm install exsolve +``` + +Import: + +```ts +// ESM import +import { + resolveModuleURL, + resolveModulePath, + createResolver, + clearResolveCache, +} from "exsolve"; + +// Or using dynamic import +const { resolveModulePath } = await import("exsolve"); +``` + +```ts +resolveModuleURL(id, { + /* options */ +}); + +resolveModulePath(id, { + /* options */ +}); +``` + +Differences between `resolveModuleURL` and `resolveModulePath`: + +- `resolveModuleURL` returns a URL string like `file:///app/dep.mjs`. +- `resolveModulePath` returns an absolute path like `/app/dep.mjs`. + - If the resolved URL does not use the `file://` scheme (e.g., `data:` or `node:`), it will throw an error. + +## Resolver with options + +You can create a custom resolver instance with default [options](#resolve-options) using `createResolver`. + +**Example:** + +```ts +import { createResolver } from "exsolve"; + +const { resolveModuleURL, resolveModulePath } = createResolver({ + suffixes: ["", "/index"], + extensions: [".mjs", ".cjs", ".js", ".mts", ".cts", ".ts", ".json"], + conditions: ["node", "import", "production"], +}); +``` + +## Resolve cache + +To speed up resolution, resolved values (and errors) are globally cached with a unique key based on id and options. + +**Example:** Invalidate all (global) cache entries (to support file-system changes). + +```ts +import { clearResolveCache } from "exsolve"; + +clearResolveCache(); +``` + +**Example:** Custom resolver with custom cache object. + +```ts +import { createResolver } from "exsolve"; + +const { clearResolveCache, resolveModulePath } = createResolver({ + cache: new Map(), +}); +``` + +**Example:** Resolve without cache. + +```ts +import { resolveModulePath } from "exsolve"; + +resolveModulePath("id", { cache: false }); +``` + +## Resolve Options + +### `try` + +If set to `true` and the module cannot be resolved, the resolver returns `undefined` instead of throwing an error. + +**Example:** + +```ts +// undefined +const resolved = resolveModuleURL("non-existing-package", { try: true }); +``` + +### `from` + +A URL, path, or array of URLs/paths from which to resolve the module. + +If not provided, resolution starts from the current working directory. Setting this option is recommended. + +You can use `import.meta.url` for `from` to mimic the behavior of `import.meta.resolve()`. + +> [!TIP] +> For better performance, ensure the value is a `file://` URL or at least ends with `/`. +> +> If it is set to an absolute path, the resolver must first check the filesystem to see if it is a file or directory. +> If the input is a `file://` URL or ends with `/`, the resolver can skip this check. + +### `conditions` + +Conditions to apply when resolving package exports (default: `["node", "import"]`). + +**Example:** + +```ts +// "/app/src/index.ts" +const src = resolveModuleURL("pkg-name", { + conditions: ["deno", "node", "import", "production"], +}); +``` + +> [!NOTE] +> Conditions are applied **without order**. The order is determined by the `exports` field in `package.json`. + +### `extensions` + +Additional file extensions to check as fallbacks. + +**Example:** + +```ts +// "/app/src/index.ts" +const src = resolveModulePath("./src/index", { + extensions: [".mjs", ".cjs", ".js", ".mts", ".cts", ".ts", ".json"], +}); +``` + +> [!TIP] +> For better performance, use explicit extensions and avoid this option. + +### `suffixes` + +Path suffixes to check. + +**Example:** + +```ts +// "/app/src/utils/index.ts" +const src = resolveModulePath("./src/utils", { + suffixes: ["", "/index"], + extensions: [".mjs", ".cjs", ".js"], +}); +``` + +> [!TIP] +> For better performance, use explicit `/index` when needed and avoid this option. + +### `cache` + +Resolve cache (enabled by default with a shared global object). + +Can be set to `false` to disable or a custom `Map` to bring your own cache object. + +See [cache](#resolve-cache) for more info. + +## Other Performance Tips + +**Use explicit module extensions `.mjs` or `.cjs` instead of `.js`:** + +This allows the resolution fast path to skip reading the closest `package.json` for the [`type`](https://nodejs.org/api/packages.html#type). + +## Development + +
+ +local development + +- Clone this repository +- Install the latest LTS version of [Node.js](https://nodejs.org/en/) +- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable` +- Install dependencies using `pnpm install` +- Run interactive tests using `pnpm dev` + +
+ +## License + +Published under the [MIT](https://github.com/unjs/exsolve/blob/main/LICENSE) license. + +Based on previous work in [unjs/mlly](https://github.com/unjs/mlly), [wooorm/import-meta-resolve](https://github.com/wooorm/import-meta-resolve) and [Node.js](https://github.com/nodejs/node) original implementation. diff --git a/node_modules/exsolve/dist/index.d.mts b/node_modules/exsolve/dist/index.d.mts new file mode 100644 index 0000000..eb7978d --- /dev/null +++ b/node_modules/exsolve/dist/index.d.mts @@ -0,0 +1,67 @@ +/** + * Options to configure module resolution. + */ +type ResolveOptions = { + /** + * A URL, path, or array of URLs/paths from which to resolve the module. + * If not provided, resolution starts from the current working directory. + * You can use `import.meta.url` to mimic the behavior of `import.meta.resolve()`. + * For better performance, use a `file://` URL or path that ends with `/`. + */ + from?: string | URL | (string | URL)[]; + /** + * Resolve cache (enabled by default with a shared global object). + * Can be set to `false` to disable or a custom `Map` to bring your own cache object. + */ + cache?: boolean | Map; + /** + * Additional file extensions to check. + * For better performance, use explicit extensions and avoid this option. + */ + extensions?: string[]; + /** + * Conditions to apply when resolving package exports. + * Defaults to `["node", "import"]`. + * Conditions are applied without order. + */ + conditions?: string[]; + /** + * Path suffixes to check. + * For better performance, use explicit paths and avoid this option. + * Example: `["", "/index"]` + */ + suffixes?: string[]; + /** + * If set to `true` and the module cannot be resolved, + * the resolver returns `undefined` instead of throwing an error. + */ + try?: boolean; +}; +type ResolverOptions = Omit; +type ResolveRes = Opts["try"] extends true ? string | undefined : string; +/** + * Synchronously resolves a module url based on the options provided. + * + * @param {string} input - The identifier or path of the module to resolve. + * @param {ResolveOptions} [options] - Options to resolve the module. See {@link ResolveOptions}. + * @returns {string} The resolved URL as a string. + */ +declare function resolveModuleURL(input: string | URL, options?: O): ResolveRes; +/** + * Synchronously resolves a module then converts it to a file path + * + * (throws error if reolved path is not file:// scheme) + * + * @param {string} id - The identifier or path of the module to resolve. + * @param {ResolveOptions} [options] - Options to resolve the module. See {@link ResolveOptions}. + * @returns {string} The resolved URL as a string. + */ +declare function resolveModulePath(id: string | URL, options?: O): ResolveRes; +declare function createResolver(defaults?: ResolverOptions): { + resolveModuleURL: (id: string | URL, opts: ResolveOptions) => ResolveRes; + resolveModulePath: (id: string | URL, opts: ResolveOptions) => ResolveRes; + clearResolveCache: () => void; +}; +declare function clearResolveCache(): void; + +export { type ResolveOptions, type ResolverOptions, clearResolveCache, createResolver, resolveModulePath, resolveModuleURL }; diff --git a/node_modules/exsolve/dist/index.mjs b/node_modules/exsolve/dist/index.mjs new file mode 100644 index 0000000..338ed8f --- /dev/null +++ b/node_modules/exsolve/dist/index.mjs @@ -0,0 +1,1431 @@ +import fs, { realpathSync, statSync } from 'node:fs'; +import { fileURLToPath, URL as URL$1, pathToFileURL } from 'node:url'; +import path, { isAbsolute } from 'node:path'; +import assert from 'node:assert'; +import process$1 from 'node:process'; +import v8 from 'node:v8'; +import { format, inspect } from 'node:util'; + +const nodeBuiltins = [ + "_http_agent", + "_http_client", + "_http_common", + "_http_incoming", + "_http_outgoing", + "_http_server", + "_stream_duplex", + "_stream_passthrough", + "_stream_readable", + "_stream_transform", + "_stream_wrap", + "_stream_writable", + "_tls_common", + "_tls_wrap", + "assert", + "assert/strict", + "async_hooks", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "dgram", + "diagnostics_channel", + "dns", + "dns/promises", + "domain", + "events", + "fs", + "fs/promises", + "http", + "http2", + "https", + "inspector", + "inspector/promises", + "module", + "net", + "os", + "path", + "path/posix", + "path/win32", + "perf_hooks", + "process", + "punycode", + "querystring", + "readline", + "readline/promises", + "repl", + "stream", + "stream/consumers", + "stream/promises", + "stream/web", + "string_decoder", + "sys", + "timers", + "timers/promises", + "tls", + "trace_events", + "tty", + "url", + "util", + "util/types", + "v8", + "vm", + "wasi", + "worker_threads", + "zlib" +]; + +const own$1 = {}.hasOwnProperty; +const classRegExp = /^([A-Z][a-z\d]*)+$/; +const kTypes = /* @__PURE__ */ new Set([ + "string", + "function", + "number", + "object", + // Accept 'Function' and 'Object' as alternative to the lower cased version. + "Function", + "Object", + "boolean", + "bigint", + "symbol" +]); +const messages = /* @__PURE__ */ new Map(); +const nodeInternalPrefix = "__node_internal_"; +let userStackTraceLimit; +function formatList(array, type = "and") { + return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array.at(-1)}`; +} +function createError(sym, value, constructor) { + messages.set(sym, value); + return makeNodeErrorWithCode(constructor, sym); +} +function makeNodeErrorWithCode(Base, key) { + return function NodeError(...parameters) { + const limit = Error.stackTraceLimit; + if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0; + const error = new Base(); + if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit; + const message = getMessage(key, parameters, error); + Object.defineProperties(error, { + // Note: no need to implement `kIsNodeError` symbol, would be hard, + // probably. + message: { + value: message, + enumerable: false, + writable: true, + configurable: true + }, + toString: { + /** @this {Error} */ + value() { + return `${this.name} [${key}]: ${this.message}`; + }, + enumerable: false, + writable: true, + configurable: true + } + }); + captureLargerStackTrace(error); + error.code = key; + return error; + }; +} +function isErrorStackTraceLimitWritable() { + try { + if (v8.startupSnapshot.isBuildingSnapshot()) { + return false; + } + } catch { + } + const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit"); + if (desc === void 0) { + return Object.isExtensible(Error); + } + return own$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0; +} +function hideStackFrames(wrappedFunction) { + const hidden = nodeInternalPrefix + wrappedFunction.name; + Object.defineProperty(wrappedFunction, "name", { value: hidden }); + return wrappedFunction; +} +const captureLargerStackTrace = hideStackFrames(function(error) { + const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable(); + if (stackTraceLimitIsWritable) { + userStackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = Number.POSITIVE_INFINITY; + } + Error.captureStackTrace(error); + if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit; + return error; +}); +function getMessage(key, parameters, self) { + const message = messages.get(key); + assert(message !== void 0, "expected `message` to be found"); + if (typeof message === "function") { + assert( + message.length <= parameters.length, + // Default options do not count. + `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).` + ); + return Reflect.apply(message, self, parameters); + } + const regex = /%[dfijoOs]/g; + let expectedLength = 0; + while (regex.exec(message) !== null) expectedLength++; + assert( + expectedLength === parameters.length, + `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).` + ); + if (parameters.length === 0) return message; + parameters.unshift(message); + return Reflect.apply(format, null, parameters); +} +function determineSpecificType(value) { + if (value === null || value === void 0) { + return String(value); + } + if (typeof value === "function" && value.name) { + return `function ${value.name}`; + } + if (typeof value === "object") { + if (value.constructor && value.constructor.name) { + return `an instance of ${value.constructor.name}`; + } + return `${inspect(value, { depth: -1 })}`; + } + let inspected = inspect(value, { colors: false }); + if (inspected.length > 28) { + inspected = `${inspected.slice(0, 25)}...`; + } + return `type ${typeof value} (${inspected})`; +} +createError( + "ERR_INVALID_ARG_TYPE", + (name, expected, actual) => { + assert(typeof name === "string", "'name' must be a string"); + if (!Array.isArray(expected)) { + expected = [expected]; + } + let message = "The "; + if (name.endsWith(" argument")) { + message += `${name} `; + } else { + const type = name.includes(".") ? "property" : "argument"; + message += `"${name}" ${type} `; + } + message += "must be "; + const types = []; + const instances = []; + const other = []; + for (const value of expected) { + assert( + typeof value === "string", + "All expected entries have to be of type string" + ); + if (kTypes.has(value)) { + types.push(value.toLowerCase()); + } else if (classRegExp.exec(value) === null) { + assert( + value !== "object", + 'The value "object" should be written as "Object"' + ); + other.push(value); + } else { + instances.push(value); + } + } + if (instances.length > 0) { + const pos = types.indexOf("object"); + if (pos !== -1) { + types.slice(pos, 1); + instances.push("Object"); + } + } + if (types.length > 0) { + message += `${types.length > 1 ? "one of type" : "of type"} ${formatList( + types, + "or" + )}`; + if (instances.length > 0 || other.length > 0) message += " or "; + } + if (instances.length > 0) { + message += `an instance of ${formatList(instances, "or")}`; + if (other.length > 0) message += " or "; + } + if (other.length > 0) { + if (other.length > 1) { + message += `one of ${formatList(other, "or")}`; + } else { + if (other[0]?.toLowerCase() !== other[0]) message += "an "; + message += `${other[0]}`; + } + } + message += `. Received ${determineSpecificType(actual)}`; + return message; + }, + TypeError +); +const ERR_INVALID_MODULE_SPECIFIER = createError( + "ERR_INVALID_MODULE_SPECIFIER", + /** + * @param {string} request + * @param {string} reason + * @param {string} [base] + */ + (request, reason, base) => { + return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`; + }, + TypeError +); +const ERR_INVALID_PACKAGE_CONFIG = createError( + "ERR_INVALID_PACKAGE_CONFIG", + (path, base, message) => { + return `Invalid package config ${path}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`; + }, + Error +); +const ERR_INVALID_PACKAGE_TARGET = createError( + "ERR_INVALID_PACKAGE_TARGET", + (packagePath, key, target, isImport = false, base) => { + const relatedError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./"); + if (key === ".") { + assert(isImport === false); + return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`; + } + return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify( + target + )} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`; + }, + Error +); +const ERR_MODULE_NOT_FOUND = createError( + "ERR_MODULE_NOT_FOUND", + (path, base, exactUrl = false) => { + return `Cannot find ${exactUrl ? "module" : "package"} '${path}' imported from ${base}`; + }, + Error +); +createError( + "ERR_NETWORK_IMPORT_DISALLOWED", + "import of '%s' by %s is not supported: %s", + Error +); +const ERR_PACKAGE_IMPORT_NOT_DEFINED = createError( + "ERR_PACKAGE_IMPORT_NOT_DEFINED", + (specifier, packagePath, base) => { + return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath || ""}package.json` : ""} imported from ${base}`; + }, + TypeError +); +const ERR_PACKAGE_PATH_NOT_EXPORTED = createError( + "ERR_PACKAGE_PATH_NOT_EXPORTED", + /** + * @param {string} packagePath + * @param {string} subpath + * @param {string} [base] + */ + (packagePath, subpath, base) => { + if (subpath === ".") + return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`; + return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`; + }, + Error +); +const ERR_UNSUPPORTED_DIR_IMPORT = createError( + "ERR_UNSUPPORTED_DIR_IMPORT", + "Directory import '%s' is not supported resolving ES modules imported from %s", + Error +); +const ERR_UNSUPPORTED_RESOLVE_REQUEST = createError( + "ERR_UNSUPPORTED_RESOLVE_REQUEST", + 'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.', + TypeError +); +const ERR_UNKNOWN_FILE_EXTENSION = createError( + "ERR_UNKNOWN_FILE_EXTENSION", + (extension, path) => { + return `Unknown file extension "${extension}" for ${path}`; + }, + TypeError +); +createError( + "ERR_INVALID_ARG_VALUE", + (name, value, reason = "is invalid") => { + let inspected = inspect(value); + if (inspected.length > 128) { + inspected = `${inspected.slice(0, 128)}...`; + } + const type = name.includes(".") ? "property" : "argument"; + return `The ${type} '${name}' ${reason}. Received ${inspected}`; + }, + TypeError + // Note: extra classes have been shaken out. + // , RangeError +); + +const hasOwnProperty$1 = {}.hasOwnProperty; +const cache = /* @__PURE__ */ new Map(); +function read(jsonPath, { base, specifier }) { + const existing = cache.get(jsonPath); + if (existing) { + return existing; + } + let string; + try { + string = fs.readFileSync(path.toNamespacedPath(jsonPath), "utf8"); + } catch (error) { + const exception = error; + if (exception.code !== "ENOENT") { + throw exception; + } + } + const result = { + exists: false, + pjsonPath: jsonPath, + main: void 0, + name: void 0, + type: "none", + // Ignore unknown types for forwards compatibility + exports: void 0, + imports: void 0 + }; + if (string !== void 0) { + let parsed; + try { + parsed = JSON.parse(string); + } catch (error_) { + const error = new ERR_INVALID_PACKAGE_CONFIG( + jsonPath, + (base ? `"${specifier}" from ` : "") + fileURLToPath(base || specifier), + error_.message + ); + error.cause = error_; + throw error; + } + result.exists = true; + if (hasOwnProperty$1.call(parsed, "name") && typeof parsed.name === "string") { + result.name = parsed.name; + } + if (hasOwnProperty$1.call(parsed, "main") && typeof parsed.main === "string") { + result.main = parsed.main; + } + if (hasOwnProperty$1.call(parsed, "exports")) { + result.exports = parsed.exports; + } + if (hasOwnProperty$1.call(parsed, "imports")) { + result.imports = parsed.imports; + } + if (hasOwnProperty$1.call(parsed, "type") && (parsed.type === "commonjs" || parsed.type === "module")) { + result.type = parsed.type; + } + } + cache.set(jsonPath, result); + return result; +} +function getPackageScopeConfig(resolved) { + let packageJSONUrl = new URL("package.json", resolved); + while (true) { + const packageJSONPath2 = packageJSONUrl.pathname; + if (packageJSONPath2.endsWith("node_modules/package.json")) { + break; + } + const packageConfig = read(fileURLToPath(packageJSONUrl), { + specifier: resolved + }); + if (packageConfig.exists) { + return packageConfig; + } + const lastPackageJSONUrl = packageJSONUrl; + packageJSONUrl = new URL("../package.json", packageJSONUrl); + if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) { + break; + } + } + const packageJSONPath = fileURLToPath(packageJSONUrl); + return { + pjsonPath: packageJSONPath, + exists: false, + type: "none" + }; +} + +const hasOwnProperty = {}.hasOwnProperty; +const extensionFormatMap = { + __proto__: null, + ".json": "json", + ".cjs": "commonjs", + ".cts": "commonjs", + ".js": "module", + ".ts": "module", + ".mts": "module", + ".mjs": "module" +}; +const protocolHandlers = { + __proto__: null, + "data:": getDataProtocolModuleFormat, + "file:": getFileProtocolModuleFormat, + "node:": () => "builtin" +}; +function mimeToFormat(mime) { + if (mime && /\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(mime)) + return "module"; + if (mime === "application/json") return "json"; + return null; +} +function getDataProtocolModuleFormat(parsed) { + const { 1: mime } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec( + parsed.pathname + ) || [null, null, null]; + return mimeToFormat(mime); +} +function extname(url) { + const pathname = url.pathname; + let index = pathname.length; + while (index--) { + const code = pathname.codePointAt(index); + if (code === 47) { + return ""; + } + if (code === 46) { + return pathname.codePointAt(index - 1) === 47 ? "" : pathname.slice(index); + } + } + return ""; +} +function getFileProtocolModuleFormat(url, _context, ignoreErrors) { + const ext = extname(url); + if (ext === ".js") { + const { type: packageType } = getPackageScopeConfig(url); + if (packageType !== "none") { + return packageType; + } + return "commonjs"; + } + if (ext === "") { + const { type: packageType } = getPackageScopeConfig(url); + if (packageType === "none" || packageType === "commonjs") { + return "commonjs"; + } + return "module"; + } + const format = extensionFormatMap[ext]; + if (format) return format; + if (ignoreErrors) { + return void 0; + } + const filepath = fileURLToPath(url); + throw new ERR_UNKNOWN_FILE_EXTENSION(ext, filepath); +} +function defaultGetFormatWithoutErrors(url, context) { + const protocol = url.protocol; + if (!hasOwnProperty.call(protocolHandlers, protocol)) { + return null; + } + return protocolHandlers[protocol](url, context, true) || null; +} + +const RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace]; +const own = {}.hasOwnProperty; +const invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i; +const deprecatedInvalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i; +const invalidPackageNameRegEx = /^\.|%|\\/; +const patternRegEx = /\*/g; +const encodedSeparatorRegEx = /%2f|%5c/i; +const emittedPackageWarnings = /* @__PURE__ */ new Set(); +const doubleSlashRegEx = /[/\\]{2}/; +function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) { + if (process$1.noDeprecation) { + return; + } + const pjsonPath = fileURLToPath(packageJsonUrl); + const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null; + process$1.emitWarning( + `Use of deprecated ${double ? "double slash" : "leading or trailing slash matching"} resolving "${target}" for module request "${request}" ${request === match ? "" : `matched to "${match}" `}in the "${internal ? "imports" : "exports"}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ""}.`, + "DeprecationWarning", + "DEP0166" + ); +} +function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) { + if (process$1.noDeprecation) { + return; + } + const format = defaultGetFormatWithoutErrors(url, { parentURL: base.href }); + if (format !== "module") return; + const urlPath = fileURLToPath(url.href); + const packagePath = fileURLToPath(new URL$1(".", packageJsonUrl)); + const basePath = fileURLToPath(base); + if (!main) { + process$1.emitWarning( + `No "main" or "exports" field defined in the package.json for ${packagePath} resolving the main entry point "${urlPath.slice( + packagePath.length + )}", imported from ${basePath}. +Default "index" lookups for the main are deprecated for ES modules.`, + "DeprecationWarning", + "DEP0151" + ); + } else if (path.resolve(packagePath, main) !== urlPath) { + process$1.emitWarning( + `Package ${packagePath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice( + packagePath.length + )}", imported from ${basePath}. + Automatic extension resolution of the "main" field is deprecated for ES modules.`, + "DeprecationWarning", + "DEP0151" + ); + } +} +function tryStatSync(path2) { + try { + return statSync(path2); + } catch { + } +} +function fileExists(url) { + const stats = statSync(url, { throwIfNoEntry: false }); + const isFile = stats ? stats.isFile() : void 0; + return isFile === null || isFile === void 0 ? false : isFile; +} +function legacyMainResolve(packageJsonUrl, packageConfig, base) { + let guess; + if (packageConfig.main !== void 0) { + guess = new URL$1(packageConfig.main, packageJsonUrl); + if (fileExists(guess)) return guess; + const tries2 = [ + `./${packageConfig.main}.js`, + `./${packageConfig.main}.json`, + `./${packageConfig.main}.node`, + `./${packageConfig.main}/index.js`, + `./${packageConfig.main}/index.json`, + `./${packageConfig.main}/index.node` + ]; + let i2 = -1; + while (++i2 < tries2.length) { + guess = new URL$1(tries2[i2], packageJsonUrl); + if (fileExists(guess)) break; + guess = void 0; + } + if (guess) { + emitLegacyIndexDeprecation( + guess, + packageJsonUrl, + base, + packageConfig.main + ); + return guess; + } + } + const tries = ["./index.js", "./index.json", "./index.node"]; + let i = -1; + while (++i < tries.length) { + guess = new URL$1(tries[i], packageJsonUrl); + if (fileExists(guess)) break; + guess = void 0; + } + if (guess) { + emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main); + return guess; + } + throw new ERR_MODULE_NOT_FOUND( + fileURLToPath(new URL$1(".", packageJsonUrl)), + fileURLToPath(base) + ); +} +function finalizeResolution(resolved, base, preserveSymlinks) { + if (encodedSeparatorRegEx.exec(resolved.pathname) !== null) { + throw new ERR_INVALID_MODULE_SPECIFIER( + resolved.pathname, + String.raw`must not include encoded "/" or "\" characters`, + fileURLToPath(base) + ); + } + let filePath; + try { + filePath = fileURLToPath(resolved); + } catch (error) { + Object.defineProperty(error, "input", { value: String(resolved) }); + Object.defineProperty(error, "module", { value: String(base) }); + throw error; + } + const stats = tryStatSync( + filePath.endsWith("/") ? filePath.slice(-1) : filePath + ); + if (stats && stats.isDirectory()) { + const error = new ERR_UNSUPPORTED_DIR_IMPORT(filePath, fileURLToPath(base)); + error.url = String(resolved); + throw error; + } + if (!stats || !stats.isFile()) { + const error = new ERR_MODULE_NOT_FOUND( + filePath || resolved.pathname, + base && fileURLToPath(base), + true + ); + error.url = String(resolved); + throw error; + } + { + const real = realpathSync(filePath); + const { search, hash } = resolved; + resolved = pathToFileURL(real + (filePath.endsWith(path.sep) ? "/" : "")); + resolved.search = search; + resolved.hash = hash; + } + return resolved; +} +function importNotDefined(specifier, packageJsonUrl, base) { + return new ERR_PACKAGE_IMPORT_NOT_DEFINED( + specifier, + packageJsonUrl && fileURLToPath(new URL$1(".", packageJsonUrl)), + fileURLToPath(base) + ); +} +function exportsNotFound(subpath, packageJsonUrl, base) { + return new ERR_PACKAGE_PATH_NOT_EXPORTED( + fileURLToPath(new URL$1(".", packageJsonUrl)), + subpath, + base && fileURLToPath(base) + ); +} +function throwInvalidSubpath(request, match, packageJsonUrl, internal, base) { + const reason = `request is not a valid match in pattern "${match}" for the "${internal ? "imports" : "exports"}" resolution of ${fileURLToPath(packageJsonUrl)}`; + throw new ERR_INVALID_MODULE_SPECIFIER( + request, + reason, + base && fileURLToPath(base) + ); +} +function invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) { + target = typeof target === "object" && target !== null ? JSON.stringify(target, null, "") : `${target}`; + return new ERR_INVALID_PACKAGE_TARGET( + fileURLToPath(new URL$1(".", packageJsonUrl)), + subpath, + target, + internal, + base && fileURLToPath(base) + ); +} +function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base, pattern, internal, isPathMap, conditions) { + if (subpath !== "" && !pattern && target.at(-1) !== "/") + throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); + if (!target.startsWith("./")) { + if (internal && !target.startsWith("../") && !target.startsWith("/")) { + let isURL = false; + try { + new URL$1(target); + isURL = true; + } catch { + } + if (!isURL) { + const exportTarget = pattern ? RegExpPrototypeSymbolReplace.call( + patternRegEx, + target, + () => subpath + ) : target + subpath; + return packageResolve(exportTarget, packageJsonUrl, conditions); + } + } + throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); + } + if (invalidSegmentRegEx.exec(target.slice(2)) !== null) { + if (deprecatedInvalidSegmentRegEx.exec(target.slice(2)) === null) { + if (!isPathMap) { + const request = pattern ? match.replace("*", () => subpath) : match + subpath; + const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call( + patternRegEx, + target, + () => subpath + ) : target; + emitInvalidSegmentDeprecation( + resolvedTarget, + request, + match, + packageJsonUrl, + internal, + base, + true + ); + } + } else { + throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); + } + } + const resolved = new URL$1(target, packageJsonUrl); + const resolvedPath = resolved.pathname; + const packagePath = new URL$1(".", packageJsonUrl).pathname; + if (!resolvedPath.startsWith(packagePath)) + throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); + if (subpath === "") return resolved; + if (invalidSegmentRegEx.exec(subpath) !== null) { + const request = pattern ? match.replace("*", () => subpath) : match + subpath; + if (deprecatedInvalidSegmentRegEx.exec(subpath) === null) { + if (!isPathMap) { + const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call( + patternRegEx, + target, + () => subpath + ) : target; + emitInvalidSegmentDeprecation( + resolvedTarget, + request, + match, + packageJsonUrl, + internal, + base, + false + ); + } + } else { + throwInvalidSubpath(request, match, packageJsonUrl, internal, base); + } + } + if (pattern) { + return new URL$1( + RegExpPrototypeSymbolReplace.call( + patternRegEx, + resolved.href, + () => subpath + ) + ); + } + return new URL$1(subpath, resolved); +} +function isArrayIndex(key) { + const keyNumber = Number(key); + if (`${keyNumber}` !== key) return false; + return keyNumber >= 0 && keyNumber < 4294967295; +} +function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions) { + if (typeof target === "string") { + return resolvePackageTargetString( + target, + subpath, + packageSubpath, + packageJsonUrl, + base, + pattern, + internal, + isPathMap, + conditions + ); + } + if (Array.isArray(target)) { + const targetList = target; + if (targetList.length === 0) return null; + let lastException; + let i = -1; + while (++i < targetList.length) { + const targetItem = targetList[i]; + let resolveResult; + try { + resolveResult = resolvePackageTarget( + packageJsonUrl, + targetItem, + subpath, + packageSubpath, + base, + pattern, + internal, + isPathMap, + conditions + ); + } catch (error) { + const exception = error; + lastException = exception; + if (exception.code === "ERR_INVALID_PACKAGE_TARGET") continue; + throw error; + } + if (resolveResult === void 0) continue; + if (resolveResult === null) { + lastException = null; + continue; + } + return resolveResult; + } + if (lastException === void 0 || lastException === null) { + return null; + } + throw lastException; + } + if (typeof target === "object" && target !== null) { + const keys = Object.getOwnPropertyNames(target); + let i = -1; + while (++i < keys.length) { + const key = keys[i]; + if (isArrayIndex(key)) { + throw new ERR_INVALID_PACKAGE_CONFIG( + fileURLToPath(packageJsonUrl), + fileURLToPath(base), + '"exports" cannot contain numeric property keys.' + ); + } + } + i = -1; + while (++i < keys.length) { + const key = keys[i]; + if (key === "default" || conditions && conditions.has(key)) { + const conditionalTarget = target[key]; + const resolveResult = resolvePackageTarget( + packageJsonUrl, + conditionalTarget, + subpath, + packageSubpath, + base, + pattern, + internal, + isPathMap, + conditions + ); + if (resolveResult === void 0) continue; + return resolveResult; + } + } + return null; + } + if (target === null) { + return null; + } + throw invalidPackageTarget( + packageSubpath, + target, + packageJsonUrl, + internal, + base + ); +} +function isConditionalExportsMainSugar(exports, packageJsonUrl, base) { + if (typeof exports === "string" || Array.isArray(exports)) return true; + if (typeof exports !== "object" || exports === null) return false; + const keys = Object.getOwnPropertyNames(exports); + let isConditionalSugar = false; + let i = 0; + let keyIndex = -1; + while (++keyIndex < keys.length) { + const key = keys[keyIndex]; + const currentIsConditionalSugar = key === "" || key[0] !== "."; + if (i++ === 0) { + isConditionalSugar = currentIsConditionalSugar; + } else if (isConditionalSugar !== currentIsConditionalSugar) { + throw new ERR_INVALID_PACKAGE_CONFIG( + fileURLToPath(packageJsonUrl), + fileURLToPath(base), + `"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.` + ); + } + } + return isConditionalSugar; +} +function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) { + if (process$1.noDeprecation) { + return; + } + const pjsonPath = fileURLToPath(pjsonUrl); + if (emittedPackageWarnings.has(pjsonPath + "|" + match)) return; + emittedPackageWarnings.add(pjsonPath + "|" + match); + process$1.emitWarning( + `Use of deprecated trailing slash pattern mapping "${match}" in the "exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, + "DeprecationWarning", + "DEP0155" + ); +} +function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions) { + let exports = packageConfig.exports; + if (isConditionalExportsMainSugar(exports, packageJsonUrl, base)) { + exports = { ".": exports }; + } + if (own.call(exports, packageSubpath) && !packageSubpath.includes("*") && !packageSubpath.endsWith("/")) { + const target = exports[packageSubpath]; + const resolveResult = resolvePackageTarget( + packageJsonUrl, + target, + "", + packageSubpath, + base, + false, + false, + false, + conditions + ); + if (resolveResult === null || resolveResult === void 0) { + throw exportsNotFound(packageSubpath, packageJsonUrl, base); + } + return resolveResult; + } + let bestMatch = ""; + let bestMatchSubpath = ""; + const keys = Object.getOwnPropertyNames(exports); + let i = -1; + while (++i < keys.length) { + const key = keys[i]; + const patternIndex = key.indexOf("*"); + if (patternIndex !== -1 && packageSubpath.startsWith(key.slice(0, patternIndex))) { + if (packageSubpath.endsWith("/")) { + emitTrailingSlashPatternDeprecation( + packageSubpath, + packageJsonUrl, + base + ); + } + const patternTrailer = key.slice(patternIndex + 1); + if (packageSubpath.length >= key.length && packageSubpath.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && key.lastIndexOf("*") === patternIndex) { + bestMatch = key; + bestMatchSubpath = packageSubpath.slice( + patternIndex, + packageSubpath.length - patternTrailer.length + ); + } + } + } + if (bestMatch) { + const target = exports[bestMatch]; + const resolveResult = resolvePackageTarget( + packageJsonUrl, + target, + bestMatchSubpath, + bestMatch, + base, + true, + false, + packageSubpath.endsWith("/"), + conditions + ); + if (resolveResult === null || resolveResult === void 0) { + throw exportsNotFound(packageSubpath, packageJsonUrl, base); + } + return resolveResult; + } + throw exportsNotFound(packageSubpath, packageJsonUrl, base); +} +function patternKeyCompare(a, b) { + const aPatternIndex = a.indexOf("*"); + const bPatternIndex = b.indexOf("*"); + const baseLengthA = aPatternIndex === -1 ? a.length : aPatternIndex + 1; + const baseLengthB = bPatternIndex === -1 ? b.length : bPatternIndex + 1; + if (baseLengthA > baseLengthB) return -1; + if (baseLengthB > baseLengthA) return 1; + if (aPatternIndex === -1) return 1; + if (bPatternIndex === -1) return -1; + if (a.length > b.length) return -1; + if (b.length > a.length) return 1; + return 0; +} +function packageImportsResolve(name, base, conditions) { + if (name === "#" || name.startsWith("#/") || name.endsWith("/")) { + const reason = "is not a valid internal imports specifier name"; + throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, fileURLToPath(base)); + } + let packageJsonUrl; + const packageConfig = getPackageScopeConfig(base); + if (packageConfig.exists) { + packageJsonUrl = pathToFileURL(packageConfig.pjsonPath); + const imports = packageConfig.imports; + if (imports) { + if (own.call(imports, name) && !name.includes("*")) { + const resolveResult = resolvePackageTarget( + packageJsonUrl, + imports[name], + "", + name, + base, + false, + true, + false, + conditions + ); + if (resolveResult !== null && resolveResult !== void 0) { + return resolveResult; + } + } else { + let bestMatch = ""; + let bestMatchSubpath = ""; + const keys = Object.getOwnPropertyNames(imports); + let i = -1; + while (++i < keys.length) { + const key = keys[i]; + const patternIndex = key.indexOf("*"); + if (patternIndex !== -1 && name.startsWith(key.slice(0, -1))) { + const patternTrailer = key.slice(patternIndex + 1); + if (name.length >= key.length && name.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && key.lastIndexOf("*") === patternIndex) { + bestMatch = key; + bestMatchSubpath = name.slice( + patternIndex, + name.length - patternTrailer.length + ); + } + } + } + if (bestMatch) { + const target = imports[bestMatch]; + const resolveResult = resolvePackageTarget( + packageJsonUrl, + target, + bestMatchSubpath, + bestMatch, + base, + true, + true, + false, + conditions + ); + if (resolveResult !== null && resolveResult !== void 0) { + return resolveResult; + } + } + } + } + } + throw importNotDefined(name, packageJsonUrl, base); +} +function parsePackageName(specifier, base) { + let separatorIndex = specifier.indexOf("/"); + let validPackageName = true; + let isScoped = false; + if (specifier[0] === "@") { + isScoped = true; + if (separatorIndex === -1 || specifier.length === 0) { + validPackageName = false; + } else { + separatorIndex = specifier.indexOf("/", separatorIndex + 1); + } + } + const packageName = separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex); + if (invalidPackageNameRegEx.exec(packageName) !== null) { + validPackageName = false; + } + if (!validPackageName) { + throw new ERR_INVALID_MODULE_SPECIFIER( + specifier, + "is not a valid package name", + fileURLToPath(base) + ); + } + const packageSubpath = "." + (separatorIndex === -1 ? "" : specifier.slice(separatorIndex)); + return { packageName, packageSubpath, isScoped }; +} +function packageResolve(specifier, base, conditions) { + if (nodeBuiltins.includes(specifier)) { + return new URL$1("node:" + specifier); + } + const { packageName, packageSubpath, isScoped } = parsePackageName( + specifier, + base + ); + const packageConfig = getPackageScopeConfig(base); + if (packageConfig.exists && packageConfig.name === packageName && packageConfig.exports !== void 0 && packageConfig.exports !== null) { + const packageJsonUrl2 = pathToFileURL(packageConfig.pjsonPath); + return packageExportsResolve( + packageJsonUrl2, + packageSubpath, + packageConfig, + base, + conditions + ); + } + let packageJsonUrl = new URL$1( + "./node_modules/" + packageName + "/package.json", + base + ); + let packageJsonPath = fileURLToPath(packageJsonUrl); + let lastPath; + do { + const stat = tryStatSync(packageJsonPath.slice(0, -13)); + if (!stat || !stat.isDirectory()) { + lastPath = packageJsonPath; + packageJsonUrl = new URL$1( + (isScoped ? "../../../../node_modules/" : "../../../node_modules/") + packageName + "/package.json", + packageJsonUrl + ); + packageJsonPath = fileURLToPath(packageJsonUrl); + continue; + } + const packageConfig2 = read(packageJsonPath, { base, specifier }); + if (packageConfig2.exports !== void 0 && packageConfig2.exports !== null) { + return packageExportsResolve( + packageJsonUrl, + packageSubpath, + packageConfig2, + base, + conditions + ); + } + if (packageSubpath === ".") { + return legacyMainResolve(packageJsonUrl, packageConfig2, base); + } + return new URL$1(packageSubpath, packageJsonUrl); + } while (packageJsonPath.length !== lastPath.length); + throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), false); +} +function isRelativeSpecifier(specifier) { + if (specifier[0] === ".") { + if (specifier.length === 1 || specifier[1] === "/") return true; + if (specifier[1] === "." && (specifier.length === 2 || specifier[2] === "/")) { + return true; + } + } + return false; +} +function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) { + if (specifier === "") return false; + if (specifier[0] === "/") return true; + return isRelativeSpecifier(specifier); +} +function moduleResolve(specifier, base, conditions, preserveSymlinks) { + const protocol = base.protocol; + const isData = protocol === "data:"; + let resolved; + if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) { + try { + resolved = new URL$1(specifier, base); + } catch (error_) { + const error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base); + error.cause = error_; + throw error; + } + } else if (protocol === "file:" && specifier[0] === "#") { + resolved = packageImportsResolve(specifier, base, conditions); + } else { + try { + resolved = new URL$1(specifier); + } catch (error_) { + if (isData && !nodeBuiltins.includes(specifier)) { + const error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base); + error.cause = error_; + throw error; + } + resolved = packageResolve(specifier, base, conditions); + } + } + assert(resolved !== void 0, "expected to be defined"); + if (resolved.protocol !== "file:") { + return resolved; + } + return finalizeResolution(resolved, base); +} + +const DEFAULT_CONDITIONS_SET = /* @__PURE__ */ new Set(["node", "import"]); +const isWindows = /* @__PURE__ */ (() => process.platform === "win32")(); +const NOT_FOUND_ERRORS = /* @__PURE__ */ new Set([ + "ERR_MODULE_NOT_FOUND", + "ERR_UNSUPPORTED_DIR_IMPORT", + "MODULE_NOT_FOUND", + "ERR_PACKAGE_PATH_NOT_EXPORTED", + "ERR_PACKAGE_IMPORT_NOT_DEFINED" +]); +const globalCache = /* @__PURE__ */ (() => ( + // eslint-disable-next-line unicorn/no-unreadable-iife + globalThis["__EXSOLVE_CACHE__"] ||= /* @__PURE__ */ new Map() +))(); +function resolveModuleURL(input, options) { + const parsedInput = _parseInput(input); + if ("external" in parsedInput) { + return parsedInput.external; + } + const specifier = parsedInput.specifier; + const url = parsedInput.url; + const absolutePath = parsedInput.absolutePath; + let cacheKey; + let cacheObj; + if (options?.cache !== false) { + cacheKey = _cacheKey(absolutePath || specifier, options); + cacheObj = options?.cache && typeof options?.cache === "object" ? options.cache : globalCache; + } + if (cacheObj) { + const cached = cacheObj.get(cacheKey); + if (typeof cached === "string") { + return cached; + } + if (cached instanceof Error) { + if (options?.try) { + return void 0; + } + throw cached; + } + } + if (absolutePath) { + try { + if (statSync(absolutePath).isFile()) { + if (cacheObj) { + cacheObj.set(cacheKey, url.href); + } + return url.href; + } + } catch (error) { + if (error?.code !== "ENOENT") { + if (cacheObj) { + cacheObj.set(cacheKey, error); + } + throw error; + } + } + } + const conditionsSet = options?.conditions ? new Set(options.conditions) : DEFAULT_CONDITIONS_SET; + const bases = _normalizeBases(options?.from); + const suffixes = options?.suffixes || [""]; + const extensions = options?.extensions ? ["", ...options.extensions] : [""]; + let resolved; + for (const base of bases) { + for (const suffix of suffixes) { + for (const extension of extensions) { + resolved = _tryModuleResolve( + _join(specifier || url.href, suffix) + extension, + base, + conditionsSet + ); + if (resolved) { + break; + } + } + if (resolved) { + break; + } + } + if (resolved) { + break; + } + } + if (!resolved) { + const error = new Error( + `Cannot resolve module "${input}" (from: ${bases.map((u) => _fmtPath(u)).join(", ")})` + ); + error.code = "ERR_MODULE_NOT_FOUND"; + if (cacheObj) { + cacheObj.set(cacheKey, error); + } + if (options?.try) { + return void 0; + } + throw error; + } + if (cacheObj) { + cacheObj.set(cacheKey, resolved.href); + } + return resolved.href; +} +function resolveModulePath(id, options) { + const resolved = resolveModuleURL(id, options); + if (!resolved) { + return void 0; + } + if (!resolved.startsWith("file://") && options?.try) { + return void 0; + } + const absolutePath = fileURLToPath(resolved); + return isWindows ? _normalizeWinPath(absolutePath) : absolutePath; +} +function createResolver(defaults) { + if (defaults?.from) { + defaults = { + ...defaults, + from: _normalizeBases(defaults?.from) + }; + } + return { + resolveModuleURL: (id, opts) => resolveModuleURL(id, { ...defaults, ...opts }), + resolveModulePath: (id, opts) => resolveModulePath(id, { ...defaults, ...opts }), + clearResolveCache: () => { + if (defaults?.cache !== false) { + if (defaults?.cache && typeof defaults?.cache === "object") { + defaults.cache.clear(); + } else { + globalCache.clear(); + } + } + } + }; +} +function clearResolveCache() { + globalCache.clear(); +} +function _tryModuleResolve(specifier, base, conditions) { + try { + return moduleResolve(specifier, base, conditions); + } catch (error) { + if (!NOT_FOUND_ERRORS.has(error?.code)) { + throw error; + } + } +} +function _normalizeBases(inputs) { + const urls = (Array.isArray(inputs) ? inputs : [inputs]).flatMap( + (input) => _normalizeBase(input) + ); + if (urls.length === 0) { + return [pathToFileURL("./")]; + } + return urls; +} +function _normalizeBase(input) { + if (!input) { + return []; + } + if (input instanceof URL) { + return [input]; + } + if (typeof input !== "string") { + return []; + } + if (/^(?:node|data|http|https|file):/.test(input)) { + return new URL(input); + } + try { + if (input.endsWith("/") || statSync(input).isDirectory()) { + return pathToFileURL(input + "/"); + } + return pathToFileURL(input); + } catch { + return [pathToFileURL(input + "/"), pathToFileURL(input)]; + } +} +function _fmtPath(input) { + try { + return fileURLToPath(input); + } catch { + return input; + } +} +function _cacheKey(id, opts) { + return JSON.stringify([ + id, + (opts?.conditions || ["node", "import"]).sort(), + opts?.extensions, + opts?.from, + opts?.suffixes + ]); +} +function _join(a, b) { + if (!a || !b || b === "/") { + return a; + } + return (a.endsWith("/") ? a : a + "/") + (b.startsWith("/") ? b.slice(1) : b); +} +function _normalizeWinPath(path) { + return path.replace(/\\/g, "/").replace(/^[a-z]:\//, (r) => r.toUpperCase()); +} +function _parseInput(input) { + if (typeof input === "string") { + if (input.startsWith("file:")) { + const url = new URL(input); + return { url, absolutePath: fileURLToPath(url) }; + } + if (isAbsolute(input)) { + return { url: pathToFileURL(input), absolutePath: input }; + } + if (/^(?:node|data|http|https):/.test(input)) { + return { external: input }; + } + if (nodeBuiltins.includes(input) && !input.includes(":")) { + return { external: `node:${input}` }; + } + return { specifier: input }; + } + if (input instanceof URL) { + if (input.protocol === "file:") { + return { url: input, absolutePath: fileURLToPath(input) }; + } + return { external: input.href }; + } + throw new TypeError("id must be a `string` or `URL`"); +} + +export { clearResolveCache, createResolver, resolveModulePath, resolveModuleURL }; diff --git a/node_modules/exsolve/package.json b/node_modules/exsolve/package.json new file mode 100644 index 0000000..e3f4646 --- /dev/null +++ b/node_modules/exsolve/package.json @@ -0,0 +1,42 @@ +{ + "name": "exsolve", + "version": "1.0.4", + "description": "Module resolution utilities based on Node.js upstream implementation.", + "repository": "unjs/exsolve", + "license": "MIT", + "sideEffects": false, + "type": "module", + "exports": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "types": "./dist/index.d.mts", + "files": [ + "dist" + ], + "scripts": { + "build": "unbuild", + "dev": "vitest dev", + "lint": "eslint . && prettier -c .", + "node-ts": "node --disable-warning=ExperimentalWarning --experimental-strip-types", + "lint:fix": "automd && eslint . --fix && prettier -w .", + "prepack": "pnpm build", + "release": "pnpm test && changelogen --release && npm publish && git push --follow-tags", + "test": "pnpm lint && pnpm test:types && vitest run --coverage", + "test:types": "tsc --noEmit --skipLibCheck" + }, + "devDependencies": { + "@types/node": "^22.13.5", + "@vitest/coverage-v8": "^3.0.7", + "automd": "^0.3.12", + "changelogen": "^0.5.7", + "eslint": "^9.21.0", + "eslint-config-unjs": "^0.4.2", + "jiti": "^2.4.2", + "prettier": "^3.5.2", + "typescript": "^5.7.3", + "unbuild": "^3.3.1", + "vitest": "^3.0.7" + }, + "packageManager": "pnpm@10.5.0" +} diff --git a/node_modules/finalhandler/HISTORY.md b/node_modules/finalhandler/HISTORY.md new file mode 100644 index 0000000..7faa4f0 --- /dev/null +++ b/node_modules/finalhandler/HISTORY.md @@ -0,0 +1,210 @@ +v1.3.1 / 2024-09-11 +================== + + * deps: encodeurl@~2.0.0 + +v1.3.0 / 2024-09-03 +================== + + * ignore status message for HTTP/2 (#53) + +v1.2.1 / 2024-09-02 +================== + + * Gracefully handle when handling an error and socket is null + +1.2.0 / 2022-03-22 +================== + + * Remove set content headers that break response + * deps: on-finished@2.4.1 + * deps: statuses@2.0.1 + - Rename `425 Unordered Collection` to standard `425 Too Early` + +1.1.2 / 2019-05-09 +================== + + * Set stricter `Content-Security-Policy` header + * deps: parseurl@~1.3.3 + * deps: statuses@~1.5.0 + +1.1.1 / 2018-03-06 +================== + + * Fix 404 output for bad / missing pathnames + * deps: encodeurl@~1.0.2 + - Fix encoding `%` as last character + * deps: statuses@~1.4.0 + +1.1.0 / 2017-09-24 +================== + + * Use `res.headersSent` when available + +1.0.6 / 2017-09-22 +================== + + * deps: debug@2.6.9 + +1.0.5 / 2017-09-15 +================== + + * deps: parseurl@~1.3.2 + - perf: reduce overhead for full URLs + - perf: unroll the "fast-path" `RegExp` + +1.0.4 / 2017-08-03 +================== + + * deps: debug@2.6.8 + +1.0.3 / 2017-05-16 +================== + + * deps: debug@2.6.7 + - deps: ms@2.0.0 + +1.0.2 / 2017-04-22 +================== + + * deps: debug@2.6.4 + - deps: ms@0.7.3 + +1.0.1 / 2017-03-21 +================== + + * Fix missing `` in HTML document + * deps: debug@2.6.3 + - Fix: `DEBUG_MAX_ARRAY_LENGTH` + +1.0.0 / 2017-02-15 +================== + + * Fix exception when `err` cannot be converted to a string + * Fully URL-encode the pathname in the 404 message + * Only include the pathname in the 404 message + * Send complete HTML document + * Set `Content-Security-Policy: default-src 'self'` header + * deps: debug@2.6.1 + - Allow colors in workers + - Deprecated `DEBUG_FD` environment variable set to `3` or higher + - Fix error when running under React Native + - Use same color for same namespace + - deps: ms@0.7.2 + +0.5.1 / 2016-11-12 +================== + + * Fix exception when `err.headers` is not an object + * deps: statuses@~1.3.1 + * perf: hoist regular expressions + * perf: remove duplicate validation path + +0.5.0 / 2016-06-15 +================== + + * Change invalid or non-numeric status code to 500 + * Overwrite status message to match set status code + * Prefer `err.statusCode` if `err.status` is invalid + * Set response headers from `err.headers` object + * Use `statuses` instead of `http` module for status messages + - Includes all defined status messages + +0.4.1 / 2015-12-02 +================== + + * deps: escape-html@~1.0.3 + - perf: enable strict mode + - perf: optimize string replacement + - perf: use faster string coercion + +0.4.0 / 2015-06-14 +================== + + * Fix a false-positive when unpiping in Node.js 0.8 + * Support `statusCode` property on `Error` objects + * Use `unpipe` module for unpiping requests + * deps: escape-html@1.0.2 + * deps: on-finished@~2.3.0 + - Add defined behavior for HTTP `CONNECT` requests + - Add defined behavior for HTTP `Upgrade` requests + - deps: ee-first@1.1.1 + * perf: enable strict mode + * perf: remove argument reassignment + +0.3.6 / 2015-05-11 +================== + + * deps: debug@~2.2.0 + - deps: ms@0.7.1 + +0.3.5 / 2015-04-22 +================== + + * deps: on-finished@~2.2.1 + - Fix `isFinished(req)` when data buffered + +0.3.4 / 2015-03-15 +================== + + * deps: debug@~2.1.3 + - Fix high intensity foreground color for bold + - deps: ms@0.7.0 + +0.3.3 / 2015-01-01 +================== + + * deps: debug@~2.1.1 + * deps: on-finished@~2.2.0 + +0.3.2 / 2014-10-22 +================== + + * deps: on-finished@~2.1.1 + - Fix handling of pipelined requests + +0.3.1 / 2014-10-16 +================== + + * deps: debug@~2.1.0 + - Implement `DEBUG_FD` env variable support + +0.3.0 / 2014-09-17 +================== + + * Terminate in progress response only on error + * Use `on-finished` to determine request status + +0.2.0 / 2014-09-03 +================== + + * Set `X-Content-Type-Options: nosniff` header + * deps: debug@~2.0.0 + +0.1.0 / 2014-07-16 +================== + + * Respond after request fully read + - prevents hung responses and socket hang ups + * deps: debug@1.0.4 + +0.0.3 / 2014-07-11 +================== + + * deps: debug@1.0.3 + - Add support for multiple wildcards in namespaces + +0.0.2 / 2014-06-19 +================== + + * Handle invalid status codes + +0.0.1 / 2014-06-05 +================== + + * deps: debug@1.0.2 + +0.0.0 / 2014-06-05 +================== + + * Extracted from connect/express diff --git a/node_modules/finalhandler/LICENSE b/node_modules/finalhandler/LICENSE new file mode 100644 index 0000000..6022106 --- /dev/null +++ b/node_modules/finalhandler/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014-2022 Douglas Christopher Wilson + +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. diff --git a/node_modules/finalhandler/README.md b/node_modules/finalhandler/README.md new file mode 100644 index 0000000..6244a13 --- /dev/null +++ b/node_modules/finalhandler/README.md @@ -0,0 +1,147 @@ +# finalhandler + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][github-actions-ci-image]][github-actions-ci-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Node.js function to invoke as the final step to respond to HTTP request. + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install finalhandler +``` + +## API + +```js +var finalhandler = require('finalhandler') +``` + +### finalhandler(req, res, [options]) + +Returns function to be invoked as the final step for the given `req` and `res`. +This function is to be invoked as `fn(err)`. If `err` is falsy, the handler will +write out a 404 response to the `res`. If it is truthy, an error response will +be written out to the `res` or `res` will be terminated if a response has already +started. + +When an error is written, the following information is added to the response: + + * The `res.statusCode` is set from `err.status` (or `err.statusCode`). If + this value is outside the 4xx or 5xx range, it will be set to 500. + * The `res.statusMessage` is set according to the status code. + * The body will be the HTML of the status code message if `env` is + `'production'`, otherwise will be `err.stack`. + * Any headers specified in an `err.headers` object. + +The final handler will also unpipe anything from `req` when it is invoked. + +#### options.env + +By default, the environment is determined by `NODE_ENV` variable, but it can be +overridden by this option. + +#### options.onerror + +Provide a function to be called with the `err` when it exists. Can be used for +writing errors to a central location without excessive function generation. Called +as `onerror(err, req, res)`. + +## Examples + +### always 404 + +```js +var finalhandler = require('finalhandler') +var http = require('http') + +var server = http.createServer(function (req, res) { + var done = finalhandler(req, res) + done() +}) + +server.listen(3000) +``` + +### perform simple action + +```js +var finalhandler = require('finalhandler') +var fs = require('fs') +var http = require('http') + +var server = http.createServer(function (req, res) { + var done = finalhandler(req, res) + + fs.readFile('index.html', function (err, buf) { + if (err) return done(err) + res.setHeader('Content-Type', 'text/html') + res.end(buf) + }) +}) + +server.listen(3000) +``` + +### use with middleware-style functions + +```js +var finalhandler = require('finalhandler') +var http = require('http') +var serveStatic = require('serve-static') + +var serve = serveStatic('public') + +var server = http.createServer(function (req, res) { + var done = finalhandler(req, res) + serve(req, res, done) +}) + +server.listen(3000) +``` + +### keep log of all errors + +```js +var finalhandler = require('finalhandler') +var fs = require('fs') +var http = require('http') + +var server = http.createServer(function (req, res) { + var done = finalhandler(req, res, { onerror: logerror }) + + fs.readFile('index.html', function (err, buf) { + if (err) return done(err) + res.setHeader('Content-Type', 'text/html') + res.end(buf) + }) +}) + +server.listen(3000) + +function logerror (err) { + console.error(err.stack || err.toString()) +} +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/finalhandler.svg +[npm-url]: https://npmjs.org/package/finalhandler +[node-image]: https://img.shields.io/node/v/finalhandler.svg +[node-url]: https://nodejs.org/en/download +[coveralls-image]: https://img.shields.io/coveralls/pillarjs/finalhandler.svg +[coveralls-url]: https://coveralls.io/r/pillarjs/finalhandler?branch=master +[downloads-image]: https://img.shields.io/npm/dm/finalhandler.svg +[downloads-url]: https://npmjs.org/package/finalhandler +[github-actions-ci-image]: https://github.com/pillarjs/finalhandler/actions/workflows/ci.yml/badge.svg +[github-actions-ci-url]: https://github.com/pillarjs/finalhandler/actions/workflows/ci.yml diff --git a/node_modules/finalhandler/SECURITY.md b/node_modules/finalhandler/SECURITY.md new file mode 100644 index 0000000..6e23249 --- /dev/null +++ b/node_modules/finalhandler/SECURITY.md @@ -0,0 +1,25 @@ +# Security Policies and Procedures + +## Reporting a Bug + +The `finalhandler` team and community take all security bugs seriously. Thank +you for improving the security of Express. We appreciate your efforts and +responsible disclosure and will make every effort to acknowledge your +contributions. + +Report security bugs by emailing the current owner(s) of `finalhandler`. This +information can be found in the npm registry using the command +`npm owner ls finalhandler`. +If unsure or unable to get the information from the above, open an issue +in the [project issue tracker](https://github.com/pillarjs/finalhandler/issues) +asking for the current contact information. + +To ensure the timely response to your report, please ensure that the entirety +of the report is contained within the email body and not solely behind a web +link or an attachment. + +At least one owner will acknowledge your email within 48 hours, and will send a +more detailed response within 48 hours indicating the next steps in handling +your report. After the initial reply to your report, the owners will +endeavor to keep you informed of the progress towards a fix and full +announcement, and may ask for additional information or guidance. diff --git a/node_modules/finalhandler/index.js b/node_modules/finalhandler/index.js new file mode 100644 index 0000000..ec34be9 --- /dev/null +++ b/node_modules/finalhandler/index.js @@ -0,0 +1,341 @@ +/*! + * finalhandler + * Copyright(c) 2014-2022 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var debug = require('debug')('finalhandler') +var encodeUrl = require('encodeurl') +var escapeHtml = require('escape-html') +var onFinished = require('on-finished') +var parseUrl = require('parseurl') +var statuses = require('statuses') +var unpipe = require('unpipe') + +/** + * Module variables. + * @private + */ + +var DOUBLE_SPACE_REGEXP = /\x20{2}/g +var NEWLINE_REGEXP = /\n/g + +/* istanbul ignore next */ +var defer = typeof setImmediate === 'function' + ? setImmediate + : function (fn) { process.nextTick(fn.bind.apply(fn, arguments)) } +var isFinished = onFinished.isFinished + +/** + * Create a minimal HTML document. + * + * @param {string} message + * @private + */ + +function createHtmlDocument (message) { + var body = escapeHtml(message) + .replace(NEWLINE_REGEXP, '
') + .replace(DOUBLE_SPACE_REGEXP, '  ') + + return '\n' + + '\n' + + '\n' + + '\n' + + 'Error\n' + + '\n' + + '\n' + + '
' + body + '
\n' + + '\n' + + '\n' +} + +/** + * Module exports. + * @public + */ + +module.exports = finalhandler + +/** + * Create a function to handle the final response. + * + * @param {Request} req + * @param {Response} res + * @param {Object} [options] + * @return {Function} + * @public + */ + +function finalhandler (req, res, options) { + var opts = options || {} + + // get environment + var env = opts.env || process.env.NODE_ENV || 'development' + + // get error callback + var onerror = opts.onerror + + return function (err) { + var headers + var msg + var status + + // ignore 404 on in-flight response + if (!err && headersSent(res)) { + debug('cannot 404 after headers sent') + return + } + + // unhandled error + if (err) { + // respect status code from error + status = getErrorStatusCode(err) + + if (status === undefined) { + // fallback to status code on response + status = getResponseStatusCode(res) + } else { + // respect headers from error + headers = getErrorHeaders(err) + } + + // get error message + msg = getErrorMessage(err, status, env) + } else { + // not found + status = 404 + msg = 'Cannot ' + req.method + ' ' + encodeUrl(getResourceName(req)) + } + + debug('default %s', status) + + // schedule onerror callback + if (err && onerror) { + defer(onerror, err, req, res) + } + + // cannot actually respond + if (headersSent(res)) { + debug('cannot %d after headers sent', status) + if (req.socket) { + req.socket.destroy() + } + return + } + + // send response + send(req, res, status, headers, msg) + } +} + +/** + * Get headers from Error object. + * + * @param {Error} err + * @return {object} + * @private + */ + +function getErrorHeaders (err) { + if (!err.headers || typeof err.headers !== 'object') { + return undefined + } + + var headers = Object.create(null) + var keys = Object.keys(err.headers) + + for (var i = 0; i < keys.length; i++) { + var key = keys[i] + headers[key] = err.headers[key] + } + + return headers +} + +/** + * Get message from Error object, fallback to status message. + * + * @param {Error} err + * @param {number} status + * @param {string} env + * @return {string} + * @private + */ + +function getErrorMessage (err, status, env) { + var msg + + if (env !== 'production') { + // use err.stack, which typically includes err.message + msg = err.stack + + // fallback to err.toString() when possible + if (!msg && typeof err.toString === 'function') { + msg = err.toString() + } + } + + return msg || statuses.message[status] +} + +/** + * Get status code from Error object. + * + * @param {Error} err + * @return {number} + * @private + */ + +function getErrorStatusCode (err) { + // check err.status + if (typeof err.status === 'number' && err.status >= 400 && err.status < 600) { + return err.status + } + + // check err.statusCode + if (typeof err.statusCode === 'number' && err.statusCode >= 400 && err.statusCode < 600) { + return err.statusCode + } + + return undefined +} + +/** + * Get resource name for the request. + * + * This is typically just the original pathname of the request + * but will fallback to "resource" is that cannot be determined. + * + * @param {IncomingMessage} req + * @return {string} + * @private + */ + +function getResourceName (req) { + try { + return parseUrl.original(req).pathname + } catch (e) { + return 'resource' + } +} + +/** + * Get status code from response. + * + * @param {OutgoingMessage} res + * @return {number} + * @private + */ + +function getResponseStatusCode (res) { + var status = res.statusCode + + // default status code to 500 if outside valid range + if (typeof status !== 'number' || status < 400 || status > 599) { + status = 500 + } + + return status +} + +/** + * Determine if the response headers have been sent. + * + * @param {object} res + * @returns {boolean} + * @private + */ + +function headersSent (res) { + return typeof res.headersSent !== 'boolean' + ? Boolean(res._header) + : res.headersSent +} + +/** + * Send response. + * + * @param {IncomingMessage} req + * @param {OutgoingMessage} res + * @param {number} status + * @param {object} headers + * @param {string} message + * @private + */ + +function send (req, res, status, headers, message) { + function write () { + // response body + var body = createHtmlDocument(message) + + // response status + res.statusCode = status + + if (req.httpVersionMajor < 2) { + res.statusMessage = statuses.message[status] + } + + // remove any content headers + res.removeHeader('Content-Encoding') + res.removeHeader('Content-Language') + res.removeHeader('Content-Range') + + // response headers + setHeaders(res, headers) + + // security headers + res.setHeader('Content-Security-Policy', "default-src 'none'") + res.setHeader('X-Content-Type-Options', 'nosniff') + + // standard headers + res.setHeader('Content-Type', 'text/html; charset=utf-8') + res.setHeader('Content-Length', Buffer.byteLength(body, 'utf8')) + + if (req.method === 'HEAD') { + res.end() + return + } + + res.end(body, 'utf8') + } + + if (isFinished(req)) { + write() + return + } + + // unpipe everything from the request + unpipe(req) + + // flush the request + onFinished(req, write) + req.resume() +} + +/** + * Set response headers from an object. + * + * @param {OutgoingMessage} res + * @param {object} headers + * @private + */ + +function setHeaders (res, headers) { + if (!headers) { + return + } + + var keys = Object.keys(headers) + for (var i = 0; i < keys.length; i++) { + var key = keys[i] + res.setHeader(key, headers[key]) + } +} diff --git a/node_modules/finalhandler/package.json b/node_modules/finalhandler/package.json new file mode 100644 index 0000000..2363eb4 --- /dev/null +++ b/node_modules/finalhandler/package.json @@ -0,0 +1,47 @@ +{ + "name": "finalhandler", + "description": "Node.js final http responder", + "version": "1.3.1", + "author": "Douglas Christopher Wilson ", + "license": "MIT", + "repository": "pillarjs/finalhandler", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "devDependencies": { + "eslint": "7.32.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.26.0", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "5.2.0", + "eslint-plugin-standard": "4.1.0", + "mocha": "10.0.0", + "nyc": "15.1.0", + "readable-stream": "2.3.6", + "safe-buffer": "5.2.1", + "supertest": "6.2.4" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "SECURITY.md", + "index.js" + ], + "engines": { + "node": ">= 0.8" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec --check-leaks test/", + "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "test-inspect": "mocha --reporter spec --inspect --inspect-brk test/" + } +} diff --git a/node_modules/forwarded/HISTORY.md b/node_modules/forwarded/HISTORY.md new file mode 100644 index 0000000..381e6aa --- /dev/null +++ b/node_modules/forwarded/HISTORY.md @@ -0,0 +1,21 @@ +0.2.0 / 2021-05-31 +================== + + * Use `req.socket` over deprecated `req.connection` + +0.1.2 / 2017-09-14 +================== + + * perf: improve header parsing + * perf: reduce overhead when no `X-Forwarded-For` header + +0.1.1 / 2017-09-10 +================== + + * Fix trimming leading / trailing OWS + * perf: hoist regular expression + +0.1.0 / 2014-09-21 +================== + + * Initial release diff --git a/node_modules/forwarded/LICENSE b/node_modules/forwarded/LICENSE new file mode 100644 index 0000000..84441fb --- /dev/null +++ b/node_modules/forwarded/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014-2017 Douglas Christopher Wilson + +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. diff --git a/node_modules/forwarded/README.md b/node_modules/forwarded/README.md new file mode 100644 index 0000000..fdd220b --- /dev/null +++ b/node_modules/forwarded/README.md @@ -0,0 +1,57 @@ +# forwarded + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][ci-image]][ci-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Parse HTTP X-Forwarded-For header + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install forwarded +``` + +## API + +```js +var forwarded = require('forwarded') +``` + +### forwarded(req) + +```js +var addresses = forwarded(req) +``` + +Parse the `X-Forwarded-For` header from the request. Returns an array +of the addresses, including the socket address for the `req`, in reverse +order (i.e. index `0` is the socket address and the last index is the +furthest address, typically the end-user). + +## Testing + +```sh +$ npm test +``` + +## License + +[MIT](LICENSE) + +[ci-image]: https://badgen.net/github/checks/jshttp/forwarded/master?label=ci +[ci-url]: https://github.com/jshttp/forwarded/actions?query=workflow%3Aci +[npm-image]: https://img.shields.io/npm/v/forwarded.svg +[npm-url]: https://npmjs.org/package/forwarded +[node-version-image]: https://img.shields.io/node/v/forwarded.svg +[node-version-url]: https://nodejs.org/en/download/ +[coveralls-image]: https://img.shields.io/coveralls/jshttp/forwarded/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/forwarded?branch=master +[downloads-image]: https://img.shields.io/npm/dm/forwarded.svg +[downloads-url]: https://npmjs.org/package/forwarded diff --git a/node_modules/forwarded/index.js b/node_modules/forwarded/index.js new file mode 100644 index 0000000..b2b6bdd --- /dev/null +++ b/node_modules/forwarded/index.js @@ -0,0 +1,90 @@ +/*! + * forwarded + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = forwarded + +/** + * Get all addresses in the request, using the `X-Forwarded-For` header. + * + * @param {object} req + * @return {array} + * @public + */ + +function forwarded (req) { + if (!req) { + throw new TypeError('argument req is required') + } + + // simple header parsing + var proxyAddrs = parse(req.headers['x-forwarded-for'] || '') + var socketAddr = getSocketAddr(req) + var addrs = [socketAddr].concat(proxyAddrs) + + // return all addresses + return addrs +} + +/** + * Get the socket address for a request. + * + * @param {object} req + * @return {string} + * @private + */ + +function getSocketAddr (req) { + return req.socket + ? req.socket.remoteAddress + : req.connection.remoteAddress +} + +/** + * Parse the X-Forwarded-For header. + * + * @param {string} header + * @private + */ + +function parse (header) { + var end = header.length + var list = [] + var start = header.length + + // gather addresses, backwards + for (var i = header.length - 1; i >= 0; i--) { + switch (header.charCodeAt(i)) { + case 0x20: /* */ + if (start === end) { + start = end = i + } + break + case 0x2c: /* , */ + if (start !== end) { + list.push(header.substring(start, end)) + } + start = end = i + break + default: + start = i + break + } + } + + // final address + if (start !== end) { + list.push(header.substring(start, end)) + } + + return list +} diff --git a/node_modules/forwarded/package.json b/node_modules/forwarded/package.json new file mode 100644 index 0000000..bf9c7d6 --- /dev/null +++ b/node_modules/forwarded/package.json @@ -0,0 +1,45 @@ +{ + "name": "forwarded", + "description": "Parse HTTP X-Forwarded-For header", + "version": "0.2.0", + "contributors": [ + "Douglas Christopher Wilson " + ], + "license": "MIT", + "keywords": [ + "x-forwarded-for", + "http", + "req" + ], + "repository": "jshttp/forwarded", + "devDependencies": { + "beautify-benchmark": "0.2.4", + "benchmark": "2.1.4", + "deep-equal": "1.0.1", + "eslint": "7.27.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.23.4", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "4.3.1", + "eslint-plugin-standard": "4.1.0", + "mocha": "8.4.0", + "nyc": "15.1.0" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "README.md", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "bench": "node benchmark/index.js", + "lint": "eslint .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "version": "node scripts/version-history.js && git add HISTORY.md" + } +} diff --git a/node_modules/fresh/HISTORY.md b/node_modules/fresh/HISTORY.md new file mode 100644 index 0000000..4586996 --- /dev/null +++ b/node_modules/fresh/HISTORY.md @@ -0,0 +1,70 @@ +0.5.2 / 2017-09-13 +================== + + * Fix regression matching multiple ETags in `If-None-Match` + * perf: improve `If-None-Match` token parsing + +0.5.1 / 2017-09-11 +================== + + * Fix handling of modified headers with invalid dates + * perf: improve ETag match loop + +0.5.0 / 2017-02-21 +================== + + * Fix incorrect result when `If-None-Match` has both `*` and ETags + * Fix weak `ETag` matching to match spec + * perf: delay reading header values until needed + * perf: skip checking modified time if ETag check failed + * perf: skip parsing `If-None-Match` when no `ETag` header + * perf: use `Date.parse` instead of `new Date` + +0.4.0 / 2017-02-05 +================== + + * Fix false detection of `no-cache` request directive + * perf: enable strict mode + * perf: hoist regular expressions + * perf: remove duplicate conditional + * perf: remove unnecessary boolean coercions + +0.3.0 / 2015-05-12 +================== + + * Add weak `ETag` matching support + +0.2.4 / 2014-09-07 +================== + + * Support Node.js 0.6 + +0.2.3 / 2014-09-07 +================== + + * Move repository to jshttp + +0.2.2 / 2014-02-19 +================== + + * Revert "Fix for blank page on Safari reload" + +0.2.1 / 2014-01-29 +================== + + * Fix for blank page on Safari reload + +0.2.0 / 2013-08-11 +================== + + * Return stale for `Cache-Control: no-cache` + +0.1.0 / 2012-06-15 +================== + + * Add `If-None-Match: *` support + +0.0.1 / 2012-06-10 +================== + + * Initial release diff --git a/node_modules/fresh/LICENSE b/node_modules/fresh/LICENSE new file mode 100644 index 0000000..1434ade --- /dev/null +++ b/node_modules/fresh/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2012 TJ Holowaychuk +Copyright (c) 2016-2017 Douglas Christopher Wilson + +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. diff --git a/node_modules/fresh/README.md b/node_modules/fresh/README.md new file mode 100644 index 0000000..1c1c680 --- /dev/null +++ b/node_modules/fresh/README.md @@ -0,0 +1,119 @@ +# fresh + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +HTTP response freshness testing + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +``` +$ npm install fresh +``` + +## API + + + +```js +var fresh = require('fresh') +``` + +### fresh(reqHeaders, resHeaders) + +Check freshness of the response using request and response headers. + +When the response is still "fresh" in the client's cache `true` is +returned, otherwise `false` is returned to indicate that the client +cache is now stale and the full response should be sent. + +When a client sends the `Cache-Control: no-cache` request header to +indicate an end-to-end reload request, this module will return `false` +to make handling these requests transparent. + +## Known Issues + +This module is designed to only follow the HTTP specifications, not +to work-around all kinda of client bugs (especially since this module +typically does not recieve enough information to understand what the +client actually is). + +There is a known issue that in certain versions of Safari, Safari +will incorrectly make a request that allows this module to validate +freshness of the resource even when Safari does not have a +representation of the resource in the cache. The module +[jumanji](https://www.npmjs.com/package/jumanji) can be used in +an Express application to work-around this issue and also provides +links to further reading on this Safari bug. + +## Example + +### API usage + + + +```js +var reqHeaders = { 'if-none-match': '"foo"' } +var resHeaders = { 'etag': '"bar"' } +fresh(reqHeaders, resHeaders) +// => false + +var reqHeaders = { 'if-none-match': '"foo"' } +var resHeaders = { 'etag': '"foo"' } +fresh(reqHeaders, resHeaders) +// => true +``` + +### Using with Node.js http server + +```js +var fresh = require('fresh') +var http = require('http') + +var server = http.createServer(function (req, res) { + // perform server logic + // ... including adding ETag / Last-Modified response headers + + if (isFresh(req, res)) { + // client has a fresh copy of resource + res.statusCode = 304 + res.end() + return + } + + // send the resource + res.statusCode = 200 + res.end('hello, world!') +}) + +function isFresh (req, res) { + return fresh(req.headers, { + 'etag': res.getHeader('ETag'), + 'last-modified': res.getHeader('Last-Modified') + }) +} + +server.listen(3000) +``` + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/fresh.svg +[npm-url]: https://npmjs.org/package/fresh +[node-version-image]: https://img.shields.io/node/v/fresh.svg +[node-version-url]: https://nodejs.org/en/ +[travis-image]: https://img.shields.io/travis/jshttp/fresh/master.svg +[travis-url]: https://travis-ci.org/jshttp/fresh +[coveralls-image]: https://img.shields.io/coveralls/jshttp/fresh/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/fresh?branch=master +[downloads-image]: https://img.shields.io/npm/dm/fresh.svg +[downloads-url]: https://npmjs.org/package/fresh diff --git a/node_modules/fresh/index.js b/node_modules/fresh/index.js new file mode 100644 index 0000000..d154f5a --- /dev/null +++ b/node_modules/fresh/index.js @@ -0,0 +1,137 @@ +/*! + * fresh + * Copyright(c) 2012 TJ Holowaychuk + * Copyright(c) 2016-2017 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * RegExp to check for no-cache token in Cache-Control. + * @private + */ + +var CACHE_CONTROL_NO_CACHE_REGEXP = /(?:^|,)\s*?no-cache\s*?(?:,|$)/ + +/** + * Module exports. + * @public + */ + +module.exports = fresh + +/** + * Check freshness of the response using request and response headers. + * + * @param {Object} reqHeaders + * @param {Object} resHeaders + * @return {Boolean} + * @public + */ + +function fresh (reqHeaders, resHeaders) { + // fields + var modifiedSince = reqHeaders['if-modified-since'] + var noneMatch = reqHeaders['if-none-match'] + + // unconditional request + if (!modifiedSince && !noneMatch) { + return false + } + + // Always return stale when Cache-Control: no-cache + // to support end-to-end reload requests + // https://tools.ietf.org/html/rfc2616#section-14.9.4 + var cacheControl = reqHeaders['cache-control'] + if (cacheControl && CACHE_CONTROL_NO_CACHE_REGEXP.test(cacheControl)) { + return false + } + + // if-none-match + if (noneMatch && noneMatch !== '*') { + var etag = resHeaders['etag'] + + if (!etag) { + return false + } + + var etagStale = true + var matches = parseTokenList(noneMatch) + for (var i = 0; i < matches.length; i++) { + var match = matches[i] + if (match === etag || match === 'W/' + etag || 'W/' + match === etag) { + etagStale = false + break + } + } + + if (etagStale) { + return false + } + } + + // if-modified-since + if (modifiedSince) { + var lastModified = resHeaders['last-modified'] + var modifiedStale = !lastModified || !(parseHttpDate(lastModified) <= parseHttpDate(modifiedSince)) + + if (modifiedStale) { + return false + } + } + + return true +} + +/** + * Parse an HTTP Date into a number. + * + * @param {string} date + * @private + */ + +function parseHttpDate (date) { + var timestamp = date && Date.parse(date) + + // istanbul ignore next: guard against date.js Date.parse patching + return typeof timestamp === 'number' + ? timestamp + : NaN +} + +/** + * Parse a HTTP token list. + * + * @param {string} str + * @private + */ + +function parseTokenList (str) { + var end = 0 + var list = [] + var start = 0 + + // gather tokens + for (var i = 0, len = str.length; i < len; i++) { + switch (str.charCodeAt(i)) { + case 0x20: /* */ + if (start === end) { + start = end = i + 1 + } + break + case 0x2c: /* , */ + list.push(str.substring(start, end)) + start = end = i + 1 + break + default: + end = i + 1 + break + } + } + + // final token + list.push(str.substring(start, end)) + + return list +} diff --git a/node_modules/fresh/package.json b/node_modules/fresh/package.json new file mode 100644 index 0000000..c2fa0f4 --- /dev/null +++ b/node_modules/fresh/package.json @@ -0,0 +1,46 @@ +{ + "name": "fresh", + "description": "HTTP response freshness testing", + "version": "0.5.2", + "author": "TJ Holowaychuk (http://tjholowaychuk.com)", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)" + ], + "license": "MIT", + "keywords": [ + "fresh", + "http", + "conditional", + "cache" + ], + "repository": "jshttp/fresh", + "devDependencies": { + "beautify-benchmark": "0.2.4", + "benchmark": "2.1.4", + "eslint": "3.19.0", + "eslint-config-standard": "10.2.1", + "eslint-plugin-import": "2.7.0", + "eslint-plugin-markdown": "1.0.0-beta.6", + "eslint-plugin-node": "5.1.1", + "eslint-plugin-promise": "3.5.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "1.21.5" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "bench": "node benchmark/index.js", + "lint": "eslint --plugin markdown --ext js,md .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + } +} diff --git a/node_modules/fsevents/LICENSE b/node_modules/fsevents/LICENSE new file mode 100644 index 0000000..5d70441 --- /dev/null +++ b/node_modules/fsevents/LICENSE @@ -0,0 +1,22 @@ +MIT License +----------- + +Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller + +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. diff --git a/node_modules/fsevents/README.md b/node_modules/fsevents/README.md new file mode 100644 index 0000000..50373a0 --- /dev/null +++ b/node_modules/fsevents/README.md @@ -0,0 +1,89 @@ +# fsevents + +Native access to MacOS FSEvents in [Node.js](https://nodejs.org/) + +The FSEvents API in MacOS allows applications to register for notifications of +changes to a given directory tree. It is a very fast and lightweight alternative +to kqueue. + +This is a low-level library. For a cross-platform file watching module that +uses fsevents, check out [Chokidar](https://github.com/paulmillr/chokidar). + +## Usage + +```sh +npm install fsevents +``` + +Supports only **Node.js v8.16 and higher**. + +```js +const fsevents = require('fsevents'); + +// To start observation +const stop = fsevents.watch(__dirname, (path, flags, id) => { + const info = fsevents.getInfo(path, flags); +}); + +// To end observation +stop(); +``` + +> **Important note:** The API behaviour is slightly different from typical JS APIs. The `stop` function **must** be +> retrieved and stored somewhere, even if you don't plan to stop the watcher. If you forget it, the garbage collector +> will eventually kick in, the watcher will be unregistered, and your callbacks won't be called anymore. + +The callback passed as the second parameter to `.watch` get's called whenever the operating system detects a +a change in the file system. It takes three arguments: + +###### `fsevents.watch(dirname: string, (path: string, flags: number, id: string) => void): () => Promise` + + * `path: string` - the item in the filesystem that have been changed + * `flags: number` - a numeric value describing what the change was + * `id: string` - an unique-id identifying this specific event + + Returns closer callback which when called returns a Promise resolving when the watcher process has been shut down. + +###### `fsevents.getInfo(path: string, flags: number, id: string): FsEventInfo` + +The `getInfo` function takes the `path`, `flags` and `id` arguments and converts those parameters into a structure +that is easier to digest to determine what the change was. + +The `FsEventsInfo` has the following shape: + +```js +/** + * @typedef {'created'|'modified'|'deleted'|'moved'|'root-changed'|'cloned'|'unknown'} FsEventsEvent + * @typedef {'file'|'directory'|'symlink'} FsEventsType + */ +{ + "event": "created", // {FsEventsEvent} + "path": "file.txt", + "type": "file", // {FsEventsType} + "changes": { + "inode": true, // Had iNode Meta-Information changed + "finder": false, // Had Finder Meta-Data changed + "access": false, // Had access permissions changed + "xattrs": false // Had xAttributes changed + }, + "flags": 0x100000000 +} +``` + +## Changelog + +- v2.3 supports Apple Silicon ARM CPUs +- v2 supports node 8.16+ and reduces package size massively +- v1.2.8 supports node 6+ +- v1.2.7 supports node 4+ + +## Troubleshooting + +- I'm getting `EBADPLATFORM` `Unsupported platform for fsevents` error. +- It's fine, nothing is broken. fsevents is macos-only. Other platforms are skipped. If you want to hide this warning, report a bug to NPM bugtracker asking them to hide ebadplatform warnings by default. + +## License + +The MIT License Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller — see LICENSE file. + +Visit our [GitHub page](https://github.com/fsevents/fsevents) and [NPM Page](https://npmjs.org/package/fsevents) diff --git a/node_modules/fsevents/fsevents.d.ts b/node_modules/fsevents/fsevents.d.ts new file mode 100644 index 0000000..2723c04 --- /dev/null +++ b/node_modules/fsevents/fsevents.d.ts @@ -0,0 +1,46 @@ +declare type Event = "created" | "cloned" | "modified" | "deleted" | "moved" | "root-changed" | "unknown"; +declare type Type = "file" | "directory" | "symlink"; +declare type FileChanges = { + inode: boolean; + finder: boolean; + access: boolean; + xattrs: boolean; +}; +declare type Info = { + event: Event; + path: string; + type: Type; + changes: FileChanges; + flags: number; +}; +declare type WatchHandler = (path: string, flags: number, id: string) => void; +export declare function watch(path: string, handler: WatchHandler): () => Promise; +export declare function watch(path: string, since: number, handler: WatchHandler): () => Promise; +export declare function getInfo(path: string, flags: number): Info; +export declare const constants: { + None: 0x00000000; + MustScanSubDirs: 0x00000001; + UserDropped: 0x00000002; + KernelDropped: 0x00000004; + EventIdsWrapped: 0x00000008; + HistoryDone: 0x00000010; + RootChanged: 0x00000020; + Mount: 0x00000040; + Unmount: 0x00000080; + ItemCreated: 0x00000100; + ItemRemoved: 0x00000200; + ItemInodeMetaMod: 0x00000400; + ItemRenamed: 0x00000800; + ItemModified: 0x00001000; + ItemFinderInfoMod: 0x00002000; + ItemChangeOwner: 0x00004000; + ItemXattrMod: 0x00008000; + ItemIsFile: 0x00010000; + ItemIsDir: 0x00020000; + ItemIsSymlink: 0x00040000; + ItemIsHardlink: 0x00100000; + ItemIsLastHardlink: 0x00200000; + OwnEvent: 0x00080000; + ItemCloned: 0x00400000; +}; +export {}; diff --git a/node_modules/fsevents/fsevents.js b/node_modules/fsevents/fsevents.js new file mode 100644 index 0000000..198da98 --- /dev/null +++ b/node_modules/fsevents/fsevents.js @@ -0,0 +1,83 @@ +/* + ** © 2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller + ** Licensed under MIT License. + */ + +/* jshint node:true */ +"use strict"; + +if (process.platform !== "darwin") { + throw new Error(`Module 'fsevents' is not compatible with platform '${process.platform}'`); +} + +const Native = require("./fsevents.node"); +const events = Native.constants; + +function watch(path, since, handler) { + if (typeof path !== "string") { + throw new TypeError(`fsevents argument 1 must be a string and not a ${typeof path}`); + } + if ("function" === typeof since && "undefined" === typeof handler) { + handler = since; + since = Native.flags.SinceNow; + } + if (typeof since !== "number") { + throw new TypeError(`fsevents argument 2 must be a number and not a ${typeof since}`); + } + if (typeof handler !== "function") { + throw new TypeError(`fsevents argument 3 must be a function and not a ${typeof handler}`); + } + + let instance = Native.start(Native.global, path, since, handler); + if (!instance) throw new Error(`could not watch: ${path}`); + return () => { + const result = instance ? Promise.resolve(instance).then(Native.stop) : Promise.resolve(undefined); + instance = undefined; + return result; + }; +} + +function getInfo(path, flags) { + return { + path, + flags, + event: getEventType(flags), + type: getFileType(flags), + changes: getFileChanges(flags), + }; +} + +function getFileType(flags) { + if (events.ItemIsFile & flags) return "file"; + if (events.ItemIsDir & flags) return "directory"; + if (events.MustScanSubDirs & flags) return "directory"; + if (events.ItemIsSymlink & flags) return "symlink"; +} +function anyIsTrue(obj) { + for (let key in obj) { + if (obj[key]) return true; + } + return false; +} +function getEventType(flags) { + if (events.ItemRemoved & flags) return "deleted"; + if (events.ItemRenamed & flags) return "moved"; + if (events.ItemCreated & flags) return "created"; + if (events.ItemModified & flags) return "modified"; + if (events.RootChanged & flags) return "root-changed"; + if (events.ItemCloned & flags) return "cloned"; + if (anyIsTrue(flags)) return "modified"; + return "unknown"; +} +function getFileChanges(flags) { + return { + inode: !!(events.ItemInodeMetaMod & flags), + finder: !!(events.ItemFinderInfoMod & flags), + access: !!(events.ItemChangeOwner & flags), + xattrs: !!(events.ItemXattrMod & flags), + }; +} + +exports.watch = watch; +exports.getInfo = getInfo; +exports.constants = events; diff --git a/node_modules/fsevents/fsevents.node b/node_modules/fsevents/fsevents.node new file mode 100755 index 0000000..1cc3345 Binary files /dev/null and b/node_modules/fsevents/fsevents.node differ diff --git a/node_modules/fsevents/package.json b/node_modules/fsevents/package.json new file mode 100644 index 0000000..5d0ee15 --- /dev/null +++ b/node_modules/fsevents/package.json @@ -0,0 +1,62 @@ +{ + "name": "fsevents", + "version": "2.3.3", + "description": "Native Access to MacOS FSEvents", + "main": "fsevents.js", + "types": "fsevents.d.ts", + "os": [ + "darwin" + ], + "files": [ + "fsevents.d.ts", + "fsevents.js", + "fsevents.node" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + }, + "scripts": { + "clean": "node-gyp clean && rm -f fsevents.node", + "build": "node-gyp clean && rm -f fsevents.node && node-gyp rebuild && node-gyp clean", + "test": "/bin/bash ./test.sh 2>/dev/null", + "prepublishOnly": "npm run build" + }, + "repository": { + "type": "git", + "url": "https://github.com/fsevents/fsevents.git" + }, + "keywords": [ + "fsevents", + "mac" + ], + "contributors": [ + { + "name": "Philipp Dunkel", + "email": "pip@pipobscure.com" + }, + { + "name": "Ben Noordhuis", + "email": "info@bnoordhuis.nl" + }, + { + "name": "Elan Shankar", + "email": "elan.shanker@gmail.com" + }, + { + "name": "Miroslav Bajtoš", + "email": "mbajtoss@gmail.com" + }, + { + "name": "Paul Miller", + "url": "https://paulmillr.com" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/fsevents/fsevents/issues" + }, + "homepage": "https://github.com/fsevents/fsevents", + "devDependencies": { + "node-gyp": "^9.4.0" + } +} diff --git a/node_modules/function-bind/.eslintrc b/node_modules/function-bind/.eslintrc new file mode 100644 index 0000000..71a054f --- /dev/null +++ b/node_modules/function-bind/.eslintrc @@ -0,0 +1,21 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + "indent": [2, 4], + "no-new-func": [1], + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "max-lines-per-function": 0, + "strict": [0] + }, + }, + ], +} diff --git a/node_modules/function-bind/.github/FUNDING.yml b/node_modules/function-bind/.github/FUNDING.yml new file mode 100644 index 0000000..7448219 --- /dev/null +++ b/node_modules/function-bind/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/function-bind +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/function-bind/.github/SECURITY.md b/node_modules/function-bind/.github/SECURITY.md new file mode 100644 index 0000000..82e4285 --- /dev/null +++ b/node_modules/function-bind/.github/SECURITY.md @@ -0,0 +1,3 @@ +# Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. diff --git a/node_modules/function-bind/.nycrc b/node_modules/function-bind/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/function-bind/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/function-bind/CHANGELOG.md b/node_modules/function-bind/CHANGELOG.md new file mode 100644 index 0000000..f9e6cc0 --- /dev/null +++ b/node_modules/function-bind/CHANGELOG.md @@ -0,0 +1,136 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.2](https://github.com/ljharb/function-bind/compare/v1.1.1...v1.1.2) - 2023-10-12 + +### Merged + +- Point to the correct file [`#16`](https://github.com/ljharb/function-bind/pull/16) + +### Commits + +- [Tests] migrate tests to Github Actions [`4f8b57c`](https://github.com/ljharb/function-bind/commit/4f8b57c02f2011fe9ae353d5e74e8745f0988af8) +- [Tests] remove `jscs` [`90eb2ed`](https://github.com/ljharb/function-bind/commit/90eb2edbeefd5b76cd6c3a482ea3454db169b31f) +- [meta] update `.gitignore` [`53fcdc3`](https://github.com/ljharb/function-bind/commit/53fcdc371cd66634d6e9b71c836a50f437e89fed) +- [Tests] up to `node` `v11.10`, `v10.15`, `v9.11`, `v8.15`, `v6.16`, `v4.9`; use `nvm install-latest-npm`; run audit script in tests [`1fe8f6e`](https://github.com/ljharb/function-bind/commit/1fe8f6e9aed0dfa8d8b3cdbd00c7f5ea0cd2b36e) +- [meta] add `auto-changelog` [`1921fcb`](https://github.com/ljharb/function-bind/commit/1921fcb5b416b63ffc4acad051b6aad5722f777d) +- [Robustness] remove runtime dependency on all builtins except `.apply` [`f743e61`](https://github.com/ljharb/function-bind/commit/f743e61aa6bb2360358c04d4884c9db853d118b7) +- Docs: enable badges; update wording [`503cb12`](https://github.com/ljharb/function-bind/commit/503cb12d998b5f91822776c73332c7adcd6355dd) +- [readme] update badges [`290c5db`](https://github.com/ljharb/function-bind/commit/290c5dbbbda7264efaeb886552a374b869a4bb48) +- [Tests] switch to nyc for coverage [`ea360ba`](https://github.com/ljharb/function-bind/commit/ea360ba907fc2601ed18d01a3827fa2d3533cdf8) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`cae5e9e`](https://github.com/ljharb/function-bind/commit/cae5e9e07a5578dc6df26c03ee22851ce05b943c) +- [meta] add `funding` field; create FUNDING.yml [`c9f4274`](https://github.com/ljharb/function-bind/commit/c9f4274aa80ea3aae9657a3938fdba41a3b04ca6) +- [Tests] fix eslint errors from #15 [`f69aaa2`](https://github.com/ljharb/function-bind/commit/f69aaa2beb2fdab4415bfb885760a699d0b9c964) +- [actions] fix permissions [`99a0cd9`](https://github.com/ljharb/function-bind/commit/99a0cd9f3b5bac223a0d572f081834cd73314be7) +- [meta] use `npmignore` to autogenerate an npmignore file [`f03b524`](https://github.com/ljharb/function-bind/commit/f03b524ca91f75a109a5d062f029122c86ecd1ae) +- [Dev Deps] update `@ljharb/eslint‑config`, `eslint`, `tape` [`7af9300`](https://github.com/ljharb/function-bind/commit/7af930023ae2ce7645489532821e4fbbcd7a2280) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`64a9127`](https://github.com/ljharb/function-bind/commit/64a9127ab0bd331b93d6572eaf6e9971967fc08c) +- [Tests] use `aud` instead of `npm audit` [`e75069c`](https://github.com/ljharb/function-bind/commit/e75069c50010a8fcce2a9ce2324934c35fdb4386) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`d03555c`](https://github.com/ljharb/function-bind/commit/d03555ca59dea3b71ce710045e4303b9e2619e28) +- [meta] add `safe-publish-latest` [`9c8f809`](https://github.com/ljharb/function-bind/commit/9c8f8092aed027d7e80c94f517aa892385b64f09) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`baf6893`](https://github.com/ljharb/function-bind/commit/baf6893e27f5b59abe88bc1995e6f6ed1e527397) +- [meta] create SECURITY.md [`4db1779`](https://github.com/ljharb/function-bind/commit/4db17799f1f28ae294cb95e0081ca2b591c3911b) +- [Tests] add `npm run audit` [`c8b38ec`](https://github.com/ljharb/function-bind/commit/c8b38ec40ed3f85dabdee40ed4148f1748375bc2) +- Revert "Point to the correct file" [`05cdf0f`](https://github.com/ljharb/function-bind/commit/05cdf0fa205c6a3c5ba40bbedd1dfa9874f915c9) + +## [v1.1.1](https://github.com/ljharb/function-bind/compare/v1.1.0...v1.1.1) - 2017-08-28 + +### Commits + +- [Tests] up to `node` `v8`; newer npm breaks on older node; fix scripts [`817f7d2`](https://github.com/ljharb/function-bind/commit/817f7d28470fdbff8ef608d4d565dd4d1430bc5e) +- [Dev Deps] update `eslint`, `jscs`, `tape`, `@ljharb/eslint-config` [`854288b`](https://github.com/ljharb/function-bind/commit/854288b1b6f5c555f89aceb9eff1152510262084) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`83e639f`](https://github.com/ljharb/function-bind/commit/83e639ff74e6cd6921285bccec22c1bcf72311bd) +- Only apps should have lockfiles [`5ed97f5`](https://github.com/ljharb/function-bind/commit/5ed97f51235c17774e0832e122abda0f3229c908) +- Use a SPDX-compliant “license” field. [`5feefea`](https://github.com/ljharb/function-bind/commit/5feefea0dc0193993e83e5df01ded424403a5381) + +## [v1.1.0](https://github.com/ljharb/function-bind/compare/v1.0.2...v1.1.0) - 2016-02-14 + +### Commits + +- Update `eslint`, `tape`; use my personal shared `eslint` config [`9c9062a`](https://github.com/ljharb/function-bind/commit/9c9062abbe9dd70b59ea2c3a3c3a81f29b457097) +- Add `npm run eslint` [`dd96c56`](https://github.com/ljharb/function-bind/commit/dd96c56720034a3c1ffee10b8a59a6f7c53e24ad) +- [New] return the native `bind` when available. [`82186e0`](https://github.com/ljharb/function-bind/commit/82186e03d73e580f95ff167e03f3582bed90ed72) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`a3dd767`](https://github.com/ljharb/function-bind/commit/a3dd76720c795cb7f4586b0544efabf8aa107b8b) +- Update `eslint` [`3dae2f7`](https://github.com/ljharb/function-bind/commit/3dae2f7423de30a2d20313ddb1edc19660142fe9) +- Update `tape`, `covert`, `jscs` [`a181eee`](https://github.com/ljharb/function-bind/commit/a181eee0cfa24eb229c6e843a971f36e060a2f6a) +- [Tests] up to `node` `v5.6`, `v4.3` [`964929a`](https://github.com/ljharb/function-bind/commit/964929a6a4ddb36fb128de2bcc20af5e4f22e1ed) +- Test up to `io.js` `v2.1` [`2be7310`](https://github.com/ljharb/function-bind/commit/2be7310f2f74886a7124ca925be411117d41d5ea) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`45f3d68`](https://github.com/ljharb/function-bind/commit/45f3d6865c6ca93726abcef54febe009087af101) +- [Dev Deps] update `tape`, `jscs` [`6e1340d`](https://github.com/ljharb/function-bind/commit/6e1340d94642deaecad3e717825db641af4f8b1f) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`d9bad2b`](https://github.com/ljharb/function-bind/commit/d9bad2b778b1b3a6dd2876087b88b3acf319f8cc) +- Update `eslint` [`935590c`](https://github.com/ljharb/function-bind/commit/935590caa024ab356102e4858e8fc315b2ccc446) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`8c9a1ef`](https://github.com/ljharb/function-bind/commit/8c9a1efd848e5167887aa8501857a0940a480c57) +- Test on `io.js` `v2.2` [`9a3a38c`](https://github.com/ljharb/function-bind/commit/9a3a38c92013aed6e108666e7bd40969b84ac86e) +- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`69afc26`](https://github.com/ljharb/function-bind/commit/69afc2617405b147dd2a8d8ae73ca9e9283f18b4) +- [Dev Deps] Update `tape`, `eslint` [`36c1be0`](https://github.com/ljharb/function-bind/commit/36c1be0ab12b45fe5df6b0fdb01a5d5137fd0115) +- Update `tape`, `jscs` [`98d8303`](https://github.com/ljharb/function-bind/commit/98d8303cd5ca1c6b8f985469f86b0d44d7d45f6e) +- Update `jscs` [`9633a4e`](https://github.com/ljharb/function-bind/commit/9633a4e9fbf82051c240855166e468ba8ba0846f) +- Update `tape`, `jscs` [`c80ef0f`](https://github.com/ljharb/function-bind/commit/c80ef0f46efc9791e76fa50de4414092ac147831) +- Test up to `io.js` `v3.0` [`7e2c853`](https://github.com/ljharb/function-bind/commit/7e2c8537d52ab9cf5a655755561d8917684c0df4) +- Test on `io.js` `v2.4` [`5a199a2`](https://github.com/ljharb/function-bind/commit/5a199a27ba46795ba5eaf0845d07d4b8232895c9) +- Test on `io.js` `v2.3` [`a511b88`](https://github.com/ljharb/function-bind/commit/a511b8896de0bddf3b56862daa416c701f4d0453) +- Fixing a typo from 822b4e1938db02dc9584aa434fd3a45cb20caf43 [`732d6b6`](https://github.com/ljharb/function-bind/commit/732d6b63a9b33b45230e630dbcac7a10855d3266) +- Update `jscs` [`da52a48`](https://github.com/ljharb/function-bind/commit/da52a4886c06d6490f46ae30b15e4163ba08905d) +- Lock covert to v1.0.0. [`d6150fd`](https://github.com/ljharb/function-bind/commit/d6150fda1e6f486718ebdeff823333d9e48e7430) + +## [v1.0.2](https://github.com/ljharb/function-bind/compare/v1.0.1...v1.0.2) - 2014-10-04 + +## [v1.0.1](https://github.com/ljharb/function-bind/compare/v1.0.0...v1.0.1) - 2014-10-03 + +### Merged + +- make CI build faster [`#3`](https://github.com/ljharb/function-bind/pull/3) + +### Commits + +- Using my standard jscs.json [`d8ee94c`](https://github.com/ljharb/function-bind/commit/d8ee94c993eff0a84cf5744fe6a29627f5cffa1a) +- Adding `npm run lint` [`7571ab7`](https://github.com/ljharb/function-bind/commit/7571ab7dfdbd99b25a1dbb2d232622bd6f4f9c10) +- Using consistent indentation [`e91a1b1`](https://github.com/ljharb/function-bind/commit/e91a1b13a61e99ec1e530e299b55508f74218a95) +- Updating jscs [`7e17892`](https://github.com/ljharb/function-bind/commit/7e1789284bc629bc9c1547a61c9b227bbd8c7a65) +- Using consistent quotes [`c50b57f`](https://github.com/ljharb/function-bind/commit/c50b57fcd1c5ec38320979c837006069ebe02b77) +- Adding keywords [`cb94631`](https://github.com/ljharb/function-bind/commit/cb946314eed35f21186a25fb42fc118772f9ee00) +- Directly export a function expression instead of using a declaration, and relying on hoisting. [`5a33c5f`](https://github.com/ljharb/function-bind/commit/5a33c5f45642de180e0d207110bf7d1843ceb87c) +- Naming npm URL and badge in README; use SVG [`2aef8fc`](https://github.com/ljharb/function-bind/commit/2aef8fcb79d54e63a58ae557c4e60949e05d5e16) +- Naming deps URLs in README [`04228d7`](https://github.com/ljharb/function-bind/commit/04228d766670ee45ca24e98345c1f6a7621065b5) +- Naming travis-ci URLs in README; using SVG [`62c810c`](https://github.com/ljharb/function-bind/commit/62c810c2f54ced956cd4d4ab7b793055addfe36e) +- Make sure functions are invoked correctly (also passing coverage tests) [`2b289b4`](https://github.com/ljharb/function-bind/commit/2b289b4dfbf037ffcfa4dc95eb540f6165e9e43a) +- Removing the strict mode pragmas; they make tests fail. [`1aa701d`](https://github.com/ljharb/function-bind/commit/1aa701d199ddc3782476e8f7eef82679be97b845) +- Adding myself as a contributor [`85fd57b`](https://github.com/ljharb/function-bind/commit/85fd57b0860e5a7af42de9a287f3f265fc6d72fc) +- Adding strict mode pragmas [`915b08e`](https://github.com/ljharb/function-bind/commit/915b08e084c86a722eafe7245e21db74aa21ca4c) +- Adding devDeps URLs to README [`4ccc731`](https://github.com/ljharb/function-bind/commit/4ccc73112c1769859e4ca3076caf4086b3cba2cd) +- Fixing the description. [`a7a472c`](https://github.com/ljharb/function-bind/commit/a7a472cf649af515c635cf560fc478fbe48999c8) +- Using a function expression instead of a function declaration. [`b5d3e4e`](https://github.com/ljharb/function-bind/commit/b5d3e4ea6aaffc63888953eeb1fbc7ff45f1fa14) +- Updating tape [`f086be6`](https://github.com/ljharb/function-bind/commit/f086be6029fb56dde61a258c1340600fa174d1e0) +- Updating jscs [`5f9bdb3`](https://github.com/ljharb/function-bind/commit/5f9bdb375ab13ba48f30852aab94029520c54d71) +- Updating jscs [`9b409ba`](https://github.com/ljharb/function-bind/commit/9b409ba6118e23395a4e5d83ef39152aab9d3bfc) +- Run coverage as part of tests. [`8e1b6d4`](https://github.com/ljharb/function-bind/commit/8e1b6d459f047d1bd4fee814e01247c984c80bd0) +- Run linter as part of tests [`c1ca83f`](https://github.com/ljharb/function-bind/commit/c1ca83f832df94587d09e621beba682fabfaa987) +- Updating covert [`701e837`](https://github.com/ljharb/function-bind/commit/701e83774b57b4d3ef631e1948143f43a72f4bb9) + +## [v1.0.0](https://github.com/ljharb/function-bind/compare/v0.2.0...v1.0.0) - 2014-08-09 + +### Commits + +- Make sure old and unstable nodes don't fail Travis [`27adca3`](https://github.com/ljharb/function-bind/commit/27adca34a4ab6ad67b6dfde43942a1b103ce4d75) +- Fixing an issue when the bound function is called as a constructor in ES3. [`e20122d`](https://github.com/ljharb/function-bind/commit/e20122d267d92ce553859b280cbbea5d27c07731) +- Adding `npm run coverage` [`a2e29c4`](https://github.com/ljharb/function-bind/commit/a2e29c4ecaef9e2f6cd1603e868c139073375502) +- Updating tape [`b741168`](https://github.com/ljharb/function-bind/commit/b741168b12b235b1717ff696087645526b69213c) +- Upgrading tape [`63631a0`](https://github.com/ljharb/function-bind/commit/63631a04c7fbe97cc2fa61829cc27246d6986f74) +- Updating tape [`363cb46`](https://github.com/ljharb/function-bind/commit/363cb46dafb23cb3e347729a22f9448051d78464) + +## v0.2.0 - 2014-03-23 + +### Commits + +- Updating test coverage to match es5-shim. [`aa94d44`](https://github.com/ljharb/function-bind/commit/aa94d44b8f9d7f69f10e060db7709aa7a694e5d4) +- initial [`942ee07`](https://github.com/ljharb/function-bind/commit/942ee07e94e542d91798137bc4b80b926137e066) +- Setting the bound function's length properly. [`079f46a`](https://github.com/ljharb/function-bind/commit/079f46a2d3515b7c0b308c2c13fceb641f97ca25) +- Ensuring that some older browsers will throw when given a regex. [`36ac55b`](https://github.com/ljharb/function-bind/commit/36ac55b87f460d4330253c92870aa26fbfe8227f) +- Removing npm scripts that don't have dependencies [`9d2be60`](https://github.com/ljharb/function-bind/commit/9d2be600002cb8bc8606f8f3585ad3e05868c750) +- Updating tape [`297a4ac`](https://github.com/ljharb/function-bind/commit/297a4acc5464db381940aafb194d1c88f4e678f3) +- Skipping length tests for now. [`d9891ea`](https://github.com/ljharb/function-bind/commit/d9891ea4d2aaffa69f408339cdd61ff740f70565) +- don't take my tea [`dccd930`](https://github.com/ljharb/function-bind/commit/dccd930bfd60ea10cb178d28c97550c3bc8c1e07) diff --git a/node_modules/function-bind/LICENSE b/node_modules/function-bind/LICENSE new file mode 100644 index 0000000..62d6d23 --- /dev/null +++ b/node_modules/function-bind/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013 Raynos. + +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. + diff --git a/node_modules/function-bind/README.md b/node_modules/function-bind/README.md new file mode 100644 index 0000000..814c20b --- /dev/null +++ b/node_modules/function-bind/README.md @@ -0,0 +1,46 @@ +# function-bind [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] + +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Implementation of function.prototype.bind + +Old versions of phantomjs, Internet Explorer < 9, and node < 0.6 don't support `Function.prototype.bind`. + +## Example + +```js +Function.prototype.bind = require("function-bind") +``` + +## Installation + +`npm install function-bind` + +## Contributors + + - Raynos + +## MIT Licenced + +[package-url]: https://npmjs.org/package/function-bind +[npm-version-svg]: https://versionbadg.es/Raynos/function-bind.svg +[deps-svg]: https://david-dm.org/Raynos/function-bind.svg +[deps-url]: https://david-dm.org/Raynos/function-bind +[dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg +[dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/function-bind.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/function-bind.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/function-bind.svg +[downloads-url]: https://npm-stat.com/charts.html?package=function-bind +[codecov-image]: https://codecov.io/gh/Raynos/function-bind/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/Raynos/function-bind/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/Raynos/function-bind +[actions-url]: https://github.com/Raynos/function-bind/actions diff --git a/node_modules/function-bind/implementation.js b/node_modules/function-bind/implementation.js new file mode 100644 index 0000000..fd4384c --- /dev/null +++ b/node_modules/function-bind/implementation.js @@ -0,0 +1,84 @@ +'use strict'; + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; diff --git a/node_modules/function-bind/index.js b/node_modules/function-bind/index.js new file mode 100644 index 0000000..3bb6b96 --- /dev/null +++ b/node_modules/function-bind/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = Function.prototype.bind || implementation; diff --git a/node_modules/function-bind/package.json b/node_modules/function-bind/package.json new file mode 100644 index 0000000..6185963 --- /dev/null +++ b/node_modules/function-bind/package.json @@ -0,0 +1,87 @@ +{ + "name": "function-bind", + "version": "1.1.2", + "description": "Implementation of Function.prototype.bind", + "keywords": [ + "function", + "bind", + "shim", + "es5" + ], + "author": "Raynos ", + "repository": { + "type": "git", + "url": "https://github.com/Raynos/function-bind.git" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "main": "index", + "homepage": "https://github.com/Raynos/function-bind", + "contributors": [ + { + "name": "Raynos" + }, + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "bugs": { + "url": "https://github.com/Raynos/function-bind/issues", + "email": "raynos2@gmail.com" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.1" + }, + "license": "MIT", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepack": "npmignore --auto --commentLines=autogenerated", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "lint": "eslint --ext=js,mjs .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "ie/8..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/function-bind/test/.eslintrc b/node_modules/function-bind/test/.eslintrc new file mode 100644 index 0000000..8a56d5b --- /dev/null +++ b/node_modules/function-bind/test/.eslintrc @@ -0,0 +1,9 @@ +{ + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "max-statements-per-line": [2, { "max": 2 }], + "no-invalid-this": 0, + "no-magic-numbers": 0, + } +} diff --git a/node_modules/function-bind/test/index.js b/node_modules/function-bind/test/index.js new file mode 100644 index 0000000..2edecce --- /dev/null +++ b/node_modules/function-bind/test/index.js @@ -0,0 +1,252 @@ +// jscs:disable requireUseStrict + +var test = require('tape'); + +var functionBind = require('../implementation'); +var getCurrentContext = function () { return this; }; + +test('functionBind is a function', function (t) { + t.equal(typeof functionBind, 'function'); + t.end(); +}); + +test('non-functions', function (t) { + var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; + t.plan(nonFunctions.length); + for (var i = 0; i < nonFunctions.length; ++i) { + try { functionBind.call(nonFunctions[i]); } catch (ex) { + t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); + } + } + t.end(); +}); + +test('without a context', function (t) { + t.test('binds properly', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }) + }; + namespace.func(1, 2, 3); + st.deepEqual(args, [1, 2, 3]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('binds properly, and still supplies bound arguments', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, undefined, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.deepEqual(args, [1, 2, 3, 4, 5, 6]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('returns properly', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('called as a constructor', function (st) { + var thunkify = function (value) { + return function () { return value; }; + }; + st.test('returns object value', function (sst) { + var expectedReturnValue = [1, 2, 3]; + var Constructor = functionBind.call(thunkify(expectedReturnValue), null); + var result = new Constructor(); + sst.equal(result, expectedReturnValue); + sst.end(); + }); + + st.test('does not return primitive value', function (sst) { + var Constructor = functionBind.call(thunkify(42), null); + var result = new Constructor(); + sst.notEqual(result, 42); + sst.end(); + }); + + st.test('object from bound constructor is instance of original and bound constructor', function (sst) { + var A = function (x) { + this.name = x || 'A'; + }; + var B = functionBind.call(A, null, 'B'); + + var result = new B(); + sst.ok(result instanceof B, 'result is instance of bound constructor'); + sst.ok(result instanceof A, 'result is instance of original constructor'); + sst.end(); + }); + + st.end(); + }); + + t.end(); +}); + +test('with a context', function (t) { + t.test('with no bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext) + }; + namespace.func(1, 2, 3); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); + st.end(); + }); + + t.test('with bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); + st.end(); + }); + + t.test('returns properly', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('passes the correct arguments when called as a constructor', function (st) { + var expected = { name: 'Correct' }; + var namespace = { + Func: functionBind.call(function (arg) { + return arg; + }, { name: 'Incorrect' }) + }; + var returned = new namespace.Func(expected); + st.equal(returned, expected, 'returns the right arg when called as a constructor'); + st.end(); + }); + + t.test('has the new instance\'s context when called as a constructor', function (st) { + var actualContext; + var expectedContext = { foo: 'bar' }; + var namespace = { + Func: functionBind.call(function () { + actualContext = this; + }, expectedContext) + }; + var result = new namespace.Func(); + st.equal(result instanceof namespace.Func, true); + st.notEqual(actualContext, expectedContext); + st.end(); + }); + + t.end(); +}); + +test('bound function length', function (t) { + t.test('sets a correct length without thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); +}); diff --git a/node_modules/get-intrinsic/.eslintrc b/node_modules/get-intrinsic/.eslintrc new file mode 100644 index 0000000..235fb79 --- /dev/null +++ b/node_modules/get-intrinsic/.eslintrc @@ -0,0 +1,42 @@ +{ + "root": true, + + "extends": "@ljharb", + + "env": { + "es6": true, + "es2017": true, + "es2020": true, + "es2021": true, + "es2022": true, + }, + + "globals": { + "Float16Array": false, + }, + + "rules": { + "array-bracket-newline": 0, + "complexity": 0, + "eqeqeq": [2, "allow-null"], + "func-name-matching": 0, + "id-length": 0, + "max-lines": 0, + "max-lines-per-function": [2, 90], + "max-params": [2, 4], + "max-statements": 0, + "max-statements-per-line": [2, { "max": 2 }], + "multiline-comment-style": 0, + "no-magic-numbers": 0, + "sort-keys": 0, + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "new-cap": 0, + }, + }, + ], +} diff --git a/node_modules/get-intrinsic/.github/FUNDING.yml b/node_modules/get-intrinsic/.github/FUNDING.yml new file mode 100644 index 0000000..8e8da0d --- /dev/null +++ b/node_modules/get-intrinsic/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/get-intrinsic +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/get-intrinsic/.nycrc b/node_modules/get-intrinsic/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/get-intrinsic/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/get-intrinsic/CHANGELOG.md b/node_modules/get-intrinsic/CHANGELOG.md new file mode 100644 index 0000000..ce1dd98 --- /dev/null +++ b/node_modules/get-intrinsic/CHANGELOG.md @@ -0,0 +1,186 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.3.0](https://github.com/ljharb/get-intrinsic/compare/v1.2.7...v1.3.0) - 2025-02-22 + +### Commits + +- [Dev Deps] update `es-abstract`, `es-value-fixtures`, `for-each`, `object-inspect` [`9b61553`](https://github.com/ljharb/get-intrinsic/commit/9b61553c587f1c1edbd435597e88c7d387da97dd) +- [Deps] update `call-bind-apply-helpers`, `es-object-atoms`, `get-proto` [`a341fee`](https://github.com/ljharb/get-intrinsic/commit/a341fee0f39a403b0f0069e82c97642d5eb11043) +- [New] add `Float16Array` [`de22116`](https://github.com/ljharb/get-intrinsic/commit/de22116b492fb989a0341bceb6e573abfaed73dc) + +## [v1.2.7](https://github.com/ljharb/get-intrinsic/compare/v1.2.6...v1.2.7) - 2025-01-02 + +### Commits + +- [Refactor] use `get-proto` directly [`00ab955`](https://github.com/ljharb/get-intrinsic/commit/00ab95546a0980c8ad42a84253daaa8d2adcedf9) +- [Deps] update `math-intrinsics` [`c716cdd`](https://github.com/ljharb/get-intrinsic/commit/c716cdd6bbe36b438057025561b8bb5a879ac8a0) +- [Dev Deps] update `call-bound`, `es-abstract` [`dc648a6`](https://github.com/ljharb/get-intrinsic/commit/dc648a67eb359037dff8d8619bfa71d86debccb1) + +## [v1.2.6](https://github.com/ljharb/get-intrinsic/compare/v1.2.5...v1.2.6) - 2024-12-11 + +### Commits + +- [Refactor] use `math-intrinsics` [`841be86`](https://github.com/ljharb/get-intrinsic/commit/841be8641a9254c4c75483b30c8871b5d5065926) +- [Refactor] use `es-object-atoms` [`42057df`](https://github.com/ljharb/get-intrinsic/commit/42057dfa16f66f64787e66482af381cc6f31d2c1) +- [Deps] update `call-bind-apply-helpers` [`45afa24`](https://github.com/ljharb/get-intrinsic/commit/45afa24a9ee4d6d3c172db1f555b16cb27843ef4) +- [Dev Deps] update `call-bound` [`9cba9c6`](https://github.com/ljharb/get-intrinsic/commit/9cba9c6e70212bc163b7a5529cb25df46071646f) + +## [v1.2.5](https://github.com/ljharb/get-intrinsic/compare/v1.2.4...v1.2.5) - 2024-12-06 + +### Commits + +- [actions] split out node 10-20, and 20+ [`6e2b9dd`](https://github.com/ljharb/get-intrinsic/commit/6e2b9dd23902665681ebe453256ccfe21d7966f0) +- [Refactor] use `dunder-proto` and `call-bind-apply-helpers` instead of `has-proto` [`c095d17`](https://github.com/ljharb/get-intrinsic/commit/c095d179ad0f4fbfff20c8a3e0cb4fe668018998) +- [Refactor] use `gopd` [`9841d5b`](https://github.com/ljharb/get-intrinsic/commit/9841d5b35f7ab4fd2d193f0c741a50a077920e90) +- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `es-abstract`, `es-value-fixtures`, `gopd`, `mock-property`, `object-inspect`, `tape` [`2d07e01`](https://github.com/ljharb/get-intrinsic/commit/2d07e01310cee2cbaedfead6903df128b1f5d425) +- [Deps] update `gopd`, `has-proto`, `has-symbols`, `hasown` [`974d8bf`](https://github.com/ljharb/get-intrinsic/commit/974d8bf5baad7939eef35c25cc1dd88c10a30fa6) +- [Dev Deps] update `call-bind`, `es-abstract`, `tape` [`df9dde1`](https://github.com/ljharb/get-intrinsic/commit/df9dde178186631ab8a3165ede056549918ce4bc) +- [Refactor] cache `es-define-property` as well [`43ef543`](https://github.com/ljharb/get-intrinsic/commit/43ef543cb02194401420e3a914a4ca9168691926) +- [Deps] update `has-proto`, `has-symbols`, `hasown` [`ad4949d`](https://github.com/ljharb/get-intrinsic/commit/ad4949d5467316505aad89bf75f9417ed782f7af) +- [Tests] use `call-bound` directly [`ad5c406`](https://github.com/ljharb/get-intrinsic/commit/ad5c4069774bfe90e520a35eead5fe5ca9d69e80) +- [Deps] update `has-proto`, `hasown` [`45414ca`](https://github.com/ljharb/get-intrinsic/commit/45414caa312333a2798953682c68f85c550627dd) +- [Tests] replace `aud` with `npm audit` [`18d3509`](https://github.com/ljharb/get-intrinsic/commit/18d3509f79460e7924da70409ee81e5053087523) +- [Deps] update `es-define-property` [`aadaa3b`](https://github.com/ljharb/get-intrinsic/commit/aadaa3b2188d77ad9bff394ce5d4249c49eb21f5) +- [Dev Deps] add missing peer dep [`c296a16`](https://github.com/ljharb/get-intrinsic/commit/c296a16246d0c9a5981944f4cc5cf61fbda0cf6a) + +## [v1.2.4](https://github.com/ljharb/get-intrinsic/compare/v1.2.3...v1.2.4) - 2024-02-05 + +### Commits + +- [Refactor] use all 7 <+ ES6 Errors from `es-errors` [`bcac811`](https://github.com/ljharb/get-intrinsic/commit/bcac811abdc1c982e12abf848a410d6aae148d14) + +## [v1.2.3](https://github.com/ljharb/get-intrinsic/compare/v1.2.2...v1.2.3) - 2024-02-03 + +### Commits + +- [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`f11db9c`](https://github.com/ljharb/get-intrinsic/commit/f11db9c4fb97d87bbd53d3c73ac6b3db3613ad3b) +- [Dev Deps] update `aud`, `es-abstract`, `mock-property`, `npmignore` [`b7ac7d1`](https://github.com/ljharb/get-intrinsic/commit/b7ac7d1616fefb03877b1aed0c8f8d61aad32b6c) +- [meta] simplify `exports` [`faa0cc6`](https://github.com/ljharb/get-intrinsic/commit/faa0cc618e2830ffb51a8202490b0c215d965cbc) +- [meta] add missing `engines.node` [`774dd0b`](https://github.com/ljharb/get-intrinsic/commit/774dd0b3e8f741c3f05a6322d124d6087f146af1) +- [Dev Deps] update `tape` [`5828e8e`](https://github.com/ljharb/get-intrinsic/commit/5828e8e4a04e69312e87a36c0ea39428a7a4c3d8) +- [Robustness] use null objects for lookups [`eb9a11f`](https://github.com/ljharb/get-intrinsic/commit/eb9a11fa9eb3e13b193fcc05a7fb814341b1a7b7) +- [meta] add `sideEffects` flag [`89bcc7a`](https://github.com/ljharb/get-intrinsic/commit/89bcc7a42e19bf07b7c21e3094d5ab177109e6d2) + +## [v1.2.2](https://github.com/ljharb/get-intrinsic/compare/v1.2.1...v1.2.2) - 2023-10-20 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `call-bind`, `es-abstract`, `mock-property`, `object-inspect`, `tape` [`f51bcf2`](https://github.com/ljharb/get-intrinsic/commit/f51bcf26412d58d17ce17c91c9afd0ad271f0762) +- [Refactor] use `hasown` instead of `has` [`18d14b7`](https://github.com/ljharb/get-intrinsic/commit/18d14b799bea6b5765e1cec91890830cbcdb0587) +- [Deps] update `function-bind` [`6e109c8`](https://github.com/ljharb/get-intrinsic/commit/6e109c81e03804cc5e7824fb64353cdc3d8ee2c7) + +## [v1.2.1](https://github.com/ljharb/get-intrinsic/compare/v1.2.0...v1.2.1) - 2023-05-13 + +### Commits + +- [Fix] avoid a crash in envs without `__proto__` [`7bad8d0`](https://github.com/ljharb/get-intrinsic/commit/7bad8d061bf8721733b58b73a2565af2b6756b64) +- [Dev Deps] update `es-abstract` [`c60e6b7`](https://github.com/ljharb/get-intrinsic/commit/c60e6b7b4cf9660c7f27ed970970fd55fac48dc5) + +## [v1.2.0](https://github.com/ljharb/get-intrinsic/compare/v1.1.3...v1.2.0) - 2023-01-19 + +### Commits + +- [actions] update checkout action [`ca6b12f`](https://github.com/ljharb/get-intrinsic/commit/ca6b12f31eaacea4ea3b055e744cd61623385ffb) +- [Dev Deps] update `@ljharb/eslint-config`, `es-abstract`, `object-inspect`, `tape` [`41a3727`](https://github.com/ljharb/get-intrinsic/commit/41a3727d0026fa04273ae216a5f8e12eefd72da8) +- [Fix] ensure `Error.prototype` is undeniable [`c511e97`](https://github.com/ljharb/get-intrinsic/commit/c511e97ae99c764c4524b540dee7a70757af8da3) +- [Dev Deps] update `aud`, `es-abstract`, `tape` [`1bef8a8`](https://github.com/ljharb/get-intrinsic/commit/1bef8a8fd439ebb80863199b6189199e0851ac67) +- [Dev Deps] update `aud`, `es-abstract` [`0d41f16`](https://github.com/ljharb/get-intrinsic/commit/0d41f16bcd500bc28b7bfc98043ebf61ea081c26) +- [New] add `BigInt64Array` and `BigUint64Array` [`a6cca25`](https://github.com/ljharb/get-intrinsic/commit/a6cca25f29635889b7e9bd669baf9e04be90e48c) +- [Tests] use `gopd` [`ecf7722`](https://github.com/ljharb/get-intrinsic/commit/ecf7722240d15cfd16edda06acf63359c10fb9bd) + +## [v1.1.3](https://github.com/ljharb/get-intrinsic/compare/v1.1.2...v1.1.3) - 2022-09-12 + +### Commits + +- [Dev Deps] update `es-abstract`, `es-value-fixtures`, `tape` [`07ff291`](https://github.com/ljharb/get-intrinsic/commit/07ff291816406ebe5a12d7f16965bde0942dd688) +- [Fix] properly check for % signs [`50ac176`](https://github.com/ljharb/get-intrinsic/commit/50ac1760fe99c227e64eabde76e9c0e44cd881b5) + +## [v1.1.2](https://github.com/ljharb/get-intrinsic/compare/v1.1.1...v1.1.2) - 2022-06-08 + +### Fixed + +- [Fix] properly validate against extra % signs [`#16`](https://github.com/ljharb/get-intrinsic/issues/16) + +### Commits + +- [actions] reuse common workflows [`0972547`](https://github.com/ljharb/get-intrinsic/commit/0972547efd0abc863fe4c445a6ca7eb4f8c6901d) +- [meta] use `npmignore` to autogenerate an npmignore file [`5ba0b51`](https://github.com/ljharb/get-intrinsic/commit/5ba0b51d8d8d4f1c31d426d74abc0770fd106bad) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`c364492`](https://github.com/ljharb/get-intrinsic/commit/c364492af4af51333e6f81c0bf21fd3d602c3661) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es-abstract`, `object-inspect`, `tape` [`dc04dad`](https://github.com/ljharb/get-intrinsic/commit/dc04dad86f6e5608775a2640cb0db5927ae29ed9) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es-abstract`, `object-inspect`, `safe-publish-latest`, `tape` [`1c14059`](https://github.com/ljharb/get-intrinsic/commit/1c1405984e86dd2dc9366c15d8a0294a96a146a5) +- [Tests] use `mock-property` [`b396ef0`](https://github.com/ljharb/get-intrinsic/commit/b396ef05bb73b1d699811abd64b0d9b97997fdda) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c2c758d`](https://github.com/ljharb/get-intrinsic/commit/c2c758d3b90af4fef0a76910d8d3c292ec8d1d3e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`29e3c09`](https://github.com/ljharb/get-intrinsic/commit/29e3c091c2bf3e17099969847e8729d0e46896de) +- [actions] update codecov uploader [`8cbc141`](https://github.com/ljharb/get-intrinsic/commit/8cbc1418940d7a8941f3a7985cbc4ac095c5e13d) +- [Dev Deps] update `@ljharb/eslint-config`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`10b6f5c`](https://github.com/ljharb/get-intrinsic/commit/10b6f5c02593fb3680c581d696ac124e30652932) +- [readme] add github actions/codecov badges [`4e25400`](https://github.com/ljharb/get-intrinsic/commit/4e25400d9f51ae9eb059cbe22d9144e70ea214e8) +- [Tests] use `for-each` instead of `foreach` [`c05b957`](https://github.com/ljharb/get-intrinsic/commit/c05b957ad9a7bc7721af7cc9e9be1edbfe057496) +- [Dev Deps] update `es-abstract` [`29b05ae`](https://github.com/ljharb/get-intrinsic/commit/29b05aec3e7330e9ad0b8e0f685a9112c20cdd97) +- [meta] use `prepublishOnly` script for npm 7+ [`95c285d`](https://github.com/ljharb/get-intrinsic/commit/95c285da810516057d3bbfa871176031af38f05d) +- [Deps] update `has-symbols` [`593cb4f`](https://github.com/ljharb/get-intrinsic/commit/593cb4fb38e7922e40e42c183f45274b636424cd) +- [readme] fix repo URLs [`1c8305b`](https://github.com/ljharb/get-intrinsic/commit/1c8305b5365827c9b6fc785434aac0e1328ff2f5) +- [Deps] update `has-symbols` [`c7138b6`](https://github.com/ljharb/get-intrinsic/commit/c7138b6c6d73132d859471fb8c13304e1e7c8b20) +- [Dev Deps] remove unused `has-bigints` [`bd63aff`](https://github.com/ljharb/get-intrinsic/commit/bd63aff6ad8f3a986c557fcda2914187bdaab359) + +## [v1.1.1](https://github.com/ljharb/get-intrinsic/compare/v1.1.0...v1.1.1) - 2021-02-03 + +### Fixed + +- [meta] export `./package.json` [`#9`](https://github.com/ljharb/get-intrinsic/issues/9) + +### Commits + +- [readme] flesh out the readme; use `evalmd` [`d12f12c`](https://github.com/ljharb/get-intrinsic/commit/d12f12c15345a0a0772cc65a7c64369529abd614) +- [eslint] set up proper globals config [`5a8c098`](https://github.com/ljharb/get-intrinsic/commit/5a8c0984e3319d1ac0e64b102f8ec18b64e79f36) +- [Dev Deps] update `eslint` [`7b9a5c0`](https://github.com/ljharb/get-intrinsic/commit/7b9a5c0d31a90ca1a1234181c74988fb046701cd) + +## [v1.1.0](https://github.com/ljharb/get-intrinsic/compare/v1.0.2...v1.1.0) - 2021-01-25 + +### Fixed + +- [Refactor] delay `Function` eval until syntax-derived values are requested [`#3`](https://github.com/ljharb/get-intrinsic/issues/3) + +### Commits + +- [Tests] migrate tests to Github Actions [`2ab762b`](https://github.com/ljharb/get-intrinsic/commit/2ab762b48164aea8af37a40ba105bbc8246ab8c4) +- [meta] do not publish github action workflow files [`5e7108e`](https://github.com/ljharb/get-intrinsic/commit/5e7108e4768b244d48d9567ba4f8a6cab9c65b8e) +- [Tests] add some coverage [`01ac7a8`](https://github.com/ljharb/get-intrinsic/commit/01ac7a87ac29738567e8524cd8c9e026b1fa8cb3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `call-bind`, `es-abstract`, `tape`; add `call-bind` [`911b672`](https://github.com/ljharb/get-intrinsic/commit/911b672fbffae433a96924c6ce013585e425f4b7) +- [Refactor] rearrange evalled constructors a bit [`7e7e4bf`](https://github.com/ljharb/get-intrinsic/commit/7e7e4bf583f3799c8ac1c6c5e10d2cb553957347) +- [meta] add Automatic Rebase and Require Allow Edits workflows [`0199968`](https://github.com/ljharb/get-intrinsic/commit/01999687a263ffce0a3cb011dfbcb761754aedbc) + +## [v1.0.2](https://github.com/ljharb/get-intrinsic/compare/v1.0.1...v1.0.2) - 2020-12-17 + +### Commits + +- [Fix] Throw for non‑existent intrinsics [`68f873b`](https://github.com/ljharb/get-intrinsic/commit/68f873b013c732a05ad6f5fc54f697e55515461b) +- [Fix] Throw for non‑existent segments in the intrinsic path [`8325dee`](https://github.com/ljharb/get-intrinsic/commit/8325deee43128f3654d3399aa9591741ebe17b21) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-bigints`, `object-inspect` [`0c227a7`](https://github.com/ljharb/get-intrinsic/commit/0c227a7d8b629166f25715fd242553892e458525) +- [meta] do not lint coverage output [`70d2419`](https://github.com/ljharb/get-intrinsic/commit/70d24199b620043cd9110fc5f426d214ebe21dc9) + +## [v1.0.1](https://github.com/ljharb/get-intrinsic/compare/v1.0.0...v1.0.1) - 2020-10-30 + +### Commits + +- [Tests] gather coverage data on every job [`d1d280d`](https://github.com/ljharb/get-intrinsic/commit/d1d280dec714e3f0519cc877dbcb193057d9cac6) +- [Fix] add missing dependencies [`5031771`](https://github.com/ljharb/get-intrinsic/commit/5031771bb1095b38be88ce7c41d5de88718e432e) +- [Tests] use `es-value-fixtures` [`af48765`](https://github.com/ljharb/get-intrinsic/commit/af48765a23c5323fb0b6b38dbf00eb5099c7bebc) + +## v1.0.0 - 2020-10-29 + +### Commits + +- Implementation [`bbce57c`](https://github.com/ljharb/get-intrinsic/commit/bbce57c6f33d05b2d8d3efa273ceeb3ee01127bb) +- Tests [`17b4f0d`](https://github.com/ljharb/get-intrinsic/commit/17b4f0d56dea6b4059b56fc30ef3ee4d9500ebc2) +- Initial commit [`3153294`](https://github.com/ljharb/get-intrinsic/commit/31532948de363b0a27dd9fd4649e7b7028ec4b44) +- npm init [`fb326c4`](https://github.com/ljharb/get-intrinsic/commit/fb326c4d2817c8419ec31de1295f06bb268a7902) +- [meta] add Automatic Rebase and Require Allow Edits workflows [`48862fb`](https://github.com/ljharb/get-intrinsic/commit/48862fb2508c8f6a57968e6d08b7c883afc9d550) +- [meta] add `auto-changelog` [`5f28ad0`](https://github.com/ljharb/get-intrinsic/commit/5f28ad019e060a353d8028f9f2591a9cc93074a1) +- [meta] add "funding"; create `FUNDING.yml` [`c2bbdde`](https://github.com/ljharb/get-intrinsic/commit/c2bbddeba73a875be61484ee4680b129a6d4e0a1) +- [Tests] add `npm run lint` [`0a84b98`](https://github.com/ljharb/get-intrinsic/commit/0a84b98b22b7cf7a748666f705b0003a493c35fd) +- Only apps should have lockfiles [`9586c75`](https://github.com/ljharb/get-intrinsic/commit/9586c75866c1ee678e4d5d4dbbdef6997e511b05) diff --git a/node_modules/get-intrinsic/LICENSE b/node_modules/get-intrinsic/LICENSE new file mode 100644 index 0000000..48f05d0 --- /dev/null +++ b/node_modules/get-intrinsic/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Jordan Harband + +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. diff --git a/node_modules/get-intrinsic/README.md b/node_modules/get-intrinsic/README.md new file mode 100644 index 0000000..3aa0bba --- /dev/null +++ b/node_modules/get-intrinsic/README.md @@ -0,0 +1,71 @@ +# get-intrinsic [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Get and robustly cache all JS language-level intrinsics at first require time. + +See the syntax described [in the JS spec](https://tc39.es/ecma262/#sec-well-known-intrinsic-objects) for reference. + +## Example + +```js +var GetIntrinsic = require('get-intrinsic'); +var assert = require('assert'); + +// static methods +assert.equal(GetIntrinsic('%Math.pow%'), Math.pow); +assert.equal(Math.pow(2, 3), 8); +assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8); +delete Math.pow; +assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8); + +// instance methods +var arr = [1]; +assert.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push); +assert.deepEqual(arr, [1]); + +arr.push(2); +assert.deepEqual(arr, [1, 2]); + +GetIntrinsic('%Array.prototype.push%').call(arr, 3); +assert.deepEqual(arr, [1, 2, 3]); + +delete Array.prototype.push; +GetIntrinsic('%Array.prototype.push%').call(arr, 4); +assert.deepEqual(arr, [1, 2, 3, 4]); + +// missing features +delete JSON.parse; // to simulate a real intrinsic that is missing in the environment +assert.throws(() => GetIntrinsic('%JSON.parse%')); +assert.equal(undefined, GetIntrinsic('%JSON.parse%', true)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/get-intrinsic +[npm-version-svg]: https://versionbadg.es/ljharb/get-intrinsic.svg +[deps-svg]: https://david-dm.org/ljharb/get-intrinsic.svg +[deps-url]: https://david-dm.org/ljharb/get-intrinsic +[dev-deps-svg]: https://david-dm.org/ljharb/get-intrinsic/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/get-intrinsic#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/get-intrinsic.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/get-intrinsic.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/get-intrinsic.svg +[downloads-url]: https://npm-stat.com/charts.html?package=get-intrinsic +[codecov-image]: https://codecov.io/gh/ljharb/get-intrinsic/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/get-intrinsic/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-intrinsic +[actions-url]: https://github.com/ljharb/get-intrinsic/actions diff --git a/node_modules/get-intrinsic/index.js b/node_modules/get-intrinsic/index.js new file mode 100644 index 0000000..bd1d94b --- /dev/null +++ b/node_modules/get-intrinsic/index.js @@ -0,0 +1,378 @@ +'use strict'; + +var undefined; + +var $Object = require('es-object-atoms'); + +var $Error = require('es-errors'); +var $EvalError = require('es-errors/eval'); +var $RangeError = require('es-errors/range'); +var $ReferenceError = require('es-errors/ref'); +var $SyntaxError = require('es-errors/syntax'); +var $TypeError = require('es-errors/type'); +var $URIError = require('es-errors/uri'); + +var abs = require('math-intrinsics/abs'); +var floor = require('math-intrinsics/floor'); +var max = require('math-intrinsics/max'); +var min = require('math-intrinsics/min'); +var pow = require('math-intrinsics/pow'); +var round = require('math-intrinsics/round'); +var sign = require('math-intrinsics/sign'); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = require('gopd'); +var $defineProperty = require('es-define-property'); + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = require('has-symbols')(); + +var getProto = require('get-proto'); +var $ObjectGPO = require('get-proto/Object.getPrototypeOf'); +var $ReflectGPO = require('get-proto/Reflect.getPrototypeOf'); + +var $apply = require('call-bind-apply-helpers/functionApply'); +var $call = require('call-bind-apply-helpers/functionCall'); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': $Object, + '%Object.getOwnPropertyDescriptor%': $gOPD, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, + + '%Function.prototype.call%': $call, + '%Function.prototype.apply%': $apply, + '%Object.defineProperty%': $defineProperty, + '%Object.getPrototypeOf%': $ObjectGPO, + '%Math.abs%': abs, + '%Math.floor%': floor, + '%Math.max%': max, + '%Math.min%': min, + '%Math.pow%': pow, + '%Math.round%': round, + '%Math.sign%': sign, + '%Reflect.getPrototypeOf%': $ReflectGPO +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = require('function-bind'); +var hasOwn = require('hasown'); +var $concat = bind.call($call, Array.prototype.concat); +var $spliceApply = bind.call($apply, Array.prototype.splice); +var $replace = bind.call($call, String.prototype.replace); +var $strSlice = bind.call($call, String.prototype.slice); +var $exec = bind.call($call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; diff --git a/node_modules/get-intrinsic/package.json b/node_modules/get-intrinsic/package.json new file mode 100644 index 0000000..2828e73 --- /dev/null +++ b/node_modules/get-intrinsic/package.json @@ -0,0 +1,97 @@ +{ + "name": "get-intrinsic", + "version": "1.3.0", + "description": "Get and robustly cache all JS language-level intrinsics at first require time", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=.js,.mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx npm@'>= 10.2' audit --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/get-intrinsic.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "es", + "js", + "intrinsic", + "getintrinsic", + "es-abstract" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/get-intrinsic/issues" + }, + "homepage": "https://github.com/ljharb/get-intrinsic#readme", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.1", + "auto-changelog": "^2.5.0", + "call-bound": "^1.0.3", + "encoding": "^0.1.13", + "es-abstract": "^1.23.9", + "es-value-fixtures": "^1.7.1", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.5", + "make-async-function": "^1.0.0", + "make-async-generator-function": "^1.0.0", + "make-generator-function": "^2.0.0", + "mock-property": "^1.1.0", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.4", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "testling": { + "files": "test/GetIntrinsic.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/get-intrinsic/test/GetIntrinsic.js b/node_modules/get-intrinsic/test/GetIntrinsic.js new file mode 100644 index 0000000..d9c0f30 --- /dev/null +++ b/node_modules/get-intrinsic/test/GetIntrinsic.js @@ -0,0 +1,274 @@ +'use strict'; + +var GetIntrinsic = require('../'); + +var test = require('tape'); +var forEach = require('for-each'); +var debug = require('object-inspect'); +var generatorFns = require('make-generator-function')(); +var asyncFns = require('make-async-function').list(); +var asyncGenFns = require('make-async-generator-function')(); +var mockProperty = require('mock-property'); + +var callBound = require('call-bound'); +var v = require('es-value-fixtures'); +var $gOPD = require('gopd'); +var DefinePropertyOrThrow = require('es-abstract/2023/DefinePropertyOrThrow'); + +var $isProto = callBound('%Object.prototype.isPrototypeOf%'); + +test('export', function (t) { + t.equal(typeof GetIntrinsic, 'function', 'it is a function'); + t.equal(GetIntrinsic.length, 2, 'function has length of 2'); + + t.end(); +}); + +test('throws', function (t) { + t['throws']( + function () { GetIntrinsic('not an intrinsic'); }, + SyntaxError, + 'nonexistent intrinsic throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic(''); }, + TypeError, + 'empty string intrinsic throws a type error' + ); + + t['throws']( + function () { GetIntrinsic('.'); }, + SyntaxError, + '"just a dot" intrinsic throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic('%String'); }, + SyntaxError, + 'Leading % without trailing % throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic('String%'); }, + SyntaxError, + 'Trailing % without leading % throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic("String['prototype]"); }, + SyntaxError, + 'Dynamic property access is disallowed for intrinsics (unterminated string)' + ); + + t['throws']( + function () { GetIntrinsic('%Proxy.prototype.undefined%'); }, + TypeError, + "Throws when middle part doesn't exist (%Proxy.prototype.undefined%)" + ); + + t['throws']( + function () { GetIntrinsic('%Array.prototype%garbage%'); }, + SyntaxError, + 'Throws with extra percent signs' + ); + + t['throws']( + function () { GetIntrinsic('%Array.prototype%push%'); }, + SyntaxError, + 'Throws with extra percent signs, even on an existing intrinsic' + ); + + forEach(v.nonStrings, function (nonString) { + t['throws']( + function () { GetIntrinsic(nonString); }, + TypeError, + debug(nonString) + ' is not a String' + ); + }); + + forEach(v.nonBooleans, function (nonBoolean) { + t['throws']( + function () { GetIntrinsic('%', nonBoolean); }, + TypeError, + debug(nonBoolean) + ' is not a Boolean' + ); + }); + + forEach([ + 'toString', + 'propertyIsEnumerable', + 'hasOwnProperty' + ], function (objectProtoMember) { + t['throws']( + function () { GetIntrinsic(objectProtoMember); }, + SyntaxError, + debug(objectProtoMember) + ' is not an intrinsic' + ); + }); + + t.end(); +}); + +test('base intrinsics', function (t) { + t.equal(GetIntrinsic('%Object%'), Object, '%Object% yields Object'); + t.equal(GetIntrinsic('Object'), Object, 'Object yields Object'); + t.equal(GetIntrinsic('%Array%'), Array, '%Array% yields Array'); + t.equal(GetIntrinsic('Array'), Array, 'Array yields Array'); + + t.end(); +}); + +test('dotted paths', function (t) { + t.equal(GetIntrinsic('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% yields Object.prototype.toString'); + t.equal(GetIntrinsic('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString yields Object.prototype.toString'); + t.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push, '%Array.prototype.push% yields Array.prototype.push'); + t.equal(GetIntrinsic('Array.prototype.push'), Array.prototype.push, 'Array.prototype.push yields Array.prototype.push'); + + test('underscore paths are aliases for dotted paths', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { + var original = GetIntrinsic('%ObjProto_toString%'); + + forEach([ + '%Object.prototype.toString%', + 'Object.prototype.toString', + '%ObjectPrototype.toString%', + 'ObjectPrototype.toString', + '%ObjProto_toString%', + 'ObjProto_toString' + ], function (name) { + DefinePropertyOrThrow(Object.prototype, 'toString', { + '[[Value]]': function toString() { + return original.apply(this, arguments); + } + }); + st.equal(GetIntrinsic(name), original, name + ' yields original Object.prototype.toString'); + }); + + DefinePropertyOrThrow(Object.prototype, 'toString', { '[[Value]]': original }); + st.end(); + }); + + test('dotted paths cache', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { + var original = GetIntrinsic('%Object.prototype.propertyIsEnumerable%'); + + forEach([ + '%Object.prototype.propertyIsEnumerable%', + 'Object.prototype.propertyIsEnumerable', + '%ObjectPrototype.propertyIsEnumerable%', + 'ObjectPrototype.propertyIsEnumerable' + ], function (name) { + var restore = mockProperty(Object.prototype, 'propertyIsEnumerable', { + value: function propertyIsEnumerable() { + return original.apply(this, arguments); + } + }); + st.equal(GetIntrinsic(name), original, name + ' yields cached Object.prototype.propertyIsEnumerable'); + + restore(); + }); + + st.end(); + }); + + test('dotted path reports correct error', function (st) { + st['throws'](function () { + GetIntrinsic('%NonExistentIntrinsic.prototype.property%'); + }, /%NonExistentIntrinsic%/, 'The base intrinsic of %NonExistentIntrinsic.prototype.property% is %NonExistentIntrinsic%'); + + st['throws'](function () { + GetIntrinsic('%NonExistentIntrinsicPrototype.property%'); + }, /%NonExistentIntrinsicPrototype%/, 'The base intrinsic of %NonExistentIntrinsicPrototype.property% is %NonExistentIntrinsicPrototype%'); + + st.end(); + }); + + t.end(); +}); + +test('accessors', { skip: !$gOPD || typeof Map !== 'function' }, function (t) { + var actual = $gOPD(Map.prototype, 'size'); + t.ok(actual, 'Map.prototype.size has a descriptor'); + t.equal(typeof actual.get, 'function', 'Map.prototype.size has a getter function'); + t.equal(GetIntrinsic('%Map.prototype.size%'), actual.get, '%Map.prototype.size% yields the getter for it'); + t.equal(GetIntrinsic('Map.prototype.size'), actual.get, 'Map.prototype.size yields the getter for it'); + + t.end(); +}); + +test('generator functions', { skip: !generatorFns.length }, function (t) { + var $GeneratorFunction = GetIntrinsic('%GeneratorFunction%'); + var $GeneratorFunctionPrototype = GetIntrinsic('%Generator%'); + var $GeneratorPrototype = GetIntrinsic('%GeneratorPrototype%'); + + forEach(generatorFns, function (genFn) { + var fnName = genFn.name; + fnName = fnName ? "'" + fnName + "'" : 'genFn'; + + t.ok(genFn instanceof $GeneratorFunction, fnName + ' instanceof %GeneratorFunction%'); + t.ok($isProto($GeneratorFunctionPrototype, genFn), '%Generator% is prototype of ' + fnName); + t.ok($isProto($GeneratorPrototype, genFn.prototype), '%GeneratorPrototype% is prototype of ' + fnName + '.prototype'); + }); + + t.end(); +}); + +test('async functions', { skip: !asyncFns.length }, function (t) { + var $AsyncFunction = GetIntrinsic('%AsyncFunction%'); + var $AsyncFunctionPrototype = GetIntrinsic('%AsyncFunctionPrototype%'); + + forEach(asyncFns, function (asyncFn) { + var fnName = asyncFn.name; + fnName = fnName ? "'" + fnName + "'" : 'asyncFn'; + + t.ok(asyncFn instanceof $AsyncFunction, fnName + ' instanceof %AsyncFunction%'); + t.ok($isProto($AsyncFunctionPrototype, asyncFn), '%AsyncFunctionPrototype% is prototype of ' + fnName); + }); + + t.end(); +}); + +test('async generator functions', { skip: asyncGenFns.length === 0 }, function (t) { + var $AsyncGeneratorFunction = GetIntrinsic('%AsyncGeneratorFunction%'); + var $AsyncGeneratorFunctionPrototype = GetIntrinsic('%AsyncGenerator%'); + var $AsyncGeneratorPrototype = GetIntrinsic('%AsyncGeneratorPrototype%'); + + forEach(asyncGenFns, function (asyncGenFn) { + var fnName = asyncGenFn.name; + fnName = fnName ? "'" + fnName + "'" : 'asyncGenFn'; + + t.ok(asyncGenFn instanceof $AsyncGeneratorFunction, fnName + ' instanceof %AsyncGeneratorFunction%'); + t.ok($isProto($AsyncGeneratorFunctionPrototype, asyncGenFn), '%AsyncGenerator% is prototype of ' + fnName); + t.ok($isProto($AsyncGeneratorPrototype, asyncGenFn.prototype), '%AsyncGeneratorPrototype% is prototype of ' + fnName + '.prototype'); + }); + + t.end(); +}); + +test('%ThrowTypeError%', function (t) { + var $ThrowTypeError = GetIntrinsic('%ThrowTypeError%'); + + t.equal(typeof $ThrowTypeError, 'function', 'is a function'); + t['throws']( + $ThrowTypeError, + TypeError, + '%ThrowTypeError% throws a TypeError' + ); + + t.end(); +}); + +test('allowMissing', { skip: asyncGenFns.length > 0 }, function (t) { + t['throws']( + function () { GetIntrinsic('%AsyncGeneratorPrototype%'); }, + TypeError, + 'throws when missing' + ); + + t.equal( + GetIntrinsic('%AsyncGeneratorPrototype%', true), + undefined, + 'does not throw when allowMissing' + ); + + t.end(); +}); diff --git a/node_modules/get-proto/.eslintrc b/node_modules/get-proto/.eslintrc new file mode 100644 index 0000000..1d21a8a --- /dev/null +++ b/node_modules/get-proto/.eslintrc @@ -0,0 +1,10 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": "off", + "sort-keys": "off", + }, +} diff --git a/node_modules/get-proto/.github/FUNDING.yml b/node_modules/get-proto/.github/FUNDING.yml new file mode 100644 index 0000000..93183ef --- /dev/null +++ b/node_modules/get-proto/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/get-proto +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/get-proto/.nycrc b/node_modules/get-proto/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/get-proto/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/get-proto/CHANGELOG.md b/node_modules/get-proto/CHANGELOG.md new file mode 100644 index 0000000..5860229 --- /dev/null +++ b/node_modules/get-proto/CHANGELOG.md @@ -0,0 +1,21 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.1](https://github.com/ljharb/get-proto/compare/v1.0.0...v1.0.1) - 2025-01-02 + +### Commits + +- [Fix] for the `Object.getPrototypeOf` window, throw for non-objects [`7fe6508`](https://github.com/ljharb/get-proto/commit/7fe6508b71419ebe1976bedb86001d1feaeaa49a) + +## v1.0.0 - 2025-01-01 + +### Commits + +- Initial implementation, tests, readme, types [`5c70775`](https://github.com/ljharb/get-proto/commit/5c707751e81c3deeb2cf980d185fc7fd43611415) +- Initial commit [`7c65c2a`](https://github.com/ljharb/get-proto/commit/7c65c2ad4e33d5dae2f219ebe1a046ae2256972c) +- npm init [`0b8cf82`](https://github.com/ljharb/get-proto/commit/0b8cf824c9634e4a34ef7dd2a2cdc5be6ac79518) +- Only apps should have lockfiles [`a6d1bff`](https://github.com/ljharb/get-proto/commit/a6d1bffc364f5828377cea7194558b2dbef7aea2) diff --git a/node_modules/get-proto/LICENSE b/node_modules/get-proto/LICENSE new file mode 100644 index 0000000..eeabd1c --- /dev/null +++ b/node_modules/get-proto/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Jordan Harband + +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. diff --git a/node_modules/get-proto/Object.getPrototypeOf.d.ts b/node_modules/get-proto/Object.getPrototypeOf.d.ts new file mode 100644 index 0000000..028b3ff --- /dev/null +++ b/node_modules/get-proto/Object.getPrototypeOf.d.ts @@ -0,0 +1,5 @@ +declare function getProto(object: O): object | null; + +declare const x: typeof getProto | null; + +export = x; \ No newline at end of file diff --git a/node_modules/get-proto/Object.getPrototypeOf.js b/node_modules/get-proto/Object.getPrototypeOf.js new file mode 100644 index 0000000..c2cbbdf --- /dev/null +++ b/node_modules/get-proto/Object.getPrototypeOf.js @@ -0,0 +1,6 @@ +'use strict'; + +var $Object = require('es-object-atoms'); + +/** @type {import('./Object.getPrototypeOf')} */ +module.exports = $Object.getPrototypeOf || null; diff --git a/node_modules/get-proto/README.md b/node_modules/get-proto/README.md new file mode 100644 index 0000000..f8b4cce --- /dev/null +++ b/node_modules/get-proto/README.md @@ -0,0 +1,50 @@ +# get-proto [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Robustly get the [[Prototype]] of an object. Uses the best available method. + +## Getting started + +```sh +npm install --save get-proto +``` + +## Usage/Examples + +```js +const assert = require('assert'); +const getProto = require('get-proto'); + +const a = { a: 1, b: 2, [Symbol.toStringTag]: 'foo' }; +const b = { c: 3, __proto__: a }; + +assert.equal(getProto(b), a); +assert.equal(getProto(a), Object.prototype); +assert.equal(getProto({ __proto__: null }), null); +``` + +## Tests + +Clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/get-proto +[npm-version-svg]: https://versionbadg.es/ljharb/get-proto.svg +[deps-svg]: https://david-dm.org/ljharb/get-proto.svg +[deps-url]: https://david-dm.org/ljharb/get-proto +[dev-deps-svg]: https://david-dm.org/ljharb/get-proto/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/get-proto#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/get-proto.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/get-proto.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/get-proto.svg +[downloads-url]: https://npm-stat.com/charts.html?package=get-proto +[codecov-image]: https://codecov.io/gh/ljharb/get-proto/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/get-proto/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-proto +[actions-url]: https://github.com/ljharb/get-proto/actions diff --git a/node_modules/get-proto/Reflect.getPrototypeOf.d.ts b/node_modules/get-proto/Reflect.getPrototypeOf.d.ts new file mode 100644 index 0000000..2388fe0 --- /dev/null +++ b/node_modules/get-proto/Reflect.getPrototypeOf.d.ts @@ -0,0 +1,3 @@ +declare const x: typeof Reflect.getPrototypeOf | null; + +export = x; \ No newline at end of file diff --git a/node_modules/get-proto/Reflect.getPrototypeOf.js b/node_modules/get-proto/Reflect.getPrototypeOf.js new file mode 100644 index 0000000..e6c51be --- /dev/null +++ b/node_modules/get-proto/Reflect.getPrototypeOf.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./Reflect.getPrototypeOf')} */ +module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null; diff --git a/node_modules/get-proto/index.d.ts b/node_modules/get-proto/index.d.ts new file mode 100644 index 0000000..2c021f3 --- /dev/null +++ b/node_modules/get-proto/index.d.ts @@ -0,0 +1,5 @@ +declare function getProto(object: O): object | null; + +declare const x: typeof getProto | null; + +export = x; diff --git a/node_modules/get-proto/index.js b/node_modules/get-proto/index.js new file mode 100644 index 0000000..7e5747b --- /dev/null +++ b/node_modules/get-proto/index.js @@ -0,0 +1,27 @@ +'use strict'; + +var reflectGetProto = require('./Reflect.getPrototypeOf'); +var originalGetProto = require('./Object.getPrototypeOf'); + +var getDunderProto = require('dunder-proto/get'); + +/** @type {import('.')} */ +module.exports = reflectGetProto + ? function getProto(O) { + // @ts-expect-error TS can't narrow inside a closure, for some reason + return reflectGetProto(O); + } + : originalGetProto + ? function getProto(O) { + if (!O || (typeof O !== 'object' && typeof O !== 'function')) { + throw new TypeError('getProto: not an object'); + } + // @ts-expect-error TS can't narrow inside a closure, for some reason + return originalGetProto(O); + } + : getDunderProto + ? function getProto(O) { + // @ts-expect-error TS can't narrow inside a closure, for some reason + return getDunderProto(O); + } + : null; diff --git a/node_modules/get-proto/package.json b/node_modules/get-proto/package.json new file mode 100644 index 0000000..9c35cec --- /dev/null +++ b/node_modules/get-proto/package.json @@ -0,0 +1,81 @@ +{ + "name": "get-proto", + "version": "1.0.1", + "description": "Robustly get the [[Prototype]] of an object", + "main": "index.js", + "exports": { + ".": "./index.js", + "./Reflect.getPrototypeOf": "./Reflect.getPrototypeOf.js", + "./Object.getPrototypeOf": "./Object.getPrototypeOf.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run --silent lint", + "test": "npm run tests-only", + "posttest": "npx npm@\">=10.2\" audit --production", + "tests-only": "nyc tape 'test/**/*.js'", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc && attw -P", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/get-proto.git" + }, + "keywords": [ + "get", + "proto", + "prototype", + "getPrototypeOf", + "[[Prototype]]" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/get-proto/issues" + }, + "homepage": "https://github.com/ljharb/get-proto#readme", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.17.2", + "@ljharb/eslint-config": "^21.1.1", + "@ljharb/tsconfig": "^0.2.3", + "@types/tape": "^5.8.0", + "auto-changelog": "^2.5.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "testling": { + "files": "test/index.js" + } +} diff --git a/node_modules/get-proto/test/index.js b/node_modules/get-proto/test/index.js new file mode 100644 index 0000000..5a2ece2 --- /dev/null +++ b/node_modules/get-proto/test/index.js @@ -0,0 +1,68 @@ +'use strict'; + +var test = require('tape'); + +var getProto = require('../'); + +test('getProto', function (t) { + t.equal(typeof getProto, 'function', 'is a function'); + + t.test('can get', { skip: !getProto }, function (st) { + if (getProto) { // TS doesn't understand tape's skip + var proto = { b: 2 }; + st.equal(getProto(proto), Object.prototype, 'proto: returns the [[Prototype]]'); + + st.test('nullish value', function (s2t) { + // @ts-expect-error + s2t['throws'](function () { return getProto(undefined); }, TypeError, 'undefined is not an object'); + // @ts-expect-error + s2t['throws'](function () { return getProto(null); }, TypeError, 'null is not an object'); + s2t.end(); + }); + + // @ts-expect-error + st['throws'](function () { getProto(true); }, 'throws for true'); + // @ts-expect-error + st['throws'](function () { getProto(false); }, 'throws for false'); + // @ts-expect-error + st['throws'](function () { getProto(42); }, 'throws for 42'); + // @ts-expect-error + st['throws'](function () { getProto(NaN); }, 'throws for NaN'); + // @ts-expect-error + st['throws'](function () { getProto(0); }, 'throws for +0'); + // @ts-expect-error + st['throws'](function () { getProto(-0); }, 'throws for -0'); + // @ts-expect-error + st['throws'](function () { getProto(Infinity); }, 'throws for ∞'); + // @ts-expect-error + st['throws'](function () { getProto(-Infinity); }, 'throws for -∞'); + // @ts-expect-error + st['throws'](function () { getProto(''); }, 'throws for empty string'); + // @ts-expect-error + st['throws'](function () { getProto('foo'); }, 'throws for non-empty string'); + st.equal(getProto(/a/g), RegExp.prototype); + st.equal(getProto(new Date()), Date.prototype); + st.equal(getProto(function () {}), Function.prototype); + st.equal(getProto([]), Array.prototype); + st.equal(getProto({}), Object.prototype); + + var nullObject = { __proto__: null }; + if ('toString' in nullObject) { + st.comment('no null objects in this engine'); + st.equal(getProto(nullObject), Object.prototype, '"null" object has Object.prototype as [[Prototype]]'); + } else { + st.equal(getProto(nullObject), null, 'null object has null [[Prototype]]'); + } + } + + st.end(); + }); + + t.test('can not get', { skip: !!getProto }, function (st) { + st.equal(getProto, null); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/get-proto/tsconfig.json b/node_modules/get-proto/tsconfig.json new file mode 100644 index 0000000..60fb90e --- /dev/null +++ b/node_modules/get-proto/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + //"target": "es2021", + }, + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/get-source/.eslintrc b/node_modules/get-source/.eslintrc new file mode 100644 index 0000000..955b07d --- /dev/null +++ b/node_modules/get-source/.eslintrc @@ -0,0 +1,6 @@ +{ + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "script" + } +} \ No newline at end of file diff --git a/node_modules/get-source/.travis.yml b/node_modules/get-source/.travis.yml new file mode 100644 index 0000000..551eaa9 --- /dev/null +++ b/node_modules/get-source/.travis.yml @@ -0,0 +1,24 @@ +language: node_js +node_js: +- '10' +script: +- set -e +- npm run test +- npm run coveralls +# after_success: +# - git config --global user.email "travis@travis-ci.org" +# - git config --global user.name "Travis CI" +# - npm config set git-tag-version=false +# - NPM_VERSION=$(npm version patch) +# - git commit -a -m "${NPM_VERSION:1}" -m "[ci skip]" +# - git remote remove origin +# - git remote add origin https://${GITHUB_TOKEN}@github.com/xpl/get-source.git +# - git push origin HEAD:master +# deploy: +# provider: npm +# email: rocket.mind@gmail.com +# api_key: +# secure: jEWoCdiL3qadEKV36Aw1On1JNNvzSKIaZELVp0NiQLoWwbnTXzkXJuabHGDUQFnD9VXjhqtduS0GMpaV//HOXalSR72s8+VnnLYxsVj+Aslh1kDEwXW3OsQ2O5PSZY5nmGVYuZVjwFeOa70+cvMd0nE1v9HNgJBhhzeKiewgzusGrGBaW3ovXz9Bf7ITsbkVO55SbW8CroKILrQiPBTSqEUqH0Vx+ucHtb+gfJfOs7kXoCkjf8tu/yZjs5NIaHt1lKoWOmUlG3z7CjtFenieuzlQRe48jSQKnbXh5yJmziKvbiiwEfFnPhzPZqPKiXHDkBOr7Fm+geMSJcbRlu4lhB/aUfDoT5vlabnQsTcxz1wTKW+N/WR2xdl4kc5HPF9Tnx4c/MDVvQnC05NCRtcrtZNAla9r9pG/zmIvmFiP0ulPgDok8+Mq4GrDoNd5T4Dt8Xk+uD+rENjifYNetIU3Zcq7uslkwaoDZq29V/tSdbHVtXjMw+FSbUk5jJxD/4j3FxDaQGjOkjN/kqxcWc1IH5xi9bG0wCD5sKsdadPAuEMCJRFIlRP+EtyLD3CKwFYPKCQuTTvPJnZ6IOtCNGWI4Qe0eYSrmwURIdUkyxUkdeGZhjrTsGtJN7WXKq+JD2JU88978o3ZQ+CN1iqBaL8yhlDt8vhPtkzVqZXWI1LAB9A= +env: + global: + secure: SXc3ilPr7p+uac/b3ibx27zFEuKotjA0FLHkkFaU5Y74Ek++Yh++cmBbXjz8yS2XtaEmvr+EL/Z7cUsD7hbs787+lyc16AJNEf1l3PKwsFx7djsOBdXFf0mVPhmlx2BbAtgrVylPlVM0yzBDUTWOm2lFtMFp8v2vjJeSnePaWV2Gf7T4hpm4S4U0fXeVRFynFIDo+TfyJoNG6zg6iuUcIjiY5zrvE8U6pg3TtRUaQx8+JWZYdukiKEjPZ2mUHHGaHDRouM99wFz7Y1WTBkxYvyIQFNuf9zzJ/IRMFiLMhxPvSbIYHpNtimCWjYL/Hw105BWOxoTOFa2lsRT5dJAxv3LfroWrEG6vnV5BeJ35Ogcy4Mqf0N3lrMjo/vUgbn6nP2MTyADqBjNdJ0T6tqRSY4sE2M0nXddC/9/ONHOnqzOtAxqS72MJ93ZzSJ0VvMIaf2rygAnIHVHe7mzV3EEhs6l5APQYybYWI8bLD8A75LZeBG1tSBvdPdf5ny6l1GSyoQ1qIntfrl/FcGiJKbGVRl6by/XdRIGA9HOenOHdBzLrB58VF0NkOKzmizlu3O51LW21Yt/HwPRAoGb9t/7KAOT6otKplIk8qy/tTzIc0fZm6mG8FmRQsisIrfWTiWh37jSZU9FGdNGkF/tjjZ/bmEPiJ56fWiXvzVv9CQAeF/0= diff --git a/node_modules/get-source/LICENSE b/node_modules/get-source/LICENSE new file mode 100644 index 0000000..49dbbe1 --- /dev/null +++ b/node_modules/get-source/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Vitaly Gordon (https://github.com/xpl) + +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. diff --git a/node_modules/get-source/README.md b/node_modules/get-source/README.md new file mode 100644 index 0000000..c0cd7fb --- /dev/null +++ b/node_modules/get-source/README.md @@ -0,0 +1,112 @@ +# get-source + +[![Build Status](https://travis-ci.org/xpl/get-source.svg?branch=master)](https://travis-ci.org/xpl/get-source) [![Coverage Status](https://coveralls.io/repos/github/xpl/get-source/badge.svg)](https://coveralls.io/github/xpl/get-source) [![npm](https://img.shields.io/npm/v/get-source.svg)](https://npmjs.com/package/get-source) + +Fetch source-mapped sources. Peek by file, line, column. Node & browsers. Sync & async. + +```bash +npm install get-source +``` + +## Features + +- [x] Allows to read source code files in Node and browsers +- [x] Full sourcemap support (path resolving, external/embedded/inline linking, and long chains) +- [x] **Synchronous** API — good for CLI tools (e.g. [logging](https://github.com/xpl/ololog)). Works in browsers! +- [x] **Asynchronous** API — good for everything web! +- [x] Built-in cache + +## What for + +- [x] Call stacks enhanced with source code information (see the [StackTracey](https://github.com/xpl/stacktracey) library) +- [x] [Advanced logging](https://github.com/xpl/ololog) / assertion printing +- [x] [Error displaying components](https://github.com/xpl/panic-overlay) for front-end web development + +## Usage (Synchronous) + +```javascript +import getSource from 'get-source' +``` +```javascript +file = getSource ('./scripts/index.min.js') +``` + +Will read the file synchronously (either via XHR or by filesystem API, depending on the environment) and return it's cached representation. Result will contain the following fields: + +```javascript +file.path // normalized file path +file.text // text contents +file.lines // array of lines +``` + +And the `resolve` method: + +```javascript +file.resolve ({ line: 1, column: 8 }) // indexes here start from 1 (by widely accepted convention). Zero indexes are invalid. +``` + +It will look through the sourcemap chain, returning following: + +```javascript +{ + line: , + column: , + sourceFile: , + sourceLine: +} +``` + +In that returned object, `sourceFile` is the same kind of object that `getSource` returns. So you can access its `text`, `lines` and `path` fields to obtain the full information. And the `sourceLine` is returned just for the convenience, as a shortcut. + +## Usage (Asynchronous) + +Pretty much the same as synchronous, except it's `getSource.async`. It returns awaitable promises: + +```javascript +file = await getSource.async ('./scripts/index.min.js') +location = await file.resolve ({ line: 1, column: 8 }) +``` + +## Error handling + +In synchronous mode, it never throws (due to backward compatibility reasons with existing code): + +```javascript +nonsense = getSource ('/some/nonexistent/file') + +nonsense.text // should be '' (so it's safe to access without checking) +nonsense.error // should be an Error object, representing an actual error thrown during reading/parsing +``` +```javascript +resolved = nonsense.resolve ({ line: 5, column: 0 }) + +resolved.sourceLine // empty string (so it's safe to access without checking) +resolved.error // should be an Error object, representing an actual error thrown during reading/parsing +``` + +In asychronous mode, it throws an error: + +```javascript +try { + file = await getSource.async ('/some/file') + location = await file.resolve ({ line: 5, column: 0 }) +} catch (e) { + ... +} +``` + +## Resetting Cache + +E.g. when you need to force-reload files: + +```javascript +getSource.resetCache () // sync cache +getSource.async.resetCache () // async cache +``` + +Also, viewing cached files: + +```javascript +getSource.getCache () // sync cache +getSource.async.getCache () // async cache +``` diff --git a/node_modules/get-source/get-source.d.ts b/node_modules/get-source/get-source.d.ts new file mode 100644 index 0000000..fb9b81f --- /dev/null +++ b/node_modules/get-source/get-source.d.ts @@ -0,0 +1,48 @@ + +declare interface Location { + + line: number; + column: number; +} + +declare interface ResolvedLocation extends Location { + + sourceFile: FileType; + sourceLine: string; + error?: Error; +} + +declare interface File { + + path: string; + text: string; + lines: string[]; + error?: Error; +} + +declare interface FileAsync extends File { + resolve (location: Location): Promise> +} + +declare interface FileSync extends File { + resolve (location: Location): ResolvedLocation +} + +declare interface FileCache { + + resetCache (): void; + getCache (): { [key: string]: T }; +} + +declare interface getSourceAsync extends FileCache { + (path: string): Promise; +} + +declare interface getSourceSync extends FileCache { + (path: string): FileSync; + async: getSourceAsync; +} + +declare const getSource: getSourceSync; + +export = getSource; diff --git a/node_modules/get-source/get-source.js b/node_modules/get-source/get-source.js new file mode 100644 index 0000000..5f2d2d7 --- /dev/null +++ b/node_modules/get-source/get-source.js @@ -0,0 +1,176 @@ +"use strict"; + +/* ------------------------------------------------------------------------ */ + +const { assign } = Object, + isBrowser = (typeof window !== 'undefined') && (window.window === window) && window.navigator, + SourceMapConsumer = require ('source-map').SourceMapConsumer, + SyncPromise = require ('./impl/SyncPromise'), + path = require ('./impl/path'), + dataURIToBuffer = require ('data-uri-to-buffer'), + nodeRequire = isBrowser ? null : module.require + +/* ------------------------------------------------------------------------ */ + +const memoize = f => { + + const m = x => (x in m.cache) ? m.cache[x] : (m.cache[x] = f(x)) + m.forgetEverything = () => { m.cache = Object.create (null) } + m.cache = Object.create (null) + + return m +} + +function impl (fetchFile, sync) { + + const PromiseImpl = sync ? SyncPromise : Promise + const SourceFileMemoized = memoize (path => SourceFile (path, fetchFile (path))) + + function SourceFile (srcPath, text) { + if (text === undefined) return SourceFileMemoized (path.resolve (srcPath)) + + return PromiseImpl.resolve (text).then (text => { + + let file + let lines + let resolver + let _resolve = loc => (resolver = resolver || SourceMapResolverFromFetchedFile (file)) (loc) + + return (file = { + path: srcPath, + text, + get lines () { return lines = (lines || text.split ('\n')) }, + resolve (loc) { + const result = _resolve (loc) + if (sync) { + try { return SyncPromise.valueFrom (result) } + catch (e) { return assign ({}, loc, { error: e }) } + } else { + return Promise.resolve (result) + } + }, + _resolve, + }) + }) + } + + function SourceMapResolverFromFetchedFile (file) { + + /* Extract the last sourceMap occurence (TODO: support multiple sourcemaps) */ + + const re = /\u0023 sourceMappingURL=(.+)\n?/g + let lastMatch = undefined + + while (true) { + const match = re.exec (file.text) + if (match) lastMatch = match + else break + } + + const url = lastMatch && lastMatch[1] + + const defaultResolver = loc => assign ({}, loc, { + sourceFile: file, + sourceLine: (file.lines[loc.line - 1] || '') + }) + + return url ? SourceMapResolver (file.path, url, defaultResolver) + : defaultResolver + } + + function SourceMapResolver (originalFilePath, sourceMapPath, fallbackResolve) { + + const srcFile = sourceMapPath.startsWith ('data:') + ? SourceFile (originalFilePath, dataURIToBuffer (sourceMapPath).toString ()) + : SourceFile (path.relativeToFile (originalFilePath, sourceMapPath)) + + const parsedMap = srcFile.then (f => SourceMapConsumer (JSON.parse (f.text))) + + const sourceFor = memoize (function sourceFor (filePath) { + return srcFile.then (f => { + const fullPath = path.relativeToFile (f.path, filePath) + return parsedMap.then (x => SourceFile ( + fullPath, + x.sourceContentFor (filePath, true /* return null on missing */) || undefined)) + }) + }) + + return loc => parsedMap.then (x => { + const originalLoc = x.originalPositionFor (loc) + return originalLoc.source ? sourceFor (originalLoc.source).then (x => + x._resolve (assign ({}, loc, { + line: originalLoc.line, + column: originalLoc.column + 1, + name: originalLoc.name + })) + ) + : fallbackResolve (loc) + }).catch (e => + assign (fallbackResolve (loc), { sourceMapError: e })) + } + + return assign (function getSource (path) { + const file = SourceFile (path) + if (sync) { + try { return SyncPromise.valueFrom (file) } + catch (e) { + const noFile = { + path, + text: '', + lines: [], + error: e, + resolve (loc) { + return assign ({}, loc, { error: e, sourceLine: '', sourceFile: noFile }) + } + } + return noFile + } + } + return file + }, { + resetCache: () => SourceFileMemoized.forgetEverything (), + getCache: () => SourceFileMemoized.cache + }) +} + +/* ------------------------------------------------------------------------ */ + +module.exports = impl (function fetchFileSync (path) { + return new SyncPromise (resolve => { + if (isBrowser) { + let xhr = new XMLHttpRequest () + xhr.open ('GET', path, false /* SYNCHRONOUS XHR FTW :) */) + xhr.send (null) + resolve (xhr.responseText) + } else { + resolve (nodeRequire ('fs').readFileSync (path, { encoding: 'utf8' })) + } + }) + }, true) + +/* ------------------------------------------------------------------------ */ + +module.exports.async = impl (function fetchFileAsync (path) { + return new Promise ((resolve, reject) => { + if (isBrowser) { + let xhr = new XMLHttpRequest () + xhr.open ('GET', path) + xhr.onreadystatechange = event => { + if (xhr.readyState === 4) { + if (xhr.status === 200) { + resolve (xhr.responseText) + } else { + reject (new Error (xhr.statusText)) + } + } + } + xhr.send (null) + } else { + nodeRequire ('fs').readFile (path, { encoding: 'utf8' }, (e, x) => { + e ? reject (e) : resolve (x) + }) + } + }) + }) + +/* ------------------------------------------------------------------------ */ diff --git a/node_modules/get-source/impl/SyncPromise.js b/node_modules/get-source/impl/SyncPromise.js new file mode 100644 index 0000000..1412532 --- /dev/null +++ b/node_modules/get-source/impl/SyncPromise.js @@ -0,0 +1,51 @@ +"use strict"; + +/* ------------------------------------------------------------------------ */ + +module.exports = class SyncPromise { + + constructor (fn) { + try { + fn ( + x => { this.setValue (x, false) }, // resolve + x => { this.setValue (x, true) } // reject + ) + } catch (e) { + this.setValue (e, true) + } + } + + setValue (x, rejected) { + this.val = (x instanceof SyncPromise) ? x.val : x + this.rejected = rejected || ((x instanceof SyncPromise) ? x.rejected : false) + } + + static valueFrom (x) { + if (x instanceof SyncPromise) { + if (x.rejected) throw x.val + else return x.val + } else { + return x + } + } + + then (fn) { + try { if (!this.rejected) return SyncPromise.resolve (fn (this.val)) } + catch (e) { return SyncPromise.reject (e) } + return this + } + + catch (fn) { + try { if (this.rejected) return SyncPromise.resolve (fn (this.val)) } + catch (e) { return SyncPromise.reject (e) } + return this + } + + static resolve (x) { + return new SyncPromise (resolve => { resolve (x) }) + } + + static reject (x) { + return new SyncPromise ((_, reject) => { reject (x) }) + } +} \ No newline at end of file diff --git a/node_modules/get-source/impl/path.js b/node_modules/get-source/impl/path.js new file mode 100644 index 0000000..4a0eb3d --- /dev/null +++ b/node_modules/get-source/impl/path.js @@ -0,0 +1,62 @@ +"use strict"; + +/* ------------------------------------------------------------------------ */ + +const isBrowser = (typeof window !== 'undefined') && (window.window === window) && window.navigator +const cwd = isBrowser ? window.location.href : process.cwd () + +const urlRegexp = new RegExp ("^((https|http)://)?[a-z0-9A-Z]{3}\.[a-z0-9A-Z][a-z0-9A-Z]{0,61}?[a-z0-9A-Z]\.com|net|cn|cc (:s[0-9]{1-4})?/$") + +/* ------------------------------------------------------------------------ */ + +const path = module.exports = { + + concat (a, b) { + + const a_endsWithSlash = (a[a.length - 1] === '/'), + b_startsWithSlash = (b[0] === '/') + + return a + ((a_endsWithSlash || b_startsWithSlash) ? '' : '/') + + ((a_endsWithSlash && b_startsWithSlash) ? b.substring (1) : b) + }, + + resolve (x) { + + if (path.isAbsolute (x)) { + return path.normalize (x) } + + return path.normalize (path.concat (cwd, x)) + }, + + normalize (x) { + + let output = [], + skip = 0 + + x.split ('/').reverse ().filter (x => x !== '.').forEach (x => { + + if (x === '..') { skip++ } + else if (skip === 0) { output.push (x) } + else { skip-- } + }) + + const result = output.reverse ().join ('/') + + return ((isBrowser && (result[0] === '/')) ? result[1] === '/' ? window.location.protocol : window.location.origin : '') + result + }, + + isData: x => x.indexOf ('data:') === 0, + + isURL: x => urlRegexp.test (x), + + isAbsolute: x => (x[0] === '/') || /^[^\/]*:/.test (x), + + relativeToFile (a, b) { + + return (path.isData (a) || path.isAbsolute (b)) ? + path.normalize (b) : + path.normalize (path.concat (a.split ('/').slice (0, -1).join ('/'), b)) + } +} + +/* ------------------------------------------------------------------------ */ diff --git a/node_modules/get-source/package.json b/node_modules/get-source/package.json new file mode 100644 index 0000000..1040982 --- /dev/null +++ b/node_modules/get-source/package.json @@ -0,0 +1,43 @@ +{ + "name": "get-source", + "version": "2.0.12", + "description": "Fetch source-mapped sources. Peek by file, line, column. Node & browsers. Sync & async.", + "main": "get-source", + "types": "./get-source.d.ts", + "scripts": { + "test-browser": "mocha test/test.browser --reporter spec", + "test-node": "mocha test/test.node --reporter spec", + "test-path": "mocha test/test.path --reporter spec", + "test": "nyc --reporter=html --reporter=text mocha test/test.path test/test.node --reporter spec", + "coveralls": "nyc report --reporter=text-lcov | coveralls" + }, + "repository": { + "type": "git", + "url": "https://github.com/xpl/get-source.git" + }, + "keywords": [ + "sources", + "sourcemap", + "read source", + "cached sources" + ], + "author": "Vitaly Gordon ", + "license": "Unlicense", + "bugs": { + "url": "https://github.com/xpl/get-source/issues" + }, + "homepage": "https://github.com/xpl/get-source", + "devDependencies": { + "chai": "^3.5.0", + "coveralls": "^3.0.3", + "istanbul": "^0.4.5", + "memory-fs": "^0.3.0", + "mocha": "^8.0.1", + "nyc": "^15.1.0", + "webpack": "^4.43.0" + }, + "dependencies": { + "data-uri-to-buffer": "^2.0.0", + "source-map": "^0.6.1" + } +} diff --git a/node_modules/get-source/test/files/get-source.webpack.entry.js b/node_modules/get-source/test/files/get-source.webpack.entry.js new file mode 100644 index 0000000..aa676cd --- /dev/null +++ b/node_modules/get-source/test/files/get-source.webpack.entry.js @@ -0,0 +1,3 @@ +require ('chai').should () +window.path = require ('../../impl/path') +window.getSource = require ('../../get-source') \ No newline at end of file diff --git a/node_modules/get-source/test/files/original.babeled.with.inline.sourcemap.js b/node_modules/get-source/test/files/original.babeled.with.inline.sourcemap.js new file mode 100644 index 0000000..8ed6136 --- /dev/null +++ b/node_modules/get-source/test/files/original.babeled.with.inline.sourcemap.js @@ -0,0 +1,9 @@ +'use strict'; + +/* Dummy javascript file */ + +function hello() { + return 'hello world'; +} + +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9yaWdpbmFsLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUE7O0FBRUEsU0FBUyxLQUFULEdBQWtCO0FBQ2pCLFFBQU8sYUFBUDtBQUFzQiIsImZpbGUiOiJvcmlnaW5hbC5iYWJlbGVkLndpdGguaW5saW5lLnNvdXJjZW1hcC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qXHREdW1teSBqYXZhc2NyaXB0IGZpbGVcdCovXG5cbmZ1bmN0aW9uIGhlbGxvICgpIHtcblx0cmV0dXJuICdoZWxsbyB3b3JsZCcgfSJdfQ== \ No newline at end of file diff --git a/node_modules/get-source/test/files/original.js b/node_modules/get-source/test/files/original.js new file mode 100644 index 0000000..f91aae4 --- /dev/null +++ b/node_modules/get-source/test/files/original.js @@ -0,0 +1,4 @@ +/* Dummy javascript file */ + +function hello () { + return 'hello world' } \ No newline at end of file diff --git a/node_modules/get-source/test/files/original.uglified.beautified.js b/node_modules/get-source/test/files/original.uglified.beautified.js new file mode 100644 index 0000000..b92406c --- /dev/null +++ b/node_modules/get-source/test/files/original.uglified.beautified.js @@ -0,0 +1,4 @@ +function hello() { + return "hello world"; +} +//# sourceMappingURL=original.uglified.beautified.js.map diff --git a/node_modules/get-source/test/files/original.uglified.beautified.js.map b/node_modules/get-source/test/files/original.uglified.beautified.js.map new file mode 100644 index 0000000..8750ef6 --- /dev/null +++ b/node_modules/get-source/test/files/original.uglified.beautified.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["original.uglified.js"],"names":["hello"],"mappings":"AAAA,SAASA;IAAQ,OAAM"} \ No newline at end of file diff --git a/node_modules/get-source/test/files/original.uglified.js b/node_modules/get-source/test/files/original.uglified.js new file mode 100644 index 0000000..14b93ce --- /dev/null +++ b/node_modules/get-source/test/files/original.uglified.js @@ -0,0 +1,2 @@ +function hello(){return"hello world"} +//# sourceMappingURL=original.uglified.js.map diff --git a/node_modules/get-source/test/files/original.uglified.js.map b/node_modules/get-source/test/files/original.uglified.js.map new file mode 100644 index 0000000..1018216 --- /dev/null +++ b/node_modules/get-source/test/files/original.uglified.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["original.js"],"names":["hello"],"mappings":"AAEA,QAASA,SACR,MAAO"} \ No newline at end of file diff --git a/node_modules/get-source/test/files/original.uglified.with.sources.js b/node_modules/get-source/test/files/original.uglified.with.sources.js new file mode 100644 index 0000000..1b9f726 --- /dev/null +++ b/node_modules/get-source/test/files/original.uglified.with.sources.js @@ -0,0 +1,2 @@ +function hello(){return"hello world"} +//# sourceMappingURL=original.uglified.with.sources.js.map diff --git a/node_modules/get-source/test/files/original.uglified.with.sources.js.map b/node_modules/get-source/test/files/original.uglified.with.sources.js.map new file mode 100644 index 0000000..77923be --- /dev/null +++ b/node_modules/get-source/test/files/original.uglified.with.sources.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["## embedded ##"],"names":["hello"],"mappings":"AAEA,QAASA,SACR,MAAO","sourcesContent":["/*\tDummy javascript file\t*/\n\nfunction hello () {\n\treturn 'hello world' }"]} \ No newline at end of file diff --git a/node_modules/get-source/test/files/test.html b/node_modules/get-source/test/files/test.html new file mode 100644 index 0000000..6c70bcf --- /dev/null +++ b/node_modules/get-source/test/files/test.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/get-source/test/test.browser.js b/node_modules/get-source/test/test.browser.js new file mode 100644 index 0000000..ed7b523 --- /dev/null +++ b/node_modules/get-source/test/test.browser.js @@ -0,0 +1,98 @@ + +/* TODO: make it work in Travis CI + ------------------------------------------------------------------------ */ + +const selenium = require ('selenium-webdriver/testing') + +/* ------------------------------------------------------------------------ */ + +selenium.describe ('Chrome test', (done) => { + + const webdriver = require ('selenium-webdriver') + , path = require ('path') + , fs = require ('fs') + , memFS = new (require ('memory-fs')) () + , it = selenium.it + , webpack = require ('webpack') + , logging = require ('selenium-webdriver/lib/logging') + + let driver + +/* Prepare ChromeDriver (with CORS disabled and log interception enabled) */ + + selenium.before (() => driver = + new webdriver + .Builder () + .withCapabilities ( + webdriver.Capabilities + .chrome () + .setLoggingPrefs (new logging.Preferences ().setLevel (logging.Type.BROWSER, logging.Level.ALL)) + .set ('chromeOptions', { + 'args': ['--disable-web-security'] })) + .build ()) + + selenium.after (() => driver.quit ()) + + it ('works', async () => { + + /* Compile get-source */ + + const compiledScript = await (new Promise (resolve => { Object.assign (webpack ({ + + entry: './test/files/get-source.webpack.entry.js', + output: { path: '/', filename: 'get-source.webpack.compiled.js' }, + plugins: [ new webpack.IgnorePlugin(/^fs$/) ] + + }), { outputFileSystem: memFS }).run ((err, stats) => { + + if (err) throw err + + resolve (memFS.readFileSync ('/get-source.webpack.compiled.js').toString ('utf-8')) + }) + })) + + /* Inject it into Chrome */ + + driver.get ('file://' + path.resolve ('./test/files/test.html')) + driver.executeScript (compiledScript) + + /* Execute test */ + + const exec = fn => driver.executeScript (`(${fn.toString ()})()`) + + try { + + await exec (function () { + + path.relativeToFile ('http://foo.com/scripts/bar.js', '../bar.js.map') + .should.equal ('http://foo.com/bar.js.map') + + path.relativeToFile ('http://foo.com/scripts/bar.js', 'http://bar.js.map') + .should.equal ('http://bar.js.map') + + path.relativeToFile ('http://foo.com/scripts/bar.js', '/bar.js.map') + .should.equal ('file:///bar.js.map') + + path.relativeToFile ('http://foo.com/scripts/bar.js', '//bar.com/bar.js.map') + .should.equal ('http://bar.com/bar.js.map') + + var loc = getSource ('../original.uglified.beautified.js').resolve ({ line: 2, column: 4 }) + + loc.line.should.equal (4) + loc.column.should.equal (2) + loc.sourceFile.path.should.contain ('test/files/original.js') + loc.sourceLine.should.equal ('\treturn \'hello world\' }') + }) + + } catch (e) { throw e } finally { + + driver.manage ().logs ().get (logging.Type.BROWSER).then (entries => { + entries.forEach (entry => { + console.log('[BROWSER] [%s] %s', entry.level.name, entry.message); + }) + }) + } + }) +}) + +/* ------------------------------------------------------------------------ */ diff --git a/node_modules/get-source/test/test.node.js b/node_modules/get-source/test/test.node.js new file mode 100644 index 0000000..d546ff6 --- /dev/null +++ b/node_modules/get-source/test/test.node.js @@ -0,0 +1,222 @@ +"use strict"; + +/* NOTE: I've used supervisor to auto-restart mocha, because mocha --watch + didn't work for selenium tests (not reloading them)... + ------------------------------------------------------------------ */ + +require ('chai').should () + +/* ------------------------------------------------------------------------ */ + +describe ('get-source', () => { + + const getSource = require ('../get-source'), + fs = require ('fs'), + path = require ('path') + + it ('cache sanity check', () => { + + getSource ('./get-source.js').should.equal (getSource ('./get-source.js')) + getSource ('./get-source.js').should.not.equal (getSource ('./package.json')) + }) + + it ('reads sources (not sourcemapped)', () => { + + const original = getSource ('./test/files/original.js') + + original.path.should.equal (path.resolve ('./test/files/original.js')) // resolves input paths + original.text.should.equal (fs.readFileSync ('./test/files/original.js', { encoding: 'utf-8' })) + original.lines.should.deep.equal ([ + '/*\tDummy javascript file\t*/', + '', + 'function hello () {', + '\treturn \'hello world\' }' + ]) + + const resolved = original.resolve ({ line: 4, column: 1 }) + + resolved.line.should.equal (4) + resolved.column.should.equal (1) + resolved.sourceFile.should.equal (original) + resolved.sourceLine.should.equal ('\treturn \'hello world\' }') + }) + + it ('reads sources (sourcemapped, with external links)', () => { + + const uglified = getSource ('./test/files/original.uglified.js') + + uglified.path.should.equal (path.resolve ('./test/files/original.uglified.js')) + uglified.lines.should.deep.equal ([ + 'function hello(){return"hello world"}', + '//# sourceMappingURL=original.uglified.js.map', + '' + ]) + + // uglified.sourceMap.should.not.equal (undefined) + // uglified.sourceMap.should.equal (uglified.sourceMap) // memoization should work + + const resolved = uglified.resolve ({ line: 1, column: 18 }) // should be tolerant to column omission + + resolved.line.should.equal (4) + resolved.column.should.equal (2) + resolved.sourceFile.should.equal (getSource ('./test/files/original.js')) + resolved.sourceLine.should.equal ('\treturn \'hello world\' }') + }) + + it ('reads sources (sourcemapped, with external links) — ASYNC', () => { + + const uglified = getSource.async ('./test/files/original.uglified.js') + + return uglified.then (uglified => { + + uglified.path.should.equal (path.resolve ('./test/files/original.uglified.js')) + uglified.lines.should.deep.equal ([ + 'function hello(){return"hello world"}', + '//# sourceMappingURL=original.uglified.js.map', + '' + ]) + + // uglified.sourceMap.should.not.equal (undefined) + // uglified.sourceMap.should.equal (uglified.sourceMap) // memoization should work + + return uglified.resolve ({ line: 1, column: 18 }).then (resolved => { + + return getSource.async ('./test/files/original.js').then (originalFile => { + resolved.line.should.equal (4) + resolved.column.should.equal (2) + resolved.sourceFile.should.equal (originalFile) + resolved.sourceLine.should.equal ('\treturn \'hello world\' }') + }) + }) + }) + }) + + it ('reads sources (sourcemapped, with embedded sources)', () => { + + const uglified = getSource ('./test/files/original.uglified.with.sources.js') + + uglified.path.should.equal (path.resolve ('./test/files/original.uglified.with.sources.js')) + uglified.lines.should.deep.equal ([ + 'function hello(){return"hello world"}', + '//# sourceMappingURL=original.uglified.with.sources.js.map', + '' + ]) + + // uglified.sourceMap.should.not.equal (undefined) + + const resolved = uglified.resolve ({ line: 1, column: 18 }) + + resolved.line.should.equal (4) + resolved.column.should.equal (2) + resolved.sourceFile.path.should.equal (path.resolve ('./test/files') + '/## embedded ##') // I've changed the filename manually, by editing .map file + resolved.sourceLine.should.equal ('\treturn \'hello world\' }') + }) + + it ('reads sources (sourcemapped, with inline base64 sourcemaps)', () => { + + const babeled = getSource ('./test/files/original.babeled.with.inline.sourcemap.js') + + // babeled.sourceMap.should.not.equal (undefined) + // babeled.sourceMap.file.path.should.equal (babeled.path) + + const resolved = babeled.resolve ({ line: 6, column: 1 }) + + resolved.line.should.equal (4) + resolved.column.should.equal (2) + resolved.sourceLine.should.equal ('\treturn \'hello world\' }') + }) + + it ('supports even CHAINED sourcemaps!', () => { + + /* original.js → original.uglified.js → original.uglified.beautified.js */ + + const beautified = getSource ('./test/files/original.uglified.beautified.js') + + beautified.path.should.equal (path.resolve ('./test/files/original.uglified.beautified.js')) + beautified.text.should.equal (fs.readFileSync ('./test/files/original.uglified.beautified.js', { encoding: 'utf-8' })) + + // beautified.sourceMap.should.not.equal (undefined) + + const resolved = beautified.resolve ({ line: 2, column: 4 }) + + resolved.line.should.equal (4) + resolved.column.should.equal (2) + resolved.sourceFile.path.should.equal (path.resolve ('./test/files/original.js')) + resolved.sourceLine.should.equal ('\treturn \'hello world\' }') + }) + + it ('adheres to async interface', () => { + + return getSource.async ('./get-source.js').then (result => { + + ;(result.resolve ({ line: 1, column: 0 }) instanceof Promise).should.equal (true) + }) + }) + + it ('supports even CHAINED sourcemaps! — ASYNC', () => { + + /* original.js → original.uglified.js → original.uglified.beautified.js */ + + return getSource.async ('./test/files/original.uglified.beautified.js').then (beautified => { + + beautified.text.should.equal (fs.readFileSync ('./test/files/original.uglified.beautified.js', { encoding: 'utf-8' })) + beautified.path.should.equal (path.resolve ('./test/files/original.uglified.beautified.js')) + + return beautified.resolve ({ line: 2, column: 4 }).then (resolved => { + + resolved.line.should.equal (4) + resolved.column.should.equal (2) + resolved.sourceFile.path.should.equal (path.resolve ('./test/files/original.js')) + resolved.sourceLine.should.equal ('\treturn \'hello world\' }') + }) + }) + }) + + it ('does some error handling', () => { + + const nonsense = getSource ('abyrvalg') + + nonsense.text.should.equal ('') + nonsense.error.should.be.an.instanceof (Error) + + const resolved = nonsense.resolve ({ line: 5, column: 0 }) + + resolved.error.should.equal (nonsense.error) + resolved.sourceLine.should.equal ('') + resolved.sourceFile.path.should.equal ('abyrvalg') + }) + + it ('does some error handling - ASYNC', () => { + + return getSource.async ('abyrvalg').then (x => { console.log (x) }).catch (error => { + error.should.be.an.instanceof (Error) + }) + }) + + it ('allows absolute paths', () => { + + getSource (require ('path').resolve ('./get-source.js')).should.equal (getSource ('./get-source.js')) + }) + + it ('caching works', () => { + + const files = + [ './get-source.js', + './package.json', + './test/files/original.js', + './test/files/original.uglified.js', + './test/files/original.uglified.js.map', + './test/files/original.uglified.with.sources.js', + './test/files/original.uglified.with.sources.js.map', + './test/files/original.babeled.with.inline.sourcemap.js', + './test/files/original.uglified.beautified.js', + './test/files/original.uglified.beautified.js.map', + './abyrvalg' ] + + Object.keys (getSource.getCache ()).should.deep.equal (files.map (x => path.resolve (x))) + + getSource.resetCache () + + Object.keys (getSource.getCache ()).length.should.equal (0) + }) +}) \ No newline at end of file diff --git a/node_modules/get-source/test/test.path.js b/node_modules/get-source/test/test.path.js new file mode 100644 index 0000000..610ac2f --- /dev/null +++ b/node_modules/get-source/test/test.path.js @@ -0,0 +1,56 @@ +"use strict"; + +/* ------------------------------------------------------------------------ */ + +require ('chai').should () + +/* ------------------------------------------------------------------------ */ + +describe ('path', () => { + + const path = require ('../impl/path') + + it ('resolves', () => { + + path.resolve ('./foo/bar/../qux').should.equal (process.cwd () + '/foo/qux') + }) + + it ('normalizes', () => { + + path.normalize ('./foo/./bar/.././.././qux.map./').should.equal ('qux.map./') + + path.normalize ('/a/b').should.equal ('/a/b') + path.normalize ('http://foo/bar').should.equal ('http://foo/bar') + }) + + it ('computes relative location', () => { + + path.relativeToFile ('/foo/bar.js', './qux.map') + .should.equal ('/foo/qux.map') + + path.relativeToFile ('/foo/bar/baz.js', './../.././qux.map') + .should.equal ('/qux.map') + + path.relativeToFile ('/foo/bar', 'webpack:something') + .should.equal ('webpack:something') + + path.relativeToFile ('/foo/bar', 'web/pack:something') + .should.equal ('/foo/web/pack:something') + }) + + it ('works with data URIs', () => { + + path.relativeToFile ('/foo/bar.js', 'data:application/json;charset=utf-8;base64,eyJ2ZXJza==') + .should.equal ( 'data:application/json;charset=utf-8;base64,eyJ2ZXJza==') + + path.relativeToFile ('data:application/json;charset=utf-8;base64,eyJ2ZXJza==', 'foo.js') + .should.equal ( 'foo.js') + }) + + it ('implements isURL', () => { + + path.isURL ('foo.js').should.equal (false) + path.isURL ('/foo/bar.js').should.equal (false) + path.isURL ('https://google.com').should.equal (true) + }) +}) \ No newline at end of file diff --git a/node_modules/glob-to-regexp/.travis.yml b/node_modules/glob-to-regexp/.travis.yml new file mode 100644 index 0000000..ddc9c4f --- /dev/null +++ b/node_modules/glob-to-regexp/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.8 + - "0.10" \ No newline at end of file diff --git a/node_modules/glob-to-regexp/README.md b/node_modules/glob-to-regexp/README.md new file mode 100644 index 0000000..afb4114 --- /dev/null +++ b/node_modules/glob-to-regexp/README.md @@ -0,0 +1,75 @@ +# Glob To Regular Expression + +[![Build Status](https://travis-ci.org/fitzgen/glob-to-regexp.png?branch=master)](https://travis-ci.org/fitzgen/glob-to-regexp) + +Turn a \*-wildcard style glob (`"*.min.js"`) into a regular expression +(`/^.*\.min\.js$/`)! + +To match bash-like globs, eg. `?` for any single-character match, `[a-z]` for +character ranges, and `{*.html, *.js}` for multiple alternatives, call with +`{ extended: true }`. + +To obey [globstars `**`](https://github.com/isaacs/node-glob#glob-primer) rules set option `{globstar: true}`. +NOTE: This changes the behavior of `*` when `globstar` is `true` as shown below: +When `{globstar: true}`: `/foo/**` will match any string that starts with `/foo/` +like `/foo/index.htm`, `/foo/bar/baz.txt`, etc. Also, `/foo/**/*.txt` will match +any string that starts with `/foo/` and ends with `.txt` like `/foo/bar.txt`, +`/foo/bar/baz.txt`, etc. +Whereas `/foo/*` (single `*`, not a globstar) will match strings that start with +`/foo/` like `/foo/index.htm`, `/foo/baz.txt` but will not match strings that +contain a `/` to the right like `/foo/bar/baz.txt`, `/foo/bar/baz/qux.dat`, etc. + +Set flags on the resulting `RegExp` object by adding the `flags` property to the option object, eg `{ flags: "i" }` for ignoring case. + +## Install + + npm install glob-to-regexp + +## Usage +```js +var globToRegExp = require('glob-to-regexp'); +var re = globToRegExp("p*uck"); +re.test("pot luck"); // true +re.test("pluck"); // true +re.test("puck"); // true + +re = globToRegExp("*.min.js"); +re.test("http://example.com/jquery.min.js"); // true +re.test("http://example.com/jquery.min.js.map"); // false + +re = globToRegExp("*/www/*.js"); +re.test("http://example.com/www/app.js"); // true +re.test("http://example.com/www/lib/factory-proxy-model-observer.js"); // true + +// Extended globs +re = globToRegExp("*/www/{*.js,*.html}", { extended: true }); +re.test("http://example.com/www/app.js"); // true +re.test("http://example.com/www/index.html"); // true +``` + +## License + +Copyright (c) 2013, Nick Fitzgerald + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/glob-to-regexp/index.js b/node_modules/glob-to-regexp/index.js new file mode 100644 index 0000000..365cf22 --- /dev/null +++ b/node_modules/glob-to-regexp/index.js @@ -0,0 +1,130 @@ +module.exports = function (glob, opts) { + if (typeof glob !== 'string') { + throw new TypeError('Expected a string'); + } + + var str = String(glob); + + // The regexp we are building, as a string. + var reStr = ""; + + // Whether we are matching so called "extended" globs (like bash) and should + // support single character matching, matching ranges of characters, group + // matching, etc. + var extended = opts ? !!opts.extended : false; + + // When globstar is _false_ (default), '/foo/*' is translated a regexp like + // '^\/foo\/.*$' which will match any string beginning with '/foo/' + // When globstar is _true_, '/foo/*' is translated to regexp like + // '^\/foo\/[^/]*$' which will match any string beginning with '/foo/' BUT + // which does not have a '/' to the right of it. + // E.g. with '/foo/*' these will match: '/foo/bar', '/foo/bar.txt' but + // these will not '/foo/bar/baz', '/foo/bar/baz.txt' + // Lastely, when globstar is _true_, '/foo/**' is equivelant to '/foo/*' when + // globstar is _false_ + var globstar = opts ? !!opts.globstar : false; + + // If we are doing extended matching, this boolean is true when we are inside + // a group (eg {*.html,*.js}), and false otherwise. + var inGroup = false; + + // RegExp flags (eg "i" ) to pass in to RegExp constructor. + var flags = opts && typeof( opts.flags ) === "string" ? opts.flags : ""; + + var c; + for (var i = 0, len = str.length; i < len; i++) { + c = str[i]; + + switch (c) { + case "/": + case "$": + case "^": + case "+": + case ".": + case "(": + case ")": + case "=": + case "!": + case "|": + reStr += "\\" + c; + break; + + case "?": + if (extended) { + reStr += "."; + break; + } + + case "[": + case "]": + if (extended) { + reStr += c; + break; + } + + case "{": + if (extended) { + inGroup = true; + reStr += "("; + break; + } + + case "}": + if (extended) { + inGroup = false; + reStr += ")"; + break; + } + + case ",": + if (inGroup) { + reStr += "|"; + break; + } + reStr += "\\" + c; + break; + + case "*": + // Move over all consecutive "*"'s. + // Also store the previous and next characters + var prevChar = str[i - 1]; + var starCount = 1; + while(str[i + 1] === "*") { + starCount++; + i++; + } + var nextChar = str[i + 1]; + + if (!globstar) { + // globstar is disabled, so treat any number of "*" as one + reStr += ".*"; + } else { + // globstar is enabled, so determine if this is a globstar segment + var isGlobstar = starCount > 1 // multiple "*"'s + && (prevChar === "/" || prevChar === undefined) // from the start of the segment + && (nextChar === "/" || nextChar === undefined) // to the end of the segment + + if (isGlobstar) { + // it's a globstar, so match zero or more path segments + reStr += "((?:[^/]*(?:\/|$))*)"; + i++; // move over the "/" + } else { + // it's not a globstar, so only match one path segment + reStr += "([^/]*)"; + } + } + break; + + default: + reStr += c; + } + } + + // When regexp 'g' flag is specified don't + // constrain the regular expression with ^ & $ + if (!flags || !~flags.indexOf('g')) { + reStr = "^" + reStr + "$"; + } + + return new RegExp(reStr, flags); +}; diff --git a/node_modules/glob-to-regexp/package.json b/node_modules/glob-to-regexp/package.json new file mode 100644 index 0000000..467daf3 --- /dev/null +++ b/node_modules/glob-to-regexp/package.json @@ -0,0 +1,23 @@ +{ + "name": "glob-to-regexp", + "version": "0.4.1", + "description": "Convert globs to regular expressions", + "main": "index.js", + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/fitzgen/glob-to-regexp.git" + }, + "keywords": [ + "regexp", + "glob", + "regexps", + "regular expressions", + "regular expression", + "wildcard" + ], + "author": "Nick Fitzgerald ", + "license": "BSD-2-Clause" +} diff --git a/node_modules/glob-to-regexp/test.js b/node_modules/glob-to-regexp/test.js new file mode 100644 index 0000000..58ee622 --- /dev/null +++ b/node_modules/glob-to-regexp/test.js @@ -0,0 +1,235 @@ +var globToRegexp = require("./index.js"); +var assert = require("assert"); + +function assertMatch(glob, str, opts) { + //console.log(glob, globToRegexp(glob, opts)); + assert.ok(globToRegexp(glob, opts).test(str)); +} + +function assertNotMatch(glob, str, opts) { + //console.log(glob, globToRegexp(glob, opts)); + assert.equal(false, globToRegexp(glob, opts).test(str)); +} + +function test(globstar) { + // Match everything + assertMatch("*", "foo"); + assertMatch("*", "foo", { flags: 'g' }); + + // Match the end + assertMatch("f*", "foo"); + assertMatch("f*", "foo", { flags: 'g' }); + + // Match the start + assertMatch("*o", "foo"); + assertMatch("*o", "foo", { flags: 'g' }); + + // Match the middle + assertMatch("f*uck", "firetruck"); + assertMatch("f*uck", "firetruck", { flags: 'g' }); + + // Don't match without Regexp 'g' + assertNotMatch("uc", "firetruck"); + // Match anywhere with RegExp 'g' + assertMatch("uc", "firetruck", { flags: 'g' }); + + // Match zero characters + assertMatch("f*uck", "fuck"); + assertMatch("f*uck", "fuck", { flags: 'g' }); + + // More complex matches + assertMatch("*.min.js", "http://example.com/jquery.min.js", {globstar: false}); + assertMatch("*.min.*", "http://example.com/jquery.min.js", {globstar: false}); + assertMatch("*/js/*.js", "http://example.com/js/jquery.min.js", {globstar: false}); + + // More complex matches with RegExp 'g' flag (complex regression) + assertMatch("*.min.*", "http://example.com/jquery.min.js", { flags: 'g' }); + assertMatch("*.min.js", "http://example.com/jquery.min.js", { flags: 'g' }); + assertMatch("*/js/*.js", "http://example.com/js/jquery.min.js", { flags: 'g' }); + + // Test string "\\\\/$^+?.()=!|{},[].*" represents \\/$^+?.()=!|{},[].* + // The equivalent regex is: /^\\\/\$\^\+\?\.\(\)\=\!\|\{\}\,\[\]\..*$/ + // Both glob and regex match: \/$^+?.()=!|{},[].* + var testStr = "\\\\/$^+?.()=!|{},[].*"; + var targetStr = "\\/$^+?.()=!|{},[].*"; + assertMatch(testStr, targetStr); + assertMatch(testStr, targetStr, { flags: 'g' }); + + // Equivalent matches without/with using RegExp 'g' + assertNotMatch(".min.", "http://example.com/jquery.min.js"); + assertMatch("*.min.*", "http://example.com/jquery.min.js"); + assertMatch(".min.", "http://example.com/jquery.min.js", { flags: 'g' }); + + assertNotMatch("http:", "http://example.com/jquery.min.js"); + assertMatch("http:*", "http://example.com/jquery.min.js"); + assertMatch("http:", "http://example.com/jquery.min.js", { flags: 'g' }); + + assertNotMatch("min.js", "http://example.com/jquery.min.js"); + assertMatch("*.min.js", "http://example.com/jquery.min.js"); + assertMatch("min.js", "http://example.com/jquery.min.js", { flags: 'g' }); + + // Match anywhere (globally) using RegExp 'g' + assertMatch("min", "http://example.com/jquery.min.js", { flags: 'g' }); + assertMatch("/js/", "http://example.com/js/jquery.min.js", { flags: 'g' }); + + assertNotMatch("/js*jq*.js", "http://example.com/js/jquery.min.js"); + assertMatch("/js*jq*.js", "http://example.com/js/jquery.min.js", { flags: 'g' }); + + // Extended mode + + // ?: Match one character, no more and no less + assertMatch("f?o", "foo", { extended: true }); + assertNotMatch("f?o", "fooo", { extended: true }); + assertNotMatch("f?oo", "foo", { extended: true }); + + // ?: Match one character with RegExp 'g' + assertMatch("f?o", "foo", { extended: true, globstar: globstar, flags: 'g' }); + assertMatch("f?o", "fooo", { extended: true, globstar: globstar, flags: 'g' }); + assertMatch("f?o?", "fooo", { extended: true, globstar: globstar, flags: 'g' }); + assertNotMatch("?fo", "fooo", { extended: true, globstar: globstar, flags: 'g' }); + assertNotMatch("f?oo", "foo", { extended: true, globstar: globstar, flags: 'g' }); + assertNotMatch("foo?", "foo", { extended: true, globstar: globstar, flags: 'g' }); + + // []: Match a character range + assertMatch("fo[oz]", "foo", { extended: true }); + assertMatch("fo[oz]", "foz", { extended: true }); + assertNotMatch("fo[oz]", "fog", { extended: true }); + + // []: Match a character range and RegExp 'g' (regresion) + assertMatch("fo[oz]", "foo", { extended: true, globstar: globstar, flags: 'g' }); + assertMatch("fo[oz]", "foz", { extended: true, globstar: globstar, flags: 'g' }); + assertNotMatch("fo[oz]", "fog", { extended: true, globstar: globstar, flags: 'g' }); + + // {}: Match a choice of different substrings + assertMatch("foo{bar,baaz}", "foobaaz", { extended: true }); + assertMatch("foo{bar,baaz}", "foobar", { extended: true }); + assertNotMatch("foo{bar,baaz}", "foobuzz", { extended: true }); + assertMatch("foo{bar,b*z}", "foobuzz", { extended: true }); + + // {}: Match a choice of different substrings and RegExp 'g' (regression) + assertMatch("foo{bar,baaz}", "foobaaz", { extended: true, globstar: globstar, flags: 'g' }); + assertMatch("foo{bar,baaz}", "foobar", { extended: true, globstar: globstar, flags: 'g' }); + assertNotMatch("foo{bar,baaz}", "foobuzz", { extended: true, globstar: globstar, flags: 'g' }); + assertMatch("foo{bar,b*z}", "foobuzz", { extended: true, globstar: globstar, flags: 'g' }); + + // More complex extended matches + assertMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://foo.baaz.com/jquery.min.js", + { extended: true }); + assertMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://moz.buzz.com/index.html", + { extended: true }); + assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://moz.buzz.com/index.htm", + { extended: true }); + assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://moz.bar.com/index.html", + { extended: true }); + assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://flozz.buzz.com/index.html", + { extended: true }); + + // More complex extended matches and RegExp 'g' (regresion) + assertMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://foo.baaz.com/jquery.min.js", + { extended: true, globstar: globstar, flags: 'g' }); + assertMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://moz.buzz.com/index.html", + { extended: true, globstar: globstar, flags: 'g' }); + assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://moz.buzz.com/index.htm", + { extended: true, globstar: globstar, flags: 'g' }); + assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://moz.bar.com/index.html", + { extended: true, globstar: globstar, flags: 'g' }); + assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://flozz.buzz.com/index.html", + { extended: true, globstar: globstar, flags: 'g' }); + + // globstar + assertMatch("http://foo.com/**/{*.js,*.html}", + "http://foo.com/bar/jquery.min.js", + { extended: true, globstar: globstar, flags: 'g' }); + assertMatch("http://foo.com/**/{*.js,*.html}", + "http://foo.com/bar/baz/jquery.min.js", + { extended: true, globstar: globstar, flags: 'g' }); + assertMatch("http://foo.com/**", + "http://foo.com/bar/baz/jquery.min.js", + { extended: true, globstar: globstar, flags: 'g' }); + + // Remaining special chars should still match themselves + // Test string "\\\\/$^+.()=!|,.*" represents \\/$^+.()=!|,.* + // The equivalent regex is: /^\\\/\$\^\+\.\(\)\=\!\|\,\..*$/ + // Both glob and regex match: \/$^+.()=!|,.* + var testExtStr = "\\\\/$^+.()=!|,.*"; + var targetExtStr = "\\/$^+.()=!|,.*"; + assertMatch(testExtStr, targetExtStr, { extended: true }); + assertMatch(testExtStr, targetExtStr, { extended: true, globstar: globstar, flags: 'g' }); +} + +// regression +// globstar false +test(false) +// globstar true +test(true); + +// globstar specific tests +assertMatch("/foo/*", "/foo/bar.txt", {globstar: true }); +assertMatch("/foo/**", "/foo/baz.txt", {globstar: true }); +assertMatch("/foo/**", "/foo/bar/baz.txt", {globstar: true }); +assertMatch("/foo/*/*.txt", "/foo/bar/baz.txt", {globstar: true }); +assertMatch("/foo/**/*.txt", "/foo/bar/baz.txt", {globstar: true }); +assertMatch("/foo/**/*.txt", "/foo/bar/baz/qux.txt", {globstar: true }); +assertMatch("/foo/**/bar.txt", "/foo/bar.txt", {globstar: true }); +assertMatch("/foo/**/**/bar.txt", "/foo/bar.txt", {globstar: true }); +assertMatch("/foo/**/*/baz.txt", "/foo/bar/baz.txt", {globstar: true }); +assertMatch("/foo/**/*.txt", "/foo/bar.txt", {globstar: true }); +assertMatch("/foo/**/**/*.txt", "/foo/bar.txt", {globstar: true }); +assertMatch("/foo/**/*/*.txt", "/foo/bar/baz.txt", {globstar: true }); +assertMatch("**/*.txt", "/foo/bar/baz/qux.txt", {globstar: true }); +assertMatch("**/foo.txt", "foo.txt", {globstar: true }); +assertMatch("**/*.txt", "foo.txt", {globstar: true }); + +assertNotMatch("/foo/*", "/foo/bar/baz.txt", {globstar: true }); +assertNotMatch("/foo/*.txt", "/foo/bar/baz.txt", {globstar: true }); +assertNotMatch("/foo/*/*.txt", "/foo/bar/baz/qux.txt", {globstar: true }); +assertNotMatch("/foo/*/bar.txt", "/foo/bar.txt", {globstar: true }); +assertNotMatch("/foo/*/*/baz.txt", "/foo/bar/baz.txt", {globstar: true }); +assertNotMatch("/foo/**.txt", "/foo/bar/baz/qux.txt", {globstar: true }); +assertNotMatch("/foo/bar**/*.txt", "/foo/bar/baz/qux.txt", {globstar: true }); +assertNotMatch("/foo/bar**", "/foo/bar/baz.txt", {globstar: true }); +assertNotMatch("**/.txt", "/foo/bar/baz/qux.txt", {globstar: true }); +assertNotMatch("*/*.txt", "/foo/bar/baz/qux.txt", {globstar: true }); +assertNotMatch("*/*.txt", "foo.txt", {globstar: true }); + +assertNotMatch("http://foo.com/*", + "http://foo.com/bar/baz/jquery.min.js", + { extended: true, globstar: true }); +assertNotMatch("http://foo.com/*", + "http://foo.com/bar/baz/jquery.min.js", + { globstar: true }); + +assertMatch("http://foo.com/*", + "http://foo.com/bar/baz/jquery.min.js", + { globstar: false }); +assertMatch("http://foo.com/**", + "http://foo.com/bar/baz/jquery.min.js", + { globstar: true }); + +assertMatch("http://foo.com/*/*/jquery.min.js", + "http://foo.com/bar/baz/jquery.min.js", + { globstar: true }); +assertMatch("http://foo.com/**/jquery.min.js", + "http://foo.com/bar/baz/jquery.min.js", + { globstar: true }); +assertMatch("http://foo.com/*/*/jquery.min.js", + "http://foo.com/bar/baz/jquery.min.js", + { globstar: false }); +assertMatch("http://foo.com/*/jquery.min.js", + "http://foo.com/bar/baz/jquery.min.js", + { globstar: false }); +assertNotMatch("http://foo.com/*/jquery.min.js", + "http://foo.com/bar/baz/jquery.min.js", + { globstar: true }); + +console.log("Ok!"); diff --git a/node_modules/gopd/.eslintrc b/node_modules/gopd/.eslintrc new file mode 100644 index 0000000..e2550c0 --- /dev/null +++ b/node_modules/gopd/.eslintrc @@ -0,0 +1,16 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-style": [2, "declaration"], + "id-length": 0, + "multiline-comment-style": 0, + "new-cap": [2, { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/gopd/.github/FUNDING.yml b/node_modules/gopd/.github/FUNDING.yml new file mode 100644 index 0000000..94a44a8 --- /dev/null +++ b/node_modules/gopd/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/gopd +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/gopd/CHANGELOG.md b/node_modules/gopd/CHANGELOG.md new file mode 100644 index 0000000..87f5727 --- /dev/null +++ b/node_modules/gopd/CHANGELOG.md @@ -0,0 +1,45 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.2.0](https://github.com/ljharb/gopd/compare/v1.1.0...v1.2.0) - 2024-12-03 + +### Commits + +- [New] add `gOPD` entry point; remove `get-intrinsic` [`5b61232`](https://github.com/ljharb/gopd/commit/5b61232dedea4591a314bcf16101b1961cee024e) + +## [v1.1.0](https://github.com/ljharb/gopd/compare/v1.0.1...v1.1.0) - 2024-11-29 + +### Commits + +- [New] add types [`f585e39`](https://github.com/ljharb/gopd/commit/f585e397886d270e4ba84e53d226e4f9ca2eb0e6) +- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `tape` [`0b8e4fd`](https://github.com/ljharb/gopd/commit/0b8e4fded64397a7726a9daa144a6cc9a5e2edfa) +- [Dev Deps] update `aud`, `npmignore`, `tape` [`48378b2`](https://github.com/ljharb/gopd/commit/48378b2443f09a4f7efbd0fb6c3ee845a6cabcf3) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`78099ee`](https://github.com/ljharb/gopd/commit/78099eeed41bfdc134c912280483689cc8861c31) +- [Tests] replace `aud` with `npm audit` [`4e0d0ac`](https://github.com/ljharb/gopd/commit/4e0d0ac47619d24a75318a8e1f543ee04b2a2632) +- [meta] add missing `engines.node` [`1443316`](https://github.com/ljharb/gopd/commit/14433165d07835c680155b3dfd62d9217d735eca) +- [Deps] update `get-intrinsic` [`eee5f51`](https://github.com/ljharb/gopd/commit/eee5f51769f3dbaf578b70e2a3199116b01aa670) +- [Deps] update `get-intrinsic` [`550c378`](https://github.com/ljharb/gopd/commit/550c3780e3a9c77b62565712a001b4ed64ea61f5) +- [Dev Deps] add missing peer dep [`8c2ecf8`](https://github.com/ljharb/gopd/commit/8c2ecf848122e4e30abfc5b5086fb48b390dce75) + +## [v1.0.1](https://github.com/ljharb/gopd/compare/v1.0.0...v1.0.1) - 2022-11-01 + +### Commits + +- [Fix] actually export gOPD instead of dP [`4b624bf`](https://github.com/ljharb/gopd/commit/4b624bfbeff788c5e3ff16d9443a83627847234f) + +## v1.0.0 - 2022-11-01 + +### Commits + +- Initial implementation, tests, readme [`0911e01`](https://github.com/ljharb/gopd/commit/0911e012cd642092bd88b732c161c58bf4f20bea) +- Initial commit [`b84e33f`](https://github.com/ljharb/gopd/commit/b84e33f5808a805ac57ff88d4247ad935569acbe) +- [actions] add reusable workflows [`12ae28a`](https://github.com/ljharb/gopd/commit/12ae28ae5f50f86e750215b6e2188901646d0119) +- npm init [`280118b`](https://github.com/ljharb/gopd/commit/280118badb45c80b4483836b5cb5315bddf6e582) +- [meta] add `auto-changelog` [`bb78de5`](https://github.com/ljharb/gopd/commit/bb78de5639a180747fb290c28912beaaf1615709) +- [meta] create FUNDING.yml; add `funding` in package.json [`11c22e6`](https://github.com/ljharb/gopd/commit/11c22e6355bb01f24e7fac4c9bb3055eb5b25002) +- [meta] use `npmignore` to autogenerate an npmignore file [`4f4537a`](https://github.com/ljharb/gopd/commit/4f4537a843b39f698c52f072845092e6fca345bb) +- Only apps should have lockfiles [`c567022`](https://github.com/ljharb/gopd/commit/c567022a18573aa7951cf5399445d9840e23e98b) diff --git a/node_modules/gopd/LICENSE b/node_modules/gopd/LICENSE new file mode 100644 index 0000000..6abfe14 --- /dev/null +++ b/node_modules/gopd/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Jordan Harband + +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. diff --git a/node_modules/gopd/README.md b/node_modules/gopd/README.md new file mode 100644 index 0000000..784e56a --- /dev/null +++ b/node_modules/gopd/README.md @@ -0,0 +1,40 @@ +# gopd [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation. + +## Usage + +```javascript +var gOPD = require('gopd'); +var assert = require('assert'); + +if (gOPD) { + assert.equal(typeof gOPD, 'function', 'descriptors supported'); + // use gOPD like Object.getOwnPropertyDescriptor here +} else { + assert.ok(!gOPD, 'descriptors not supported'); +} +``` + +[package-url]: https://npmjs.org/package/gopd +[npm-version-svg]: https://versionbadg.es/ljharb/gopd.svg +[deps-svg]: https://david-dm.org/ljharb/gopd.svg +[deps-url]: https://david-dm.org/ljharb/gopd +[dev-deps-svg]: https://david-dm.org/ljharb/gopd/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/gopd#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/gopd.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/gopd.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/gopd.svg +[downloads-url]: https://npm-stat.com/charts.html?package=gopd +[codecov-image]: https://codecov.io/gh/ljharb/gopd/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/gopd/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/gopd +[actions-url]: https://github.com/ljharb/gopd/actions diff --git a/node_modules/gopd/gOPD.d.ts b/node_modules/gopd/gOPD.d.ts new file mode 100644 index 0000000..def48a3 --- /dev/null +++ b/node_modules/gopd/gOPD.d.ts @@ -0,0 +1 @@ +export = Object.getOwnPropertyDescriptor; diff --git a/node_modules/gopd/gOPD.js b/node_modules/gopd/gOPD.js new file mode 100644 index 0000000..cf9616c --- /dev/null +++ b/node_modules/gopd/gOPD.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./gOPD')} */ +module.exports = Object.getOwnPropertyDescriptor; diff --git a/node_modules/gopd/index.d.ts b/node_modules/gopd/index.d.ts new file mode 100644 index 0000000..e228065 --- /dev/null +++ b/node_modules/gopd/index.d.ts @@ -0,0 +1,5 @@ +declare function gOPD(obj: O, prop: K): PropertyDescriptor | undefined; + +declare const fn: typeof gOPD | undefined | null; + +export = fn; \ No newline at end of file diff --git a/node_modules/gopd/index.js b/node_modules/gopd/index.js new file mode 100644 index 0000000..a4081b0 --- /dev/null +++ b/node_modules/gopd/index.js @@ -0,0 +1,15 @@ +'use strict'; + +/** @type {import('.')} */ +var $gOPD = require('./gOPD'); + +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; + } +} + +module.exports = $gOPD; diff --git a/node_modules/gopd/package.json b/node_modules/gopd/package.json new file mode 100644 index 0000000..01c5ffa --- /dev/null +++ b/node_modules/gopd/package.json @@ -0,0 +1,77 @@ +{ + "name": "gopd", + "version": "1.2.0", + "description": "`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./gOPD": "./gOPD.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "tsc -p . && attw -P", + "lint": "eslint --ext=js,mjs .", + "postlint": "evalmd README.md", + "pretest": "npm run lint", + "tests-only": "tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx npm@'>=10.2' audit --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/gopd.git" + }, + "keywords": [ + "ecmascript", + "javascript", + "getownpropertydescriptor", + "property", + "descriptor" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/gopd/issues" + }, + "homepage": "https://github.com/ljharb/gopd#readme", + "devDependencies": { + "@arethetypeswrong/cli": "^0.17.0", + "@ljharb/eslint-config": "^21.1.1", + "@ljharb/tsconfig": "^0.2.0", + "@types/tape": "^5.6.5", + "auto-changelog": "^2.5.0", + "encoding": "^0.1.13", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/gopd/test/index.js b/node_modules/gopd/test/index.js new file mode 100644 index 0000000..6f43453 --- /dev/null +++ b/node_modules/gopd/test/index.js @@ -0,0 +1,36 @@ +'use strict'; + +var test = require('tape'); +var gOPD = require('../'); + +test('gOPD', function (t) { + t.test('supported', { skip: !gOPD }, function (st) { + st.equal(typeof gOPD, 'function', 'is a function'); + + var obj = { x: 1 }; + st.ok('x' in obj, 'property exists'); + + // @ts-expect-error TS can't figure out narrowing from `skip` + var desc = gOPD(obj, 'x'); + st.deepEqual( + desc, + { + configurable: true, + enumerable: true, + value: 1, + writable: true + }, + 'descriptor is as expected' + ); + + st.end(); + }); + + t.test('not supported', { skip: !!gOPD }, function (st) { + st.notOk(gOPD, 'is falsy'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/gopd/tsconfig.json b/node_modules/gopd/tsconfig.json new file mode 100644 index 0000000..d9a6668 --- /dev/null +++ b/node_modules/gopd/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + "target": "es2021", + }, + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/has-symbols/.eslintrc b/node_modules/has-symbols/.eslintrc new file mode 100644 index 0000000..2d9a66a --- /dev/null +++ b/node_modules/has-symbols/.eslintrc @@ -0,0 +1,11 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements-per-line": [2, { "max": 2 }], + "no-magic-numbers": 0, + "multiline-comment-style": 0, + } +} diff --git a/node_modules/has-symbols/.github/FUNDING.yml b/node_modules/has-symbols/.github/FUNDING.yml new file mode 100644 index 0000000..04cf87e --- /dev/null +++ b/node_modules/has-symbols/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/has-symbols +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/has-symbols/.nycrc b/node_modules/has-symbols/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/has-symbols/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/has-symbols/CHANGELOG.md b/node_modules/has-symbols/CHANGELOG.md new file mode 100644 index 0000000..cc3cf83 --- /dev/null +++ b/node_modules/has-symbols/CHANGELOG.md @@ -0,0 +1,91 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.0](https://github.com/inspect-js/has-symbols/compare/v1.0.3...v1.1.0) - 2024-12-02 + +### Commits + +- [actions] update workflows [`548c0bf`](https://github.com/inspect-js/has-symbols/commit/548c0bf8c9b1235458df7a1c0490b0064647a282) +- [actions] further shard; update action deps [`bec56bb`](https://github.com/inspect-js/has-symbols/commit/bec56bb0fb44b43a786686b944875a3175cf3ff3) +- [meta] use `npmignore` to autogenerate an npmignore file [`ac81032`](https://github.com/inspect-js/has-symbols/commit/ac81032809157e0a079e5264e9ce9b6f1275777e) +- [New] add types [`6469cbf`](https://github.com/inspect-js/has-symbols/commit/6469cbff1866cfe367b2b3d181d9296ec14b2a3d) +- [actions] update rebase action to use reusable workflow [`9c9d4d0`](https://github.com/inspect-js/has-symbols/commit/9c9d4d0d8938e4b267acdf8e421f4e92d1716d72) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`adb5887`](https://github.com/inspect-js/has-symbols/commit/adb5887ca9444849b08beb5caaa9e1d42320cdfb) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`13ec198`](https://github.com/inspect-js/has-symbols/commit/13ec198ec80f1993a87710af1606a1970b22c7cb) +- [Dev Deps] update `auto-changelog`, `core-js`, `tape` [`941be52`](https://github.com/inspect-js/has-symbols/commit/941be5248387cab1da72509b22acf3fdb223f057) +- [Tests] replace `aud` with `npm audit` [`74f49e9`](https://github.com/inspect-js/has-symbols/commit/74f49e9a9d17a443020784234a1c53ce765b3559) +- [Dev Deps] update `npmignore` [`9c0ac04`](https://github.com/inspect-js/has-symbols/commit/9c0ac0452a834f4c2a4b54044f2d6a89f17e9a70) +- [Dev Deps] add missing peer dep [`52337a5`](https://github.com/inspect-js/has-symbols/commit/52337a5621cced61f846f2afdab7707a8132cc12) + +## [v1.0.3](https://github.com/inspect-js/has-symbols/compare/v1.0.2...v1.0.3) - 2022-03-01 + +### Commits + +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`518b28f`](https://github.com/inspect-js/has-symbols/commit/518b28f6c5a516cbccae30794e40aa9f738b1693) +- [meta] add `bugs` and `homepage` fields; reorder package.json [`c480b13`](https://github.com/inspect-js/has-symbols/commit/c480b13fd6802b557e1cef9749872cb5fdeef744) +- [actions] reuse common workflows [`01d0ee0`](https://github.com/inspect-js/has-symbols/commit/01d0ee0a8d97c0947f5edb73eb722027a77b2b07) +- [actions] update codecov uploader [`6424ebe`](https://github.com/inspect-js/has-symbols/commit/6424ebe86b2c9c7c3d2e9bd4413a4e4f168cb275) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`dfa7e7f`](https://github.com/inspect-js/has-symbols/commit/dfa7e7ff38b594645d8c8222aab895157fa7e282) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0c8d436`](https://github.com/inspect-js/has-symbols/commit/0c8d43685c45189cea9018191d4fd7eca91c9d02) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`9026554`](https://github.com/inspect-js/has-symbols/commit/902655442a1bf88e72b42345494ef0c60f5d36ab) +- [readme] add actions and codecov badges [`eaa9682`](https://github.com/inspect-js/has-symbols/commit/eaa9682f990f481d3acf7a1c7600bec36f7b3adc) +- [Dev Deps] update `eslint`, `tape` [`bc7a3ba`](https://github.com/inspect-js/has-symbols/commit/bc7a3ba46f27b7743f8a2579732d59d1b9ac791e) +- [Dev Deps] update `eslint`, `auto-changelog` [`0ace00a`](https://github.com/inspect-js/has-symbols/commit/0ace00af08a88cdd1e6ce0d60357d941c60c2d9f) +- [meta] use `prepublishOnly` script for npm 7+ [`093f72b`](https://github.com/inspect-js/has-symbols/commit/093f72bc2b0ed00c781f444922a5034257bf561d) +- [Tests] test on all 16 minors [`9b80d3d`](https://github.com/inspect-js/has-symbols/commit/9b80d3d9102529f04c20ec5b1fcc6e38426c6b03) + +## [v1.0.2](https://github.com/inspect-js/has-symbols/compare/v1.0.1...v1.0.2) - 2021-02-27 + +### Fixed + +- [Fix] use a universal way to get the original Symbol [`#11`](https://github.com/inspect-js/has-symbols/issues/11) + +### Commits + +- [Tests] migrate tests to Github Actions [`90ae798`](https://github.com/inspect-js/has-symbols/commit/90ae79820bdfe7bc703d67f5f3c5e205f98556d3) +- [meta] do not publish github action workflow files [`29e60a1`](https://github.com/inspect-js/has-symbols/commit/29e60a1b7c25c7f1acf7acff4a9320d0d10c49b4) +- [Tests] run `nyc` on all tests [`8476b91`](https://github.com/inspect-js/has-symbols/commit/8476b915650d360915abe2522505abf4b0e8f0ae) +- [readme] fix repo URLs, remove defunct badges [`126288e`](https://github.com/inspect-js/has-symbols/commit/126288ecc1797c0a40247a6b78bcb2e0bc5d7036) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `core-js`, `get-own-property-symbols` [`d84bdfa`](https://github.com/inspect-js/has-symbols/commit/d84bdfa48ac5188abbb4904b42614cd6c030940a) +- [Tests] fix linting errors [`0df3070`](https://github.com/inspect-js/has-symbols/commit/0df3070b981b6c9f2ee530c09189a7f5c6def839) +- [actions] add "Allow Edits" workflow [`1e6bc29`](https://github.com/inspect-js/has-symbols/commit/1e6bc29b188f32b9648657b07eda08504be5aa9c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`36cea2a`](https://github.com/inspect-js/has-symbols/commit/36cea2addd4e6ec435f35a2656b4e9ef82498e9b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1278338`](https://github.com/inspect-js/has-symbols/commit/127833801865fbc2cc8979beb9ca869c7bfe8222) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1493254`](https://github.com/inspect-js/has-symbols/commit/1493254eda13db5fb8fc5e4a3e8324b3d196029d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js` [`b090bf2`](https://github.com/inspect-js/has-symbols/commit/b090bf214d3679a30edc1e2d729d466ab5183e1d) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4addb7a`](https://github.com/inspect-js/has-symbols/commit/4addb7ab4dc73f927ae99928d68817554fc21dc0) +- [Dev Deps] update `auto-changelog`, `tape` [`81d0baf`](https://github.com/inspect-js/has-symbols/commit/81d0baf3816096a89a8558e8043895f7a7d10d8b) +- [Dev Deps] update `auto-changelog`; add `aud` [`1a4e561`](https://github.com/inspect-js/has-symbols/commit/1a4e5612c25d91c3a03d509721d02630bc4fe3da) +- [readme] remove unused testling URLs [`3000941`](https://github.com/inspect-js/has-symbols/commit/3000941f958046e923ed8152edb1ef4a599e6fcc) +- [Tests] only audit prod deps [`692e974`](https://github.com/inspect-js/has-symbols/commit/692e9743c912410e9440207631a643a34b4741a1) +- [Dev Deps] update `@ljharb/eslint-config` [`51c946c`](https://github.com/inspect-js/has-symbols/commit/51c946c7f6baa793ec5390bb5a45cdce16b4ba76) + +## [v1.0.1](https://github.com/inspect-js/has-symbols/compare/v1.0.0...v1.0.1) - 2019-11-16 + +### Commits + +- [Tests] use shared travis-ci configs [`ce396c9`](https://github.com/inspect-js/has-symbols/commit/ce396c9419ff11c43d0da5d05cdbb79f7fb42229) +- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v4.9`; use `nvm install-latest-npm` [`0690732`](https://github.com/inspect-js/has-symbols/commit/0690732801f47ab429f39ba1962f522d5c462d6b) +- [meta] add `auto-changelog` [`2163d0b`](https://github.com/inspect-js/has-symbols/commit/2163d0b7f36343076b8f947cd1667dd1750f26fc) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`8e0951f`](https://github.com/inspect-js/has-symbols/commit/8e0951f1a7a2e52068222b7bb73511761e6e4d9c) +- [actions] add automatic rebasing / merge commit blocking [`b09cdb7`](https://github.com/inspect-js/has-symbols/commit/b09cdb7cd7ee39e7a769878f56e2d6066f5ccd1d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `core-js`, `get-own-property-symbols`, `tape` [`1dd42cd`](https://github.com/inspect-js/has-symbols/commit/1dd42cd86183ed0c50f99b1062345c458babca91) +- [meta] create FUNDING.yml [`aa57a17`](https://github.com/inspect-js/has-symbols/commit/aa57a17b19708906d1927f821ea8e73394d84ca4) +- Only apps should have lockfiles [`a2d8bea`](https://github.com/inspect-js/has-symbols/commit/a2d8bea23a97d15c09eaf60f5b107fcf9a4d57aa) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`9e96cb7`](https://github.com/inspect-js/has-symbols/commit/9e96cb783746cbed0c10ef78e599a8eaa7ebe193) +- [meta] add `funding` field [`a0b32cf`](https://github.com/inspect-js/has-symbols/commit/a0b32cf68e803f963c1639b6d47b0a9d6440bab0) +- [Dev Deps] update `safe-publish-latest` [`cb9f0a5`](https://github.com/inspect-js/has-symbols/commit/cb9f0a521a3a1790f1064d437edd33bb6c3d6af0) + +## v1.0.0 - 2016-09-19 + +### Commits + +- Tests. [`ecb6eb9`](https://github.com/inspect-js/has-symbols/commit/ecb6eb934e4883137f3f93b965ba5e0a98df430d) +- package.json [`88a337c`](https://github.com/inspect-js/has-symbols/commit/88a337cee0864a0da35f5d19e69ff0ef0150e46a) +- Initial commit [`42e1e55`](https://github.com/inspect-js/has-symbols/commit/42e1e5502536a2b8ac529c9443984acd14836b1c) +- Initial implementation. [`33f5cc6`](https://github.com/inspect-js/has-symbols/commit/33f5cc6cdff86e2194b081ee842bfdc63caf43fb) +- read me [`01f1170`](https://github.com/inspect-js/has-symbols/commit/01f1170188ff7cb1558aa297f6ba5b516c6d7b0c) diff --git a/node_modules/has-symbols/LICENSE b/node_modules/has-symbols/LICENSE new file mode 100644 index 0000000..df31cbf --- /dev/null +++ b/node_modules/has-symbols/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Jordan Harband + +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. diff --git a/node_modules/has-symbols/README.md b/node_modules/has-symbols/README.md new file mode 100644 index 0000000..33905f0 --- /dev/null +++ b/node_modules/has-symbols/README.md @@ -0,0 +1,46 @@ +# has-symbols [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Determine if the JS environment has Symbol support. Supports spec, or shams. + +## Example + +```js +var hasSymbols = require('has-symbols'); + +hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable. + +var hasSymbolsKinda = require('has-symbols/shams'); +hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec. +``` + +## Supported Symbol shams + - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) + - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/has-symbols +[2]: https://versionbadg.es/inspect-js/has-symbols.svg +[5]: https://david-dm.org/inspect-js/has-symbols.svg +[6]: https://david-dm.org/inspect-js/has-symbols +[7]: https://david-dm.org/inspect-js/has-symbols/dev-status.svg +[8]: https://david-dm.org/inspect-js/has-symbols#info=devDependencies +[11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/has-symbols.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/has-symbols.svg +[downloads-url]: https://npm-stat.com/charts.html?package=has-symbols +[codecov-image]: https://codecov.io/gh/inspect-js/has-symbols/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-symbols/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-symbols +[actions-url]: https://github.com/inspect-js/has-symbols/actions diff --git a/node_modules/has-symbols/index.d.ts b/node_modules/has-symbols/index.d.ts new file mode 100644 index 0000000..9b98595 --- /dev/null +++ b/node_modules/has-symbols/index.d.ts @@ -0,0 +1,3 @@ +declare function hasNativeSymbols(): boolean; + +export = hasNativeSymbols; \ No newline at end of file diff --git a/node_modules/has-symbols/index.js b/node_modules/has-symbols/index.js new file mode 100644 index 0000000..fa65265 --- /dev/null +++ b/node_modules/has-symbols/index.js @@ -0,0 +1,14 @@ +'use strict'; + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = require('./shams'); + +/** @type {import('.')} */ +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; diff --git a/node_modules/has-symbols/package.json b/node_modules/has-symbols/package.json new file mode 100644 index 0000000..d835e20 --- /dev/null +++ b/node_modules/has-symbols/package.json @@ -0,0 +1,111 @@ +{ + "name": "has-symbols", + "version": "1.1.0", + "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run --silent lint", + "test": "npm run tests-only", + "posttest": "npx npm@'>=10.2' audit --production", + "tests-only": "npm run test:stock && npm run test:shams", + "test:stock": "nyc node test", + "test:staging": "nyc node --harmony --es-staging test", + "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", + "test:shams:corejs": "nyc node test/shams/core-js.js", + "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p . && attw -P", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/has-symbols.git" + }, + "keywords": [ + "Symbol", + "symbols", + "typeof", + "sham", + "polyfill", + "native", + "core-js", + "ES6" + ], + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/has-symbols/issues" + }, + "homepage": "https://github.com/ljharb/has-symbols#readme", + "devDependencies": { + "@arethetypeswrong/cli": "^0.17.0", + "@ljharb/eslint-config": "^21.1.1", + "@ljharb/tsconfig": "^0.2.0", + "@types/core-js": "^2.5.8", + "@types/tape": "^5.6.5", + "auto-changelog": "^2.5.0", + "core-js": "^2.6.12", + "encoding": "^0.1.13", + "eslint": "=8.8.0", + "get-own-property-symbols": "^0.9.5", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "types" + ] + } +} diff --git a/node_modules/has-symbols/shams.d.ts b/node_modules/has-symbols/shams.d.ts new file mode 100644 index 0000000..8d0bf24 --- /dev/null +++ b/node_modules/has-symbols/shams.d.ts @@ -0,0 +1,3 @@ +declare function hasSymbolShams(): boolean; + +export = hasSymbolShams; \ No newline at end of file diff --git a/node_modules/has-symbols/shams.js b/node_modules/has-symbols/shams.js new file mode 100644 index 0000000..f97b474 --- /dev/null +++ b/node_modules/has-symbols/shams.js @@ -0,0 +1,45 @@ +'use strict'; + +/** @type {import('./shams')} */ +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + /** @type {{ [k in symbol]?: unknown }} */ + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + // eslint-disable-next-line no-extra-parens + var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym)); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; diff --git a/node_modules/has-symbols/test/index.js b/node_modules/has-symbols/test/index.js new file mode 100644 index 0000000..352129c --- /dev/null +++ b/node_modules/has-symbols/test/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var test = require('tape'); +var hasSymbols = require('../'); +var runSymbolTests = require('./tests'); + +test('interface', function (t) { + t.equal(typeof hasSymbols, 'function', 'is a function'); + t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean'); + t.end(); +}); + +test('Symbols are supported', { skip: !hasSymbols() }, function (t) { + runSymbolTests(t); + t.end(); +}); + +test('Symbols are not supported', { skip: hasSymbols() }, function (t) { + t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined'); + t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist'); + t.end(); +}); diff --git a/node_modules/has-symbols/test/shams/core-js.js b/node_modules/has-symbols/test/shams/core-js.js new file mode 100644 index 0000000..1a29024 --- /dev/null +++ b/node_modules/has-symbols/test/shams/core-js.js @@ -0,0 +1,29 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + // @ts-expect-error TS is stupid and doesn't know about top level return + return; +} + +var hasSymbols = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); + require('core-js/fn/symbol'); + require('core-js/fn/symbol/to-string-tag'); + + require('../tests')(t); + + var hasSymbolsAfter = hasSymbols(); + t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-symbols/test/shams/get-own-property-symbols.js b/node_modules/has-symbols/test/shams/get-own-property-symbols.js new file mode 100644 index 0000000..e0296f8 --- /dev/null +++ b/node_modules/has-symbols/test/shams/get-own-property-symbols.js @@ -0,0 +1,29 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + // @ts-expect-error TS is stupid and doesn't know about top level return + return; +} + +var hasSymbols = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); + + require('get-own-property-symbols'); + + require('../tests')(t); + + var hasSymbolsAfter = hasSymbols(); + t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-symbols/test/tests.js b/node_modules/has-symbols/test/tests.js new file mode 100644 index 0000000..66a2cb8 --- /dev/null +++ b/node_modules/has-symbols/test/tests.js @@ -0,0 +1,58 @@ +'use strict'; + +/** @type {(t: import('tape').Test) => false | void} */ +// eslint-disable-next-line consistent-return +module.exports = function runSymbolTests(t) { + t.equal(typeof Symbol, 'function', 'global Symbol is a function'); + + if (typeof Symbol !== 'function') { return false; } + + t.notEqual(Symbol(), Symbol(), 'two symbols are not equal'); + + /* + t.equal( + Symbol.prototype.toString.call(Symbol('foo')), + Symbol.prototype.toString.call(Symbol('foo')), + 'two symbols with the same description stringify the same' + ); + */ + + /* + var foo = Symbol('foo'); + + t.notEqual( + String(foo), + String(Symbol('bar')), + 'two symbols with different descriptions do not stringify the same' + ); + */ + + t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function'); + // t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol'); + + t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function'); + + /** @type {{ [k in symbol]?: unknown }} */ + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + t.notEqual(typeof sym, 'string', 'Symbol is not a string'); + t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly'); + t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly'); + + var symVal = 42; + obj[sym] = symVal; + // eslint-disable-next-line no-restricted-syntax, no-unused-vars + for (var _ in obj) { t.fail('symbol property key was found in for..in of object'); } + + t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object'); + t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object'); + t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object'); + t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable'); + t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), { + configurable: true, + enumerable: true, + value: 42, + writable: true + }, 'property descriptor is correct'); +}; diff --git a/node_modules/has-symbols/tsconfig.json b/node_modules/has-symbols/tsconfig.json new file mode 100644 index 0000000..ba99af4 --- /dev/null +++ b/node_modules/has-symbols/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + "target": "ES2021", + "maxNodeModuleJsDepth": 0, + }, + "exclude": [ + "coverage" + ] +} diff --git a/node_modules/hasown/.eslintrc b/node_modules/hasown/.eslintrc new file mode 100644 index 0000000..3b5d9e9 --- /dev/null +++ b/node_modules/hasown/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/hasown/.github/FUNDING.yml b/node_modules/hasown/.github/FUNDING.yml new file mode 100644 index 0000000..d68c8b7 --- /dev/null +++ b/node_modules/hasown/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/hasown +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/hasown/.nycrc b/node_modules/hasown/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/hasown/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/hasown/CHANGELOG.md b/node_modules/hasown/CHANGELOG.md new file mode 100644 index 0000000..2b0a980 --- /dev/null +++ b/node_modules/hasown/CHANGELOG.md @@ -0,0 +1,40 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.0.2](https://github.com/inspect-js/hasOwn/compare/v2.0.1...v2.0.2) - 2024-03-10 + +### Commits + +- [types] use shared config [`68e9d4d`](https://github.com/inspect-js/hasOwn/commit/68e9d4dab6facb4f05f02c6baea94a3f2a4e44b2) +- [actions] remove redundant finisher; use reusable workflow [`241a68e`](https://github.com/inspect-js/hasOwn/commit/241a68e13ea1fe52bec5ba7f74144befc31fae7b) +- [Tests] increase coverage [`4125c0d`](https://github.com/inspect-js/hasOwn/commit/4125c0d6121db56ae30e38346dfb0c000b04f0a7) +- [Tests] skip `npm ls` in old node due to TS [`01b9282`](https://github.com/inspect-js/hasOwn/commit/01b92822f9971dea031eafdd14767df41d61c202) +- [types] improve predicate type [`d340f85`](https://github.com/inspect-js/hasOwn/commit/d340f85ce02e286ef61096cbbb6697081d40a12b) +- [Dev Deps] update `tape` [`70089fc`](https://github.com/inspect-js/hasOwn/commit/70089fcf544e64acc024cbe60f5a9b00acad86de) +- [Tests] use `@arethetypeswrong/cli` [`50b272c`](https://github.com/inspect-js/hasOwn/commit/50b272c829f40d053a3dd91c9796e0ac0b2af084) + +## [v2.0.1](https://github.com/inspect-js/hasOwn/compare/v2.0.0...v2.0.1) - 2024-02-10 + +### Commits + +- [types] use a handwritten d.ts file; fix exported type [`012b989`](https://github.com/inspect-js/hasOwn/commit/012b9898ccf91dc441e2ebf594ff70270a5fda58) +- [Dev Deps] update `@types/function-bind`, `@types/mock-property`, `@types/tape`, `aud`, `mock-property`, `npmignore`, `tape`, `typescript` [`977a56f`](https://github.com/inspect-js/hasOwn/commit/977a56f51a1f8b20566f3c471612137894644025) +- [meta] add `sideEffects` flag [`3a60b7b`](https://github.com/inspect-js/hasOwn/commit/3a60b7bf42fccd8c605e5f145a6fcc83b13cb46f) + +## [v2.0.0](https://github.com/inspect-js/hasOwn/compare/v1.0.1...v2.0.0) - 2023-10-19 + +### Commits + +- revamped implementation, tests, readme [`72bf8b3`](https://github.com/inspect-js/hasOwn/commit/72bf8b338e77a638f0a290c63ffaed18339c36b4) +- [meta] revamp package.json [`079775f`](https://github.com/inspect-js/hasOwn/commit/079775fb1ec72c1c6334069593617a0be3847458) +- Only apps should have lockfiles [`6640e23`](https://github.com/inspect-js/hasOwn/commit/6640e233d1bb8b65260880f90787637db157d215) + +## v1.0.1 - 2023-10-10 + +### Commits + +- Initial commit [`8dbfde6`](https://github.com/inspect-js/hasOwn/commit/8dbfde6e8fb0ebb076fab38d138f2984eb340a62) diff --git a/node_modules/hasown/LICENSE b/node_modules/hasown/LICENSE new file mode 100644 index 0000000..0314929 --- /dev/null +++ b/node_modules/hasown/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Jordan Harband and contributors + +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. diff --git a/node_modules/hasown/README.md b/node_modules/hasown/README.md new file mode 100644 index 0000000..f759b8a --- /dev/null +++ b/node_modules/hasown/README.md @@ -0,0 +1,40 @@ +# hasown [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +A robust, ES3 compatible, "has own property" predicate. + +## Example + +```js +const assert = require('assert'); +const hasOwn = require('hasown'); + +assert.equal(hasOwn({}, 'toString'), false); +assert.equal(hasOwn([], 'length'), true); +assert.equal(hasOwn({ a: 42 }, 'a'), true); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/hasown +[npm-version-svg]: https://versionbadg.es/inspect-js/hasown.svg +[deps-svg]: https://david-dm.org/inspect-js/hasOwn.svg +[deps-url]: https://david-dm.org/inspect-js/hasOwn +[dev-deps-svg]: https://david-dm.org/inspect-js/hasOwn/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/hasOwn#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/hasown.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/hasown.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/hasown.svg +[downloads-url]: https://npm-stat.com/charts.html?package=hasown +[codecov-image]: https://codecov.io/gh/inspect-js/hasOwn/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/hasOwn/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/hasOwn +[actions-url]: https://github.com/inspect-js/hasOwn/actions diff --git a/node_modules/hasown/index.d.ts b/node_modules/hasown/index.d.ts new file mode 100644 index 0000000..aafdf3b --- /dev/null +++ b/node_modules/hasown/index.d.ts @@ -0,0 +1,3 @@ +declare function hasOwn(o: O, p: K): o is O & Record; + +export = hasOwn; diff --git a/node_modules/hasown/index.js b/node_modules/hasown/index.js new file mode 100644 index 0000000..34e6059 --- /dev/null +++ b/node_modules/hasown/index.js @@ -0,0 +1,8 @@ +'use strict'; + +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = require('function-bind'); + +/** @type {import('.')} */ +module.exports = bind.call(call, $hasOwn); diff --git a/node_modules/hasown/package.json b/node_modules/hasown/package.json new file mode 100644 index 0000000..8502e13 --- /dev/null +++ b/node_modules/hasown/package.json @@ -0,0 +1,92 @@ +{ + "name": "hasown", + "version": "2.0.2", + "description": "A robust, ES3 compatible, \"has own property\" predicate.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "types": "index.d.ts", + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "npm run tsc", + "pretest": "npm run lint", + "tsc": "tsc -p .", + "posttsc": "attw -P", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/hasOwn.git" + }, + "keywords": [ + "has", + "hasOwnProperty", + "hasOwn", + "has-own", + "own", + "has", + "property", + "in", + "javascript", + "ecmascript" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/hasOwn/issues" + }, + "homepage": "https://github.com/inspect-js/hasOwn#readme", + "dependencies": { + "function-bind": "^1.1.2" + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.15.1", + "@ljharb/eslint-config": "^21.1.0", + "@ljharb/tsconfig": "^0.2.0", + "@types/function-bind": "^1.1.10", + "@types/mock-property": "^1.0.2", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "mock-property": "^1.0.3", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.5", + "typescript": "next" + }, + "engines": { + "node": ">= 0.4" + }, + "testling": { + "files": "test/index.js" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "test" + ] + } +} diff --git a/node_modules/hasown/tsconfig.json b/node_modules/hasown/tsconfig.json new file mode 100644 index 0000000..0930c56 --- /dev/null +++ b/node_modules/hasown/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "@ljharb/tsconfig", + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/http-errors/HISTORY.md b/node_modules/http-errors/HISTORY.md new file mode 100644 index 0000000..7228684 --- /dev/null +++ b/node_modules/http-errors/HISTORY.md @@ -0,0 +1,180 @@ +2.0.0 / 2021-12-17 +================== + + * Drop support for Node.js 0.6 + * Remove `I'mateapot` export; use `ImATeapot` instead + * Remove support for status being non-first argument + * Rename `UnorderedCollection` constructor to `TooEarly` + * deps: depd@2.0.0 + - Replace internal `eval` usage with `Function` constructor + - Use instance methods on `process` to check for listeners + * deps: statuses@2.0.1 + - Fix messaging casing of `418 I'm a Teapot` + - Remove code 306 + - Rename `425 Unordered Collection` to standard `425 Too Early` + +2021-11-14 / 1.8.1 +================== + + * deps: toidentifier@1.0.1 + +2020-06-29 / 1.8.0 +================== + + * Add `isHttpError` export to determine if value is an HTTP error + * deps: setprototypeof@1.2.0 + +2019-06-24 / 1.7.3 +================== + + * deps: inherits@2.0.4 + +2019-02-18 / 1.7.2 +================== + + * deps: setprototypeof@1.1.1 + +2018-09-08 / 1.7.1 +================== + + * Fix error creating objects in some environments + +2018-07-30 / 1.7.0 +================== + + * Set constructor name when possible + * Use `toidentifier` module to make class names + * deps: statuses@'>= 1.5.0 < 2' + +2018-03-29 / 1.6.3 +================== + + * deps: depd@~1.1.2 + - perf: remove argument reassignment + * deps: setprototypeof@1.1.0 + * deps: statuses@'>= 1.4.0 < 2' + +2017-08-04 / 1.6.2 +================== + + * deps: depd@1.1.1 + - Remove unnecessary `Buffer` loading + +2017-02-20 / 1.6.1 +================== + + * deps: setprototypeof@1.0.3 + - Fix shim for old browsers + +2017-02-14 / 1.6.0 +================== + + * Accept custom 4xx and 5xx status codes in factory + * Add deprecation message to `"I'mateapot"` export + * Deprecate passing status code as anything except first argument in factory + * Deprecate using non-error status codes + * Make `message` property enumerable for `HttpError`s + +2016-11-16 / 1.5.1 +================== + + * deps: inherits@2.0.3 + - Fix issue loading in browser + * deps: setprototypeof@1.0.2 + * deps: statuses@'>= 1.3.1 < 2' + +2016-05-18 / 1.5.0 +================== + + * Support new code `421 Misdirected Request` + * Use `setprototypeof` module to replace `__proto__` setting + * deps: statuses@'>= 1.3.0 < 2' + - Add `421 Misdirected Request` + - perf: enable strict mode + * perf: enable strict mode + +2016-01-28 / 1.4.0 +================== + + * Add `HttpError` export, for `err instanceof createError.HttpError` + * deps: inherits@2.0.1 + * deps: statuses@'>= 1.2.1 < 2' + - Fix message for status 451 + - Remove incorrect nginx status code + +2015-02-02 / 1.3.1 +================== + + * Fix regression where status can be overwritten in `createError` `props` + +2015-02-01 / 1.3.0 +================== + + * Construct errors using defined constructors from `createError` + * Fix error names that are not identifiers + - `createError["I'mateapot"]` is now `createError.ImATeapot` + * Set a meaningful `name` property on constructed errors + +2014-12-09 / 1.2.8 +================== + + * Fix stack trace from exported function + * Remove `arguments.callee` usage + +2014-10-14 / 1.2.7 +================== + + * Remove duplicate line + +2014-10-02 / 1.2.6 +================== + + * Fix `expose` to be `true` for `ClientError` constructor + +2014-09-28 / 1.2.5 +================== + + * deps: statuses@1 + +2014-09-21 / 1.2.4 +================== + + * Fix dependency version to work with old `npm`s + +2014-09-21 / 1.2.3 +================== + + * deps: statuses@~1.1.0 + +2014-09-21 / 1.2.2 +================== + + * Fix publish error + +2014-09-21 / 1.2.1 +================== + + * Support Node.js 0.6 + * Use `inherits` instead of `util` + +2014-09-09 / 1.2.0 +================== + + * Fix the way inheriting functions + * Support `expose` being provided in properties argument + +2014-09-08 / 1.1.0 +================== + + * Default status to 500 + * Support provided `error` to extend + +2014-09-08 / 1.0.1 +================== + + * Fix accepting string message + +2014-09-08 / 1.0.0 +================== + + * Initial release diff --git a/node_modules/http-errors/LICENSE b/node_modules/http-errors/LICENSE new file mode 100644 index 0000000..82af4df --- /dev/null +++ b/node_modules/http-errors/LICENSE @@ -0,0 +1,23 @@ + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.com +Copyright (c) 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. diff --git a/node_modules/http-errors/README.md b/node_modules/http-errors/README.md new file mode 100644 index 0000000..a8b7330 --- /dev/null +++ b/node_modules/http-errors/README.md @@ -0,0 +1,169 @@ +# http-errors + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][node-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][ci-image]][ci-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Create HTTP errors for Express, Koa, Connect, etc. with ease. + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```console +$ npm install http-errors +``` + +## Example + +```js +var createError = require('http-errors') +var express = require('express') +var app = express() + +app.use(function (req, res, next) { + if (!req.user) return next(createError(401, 'Please login to view this page.')) + next() +}) +``` + +## API + +This is the current API, currently extracted from Koa and subject to change. + +### Error Properties + +- `expose` - can be used to signal if `message` should be sent to the client, + defaulting to `false` when `status` >= 500 +- `headers` - can be an object of header names to values to be sent to the + client, defaulting to `undefined`. When defined, the key names should all + be lower-cased +- `message` - the traditional error message, which should be kept short and all + single line +- `status` - the status code of the error, mirroring `statusCode` for general + compatibility +- `statusCode` - the status code of the error, defaulting to `500` + +### createError([status], [message], [properties]) + +Create a new error object with the given message `msg`. +The error object inherits from `createError.HttpError`. + +```js +var err = createError(404, 'This video does not exist!') +``` + +- `status: 500` - the status code as a number +- `message` - the message of the error, defaulting to node's text for that status code. +- `properties` - custom properties to attach to the object + +### createError([status], [error], [properties]) + +Extend the given `error` object with `createError.HttpError` +properties. This will not alter the inheritance of the given +`error` object, and the modified `error` object is the +return value. + + + +```js +fs.readFile('foo.txt', function (err, buf) { + if (err) { + if (err.code === 'ENOENT') { + var httpError = createError(404, err, { expose: false }) + } else { + var httpError = createError(500, err) + } + } +}) +``` + +- `status` - the status code as a number +- `error` - the error object to extend +- `properties` - custom properties to attach to the object + +### createError.isHttpError(val) + +Determine if the provided `val` is an `HttpError`. This will return `true` +if the error inherits from the `HttpError` constructor of this module or +matches the "duck type" for an error this module creates. All outputs from +the `createError` factory will return `true` for this function, including +if an non-`HttpError` was passed into the factory. + +### new createError\[code || name\](\[msg]\)) + +Create a new error object with the given message `msg`. +The error object inherits from `createError.HttpError`. + +```js +var err = new createError.NotFound() +``` + +- `code` - the status code as a number +- `name` - the name of the error as a "bumpy case", i.e. `NotFound` or `InternalServerError`. + +#### List of all constructors + +|Status Code|Constructor Name | +|-----------|-----------------------------| +|400 |BadRequest | +|401 |Unauthorized | +|402 |PaymentRequired | +|403 |Forbidden | +|404 |NotFound | +|405 |MethodNotAllowed | +|406 |NotAcceptable | +|407 |ProxyAuthenticationRequired | +|408 |RequestTimeout | +|409 |Conflict | +|410 |Gone | +|411 |LengthRequired | +|412 |PreconditionFailed | +|413 |PayloadTooLarge | +|414 |URITooLong | +|415 |UnsupportedMediaType | +|416 |RangeNotSatisfiable | +|417 |ExpectationFailed | +|418 |ImATeapot | +|421 |MisdirectedRequest | +|422 |UnprocessableEntity | +|423 |Locked | +|424 |FailedDependency | +|425 |TooEarly | +|426 |UpgradeRequired | +|428 |PreconditionRequired | +|429 |TooManyRequests | +|431 |RequestHeaderFieldsTooLarge | +|451 |UnavailableForLegalReasons | +|500 |InternalServerError | +|501 |NotImplemented | +|502 |BadGateway | +|503 |ServiceUnavailable | +|504 |GatewayTimeout | +|505 |HTTPVersionNotSupported | +|506 |VariantAlsoNegotiates | +|507 |InsufficientStorage | +|508 |LoopDetected | +|509 |BandwidthLimitExceeded | +|510 |NotExtended | +|511 |NetworkAuthenticationRequired| + +## License + +[MIT](LICENSE) + +[ci-image]: https://badgen.net/github/checks/jshttp/http-errors/master?label=ci +[ci-url]: https://github.com/jshttp/http-errors/actions?query=workflow%3Aci +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/http-errors/master +[coveralls-url]: https://coveralls.io/r/jshttp/http-errors?branch=master +[node-image]: https://badgen.net/npm/node/http-errors +[node-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/http-errors +[npm-url]: https://npmjs.org/package/http-errors +[npm-version-image]: https://badgen.net/npm/v/http-errors +[travis-image]: https://badgen.net/travis/jshttp/http-errors/master +[travis-url]: https://travis-ci.org/jshttp/http-errors diff --git a/node_modules/http-errors/index.js b/node_modules/http-errors/index.js new file mode 100644 index 0000000..c425f1e --- /dev/null +++ b/node_modules/http-errors/index.js @@ -0,0 +1,289 @@ +/*! + * http-errors + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var deprecate = require('depd')('http-errors') +var setPrototypeOf = require('setprototypeof') +var statuses = require('statuses') +var inherits = require('inherits') +var toIdentifier = require('toidentifier') + +/** + * Module exports. + * @public + */ + +module.exports = createError +module.exports.HttpError = createHttpErrorConstructor() +module.exports.isHttpError = createIsHttpErrorFunction(module.exports.HttpError) + +// Populate exports for all constructors +populateConstructorExports(module.exports, statuses.codes, module.exports.HttpError) + +/** + * Get the code class of a status code. + * @private + */ + +function codeClass (status) { + return Number(String(status).charAt(0) + '00') +} + +/** + * Create a new HTTP Error. + * + * @returns {Error} + * @public + */ + +function createError () { + // so much arity going on ~_~ + var err + var msg + var status = 500 + var props = {} + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i] + var type = typeof arg + if (type === 'object' && arg instanceof Error) { + err = arg + status = err.status || err.statusCode || status + } else if (type === 'number' && i === 0) { + status = arg + } else if (type === 'string') { + msg = arg + } else if (type === 'object') { + props = arg + } else { + throw new TypeError('argument #' + (i + 1) + ' unsupported type ' + type) + } + } + + if (typeof status === 'number' && (status < 400 || status >= 600)) { + deprecate('non-error status code; use only 4xx or 5xx status codes') + } + + if (typeof status !== 'number' || + (!statuses.message[status] && (status < 400 || status >= 600))) { + status = 500 + } + + // constructor + var HttpError = createError[status] || createError[codeClass(status)] + + if (!err) { + // create error + err = HttpError + ? new HttpError(msg) + : new Error(msg || statuses.message[status]) + Error.captureStackTrace(err, createError) + } + + if (!HttpError || !(err instanceof HttpError) || err.status !== status) { + // add properties to generic error + err.expose = status < 500 + err.status = err.statusCode = status + } + + for (var key in props) { + if (key !== 'status' && key !== 'statusCode') { + err[key] = props[key] + } + } + + return err +} + +/** + * Create HTTP error abstract base class. + * @private + */ + +function createHttpErrorConstructor () { + function HttpError () { + throw new TypeError('cannot construct abstract class') + } + + inherits(HttpError, Error) + + return HttpError +} + +/** + * Create a constructor for a client error. + * @private + */ + +function createClientErrorConstructor (HttpError, name, code) { + var className = toClassName(name) + + function ClientError (message) { + // create the error object + var msg = message != null ? message : statuses.message[code] + var err = new Error(msg) + + // capture a stack trace to the construction point + Error.captureStackTrace(err, ClientError) + + // adjust the [[Prototype]] + setPrototypeOf(err, ClientError.prototype) + + // redefine the error message + Object.defineProperty(err, 'message', { + enumerable: true, + configurable: true, + value: msg, + writable: true + }) + + // redefine the error name + Object.defineProperty(err, 'name', { + enumerable: false, + configurable: true, + value: className, + writable: true + }) + + return err + } + + inherits(ClientError, HttpError) + nameFunc(ClientError, className) + + ClientError.prototype.status = code + ClientError.prototype.statusCode = code + ClientError.prototype.expose = true + + return ClientError +} + +/** + * Create function to test is a value is a HttpError. + * @private + */ + +function createIsHttpErrorFunction (HttpError) { + return function isHttpError (val) { + if (!val || typeof val !== 'object') { + return false + } + + if (val instanceof HttpError) { + return true + } + + return val instanceof Error && + typeof val.expose === 'boolean' && + typeof val.statusCode === 'number' && val.status === val.statusCode + } +} + +/** + * Create a constructor for a server error. + * @private + */ + +function createServerErrorConstructor (HttpError, name, code) { + var className = toClassName(name) + + function ServerError (message) { + // create the error object + var msg = message != null ? message : statuses.message[code] + var err = new Error(msg) + + // capture a stack trace to the construction point + Error.captureStackTrace(err, ServerError) + + // adjust the [[Prototype]] + setPrototypeOf(err, ServerError.prototype) + + // redefine the error message + Object.defineProperty(err, 'message', { + enumerable: true, + configurable: true, + value: msg, + writable: true + }) + + // redefine the error name + Object.defineProperty(err, 'name', { + enumerable: false, + configurable: true, + value: className, + writable: true + }) + + return err + } + + inherits(ServerError, HttpError) + nameFunc(ServerError, className) + + ServerError.prototype.status = code + ServerError.prototype.statusCode = code + ServerError.prototype.expose = false + + return ServerError +} + +/** + * Set the name of a function, if possible. + * @private + */ + +function nameFunc (func, name) { + var desc = Object.getOwnPropertyDescriptor(func, 'name') + + if (desc && desc.configurable) { + desc.value = name + Object.defineProperty(func, 'name', desc) + } +} + +/** + * Populate the exports object with constructors for every error class. + * @private + */ + +function populateConstructorExports (exports, codes, HttpError) { + codes.forEach(function forEachCode (code) { + var CodeError + var name = toIdentifier(statuses.message[code]) + + switch (codeClass(code)) { + case 400: + CodeError = createClientErrorConstructor(HttpError, name, code) + break + case 500: + CodeError = createServerErrorConstructor(HttpError, name, code) + break + } + + if (CodeError) { + // export the constructor + exports[code] = CodeError + exports[name] = CodeError + } + }) +} + +/** + * Get a class name from a name identifier. + * @private + */ + +function toClassName (name) { + return name.substr(-5) !== 'Error' + ? name + 'Error' + : name +} diff --git a/node_modules/http-errors/package.json b/node_modules/http-errors/package.json new file mode 100644 index 0000000..4cb6d7e --- /dev/null +++ b/node_modules/http-errors/package.json @@ -0,0 +1,50 @@ +{ + "name": "http-errors", + "description": "Create HTTP error objects", + "version": "2.0.0", + "author": "Jonathan Ong (http://jongleberry.com)", + "contributors": [ + "Alan Plum ", + "Douglas Christopher Wilson " + ], + "license": "MIT", + "repository": "jshttp/http-errors", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "devDependencies": { + "eslint": "7.32.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.25.3", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "5.2.0", + "eslint-plugin-standard": "4.1.0", + "mocha": "9.1.3", + "nyc": "15.1.0" + }, + "engines": { + "node": ">= 0.8" + }, + "scripts": { + "lint": "eslint . && node ./scripts/lint-readme-list.js", + "test": "mocha --reporter spec --bail", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "version": "node scripts/version-history.js && git add HISTORY.md" + }, + "keywords": [ + "http", + "error" + ], + "files": [ + "index.js", + "HISTORY.md", + "LICENSE", + "README.md" + ] +} diff --git a/node_modules/iconv-lite/Changelog.md b/node_modules/iconv-lite/Changelog.md new file mode 100644 index 0000000..f252313 --- /dev/null +++ b/node_modules/iconv-lite/Changelog.md @@ -0,0 +1,162 @@ +# 0.4.24 / 2018-08-22 + + * Added MIK encoding (#196, by @Ivan-Kalatchev) + + +# 0.4.23 / 2018-05-07 + + * Fix deprecation warning in Node v10 due to the last usage of `new Buffer` (#185, by @felixbuenemann) + * Switched from NodeBuffer to Buffer in typings (#155 by @felixfbecker, #186 by @larssn) + + +# 0.4.22 / 2018-05-05 + + * Use older semver style for dependencies to be compatible with Node version 0.10 (#182, by @dougwilson) + * Fix tests to accomodate fixes in Node v10 (#182, by @dougwilson) + + +# 0.4.21 / 2018-04-06 + + * Fix encoding canonicalization (#156) + * Fix the paths in the "browser" field in package.json (#174 by @LMLB) + * Removed "contributors" section in package.json - see Git history instead. + + +# 0.4.20 / 2018-04-06 + + * Updated `new Buffer()` usages with recommended replacements as it's being deprecated in Node v10 (#176, #178 by @ChALkeR) + + +# 0.4.19 / 2017-09-09 + + * Fixed iso8859-1 codec regression in handling untranslatable characters (#162, caused by #147) + * Re-generated windows1255 codec, because it was updated in iconv project + * Fixed grammar in error message when iconv-lite is loaded with encoding other than utf8 + + +# 0.4.18 / 2017-06-13 + + * Fixed CESU-8 regression in Node v8. + + +# 0.4.17 / 2017-04-22 + + * Updated typescript definition file to support Angular 2 AoT mode (#153 by @larssn) + + +# 0.4.16 / 2017-04-22 + + * Added support for React Native (#150) + * Changed iso8859-1 encoding to usine internal 'binary' encoding, as it's the same thing (#147 by @mscdex) + * Fixed typo in Readme (#138 by @jiangzhuo) + * Fixed build for Node v6.10+ by making correct version comparison + * Added a warning if iconv-lite is loaded not as utf-8 (see #142) + + +# 0.4.15 / 2016-11-21 + + * Fixed typescript type definition (#137) + + +# 0.4.14 / 2016-11-20 + + * Preparation for v1.0 + * Added Node v6 and latest Node versions to Travis CI test rig + * Deprecated Node v0.8 support + * Typescript typings (@larssn) + * Fix encoding of Euro character in GB 18030 (inspired by @lygstate) + * Add ms prefix to dbcs windows encodings (@rokoroku) + + +# 0.4.13 / 2015-10-01 + + * Fix silly mistake in deprecation notice. + + +# 0.4.12 / 2015-09-26 + + * Node v4 support: + * Added CESU-8 decoding (#106) + * Added deprecation notice for `extendNodeEncodings` + * Added Travis tests for Node v4 and io.js latest (#105 by @Mithgol) + + +# 0.4.11 / 2015-07-03 + + * Added CESU-8 encoding. + + +# 0.4.10 / 2015-05-26 + + * Changed UTF-16 endianness heuristic to take into account any ASCII chars, not + just spaces. This should minimize the importance of "default" endianness. + + +# 0.4.9 / 2015-05-24 + + * Streamlined BOM handling: strip BOM by default, add BOM when encoding if + addBOM: true. Added docs to Readme. + * UTF16 now uses UTF16-LE by default. + * Fixed minor issue with big5 encoding. + * Added io.js testing on Travis; updated node-iconv version to test against. + Now we just skip testing SBCS encodings that node-iconv doesn't support. + * (internal refactoring) Updated codec interface to use classes. + * Use strict mode in all files. + + +# 0.4.8 / 2015-04-14 + + * added alias UNICODE-1-1-UTF-7 for UTF-7 encoding (#94) + + +# 0.4.7 / 2015-02-05 + + * stop official support of Node.js v0.8. Should still work, but no guarantees. + reason: Packages needed for testing are hard to get on Travis CI. + * work in environment where Object.prototype is monkey patched with enumerable + props (#89). + + +# 0.4.6 / 2015-01-12 + + * fix rare aliases of single-byte encodings (thanks @mscdex) + * double the timeout for dbcs tests to make them less flaky on travis + + +# 0.4.5 / 2014-11-20 + + * fix windows-31j and x-sjis encoding support (@nleush) + * minor fix: undefined variable reference when internal error happens + + +# 0.4.4 / 2014-07-16 + + * added encodings UTF-7 (RFC2152) and UTF-7-IMAP (RFC3501 Section 5.1.3) + * fixed streaming base64 encoding + + +# 0.4.3 / 2014-06-14 + + * added encodings UTF-16BE and UTF-16 with BOM + + +# 0.4.2 / 2014-06-12 + + * don't throw exception if `extendNodeEncodings()` is called more than once + + +# 0.4.1 / 2014-06-11 + + * codepage 808 added + + +# 0.4.0 / 2014-06-10 + + * code is rewritten from scratch + * all widespread encodings are supported + * streaming interface added + * browserify compatibility added + * (optional) extend core primitive encodings to make usage even simpler + * moved from vows to mocha as the testing framework + + diff --git a/node_modules/iconv-lite/LICENSE b/node_modules/iconv-lite/LICENSE new file mode 100644 index 0000000..d518d83 --- /dev/null +++ b/node_modules/iconv-lite/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2011 Alexander Shtuchkin + +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. + diff --git a/node_modules/iconv-lite/README.md b/node_modules/iconv-lite/README.md new file mode 100644 index 0000000..c981c37 --- /dev/null +++ b/node_modules/iconv-lite/README.md @@ -0,0 +1,156 @@ +## Pure JS character encoding conversion [![Build Status](https://travis-ci.org/ashtuchkin/iconv-lite.svg?branch=master)](https://travis-ci.org/ashtuchkin/iconv-lite) + + * Doesn't need native code compilation. Works on Windows and in sandboxed environments like [Cloud9](http://c9.io). + * Used in popular projects like [Express.js (body_parser)](https://github.com/expressjs/body-parser), + [Grunt](http://gruntjs.com/), [Nodemailer](http://www.nodemailer.com/), [Yeoman](http://yeoman.io/) and others. + * Faster than [node-iconv](https://github.com/bnoordhuis/node-iconv) (see below for performance comparison). + * Intuitive encode/decode API + * Streaming support for Node v0.10+ + * [Deprecated] Can extend Node.js primitives (buffers, streams) to support all iconv-lite encodings. + * In-browser usage via [Browserify](https://github.com/substack/node-browserify) (~180k gzip compressed with Buffer shim included). + * Typescript [type definition file](https://github.com/ashtuchkin/iconv-lite/blob/master/lib/index.d.ts) included. + * React Native is supported (need to explicitly `npm install` two more modules: `buffer` and `stream`). + * License: MIT. + +[![NPM Stats](https://nodei.co/npm/iconv-lite.png?downloads=true&downloadRank=true)](https://npmjs.org/packages/iconv-lite/) + +## Usage +### Basic API +```javascript +var iconv = require('iconv-lite'); + +// Convert from an encoded buffer to js string. +str = iconv.decode(Buffer.from([0x68, 0x65, 0x6c, 0x6c, 0x6f]), 'win1251'); + +// Convert from js string to an encoded buffer. +buf = iconv.encode("Sample input string", 'win1251'); + +// Check if encoding is supported +iconv.encodingExists("us-ascii") +``` + +### Streaming API (Node v0.10+) +```javascript + +// Decode stream (from binary stream to js strings) +http.createServer(function(req, res) { + var converterStream = iconv.decodeStream('win1251'); + req.pipe(converterStream); + + converterStream.on('data', function(str) { + console.log(str); // Do something with decoded strings, chunk-by-chunk. + }); +}); + +// Convert encoding streaming example +fs.createReadStream('file-in-win1251.txt') + .pipe(iconv.decodeStream('win1251')) + .pipe(iconv.encodeStream('ucs2')) + .pipe(fs.createWriteStream('file-in-ucs2.txt')); + +// Sugar: all encode/decode streams have .collect(cb) method to accumulate data. +http.createServer(function(req, res) { + req.pipe(iconv.decodeStream('win1251')).collect(function(err, body) { + assert(typeof body == 'string'); + console.log(body); // full request body string + }); +}); +``` + +### [Deprecated] Extend Node.js own encodings +> NOTE: This doesn't work on latest Node versions. See [details](https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility). + +```javascript +// After this call all Node basic primitives will understand iconv-lite encodings. +iconv.extendNodeEncodings(); + +// Examples: +buf = new Buffer(str, 'win1251'); +buf.write(str, 'gbk'); +str = buf.toString('latin1'); +assert(Buffer.isEncoding('iso-8859-15')); +Buffer.byteLength(str, 'us-ascii'); + +http.createServer(function(req, res) { + req.setEncoding('big5'); + req.collect(function(err, body) { + console.log(body); + }); +}); + +fs.createReadStream("file.txt", "shift_jis"); + +// External modules are also supported (if they use Node primitives, which they probably do). +request = require('request'); +request({ + url: "http://github.com/", + encoding: "cp932" +}); + +// To remove extensions +iconv.undoExtendNodeEncodings(); +``` + +## Supported encodings + + * All node.js native encodings: utf8, ucs2 / utf16-le, ascii, binary, base64, hex. + * Additional unicode encodings: utf16, utf16-be, utf-7, utf-7-imap. + * All widespread singlebyte encodings: Windows 125x family, ISO-8859 family, + IBM/DOS codepages, Macintosh family, KOI8 family, all others supported by iconv library. + Aliases like 'latin1', 'us-ascii' also supported. + * All widespread multibyte encodings: CP932, CP936, CP949, CP950, GB2312, GBK, GB18030, Big5, Shift_JIS, EUC-JP. + +See [all supported encodings on wiki](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings). + +Most singlebyte encodings are generated automatically from [node-iconv](https://github.com/bnoordhuis/node-iconv). Thank you Ben Noordhuis and libiconv authors! + +Multibyte encodings are generated from [Unicode.org mappings](http://www.unicode.org/Public/MAPPINGS/) and [WHATWG Encoding Standard mappings](http://encoding.spec.whatwg.org/). Thank you, respective authors! + + +## Encoding/decoding speed + +Comparison with node-iconv module (1000x256kb, on MacBook Pro, Core i5/2.6 GHz, Node v0.12.0). +Note: your results may vary, so please always check on your hardware. + + operation iconv@2.1.4 iconv-lite@0.4.7 + ---------------------------------------------------------- + encode('win1251') ~96 Mb/s ~320 Mb/s + decode('win1251') ~95 Mb/s ~246 Mb/s + +## BOM handling + + * Decoding: BOM is stripped by default, unless overridden by passing `stripBOM: false` in options + (f.ex. `iconv.decode(buf, enc, {stripBOM: false})`). + A callback might also be given as a `stripBOM` parameter - it'll be called if BOM character was actually found. + * If you want to detect UTF-8 BOM when decoding other encodings, use [node-autodetect-decoder-stream](https://github.com/danielgindi/node-autodetect-decoder-stream) module. + * Encoding: No BOM added, unless overridden by `addBOM: true` option. + +## UTF-16 Encodings + +This library supports UTF-16LE, UTF-16BE and UTF-16 encodings. First two are straightforward, but UTF-16 is trying to be +smart about endianness in the following ways: + * Decoding: uses BOM and 'spaces heuristic' to determine input endianness. Default is UTF-16LE, but can be + overridden with `defaultEncoding: 'utf-16be'` option. Strips BOM unless `stripBOM: false`. + * Encoding: uses UTF-16LE and writes BOM by default. Use `addBOM: false` to override. + +## Other notes + +When decoding, be sure to supply a Buffer to decode() method, otherwise [bad things usually happen](https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding). +Untranslatable characters are set to � or ?. No transliteration is currently supported. +Node versions 0.10.31 and 0.11.13 are buggy, don't use them (see #65, #77). + +## Testing + +```bash +$ git clone git@github.com:ashtuchkin/iconv-lite.git +$ cd iconv-lite +$ npm install +$ npm test + +$ # To view performance: +$ node test/performance.js + +$ # To view test coverage: +$ npm run coverage +$ open coverage/lcov-report/index.html +``` diff --git a/node_modules/iconv-lite/encodings/dbcs-codec.js b/node_modules/iconv-lite/encodings/dbcs-codec.js new file mode 100644 index 0000000..1fe3e16 --- /dev/null +++ b/node_modules/iconv-lite/encodings/dbcs-codec.js @@ -0,0 +1,555 @@ +"use strict"; +var Buffer = require("safer-buffer").Buffer; + +// Multibyte codec. In this scheme, a character is represented by 1 or more bytes. +// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. +// To save memory and loading time, we read table files only when requested. + +exports._dbcs = DBCSCodec; + +var UNASSIGNED = -1, + GB18030_CODE = -2, + SEQ_START = -10, + NODE_START = -1000, + UNASSIGNED_NODE = new Array(0x100), + DEF_CHAR = -1; + +for (var i = 0; i < 0x100; i++) + UNASSIGNED_NODE[i] = UNASSIGNED; + + +// Class DBCSCodec reads and initializes mapping tables. +function DBCSCodec(codecOptions, iconv) { + this.encodingName = codecOptions.encodingName; + if (!codecOptions) + throw new Error("DBCS codec is called without the data.") + if (!codecOptions.table) + throw new Error("Encoding '" + this.encodingName + "' has no data."); + + // Load tables. + var mappingTable = codecOptions.table(); + + + // Decode tables: MBCS -> Unicode. + + // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256. + // Trie root is decodeTables[0]. + // Values: >= 0 -> unicode character code. can be > 0xFFFF + // == UNASSIGNED -> unknown/unassigned sequence. + // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence. + // <= NODE_START -> index of the next node in our trie to process next byte. + // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq. + this.decodeTables = []; + this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node. + + // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. + this.decodeTableSeq = []; + + // Actual mapping tables consist of chunks. Use them to fill up decode tables. + for (var i = 0; i < mappingTable.length; i++) + this._addDecodeChunk(mappingTable[i]); + + this.defaultCharUnicode = iconv.defaultCharUnicode; + + + // Encode tables: Unicode -> DBCS. + + // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance. + // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null. + // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.). + // == UNASSIGNED -> no conversion found. Output a default char. + // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence. + this.encodeTable = []; + + // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of + // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key + // means end of sequence (needed when one sequence is a strict subsequence of another). + // Objects are kept separately from encodeTable to increase performance. + this.encodeTableSeq = []; + + // Some chars can be decoded, but need not be encoded. + var skipEncodeChars = {}; + if (codecOptions.encodeSkipVals) + for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) { + var val = codecOptions.encodeSkipVals[i]; + if (typeof val === 'number') + skipEncodeChars[val] = true; + else + for (var j = val.from; j <= val.to; j++) + skipEncodeChars[j] = true; + } + + // Use decode trie to recursively fill out encode tables. + this._fillEncodeTable(0, 0, skipEncodeChars); + + // Add more encoding pairs when needed. + if (codecOptions.encodeAdd) { + for (var uChar in codecOptions.encodeAdd) + if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) + this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); + } + + this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; + if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; + if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); + + + // Load & create GB18030 tables when needed. + if (typeof codecOptions.gb18030 === 'function') { + this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. + + // Add GB18030 decode tables. + var thirdByteNodeIdx = this.decodeTables.length; + var thirdByteNode = this.decodeTables[thirdByteNodeIdx] = UNASSIGNED_NODE.slice(0); + + var fourthByteNodeIdx = this.decodeTables.length; + var fourthByteNode = this.decodeTables[fourthByteNodeIdx] = UNASSIGNED_NODE.slice(0); + + for (var i = 0x81; i <= 0xFE; i++) { + var secondByteNodeIdx = NODE_START - this.decodeTables[0][i]; + var secondByteNode = this.decodeTables[secondByteNodeIdx]; + for (var j = 0x30; j <= 0x39; j++) + secondByteNode[j] = NODE_START - thirdByteNodeIdx; + } + for (var i = 0x81; i <= 0xFE; i++) + thirdByteNode[i] = NODE_START - fourthByteNodeIdx; + for (var i = 0x30; i <= 0x39; i++) + fourthByteNode[i] = GB18030_CODE + } +} + +DBCSCodec.prototype.encoder = DBCSEncoder; +DBCSCodec.prototype.decoder = DBCSDecoder; + +// Decoder helpers +DBCSCodec.prototype._getDecodeTrieNode = function(addr) { + var bytes = []; + for (; addr > 0; addr >>= 8) + bytes.push(addr & 0xFF); + if (bytes.length == 0) + bytes.push(0); + + var node = this.decodeTables[0]; + for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie. + var val = node[bytes[i]]; + + if (val == UNASSIGNED) { // Create new node. + node[bytes[i]] = NODE_START - this.decodeTables.length; + this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); + } + else if (val <= NODE_START) { // Existing node. + node = this.decodeTables[NODE_START - val]; + } + else + throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); + } + return node; +} + + +DBCSCodec.prototype._addDecodeChunk = function(chunk) { + // First element of chunk is the hex mbcs code where we start. + var curAddr = parseInt(chunk[0], 16); + + // Choose the decoding node where we'll write our chars. + var writeTable = this._getDecodeTrieNode(curAddr); + curAddr = curAddr & 0xFF; + + // Write all other elements of the chunk to the table. + for (var k = 1; k < chunk.length; k++) { + var part = chunk[k]; + if (typeof part === "string") { // String, write as-is. + for (var l = 0; l < part.length;) { + var code = part.charCodeAt(l++); + if (0xD800 <= code && code < 0xDC00) { // Decode surrogate + var codeTrail = part.charCodeAt(l++); + if (0xDC00 <= codeTrail && codeTrail < 0xE000) + writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00); + else + throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); + } + else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used) + var len = 0xFFF - code + 2; + var seq = []; + for (var m = 0; m < len; m++) + seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq. + + writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; + this.decodeTableSeq.push(seq); + } + else + writeTable[curAddr++] = code; // Basic char + } + } + else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character. + var charCode = writeTable[curAddr - 1] + 1; + for (var l = 0; l < part; l++) + writeTable[curAddr++] = charCode++; + } + else + throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); + } + if (curAddr > 0xFF) + throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); +} + +// Encoder helpers +DBCSCodec.prototype._getEncodeBucket = function(uCode) { + var high = uCode >> 8; // This could be > 0xFF because of astral characters. + if (this.encodeTable[high] === undefined) + this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand. + return this.encodeTable[high]; +} + +DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { + var bucket = this._getEncodeBucket(uCode); + var low = uCode & 0xFF; + if (bucket[low] <= SEQ_START) + this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it. + else if (bucket[low] == UNASSIGNED) + bucket[low] = dbcsCode; +} + +DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { + + // Get the root of character tree according to first character of the sequence. + var uCode = seq[0]; + var bucket = this._getEncodeBucket(uCode); + var low = uCode & 0xFF; + + var node; + if (bucket[low] <= SEQ_START) { + // There's already a sequence with - use it. + node = this.encodeTableSeq[SEQ_START-bucket[low]]; + } + else { + // There was no sequence object - allocate a new one. + node = {}; + if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence. + bucket[low] = SEQ_START - this.encodeTableSeq.length; + this.encodeTableSeq.push(node); + } + + // Traverse the character tree, allocating new nodes as needed. + for (var j = 1; j < seq.length-1; j++) { + var oldVal = node[uCode]; + if (typeof oldVal === 'object') + node = oldVal; + else { + node = node[uCode] = {} + if (oldVal !== undefined) + node[DEF_CHAR] = oldVal + } + } + + // Set the leaf to given dbcsCode. + uCode = seq[seq.length-1]; + node[uCode] = dbcsCode; +} + +DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { + var node = this.decodeTables[nodeIdx]; + for (var i = 0; i < 0x100; i++) { + var uCode = node[i]; + var mbCode = prefix + i; + if (skipEncodeChars[mbCode]) + continue; + + if (uCode >= 0) + this._setEncodeChar(uCode, mbCode); + else if (uCode <= NODE_START) + this._fillEncodeTable(NODE_START - uCode, mbCode << 8, skipEncodeChars); + else if (uCode <= SEQ_START) + this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); + } +} + + + +// == Encoder ================================================================== + +function DBCSEncoder(options, codec) { + // Encoder state + this.leadSurrogate = -1; + this.seqObj = undefined; + + // Static data + this.encodeTable = codec.encodeTable; + this.encodeTableSeq = codec.encodeTableSeq; + this.defaultCharSingleByte = codec.defCharSB; + this.gb18030 = codec.gb18030; +} + +DBCSEncoder.prototype.write = function(str) { + var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)), + leadSurrogate = this.leadSurrogate, + seqObj = this.seqObj, nextChar = -1, + i = 0, j = 0; + + while (true) { + // 0. Get next character. + if (nextChar === -1) { + if (i == str.length) break; + var uCode = str.charCodeAt(i++); + } + else { + var uCode = nextChar; + nextChar = -1; + } + + // 1. Handle surrogates. + if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates. + if (uCode < 0xDC00) { // We've got lead surrogate. + if (leadSurrogate === -1) { + leadSurrogate = uCode; + continue; + } else { + leadSurrogate = uCode; + // Double lead surrogate found. + uCode = UNASSIGNED; + } + } else { // We've got trail surrogate. + if (leadSurrogate !== -1) { + uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00); + leadSurrogate = -1; + } else { + // Incomplete surrogate pair - only trail surrogate found. + uCode = UNASSIGNED; + } + + } + } + else if (leadSurrogate !== -1) { + // Incomplete surrogate pair - only lead surrogate found. + nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char. + leadSurrogate = -1; + } + + // 2. Convert uCode character. + var dbcsCode = UNASSIGNED; + if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence + var resCode = seqObj[uCode]; + if (typeof resCode === 'object') { // Sequence continues. + seqObj = resCode; + continue; + + } else if (typeof resCode == 'number') { // Sequence finished. Write it. + dbcsCode = resCode; + + } else if (resCode == undefined) { // Current character is not part of the sequence. + + // Try default character for this sequence + resCode = seqObj[DEF_CHAR]; + if (resCode !== undefined) { + dbcsCode = resCode; // Found. Write it. + nextChar = uCode; // Current character will be written too in the next iteration. + + } else { + // TODO: What if we have no default? (resCode == undefined) + // Then, we should write first char of the sequence as-is and try the rest recursively. + // Didn't do it for now because no encoding has this situation yet. + // Currently, just skip the sequence and write current char. + } + } + seqObj = undefined; + } + else if (uCode >= 0) { // Regular character + var subtable = this.encodeTable[uCode >> 8]; + if (subtable !== undefined) + dbcsCode = subtable[uCode & 0xFF]; + + if (dbcsCode <= SEQ_START) { // Sequence start + seqObj = this.encodeTableSeq[SEQ_START-dbcsCode]; + continue; + } + + if (dbcsCode == UNASSIGNED && this.gb18030) { + // Use GB18030 algorithm to find character(s) to write. + var idx = findIdx(this.gb18030.uChars, uCode); + if (idx != -1) { + var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); + newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600; + newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260; + newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10; + newBuf[j++] = 0x30 + dbcsCode; + continue; + } + } + } + + // 3. Write dbcsCode character. + if (dbcsCode === UNASSIGNED) + dbcsCode = this.defaultCharSingleByte; + + if (dbcsCode < 0x100) { + newBuf[j++] = dbcsCode; + } + else if (dbcsCode < 0x10000) { + newBuf[j++] = dbcsCode >> 8; // high byte + newBuf[j++] = dbcsCode & 0xFF; // low byte + } + else { + newBuf[j++] = dbcsCode >> 16; + newBuf[j++] = (dbcsCode >> 8) & 0xFF; + newBuf[j++] = dbcsCode & 0xFF; + } + } + + this.seqObj = seqObj; + this.leadSurrogate = leadSurrogate; + return newBuf.slice(0, j); +} + +DBCSEncoder.prototype.end = function() { + if (this.leadSurrogate === -1 && this.seqObj === undefined) + return; // All clean. Most often case. + + var newBuf = Buffer.alloc(10), j = 0; + + if (this.seqObj) { // We're in the sequence. + var dbcsCode = this.seqObj[DEF_CHAR]; + if (dbcsCode !== undefined) { // Write beginning of the sequence. + if (dbcsCode < 0x100) { + newBuf[j++] = dbcsCode; + } + else { + newBuf[j++] = dbcsCode >> 8; // high byte + newBuf[j++] = dbcsCode & 0xFF; // low byte + } + } else { + // See todo above. + } + this.seqObj = undefined; + } + + if (this.leadSurrogate !== -1) { + // Incomplete surrogate pair - only lead surrogate found. + newBuf[j++] = this.defaultCharSingleByte; + this.leadSurrogate = -1; + } + + return newBuf.slice(0, j); +} + +// Export for testing +DBCSEncoder.prototype.findIdx = findIdx; + + +// == Decoder ================================================================== + +function DBCSDecoder(options, codec) { + // Decoder state + this.nodeIdx = 0; + this.prevBuf = Buffer.alloc(0); + + // Static data + this.decodeTables = codec.decodeTables; + this.decodeTableSeq = codec.decodeTableSeq; + this.defaultCharUnicode = codec.defaultCharUnicode; + this.gb18030 = codec.gb18030; +} + +DBCSDecoder.prototype.write = function(buf) { + var newBuf = Buffer.alloc(buf.length*2), + nodeIdx = this.nodeIdx, + prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length, + seqStart = -this.prevBuf.length, // idx of the start of current parsed sequence. + uCode; + + if (prevBufOffset > 0) // Make prev buf overlap a little to make it easier to slice later. + prevBuf = Buffer.concat([prevBuf, buf.slice(0, 10)]); + + for (var i = 0, j = 0; i < buf.length; i++) { + var curByte = (i >= 0) ? buf[i] : prevBuf[i + prevBufOffset]; + + // Lookup in current trie node. + var uCode = this.decodeTables[nodeIdx][curByte]; + + if (uCode >= 0) { + // Normal character, just use it. + } + else if (uCode === UNASSIGNED) { // Unknown char. + // TODO: Callback with seq. + //var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); + i = seqStart; // Try to parse again, after skipping first byte of the sequence ('i' will be incremented by 'for' cycle). + uCode = this.defaultCharUnicode.charCodeAt(0); + } + else if (uCode === GB18030_CODE) { + var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); + var ptr = (curSeq[0]-0x81)*12600 + (curSeq[1]-0x30)*1260 + (curSeq[2]-0x81)*10 + (curSeq[3]-0x30); + var idx = findIdx(this.gb18030.gbChars, ptr); + uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; + } + else if (uCode <= NODE_START) { // Go to next trie node. + nodeIdx = NODE_START - uCode; + continue; + } + else if (uCode <= SEQ_START) { // Output a sequence of chars. + var seq = this.decodeTableSeq[SEQ_START - uCode]; + for (var k = 0; k < seq.length - 1; k++) { + uCode = seq[k]; + newBuf[j++] = uCode & 0xFF; + newBuf[j++] = uCode >> 8; + } + uCode = seq[seq.length-1]; + } + else + throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); + + // Write the character to buffer, handling higher planes using surrogate pair. + if (uCode > 0xFFFF) { + uCode -= 0x10000; + var uCodeLead = 0xD800 + Math.floor(uCode / 0x400); + newBuf[j++] = uCodeLead & 0xFF; + newBuf[j++] = uCodeLead >> 8; + + uCode = 0xDC00 + uCode % 0x400; + } + newBuf[j++] = uCode & 0xFF; + newBuf[j++] = uCode >> 8; + + // Reset trie node. + nodeIdx = 0; seqStart = i+1; + } + + this.nodeIdx = nodeIdx; + this.prevBuf = (seqStart >= 0) ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset); + return newBuf.slice(0, j).toString('ucs2'); +} + +DBCSDecoder.prototype.end = function() { + var ret = ''; + + // Try to parse all remaining chars. + while (this.prevBuf.length > 0) { + // Skip 1 character in the buffer. + ret += this.defaultCharUnicode; + var buf = this.prevBuf.slice(1); + + // Parse remaining as usual. + this.prevBuf = Buffer.alloc(0); + this.nodeIdx = 0; + if (buf.length > 0) + ret += this.write(buf); + } + + this.nodeIdx = 0; + return ret; +} + +// Binary search for GB18030. Returns largest i such that table[i] <= val. +function findIdx(table, val) { + if (table[0] > val) + return -1; + + var l = 0, r = table.length; + while (l < r-1) { // always table[l] <= val < table[r] + var mid = l + Math.floor((r-l+1)/2); + if (table[mid] <= val) + l = mid; + else + r = mid; + } + return l; +} + diff --git a/node_modules/iconv-lite/encodings/dbcs-data.js b/node_modules/iconv-lite/encodings/dbcs-data.js new file mode 100644 index 0000000..4b61914 --- /dev/null +++ b/node_modules/iconv-lite/encodings/dbcs-data.js @@ -0,0 +1,176 @@ +"use strict"; + +// Description of supported double byte encodings and aliases. +// Tables are not require()-d until they are needed to speed up library load. +// require()-s are direct to support Browserify. + +module.exports = { + + // == Japanese/ShiftJIS ==================================================== + // All japanese encodings are based on JIS X set of standards: + // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF. + // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. + // Has several variations in 1978, 1983, 1990 and 1997. + // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. + // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. + // 2 planes, first is superset of 0208, second - revised 0212. + // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) + + // Byte encodings are: + // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte + // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. + // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. + // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. + // 0x00-0x7F - lower part of 0201 + // 0x8E, 0xA1-0xDF - upper part of 0201 + // (0xA1-0xFE)x2 - 0208 plane (94x94). + // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). + // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. + // Used as-is in ISO2022 family. + // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, + // 0201-1976 Roman, 0208-1978, 0208-1983. + // * ISO2022-JP-1: Adds esc seq for 0212-1990. + // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. + // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. + // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. + // + // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. + // + // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html + + 'shiftjis': { + type: '_dbcs', + table: function() { return require('./tables/shiftjis.json') }, + encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, + encodeSkipVals: [{from: 0xED40, to: 0xF940}], + }, + 'csshiftjis': 'shiftjis', + 'mskanji': 'shiftjis', + 'sjis': 'shiftjis', + 'windows31j': 'shiftjis', + 'ms31j': 'shiftjis', + 'xsjis': 'shiftjis', + 'windows932': 'shiftjis', + 'ms932': 'shiftjis', + '932': 'shiftjis', + 'cp932': 'shiftjis', + + 'eucjp': { + type: '_dbcs', + table: function() { return require('./tables/eucjp.json') }, + encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, + }, + + // TODO: KDDI extension to Shift_JIS + // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. + // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. + + + // == Chinese/GBK ========================================================== + // http://en.wikipedia.org/wiki/GBK + // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder + + // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 + 'gb2312': 'cp936', + 'gb231280': 'cp936', + 'gb23121980': 'cp936', + 'csgb2312': 'cp936', + 'csiso58gb231280': 'cp936', + 'euccn': 'cp936', + + // Microsoft's CP936 is a subset and approximation of GBK. + 'windows936': 'cp936', + 'ms936': 'cp936', + '936': 'cp936', + 'cp936': { + type: '_dbcs', + table: function() { return require('./tables/cp936.json') }, + }, + + // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. + 'gbk': { + type: '_dbcs', + table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, + }, + 'xgbk': 'gbk', + 'isoir58': 'gbk', + + // GB18030 is an algorithmic extension of GBK. + // Main source: https://www.w3.org/TR/encoding/#gbk-encoder + // http://icu-project.org/docs/papers/gb18030.html + // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml + // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 + 'gb18030': { + type: '_dbcs', + table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, + gb18030: function() { return require('./tables/gb18030-ranges.json') }, + encodeSkipVals: [0x80], + encodeAdd: {'€': 0xA2E3}, + }, + + 'chinese': 'gb18030', + + + // == Korean =============================================================== + // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. + 'windows949': 'cp949', + 'ms949': 'cp949', + '949': 'cp949', + 'cp949': { + type: '_dbcs', + table: function() { return require('./tables/cp949.json') }, + }, + + 'cseuckr': 'cp949', + 'csksc56011987': 'cp949', + 'euckr': 'cp949', + 'isoir149': 'cp949', + 'korean': 'cp949', + 'ksc56011987': 'cp949', + 'ksc56011989': 'cp949', + 'ksc5601': 'cp949', + + + // == Big5/Taiwan/Hong Kong ================================================ + // There are lots of tables for Big5 and cp950. Please see the following links for history: + // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html + // Variations, in roughly number of defined chars: + // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT + // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ + // * Big5-2003 (Taiwan standard) almost superset of cp950. + // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. + // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. + // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. + // Plus, it has 4 combining sequences. + // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 + // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. + // Implementations are not consistent within browsers; sometimes labeled as just big5. + // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. + // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 + // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. + // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt + // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt + // + // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder + // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. + + 'windows950': 'cp950', + 'ms950': 'cp950', + '950': 'cp950', + 'cp950': { + type: '_dbcs', + table: function() { return require('./tables/cp950.json') }, + }, + + // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. + 'big5': 'big5hkscs', + 'big5hkscs': { + type: '_dbcs', + table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) }, + encodeSkipVals: [0xa2cc], + }, + + 'cnbig5': 'big5hkscs', + 'csbig5': 'big5hkscs', + 'xxbig5': 'big5hkscs', +}; diff --git a/node_modules/iconv-lite/encodings/index.js b/node_modules/iconv-lite/encodings/index.js new file mode 100644 index 0000000..e304003 --- /dev/null +++ b/node_modules/iconv-lite/encodings/index.js @@ -0,0 +1,22 @@ +"use strict"; + +// Update this array if you add/rename/remove files in this directory. +// We support Browserify by skipping automatic module discovery and requiring modules directly. +var modules = [ + require("./internal"), + require("./utf16"), + require("./utf7"), + require("./sbcs-codec"), + require("./sbcs-data"), + require("./sbcs-data-generated"), + require("./dbcs-codec"), + require("./dbcs-data"), +]; + +// Put all encoding/alias/codec definitions to single object and export it. +for (var i = 0; i < modules.length; i++) { + var module = modules[i]; + for (var enc in module) + if (Object.prototype.hasOwnProperty.call(module, enc)) + exports[enc] = module[enc]; +} diff --git a/node_modules/iconv-lite/encodings/internal.js b/node_modules/iconv-lite/encodings/internal.js new file mode 100644 index 0000000..05ce38b --- /dev/null +++ b/node_modules/iconv-lite/encodings/internal.js @@ -0,0 +1,188 @@ +"use strict"; +var Buffer = require("safer-buffer").Buffer; + +// Export Node.js internal encodings. + +module.exports = { + // Encodings + utf8: { type: "_internal", bomAware: true}, + cesu8: { type: "_internal", bomAware: true}, + unicode11utf8: "utf8", + + ucs2: { type: "_internal", bomAware: true}, + utf16le: "ucs2", + + binary: { type: "_internal" }, + base64: { type: "_internal" }, + hex: { type: "_internal" }, + + // Codec. + _internal: InternalCodec, +}; + +//------------------------------------------------------------------------------ + +function InternalCodec(codecOptions, iconv) { + this.enc = codecOptions.encodingName; + this.bomAware = codecOptions.bomAware; + + if (this.enc === "base64") + this.encoder = InternalEncoderBase64; + else if (this.enc === "cesu8") { + this.enc = "utf8"; // Use utf8 for decoding. + this.encoder = InternalEncoderCesu8; + + // Add decoder for versions of Node not supporting CESU-8 + if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') { + this.decoder = InternalDecoderCesu8; + this.defaultCharUnicode = iconv.defaultCharUnicode; + } + } +} + +InternalCodec.prototype.encoder = InternalEncoder; +InternalCodec.prototype.decoder = InternalDecoder; + +//------------------------------------------------------------------------------ + +// We use node.js internal decoder. Its signature is the same as ours. +var StringDecoder = require('string_decoder').StringDecoder; + +if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. + StringDecoder.prototype.end = function() {}; + + +function InternalDecoder(options, codec) { + StringDecoder.call(this, codec.enc); +} + +InternalDecoder.prototype = StringDecoder.prototype; + + +//------------------------------------------------------------------------------ +// Encoder is mostly trivial + +function InternalEncoder(options, codec) { + this.enc = codec.enc; +} + +InternalEncoder.prototype.write = function(str) { + return Buffer.from(str, this.enc); +} + +InternalEncoder.prototype.end = function() { +} + + +//------------------------------------------------------------------------------ +// Except base64 encoder, which must keep its state. + +function InternalEncoderBase64(options, codec) { + this.prevStr = ''; +} + +InternalEncoderBase64.prototype.write = function(str) { + str = this.prevStr + str; + var completeQuads = str.length - (str.length % 4); + this.prevStr = str.slice(completeQuads); + str = str.slice(0, completeQuads); + + return Buffer.from(str, "base64"); +} + +InternalEncoderBase64.prototype.end = function() { + return Buffer.from(this.prevStr, "base64"); +} + + +//------------------------------------------------------------------------------ +// CESU-8 encoder is also special. + +function InternalEncoderCesu8(options, codec) { +} + +InternalEncoderCesu8.prototype.write = function(str) { + var buf = Buffer.alloc(str.length * 3), bufIdx = 0; + for (var i = 0; i < str.length; i++) { + var charCode = str.charCodeAt(i); + // Naive implementation, but it works because CESU-8 is especially easy + // to convert from UTF-16 (which all JS strings are encoded in). + if (charCode < 0x80) + buf[bufIdx++] = charCode; + else if (charCode < 0x800) { + buf[bufIdx++] = 0xC0 + (charCode >>> 6); + buf[bufIdx++] = 0x80 + (charCode & 0x3f); + } + else { // charCode will always be < 0x10000 in javascript. + buf[bufIdx++] = 0xE0 + (charCode >>> 12); + buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f); + buf[bufIdx++] = 0x80 + (charCode & 0x3f); + } + } + return buf.slice(0, bufIdx); +} + +InternalEncoderCesu8.prototype.end = function() { +} + +//------------------------------------------------------------------------------ +// CESU-8 decoder is not implemented in Node v4.0+ + +function InternalDecoderCesu8(options, codec) { + this.acc = 0; + this.contBytes = 0; + this.accBytes = 0; + this.defaultCharUnicode = codec.defaultCharUnicode; +} + +InternalDecoderCesu8.prototype.write = function(buf) { + var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, + res = ''; + for (var i = 0; i < buf.length; i++) { + var curByte = buf[i]; + if ((curByte & 0xC0) !== 0x80) { // Leading byte + if (contBytes > 0) { // Previous code is invalid + res += this.defaultCharUnicode; + contBytes = 0; + } + + if (curByte < 0x80) { // Single-byte code + res += String.fromCharCode(curByte); + } else if (curByte < 0xE0) { // Two-byte code + acc = curByte & 0x1F; + contBytes = 1; accBytes = 1; + } else if (curByte < 0xF0) { // Three-byte code + acc = curByte & 0x0F; + contBytes = 2; accBytes = 1; + } else { // Four or more are not supported for CESU-8. + res += this.defaultCharUnicode; + } + } else { // Continuation byte + if (contBytes > 0) { // We're waiting for it. + acc = (acc << 6) | (curByte & 0x3f); + contBytes--; accBytes++; + if (contBytes === 0) { + // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80) + if (accBytes === 2 && acc < 0x80 && acc > 0) + res += this.defaultCharUnicode; + else if (accBytes === 3 && acc < 0x800) + res += this.defaultCharUnicode; + else + // Actually add character. + res += String.fromCharCode(acc); + } + } else { // Unexpected continuation byte + res += this.defaultCharUnicode; + } + } + } + this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes; + return res; +} + +InternalDecoderCesu8.prototype.end = function() { + var res = 0; + if (this.contBytes > 0) + res += this.defaultCharUnicode; + return res; +} diff --git a/node_modules/iconv-lite/encodings/sbcs-codec.js b/node_modules/iconv-lite/encodings/sbcs-codec.js new file mode 100644 index 0000000..abac5ff --- /dev/null +++ b/node_modules/iconv-lite/encodings/sbcs-codec.js @@ -0,0 +1,72 @@ +"use strict"; +var Buffer = require("safer-buffer").Buffer; + +// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that +// correspond to encoded bytes (if 128 - then lower half is ASCII). + +exports._sbcs = SBCSCodec; +function SBCSCodec(codecOptions, iconv) { + if (!codecOptions) + throw new Error("SBCS codec is called without the data.") + + // Prepare char buffer for decoding. + if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) + throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)"); + + if (codecOptions.chars.length === 128) { + var asciiString = ""; + for (var i = 0; i < 128; i++) + asciiString += String.fromCharCode(i); + codecOptions.chars = asciiString + codecOptions.chars; + } + + this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2'); + + // Encoding buffer. + var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)); + + for (var i = 0; i < codecOptions.chars.length; i++) + encodeBuf[codecOptions.chars.charCodeAt(i)] = i; + + this.encodeBuf = encodeBuf; +} + +SBCSCodec.prototype.encoder = SBCSEncoder; +SBCSCodec.prototype.decoder = SBCSDecoder; + + +function SBCSEncoder(options, codec) { + this.encodeBuf = codec.encodeBuf; +} + +SBCSEncoder.prototype.write = function(str) { + var buf = Buffer.alloc(str.length); + for (var i = 0; i < str.length; i++) + buf[i] = this.encodeBuf[str.charCodeAt(i)]; + + return buf; +} + +SBCSEncoder.prototype.end = function() { +} + + +function SBCSDecoder(options, codec) { + this.decodeBuf = codec.decodeBuf; +} + +SBCSDecoder.prototype.write = function(buf) { + // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. + var decodeBuf = this.decodeBuf; + var newBuf = Buffer.alloc(buf.length*2); + var idx1 = 0, idx2 = 0; + for (var i = 0; i < buf.length; i++) { + idx1 = buf[i]*2; idx2 = i*2; + newBuf[idx2] = decodeBuf[idx1]; + newBuf[idx2+1] = decodeBuf[idx1+1]; + } + return newBuf.toString('ucs2'); +} + +SBCSDecoder.prototype.end = function() { +} diff --git a/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/node_modules/iconv-lite/encodings/sbcs-data-generated.js new file mode 100644 index 0000000..9b48236 --- /dev/null +++ b/node_modules/iconv-lite/encodings/sbcs-data-generated.js @@ -0,0 +1,451 @@ +"use strict"; + +// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script. +module.exports = { + "437": "cp437", + "737": "cp737", + "775": "cp775", + "850": "cp850", + "852": "cp852", + "855": "cp855", + "856": "cp856", + "857": "cp857", + "858": "cp858", + "860": "cp860", + "861": "cp861", + "862": "cp862", + "863": "cp863", + "864": "cp864", + "865": "cp865", + "866": "cp866", + "869": "cp869", + "874": "windows874", + "922": "cp922", + "1046": "cp1046", + "1124": "cp1124", + "1125": "cp1125", + "1129": "cp1129", + "1133": "cp1133", + "1161": "cp1161", + "1162": "cp1162", + "1163": "cp1163", + "1250": "windows1250", + "1251": "windows1251", + "1252": "windows1252", + "1253": "windows1253", + "1254": "windows1254", + "1255": "windows1255", + "1256": "windows1256", + "1257": "windows1257", + "1258": "windows1258", + "28591": "iso88591", + "28592": "iso88592", + "28593": "iso88593", + "28594": "iso88594", + "28595": "iso88595", + "28596": "iso88596", + "28597": "iso88597", + "28598": "iso88598", + "28599": "iso88599", + "28600": "iso885910", + "28601": "iso885911", + "28603": "iso885913", + "28604": "iso885914", + "28605": "iso885915", + "28606": "iso885916", + "windows874": { + "type": "_sbcs", + "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + }, + "win874": "windows874", + "cp874": "windows874", + "windows1250": { + "type": "_sbcs", + "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" + }, + "win1250": "windows1250", + "cp1250": "windows1250", + "windows1251": { + "type": "_sbcs", + "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" + }, + "win1251": "windows1251", + "cp1251": "windows1251", + "windows1252": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "win1252": "windows1252", + "cp1252": "windows1252", + "windows1253": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" + }, + "win1253": "windows1253", + "cp1253": "windows1253", + "windows1254": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" + }, + "win1254": "windows1254", + "cp1254": "windows1254", + "windows1255": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" + }, + "win1255": "windows1255", + "cp1255": "windows1255", + "windows1256": { + "type": "_sbcs", + "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے" + }, + "win1256": "windows1256", + "cp1256": "windows1256", + "windows1257": { + "type": "_sbcs", + "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙" + }, + "win1257": "windows1257", + "cp1257": "windows1257", + "windows1258": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" + }, + "win1258": "windows1258", + "cp1258": "windows1258", + "iso88591": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "cp28591": "iso88591", + "iso88592": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" + }, + "cp28592": "iso88592", + "iso88593": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�ݰħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙" + }, + "cp28593": "iso88593", + "iso88594": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤Ĩϧ¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩšēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖרŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙" + }, + "cp28594": "iso88594", + "iso88595": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ" + }, + "cp28595": "iso88595", + "iso88596": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������" + }, + "cp28596": "iso88596", + "iso88597": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" + }, + "cp28597": "iso88597", + "iso88598": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" + }, + "cp28598": "iso88598", + "iso88599": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" + }, + "cp28599": "iso88599", + "iso885910": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨͧĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ" + }, + "cp28600": "iso885910", + "iso885911": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + }, + "cp28601": "iso885911", + "iso885913": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’" + }, + "cp28603": "iso885913", + "iso885914": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ" + }, + "cp28604": "iso885914", + "iso885915": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "cp28605": "iso885915", + "iso885916": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Чš©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ" + }, + "cp28606": "iso885916", + "cp437": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm437": "cp437", + "csibm437": "cp437", + "cp737": { + "type": "_sbcs", + "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ " + }, + "ibm737": "cp737", + "csibm737": "cp737", + "cp775": { + "type": "_sbcs", + "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£Ø×¤ĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ " + }, + "ibm775": "cp775", + "csibm775": "cp775", + "cp850": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " + }, + "ibm850": "cp850", + "csibm850": "cp850", + "cp852": { + "type": "_sbcs", + "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ " + }, + "ibm852": "cp852", + "csibm852": "cp852", + "cp855": { + "type": "_sbcs", + "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ " + }, + "ibm855": "cp855", + "csibm855": "cp855", + "cp856": { + "type": "_sbcs", + "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ " + }, + "ibm856": "cp856", + "csibm856": "cp856", + "cp857": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ " + }, + "ibm857": "cp857", + "csibm857": "cp857", + "cp858": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " + }, + "ibm858": "cp858", + "csibm858": "cp858", + "cp860": { + "type": "_sbcs", + "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm860": "cp860", + "csibm860": "cp860", + "cp861": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm861": "cp861", + "csibm861": "cp861", + "cp862": { + "type": "_sbcs", + "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm862": "cp862", + "csibm862": "cp862", + "cp863": { + "type": "_sbcs", + "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm863": "cp863", + "csibm863": "cp863", + "cp864": { + "type": "_sbcs", + "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�" + }, + "ibm864": "cp864", + "csibm864": "cp864", + "cp865": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm865": "cp865", + "csibm865": "cp865", + "cp866": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ " + }, + "ibm866": "cp866", + "csibm866": "cp866", + "cp869": { + "type": "_sbcs", + "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ " + }, + "ibm869": "cp869", + "csibm869": "cp869", + "cp922": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖרÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ" + }, + "ibm922": "cp922", + "csibm922": "cp922", + "cp1046": { + "type": "_sbcs", + "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�" + }, + "ibm1046": "cp1046", + "csibm1046": "cp1046", + "cp1124": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ" + }, + "ibm1124": "cp1124", + "csibm1124": "cp1124", + "cp1125": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ " + }, + "ibm1125": "cp1125", + "csibm1125": "cp1125", + "cp1129": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" + }, + "ibm1129": "cp1129", + "csibm1129": "cp1129", + "cp1133": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�" + }, + "ibm1133": "cp1133", + "csibm1133": "cp1133", + "cp1161": { + "type": "_sbcs", + "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ " + }, + "ibm1161": "cp1161", + "csibm1161": "cp1161", + "cp1162": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + }, + "ibm1162": "cp1162", + "csibm1162": "cp1162", + "cp1163": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" + }, + "ibm1163": "cp1163", + "csibm1163": "cp1163", + "maccroatian": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ" + }, + "maccyrillic": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" + }, + "macgreek": { + "type": "_sbcs", + "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�" + }, + "maciceland": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macroman": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macromania": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macthai": { + "type": "_sbcs", + "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����" + }, + "macturkish": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macukraine": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" + }, + "koi8r": { + "type": "_sbcs", + "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "koi8u": { + "type": "_sbcs", + "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "koi8ru": { + "type": "_sbcs", + "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "koi8t": { + "type": "_sbcs", + "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "armscii8": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�" + }, + "rk1048": { + "type": "_sbcs", + "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" + }, + "tcvn": { + "type": "_sbcs", + "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ" + }, + "georgianacademy": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "georgianps": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "pt154": { + "type": "_sbcs", + "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" + }, + "viscii": { + "type": "_sbcs", + "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ" + }, + "iso646cn": { + "type": "_sbcs", + "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" + }, + "iso646jp": { + "type": "_sbcs", + "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" + }, + "hproman8": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�" + }, + "macintosh": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "ascii": { + "type": "_sbcs", + "chars": "��������������������������������������������������������������������������������������������������������������������������������" + }, + "tis620": { + "type": "_sbcs", + "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + } +} \ No newline at end of file diff --git a/node_modules/iconv-lite/encodings/sbcs-data.js b/node_modules/iconv-lite/encodings/sbcs-data.js new file mode 100644 index 0000000..fdb81a3 --- /dev/null +++ b/node_modules/iconv-lite/encodings/sbcs-data.js @@ -0,0 +1,174 @@ +"use strict"; + +// Manually added data to be used by sbcs codec in addition to generated one. + +module.exports = { + // Not supported by iconv, not sure why. + "10029": "maccenteuro", + "maccenteuro": { + "type": "_sbcs", + "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ" + }, + + "808": "cp808", + "ibm808": "cp808", + "cp808": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ " + }, + + "mik": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + + // Aliases of generated encodings. + "ascii8bit": "ascii", + "usascii": "ascii", + "ansix34": "ascii", + "ansix341968": "ascii", + "ansix341986": "ascii", + "csascii": "ascii", + "cp367": "ascii", + "ibm367": "ascii", + "isoir6": "ascii", + "iso646us": "ascii", + "iso646irv": "ascii", + "us": "ascii", + + "latin1": "iso88591", + "latin2": "iso88592", + "latin3": "iso88593", + "latin4": "iso88594", + "latin5": "iso88599", + "latin6": "iso885910", + "latin7": "iso885913", + "latin8": "iso885914", + "latin9": "iso885915", + "latin10": "iso885916", + + "csisolatin1": "iso88591", + "csisolatin2": "iso88592", + "csisolatin3": "iso88593", + "csisolatin4": "iso88594", + "csisolatincyrillic": "iso88595", + "csisolatinarabic": "iso88596", + "csisolatingreek" : "iso88597", + "csisolatinhebrew": "iso88598", + "csisolatin5": "iso88599", + "csisolatin6": "iso885910", + + "l1": "iso88591", + "l2": "iso88592", + "l3": "iso88593", + "l4": "iso88594", + "l5": "iso88599", + "l6": "iso885910", + "l7": "iso885913", + "l8": "iso885914", + "l9": "iso885915", + "l10": "iso885916", + + "isoir14": "iso646jp", + "isoir57": "iso646cn", + "isoir100": "iso88591", + "isoir101": "iso88592", + "isoir109": "iso88593", + "isoir110": "iso88594", + "isoir144": "iso88595", + "isoir127": "iso88596", + "isoir126": "iso88597", + "isoir138": "iso88598", + "isoir148": "iso88599", + "isoir157": "iso885910", + "isoir166": "tis620", + "isoir179": "iso885913", + "isoir199": "iso885914", + "isoir203": "iso885915", + "isoir226": "iso885916", + + "cp819": "iso88591", + "ibm819": "iso88591", + + "cyrillic": "iso88595", + + "arabic": "iso88596", + "arabic8": "iso88596", + "ecma114": "iso88596", + "asmo708": "iso88596", + + "greek" : "iso88597", + "greek8" : "iso88597", + "ecma118" : "iso88597", + "elot928" : "iso88597", + + "hebrew": "iso88598", + "hebrew8": "iso88598", + + "turkish": "iso88599", + "turkish8": "iso88599", + + "thai": "iso885911", + "thai8": "iso885911", + + "celtic": "iso885914", + "celtic8": "iso885914", + "isoceltic": "iso885914", + + "tis6200": "tis620", + "tis62025291": "tis620", + "tis62025330": "tis620", + + "10000": "macroman", + "10006": "macgreek", + "10007": "maccyrillic", + "10079": "maciceland", + "10081": "macturkish", + + "cspc8codepage437": "cp437", + "cspc775baltic": "cp775", + "cspc850multilingual": "cp850", + "cspcp852": "cp852", + "cspc862latinhebrew": "cp862", + "cpgr": "cp869", + + "msee": "cp1250", + "mscyrl": "cp1251", + "msansi": "cp1252", + "msgreek": "cp1253", + "msturk": "cp1254", + "mshebr": "cp1255", + "msarab": "cp1256", + "winbaltrim": "cp1257", + + "cp20866": "koi8r", + "20866": "koi8r", + "ibm878": "koi8r", + "cskoi8r": "koi8r", + + "cp21866": "koi8u", + "21866": "koi8u", + "ibm1168": "koi8u", + + "strk10482002": "rk1048", + + "tcvn5712": "tcvn", + "tcvn57121": "tcvn", + + "gb198880": "iso646cn", + "cn": "iso646cn", + + "csiso14jisc6220ro": "iso646jp", + "jisc62201969ro": "iso646jp", + "jp": "iso646jp", + + "cshproman8": "hproman8", + "r8": "hproman8", + "roman8": "hproman8", + "xroman8": "hproman8", + "ibm1051": "hproman8", + + "mac": "macintosh", + "csmacintosh": "macintosh", +}; + diff --git a/node_modules/iconv-lite/encodings/tables/big5-added.json b/node_modules/iconv-lite/encodings/tables/big5-added.json new file mode 100644 index 0000000..3c3d3c2 --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/big5-added.json @@ -0,0 +1,122 @@ +[ +["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"], +["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"], +["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"], +["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"], +["88a1","ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛"], +["8940","𪎩𡅅"], +["8943","攊"], +["8946","丽滝鵎釟"], +["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"], +["89a1","琑糼緍楆竉刧"], +["89ab","醌碸酞肼"], +["89b0","贋胶𠧧"], +["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"], +["89c1","溚舾甙"], +["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"], +["8a40","𧶄唥"], +["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"], +["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"], +["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"], +["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"], +["8aac","䠋𠆩㿺塳𢶍"], +["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"], +["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"], +["8ac9","𪘁𠸉𢫏𢳉"], +["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"], +["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"], +["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"], +["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"], +["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"], +["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"], +["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"], +["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"], +["8ca1","𣏹椙橃𣱣泿"], +["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"], +["8cc9","顨杫䉶圽"], +["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"], +["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"], +["8d40","𠮟"], +["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"], +["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"], +["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"], +["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"], +["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"], +["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"], +["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"], +["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"], +["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"], +["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"], +["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"], +["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"], +["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"], +["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"], +["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"], +["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"], +["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"], +["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"], +["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"], +["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"], +["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"], +["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"], +["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"], +["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"], +["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"], +["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"], +["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"], +["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"], +["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"], +["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"], +["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"], +["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"], +["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"], +["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"], +["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"], +["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"], +["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"], +["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"], +["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"], +["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"], +["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"], +["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"], +["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"], +["9fae","酙隁酜"], +["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"], +["9fc1","𤤙盖鮝个𠳔莾衂"], +["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"], +["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"], +["9fe7","毺蠘罸"], +["9feb","嘠𪙊蹷齓"], +["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"], +["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"], +["a055","𡠻𦸅"], +["a058","詾𢔛"], +["a05b","惽癧髗鵄鍮鮏蟵"], +["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"], +["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"], +["a0a1","嵗𨯂迚𨸹"], +["a0a6","僙𡵆礆匲阸𠼻䁥"], +["a0ae","矾"], +["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"], +["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"], +["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"], +["a3c0","␀",31,"␡"], +["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23], +["c740","す",58,"ァアィイ"], +["c7a1","ゥ",81,"А",5,"ЁЖ",4], +["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"], +["c8a1","龰冈龱𧘇"], +["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"], +["c8f5","ʃɐɛɔɵœøŋʊɪ"], +["f9fe","■"], +["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"], +["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"], +["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"], +["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"], +["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"], +["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"], +["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"], +["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"], +["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"], +["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"] +] diff --git a/node_modules/iconv-lite/encodings/tables/cp936.json b/node_modules/iconv-lite/encodings/tables/cp936.json new file mode 100644 index 0000000..49ddb9a --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/cp936.json @@ -0,0 +1,264 @@ +[ +["0","\u0000",127,"€"], +["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"], +["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"], +["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11], +["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"], +["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"], +["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5], +["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"], +["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"], +["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"], +["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"], +["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"], +["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"], +["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4], +["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6], +["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"], +["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7], +["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"], +["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"], +["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"], +["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5], +["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"], +["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6], +["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"], +["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4], +["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4], +["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"], +["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"], +["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6], +["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"], +["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"], +["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"], +["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6], +["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"], +["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"], +["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"], +["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"], +["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"], +["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"], +["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8], +["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"], +["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"], +["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"], +["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"], +["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5], +["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"], +["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"], +["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"], +["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"], +["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5], +["9980","檧檨檪檭",114,"欥欦欨",6], +["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"], +["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"], +["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"], +["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"], +["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"], +["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5], +["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"], +["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"], +["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6], +["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"], +["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"], +["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4], +["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19], +["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"], +["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"], +["a2a1","ⅰ",9], +["a2b1","⒈",19,"⑴",19,"①",9], +["a2e5","㈠",9], +["a2f1","Ⅰ",11], +["a3a1","!"#¥%",88," ̄"], +["a4a1","ぁ",82], +["a5a1","ァ",85], +["a6a1","Α",16,"Σ",6], +["a6c1","α",16,"σ",6], +["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"], +["a6ee","︻︼︷︸︱"], +["a6f4","︳︴"], +["a7a1","А",5,"ЁЖ",25], +["a7d1","а",5,"ёж",25], +["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6], +["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"], +["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"], +["a8bd","ńň"], +["a8c0","ɡ"], +["a8c5","ㄅ",36], +["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"], +["a959","℡㈱"], +["a95c","‐"], +["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8], +["a980","﹢",4,"﹨﹩﹪﹫"], +["a996","〇"], +["a9a4","─",75], +["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8], +["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"], +["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4], +["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4], +["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11], +["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"], +["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12], +["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"], +["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"], +["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"], +["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"], +["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"], +["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"], +["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"], +["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"], +["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"], +["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4], +["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"], +["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"], +["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"], +["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9], +["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"], +["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"], +["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"], +["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"], +["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"], +["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16], +["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"], +["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"], +["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"], +["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"], +["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"], +["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"], +["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"], +["bb40","籃",9,"籎",36,"籵",5,"籾",9], +["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"], +["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5], +["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"], +["bd40","紷",54,"絯",7], +["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"], +["be40","継",12,"綧",6,"綯",42], +["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"], +["bf40","緻",62], +["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"], +["c040","繞",35,"纃",23,"纜纝纞"], +["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"], +["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"], +["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"], +["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"], +["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"], +["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"], +["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"], +["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"], +["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"], +["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"], +["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"], +["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"], +["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"], +["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"], +["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"], +["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"], +["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"], +["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"], +["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"], +["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10], +["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"], +["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"], +["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"], +["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"], +["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"], +["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"], +["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"], +["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"], +["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"], +["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9], +["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"], +["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"], +["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"], +["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5], +["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"], +["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"], +["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"], +["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6], +["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"], +["d440","訞",31,"訿",8,"詉",21], +["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"], +["d540","誁",7,"誋",7,"誔",46], +["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"], +["d640","諤",34,"謈",27], +["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"], +["d740","譆",31,"譧",4,"譭",25], +["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"], +["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"], +["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"], +["d940","貮",62], +["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"], +["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"], +["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"], +["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"], +["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"], +["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7], +["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"], +["dd40","軥",62], +["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"], +["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"], +["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"], +["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"], +["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"], +["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"], +["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"], +["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"], +["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"], +["e240","釦",62], +["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"], +["e340","鉆",45,"鉵",16], +["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"], +["e440","銨",5,"銯",24,"鋉",31], +["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"], +["e540","錊",51,"錿",10], +["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"], +["e640","鍬",34,"鎐",27], +["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"], +["e740","鏎",7,"鏗",54], +["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"], +["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"], +["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"], +["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42], +["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"], +["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"], +["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"], +["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"], +["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"], +["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7], +["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"], +["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46], +["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"], +["ee40","頏",62], +["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"], +["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4], +["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"], +["f040","餈",4,"餎餏餑",28,"餯",26], +["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"], +["f140","馌馎馚",10,"馦馧馩",47], +["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"], +["f240","駺",62], +["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"], +["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"], +["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"], +["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5], +["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"], +["f540","魼",62], +["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"], +["f640","鯜",62], +["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"], +["f740","鰼",62], +["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"], +["f840","鳣",62], +["f880","鴢",32], +["f940","鵃",62], +["f980","鶂",32], +["fa40","鶣",62], +["fa80","鷢",32], +["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"], +["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"], +["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6], +["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"], +["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38], +["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"], +["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"] +] diff --git a/node_modules/iconv-lite/encodings/tables/cp949.json b/node_modules/iconv-lite/encodings/tables/cp949.json new file mode 100644 index 0000000..2022a00 --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/cp949.json @@ -0,0 +1,273 @@ +[ +["0","\u0000",127], +["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"], +["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"], +["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"], +["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5], +["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"], +["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18], +["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7], +["8361","긝",18,"긲긳긵긶긹긻긼"], +["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8], +["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8], +["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18], +["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"], +["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4], +["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"], +["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"], +["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"], +["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10], +["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"], +["8741","놞",9,"놩",15], +["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"], +["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4], +["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4], +["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"], +["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"], +["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"], +["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"], +["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15], +["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"], +["8a61","둧",4,"둭",18,"뒁뒂"], +["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"], +["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"], +["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8], +["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18], +["8c41","똀",15,"똒똓똕똖똗똙",4], +["8c61","똞",6,"똦",5,"똭",6,"똵",5], +["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16], +["8d41","뛃",16,"뛕",8], +["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"], +["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"], +["8e41","랟랡",6,"랪랮",5,"랶랷랹",8], +["8e61","럂",4,"럈럊",19], +["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7], +["8f41","뢅",7,"뢎",17], +["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4], +["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5], +["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"], +["9061","륾",5,"릆릈릋릌릏",15], +["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"], +["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5], +["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5], +["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6], +["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"], +["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4], +["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"], +["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"], +["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8], +["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"], +["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8], +["9461","봞",5,"봥",6,"봭",12], +["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24], +["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"], +["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"], +["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14], +["9641","뺸",23,"뻒뻓"], +["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8], +["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44], +["9741","뾃",16,"뾕",8], +["9761","뾞",17,"뾱",7], +["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"], +["9841","쁀",16,"쁒",5,"쁙쁚쁛"], +["9861","쁝쁞쁟쁡",6,"쁪",15], +["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"], +["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"], +["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"], +["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"], +["9a41","숤숥숦숧숪숬숮숰숳숵",16], +["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"], +["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"], +["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8], +["9b61","쌳",17,"썆",7], +["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"], +["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5], +["9c61","쏿",8,"쐉",6,"쐑",9], +["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12], +["9d41","쒪",13,"쒹쒺쒻쒽",8], +["9d61","쓆",25], +["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"], +["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"], +["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"], +["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"], +["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"], +["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"], +["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"], +["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"], +["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13], +["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"], +["a141","좥좦좧좩",18,"좾좿죀죁"], +["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"], +["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃­―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"], +["a241","줐줒",5,"줙",18], +["a261","줭",6,"줵",18], +["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"], +["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"], +["a361","즑",6,"즚즜즞",16], +["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"], +["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"], +["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12], +["a481","쨦쨧쨨쨪",28,"ㄱ",93], +["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"], +["a561","쩫",17,"쩾",5,"쪅쪆"], +["a581","쪇",16,"쪙",14,"ⅰ",9], +["a5b0","Ⅰ",9], +["a5c1","Α",16,"Σ",6], +["a5e1","α",16,"σ",6], +["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"], +["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6], +["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7], +["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7], +["a761","쬪",22,"쭂쭃쭄"], +["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"], +["a841","쭭",10,"쭺",14], +["a861","쮉",18,"쮝",6], +["a881","쮤",19,"쮹",11,"ÆÐªĦ"], +["a8a6","IJ"], +["a8a8","ĿŁØŒºÞŦŊ"], +["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"], +["a941","쯅",14,"쯕",10], +["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18], +["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"], +["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"], +["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"], +["aa81","챳챴챶",29,"ぁ",82], +["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"], +["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5], +["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85], +["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"], +["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4], +["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25], +["acd1","а",5,"ёж",25], +["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7], +["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"], +["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"], +["ae41","췆",5,"췍췎췏췑",16], +["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4], +["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"], +["af41","츬츭츮츯츲츴츶",19], +["af61","칊",13,"칚칛칝칞칢",5,"칪칬"], +["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"], +["b041","캚",5,"캢캦",5,"캮",12], +["b061","캻",5,"컂",19], +["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"], +["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"], +["b161","켥",6,"켮켲",5,"켹",11], +["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"], +["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"], +["b261","쾎",18,"쾢",5,"쾩"], +["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"], +["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"], +["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5], +["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"], +["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5], +["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"], +["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"], +["b541","킕",14,"킦킧킩킪킫킭",5], +["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4], +["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"], +["b641","턅",7,"턎",17], +["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"], +["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"], +["b741","텮",13,"텽",6,"톅톆톇톉톊"], +["b761","톋",20,"톢톣톥톦톧"], +["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"], +["b841","퇐",7,"퇙",17], +["b861","퇫",8,"퇵퇶퇷퇹",13], +["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"], +["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"], +["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"], +["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"], +["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"], +["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5], +["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"], +["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"], +["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"], +["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"], +["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"], +["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"], +["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"], +["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"], +["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13], +["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"], +["be41","퐸",7,"푁푂푃푅",14], +["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"], +["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"], +["bf41","풞",10,"풪",14], +["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"], +["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"], +["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5], +["c061","픞",25], +["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"], +["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"], +["c161","햌햍햎햏햑",19,"햦햧"], +["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"], +["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"], +["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"], +["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"], +["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4], +["c361","홢",4,"홨홪",5,"홲홳홵",11], +["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"], +["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"], +["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4], +["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"], +["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"], +["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4], +["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"], +["c641","힍힎힏힑",6,"힚힜힞",5], +["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"], +["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"], +["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"], +["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"], +["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"], +["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"], +["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"], +["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"], +["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"], +["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"], +["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"], +["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"], +["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"], +["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"], +["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"], +["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"], +["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"], +["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"], +["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"], +["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"], +["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"], +["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"], +["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"], +["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"], +["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"], +["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"], +["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"], +["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"], +["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"], +["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"], +["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"], +["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"], +["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"], +["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"], +["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"], +["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"], +["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"], +["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"], +["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"], +["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"], +["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"], +["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"], +["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"], +["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"], +["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"], +["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"], +["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"], +["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"], +["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"], +["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"], +["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"], +["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"], +["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"], +["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"], +["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"] +] diff --git a/node_modules/iconv-lite/encodings/tables/cp950.json b/node_modules/iconv-lite/encodings/tables/cp950.json new file mode 100644 index 0000000..d8bc871 --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/cp950.json @@ -0,0 +1,177 @@ +[ +["0","\u0000",127], +["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"], +["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"], +["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"], +["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21], +["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10], +["a3a1","ㄐ",25,"˙ˉˊˇˋ"], +["a3e1","€"], +["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"], +["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"], +["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"], +["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"], +["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"], +["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"], +["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"], +["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"], +["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"], +["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"], +["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"], +["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"], +["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"], +["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"], +["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"], +["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"], +["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"], +["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"], +["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"], +["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"], +["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"], +["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"], +["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"], +["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"], +["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"], +["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"], +["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"], +["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"], +["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"], +["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"], +["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"], +["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"], +["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"], +["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"], +["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"], +["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"], +["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"], +["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"], +["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"], +["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"], +["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"], +["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"], +["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"], +["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"], +["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"], +["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"], +["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"], +["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"], +["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"], +["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"], +["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"], +["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"], +["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"], +["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"], +["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"], +["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"], +["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"], +["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"], +["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"], +["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"], +["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"], +["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"], +["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"], +["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"], +["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"], +["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"], +["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"], +["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"], +["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"], +["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"], +["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"], +["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"], +["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"], +["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"], +["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"], +["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"], +["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"], +["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"], +["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"], +["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"], +["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"], +["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"], +["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"], +["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"], +["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"], +["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"], +["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"], +["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"], +["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"], +["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"], +["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"], +["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"], +["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"], +["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"], +["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"], +["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"], +["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"], +["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"], +["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"], +["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"], +["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"], +["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"], +["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"], +["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"], +["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"], +["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"], +["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"], +["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"], +["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"], +["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"], +["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"], +["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"], +["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"], +["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"], +["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"], +["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"], +["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"], +["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"], +["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"], +["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"], +["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"], +["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"], +["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"], +["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"], +["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"], +["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"], +["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"], +["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"], +["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"], +["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"], +["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"], +["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"], +["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"], +["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"], +["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"], +["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"], +["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"], +["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"], +["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"], +["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"], +["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"], +["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"], +["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"], +["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"], +["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"], +["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"], +["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"], +["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"], +["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"], +["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"], +["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"], +["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"], +["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"], +["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"], +["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"], +["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"], +["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"], +["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"], +["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"], +["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"], +["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"], +["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"], +["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"], +["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"], +["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"], +["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"], +["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"] +] diff --git a/node_modules/iconv-lite/encodings/tables/eucjp.json b/node_modules/iconv-lite/encodings/tables/eucjp.json new file mode 100644 index 0000000..4fa61ca --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/eucjp.json @@ -0,0 +1,182 @@ +[ +["0","\u0000",127], +["8ea1","。",62], +["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"], +["a2a1","◆□■△▲▽▼※〒→←↑↓〓"], +["a2ba","∈∋⊆⊇⊂⊃∪∩"], +["a2ca","∧∨¬⇒⇔∀∃"], +["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], +["a2f2","ʼn♯♭♪†‡¶"], +["a2fe","◯"], +["a3b0","0",9], +["a3c1","A",25], +["a3e1","a",25], +["a4a1","ぁ",82], +["a5a1","ァ",85], +["a6a1","Α",16,"Σ",6], +["a6c1","α",16,"σ",6], +["a7a1","А",5,"ЁЖ",25], +["a7d1","а",5,"ёж",25], +["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], +["ada1","①",19,"Ⅰ",9], +["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], +["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], +["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], +["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"], +["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], +["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"], +["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], +["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"], +["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], +["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"], +["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], +["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"], +["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], +["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"], +["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], +["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"], +["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], +["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"], +["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], +["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"], +["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], +["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"], +["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], +["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"], +["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], +["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"], +["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], +["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"], +["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], +["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"], +["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], +["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"], +["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], +["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], +["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], +["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"], +["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], +["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"], +["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], +["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"], +["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], +["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"], +["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], +["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"], +["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], +["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"], +["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], +["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"], +["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], +["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"], +["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], +["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"], +["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], +["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"], +["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], +["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"], +["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], +["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"], +["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], +["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"], +["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], +["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"], +["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], +["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"], +["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], +["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"], +["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], +["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"], +["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], +["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"], +["f4a1","堯槇遙瑤凜熙"], +["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"], +["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], +["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"], +["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], +["fcf1","ⅰ",9,"¬¦'""], +["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"], +["8fa2c2","¡¦¿"], +["8fa2eb","ºª©®™¤№"], +["8fa6e1","ΆΈΉΊΪ"], +["8fa6e7","Ό"], +["8fa6e9","ΎΫ"], +["8fa6ec","Ώ"], +["8fa6f1","άέήίϊΐόςύϋΰώ"], +["8fa7c2","Ђ",10,"ЎЏ"], +["8fa7f2","ђ",10,"ўџ"], +["8fa9a1","ÆĐ"], +["8fa9a4","Ħ"], +["8fa9a6","IJ"], +["8fa9a8","ŁĿ"], +["8fa9ab","ŊØŒ"], +["8fa9af","ŦÞ"], +["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"], +["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"], +["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"], +["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"], +["8fabbd","ġĥíìïîǐ"], +["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"], +["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"], +["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"], +["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"], +["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"], +["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"], +["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"], +["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"], +["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"], +["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"], +["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"], +["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"], +["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"], +["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"], +["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"], +["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"], +["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"], +["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"], +["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"], +["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"], +["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"], +["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"], +["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"], +["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"], +["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"], +["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"], +["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"], +["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"], +["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"], +["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"], +["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"], +["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"], +["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"], +["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"], +["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"], +["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5], +["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"], +["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"], +["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"], +["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"], +["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"], +["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"], +["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"], +["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"], +["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"], +["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"], +["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"], +["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"], +["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"], +["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"], +["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"], +["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"], +["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"], +["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"], +["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"], +["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"], +["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"], +["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"], +["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4], +["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"], +["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"], +["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"], +["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"] +] diff --git a/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json new file mode 100644 index 0000000..85c6934 --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json @@ -0,0 +1 @@ +{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]} \ No newline at end of file diff --git a/node_modules/iconv-lite/encodings/tables/gbk-added.json b/node_modules/iconv-lite/encodings/tables/gbk-added.json new file mode 100644 index 0000000..8abfa9f --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/gbk-added.json @@ -0,0 +1,55 @@ +[ +["a140","",62], +["a180","",32], +["a240","",62], +["a280","",32], +["a2ab","",5], +["a2e3","€"], +["a2ef",""], +["a2fd",""], +["a340","",62], +["a380","",31," "], +["a440","",62], +["a480","",32], +["a4f4","",10], +["a540","",62], +["a580","",32], +["a5f7","",7], +["a640","",62], +["a680","",32], +["a6b9","",7], +["a6d9","",6], +["a6ec",""], +["a6f3",""], +["a6f6","",8], +["a740","",62], +["a780","",32], +["a7c2","",14], +["a7f2","",12], +["a896","",10], +["a8bc",""], +["a8bf","ǹ"], +["a8c1",""], +["a8ea","",20], +["a958",""], +["a95b",""], +["a95d",""], +["a989","〾⿰",11], +["a997","",12], +["a9f0","",14], +["aaa1","",93], +["aba1","",93], +["aca1","",93], +["ada1","",93], +["aea1","",93], +["afa1","",93], +["d7fa","",4], +["f8a1","",93], +["f9a1","",93], +["faa1","",93], +["fba1","",93], +["fca1","",93], +["fda1","",93], +["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"], +["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93] +] diff --git a/node_modules/iconv-lite/encodings/tables/shiftjis.json b/node_modules/iconv-lite/encodings/tables/shiftjis.json new file mode 100644 index 0000000..5a3a43c --- /dev/null +++ b/node_modules/iconv-lite/encodings/tables/shiftjis.json @@ -0,0 +1,125 @@ +[ +["0","\u0000",128], +["a1","。",62], +["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"], +["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"], +["81b8","∈∋⊆⊇⊂⊃∪∩"], +["81c8","∧∨¬⇒⇔∀∃"], +["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], +["81f0","ʼn♯♭♪†‡¶"], +["81fc","◯"], +["824f","0",9], +["8260","A",25], +["8281","a",25], +["829f","ぁ",82], +["8340","ァ",62], +["8380","ム",22], +["839f","Α",16,"Σ",6], +["83bf","α",16,"σ",6], +["8440","А",5,"ЁЖ",25], +["8470","а",5,"ёж",7], +["8480","о",17], +["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], +["8740","①",19,"Ⅰ",9], +["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], +["877e","㍻"], +["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], +["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], +["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"], +["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], +["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"], +["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], +["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"], +["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], +["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"], +["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], +["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"], +["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], +["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"], +["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], +["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"], +["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], +["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"], +["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], +["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"], +["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], +["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"], +["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], +["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"], +["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], +["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"], +["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], +["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"], +["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], +["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"], +["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], +["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"], +["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], +["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], +["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], +["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"], +["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], +["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"], +["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], +["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"], +["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], +["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"], +["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], +["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"], +["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], +["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"], +["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], +["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"], +["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], +["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"], +["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], +["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"], +["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], +["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"], +["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], +["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"], +["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], +["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"], +["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], +["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"], +["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], +["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"], +["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], +["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"], +["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], +["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"], +["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], +["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"], +["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], +["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"], +["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"], +["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"], +["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], +["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"], +["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], +["eeef","ⅰ",9,"¬¦'""], +["f040","",62], +["f080","",124], +["f140","",62], +["f180","",124], +["f240","",62], +["f280","",124], +["f340","",62], +["f380","",124], +["f440","",62], +["f480","",124], +["f540","",62], +["f580","",124], +["f640","",62], +["f680","",124], +["f740","",62], +["f780","",124], +["f840","",62], +["f880","",124], +["f940",""], +["fa40","ⅰ",9,"Ⅰ",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"], +["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"], +["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"], +["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"], +["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"] +] diff --git a/node_modules/iconv-lite/encodings/utf16.js b/node_modules/iconv-lite/encodings/utf16.js new file mode 100644 index 0000000..54765ae --- /dev/null +++ b/node_modules/iconv-lite/encodings/utf16.js @@ -0,0 +1,177 @@ +"use strict"; +var Buffer = require("safer-buffer").Buffer; + +// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js + +// == UTF16-BE codec. ========================================================== + +exports.utf16be = Utf16BECodec; +function Utf16BECodec() { +} + +Utf16BECodec.prototype.encoder = Utf16BEEncoder; +Utf16BECodec.prototype.decoder = Utf16BEDecoder; +Utf16BECodec.prototype.bomAware = true; + + +// -- Encoding + +function Utf16BEEncoder() { +} + +Utf16BEEncoder.prototype.write = function(str) { + var buf = Buffer.from(str, 'ucs2'); + for (var i = 0; i < buf.length; i += 2) { + var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp; + } + return buf; +} + +Utf16BEEncoder.prototype.end = function() { +} + + +// -- Decoding + +function Utf16BEDecoder() { + this.overflowByte = -1; +} + +Utf16BEDecoder.prototype.write = function(buf) { + if (buf.length == 0) + return ''; + + var buf2 = Buffer.alloc(buf.length + 1), + i = 0, j = 0; + + if (this.overflowByte !== -1) { + buf2[0] = buf[0]; + buf2[1] = this.overflowByte; + i = 1; j = 2; + } + + for (; i < buf.length-1; i += 2, j+= 2) { + buf2[j] = buf[i+1]; + buf2[j+1] = buf[i]; + } + + this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1; + + return buf2.slice(0, j).toString('ucs2'); +} + +Utf16BEDecoder.prototype.end = function() { +} + + +// == UTF-16 codec ============================================================= +// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic. +// Defaults to UTF-16LE, as it's prevalent and default in Node. +// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le +// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'}); + +// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false). + +exports.utf16 = Utf16Codec; +function Utf16Codec(codecOptions, iconv) { + this.iconv = iconv; +} + +Utf16Codec.prototype.encoder = Utf16Encoder; +Utf16Codec.prototype.decoder = Utf16Decoder; + + +// -- Encoding (pass-through) + +function Utf16Encoder(options, codec) { + options = options || {}; + if (options.addBOM === undefined) + options.addBOM = true; + this.encoder = codec.iconv.getEncoder('utf-16le', options); +} + +Utf16Encoder.prototype.write = function(str) { + return this.encoder.write(str); +} + +Utf16Encoder.prototype.end = function() { + return this.encoder.end(); +} + + +// -- Decoding + +function Utf16Decoder(options, codec) { + this.decoder = null; + this.initialBytes = []; + this.initialBytesLen = 0; + + this.options = options || {}; + this.iconv = codec.iconv; +} + +Utf16Decoder.prototype.write = function(buf) { + if (!this.decoder) { + // Codec is not chosen yet. Accumulate initial bytes. + this.initialBytes.push(buf); + this.initialBytesLen += buf.length; + + if (this.initialBytesLen < 16) // We need more bytes to use space heuristic (see below) + return ''; + + // We have enough bytes -> detect endianness. + var buf = Buffer.concat(this.initialBytes), + encoding = detectEncoding(buf, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + this.initialBytes.length = this.initialBytesLen = 0; + } + + return this.decoder.write(buf); +} + +Utf16Decoder.prototype.end = function() { + if (!this.decoder) { + var buf = Buffer.concat(this.initialBytes), + encoding = detectEncoding(buf, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + + var res = this.decoder.write(buf), + trail = this.decoder.end(); + + return trail ? (res + trail) : res; + } + return this.decoder.end(); +} + +function detectEncoding(buf, defaultEncoding) { + var enc = defaultEncoding || 'utf-16le'; + + if (buf.length >= 2) { + // Check BOM. + if (buf[0] == 0xFE && buf[1] == 0xFF) // UTF-16BE BOM + enc = 'utf-16be'; + else if (buf[0] == 0xFF && buf[1] == 0xFE) // UTF-16LE BOM + enc = 'utf-16le'; + else { + // No BOM found. Try to deduce encoding from initial content. + // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. + // So, we count ASCII as if it was LE or BE, and decide from that. + var asciiCharsLE = 0, asciiCharsBE = 0, // Counts of chars in both positions + _len = Math.min(buf.length - (buf.length % 2), 64); // Len is always even. + + for (var i = 0; i < _len; i += 2) { + if (buf[i] === 0 && buf[i+1] !== 0) asciiCharsBE++; + if (buf[i] !== 0 && buf[i+1] === 0) asciiCharsLE++; + } + + if (asciiCharsBE > asciiCharsLE) + enc = 'utf-16be'; + else if (asciiCharsBE < asciiCharsLE) + enc = 'utf-16le'; + } + } + + return enc; +} + + diff --git a/node_modules/iconv-lite/encodings/utf7.js b/node_modules/iconv-lite/encodings/utf7.js new file mode 100644 index 0000000..b7631c2 --- /dev/null +++ b/node_modules/iconv-lite/encodings/utf7.js @@ -0,0 +1,290 @@ +"use strict"; +var Buffer = require("safer-buffer").Buffer; + +// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152 +// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3 + +exports.utf7 = Utf7Codec; +exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7 +function Utf7Codec(codecOptions, iconv) { + this.iconv = iconv; +}; + +Utf7Codec.prototype.encoder = Utf7Encoder; +Utf7Codec.prototype.decoder = Utf7Decoder; +Utf7Codec.prototype.bomAware = true; + + +// -- Encoding + +var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; + +function Utf7Encoder(options, codec) { + this.iconv = codec.iconv; +} + +Utf7Encoder.prototype.write = function(str) { + // Naive implementation. + // Non-direct chars are encoded as "+-"; single "+" char is encoded as "+-". + return Buffer.from(str.replace(nonDirectChars, function(chunk) { + return "+" + (chunk === '+' ? '' : + this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) + + "-"; + }.bind(this))); +} + +Utf7Encoder.prototype.end = function() { +} + + +// -- Decoding + +function Utf7Decoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = ''; +} + +var base64Regex = /[A-Za-z0-9\/+]/; +var base64Chars = []; +for (var i = 0; i < 256; i++) + base64Chars[i] = base64Regex.test(String.fromCharCode(i)); + +var plusChar = '+'.charCodeAt(0), + minusChar = '-'.charCodeAt(0), + andChar = '&'.charCodeAt(0); + +Utf7Decoder.prototype.write = function(buf) { + var res = "", lastI = 0, + inBase64 = this.inBase64, + base64Accum = this.base64Accum; + + // The decoder is more involved as we must handle chunks in stream. + + for (var i = 0; i < buf.length; i++) { + if (!inBase64) { // We're in direct mode. + // Write direct chars until '+' + if (buf[i] == plusChar) { + res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. + lastI = i+1; + inBase64 = true; + } + } else { // We decode base64. + if (!base64Chars[buf[i]]) { // Base64 ended. + if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" + res += "+"; + } else { + var b64str = base64Accum + buf.slice(lastI, i).toString(); + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + if (buf[i] != minusChar) // Minus is absorbed after base64. + i--; + + lastI = i+1; + inBase64 = false; + base64Accum = ''; + } + } + } + + if (!inBase64) { + res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. + } else { + var b64str = base64Accum + buf.slice(lastI).toString(); + + var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. + base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. + b64str = b64str.slice(0, canBeDecoded); + + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + this.inBase64 = inBase64; + this.base64Accum = base64Accum; + + return res; +} + +Utf7Decoder.prototype.end = function() { + var res = ""; + if (this.inBase64 && this.base64Accum.length > 0) + res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); + + this.inBase64 = false; + this.base64Accum = ''; + return res; +} + + +// UTF-7-IMAP codec. +// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3) +// Differences: +// * Base64 part is started by "&" instead of "+" +// * Direct characters are 0x20-0x7E, except "&" (0x26) +// * In Base64, "," is used instead of "/" +// * Base64 must not be used to represent direct characters. +// * No implicit shift back from Base64 (should always end with '-') +// * String must end in non-shifted position. +// * "-&" while in base64 is not allowed. + + +exports.utf7imap = Utf7IMAPCodec; +function Utf7IMAPCodec(codecOptions, iconv) { + this.iconv = iconv; +}; + +Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; +Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; +Utf7IMAPCodec.prototype.bomAware = true; + + +// -- Encoding + +function Utf7IMAPEncoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = Buffer.alloc(6); + this.base64AccumIdx = 0; +} + +Utf7IMAPEncoder.prototype.write = function(str) { + var inBase64 = this.inBase64, + base64Accum = this.base64Accum, + base64AccumIdx = this.base64AccumIdx, + buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0; + + for (var i = 0; i < str.length; i++) { + var uChar = str.charCodeAt(i); + if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'. + if (inBase64) { + if (base64AccumIdx > 0) { + bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); + base64AccumIdx = 0; + } + + buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. + inBase64 = false; + } + + if (!inBase64) { + buf[bufIdx++] = uChar; // Write direct character + + if (uChar === andChar) // Ampersand -> '&-' + buf[bufIdx++] = minusChar; + } + + } else { // Non-direct character + if (!inBase64) { + buf[bufIdx++] = andChar; // Write '&', then go to base64 mode. + inBase64 = true; + } + if (inBase64) { + base64Accum[base64AccumIdx++] = uChar >> 8; + base64Accum[base64AccumIdx++] = uChar & 0xFF; + + if (base64AccumIdx == base64Accum.length) { + bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx); + base64AccumIdx = 0; + } + } + } + } + + this.inBase64 = inBase64; + this.base64AccumIdx = base64AccumIdx; + + return buf.slice(0, bufIdx); +} + +Utf7IMAPEncoder.prototype.end = function() { + var buf = Buffer.alloc(10), bufIdx = 0; + if (this.inBase64) { + if (this.base64AccumIdx > 0) { + bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); + this.base64AccumIdx = 0; + } + + buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. + this.inBase64 = false; + } + + return buf.slice(0, bufIdx); +} + + +// -- Decoding + +function Utf7IMAPDecoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = ''; +} + +var base64IMAPChars = base64Chars.slice(); +base64IMAPChars[','.charCodeAt(0)] = true; + +Utf7IMAPDecoder.prototype.write = function(buf) { + var res = "", lastI = 0, + inBase64 = this.inBase64, + base64Accum = this.base64Accum; + + // The decoder is more involved as we must handle chunks in stream. + // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end). + + for (var i = 0; i < buf.length; i++) { + if (!inBase64) { // We're in direct mode. + // Write direct chars until '&' + if (buf[i] == andChar) { + res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. + lastI = i+1; + inBase64 = true; + } + } else { // We decode base64. + if (!base64IMAPChars[buf[i]]) { // Base64 ended. + if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" + res += "&"; + } else { + var b64str = base64Accum + buf.slice(lastI, i).toString().replace(/,/g, '/'); + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + if (buf[i] != minusChar) // Minus may be absorbed after base64. + i--; + + lastI = i+1; + inBase64 = false; + base64Accum = ''; + } + } + } + + if (!inBase64) { + res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. + } else { + var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, '/'); + + var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. + base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. + b64str = b64str.slice(0, canBeDecoded); + + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + this.inBase64 = inBase64; + this.base64Accum = base64Accum; + + return res; +} + +Utf7IMAPDecoder.prototype.end = function() { + var res = ""; + if (this.inBase64 && this.base64Accum.length > 0) + res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); + + this.inBase64 = false; + this.base64Accum = ''; + return res; +} + + diff --git a/node_modules/iconv-lite/lib/bom-handling.js b/node_modules/iconv-lite/lib/bom-handling.js new file mode 100644 index 0000000..1050872 --- /dev/null +++ b/node_modules/iconv-lite/lib/bom-handling.js @@ -0,0 +1,52 @@ +"use strict"; + +var BOMChar = '\uFEFF'; + +exports.PrependBOM = PrependBOMWrapper +function PrependBOMWrapper(encoder, options) { + this.encoder = encoder; + this.addBOM = true; +} + +PrependBOMWrapper.prototype.write = function(str) { + if (this.addBOM) { + str = BOMChar + str; + this.addBOM = false; + } + + return this.encoder.write(str); +} + +PrependBOMWrapper.prototype.end = function() { + return this.encoder.end(); +} + + +//------------------------------------------------------------------------------ + +exports.StripBOM = StripBOMWrapper; +function StripBOMWrapper(decoder, options) { + this.decoder = decoder; + this.pass = false; + this.options = options || {}; +} + +StripBOMWrapper.prototype.write = function(buf) { + var res = this.decoder.write(buf); + if (this.pass || !res) + return res; + + if (res[0] === BOMChar) { + res = res.slice(1); + if (typeof this.options.stripBOM === 'function') + this.options.stripBOM(); + } + + this.pass = true; + return res; +} + +StripBOMWrapper.prototype.end = function() { + return this.decoder.end(); +} + diff --git a/node_modules/iconv-lite/lib/extend-node.js b/node_modules/iconv-lite/lib/extend-node.js new file mode 100644 index 0000000..87f5394 --- /dev/null +++ b/node_modules/iconv-lite/lib/extend-node.js @@ -0,0 +1,217 @@ +"use strict"; +var Buffer = require("buffer").Buffer; +// Note: not polyfilled with safer-buffer on a purpose, as overrides Buffer + +// == Extend Node primitives to use iconv-lite ================================= + +module.exports = function (iconv) { + var original = undefined; // Place to keep original methods. + + // Node authors rewrote Buffer internals to make it compatible with + // Uint8Array and we cannot patch key functions since then. + // Note: this does use older Buffer API on a purpose + iconv.supportsNodeEncodingsExtension = !(Buffer.from || new Buffer(0) instanceof Uint8Array); + + iconv.extendNodeEncodings = function extendNodeEncodings() { + if (original) return; + original = {}; + + if (!iconv.supportsNodeEncodingsExtension) { + console.error("ACTION NEEDED: require('iconv-lite').extendNodeEncodings() is not supported in your version of Node"); + console.error("See more info at https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility"); + return; + } + + var nodeNativeEncodings = { + 'hex': true, 'utf8': true, 'utf-8': true, 'ascii': true, 'binary': true, + 'base64': true, 'ucs2': true, 'ucs-2': true, 'utf16le': true, 'utf-16le': true, + }; + + Buffer.isNativeEncoding = function(enc) { + return enc && nodeNativeEncodings[enc.toLowerCase()]; + } + + // -- SlowBuffer ----------------------------------------------------------- + var SlowBuffer = require('buffer').SlowBuffer; + + original.SlowBufferToString = SlowBuffer.prototype.toString; + SlowBuffer.prototype.toString = function(encoding, start, end) { + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.SlowBufferToString.call(this, encoding, start, end); + + // Otherwise, use our decoding method. + if (typeof start == 'undefined') start = 0; + if (typeof end == 'undefined') end = this.length; + return iconv.decode(this.slice(start, end), encoding); + } + + original.SlowBufferWrite = SlowBuffer.prototype.write; + SlowBuffer.prototype.write = function(string, offset, length, encoding) { + // Support both (string, offset, length, encoding) + // and the legacy (string, encoding, offset, length) + if (isFinite(offset)) { + if (!isFinite(length)) { + encoding = length; + length = undefined; + } + } else { // legacy + var swap = encoding; + encoding = offset; + offset = length; + length = swap; + } + + offset = +offset || 0; + var remaining = this.length - offset; + if (!length) { + length = remaining; + } else { + length = +length; + if (length > remaining) { + length = remaining; + } + } + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.SlowBufferWrite.call(this, string, offset, length, encoding); + + if (string.length > 0 && (length < 0 || offset < 0)) + throw new RangeError('attempt to write beyond buffer bounds'); + + // Otherwise, use our encoding method. + var buf = iconv.encode(string, encoding); + if (buf.length < length) length = buf.length; + buf.copy(this, offset, 0, length); + return length; + } + + // -- Buffer --------------------------------------------------------------- + + original.BufferIsEncoding = Buffer.isEncoding; + Buffer.isEncoding = function(encoding) { + return Buffer.isNativeEncoding(encoding) || iconv.encodingExists(encoding); + } + + original.BufferByteLength = Buffer.byteLength; + Buffer.byteLength = SlowBuffer.byteLength = function(str, encoding) { + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.BufferByteLength.call(this, str, encoding); + + // Slow, I know, but we don't have a better way yet. + return iconv.encode(str, encoding).length; + } + + original.BufferToString = Buffer.prototype.toString; + Buffer.prototype.toString = function(encoding, start, end) { + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.BufferToString.call(this, encoding, start, end); + + // Otherwise, use our decoding method. + if (typeof start == 'undefined') start = 0; + if (typeof end == 'undefined') end = this.length; + return iconv.decode(this.slice(start, end), encoding); + } + + original.BufferWrite = Buffer.prototype.write; + Buffer.prototype.write = function(string, offset, length, encoding) { + var _offset = offset, _length = length, _encoding = encoding; + // Support both (string, offset, length, encoding) + // and the legacy (string, encoding, offset, length) + if (isFinite(offset)) { + if (!isFinite(length)) { + encoding = length; + length = undefined; + } + } else { // legacy + var swap = encoding; + encoding = offset; + offset = length; + length = swap; + } + + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.BufferWrite.call(this, string, _offset, _length, _encoding); + + offset = +offset || 0; + var remaining = this.length - offset; + if (!length) { + length = remaining; + } else { + length = +length; + if (length > remaining) { + length = remaining; + } + } + + if (string.length > 0 && (length < 0 || offset < 0)) + throw new RangeError('attempt to write beyond buffer bounds'); + + // Otherwise, use our encoding method. + var buf = iconv.encode(string, encoding); + if (buf.length < length) length = buf.length; + buf.copy(this, offset, 0, length); + return length; + + // TODO: Set _charsWritten. + } + + + // -- Readable ------------------------------------------------------------- + if (iconv.supportsStreams) { + var Readable = require('stream').Readable; + + original.ReadableSetEncoding = Readable.prototype.setEncoding; + Readable.prototype.setEncoding = function setEncoding(enc, options) { + // Use our own decoder, it has the same interface. + // We cannot use original function as it doesn't handle BOM-s. + this._readableState.decoder = iconv.getDecoder(enc, options); + this._readableState.encoding = enc; + } + + Readable.prototype.collect = iconv._collect; + } + } + + // Remove iconv-lite Node primitive extensions. + iconv.undoExtendNodeEncodings = function undoExtendNodeEncodings() { + if (!iconv.supportsNodeEncodingsExtension) + return; + if (!original) + throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.") + + delete Buffer.isNativeEncoding; + + var SlowBuffer = require('buffer').SlowBuffer; + + SlowBuffer.prototype.toString = original.SlowBufferToString; + SlowBuffer.prototype.write = original.SlowBufferWrite; + + Buffer.isEncoding = original.BufferIsEncoding; + Buffer.byteLength = original.BufferByteLength; + Buffer.prototype.toString = original.BufferToString; + Buffer.prototype.write = original.BufferWrite; + + if (iconv.supportsStreams) { + var Readable = require('stream').Readable; + + Readable.prototype.setEncoding = original.ReadableSetEncoding; + delete Readable.prototype.collect; + } + + original = undefined; + } +} diff --git a/node_modules/iconv-lite/lib/index.d.ts b/node_modules/iconv-lite/lib/index.d.ts new file mode 100644 index 0000000..0547eb3 --- /dev/null +++ b/node_modules/iconv-lite/lib/index.d.ts @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + * REQUIREMENT: This definition is dependent on the @types/node definition. + * Install with `npm install @types/node --save-dev` + *--------------------------------------------------------------------------------------------*/ + +declare module 'iconv-lite' { + export function decode(buffer: Buffer, encoding: string, options?: Options): string; + + export function encode(content: string, encoding: string, options?: Options): Buffer; + + export function encodingExists(encoding: string): boolean; + + export function decodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; + + export function encodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; +} + +export interface Options { + stripBOM?: boolean; + addBOM?: boolean; + defaultEncoding?: string; +} diff --git a/node_modules/iconv-lite/lib/index.js b/node_modules/iconv-lite/lib/index.js new file mode 100644 index 0000000..5391919 --- /dev/null +++ b/node_modules/iconv-lite/lib/index.js @@ -0,0 +1,153 @@ +"use strict"; + +// Some environments don't have global Buffer (e.g. React Native). +// Solution would be installing npm modules "buffer" and "stream" explicitly. +var Buffer = require("safer-buffer").Buffer; + +var bomHandling = require("./bom-handling"), + iconv = module.exports; + +// All codecs and aliases are kept here, keyed by encoding name/alias. +// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. +iconv.encodings = null; + +// Characters emitted in case of error. +iconv.defaultCharUnicode = '�'; +iconv.defaultCharSingleByte = '?'; + +// Public API. +iconv.encode = function encode(str, encoding, options) { + str = "" + (str || ""); // Ensure string. + + var encoder = iconv.getEncoder(encoding, options); + + var res = encoder.write(str); + var trail = encoder.end(); + + return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res; +} + +iconv.decode = function decode(buf, encoding, options) { + if (typeof buf === 'string') { + if (!iconv.skipDecodeWarning) { + console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding'); + iconv.skipDecodeWarning = true; + } + + buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer. + } + + var decoder = iconv.getDecoder(encoding, options); + + var res = decoder.write(buf); + var trail = decoder.end(); + + return trail ? (res + trail) : res; +} + +iconv.encodingExists = function encodingExists(enc) { + try { + iconv.getCodec(enc); + return true; + } catch (e) { + return false; + } +} + +// Legacy aliases to convert functions +iconv.toEncoding = iconv.encode; +iconv.fromEncoding = iconv.decode; + +// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. +iconv._codecDataCache = {}; +iconv.getCodec = function getCodec(encoding) { + if (!iconv.encodings) + iconv.encodings = require("../encodings"); // Lazy load all encoding definitions. + + // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. + var enc = iconv._canonicalizeEncoding(encoding); + + // Traverse iconv.encodings to find actual codec. + var codecOptions = {}; + while (true) { + var codec = iconv._codecDataCache[enc]; + if (codec) + return codec; + + var codecDef = iconv.encodings[enc]; + + switch (typeof codecDef) { + case "string": // Direct alias to other encoding. + enc = codecDef; + break; + + case "object": // Alias with options. Can be layered. + for (var key in codecDef) + codecOptions[key] = codecDef[key]; + + if (!codecOptions.encodingName) + codecOptions.encodingName = enc; + + enc = codecDef.type; + break; + + case "function": // Codec itself. + if (!codecOptions.encodingName) + codecOptions.encodingName = enc; + + // The codec function must load all tables and return object with .encoder and .decoder methods. + // It'll be called only once (for each different options object). + codec = new codecDef(codecOptions, iconv); + + iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later. + return codec; + + default: + throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); + } + } +} + +iconv._canonicalizeEncoding = function(encoding) { + // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. + return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); +} + +iconv.getEncoder = function getEncoder(encoding, options) { + var codec = iconv.getCodec(encoding), + encoder = new codec.encoder(options, codec); + + if (codec.bomAware && options && options.addBOM) + encoder = new bomHandling.PrependBOM(encoder, options); + + return encoder; +} + +iconv.getDecoder = function getDecoder(encoding, options) { + var codec = iconv.getCodec(encoding), + decoder = new codec.decoder(options, codec); + + if (codec.bomAware && !(options && options.stripBOM === false)) + decoder = new bomHandling.StripBOM(decoder, options); + + return decoder; +} + + +// Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json. +var nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node; +if (nodeVer) { + + // Load streaming support in Node v0.10+ + var nodeVerArr = nodeVer.split(".").map(Number); + if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) { + require("./streams")(iconv); + } + + // Load Node primitive extensions. + require("./extend-node")(iconv); +} + +if ("Ā" != "\u0100") { + console.error("iconv-lite warning: javascript files use encoding different from utf-8. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); +} diff --git a/node_modules/iconv-lite/lib/streams.js b/node_modules/iconv-lite/lib/streams.js new file mode 100644 index 0000000..4409552 --- /dev/null +++ b/node_modules/iconv-lite/lib/streams.js @@ -0,0 +1,121 @@ +"use strict"; + +var Buffer = require("buffer").Buffer, + Transform = require("stream").Transform; + + +// == Exports ================================================================== +module.exports = function(iconv) { + + // Additional Public API. + iconv.encodeStream = function encodeStream(encoding, options) { + return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); + } + + iconv.decodeStream = function decodeStream(encoding, options) { + return new IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); + } + + iconv.supportsStreams = true; + + + // Not published yet. + iconv.IconvLiteEncoderStream = IconvLiteEncoderStream; + iconv.IconvLiteDecoderStream = IconvLiteDecoderStream; + iconv._collect = IconvLiteDecoderStream.prototype.collect; +}; + + +// == Encoder stream ======================================================= +function IconvLiteEncoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.decodeStrings = false; // We accept only strings, so we don't need to decode them. + Transform.call(this, options); +} + +IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteEncoderStream } +}); + +IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { + if (typeof chunk != 'string') + return done(new Error("Iconv encoding stream needs strings as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteEncoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteEncoderStream.prototype.collect = function(cb) { + var chunks = []; + this.on('error', cb); + this.on('data', function(chunk) { chunks.push(chunk); }); + this.on('end', function() { + cb(null, Buffer.concat(chunks)); + }); + return this; +} + + +// == Decoder stream ======================================================= +function IconvLiteDecoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.encoding = this.encoding = 'utf8'; // We output strings. + Transform.call(this, options); +} + +IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteDecoderStream } +}); + +IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { + if (!Buffer.isBuffer(chunk)) + return done(new Error("Iconv decoding stream needs buffers as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res, this.encoding); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteDecoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res, this.encoding); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteDecoderStream.prototype.collect = function(cb) { + var res = ''; + this.on('error', cb); + this.on('data', function(chunk) { res += chunk; }); + this.on('end', function() { + cb(null, res); + }); + return this; +} + diff --git a/node_modules/iconv-lite/package.json b/node_modules/iconv-lite/package.json new file mode 100644 index 0000000..a7c74fc --- /dev/null +++ b/node_modules/iconv-lite/package.json @@ -0,0 +1,46 @@ +{ + "name": "iconv-lite", + "description": "Convert character encodings in pure javascript.", + "version": "0.4.24", + "license": "MIT", + "keywords": [ + "iconv", + "convert", + "charset", + "icu" + ], + "author": "Alexander Shtuchkin ", + "main": "./lib/index.js", + "typings": "./lib/index.d.ts", + "homepage": "https://github.com/ashtuchkin/iconv-lite", + "bugs": "https://github.com/ashtuchkin/iconv-lite/issues", + "repository": { + "type": "git", + "url": "git://github.com/ashtuchkin/iconv-lite.git" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "coverage": "istanbul cover _mocha -- --grep .", + "coverage-open": "open coverage/lcov-report/index.html", + "test": "mocha --reporter spec --grep ." + }, + "browser": { + "./lib/extend-node": false, + "./lib/streams": false + }, + "devDependencies": { + "mocha": "^3.1.0", + "request": "~2.87.0", + "unorm": "*", + "errto": "*", + "async": "*", + "istanbul": "*", + "semver": "*", + "iconv": "*" + }, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + } +} diff --git a/node_modules/inherits/LICENSE b/node_modules/inherits/LICENSE new file mode 100644 index 0000000..dea3013 --- /dev/null +++ b/node_modules/inherits/LICENSE @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +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. + diff --git a/node_modules/inherits/README.md b/node_modules/inherits/README.md new file mode 100644 index 0000000..b1c5665 --- /dev/null +++ b/node_modules/inherits/README.md @@ -0,0 +1,42 @@ +Browser-friendly inheritance fully compatible with standard node.js +[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). + +This package exports standard `inherits` from node.js `util` module in +node environment, but also provides alternative browser-friendly +implementation through [browser +field](https://gist.github.com/shtylman/4339901). Alternative +implementation is a literal copy of standard one located in standalone +module to avoid requiring of `util`. It also has a shim for old +browsers with no `Object.create` support. + +While keeping you sure you are using standard `inherits` +implementation in node.js environment, it allows bundlers such as +[browserify](https://github.com/substack/node-browserify) to not +include full `util` package to your client code if all you need is +just `inherits` function. It worth, because browser shim for `util` +package is large and `inherits` is often the single function you need +from it. + +It's recommended to use this package instead of +`require('util').inherits` for any code that has chances to be used +not only in node.js but in browser too. + +## usage + +```js +var inherits = require('inherits'); +// then use exactly as the standard one +``` + +## note on version ~1.0 + +Version ~1.0 had completely different motivation and is not compatible +neither with 2.0 nor with standard node.js `inherits`. + +If you are using version ~1.0 and planning to switch to ~2.0, be +careful: + +* new version uses `super_` instead of `super` for referencing + superclass +* new version overwrites current prototype while old one preserves any + existing fields on it diff --git a/node_modules/inherits/inherits.js b/node_modules/inherits/inherits.js new file mode 100644 index 0000000..f71f2d9 --- /dev/null +++ b/node_modules/inherits/inherits.js @@ -0,0 +1,9 @@ +try { + var util = require('util'); + /* istanbul ignore next */ + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + /* istanbul ignore next */ + module.exports = require('./inherits_browser.js'); +} diff --git a/node_modules/inherits/inherits_browser.js b/node_modules/inherits/inherits_browser.js new file mode 100644 index 0000000..86bbb3d --- /dev/null +++ b/node_modules/inherits/inherits_browser.js @@ -0,0 +1,27 @@ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }) + } + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } + } +} diff --git a/node_modules/inherits/package.json b/node_modules/inherits/package.json new file mode 100644 index 0000000..37b4366 --- /dev/null +++ b/node_modules/inherits/package.json @@ -0,0 +1,29 @@ +{ + "name": "inherits", + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "version": "2.0.4", + "keywords": [ + "inheritance", + "class", + "klass", + "oop", + "object-oriented", + "inherits", + "browser", + "browserify" + ], + "main": "./inherits.js", + "browser": "./inherits_browser.js", + "repository": "git://github.com/isaacs/inherits", + "license": "ISC", + "scripts": { + "test": "tap" + }, + "devDependencies": { + "tap": "^14.2.4" + }, + "files": [ + "inherits.js", + "inherits_browser.js" + ] +} diff --git a/node_modules/ipaddr.js/LICENSE b/node_modules/ipaddr.js/LICENSE new file mode 100644 index 0000000..f6b37b5 --- /dev/null +++ b/node_modules/ipaddr.js/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2011-2017 whitequark + +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. diff --git a/node_modules/ipaddr.js/README.md b/node_modules/ipaddr.js/README.md new file mode 100644 index 0000000..f57725b --- /dev/null +++ b/node_modules/ipaddr.js/README.md @@ -0,0 +1,233 @@ +# ipaddr.js — an IPv6 and IPv4 address manipulation library [![Build Status](https://travis-ci.org/whitequark/ipaddr.js.svg)](https://travis-ci.org/whitequark/ipaddr.js) + +ipaddr.js is a small (1.9K minified and gzipped) library for manipulating +IP addresses in JavaScript environments. It runs on both CommonJS runtimes +(e.g. [nodejs]) and in a web browser. + +ipaddr.js allows you to verify and parse string representation of an IP +address, match it against a CIDR range or range list, determine if it falls +into some reserved ranges (examples include loopback and private ranges), +and convert between IPv4 and IPv4-mapped IPv6 addresses. + +[nodejs]: http://nodejs.org + +## Installation + +`npm install ipaddr.js` + +or + +`bower install ipaddr.js` + +## API + +ipaddr.js defines one object in the global scope: `ipaddr`. In CommonJS, +it is exported from the module: + +```js +var ipaddr = require('ipaddr.js'); +``` + +The API consists of several global methods and two classes: ipaddr.IPv6 and ipaddr.IPv4. + +### Global methods + +There are three global methods defined: `ipaddr.isValid`, `ipaddr.parse` and +`ipaddr.process`. All of them receive a string as a single parameter. + +The `ipaddr.isValid` method returns `true` if the address is a valid IPv4 or +IPv6 address, and `false` otherwise. It does not throw any exceptions. + +The `ipaddr.parse` method returns an object representing the IP address, +or throws an `Error` if the passed string is not a valid representation of an +IP address. + +The `ipaddr.process` method works just like the `ipaddr.parse` one, but it +automatically converts IPv4-mapped IPv6 addresses to their IPv4 counterparts +before returning. It is useful when you have a Node.js instance listening +on an IPv6 socket, and the `net.ivp6.bindv6only` sysctl parameter (or its +equivalent on non-Linux OS) is set to 0. In this case, you can accept IPv4 +connections on your IPv6-only socket, but the remote address will be mangled. +Use `ipaddr.process` method to automatically demangle it. + +### Object representation + +Parsing methods return an object which descends from `ipaddr.IPv6` or +`ipaddr.IPv4`. These objects share some properties, but most of them differ. + +#### Shared properties + +One can determine the type of address by calling `addr.kind()`. It will return +either `"ipv6"` or `"ipv4"`. + +An address can be converted back to its string representation with `addr.toString()`. +Note that this method: + * does not return the original string used to create the object (in fact, there is + no way of getting that string) + * returns a compact representation (when it is applicable) + +A `match(range, bits)` method can be used to check if the address falls into a +certain CIDR range. +Note that an address can be (obviously) matched only against an address of the same type. + +For example: + +```js +var addr = ipaddr.parse("2001:db8:1234::1"); +var range = ipaddr.parse("2001:db8::"); + +addr.match(range, 32); // => true +``` + +Alternatively, `match` can also be called as `match([range, bits])`. In this way, +it can be used together with the `parseCIDR(string)` method, which parses an IP +address together with a CIDR range. + +For example: + +```js +var addr = ipaddr.parse("2001:db8:1234::1"); + +addr.match(ipaddr.parseCIDR("2001:db8::/32")); // => true +``` + +A `range()` method returns one of predefined names for several special ranges defined +by IP protocols. The exact names (and their respective CIDR ranges) can be looked up +in the source: [IPv6 ranges] and [IPv4 ranges]. Some common ones include `"unicast"` +(the default one) and `"reserved"`. + +You can match against your own range list by using +`ipaddr.subnetMatch(address, rangeList, defaultName)` method. It can work with a mix of IPv6 or IPv4 addresses, and accepts a name-to-subnet map as the range list. For example: + +```js +var rangeList = { + documentationOnly: [ ipaddr.parse('2001:db8::'), 32 ], + tunnelProviders: [ + [ ipaddr.parse('2001:470::'), 32 ], // he.net + [ ipaddr.parse('2001:5c0::'), 32 ] // freenet6 + ] +}; +ipaddr.subnetMatch(ipaddr.parse('2001:470:8:66::1'), rangeList, 'unknown'); // => "tunnelProviders" +``` + +The addresses can be converted to their byte representation with `toByteArray()`. +(Actually, JavaScript mostly does not know about byte buffers. They are emulated with +arrays of numbers, each in range of 0..255.) + +```js +var bytes = ipaddr.parse('2a00:1450:8007::68').toByteArray(); // ipv6.google.com +bytes // => [42, 0x00, 0x14, 0x50, 0x80, 0x07, 0x00, , 0x00, 0x68 ] +``` + +The `ipaddr.IPv4` and `ipaddr.IPv6` objects have some methods defined, too. All of them +have the same interface for both protocols, and are similar to global methods. + +`ipaddr.IPvX.isValid(string)` can be used to check if the string is a valid address +for particular protocol, and `ipaddr.IPvX.parse(string)` is the error-throwing parser. + +`ipaddr.IPvX.isValid(string)` uses the same format for parsing as the POSIX `inet_ntoa` function, which accepts unusual formats like `0xc0.168.1.1` or `0x10000000`. The function `ipaddr.IPv4.isValidFourPartDecimal(string)` validates the IPv4 address and also ensures that it is written in four-part decimal format. + +[IPv6 ranges]: https://github.com/whitequark/ipaddr.js/blob/master/src/ipaddr.coffee#L186 +[IPv4 ranges]: https://github.com/whitequark/ipaddr.js/blob/master/src/ipaddr.coffee#L71 + +#### IPv6 properties + +Sometimes you will want to convert IPv6 not to a compact string representation (with +the `::` substitution); the `toNormalizedString()` method will return an address where +all zeroes are explicit. + +For example: + +```js +var addr = ipaddr.parse("2001:0db8::0001"); +addr.toString(); // => "2001:db8::1" +addr.toNormalizedString(); // => "2001:db8:0:0:0:0:0:1" +``` + +The `isIPv4MappedAddress()` method will return `true` if this address is an IPv4-mapped +one, and `toIPv4Address()` will return an IPv4 object address. + +To access the underlying binary representation of the address, use `addr.parts`. + +```js +var addr = ipaddr.parse("2001:db8:10::1234:DEAD"); +addr.parts // => [0x2001, 0xdb8, 0x10, 0, 0, 0, 0x1234, 0xdead] +``` + +A IPv6 zone index can be accessed via `addr.zoneId`: + +```js +var addr = ipaddr.parse("2001:db8::%eth0"); +addr.zoneId // => 'eth0' +``` + +#### IPv4 properties + +`toIPv4MappedAddress()` will return a corresponding IPv4-mapped IPv6 address. + +To access the underlying representation of the address, use `addr.octets`. + +```js +var addr = ipaddr.parse("192.168.1.1"); +addr.octets // => [192, 168, 1, 1] +``` + +`prefixLengthFromSubnetMask()` will return a CIDR prefix length for a valid IPv4 netmask or +null if the netmask is not valid. + +```js +ipaddr.IPv4.parse('255.255.255.240').prefixLengthFromSubnetMask() == 28 +ipaddr.IPv4.parse('255.192.164.0').prefixLengthFromSubnetMask() == null +``` + +`subnetMaskFromPrefixLength()` will return an IPv4 netmask for a valid CIDR prefix length. + +```js +ipaddr.IPv4.subnetMaskFromPrefixLength(24) == "255.255.255.0" +ipaddr.IPv4.subnetMaskFromPrefixLength(29) == "255.255.255.248" +``` + +`broadcastAddressFromCIDR()` will return the broadcast address for a given IPv4 interface and netmask in CIDR notation. +```js +ipaddr.IPv4.broadcastAddressFromCIDR("172.0.0.1/24") == "172.0.0.255" +``` +`networkAddressFromCIDR()` will return the network address for a given IPv4 interface and netmask in CIDR notation. +```js +ipaddr.IPv4.networkAddressFromCIDR("172.0.0.1/24") == "172.0.0.0" +``` + +#### Conversion + +IPv4 and IPv6 can be converted bidirectionally to and from network byte order (MSB) byte arrays. + +The `fromByteArray()` method will take an array and create an appropriate IPv4 or IPv6 object +if the input satisfies the requirements. For IPv4 it has to be an array of four 8-bit values, +while for IPv6 it has to be an array of sixteen 8-bit values. + +For example: +```js +var addr = ipaddr.fromByteArray([0x7f, 0, 0, 1]); +addr.toString(); // => "127.0.0.1" +``` + +or + +```js +var addr = ipaddr.fromByteArray([0x20, 1, 0xd, 0xb8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) +addr.toString(); // => "2001:db8::1" +``` + +Both objects also offer a `toByteArray()` method, which returns an array in network byte order (MSB). + +For example: +```js +var addr = ipaddr.parse("127.0.0.1"); +addr.toByteArray(); // => [0x7f, 0, 0, 1] +``` + +or + +```js +var addr = ipaddr.parse("2001:db8::1"); +addr.toByteArray(); // => [0x20, 1, 0xd, 0xb8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] +``` diff --git a/node_modules/ipaddr.js/ipaddr.min.js b/node_modules/ipaddr.js/ipaddr.min.js new file mode 100644 index 0000000..b54a7cc --- /dev/null +++ b/node_modules/ipaddr.js/ipaddr.min.js @@ -0,0 +1 @@ +(function(){var r,t,n,e,i,o,a,s;t={},s=this,"undefined"!=typeof module&&null!==module&&module.exports?module.exports=t:s.ipaddr=t,a=function(r,t,n,e){var i,o;if(r.length!==t.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");for(i=0;e>0;){if((o=n-e)<0&&(o=0),r[i]>>o!=t[i]>>o)return!1;e-=n,i+=1}return!0},t.subnetMatch=function(r,t,n){var e,i,o,a,s;null==n&&(n="unicast");for(o in t)for(!(a=t[o])[0]||a[0]instanceof Array||(a=[a]),e=0,i=a.length;e=0;t=n+=-1){if(!((e=this.octets[t])in a))return null;if(o=a[e],i&&0!==o)return null;8!==o&&(i=!0),r+=o}return 32-r},r}(),n="(0?\\d+|0x[a-f0-9]+)",e={fourOctet:new RegExp("^"+n+"\\."+n+"\\."+n+"\\."+n+"$","i"),longValue:new RegExp("^"+n+"$","i")},t.IPv4.parser=function(r){var t,n,i,o,a;if(n=function(r){return"0"===r[0]&&"x"!==r[1]?parseInt(r,8):parseInt(r)},t=r.match(e.fourOctet))return function(){var r,e,o,a;for(a=[],r=0,e=(o=t.slice(1,6)).length;r4294967295||a<0)throw new Error("ipaddr: address outside defined range");return function(){var r,t;for(t=[],o=r=0;r<=24;o=r+=8)t.push(a>>o&255);return t}().reverse()}return null},t.IPv6=function(){function r(r,t){var n,e,i,o,a,s;if(16===r.length)for(this.parts=[],n=e=0;e<=14;n=e+=2)this.parts.push(r[n]<<8|r[n+1]);else{if(8!==r.length)throw new Error("ipaddr: ipv6 part count should be 8 or 16");this.parts=r}for(i=0,o=(s=this.parts).length;it&&(r=n.index,t=n[0].length);return t<0?i:i.substring(0,r)+"::"+i.substring(r+t)},r.prototype.toByteArray=function(){var r,t,n,e,i;for(r=[],t=0,n=(i=this.parts).length;t>8),r.push(255&e);return r},r.prototype.toNormalizedString=function(){var r,t,n;return r=function(){var r,n,e,i;for(i=[],r=0,n=(e=this.parts).length;r>8,255&r,n>>8,255&n])},r.prototype.prefixLengthFromSubnetMask=function(){var r,t,n,e,i,o,a;for(a={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},r=0,i=!1,t=n=7;n>=0;t=n+=-1){if(!((e=this.parts[t])in a))return null;if(o=a[e],i&&0!==o)return null;16!==o&&(i=!0),r+=o}return 128-r},r}(),i="(?:[0-9a-f]+::?)+",o={zoneIndex:new RegExp("%[0-9a-z]{1,}","i"),native:new RegExp("^(::)?("+i+")?([0-9a-f]+)?(::)?(%[0-9a-z]{1,})?$","i"),transitional:new RegExp("^((?:"+i+")|(?:::)(?:"+i+")?)"+n+"\\."+n+"\\."+n+"\\."+n+"(%[0-9a-z]{1,})?$","i")},r=function(r,t){var n,e,i,a,s,p;if(r.indexOf("::")!==r.lastIndexOf("::"))return null;for((p=(r.match(o.zoneIndex)||[])[0])&&(p=p.substring(1),r=r.replace(/%.+$/,"")),n=0,e=-1;(e=r.indexOf(":",e+1))>=0;)n++;if("::"===r.substr(0,2)&&n--,"::"===r.substr(-2,2)&&n--,n>t)return null;for(s=t-n,a=":";s--;)a+="0:";return":"===(r=r.replace("::",a))[0]&&(r=r.slice(1)),":"===r[r.length-1]&&(r=r.slice(0,-1)),t=function(){var t,n,e,o;for(o=[],t=0,n=(e=r.split(":")).length;t=0&&t<=32)return e=[this.parse(n[1]),t],Object.defineProperty(e,"toString",{value:function(){return this.join("/")}}),e;throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},t.IPv4.subnetMaskFromPrefixLength=function(r){var t,n,e;if((r=parseInt(r))<0||r>32)throw new Error("ipaddr: invalid IPv4 prefix length");for(e=[0,0,0,0],n=0,t=Math.floor(r/8);n=0&&t<=128)return e=[this.parse(n[1]),t],Object.defineProperty(e,"toString",{value:function(){return this.join("/")}}),e;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},t.isValid=function(r){return t.IPv6.isValid(r)||t.IPv4.isValid(r)},t.parse=function(r){if(t.IPv6.isValid(r))return t.IPv6.parse(r);if(t.IPv4.isValid(r))return t.IPv4.parse(r);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},t.parseCIDR=function(r){try{return t.IPv6.parseCIDR(r)}catch(n){n;try{return t.IPv4.parseCIDR(r)}catch(r){throw r,new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},t.fromByteArray=function(r){var n;if(4===(n=r.length))return new t.IPv4(r);if(16===n)return new t.IPv6(r);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},t.process=function(r){var t;return t=this.parse(r),"ipv6"===t.kind()&&t.isIPv4MappedAddress()?t.toIPv4Address():t}}).call(this); \ No newline at end of file diff --git a/node_modules/ipaddr.js/lib/ipaddr.js b/node_modules/ipaddr.js/lib/ipaddr.js new file mode 100644 index 0000000..18bd93b --- /dev/null +++ b/node_modules/ipaddr.js/lib/ipaddr.js @@ -0,0 +1,673 @@ +(function() { + var expandIPv6, ipaddr, ipv4Part, ipv4Regexes, ipv6Part, ipv6Regexes, matchCIDR, root, zoneIndex; + + ipaddr = {}; + + root = this; + + if ((typeof module !== "undefined" && module !== null) && module.exports) { + module.exports = ipaddr; + } else { + root['ipaddr'] = ipaddr; + } + + matchCIDR = function(first, second, partSize, cidrBits) { + var part, shift; + if (first.length !== second.length) { + throw new Error("ipaddr: cannot match CIDR for objects with different lengths"); + } + part = 0; + while (cidrBits > 0) { + shift = partSize - cidrBits; + if (shift < 0) { + shift = 0; + } + if (first[part] >> shift !== second[part] >> shift) { + return false; + } + cidrBits -= partSize; + part += 1; + } + return true; + }; + + ipaddr.subnetMatch = function(address, rangeList, defaultName) { + var k, len, rangeName, rangeSubnets, subnet; + if (defaultName == null) { + defaultName = 'unicast'; + } + for (rangeName in rangeList) { + rangeSubnets = rangeList[rangeName]; + if (rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)) { + rangeSubnets = [rangeSubnets]; + } + for (k = 0, len = rangeSubnets.length; k < len; k++) { + subnet = rangeSubnets[k]; + if (address.kind() === subnet[0].kind()) { + if (address.match.apply(address, subnet)) { + return rangeName; + } + } + } + } + return defaultName; + }; + + ipaddr.IPv4 = (function() { + function IPv4(octets) { + var k, len, octet; + if (octets.length !== 4) { + throw new Error("ipaddr: ipv4 octet count should be 4"); + } + for (k = 0, len = octets.length; k < len; k++) { + octet = octets[k]; + if (!((0 <= octet && octet <= 255))) { + throw new Error("ipaddr: ipv4 octet should fit in 8 bits"); + } + } + this.octets = octets; + } + + IPv4.prototype.kind = function() { + return 'ipv4'; + }; + + IPv4.prototype.toString = function() { + return this.octets.join("."); + }; + + IPv4.prototype.toNormalizedString = function() { + return this.toString(); + }; + + IPv4.prototype.toByteArray = function() { + return this.octets.slice(0); + }; + + IPv4.prototype.match = function(other, cidrRange) { + var ref; + if (cidrRange === void 0) { + ref = other, other = ref[0], cidrRange = ref[1]; + } + if (other.kind() !== 'ipv4') { + throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one"); + } + return matchCIDR(this.octets, other.octets, 8, cidrRange); + }; + + IPv4.prototype.SpecialRanges = { + unspecified: [[new IPv4([0, 0, 0, 0]), 8]], + broadcast: [[new IPv4([255, 255, 255, 255]), 32]], + multicast: [[new IPv4([224, 0, 0, 0]), 4]], + linkLocal: [[new IPv4([169, 254, 0, 0]), 16]], + loopback: [[new IPv4([127, 0, 0, 0]), 8]], + carrierGradeNat: [[new IPv4([100, 64, 0, 0]), 10]], + "private": [[new IPv4([10, 0, 0, 0]), 8], [new IPv4([172, 16, 0, 0]), 12], [new IPv4([192, 168, 0, 0]), 16]], + reserved: [[new IPv4([192, 0, 0, 0]), 24], [new IPv4([192, 0, 2, 0]), 24], [new IPv4([192, 88, 99, 0]), 24], [new IPv4([198, 51, 100, 0]), 24], [new IPv4([203, 0, 113, 0]), 24], [new IPv4([240, 0, 0, 0]), 4]] + }; + + IPv4.prototype.range = function() { + return ipaddr.subnetMatch(this, this.SpecialRanges); + }; + + IPv4.prototype.toIPv4MappedAddress = function() { + return ipaddr.IPv6.parse("::ffff:" + (this.toString())); + }; + + IPv4.prototype.prefixLengthFromSubnetMask = function() { + var cidr, i, k, octet, stop, zeros, zerotable; + zerotable = { + 0: 8, + 128: 7, + 192: 6, + 224: 5, + 240: 4, + 248: 3, + 252: 2, + 254: 1, + 255: 0 + }; + cidr = 0; + stop = false; + for (i = k = 3; k >= 0; i = k += -1) { + octet = this.octets[i]; + if (octet in zerotable) { + zeros = zerotable[octet]; + if (stop && zeros !== 0) { + return null; + } + if (zeros !== 8) { + stop = true; + } + cidr += zeros; + } else { + return null; + } + } + return 32 - cidr; + }; + + return IPv4; + + })(); + + ipv4Part = "(0?\\d+|0x[a-f0-9]+)"; + + ipv4Regexes = { + fourOctet: new RegExp("^" + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "$", 'i'), + longValue: new RegExp("^" + ipv4Part + "$", 'i') + }; + + ipaddr.IPv4.parser = function(string) { + var match, parseIntAuto, part, shift, value; + parseIntAuto = function(string) { + if (string[0] === "0" && string[1] !== "x") { + return parseInt(string, 8); + } else { + return parseInt(string); + } + }; + if (match = string.match(ipv4Regexes.fourOctet)) { + return (function() { + var k, len, ref, results; + ref = match.slice(1, 6); + results = []; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + results.push(parseIntAuto(part)); + } + return results; + })(); + } else if (match = string.match(ipv4Regexes.longValue)) { + value = parseIntAuto(match[1]); + if (value > 0xffffffff || value < 0) { + throw new Error("ipaddr: address outside defined range"); + } + return ((function() { + var k, results; + results = []; + for (shift = k = 0; k <= 24; shift = k += 8) { + results.push((value >> shift) & 0xff); + } + return results; + })()).reverse(); + } else { + return null; + } + }; + + ipaddr.IPv6 = (function() { + function IPv6(parts, zoneId) { + var i, k, l, len, part, ref; + if (parts.length === 16) { + this.parts = []; + for (i = k = 0; k <= 14; i = k += 2) { + this.parts.push((parts[i] << 8) | parts[i + 1]); + } + } else if (parts.length === 8) { + this.parts = parts; + } else { + throw new Error("ipaddr: ipv6 part count should be 8 or 16"); + } + ref = this.parts; + for (l = 0, len = ref.length; l < len; l++) { + part = ref[l]; + if (!((0 <= part && part <= 0xffff))) { + throw new Error("ipaddr: ipv6 part should fit in 16 bits"); + } + } + if (zoneId) { + this.zoneId = zoneId; + } + } + + IPv6.prototype.kind = function() { + return 'ipv6'; + }; + + IPv6.prototype.toString = function() { + return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/, '::'); + }; + + IPv6.prototype.toRFC5952String = function() { + var bestMatchIndex, bestMatchLength, match, regex, string; + regex = /((^|:)(0(:|$)){2,})/g; + string = this.toNormalizedString(); + bestMatchIndex = 0; + bestMatchLength = -1; + while ((match = regex.exec(string))) { + if (match[0].length > bestMatchLength) { + bestMatchIndex = match.index; + bestMatchLength = match[0].length; + } + } + if (bestMatchLength < 0) { + return string; + } + return string.substring(0, bestMatchIndex) + '::' + string.substring(bestMatchIndex + bestMatchLength); + }; + + IPv6.prototype.toByteArray = function() { + var bytes, k, len, part, ref; + bytes = []; + ref = this.parts; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + bytes.push(part >> 8); + bytes.push(part & 0xff); + } + return bytes; + }; + + IPv6.prototype.toNormalizedString = function() { + var addr, part, suffix; + addr = ((function() { + var k, len, ref, results; + ref = this.parts; + results = []; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + results.push(part.toString(16)); + } + return results; + }).call(this)).join(":"); + suffix = ''; + if (this.zoneId) { + suffix = '%' + this.zoneId; + } + return addr + suffix; + }; + + IPv6.prototype.toFixedLengthString = function() { + var addr, part, suffix; + addr = ((function() { + var k, len, ref, results; + ref = this.parts; + results = []; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + results.push(part.toString(16).padStart(4, '0')); + } + return results; + }).call(this)).join(":"); + suffix = ''; + if (this.zoneId) { + suffix = '%' + this.zoneId; + } + return addr + suffix; + }; + + IPv6.prototype.match = function(other, cidrRange) { + var ref; + if (cidrRange === void 0) { + ref = other, other = ref[0], cidrRange = ref[1]; + } + if (other.kind() !== 'ipv6') { + throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one"); + } + return matchCIDR(this.parts, other.parts, 16, cidrRange); + }; + + IPv6.prototype.SpecialRanges = { + unspecified: [new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128], + linkLocal: [new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10], + multicast: [new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8], + loopback: [new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128], + uniqueLocal: [new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7], + ipv4Mapped: [new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96], + rfc6145: [new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96], + rfc6052: [new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96], + '6to4': [new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16], + teredo: [new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32], + reserved: [[new IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32]] + }; + + IPv6.prototype.range = function() { + return ipaddr.subnetMatch(this, this.SpecialRanges); + }; + + IPv6.prototype.isIPv4MappedAddress = function() { + return this.range() === 'ipv4Mapped'; + }; + + IPv6.prototype.toIPv4Address = function() { + var high, low, ref; + if (!this.isIPv4MappedAddress()) { + throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4"); + } + ref = this.parts.slice(-2), high = ref[0], low = ref[1]; + return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff]); + }; + + IPv6.prototype.prefixLengthFromSubnetMask = function() { + var cidr, i, k, part, stop, zeros, zerotable; + zerotable = { + 0: 16, + 32768: 15, + 49152: 14, + 57344: 13, + 61440: 12, + 63488: 11, + 64512: 10, + 65024: 9, + 65280: 8, + 65408: 7, + 65472: 6, + 65504: 5, + 65520: 4, + 65528: 3, + 65532: 2, + 65534: 1, + 65535: 0 + }; + cidr = 0; + stop = false; + for (i = k = 7; k >= 0; i = k += -1) { + part = this.parts[i]; + if (part in zerotable) { + zeros = zerotable[part]; + if (stop && zeros !== 0) { + return null; + } + if (zeros !== 16) { + stop = true; + } + cidr += zeros; + } else { + return null; + } + } + return 128 - cidr; + }; + + return IPv6; + + })(); + + ipv6Part = "(?:[0-9a-f]+::?)+"; + + zoneIndex = "%[0-9a-z]{1,}"; + + ipv6Regexes = { + zoneIndex: new RegExp(zoneIndex, 'i'), + "native": new RegExp("^(::)?(" + ipv6Part + ")?([0-9a-f]+)?(::)?(" + zoneIndex + ")?$", 'i'), + transitional: new RegExp(("^((?:" + ipv6Part + ")|(?:::)(?:" + ipv6Part + ")?)") + (ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part) + ("(" + zoneIndex + ")?$"), 'i') + }; + + expandIPv6 = function(string, parts) { + var colonCount, lastColon, part, replacement, replacementCount, zoneId; + if (string.indexOf('::') !== string.lastIndexOf('::')) { + return null; + } + zoneId = (string.match(ipv6Regexes['zoneIndex']) || [])[0]; + if (zoneId) { + zoneId = zoneId.substring(1); + string = string.replace(/%.+$/, ''); + } + colonCount = 0; + lastColon = -1; + while ((lastColon = string.indexOf(':', lastColon + 1)) >= 0) { + colonCount++; + } + if (string.substr(0, 2) === '::') { + colonCount--; + } + if (string.substr(-2, 2) === '::') { + colonCount--; + } + if (colonCount > parts) { + return null; + } + replacementCount = parts - colonCount; + replacement = ':'; + while (replacementCount--) { + replacement += '0:'; + } + string = string.replace('::', replacement); + if (string[0] === ':') { + string = string.slice(1); + } + if (string[string.length - 1] === ':') { + string = string.slice(0, -1); + } + parts = (function() { + var k, len, ref, results; + ref = string.split(":"); + results = []; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + results.push(parseInt(part, 16)); + } + return results; + })(); + return { + parts: parts, + zoneId: zoneId + }; + }; + + ipaddr.IPv6.parser = function(string) { + var addr, k, len, match, octet, octets, zoneId; + if (ipv6Regexes['native'].test(string)) { + return expandIPv6(string, 8); + } else if (match = string.match(ipv6Regexes['transitional'])) { + zoneId = match[6] || ''; + addr = expandIPv6(match[1].slice(0, -1) + zoneId, 6); + if (addr.parts) { + octets = [parseInt(match[2]), parseInt(match[3]), parseInt(match[4]), parseInt(match[5])]; + for (k = 0, len = octets.length; k < len; k++) { + octet = octets[k]; + if (!((0 <= octet && octet <= 255))) { + return null; + } + } + addr.parts.push(octets[0] << 8 | octets[1]); + addr.parts.push(octets[2] << 8 | octets[3]); + return { + parts: addr.parts, + zoneId: addr.zoneId + }; + } + } + return null; + }; + + ipaddr.IPv4.isIPv4 = ipaddr.IPv6.isIPv6 = function(string) { + return this.parser(string) !== null; + }; + + ipaddr.IPv4.isValid = function(string) { + var e; + try { + new this(this.parser(string)); + return true; + } catch (error1) { + e = error1; + return false; + } + }; + + ipaddr.IPv4.isValidFourPartDecimal = function(string) { + if (ipaddr.IPv4.isValid(string) && string.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/)) { + return true; + } else { + return false; + } + }; + + ipaddr.IPv6.isValid = function(string) { + var addr, e; + if (typeof string === "string" && string.indexOf(":") === -1) { + return false; + } + try { + addr = this.parser(string); + new this(addr.parts, addr.zoneId); + return true; + } catch (error1) { + e = error1; + return false; + } + }; + + ipaddr.IPv4.parse = function(string) { + var parts; + parts = this.parser(string); + if (parts === null) { + throw new Error("ipaddr: string is not formatted like ip address"); + } + return new this(parts); + }; + + ipaddr.IPv6.parse = function(string) { + var addr; + addr = this.parser(string); + if (addr.parts === null) { + throw new Error("ipaddr: string is not formatted like ip address"); + } + return new this(addr.parts, addr.zoneId); + }; + + ipaddr.IPv4.parseCIDR = function(string) { + var maskLength, match, parsed; + if (match = string.match(/^(.+)\/(\d+)$/)) { + maskLength = parseInt(match[2]); + if (maskLength >= 0 && maskLength <= 32) { + parsed = [this.parse(match[1]), maskLength]; + Object.defineProperty(parsed, 'toString', { + value: function() { + return this.join('/'); + } + }); + return parsed; + } + } + throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range"); + }; + + ipaddr.IPv4.subnetMaskFromPrefixLength = function(prefix) { + var filledOctetCount, j, octets; + prefix = parseInt(prefix); + if (prefix < 0 || prefix > 32) { + throw new Error('ipaddr: invalid IPv4 prefix length'); + } + octets = [0, 0, 0, 0]; + j = 0; + filledOctetCount = Math.floor(prefix / 8); + while (j < filledOctetCount) { + octets[j] = 255; + j++; + } + if (filledOctetCount < 4) { + octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - (prefix % 8); + } + return new this(octets); + }; + + ipaddr.IPv4.broadcastAddressFromCIDR = function(string) { + var cidr, error, i, ipInterfaceOctets, octets, subnetMaskOctets; + try { + cidr = this.parseCIDR(string); + ipInterfaceOctets = cidr[0].toByteArray(); + subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray(); + octets = []; + i = 0; + while (i < 4) { + octets.push(parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255); + i++; + } + return new this(octets); + } catch (error1) { + error = error1; + throw new Error('ipaddr: the address does not have IPv4 CIDR format'); + } + }; + + ipaddr.IPv4.networkAddressFromCIDR = function(string) { + var cidr, error, i, ipInterfaceOctets, octets, subnetMaskOctets; + try { + cidr = this.parseCIDR(string); + ipInterfaceOctets = cidr[0].toByteArray(); + subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray(); + octets = []; + i = 0; + while (i < 4) { + octets.push(parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10)); + i++; + } + return new this(octets); + } catch (error1) { + error = error1; + throw new Error('ipaddr: the address does not have IPv4 CIDR format'); + } + }; + + ipaddr.IPv6.parseCIDR = function(string) { + var maskLength, match, parsed; + if (match = string.match(/^(.+)\/(\d+)$/)) { + maskLength = parseInt(match[2]); + if (maskLength >= 0 && maskLength <= 128) { + parsed = [this.parse(match[1]), maskLength]; + Object.defineProperty(parsed, 'toString', { + value: function() { + return this.join('/'); + } + }); + return parsed; + } + } + throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range"); + }; + + ipaddr.isValid = function(string) { + return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string); + }; + + ipaddr.parse = function(string) { + if (ipaddr.IPv6.isValid(string)) { + return ipaddr.IPv6.parse(string); + } else if (ipaddr.IPv4.isValid(string)) { + return ipaddr.IPv4.parse(string); + } else { + throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format"); + } + }; + + ipaddr.parseCIDR = function(string) { + var e; + try { + return ipaddr.IPv6.parseCIDR(string); + } catch (error1) { + e = error1; + try { + return ipaddr.IPv4.parseCIDR(string); + } catch (error1) { + e = error1; + throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format"); + } + } + }; + + ipaddr.fromByteArray = function(bytes) { + var length; + length = bytes.length; + if (length === 4) { + return new ipaddr.IPv4(bytes); + } else if (length === 16) { + return new ipaddr.IPv6(bytes); + } else { + throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address"); + } + }; + + ipaddr.process = function(string) { + var addr; + addr = this.parse(string); + if (addr.kind() === 'ipv6' && addr.isIPv4MappedAddress()) { + return addr.toIPv4Address(); + } else { + return addr; + } + }; + +}).call(this); diff --git a/node_modules/ipaddr.js/lib/ipaddr.js.d.ts b/node_modules/ipaddr.js/lib/ipaddr.js.d.ts new file mode 100644 index 0000000..52174b6 --- /dev/null +++ b/node_modules/ipaddr.js/lib/ipaddr.js.d.ts @@ -0,0 +1,68 @@ +declare module "ipaddr.js" { + type IPv4Range = 'unicast' | 'unspecified' | 'broadcast' | 'multicast' | 'linkLocal' | 'loopback' | 'carrierGradeNat' | 'private' | 'reserved'; + type IPv6Range = 'unicast' | 'unspecified' | 'linkLocal' | 'multicast' | 'loopback' | 'uniqueLocal' | 'ipv4Mapped' | 'rfc6145' | 'rfc6052' | '6to4' | 'teredo' | 'reserved'; + + interface RangeList { + [name: string]: [T, number] | [T, number][]; + } + + // Common methods/properties for IPv4 and IPv6 classes. + class IP { + prefixLengthFromSubnetMask(): number | null; + toByteArray(): number[]; + toNormalizedString(): string; + toString(): string; + } + + namespace Address { + export function isValid(addr: string): boolean; + export function fromByteArray(bytes: number[]): IPv4 | IPv6; + export function parse(addr: string): IPv4 | IPv6; + export function parseCIDR(mask: string): [IPv4 | IPv6, number]; + export function process(addr: string): IPv4 | IPv6; + export function subnetMatch(addr: IPv4, rangeList: RangeList, defaultName?: string): string; + export function subnetMatch(addr: IPv6, rangeList: RangeList, defaultName?: string): string; + + export class IPv4 extends IP { + static broadcastAddressFromCIDR(addr: string): IPv4; + static isIPv4(addr: string): boolean; + static isValidFourPartDecimal(addr: string): boolean; + static isValid(addr: string): boolean; + static networkAddressFromCIDR(addr: string): IPv4; + static parse(addr: string): IPv4; + static parseCIDR(addr: string): [IPv4, number]; + static subnetMaskFromPrefixLength(prefix: number): IPv4; + constructor(octets: number[]); + octets: number[] + + kind(): 'ipv4'; + match(addr: IPv4, bits: number): boolean; + match(mask: [IPv4, number]): boolean; + range(): IPv4Range; + subnetMatch(rangeList: RangeList, defaultName?: string): string; + toIPv4MappedAddress(): IPv6; + } + + export class IPv6 extends IP { + static broadcastAddressFromCIDR(addr: string): IPv6; + static isIPv6(addr: string): boolean; + static isValid(addr: string): boolean; + static parse(addr: string): IPv6; + static parseCIDR(addr: string): [IPv6, number]; + static subnetMaskFromPrefixLength(prefix: number): IPv6; + constructor(parts: number[]); + parts: number[] + zoneId?: string + + isIPv4MappedAddress(): boolean; + kind(): 'ipv6'; + match(addr: IPv6, bits: number): boolean; + match(mask: [IPv6, number]): boolean; + range(): IPv6Range; + subnetMatch(rangeList: RangeList, defaultName?: string): string; + toIPv4Address(): IPv4; + } + } + + export = Address; +} diff --git a/node_modules/ipaddr.js/package.json b/node_modules/ipaddr.js/package.json new file mode 100644 index 0000000..f4d3547 --- /dev/null +++ b/node_modules/ipaddr.js/package.json @@ -0,0 +1,35 @@ +{ + "name": "ipaddr.js", + "description": "A library for manipulating IPv4 and IPv6 addresses in JavaScript.", + "version": "1.9.1", + "author": "whitequark ", + "directories": { + "lib": "./lib" + }, + "dependencies": {}, + "devDependencies": { + "coffee-script": "~1.12.6", + "nodeunit": "^0.11.3", + "uglify-js": "~3.0.19" + }, + "scripts": { + "test": "cake build test" + }, + "files": [ + "lib/", + "LICENSE", + "ipaddr.min.js" + ], + "keywords": [ + "ip", + "ipv4", + "ipv6" + ], + "repository": "git://github.com/whitequark/ipaddr.js", + "main": "./lib/ipaddr.js", + "engines": { + "node": ">= 0.10" + }, + "license": "MIT", + "types": "./lib/ipaddr.js.d.ts" +} diff --git a/node_modules/is-arrayish/LICENSE b/node_modules/is-arrayish/LICENSE new file mode 100644 index 0000000..0a5f461 --- /dev/null +++ b/node_modules/is-arrayish/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 JD Ballard + +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. diff --git a/node_modules/is-arrayish/README.md b/node_modules/is-arrayish/README.md new file mode 100644 index 0000000..7d36072 --- /dev/null +++ b/node_modules/is-arrayish/README.md @@ -0,0 +1,16 @@ +# node-is-arrayish [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-is-arrayish.svg?style=flat-square)](https://travis-ci.org/Qix-/node-is-arrayish) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-is-arrayish.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-is-arrayish) +> Determines if an object can be used like an Array + +## Example +```javascript +var isArrayish = require('is-arrayish'); + +isArrayish([]); // true +isArrayish({__proto__: []}); // true +isArrayish({}); // false +isArrayish({length:10}); // false +``` + +## License +Licensed under the [MIT License](http://opensource.org/licenses/MIT). +You can find a copy of it in [LICENSE](LICENSE). diff --git a/node_modules/is-arrayish/index.js b/node_modules/is-arrayish/index.js new file mode 100644 index 0000000..729ca40 --- /dev/null +++ b/node_modules/is-arrayish/index.js @@ -0,0 +1,9 @@ +module.exports = function isArrayish(obj) { + if (!obj || typeof obj === 'string') { + return false; + } + + return obj instanceof Array || Array.isArray(obj) || + (obj.length >= 0 && (obj.splice instanceof Function || + (Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String'))); +}; diff --git a/node_modules/is-arrayish/package.json b/node_modules/is-arrayish/package.json new file mode 100644 index 0000000..8a54e33 --- /dev/null +++ b/node_modules/is-arrayish/package.json @@ -0,0 +1,45 @@ +{ + "name": "is-arrayish", + "description": "Determines if an object can be used as an array", + "version": "0.3.2", + "author": "Qix (http://github.com/qix-)", + "keywords": [ + "is", + "array", + "duck", + "type", + "arrayish", + "similar", + "proto", + "prototype", + "type" + ], + "license": "MIT", + "scripts": { + "test": "mocha --require coffeescript/register ./test/**/*.coffee", + "lint": "zeit-eslint --ext .jsx,.js .", + "lint-staged": "git diff --diff-filter=ACMRT --cached --name-only '*.js' '*.jsx' | xargs zeit-eslint" + }, + "repository": { + "type": "git", + "url": "https://github.com/qix-/node-is-arrayish.git" + }, + "devDependencies": { + "@zeit/eslint-config-node": "^0.3.0", + "@zeit/git-hooks": "^0.1.4", + "coffeescript": "^2.3.1", + "coveralls": "^3.0.1", + "eslint": "^4.19.1", + "istanbul": "^0.4.5", + "mocha": "^5.2.0", + "should": "^13.2.1" + }, + "eslintConfig": { + "extends": [ + "@zeit/eslint-config-node" + ] + }, + "git": { + "pre-commit": "lint-staged" + } +} diff --git a/node_modules/is-arrayish/yarn-error.log b/node_modules/is-arrayish/yarn-error.log new file mode 100644 index 0000000..d3dcf37 --- /dev/null +++ b/node_modules/is-arrayish/yarn-error.log @@ -0,0 +1,1443 @@ +Arguments: + /Users/junon/n/bin/node /Users/junon/.yarn/bin/yarn.js test + +PATH: + /Users/junon/.yarn/bin:/Users/junon/.config/yarn/global/node_modules/.bin:/Users/junon/perl5/bin:/Users/junon/google-cloud-sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/junon/bin:/Users/junon/.local/bin:/src/.go/bin:/src/llvm/llvm/build/bin:/Users/junon/Library/Android/sdk/platform-tools:/Users/junon/n/bin:/usr/local/texlive/2017/bin/x86_64-darwin/ + +Yarn version: + 1.5.1 + +Node version: + 9.6.1 + +Platform: + darwin x64 + +npm manifest: + { + "name": "is-arrayish", + "description": "Determines if an object can be used as an array", + "version": "0.3.1", + "author": "Qix (http://github.com/qix-)", + "keywords": [ + "is", + "array", + "duck", + "type", + "arrayish", + "similar", + "proto", + "prototype", + "type" + ], + "license": "MIT", + "scripts": { + "test": "mocha --require coffeescript/register", + "lint": "zeit-eslint --ext .jsx,.js .", + "lint-staged": "git diff --diff-filter=ACMRT --cached --name-only '*.js' '*.jsx' | xargs zeit-eslint" + }, + "repository": { + "type": "git", + "url": "https://github.com/qix-/node-is-arrayish.git" + }, + "devDependencies": { + "@zeit/eslint-config-node": "^0.3.0", + "@zeit/git-hooks": "^0.1.4", + "coffeescript": "^2.3.1", + "coveralls": "^3.0.1", + "eslint": "^4.19.1", + "istanbul": "^0.4.5", + "mocha": "^5.2.0", + "should": "^13.2.1" + }, + "eslintConfig": { + "extends": [ + "@zeit/eslint-config-node" + ] + }, + "git": { + "pre-commit": "lint-staged" + } + } + +yarn manifest: + No manifest + +Lockfile: + # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + # yarn lockfile v1 + + + "@zeit/eslint-config-base@0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@zeit/eslint-config-base/-/eslint-config-base-0.3.0.tgz#32a58c3e52eca4025604758cb4591f3d28e22fb4" + dependencies: + arg "^1.0.0" + chalk "^2.3.0" + + "@zeit/eslint-config-node@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@zeit/eslint-config-node/-/eslint-config-node-0.3.0.tgz#6e328328f366f66c2a0549a69131bbcd9735f098" + dependencies: + "@zeit/eslint-config-base" "0.3.0" + + "@zeit/git-hooks@^0.1.4": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@zeit/git-hooks/-/git-hooks-0.1.4.tgz#70583db5dd69726a62c7963520e67f2c3a33cc5f" + + abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + + abbrev@1.0.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + + acorn-jsx@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + dependencies: + acorn "^3.0.4" + + acorn@^3.0.4: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + + acorn@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" + + ajv-keywords@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" + + ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0: + version "5.5.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + + align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + + amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + + ansi-escapes@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" + + ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + + ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + + ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + + ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + dependencies: + color-convert "^1.9.0" + + arg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arg/-/arg-1.0.1.tgz#892a26d841bd5a64880bbc8f73dd64a705910ca3" + + argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + dependencies: + sprintf-js "~1.0.2" + + array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + + array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + + arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + + asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + + assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + + async@1.x, async@^1.4.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + + asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + + aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + + aws4@^1.6.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" + + babel-code-frame@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + + balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + + bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + + brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + + browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + + buffer-from@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04" + + caller-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + dependencies: + callsites "^0.2.0" + + callsites@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + + camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + + caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + + center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + + chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + + chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + + chardet@^0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" + + circular-json@^0.3.1: + version "0.3.3" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" + + cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + dependencies: + restore-cursor "^2.0.0" + + cli-width@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" + + cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + + co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + + coffeescript@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/coffeescript/-/coffeescript-2.3.1.tgz#a25f69c251d25805c9842e57fc94bfc453ef6aed" + + color-convert@^1.9.0: + version "1.9.2" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.2.tgz#49881b8fba67df12a96bdf3f56c0aab9e7913147" + dependencies: + color-name "1.1.1" + + color-name@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" + + combined-stream@1.0.6, combined-stream@~1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" + dependencies: + delayed-stream "~1.0.0" + + commander@2.15.1: + version "2.15.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" + + concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + + concat-stream@^1.6.0: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + + core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + + coveralls@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.1.tgz#12e15914eaa29204e56869a5ece7b9e1492d2ae2" + dependencies: + js-yaml "^3.6.1" + lcov-parse "^0.0.10" + log-driver "^1.2.5" + minimist "^1.2.0" + request "^2.79.0" + + cross-spawn@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + + dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + + debug@3.1.0, debug@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + dependencies: + ms "2.0.0" + + decamelize@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + + deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + + del@^2.0.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + + delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + + diff@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + + doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + dependencies: + esutils "^2.0.2" + + ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + + escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + + escodegen@1.8.x: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + + eslint-scope@^3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + + eslint-visitor-keys@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" + + eslint@^4.19.1: + version "4.19.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300" + dependencies: + ajv "^5.3.0" + babel-code-frame "^6.22.0" + chalk "^2.1.0" + concat-stream "^1.6.0" + cross-spawn "^5.1.0" + debug "^3.1.0" + doctrine "^2.1.0" + eslint-scope "^3.7.1" + eslint-visitor-keys "^1.0.0" + espree "^3.5.4" + esquery "^1.0.0" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^11.0.1" + ignore "^3.3.3" + imurmurhash "^0.1.4" + inquirer "^3.0.6" + is-resolvable "^1.0.0" + js-yaml "^3.9.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.4" + minimatch "^3.0.2" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + pluralize "^7.0.0" + progress "^2.0.0" + regexpp "^1.0.1" + require-uncached "^1.0.3" + semver "^5.3.0" + strip-ansi "^4.0.0" + strip-json-comments "~2.0.1" + table "4.0.2" + text-table "~0.2.0" + + espree@^3.5.4: + version "3.5.4" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" + dependencies: + acorn "^5.5.0" + acorn-jsx "^3.0.0" + + esprima@2.7.x, esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + + esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + + esquery@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" + dependencies: + estraverse "^4.0.0" + + esrecurse@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + dependencies: + estraverse "^4.1.0" + + estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + + estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + + esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + + extend@~3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + + external-editor@^2.0.4: + version "2.2.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" + dependencies: + chardet "^0.4.0" + iconv-lite "^0.4.17" + tmp "^0.0.33" + + extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + + extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + + fast-deep-equal@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" + + fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + + fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + + figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + dependencies: + escape-string-regexp "^1.0.5" + + file-entry-cache@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + + flat-cache@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" + dependencies: + circular-json "^0.3.1" + del "^2.0.2" + graceful-fs "^4.1.2" + write "^0.2.1" + + forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + + form-data@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" + dependencies: + asynckit "^0.4.0" + combined-stream "1.0.6" + mime-types "^2.1.12" + + fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + + functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + + getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + + glob@7.1.2, glob@^7.0.3, glob@^7.0.5, glob@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + + glob@^5.0.15: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + + globals@^11.0.1: + version "11.5.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.5.0.tgz#6bc840de6771173b191f13d3a9c94d441ee92642" + + globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + + graceful-fs@^4.1.2: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + + growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + + handlebars@^4.0.1: + version "4.0.11" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + + har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + + har-validator@~5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" + dependencies: + ajv "^5.1.0" + har-schema "^2.0.0" + + has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + + has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + + has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + + he@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" + + http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + + iconv-lite@^0.4.17: + version "0.4.23" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" + dependencies: + safer-buffer ">= 2.1.2 < 3" + + ignore@^3.3.3: + version "3.3.8" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.8.tgz#3f8e9c35d38708a3a7e0e9abb6c73e7ee7707b2b" + + imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + + inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + + inherits@2, inherits@^2.0.3, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + + inquirer@^3.0.6: + version "3.3.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.0.4" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" + + is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + + is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + + is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + + is-path-in-cwd@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52" + dependencies: + is-path-inside "^1.0.0" + + is-path-inside@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" + dependencies: + path-is-inside "^1.0.1" + + is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + + is-resolvable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" + + is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + + isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + + isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + + isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + + istanbul@^0.4.5: + version "0.4.5" + resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" + dependencies: + abbrev "1.0.x" + async "1.x" + escodegen "1.8.x" + esprima "2.7.x" + glob "^5.0.15" + handlebars "^4.0.1" + js-yaml "3.x" + mkdirp "0.5.x" + nopt "3.x" + once "1.x" + resolve "1.1.x" + supports-color "^3.1.0" + which "^1.1.1" + wordwrap "^1.0.0" + + js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + + js-yaml@3.x, js-yaml@^3.6.1, js-yaml@^3.9.1: + version "3.12.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + + jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + + json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + + json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + + json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + + json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + + jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + + kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + + lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + + lcov-parse@^0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" + + levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + + lodash@^4.17.4, lodash@^4.3.0: + version "4.17.10" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" + + log-driver@^1.2.5: + version "1.2.7" + resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" + + longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + + lru-cache@^4.0.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + + mime-db@~1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" + + mime-types@^2.1.12, mime-types@~2.1.17: + version "2.1.18" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" + dependencies: + mime-db "~1.33.0" + + mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + + "minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + + minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + + minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + + minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + + mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + + mocha@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6" + dependencies: + browser-stdout "1.3.1" + commander "2.15.1" + debug "3.1.0" + diff "3.5.0" + escape-string-regexp "1.0.5" + glob "7.1.2" + growl "1.10.5" + he "1.1.1" + minimatch "3.0.4" + mkdirp "0.5.1" + supports-color "5.4.0" + + ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + + mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + + natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + + nopt@3.x: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + dependencies: + abbrev "1" + + oauth-sign@~0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + + object-assign@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + + once@1.x, once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + + onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + dependencies: + mimic-fn "^1.0.0" + + optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + + optionator@^0.8.1, optionator@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + + os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + + path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + + path-is-inside@^1.0.1, path-is-inside@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + + performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + + pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + + pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + + pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + + pluralize@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" + + prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + + process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + + progress@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" + + pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + + punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + + qs@~6.5.1: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + + readable-stream@^2.2.2: + version "2.3.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + + regexpp@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab" + + repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + + request@^2.79.0: + version "2.87.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e" + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.6.0" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.1" + forever-agent "~0.6.1" + form-data "~2.3.1" + har-validator "~5.0.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.17" + oauth-sign "~0.8.2" + performance-now "^2.1.0" + qs "~6.5.1" + safe-buffer "^5.1.1" + tough-cookie "~2.3.3" + tunnel-agent "^0.6.0" + uuid "^3.1.0" + + require-uncached@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + + resolve-from@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + + resolve@1.1.x: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + + restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + + right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + + rimraf@^2.2.8: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + dependencies: + glob "^7.0.5" + + run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + dependencies: + is-promise "^2.1.0" + + rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + dependencies: + rx-lite "*" + + rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" + + safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + + "safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + + semver@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" + + shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + + shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + + should-equal@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/should-equal/-/should-equal-2.0.0.tgz#6072cf83047360867e68e98b09d71143d04ee0c3" + dependencies: + should-type "^1.4.0" + + should-format@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/should-format/-/should-format-3.0.3.tgz#9bfc8f74fa39205c53d38c34d717303e277124f1" + dependencies: + should-type "^1.3.0" + should-type-adaptors "^1.0.1" + + should-type-adaptors@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz#401e7f33b5533033944d5cd8bf2b65027792e27a" + dependencies: + should-type "^1.3.0" + should-util "^1.0.0" + + should-type@^1.3.0, should-type@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/should-type/-/should-type-1.4.0.tgz#0756d8ce846dfd09843a6947719dfa0d4cff5cf3" + + should-util@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/should-util/-/should-util-1.0.0.tgz#c98cda374aa6b190df8ba87c9889c2b4db620063" + + should@^13.2.1: + version "13.2.1" + resolved "https://registry.yarnpkg.com/should/-/should-13.2.1.tgz#84e6ebfbb145c79e0ae42307b25b3f62dcaf574e" + dependencies: + should-equal "^2.0.0" + should-format "^3.0.3" + should-type "^1.4.0" + should-type-adaptors "^1.0.1" + should-util "^1.0.0" + + signal-exit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + + slice-ansi@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" + dependencies: + is-fullwidth-code-point "^2.0.0" + + source-map@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + + source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + dependencies: + amdefine ">=0.0.4" + + source-map@~0.5.1: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + + sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + + sshpk@^1.7.0: + version "1.14.2" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + safer-buffer "^2.0.2" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + + string-width@^2.1.0, string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + + string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + dependencies: + safe-buffer "~5.1.0" + + strip-ansi@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + + strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + + strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + + supports-color@5.4.0, supports-color@^5.3.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" + dependencies: + has-flag "^3.0.0" + + supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + + supports-color@^3.1.0: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + + table@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" + dependencies: + ajv "^5.2.3" + ajv-keywords "^2.1.0" + chalk "^2.1.0" + lodash "^4.17.4" + slice-ansi "1.0.0" + string-width "^2.1.1" + + text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + + through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + + tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + dependencies: + os-tmpdir "~1.0.2" + + tough-cookie@~2.3.3: + version "2.3.4" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" + dependencies: + punycode "^1.4.1" + + tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + + tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + + type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + + typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + + uglify-js@^2.6: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + + uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + + util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + + uuid@^3.1.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" + + verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + + which@^1.1.1, which@^1.2.9: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + dependencies: + isexe "^2.0.0" + + window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + + wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + + wordwrap@^1.0.0, wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + + wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + + wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + + write@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + dependencies: + mkdirp "^0.5.1" + + yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + + yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" + +Trace: + Error: Command failed. + Exit code: 1 + Command: sh + Arguments: -c mocha --require coffeescript/register + Directory: /src/qix-/node-is-arrayish + Output: + + at ProcessTermError.MessageError (/Users/junon/.yarn/lib/cli.js:186:110) + at new ProcessTermError (/Users/junon/.yarn/lib/cli.js:226:113) + at ChildProcess. (/Users/junon/.yarn/lib/cli.js:30281:17) + at ChildProcess.emit (events.js:127:13) + at maybeClose (internal/child_process.js:933:16) + at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5) diff --git a/node_modules/math-intrinsics/.eslintrc b/node_modules/math-intrinsics/.eslintrc new file mode 100644 index 0000000..d90a1bc --- /dev/null +++ b/node_modules/math-intrinsics/.eslintrc @@ -0,0 +1,16 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "eqeqeq": ["error", "allow-null"], + "id-length": "off", + "new-cap": ["error", { + "capIsNewExceptions": [ + "RequireObjectCoercible", + "ToObject", + ], + }], + }, +} diff --git a/node_modules/math-intrinsics/.github/FUNDING.yml b/node_modules/math-intrinsics/.github/FUNDING.yml new file mode 100644 index 0000000..868f4ff --- /dev/null +++ b/node_modules/math-intrinsics/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/math-intrinsics +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/math-intrinsics/CHANGELOG.md b/node_modules/math-intrinsics/CHANGELOG.md new file mode 100644 index 0000000..9cf48f5 --- /dev/null +++ b/node_modules/math-intrinsics/CHANGELOG.md @@ -0,0 +1,24 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.0](https://github.com/es-shims/math-intrinsics/compare/v1.0.0...v1.1.0) - 2024-12-18 + +### Commits + +- [New] add `round` [`7cfb044`](https://github.com/es-shims/math-intrinsics/commit/7cfb04460c0fbdf1ca101eecbac3f59d11994130) +- [Tests] add attw [`e96be8f`](https://github.com/es-shims/math-intrinsics/commit/e96be8fbf58449eafe976446a0470e6ea561ad8d) +- [Dev Deps] update `@types/tape` [`30d0023`](https://github.com/es-shims/math-intrinsics/commit/30d00234ce8a3fa0094a61cd55d6686eb91e36ec) + +## v1.0.0 - 2024-12-11 + +### Commits + +- Initial implementation, tests, readme, types [`b898caa`](https://github.com/es-shims/math-intrinsics/commit/b898caae94e9994a94a42b8740f7bbcfd0a868fe) +- Initial commit [`02745b0`](https://github.com/es-shims/math-intrinsics/commit/02745b03a62255af8a332771987b55d127538d9c) +- [New] add `constants/maxArrayLength`, `mod` [`b978178`](https://github.com/es-shims/math-intrinsics/commit/b978178a57685bd23ed1c7efe2137f3784f5fcc5) +- npm init [`a39fc57`](https://github.com/es-shims/math-intrinsics/commit/a39fc57e5639a645d0bd52a0dc56202480223be2) +- Only apps should have lockfiles [`9451580`](https://github.com/es-shims/math-intrinsics/commit/94515800fb34db4f3cc7e99290042d45609ac7bd) diff --git a/node_modules/math-intrinsics/LICENSE b/node_modules/math-intrinsics/LICENSE new file mode 100644 index 0000000..34995e7 --- /dev/null +++ b/node_modules/math-intrinsics/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 ECMAScript Shims + +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. diff --git a/node_modules/math-intrinsics/README.md b/node_modules/math-intrinsics/README.md new file mode 100644 index 0000000..4a66dcf --- /dev/null +++ b/node_modules/math-intrinsics/README.md @@ -0,0 +1,50 @@ +# math-intrinsics [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +ES Math-related intrinsics and helpers, robustly cached. + + - `abs` + - `floor` + - `isFinite` + - `isInteger` + - `isNaN` + - `isNegativeZero` + - `max` + - `min` + - `mod` + - `pow` + - `round` + - `sign` + - `constants/maxArrayLength` + - `constants/maxSafeInteger` + - `constants/maxValue` + + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/math-intrinsics +[npm-version-svg]: https://versionbadg.es/es-shims/math-intrinsics.svg +[deps-svg]: https://david-dm.org/es-shims/math-intrinsics.svg +[deps-url]: https://david-dm.org/es-shims/math-intrinsics +[dev-deps-svg]: https://david-dm.org/es-shims/math-intrinsics/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/math-intrinsics#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/math-intrinsics.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/math-intrinsics.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/es-object.svg +[downloads-url]: https://npm-stat.com/charts.html?package=math-intrinsics +[codecov-image]: https://codecov.io/gh/es-shims/math-intrinsics/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/math-intrinsics/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/math-intrinsics +[actions-url]: https://github.com/es-shims/math-intrinsics/actions diff --git a/node_modules/math-intrinsics/abs.d.ts b/node_modules/math-intrinsics/abs.d.ts new file mode 100644 index 0000000..14ad9c6 --- /dev/null +++ b/node_modules/math-intrinsics/abs.d.ts @@ -0,0 +1 @@ +export = Math.abs; \ No newline at end of file diff --git a/node_modules/math-intrinsics/abs.js b/node_modules/math-intrinsics/abs.js new file mode 100644 index 0000000..a751424 --- /dev/null +++ b/node_modules/math-intrinsics/abs.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./abs')} */ +module.exports = Math.abs; diff --git a/node_modules/math-intrinsics/constants/maxArrayLength.d.ts b/node_modules/math-intrinsics/constants/maxArrayLength.d.ts new file mode 100644 index 0000000..b92d46b --- /dev/null +++ b/node_modules/math-intrinsics/constants/maxArrayLength.d.ts @@ -0,0 +1,3 @@ +declare const MAX_ARRAY_LENGTH: 4294967295; + +export = MAX_ARRAY_LENGTH; \ No newline at end of file diff --git a/node_modules/math-intrinsics/constants/maxArrayLength.js b/node_modules/math-intrinsics/constants/maxArrayLength.js new file mode 100644 index 0000000..cfc6aff --- /dev/null +++ b/node_modules/math-intrinsics/constants/maxArrayLength.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./maxArrayLength')} */ +module.exports = 4294967295; // Math.pow(2, 32) - 1; diff --git a/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts b/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts new file mode 100644 index 0000000..fee3f62 --- /dev/null +++ b/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts @@ -0,0 +1,3 @@ +declare const MAX_SAFE_INTEGER: 9007199254740991; + +export = MAX_SAFE_INTEGER; \ No newline at end of file diff --git a/node_modules/math-intrinsics/constants/maxSafeInteger.js b/node_modules/math-intrinsics/constants/maxSafeInteger.js new file mode 100644 index 0000000..b568ad3 --- /dev/null +++ b/node_modules/math-intrinsics/constants/maxSafeInteger.js @@ -0,0 +1,5 @@ +'use strict'; + +/** @type {import('./maxSafeInteger')} */ +// eslint-disable-next-line no-extra-parens +module.exports = /** @type {import('./maxSafeInteger')} */ (Number.MAX_SAFE_INTEGER) || 9007199254740991; // Math.pow(2, 53) - 1; diff --git a/node_modules/math-intrinsics/constants/maxValue.d.ts b/node_modules/math-intrinsics/constants/maxValue.d.ts new file mode 100644 index 0000000..292cb82 --- /dev/null +++ b/node_modules/math-intrinsics/constants/maxValue.d.ts @@ -0,0 +1,3 @@ +declare const MAX_VALUE: 1.7976931348623157e+308; + +export = MAX_VALUE; diff --git a/node_modules/math-intrinsics/constants/maxValue.js b/node_modules/math-intrinsics/constants/maxValue.js new file mode 100644 index 0000000..a2202dc --- /dev/null +++ b/node_modules/math-intrinsics/constants/maxValue.js @@ -0,0 +1,5 @@ +'use strict'; + +/** @type {import('./maxValue')} */ +// eslint-disable-next-line no-extra-parens +module.exports = /** @type {import('./maxValue')} */ (Number.MAX_VALUE) || 1.7976931348623157e+308; diff --git a/node_modules/math-intrinsics/floor.d.ts b/node_modules/math-intrinsics/floor.d.ts new file mode 100644 index 0000000..9265236 --- /dev/null +++ b/node_modules/math-intrinsics/floor.d.ts @@ -0,0 +1 @@ +export = Math.floor; \ No newline at end of file diff --git a/node_modules/math-intrinsics/floor.js b/node_modules/math-intrinsics/floor.js new file mode 100644 index 0000000..ab0e5d7 --- /dev/null +++ b/node_modules/math-intrinsics/floor.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./floor')} */ +module.exports = Math.floor; diff --git a/node_modules/math-intrinsics/isFinite.d.ts b/node_modules/math-intrinsics/isFinite.d.ts new file mode 100644 index 0000000..6daae33 --- /dev/null +++ b/node_modules/math-intrinsics/isFinite.d.ts @@ -0,0 +1,3 @@ +declare function isFinite(x: unknown): x is number | bigint; + +export = isFinite; \ No newline at end of file diff --git a/node_modules/math-intrinsics/isFinite.js b/node_modules/math-intrinsics/isFinite.js new file mode 100644 index 0000000..b201a5a --- /dev/null +++ b/node_modules/math-intrinsics/isFinite.js @@ -0,0 +1,12 @@ +'use strict'; + +var $isNaN = require('./isNaN'); + +/** @type {import('./isFinite')} */ +module.exports = function isFinite(x) { + return (typeof x === 'number' || typeof x === 'bigint') + && !$isNaN(x) + && x !== Infinity + && x !== -Infinity; +}; + diff --git a/node_modules/math-intrinsics/isInteger.d.ts b/node_modules/math-intrinsics/isInteger.d.ts new file mode 100644 index 0000000..13935a8 --- /dev/null +++ b/node_modules/math-intrinsics/isInteger.d.ts @@ -0,0 +1,3 @@ +declare function isInteger(argument: unknown): argument is number; + +export = isInteger; \ No newline at end of file diff --git a/node_modules/math-intrinsics/isInteger.js b/node_modules/math-intrinsics/isInteger.js new file mode 100644 index 0000000..4b1b9a5 --- /dev/null +++ b/node_modules/math-intrinsics/isInteger.js @@ -0,0 +1,16 @@ +'use strict'; + +var $abs = require('./abs'); +var $floor = require('./floor'); + +var $isNaN = require('./isNaN'); +var $isFinite = require('./isFinite'); + +/** @type {import('./isInteger')} */ +module.exports = function isInteger(argument) { + if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) { + return false; + } + var absValue = $abs(argument); + return $floor(absValue) === absValue; +}; diff --git a/node_modules/math-intrinsics/isNaN.d.ts b/node_modules/math-intrinsics/isNaN.d.ts new file mode 100644 index 0000000..c1d4c55 --- /dev/null +++ b/node_modules/math-intrinsics/isNaN.d.ts @@ -0,0 +1 @@ +export = Number.isNaN; \ No newline at end of file diff --git a/node_modules/math-intrinsics/isNaN.js b/node_modules/math-intrinsics/isNaN.js new file mode 100644 index 0000000..e36475c --- /dev/null +++ b/node_modules/math-intrinsics/isNaN.js @@ -0,0 +1,6 @@ +'use strict'; + +/** @type {import('./isNaN')} */ +module.exports = Number.isNaN || function isNaN(a) { + return a !== a; +}; diff --git a/node_modules/math-intrinsics/isNegativeZero.d.ts b/node_modules/math-intrinsics/isNegativeZero.d.ts new file mode 100644 index 0000000..7ad8819 --- /dev/null +++ b/node_modules/math-intrinsics/isNegativeZero.d.ts @@ -0,0 +1,3 @@ +declare function isNegativeZero(x: unknown): boolean; + +export = isNegativeZero; \ No newline at end of file diff --git a/node_modules/math-intrinsics/isNegativeZero.js b/node_modules/math-intrinsics/isNegativeZero.js new file mode 100644 index 0000000..b69adcc --- /dev/null +++ b/node_modules/math-intrinsics/isNegativeZero.js @@ -0,0 +1,6 @@ +'use strict'; + +/** @type {import('./isNegativeZero')} */ +module.exports = function isNegativeZero(x) { + return x === 0 && 1 / x === 1 / -0; +}; diff --git a/node_modules/math-intrinsics/max.d.ts b/node_modules/math-intrinsics/max.d.ts new file mode 100644 index 0000000..ad6f43e --- /dev/null +++ b/node_modules/math-intrinsics/max.d.ts @@ -0,0 +1 @@ +export = Math.max; \ No newline at end of file diff --git a/node_modules/math-intrinsics/max.js b/node_modules/math-intrinsics/max.js new file mode 100644 index 0000000..edb55df --- /dev/null +++ b/node_modules/math-intrinsics/max.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./max')} */ +module.exports = Math.max; diff --git a/node_modules/math-intrinsics/min.d.ts b/node_modules/math-intrinsics/min.d.ts new file mode 100644 index 0000000..fd90f2d --- /dev/null +++ b/node_modules/math-intrinsics/min.d.ts @@ -0,0 +1 @@ +export = Math.min; \ No newline at end of file diff --git a/node_modules/math-intrinsics/min.js b/node_modules/math-intrinsics/min.js new file mode 100644 index 0000000..5a4a7c7 --- /dev/null +++ b/node_modules/math-intrinsics/min.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./min')} */ +module.exports = Math.min; diff --git a/node_modules/math-intrinsics/mod.d.ts b/node_modules/math-intrinsics/mod.d.ts new file mode 100644 index 0000000..549dbd4 --- /dev/null +++ b/node_modules/math-intrinsics/mod.d.ts @@ -0,0 +1,3 @@ +declare function mod(number: number, modulo: number): number; + +export = mod; \ No newline at end of file diff --git a/node_modules/math-intrinsics/mod.js b/node_modules/math-intrinsics/mod.js new file mode 100644 index 0000000..4a98362 --- /dev/null +++ b/node_modules/math-intrinsics/mod.js @@ -0,0 +1,9 @@ +'use strict'; + +var $floor = require('./floor'); + +/** @type {import('./mod')} */ +module.exports = function mod(number, modulo) { + var remain = number % modulo; + return $floor(remain >= 0 ? remain : remain + modulo); +}; diff --git a/node_modules/math-intrinsics/package.json b/node_modules/math-intrinsics/package.json new file mode 100644 index 0000000..0676273 --- /dev/null +++ b/node_modules/math-intrinsics/package.json @@ -0,0 +1,86 @@ +{ + "name": "math-intrinsics", + "version": "1.1.0", + "description": "ES Math-related intrinsics and helpers, robustly cached.", + "main": false, + "exports": { + "./abs": "./abs.js", + "./floor": "./floor.js", + "./isFinite": "./isFinite.js", + "./isInteger": "./isInteger.js", + "./isNaN": "./isNaN.js", + "./isNegativeZero": "./isNegativeZero.js", + "./max": "./max.js", + "./min": "./min.js", + "./mod": "./mod.js", + "./pow": "./pow.js", + "./sign": "./sign.js", + "./round": "./round.js", + "./constants/maxArrayLength": "./constants/maxArrayLength.js", + "./constants/maxSafeInteger": "./constants/maxSafeInteger.js", + "./constants/maxValue": "./constants/maxValue.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "posttest": "npx npm@'>= 10.2' audit --production", + "prelint": "evalmd README.md && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc && attw -P", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/es-shims/math-intrinsics.git" + }, + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/es-shims/math-intrinsics/issues" + }, + "homepage": "https://github.com/es-shims/math-intrinsics#readme", + "devDependencies": { + "@arethetypeswrong/cli": "^0.17.1", + "@ljharb/eslint-config": "^21.1.1", + "@ljharb/tsconfig": "^0.2.2", + "@types/for-each": "^0.3.3", + "@types/object-inspect": "^1.13.0", + "@types/tape": "^5.8.0", + "auto-changelog": "^2.5.0", + "eclint": "^2.8.1", + "es-value-fixtures": "^1.5.0", + "eslint": "^8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.3", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/math-intrinsics/pow.d.ts b/node_modules/math-intrinsics/pow.d.ts new file mode 100644 index 0000000..5873c44 --- /dev/null +++ b/node_modules/math-intrinsics/pow.d.ts @@ -0,0 +1 @@ +export = Math.pow; \ No newline at end of file diff --git a/node_modules/math-intrinsics/pow.js b/node_modules/math-intrinsics/pow.js new file mode 100644 index 0000000..c0a4103 --- /dev/null +++ b/node_modules/math-intrinsics/pow.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./pow')} */ +module.exports = Math.pow; diff --git a/node_modules/math-intrinsics/round.d.ts b/node_modules/math-intrinsics/round.d.ts new file mode 100644 index 0000000..da1fde3 --- /dev/null +++ b/node_modules/math-intrinsics/round.d.ts @@ -0,0 +1 @@ +export = Math.round; \ No newline at end of file diff --git a/node_modules/math-intrinsics/round.js b/node_modules/math-intrinsics/round.js new file mode 100644 index 0000000..b792156 --- /dev/null +++ b/node_modules/math-intrinsics/round.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./round')} */ +module.exports = Math.round; diff --git a/node_modules/math-intrinsics/sign.d.ts b/node_modules/math-intrinsics/sign.d.ts new file mode 100644 index 0000000..c49ceca --- /dev/null +++ b/node_modules/math-intrinsics/sign.d.ts @@ -0,0 +1,3 @@ +declare function sign(x: number): number; + +export = sign; \ No newline at end of file diff --git a/node_modules/math-intrinsics/sign.js b/node_modules/math-intrinsics/sign.js new file mode 100644 index 0000000..9e5173c --- /dev/null +++ b/node_modules/math-intrinsics/sign.js @@ -0,0 +1,11 @@ +'use strict'; + +var $isNaN = require('./isNaN'); + +/** @type {import('./sign')} */ +module.exports = function sign(number) { + if ($isNaN(number) || number === 0) { + return number; + } + return number < 0 ? -1 : +1; +}; diff --git a/node_modules/math-intrinsics/test/index.js b/node_modules/math-intrinsics/test/index.js new file mode 100644 index 0000000..0f90a5d --- /dev/null +++ b/node_modules/math-intrinsics/test/index.js @@ -0,0 +1,192 @@ +'use strict'; + +var test = require('tape'); +var v = require('es-value-fixtures'); +var forEach = require('for-each'); +var inspect = require('object-inspect'); + +var abs = require('../abs'); +var floor = require('../floor'); +var isFinite = require('../isFinite'); +var isInteger = require('../isInteger'); +var isNaN = require('../isNaN'); +var isNegativeZero = require('../isNegativeZero'); +var max = require('../max'); +var min = require('../min'); +var mod = require('../mod'); +var pow = require('../pow'); +var round = require('../round'); +var sign = require('../sign'); + +var maxArrayLength = require('../constants/maxArrayLength'); +var maxSafeInteger = require('../constants/maxSafeInteger'); +var maxValue = require('../constants/maxValue'); + +test('abs', function (t) { + t.equal(abs(-1), 1, 'abs(-1) === 1'); + t.equal(abs(+1), 1, 'abs(+1) === 1'); + t.equal(abs(+0), +0, 'abs(+0) === +0'); + t.equal(abs(-0), +0, 'abs(-0) === +0'); + + t.end(); +}); + +test('floor', function (t) { + t.equal(floor(-1.1), -2, 'floor(-1.1) === -2'); + t.equal(floor(+1.1), 1, 'floor(+1.1) === 1'); + t.equal(floor(+0), +0, 'floor(+0) === +0'); + t.equal(floor(-0), -0, 'floor(-0) === -0'); + t.equal(floor(-Infinity), -Infinity, 'floor(-Infinity) === -Infinity'); + t.equal(floor(Number(Infinity)), Number(Infinity), 'floor(+Infinity) === +Infinity'); + t.equal(floor(NaN), NaN, 'floor(NaN) === NaN'); + t.equal(floor(0), +0, 'floor(0) === +0'); + t.equal(floor(-0), -0, 'floor(-0) === -0'); + t.equal(floor(1), 1, 'floor(1) === 1'); + t.equal(floor(-1), -1, 'floor(-1) === -1'); + t.equal(floor(1.1), 1, 'floor(1.1) === 1'); + t.equal(floor(-1.1), -2, 'floor(-1.1) === -2'); + t.equal(floor(maxValue), maxValue, 'floor(maxValue) === maxValue'); + t.equal(floor(maxSafeInteger), maxSafeInteger, 'floor(maxSafeInteger) === maxSafeInteger'); + + t.end(); +}); + +test('isFinite', function (t) { + t.equal(isFinite(0), true, 'isFinite(+0) === true'); + t.equal(isFinite(-0), true, 'isFinite(-0) === true'); + t.equal(isFinite(1), true, 'isFinite(1) === true'); + t.equal(isFinite(Infinity), false, 'isFinite(Infinity) === false'); + t.equal(isFinite(-Infinity), false, 'isFinite(-Infinity) === false'); + t.equal(isFinite(NaN), false, 'isFinite(NaN) === false'); + + forEach(v.nonNumbers, function (nonNumber) { + t.equal(isFinite(nonNumber), false, 'isFinite(' + inspect(nonNumber) + ') === false'); + }); + + t.end(); +}); + +test('isInteger', function (t) { + forEach([].concat( + // @ts-expect-error TS sucks with concat + v.nonNumbers, + v.nonIntegerNumbers + ), function (nonInteger) { + t.equal(isInteger(nonInteger), false, 'isInteger(' + inspect(nonInteger) + ') === false'); + }); + + t.end(); +}); + +test('isNaN', function (t) { + forEach([].concat( + // @ts-expect-error TS sucks with concat + v.nonNumbers, + v.infinities, + v.zeroes, + v.integerNumbers + ), function (nonNaN) { + t.equal(isNaN(nonNaN), false, 'isNaN(' + inspect(nonNaN) + ') === false'); + }); + + t.equal(isNaN(NaN), true, 'isNaN(NaN) === true'); + + t.end(); +}); + +test('isNegativeZero', function (t) { + t.equal(isNegativeZero(-0), true, 'isNegativeZero(-0) === true'); + t.equal(isNegativeZero(+0), false, 'isNegativeZero(+0) === false'); + t.equal(isNegativeZero(1), false, 'isNegativeZero(1) === false'); + t.equal(isNegativeZero(-1), false, 'isNegativeZero(-1) === false'); + t.equal(isNegativeZero(NaN), false, 'isNegativeZero(NaN) === false'); + t.equal(isNegativeZero(Infinity), false, 'isNegativeZero(Infinity) === false'); + t.equal(isNegativeZero(-Infinity), false, 'isNegativeZero(-Infinity) === false'); + + forEach(v.nonNumbers, function (nonNumber) { + t.equal(isNegativeZero(nonNumber), false, 'isNegativeZero(' + inspect(nonNumber) + ') === false'); + }); + + t.end(); +}); + +test('max', function (t) { + t.equal(max(1, 2), 2, 'max(1, 2) === 2'); + t.equal(max(1, 2, 3), 3, 'max(1, 2, 3) === 3'); + t.equal(max(1, 2, 3, 4), 4, 'max(1, 2, 3, 4) === 4'); + t.equal(max(1, 2, 3, 4, 5), 5, 'max(1, 2, 3, 4, 5) === 5'); + t.equal(max(1, 2, 3, 4, 5, 6), 6, 'max(1, 2, 3, 4, 5, 6) === 6'); + t.equal(max(1, 2, 3, 4, 5, 6, 7), 7, 'max(1, 2, 3, 4, 5, 6, 7) === 7'); + + t.end(); +}); + +test('min', function (t) { + t.equal(min(1, 2), 1, 'min(1, 2) === 1'); + t.equal(min(1, 2, 3), 1, 'min(1, 2, 3) === 1'); + t.equal(min(1, 2, 3, 4), 1, 'min(1, 2, 3, 4) === 1'); + t.equal(min(1, 2, 3, 4, 5), 1, 'min(1, 2, 3, 4, 5) === 1'); + t.equal(min(1, 2, 3, 4, 5, 6), 1, 'min(1, 2, 3, 4, 5, 6) === 1'); + + t.end(); +}); + +test('mod', function (t) { + t.equal(mod(1, 2), 1, 'mod(1, 2) === 1'); + t.equal(mod(2, 2), 0, 'mod(2, 2) === 0'); + t.equal(mod(3, 2), 1, 'mod(3, 2) === 1'); + t.equal(mod(4, 2), 0, 'mod(4, 2) === 0'); + t.equal(mod(5, 2), 1, 'mod(5, 2) === 1'); + t.equal(mod(6, 2), 0, 'mod(6, 2) === 0'); + t.equal(mod(7, 2), 1, 'mod(7, 2) === 1'); + t.equal(mod(8, 2), 0, 'mod(8, 2) === 0'); + t.equal(mod(9, 2), 1, 'mod(9, 2) === 1'); + t.equal(mod(10, 2), 0, 'mod(10, 2) === 0'); + t.equal(mod(11, 2), 1, 'mod(11, 2) === 1'); + + t.end(); +}); + +test('pow', function (t) { + t.equal(pow(2, 2), 4, 'pow(2, 2) === 4'); + t.equal(pow(2, 3), 8, 'pow(2, 3) === 8'); + t.equal(pow(2, 4), 16, 'pow(2, 4) === 16'); + t.equal(pow(2, 5), 32, 'pow(2, 5) === 32'); + t.equal(pow(2, 6), 64, 'pow(2, 6) === 64'); + t.equal(pow(2, 7), 128, 'pow(2, 7) === 128'); + t.equal(pow(2, 8), 256, 'pow(2, 8) === 256'); + t.equal(pow(2, 9), 512, 'pow(2, 9) === 512'); + t.equal(pow(2, 10), 1024, 'pow(2, 10) === 1024'); + + t.end(); +}); + +test('round', function (t) { + t.equal(round(1.1), 1, 'round(1.1) === 1'); + t.equal(round(1.5), 2, 'round(1.5) === 2'); + t.equal(round(1.9), 2, 'round(1.9) === 2'); + + t.end(); +}); + +test('sign', function (t) { + t.equal(sign(-1), -1, 'sign(-1) === -1'); + t.equal(sign(+1), +1, 'sign(+1) === +1'); + t.equal(sign(+0), +0, 'sign(+0) === +0'); + t.equal(sign(-0), -0, 'sign(-0) === -0'); + t.equal(sign(NaN), NaN, 'sign(NaN) === NaN'); + t.equal(sign(Infinity), +1, 'sign(Infinity) === +1'); + t.equal(sign(-Infinity), -1, 'sign(-Infinity) === -1'); + t.equal(sign(maxValue), +1, 'sign(maxValue) === +1'); + t.equal(sign(maxSafeInteger), +1, 'sign(maxSafeInteger) === +1'); + + t.end(); +}); + +test('constants', function (t) { + t.equal(typeof maxArrayLength, 'number', 'typeof maxArrayLength === "number"'); + t.equal(typeof maxSafeInteger, 'number', 'typeof maxSafeInteger === "number"'); + t.equal(typeof maxValue, 'number', 'typeof maxValue === "number"'); + + t.end(); +}); diff --git a/node_modules/math-intrinsics/tsconfig.json b/node_modules/math-intrinsics/tsconfig.json new file mode 100644 index 0000000..b131000 --- /dev/null +++ b/node_modules/math-intrinsics/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@ljharb/tsconfig", +} diff --git a/node_modules/media-typer/HISTORY.md b/node_modules/media-typer/HISTORY.md new file mode 100644 index 0000000..62c2003 --- /dev/null +++ b/node_modules/media-typer/HISTORY.md @@ -0,0 +1,22 @@ +0.3.0 / 2014-09-07 +================== + + * Support Node.js 0.6 + * Throw error when parameter format invalid on parse + +0.2.0 / 2014-06-18 +================== + + * Add `typer.format()` to format media types + +0.1.0 / 2014-06-17 +================== + + * Accept `req` as argument to `parse` + * Accept `res` as argument to `parse` + * Parse media type with extra LWS between type and first parameter + +0.0.0 / 2014-06-13 +================== + + * Initial implementation diff --git a/node_modules/media-typer/LICENSE b/node_modules/media-typer/LICENSE new file mode 100644 index 0000000..b7dce6c --- /dev/null +++ b/node_modules/media-typer/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014 Douglas Christopher Wilson + +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. diff --git a/node_modules/media-typer/README.md b/node_modules/media-typer/README.md new file mode 100644 index 0000000..d8df623 --- /dev/null +++ b/node_modules/media-typer/README.md @@ -0,0 +1,81 @@ +# media-typer + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Simple RFC 6838 media type parser + +## Installation + +```sh +$ npm install media-typer +``` + +## API + +```js +var typer = require('media-typer') +``` + +### typer.parse(string) + +```js +var obj = typer.parse('image/svg+xml; charset=utf-8') +``` + +Parse a media type string. This will return an object with the following +properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`): + + - `type`: The type of the media type (always lower case). Example: `'image'` + + - `subtype`: The subtype of the media type (always lower case). Example: `'svg'` + + - `suffix`: The suffix of the media type (always lower case). Example: `'xml'` + + - `parameters`: An object of the parameters in the media type (name of parameter always lower case). Example: `{charset: 'utf-8'}` + +### typer.parse(req) + +```js +var obj = typer.parse(req) +``` + +Parse the `content-type` header from the given `req`. Short-cut for +`typer.parse(req.headers['content-type'])`. + +### typer.parse(res) + +```js +var obj = typer.parse(res) +``` + +Parse the `content-type` header set on the given `res`. Short-cut for +`typer.parse(res.getHeader('content-type'))`. + +### typer.format(obj) + +```js +var obj = typer.format({type: 'image', subtype: 'svg', suffix: 'xml'}) +``` + +Format an object into a media type string. This will return a string of the +mime type for the given object. For the properties of the object, see the +documentation for `typer.parse(string)`. + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/media-typer.svg?style=flat +[npm-url]: https://npmjs.org/package/media-typer +[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat +[node-version-url]: http://nodejs.org/download/ +[travis-image]: https://img.shields.io/travis/jshttp/media-typer.svg?style=flat +[travis-url]: https://travis-ci.org/jshttp/media-typer +[coveralls-image]: https://img.shields.io/coveralls/jshttp/media-typer.svg?style=flat +[coveralls-url]: https://coveralls.io/r/jshttp/media-typer +[downloads-image]: https://img.shields.io/npm/dm/media-typer.svg?style=flat +[downloads-url]: https://npmjs.org/package/media-typer diff --git a/node_modules/media-typer/index.js b/node_modules/media-typer/index.js new file mode 100644 index 0000000..07f7295 --- /dev/null +++ b/node_modules/media-typer/index.js @@ -0,0 +1,270 @@ +/*! + * media-typer + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + */ + +/** + * RegExp to match *( ";" parameter ) in RFC 2616 sec 3.7 + * + * parameter = token "=" ( token | quoted-string ) + * token = 1* + * separators = "(" | ")" | "<" | ">" | "@" + * | "," | ";" | ":" | "\" | <"> + * | "/" | "[" | "]" | "?" | "=" + * | "{" | "}" | SP | HT + * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> ) + * qdtext = > + * quoted-pair = "\" CHAR + * CHAR = + * TEXT = + * LWS = [CRLF] 1*( SP | HT ) + * CRLF = CR LF + * CR = + * LF = + * SP = + * SHT = + * CTL = + * OCTET = + */ +var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g; +var textRegExp = /^[\u0020-\u007e\u0080-\u00ff]+$/ +var tokenRegExp = /^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/ + +/** + * RegExp to match quoted-pair in RFC 2616 + * + * quoted-pair = "\" CHAR + * CHAR = + */ +var qescRegExp = /\\([\u0000-\u007f])/g; + +/** + * RegExp to match chars that must be quoted-pair in RFC 2616 + */ +var quoteRegExp = /([\\"])/g; + +/** + * RegExp to match type in RFC 6838 + * + * type-name = restricted-name + * subtype-name = restricted-name + * restricted-name = restricted-name-first *126restricted-name-chars + * restricted-name-first = ALPHA / DIGIT + * restricted-name-chars = ALPHA / DIGIT / "!" / "#" / + * "$" / "&" / "-" / "^" / "_" + * restricted-name-chars =/ "." ; Characters before first dot always + * ; specify a facet name + * restricted-name-chars =/ "+" ; Characters after last plus always + * ; specify a structured syntax suffix + * ALPHA = %x41-5A / %x61-7A ; A-Z / a-z + * DIGIT = %x30-39 ; 0-9 + */ +var subtypeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/ +var typeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/ +var typeRegExp = /^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/; + +/** + * Module exports. + */ + +exports.format = format +exports.parse = parse + +/** + * Format object to media type. + * + * @param {object} obj + * @return {string} + * @api public + */ + +function format(obj) { + if (!obj || typeof obj !== 'object') { + throw new TypeError('argument obj is required') + } + + var parameters = obj.parameters + var subtype = obj.subtype + var suffix = obj.suffix + var type = obj.type + + if (!type || !typeNameRegExp.test(type)) { + throw new TypeError('invalid type') + } + + if (!subtype || !subtypeNameRegExp.test(subtype)) { + throw new TypeError('invalid subtype') + } + + // format as type/subtype + var string = type + '/' + subtype + + // append +suffix + if (suffix) { + if (!typeNameRegExp.test(suffix)) { + throw new TypeError('invalid suffix') + } + + string += '+' + suffix + } + + // append parameters + if (parameters && typeof parameters === 'object') { + var param + var params = Object.keys(parameters).sort() + + for (var i = 0; i < params.length; i++) { + param = params[i] + + if (!tokenRegExp.test(param)) { + throw new TypeError('invalid parameter name') + } + + string += '; ' + param + '=' + qstring(parameters[param]) + } + } + + return string +} + +/** + * Parse media type to object. + * + * @param {string|object} string + * @return {Object} + * @api public + */ + +function parse(string) { + if (!string) { + throw new TypeError('argument string is required') + } + + // support req/res-like objects as argument + if (typeof string === 'object') { + string = getcontenttype(string) + } + + if (typeof string !== 'string') { + throw new TypeError('argument string is required to be a string') + } + + var index = string.indexOf(';') + var type = index !== -1 + ? string.substr(0, index) + : string + + var key + var match + var obj = splitType(type) + var params = {} + var value + + paramRegExp.lastIndex = index + + while (match = paramRegExp.exec(string)) { + if (match.index !== index) { + throw new TypeError('invalid parameter format') + } + + index += match[0].length + key = match[1].toLowerCase() + value = match[2] + + if (value[0] === '"') { + // remove quotes and escapes + value = value + .substr(1, value.length - 2) + .replace(qescRegExp, '$1') + } + + params[key] = value + } + + if (index !== -1 && index !== string.length) { + throw new TypeError('invalid parameter format') + } + + obj.parameters = params + + return obj +} + +/** + * Get content-type from req/res objects. + * + * @param {object} + * @return {Object} + * @api private + */ + +function getcontenttype(obj) { + if (typeof obj.getHeader === 'function') { + // res-like + return obj.getHeader('content-type') + } + + if (typeof obj.headers === 'object') { + // req-like + return obj.headers && obj.headers['content-type'] + } +} + +/** + * Quote a string if necessary. + * + * @param {string} val + * @return {string} + * @api private + */ + +function qstring(val) { + var str = String(val) + + // no need to quote tokens + if (tokenRegExp.test(str)) { + return str + } + + if (str.length > 0 && !textRegExp.test(str)) { + throw new TypeError('invalid parameter value') + } + + return '"' + str.replace(quoteRegExp, '\\$1') + '"' +} + +/** + * Simply "type/subtype+siffx" into parts. + * + * @param {string} string + * @return {Object} + * @api private + */ + +function splitType(string) { + var match = typeRegExp.exec(string.toLowerCase()) + + if (!match) { + throw new TypeError('invalid media type') + } + + var type = match[1] + var subtype = match[2] + var suffix + + // suffix after last + + var index = subtype.lastIndexOf('+') + if (index !== -1) { + suffix = subtype.substr(index + 1) + subtype = subtype.substr(0, index) + } + + var obj = { + type: type, + subtype: subtype, + suffix: suffix + } + + return obj +} diff --git a/node_modules/media-typer/package.json b/node_modules/media-typer/package.json new file mode 100644 index 0000000..8cf3ebc --- /dev/null +++ b/node_modules/media-typer/package.json @@ -0,0 +1,26 @@ +{ + "name": "media-typer", + "description": "Simple RFC 6838 media type parser and formatter", + "version": "0.3.0", + "author": "Douglas Christopher Wilson ", + "license": "MIT", + "repository": "jshttp/media-typer", + "devDependencies": { + "istanbul": "0.3.2", + "mocha": "~1.21.4", + "should": "~4.0.4" + }, + "files": [ + "LICENSE", + "HISTORY.md", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "test": "mocha --reporter spec --check-leaks --bail test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + } +} diff --git a/node_modules/merge-descriptors/HISTORY.md b/node_modules/merge-descriptors/HISTORY.md new file mode 100644 index 0000000..486771f --- /dev/null +++ b/node_modules/merge-descriptors/HISTORY.md @@ -0,0 +1,21 @@ +1.0.1 / 2016-01-17 +================== + + * perf: enable strict mode + +1.0.0 / 2015-03-01 +================== + + * Add option to only add new descriptors + * Add simple argument validation + * Add jsdoc to source file + +0.0.2 / 2013-12-14 +================== + + * Move repository to `component` organization + +0.0.1 / 2013-10-29 +================== + + * Initial release diff --git a/node_modules/merge-descriptors/LICENSE b/node_modules/merge-descriptors/LICENSE new file mode 100644 index 0000000..274bfd8 --- /dev/null +++ b/node_modules/merge-descriptors/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2013 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +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. diff --git a/node_modules/merge-descriptors/README.md b/node_modules/merge-descriptors/README.md new file mode 100644 index 0000000..3403f4a --- /dev/null +++ b/node_modules/merge-descriptors/README.md @@ -0,0 +1,49 @@ +# merge-descriptors + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Merge objects using descriptors. + +```js +var thing = { + get name() { + return 'jon' + } +} + +var animal = { + +} + +merge(animal, thing) + +animal.name === 'jon' +``` + +## API + +### merge(destination, source) + +Redefines `destination`'s descriptors with `source`'s. The return value is the +`destination` object. + +### merge(destination, source, false) + +Defines `source`'s descriptors on `destination` if `destination` does not have +a descriptor by the same name. The return value is the `destination` object. + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/merge-descriptors.svg +[npm-url]: https://npmjs.org/package/merge-descriptors +[travis-image]: https://img.shields.io/travis/component/merge-descriptors/master.svg +[travis-url]: https://travis-ci.org/component/merge-descriptors +[coveralls-image]: https://img.shields.io/coveralls/component/merge-descriptors/master.svg +[coveralls-url]: https://coveralls.io/r/component/merge-descriptors?branch=master +[downloads-image]: https://img.shields.io/npm/dm/merge-descriptors.svg +[downloads-url]: https://npmjs.org/package/merge-descriptors diff --git a/node_modules/merge-descriptors/index.js b/node_modules/merge-descriptors/index.js new file mode 100644 index 0000000..f22ebab --- /dev/null +++ b/node_modules/merge-descriptors/index.js @@ -0,0 +1,60 @@ +/*! + * merge-descriptors + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module exports. + * @public + */ + +module.exports = merge + +/** + * Module variables. + * @private + */ + +var hasOwnProperty = Object.prototype.hasOwnProperty + +/** + * Merge the property descriptors of `src` into `dest` + * + * @param {object} dest Object to add descriptors to + * @param {object} src Object to clone descriptors from + * @param {boolean} [redefine=true] Redefine `dest` properties with `src` properties + * @returns {object} Reference to dest + * @public + */ + +function merge (dest, src, redefine) { + if (!dest) { + throw new TypeError('argument dest is required') + } + + if (!src) { + throw new TypeError('argument src is required') + } + + if (redefine === undefined) { + // Default to true + redefine = true + } + + Object.getOwnPropertyNames(src).forEach(function forEachOwnPropertyName (name) { + if (!redefine && hasOwnProperty.call(dest, name)) { + // Skip descriptor + return + } + + // Copy descriptor + var descriptor = Object.getOwnPropertyDescriptor(src, name) + Object.defineProperty(dest, name, descriptor) + }) + + return dest +} diff --git a/node_modules/merge-descriptors/package.json b/node_modules/merge-descriptors/package.json new file mode 100644 index 0000000..aa9af0a --- /dev/null +++ b/node_modules/merge-descriptors/package.json @@ -0,0 +1,39 @@ +{ + "name": "merge-descriptors", + "description": "Merge objects using descriptors", + "version": "1.0.3", + "author": { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com", + "twitter": "https://twitter.com/jongleberry" + }, + "contributors": [ + "Douglas Christopher Wilson ", + "Mike Grabowski " + ], + "license": "MIT", + "repository": "sindresorhus/merge-descriptors", + "funding": "https://github.com/sponsors/sindresorhus", + "devDependencies": { + "eslint": "5.9.0", + "eslint-config-standard": "12.0.0", + "eslint-plugin-import": "2.14.0", + "eslint-plugin-node": "7.0.1", + "eslint-plugin-promise": "4.0.1", + "eslint-plugin-standard": "4.0.0", + "mocha": "5.2.0", + "nyc": "13.1.0" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "index.js" + ], + "scripts": { + "lint": "eslint .", + "test": "mocha test/", + "test-cov": "nyc --reporter=html --reporter=text npm test" + } +} diff --git a/node_modules/methods/HISTORY.md b/node_modules/methods/HISTORY.md new file mode 100644 index 0000000..c0ecf07 --- /dev/null +++ b/node_modules/methods/HISTORY.md @@ -0,0 +1,29 @@ +1.1.2 / 2016-01-17 +================== + + * perf: enable strict mode + +1.1.1 / 2014-12-30 +================== + + * Improve `browserify` support + +1.1.0 / 2014-07-05 +================== + + * Add `CONNECT` method + +1.0.1 / 2014-06-02 +================== + + * Fix module to work with harmony transform + +1.0.0 / 2014-05-08 +================== + + * Add `PURGE` method + +0.1.0 / 2013-10-28 +================== + + * Add `http.METHODS` support diff --git a/node_modules/methods/LICENSE b/node_modules/methods/LICENSE new file mode 100644 index 0000000..220dc1a --- /dev/null +++ b/node_modules/methods/LICENSE @@ -0,0 +1,24 @@ +(The MIT License) + +Copyright (c) 2013-2014 TJ Holowaychuk +Copyright (c) 2015-2016 Douglas Christopher Wilson + +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. + diff --git a/node_modules/methods/README.md b/node_modules/methods/README.md new file mode 100644 index 0000000..672a32b --- /dev/null +++ b/node_modules/methods/README.md @@ -0,0 +1,51 @@ +# Methods + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +HTTP verbs that Node.js core's HTTP parser supports. + +This module provides an export that is just like `http.METHODS` from Node.js core, +with the following differences: + + * All method names are lower-cased. + * Contains a fallback list of methods for Node.js versions that do not have a + `http.METHODS` export (0.10 and lower). + * Provides the fallback list when using tools like `browserify` without pulling + in the `http` shim module. + +## Install + +```bash +$ npm install methods +``` + +## API + +```js +var methods = require('methods') +``` + +### methods + +This is an array of lower-cased method names that Node.js supports. If Node.js +provides the `http.METHODS` export, then this is the same array lower-cased, +otherwise it is a snapshot of the verbs from Node.js 0.10. + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/methods.svg?style=flat +[npm-url]: https://npmjs.org/package/methods +[node-version-image]: https://img.shields.io/node/v/methods.svg?style=flat +[node-version-url]: https://nodejs.org/en/download/ +[travis-image]: https://img.shields.io/travis/jshttp/methods.svg?style=flat +[travis-url]: https://travis-ci.org/jshttp/methods +[coveralls-image]: https://img.shields.io/coveralls/jshttp/methods.svg?style=flat +[coveralls-url]: https://coveralls.io/r/jshttp/methods?branch=master +[downloads-image]: https://img.shields.io/npm/dm/methods.svg?style=flat +[downloads-url]: https://npmjs.org/package/methods diff --git a/node_modules/methods/index.js b/node_modules/methods/index.js new file mode 100644 index 0000000..667a50b --- /dev/null +++ b/node_modules/methods/index.js @@ -0,0 +1,69 @@ +/*! + * methods + * Copyright(c) 2013-2014 TJ Holowaychuk + * Copyright(c) 2015-2016 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module dependencies. + * @private + */ + +var http = require('http'); + +/** + * Module exports. + * @public + */ + +module.exports = getCurrentNodeMethods() || getBasicNodeMethods(); + +/** + * Get the current Node.js methods. + * @private + */ + +function getCurrentNodeMethods() { + return http.METHODS && http.METHODS.map(function lowerCaseMethod(method) { + return method.toLowerCase(); + }); +} + +/** + * Get the "basic" Node.js methods, a snapshot from Node.js 0.10. + * @private + */ + +function getBasicNodeMethods() { + return [ + 'get', + 'post', + 'put', + 'head', + 'delete', + 'options', + 'trace', + 'copy', + 'lock', + 'mkcol', + 'move', + 'purge', + 'propfind', + 'proppatch', + 'unlock', + 'report', + 'mkactivity', + 'checkout', + 'merge', + 'm-search', + 'notify', + 'subscribe', + 'unsubscribe', + 'patch', + 'search', + 'connect' + ]; +} diff --git a/node_modules/methods/package.json b/node_modules/methods/package.json new file mode 100644 index 0000000..c4ce6f0 --- /dev/null +++ b/node_modules/methods/package.json @@ -0,0 +1,36 @@ +{ + "name": "methods", + "description": "HTTP methods that node supports", + "version": "1.1.2", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)", + "TJ Holowaychuk (http://tjholowaychuk.com)" + ], + "license": "MIT", + "repository": "jshttp/methods", + "devDependencies": { + "istanbul": "0.4.1", + "mocha": "1.21.5" + }, + "files": [ + "index.js", + "HISTORY.md", + "LICENSE" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" + }, + "browser": { + "http": false + }, + "keywords": [ + "http", + "methods" + ] +} diff --git a/node_modules/mime-db/HISTORY.md b/node_modules/mime-db/HISTORY.md new file mode 100644 index 0000000..7436f64 --- /dev/null +++ b/node_modules/mime-db/HISTORY.md @@ -0,0 +1,507 @@ +1.52.0 / 2022-02-21 +=================== + + * Add extensions from IANA for more `image/*` types + * Add extension `.asc` to `application/pgp-keys` + * Add extensions to various XML types + * Add new upstream MIME types + +1.51.0 / 2021-11-08 +=================== + + * Add new upstream MIME types + * Mark `image/vnd.microsoft.icon` as compressible + * Mark `image/vnd.ms-dds` as compressible + +1.50.0 / 2021-09-15 +=================== + + * Add deprecated iWorks mime types and extensions + * Add new upstream MIME types + +1.49.0 / 2021-07-26 +=================== + + * Add extension `.trig` to `application/trig` + * Add new upstream MIME types + +1.48.0 / 2021-05-30 +=================== + + * Add extension `.mvt` to `application/vnd.mapbox-vector-tile` + * Add new upstream MIME types + * Mark `text/yaml` as compressible + +1.47.0 / 2021-04-01 +=================== + + * Add new upstream MIME types + * Remove ambigious extensions from IANA for `application/*+xml` types + * Update primary extension to `.es` for `application/ecmascript` + +1.46.0 / 2021-02-13 +=================== + + * Add extension `.amr` to `audio/amr` + * Add extension `.m4s` to `video/iso.segment` + * Add extension `.opus` to `audio/ogg` + * Add new upstream MIME types + +1.45.0 / 2020-09-22 +=================== + + * Add `application/ubjson` with extension `.ubj` + * Add `image/avif` with extension `.avif` + * Add `image/ktx2` with extension `.ktx2` + * Add extension `.dbf` to `application/vnd.dbf` + * Add extension `.rar` to `application/vnd.rar` + * Add extension `.td` to `application/urc-targetdesc+xml` + * Add new upstream MIME types + * Fix extension of `application/vnd.apple.keynote` to be `.key` + +1.44.0 / 2020-04-22 +=================== + + * Add charsets from IANA + * Add extension `.cjs` to `application/node` + * Add new upstream MIME types + +1.43.0 / 2020-01-05 +=================== + + * Add `application/x-keepass2` with extension `.kdbx` + * Add extension `.mxmf` to `audio/mobile-xmf` + * Add extensions from IANA for `application/*+xml` types + * Add new upstream MIME types + +1.42.0 / 2019-09-25 +=================== + + * Add `image/vnd.ms-dds` with extension `.dds` + * Add new upstream MIME types + * Remove compressible from `multipart/mixed` + +1.41.0 / 2019-08-30 +=================== + + * Add new upstream MIME types + * Add `application/toml` with extension `.toml` + * Mark `font/ttf` as compressible + +1.40.0 / 2019-04-20 +=================== + + * Add extensions from IANA for `model/*` types + * Add `text/mdx` with extension `.mdx` + +1.39.0 / 2019-04-04 +=================== + + * Add extensions `.siv` and `.sieve` to `application/sieve` + * Add new upstream MIME types + +1.38.0 / 2019-02-04 +=================== + + * Add extension `.nq` to `application/n-quads` + * Add extension `.nt` to `application/n-triples` + * Add new upstream MIME types + * Mark `text/less` as compressible + +1.37.0 / 2018-10-19 +=================== + + * Add extensions to HEIC image types + * Add new upstream MIME types + +1.36.0 / 2018-08-20 +=================== + + * Add Apple file extensions from IANA + * Add extensions from IANA for `image/*` types + * Add new upstream MIME types + +1.35.0 / 2018-07-15 +=================== + + * Add extension `.owl` to `application/rdf+xml` + * Add new upstream MIME types + - Removes extension `.woff` from `application/font-woff` + +1.34.0 / 2018-06-03 +=================== + + * Add extension `.csl` to `application/vnd.citationstyles.style+xml` + * Add extension `.es` to `application/ecmascript` + * Add new upstream MIME types + * Add `UTF-8` as default charset for `text/turtle` + * Mark all XML-derived types as compressible + +1.33.0 / 2018-02-15 +=================== + + * Add extensions from IANA for `message/*` types + * Add new upstream MIME types + * Fix some incorrect OOXML types + * Remove `application/font-woff2` + +1.32.0 / 2017-11-29 +=================== + + * Add new upstream MIME types + * Update `text/hjson` to registered `application/hjson` + * Add `text/shex` with extension `.shex` + +1.31.0 / 2017-10-25 +=================== + + * Add `application/raml+yaml` with extension `.raml` + * Add `application/wasm` with extension `.wasm` + * Add new `font` type from IANA + * Add new upstream font extensions + * Add new upstream MIME types + * Add extensions for JPEG-2000 images + +1.30.0 / 2017-08-27 +=================== + + * Add `application/vnd.ms-outlook` + * Add `application/x-arj` + * Add extension `.mjs` to `application/javascript` + * Add glTF types and extensions + * Add new upstream MIME types + * Add `text/x-org` + * Add VirtualBox MIME types + * Fix `source` records for `video/*` types that are IANA + * Update `font/opentype` to registered `font/otf` + +1.29.0 / 2017-07-10 +=================== + + * Add `application/fido.trusted-apps+json` + * Add extension `.wadl` to `application/vnd.sun.wadl+xml` + * Add new upstream MIME types + * Add `UTF-8` as default charset for `text/css` + +1.28.0 / 2017-05-14 +=================== + + * Add new upstream MIME types + * Add extension `.gz` to `application/gzip` + * Update extensions `.md` and `.markdown` to be `text/markdown` + +1.27.0 / 2017-03-16 +=================== + + * Add new upstream MIME types + * Add `image/apng` with extension `.apng` + +1.26.0 / 2017-01-14 +=================== + + * Add new upstream MIME types + * Add extension `.geojson` to `application/geo+json` + +1.25.0 / 2016-11-11 +=================== + + * Add new upstream MIME types + +1.24.0 / 2016-09-18 +=================== + + * Add `audio/mp3` + * Add new upstream MIME types + +1.23.0 / 2016-05-01 +=================== + + * Add new upstream MIME types + * Add extension `.3gpp` to `audio/3gpp` + +1.22.0 / 2016-02-15 +=================== + + * Add `text/slim` + * Add extension `.rng` to `application/xml` + * Add new upstream MIME types + * Fix extension of `application/dash+xml` to be `.mpd` + * Update primary extension to `.m4a` for `audio/mp4` + +1.21.0 / 2016-01-06 +=================== + + * Add Google document types + * Add new upstream MIME types + +1.20.0 / 2015-11-10 +=================== + + * Add `text/x-suse-ymp` + * Add new upstream MIME types + +1.19.0 / 2015-09-17 +=================== + + * Add `application/vnd.apple.pkpass` + * Add new upstream MIME types + +1.18.0 / 2015-09-03 +=================== + + * Add new upstream MIME types + +1.17.0 / 2015-08-13 +=================== + + * Add `application/x-msdos-program` + * Add `audio/g711-0` + * Add `image/vnd.mozilla.apng` + * Add extension `.exe` to `application/x-msdos-program` + +1.16.0 / 2015-07-29 +=================== + + * Add `application/vnd.uri-map` + +1.15.0 / 2015-07-13 +=================== + + * Add `application/x-httpd-php` + +1.14.0 / 2015-06-25 +=================== + + * Add `application/scim+json` + * Add `application/vnd.3gpp.ussd+xml` + * Add `application/vnd.biopax.rdf+xml` + * Add `text/x-processing` + +1.13.0 / 2015-06-07 +=================== + + * Add nginx as a source + * Add `application/x-cocoa` + * Add `application/x-java-archive-diff` + * Add `application/x-makeself` + * Add `application/x-perl` + * Add `application/x-pilot` + * Add `application/x-redhat-package-manager` + * Add `application/x-sea` + * Add `audio/x-m4a` + * Add `audio/x-realaudio` + * Add `image/x-jng` + * Add `text/mathml` + +1.12.0 / 2015-06-05 +=================== + + * Add `application/bdoc` + * Add `application/vnd.hyperdrive+json` + * Add `application/x-bdoc` + * Add extension `.rtf` to `text/rtf` + +1.11.0 / 2015-05-31 +=================== + + * Add `audio/wav` + * Add `audio/wave` + * Add extension `.litcoffee` to `text/coffeescript` + * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data` + * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install` + +1.10.0 / 2015-05-19 +=================== + + * Add `application/vnd.balsamiq.bmpr` + * Add `application/vnd.microsoft.portable-executable` + * Add `application/x-ns-proxy-autoconfig` + +1.9.1 / 2015-04-19 +================== + + * Remove `.json` extension from `application/manifest+json` + - This is causing bugs downstream + +1.9.0 / 2015-04-19 +================== + + * Add `application/manifest+json` + * Add `application/vnd.micro+json` + * Add `image/vnd.zbrush.pcx` + * Add `image/x-ms-bmp` + +1.8.0 / 2015-03-13 +================== + + * Add `application/vnd.citationstyles.style+xml` + * Add `application/vnd.fastcopy-disk-image` + * Add `application/vnd.gov.sk.xmldatacontainer+xml` + * Add extension `.jsonld` to `application/ld+json` + +1.7.0 / 2015-02-08 +================== + + * Add `application/vnd.gerber` + * Add `application/vnd.msa-disk-image` + +1.6.1 / 2015-02-05 +================== + + * Community extensions ownership transferred from `node-mime` + +1.6.0 / 2015-01-29 +================== + + * Add `application/jose` + * Add `application/jose+json` + * Add `application/json-seq` + * Add `application/jwk+json` + * Add `application/jwk-set+json` + * Add `application/jwt` + * Add `application/rdap+json` + * Add `application/vnd.gov.sk.e-form+xml` + * Add `application/vnd.ims.imsccv1p3` + +1.5.0 / 2014-12-30 +================== + + * Add `application/vnd.oracle.resource+json` + * Fix various invalid MIME type entries + - `application/mbox+xml` + - `application/oscp-response` + - `application/vwg-multiplexed` + - `audio/g721` + +1.4.0 / 2014-12-21 +================== + + * Add `application/vnd.ims.imsccv1p2` + * Fix various invalid MIME type entries + - `application/vnd-acucobol` + - `application/vnd-curl` + - `application/vnd-dart` + - `application/vnd-dxr` + - `application/vnd-fdf` + - `application/vnd-mif` + - `application/vnd-sema` + - `application/vnd-wap-wmlc` + - `application/vnd.adobe.flash-movie` + - `application/vnd.dece-zip` + - `application/vnd.dvb_service` + - `application/vnd.micrografx-igx` + - `application/vnd.sealed-doc` + - `application/vnd.sealed-eml` + - `application/vnd.sealed-mht` + - `application/vnd.sealed-ppt` + - `application/vnd.sealed-tiff` + - `application/vnd.sealed-xls` + - `application/vnd.sealedmedia.softseal-html` + - `application/vnd.sealedmedia.softseal-pdf` + - `application/vnd.wap-slc` + - `application/vnd.wap-wbxml` + - `audio/vnd.sealedmedia.softseal-mpeg` + - `image/vnd-djvu` + - `image/vnd-svf` + - `image/vnd-wap-wbmp` + - `image/vnd.sealed-png` + - `image/vnd.sealedmedia.softseal-gif` + - `image/vnd.sealedmedia.softseal-jpg` + - `model/vnd-dwf` + - `model/vnd.parasolid.transmit-binary` + - `model/vnd.parasolid.transmit-text` + - `text/vnd-a` + - `text/vnd-curl` + - `text/vnd.wap-wml` + * Remove example template MIME types + - `application/example` + - `audio/example` + - `image/example` + - `message/example` + - `model/example` + - `multipart/example` + - `text/example` + - `video/example` + +1.3.1 / 2014-12-16 +================== + + * Fix missing extensions + - `application/json5` + - `text/hjson` + +1.3.0 / 2014-12-07 +================== + + * Add `application/a2l` + * Add `application/aml` + * Add `application/atfx` + * Add `application/atxml` + * Add `application/cdfx+xml` + * Add `application/dii` + * Add `application/json5` + * Add `application/lxf` + * Add `application/mf4` + * Add `application/vnd.apache.thrift.compact` + * Add `application/vnd.apache.thrift.json` + * Add `application/vnd.coffeescript` + * Add `application/vnd.enphase.envoy` + * Add `application/vnd.ims.imsccv1p1` + * Add `text/csv-schema` + * Add `text/hjson` + * Add `text/markdown` + * Add `text/yaml` + +1.2.0 / 2014-11-09 +================== + + * Add `application/cea` + * Add `application/dit` + * Add `application/vnd.gov.sk.e-form+zip` + * Add `application/vnd.tmd.mediaflex.api+xml` + * Type `application/epub+zip` is now IANA-registered + +1.1.2 / 2014-10-23 +================== + + * Rebuild database for `application/x-www-form-urlencoded` change + +1.1.1 / 2014-10-20 +================== + + * Mark `application/x-www-form-urlencoded` as compressible. + +1.1.0 / 2014-09-28 +================== + + * Add `application/font-woff2` + +1.0.3 / 2014-09-25 +================== + + * Fix engine requirement in package + +1.0.2 / 2014-09-25 +================== + + * Add `application/coap-group+json` + * Add `application/dcd` + * Add `application/vnd.apache.thrift.binary` + * Add `image/vnd.tencent.tap` + * Mark all JSON-derived types as compressible + * Update `text/vtt` data + +1.0.1 / 2014-08-30 +================== + + * Fix extension ordering + +1.0.0 / 2014-08-30 +================== + + * Add `application/atf` + * Add `application/merge-patch+json` + * Add `multipart/x-mixed-replace` + * Add `source: 'apache'` metadata + * Add `source: 'iana'` metadata + * Remove badly-assumed charset data diff --git a/node_modules/mime-db/LICENSE b/node_modules/mime-db/LICENSE new file mode 100644 index 0000000..0751cb1 --- /dev/null +++ b/node_modules/mime-db/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015-2022 Douglas Christopher Wilson + +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. diff --git a/node_modules/mime-db/README.md b/node_modules/mime-db/README.md new file mode 100644 index 0000000..5a8fcfe --- /dev/null +++ b/node_modules/mime-db/README.md @@ -0,0 +1,100 @@ +# mime-db + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][ci-image]][ci-url] +[![Coverage Status][coveralls-image]][coveralls-url] + +This is a large database of mime types and information about them. +It consists of a single, public JSON file and does not include any logic, +allowing it to remain as un-opinionated as possible with an API. +It aggregates data from the following sources: + +- http://www.iana.org/assignments/media-types/media-types.xhtml +- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types +- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types + +## Installation + +```bash +npm install mime-db +``` + +### Database Download + +If you're crazy enough to use this in the browser, you can just grab the +JSON file using [jsDelivr](https://www.jsdelivr.com/). It is recommended to +replace `master` with [a release tag](https://github.com/jshttp/mime-db/tags) +as the JSON format may change in the future. + +``` +https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json +``` + +## Usage + +```js +var db = require('mime-db') + +// grab data on .js files +var data = db['application/javascript'] +``` + +## Data Structure + +The JSON file is a map lookup for lowercased mime types. +Each mime type has the following properties: + +- `.source` - where the mime type is defined. + If not set, it's probably a custom media type. + - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) + - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml) + - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types) +- `.extensions[]` - known extensions associated with this mime type. +- `.compressible` - whether a file of this type can be gzipped. +- `.charset` - the default charset associated with this type, if any. + +If unknown, every property could be `undefined`. + +## Contributing + +To edit the database, only make PRs against `src/custom-types.json` or +`src/custom-suffix.json`. + +The `src/custom-types.json` file is a JSON object with the MIME type as the +keys and the values being an object with the following keys: + +- `compressible` - leave out if you don't know, otherwise `true`/`false` to + indicate whether the data represented by the type is typically compressible. +- `extensions` - include an array of file extensions that are associated with + the type. +- `notes` - human-readable notes about the type, typically what the type is. +- `sources` - include an array of URLs of where the MIME type and the associated + extensions are sourced from. This needs to be a [primary source](https://en.wikipedia.org/wiki/Primary_source); + links to type aggregating sites and Wikipedia are _not acceptable_. + +To update the build, run `npm run build`. + +### Adding Custom Media Types + +The best way to get new media types included in this library is to register +them with the IANA. The community registration procedure is outlined in +[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types +registered with the IANA are automatically pulled into this library. + +If that is not possible / feasible, they can be added directly here as a +"custom" type. To do this, it is required to have a primary source that +definitively lists the media type. If an extension is going to be listed as +associateed with this media type, the source must definitively link the +media type and extension as well. + +[ci-image]: https://badgen.net/github/checks/jshttp/mime-db/master?label=ci +[ci-url]: https://github.com/jshttp/mime-db/actions?query=workflow%3Aci +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-db/master +[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master +[node-image]: https://badgen.net/npm/node/mime-db +[node-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/mime-db +[npm-url]: https://npmjs.org/package/mime-db +[npm-version-image]: https://badgen.net/npm/v/mime-db diff --git a/node_modules/mime-db/db.json b/node_modules/mime-db/db.json new file mode 100644 index 0000000..eb9c42c --- /dev/null +++ b/node_modules/mime-db/db.json @@ -0,0 +1,8519 @@ +{ + "application/1d-interleaved-parityfec": { + "source": "iana" + }, + "application/3gpdash-qoe-report+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/3gpp-ims+xml": { + "source": "iana", + "compressible": true + }, + "application/3gpphal+json": { + "source": "iana", + "compressible": true + }, + "application/3gpphalforms+json": { + "source": "iana", + "compressible": true + }, + "application/a2l": { + "source": "iana" + }, + "application/ace+cbor": { + "source": "iana" + }, + "application/activemessage": { + "source": "iana" + }, + "application/activity+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-directory+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcost+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcostparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointprop+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointpropparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-error+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-updatestreamcontrol+json": { + "source": "iana", + "compressible": true + }, + "application/alto-updatestreamparams+json": { + "source": "iana", + "compressible": true + }, + "application/aml": { + "source": "iana" + }, + "application/andrew-inset": { + "source": "iana", + "extensions": ["ez"] + }, + "application/applefile": { + "source": "iana" + }, + "application/applixware": { + "source": "apache", + "extensions": ["aw"] + }, + "application/at+jwt": { + "source": "iana" + }, + "application/atf": { + "source": "iana" + }, + "application/atfx": { + "source": "iana" + }, + "application/atom+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atom"] + }, + "application/atomcat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomcat"] + }, + "application/atomdeleted+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomdeleted"] + }, + "application/atomicmail": { + "source": "iana" + }, + "application/atomsvc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomsvc"] + }, + "application/atsc-dwd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dwd"] + }, + "application/atsc-dynamic-event-message": { + "source": "iana" + }, + "application/atsc-held+xml": { + "source": "iana", + "compressible": true, + "extensions": ["held"] + }, + "application/atsc-rdt+json": { + "source": "iana", + "compressible": true + }, + "application/atsc-rsat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rsat"] + }, + "application/atxml": { + "source": "iana" + }, + "application/auth-policy+xml": { + "source": "iana", + "compressible": true + }, + "application/bacnet-xdd+zip": { + "source": "iana", + "compressible": false + }, + "application/batch-smtp": { + "source": "iana" + }, + "application/bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/beep+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/calendar+json": { + "source": "iana", + "compressible": true + }, + "application/calendar+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xcs"] + }, + "application/call-completion": { + "source": "iana" + }, + "application/cals-1840": { + "source": "iana" + }, + "application/captive+json": { + "source": "iana", + "compressible": true + }, + "application/cbor": { + "source": "iana" + }, + "application/cbor-seq": { + "source": "iana" + }, + "application/cccex": { + "source": "iana" + }, + "application/ccmp+xml": { + "source": "iana", + "compressible": true + }, + "application/ccxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ccxml"] + }, + "application/cdfx+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdfx"] + }, + "application/cdmi-capability": { + "source": "iana", + "extensions": ["cdmia"] + }, + "application/cdmi-container": { + "source": "iana", + "extensions": ["cdmic"] + }, + "application/cdmi-domain": { + "source": "iana", + "extensions": ["cdmid"] + }, + "application/cdmi-object": { + "source": "iana", + "extensions": ["cdmio"] + }, + "application/cdmi-queue": { + "source": "iana", + "extensions": ["cdmiq"] + }, + "application/cdni": { + "source": "iana" + }, + "application/cea": { + "source": "iana" + }, + "application/cea-2018+xml": { + "source": "iana", + "compressible": true + }, + "application/cellml+xml": { + "source": "iana", + "compressible": true + }, + "application/cfw": { + "source": "iana" + }, + "application/city+json": { + "source": "iana", + "compressible": true + }, + "application/clr": { + "source": "iana" + }, + "application/clue+xml": { + "source": "iana", + "compressible": true + }, + "application/clue_info+xml": { + "source": "iana", + "compressible": true + }, + "application/cms": { + "source": "iana" + }, + "application/cnrp+xml": { + "source": "iana", + "compressible": true + }, + "application/coap-group+json": { + "source": "iana", + "compressible": true + }, + "application/coap-payload": { + "source": "iana" + }, + "application/commonground": { + "source": "iana" + }, + "application/conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/cose": { + "source": "iana" + }, + "application/cose-key": { + "source": "iana" + }, + "application/cose-key-set": { + "source": "iana" + }, + "application/cpl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cpl"] + }, + "application/csrattrs": { + "source": "iana" + }, + "application/csta+xml": { + "source": "iana", + "compressible": true + }, + "application/cstadata+xml": { + "source": "iana", + "compressible": true + }, + "application/csvm+json": { + "source": "iana", + "compressible": true + }, + "application/cu-seeme": { + "source": "apache", + "extensions": ["cu"] + }, + "application/cwt": { + "source": "iana" + }, + "application/cybercash": { + "source": "iana" + }, + "application/dart": { + "compressible": true + }, + "application/dash+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpd"] + }, + "application/dash-patch+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpp"] + }, + "application/dashdelta": { + "source": "iana" + }, + "application/davmount+xml": { + "source": "iana", + "compressible": true, + "extensions": ["davmount"] + }, + "application/dca-rft": { + "source": "iana" + }, + "application/dcd": { + "source": "iana" + }, + "application/dec-dx": { + "source": "iana" + }, + "application/dialog-info+xml": { + "source": "iana", + "compressible": true + }, + "application/dicom": { + "source": "iana" + }, + "application/dicom+json": { + "source": "iana", + "compressible": true + }, + "application/dicom+xml": { + "source": "iana", + "compressible": true + }, + "application/dii": { + "source": "iana" + }, + "application/dit": { + "source": "iana" + }, + "application/dns": { + "source": "iana" + }, + "application/dns+json": { + "source": "iana", + "compressible": true + }, + "application/dns-message": { + "source": "iana" + }, + "application/docbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dbk"] + }, + "application/dots+cbor": { + "source": "iana" + }, + "application/dskpp+xml": { + "source": "iana", + "compressible": true + }, + "application/dssc+der": { + "source": "iana", + "extensions": ["dssc"] + }, + "application/dssc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdssc"] + }, + "application/dvcs": { + "source": "iana" + }, + "application/ecmascript": { + "source": "iana", + "compressible": true, + "extensions": ["es","ecma"] + }, + "application/edi-consent": { + "source": "iana" + }, + "application/edi-x12": { + "source": "iana", + "compressible": false + }, + "application/edifact": { + "source": "iana", + "compressible": false + }, + "application/efi": { + "source": "iana" + }, + "application/elm+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/elm+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.cap+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/emergencycalldata.comment+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.control+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.deviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.ecall.msd": { + "source": "iana" + }, + "application/emergencycalldata.providerinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.serviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.subscriberinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.veds+xml": { + "source": "iana", + "compressible": true + }, + "application/emma+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emma"] + }, + "application/emotionml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emotionml"] + }, + "application/encaprtp": { + "source": "iana" + }, + "application/epp+xml": { + "source": "iana", + "compressible": true + }, + "application/epub+zip": { + "source": "iana", + "compressible": false, + "extensions": ["epub"] + }, + "application/eshop": { + "source": "iana" + }, + "application/exi": { + "source": "iana", + "extensions": ["exi"] + }, + "application/expect-ct-report+json": { + "source": "iana", + "compressible": true + }, + "application/express": { + "source": "iana", + "extensions": ["exp"] + }, + "application/fastinfoset": { + "source": "iana" + }, + "application/fastsoap": { + "source": "iana" + }, + "application/fdt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["fdt"] + }, + "application/fhir+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/fhir+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/fido.trusted-apps+json": { + "compressible": true + }, + "application/fits": { + "source": "iana" + }, + "application/flexfec": { + "source": "iana" + }, + "application/font-sfnt": { + "source": "iana" + }, + "application/font-tdpfr": { + "source": "iana", + "extensions": ["pfr"] + }, + "application/font-woff": { + "source": "iana", + "compressible": false + }, + "application/framework-attributes+xml": { + "source": "iana", + "compressible": true + }, + "application/geo+json": { + "source": "iana", + "compressible": true, + "extensions": ["geojson"] + }, + "application/geo+json-seq": { + "source": "iana" + }, + "application/geopackage+sqlite3": { + "source": "iana" + }, + "application/geoxacml+xml": { + "source": "iana", + "compressible": true + }, + "application/gltf-buffer": { + "source": "iana" + }, + "application/gml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["gml"] + }, + "application/gpx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["gpx"] + }, + "application/gxf": { + "source": "apache", + "extensions": ["gxf"] + }, + "application/gzip": { + "source": "iana", + "compressible": false, + "extensions": ["gz"] + }, + "application/h224": { + "source": "iana" + }, + "application/held+xml": { + "source": "iana", + "compressible": true + }, + "application/hjson": { + "extensions": ["hjson"] + }, + "application/http": { + "source": "iana" + }, + "application/hyperstudio": { + "source": "iana", + "extensions": ["stk"] + }, + "application/ibe-key-request+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pkg-reply+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pp-data": { + "source": "iana" + }, + "application/iges": { + "source": "iana" + }, + "application/im-iscomposing+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/index": { + "source": "iana" + }, + "application/index.cmd": { + "source": "iana" + }, + "application/index.obj": { + "source": "iana" + }, + "application/index.response": { + "source": "iana" + }, + "application/index.vnd": { + "source": "iana" + }, + "application/inkml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ink","inkml"] + }, + "application/iotp": { + "source": "iana" + }, + "application/ipfix": { + "source": "iana", + "extensions": ["ipfix"] + }, + "application/ipp": { + "source": "iana" + }, + "application/isup": { + "source": "iana" + }, + "application/its+xml": { + "source": "iana", + "compressible": true, + "extensions": ["its"] + }, + "application/java-archive": { + "source": "apache", + "compressible": false, + "extensions": ["jar","war","ear"] + }, + "application/java-serialized-object": { + "source": "apache", + "compressible": false, + "extensions": ["ser"] + }, + "application/java-vm": { + "source": "apache", + "compressible": false, + "extensions": ["class"] + }, + "application/javascript": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["js","mjs"] + }, + "application/jf2feed+json": { + "source": "iana", + "compressible": true + }, + "application/jose": { + "source": "iana" + }, + "application/jose+json": { + "source": "iana", + "compressible": true + }, + "application/jrd+json": { + "source": "iana", + "compressible": true + }, + "application/jscalendar+json": { + "source": "iana", + "compressible": true + }, + "application/json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["json","map"] + }, + "application/json-patch+json": { + "source": "iana", + "compressible": true + }, + "application/json-seq": { + "source": "iana" + }, + "application/json5": { + "extensions": ["json5"] + }, + "application/jsonml+json": { + "source": "apache", + "compressible": true, + "extensions": ["jsonml"] + }, + "application/jwk+json": { + "source": "iana", + "compressible": true + }, + "application/jwk-set+json": { + "source": "iana", + "compressible": true + }, + "application/jwt": { + "source": "iana" + }, + "application/kpml-request+xml": { + "source": "iana", + "compressible": true + }, + "application/kpml-response+xml": { + "source": "iana", + "compressible": true + }, + "application/ld+json": { + "source": "iana", + "compressible": true, + "extensions": ["jsonld"] + }, + "application/lgr+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lgr"] + }, + "application/link-format": { + "source": "iana" + }, + "application/load-control+xml": { + "source": "iana", + "compressible": true + }, + "application/lost+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lostxml"] + }, + "application/lostsync+xml": { + "source": "iana", + "compressible": true + }, + "application/lpf+zip": { + "source": "iana", + "compressible": false + }, + "application/lxf": { + "source": "iana" + }, + "application/mac-binhex40": { + "source": "iana", + "extensions": ["hqx"] + }, + "application/mac-compactpro": { + "source": "apache", + "extensions": ["cpt"] + }, + "application/macwriteii": { + "source": "iana" + }, + "application/mads+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mads"] + }, + "application/manifest+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["webmanifest"] + }, + "application/marc": { + "source": "iana", + "extensions": ["mrc"] + }, + "application/marcxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mrcx"] + }, + "application/mathematica": { + "source": "iana", + "extensions": ["ma","nb","mb"] + }, + "application/mathml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mathml"] + }, + "application/mathml-content+xml": { + "source": "iana", + "compressible": true + }, + "application/mathml-presentation+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-associated-procedure-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-deregister+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-envelope+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-protection-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-reception-report+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-schedule+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-user-service-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbox": { + "source": "iana", + "extensions": ["mbox"] + }, + "application/media-policy-dataset+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpf"] + }, + "application/media_control+xml": { + "source": "iana", + "compressible": true + }, + "application/mediaservercontrol+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mscml"] + }, + "application/merge-patch+json": { + "source": "iana", + "compressible": true + }, + "application/metalink+xml": { + "source": "apache", + "compressible": true, + "extensions": ["metalink"] + }, + "application/metalink4+xml": { + "source": "iana", + "compressible": true, + "extensions": ["meta4"] + }, + "application/mets+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mets"] + }, + "application/mf4": { + "source": "iana" + }, + "application/mikey": { + "source": "iana" + }, + "application/mipc": { + "source": "iana" + }, + "application/missing-blocks+cbor-seq": { + "source": "iana" + }, + "application/mmt-aei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["maei"] + }, + "application/mmt-usd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musd"] + }, + "application/mods+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mods"] + }, + "application/moss-keys": { + "source": "iana" + }, + "application/moss-signature": { + "source": "iana" + }, + "application/mosskey-data": { + "source": "iana" + }, + "application/mosskey-request": { + "source": "iana" + }, + "application/mp21": { + "source": "iana", + "extensions": ["m21","mp21"] + }, + "application/mp4": { + "source": "iana", + "extensions": ["mp4s","m4p"] + }, + "application/mpeg4-generic": { + "source": "iana" + }, + "application/mpeg4-iod": { + "source": "iana" + }, + "application/mpeg4-iod-xmt": { + "source": "iana" + }, + "application/mrb-consumer+xml": { + "source": "iana", + "compressible": true + }, + "application/mrb-publish+xml": { + "source": "iana", + "compressible": true + }, + "application/msc-ivr+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/msc-mixer+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/msword": { + "source": "iana", + "compressible": false, + "extensions": ["doc","dot"] + }, + "application/mud+json": { + "source": "iana", + "compressible": true + }, + "application/multipart-core": { + "source": "iana" + }, + "application/mxf": { + "source": "iana", + "extensions": ["mxf"] + }, + "application/n-quads": { + "source": "iana", + "extensions": ["nq"] + }, + "application/n-triples": { + "source": "iana", + "extensions": ["nt"] + }, + "application/nasdata": { + "source": "iana" + }, + "application/news-checkgroups": { + "source": "iana", + "charset": "US-ASCII" + }, + "application/news-groupinfo": { + "source": "iana", + "charset": "US-ASCII" + }, + "application/news-transmission": { + "source": "iana" + }, + "application/nlsml+xml": { + "source": "iana", + "compressible": true + }, + "application/node": { + "source": "iana", + "extensions": ["cjs"] + }, + "application/nss": { + "source": "iana" + }, + "application/oauth-authz-req+jwt": { + "source": "iana" + }, + "application/oblivious-dns-message": { + "source": "iana" + }, + "application/ocsp-request": { + "source": "iana" + }, + "application/ocsp-response": { + "source": "iana" + }, + "application/octet-stream": { + "source": "iana", + "compressible": false, + "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"] + }, + "application/oda": { + "source": "iana", + "extensions": ["oda"] + }, + "application/odm+xml": { + "source": "iana", + "compressible": true + }, + "application/odx": { + "source": "iana" + }, + "application/oebps-package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["opf"] + }, + "application/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogx"] + }, + "application/omdoc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["omdoc"] + }, + "application/onenote": { + "source": "apache", + "extensions": ["onetoc","onetoc2","onetmp","onepkg"] + }, + "application/opc-nodeset+xml": { + "source": "iana", + "compressible": true + }, + "application/oscore": { + "source": "iana" + }, + "application/oxps": { + "source": "iana", + "extensions": ["oxps"] + }, + "application/p21": { + "source": "iana" + }, + "application/p21+zip": { + "source": "iana", + "compressible": false + }, + "application/p2p-overlay+xml": { + "source": "iana", + "compressible": true, + "extensions": ["relo"] + }, + "application/parityfec": { + "source": "iana" + }, + "application/passport": { + "source": "iana" + }, + "application/patch-ops-error+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xer"] + }, + "application/pdf": { + "source": "iana", + "compressible": false, + "extensions": ["pdf"] + }, + "application/pdx": { + "source": "iana" + }, + "application/pem-certificate-chain": { + "source": "iana" + }, + "application/pgp-encrypted": { + "source": "iana", + "compressible": false, + "extensions": ["pgp"] + }, + "application/pgp-keys": { + "source": "iana", + "extensions": ["asc"] + }, + "application/pgp-signature": { + "source": "iana", + "extensions": ["asc","sig"] + }, + "application/pics-rules": { + "source": "apache", + "extensions": ["prf"] + }, + "application/pidf+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/pidf-diff+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/pkcs10": { + "source": "iana", + "extensions": ["p10"] + }, + "application/pkcs12": { + "source": "iana" + }, + "application/pkcs7-mime": { + "source": "iana", + "extensions": ["p7m","p7c"] + }, + "application/pkcs7-signature": { + "source": "iana", + "extensions": ["p7s"] + }, + "application/pkcs8": { + "source": "iana", + "extensions": ["p8"] + }, + "application/pkcs8-encrypted": { + "source": "iana" + }, + "application/pkix-attr-cert": { + "source": "iana", + "extensions": ["ac"] + }, + "application/pkix-cert": { + "source": "iana", + "extensions": ["cer"] + }, + "application/pkix-crl": { + "source": "iana", + "extensions": ["crl"] + }, + "application/pkix-pkipath": { + "source": "iana", + "extensions": ["pkipath"] + }, + "application/pkixcmp": { + "source": "iana", + "extensions": ["pki"] + }, + "application/pls+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pls"] + }, + "application/poc-settings+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/postscript": { + "source": "iana", + "compressible": true, + "extensions": ["ai","eps","ps"] + }, + "application/ppsp-tracker+json": { + "source": "iana", + "compressible": true + }, + "application/problem+json": { + "source": "iana", + "compressible": true + }, + "application/problem+xml": { + "source": "iana", + "compressible": true + }, + "application/provenance+xml": { + "source": "iana", + "compressible": true, + "extensions": ["provx"] + }, + "application/prs.alvestrand.titrax-sheet": { + "source": "iana" + }, + "application/prs.cww": { + "source": "iana", + "extensions": ["cww"] + }, + "application/prs.cyn": { + "source": "iana", + "charset": "7-BIT" + }, + "application/prs.hpub+zip": { + "source": "iana", + "compressible": false + }, + "application/prs.nprend": { + "source": "iana" + }, + "application/prs.plucker": { + "source": "iana" + }, + "application/prs.rdf-xml-crypt": { + "source": "iana" + }, + "application/prs.xsf+xml": { + "source": "iana", + "compressible": true + }, + "application/pskc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pskcxml"] + }, + "application/pvd+json": { + "source": "iana", + "compressible": true + }, + "application/qsig": { + "source": "iana" + }, + "application/raml+yaml": { + "compressible": true, + "extensions": ["raml"] + }, + "application/raptorfec": { + "source": "iana" + }, + "application/rdap+json": { + "source": "iana", + "compressible": true + }, + "application/rdf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rdf","owl"] + }, + "application/reginfo+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rif"] + }, + "application/relax-ng-compact-syntax": { + "source": "iana", + "extensions": ["rnc"] + }, + "application/remote-printing": { + "source": "iana" + }, + "application/reputon+json": { + "source": "iana", + "compressible": true + }, + "application/resource-lists+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rl"] + }, + "application/resource-lists-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rld"] + }, + "application/rfc+xml": { + "source": "iana", + "compressible": true + }, + "application/riscos": { + "source": "iana" + }, + "application/rlmi+xml": { + "source": "iana", + "compressible": true + }, + "application/rls-services+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rs"] + }, + "application/route-apd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rapd"] + }, + "application/route-s-tsid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sls"] + }, + "application/route-usd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rusd"] + }, + "application/rpki-ghostbusters": { + "source": "iana", + "extensions": ["gbr"] + }, + "application/rpki-manifest": { + "source": "iana", + "extensions": ["mft"] + }, + "application/rpki-publication": { + "source": "iana" + }, + "application/rpki-roa": { + "source": "iana", + "extensions": ["roa"] + }, + "application/rpki-updown": { + "source": "iana" + }, + "application/rsd+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rsd"] + }, + "application/rss+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rss"] + }, + "application/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "application/rtploopback": { + "source": "iana" + }, + "application/rtx": { + "source": "iana" + }, + "application/samlassertion+xml": { + "source": "iana", + "compressible": true + }, + "application/samlmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/sarif+json": { + "source": "iana", + "compressible": true + }, + "application/sarif-external-properties+json": { + "source": "iana", + "compressible": true + }, + "application/sbe": { + "source": "iana" + }, + "application/sbml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sbml"] + }, + "application/scaip+xml": { + "source": "iana", + "compressible": true + }, + "application/scim+json": { + "source": "iana", + "compressible": true + }, + "application/scvp-cv-request": { + "source": "iana", + "extensions": ["scq"] + }, + "application/scvp-cv-response": { + "source": "iana", + "extensions": ["scs"] + }, + "application/scvp-vp-request": { + "source": "iana", + "extensions": ["spq"] + }, + "application/scvp-vp-response": { + "source": "iana", + "extensions": ["spp"] + }, + "application/sdp": { + "source": "iana", + "extensions": ["sdp"] + }, + "application/secevent+jwt": { + "source": "iana" + }, + "application/senml+cbor": { + "source": "iana" + }, + "application/senml+json": { + "source": "iana", + "compressible": true + }, + "application/senml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["senmlx"] + }, + "application/senml-etch+cbor": { + "source": "iana" + }, + "application/senml-etch+json": { + "source": "iana", + "compressible": true + }, + "application/senml-exi": { + "source": "iana" + }, + "application/sensml+cbor": { + "source": "iana" + }, + "application/sensml+json": { + "source": "iana", + "compressible": true + }, + "application/sensml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sensmlx"] + }, + "application/sensml-exi": { + "source": "iana" + }, + "application/sep+xml": { + "source": "iana", + "compressible": true + }, + "application/sep-exi": { + "source": "iana" + }, + "application/session-info": { + "source": "iana" + }, + "application/set-payment": { + "source": "iana" + }, + "application/set-payment-initiation": { + "source": "iana", + "extensions": ["setpay"] + }, + "application/set-registration": { + "source": "iana" + }, + "application/set-registration-initiation": { + "source": "iana", + "extensions": ["setreg"] + }, + "application/sgml": { + "source": "iana" + }, + "application/sgml-open-catalog": { + "source": "iana" + }, + "application/shf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["shf"] + }, + "application/sieve": { + "source": "iana", + "extensions": ["siv","sieve"] + }, + "application/simple-filter+xml": { + "source": "iana", + "compressible": true + }, + "application/simple-message-summary": { + "source": "iana" + }, + "application/simplesymbolcontainer": { + "source": "iana" + }, + "application/sipc": { + "source": "iana" + }, + "application/slate": { + "source": "iana" + }, + "application/smil": { + "source": "iana" + }, + "application/smil+xml": { + "source": "iana", + "compressible": true, + "extensions": ["smi","smil"] + }, + "application/smpte336m": { + "source": "iana" + }, + "application/soap+fastinfoset": { + "source": "iana" + }, + "application/soap+xml": { + "source": "iana", + "compressible": true + }, + "application/sparql-query": { + "source": "iana", + "extensions": ["rq"] + }, + "application/sparql-results+xml": { + "source": "iana", + "compressible": true, + "extensions": ["srx"] + }, + "application/spdx+json": { + "source": "iana", + "compressible": true + }, + "application/spirits-event+xml": { + "source": "iana", + "compressible": true + }, + "application/sql": { + "source": "iana" + }, + "application/srgs": { + "source": "iana", + "extensions": ["gram"] + }, + "application/srgs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["grxml"] + }, + "application/sru+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sru"] + }, + "application/ssdl+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ssdl"] + }, + "application/ssml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ssml"] + }, + "application/stix+json": { + "source": "iana", + "compressible": true + }, + "application/swid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["swidtag"] + }, + "application/tamp-apex-update": { + "source": "iana" + }, + "application/tamp-apex-update-confirm": { + "source": "iana" + }, + "application/tamp-community-update": { + "source": "iana" + }, + "application/tamp-community-update-confirm": { + "source": "iana" + }, + "application/tamp-error": { + "source": "iana" + }, + "application/tamp-sequence-adjust": { + "source": "iana" + }, + "application/tamp-sequence-adjust-confirm": { + "source": "iana" + }, + "application/tamp-status-query": { + "source": "iana" + }, + "application/tamp-status-response": { + "source": "iana" + }, + "application/tamp-update": { + "source": "iana" + }, + "application/tamp-update-confirm": { + "source": "iana" + }, + "application/tar": { + "compressible": true + }, + "application/taxii+json": { + "source": "iana", + "compressible": true + }, + "application/td+json": { + "source": "iana", + "compressible": true + }, + "application/tei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tei","teicorpus"] + }, + "application/tetra_isi": { + "source": "iana" + }, + "application/thraud+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tfi"] + }, + "application/timestamp-query": { + "source": "iana" + }, + "application/timestamp-reply": { + "source": "iana" + }, + "application/timestamped-data": { + "source": "iana", + "extensions": ["tsd"] + }, + "application/tlsrpt+gzip": { + "source": "iana" + }, + "application/tlsrpt+json": { + "source": "iana", + "compressible": true + }, + "application/tnauthlist": { + "source": "iana" + }, + "application/token-introspection+jwt": { + "source": "iana" + }, + "application/toml": { + "compressible": true, + "extensions": ["toml"] + }, + "application/trickle-ice-sdpfrag": { + "source": "iana" + }, + "application/trig": { + "source": "iana", + "extensions": ["trig"] + }, + "application/ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ttml"] + }, + "application/tve-trigger": { + "source": "iana" + }, + "application/tzif": { + "source": "iana" + }, + "application/tzif-leap": { + "source": "iana" + }, + "application/ubjson": { + "compressible": false, + "extensions": ["ubj"] + }, + "application/ulpfec": { + "source": "iana" + }, + "application/urc-grpsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/urc-ressheet+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rsheet"] + }, + "application/urc-targetdesc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["td"] + }, + "application/urc-uisocketdesc+xml": { + "source": "iana", + "compressible": true + }, + "application/vcard+json": { + "source": "iana", + "compressible": true + }, + "application/vcard+xml": { + "source": "iana", + "compressible": true + }, + "application/vemmi": { + "source": "iana" + }, + "application/vividence.scriptfile": { + "source": "apache" + }, + "application/vnd.1000minds.decision-model+xml": { + "source": "iana", + "compressible": true, + "extensions": ["1km"] + }, + "application/vnd.3gpp-prose+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-prose-pc3ch+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-v2x-local-service-information": { + "source": "iana" + }, + "application/vnd.3gpp.5gnas": { + "source": "iana" + }, + "application/vnd.3gpp.access-transfer-events+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.bsf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.gmop+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.gtpc": { + "source": "iana" + }, + "application/vnd.3gpp.interworking-data": { + "source": "iana" + }, + "application/vnd.3gpp.lpp": { + "source": "iana" + }, + "application/vnd.3gpp.mc-signalling-ear": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-payload": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-signalling": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-floor-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-signed+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-init-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-affiliation-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-transmission-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mid-call+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.ngap": { + "source": "iana" + }, + "application/vnd.3gpp.pfcp": { + "source": "iana" + }, + "application/vnd.3gpp.pic-bw-large": { + "source": "iana", + "extensions": ["plb"] + }, + "application/vnd.3gpp.pic-bw-small": { + "source": "iana", + "extensions": ["psb"] + }, + "application/vnd.3gpp.pic-bw-var": { + "source": "iana", + "extensions": ["pvb"] + }, + "application/vnd.3gpp.s1ap": { + "source": "iana" + }, + "application/vnd.3gpp.sms": { + "source": "iana" + }, + "application/vnd.3gpp.sms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-ext+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.state-and-event-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.ussd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.bcmcsinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.sms": { + "source": "iana" + }, + "application/vnd.3gpp2.tcap": { + "source": "iana", + "extensions": ["tcap"] + }, + "application/vnd.3lightssoftware.imagescal": { + "source": "iana" + }, + "application/vnd.3m.post-it-notes": { + "source": "iana", + "extensions": ["pwn"] + }, + "application/vnd.accpac.simply.aso": { + "source": "iana", + "extensions": ["aso"] + }, + "application/vnd.accpac.simply.imp": { + "source": "iana", + "extensions": ["imp"] + }, + "application/vnd.acucobol": { + "source": "iana", + "extensions": ["acu"] + }, + "application/vnd.acucorp": { + "source": "iana", + "extensions": ["atc","acutc"] + }, + "application/vnd.adobe.air-application-installer-package+zip": { + "source": "apache", + "compressible": false, + "extensions": ["air"] + }, + "application/vnd.adobe.flash.movie": { + "source": "iana" + }, + "application/vnd.adobe.formscentral.fcdt": { + "source": "iana", + "extensions": ["fcdt"] + }, + "application/vnd.adobe.fxp": { + "source": "iana", + "extensions": ["fxp","fxpl"] + }, + "application/vnd.adobe.partial-upload": { + "source": "iana" + }, + "application/vnd.adobe.xdp+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdp"] + }, + "application/vnd.adobe.xfdf": { + "source": "iana", + "extensions": ["xfdf"] + }, + "application/vnd.aether.imp": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata-pagedef": { + "source": "iana" + }, + "application/vnd.afpc.cmoca-cmresource": { + "source": "iana" + }, + "application/vnd.afpc.foca-charset": { + "source": "iana" + }, + "application/vnd.afpc.foca-codedfont": { + "source": "iana" + }, + "application/vnd.afpc.foca-codepage": { + "source": "iana" + }, + "application/vnd.afpc.modca": { + "source": "iana" + }, + "application/vnd.afpc.modca-cmtable": { + "source": "iana" + }, + "application/vnd.afpc.modca-formdef": { + "source": "iana" + }, + "application/vnd.afpc.modca-mediummap": { + "source": "iana" + }, + "application/vnd.afpc.modca-objectcontainer": { + "source": "iana" + }, + "application/vnd.afpc.modca-overlay": { + "source": "iana" + }, + "application/vnd.afpc.modca-pagesegment": { + "source": "iana" + }, + "application/vnd.age": { + "source": "iana", + "extensions": ["age"] + }, + "application/vnd.ah-barcode": { + "source": "iana" + }, + "application/vnd.ahead.space": { + "source": "iana", + "extensions": ["ahead"] + }, + "application/vnd.airzip.filesecure.azf": { + "source": "iana", + "extensions": ["azf"] + }, + "application/vnd.airzip.filesecure.azs": { + "source": "iana", + "extensions": ["azs"] + }, + "application/vnd.amadeus+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.amazon.ebook": { + "source": "apache", + "extensions": ["azw"] + }, + "application/vnd.amazon.mobi8-ebook": { + "source": "iana" + }, + "application/vnd.americandynamics.acc": { + "source": "iana", + "extensions": ["acc"] + }, + "application/vnd.amiga.ami": { + "source": "iana", + "extensions": ["ami"] + }, + "application/vnd.amundsen.maze+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.android.ota": { + "source": "iana" + }, + "application/vnd.android.package-archive": { + "source": "apache", + "compressible": false, + "extensions": ["apk"] + }, + "application/vnd.anki": { + "source": "iana" + }, + "application/vnd.anser-web-certificate-issue-initiation": { + "source": "iana", + "extensions": ["cii"] + }, + "application/vnd.anser-web-funds-transfer-initiation": { + "source": "apache", + "extensions": ["fti"] + }, + "application/vnd.antix.game-component": { + "source": "iana", + "extensions": ["atx"] + }, + "application/vnd.apache.arrow.file": { + "source": "iana" + }, + "application/vnd.apache.arrow.stream": { + "source": "iana" + }, + "application/vnd.apache.thrift.binary": { + "source": "iana" + }, + "application/vnd.apache.thrift.compact": { + "source": "iana" + }, + "application/vnd.apache.thrift.json": { + "source": "iana" + }, + "application/vnd.api+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.aplextor.warrp+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apothekende.reservation+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apple.installer+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpkg"] + }, + "application/vnd.apple.keynote": { + "source": "iana", + "extensions": ["key"] + }, + "application/vnd.apple.mpegurl": { + "source": "iana", + "extensions": ["m3u8"] + }, + "application/vnd.apple.numbers": { + "source": "iana", + "extensions": ["numbers"] + }, + "application/vnd.apple.pages": { + "source": "iana", + "extensions": ["pages"] + }, + "application/vnd.apple.pkpass": { + "compressible": false, + "extensions": ["pkpass"] + }, + "application/vnd.arastra.swi": { + "source": "iana" + }, + "application/vnd.aristanetworks.swi": { + "source": "iana", + "extensions": ["swi"] + }, + "application/vnd.artisan+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.artsquare": { + "source": "iana" + }, + "application/vnd.astraea-software.iota": { + "source": "iana", + "extensions": ["iota"] + }, + "application/vnd.audiograph": { + "source": "iana", + "extensions": ["aep"] + }, + "application/vnd.autopackage": { + "source": "iana" + }, + "application/vnd.avalon+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.avistar+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.balsamiq.bmml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["bmml"] + }, + "application/vnd.balsamiq.bmpr": { + "source": "iana" + }, + "application/vnd.banana-accounting": { + "source": "iana" + }, + "application/vnd.bbf.usp.error": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bekitzur-stech+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bint.med-content": { + "source": "iana" + }, + "application/vnd.biopax.rdf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.blink-idb-value-wrapper": { + "source": "iana" + }, + "application/vnd.blueice.multipass": { + "source": "iana", + "extensions": ["mpm"] + }, + "application/vnd.bluetooth.ep.oob": { + "source": "iana" + }, + "application/vnd.bluetooth.le.oob": { + "source": "iana" + }, + "application/vnd.bmi": { + "source": "iana", + "extensions": ["bmi"] + }, + "application/vnd.bpf": { + "source": "iana" + }, + "application/vnd.bpf3": { + "source": "iana" + }, + "application/vnd.businessobjects": { + "source": "iana", + "extensions": ["rep"] + }, + "application/vnd.byu.uapi+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cab-jscript": { + "source": "iana" + }, + "application/vnd.canon-cpdl": { + "source": "iana" + }, + "application/vnd.canon-lips": { + "source": "iana" + }, + "application/vnd.capasystems-pg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cendio.thinlinc.clientconf": { + "source": "iana" + }, + "application/vnd.century-systems.tcp_stream": { + "source": "iana" + }, + "application/vnd.chemdraw+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdxml"] + }, + "application/vnd.chess-pgn": { + "source": "iana" + }, + "application/vnd.chipnuts.karaoke-mmd": { + "source": "iana", + "extensions": ["mmd"] + }, + "application/vnd.ciedi": { + "source": "iana" + }, + "application/vnd.cinderella": { + "source": "iana", + "extensions": ["cdy"] + }, + "application/vnd.cirpack.isdn-ext": { + "source": "iana" + }, + "application/vnd.citationstyles.style+xml": { + "source": "iana", + "compressible": true, + "extensions": ["csl"] + }, + "application/vnd.claymore": { + "source": "iana", + "extensions": ["cla"] + }, + "application/vnd.cloanto.rp9": { + "source": "iana", + "extensions": ["rp9"] + }, + "application/vnd.clonk.c4group": { + "source": "iana", + "extensions": ["c4g","c4d","c4f","c4p","c4u"] + }, + "application/vnd.cluetrust.cartomobile-config": { + "source": "iana", + "extensions": ["c11amc"] + }, + "application/vnd.cluetrust.cartomobile-config-pkg": { + "source": "iana", + "extensions": ["c11amz"] + }, + "application/vnd.coffeescript": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet-template": { + "source": "iana" + }, + "application/vnd.collection+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.doc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.next+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.comicbook+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.comicbook-rar": { + "source": "iana" + }, + "application/vnd.commerce-battelle": { + "source": "iana" + }, + "application/vnd.commonspace": { + "source": "iana", + "extensions": ["csp"] + }, + "application/vnd.contact.cmsg": { + "source": "iana", + "extensions": ["cdbcmsg"] + }, + "application/vnd.coreos.ignition+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cosmocaller": { + "source": "iana", + "extensions": ["cmc"] + }, + "application/vnd.crick.clicker": { + "source": "iana", + "extensions": ["clkx"] + }, + "application/vnd.crick.clicker.keyboard": { + "source": "iana", + "extensions": ["clkk"] + }, + "application/vnd.crick.clicker.palette": { + "source": "iana", + "extensions": ["clkp"] + }, + "application/vnd.crick.clicker.template": { + "source": "iana", + "extensions": ["clkt"] + }, + "application/vnd.crick.clicker.wordbank": { + "source": "iana", + "extensions": ["clkw"] + }, + "application/vnd.criticaltools.wbs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wbs"] + }, + "application/vnd.cryptii.pipe+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.crypto-shade-file": { + "source": "iana" + }, + "application/vnd.cryptomator.encrypted": { + "source": "iana" + }, + "application/vnd.cryptomator.vault": { + "source": "iana" + }, + "application/vnd.ctc-posml": { + "source": "iana", + "extensions": ["pml"] + }, + "application/vnd.ctct.ws+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cups-pdf": { + "source": "iana" + }, + "application/vnd.cups-postscript": { + "source": "iana" + }, + "application/vnd.cups-ppd": { + "source": "iana", + "extensions": ["ppd"] + }, + "application/vnd.cups-raster": { + "source": "iana" + }, + "application/vnd.cups-raw": { + "source": "iana" + }, + "application/vnd.curl": { + "source": "iana" + }, + "application/vnd.curl.car": { + "source": "apache", + "extensions": ["car"] + }, + "application/vnd.curl.pcurl": { + "source": "apache", + "extensions": ["pcurl"] + }, + "application/vnd.cyan.dean.root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cybank": { + "source": "iana" + }, + "application/vnd.cyclonedx+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cyclonedx+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.d2l.coursepackage1p0+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.d3m-dataset": { + "source": "iana" + }, + "application/vnd.d3m-problem": { + "source": "iana" + }, + "application/vnd.dart": { + "source": "iana", + "compressible": true, + "extensions": ["dart"] + }, + "application/vnd.data-vision.rdz": { + "source": "iana", + "extensions": ["rdz"] + }, + "application/vnd.datapackage+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dataresource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dbf": { + "source": "iana", + "extensions": ["dbf"] + }, + "application/vnd.debian.binary-package": { + "source": "iana" + }, + "application/vnd.dece.data": { + "source": "iana", + "extensions": ["uvf","uvvf","uvd","uvvd"] + }, + "application/vnd.dece.ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uvt","uvvt"] + }, + "application/vnd.dece.unspecified": { + "source": "iana", + "extensions": ["uvx","uvvx"] + }, + "application/vnd.dece.zip": { + "source": "iana", + "extensions": ["uvz","uvvz"] + }, + "application/vnd.denovo.fcselayout-link": { + "source": "iana", + "extensions": ["fe_launch"] + }, + "application/vnd.desmume.movie": { + "source": "iana" + }, + "application/vnd.dir-bi.plate-dl-nosuffix": { + "source": "iana" + }, + "application/vnd.dm.delegation+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dna": { + "source": "iana", + "extensions": ["dna"] + }, + "application/vnd.document+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dolby.mlp": { + "source": "apache", + "extensions": ["mlp"] + }, + "application/vnd.dolby.mobile.1": { + "source": "iana" + }, + "application/vnd.dolby.mobile.2": { + "source": "iana" + }, + "application/vnd.doremir.scorecloud-binary-document": { + "source": "iana" + }, + "application/vnd.dpgraph": { + "source": "iana", + "extensions": ["dpg"] + }, + "application/vnd.dreamfactory": { + "source": "iana", + "extensions": ["dfac"] + }, + "application/vnd.drive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ds-keypoint": { + "source": "apache", + "extensions": ["kpxx"] + }, + "application/vnd.dtg.local": { + "source": "iana" + }, + "application/vnd.dtg.local.flash": { + "source": "iana" + }, + "application/vnd.dtg.local.html": { + "source": "iana" + }, + "application/vnd.dvb.ait": { + "source": "iana", + "extensions": ["ait"] + }, + "application/vnd.dvb.dvbisl+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.dvbj": { + "source": "iana" + }, + "application/vnd.dvb.esgcontainer": { + "source": "iana" + }, + "application/vnd.dvb.ipdcdftnotifaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess2": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgpdd": { + "source": "iana" + }, + "application/vnd.dvb.ipdcroaming": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-base": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-enhancement": { + "source": "iana" + }, + "application/vnd.dvb.notif-aggregate-root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-container+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-generic+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-msglist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-response+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-init+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.pfr": { + "source": "iana" + }, + "application/vnd.dvb.service": { + "source": "iana", + "extensions": ["svc"] + }, + "application/vnd.dxr": { + "source": "iana" + }, + "application/vnd.dynageo": { + "source": "iana", + "extensions": ["geo"] + }, + "application/vnd.dzr": { + "source": "iana" + }, + "application/vnd.easykaraoke.cdgdownload": { + "source": "iana" + }, + "application/vnd.ecdis-update": { + "source": "iana" + }, + "application/vnd.ecip.rlp": { + "source": "iana" + }, + "application/vnd.eclipse.ditto+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ecowin.chart": { + "source": "iana", + "extensions": ["mag"] + }, + "application/vnd.ecowin.filerequest": { + "source": "iana" + }, + "application/vnd.ecowin.fileupdate": { + "source": "iana" + }, + "application/vnd.ecowin.series": { + "source": "iana" + }, + "application/vnd.ecowin.seriesrequest": { + "source": "iana" + }, + "application/vnd.ecowin.seriesupdate": { + "source": "iana" + }, + "application/vnd.efi.img": { + "source": "iana" + }, + "application/vnd.efi.iso": { + "source": "iana" + }, + "application/vnd.emclient.accessrequest+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.enliven": { + "source": "iana", + "extensions": ["nml"] + }, + "application/vnd.enphase.envoy": { + "source": "iana" + }, + "application/vnd.eprints.data+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.epson.esf": { + "source": "iana", + "extensions": ["esf"] + }, + "application/vnd.epson.msf": { + "source": "iana", + "extensions": ["msf"] + }, + "application/vnd.epson.quickanime": { + "source": "iana", + "extensions": ["qam"] + }, + "application/vnd.epson.salt": { + "source": "iana", + "extensions": ["slt"] + }, + "application/vnd.epson.ssf": { + "source": "iana", + "extensions": ["ssf"] + }, + "application/vnd.ericsson.quickcall": { + "source": "iana" + }, + "application/vnd.espass-espass+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.eszigno3+xml": { + "source": "iana", + "compressible": true, + "extensions": ["es3","et3"] + }, + "application/vnd.etsi.aoc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.asic-e+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.asic-s+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.cug+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvcommand+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-bc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-cod+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-npvr+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvservice+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsync+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mcid+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mheg5": { + "source": "iana" + }, + "application/vnd.etsi.overload-control-policy-dataset+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.pstn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.sci+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.simservs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.timestamp-token": { + "source": "iana" + }, + "application/vnd.etsi.tsl+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.tsl.der": { + "source": "iana" + }, + "application/vnd.eu.kasparian.car+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.eudora.data": { + "source": "iana" + }, + "application/vnd.evolv.ecig.profile": { + "source": "iana" + }, + "application/vnd.evolv.ecig.settings": { + "source": "iana" + }, + "application/vnd.evolv.ecig.theme": { + "source": "iana" + }, + "application/vnd.exstream-empower+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.exstream-package": { + "source": "iana" + }, + "application/vnd.ezpix-album": { + "source": "iana", + "extensions": ["ez2"] + }, + "application/vnd.ezpix-package": { + "source": "iana", + "extensions": ["ez3"] + }, + "application/vnd.f-secure.mobile": { + "source": "iana" + }, + "application/vnd.familysearch.gedcom+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.fastcopy-disk-image": { + "source": "iana" + }, + "application/vnd.fdf": { + "source": "iana", + "extensions": ["fdf"] + }, + "application/vnd.fdsn.mseed": { + "source": "iana", + "extensions": ["mseed"] + }, + "application/vnd.fdsn.seed": { + "source": "iana", + "extensions": ["seed","dataless"] + }, + "application/vnd.ffsns": { + "source": "iana" + }, + "application/vnd.ficlab.flb+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.filmit.zfc": { + "source": "iana" + }, + "application/vnd.fints": { + "source": "iana" + }, + "application/vnd.firemonkeys.cloudcell": { + "source": "iana" + }, + "application/vnd.flographit": { + "source": "iana", + "extensions": ["gph"] + }, + "application/vnd.fluxtime.clip": { + "source": "iana", + "extensions": ["ftc"] + }, + "application/vnd.font-fontforge-sfd": { + "source": "iana" + }, + "application/vnd.framemaker": { + "source": "iana", + "extensions": ["fm","frame","maker","book"] + }, + "application/vnd.frogans.fnc": { + "source": "iana", + "extensions": ["fnc"] + }, + "application/vnd.frogans.ltf": { + "source": "iana", + "extensions": ["ltf"] + }, + "application/vnd.fsc.weblaunch": { + "source": "iana", + "extensions": ["fsc"] + }, + "application/vnd.fujifilm.fb.docuworks": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.docuworks.binder": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.jfi+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.fujitsu.oasys": { + "source": "iana", + "extensions": ["oas"] + }, + "application/vnd.fujitsu.oasys2": { + "source": "iana", + "extensions": ["oa2"] + }, + "application/vnd.fujitsu.oasys3": { + "source": "iana", + "extensions": ["oa3"] + }, + "application/vnd.fujitsu.oasysgp": { + "source": "iana", + "extensions": ["fg5"] + }, + "application/vnd.fujitsu.oasysprs": { + "source": "iana", + "extensions": ["bh2"] + }, + "application/vnd.fujixerox.art-ex": { + "source": "iana" + }, + "application/vnd.fujixerox.art4": { + "source": "iana" + }, + "application/vnd.fujixerox.ddd": { + "source": "iana", + "extensions": ["ddd"] + }, + "application/vnd.fujixerox.docuworks": { + "source": "iana", + "extensions": ["xdw"] + }, + "application/vnd.fujixerox.docuworks.binder": { + "source": "iana", + "extensions": ["xbd"] + }, + "application/vnd.fujixerox.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujixerox.hbpl": { + "source": "iana" + }, + "application/vnd.fut-misnet": { + "source": "iana" + }, + "application/vnd.futoin+cbor": { + "source": "iana" + }, + "application/vnd.futoin+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.fuzzysheet": { + "source": "iana", + "extensions": ["fzs"] + }, + "application/vnd.genomatix.tuxedo": { + "source": "iana", + "extensions": ["txd"] + }, + "application/vnd.gentics.grd+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.geo+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.geocube+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.geogebra.file": { + "source": "iana", + "extensions": ["ggb"] + }, + "application/vnd.geogebra.slides": { + "source": "iana" + }, + "application/vnd.geogebra.tool": { + "source": "iana", + "extensions": ["ggt"] + }, + "application/vnd.geometry-explorer": { + "source": "iana", + "extensions": ["gex","gre"] + }, + "application/vnd.geonext": { + "source": "iana", + "extensions": ["gxt"] + }, + "application/vnd.geoplan": { + "source": "iana", + "extensions": ["g2w"] + }, + "application/vnd.geospace": { + "source": "iana", + "extensions": ["g3w"] + }, + "application/vnd.gerber": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt-response": { + "source": "iana" + }, + "application/vnd.gmx": { + "source": "iana", + "extensions": ["gmx"] + }, + "application/vnd.google-apps.document": { + "compressible": false, + "extensions": ["gdoc"] + }, + "application/vnd.google-apps.presentation": { + "compressible": false, + "extensions": ["gslides"] + }, + "application/vnd.google-apps.spreadsheet": { + "compressible": false, + "extensions": ["gsheet"] + }, + "application/vnd.google-earth.kml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["kml"] + }, + "application/vnd.google-earth.kmz": { + "source": "iana", + "compressible": false, + "extensions": ["kmz"] + }, + "application/vnd.gov.sk.e-form+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.gov.sk.e-form+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.gov.sk.xmldatacontainer+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.grafeq": { + "source": "iana", + "extensions": ["gqf","gqs"] + }, + "application/vnd.gridmp": { + "source": "iana" + }, + "application/vnd.groove-account": { + "source": "iana", + "extensions": ["gac"] + }, + "application/vnd.groove-help": { + "source": "iana", + "extensions": ["ghf"] + }, + "application/vnd.groove-identity-message": { + "source": "iana", + "extensions": ["gim"] + }, + "application/vnd.groove-injector": { + "source": "iana", + "extensions": ["grv"] + }, + "application/vnd.groove-tool-message": { + "source": "iana", + "extensions": ["gtm"] + }, + "application/vnd.groove-tool-template": { + "source": "iana", + "extensions": ["tpl"] + }, + "application/vnd.groove-vcard": { + "source": "iana", + "extensions": ["vcg"] + }, + "application/vnd.hal+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hal+xml": { + "source": "iana", + "compressible": true, + "extensions": ["hal"] + }, + "application/vnd.handheld-entertainment+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zmm"] + }, + "application/vnd.hbci": { + "source": "iana", + "extensions": ["hbci"] + }, + "application/vnd.hc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hcl-bireports": { + "source": "iana" + }, + "application/vnd.hdt": { + "source": "iana" + }, + "application/vnd.heroku+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hhe.lesson-player": { + "source": "iana", + "extensions": ["les"] + }, + "application/vnd.hl7cda+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.hl7v2+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.hp-hpgl": { + "source": "iana", + "extensions": ["hpgl"] + }, + "application/vnd.hp-hpid": { + "source": "iana", + "extensions": ["hpid"] + }, + "application/vnd.hp-hps": { + "source": "iana", + "extensions": ["hps"] + }, + "application/vnd.hp-jlyt": { + "source": "iana", + "extensions": ["jlt"] + }, + "application/vnd.hp-pcl": { + "source": "iana", + "extensions": ["pcl"] + }, + "application/vnd.hp-pclxl": { + "source": "iana", + "extensions": ["pclxl"] + }, + "application/vnd.httphone": { + "source": "iana" + }, + "application/vnd.hydrostatix.sof-data": { + "source": "iana", + "extensions": ["sfd-hdstx"] + }, + "application/vnd.hyper+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyper-item+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyperdrive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hzn-3d-crossword": { + "source": "iana" + }, + "application/vnd.ibm.afplinedata": { + "source": "iana" + }, + "application/vnd.ibm.electronic-media": { + "source": "iana" + }, + "application/vnd.ibm.minipay": { + "source": "iana", + "extensions": ["mpy"] + }, + "application/vnd.ibm.modcap": { + "source": "iana", + "extensions": ["afp","listafp","list3820"] + }, + "application/vnd.ibm.rights-management": { + "source": "iana", + "extensions": ["irm"] + }, + "application/vnd.ibm.secure-container": { + "source": "iana", + "extensions": ["sc"] + }, + "application/vnd.iccprofile": { + "source": "iana", + "extensions": ["icc","icm"] + }, + "application/vnd.ieee.1905": { + "source": "iana" + }, + "application/vnd.igloader": { + "source": "iana", + "extensions": ["igl"] + }, + "application/vnd.imagemeter.folder+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.imagemeter.image+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.immervision-ivp": { + "source": "iana", + "extensions": ["ivp"] + }, + "application/vnd.immervision-ivu": { + "source": "iana", + "extensions": ["ivu"] + }, + "application/vnd.ims.imsccv1p1": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p2": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p3": { + "source": "iana" + }, + "application/vnd.ims.lis.v2.result+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolconsumerprofile+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy.id+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings.simple+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.informedcontrol.rms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.informix-visionary": { + "source": "iana" + }, + "application/vnd.infotech.project": { + "source": "iana" + }, + "application/vnd.infotech.project+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.innopath.wamp.notification": { + "source": "iana" + }, + "application/vnd.insors.igm": { + "source": "iana", + "extensions": ["igm"] + }, + "application/vnd.intercon.formnet": { + "source": "iana", + "extensions": ["xpw","xpx"] + }, + "application/vnd.intergeo": { + "source": "iana", + "extensions": ["i2g"] + }, + "application/vnd.intertrust.digibox": { + "source": "iana" + }, + "application/vnd.intertrust.nncp": { + "source": "iana" + }, + "application/vnd.intu.qbo": { + "source": "iana", + "extensions": ["qbo"] + }, + "application/vnd.intu.qfx": { + "source": "iana", + "extensions": ["qfx"] + }, + "application/vnd.iptc.g2.catalogitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.conceptitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.knowledgeitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.packageitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.planningitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ipunplugged.rcprofile": { + "source": "iana", + "extensions": ["rcprofile"] + }, + "application/vnd.irepository.package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["irp"] + }, + "application/vnd.is-xpr": { + "source": "iana", + "extensions": ["xpr"] + }, + "application/vnd.isac.fcs": { + "source": "iana", + "extensions": ["fcs"] + }, + "application/vnd.iso11783-10+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.jam": { + "source": "iana", + "extensions": ["jam"] + }, + "application/vnd.japannet-directory-service": { + "source": "iana" + }, + "application/vnd.japannet-jpnstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-payment-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-registration": { + "source": "iana" + }, + "application/vnd.japannet-registration-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-setstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-verification": { + "source": "iana" + }, + "application/vnd.japannet-verification-wakeup": { + "source": "iana" + }, + "application/vnd.jcp.javame.midlet-rms": { + "source": "iana", + "extensions": ["rms"] + }, + "application/vnd.jisp": { + "source": "iana", + "extensions": ["jisp"] + }, + "application/vnd.joost.joda-archive": { + "source": "iana", + "extensions": ["joda"] + }, + "application/vnd.jsk.isdn-ngn": { + "source": "iana" + }, + "application/vnd.kahootz": { + "source": "iana", + "extensions": ["ktz","ktr"] + }, + "application/vnd.kde.karbon": { + "source": "iana", + "extensions": ["karbon"] + }, + "application/vnd.kde.kchart": { + "source": "iana", + "extensions": ["chrt"] + }, + "application/vnd.kde.kformula": { + "source": "iana", + "extensions": ["kfo"] + }, + "application/vnd.kde.kivio": { + "source": "iana", + "extensions": ["flw"] + }, + "application/vnd.kde.kontour": { + "source": "iana", + "extensions": ["kon"] + }, + "application/vnd.kde.kpresenter": { + "source": "iana", + "extensions": ["kpr","kpt"] + }, + "application/vnd.kde.kspread": { + "source": "iana", + "extensions": ["ksp"] + }, + "application/vnd.kde.kword": { + "source": "iana", + "extensions": ["kwd","kwt"] + }, + "application/vnd.kenameaapp": { + "source": "iana", + "extensions": ["htke"] + }, + "application/vnd.kidspiration": { + "source": "iana", + "extensions": ["kia"] + }, + "application/vnd.kinar": { + "source": "iana", + "extensions": ["kne","knp"] + }, + "application/vnd.koan": { + "source": "iana", + "extensions": ["skp","skd","skt","skm"] + }, + "application/vnd.kodak-descriptor": { + "source": "iana", + "extensions": ["sse"] + }, + "application/vnd.las": { + "source": "iana" + }, + "application/vnd.las.las+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.las.las+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lasxml"] + }, + "application/vnd.laszip": { + "source": "iana" + }, + "application/vnd.leap+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.liberty-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.llamagraphics.life-balance.desktop": { + "source": "iana", + "extensions": ["lbd"] + }, + "application/vnd.llamagraphics.life-balance.exchange+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lbe"] + }, + "application/vnd.logipipe.circuit+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.loom": { + "source": "iana" + }, + "application/vnd.lotus-1-2-3": { + "source": "iana", + "extensions": ["123"] + }, + "application/vnd.lotus-approach": { + "source": "iana", + "extensions": ["apr"] + }, + "application/vnd.lotus-freelance": { + "source": "iana", + "extensions": ["pre"] + }, + "application/vnd.lotus-notes": { + "source": "iana", + "extensions": ["nsf"] + }, + "application/vnd.lotus-organizer": { + "source": "iana", + "extensions": ["org"] + }, + "application/vnd.lotus-screencam": { + "source": "iana", + "extensions": ["scm"] + }, + "application/vnd.lotus-wordpro": { + "source": "iana", + "extensions": ["lwp"] + }, + "application/vnd.macports.portpkg": { + "source": "iana", + "extensions": ["portpkg"] + }, + "application/vnd.mapbox-vector-tile": { + "source": "iana", + "extensions": ["mvt"] + }, + "application/vnd.marlin.drm.actiontoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.conftoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.license+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.mdcf": { + "source": "iana" + }, + "application/vnd.mason+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.maxar.archive.3tz+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.maxmind.maxmind-db": { + "source": "iana" + }, + "application/vnd.mcd": { + "source": "iana", + "extensions": ["mcd"] + }, + "application/vnd.medcalcdata": { + "source": "iana", + "extensions": ["mc1"] + }, + "application/vnd.mediastation.cdkey": { + "source": "iana", + "extensions": ["cdkey"] + }, + "application/vnd.meridian-slingshot": { + "source": "iana" + }, + "application/vnd.mfer": { + "source": "iana", + "extensions": ["mwf"] + }, + "application/vnd.mfmp": { + "source": "iana", + "extensions": ["mfm"] + }, + "application/vnd.micro+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.micrografx.flo": { + "source": "iana", + "extensions": ["flo"] + }, + "application/vnd.micrografx.igx": { + "source": "iana", + "extensions": ["igx"] + }, + "application/vnd.microsoft.portable-executable": { + "source": "iana" + }, + "application/vnd.microsoft.windows.thumbnail-cache": { + "source": "iana" + }, + "application/vnd.miele+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.mif": { + "source": "iana", + "extensions": ["mif"] + }, + "application/vnd.minisoft-hp3000-save": { + "source": "iana" + }, + "application/vnd.mitsubishi.misty-guard.trustweb": { + "source": "iana" + }, + "application/vnd.mobius.daf": { + "source": "iana", + "extensions": ["daf"] + }, + "application/vnd.mobius.dis": { + "source": "iana", + "extensions": ["dis"] + }, + "application/vnd.mobius.mbk": { + "source": "iana", + "extensions": ["mbk"] + }, + "application/vnd.mobius.mqy": { + "source": "iana", + "extensions": ["mqy"] + }, + "application/vnd.mobius.msl": { + "source": "iana", + "extensions": ["msl"] + }, + "application/vnd.mobius.plc": { + "source": "iana", + "extensions": ["plc"] + }, + "application/vnd.mobius.txf": { + "source": "iana", + "extensions": ["txf"] + }, + "application/vnd.mophun.application": { + "source": "iana", + "extensions": ["mpn"] + }, + "application/vnd.mophun.certificate": { + "source": "iana", + "extensions": ["mpc"] + }, + "application/vnd.motorola.flexsuite": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.adsi": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.fis": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.gotap": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.kmr": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.ttc": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.wem": { + "source": "iana" + }, + "application/vnd.motorola.iprm": { + "source": "iana" + }, + "application/vnd.mozilla.xul+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xul"] + }, + "application/vnd.ms-3mfdocument": { + "source": "iana" + }, + "application/vnd.ms-artgalry": { + "source": "iana", + "extensions": ["cil"] + }, + "application/vnd.ms-asf": { + "source": "iana" + }, + "application/vnd.ms-cab-compressed": { + "source": "iana", + "extensions": ["cab"] + }, + "application/vnd.ms-color.iccprofile": { + "source": "apache" + }, + "application/vnd.ms-excel": { + "source": "iana", + "compressible": false, + "extensions": ["xls","xlm","xla","xlc","xlt","xlw"] + }, + "application/vnd.ms-excel.addin.macroenabled.12": { + "source": "iana", + "extensions": ["xlam"] + }, + "application/vnd.ms-excel.sheet.binary.macroenabled.12": { + "source": "iana", + "extensions": ["xlsb"] + }, + "application/vnd.ms-excel.sheet.macroenabled.12": { + "source": "iana", + "extensions": ["xlsm"] + }, + "application/vnd.ms-excel.template.macroenabled.12": { + "source": "iana", + "extensions": ["xltm"] + }, + "application/vnd.ms-fontobject": { + "source": "iana", + "compressible": true, + "extensions": ["eot"] + }, + "application/vnd.ms-htmlhelp": { + "source": "iana", + "extensions": ["chm"] + }, + "application/vnd.ms-ims": { + "source": "iana", + "extensions": ["ims"] + }, + "application/vnd.ms-lrm": { + "source": "iana", + "extensions": ["lrm"] + }, + "application/vnd.ms-office.activex+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-officetheme": { + "source": "iana", + "extensions": ["thmx"] + }, + "application/vnd.ms-opentype": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-outlook": { + "compressible": false, + "extensions": ["msg"] + }, + "application/vnd.ms-package.obfuscated-opentype": { + "source": "apache" + }, + "application/vnd.ms-pki.seccat": { + "source": "apache", + "extensions": ["cat"] + }, + "application/vnd.ms-pki.stl": { + "source": "apache", + "extensions": ["stl"] + }, + "application/vnd.ms-playready.initiator+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-powerpoint": { + "source": "iana", + "compressible": false, + "extensions": ["ppt","pps","pot"] + }, + "application/vnd.ms-powerpoint.addin.macroenabled.12": { + "source": "iana", + "extensions": ["ppam"] + }, + "application/vnd.ms-powerpoint.presentation.macroenabled.12": { + "source": "iana", + "extensions": ["pptm"] + }, + "application/vnd.ms-powerpoint.slide.macroenabled.12": { + "source": "iana", + "extensions": ["sldm"] + }, + "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { + "source": "iana", + "extensions": ["ppsm"] + }, + "application/vnd.ms-powerpoint.template.macroenabled.12": { + "source": "iana", + "extensions": ["potm"] + }, + "application/vnd.ms-printdevicecapabilities+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-printing.printticket+xml": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-printschematicket+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-project": { + "source": "iana", + "extensions": ["mpp","mpt"] + }, + "application/vnd.ms-tnef": { + "source": "iana" + }, + "application/vnd.ms-windows.devicepairing": { + "source": "iana" + }, + "application/vnd.ms-windows.nwprinting.oob": { + "source": "iana" + }, + "application/vnd.ms-windows.printerpairing": { + "source": "iana" + }, + "application/vnd.ms-windows.wsd.oob": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-resp": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-resp": { + "source": "iana" + }, + "application/vnd.ms-word.document.macroenabled.12": { + "source": "iana", + "extensions": ["docm"] + }, + "application/vnd.ms-word.template.macroenabled.12": { + "source": "iana", + "extensions": ["dotm"] + }, + "application/vnd.ms-works": { + "source": "iana", + "extensions": ["wps","wks","wcm","wdb"] + }, + "application/vnd.ms-wpl": { + "source": "iana", + "extensions": ["wpl"] + }, + "application/vnd.ms-xpsdocument": { + "source": "iana", + "compressible": false, + "extensions": ["xps"] + }, + "application/vnd.msa-disk-image": { + "source": "iana" + }, + "application/vnd.mseq": { + "source": "iana", + "extensions": ["mseq"] + }, + "application/vnd.msign": { + "source": "iana" + }, + "application/vnd.multiad.creator": { + "source": "iana" + }, + "application/vnd.multiad.creator.cif": { + "source": "iana" + }, + "application/vnd.music-niff": { + "source": "iana" + }, + "application/vnd.musician": { + "source": "iana", + "extensions": ["mus"] + }, + "application/vnd.muvee.style": { + "source": "iana", + "extensions": ["msty"] + }, + "application/vnd.mynfc": { + "source": "iana", + "extensions": ["taglet"] + }, + "application/vnd.nacamar.ybrid+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ncd.control": { + "source": "iana" + }, + "application/vnd.ncd.reference": { + "source": "iana" + }, + "application/vnd.nearst.inv+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.nebumind.line": { + "source": "iana" + }, + "application/vnd.nervana": { + "source": "iana" + }, + "application/vnd.netfpx": { + "source": "iana" + }, + "application/vnd.neurolanguage.nlu": { + "source": "iana", + "extensions": ["nlu"] + }, + "application/vnd.nimn": { + "source": "iana" + }, + "application/vnd.nintendo.nitro.rom": { + "source": "iana" + }, + "application/vnd.nintendo.snes.rom": { + "source": "iana" + }, + "application/vnd.nitf": { + "source": "iana", + "extensions": ["ntf","nitf"] + }, + "application/vnd.noblenet-directory": { + "source": "iana", + "extensions": ["nnd"] + }, + "application/vnd.noblenet-sealer": { + "source": "iana", + "extensions": ["nns"] + }, + "application/vnd.noblenet-web": { + "source": "iana", + "extensions": ["nnw"] + }, + "application/vnd.nokia.catalogs": { + "source": "iana" + }, + "application/vnd.nokia.conml+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.conml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.iptv.config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.isds-radio-presets": { + "source": "iana" + }, + "application/vnd.nokia.landmark+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.landmark+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.landmarkcollection+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.n-gage.ac+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ac"] + }, + "application/vnd.nokia.n-gage.data": { + "source": "iana", + "extensions": ["ngdat"] + }, + "application/vnd.nokia.n-gage.symbian.install": { + "source": "iana", + "extensions": ["n-gage"] + }, + "application/vnd.nokia.ncd": { + "source": "iana" + }, + "application/vnd.nokia.pcd+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.pcd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.radio-preset": { + "source": "iana", + "extensions": ["rpst"] + }, + "application/vnd.nokia.radio-presets": { + "source": "iana", + "extensions": ["rpss"] + }, + "application/vnd.novadigm.edm": { + "source": "iana", + "extensions": ["edm"] + }, + "application/vnd.novadigm.edx": { + "source": "iana", + "extensions": ["edx"] + }, + "application/vnd.novadigm.ext": { + "source": "iana", + "extensions": ["ext"] + }, + "application/vnd.ntt-local.content-share": { + "source": "iana" + }, + "application/vnd.ntt-local.file-transfer": { + "source": "iana" + }, + "application/vnd.ntt-local.ogw_remote-access": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_remote": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_tcp_stream": { + "source": "iana" + }, + "application/vnd.oasis.opendocument.chart": { + "source": "iana", + "extensions": ["odc"] + }, + "application/vnd.oasis.opendocument.chart-template": { + "source": "iana", + "extensions": ["otc"] + }, + "application/vnd.oasis.opendocument.database": { + "source": "iana", + "extensions": ["odb"] + }, + "application/vnd.oasis.opendocument.formula": { + "source": "iana", + "extensions": ["odf"] + }, + "application/vnd.oasis.opendocument.formula-template": { + "source": "iana", + "extensions": ["odft"] + }, + "application/vnd.oasis.opendocument.graphics": { + "source": "iana", + "compressible": false, + "extensions": ["odg"] + }, + "application/vnd.oasis.opendocument.graphics-template": { + "source": "iana", + "extensions": ["otg"] + }, + "application/vnd.oasis.opendocument.image": { + "source": "iana", + "extensions": ["odi"] + }, + "application/vnd.oasis.opendocument.image-template": { + "source": "iana", + "extensions": ["oti"] + }, + "application/vnd.oasis.opendocument.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["odp"] + }, + "application/vnd.oasis.opendocument.presentation-template": { + "source": "iana", + "extensions": ["otp"] + }, + "application/vnd.oasis.opendocument.spreadsheet": { + "source": "iana", + "compressible": false, + "extensions": ["ods"] + }, + "application/vnd.oasis.opendocument.spreadsheet-template": { + "source": "iana", + "extensions": ["ots"] + }, + "application/vnd.oasis.opendocument.text": { + "source": "iana", + "compressible": false, + "extensions": ["odt"] + }, + "application/vnd.oasis.opendocument.text-master": { + "source": "iana", + "extensions": ["odm"] + }, + "application/vnd.oasis.opendocument.text-template": { + "source": "iana", + "extensions": ["ott"] + }, + "application/vnd.oasis.opendocument.text-web": { + "source": "iana", + "extensions": ["oth"] + }, + "application/vnd.obn": { + "source": "iana" + }, + "application/vnd.ocf+cbor": { + "source": "iana" + }, + "application/vnd.oci.image.manifest.v1+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oftn.l10n+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessdownload+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessstreaming+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.cspg-hexbinary": { + "source": "iana" + }, + "application/vnd.oipf.dae.svg+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.dae.xhtml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.mippvcontrolmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.pae.gem": { + "source": "iana" + }, + "application/vnd.oipf.spdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.spdlist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.ueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.userprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.olpc-sugar": { + "source": "iana", + "extensions": ["xo"] + }, + "application/vnd.oma-scws-config": { + "source": "iana" + }, + "application/vnd.oma-scws-http-request": { + "source": "iana" + }, + "application/vnd.oma-scws-http-response": { + "source": "iana" + }, + "application/vnd.oma.bcast.associated-procedure-parameter+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.drm-trigger+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.imd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.ltkm": { + "source": "iana" + }, + "application/vnd.oma.bcast.notification+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.provisioningtrigger": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgboot": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgdd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.sgdu": { + "source": "iana" + }, + "application/vnd.oma.bcast.simple-symbol-container": { + "source": "iana" + }, + "application/vnd.oma.bcast.smartcard-trigger+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.sprov+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.stkm": { + "source": "iana" + }, + "application/vnd.oma.cab-address-book+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-feature-handler+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-pcc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-subs-invite+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-user-prefs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.dcd": { + "source": "iana" + }, + "application/vnd.oma.dcdc": { + "source": "iana" + }, + "application/vnd.oma.dd2+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dd2"] + }, + "application/vnd.oma.drm.risd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.group-usage-list+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+cbor": { + "source": "iana" + }, + "application/vnd.oma.lwm2m+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+tlv": { + "source": "iana" + }, + "application/vnd.oma.pal+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.detailed-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.final-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.groups+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.invocation-descriptor+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.optimized-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.push": { + "source": "iana" + }, + "application/vnd.oma.scidm.messages+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.xcap-directory+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.omads-email+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omads-file+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omads-folder+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omaloc-supl-init": { + "source": "iana" + }, + "application/vnd.onepager": { + "source": "iana" + }, + "application/vnd.onepagertamp": { + "source": "iana" + }, + "application/vnd.onepagertamx": { + "source": "iana" + }, + "application/vnd.onepagertat": { + "source": "iana" + }, + "application/vnd.onepagertatp": { + "source": "iana" + }, + "application/vnd.onepagertatx": { + "source": "iana" + }, + "application/vnd.openblox.game+xml": { + "source": "iana", + "compressible": true, + "extensions": ["obgx"] + }, + "application/vnd.openblox.game-binary": { + "source": "iana" + }, + "application/vnd.openeye.oeb": { + "source": "iana" + }, + "application/vnd.openofficeorg.extension": { + "source": "apache", + "extensions": ["oxt"] + }, + "application/vnd.openstreetmap.data+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osm"] + }, + "application/vnd.opentimestamps.ots": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.custom-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawing+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.extended-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["pptx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide": { + "source": "iana", + "extensions": ["sldx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { + "source": "iana", + "extensions": ["ppsx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.template": { + "source": "iana", + "extensions": ["potx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { + "source": "iana", + "compressible": false, + "extensions": ["xlsx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { + "source": "iana", + "extensions": ["xltx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.theme+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.themeoverride+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.vmldrawing": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + "source": "iana", + "compressible": false, + "extensions": ["docx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { + "source": "iana", + "extensions": ["dotx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.core-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.relationships+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oracle.resource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.orange.indata": { + "source": "iana" + }, + "application/vnd.osa.netdeploy": { + "source": "iana" + }, + "application/vnd.osgeo.mapguide.package": { + "source": "iana", + "extensions": ["mgp"] + }, + "application/vnd.osgi.bundle": { + "source": "iana" + }, + "application/vnd.osgi.dp": { + "source": "iana", + "extensions": ["dp"] + }, + "application/vnd.osgi.subsystem": { + "source": "iana", + "extensions": ["esa"] + }, + "application/vnd.otps.ct-kip+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oxli.countgraph": { + "source": "iana" + }, + "application/vnd.pagerduty+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.palm": { + "source": "iana", + "extensions": ["pdb","pqa","oprc"] + }, + "application/vnd.panoply": { + "source": "iana" + }, + "application/vnd.paos.xml": { + "source": "iana" + }, + "application/vnd.patentdive": { + "source": "iana" + }, + "application/vnd.patientecommsdoc": { + "source": "iana" + }, + "application/vnd.pawaafile": { + "source": "iana", + "extensions": ["paw"] + }, + "application/vnd.pcos": { + "source": "iana" + }, + "application/vnd.pg.format": { + "source": "iana", + "extensions": ["str"] + }, + "application/vnd.pg.osasli": { + "source": "iana", + "extensions": ["ei6"] + }, + "application/vnd.piaccess.application-licence": { + "source": "iana" + }, + "application/vnd.picsel": { + "source": "iana", + "extensions": ["efif"] + }, + "application/vnd.pmi.widget": { + "source": "iana", + "extensions": ["wg"] + }, + "application/vnd.poc.group-advertisement+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.pocketlearn": { + "source": "iana", + "extensions": ["plf"] + }, + "application/vnd.powerbuilder6": { + "source": "iana", + "extensions": ["pbd"] + }, + "application/vnd.powerbuilder6-s": { + "source": "iana" + }, + "application/vnd.powerbuilder7": { + "source": "iana" + }, + "application/vnd.powerbuilder7-s": { + "source": "iana" + }, + "application/vnd.powerbuilder75": { + "source": "iana" + }, + "application/vnd.powerbuilder75-s": { + "source": "iana" + }, + "application/vnd.preminet": { + "source": "iana" + }, + "application/vnd.previewsystems.box": { + "source": "iana", + "extensions": ["box"] + }, + "application/vnd.proteus.magazine": { + "source": "iana", + "extensions": ["mgz"] + }, + "application/vnd.psfs": { + "source": "iana" + }, + "application/vnd.publishare-delta-tree": { + "source": "iana", + "extensions": ["qps"] + }, + "application/vnd.pvi.ptid1": { + "source": "iana", + "extensions": ["ptid"] + }, + "application/vnd.pwg-multiplexed": { + "source": "iana" + }, + "application/vnd.pwg-xhtml-print+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.qualcomm.brew-app-res": { + "source": "iana" + }, + "application/vnd.quarantainenet": { + "source": "iana" + }, + "application/vnd.quark.quarkxpress": { + "source": "iana", + "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] + }, + "application/vnd.quobject-quoxdocument": { + "source": "iana" + }, + "application/vnd.radisys.moml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-stream+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-base+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-detect+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-group+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-speech+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-transform+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.rainstor.data": { + "source": "iana" + }, + "application/vnd.rapid": { + "source": "iana" + }, + "application/vnd.rar": { + "source": "iana", + "extensions": ["rar"] + }, + "application/vnd.realvnc.bed": { + "source": "iana", + "extensions": ["bed"] + }, + "application/vnd.recordare.musicxml": { + "source": "iana", + "extensions": ["mxl"] + }, + "application/vnd.recordare.musicxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musicxml"] + }, + "application/vnd.renlearn.rlprint": { + "source": "iana" + }, + "application/vnd.resilient.logic": { + "source": "iana" + }, + "application/vnd.restful+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.rig.cryptonote": { + "source": "iana", + "extensions": ["cryptonote"] + }, + "application/vnd.rim.cod": { + "source": "apache", + "extensions": ["cod"] + }, + "application/vnd.rn-realmedia": { + "source": "apache", + "extensions": ["rm"] + }, + "application/vnd.rn-realmedia-vbr": { + "source": "apache", + "extensions": ["rmvb"] + }, + "application/vnd.route66.link66+xml": { + "source": "iana", + "compressible": true, + "extensions": ["link66"] + }, + "application/vnd.rs-274x": { + "source": "iana" + }, + "application/vnd.ruckus.download": { + "source": "iana" + }, + "application/vnd.s3sms": { + "source": "iana" + }, + "application/vnd.sailingtracker.track": { + "source": "iana", + "extensions": ["st"] + }, + "application/vnd.sar": { + "source": "iana" + }, + "application/vnd.sbm.cid": { + "source": "iana" + }, + "application/vnd.sbm.mid2": { + "source": "iana" + }, + "application/vnd.scribus": { + "source": "iana" + }, + "application/vnd.sealed.3df": { + "source": "iana" + }, + "application/vnd.sealed.csf": { + "source": "iana" + }, + "application/vnd.sealed.doc": { + "source": "iana" + }, + "application/vnd.sealed.eml": { + "source": "iana" + }, + "application/vnd.sealed.mht": { + "source": "iana" + }, + "application/vnd.sealed.net": { + "source": "iana" + }, + "application/vnd.sealed.ppt": { + "source": "iana" + }, + "application/vnd.sealed.tiff": { + "source": "iana" + }, + "application/vnd.sealed.xls": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.html": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.pdf": { + "source": "iana" + }, + "application/vnd.seemail": { + "source": "iana", + "extensions": ["see"] + }, + "application/vnd.seis+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.sema": { + "source": "iana", + "extensions": ["sema"] + }, + "application/vnd.semd": { + "source": "iana", + "extensions": ["semd"] + }, + "application/vnd.semf": { + "source": "iana", + "extensions": ["semf"] + }, + "application/vnd.shade-save-file": { + "source": "iana" + }, + "application/vnd.shana.informed.formdata": { + "source": "iana", + "extensions": ["ifm"] + }, + "application/vnd.shana.informed.formtemplate": { + "source": "iana", + "extensions": ["itp"] + }, + "application/vnd.shana.informed.interchange": { + "source": "iana", + "extensions": ["iif"] + }, + "application/vnd.shana.informed.package": { + "source": "iana", + "extensions": ["ipk"] + }, + "application/vnd.shootproof+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shopkick+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shp": { + "source": "iana" + }, + "application/vnd.shx": { + "source": "iana" + }, + "application/vnd.sigrok.session": { + "source": "iana" + }, + "application/vnd.simtech-mindmapper": { + "source": "iana", + "extensions": ["twd","twds"] + }, + "application/vnd.siren+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.smaf": { + "source": "iana", + "extensions": ["mmf"] + }, + "application/vnd.smart.notebook": { + "source": "iana" + }, + "application/vnd.smart.teacher": { + "source": "iana", + "extensions": ["teacher"] + }, + "application/vnd.snesdev-page-table": { + "source": "iana" + }, + "application/vnd.software602.filler.form+xml": { + "source": "iana", + "compressible": true, + "extensions": ["fo"] + }, + "application/vnd.software602.filler.form-xml-zip": { + "source": "iana" + }, + "application/vnd.solent.sdkm+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sdkm","sdkd"] + }, + "application/vnd.spotfire.dxp": { + "source": "iana", + "extensions": ["dxp"] + }, + "application/vnd.spotfire.sfs": { + "source": "iana", + "extensions": ["sfs"] + }, + "application/vnd.sqlite3": { + "source": "iana" + }, + "application/vnd.sss-cod": { + "source": "iana" + }, + "application/vnd.sss-dtf": { + "source": "iana" + }, + "application/vnd.sss-ntf": { + "source": "iana" + }, + "application/vnd.stardivision.calc": { + "source": "apache", + "extensions": ["sdc"] + }, + "application/vnd.stardivision.draw": { + "source": "apache", + "extensions": ["sda"] + }, + "application/vnd.stardivision.impress": { + "source": "apache", + "extensions": ["sdd"] + }, + "application/vnd.stardivision.math": { + "source": "apache", + "extensions": ["smf"] + }, + "application/vnd.stardivision.writer": { + "source": "apache", + "extensions": ["sdw","vor"] + }, + "application/vnd.stardivision.writer-global": { + "source": "apache", + "extensions": ["sgl"] + }, + "application/vnd.stepmania.package": { + "source": "iana", + "extensions": ["smzip"] + }, + "application/vnd.stepmania.stepchart": { + "source": "iana", + "extensions": ["sm"] + }, + "application/vnd.street-stream": { + "source": "iana" + }, + "application/vnd.sun.wadl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wadl"] + }, + "application/vnd.sun.xml.calc": { + "source": "apache", + "extensions": ["sxc"] + }, + "application/vnd.sun.xml.calc.template": { + "source": "apache", + "extensions": ["stc"] + }, + "application/vnd.sun.xml.draw": { + "source": "apache", + "extensions": ["sxd"] + }, + "application/vnd.sun.xml.draw.template": { + "source": "apache", + "extensions": ["std"] + }, + "application/vnd.sun.xml.impress": { + "source": "apache", + "extensions": ["sxi"] + }, + "application/vnd.sun.xml.impress.template": { + "source": "apache", + "extensions": ["sti"] + }, + "application/vnd.sun.xml.math": { + "source": "apache", + "extensions": ["sxm"] + }, + "application/vnd.sun.xml.writer": { + "source": "apache", + "extensions": ["sxw"] + }, + "application/vnd.sun.xml.writer.global": { + "source": "apache", + "extensions": ["sxg"] + }, + "application/vnd.sun.xml.writer.template": { + "source": "apache", + "extensions": ["stw"] + }, + "application/vnd.sus-calendar": { + "source": "iana", + "extensions": ["sus","susp"] + }, + "application/vnd.svd": { + "source": "iana", + "extensions": ["svd"] + }, + "application/vnd.swiftview-ics": { + "source": "iana" + }, + "application/vnd.sycle+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.syft+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.symbian.install": { + "source": "apache", + "extensions": ["sis","sisx"] + }, + "application/vnd.syncml+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["xsm"] + }, + "application/vnd.syncml.dm+wbxml": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["bdm"] + }, + "application/vnd.syncml.dm+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["xdm"] + }, + "application/vnd.syncml.dm.notification": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["ddf"] + }, + "application/vnd.syncml.dmtnds+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmtnds+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.syncml.ds.notification": { + "source": "iana" + }, + "application/vnd.tableschema+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tao.intent-module-archive": { + "source": "iana", + "extensions": ["tao"] + }, + "application/vnd.tcpdump.pcap": { + "source": "iana", + "extensions": ["pcap","cap","dmp"] + }, + "application/vnd.think-cell.ppttc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tmd.mediaflex.api+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.tml": { + "source": "iana" + }, + "application/vnd.tmobile-livetv": { + "source": "iana", + "extensions": ["tmo"] + }, + "application/vnd.tri.onesource": { + "source": "iana" + }, + "application/vnd.trid.tpt": { + "source": "iana", + "extensions": ["tpt"] + }, + "application/vnd.triscape.mxs": { + "source": "iana", + "extensions": ["mxs"] + }, + "application/vnd.trueapp": { + "source": "iana", + "extensions": ["tra"] + }, + "application/vnd.truedoc": { + "source": "iana" + }, + "application/vnd.ubisoft.webplayer": { + "source": "iana" + }, + "application/vnd.ufdl": { + "source": "iana", + "extensions": ["ufd","ufdl"] + }, + "application/vnd.uiq.theme": { + "source": "iana", + "extensions": ["utz"] + }, + "application/vnd.umajin": { + "source": "iana", + "extensions": ["umj"] + }, + "application/vnd.unity": { + "source": "iana", + "extensions": ["unityweb"] + }, + "application/vnd.uoml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uoml"] + }, + "application/vnd.uplanet.alert": { + "source": "iana" + }, + "application/vnd.uplanet.alert-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.channel": { + "source": "iana" + }, + "application/vnd.uplanet.channel-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.list": { + "source": "iana" + }, + "application/vnd.uplanet.list-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.signal": { + "source": "iana" + }, + "application/vnd.uri-map": { + "source": "iana" + }, + "application/vnd.valve.source.material": { + "source": "iana" + }, + "application/vnd.vcx": { + "source": "iana", + "extensions": ["vcx"] + }, + "application/vnd.vd-study": { + "source": "iana" + }, + "application/vnd.vectorworks": { + "source": "iana" + }, + "application/vnd.vel+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.verimatrix.vcas": { + "source": "iana" + }, + "application/vnd.veritone.aion+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.veryant.thin": { + "source": "iana" + }, + "application/vnd.ves.encrypted": { + "source": "iana" + }, + "application/vnd.vidsoft.vidconference": { + "source": "iana" + }, + "application/vnd.visio": { + "source": "iana", + "extensions": ["vsd","vst","vss","vsw"] + }, + "application/vnd.visionary": { + "source": "iana", + "extensions": ["vis"] + }, + "application/vnd.vividence.scriptfile": { + "source": "iana" + }, + "application/vnd.vsf": { + "source": "iana", + "extensions": ["vsf"] + }, + "application/vnd.wap.sic": { + "source": "iana" + }, + "application/vnd.wap.slc": { + "source": "iana" + }, + "application/vnd.wap.wbxml": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["wbxml"] + }, + "application/vnd.wap.wmlc": { + "source": "iana", + "extensions": ["wmlc"] + }, + "application/vnd.wap.wmlscriptc": { + "source": "iana", + "extensions": ["wmlsc"] + }, + "application/vnd.webturbo": { + "source": "iana", + "extensions": ["wtb"] + }, + "application/vnd.wfa.dpp": { + "source": "iana" + }, + "application/vnd.wfa.p2p": { + "source": "iana" + }, + "application/vnd.wfa.wsc": { + "source": "iana" + }, + "application/vnd.windows.devicepairing": { + "source": "iana" + }, + "application/vnd.wmc": { + "source": "iana" + }, + "application/vnd.wmf.bootstrap": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica.package": { + "source": "iana" + }, + "application/vnd.wolfram.player": { + "source": "iana", + "extensions": ["nbp"] + }, + "application/vnd.wordperfect": { + "source": "iana", + "extensions": ["wpd"] + }, + "application/vnd.wqd": { + "source": "iana", + "extensions": ["wqd"] + }, + "application/vnd.wrq-hp3000-labelled": { + "source": "iana" + }, + "application/vnd.wt.stf": { + "source": "iana", + "extensions": ["stf"] + }, + "application/vnd.wv.csp+wbxml": { + "source": "iana" + }, + "application/vnd.wv.csp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.wv.ssp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xacml+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.xara": { + "source": "iana", + "extensions": ["xar"] + }, + "application/vnd.xfdl": { + "source": "iana", + "extensions": ["xfdl"] + }, + "application/vnd.xfdl.webform": { + "source": "iana" + }, + "application/vnd.xmi+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xmpie.cpkg": { + "source": "iana" + }, + "application/vnd.xmpie.dpkg": { + "source": "iana" + }, + "application/vnd.xmpie.plan": { + "source": "iana" + }, + "application/vnd.xmpie.ppkg": { + "source": "iana" + }, + "application/vnd.xmpie.xlim": { + "source": "iana" + }, + "application/vnd.yamaha.hv-dic": { + "source": "iana", + "extensions": ["hvd"] + }, + "application/vnd.yamaha.hv-script": { + "source": "iana", + "extensions": ["hvs"] + }, + "application/vnd.yamaha.hv-voice": { + "source": "iana", + "extensions": ["hvp"] + }, + "application/vnd.yamaha.openscoreformat": { + "source": "iana", + "extensions": ["osf"] + }, + "application/vnd.yamaha.openscoreformat.osfpvg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osfpvg"] + }, + "application/vnd.yamaha.remote-setup": { + "source": "iana" + }, + "application/vnd.yamaha.smaf-audio": { + "source": "iana", + "extensions": ["saf"] + }, + "application/vnd.yamaha.smaf-phrase": { + "source": "iana", + "extensions": ["spf"] + }, + "application/vnd.yamaha.through-ngn": { + "source": "iana" + }, + "application/vnd.yamaha.tunnel-udpencap": { + "source": "iana" + }, + "application/vnd.yaoweme": { + "source": "iana" + }, + "application/vnd.yellowriver-custom-menu": { + "source": "iana", + "extensions": ["cmp"] + }, + "application/vnd.youtube.yt": { + "source": "iana" + }, + "application/vnd.zul": { + "source": "iana", + "extensions": ["zir","zirz"] + }, + "application/vnd.zzazz.deck+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zaz"] + }, + "application/voicexml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["vxml"] + }, + "application/voucher-cms+json": { + "source": "iana", + "compressible": true + }, + "application/vq-rtcpxr": { + "source": "iana" + }, + "application/wasm": { + "source": "iana", + "compressible": true, + "extensions": ["wasm"] + }, + "application/watcherinfo+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wif"] + }, + "application/webpush-options+json": { + "source": "iana", + "compressible": true + }, + "application/whoispp-query": { + "source": "iana" + }, + "application/whoispp-response": { + "source": "iana" + }, + "application/widget": { + "source": "iana", + "extensions": ["wgt"] + }, + "application/winhlp": { + "source": "apache", + "extensions": ["hlp"] + }, + "application/wita": { + "source": "iana" + }, + "application/wordperfect5.1": { + "source": "iana" + }, + "application/wsdl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wsdl"] + }, + "application/wspolicy+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wspolicy"] + }, + "application/x-7z-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["7z"] + }, + "application/x-abiword": { + "source": "apache", + "extensions": ["abw"] + }, + "application/x-ace-compressed": { + "source": "apache", + "extensions": ["ace"] + }, + "application/x-amf": { + "source": "apache" + }, + "application/x-apple-diskimage": { + "source": "apache", + "extensions": ["dmg"] + }, + "application/x-arj": { + "compressible": false, + "extensions": ["arj"] + }, + "application/x-authorware-bin": { + "source": "apache", + "extensions": ["aab","x32","u32","vox"] + }, + "application/x-authorware-map": { + "source": "apache", + "extensions": ["aam"] + }, + "application/x-authorware-seg": { + "source": "apache", + "extensions": ["aas"] + }, + "application/x-bcpio": { + "source": "apache", + "extensions": ["bcpio"] + }, + "application/x-bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/x-bittorrent": { + "source": "apache", + "extensions": ["torrent"] + }, + "application/x-blorb": { + "source": "apache", + "extensions": ["blb","blorb"] + }, + "application/x-bzip": { + "source": "apache", + "compressible": false, + "extensions": ["bz"] + }, + "application/x-bzip2": { + "source": "apache", + "compressible": false, + "extensions": ["bz2","boz"] + }, + "application/x-cbr": { + "source": "apache", + "extensions": ["cbr","cba","cbt","cbz","cb7"] + }, + "application/x-cdlink": { + "source": "apache", + "extensions": ["vcd"] + }, + "application/x-cfs-compressed": { + "source": "apache", + "extensions": ["cfs"] + }, + "application/x-chat": { + "source": "apache", + "extensions": ["chat"] + }, + "application/x-chess-pgn": { + "source": "apache", + "extensions": ["pgn"] + }, + "application/x-chrome-extension": { + "extensions": ["crx"] + }, + "application/x-cocoa": { + "source": "nginx", + "extensions": ["cco"] + }, + "application/x-compress": { + "source": "apache" + }, + "application/x-conference": { + "source": "apache", + "extensions": ["nsc"] + }, + "application/x-cpio": { + "source": "apache", + "extensions": ["cpio"] + }, + "application/x-csh": { + "source": "apache", + "extensions": ["csh"] + }, + "application/x-deb": { + "compressible": false + }, + "application/x-debian-package": { + "source": "apache", + "extensions": ["deb","udeb"] + }, + "application/x-dgc-compressed": { + "source": "apache", + "extensions": ["dgc"] + }, + "application/x-director": { + "source": "apache", + "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"] + }, + "application/x-doom": { + "source": "apache", + "extensions": ["wad"] + }, + "application/x-dtbncx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ncx"] + }, + "application/x-dtbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dtb"] + }, + "application/x-dtbresource+xml": { + "source": "apache", + "compressible": true, + "extensions": ["res"] + }, + "application/x-dvi": { + "source": "apache", + "compressible": false, + "extensions": ["dvi"] + }, + "application/x-envoy": { + "source": "apache", + "extensions": ["evy"] + }, + "application/x-eva": { + "source": "apache", + "extensions": ["eva"] + }, + "application/x-font-bdf": { + "source": "apache", + "extensions": ["bdf"] + }, + "application/x-font-dos": { + "source": "apache" + }, + "application/x-font-framemaker": { + "source": "apache" + }, + "application/x-font-ghostscript": { + "source": "apache", + "extensions": ["gsf"] + }, + "application/x-font-libgrx": { + "source": "apache" + }, + "application/x-font-linux-psf": { + "source": "apache", + "extensions": ["psf"] + }, + "application/x-font-pcf": { + "source": "apache", + "extensions": ["pcf"] + }, + "application/x-font-snf": { + "source": "apache", + "extensions": ["snf"] + }, + "application/x-font-speedo": { + "source": "apache" + }, + "application/x-font-sunos-news": { + "source": "apache" + }, + "application/x-font-type1": { + "source": "apache", + "extensions": ["pfa","pfb","pfm","afm"] + }, + "application/x-font-vfont": { + "source": "apache" + }, + "application/x-freearc": { + "source": "apache", + "extensions": ["arc"] + }, + "application/x-futuresplash": { + "source": "apache", + "extensions": ["spl"] + }, + "application/x-gca-compressed": { + "source": "apache", + "extensions": ["gca"] + }, + "application/x-glulx": { + "source": "apache", + "extensions": ["ulx"] + }, + "application/x-gnumeric": { + "source": "apache", + "extensions": ["gnumeric"] + }, + "application/x-gramps-xml": { + "source": "apache", + "extensions": ["gramps"] + }, + "application/x-gtar": { + "source": "apache", + "extensions": ["gtar"] + }, + "application/x-gzip": { + "source": "apache" + }, + "application/x-hdf": { + "source": "apache", + "extensions": ["hdf"] + }, + "application/x-httpd-php": { + "compressible": true, + "extensions": ["php"] + }, + "application/x-install-instructions": { + "source": "apache", + "extensions": ["install"] + }, + "application/x-iso9660-image": { + "source": "apache", + "extensions": ["iso"] + }, + "application/x-iwork-keynote-sffkey": { + "extensions": ["key"] + }, + "application/x-iwork-numbers-sffnumbers": { + "extensions": ["numbers"] + }, + "application/x-iwork-pages-sffpages": { + "extensions": ["pages"] + }, + "application/x-java-archive-diff": { + "source": "nginx", + "extensions": ["jardiff"] + }, + "application/x-java-jnlp-file": { + "source": "apache", + "compressible": false, + "extensions": ["jnlp"] + }, + "application/x-javascript": { + "compressible": true + }, + "application/x-keepass2": { + "extensions": ["kdbx"] + }, + "application/x-latex": { + "source": "apache", + "compressible": false, + "extensions": ["latex"] + }, + "application/x-lua-bytecode": { + "extensions": ["luac"] + }, + "application/x-lzh-compressed": { + "source": "apache", + "extensions": ["lzh","lha"] + }, + "application/x-makeself": { + "source": "nginx", + "extensions": ["run"] + }, + "application/x-mie": { + "source": "apache", + "extensions": ["mie"] + }, + "application/x-mobipocket-ebook": { + "source": "apache", + "extensions": ["prc","mobi"] + }, + "application/x-mpegurl": { + "compressible": false + }, + "application/x-ms-application": { + "source": "apache", + "extensions": ["application"] + }, + "application/x-ms-shortcut": { + "source": "apache", + "extensions": ["lnk"] + }, + "application/x-ms-wmd": { + "source": "apache", + "extensions": ["wmd"] + }, + "application/x-ms-wmz": { + "source": "apache", + "extensions": ["wmz"] + }, + "application/x-ms-xbap": { + "source": "apache", + "extensions": ["xbap"] + }, + "application/x-msaccess": { + "source": "apache", + "extensions": ["mdb"] + }, + "application/x-msbinder": { + "source": "apache", + "extensions": ["obd"] + }, + "application/x-mscardfile": { + "source": "apache", + "extensions": ["crd"] + }, + "application/x-msclip": { + "source": "apache", + "extensions": ["clp"] + }, + "application/x-msdos-program": { + "extensions": ["exe"] + }, + "application/x-msdownload": { + "source": "apache", + "extensions": ["exe","dll","com","bat","msi"] + }, + "application/x-msmediaview": { + "source": "apache", + "extensions": ["mvb","m13","m14"] + }, + "application/x-msmetafile": { + "source": "apache", + "extensions": ["wmf","wmz","emf","emz"] + }, + "application/x-msmoney": { + "source": "apache", + "extensions": ["mny"] + }, + "application/x-mspublisher": { + "source": "apache", + "extensions": ["pub"] + }, + "application/x-msschedule": { + "source": "apache", + "extensions": ["scd"] + }, + "application/x-msterminal": { + "source": "apache", + "extensions": ["trm"] + }, + "application/x-mswrite": { + "source": "apache", + "extensions": ["wri"] + }, + "application/x-netcdf": { + "source": "apache", + "extensions": ["nc","cdf"] + }, + "application/x-ns-proxy-autoconfig": { + "compressible": true, + "extensions": ["pac"] + }, + "application/x-nzb": { + "source": "apache", + "extensions": ["nzb"] + }, + "application/x-perl": { + "source": "nginx", + "extensions": ["pl","pm"] + }, + "application/x-pilot": { + "source": "nginx", + "extensions": ["prc","pdb"] + }, + "application/x-pkcs12": { + "source": "apache", + "compressible": false, + "extensions": ["p12","pfx"] + }, + "application/x-pkcs7-certificates": { + "source": "apache", + "extensions": ["p7b","spc"] + }, + "application/x-pkcs7-certreqresp": { + "source": "apache", + "extensions": ["p7r"] + }, + "application/x-pki-message": { + "source": "iana" + }, + "application/x-rar-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["rar"] + }, + "application/x-redhat-package-manager": { + "source": "nginx", + "extensions": ["rpm"] + }, + "application/x-research-info-systems": { + "source": "apache", + "extensions": ["ris"] + }, + "application/x-sea": { + "source": "nginx", + "extensions": ["sea"] + }, + "application/x-sh": { + "source": "apache", + "compressible": true, + "extensions": ["sh"] + }, + "application/x-shar": { + "source": "apache", + "extensions": ["shar"] + }, + "application/x-shockwave-flash": { + "source": "apache", + "compressible": false, + "extensions": ["swf"] + }, + "application/x-silverlight-app": { + "source": "apache", + "extensions": ["xap"] + }, + "application/x-sql": { + "source": "apache", + "extensions": ["sql"] + }, + "application/x-stuffit": { + "source": "apache", + "compressible": false, + "extensions": ["sit"] + }, + "application/x-stuffitx": { + "source": "apache", + "extensions": ["sitx"] + }, + "application/x-subrip": { + "source": "apache", + "extensions": ["srt"] + }, + "application/x-sv4cpio": { + "source": "apache", + "extensions": ["sv4cpio"] + }, + "application/x-sv4crc": { + "source": "apache", + "extensions": ["sv4crc"] + }, + "application/x-t3vm-image": { + "source": "apache", + "extensions": ["t3"] + }, + "application/x-tads": { + "source": "apache", + "extensions": ["gam"] + }, + "application/x-tar": { + "source": "apache", + "compressible": true, + "extensions": ["tar"] + }, + "application/x-tcl": { + "source": "apache", + "extensions": ["tcl","tk"] + }, + "application/x-tex": { + "source": "apache", + "extensions": ["tex"] + }, + "application/x-tex-tfm": { + "source": "apache", + "extensions": ["tfm"] + }, + "application/x-texinfo": { + "source": "apache", + "extensions": ["texinfo","texi"] + }, + "application/x-tgif": { + "source": "apache", + "extensions": ["obj"] + }, + "application/x-ustar": { + "source": "apache", + "extensions": ["ustar"] + }, + "application/x-virtualbox-hdd": { + "compressible": true, + "extensions": ["hdd"] + }, + "application/x-virtualbox-ova": { + "compressible": true, + "extensions": ["ova"] + }, + "application/x-virtualbox-ovf": { + "compressible": true, + "extensions": ["ovf"] + }, + "application/x-virtualbox-vbox": { + "compressible": true, + "extensions": ["vbox"] + }, + "application/x-virtualbox-vbox-extpack": { + "compressible": false, + "extensions": ["vbox-extpack"] + }, + "application/x-virtualbox-vdi": { + "compressible": true, + "extensions": ["vdi"] + }, + "application/x-virtualbox-vhd": { + "compressible": true, + "extensions": ["vhd"] + }, + "application/x-virtualbox-vmdk": { + "compressible": true, + "extensions": ["vmdk"] + }, + "application/x-wais-source": { + "source": "apache", + "extensions": ["src"] + }, + "application/x-web-app-manifest+json": { + "compressible": true, + "extensions": ["webapp"] + }, + "application/x-www-form-urlencoded": { + "source": "iana", + "compressible": true + }, + "application/x-x509-ca-cert": { + "source": "iana", + "extensions": ["der","crt","pem"] + }, + "application/x-x509-ca-ra-cert": { + "source": "iana" + }, + "application/x-x509-next-ca-cert": { + "source": "iana" + }, + "application/x-xfig": { + "source": "apache", + "extensions": ["fig"] + }, + "application/x-xliff+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xlf"] + }, + "application/x-xpinstall": { + "source": "apache", + "compressible": false, + "extensions": ["xpi"] + }, + "application/x-xz": { + "source": "apache", + "extensions": ["xz"] + }, + "application/x-zmachine": { + "source": "apache", + "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"] + }, + "application/x400-bp": { + "source": "iana" + }, + "application/xacml+xml": { + "source": "iana", + "compressible": true + }, + "application/xaml+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xaml"] + }, + "application/xcap-att+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xav"] + }, + "application/xcap-caps+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xca"] + }, + "application/xcap-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdf"] + }, + "application/xcap-el+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xel"] + }, + "application/xcap-error+xml": { + "source": "iana", + "compressible": true + }, + "application/xcap-ns+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xns"] + }, + "application/xcon-conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/xcon-conference-info-diff+xml": { + "source": "iana", + "compressible": true + }, + "application/xenc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xenc"] + }, + "application/xhtml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xhtml","xht"] + }, + "application/xhtml-voice+xml": { + "source": "apache", + "compressible": true + }, + "application/xliff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xlf"] + }, + "application/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml","xsl","xsd","rng"] + }, + "application/xml-dtd": { + "source": "iana", + "compressible": true, + "extensions": ["dtd"] + }, + "application/xml-external-parsed-entity": { + "source": "iana" + }, + "application/xml-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/xmpp+xml": { + "source": "iana", + "compressible": true + }, + "application/xop+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xop"] + }, + "application/xproc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xpl"] + }, + "application/xslt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xsl","xslt"] + }, + "application/xspf+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xspf"] + }, + "application/xv+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mxml","xhvml","xvml","xvm"] + }, + "application/yang": { + "source": "iana", + "extensions": ["yang"] + }, + "application/yang-data+json": { + "source": "iana", + "compressible": true + }, + "application/yang-data+xml": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+json": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/yin+xml": { + "source": "iana", + "compressible": true, + "extensions": ["yin"] + }, + "application/zip": { + "source": "iana", + "compressible": false, + "extensions": ["zip"] + }, + "application/zlib": { + "source": "iana" + }, + "application/zstd": { + "source": "iana" + }, + "audio/1d-interleaved-parityfec": { + "source": "iana" + }, + "audio/32kadpcm": { + "source": "iana" + }, + "audio/3gpp": { + "source": "iana", + "compressible": false, + "extensions": ["3gpp"] + }, + "audio/3gpp2": { + "source": "iana" + }, + "audio/aac": { + "source": "iana" + }, + "audio/ac3": { + "source": "iana" + }, + "audio/adpcm": { + "source": "apache", + "extensions": ["adp"] + }, + "audio/amr": { + "source": "iana", + "extensions": ["amr"] + }, + "audio/amr-wb": { + "source": "iana" + }, + "audio/amr-wb+": { + "source": "iana" + }, + "audio/aptx": { + "source": "iana" + }, + "audio/asc": { + "source": "iana" + }, + "audio/atrac-advanced-lossless": { + "source": "iana" + }, + "audio/atrac-x": { + "source": "iana" + }, + "audio/atrac3": { + "source": "iana" + }, + "audio/basic": { + "source": "iana", + "compressible": false, + "extensions": ["au","snd"] + }, + "audio/bv16": { + "source": "iana" + }, + "audio/bv32": { + "source": "iana" + }, + "audio/clearmode": { + "source": "iana" + }, + "audio/cn": { + "source": "iana" + }, + "audio/dat12": { + "source": "iana" + }, + "audio/dls": { + "source": "iana" + }, + "audio/dsr-es201108": { + "source": "iana" + }, + "audio/dsr-es202050": { + "source": "iana" + }, + "audio/dsr-es202211": { + "source": "iana" + }, + "audio/dsr-es202212": { + "source": "iana" + }, + "audio/dv": { + "source": "iana" + }, + "audio/dvi4": { + "source": "iana" + }, + "audio/eac3": { + "source": "iana" + }, + "audio/encaprtp": { + "source": "iana" + }, + "audio/evrc": { + "source": "iana" + }, + "audio/evrc-qcp": { + "source": "iana" + }, + "audio/evrc0": { + "source": "iana" + }, + "audio/evrc1": { + "source": "iana" + }, + "audio/evrcb": { + "source": "iana" + }, + "audio/evrcb0": { + "source": "iana" + }, + "audio/evrcb1": { + "source": "iana" + }, + "audio/evrcnw": { + "source": "iana" + }, + "audio/evrcnw0": { + "source": "iana" + }, + "audio/evrcnw1": { + "source": "iana" + }, + "audio/evrcwb": { + "source": "iana" + }, + "audio/evrcwb0": { + "source": "iana" + }, + "audio/evrcwb1": { + "source": "iana" + }, + "audio/evs": { + "source": "iana" + }, + "audio/flexfec": { + "source": "iana" + }, + "audio/fwdred": { + "source": "iana" + }, + "audio/g711-0": { + "source": "iana" + }, + "audio/g719": { + "source": "iana" + }, + "audio/g722": { + "source": "iana" + }, + "audio/g7221": { + "source": "iana" + }, + "audio/g723": { + "source": "iana" + }, + "audio/g726-16": { + "source": "iana" + }, + "audio/g726-24": { + "source": "iana" + }, + "audio/g726-32": { + "source": "iana" + }, + "audio/g726-40": { + "source": "iana" + }, + "audio/g728": { + "source": "iana" + }, + "audio/g729": { + "source": "iana" + }, + "audio/g7291": { + "source": "iana" + }, + "audio/g729d": { + "source": "iana" + }, + "audio/g729e": { + "source": "iana" + }, + "audio/gsm": { + "source": "iana" + }, + "audio/gsm-efr": { + "source": "iana" + }, + "audio/gsm-hr-08": { + "source": "iana" + }, + "audio/ilbc": { + "source": "iana" + }, + "audio/ip-mr_v2.5": { + "source": "iana" + }, + "audio/isac": { + "source": "apache" + }, + "audio/l16": { + "source": "iana" + }, + "audio/l20": { + "source": "iana" + }, + "audio/l24": { + "source": "iana", + "compressible": false + }, + "audio/l8": { + "source": "iana" + }, + "audio/lpc": { + "source": "iana" + }, + "audio/melp": { + "source": "iana" + }, + "audio/melp1200": { + "source": "iana" + }, + "audio/melp2400": { + "source": "iana" + }, + "audio/melp600": { + "source": "iana" + }, + "audio/mhas": { + "source": "iana" + }, + "audio/midi": { + "source": "apache", + "extensions": ["mid","midi","kar","rmi"] + }, + "audio/mobile-xmf": { + "source": "iana", + "extensions": ["mxmf"] + }, + "audio/mp3": { + "compressible": false, + "extensions": ["mp3"] + }, + "audio/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["m4a","mp4a"] + }, + "audio/mp4a-latm": { + "source": "iana" + }, + "audio/mpa": { + "source": "iana" + }, + "audio/mpa-robust": { + "source": "iana" + }, + "audio/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"] + }, + "audio/mpeg4-generic": { + "source": "iana" + }, + "audio/musepack": { + "source": "apache" + }, + "audio/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["oga","ogg","spx","opus"] + }, + "audio/opus": { + "source": "iana" + }, + "audio/parityfec": { + "source": "iana" + }, + "audio/pcma": { + "source": "iana" + }, + "audio/pcma-wb": { + "source": "iana" + }, + "audio/pcmu": { + "source": "iana" + }, + "audio/pcmu-wb": { + "source": "iana" + }, + "audio/prs.sid": { + "source": "iana" + }, + "audio/qcelp": { + "source": "iana" + }, + "audio/raptorfec": { + "source": "iana" + }, + "audio/red": { + "source": "iana" + }, + "audio/rtp-enc-aescm128": { + "source": "iana" + }, + "audio/rtp-midi": { + "source": "iana" + }, + "audio/rtploopback": { + "source": "iana" + }, + "audio/rtx": { + "source": "iana" + }, + "audio/s3m": { + "source": "apache", + "extensions": ["s3m"] + }, + "audio/scip": { + "source": "iana" + }, + "audio/silk": { + "source": "apache", + "extensions": ["sil"] + }, + "audio/smv": { + "source": "iana" + }, + "audio/smv-qcp": { + "source": "iana" + }, + "audio/smv0": { + "source": "iana" + }, + "audio/sofa": { + "source": "iana" + }, + "audio/sp-midi": { + "source": "iana" + }, + "audio/speex": { + "source": "iana" + }, + "audio/t140c": { + "source": "iana" + }, + "audio/t38": { + "source": "iana" + }, + "audio/telephone-event": { + "source": "iana" + }, + "audio/tetra_acelp": { + "source": "iana" + }, + "audio/tetra_acelp_bb": { + "source": "iana" + }, + "audio/tone": { + "source": "iana" + }, + "audio/tsvcis": { + "source": "iana" + }, + "audio/uemclip": { + "source": "iana" + }, + "audio/ulpfec": { + "source": "iana" + }, + "audio/usac": { + "source": "iana" + }, + "audio/vdvi": { + "source": "iana" + }, + "audio/vmr-wb": { + "source": "iana" + }, + "audio/vnd.3gpp.iufp": { + "source": "iana" + }, + "audio/vnd.4sb": { + "source": "iana" + }, + "audio/vnd.audiokoz": { + "source": "iana" + }, + "audio/vnd.celp": { + "source": "iana" + }, + "audio/vnd.cisco.nse": { + "source": "iana" + }, + "audio/vnd.cmles.radio-events": { + "source": "iana" + }, + "audio/vnd.cns.anp1": { + "source": "iana" + }, + "audio/vnd.cns.inf1": { + "source": "iana" + }, + "audio/vnd.dece.audio": { + "source": "iana", + "extensions": ["uva","uvva"] + }, + "audio/vnd.digital-winds": { + "source": "iana", + "extensions": ["eol"] + }, + "audio/vnd.dlna.adts": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.1": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.2": { + "source": "iana" + }, + "audio/vnd.dolby.mlp": { + "source": "iana" + }, + "audio/vnd.dolby.mps": { + "source": "iana" + }, + "audio/vnd.dolby.pl2": { + "source": "iana" + }, + "audio/vnd.dolby.pl2x": { + "source": "iana" + }, + "audio/vnd.dolby.pl2z": { + "source": "iana" + }, + "audio/vnd.dolby.pulse.1": { + "source": "iana" + }, + "audio/vnd.dra": { + "source": "iana", + "extensions": ["dra"] + }, + "audio/vnd.dts": { + "source": "iana", + "extensions": ["dts"] + }, + "audio/vnd.dts.hd": { + "source": "iana", + "extensions": ["dtshd"] + }, + "audio/vnd.dts.uhd": { + "source": "iana" + }, + "audio/vnd.dvb.file": { + "source": "iana" + }, + "audio/vnd.everad.plj": { + "source": "iana" + }, + "audio/vnd.hns.audio": { + "source": "iana" + }, + "audio/vnd.lucent.voice": { + "source": "iana", + "extensions": ["lvp"] + }, + "audio/vnd.ms-playready.media.pya": { + "source": "iana", + "extensions": ["pya"] + }, + "audio/vnd.nokia.mobile-xmf": { + "source": "iana" + }, + "audio/vnd.nortel.vbk": { + "source": "iana" + }, + "audio/vnd.nuera.ecelp4800": { + "source": "iana", + "extensions": ["ecelp4800"] + }, + "audio/vnd.nuera.ecelp7470": { + "source": "iana", + "extensions": ["ecelp7470"] + }, + "audio/vnd.nuera.ecelp9600": { + "source": "iana", + "extensions": ["ecelp9600"] + }, + "audio/vnd.octel.sbc": { + "source": "iana" + }, + "audio/vnd.presonus.multitrack": { + "source": "iana" + }, + "audio/vnd.qcelp": { + "source": "iana" + }, + "audio/vnd.rhetorex.32kadpcm": { + "source": "iana" + }, + "audio/vnd.rip": { + "source": "iana", + "extensions": ["rip"] + }, + "audio/vnd.rn-realaudio": { + "compressible": false + }, + "audio/vnd.sealedmedia.softseal.mpeg": { + "source": "iana" + }, + "audio/vnd.vmx.cvsd": { + "source": "iana" + }, + "audio/vnd.wave": { + "compressible": false + }, + "audio/vorbis": { + "source": "iana", + "compressible": false + }, + "audio/vorbis-config": { + "source": "iana" + }, + "audio/wav": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/wave": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/webm": { + "source": "apache", + "compressible": false, + "extensions": ["weba"] + }, + "audio/x-aac": { + "source": "apache", + "compressible": false, + "extensions": ["aac"] + }, + "audio/x-aiff": { + "source": "apache", + "extensions": ["aif","aiff","aifc"] + }, + "audio/x-caf": { + "source": "apache", + "compressible": false, + "extensions": ["caf"] + }, + "audio/x-flac": { + "source": "apache", + "extensions": ["flac"] + }, + "audio/x-m4a": { + "source": "nginx", + "extensions": ["m4a"] + }, + "audio/x-matroska": { + "source": "apache", + "extensions": ["mka"] + }, + "audio/x-mpegurl": { + "source": "apache", + "extensions": ["m3u"] + }, + "audio/x-ms-wax": { + "source": "apache", + "extensions": ["wax"] + }, + "audio/x-ms-wma": { + "source": "apache", + "extensions": ["wma"] + }, + "audio/x-pn-realaudio": { + "source": "apache", + "extensions": ["ram","ra"] + }, + "audio/x-pn-realaudio-plugin": { + "source": "apache", + "extensions": ["rmp"] + }, + "audio/x-realaudio": { + "source": "nginx", + "extensions": ["ra"] + }, + "audio/x-tta": { + "source": "apache" + }, + "audio/x-wav": { + "source": "apache", + "extensions": ["wav"] + }, + "audio/xm": { + "source": "apache", + "extensions": ["xm"] + }, + "chemical/x-cdx": { + "source": "apache", + "extensions": ["cdx"] + }, + "chemical/x-cif": { + "source": "apache", + "extensions": ["cif"] + }, + "chemical/x-cmdf": { + "source": "apache", + "extensions": ["cmdf"] + }, + "chemical/x-cml": { + "source": "apache", + "extensions": ["cml"] + }, + "chemical/x-csml": { + "source": "apache", + "extensions": ["csml"] + }, + "chemical/x-pdb": { + "source": "apache" + }, + "chemical/x-xyz": { + "source": "apache", + "extensions": ["xyz"] + }, + "font/collection": { + "source": "iana", + "extensions": ["ttc"] + }, + "font/otf": { + "source": "iana", + "compressible": true, + "extensions": ["otf"] + }, + "font/sfnt": { + "source": "iana" + }, + "font/ttf": { + "source": "iana", + "compressible": true, + "extensions": ["ttf"] + }, + "font/woff": { + "source": "iana", + "extensions": ["woff"] + }, + "font/woff2": { + "source": "iana", + "extensions": ["woff2"] + }, + "image/aces": { + "source": "iana", + "extensions": ["exr"] + }, + "image/apng": { + "compressible": false, + "extensions": ["apng"] + }, + "image/avci": { + "source": "iana", + "extensions": ["avci"] + }, + "image/avcs": { + "source": "iana", + "extensions": ["avcs"] + }, + "image/avif": { + "source": "iana", + "compressible": false, + "extensions": ["avif"] + }, + "image/bmp": { + "source": "iana", + "compressible": true, + "extensions": ["bmp"] + }, + "image/cgm": { + "source": "iana", + "extensions": ["cgm"] + }, + "image/dicom-rle": { + "source": "iana", + "extensions": ["drle"] + }, + "image/emf": { + "source": "iana", + "extensions": ["emf"] + }, + "image/fits": { + "source": "iana", + "extensions": ["fits"] + }, + "image/g3fax": { + "source": "iana", + "extensions": ["g3"] + }, + "image/gif": { + "source": "iana", + "compressible": false, + "extensions": ["gif"] + }, + "image/heic": { + "source": "iana", + "extensions": ["heic"] + }, + "image/heic-sequence": { + "source": "iana", + "extensions": ["heics"] + }, + "image/heif": { + "source": "iana", + "extensions": ["heif"] + }, + "image/heif-sequence": { + "source": "iana", + "extensions": ["heifs"] + }, + "image/hej2k": { + "source": "iana", + "extensions": ["hej2"] + }, + "image/hsj2": { + "source": "iana", + "extensions": ["hsj2"] + }, + "image/ief": { + "source": "iana", + "extensions": ["ief"] + }, + "image/jls": { + "source": "iana", + "extensions": ["jls"] + }, + "image/jp2": { + "source": "iana", + "compressible": false, + "extensions": ["jp2","jpg2"] + }, + "image/jpeg": { + "source": "iana", + "compressible": false, + "extensions": ["jpeg","jpg","jpe"] + }, + "image/jph": { + "source": "iana", + "extensions": ["jph"] + }, + "image/jphc": { + "source": "iana", + "extensions": ["jhc"] + }, + "image/jpm": { + "source": "iana", + "compressible": false, + "extensions": ["jpm"] + }, + "image/jpx": { + "source": "iana", + "compressible": false, + "extensions": ["jpx","jpf"] + }, + "image/jxr": { + "source": "iana", + "extensions": ["jxr"] + }, + "image/jxra": { + "source": "iana", + "extensions": ["jxra"] + }, + "image/jxrs": { + "source": "iana", + "extensions": ["jxrs"] + }, + "image/jxs": { + "source": "iana", + "extensions": ["jxs"] + }, + "image/jxsc": { + "source": "iana", + "extensions": ["jxsc"] + }, + "image/jxsi": { + "source": "iana", + "extensions": ["jxsi"] + }, + "image/jxss": { + "source": "iana", + "extensions": ["jxss"] + }, + "image/ktx": { + "source": "iana", + "extensions": ["ktx"] + }, + "image/ktx2": { + "source": "iana", + "extensions": ["ktx2"] + }, + "image/naplps": { + "source": "iana" + }, + "image/pjpeg": { + "compressible": false + }, + "image/png": { + "source": "iana", + "compressible": false, + "extensions": ["png"] + }, + "image/prs.btif": { + "source": "iana", + "extensions": ["btif"] + }, + "image/prs.pti": { + "source": "iana", + "extensions": ["pti"] + }, + "image/pwg-raster": { + "source": "iana" + }, + "image/sgi": { + "source": "apache", + "extensions": ["sgi"] + }, + "image/svg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["svg","svgz"] + }, + "image/t38": { + "source": "iana", + "extensions": ["t38"] + }, + "image/tiff": { + "source": "iana", + "compressible": false, + "extensions": ["tif","tiff"] + }, + "image/tiff-fx": { + "source": "iana", + "extensions": ["tfx"] + }, + "image/vnd.adobe.photoshop": { + "source": "iana", + "compressible": true, + "extensions": ["psd"] + }, + "image/vnd.airzip.accelerator.azv": { + "source": "iana", + "extensions": ["azv"] + }, + "image/vnd.cns.inf2": { + "source": "iana" + }, + "image/vnd.dece.graphic": { + "source": "iana", + "extensions": ["uvi","uvvi","uvg","uvvg"] + }, + "image/vnd.djvu": { + "source": "iana", + "extensions": ["djvu","djv"] + }, + "image/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "image/vnd.dwg": { + "source": "iana", + "extensions": ["dwg"] + }, + "image/vnd.dxf": { + "source": "iana", + "extensions": ["dxf"] + }, + "image/vnd.fastbidsheet": { + "source": "iana", + "extensions": ["fbs"] + }, + "image/vnd.fpx": { + "source": "iana", + "extensions": ["fpx"] + }, + "image/vnd.fst": { + "source": "iana", + "extensions": ["fst"] + }, + "image/vnd.fujixerox.edmics-mmr": { + "source": "iana", + "extensions": ["mmr"] + }, + "image/vnd.fujixerox.edmics-rlc": { + "source": "iana", + "extensions": ["rlc"] + }, + "image/vnd.globalgraphics.pgb": { + "source": "iana" + }, + "image/vnd.microsoft.icon": { + "source": "iana", + "compressible": true, + "extensions": ["ico"] + }, + "image/vnd.mix": { + "source": "iana" + }, + "image/vnd.mozilla.apng": { + "source": "iana" + }, + "image/vnd.ms-dds": { + "compressible": true, + "extensions": ["dds"] + }, + "image/vnd.ms-modi": { + "source": "iana", + "extensions": ["mdi"] + }, + "image/vnd.ms-photo": { + "source": "apache", + "extensions": ["wdp"] + }, + "image/vnd.net-fpx": { + "source": "iana", + "extensions": ["npx"] + }, + "image/vnd.pco.b16": { + "source": "iana", + "extensions": ["b16"] + }, + "image/vnd.radiance": { + "source": "iana" + }, + "image/vnd.sealed.png": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.gif": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.jpg": { + "source": "iana" + }, + "image/vnd.svf": { + "source": "iana" + }, + "image/vnd.tencent.tap": { + "source": "iana", + "extensions": ["tap"] + }, + "image/vnd.valve.source.texture": { + "source": "iana", + "extensions": ["vtf"] + }, + "image/vnd.wap.wbmp": { + "source": "iana", + "extensions": ["wbmp"] + }, + "image/vnd.xiff": { + "source": "iana", + "extensions": ["xif"] + }, + "image/vnd.zbrush.pcx": { + "source": "iana", + "extensions": ["pcx"] + }, + "image/webp": { + "source": "apache", + "extensions": ["webp"] + }, + "image/wmf": { + "source": "iana", + "extensions": ["wmf"] + }, + "image/x-3ds": { + "source": "apache", + "extensions": ["3ds"] + }, + "image/x-cmu-raster": { + "source": "apache", + "extensions": ["ras"] + }, + "image/x-cmx": { + "source": "apache", + "extensions": ["cmx"] + }, + "image/x-freehand": { + "source": "apache", + "extensions": ["fh","fhc","fh4","fh5","fh7"] + }, + "image/x-icon": { + "source": "apache", + "compressible": true, + "extensions": ["ico"] + }, + "image/x-jng": { + "source": "nginx", + "extensions": ["jng"] + }, + "image/x-mrsid-image": { + "source": "apache", + "extensions": ["sid"] + }, + "image/x-ms-bmp": { + "source": "nginx", + "compressible": true, + "extensions": ["bmp"] + }, + "image/x-pcx": { + "source": "apache", + "extensions": ["pcx"] + }, + "image/x-pict": { + "source": "apache", + "extensions": ["pic","pct"] + }, + "image/x-portable-anymap": { + "source": "apache", + "extensions": ["pnm"] + }, + "image/x-portable-bitmap": { + "source": "apache", + "extensions": ["pbm"] + }, + "image/x-portable-graymap": { + "source": "apache", + "extensions": ["pgm"] + }, + "image/x-portable-pixmap": { + "source": "apache", + "extensions": ["ppm"] + }, + "image/x-rgb": { + "source": "apache", + "extensions": ["rgb"] + }, + "image/x-tga": { + "source": "apache", + "extensions": ["tga"] + }, + "image/x-xbitmap": { + "source": "apache", + "extensions": ["xbm"] + }, + "image/x-xcf": { + "compressible": false + }, + "image/x-xpixmap": { + "source": "apache", + "extensions": ["xpm"] + }, + "image/x-xwindowdump": { + "source": "apache", + "extensions": ["xwd"] + }, + "message/cpim": { + "source": "iana" + }, + "message/delivery-status": { + "source": "iana" + }, + "message/disposition-notification": { + "source": "iana", + "extensions": [ + "disposition-notification" + ] + }, + "message/external-body": { + "source": "iana" + }, + "message/feedback-report": { + "source": "iana" + }, + "message/global": { + "source": "iana", + "extensions": ["u8msg"] + }, + "message/global-delivery-status": { + "source": "iana", + "extensions": ["u8dsn"] + }, + "message/global-disposition-notification": { + "source": "iana", + "extensions": ["u8mdn"] + }, + "message/global-headers": { + "source": "iana", + "extensions": ["u8hdr"] + }, + "message/http": { + "source": "iana", + "compressible": false + }, + "message/imdn+xml": { + "source": "iana", + "compressible": true + }, + "message/news": { + "source": "iana" + }, + "message/partial": { + "source": "iana", + "compressible": false + }, + "message/rfc822": { + "source": "iana", + "compressible": true, + "extensions": ["eml","mime"] + }, + "message/s-http": { + "source": "iana" + }, + "message/sip": { + "source": "iana" + }, + "message/sipfrag": { + "source": "iana" + }, + "message/tracking-status": { + "source": "iana" + }, + "message/vnd.si.simp": { + "source": "iana" + }, + "message/vnd.wfa.wsc": { + "source": "iana", + "extensions": ["wsc"] + }, + "model/3mf": { + "source": "iana", + "extensions": ["3mf"] + }, + "model/e57": { + "source": "iana" + }, + "model/gltf+json": { + "source": "iana", + "compressible": true, + "extensions": ["gltf"] + }, + "model/gltf-binary": { + "source": "iana", + "compressible": true, + "extensions": ["glb"] + }, + "model/iges": { + "source": "iana", + "compressible": false, + "extensions": ["igs","iges"] + }, + "model/mesh": { + "source": "iana", + "compressible": false, + "extensions": ["msh","mesh","silo"] + }, + "model/mtl": { + "source": "iana", + "extensions": ["mtl"] + }, + "model/obj": { + "source": "iana", + "extensions": ["obj"] + }, + "model/step": { + "source": "iana" + }, + "model/step+xml": { + "source": "iana", + "compressible": true, + "extensions": ["stpx"] + }, + "model/step+zip": { + "source": "iana", + "compressible": false, + "extensions": ["stpz"] + }, + "model/step-xml+zip": { + "source": "iana", + "compressible": false, + "extensions": ["stpxz"] + }, + "model/stl": { + "source": "iana", + "extensions": ["stl"] + }, + "model/vnd.collada+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dae"] + }, + "model/vnd.dwf": { + "source": "iana", + "extensions": ["dwf"] + }, + "model/vnd.flatland.3dml": { + "source": "iana" + }, + "model/vnd.gdl": { + "source": "iana", + "extensions": ["gdl"] + }, + "model/vnd.gs-gdl": { + "source": "apache" + }, + "model/vnd.gs.gdl": { + "source": "iana" + }, + "model/vnd.gtw": { + "source": "iana", + "extensions": ["gtw"] + }, + "model/vnd.moml+xml": { + "source": "iana", + "compressible": true + }, + "model/vnd.mts": { + "source": "iana", + "extensions": ["mts"] + }, + "model/vnd.opengex": { + "source": "iana", + "extensions": ["ogex"] + }, + "model/vnd.parasolid.transmit.binary": { + "source": "iana", + "extensions": ["x_b"] + }, + "model/vnd.parasolid.transmit.text": { + "source": "iana", + "extensions": ["x_t"] + }, + "model/vnd.pytha.pyox": { + "source": "iana" + }, + "model/vnd.rosette.annotated-data-model": { + "source": "iana" + }, + "model/vnd.sap.vds": { + "source": "iana", + "extensions": ["vds"] + }, + "model/vnd.usdz+zip": { + "source": "iana", + "compressible": false, + "extensions": ["usdz"] + }, + "model/vnd.valve.source.compiled-map": { + "source": "iana", + "extensions": ["bsp"] + }, + "model/vnd.vtu": { + "source": "iana", + "extensions": ["vtu"] + }, + "model/vrml": { + "source": "iana", + "compressible": false, + "extensions": ["wrl","vrml"] + }, + "model/x3d+binary": { + "source": "apache", + "compressible": false, + "extensions": ["x3db","x3dbz"] + }, + "model/x3d+fastinfoset": { + "source": "iana", + "extensions": ["x3db"] + }, + "model/x3d+vrml": { + "source": "apache", + "compressible": false, + "extensions": ["x3dv","x3dvz"] + }, + "model/x3d+xml": { + "source": "iana", + "compressible": true, + "extensions": ["x3d","x3dz"] + }, + "model/x3d-vrml": { + "source": "iana", + "extensions": ["x3dv"] + }, + "multipart/alternative": { + "source": "iana", + "compressible": false + }, + "multipart/appledouble": { + "source": "iana" + }, + "multipart/byteranges": { + "source": "iana" + }, + "multipart/digest": { + "source": "iana" + }, + "multipart/encrypted": { + "source": "iana", + "compressible": false + }, + "multipart/form-data": { + "source": "iana", + "compressible": false + }, + "multipart/header-set": { + "source": "iana" + }, + "multipart/mixed": { + "source": "iana" + }, + "multipart/multilingual": { + "source": "iana" + }, + "multipart/parallel": { + "source": "iana" + }, + "multipart/related": { + "source": "iana", + "compressible": false + }, + "multipart/report": { + "source": "iana" + }, + "multipart/signed": { + "source": "iana", + "compressible": false + }, + "multipart/vnd.bint.med-plus": { + "source": "iana" + }, + "multipart/voice-message": { + "source": "iana" + }, + "multipart/x-mixed-replace": { + "source": "iana" + }, + "text/1d-interleaved-parityfec": { + "source": "iana" + }, + "text/cache-manifest": { + "source": "iana", + "compressible": true, + "extensions": ["appcache","manifest"] + }, + "text/calendar": { + "source": "iana", + "extensions": ["ics","ifb"] + }, + "text/calender": { + "compressible": true + }, + "text/cmd": { + "compressible": true + }, + "text/coffeescript": { + "extensions": ["coffee","litcoffee"] + }, + "text/cql": { + "source": "iana" + }, + "text/cql-expression": { + "source": "iana" + }, + "text/cql-identifier": { + "source": "iana" + }, + "text/css": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["css"] + }, + "text/csv": { + "source": "iana", + "compressible": true, + "extensions": ["csv"] + }, + "text/csv-schema": { + "source": "iana" + }, + "text/directory": { + "source": "iana" + }, + "text/dns": { + "source": "iana" + }, + "text/ecmascript": { + "source": "iana" + }, + "text/encaprtp": { + "source": "iana" + }, + "text/enriched": { + "source": "iana" + }, + "text/fhirpath": { + "source": "iana" + }, + "text/flexfec": { + "source": "iana" + }, + "text/fwdred": { + "source": "iana" + }, + "text/gff3": { + "source": "iana" + }, + "text/grammar-ref-list": { + "source": "iana" + }, + "text/html": { + "source": "iana", + "compressible": true, + "extensions": ["html","htm","shtml"] + }, + "text/jade": { + "extensions": ["jade"] + }, + "text/javascript": { + "source": "iana", + "compressible": true + }, + "text/jcr-cnd": { + "source": "iana" + }, + "text/jsx": { + "compressible": true, + "extensions": ["jsx"] + }, + "text/less": { + "compressible": true, + "extensions": ["less"] + }, + "text/markdown": { + "source": "iana", + "compressible": true, + "extensions": ["markdown","md"] + }, + "text/mathml": { + "source": "nginx", + "extensions": ["mml"] + }, + "text/mdx": { + "compressible": true, + "extensions": ["mdx"] + }, + "text/mizar": { + "source": "iana" + }, + "text/n3": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["n3"] + }, + "text/parameters": { + "source": "iana", + "charset": "UTF-8" + }, + "text/parityfec": { + "source": "iana" + }, + "text/plain": { + "source": "iana", + "compressible": true, + "extensions": ["txt","text","conf","def","list","log","in","ini"] + }, + "text/provenance-notation": { + "source": "iana", + "charset": "UTF-8" + }, + "text/prs.fallenstein.rst": { + "source": "iana" + }, + "text/prs.lines.tag": { + "source": "iana", + "extensions": ["dsc"] + }, + "text/prs.prop.logic": { + "source": "iana" + }, + "text/raptorfec": { + "source": "iana" + }, + "text/red": { + "source": "iana" + }, + "text/rfc822-headers": { + "source": "iana" + }, + "text/richtext": { + "source": "iana", + "compressible": true, + "extensions": ["rtx"] + }, + "text/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "text/rtp-enc-aescm128": { + "source": "iana" + }, + "text/rtploopback": { + "source": "iana" + }, + "text/rtx": { + "source": "iana" + }, + "text/sgml": { + "source": "iana", + "extensions": ["sgml","sgm"] + }, + "text/shaclc": { + "source": "iana" + }, + "text/shex": { + "source": "iana", + "extensions": ["shex"] + }, + "text/slim": { + "extensions": ["slim","slm"] + }, + "text/spdx": { + "source": "iana", + "extensions": ["spdx"] + }, + "text/strings": { + "source": "iana" + }, + "text/stylus": { + "extensions": ["stylus","styl"] + }, + "text/t140": { + "source": "iana" + }, + "text/tab-separated-values": { + "source": "iana", + "compressible": true, + "extensions": ["tsv"] + }, + "text/troff": { + "source": "iana", + "extensions": ["t","tr","roff","man","me","ms"] + }, + "text/turtle": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["ttl"] + }, + "text/ulpfec": { + "source": "iana" + }, + "text/uri-list": { + "source": "iana", + "compressible": true, + "extensions": ["uri","uris","urls"] + }, + "text/vcard": { + "source": "iana", + "compressible": true, + "extensions": ["vcard"] + }, + "text/vnd.a": { + "source": "iana" + }, + "text/vnd.abc": { + "source": "iana" + }, + "text/vnd.ascii-art": { + "source": "iana" + }, + "text/vnd.curl": { + "source": "iana", + "extensions": ["curl"] + }, + "text/vnd.curl.dcurl": { + "source": "apache", + "extensions": ["dcurl"] + }, + "text/vnd.curl.mcurl": { + "source": "apache", + "extensions": ["mcurl"] + }, + "text/vnd.curl.scurl": { + "source": "apache", + "extensions": ["scurl"] + }, + "text/vnd.debian.copyright": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.dmclientscript": { + "source": "iana" + }, + "text/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "text/vnd.esmertec.theme-descriptor": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.familysearch.gedcom": { + "source": "iana", + "extensions": ["ged"] + }, + "text/vnd.ficlab.flt": { + "source": "iana" + }, + "text/vnd.fly": { + "source": "iana", + "extensions": ["fly"] + }, + "text/vnd.fmi.flexstor": { + "source": "iana", + "extensions": ["flx"] + }, + "text/vnd.gml": { + "source": "iana" + }, + "text/vnd.graphviz": { + "source": "iana", + "extensions": ["gv"] + }, + "text/vnd.hans": { + "source": "iana" + }, + "text/vnd.hgl": { + "source": "iana" + }, + "text/vnd.in3d.3dml": { + "source": "iana", + "extensions": ["3dml"] + }, + "text/vnd.in3d.spot": { + "source": "iana", + "extensions": ["spot"] + }, + "text/vnd.iptc.newsml": { + "source": "iana" + }, + "text/vnd.iptc.nitf": { + "source": "iana" + }, + "text/vnd.latex-z": { + "source": "iana" + }, + "text/vnd.motorola.reflex": { + "source": "iana" + }, + "text/vnd.ms-mediapackage": { + "source": "iana" + }, + "text/vnd.net2phone.commcenter.command": { + "source": "iana" + }, + "text/vnd.radisys.msml-basic-layout": { + "source": "iana" + }, + "text/vnd.senx.warpscript": { + "source": "iana" + }, + "text/vnd.si.uricatalogue": { + "source": "iana" + }, + "text/vnd.sosi": { + "source": "iana" + }, + "text/vnd.sun.j2me.app-descriptor": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["jad"] + }, + "text/vnd.trolltech.linguist": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.wap.si": { + "source": "iana" + }, + "text/vnd.wap.sl": { + "source": "iana" + }, + "text/vnd.wap.wml": { + "source": "iana", + "extensions": ["wml"] + }, + "text/vnd.wap.wmlscript": { + "source": "iana", + "extensions": ["wmls"] + }, + "text/vtt": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["vtt"] + }, + "text/x-asm": { + "source": "apache", + "extensions": ["s","asm"] + }, + "text/x-c": { + "source": "apache", + "extensions": ["c","cc","cxx","cpp","h","hh","dic"] + }, + "text/x-component": { + "source": "nginx", + "extensions": ["htc"] + }, + "text/x-fortran": { + "source": "apache", + "extensions": ["f","for","f77","f90"] + }, + "text/x-gwt-rpc": { + "compressible": true + }, + "text/x-handlebars-template": { + "extensions": ["hbs"] + }, + "text/x-java-source": { + "source": "apache", + "extensions": ["java"] + }, + "text/x-jquery-tmpl": { + "compressible": true + }, + "text/x-lua": { + "extensions": ["lua"] + }, + "text/x-markdown": { + "compressible": true, + "extensions": ["mkd"] + }, + "text/x-nfo": { + "source": "apache", + "extensions": ["nfo"] + }, + "text/x-opml": { + "source": "apache", + "extensions": ["opml"] + }, + "text/x-org": { + "compressible": true, + "extensions": ["org"] + }, + "text/x-pascal": { + "source": "apache", + "extensions": ["p","pas"] + }, + "text/x-processing": { + "compressible": true, + "extensions": ["pde"] + }, + "text/x-sass": { + "extensions": ["sass"] + }, + "text/x-scss": { + "extensions": ["scss"] + }, + "text/x-setext": { + "source": "apache", + "extensions": ["etx"] + }, + "text/x-sfv": { + "source": "apache", + "extensions": ["sfv"] + }, + "text/x-suse-ymp": { + "compressible": true, + "extensions": ["ymp"] + }, + "text/x-uuencode": { + "source": "apache", + "extensions": ["uu"] + }, + "text/x-vcalendar": { + "source": "apache", + "extensions": ["vcs"] + }, + "text/x-vcard": { + "source": "apache", + "extensions": ["vcf"] + }, + "text/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml"] + }, + "text/xml-external-parsed-entity": { + "source": "iana" + }, + "text/yaml": { + "compressible": true, + "extensions": ["yaml","yml"] + }, + "video/1d-interleaved-parityfec": { + "source": "iana" + }, + "video/3gpp": { + "source": "iana", + "extensions": ["3gp","3gpp"] + }, + "video/3gpp-tt": { + "source": "iana" + }, + "video/3gpp2": { + "source": "iana", + "extensions": ["3g2"] + }, + "video/av1": { + "source": "iana" + }, + "video/bmpeg": { + "source": "iana" + }, + "video/bt656": { + "source": "iana" + }, + "video/celb": { + "source": "iana" + }, + "video/dv": { + "source": "iana" + }, + "video/encaprtp": { + "source": "iana" + }, + "video/ffv1": { + "source": "iana" + }, + "video/flexfec": { + "source": "iana" + }, + "video/h261": { + "source": "iana", + "extensions": ["h261"] + }, + "video/h263": { + "source": "iana", + "extensions": ["h263"] + }, + "video/h263-1998": { + "source": "iana" + }, + "video/h263-2000": { + "source": "iana" + }, + "video/h264": { + "source": "iana", + "extensions": ["h264"] + }, + "video/h264-rcdo": { + "source": "iana" + }, + "video/h264-svc": { + "source": "iana" + }, + "video/h265": { + "source": "iana" + }, + "video/iso.segment": { + "source": "iana", + "extensions": ["m4s"] + }, + "video/jpeg": { + "source": "iana", + "extensions": ["jpgv"] + }, + "video/jpeg2000": { + "source": "iana" + }, + "video/jpm": { + "source": "apache", + "extensions": ["jpm","jpgm"] + }, + "video/jxsv": { + "source": "iana" + }, + "video/mj2": { + "source": "iana", + "extensions": ["mj2","mjp2"] + }, + "video/mp1s": { + "source": "iana" + }, + "video/mp2p": { + "source": "iana" + }, + "video/mp2t": { + "source": "iana", + "extensions": ["ts"] + }, + "video/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["mp4","mp4v","mpg4"] + }, + "video/mp4v-es": { + "source": "iana" + }, + "video/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpeg","mpg","mpe","m1v","m2v"] + }, + "video/mpeg4-generic": { + "source": "iana" + }, + "video/mpv": { + "source": "iana" + }, + "video/nv": { + "source": "iana" + }, + "video/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogv"] + }, + "video/parityfec": { + "source": "iana" + }, + "video/pointer": { + "source": "iana" + }, + "video/quicktime": { + "source": "iana", + "compressible": false, + "extensions": ["qt","mov"] + }, + "video/raptorfec": { + "source": "iana" + }, + "video/raw": { + "source": "iana" + }, + "video/rtp-enc-aescm128": { + "source": "iana" + }, + "video/rtploopback": { + "source": "iana" + }, + "video/rtx": { + "source": "iana" + }, + "video/scip": { + "source": "iana" + }, + "video/smpte291": { + "source": "iana" + }, + "video/smpte292m": { + "source": "iana" + }, + "video/ulpfec": { + "source": "iana" + }, + "video/vc1": { + "source": "iana" + }, + "video/vc2": { + "source": "iana" + }, + "video/vnd.cctv": { + "source": "iana" + }, + "video/vnd.dece.hd": { + "source": "iana", + "extensions": ["uvh","uvvh"] + }, + "video/vnd.dece.mobile": { + "source": "iana", + "extensions": ["uvm","uvvm"] + }, + "video/vnd.dece.mp4": { + "source": "iana" + }, + "video/vnd.dece.pd": { + "source": "iana", + "extensions": ["uvp","uvvp"] + }, + "video/vnd.dece.sd": { + "source": "iana", + "extensions": ["uvs","uvvs"] + }, + "video/vnd.dece.video": { + "source": "iana", + "extensions": ["uvv","uvvv"] + }, + "video/vnd.directv.mpeg": { + "source": "iana" + }, + "video/vnd.directv.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dlna.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dvb.file": { + "source": "iana", + "extensions": ["dvb"] + }, + "video/vnd.fvt": { + "source": "iana", + "extensions": ["fvt"] + }, + "video/vnd.hns.video": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsavc": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsmpeg2": { + "source": "iana" + }, + "video/vnd.motorola.video": { + "source": "iana" + }, + "video/vnd.motorola.videop": { + "source": "iana" + }, + "video/vnd.mpegurl": { + "source": "iana", + "extensions": ["mxu","m4u"] + }, + "video/vnd.ms-playready.media.pyv": { + "source": "iana", + "extensions": ["pyv"] + }, + "video/vnd.nokia.interleaved-multimedia": { + "source": "iana" + }, + "video/vnd.nokia.mp4vr": { + "source": "iana" + }, + "video/vnd.nokia.videovoip": { + "source": "iana" + }, + "video/vnd.objectvideo": { + "source": "iana" + }, + "video/vnd.radgamettools.bink": { + "source": "iana" + }, + "video/vnd.radgamettools.smacker": { + "source": "iana" + }, + "video/vnd.sealed.mpeg1": { + "source": "iana" + }, + "video/vnd.sealed.mpeg4": { + "source": "iana" + }, + "video/vnd.sealed.swf": { + "source": "iana" + }, + "video/vnd.sealedmedia.softseal.mov": { + "source": "iana" + }, + "video/vnd.uvvu.mp4": { + "source": "iana", + "extensions": ["uvu","uvvu"] + }, + "video/vnd.vivo": { + "source": "iana", + "extensions": ["viv"] + }, + "video/vnd.youtube.yt": { + "source": "iana" + }, + "video/vp8": { + "source": "iana" + }, + "video/vp9": { + "source": "iana" + }, + "video/webm": { + "source": "apache", + "compressible": false, + "extensions": ["webm"] + }, + "video/x-f4v": { + "source": "apache", + "extensions": ["f4v"] + }, + "video/x-fli": { + "source": "apache", + "extensions": ["fli"] + }, + "video/x-flv": { + "source": "apache", + "compressible": false, + "extensions": ["flv"] + }, + "video/x-m4v": { + "source": "apache", + "extensions": ["m4v"] + }, + "video/x-matroska": { + "source": "apache", + "compressible": false, + "extensions": ["mkv","mk3d","mks"] + }, + "video/x-mng": { + "source": "apache", + "extensions": ["mng"] + }, + "video/x-ms-asf": { + "source": "apache", + "extensions": ["asf","asx"] + }, + "video/x-ms-vob": { + "source": "apache", + "extensions": ["vob"] + }, + "video/x-ms-wm": { + "source": "apache", + "extensions": ["wm"] + }, + "video/x-ms-wmv": { + "source": "apache", + "compressible": false, + "extensions": ["wmv"] + }, + "video/x-ms-wmx": { + "source": "apache", + "extensions": ["wmx"] + }, + "video/x-ms-wvx": { + "source": "apache", + "extensions": ["wvx"] + }, + "video/x-msvideo": { + "source": "apache", + "extensions": ["avi"] + }, + "video/x-sgi-movie": { + "source": "apache", + "extensions": ["movie"] + }, + "video/x-smv": { + "source": "apache", + "extensions": ["smv"] + }, + "x-conference/x-cooltalk": { + "source": "apache", + "extensions": ["ice"] + }, + "x-shader/x-fragment": { + "compressible": true + }, + "x-shader/x-vertex": { + "compressible": true + } +} diff --git a/node_modules/mime-db/index.js b/node_modules/mime-db/index.js new file mode 100644 index 0000000..ec2be30 --- /dev/null +++ b/node_modules/mime-db/index.js @@ -0,0 +1,12 @@ +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + */ + +/** + * Module exports. + */ + +module.exports = require('./db.json') diff --git a/node_modules/mime-db/package.json b/node_modules/mime-db/package.json new file mode 100644 index 0000000..32c14b8 --- /dev/null +++ b/node_modules/mime-db/package.json @@ -0,0 +1,60 @@ +{ + "name": "mime-db", + "description": "Media Type Database", + "version": "1.52.0", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)", + "Robert Kieffer (http://github.com/broofa)" + ], + "license": "MIT", + "keywords": [ + "mime", + "db", + "type", + "types", + "database", + "charset", + "charsets" + ], + "repository": "jshttp/mime-db", + "devDependencies": { + "bluebird": "3.7.2", + "co": "4.6.0", + "cogent": "1.0.1", + "csv-parse": "4.16.3", + "eslint": "7.32.0", + "eslint-config-standard": "15.0.1", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "5.1.1", + "eslint-plugin-standard": "4.1.0", + "gnode": "0.1.2", + "media-typer": "1.1.0", + "mocha": "9.2.1", + "nyc": "15.1.0", + "raw-body": "2.5.0", + "stream-to-array": "2.3.0" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "db.json", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "build": "node scripts/build", + "fetch": "node scripts/fetch-apache && gnode scripts/fetch-iana && node scripts/fetch-nginx", + "lint": "eslint .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "update": "npm run fetch && npm run build", + "version": "node scripts/version-history.js && git add HISTORY.md" + } +} diff --git a/node_modules/mime-types/HISTORY.md b/node_modules/mime-types/HISTORY.md new file mode 100644 index 0000000..c5043b7 --- /dev/null +++ b/node_modules/mime-types/HISTORY.md @@ -0,0 +1,397 @@ +2.1.35 / 2022-03-12 +=================== + + * deps: mime-db@1.52.0 + - Add extensions from IANA for more `image/*` types + - Add extension `.asc` to `application/pgp-keys` + - Add extensions to various XML types + - Add new upstream MIME types + +2.1.34 / 2021-11-08 +=================== + + * deps: mime-db@1.51.0 + - Add new upstream MIME types + +2.1.33 / 2021-10-01 +=================== + + * deps: mime-db@1.50.0 + - Add deprecated iWorks mime types and extensions + - Add new upstream MIME types + +2.1.32 / 2021-07-27 +=================== + + * deps: mime-db@1.49.0 + - Add extension `.trig` to `application/trig` + - Add new upstream MIME types + +2.1.31 / 2021-06-01 +=================== + + * deps: mime-db@1.48.0 + - Add extension `.mvt` to `application/vnd.mapbox-vector-tile` + - Add new upstream MIME types + +2.1.30 / 2021-04-02 +=================== + + * deps: mime-db@1.47.0 + - Add extension `.amr` to `audio/amr` + - Remove ambigious extensions from IANA for `application/*+xml` types + - Update primary extension to `.es` for `application/ecmascript` + +2.1.29 / 2021-02-17 +=================== + + * deps: mime-db@1.46.0 + - Add extension `.amr` to `audio/amr` + - Add extension `.m4s` to `video/iso.segment` + - Add extension `.opus` to `audio/ogg` + - Add new upstream MIME types + +2.1.28 / 2021-01-01 +=================== + + * deps: mime-db@1.45.0 + - Add `application/ubjson` with extension `.ubj` + - Add `image/avif` with extension `.avif` + - Add `image/ktx2` with extension `.ktx2` + - Add extension `.dbf` to `application/vnd.dbf` + - Add extension `.rar` to `application/vnd.rar` + - Add extension `.td` to `application/urc-targetdesc+xml` + - Add new upstream MIME types + - Fix extension of `application/vnd.apple.keynote` to be `.key` + +2.1.27 / 2020-04-23 +=================== + + * deps: mime-db@1.44.0 + - Add charsets from IANA + - Add extension `.cjs` to `application/node` + - Add new upstream MIME types + +2.1.26 / 2020-01-05 +=================== + + * deps: mime-db@1.43.0 + - Add `application/x-keepass2` with extension `.kdbx` + - Add extension `.mxmf` to `audio/mobile-xmf` + - Add extensions from IANA for `application/*+xml` types + - Add new upstream MIME types + +2.1.25 / 2019-11-12 +=================== + + * deps: mime-db@1.42.0 + - Add new upstream MIME types + - Add `application/toml` with extension `.toml` + - Add `image/vnd.ms-dds` with extension `.dds` + +2.1.24 / 2019-04-20 +=================== + + * deps: mime-db@1.40.0 + - Add extensions from IANA for `model/*` types + - Add `text/mdx` with extension `.mdx` + +2.1.23 / 2019-04-17 +=================== + + * deps: mime-db@~1.39.0 + - Add extensions `.siv` and `.sieve` to `application/sieve` + - Add new upstream MIME types + +2.1.22 / 2019-02-14 +=================== + + * deps: mime-db@~1.38.0 + - Add extension `.nq` to `application/n-quads` + - Add extension `.nt` to `application/n-triples` + - Add new upstream MIME types + +2.1.21 / 2018-10-19 +=================== + + * deps: mime-db@~1.37.0 + - Add extensions to HEIC image types + - Add new upstream MIME types + +2.1.20 / 2018-08-26 +=================== + + * deps: mime-db@~1.36.0 + - Add Apple file extensions from IANA + - Add extensions from IANA for `image/*` types + - Add new upstream MIME types + +2.1.19 / 2018-07-17 +=================== + + * deps: mime-db@~1.35.0 + - Add extension `.csl` to `application/vnd.citationstyles.style+xml` + - Add extension `.es` to `application/ecmascript` + - Add extension `.owl` to `application/rdf+xml` + - Add new upstream MIME types + - Add UTF-8 as default charset for `text/turtle` + +2.1.18 / 2018-02-16 +=================== + + * deps: mime-db@~1.33.0 + - Add `application/raml+yaml` with extension `.raml` + - Add `application/wasm` with extension `.wasm` + - Add `text/shex` with extension `.shex` + - Add extensions for JPEG-2000 images + - Add extensions from IANA for `message/*` types + - Add new upstream MIME types + - Update font MIME types + - Update `text/hjson` to registered `application/hjson` + +2.1.17 / 2017-09-01 +=================== + + * deps: mime-db@~1.30.0 + - Add `application/vnd.ms-outlook` + - Add `application/x-arj` + - Add extension `.mjs` to `application/javascript` + - Add glTF types and extensions + - Add new upstream MIME types + - Add `text/x-org` + - Add VirtualBox MIME types + - Fix `source` records for `video/*` types that are IANA + - Update `font/opentype` to registered `font/otf` + +2.1.16 / 2017-07-24 +=================== + + * deps: mime-db@~1.29.0 + - Add `application/fido.trusted-apps+json` + - Add extension `.wadl` to `application/vnd.sun.wadl+xml` + - Add extension `.gz` to `application/gzip` + - Add new upstream MIME types + - Update extensions `.md` and `.markdown` to be `text/markdown` + +2.1.15 / 2017-03-23 +=================== + + * deps: mime-db@~1.27.0 + - Add new mime types + - Add `image/apng` + +2.1.14 / 2017-01-14 +=================== + + * deps: mime-db@~1.26.0 + - Add new mime types + +2.1.13 / 2016-11-18 +=================== + + * deps: mime-db@~1.25.0 + - Add new mime types + +2.1.12 / 2016-09-18 +=================== + + * deps: mime-db@~1.24.0 + - Add new mime types + - Add `audio/mp3` + +2.1.11 / 2016-05-01 +=================== + + * deps: mime-db@~1.23.0 + - Add new mime types + +2.1.10 / 2016-02-15 +=================== + + * deps: mime-db@~1.22.0 + - Add new mime types + - Fix extension of `application/dash+xml` + - Update primary extension for `audio/mp4` + +2.1.9 / 2016-01-06 +================== + + * deps: mime-db@~1.21.0 + - Add new mime types + +2.1.8 / 2015-11-30 +================== + + * deps: mime-db@~1.20.0 + - Add new mime types + +2.1.7 / 2015-09-20 +================== + + * deps: mime-db@~1.19.0 + - Add new mime types + +2.1.6 / 2015-09-03 +================== + + * deps: mime-db@~1.18.0 + - Add new mime types + +2.1.5 / 2015-08-20 +================== + + * deps: mime-db@~1.17.0 + - Add new mime types + +2.1.4 / 2015-07-30 +================== + + * deps: mime-db@~1.16.0 + - Add new mime types + +2.1.3 / 2015-07-13 +================== + + * deps: mime-db@~1.15.0 + - Add new mime types + +2.1.2 / 2015-06-25 +================== + + * deps: mime-db@~1.14.0 + - Add new mime types + +2.1.1 / 2015-06-08 +================== + + * perf: fix deopt during mapping + +2.1.0 / 2015-06-07 +================== + + * Fix incorrectly treating extension-less file name as extension + - i.e. `'path/to/json'` will no longer return `application/json` + * Fix `.charset(type)` to accept parameters + * Fix `.charset(type)` to match case-insensitive + * Improve generation of extension to MIME mapping + * Refactor internals for readability and no argument reassignment + * Prefer `application/*` MIME types from the same source + * Prefer any type over `application/octet-stream` + * deps: mime-db@~1.13.0 + - Add nginx as a source + - Add new mime types + +2.0.14 / 2015-06-06 +=================== + + * deps: mime-db@~1.12.0 + - Add new mime types + +2.0.13 / 2015-05-31 +=================== + + * deps: mime-db@~1.11.0 + - Add new mime types + +2.0.12 / 2015-05-19 +=================== + + * deps: mime-db@~1.10.0 + - Add new mime types + +2.0.11 / 2015-05-05 +=================== + + * deps: mime-db@~1.9.1 + - Add new mime types + +2.0.10 / 2015-03-13 +=================== + + * deps: mime-db@~1.8.0 + - Add new mime types + +2.0.9 / 2015-02-09 +================== + + * deps: mime-db@~1.7.0 + - Add new mime types + - Community extensions ownership transferred from `node-mime` + +2.0.8 / 2015-01-29 +================== + + * deps: mime-db@~1.6.0 + - Add new mime types + +2.0.7 / 2014-12-30 +================== + + * deps: mime-db@~1.5.0 + - Add new mime types + - Fix various invalid MIME type entries + +2.0.6 / 2014-12-30 +================== + + * deps: mime-db@~1.4.0 + - Add new mime types + - Fix various invalid MIME type entries + - Remove example template MIME types + +2.0.5 / 2014-12-29 +================== + + * deps: mime-db@~1.3.1 + - Fix missing extensions + +2.0.4 / 2014-12-10 +================== + + * deps: mime-db@~1.3.0 + - Add new mime types + +2.0.3 / 2014-11-09 +================== + + * deps: mime-db@~1.2.0 + - Add new mime types + +2.0.2 / 2014-09-28 +================== + + * deps: mime-db@~1.1.0 + - Add new mime types + - Update charsets + +2.0.1 / 2014-09-07 +================== + + * Support Node.js 0.6 + +2.0.0 / 2014-09-02 +================== + + * Use `mime-db` + * Remove `.define()` + +1.0.2 / 2014-08-04 +================== + + * Set charset=utf-8 for `text/javascript` + +1.0.1 / 2014-06-24 +================== + + * Add `text/jsx` type + +1.0.0 / 2014-05-12 +================== + + * Return `false` for unknown types + * Set charset=utf-8 for `application/json` + +0.1.0 / 2014-05-02 +================== + + * Initial release diff --git a/node_modules/mime-types/LICENSE b/node_modules/mime-types/LICENSE new file mode 100644 index 0000000..0616607 --- /dev/null +++ b/node_modules/mime-types/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +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. diff --git a/node_modules/mime-types/README.md b/node_modules/mime-types/README.md new file mode 100644 index 0000000..48d2fb4 --- /dev/null +++ b/node_modules/mime-types/README.md @@ -0,0 +1,113 @@ +# mime-types + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][ci-image]][ci-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +The ultimate javascript content-type utility. + +Similar to [the `mime@1.x` module](https://www.npmjs.com/package/mime), except: + +- __No fallbacks.__ Instead of naively returning the first available type, + `mime-types` simply returns `false`, so do + `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. +- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. +- No `.define()` functionality +- Bug fixes for `.lookup(path)` + +Otherwise, the API is compatible with `mime` 1.x. + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install mime-types +``` + +## Adding Types + +All mime types are based on [mime-db](https://www.npmjs.com/package/mime-db), +so open a PR there if you'd like to add mime types. + +## API + +```js +var mime = require('mime-types') +``` + +All functions return `false` if input is invalid or not found. + +### mime.lookup(path) + +Lookup the content-type associated with a file. + +```js +mime.lookup('json') // 'application/json' +mime.lookup('.md') // 'text/markdown' +mime.lookup('file.html') // 'text/html' +mime.lookup('folder/file.js') // 'application/javascript' +mime.lookup('folder/.htaccess') // false + +mime.lookup('cats') // false +``` + +### mime.contentType(type) + +Create a full content-type header given a content-type or extension. +When given an extension, `mime.lookup` is used to get the matching +content-type, otherwise the given content-type is used. Then if the +content-type does not already have a `charset` parameter, `mime.charset` +is used to get the default charset and add to the returned content-type. + +```js +mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' +mime.contentType('file.json') // 'application/json; charset=utf-8' +mime.contentType('text/html') // 'text/html; charset=utf-8' +mime.contentType('text/html; charset=iso-8859-1') // 'text/html; charset=iso-8859-1' + +// from a full path +mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8' +``` + +### mime.extension(type) + +Get the default extension for a content-type. + +```js +mime.extension('application/octet-stream') // 'bin' +``` + +### mime.charset(type) + +Lookup the implied default charset of a content-type. + +```js +mime.charset('text/markdown') // 'UTF-8' +``` + +### var type = mime.types[extension] + +A map of content-types by extension. + +### [extensions...] = mime.extensions[type] + +A map of extensions by content-type. + +## License + +[MIT](LICENSE) + +[ci-image]: https://badgen.net/github/checks/jshttp/mime-types/master?label=ci +[ci-url]: https://github.com/jshttp/mime-types/actions/workflows/ci.yml +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-types/master +[coveralls-url]: https://coveralls.io/r/jshttp/mime-types?branch=master +[node-version-image]: https://badgen.net/npm/node/mime-types +[node-version-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/mime-types +[npm-url]: https://npmjs.org/package/mime-types +[npm-version-image]: https://badgen.net/npm/v/mime-types diff --git a/node_modules/mime-types/index.js b/node_modules/mime-types/index.js new file mode 100644 index 0000000..b9f34d5 --- /dev/null +++ b/node_modules/mime-types/index.js @@ -0,0 +1,188 @@ +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var db = require('mime-db') +var extname = require('path').extname + +/** + * Module variables. + * @private + */ + +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ +var TEXT_TYPE_REGEXP = /^text\//i + +/** + * Module exports. + * @public + */ + +exports.charset = charset +exports.charsets = { lookup: charset } +exports.contentType = contentType +exports.extension = extension +exports.extensions = Object.create(null) +exports.lookup = lookup +exports.types = Object.create(null) + +// Populate the extensions/types maps +populateMaps(exports.extensions, exports.types) + +/** + * Get the default charset for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function charset (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + var mime = match && db[match[1].toLowerCase()] + + if (mime && mime.charset) { + return mime.charset + } + + // default text/* to utf-8 + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return 'UTF-8' + } + + return false +} + +/** + * Create a full Content-Type header given a MIME type or extension. + * + * @param {string} str + * @return {boolean|string} + */ + +function contentType (str) { + // TODO: should this even be in this module? + if (!str || typeof str !== 'string') { + return false + } + + var mime = str.indexOf('/') === -1 + ? exports.lookup(str) + : str + + if (!mime) { + return false + } + + // TODO: use content-type or other module + if (mime.indexOf('charset') === -1) { + var charset = exports.charset(mime) + if (charset) mime += '; charset=' + charset.toLowerCase() + } + + return mime +} + +/** + * Get the default extension for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function extension (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + + // get extensions + var exts = match && exports.extensions[match[1].toLowerCase()] + + if (!exts || !exts.length) { + return false + } + + return exts[0] +} + +/** + * Lookup the MIME type for a file path/extension. + * + * @param {string} path + * @return {boolean|string} + */ + +function lookup (path) { + if (!path || typeof path !== 'string') { + return false + } + + // get the extension ("ext" or ".ext" or full path) + var extension = extname('x.' + path) + .toLowerCase() + .substr(1) + + if (!extension) { + return false + } + + return exports.types[extension] || false +} + +/** + * Populate the extensions and types maps. + * @private + */ + +function populateMaps (extensions, types) { + // source preference (least -> most) + var preference = ['nginx', 'apache', undefined, 'iana'] + + Object.keys(db).forEach(function forEachMimeType (type) { + var mime = db[type] + var exts = mime.extensions + + if (!exts || !exts.length) { + return + } + + // mime -> extensions + extensions[type] = exts + + // extension -> mime + for (var i = 0; i < exts.length; i++) { + var extension = exts[i] + + if (types[extension]) { + var from = preference.indexOf(db[types[extension]].source) + var to = preference.indexOf(mime.source) + + if (types[extension] !== 'application/octet-stream' && + (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { + // skip the remapping + continue + } + } + + // set the extension -> mime + types[extension] = type + } + }) +} diff --git a/node_modules/mime-types/package.json b/node_modules/mime-types/package.json new file mode 100644 index 0000000..bbef696 --- /dev/null +++ b/node_modules/mime-types/package.json @@ -0,0 +1,44 @@ +{ + "name": "mime-types", + "description": "The ultimate javascript content-type utility.", + "version": "2.1.35", + "contributors": [ + "Douglas Christopher Wilson ", + "Jeremiah Senkpiel (https://searchbeam.jit.su)", + "Jonathan Ong (http://jongleberry.com)" + ], + "license": "MIT", + "keywords": [ + "mime", + "types" + ], + "repository": "jshttp/mime-types", + "dependencies": { + "mime-db": "1.52.0" + }, + "devDependencies": { + "eslint": "7.32.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "5.2.0", + "eslint-plugin-standard": "4.1.0", + "mocha": "9.2.2", + "nyc": "15.1.0" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec test/test.js", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + } +} diff --git a/node_modules/mime/CHANGELOG.md b/node_modules/mime/CHANGELOG.md new file mode 100644 index 0000000..cdf9be5 --- /dev/null +++ b/node_modules/mime/CHANGELOG.md @@ -0,0 +1,312 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [3.0.0](https://github.com/broofa/mime/compare/v2.6.0...v3.0.0) (2021-11-03) + + +### ⚠ BREAKING CHANGES + +* drop support for node < 10.x + +### Bug Fixes + +* skypack.dev for direct browser import, fixes [#263](https://github.com/broofa/mime/issues/263) ([41db4c0](https://github.com/broofa/mime/commit/41db4c042ccf50ea7baf3d2160ea37dcca37998d)) + + +### update + +* drop support for node < 10.x ([8857363](https://github.com/broofa/mime/commit/8857363ae0446ed0229b17291cf4483cf801f0d0)) + +## [2.6.0](https://github.com/broofa/mime/compare/v2.5.2...v2.6.0) (2021-11-02) + + +### Features + +* mime-db@1.50.0 ([cef0cc4](https://github.com/broofa/mime/commit/cef0cc484ff6d05ff1e12b54ca3e8b856fbc14d8)) + +### [2.5.2](https://github.com/broofa/mime/compare/v2.5.0...v2.5.2) (2021-02-17) + + +### Bug Fixes + +* update to mime-db@1.46.0, fixes [#253](https://github.com/broofa/mime/issues/253) ([f10e6aa](https://github.com/broofa/mime/commit/f10e6aa62e1356de7e2491d7fb4374c8dac65800)) + +## [2.5.0](https://github.com/broofa/mime/compare/v2.4.7...v2.5.0) (2021-01-16) + + +### Features + +* improved CLI ([#244](https://github.com/broofa/mime/issues/244)) ([c8a8356](https://github.com/broofa/mime/commit/c8a8356e3b27f3ef46b64b89b428fdb547b14d5f)) + +### [2.4.7](https://github.com/broofa/mime/compare/v2.4.6...v2.4.7) (2020-12-16) + + +### Bug Fixes + +* update to latest mime-db ([43b09ef](https://github.com/broofa/mime/commit/43b09eff0233eacc449af2b1f99a19ba9e104a44)) + +### [2.4.6](https://github.com/broofa/mime/compare/v2.4.5...v2.4.6) (2020-05-27) + + +### Bug Fixes + +* add cli.js to package.json files ([#237](https://github.com/broofa/mime/issues/237)) ([6c070bc](https://github.com/broofa/mime/commit/6c070bc298fa12a48e2ed126fbb9de641a1e7ebc)) + +### [2.4.5](https://github.com/broofa/mime/compare/v2.4.4...v2.4.5) (2020-05-01) + + +### Bug Fixes + +* fix [#236](https://github.com/broofa/mime/issues/236) ([7f4ecd0](https://github.com/broofa/mime/commit/7f4ecd0d850ed22c9e3bfda2c11fc74e4dde12a7)) +* update to latest mime-db ([c5cb3f2](https://github.com/broofa/mime/commit/c5cb3f2ab8b07642a066efbde1142af1b90c927b)) + +### [2.4.4](https://github.com/broofa/mime/compare/v2.4.3...v2.4.4) (2019-06-07) + + + +### [2.4.3](https://github.com/broofa/mime/compare/v2.4.2...v2.4.3) (2019-05-15) + + + +### [2.4.2](https://github.com/broofa/mime/compare/v2.4.1...v2.4.2) (2019-04-07) + + +### Bug Fixes + +* don't use arrow function introduced in 2.4.1 ([2e00b5c](https://github.com/broofa/mime/commit/2e00b5c)) + + + +### [2.4.1](https://github.com/broofa/mime/compare/v2.4.0...v2.4.1) (2019-04-03) + + +### Bug Fixes + +* update MDN and mime-db types ([3e567a9](https://github.com/broofa/mime/commit/3e567a9)) + + + +# [2.4.0](https://github.com/broofa/mime/compare/v2.3.1...v2.4.0) (2018-11-26) + + +### Features + +* Bind exported methods ([9d2a7b8](https://github.com/broofa/mime/commit/9d2a7b8)) +* update to mime-db@1.37.0 ([49e6e41](https://github.com/broofa/mime/commit/49e6e41)) + + + +### [2.3.1](https://github.com/broofa/mime/compare/v2.3.0...v2.3.1) (2018-04-11) + + +### Bug Fixes + +* fix [#198](https://github.com/broofa/mime/issues/198) ([25ca180](https://github.com/broofa/mime/commit/25ca180)) + + + +# [2.3.0](https://github.com/broofa/mime/compare/v2.2.2...v2.3.0) (2018-04-11) + + +### Bug Fixes + +* fix [#192](https://github.com/broofa/mime/issues/192) ([5c35df6](https://github.com/broofa/mime/commit/5c35df6)) + + +### Features + +* add travis-ci testing ([d64160f](https://github.com/broofa/mime/commit/d64160f)) + + + +### [2.2.2](https://github.com/broofa/mime/compare/v2.2.1...v2.2.2) (2018-03-30) + + +### Bug Fixes + +* update types files to mime-db@1.32.0 ([85aac16](https://github.com/broofa/mime/commit/85aac16)) + + +### [2.2.1](https://github.com/broofa/mime/compare/v2.2.0...v2.2.1) (2018-03-30) + + +### Bug Fixes + +* Retain type->extension mappings for non-default types. Fixes [#180](https://github.com/broofa/mime/issues/180) ([b5c83fb](https://github.com/broofa/mime/commit/b5c83fb)) + + + +# [2.2.0](https://github.com/broofa/mime/compare/v2.1.0...v2.2.0) (2018-01-04) + + +### Features + +* Retain type->extension mappings for non-default types. Fixes [#180](https://github.com/broofa/mime/issues/180) ([10f82ac](https://github.com/broofa/mime/commit/10f82ac)) + + + +# [2.1.0](https://github.com/broofa/mime/compare/v2.0.5...v2.1.0) (2017-12-22) + + +### Features + +* Upgrade to mime-db@1.32.0. Fixes [#185](https://github.com/broofa/mime/issues/185) ([3f775ba](https://github.com/broofa/mime/commit/3f775ba)) + + + +### [2.0.5](https://github.com/broofa/mime/compare/v2.0.1...v2.0.5) (2017-12-22) + + +### Bug Fixes + +* ES5 support (back to node v0.4) ([f14ccb6](https://github.com/broofa/mime/commit/f14ccb6)) + + + +# Changelog + +### v2.0.4 (24/11/2017) +- [**closed**] Switch to mime-score module for resolving extension contention issues. [#182](https://github.com/broofa/mime/issues/182) +- [**closed**] Update mime-db to 1.31.0 in v1.x branch [#181](https://github.com/broofa/mime/issues/181) + +--- + +## v1.5.0 (22/11/2017) +- [**closed**] need ES5 version ready in npm package [#179](https://github.com/broofa/mime/issues/179) +- [**closed**] mime-db no trace of iWork - pages / numbers / etc. [#178](https://github.com/broofa/mime/issues/178) +- [**closed**] How it works in brownser ? [#176](https://github.com/broofa/mime/issues/176) +- [**closed**] Missing `./Mime` [#175](https://github.com/broofa/mime/issues/175) +- [**closed**] Vulnerable Regular Expression [#167](https://github.com/broofa/mime/issues/167) + +--- + +### v2.0.3 (25/09/2017) +*No changelog for this release.* + +--- + +### v1.4.1 (25/09/2017) +- [**closed**] Issue when bundling with webpack [#172](https://github.com/broofa/mime/issues/172) + +--- + +### v2.0.2 (15/09/2017) +- [**V2**] fs.readFileSync is not a function [#165](https://github.com/broofa/mime/issues/165) +- [**closed**] The extension for video/quicktime should map to .mov, not .qt [#164](https://github.com/broofa/mime/issues/164) +- [**V2**] [v2 Feedback request] Mime class API [#163](https://github.com/broofa/mime/issues/163) +- [**V2**] [v2 Feedback request] Resolving conflicts over extensions [#162](https://github.com/broofa/mime/issues/162) +- [**V2**] Allow callers to load module with official, full, or no defined types. [#161](https://github.com/broofa/mime/issues/161) +- [**V2**] Use "facets" to resolve extension conflicts [#160](https://github.com/broofa/mime/issues/160) +- [**V2**] Remove fs and path dependencies [#152](https://github.com/broofa/mime/issues/152) +- [**V2**] Default content-type should not be application/octet-stream [#139](https://github.com/broofa/mime/issues/139) +- [**V2**] reset mime-types [#124](https://github.com/broofa/mime/issues/124) +- [**V2**] Extensionless paths should return null or false [#113](https://github.com/broofa/mime/issues/113) + +--- + +### v2.0.1 (14/09/2017) +- [**closed**] Changelog for v2.0 does not mention breaking changes [#171](https://github.com/broofa/mime/issues/171) +- [**closed**] MIME breaking with 'class' declaration as it is without 'use strict mode' [#170](https://github.com/broofa/mime/issues/170) + +--- + +## v2.0.0 (12/09/2017) +- [**closed**] woff and woff2 [#168](https://github.com/broofa/mime/issues/168) + +--- + +## v1.4.0 (28/08/2017) +- [**closed**] support for ac3 voc files [#159](https://github.com/broofa/mime/issues/159) +- [**closed**] Help understanding change from application/xml to text/xml [#158](https://github.com/broofa/mime/issues/158) +- [**closed**] no longer able to override mimetype [#157](https://github.com/broofa/mime/issues/157) +- [**closed**] application/vnd.adobe.photoshop [#147](https://github.com/broofa/mime/issues/147) +- [**closed**] Directories should appear as something other than application/octet-stream [#135](https://github.com/broofa/mime/issues/135) +- [**closed**] requested features [#131](https://github.com/broofa/mime/issues/131) +- [**closed**] Make types.json loading optional? [#129](https://github.com/broofa/mime/issues/129) +- [**closed**] Cannot find module './types.json' [#120](https://github.com/broofa/mime/issues/120) +- [**V2**] .wav files show up as "audio/x-wav" instead of "audio/x-wave" [#118](https://github.com/broofa/mime/issues/118) +- [**closed**] Don't be a pain in the ass for node community [#108](https://github.com/broofa/mime/issues/108) +- [**closed**] don't make default_type global [#78](https://github.com/broofa/mime/issues/78) +- [**closed**] mime.extension() fails if the content-type is parameterized [#74](https://github.com/broofa/mime/issues/74) + +--- + +### v1.3.6 (11/05/2017) +- [**closed**] .md should be text/markdown as of March 2016 [#154](https://github.com/broofa/mime/issues/154) +- [**closed**] Error while installing mime [#153](https://github.com/broofa/mime/issues/153) +- [**closed**] application/manifest+json [#149](https://github.com/broofa/mime/issues/149) +- [**closed**] Dynamic adaptive streaming over HTTP (DASH) file extension typo [#141](https://github.com/broofa/mime/issues/141) +- [**closed**] charsets image/png undefined [#140](https://github.com/broofa/mime/issues/140) +- [**closed**] Mime-db dependency out of date [#130](https://github.com/broofa/mime/issues/130) +- [**closed**] how to support plist? [#126](https://github.com/broofa/mime/issues/126) +- [**closed**] how does .types file format look like? [#123](https://github.com/broofa/mime/issues/123) +- [**closed**] Feature: support for expanding MIME patterns [#121](https://github.com/broofa/mime/issues/121) +- [**closed**] DEBUG_MIME doesn't work [#117](https://github.com/broofa/mime/issues/117) + +--- + +### v1.3.4 (06/02/2015) +*No changelog for this release.* + +--- + +### v1.3.3 (06/02/2015) +*No changelog for this release.* + +--- + +### v1.3.1 (05/02/2015) +- [**closed**] Consider adding support for Handlebars .hbs file ending [#111](https://github.com/broofa/mime/issues/111) +- [**closed**] Consider adding support for hjson. [#110](https://github.com/broofa/mime/issues/110) +- [**closed**] Add mime type for Opus audio files [#94](https://github.com/broofa/mime/issues/94) +- [**closed**] Consider making the `Requesting New Types` information more visible [#77](https://github.com/broofa/mime/issues/77) + +--- + +## v1.3.0 (05/02/2015) +- [**closed**] Add common name? [#114](https://github.com/broofa/mime/issues/114) +- [**closed**] application/x-yaml [#104](https://github.com/broofa/mime/issues/104) +- [**closed**] Add mime type for WOFF file format 2.0 [#102](https://github.com/broofa/mime/issues/102) +- [**closed**] application/x-msi for .msi [#99](https://github.com/broofa/mime/issues/99) +- [**closed**] Add mimetype for gettext translation files [#98](https://github.com/broofa/mime/issues/98) +- [**closed**] collaborators [#88](https://github.com/broofa/mime/issues/88) +- [**closed**] getting errot in installation of mime module...any1 can help? [#87](https://github.com/broofa/mime/issues/87) +- [**closed**] should application/json's charset be utf8? [#86](https://github.com/broofa/mime/issues/86) +- [**closed**] Add "license" and "licenses" to package.json [#81](https://github.com/broofa/mime/issues/81) +- [**closed**] lookup with extension-less file on Windows returns wrong type [#68](https://github.com/broofa/mime/issues/68) + +--- + +### v1.2.11 (15/08/2013) +- [**closed**] Update mime.types [#65](https://github.com/broofa/mime/issues/65) +- [**closed**] Publish a new version [#63](https://github.com/broofa/mime/issues/63) +- [**closed**] README should state upfront that "application/octet-stream" is default for unknown extension [#55](https://github.com/broofa/mime/issues/55) +- [**closed**] Suggested improvement to the charset API [#52](https://github.com/broofa/mime/issues/52) + +--- + +### v1.2.10 (25/07/2013) +- [**closed**] Mime type for woff files should be application/font-woff and not application/x-font-woff [#62](https://github.com/broofa/mime/issues/62) +- [**closed**] node.types in conflict with mime.types [#51](https://github.com/broofa/mime/issues/51) + +--- + +### v1.2.9 (17/01/2013) +- [**closed**] Please update "mime" NPM [#49](https://github.com/broofa/mime/issues/49) +- [**closed**] Please add semicolon [#46](https://github.com/broofa/mime/issues/46) +- [**closed**] parse full mime types [#43](https://github.com/broofa/mime/issues/43) + +--- + +### v1.2.8 (10/01/2013) +- [**closed**] /js directory mime is application/javascript. Is it correct? [#47](https://github.com/broofa/mime/issues/47) +- [**closed**] Add mime types for lua code. [#45](https://github.com/broofa/mime/issues/45) + +--- + +### v1.2.7 (19/10/2012) +- [**closed**] cannot install 1.2.7 via npm [#41](https://github.com/broofa/mime/issues/41) +- [**closed**] Transfer ownership to @broofa [#36](https://github.com/broofa/mime/issues/36) +- [**closed**] it's wrong to set charset to UTF-8 for text [#30](https://github.com/broofa/mime/issues/30) +- [**closed**] Allow multiple instances of MIME types container [#27](https://github.com/broofa/mime/issues/27) diff --git a/node_modules/mime/LICENSE b/node_modules/mime/LICENSE new file mode 100644 index 0000000..d3f46f7 --- /dev/null +++ b/node_modules/mime/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2010 Benjamin Thomas, Robert Kieffer + +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. diff --git a/node_modules/mime/Mime.js b/node_modules/mime/Mime.js new file mode 100644 index 0000000..969a66e --- /dev/null +++ b/node_modules/mime/Mime.js @@ -0,0 +1,97 @@ +'use strict'; + +/** + * @param typeMap [Object] Map of MIME type -> Array[extensions] + * @param ... + */ +function Mime() { + this._types = Object.create(null); + this._extensions = Object.create(null); + + for (let i = 0; i < arguments.length; i++) { + this.define(arguments[i]); + } + + this.define = this.define.bind(this); + this.getType = this.getType.bind(this); + this.getExtension = this.getExtension.bind(this); +} + +/** + * Define mimetype -> extension mappings. Each key is a mime-type that maps + * to an array of extensions associated with the type. The first extension is + * used as the default extension for the type. + * + * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); + * + * If a type declares an extension that has already been defined, an error will + * be thrown. To suppress this error and force the extension to be associated + * with the new type, pass `force`=true. Alternatively, you may prefix the + * extension with "*" to map the type to extension, without mapping the + * extension to the type. + * + * e.g. mime.define({'audio/wav', ['wav']}, {'audio/x-wav', ['*wav']}); + * + * + * @param map (Object) type definitions + * @param force (Boolean) if true, force overriding of existing definitions + */ +Mime.prototype.define = function(typeMap, force) { + for (let type in typeMap) { + let extensions = typeMap[type].map(function(t) { + return t.toLowerCase(); + }); + type = type.toLowerCase(); + + for (let i = 0; i < extensions.length; i++) { + const ext = extensions[i]; + + // '*' prefix = not the preferred type for this extension. So fixup the + // extension, and skip it. + if (ext[0] === '*') { + continue; + } + + if (!force && (ext in this._types)) { + throw new Error( + 'Attempt to change mapping for "' + ext + + '" extension from "' + this._types[ext] + '" to "' + type + + '". Pass `force=true` to allow this, otherwise remove "' + ext + + '" from the list of extensions for "' + type + '".' + ); + } + + this._types[ext] = type; + } + + // Use first extension as default + if (force || !this._extensions[type]) { + const ext = extensions[0]; + this._extensions[type] = (ext[0] !== '*') ? ext : ext.substr(1); + } + } +}; + +/** + * Lookup a mime type based on extension + */ +Mime.prototype.getType = function(path) { + path = String(path); + let last = path.replace(/^.*[/\\]/, '').toLowerCase(); + let ext = last.replace(/^.*\./, '').toLowerCase(); + + let hasPath = last.length < path.length; + let hasDot = ext.length < last.length - 1; + + return (hasDot || !hasPath) && this._types[ext] || null; +}; + +/** + * Return file extension associated with a mime type + */ +Mime.prototype.getExtension = function(type) { + type = /^\s*([^;\s]*)/.test(type) && RegExp.$1; + return type && this._extensions[type.toLowerCase()] || null; +}; + +module.exports = Mime; diff --git a/node_modules/mime/README.md b/node_modules/mime/README.md new file mode 100644 index 0000000..fc816cb --- /dev/null +++ b/node_modules/mime/README.md @@ -0,0 +1,178 @@ + +# Mime + +A comprehensive, compact MIME type module. + +[![Build Status](https://travis-ci.org/broofa/mime.svg?branch=master)](https://travis-ci.org/broofa/mime) + +## Install + +### NPM +``` +npm install mime +``` + +### Browser + +It is recommended that you use a bundler such as +[webpack](https://webpack.github.io/) or [browserify](http://browserify.org/) to +package your code. However, browser-ready versions are available via +skypack.dev as follows: +``` +// Full version + +``` + +``` +// "lite" version + +``` + +## Quick Start + +For the full version (800+ MIME types, 1,000+ extensions): + +```javascript +const mime = require('mime'); + +mime.getType('txt'); // ⇨ 'text/plain' +mime.getExtension('text/plain'); // ⇨ 'txt' +``` + +See [Mime API](#mime-api) below for API details. + +## Lite Version + +The "lite" version of this module omits vendor-specific (`*/vnd.*`) and +experimental (`*/x-*`) types. It weighs in at ~2.5KB, compared to 8KB for the +full version. To load the lite version: + +```javascript +const mime = require('mime/lite'); +``` + +## Mime .vs. mime-types .vs. mime-db modules + +For those of you wondering about the difference between these [popular] NPM modules, +here's a brief rundown ... + +[`mime-db`](https://github.com/jshttp/mime-db) is "the source of +truth" for MIME type information. It is not an API. Rather, it is a canonical +dataset of mime type definitions pulled from IANA, Apache, NGINX, and custom mappings +submitted by the Node.js community. + +[`mime-types`](https://github.com/jshttp/mime-types) is a thin +wrapper around mime-db that provides an API drop-in compatible(ish) with `mime @ < v1.3.6` API. + +`mime` is, as of v2, a self-contained module bundled with a pre-optimized version +of the `mime-db` dataset. It provides a simplified API with the following characteristics: + +* Intelligently resolved type conflicts (See [mime-score](https://github.com/broofa/mime-score) for details) +* Method naming consistent with industry best-practices +* Compact footprint. E.g. The minified+compressed sizes of the various modules: + +Module | Size +--- | --- +`mime-db` | 18 KB +`mime-types` | same as mime-db +`mime` | 8 KB +`mime/lite` | 2 KB + +## Mime API + +Both `require('mime')` and `require('mime/lite')` return instances of the MIME +class, documented below. + +Note: Inputs to this API are case-insensitive. Outputs (returned values) will +be lowercase. + +### new Mime(typeMap, ... more maps) + +Most users of this module will not need to create Mime instances directly. +However if you would like to create custom mappings, you may do so as follows +... + +```javascript +// Require Mime class +const Mime = require('mime/Mime'); + +// Define mime type -> extensions map +const typeMap = { + 'text/abc': ['abc', 'alpha', 'bet'], + 'text/def': ['leppard'] +}; + +// Create and use Mime instance +const myMime = new Mime(typeMap); +myMime.getType('abc'); // ⇨ 'text/abc' +myMime.getExtension('text/def'); // ⇨ 'leppard' +``` + +If more than one map argument is provided, each map is `define()`ed (see below), in order. + +### mime.getType(pathOrExtension) + +Get mime type for the given path or extension. E.g. + +```javascript +mime.getType('js'); // ⇨ 'application/javascript' +mime.getType('json'); // ⇨ 'application/json' + +mime.getType('txt'); // ⇨ 'text/plain' +mime.getType('dir/text.txt'); // ⇨ 'text/plain' +mime.getType('dir\\text.txt'); // ⇨ 'text/plain' +mime.getType('.text.txt'); // ⇨ 'text/plain' +mime.getType('.txt'); // ⇨ 'text/plain' +``` + +`null` is returned in cases where an extension is not detected or recognized + +```javascript +mime.getType('foo/txt'); // ⇨ null +mime.getType('bogus_type'); // ⇨ null +``` + +### mime.getExtension(type) +Get extension for the given mime type. Charset options (often included in +Content-Type headers) are ignored. + +```javascript +mime.getExtension('text/plain'); // ⇨ 'txt' +mime.getExtension('application/json'); // ⇨ 'json' +mime.getExtension('text/html; charset=utf8'); // ⇨ 'html' +``` + +### mime.define(typeMap[, force = false]) + +Define [more] type mappings. + +`typeMap` is a map of type -> extensions, as documented in `new Mime`, above. + +By default this method will throw an error if you try to map a type to an +extension that is already assigned to another type. Passing `true` for the +`force` argument will suppress this behavior (overriding any previous mapping). + +```javascript +mime.define({'text/x-abc': ['abc', 'abcd']}); + +mime.getType('abcd'); // ⇨ 'text/x-abc' +mime.getExtension('text/x-abc') // ⇨ 'abc' +``` + +## Command Line + + mime [path_or_extension] + +E.g. + + > mime scripts/jquery.js + application/javascript + +---- +Markdown generated from [src/README_js.md](src/README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) \ No newline at end of file diff --git a/node_modules/mime/cli.js b/node_modules/mime/cli.js new file mode 100755 index 0000000..ab70a49 --- /dev/null +++ b/node_modules/mime/cli.js @@ -0,0 +1,46 @@ +#!/usr/bin/env node + +'use strict'; + +process.title = 'mime'; +let mime = require('.'); +let pkg = require('./package.json'); +let args = process.argv.splice(2); + +if (args.includes('--version') || args.includes('-v') || args.includes('--v')) { + console.log(pkg.version); + process.exit(0); +} else if (args.includes('--name') || args.includes('-n') || args.includes('--n')) { + console.log(pkg.name); + process.exit(0); +} else if (args.includes('--help') || args.includes('-h') || args.includes('--h')) { + console.log(pkg.name + ' - ' + pkg.description + '\n'); + console.log(`Usage: + + mime [flags] [path_or_extension] + + Flags: + --help, -h Show this message + --version, -v Display the version + --name, -n Print the name of the program + + Note: the command will exit after it executes if a command is specified + The path_or_extension is the path to the file or the extension of the file. + + Examples: + mime --help + mime --version + mime --name + mime -v + mime src/log.js + mime new.py + mime foo.sh + `); + process.exit(0); +} + +let file = args[0]; +let type = mime.getType(file); + +process.stdout.write(type + '\n'); + diff --git a/node_modules/mime/index.js b/node_modules/mime/index.js new file mode 100644 index 0000000..fadcf8d --- /dev/null +++ b/node_modules/mime/index.js @@ -0,0 +1,4 @@ +'use strict'; + +let Mime = require('./Mime'); +module.exports = new Mime(require('./types/standard'), require('./types/other')); diff --git a/node_modules/mime/lite.js b/node_modules/mime/lite.js new file mode 100644 index 0000000..835cffb --- /dev/null +++ b/node_modules/mime/lite.js @@ -0,0 +1,4 @@ +'use strict'; + +let Mime = require('./Mime'); +module.exports = new Mime(require('./types/standard')); diff --git a/node_modules/mime/package.json b/node_modules/mime/package.json new file mode 100644 index 0000000..84f5132 --- /dev/null +++ b/node_modules/mime/package.json @@ -0,0 +1,52 @@ +{ + "author": { + "name": "Robert Kieffer", + "url": "http://github.com/broofa", + "email": "robert@broofa.com" + }, + "engines": { + "node": ">=10.0.0" + }, + "bin": { + "mime": "cli.js" + }, + "contributors": [], + "description": "A comprehensive library for mime-type mapping", + "license": "MIT", + "dependencies": {}, + "devDependencies": { + "benchmark": "*", + "chalk": "4.1.2", + "eslint": "8.1.0", + "mime-db": "1.50.0", + "mime-score": "1.2.0", + "mime-types": "2.1.33", + "mocha": "9.1.3", + "runmd": "*", + "standard-version": "9.3.2" + }, + "files": [ + "index.js", + "lite.js", + "Mime.js", + "cli.js", + "/types" + ], + "scripts": { + "prepare": "node src/build.js && runmd --output README.md src/README_js.md", + "release": "standard-version", + "benchmark": "node src/benchmark.js", + "md": "runmd --watch --output README.md src/README_js.md", + "test": "mocha src/test.js" + }, + "keywords": [ + "util", + "mime" + ], + "name": "mime", + "repository": { + "url": "https://github.com/broofa/mime", + "type": "git" + }, + "version": "3.0.0" +} diff --git a/node_modules/mime/types/other.js b/node_modules/mime/types/other.js new file mode 100644 index 0000000..bb6a035 --- /dev/null +++ b/node_modules/mime/types/other.js @@ -0,0 +1 @@ +module.exports = {"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.sap.vds":["vds"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}; \ No newline at end of file diff --git a/node_modules/mime/types/standard.js b/node_modules/mime/types/standard.js new file mode 100644 index 0000000..5ee9937 --- /dev/null +++ b/node_modules/mime/types/standard.js @@ -0,0 +1 @@ +module.exports = {"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}; \ No newline at end of file diff --git a/node_modules/miniflare/README.md b/node_modules/miniflare/README.md new file mode 100644 index 0000000..71cf184 --- /dev/null +++ b/node_modules/miniflare/README.md @@ -0,0 +1,888 @@ +# 🔥 Miniflare + +**Miniflare 3** is a simulator for developing and testing +[**Cloudflare Workers**](https://workers.cloudflare.com/), powered by +[`workerd`](https://github.com/cloudflare/workerd). + +> :warning: Miniflare 3 is API-only, and does not expose a CLI. Use Wrangler +> with `wrangler dev` to develop your Workers locally with Miniflare 3. + +## Quick Start + +```shell +$ npm install miniflare --save-dev +``` + +```js +import { Miniflare } from "miniflare"; + +// Create a new Miniflare instance, starting a workerd server +const mf = new Miniflare({ + script: `addEventListener("fetch", (event) => { + event.respondWith(new Response("Hello Miniflare!")); + })`, +}); + +// Send a request to the workerd server, the host is ignored +const response = await mf.dispatchFetch("http://localhost:8787/"); +console.log(await response.text()); // Hello Miniflare! + +// Cleanup Miniflare, shutting down the workerd server +await mf.dispose(); +``` + +## API + +### `type Awaitable` + +`T | Promise` + +Represents a value that can be `await`ed. Used in callback types to allow +`Promise`s to be returned if necessary. + +### `type Json` + +`string | number | boolean | null | Record | Json[]` + +Represents a JSON-serialisable value. + +### `type ModuleRuleType` + +`"ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm"` + +Represents how a module's contents should be interpreted. + +- `"ESModule"`: interpret as + [ECMAScript module](https://tc39.es/ecma262/#sec-modules) +- `"CommonJS"`: interpret as + [CommonJS module](https://nodejs.org/api/modules.html#modules-commonjs-modules) +- `"Text"`: interpret as UTF8-encoded data, expose in runtime with + `string`-typed `default` export +- `"Data"`: interpret as arbitrary binary data, expose in runtime with + `ArrayBuffer`-typed `default` export +- `"CompiledWasm"`: interpret as binary WebAssembly module data, expose in + runtime with `WebAssembly.Module`-typed `default` export + +### `interface ModuleDefinition` + +Represents a manually defined module. + +- `type: ModuleRuleType` + + How this module's contents should be interpreted. + +- `path: string` + + Path of this module. The module's "name" will be obtained by converting this + to a relative path. The original path will be used to read `contents` if it's + omitted. + +- `contents?: string | Uint8Array` + + Contents override for this module. Binary data should be passed as + `Uint8Array`s. If omitted, will be read from `path`. + +### `interface ModuleRule` + +Represents a rule for identifying the `ModuleRuleType` of automatically located +modules. + +- `type: ModuleRuleType` + + How to interpret modules that match the `include` patterns. + +- `include: string[]` + + Glob patterns to match located module paths against (e.g. `["**/*.txt"]`). + +- `fallthrough?: boolean` + + If `true`, ignore any further rules of this `type`. This is useful for + disabling the built-in `ESModule` and `CommonJS` rules that match `*.mjs` and + `*.js`/`*.cjs` files respectively. + +### `type Persistence` + +`boolean | string | undefined` + +Represents where data should be persisted, if anywhere. + +- If this is `undefined` or `false`, data will be stored in-memory and only + persist between `Miniflare#setOptions()` calls, not restarts nor + `new Miniflare` instances. +- If this is `true`, data will be stored on the file-system, in the `$PWD/.mf` + directory. +- If this looks like a URL, then: + - If the protocol is `memory:`, data will be stored in-memory as above. + - If the protocol is `file:`, data will be stored on the file-system, in the + specified directory (e.g. `file:///path/to/directory`). +- Otherwise, if this is just a regular `string`, data will be stored on the + file-system, using the value as the directory path. + +### `enum LogLevel` + +`NONE, ERROR, WARN, INFO, DEBUG, VERBOSE` + +Controls which messages Miniflare logs. All messages at or below the selected +level will be logged. + +### `interface LogOptions` + +- `prefix?: string` + + String to add before the level prefix when logging messages. Defaults to `mf`. + +- `suffix?: string` + + String to add after the level prefix when logging messages. + +### `class Log` + +- `constructor(level?: LogLevel, opts?: LogOptions)` + + Creates a new logger that logs all messages at or below the specified level to + the `console`. + +- `error(message: Error)` + + Logs a message at the `ERROR` level. If the constructed log `level` is less + than `ERROR`, `throw`s the `message` instead. + +- `warn(message: string)` + + Logs a message at the `WARN` level. + +- `info(message: string)` + + Logs a message at the `INFO` level. + +- `debug(message: string)` + + Logs a message at the `DEBUG` level. + +- `verbose(message: string)` + + Logs a message at the `VERBOSE` level. + +### `class NoOpLog extends Log` + +- `constructor()` + + Creates a new logger that logs nothing to the `console`, and always `throw`s + `message`s logged at the `ERROR` level. + +### `interface QueueProducerOptions` + +- `queueName: string` + + The name of the queue where messages will be sent by the producer. + +- `deliveryDelay?: number` + + Default number of seconds to delay the delivery of messages to consumers. + Value between `0` (no delay) and `42300` (12 hours). + +### `interface QueueConsumerOptions` + +- `maxBatchSize?: number` + + Maximum number of messages allowed in each batch. Defaults to `5`. + +- `maxBatchTimeout?: number` + + Maximum number of seconds to wait for a full batch. If a message is sent, and + this timeout elapses, a partial batch will be dispatched. Defaults to `1`. + +- `maxRetries?: number` + + Maximum number of times to retry dispatching a message, if handling it throws, + or it is explicitly retried. Defaults to `2`. + +- `deadLetterQueue?: string` + + Name of another Queue to send a message on if it fails processing after + `maxRetries`. If this isn't specified, failed messages will be discarded. + +- `retryDelay?: number` + + Number of seconds to delay the (re-)delivery of messages by default. Value + between `0` (no delay) and `42300` (12 hours). + +### `interface WorkerOptions` + +Options for an individual Worker/"nanoservice". All bindings are accessible on +the global scope in service-worker format Workers, or via the 2nd `env` +parameter in module format Workers. + +### `interface WorkflowOptions` + +- `name: string` + + The name of the Workflow. + +- `className: string` + + The name of the class exported from the Worker that implements the `WorkflowEntrypoint`. + +- `scriptName?`: string + + The name of the script that includes the `WorkflowEntrypoint`. This is optional because it defaults to the current script if not set. + +#### Core + +- `name?: string` + + Unique name for this worker. Only required if multiple `workers` are + specified. + +- `rootPath?: string` + + Path against which all other path options for this Worker are resolved + relative to. This path is itself resolved relative to the `rootPath` from + `SharedOptions` if multiple workers are specified. Defaults to the current + working directory. + +- `script?: string` + + JavaScript code for this worker. If this is a service worker format Worker, it + must not have any imports. If this is a modules format Worker, it must not + have any _npm_ imports, and `modules: true` must be set. If it does have + imports, `scriptPath` must also be set so Miniflare knows where to resolve + them relative to. + +- `scriptPath?: string` + + Path of JavaScript entrypoint. If this is a service worker format Worker, it + must not have any imports. If this is a modules format Worker, it must not + have any _npm_ imports, and `modules: true` must be set. + +- `modules?: boolean | ModuleDefinition[]` + + - If `true`, Miniflare will treat `script`/`scriptPath` as an ES Module and + automatically locate transitive module dependencies according to + `modulesRules`. Note that automatic location is not perfect: if the + specifier to a dynamic `import()` or `require()` is not a string literal, an + exception will be thrown. + + - If set to an array, modules can be defined manually. Transitive dependencies + must also be defined. Note the first module must be the entrypoint and have + type `"ESModule"`. + +- `modulesRoot?: string` + + If `modules` is set to `true` or an array, modules' "name"s will be their + `path`s relative to this value. This ensures file paths in stack traces are + correct. + + + + +- `modulesRules?: ModuleRule[]` + + Rules for identifying the `ModuleRuleType` of automatically located modules + when `modules: true` is set. Note the following default rules are always + included at the end: + + ```js + [ + { type: "ESModule", include: ["**/*.mjs"] }, + { type: "CommonJS", include: ["**/*.js", "**/*.cjs"] }, + ] + ``` + + > If `script` and `scriptPath` are set, and `modules` is set to an array, + > `modules` takes priority for a Worker's code, followed by `script`, then + > `scriptPath`. + + + +- `compatibilityDate?: string` + + [Compatibility date](https://developers.cloudflare.com/workers/platform/compatibility-dates/) + to use for this Worker. Defaults to a date far in the past. + +- `compatibilityFlags?: string[]` + + [Compatibility flags](https://developers.cloudflare.com/workers/platform/compatibility-dates/) + to use for this Worker. + +- `bindings?: Record` + + Record mapping binding name to arbitrary JSON-serialisable values to inject as + bindings into this Worker. + +- `wasmBindings?: Record` + + Record mapping binding name to paths containing binary WebAssembly module data + to inject as `WebAssembly.Module` bindings into this Worker. + +- `textBlobBindings?: Record` + + Record mapping binding name to paths containing UTF8-encoded data to inject as + `string` bindings into this Worker. + +- `dataBlobBindings?: Record` + + Record mapping binding name to paths containing arbitrary binary data to + inject as `ArrayBuffer` bindings into this Worker. + +- `serviceBindings?: Record Awaitable>` + + Record mapping binding name to service designators to inject as + `{ fetch: typeof fetch }` + [service bindings](https://developers.cloudflare.com/workers/platform/bindings/about-service-bindings/) + into this Worker. + + - If the designator is a `string`, requests will be dispatched to the Worker + with that `name`. + - If the designator is `(await import("miniflare")).kCurrentWorker`, requests + will be dispatched to the Worker defining the binding. + - If the designator is an object of the form `{ name: ..., entrypoint: ... }`, + requests will be dispatched to the entrypoint named `entrypoint` in the + Worker named `name`. The `entrypoint` defaults to `default`, meaning + `{ name: "a" }` is the same as `"a"`. If `name` is + `(await import("miniflare")).kCurrentWorker`, requests will be dispatched to + the Worker defining the binding. + - If the designator is an object of the form `{ network: { ... } }`, where + `network` is a + [`workerd` `Network` struct](https://github.com/cloudflare/workerd/blob/bdbd6075c7c53948050c52d22f2dfa37bf376253/src/workerd/server/workerd.capnp#L555-L598), + requests will be dispatched according to the `fetch`ed URL. + - If the designator is an object of the form `{ external: { ... } }` where + `external` is a + [`workerd` `ExternalServer` struct](https://github.com/cloudflare/workerd/blob/bdbd6075c7c53948050c52d22f2dfa37bf376253/src/workerd/server/workerd.capnp#L504-L553), + requests will be dispatched to the specified remote server. + - If the designator is an object of the form `{ disk: { ... } }` where `disk` + is a + [`workerd` `DiskDirectory` struct](https://github.com/cloudflare/workerd/blob/bdbd6075c7c53948050c52d22f2dfa37bf376253/src/workerd/server/workerd.capnp#L600-L643), + requests will be dispatched to an HTTP service backed by an on-disk + directory. + - If the designator is a function, requests will be dispatched to your custom + handler. This allows you to access data and functions defined in Node.js + from your Worker. Note `instance` will be the `Miniflare` instance + dispatching the request. + + + +- `wrappedBindings?: Record }>` + + Record mapping binding name to designators to inject as + [wrapped bindings](https://github.com/cloudflare/workerd/blob/bfcef2d850514c569c039cb84c43bc046af4ffb9/src/workerd/server/workerd.capnp#L469-L487) into this Worker. + Wrapped bindings allow custom bindings to be written as JavaScript functions + accepting an `env` parameter of "inner bindings" and returning the value to + bind. A `string` designator is equivalent to `{ scriptName: }`. + `scriptName`'s bindings will be used as "inner bindings". JSON `bindings` in + the `designator` also become "inner bindings" and will override any of + `scriptName` bindings with the same name. The Worker named `scriptName`... + + - Must define a single `ESModule` as its source, using + `{ modules: true, script: "..." }`, `{ modules: true, scriptPath: "..." }`, + or `{ modules: [...] }` + - Must provide the function to use for the wrapped binding as an `entrypoint` + named export or a default export if `entrypoint` is omitted + - Must not be the first/entrypoint worker + - Must not be bound to with service or Durable Object bindings + - Must not define `compatibilityDate` or `compatibilityFlags` + - Must not define `outboundService` + - Must not directly or indirectly have a wrapped binding to itself + - Must not be used as an argument to `Miniflare#getWorker()` + +
+ Wrapped Bindings Example + + ```ts + import { Miniflare } from "miniflare"; + const store = new Map(); + const mf = new Miniflare({ + workers: [ + { + wrappedBindings: { + MINI_KV: { + scriptName: "mini-kv", // Use Worker named `mini-kv` for implementation + bindings: { NAMESPACE: "ns" }, // Override `NAMESPACE` inner binding + }, + }, + modules: true, + script: `export default { + async fetch(request, env, ctx) { + // Example usage of wrapped binding + await env.MINI_KV.set("key", "value"); + return new Response(await env.MINI_KV.get("key")); + } + }`, + }, + { + name: "mini-kv", + serviceBindings: { + // Function-valued service binding for accessing Node.js state + async STORE(request) { + const { pathname } = new URL(request.url); + const key = pathname.substring(1); + if (request.method === "GET") { + const value = store.get(key); + const status = value === undefined ? 404 : 200; + return new Response(value ?? null, { status }); + } else if (request.method === "PUT") { + const value = await request.text(); + store.set(key, value); + return new Response(null, { status: 204 }); + } else if (request.method === "DELETE") { + store.delete(key); + return new Response(null, { status: 204 }); + } else { + return new Response(null, { status: 405 }); + } + }, + }, + modules: true, + script: ` + // Implementation of binding + class MiniKV { + constructor(env) { + this.STORE = env.STORE; + this.baseURL = "http://x/" + (env.NAMESPACE ?? "") + ":"; + } + async get(key) { + const res = await this.STORE.fetch(this.baseURL + key); + return res.status === 404 ? null : await res.text(); + } + async set(key, body) { + await this.STORE.fetch(this.baseURL + key, { method: "PUT", body }); + } + async delete(key) { + await this.STORE.fetch(this.baseURL + key, { method: "DELETE" }); + } + } + + // env has the type { STORE: Fetcher, NAMESPACE?: string } + export default function (env) { + return new MiniKV(env); + } + `, + }, + ], + }); + ``` + +
+ + > :warning: `wrappedBindings` are only supported in modules format Workers. + + + +- `outboundService?: string | { network: Network } | { external: ExternalServer } | { disk: DiskDirectory } | (request: Request) => Awaitable` + + Dispatch this Worker's global `fetch()` and `connect()` requests to the + configured service. Service designators follow the same rules above for + `serviceBindings`. + +- `fetchMock?: import("undici").MockAgent` + + An [`undici` `MockAgent`](https://undici.nodejs.org/#/docs/api/MockAgent) to + dispatch this Worker's global `fetch()` requests through. + + > :warning: `outboundService` and `fetchMock` are mutually exclusive options. + > At most one of them may be specified per Worker. + +- `routes?: string[]` + + Array of route patterns for this Worker. These follow the same + [routing rules](https://developers.cloudflare.com/workers/platform/triggers/routes/#matching-behavior) + as deployed Workers. If no routes match, Miniflare will fallback to the Worker + defined first. + +#### Cache + +- `cache?: boolean` + + If `false`, default and named caches will be disabled. The Cache API will + still be available, it just won't cache anything. + +- `cacheWarnUsage?: boolean` + + If `true`, the first use of the Cache API will log a warning stating that the + Cache API is unsupported on `workers.dev` subdomains. + +#### Durable Objects + +- `durableObjects?: Record` + + Record mapping binding name to Durable Object class designators to inject as + `DurableObjectNamespace` bindings into this Worker. + + - If the designator is a `string`, it should be the name of a `class` exported + by this Worker. + - If the designator is an object, and `scriptName` is `undefined`, `className` + should be the name of a `class` exported by this Worker. + - Otherwise, `className` should be the name of a `class` exported by the + Worker with a `name` of `scriptName`. + +#### KV + +- `kvNamespaces?: Record | string[]` + + Record mapping binding name to KV namespace IDs to inject as `KVNamespace` + bindings into this Worker. Different Workers may bind to the same namespace ID + with different binding names. If a `string[]` of binding names is specified, + the binding name and KV namespace ID are assumed to be the same. + +- `sitePath?: string` + + Path to serve Workers Sites files from. If set, `__STATIC_CONTENT` and + `__STATIC_CONTENT_MANIFEST` bindings will be injected into this Worker. In + modules mode, `__STATIC_CONTENT_MANIFEST` will also be exposed as a module + with a `string`-typed `default` export, containing the JSON-stringified + manifest. Note Workers Sites files are never cached in Miniflare. + +- `siteInclude?: string[]` + + If set, only files with paths matching these glob patterns will be served. + +- `siteExclude?: string[]` + + If set, only files with paths _not_ matching these glob patterns will be + served. + + - `assetsPath?: string` + + Path to serve Workers assets from. + + - `assetsKVBindingName?: string` + Name of the binding to the KV namespace that the assets are in. If `assetsPath` is set, this binding will be injected into this Worker. + + - `assetsManifestBindingName?: string` + Name of the binding to an `ArrayBuffer` containing the binary-encoded assets manifest. If `assetsPath` is set, this binding will be injected into this Worker. + +#### R2 + +- `r2Buckets?: Record | string[]` + + Record mapping binding name to R2 bucket names to inject as `R2Bucket` + bindings into this Worker. Different Workers may bind to the same bucket name + with different binding names. If a `string[]` of binding names is specified, + the binding name and bucket name are assumed to be the same. + +#### D1 + +- `d1Databases?: Record | string[]` + + Record mapping binding name to D1 database IDs to inject as `D1Database` + bindings into this Worker. Note binding names starting with `__D1_BETA__` are + injected as `Fetcher` bindings instead, and must be wrapped with a facade to + provide the expected `D1Database` API. Different Workers may bind to the same + database ID with different binding names. If a `string[]` of binding names is + specified, the binding name and database ID are assumed to be the same. + +#### Queues + +- `queueProducers?: Record | string[]` + + Record mapping binding name to queue options to inject as `WorkerQueue` bindings + into this Worker. Different Workers may bind to the same queue name with + different binding names. If a `string[]` of binding names is specified, the + binding name and queue name (part of the queue options) are assumed to be the same. + +- `queueConsumers?: Record | string[]` + + Record mapping queue name to consumer options. Messages enqueued on the + corresponding queues will be dispatched to this Worker. Note each queue can + have at most one consumer. If a `string[]` of queue names is specified, + default consumer options will be used. + +#### Assets + +- `directory?: string` + Path to serve Workers static asset files from. + +- `binding?: string` + Binding name to inject as a `Fetcher` binding to allow access to static assets from within the Worker. + +- `assetOptions?: { html_handling?: HTMLHandlingOptions, not_found_handling?: NotFoundHandlingOptions}` + Configuration for file-based asset routing - see [docs](https://developers.cloudflare.com/workers/static-assets/routing/#routing-configuration) for options + +#### Pipelines + +- `pipelines?: Record | string[]` + + Record mapping binding name to a Pipeline. Different workers may bind to the same Pipeline with different bindings + names. If a `string[]` of pipeline names, the binding and Pipeline name are assumed to be the same. + +#### Workflows + +- `workflows?: WorkflowOptions[]` + Configuration for one or more Workflows in your project. + +#### Analytics Engine, Sending Email, Vectorize and Workers for Platforms + +_Not yet supported_ + +If you need support for these locally, consider using the `wrappedBindings` +option to mock them out. + +#### Browser Rendering and Workers AI + +_Not yet supported_ + +If you need support for these locally, consider using the `serviceBindings` +option to mock them out. + +### `interface SharedOptions` + +Options shared between all Workers/"nanoservices". + +#### Core + +- `rootPath?: string` + + Path against which all other path options for this instance are resolved + relative to. Defaults to the current working directory. + +- `host?: string` + + Hostname that the `workerd` server should listen on. Defaults to `127.0.0.1`. + +- `port?: number` + + Port that the `workerd` server should listen on. Tries to default to `8787`, + but falls back to a random free port if this is in use. Note if a manually + specified port is in use, Miniflare throws an error, rather than attempting to + find a free port. + +- `https?: boolean` + + If `true`, start an HTTPS server using a pre-generated self-signed certificate + for `localhost`. Note this certificate is not valid for any other hostnames or + IP addresses. If you need to access the HTTPS server from another device, + you'll need to generate your own certificate and use the other `https*` + options below. + + ```shell + $ openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out cert.pem + ``` + + ```js + new Miniflare({ + httpsKeyPath: "key.pem", + httpsCertPath: "cert.pem", + }); + ``` + +- `httpsKey?: string` + + When one of `httpsCert` or `httpCertPath` is also specified, starts an HTTPS + server using the value of this option as the PEM encoded private key. + +- `httpsKeyPath?: string` + + When one of `httpsCert` or `httpCertPath` is also specified, starts an HTTPS + server using the PEM encoded private key stored at this file path. + +- `httpsCert?: string` + + When one of `httpsKey` or `httpsKeyPath` is also specified, starts an HTTPS + server using the value of this option as the PEM encoded certificate chain. + +- `httpsCertPath?: string` + + When one of `httpsKey` or `httpsKeyPath` is also specified, starts an HTTPS + server using the PEM encoded certificate chain stored at this file path. + +- `inspectorPort?: number` + + Port that `workerd` should start a DevTools inspector server on. Visit + `chrome://inspect` in a Chromium-based browser to connect to this. This can be + used to see detailed `console.log`s, profile CPU usage, and will eventually + allow step-through debugging. + +- `verbose?: boolean` + + Enable `workerd`'s `--verbose` flag for verbose logging. This can be used to + see simplified `console.log`s. + +- `log?: Log` + + Logger implementation for Miniflare's errors, warnings and informative + messages. + +- `upstream?: string` + + URL to use as the origin for incoming requests. If specified, all incoming + `request.url`s will be rewritten to start with this string. This is especially + useful when testing Workers that act as a proxy, and not as origins + themselves. + +- `cf?: boolean | string | Record` + + Controls the object returned from incoming `Request`'s `cf` property. + + - If set to a falsy value, an object with default placeholder values will be + used + - If set to an object, that object will be used + - If set to `true`, a real `cf` object will be fetched from a trusted + Cloudflare endpoint and cached in `node_modules/.mf` for 30 days + - If set to a `string`, a real `cf` object will be fetched and cached at the + provided path for 30 days + +- `liveReload?: boolean` + + If `true`, Miniflare will inject a script into HTML responses that + automatically reloads the page in-browser whenever the Miniflare instance's + options are updated. + +#### Cache, Durable Objects, KV, R2 and D1 + +- `cachePersist?: Persistence` + + Where to persist data cached in default or named caches. See docs for + `Persistence`. + +- `durableObjectsPersist?: Persistence` + + Where to persist data stored in Durable Objects. See docs for `Persistence`. + +- `kvPersist?: Persistence` + + Where to persist data stored in KV namespaces. See docs for `Persistence`. + +- `r2Persist?: Persistence` + + Where to persist data stored in R2 buckets. See docs for `Persistence`. + +- `d1Persist?: Persistence` + + Where to persist data stored in D1 databases. See docs for `Persistence`. + +- `workflowsPersist?: Persistence` + +Where to persist data stored in Workflows. See docs for `Persistence`. + +#### Analytics Engine, Browser Rendering, Sending Email, Vectorize, Workers AI and Workers for Platforms + +_Not yet supported_ + +### `type MiniflareOptions` + +`SharedOptions & (WorkerOptions | { workers: WorkerOptions[] })` + +Miniflare accepts either a single Worker configuration or multiple Worker +configurations in the `workers` array. When specifying an array of Workers, the +first Worker is designated the entrypoint and will receive all incoming HTTP +requests. Some options are shared between all workers and should always be +defined at the top-level. + +### `class Miniflare` + +- `constructor(opts: MiniflareOptions)` + + Creates a Miniflare instance and starts a new `workerd` server. Note unlike + Miniflare 2, Miniflare 3 _always_ starts a HTTP server listening on the + configured `host` and `port`: there are no `createServer`/`startServer` + functions. + +- `setOptions(opts: MiniflareOptions)` + + Updates the configuration for this Miniflare instance and restarts the + `workerd` server. Note unlike Miniflare 2, this does _not_ merge the new + configuration with the old configuration. Note that calling this function will + invalidate any existing values returned by the `Miniflare#get*()` methods, + preventing them from being used. + +- `ready: Promise` + + Returns a `Promise` that resolves with a `http` `URL` to the `workerd` server + once it has started and is able to accept requests. + +- `dispatchFetch(input: RequestInfo, init?: RequestInit): Promise` + + Sends a HTTP request to the `workerd` server, dispatching a `fetch` event in + the entrypoint Worker. Returns a `Promise` that resolves with the response. + Note that this implicitly waits for the `ready` `Promise` to resolve, there's + no need to do that yourself first. Additionally, the host of the request's URL + is always ignored and replaced with the `workerd` server's. + +- `getBindings = Record>(workerName?: string): Promise` + + Returns a `Promise` that resolves with a record mapping binding names to + bindings, for all bindings in the Worker with the specified `workerName`. If + `workerName` is not specified, defaults to the entrypoint Worker. + +- `getWorker(workerName?: string): Promise` + + Returns a `Promise` that resolves with a + [`Fetcher`](https://workers-types.pages.dev/experimental/#Fetcher) pointing to + the specified `workerName`. If `workerName` is not specified, defaults to the + entrypoint Worker. Note this `Fetcher` uses the experimental + [`service_binding_extra_handlers`](https://github.com/cloudflare/workerd/blob/1d9158af7ca1389474982c76ace9e248320bec77/src/workerd/io/compatibility-date.capnp#L290-L297) + compatibility flag to expose + [`scheduled()`](https://workers-types.pages.dev/experimental/#Fetcher.scheduled) + and [`queue()`](https://workers-types.pages.dev/experimental/#Fetcher.queue) + methods for dispatching `scheduled` and `queue` events. + +- `getCaches(): Promise` + + Returns a `Promise` that resolves with the + [`CacheStorage`](https://developers.cloudflare.com/workers/runtime-apis/cache/) + instance of the entrypoint Worker. This means if `cache: false` is set on the + entrypoint, calling methods on the resolved value won't do anything. + +- `getD1Database(bindingName: string, workerName?: string): Promise` + + Returns a `Promise` that resolves with the + [`D1Database`](https://developers.cloudflare.com/d1/platform/client-api/) + instance corresponding to the specified `bindingName` of `workerName`. Note + `bindingName` must not begin with `__D1_BETA__`. If `workerName` is not + specified, defaults to the entrypoint Worker. + +- `getDurableObjectNamespace(bindingName: string, workerName?: string): Promise` + + Returns a `Promise` that resolves with the + [`DurableObjectNamespace`](https://developers.cloudflare.com/workers/runtime-apis/durable-objects/#access-a-durable-object-from-a-worker) + instance corresponding to the specified `bindingName` of `workerName`. If + `workerName` is not specified, defaults to the entrypoint Worker. + +- `getKVNamespace(bindingName: string, workerName?: string): Promise` + + Returns a `Promise` that resolves with the + [`KVNamespace`](https://developers.cloudflare.com/workers/runtime-apis/kv/) + instance corresponding to the specified `bindingName` of `workerName`. If + `workerName` is not specified, defaults to the entrypoint Worker. + +- `getQueueProducer(bindingName: string, workerName?: string): Promise>` + + Returns a `Promise` that resolves with the + [`Queue`](https://developers.cloudflare.com/queues/platform/javascript-apis/) + producer instance corresponding to the specified `bindingName` of + `workerName`. If `workerName` is not specified, defaults to the entrypoint + Worker. + +- `getR2Bucket(bindingName: string, workerName?: string): Promise` + + Returns a `Promise` that resolves with the + [`R2Bucket`](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) + producer instance corresponding to the specified `bindingName` of + `workerName`. If `workerName` is not specified, defaults to the entrypoint + Worker. + +- `dispose(): Promise` + + Cleans up the Miniflare instance, and shuts down the `workerd` server. Note + that after this is called, `Miniflare#setOptions()` and + `Miniflare#dispatchFetch()` cannot be called. Additionally, calling this + function will invalidate any values returned by the `Miniflare#get*()` + methods, preventing them from being used. + +- `getCf(): Promise>` + + Returns the same object returned from incoming `Request`'s `cf` property. This + object depends on the `cf` property from `SharedOptions`. + +## Configuration + +### Local `workerd` + +You can override the `workerd` binary being used by miniflare with a your own local build by setting the `MINIFLARE_WORKERD_PATH` environment variable. + +For example: + +```shell +$ export MINIFLARE_WORKERD_PATH="/bazel-bin/src/workerd/server/workerd" +``` diff --git a/node_modules/miniflare/bootstrap.js b/node_modules/miniflare/bootstrap.js new file mode 100755 index 0000000..a5e8826 --- /dev/null +++ b/node_modules/miniflare/bootstrap.js @@ -0,0 +1,11 @@ +#!/usr/bin/env node +const { Log } = require("."); + +const log = new Log(); +log.error( + [ + "`miniflare@3` no longer includes a CLI. Please use `npx wrangler dev` instead.", + "As of `wrangler@3`, this will use Miniflare by default.", + "See https://miniflare.dev/get-started/migrating for more details.", + ].join("\n") +); diff --git a/node_modules/miniflare/dist/src/index.d.ts b/node_modules/miniflare/dist/src/index.d.ts new file mode 100644 index 0000000..9a16319 --- /dev/null +++ b/node_modules/miniflare/dist/src/index.d.ts @@ -0,0 +1,5059 @@ +import { Abortable } from 'events'; +import type { AbortSignal as AbortSignal_2 } from '@cloudflare/workers-types/experimental'; +import { Awaitable as Awaitable_2 } from '..'; +import type { Blob as Blob_2 } from '@cloudflare/workers-types/experimental'; +import { Blob as Blob_3 } from 'buffer'; +import { BodyInit } from 'undici'; +import type { CacheStorage } from '@cloudflare/workers-types/experimental'; +import { cspotcodeSourceMapSupport } from '@cspotcode/source-map-support'; +import type { D1Database } from '@cloudflare/workers-types/experimental'; +import type { DurableObjectNamespace } from '@cloudflare/workers-types/experimental'; +import { ExternalServer as ExternalServer_2 } from '../..'; +import { ExternalServer as ExternalServer_3 } from '..'; +import type { Fetcher } from '@cloudflare/workers-types/experimental'; +import { File } from 'undici'; +import type { File as File_2 } from '@cloudflare/workers-types/experimental'; +import { FormData as FormData_2 } from 'undici'; +import { Headers as Headers_2 } from 'undici'; +import type { Headers as Headers_3 } from '@cloudflare/workers-types/experimental'; +import { HeadersInit } from 'undici'; +import http from 'http'; +import { IncomingRequestCfProperties } from '@cloudflare/workers-types/experimental'; +import { Json as Json_2 } from '..'; +import { kCurrentWorker as kCurrentWorker_2 } from '..'; +import { kUnsafeEphemeralUniqueKey as kUnsafeEphemeralUniqueKey_2 } from './shared'; +import type { KVNamespace } from '@cloudflare/workers-types/experimental'; +import { Log as Log_2 } from '..'; +import { Miniflare as Miniflare_2 } from '../..'; +import { Miniflare as Miniflare_3 } from '..'; +import { MockAgent } from 'undici'; +import NodeWebSocket from 'ws'; +import { ParseParams } from 'zod'; +import { PeriodType as PeriodType_2 } from './ratelimit'; +import { Plugin as Plugin_2 } from './shared'; +import type { Queue } from '@cloudflare/workers-types/experimental'; +import type { R2Bucket } from '@cloudflare/workers-types/experimental'; +import { Readable } from 'stream'; +import type { ReadableStream as ReadableStream_2 } from '@cloudflare/workers-types/experimental'; +import { ReadableStream as ReadableStream_3 } from 'stream/web'; +import { ReferrerPolicy } from 'undici'; +import { Request as Request_3 } from '../..'; +import { Request as Request_4 } from 'undici'; +import type { Request as Request_5 } from '@cloudflare/workers-types/experimental'; +import { Request as Request_6 } from '..'; +import { RequestCache } from 'undici'; +import { RequestCredentials } from 'undici'; +import { RequestDestination } from 'undici'; +import { RequestDuplex } from 'undici'; +import { RequestInfo as RequestInfo_2 } from 'undici'; +import { RequestInit as RequestInit_3 } from 'undici'; +import type { RequestInit as RequestInit_4 } from '@cloudflare/workers-types/experimental'; +import type { RequestInitCfProperties } from '@cloudflare/workers-types/experimental'; +import { RequestMode } from 'undici'; +import { RequestRedirect } from 'undici'; +import { Response as Response_3 } from '../..'; +import { Response as Response_4 } from 'undici'; +import type { Response as Response_5 } from '@cloudflare/workers-types/experimental'; +import { Response as Response_6 } from '..'; +import { ResponseInit as ResponseInit_3 } from 'undici'; +import { ResponseRedirectStatus } from 'undici'; +import { ResponseType } from 'undici'; +import type { ServiceWorkerGlobalScope } from '@cloudflare/workers-types/experimental'; +import { compatibilityDate as supportedCompatibilityDate } from 'workerd'; +import { Transform } from 'stream'; +import * as undici from 'undici'; +import { URL as URL_2 } from 'url'; +import { z } from 'zod'; + +export declare class __MiniflareFunctionWrapper { + constructor(fnWithProps: ((...args: unknown[]) => unknown) & { + [key: string | symbol]: unknown; + }); +} + +export declare type AnyHeaders = http.IncomingHttpHeaders | string[]; + +export declare type AssetReverseMap = { + [pathHash: string]: { + filePath: string; + contentType: string | null; + }; +}; + +export declare const ASSETS_PLUGIN: Plugin; + +export declare const AssetsOptionsSchema: z.ZodObject<{ + assets: z.ZodOptional; + directory: z.ZodEffects; + binding: z.ZodOptional; + routerConfig: z.ZodOptional; + script_id: z.ZodOptional; + invoke_user_worker_ahead_of_assets: z.ZodOptional; + has_user_worker: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + account_id?: number; + script_id?: number; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + }, { + account_id?: number; + script_id?: number; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + }>>; + assetConfig: z.ZodOptional; + script_id: z.ZodOptional; + compatibility_date: z.ZodOptional; + compatibility_flags: z.ZodOptional>; + html_handling: z.ZodOptional>; + not_found_handling: z.ZodOptional>; + redirects: z.ZodOptional; + staticRules: z.ZodRecord>; + rules: z.ZodRecord>; + }, "strip", z.ZodTypeAny, { + version?: 1; + staticRules?: Record; + rules?: Record; + }, { + version?: 1; + staticRules?: Record; + rules?: Record; + }>>; + headers: z.ZodOptional; + rules: z.ZodRecord>; + unset: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + set?: Record; + unset?: string[]; + }, { + set?: Record; + unset?: string[]; + }>>; + }, "strip", z.ZodTypeAny, { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }, { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }>>; + }, "strip", z.ZodTypeAny, { + account_id?: number; + script_id?: number; + compatibility_date?: string; + compatibility_flags?: string[]; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash"; + not_found_handling?: "none" | "single-page-application" | "404-page"; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + }; + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }; + }, { + account_id?: number; + script_id?: number; + compatibility_date?: string; + compatibility_flags?: string[]; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash"; + not_found_handling?: "none" | "single-page-application" | "404-page"; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + }; + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }; + }>>; + }, "strip", z.ZodTypeAny, { + directory: string; + workerName?: string | undefined; + binding?: string | undefined; + routerConfig?: { + account_id?: number; + script_id?: number; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + } | undefined; + assetConfig?: { + account_id?: number; + script_id?: number; + compatibility_date?: string; + compatibility_flags?: string[]; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash"; + not_found_handling?: "none" | "single-page-application" | "404-page"; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + }; + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }; + } | undefined; + }, { + directory: string; + workerName?: string | undefined; + binding?: string | undefined; + routerConfig?: { + account_id?: number; + script_id?: number; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + } | undefined; + assetConfig?: { + account_id?: number; + script_id?: number; + compatibility_date?: string; + compatibility_flags?: string[]; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash"; + not_found_handling?: "none" | "single-page-application" | "404-page"; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + }; + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }; + } | undefined; + }>>; +}, "strip", z.ZodTypeAny, { + assets?: { + directory: string; + workerName?: string | undefined; + binding?: string | undefined; + routerConfig?: { + account_id?: number; + script_id?: number; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + } | undefined; + assetConfig?: { + account_id?: number; + script_id?: number; + compatibility_date?: string; + compatibility_flags?: string[]; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash"; + not_found_handling?: "none" | "single-page-application" | "404-page"; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + }; + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }; + } | undefined; + } | undefined; +}, { + assets?: { + directory: string; + workerName?: string | undefined; + binding?: string | undefined; + routerConfig?: { + account_id?: number; + script_id?: number; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + } | undefined; + assetConfig?: { + account_id?: number; + script_id?: number; + compatibility_date?: string; + compatibility_flags?: string[]; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash"; + not_found_handling?: "none" | "single-page-application" | "404-page"; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + }; + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }; + } | undefined; + } | undefined; +}>; + +export declare type Awaitable = T | Promise; + +export declare function base64Decode(encoded: string): string; + +export declare function base64Encode(value: string): string; + +export { BodyInit } + +/** + * The Asset Manifest and Asset Reverse Map are used to map a request path to an asset. + * 1. Hash path of request + * 2. Use this path hash to find the manifest entry + * 3. Get content hash from manifest entry + * 4a. In prod, use content hash to get asset from KV + * 4b. In dev, we fake out the KV store and use the file system instead. + * Use content hash to get file path from asset reverse map. + */ +export declare const buildAssetManifest: (dir: string) => Promise<{ + encodedAssetManifest: Uint8Array; + assetsReverseMap: AssetReverseMap; +}>; + +export declare const CACHE_PLUGIN: Plugin; + +export declare const CACHE_PLUGIN_NAME = "cache"; + +export declare const CacheBindings: { + readonly MAYBE_JSON_CACHE_WARN_USAGE: "MINIFLARE_CACHE_WARN_USAGE"; +}; + +export declare const CacheHeaders: { + readonly NAMESPACE: "cf-cache-namespace"; + readonly STATUS: "cf-cache-status"; +}; + +export declare interface CacheObjectCf { + miniflare?: { + cacheWarnUsage?: boolean; + }; +} + +export declare const CacheOptionsSchema: z.ZodObject<{ + cache: z.ZodOptional; + cacheWarnUsage: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + cache?: boolean | undefined; + cacheWarnUsage?: boolean | undefined; +}, { + cache?: boolean | undefined; + cacheWarnUsage?: boolean | undefined; +}>; + +export declare const CacheSharedOptionsSchema: z.ZodObject<{ + cachePersist: z.ZodOptional]>>; +}, "strip", z.ZodTypeAny, { + cachePersist?: string | boolean | undefined; +}, { + cachePersist?: string | boolean | undefined; +}>; + +export declare class CloseEvent extends Event { + readonly code: number; + readonly reason: string; + readonly wasClean: boolean; + constructor(type: "close", init?: { + code?: number; + reason?: string; + wasClean?: boolean; + }); +} + +export declare interface CompiledModuleRule { + type: ModuleRuleType; + include: MatcherRegExps; +} + +export declare function compileModuleRules(rules: ModuleRule[]): CompiledModuleRule[]; + +export declare interface Config { + services?: Service[]; + sockets?: Socket[]; + v8Flags?: string[]; + extensions?: Extension[]; + autogates?: string[]; +} + +export declare const CORE_PLUGIN: Plugin; + +export declare const CORE_PLUGIN_NAME = "core"; + +export declare const CoreBindings: { + readonly SERVICE_LOOPBACK: "MINIFLARE_LOOPBACK"; + readonly SERVICE_USER_ROUTE_PREFIX: "MINIFLARE_USER_ROUTE_"; + readonly SERVICE_USER_FALLBACK: "MINIFLARE_USER_FALLBACK"; + readonly TEXT_CUSTOM_SERVICE: "MINIFLARE_CUSTOM_SERVICE"; + readonly TEXT_UPSTREAM_URL: "MINIFLARE_UPSTREAM_URL"; + readonly JSON_CF_BLOB: "CF_BLOB"; + readonly JSON_ROUTES: "MINIFLARE_ROUTES"; + readonly JSON_LOG_LEVEL: "MINIFLARE_LOG_LEVEL"; + readonly DATA_LIVE_RELOAD_SCRIPT: "MINIFLARE_LIVE_RELOAD_SCRIPT"; + readonly DURABLE_OBJECT_NAMESPACE_PROXY: "MINIFLARE_PROXY"; + readonly DATA_PROXY_SECRET: "MINIFLARE_PROXY_SECRET"; + readonly DATA_PROXY_SHARED_SECRET: "MINIFLARE_PROXY_SHARED_SECRET"; +}; + +export declare const CoreHeaders: { + readonly CUSTOM_SERVICE: "MF-Custom-Service"; + readonly ORIGINAL_URL: "MF-Original-URL"; + readonly PROXY_SHARED_SECRET: "MF-Proxy-Shared-Secret"; + readonly DISABLE_PRETTY_ERROR: "MF-Disable-Pretty-Error"; + readonly ERROR_STACK: "MF-Experimental-Error-Stack"; + readonly ROUTE_OVERRIDE: "MF-Route-Override"; + readonly CF_BLOB: "MF-CF-Blob"; + readonly OP_SECRET: "MF-Op-Secret"; + readonly OP: "MF-Op"; + readonly OP_TARGET: "MF-Op-Target"; + readonly OP_KEY: "MF-Op-Key"; + readonly OP_SYNC: "MF-Op-Sync"; + readonly OP_STRINGIFIED_SIZE: "MF-Op-Stringified-Size"; + readonly OP_RESULT_TYPE: "MF-Op-Result-Type"; +}; + +export declare const CoreOptionsSchema: z.ZodEffects; + path: z.ZodEffects; + contents: z.ZodOptional, z.ZodTypeDef, Uint8Array>]>>; + }, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }>, "many">; + modulesRoot: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + modules: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; +}, { + modules: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; +}>, z.ZodObject<{ + script: z.ZodString; + scriptPath: z.ZodOptional>; + modules: z.ZodOptional; + modulesRules: z.ZodOptional; + include: z.ZodArray; + fallthrough: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }>, "many">>; + modulesRoot: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +}, { + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +}>, z.ZodObject<{ + scriptPath: z.ZodEffects; + modules: z.ZodOptional; + modulesRules: z.ZodOptional; + include: z.ZodArray; + fallthrough: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }>, "many">>; + modulesRoot: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +}, { + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +}>]>, z.ZodObject<{ + name: z.ZodOptional; + rootPath: z.ZodOptional>; + compatibilityDate: z.ZodOptional; + compatibilityFlags: z.ZodOptional>; + unsafeInspectorProxy: z.ZodOptional; + routes: z.ZodOptional>; + bindings: z.ZodOptional>>; + wasmBindings: z.ZodOptional, z.ZodType, z.ZodTypeDef, Uint8Array>]>>>; + textBlobBindings: z.ZodOptional>>; + dataBlobBindings: z.ZodOptional, z.ZodType, z.ZodTypeDef, Uint8Array>]>>>; + serviceBindings: z.ZodOptional, z.ZodObject<{ + name: z.ZodUnion<[z.ZodString, z.ZodLiteral]>; + entrypoint: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + }, { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + }>, z.ZodObject<{ + network: z.ZodObject<{ + allow: z.ZodOptional>; + deny: z.ZodOptional>; + tlsOptions: z.ZodOptional; + certificateChain: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }>>; + requireClientCerts: z.ZodOptional; + trustBrowserCas: z.ZodOptional; + trustedCertificates: z.ZodOptional>; + minVersion: z.ZodOptional>; + cipherList: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }>>; + }, "strip", z.ZodTypeAny, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }>; + }, "strip", z.ZodTypeAny, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }>, z.ZodObject<{ + external: z.ZodType; + }, "strip", z.ZodTypeAny, { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + }, { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + }>, z.ZodObject<{ + disk: z.ZodObject<{ + path: z.ZodString; + writable: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + path: string; + writable?: boolean | undefined; + }, { + path: string; + writable?: boolean | undefined; + }>; + }, "strip", z.ZodTypeAny, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }>, z.ZodType<(request: Request_3, mf: Miniflare_2) => Awaitable, z.ZodTypeDef, (request: Request_3, mf: Miniflare_2) => Awaitable>]>>>; + wrappedBindings: z.ZodOptional; + bindings: z.ZodOptional>>; + }, "strip", z.ZodTypeAny, { + scriptName: string; + entrypoint?: string | undefined; + bindings?: Record | undefined; + }, { + scriptName: string; + entrypoint?: string | undefined; + bindings?: Record | undefined; + }>]>>>; + outboundService: z.ZodOptional, z.ZodObject<{ + name: z.ZodUnion<[z.ZodString, z.ZodLiteral]>; + entrypoint: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + }, { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + }>, z.ZodObject<{ + network: z.ZodObject<{ + allow: z.ZodOptional>; + deny: z.ZodOptional>; + tlsOptions: z.ZodOptional; + certificateChain: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }>>; + requireClientCerts: z.ZodOptional; + trustBrowserCas: z.ZodOptional; + trustedCertificates: z.ZodOptional>; + minVersion: z.ZodOptional>; + cipherList: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }>>; + }, "strip", z.ZodTypeAny, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }>; + }, "strip", z.ZodTypeAny, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }>, z.ZodObject<{ + external: z.ZodType; + }, "strip", z.ZodTypeAny, { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + }, { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + }>, z.ZodObject<{ + disk: z.ZodObject<{ + path: z.ZodString; + writable: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + path: string; + writable?: boolean | undefined; + }, { + path: string; + writable?: boolean | undefined; + }>; + }, "strip", z.ZodTypeAny, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }>, z.ZodType<(request: Request_3, mf: Miniflare_2) => Awaitable, z.ZodTypeDef, (request: Request_3, mf: Miniflare_2) => Awaitable>]>>; + fetchMock: z.ZodOptional, z.ZodTypeDef, MockAgent>>; + unsafeEphemeralDurableObjects: z.ZodOptional; + unsafeDirectSockets: z.ZodOptional; + port: z.ZodOptional; + entrypoint: z.ZodOptional; + proxy: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }, { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }>, "many">>; + unsafeEvalBinding: z.ZodOptional; + unsafeUseModuleFallbackService: z.ZodOptional; + /** Used to set the vitest pool worker SELF binding to point to the Router Worker if there are assets. + (If there are assets but we're not using vitest, the miniflare entry worker can point directly to + Router Worker) + */ + hasAssetsAndIsVitest: z.ZodOptional; + unsafeEnableAssetsRpc: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + name?: string | undefined; + rootPath?: undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record Awaitable)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | typeof kCurrentWorker | { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + unsafeEnableAssetsRpc?: boolean | undefined; +}, { + name?: string | undefined; + rootPath?: string | undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record Awaitable)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | typeof kCurrentWorker | { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + unsafeEnableAssetsRpc?: boolean | undefined; +}>>, ({ + modules: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; +} & { + name?: string | undefined; + rootPath?: undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record Awaitable)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | typeof kCurrentWorker | { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + unsafeEnableAssetsRpc?: boolean | undefined; +}) | ({ + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +} & { + name?: string | undefined; + rootPath?: undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record Awaitable)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | typeof kCurrentWorker | { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + unsafeEnableAssetsRpc?: boolean | undefined; +}) | ({ + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +} & { + name?: string | undefined; + rootPath?: undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record Awaitable)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | typeof kCurrentWorker | { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + unsafeEnableAssetsRpc?: boolean | undefined; +}), ({ + modules: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; +} | { + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +} | { + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +}) & { + name?: string | undefined; + rootPath?: string | undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record Awaitable)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | typeof kCurrentWorker | { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + unsafeEnableAssetsRpc?: boolean | undefined; +}>; + +export declare const CoreSharedOptionsSchema: z.ZodObject<{ + rootPath: z.ZodOptional>; + host: z.ZodOptional; + port: z.ZodOptional; + https: z.ZodOptional; + httpsKey: z.ZodOptional; + httpsKeyPath: z.ZodOptional; + httpsCert: z.ZodOptional; + httpsCertPath: z.ZodOptional; + inspectorPort: z.ZodOptional; + verbose: z.ZodOptional; + log: z.ZodOptional>; + handleRuntimeStdio: z.ZodOptional, z.ZodType], null>, z.ZodUnknown>>; + upstream: z.ZodOptional; + cf: z.ZodOptional]>>; + liveReload: z.ZodOptional; + unsafeProxySharedSecret: z.ZodOptional; + unsafeModuleFallbackService: z.ZodOptional Awaitable, z.ZodTypeDef, (request: Request_3, mf: Miniflare_2) => Awaitable>>; + unsafeStickyBlobs: z.ZodOptional; + unsafeEnableAssetsRpc: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + rootPath?: undefined; + host?: string | undefined; + port?: number | undefined; + https?: boolean | undefined; + httpsKey?: string | undefined; + httpsKeyPath?: string | undefined; + httpsCert?: string | undefined; + httpsCertPath?: string | undefined; + inspectorPort?: number | undefined; + verbose?: boolean | undefined; + log?: Log | undefined; + handleRuntimeStdio?: ((args_0: Readable, args_1: Readable) => unknown) | undefined; + upstream?: string | undefined; + cf?: string | boolean | Record | undefined; + liveReload?: boolean | undefined; + unsafeProxySharedSecret?: string | undefined; + unsafeModuleFallbackService?: ((request: Request_3, mf: Miniflare_2) => Awaitable) | undefined; + unsafeStickyBlobs?: boolean | undefined; + unsafeEnableAssetsRpc?: boolean | undefined; +}, { + rootPath?: string | undefined; + host?: string | undefined; + port?: number | undefined; + https?: boolean | undefined; + httpsKey?: string | undefined; + httpsKeyPath?: string | undefined; + httpsCert?: string | undefined; + httpsCertPath?: string | undefined; + inspectorPort?: number | undefined; + verbose?: boolean | undefined; + log?: Log | undefined; + handleRuntimeStdio?: ((args_0: Readable, args_1: Readable) => unknown) | undefined; + upstream?: string | undefined; + cf?: string | boolean | Record | undefined; + liveReload?: boolean | undefined; + unsafeProxySharedSecret?: string | undefined; + unsafeModuleFallbackService?: ((request: Request_3, mf: Miniflare_2) => Awaitable) | undefined; + unsafeStickyBlobs?: boolean | undefined; + unsafeEnableAssetsRpc?: boolean | undefined; +}>; + +export declare function coupleWebSocket(ws: NodeWebSocket, pair: WebSocket): Promise; + +export declare function createFetchMock(): MockAgent; + +export declare function createHTTPReducers(impl: PlatformImpl): ReducersRevivers; + +export declare function createHTTPRevivers(impl: PlatformImpl): ReducersRevivers; + +export declare const D1_PLUGIN: Plugin; + +export declare const D1_PLUGIN_NAME = "d1"; + +export declare const D1OptionsSchema: z.ZodObject<{ + d1Databases: z.ZodOptional, z.ZodArray]>>; +}, "strip", z.ZodTypeAny, { + d1Databases?: string[] | Record | undefined; +}, { + d1Databases?: string[] | Record | undefined; +}>; + +export declare const D1SharedOptionsSchema: z.ZodObject<{ + d1Persist: z.ZodOptional]>>; +}, "strip", z.ZodTypeAny, { + d1Persist?: string | boolean | undefined; +}, { + d1Persist?: string | boolean | undefined; +}>; + +export declare function decodeSitesKey(key: string): string; + +export declare const DEFAULT_PERSIST_ROOT = ".mf"; + +export declare class DeferredPromise extends Promise { + readonly resolve: DeferredPromiseResolve; + readonly reject: DeferredPromiseReject; + constructor(executor?: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void); +} + +export declare type DeferredPromiseReject = (reason?: any) => void; + +export declare type DeferredPromiseResolve = (value: T | PromiseLike) => void; + +export declare function deserialiseRegExps(matcher: SerialisableMatcherRegExps): MatcherRegExps; + +export declare function deserialiseSiteRegExps(siteRegExps: SerialisableSiteMatcherRegExps): SiteMatcherRegExps; + +export declare interface DiskDirectory { + path?: string; + writable?: boolean; +} + +export declare type DispatchFetch = (input: RequestInfo, init?: RequestInit_2>) => Promise; + +/** + * Dispatcher created for each `dispatchFetch()` call. Ensures request origin + * in Worker matches that passed to `dispatchFetch()`, not the address the + * `workerd` server is listening on. Handles cases where `fetch()` redirects to + * same origin and different external origins. + */ +export declare class DispatchFetchDispatcher extends undici.Dispatcher { + private readonly globalDispatcher; + private readonly runtimeDispatcher; + private readonly actualRuntimeOrigin; + private readonly userRuntimeOrigin; + private readonly cfBlobJson?; + /** + * @param globalDispatcher Dispatcher to use for all non-runtime requests + * (rejects unauthorised certificates) + * @param runtimeDispatcher Dispatcher to use for runtime requests + * (permits unauthorised certificates) + * @param actualRuntimeOrigin Origin to send all runtime requests to + * @param userRuntimeOrigin Origin to treat as runtime request + * (initial URL passed by user to `dispatchFetch()`) + * @param cfBlob `request.cf` blob override for runtime requests + */ + constructor(globalDispatcher: undici.Dispatcher, runtimeDispatcher: undici.Dispatcher, actualRuntimeOrigin: string, userRuntimeOrigin: string, cfBlob?: IncomingRequestCfProperties); + addHeaders(headers: AnyHeaders, path: string): void; + dispatch(options: undici.Dispatcher.DispatchOptions, handler: undici.Dispatcher.DispatchHandlers): boolean; + close(): Promise; + close(callback: () => void): void; + destroy(): Promise; + destroy(err: Error | null): Promise; + destroy(callback: () => void): void; + destroy(err: Error | null, callback: () => void): void; + get isMockActive(): boolean; +} + +export declare const DURABLE_OBJECTS_PLUGIN: Plugin; + +export declare const DURABLE_OBJECTS_PLUGIN_NAME = "do"; + +export declare const DURABLE_OBJECTS_STORAGE_SERVICE_NAME = "do:storage"; + +export declare type DurableObjectClassNames = Map>; + +export declare const DurableObjectsOptionsSchema: z.ZodObject<{ + durableObjects: z.ZodOptional; + useSQLite: z.ZodOptional; + unsafeUniqueKey: z.ZodOptional]>>; + unsafePreventEviction: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + className: string; + scriptName?: string | undefined; + useSQLite?: boolean | undefined; + unsafeUniqueKey?: string | typeof kUnsafeEphemeralUniqueKey | undefined; + unsafePreventEviction?: boolean | undefined; + }, { + className: string; + scriptName?: string | undefined; + useSQLite?: boolean | undefined; + unsafeUniqueKey?: string | typeof kUnsafeEphemeralUniqueKey | undefined; + unsafePreventEviction?: boolean | undefined; + }>]>>>; +}, "strip", z.ZodTypeAny, { + durableObjects?: Record | undefined; +}, { + durableObjects?: Record | undefined; +}>; + +export declare const DurableObjectsSharedOptionsSchema: z.ZodObject<{ + durableObjectsPersist: z.ZodOptional]>>; +}, "strip", z.ZodTypeAny, { + durableObjectsPersist?: string | boolean | undefined; +}, { + durableObjectsPersist?: string | boolean | undefined; +}>; + +/* Excluded from this release type: _enableControlEndpoints */ + +export declare function encodeSitesKey(key: string): string; + +export declare class ErrorEvent extends Event { + readonly error: Error | null; + constructor(type: "error", init?: { + error?: Error; + }); +} + +export declare interface Extension { + modules?: Extension_Module[]; +} + +export declare interface Extension_Module { + name?: string; + internal?: boolean; + esModule?: string; +} + +export declare type ExternalServer = { + address?: string; +} & ({ + http: HttpOptions; +} | { + https: ExternalServer_Https; +} | { + tcp: ExternalServer_Tcp; +}); + +export declare interface ExternalServer_Https { + options?: HttpOptions; + tlsOptions?: TlsOptions; + certificateHost?: string; +} + +export declare interface ExternalServer_Tcp { + tlsOptions?: TlsOptions; + certificateHost?: string; +} + +declare function fetch_2(input: RequestInfo, init?: RequestInit_2 | Request_2): Promise; +export { fetch_2 as fetch } + +export { File } + +export declare function _forceColour(enabled?: boolean): void; + +export declare function formatZodError(error: z.ZodError, input: unknown): string; + +export { FormData_2 as FormData } + +export declare function getAccessibleHosts(ipv4Only?: boolean): string[]; + +export declare function getAssetsBindingsNames(assetsKVBindingName?: string, assetsManifestBindingName?: string): { + readonly ASSETS_KV_NAMESPACE: string; + readonly ASSETS_MANIFEST: string; +}; + +export declare function getCacheServiceName(workerIndex: number): string; + +export declare function getDirectSocketName(workerIndex: number, entrypoint: string): string; + +export declare function getEntrySocketHttpOptions(coreOpts: z.infer): Promise<{ + http: HttpOptions; +} | { + https: Socket_Https; +}>; + +export declare function getFreshSourceMapSupport(): cspotcodeSourceMapSupport; + +export declare function getGlobalServices({ sharedOptions, allWorkerRoutes, fallbackWorkerName, loopbackPort, log, proxyBindings, }: GlobalServicesOptions): Service[]; + +export declare function getMiniflareObjectBindings(unsafeStickyBlobs: boolean): Worker_Binding[]; + +/** + * Computes the Node.js compatibility mode we are running. + * + * NOTES: + * - The v2 mode is configured via `nodejs_compat_v2` compat flag or via `nodejs_compat` plus a compatibility date of Sept 23rd. 2024 or later. + * - See `EnvironmentInheritable` for `nodeCompat` and `noBundle`. + * + * @param compatibilityDateStr The compatibility date + * @param compatibilityFlags The compatibility flags + * @returns the mode and flags to indicate specific configuration for validating. + */ +export declare function getNodeCompat(compatibilityDate: string | undefined, // Default to some arbitrary old date +compatibilityFlags: string[]): { + mode: NodeJSCompatMode; + hasNodejsAlsFlag: boolean; + hasNodejsCompatFlag: boolean; + hasNodejsCompatV2Flag: boolean; + hasNoNodejsCompatV2Flag: boolean; + hasExperimentalNodejsCompatV2Flag: boolean; +}; + +export declare function getPersistPath(pluginName: string, tmpPath: string, persist: Persistence): string; + +export declare function getRootPath(opts: unknown): string; + +export declare interface GlobalServicesOptions { + sharedOptions: z.infer; + allWorkerRoutes: Map; + fallbackWorkerName: string | undefined; + loopbackPort: number; + log: Log; + proxyBindings: Worker_Binding[]; +} + +export declare function globsToRegExps(globs?: string[]): MatcherRegExps; + +export { Headers_2 as Headers } + +export { HeadersInit } + +export declare const HOST_CAPNP_CONNECT = "miniflare-unsafe-internal-capnp-connect"; + +export declare interface HttpOptions { + style?: HttpOptions_Style; + forwardedProtoHeader?: string; + cfBlobHeader?: string; + injectRequestHeaders?: HttpOptions_Header[]; + injectResponseHeaders?: HttpOptions_Header[]; + capnpConnectHost?: string; +} + +export declare interface HttpOptions_Header { + name?: string; + value?: string; +} + +export declare const HttpOptions_Style: { + readonly HOST: 0; + readonly PROXY: 1; +}; + +export declare type HttpOptions_Style = (typeof HttpOptions_Style)[keyof typeof HttpOptions_Style]; + +export declare const HYPERDRIVE_PLUGIN: Plugin; + +export declare const HYPERDRIVE_PLUGIN_NAME = "hyperdrive"; + +export declare const HyperdriveInputOptionsSchema: z.ZodObject<{ + hyperdrives: z.ZodOptional]>, URL_2, string | URL_2>>>; +}, "strip", z.ZodTypeAny, { + hyperdrives?: Record | undefined; +}, { + hyperdrives?: Record | undefined; +}>; + +export declare const HyperdriveSchema: z.ZodEffects]>, URL_2, string | URL_2>; + +export declare interface InclusiveRange { + start: number; + end: number; +} + +/* Excluded from this release type: _initialiseInstanceRegistry */ + +/* Excluded from this release type: _isCyclic */ + +export declare function isFetcherFetch(targetName: string, key: string): boolean; + +export declare function isR2ObjectWriteHttpMetadata(targetName: string, key: string): boolean; + +export declare function isSitesRequest(request: { + url: string; +}): boolean; + +export declare type Json = Literal | { + [key: string]: Json; +} | Json[]; + +export declare interface JsonError { + message?: string; + name?: string; + stack?: string; + cause?: JsonError; +} + +export declare const JsonSchema: z.ZodType; + +declare const kAccepted: unique symbol; + +declare const kCf: unique symbol; + +declare const kClose: unique symbol; + +declare const kClosedIncoming: unique symbol; + +declare const kClosedOutgoing: unique symbol; + +declare const kCoupled: unique symbol; + +export declare const kCurrentWorker: unique symbol; + +declare const kError: unique symbol; + +export declare const kInspectorSocket: unique symbol; + +declare const kPair: unique symbol; + +declare const kSend: unique symbol; + +export declare const kUnsafeEphemeralUniqueKey: unique symbol; + +export declare const KV_PLUGIN: Plugin; + +export declare const KV_PLUGIN_NAME = "kv"; + +export declare const KVHeaders: { + readonly EXPIRATION: "CF-Expiration"; + readonly METADATA: "CF-KV-Metadata"; +}; + +export declare const KVLimits: { + readonly MIN_CACHE_TTL: 60; + readonly MAX_LIST_KEYS: 1000; + readonly MAX_KEY_SIZE: 512; + readonly MAX_VALUE_SIZE: number; + readonly MAX_VALUE_SIZE_TEST: 1024; + readonly MAX_METADATA_SIZE: 1024; +}; + +export declare const kVoid: unique symbol; + +export declare const KVOptionsSchema: z.ZodObject<{ + kvNamespaces: z.ZodOptional, z.ZodArray]>>; + sitePath: z.ZodOptional>; + siteInclude: z.ZodOptional>; + siteExclude: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + kvNamespaces?: string[] | Record | undefined; + sitePath?: string | undefined; + siteInclude?: string[] | undefined; + siteExclude?: string[] | undefined; +}, { + kvNamespaces?: string[] | Record | undefined; + sitePath?: string | undefined; + siteInclude?: string[] | undefined; + siteExclude?: string[] | undefined; +}>; + +export declare const KVParams: { + readonly URL_ENCODED: "urlencoded"; + readonly CACHE_TTL: "cache_ttl"; + readonly EXPIRATION: "expiration"; + readonly EXPIRATION_TTL: "expiration_ttl"; + readonly LIST_LIMIT: "key_count_limit"; + readonly LIST_PREFIX: "prefix"; + readonly LIST_CURSOR: "cursor"; +}; + +export declare const KVSharedOptionsSchema: z.ZodObject<{ + kvPersist: z.ZodOptional]>>; +}, "strip", z.ZodTypeAny, { + kvPersist?: string | boolean | undefined; +}, { + kvPersist?: string | boolean | undefined; +}>; + +declare const kWebSocket: unique symbol; + +export declare type Literal = z.infer; + +export declare const LiteralSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>; + +export declare class Log { + #private; + readonly level: LogLevel; + constructor(level?: LogLevel, opts?: LogOptions); + protected log(message: string): void; + static unstable_registerBeforeLogHook(callback: (() => void) | undefined): void; + static unstable_registerAfterLogHook(callback: (() => void) | undefined): void; + logWithLevel(level: LogLevel, message: string): void; + error(message: Error): void; + warn(message: string): void; + info(message: string): void; + debug(message: string): void; + verbose(message: string): void; +} + +export declare enum LogLevel { + NONE = 0, + ERROR = 1, + WARN = 2, + INFO = 3, + DEBUG = 4, + VERBOSE = 5 +} + +export declare interface LogOptions { + prefix?: string; + suffix?: string; +} + +export declare type ManifestEntry = { + pathHash: Uint8Array; + contentHash: Uint8Array; +}; + +export declare interface MatcherRegExps { + include: RegExp[]; + exclude: RegExp[]; +} + +export declare function matchRoutes(routes: WorkerRoute[], url: URL): string | null; + +export declare function maybeApply(f: (value: From) => To, maybeValue: From | undefined): To | undefined; + +export declare function maybeParseURL(url: Persistence): URL | undefined; + +/** + * Merges all of `b`'s properties into `a`. Only merges 1 level deep, i.e. + * `kvNamespaces` will be fully-merged, but `durableObject` object-designators + * will be overwritten. + */ +export declare function mergeWorkerOptions(a: Partial, b: Partial): Partial; + +declare class MessageEvent_2 extends Event { + readonly data: string | ArrayBuffer | Uint8Array; + constructor(type: "message", init: { + data: string | ArrayBuffer | Uint8Array; + }); +} +export { MessageEvent_2 as MessageEvent } + +export declare function migrateDatabase(log: Log, uniqueKey: string, persistPath: string, namespace: string): Promise; + +export declare class Miniflare { + #private; + constructor(opts: MiniflareOptions); + get ready(): Promise; + getCf(): Promise>; + getInspectorURL(): Promise; + unsafeGetDirectURL(workerName?: string, entrypoint?: string): Promise; + setOptions(opts: MiniflareOptions): Promise; + dispatchFetch: DispatchFetch; + /* Excluded from this release type: _getProxyClient */ + getBindings>(workerName?: string): Promise; + getWorker(workerName?: string): Promise>; + getCaches(): Promise>; + getD1Database(bindingName: string, workerName?: string): Promise; + getDurableObjectNamespace(bindingName: string, workerName?: string): Promise>; + getKVNamespace(bindingName: string, workerName?: string): Promise>; + getQueueProducer(bindingName: string, workerName?: string): Promise>; + getR2Bucket(bindingName: string, workerName?: string): Promise>; + /* Excluded from this release type: _getInternalDurableObjectNamespace */ + unsafeGetPersistPaths(): Map; + dispose(): Promise; +} + +export declare class MiniflareCoreError extends MiniflareError { +} + +export declare type MiniflareCoreErrorCode = "ERR_RUNTIME_FAILURE" | "ERR_DISPOSED" | "ERR_MODULE_PARSE" | "ERR_MODULE_STRING_SCRIPT" | "ERR_MODULE_DYNAMIC_SPEC" | "ERR_MODULE_RULE" | "ERR_PERSIST_UNSUPPORTED" | "ERR_PERSIST_REMOTE_UNAUTHENTICATED" | "ERR_PERSIST_REMOTE_UNSUPPORTED" | "ERR_FUTURE_COMPATIBILITY_DATE" | "ERR_NO_WORKERS" | "ERR_VALIDATION" | "ERR_DUPLICATE_NAME" | "ERR_DIFFERENT_STORAGE_BACKEND" | "ERR_DIFFERENT_UNIQUE_KEYS" | "ERR_DIFFERENT_PREVENT_EVICTION" | "ERR_MULTIPLE_OUTBOUNDS" | "ERR_INVALID_WRAPPED" | "ERR_CYCLIC" | "ERR_MISSING_INSPECTOR_PROXY_PORT"; + +export declare class MiniflareError extends Error { + readonly code: Code; + readonly cause?: Error | undefined; + constructor(code: Code, message?: string, cause?: Error | undefined); +} + +export declare type MiniflareOptions = SharedOptions & (WorkerOptions | { + workers: WorkerOptions[]; +}); + +export declare type ModuleDefinition = z.infer; + +export declare const ModuleDefinitionSchema: z.ZodObject<{ + type: z.ZodEnum<["ESModule", "CommonJS", "NodeJsCompatModule", "Text", "Data", "CompiledWasm", "PythonModule", "PythonRequirement"]>; + path: z.ZodEffects; + contents: z.ZodOptional, z.ZodTypeDef, Uint8Array>]>>; +}, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; +}, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; +}>; + +export declare type ModuleRule = z.infer; + +export declare const ModuleRuleSchema: z.ZodObject<{ + type: z.ZodEnum<["ESModule", "CommonJS", "NodeJsCompatModule", "Text", "Data", "CompiledWasm", "PythonModule", "PythonRequirement"]>; + include: z.ZodArray; + fallthrough: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; +}, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; +}>; + +export declare type ModuleRuleType = z.infer; + +export declare const ModuleRuleTypeSchema: z.ZodEnum<["ESModule", "CommonJS", "NodeJsCompatModule", "Text", "Data", "CompiledWasm", "PythonModule", "PythonRequirement"]>; + +export declare class Mutex { + private locked; + private resolveQueue; + private drainQueue; + private lock; + private unlock; + get hasWaiting(): boolean; + runWith(closure: () => Awaitable): Promise; + drained(): Promise; +} + +export declare function namespaceEntries(namespaces?: Record | string[]): [bindingName: string, id: string][]; + +export declare function namespaceKeys(namespaces?: Record | string[]): string[]; + +export declare interface Network { + allow?: string[]; + deny?: string[]; + tlsOptions?: TlsOptions; +} + +export declare const NODE_PLATFORM_IMPL: PlatformImpl; + +/** + * We can provide Node.js compatibility in a number of different modes: + * - "als": this mode tells the workerd runtime to enable only the Async Local Storage builtin library (accessible via `node:async_hooks`). + * - "v1" - this mode tells the workerd runtime to enable some Node.js builtin libraries (accessible only via `node:...` imports) but no globals. + * - "v2" - this mode tells the workerd runtime to enable more Node.js builtin libraries (accessible both with and without the `node:` prefix) + * and also some Node.js globals such as `Buffer`; it also turns on additional compile-time polyfills for those that are not provided by the runtime. + * - null - no Node.js compatibility. + */ +export declare type NodeJSCompatMode = "als" | "v1" | "v2" | null; + +export declare class NoOpLog extends Log { + constructor(); + protected log(): void; + error(_message: Error): void; +} + +export declare function normaliseDurableObject(designator: NonNullable["durableObjects"]>[string]): { + className: string; + serviceName?: string; + enableSql?: boolean; + unsafeUniqueKey?: UnsafeUniqueKey; + unsafePreventEviction?: boolean; +}; + +export declare function objectEntryWorker(durableObjectNamespace: Worker_Binding_DurableObjectNamespaceDesignator, namespace: string): Worker; + +export declare type OptionalZodTypeOf = T extends z.ZodTypeAny ? z.TypeOf : undefined; + +export declare type OverloadReplaceWorkersTypes = T extends (...args: any[]) => any ? UnionToIntersection>> : ReplaceWorkersTypes; + +export declare type OverloadUnion any> = Parameters extends [] ? T : OverloadUnion9; + +export declare type OverloadUnion2 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) : T; + +export declare type OverloadUnion3 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) : OverloadUnion2; + +export declare type OverloadUnion4 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; + (...args: infer P4): infer R4; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) : OverloadUnion3; + +export declare type OverloadUnion5 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; + (...args: infer P4): infer R4; + (...args: infer P5): infer R5; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) : OverloadUnion4; + +export declare type OverloadUnion6 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; + (...args: infer P4): infer R4; + (...args: infer P5): infer R5; + (...args: infer P6): infer R6; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) : OverloadUnion5; + +export declare type OverloadUnion7 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; + (...args: infer P4): infer R4; + (...args: infer P5): infer R5; + (...args: infer P6): infer R6; + (...args: infer P7): infer R7; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) | ((...args: P7) => R7) : OverloadUnion6; + +export declare type OverloadUnion8 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; + (...args: infer P4): infer R4; + (...args: infer P5): infer R5; + (...args: infer P6): infer R6; + (...args: infer P7): infer R7; + (...args: infer P8): infer R8; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) | ((...args: P7) => R7) | ((...args: P8) => R8) : OverloadUnion7; + +export declare type OverloadUnion9 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; + (...args: infer P4): infer R4; + (...args: infer P5): infer R5; + (...args: infer P6): infer R6; + (...args: infer P7): infer R7; + (...args: infer P8): infer R8; + (...args: infer P9): infer R9; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) | ((...args: P7) => R7) | ((...args: P8) => R8) | ((...args: P9) => R9) : OverloadUnion8; + +/** + * Parses an HTTP `Range` header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range), + * returning either: + * - `undefined` indicating the range is unsatisfiable + * - An empty array indicating the entire response should be returned + * - A non-empty array of inclusive ranges of the response to return + */ +export declare function parseRanges(rangeHeader: string, length: number): InclusiveRange[] | undefined; + +export declare function parseRoutes(allRoutes: Map): WorkerRoute[]; + +export declare function parseWithReadableStreams(impl: PlatformImpl, stringified: StringifiedWithStream, revivers: ReducersRevivers): unknown; + +export declare function parseWithRootPath(newRootPath: string, schema: Z, data: unknown, params?: Partial): z.infer; + +export declare const PathSchema: z.ZodEffects; + +export declare enum PeriodType { + TENSECONDS = 10, + MINUTE = 60 +} + +export declare type Persistence = z.infer; + +export declare const PersistenceSchema: z.ZodOptional]>>; + +export declare const PIPELINE_PLUGIN: Plugin; + +export declare const PipelineOptionsSchema: z.ZodObject<{ + pipelines: z.ZodOptional, z.ZodArray]>>; +}, "strip", z.ZodTypeAny, { + pipelines?: string[] | Record | undefined; +}, { + pipelines?: string[] | Record | undefined; +}>; + +export declare const PIPELINES_PLUGIN_NAME = "pipelines"; + +export declare interface PlatformImpl { + Blob: typeof Blob_2; + File: typeof File_2; + Headers: typeof Headers_3; + Request: typeof Request_5; + Response: typeof Response_5; + isReadableStream(value: unknown): value is RS; + bufferReadableStream(stream: RS): Promise; + unbufferReadableStream(buffer: ArrayBuffer): RS; +} + +export declare type Plugin = PluginBase & (SharedOptions extends undefined ? { + sharedOptions?: undefined; +} : { + sharedOptions: SharedOptions; +}); + +export declare const PLUGIN_ENTRIES: [keyof Plugins, ValueOf][]; + +export declare interface PluginBase { + options: Options; + getBindings(options: z.infer, workerIndex: number): Awaitable; + getNodeBindings(options: z.infer): Awaitable>; + getServices(options: PluginServicesOptions): Awaitable; + getPersistPath?(sharedOptions: OptionalZodTypeOf, tmpPath: string): string; +} + +export declare const PLUGINS: { + core: Plugin_2; + path: z.ZodEffects; + contents: z.ZodOptional, z.ZodTypeDef, Uint8Array>]>>; + }, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }>, "many">; + modulesRoot: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + modules: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; + }, { + modules: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; + }>, z.ZodObject<{ + script: z.ZodString; + scriptPath: z.ZodOptional>; + modules: z.ZodOptional; + modulesRules: z.ZodOptional; + include: z.ZodArray; + fallthrough: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }>, "many">>; + modulesRoot: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; + }, { + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; + }>, z.ZodObject<{ + scriptPath: z.ZodEffects; + modules: z.ZodOptional; + modulesRules: z.ZodOptional; + include: z.ZodArray; + fallthrough: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }>, "many">>; + modulesRoot: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; + }, { + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; + }>]>, z.ZodObject<{ + name: z.ZodOptional; + rootPath: z.ZodOptional>; + compatibilityDate: z.ZodOptional; + compatibilityFlags: z.ZodOptional>; + unsafeInspectorProxy: z.ZodOptional; + routes: z.ZodOptional>; + bindings: z.ZodOptional>>; + wasmBindings: z.ZodOptional, z.ZodType, z.ZodTypeDef, Uint8Array>]>>>; + textBlobBindings: z.ZodOptional>>; + dataBlobBindings: z.ZodOptional, z.ZodType, z.ZodTypeDef, Uint8Array>]>>>; + serviceBindings: z.ZodOptional, z.ZodObject<{ + name: z.ZodUnion<[z.ZodString, z.ZodLiteral]>; + entrypoint: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + }, { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + }>, z.ZodObject<{ + network: z.ZodObject<{ + allow: z.ZodOptional>; + deny: z.ZodOptional>; + tlsOptions: z.ZodOptional; + certificateChain: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }>>; + requireClientCerts: z.ZodOptional; + trustBrowserCas: z.ZodOptional; + trustedCertificates: z.ZodOptional>; + minVersion: z.ZodOptional>; + cipherList: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }>>; + }, "strip", z.ZodTypeAny, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }>; + }, "strip", z.ZodTypeAny, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }>, z.ZodObject<{ + external: z.ZodType; + }, "strip", z.ZodTypeAny, { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + }, { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + }>, z.ZodObject<{ + disk: z.ZodObject<{ + path: z.ZodString; + writable: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + path: string; + writable?: boolean | undefined; + }, { + path: string; + writable?: boolean | undefined; + }>; + }, "strip", z.ZodTypeAny, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }>, z.ZodType<(request: Request_6, mf: Miniflare_3) => Awaitable_2, z.ZodTypeDef, (request: Request_6, mf: Miniflare_3) => Awaitable_2>]>>>; + wrappedBindings: z.ZodOptional; + bindings: z.ZodOptional>>; + }, "strip", z.ZodTypeAny, { + scriptName: string; + entrypoint?: string | undefined; + bindings?: Record | undefined; + }, { + scriptName: string; + entrypoint?: string | undefined; + bindings?: Record | undefined; + }>]>>>; + outboundService: z.ZodOptional, z.ZodObject<{ + name: z.ZodUnion<[z.ZodString, z.ZodLiteral]>; + entrypoint: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + }, { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + }>, z.ZodObject<{ + network: z.ZodObject<{ + allow: z.ZodOptional>; + deny: z.ZodOptional>; + tlsOptions: z.ZodOptional; + certificateChain: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }>>; + requireClientCerts: z.ZodOptional; + trustBrowserCas: z.ZodOptional; + trustedCertificates: z.ZodOptional>; + minVersion: z.ZodOptional>; + cipherList: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }>>; + }, "strip", z.ZodTypeAny, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }>; + }, "strip", z.ZodTypeAny, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }>, z.ZodObject<{ + external: z.ZodType; + }, "strip", z.ZodTypeAny, { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + }, { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + }>, z.ZodObject<{ + disk: z.ZodObject<{ + path: z.ZodString; + writable: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + path: string; + writable?: boolean | undefined; + }, { + path: string; + writable?: boolean | undefined; + }>; + }, "strip", z.ZodTypeAny, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }>, z.ZodType<(request: Request_6, mf: Miniflare_3) => Awaitable_2, z.ZodTypeDef, (request: Request_6, mf: Miniflare_3) => Awaitable_2>]>>; + fetchMock: z.ZodOptional, z.ZodTypeDef, MockAgent>>; + unsafeEphemeralDurableObjects: z.ZodOptional; + unsafeDirectSockets: z.ZodOptional; + port: z.ZodOptional; + entrypoint: z.ZodOptional; + proxy: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }, { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }>, "many">>; + unsafeEvalBinding: z.ZodOptional; + unsafeUseModuleFallbackService: z.ZodOptional; + hasAssetsAndIsVitest: z.ZodOptional; + unsafeEnableAssetsRpc: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name?: string | undefined; + rootPath?: undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record Awaitable_2)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | kCurrentWorker_2 | { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + unsafeEnableAssetsRpc?: boolean | undefined; + }, { + name?: string | undefined; + rootPath?: string | undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record Awaitable_2)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | kCurrentWorker_2 | { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + unsafeEnableAssetsRpc?: boolean | undefined; + }>>, ({ + modules: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; + } & { + name?: string | undefined; + rootPath?: undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record Awaitable_2)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | kCurrentWorker_2 | { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + unsafeEnableAssetsRpc?: boolean | undefined; + }) | ({ + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; + } & { + name?: string | undefined; + rootPath?: undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record Awaitable_2)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | kCurrentWorker_2 | { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + unsafeEnableAssetsRpc?: boolean | undefined; + }) | ({ + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; + } & { + name?: string | undefined; + rootPath?: undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record Awaitable_2)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | kCurrentWorker_2 | { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + unsafeEnableAssetsRpc?: boolean | undefined; + }), ({ + modules: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; + } | { + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; + } | { + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; + }) & { + name?: string | undefined; + rootPath?: string | undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record Awaitable_2)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | kCurrentWorker_2 | { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + unsafeEnableAssetsRpc?: boolean | undefined; + }>, z.ZodObject<{ + rootPath: z.ZodOptional>; + host: z.ZodOptional; + port: z.ZodOptional; + https: z.ZodOptional; + httpsKey: z.ZodOptional; + httpsKeyPath: z.ZodOptional; + httpsCert: z.ZodOptional; + httpsCertPath: z.ZodOptional; + inspectorPort: z.ZodOptional; + verbose: z.ZodOptional; + log: z.ZodOptional>; + handleRuntimeStdio: z.ZodOptional, z.ZodType], null>, z.ZodUnknown>>; + upstream: z.ZodOptional; + cf: z.ZodOptional]>>; + liveReload: z.ZodOptional; + unsafeProxySharedSecret: z.ZodOptional; + unsafeModuleFallbackService: z.ZodOptional Awaitable_2, z.ZodTypeDef, (request: Request_6, mf: Miniflare_3) => Awaitable_2>>; + unsafeStickyBlobs: z.ZodOptional; + unsafeEnableAssetsRpc: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + rootPath?: undefined; + host?: string | undefined; + port?: number | undefined; + https?: boolean | undefined; + httpsKey?: string | undefined; + httpsKeyPath?: string | undefined; + httpsCert?: string | undefined; + httpsCertPath?: string | undefined; + inspectorPort?: number | undefined; + verbose?: boolean | undefined; + log?: Log_2 | undefined; + handleRuntimeStdio?: ((args_0: Readable, args_1: Readable) => unknown) | undefined; + upstream?: string | undefined; + cf?: string | boolean | Record | undefined; + liveReload?: boolean | undefined; + unsafeProxySharedSecret?: string | undefined; + unsafeModuleFallbackService?: ((request: Request_6, mf: Miniflare_3) => Awaitable_2) | undefined; + unsafeStickyBlobs?: boolean | undefined; + unsafeEnableAssetsRpc?: boolean | undefined; + }, { + rootPath?: string | undefined; + host?: string | undefined; + port?: number | undefined; + https?: boolean | undefined; + httpsKey?: string | undefined; + httpsKeyPath?: string | undefined; + httpsCert?: string | undefined; + httpsCertPath?: string | undefined; + inspectorPort?: number | undefined; + verbose?: boolean | undefined; + log?: Log_2 | undefined; + handleRuntimeStdio?: ((args_0: Readable, args_1: Readable) => unknown) | undefined; + upstream?: string | undefined; + cf?: string | boolean | Record | undefined; + liveReload?: boolean | undefined; + unsafeProxySharedSecret?: string | undefined; + unsafeModuleFallbackService?: ((request: Request_6, mf: Miniflare_3) => Awaitable_2) | undefined; + unsafeStickyBlobs?: boolean | undefined; + unsafeEnableAssetsRpc?: boolean | undefined; + }>>; + cache: Plugin_2; + cacheWarnUsage: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + cache?: boolean | undefined; + cacheWarnUsage?: boolean | undefined; + }, { + cache?: boolean | undefined; + cacheWarnUsage?: boolean | undefined; + }>, z.ZodObject<{ + cachePersist: z.ZodOptional]>>; + }, "strip", z.ZodTypeAny, { + cachePersist?: string | boolean | undefined; + }, { + cachePersist?: string | boolean | undefined; + }>>; + d1: Plugin_2, z.ZodArray]>>; + }, "strip", z.ZodTypeAny, { + d1Databases?: string[] | Record | undefined; + }, { + d1Databases?: string[] | Record | undefined; + }>, z.ZodObject<{ + d1Persist: z.ZodOptional]>>; + }, "strip", z.ZodTypeAny, { + d1Persist?: string | boolean | undefined; + }, { + d1Persist?: string | boolean | undefined; + }>>; + do: Plugin_2; + useSQLite: z.ZodOptional; + unsafeUniqueKey: z.ZodOptional]>>; + unsafePreventEviction: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + className: string; + scriptName?: string | undefined; + useSQLite?: boolean | undefined; + unsafeUniqueKey?: string | kUnsafeEphemeralUniqueKey_2 | undefined; + unsafePreventEviction?: boolean | undefined; + }, { + className: string; + scriptName?: string | undefined; + useSQLite?: boolean | undefined; + unsafeUniqueKey?: string | kUnsafeEphemeralUniqueKey_2 | undefined; + unsafePreventEviction?: boolean | undefined; + }>]>>>; + }, "strip", z.ZodTypeAny, { + durableObjects?: Record | undefined; + }, { + durableObjects?: Record | undefined; + }>, z.ZodObject<{ + durableObjectsPersist: z.ZodOptional]>>; + }, "strip", z.ZodTypeAny, { + durableObjectsPersist?: string | boolean | undefined; + }, { + durableObjectsPersist?: string | boolean | undefined; + }>>; + kv: Plugin_2, z.ZodArray]>>; + sitePath: z.ZodOptional>; + siteInclude: z.ZodOptional>; + siteExclude: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + kvNamespaces?: string[] | Record | undefined; + sitePath?: string | undefined; + siteInclude?: string[] | undefined; + siteExclude?: string[] | undefined; + }, { + kvNamespaces?: string[] | Record | undefined; + sitePath?: string | undefined; + siteInclude?: string[] | undefined; + siteExclude?: string[] | undefined; + }>, z.ZodObject<{ + kvPersist: z.ZodOptional]>>; + }, "strip", z.ZodTypeAny, { + kvPersist?: string | boolean | undefined; + }, { + kvPersist?: string | boolean | undefined; + }>>; + queues: Plugin_2; + }, "strip", z.ZodTypeAny, { + queueName: string; + deliveryDelay?: number | undefined; + }, { + queueName: string; + deliveryDelay?: number | undefined; + }>>, z.ZodArray, z.ZodRecord]>>; + queueConsumers: z.ZodOptional; + maxBatchTimeout: z.ZodOptional; + maxRetires: z.ZodOptional; + maxRetries: z.ZodOptional; + deadLetterQueue: z.ZodOptional; + retryDelay: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; + }, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; + }>, Omit<{ + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; + }, "maxRetires">, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; + }>>, z.ZodArray]>>; + }, "strip", z.ZodTypeAny, { + queueProducers?: string[] | Record | Record | undefined; + queueConsumers?: string[] | Record> | undefined; + }, { + queueProducers?: string[] | Record | Record | undefined; + queueConsumers?: string[] | Record | undefined; + }>>; + r2: Plugin_2, z.ZodArray]>>; + }, "strip", z.ZodTypeAny, { + r2Buckets?: string[] | Record | undefined; + }, { + r2Buckets?: string[] | Record | undefined; + }>, z.ZodObject<{ + r2Persist: z.ZodOptional]>>; + }, "strip", z.ZodTypeAny, { + r2Persist?: string | boolean | undefined; + }, { + r2Persist?: string | boolean | undefined; + }>>; + hyperdrive: Plugin_2]>, URL_2, string | URL_2>>>; + }, "strip", z.ZodTypeAny, { + hyperdrives?: Record | undefined; + }, { + hyperdrives?: Record | undefined; + }>>; + ratelimit: Plugin_2>; + }, "strip", z.ZodTypeAny, { + limit: number; + period?: PeriodType_2 | undefined; + }, { + limit: number; + period?: PeriodType_2 | undefined; + }>; + }, "strip", z.ZodTypeAny, { + simple: { + limit: number; + period?: PeriodType_2 | undefined; + }; + }, { + simple: { + limit: number; + period?: PeriodType_2 | undefined; + }; + }>>>; + }, "strip", z.ZodTypeAny, { + ratelimits?: Record | undefined; + }, { + ratelimits?: Record | undefined; + }>>; + assets: Plugin_2; + directory: z.ZodEffects; + binding: z.ZodOptional; + routerConfig: z.ZodOptional; + script_id: z.ZodOptional; + invoke_user_worker_ahead_of_assets: z.ZodOptional; + has_user_worker: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + account_id?: number; + script_id?: number; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + }, { + account_id?: number; + script_id?: number; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + }>>; + assetConfig: z.ZodOptional; + script_id: z.ZodOptional; + compatibility_date: z.ZodOptional; + compatibility_flags: z.ZodOptional>; + html_handling: z.ZodOptional>; + not_found_handling: z.ZodOptional>; + redirects: z.ZodOptional; + staticRules: z.ZodRecord>; + rules: z.ZodRecord>; + }, "strip", z.ZodTypeAny, { + version?: 1; + staticRules?: Record; + rules?: Record; + }, { + version?: 1; + staticRules?: Record; + rules?: Record; + }>>; + headers: z.ZodOptional; + rules: z.ZodRecord>; + unset: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + set?: Record; + unset?: string[]; + }, { + set?: Record; + unset?: string[]; + }>>; + }, "strip", z.ZodTypeAny, { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }, { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }>>; + }, "strip", z.ZodTypeAny, { + account_id?: number; + script_id?: number; + compatibility_date?: string; + compatibility_flags?: string[]; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash"; + not_found_handling?: "none" | "single-page-application" | "404-page"; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + }; + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }; + }, { + account_id?: number; + script_id?: number; + compatibility_date?: string; + compatibility_flags?: string[]; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash"; + not_found_handling?: "none" | "single-page-application" | "404-page"; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + }; + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }; + }>>; + }, "strip", z.ZodTypeAny, { + directory: string; + workerName?: string | undefined; + binding?: string | undefined; + routerConfig?: { + account_id?: number; + script_id?: number; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + } | undefined; + assetConfig?: { + account_id?: number; + script_id?: number; + compatibility_date?: string; + compatibility_flags?: string[]; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash"; + not_found_handling?: "none" | "single-page-application" | "404-page"; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + }; + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }; + } | undefined; + }, { + directory: string; + workerName?: string | undefined; + binding?: string | undefined; + routerConfig?: { + account_id?: number; + script_id?: number; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + } | undefined; + assetConfig?: { + account_id?: number; + script_id?: number; + compatibility_date?: string; + compatibility_flags?: string[]; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash"; + not_found_handling?: "none" | "single-page-application" | "404-page"; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + }; + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }; + } | undefined; + }>>; + }, "strip", z.ZodTypeAny, { + assets?: { + directory: string; + workerName?: string | undefined; + binding?: string | undefined; + routerConfig?: { + account_id?: number; + script_id?: number; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + } | undefined; + assetConfig?: { + account_id?: number; + script_id?: number; + compatibility_date?: string; + compatibility_flags?: string[]; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash"; + not_found_handling?: "none" | "single-page-application" | "404-page"; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + }; + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }; + } | undefined; + } | undefined; + }, { + assets?: { + directory: string; + workerName?: string | undefined; + binding?: string | undefined; + routerConfig?: { + account_id?: number; + script_id?: number; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + } | undefined; + assetConfig?: { + account_id?: number; + script_id?: number; + compatibility_date?: string; + compatibility_flags?: string[]; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash"; + not_found_handling?: "none" | "single-page-application" | "404-page"; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + }; + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }; + } | undefined; + } | undefined; + }>>; + workflows: Plugin_2; + }, "strip", z.ZodTypeAny, { + name: string; + className: string; + scriptName?: string | undefined; + }, { + name: string; + className: string; + scriptName?: string | undefined; + }>>>; + }, "strip", z.ZodTypeAny, { + workflows?: Record | undefined; + }, { + workflows?: Record | undefined; + }>, z.ZodObject<{ + workflowsPersist: z.ZodOptional]>>; + }, "strip", z.ZodTypeAny, { + workflowsPersist?: string | boolean | undefined; + }, { + workflowsPersist?: string | boolean | undefined; + }>>; + pipelines: Plugin_2, z.ZodArray]>>; + }, "strip", z.ZodTypeAny, { + pipelines?: string[] | Record | undefined; + }, { + pipelines?: string[] | Record | undefined; + }>>; +}; + +export declare type Plugins = typeof PLUGINS; + +export declare interface PluginServicesOptions { + log: Log; + options: z.infer; + sharedOptions: OptionalZodTypeOf; + workerBindings: Worker_Binding[]; + workerIndex: number; + additionalModules: Worker_Module[]; + tmpPath: string; + workerNames: string[]; + loopbackPort: number; + unsafeStickyBlobs: boolean; + wrappedBindingNames: WrappedBindingNames; + durableObjectClassNames: DurableObjectClassNames; + unsafeEphemeralDurableObjects: boolean; + queueProducers: QueueProducers; + queueConsumers: QueueConsumers; + unsafeEnableAssetsRpc: boolean; +} + +export declare function prefixError(prefix: string, e: any): Error; + +export declare function prefixStream(prefix: Uint8Array, stream: ReadableStream_3): ReadableStream_3; + +export declare const ProxyAddresses: { + readonly GLOBAL: 0; + readonly ENV: 1; + readonly USER_START: 2; +}; + +export declare class ProxyClient { + #private; + constructor(runtimeEntryURL: URL, dispatchFetch: DispatchFetch); + get global(): ServiceWorkerGlobalScope; + get env(): Record; + poisonProxies(): void; + setRuntimeEntryURL(runtimeEntryURL: URL): void; + dispose(): Promise; +} + +export declare class ProxyNodeBinding { + proxyOverrideHandler?: ProxyHandler | undefined; + constructor(proxyOverrideHandler?: ProxyHandler | undefined); +} + +export declare const ProxyOps: { + readonly GET: "GET"; + readonly GET_OWN_DESCRIPTOR: "GET_OWN_DESCRIPTOR"; + readonly GET_OWN_KEYS: "GET_OWN_KEYS"; + readonly CALL: "CALL"; + readonly FREE: "FREE"; +}; + +export declare const QueueBindings: { + readonly SERVICE_WORKER_PREFIX: "MINIFLARE_WORKER_"; + readonly MAYBE_JSON_QUEUE_PRODUCERS: "MINIFLARE_QUEUE_PRODUCERS"; + readonly MAYBE_JSON_QUEUE_CONSUMERS: "MINIFLARE_QUEUE_CONSUMERS"; +}; + +export declare type QueueConsumer = z.infer; + +export declare const QueueConsumerOptionsSchema: z.ZodEffects; + maxBatchTimeout: z.ZodOptional; + maxRetires: z.ZodOptional; + maxRetries: z.ZodOptional; + deadLetterQueue: z.ZodOptional; + retryDelay: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}>, Omit<{ + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}, "maxRetires">, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}>; + +export declare type QueueConsumers = Map>; + +export declare const QueueConsumerSchema: z.ZodIntersection; + maxBatchTimeout: z.ZodOptional; + maxRetires: z.ZodOptional; + maxRetries: z.ZodOptional; + deadLetterQueue: z.ZodOptional; + retryDelay: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}>, Omit<{ + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}, "maxRetires">, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}>, z.ZodObject<{ + workerName: z.ZodString; +}, "strip", z.ZodTypeAny, { + workerName: string; +}, { + workerName: string; +}>>; + +export declare const QueueConsumersSchema: z.ZodRecord; + maxBatchTimeout: z.ZodOptional; + maxRetires: z.ZodOptional; + maxRetries: z.ZodOptional; + deadLetterQueue: z.ZodOptional; + retryDelay: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}>, Omit<{ + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}, "maxRetires">, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}>, z.ZodObject<{ + workerName: z.ZodString; +}, "strip", z.ZodTypeAny, { + workerName: string; +}, { + workerName: string; +}>>>; + +export declare type QueueContentType = z.infer; + +export declare const QueueContentTypeSchema: z.ZodDefault>; + +export declare type QueueIncomingMessage = z.infer; + +export declare const QueueIncomingMessageSchema: z.ZodObject<{ + contentType: z.ZodDefault>; + delaySecs: z.ZodOptional; + body: z.ZodEffects, string>; + id: z.ZodOptional; + timestamp: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + body: Buffer; + contentType: "json" | "bytes" | "v8" | "text"; + delaySecs?: number | undefined; + id?: string | undefined; + timestamp?: number | undefined; +}, { + body: string; + contentType?: "json" | "bytes" | "v8" | "text" | undefined; + delaySecs?: number | undefined; + id?: string | undefined; + timestamp?: number | undefined; +}>; + +export declare type QueueMessageDelay = z.infer; + +export declare const QueueMessageDelaySchema: z.ZodOptional; + +export declare type QueueOutgoingMessage = z.input; + +export declare type QueueProducer = z.infer; + +export declare const QueueProducerOptionsSchema: z.ZodObject<{ + queueName: z.ZodString; + deliveryDelay: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + queueName: string; + deliveryDelay?: number | undefined; +}, { + queueName: string; + deliveryDelay?: number | undefined; +}>; + +export declare type QueueProducers = Map>; + +export declare const QueueProducerSchema: z.ZodIntersection; +}, "strip", z.ZodTypeAny, { + queueName: string; + deliveryDelay?: number | undefined; +}, { + queueName: string; + deliveryDelay?: number | undefined; +}>, z.ZodObject<{ + workerName: z.ZodString; +}, "strip", z.ZodTypeAny, { + workerName: string; +}, { + workerName: string; +}>>; + +export declare const QueueProducersSchema: z.ZodRecord; +}, "strip", z.ZodTypeAny, { + queueName: string; + deliveryDelay?: number | undefined; +}, { + queueName: string; + deliveryDelay?: number | undefined; +}>, z.ZodObject<{ + workerName: z.ZodString; +}, "strip", z.ZodTypeAny, { + workerName: string; +}, { + workerName: string; +}>>>; + +export declare const QUEUES_PLUGIN: Plugin; + +export declare const QUEUES_PLUGIN_NAME = "queues"; + +export declare const QueuesBatchRequestSchema: z.ZodObject<{ + messages: z.ZodArray>; + delaySecs: z.ZodOptional; + body: z.ZodEffects, string>; + id: z.ZodOptional; + timestamp: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + body: Buffer; + contentType: "json" | "bytes" | "v8" | "text"; + delaySecs?: number | undefined; + id?: string | undefined; + timestamp?: number | undefined; + }, { + body: string; + contentType?: "json" | "bytes" | "v8" | "text" | undefined; + delaySecs?: number | undefined; + id?: string | undefined; + timestamp?: number | undefined; + }>, "many">; +}, "strip", z.ZodTypeAny, { + messages: { + body: Buffer; + contentType: "json" | "bytes" | "v8" | "text"; + delaySecs?: number | undefined; + id?: string | undefined; + timestamp?: number | undefined; + }[]; +}, { + messages: { + body: string; + contentType?: "json" | "bytes" | "v8" | "text" | undefined; + delaySecs?: number | undefined; + id?: string | undefined; + timestamp?: number | undefined; + }[]; +}>; + +export declare class QueuesError extends MiniflareError { +} + +export declare type QueuesErrorCode = "ERR_MULTIPLE_CONSUMERS" | "ERR_DEAD_LETTER_QUEUE_CYCLE"; + +export declare const QueuesOptionsSchema: z.ZodObject<{ + queueProducers: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + queueName: string; + deliveryDelay?: number | undefined; + }, { + queueName: string; + deliveryDelay?: number | undefined; + }>>, z.ZodArray, z.ZodRecord]>>; + queueConsumers: z.ZodOptional; + maxBatchTimeout: z.ZodOptional; + maxRetires: z.ZodOptional; + maxRetries: z.ZodOptional; + deadLetterQueue: z.ZodOptional; + retryDelay: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; + }, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; + }>, Omit<{ + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; + }, "maxRetires">, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; + }>>, z.ZodArray]>>; +}, "strip", z.ZodTypeAny, { + queueProducers?: string[] | Record | Record | undefined; + queueConsumers?: string[] | Record> | undefined; +}, { + queueProducers?: string[] | Record | Record | undefined; + queueConsumers?: string[] | Record | undefined; +}>; + +export declare type QueuesOutgoingBatchRequest = z.input; + +export declare const R2_PLUGIN: Plugin; + +export declare const R2_PLUGIN_NAME = "r2"; + +export declare const R2OptionsSchema: z.ZodObject<{ + r2Buckets: z.ZodOptional, z.ZodArray]>>; +}, "strip", z.ZodTypeAny, { + r2Buckets?: string[] | Record | undefined; +}, { + r2Buckets?: string[] | Record | undefined; +}>; + +export declare const R2SharedOptionsSchema: z.ZodObject<{ + r2Persist: z.ZodOptional]>>; +}, "strip", z.ZodTypeAny, { + r2Persist?: string | boolean | undefined; +}, { + r2Persist?: string | boolean | undefined; +}>; + +export declare const RATELIMIT_PLUGIN: Plugin; + +export declare const RATELIMIT_PLUGIN_NAME = "ratelimit"; + +export declare const RatelimitConfigSchema: z.ZodObject<{ + simple: z.ZodObject<{ + limit: z.ZodNumber; + period: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + limit: number; + period?: PeriodType | undefined; + }, { + limit: number; + period?: PeriodType | undefined; + }>; +}, "strip", z.ZodTypeAny, { + simple: { + limit: number; + period?: PeriodType | undefined; + }; +}, { + simple: { + limit: number; + period?: PeriodType | undefined; + }; +}>; + +export declare const RatelimitOptionsSchema: z.ZodObject<{ + ratelimits: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + limit: number; + period?: PeriodType | undefined; + }, { + limit: number; + period?: PeriodType | undefined; + }>; + }, "strip", z.ZodTypeAny, { + simple: { + limit: number; + period?: PeriodType | undefined; + }; + }, { + simple: { + limit: number; + period?: PeriodType | undefined; + }; + }>>>; +}, "strip", z.ZodTypeAny, { + ratelimits?: Record | undefined; +}, { + ratelimits?: Record | undefined; +}>; + +export declare function readPrefix(stream: ReadableStream_3, prefixLength: number): Promise<[prefix: Buffer, rest: ReadableStream_3]>; + +export declare function reduceError(e: any): JsonError; + +export declare type ReducerReviver = (value: unknown) => unknown; + +export declare type ReducersRevivers = Record; + +export { ReferrerPolicy } + +export declare type ReplaceWorkersTypes = T extends Request_5 ? Request_2 : T extends Response_5 ? Response_2 : T extends ReadableStream_2 ? ReadableStream_3 : Required extends Required ? RequestInit_2 : T extends Headers_3 ? Headers_2 : T extends Blob_2 ? Blob_3 : T extends AbortSignal_2 ? AbortSignal : T extends Promise ? Promise> : T extends (...args: infer P) => infer R ? (...args: ReplaceWorkersTypes

) => ReplaceWorkersTypes : T extends object ? { + [K in keyof T]: OverloadReplaceWorkersTypes; +} : T; + +declare class Request_2 extends Request_4 { + [kCf]?: CfType; + constructor(input: RequestInfo, init?: RequestInit_2); + get cf(): CfType | undefined; + /** @ts-expect-error `clone` is actually defined as a method internally */ + clone(): Request_2; +} +export { Request_2 as Request } + +export { RequestCache } + +export { RequestCredentials } + +export { RequestDestination } + +export { RequestDuplex } + +export declare type RequestInfo = RequestInfo_2 | Request_2; + +declare interface RequestInit_2 extends RequestInit_3 { + cf?: CfType; +} +export { RequestInit_2 as RequestInit } + +export declare type RequestInitCfType = Partial | RequestInitCfProperties; + +export { RequestMode } + +export { RequestRedirect } + +declare class Response_2 extends Response_4 { + readonly [kWebSocket]: WebSocket | null; + static error(): Response_2; + static redirect(url: string | URL, status: ResponseRedirectStatus): Response_2; + static json(data: any, init?: ResponseInit_2): Response_2; + constructor(body?: BodyInit, init?: ResponseInit_2); + /** @ts-expect-error `status` is actually defined as a getter internally */ + get status(): number; + get webSocket(): WebSocket | null; + /** @ts-expect-error `clone` is actually defined as a method internally */ + clone(): Response_2; +} +export { Response_2 as Response } + +declare interface ResponseInit_2 extends ResponseInit_3 { + webSocket?: WebSocket | null; +} +export { ResponseInit_2 as ResponseInit } + +export { ResponseRedirectStatus } + +export { ResponseType } + +export declare class RouterError extends MiniflareError { +} + +export declare type RouterErrorCode = "ERR_QUERY_STRING" | "ERR_INFIX_WILDCARD"; + +export declare class Runtime { + #private; + updateConfig(configBuffer: Buffer, options: Abortable & RuntimeOptions): Promise; + dispose(): Awaitable; +} + +export declare interface RuntimeOptions { + entryAddress: string; + loopbackAddress: string; + requiredSockets: SocketIdentifier[]; + inspectorAddress?: string; + verbose?: boolean; + handleRuntimeStdio?: (stdout: Readable, stderr: Readable) => void; +} + +export declare function sanitisePath(unsafe: string): string; + +export declare interface SerialisableMatcherRegExps { + include: string[]; + exclude: string[]; +} + +export declare interface SerialisableSiteMatcherRegExps { + include?: SerialisableMatcherRegExps; + exclude?: SerialisableMatcherRegExps; +} + +export declare function serialiseRegExps(matcher: MatcherRegExps): SerialisableMatcherRegExps; + +export declare function serialiseSiteRegExps(siteRegExps: SiteMatcherRegExps): SerialisableSiteMatcherRegExps; + +export declare function serializeConfig(config: Config): Buffer; + +export declare type Service = { + name?: string; +} & ({ + worker?: Worker; +} | { + network?: Network; +} | { + external?: ExternalServer; +} | { + disk?: DiskDirectory; +}); + +export declare const SERVICE_ENTRY = "core:entry"; + +export declare const SERVICE_LOOPBACK = "loopback"; + +export declare interface ServiceDesignator { + name?: string; + entrypoint?: string; +} + +export declare interface ServicesExtensions { + services: Service[]; + extensions: Extension[]; +} + +export declare const SharedBindings: { + readonly TEXT_NAMESPACE: "MINIFLARE_NAMESPACE"; + readonly DURABLE_OBJECT_NAMESPACE_OBJECT: "MINIFLARE_OBJECT"; + readonly MAYBE_SERVICE_BLOBS: "MINIFLARE_BLOBS"; + readonly MAYBE_SERVICE_LOOPBACK: "MINIFLARE_LOOPBACK"; + readonly MAYBE_JSON_ENABLE_CONTROL_ENDPOINTS: "MINIFLARE_ENABLE_CONTROL_ENDPOINTS"; + readonly MAYBE_JSON_ENABLE_STICKY_BLOBS: "MINIFLARE_STICKY_BLOBS"; +}; + +export declare const SharedHeaders: { + readonly LOG_LEVEL: "MF-Log-Level"; +}; + +export declare type SharedOptions = z.input & z.input & z.input & z.input & z.input & z.input & z.input; + +export declare const SiteBindings: { + readonly KV_NAMESPACE_SITE: "__STATIC_CONTENT"; + readonly JSON_SITE_MANIFEST: "__STATIC_CONTENT_MANIFEST"; + readonly JSON_SITE_FILTER: "MINIFLARE_SITE_FILTER"; +}; + +export declare interface SiteMatcherRegExps { + include?: MatcherRegExps; + exclude?: MatcherRegExps; +} + +export declare const SITES_NO_CACHE_PREFIX = "$__MINIFLARE_SITES__$/"; + +export declare type Socket = { + name?: string; + address?: string; + service?: ServiceDesignator; +} & ({ + http?: HttpOptions; +} | { + https?: Socket_Https; +}); + +export declare const SOCKET_ENTRY = "entry"; + +export declare const SOCKET_ENTRY_LOCAL = "entry:local"; + +export declare interface Socket_Https { + options?: HttpOptions; + tlsOptions?: TlsOptions; +} + +export declare type SocketIdentifier = string | typeof kInspectorSocket; + +export declare type SocketPorts = Map; + +export declare type SourceOptions = z.infer; + +export declare const SourceOptionsSchema: z.ZodUnion<[z.ZodObject<{ + modules: z.ZodArray; + path: z.ZodEffects; + contents: z.ZodOptional, z.ZodTypeDef, Uint8Array>]>>; + }, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }>, "many">; + modulesRoot: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + modules: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; +}, { + modules: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; +}>, z.ZodObject<{ + script: z.ZodString; + scriptPath: z.ZodOptional>; + modules: z.ZodOptional; + modulesRules: z.ZodOptional; + include: z.ZodArray; + fallthrough: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }>, "many">>; + modulesRoot: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +}, { + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +}>, z.ZodObject<{ + scriptPath: z.ZodEffects; + modules: z.ZodOptional; + modulesRules: z.ZodOptional; + include: z.ZodArray; + fallthrough: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }, { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }>, "many">>; + modulesRoot: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +}, { + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +}>]>; + +export declare interface StringifiedWithStream { + value: string; + unbufferedStream?: RS; +} + +export declare function stringifyWithStreams(impl: PlatformImpl, value: unknown, reducers: ReducersRevivers, allowUnbufferedStream: boolean): StringifiedWithStream | Promise>; + +export declare function stripAnsi(value: string): string; + +export declare const structuredSerializableReducers: ReducersRevivers; + +export declare const structuredSerializableRevivers: ReducersRevivers; + +export { supportedCompatibilityDate } + +export declare function testRegExps(matcher: MatcherRegExps, value: string): boolean; + +export declare function testSiteRegExps(regExps: SiteMatcherRegExps, key: string): boolean; + +export declare interface TlsOptions { + keypair?: TlsOptions_Keypair; + requireClientCerts?: boolean; + trustBrowserCas?: boolean; + trustedCertificates?: string[]; + minVersion?: TlsOptions_Version; + cipherList?: string; +} + +export declare interface TlsOptions_Keypair { + privateKey?: string; + certificateChain?: string; +} + +export declare const TlsOptions_Version: { + readonly GOOD_DEFAULT: 0; + readonly SSL3: 1; + readonly TLS1DOT0: 2; + readonly TLS1DOT1: 3; + readonly TLS1DOT2: 4; + readonly TLS1DOT3: 5; +}; + +export declare type TlsOptions_Version = (typeof TlsOptions_Version)[keyof typeof TlsOptions_Version]; + +export declare function _transformsForContentEncodingAndContentType(encoding: string | undefined, type: string | undefined | null): Transform[]; + +export declare type TypedEventListener = ((e: E) => void) | { + handleEvent(e: E): void; +}; + +export declare class TypedEventTarget> extends EventTarget { + addEventListener(type: Type, listener: TypedEventListener | null, options?: AddEventListenerOptions | boolean): void; + removeEventListener(type: Type, listener: TypedEventListener | null, options?: EventListenerOptions | boolean): void; + dispatchEvent(event: ValueOf): boolean; +} + +export declare type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; + +export declare type UnsafeUniqueKey = string | typeof kUnsafeEphemeralUniqueKey; + +export declare type ValueOf = T[keyof T]; + +export declare function viewToBuffer(view: ArrayBufferView): ArrayBuffer; + +export declare type Void = typeof kVoid; + +export declare class WaitGroup { + private counter; + private resolveQueue; + add(): void; + done(): void; + wait(): Promise; +} + +export declare class WebSocket extends TypedEventTarget { + #private; + static readonly READY_STATE_CONNECTING = 0; + static readonly READY_STATE_OPEN = 1; + static readonly READY_STATE_CLOSING = 2; + static readonly READY_STATE_CLOSED = 3; + [kPair]?: WebSocket; + [kAccepted]: boolean; + [kCoupled]: boolean; + [kClosedOutgoing]: boolean; + [kClosedIncoming]: boolean; + get readyState(): number; + accept(): void; + send(message: string | ArrayBuffer | Uint8Array): void; + [kSend](message: string | ArrayBuffer | Uint8Array): void; + close(code?: number, reason?: string): void; + [kClose](code?: number, reason?: string): void; + [kError](error?: Error): void; +} + +export declare type WebSocketEventMap = { + message: MessageEvent_2; + close: CloseEvent; + error: ErrorEvent; +}; + +export declare type WebSocketPair = { + 0: WebSocket; + 1: WebSocket; +}; + +export declare const WebSocketPair: { + new (): WebSocketPair; +}; + +export declare type Worker = ({ + modules?: Worker_Module[]; +} | { + serviceWorkerScript?: string; +} | { + inherit?: string; +}) & { + compatibilityDate?: string; + compatibilityFlags?: string[]; + bindings?: Worker_Binding[]; + globalOutbound?: ServiceDesignator; + cacheApiOutbound?: ServiceDesignator; + durableObjectNamespaces?: Worker_DurableObjectNamespace[]; + durableObjectUniqueKeyModifier?: string; + durableObjectStorage?: Worker_DurableObjectStorage; + moduleFallback?: string; +}; + +export declare type Worker_Binding = { + name?: string; +} & ({ + parameter?: Worker_Binding_Parameter; +} | { + text?: string; +} | { + data?: Uint8Array; +} | { + json?: string; +} | { + wasmModule?: Uint8Array; +} | { + cryptoKey?: Worker_Binding_CryptoKey; +} | { + service?: ServiceDesignator; +} | { + durableObjectNamespace?: Worker_Binding_DurableObjectNamespaceDesignator; +} | { + kvNamespace?: ServiceDesignator; +} | { + r2Bucket?: ServiceDesignator; +} | { + r2Admin?: ServiceDesignator; +} | { + wrapped?: Worker_Binding_WrappedBinding; +} | { + queue?: ServiceDesignator; +} | { + fromEnvironment?: string; +} | { + analyticsEngine?: ServiceDesignator; +} | { + hyperdrive?: Worker_Binding_Hyperdrive; +} | { + unsafeEval?: Void; +}); + +export declare type Worker_Binding_CryptoKey = ({ + raw?: Uint8Array; +} | { + hex?: string; +} | { + base64?: string; +} | { + pkcs8?: string; +} | { + spki?: string; +} | { + jwk?: string; +}) & { + algorithm?: Worker_Binding_CryptoKey_Algorithm; + extractable?: boolean; + usages?: Worker_Binding_CryptoKey_Usage[]; +}; + +export declare type Worker_Binding_CryptoKey_Algorithm = { + name?: string; +} | { + json?: string; +}; + +export declare const Worker_Binding_CryptoKey_Usage: { + readonly ENCRYPT: 0; + readonly DECRYPT: 1; + readonly SIGN: 2; + readonly VERIFY: 3; + readonly DERIVE_KEY: 4; + readonly DERIVE_BITS: 5; + readonly WRAP_KEY: 6; + readonly UNWRAP_KEY: 7; +}; + +export declare type Worker_Binding_CryptoKey_Usage = (typeof Worker_Binding_CryptoKey_Usage)[keyof typeof Worker_Binding_CryptoKey_Usage]; + +export declare type Worker_Binding_DurableObjectNamespaceDesignator = { + className?: string; + serviceName?: string; +}; + +export declare interface Worker_Binding_Hyperdrive { + designator?: ServiceDesignator; + database?: string; + user?: string; + password?: string; + scheme?: string; +} + +export declare interface Worker_Binding_MemoryCache { + id?: string; + limits?: Worker_Binding_MemoryCacheLimits; +} + +export declare interface Worker_Binding_MemoryCacheLimits { + maxKeys?: number; + maxValueSize?: number; + maxTotalValueSize?: number; +} + +export declare interface Worker_Binding_Parameter { + type?: Worker_Binding_Type; + optional?: boolean; +} + +export declare const WORKER_BINDING_SERVICE_LOOPBACK: Worker_Binding; + +export declare type Worker_Binding_Type = { + text?: Void; +} | { + data?: Void; +} | { + json?: Void; +} | { + wasm?: Void; +} | { + cryptoKey?: Worker_Binding_CryptoKey_Usage[]; +} | { + service?: Void; +} | { + durableObjectNamespace: Void; +} | { + kvNamespace?: Void; +} | { + r2Bucket?: Void; +} | { + r2Admin?: Void; +} | { + queue?: Void; +} | { + analyticsEngine?: Void; +} | { + hyperdrive?: Void; +}; + +export declare interface Worker_Binding_WrappedBinding { + moduleName?: string; + entrypoint?: string; + innerBindings?: Worker_Binding[]; +} + +export declare type Worker_DurableObjectNamespace = { + className?: string; + preventEviction?: boolean; + enableSql?: boolean; +} & ({ + uniqueKey?: string; +} | { + ephemeralLocal?: Void; +}); + +export declare type Worker_DurableObjectStorage = { + none?: Void; +} | { + inMemory?: Void; +} | { + localDisk?: string; +}; + +export declare type Worker_Module = { + name: string; +} & ({ + esModule?: string; +} | { + commonJsModule?: string; +} | { + text?: string; +} | { + data?: Uint8Array; +} | { + wasm?: Uint8Array; +} | { + json?: string; +} | { + nodeJsCompatModule?: string; +} | { + pythonModule?: string; +} | { + pythonRequirement?: string; +}); + +export declare type WorkerOptions = z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input; + +export declare interface WorkerRoute { + target: string; + route: string; + specificity: number; + protocol?: string; + allowHostnamePrefix: boolean; + hostname: string; + path: string; + allowPathSuffix: boolean; +} + +export declare const WORKFLOWS_PLUGIN: Plugin; + +export declare const WORKFLOWS_PLUGIN_NAME = "workflows"; + +export declare const WORKFLOWS_STORAGE_SERVICE_NAME = "workflows:storage"; + +export declare const WorkflowsOptionsSchema: z.ZodObject<{ + workflows: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + name: string; + className: string; + scriptName?: string | undefined; + }, { + name: string; + className: string; + scriptName?: string | undefined; + }>>>; +}, "strip", z.ZodTypeAny, { + workflows?: Record | undefined; +}, { + workflows?: Record | undefined; +}>; + +export declare const WorkflowsSharedOptionsSchema: z.ZodObject<{ + workflowsPersist: z.ZodOptional]>>; +}, "strip", z.ZodTypeAny, { + workflowsPersist?: string | boolean | undefined; +}, { + workflowsPersist?: string | boolean | undefined; +}>; + +export declare type WrappedBindingNames = Set; + +export declare function zAwaitable(type: T): z.ZodUnion<[T, z.ZodPromise]>; + +export { } diff --git a/node_modules/miniflare/dist/src/index.js b/node_modules/miniflare/dist/src/index.js new file mode 100644 index 0000000..f178283 --- /dev/null +++ b/node_modules/miniflare/dist/src/index.js @@ -0,0 +1,16088 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// ../../node_modules/.pnpm/ignore@5.3.1/node_modules/ignore/index.js +var require_ignore = __commonJS({ + "../../node_modules/.pnpm/ignore@5.3.1/node_modules/ignore/index.js"(exports2, module2) { + "use strict"; + function makeArray(subject) { + return Array.isArray(subject) ? subject : [subject]; + } + var EMPTY = ""; + var SPACE = " "; + var ESCAPE = "\\"; + var REGEX_TEST_BLANK_LINE = /^\s+$/; + var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/; + var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; + var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; + var REGEX_SPLITALL_CRLF = /\r?\n/g; + var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; + var SLASH = "/"; + var TMP_KEY_IGNORE = "node-ignore"; + if (typeof Symbol !== "undefined") { + TMP_KEY_IGNORE = Symbol.for("node-ignore"); + } + var KEY_IGNORE = TMP_KEY_IGNORE; + var define = (object, key, value) => Object.defineProperty(object, key, { value }); + var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; + var RETURN_FALSE = () => false; + var sanitizeRange = (range) => range.replace( + REGEX_REGEXP_RANGE, + (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY + ); + var cleanRangeBackSlash = (slashes) => { + const { length } = slashes; + return slashes.slice(0, length - length % 2); + }; + var REPLACERS = [ + [ + // remove BOM + // TODO: + // Other similar zero-width characters? + /^\uFEFF/, + () => EMPTY + ], + // > Trailing spaces are ignored unless they are quoted with backslash ("\") + [ + // (a\ ) -> (a ) + // (a ) -> (a) + // (a \ ) -> (a ) + /\\?\s+$/, + (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY + ], + // replace (\ ) with ' ' + [ + /\\\s/g, + () => SPACE + ], + // Escape metacharacters + // which is written down by users but means special for regular expressions. + // > There are 12 characters with special meanings: + // > - the backslash \, + // > - the caret ^, + // > - the dollar sign $, + // > - the period or dot ., + // > - the vertical bar or pipe symbol |, + // > - the question mark ?, + // > - the asterisk or star *, + // > - the plus sign +, + // > - the opening parenthesis (, + // > - the closing parenthesis ), + // > - and the opening square bracket [, + // > - the opening curly brace {, + // > These special characters are often called "metacharacters". + [ + /[\\$.|*+(){^]/g, + (match) => `\\${match}` + ], + [ + // > a question mark (?) matches a single character + /(?!\\)\?/g, + () => "[^/]" + ], + // leading slash + [ + // > A leading slash matches the beginning of the pathname. + // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". + // A leading slash matches the beginning of the pathname + /^\//, + () => "^" + ], + // replace special metacharacter slash after the leading slash + [ + /\//g, + () => "\\/" + ], + [ + // > A leading "**" followed by a slash means match in all directories. + // > For example, "**/foo" matches file or directory "foo" anywhere, + // > the same as pattern "foo". + // > "**/foo/bar" matches file or directory "bar" anywhere that is directly + // > under directory "foo". + // Notice that the '*'s have been replaced as '\\*' + /^\^*\\\*\\\*\\\//, + // '**/foo' <-> 'foo' + () => "^(?:.*\\/)?" + ], + // starting + [ + // there will be no leading '/' + // (which has been replaced by section "leading slash") + // If starts with '**', adding a '^' to the regular expression also works + /^(?=[^^])/, + function startingReplacer() { + return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^"; + } + ], + // two globstars + [ + // Use lookahead assertions so that we could match more than one `'/**'` + /\\\/\\\*\\\*(?=\\\/|$)/g, + // Zero, one or several directories + // should not use '*', or it will be replaced by the next replacer + // Check if it is not the last `'/**'` + (_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+" + ], + // normal intermediate wildcards + [ + // Never replace escaped '*' + // ignore rule '\*' will match the path '*' + // 'abc.*/' -> go + // 'abc.*' -> skip this rule, + // coz trailing single wildcard will be handed by [trailing wildcard] + /(^|[^\\]+)(\\\*)+(?=.+)/g, + // '*.js' matches '.js' + // '*.js' doesn't match 'abc' + (_, p1, p2) => { + const unescaped = p2.replace(/\\\*/g, "[^\\/]*"); + return p1 + unescaped; + } + ], + [ + // unescape, revert step 3 except for back slash + // For example, if a user escape a '\\*', + // after step 3, the result will be '\\\\\\*' + /\\\\\\(?=[$.|*+(){^])/g, + () => ESCAPE + ], + [ + // '\\\\' -> '\\' + /\\\\/g, + () => ESCAPE + ], + [ + // > The range notation, e.g. [a-zA-Z], + // > can be used to match one of the characters in a range. + // `\` is escaped by step 3 + /(\\)?\[([^\]/]*?)(\\*)($|\])/g, + (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]" + ], + // ending + [ + // 'js' will not match 'js.' + // 'ab' will not match 'abc' + /(?:[^*])$/, + // WTF! + // https://git-scm.com/docs/gitignore + // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) + // which re-fixes #24, #38 + // > If there is a separator at the end of the pattern then the pattern + // > will only match directories, otherwise the pattern can match both + // > files and directories. + // 'js*' will not match 'a.js' + // 'js/' will not match 'a.js' + // 'js' will match 'a.js' and 'a.js/' + (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` + ], + // trailing wildcard + [ + /(\^|\\\/)?\\\*$/, + (_, p1) => { + const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; + return `${prefix}(?=$|\\/$)`; + } + ] + ]; + var regexCache = /* @__PURE__ */ Object.create(null); + var makeRegex = (pattern, ignoreCase) => { + let source = regexCache[pattern]; + if (!source) { + source = REPLACERS.reduce( + (prev, current) => prev.replace(current[0], current[1].bind(pattern)), + pattern + ); + regexCache[pattern] = source; + } + return ignoreCase ? new RegExp(source, "i") : new RegExp(source); + }; + var isString = (subject) => typeof subject === "string"; + var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; + var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); + var IgnoreRule = class { + constructor(origin, pattern, negative, regex) { + this.origin = origin; + this.pattern = pattern; + this.negative = negative; + this.regex = regex; + } + }; + var createRule = (pattern, ignoreCase) => { + const origin = pattern; + let negative = false; + if (pattern.indexOf("!") === 0) { + negative = true; + pattern = pattern.substr(1); + } + pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); + const regex = makeRegex(pattern, ignoreCase); + return new IgnoreRule( + origin, + pattern, + negative, + regex + ); + }; + var throwError = (message, Ctor) => { + throw new Ctor(message); + }; + var checkPath = (path30, originalPath, doThrow) => { + if (!isString(path30)) { + return doThrow( + `path must be a string, but got \`${originalPath}\``, + TypeError + ); + } + if (!path30) { + return doThrow(`path must not be empty`, TypeError); + } + if (checkPath.isNotRelative(path30)) { + const r = "`path.relative()`d"; + return doThrow( + `path should be a ${r} string, but got "${originalPath}"`, + RangeError + ); + } + return true; + }; + var isNotRelative = (path30) => REGEX_TEST_INVALID_PATH.test(path30); + checkPath.isNotRelative = isNotRelative; + checkPath.convert = (p) => p; + var Ignore = class { + constructor({ + ignorecase = true, + ignoreCase = ignorecase, + allowRelativePaths = false + } = {}) { + define(this, KEY_IGNORE, true); + this._rules = []; + this._ignoreCase = ignoreCase; + this._allowRelativePaths = allowRelativePaths; + this._initCache(); + } + _initCache() { + this._ignoreCache = /* @__PURE__ */ Object.create(null); + this._testCache = /* @__PURE__ */ Object.create(null); + } + _addPattern(pattern) { + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules); + this._added = true; + return; + } + if (checkPattern(pattern)) { + const rule = createRule(pattern, this._ignoreCase); + this._added = true; + this._rules.push(rule); + } + } + // @param {Array | string | Ignore} pattern + add(pattern) { + this._added = false; + makeArray( + isString(pattern) ? splitPattern(pattern) : pattern + ).forEach(this._addPattern, this); + if (this._added) { + this._initCache(); + } + return this; + } + // legacy + addPattern(pattern) { + return this.add(pattern); + } + // | ignored : unignored + // negative | 0:0 | 0:1 | 1:0 | 1:1 + // -------- | ------- | ------- | ------- | -------- + // 0 | TEST | TEST | SKIP | X + // 1 | TESTIF | SKIP | TEST | X + // - SKIP: always skip + // - TEST: always test + // - TESTIF: only test if checkUnignored + // - X: that never happen + // @param {boolean} whether should check if the path is unignored, + // setting `checkUnignored` to `false` could reduce additional + // path matching. + // @returns {TestResult} true if a file is ignored + _testOne(path30, checkUnignored) { + let ignored2 = false; + let unignored = false; + this._rules.forEach((rule) => { + const { negative } = rule; + if (unignored === negative && ignored2 !== unignored || negative && !ignored2 && !unignored && !checkUnignored) { + return; + } + const matched = rule.regex.test(path30); + if (matched) { + ignored2 = !negative; + unignored = negative; + } + }); + return { + ignored: ignored2, + unignored + }; + } + // @returns {TestResult} + _test(originalPath, cache, checkUnignored, slices) { + const path30 = originalPath && checkPath.convert(originalPath); + checkPath( + path30, + originalPath, + this._allowRelativePaths ? RETURN_FALSE : throwError + ); + return this._t(path30, cache, checkUnignored, slices); + } + _t(path30, cache, checkUnignored, slices) { + if (path30 in cache) { + return cache[path30]; + } + if (!slices) { + slices = path30.split(SLASH); + } + slices.pop(); + if (!slices.length) { + return cache[path30] = this._testOne(path30, checkUnignored); + } + const parent = this._t( + slices.join(SLASH) + SLASH, + cache, + checkUnignored, + slices + ); + return cache[path30] = parent.ignored ? parent : this._testOne(path30, checkUnignored); + } + ignores(path30) { + return this._test(path30, this._ignoreCache, false).ignored; + } + createFilter() { + return (path30) => !this.ignores(path30); + } + filter(paths) { + return makeArray(paths).filter(this.createFilter()); + } + // @returns {TestResult} + test(path30) { + return this._test(path30, this._testCache, true); + } + }; + var factory = (options) => new Ignore(options); + var isPathValid = (path30) => checkPath(path30 && checkPath.convert(path30), path30, RETURN_FALSE); + factory.isPathValid = isPathValid; + factory.default = factory; + module2.exports = factory; + if ( + // Detect `process` so that it can run in browsers. + typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32") + ) { + const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/"); + checkPath.convert = makePosix; + const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; + checkPath.isNotRelative = (path30) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path30) || isNotRelative(path30); + } + } +}); + +// ../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/Mime.js +var require_Mime = __commonJS({ + "../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/Mime.js"(exports2, module2) { + "use strict"; + function Mime() { + this._types = /* @__PURE__ */ Object.create(null); + this._extensions = /* @__PURE__ */ Object.create(null); + for (let i = 0; i < arguments.length; i++) { + this.define(arguments[i]); + } + this.define = this.define.bind(this); + this.getType = this.getType.bind(this); + this.getExtension = this.getExtension.bind(this); + } + Mime.prototype.define = function(typeMap, force) { + for (let type in typeMap) { + let extensions = typeMap[type].map(function(t) { + return t.toLowerCase(); + }); + type = type.toLowerCase(); + for (let i = 0; i < extensions.length; i++) { + const ext = extensions[i]; + if (ext[0] === "*") { + continue; + } + if (!force && ext in this._types) { + throw new Error( + 'Attempt to change mapping for "' + ext + '" extension from "' + this._types[ext] + '" to "' + type + '". Pass `force=true` to allow this, otherwise remove "' + ext + '" from the list of extensions for "' + type + '".' + ); + } + this._types[ext] = type; + } + if (force || !this._extensions[type]) { + const ext = extensions[0]; + this._extensions[type] = ext[0] !== "*" ? ext : ext.substr(1); + } + } + }; + Mime.prototype.getType = function(path30) { + path30 = String(path30); + let last = path30.replace(/^.*[/\\]/, "").toLowerCase(); + let ext = last.replace(/^.*\./, "").toLowerCase(); + let hasPath = last.length < path30.length; + let hasDot = ext.length < last.length - 1; + return (hasDot || !hasPath) && this._types[ext] || null; + }; + Mime.prototype.getExtension = function(type) { + type = /^\s*([^;\s]*)/.test(type) && RegExp.$1; + return type && this._extensions[type.toLowerCase()] || null; + }; + module2.exports = Mime; + } +}); + +// ../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/types/standard.js +var require_standard = __commonJS({ + "../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/types/standard.js"(exports2, module2) { + "use strict"; + module2.exports = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["es", "ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/trig": ["trig"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] }; + } +}); + +// ../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/types/other.js +var require_other = __commonJS({ + "../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/types/other.js"(exports2, module2) { + "use strict"; + module2.exports = { "application/prs.cww": ["cww"], "application/vnd.1000minds.decision-model+xml": ["1km"], "application/vnd.3gpp.pic-bw-large": ["plb"], "application/vnd.3gpp.pic-bw-small": ["psb"], "application/vnd.3gpp.pic-bw-var": ["pvb"], "application/vnd.3gpp2.tcap": ["tcap"], "application/vnd.3m.post-it-notes": ["pwn"], "application/vnd.accpac.simply.aso": ["aso"], "application/vnd.accpac.simply.imp": ["imp"], "application/vnd.acucobol": ["acu"], "application/vnd.acucorp": ["atc", "acutc"], "application/vnd.adobe.air-application-installer-package+zip": ["air"], "application/vnd.adobe.formscentral.fcdt": ["fcdt"], "application/vnd.adobe.fxp": ["fxp", "fxpl"], "application/vnd.adobe.xdp+xml": ["xdp"], "application/vnd.adobe.xfdf": ["xfdf"], "application/vnd.ahead.space": ["ahead"], "application/vnd.airzip.filesecure.azf": ["azf"], "application/vnd.airzip.filesecure.azs": ["azs"], "application/vnd.amazon.ebook": ["azw"], "application/vnd.americandynamics.acc": ["acc"], "application/vnd.amiga.ami": ["ami"], "application/vnd.android.package-archive": ["apk"], "application/vnd.anser-web-certificate-issue-initiation": ["cii"], "application/vnd.anser-web-funds-transfer-initiation": ["fti"], "application/vnd.antix.game-component": ["atx"], "application/vnd.apple.installer+xml": ["mpkg"], "application/vnd.apple.keynote": ["key"], "application/vnd.apple.mpegurl": ["m3u8"], "application/vnd.apple.numbers": ["numbers"], "application/vnd.apple.pages": ["pages"], "application/vnd.apple.pkpass": ["pkpass"], "application/vnd.aristanetworks.swi": ["swi"], "application/vnd.astraea-software.iota": ["iota"], "application/vnd.audiograph": ["aep"], "application/vnd.balsamiq.bmml+xml": ["bmml"], "application/vnd.blueice.multipass": ["mpm"], "application/vnd.bmi": ["bmi"], "application/vnd.businessobjects": ["rep"], "application/vnd.chemdraw+xml": ["cdxml"], "application/vnd.chipnuts.karaoke-mmd": ["mmd"], "application/vnd.cinderella": ["cdy"], "application/vnd.citationstyles.style+xml": ["csl"], "application/vnd.claymore": ["cla"], "application/vnd.cloanto.rp9": ["rp9"], "application/vnd.clonk.c4group": ["c4g", "c4d", "c4f", "c4p", "c4u"], "application/vnd.cluetrust.cartomobile-config": ["c11amc"], "application/vnd.cluetrust.cartomobile-config-pkg": ["c11amz"], "application/vnd.commonspace": ["csp"], "application/vnd.contact.cmsg": ["cdbcmsg"], "application/vnd.cosmocaller": ["cmc"], "application/vnd.crick.clicker": ["clkx"], "application/vnd.crick.clicker.keyboard": ["clkk"], "application/vnd.crick.clicker.palette": ["clkp"], "application/vnd.crick.clicker.template": ["clkt"], "application/vnd.crick.clicker.wordbank": ["clkw"], "application/vnd.criticaltools.wbs+xml": ["wbs"], "application/vnd.ctc-posml": ["pml"], "application/vnd.cups-ppd": ["ppd"], "application/vnd.curl.car": ["car"], "application/vnd.curl.pcurl": ["pcurl"], "application/vnd.dart": ["dart"], "application/vnd.data-vision.rdz": ["rdz"], "application/vnd.dbf": ["dbf"], "application/vnd.dece.data": ["uvf", "uvvf", "uvd", "uvvd"], "application/vnd.dece.ttml+xml": ["uvt", "uvvt"], "application/vnd.dece.unspecified": ["uvx", "uvvx"], "application/vnd.dece.zip": ["uvz", "uvvz"], "application/vnd.denovo.fcselayout-link": ["fe_launch"], "application/vnd.dna": ["dna"], "application/vnd.dolby.mlp": ["mlp"], "application/vnd.dpgraph": ["dpg"], "application/vnd.dreamfactory": ["dfac"], "application/vnd.ds-keypoint": ["kpxx"], "application/vnd.dvb.ait": ["ait"], "application/vnd.dvb.service": ["svc"], "application/vnd.dynageo": ["geo"], "application/vnd.ecowin.chart": ["mag"], "application/vnd.enliven": ["nml"], "application/vnd.epson.esf": ["esf"], "application/vnd.epson.msf": ["msf"], "application/vnd.epson.quickanime": ["qam"], "application/vnd.epson.salt": ["slt"], "application/vnd.epson.ssf": ["ssf"], "application/vnd.eszigno3+xml": ["es3", "et3"], "application/vnd.ezpix-album": ["ez2"], "application/vnd.ezpix-package": ["ez3"], "application/vnd.fdf": ["fdf"], "application/vnd.fdsn.mseed": ["mseed"], "application/vnd.fdsn.seed": ["seed", "dataless"], "application/vnd.flographit": ["gph"], "application/vnd.fluxtime.clip": ["ftc"], "application/vnd.framemaker": ["fm", "frame", "maker", "book"], "application/vnd.frogans.fnc": ["fnc"], "application/vnd.frogans.ltf": ["ltf"], "application/vnd.fsc.weblaunch": ["fsc"], "application/vnd.fujitsu.oasys": ["oas"], "application/vnd.fujitsu.oasys2": ["oa2"], "application/vnd.fujitsu.oasys3": ["oa3"], "application/vnd.fujitsu.oasysgp": ["fg5"], "application/vnd.fujitsu.oasysprs": ["bh2"], "application/vnd.fujixerox.ddd": ["ddd"], "application/vnd.fujixerox.docuworks": ["xdw"], "application/vnd.fujixerox.docuworks.binder": ["xbd"], "application/vnd.fuzzysheet": ["fzs"], "application/vnd.genomatix.tuxedo": ["txd"], "application/vnd.geogebra.file": ["ggb"], "application/vnd.geogebra.tool": ["ggt"], "application/vnd.geometry-explorer": ["gex", "gre"], "application/vnd.geonext": ["gxt"], "application/vnd.geoplan": ["g2w"], "application/vnd.geospace": ["g3w"], "application/vnd.gmx": ["gmx"], "application/vnd.google-apps.document": ["gdoc"], "application/vnd.google-apps.presentation": ["gslides"], "application/vnd.google-apps.spreadsheet": ["gsheet"], "application/vnd.google-earth.kml+xml": ["kml"], "application/vnd.google-earth.kmz": ["kmz"], "application/vnd.grafeq": ["gqf", "gqs"], "application/vnd.groove-account": ["gac"], "application/vnd.groove-help": ["ghf"], "application/vnd.groove-identity-message": ["gim"], "application/vnd.groove-injector": ["grv"], "application/vnd.groove-tool-message": ["gtm"], "application/vnd.groove-tool-template": ["tpl"], "application/vnd.groove-vcard": ["vcg"], "application/vnd.hal+xml": ["hal"], "application/vnd.handheld-entertainment+xml": ["zmm"], "application/vnd.hbci": ["hbci"], "application/vnd.hhe.lesson-player": ["les"], "application/vnd.hp-hpgl": ["hpgl"], "application/vnd.hp-hpid": ["hpid"], "application/vnd.hp-hps": ["hps"], "application/vnd.hp-jlyt": ["jlt"], "application/vnd.hp-pcl": ["pcl"], "application/vnd.hp-pclxl": ["pclxl"], "application/vnd.hydrostatix.sof-data": ["sfd-hdstx"], "application/vnd.ibm.minipay": ["mpy"], "application/vnd.ibm.modcap": ["afp", "listafp", "list3820"], "application/vnd.ibm.rights-management": ["irm"], "application/vnd.ibm.secure-container": ["sc"], "application/vnd.iccprofile": ["icc", "icm"], "application/vnd.igloader": ["igl"], "application/vnd.immervision-ivp": ["ivp"], "application/vnd.immervision-ivu": ["ivu"], "application/vnd.insors.igm": ["igm"], "application/vnd.intercon.formnet": ["xpw", "xpx"], "application/vnd.intergeo": ["i2g"], "application/vnd.intu.qbo": ["qbo"], "application/vnd.intu.qfx": ["qfx"], "application/vnd.ipunplugged.rcprofile": ["rcprofile"], "application/vnd.irepository.package+xml": ["irp"], "application/vnd.is-xpr": ["xpr"], "application/vnd.isac.fcs": ["fcs"], "application/vnd.jam": ["jam"], "application/vnd.jcp.javame.midlet-rms": ["rms"], "application/vnd.jisp": ["jisp"], "application/vnd.joost.joda-archive": ["joda"], "application/vnd.kahootz": ["ktz", "ktr"], "application/vnd.kde.karbon": ["karbon"], "application/vnd.kde.kchart": ["chrt"], "application/vnd.kde.kformula": ["kfo"], "application/vnd.kde.kivio": ["flw"], "application/vnd.kde.kontour": ["kon"], "application/vnd.kde.kpresenter": ["kpr", "kpt"], "application/vnd.kde.kspread": ["ksp"], "application/vnd.kde.kword": ["kwd", "kwt"], "application/vnd.kenameaapp": ["htke"], "application/vnd.kidspiration": ["kia"], "application/vnd.kinar": ["kne", "knp"], "application/vnd.koan": ["skp", "skd", "skt", "skm"], "application/vnd.kodak-descriptor": ["sse"], "application/vnd.las.las+xml": ["lasxml"], "application/vnd.llamagraphics.life-balance.desktop": ["lbd"], "application/vnd.llamagraphics.life-balance.exchange+xml": ["lbe"], "application/vnd.lotus-1-2-3": ["123"], "application/vnd.lotus-approach": ["apr"], "application/vnd.lotus-freelance": ["pre"], "application/vnd.lotus-notes": ["nsf"], "application/vnd.lotus-organizer": ["org"], "application/vnd.lotus-screencam": ["scm"], "application/vnd.lotus-wordpro": ["lwp"], "application/vnd.macports.portpkg": ["portpkg"], "application/vnd.mapbox-vector-tile": ["mvt"], "application/vnd.mcd": ["mcd"], "application/vnd.medcalcdata": ["mc1"], "application/vnd.mediastation.cdkey": ["cdkey"], "application/vnd.mfer": ["mwf"], "application/vnd.mfmp": ["mfm"], "application/vnd.micrografx.flo": ["flo"], "application/vnd.micrografx.igx": ["igx"], "application/vnd.mif": ["mif"], "application/vnd.mobius.daf": ["daf"], "application/vnd.mobius.dis": ["dis"], "application/vnd.mobius.mbk": ["mbk"], "application/vnd.mobius.mqy": ["mqy"], "application/vnd.mobius.msl": ["msl"], "application/vnd.mobius.plc": ["plc"], "application/vnd.mobius.txf": ["txf"], "application/vnd.mophun.application": ["mpn"], "application/vnd.mophun.certificate": ["mpc"], "application/vnd.mozilla.xul+xml": ["xul"], "application/vnd.ms-artgalry": ["cil"], "application/vnd.ms-cab-compressed": ["cab"], "application/vnd.ms-excel": ["xls", "xlm", "xla", "xlc", "xlt", "xlw"], "application/vnd.ms-excel.addin.macroenabled.12": ["xlam"], "application/vnd.ms-excel.sheet.binary.macroenabled.12": ["xlsb"], "application/vnd.ms-excel.sheet.macroenabled.12": ["xlsm"], "application/vnd.ms-excel.template.macroenabled.12": ["xltm"], "application/vnd.ms-fontobject": ["eot"], "application/vnd.ms-htmlhelp": ["chm"], "application/vnd.ms-ims": ["ims"], "application/vnd.ms-lrm": ["lrm"], "application/vnd.ms-officetheme": ["thmx"], "application/vnd.ms-outlook": ["msg"], "application/vnd.ms-pki.seccat": ["cat"], "application/vnd.ms-pki.stl": ["*stl"], "application/vnd.ms-powerpoint": ["ppt", "pps", "pot"], "application/vnd.ms-powerpoint.addin.macroenabled.12": ["ppam"], "application/vnd.ms-powerpoint.presentation.macroenabled.12": ["pptm"], "application/vnd.ms-powerpoint.slide.macroenabled.12": ["sldm"], "application/vnd.ms-powerpoint.slideshow.macroenabled.12": ["ppsm"], "application/vnd.ms-powerpoint.template.macroenabled.12": ["potm"], "application/vnd.ms-project": ["mpp", "mpt"], "application/vnd.ms-word.document.macroenabled.12": ["docm"], "application/vnd.ms-word.template.macroenabled.12": ["dotm"], "application/vnd.ms-works": ["wps", "wks", "wcm", "wdb"], "application/vnd.ms-wpl": ["wpl"], "application/vnd.ms-xpsdocument": ["xps"], "application/vnd.mseq": ["mseq"], "application/vnd.musician": ["mus"], "application/vnd.muvee.style": ["msty"], "application/vnd.mynfc": ["taglet"], "application/vnd.neurolanguage.nlu": ["nlu"], "application/vnd.nitf": ["ntf", "nitf"], "application/vnd.noblenet-directory": ["nnd"], "application/vnd.noblenet-sealer": ["nns"], "application/vnd.noblenet-web": ["nnw"], "application/vnd.nokia.n-gage.ac+xml": ["*ac"], "application/vnd.nokia.n-gage.data": ["ngdat"], "application/vnd.nokia.n-gage.symbian.install": ["n-gage"], "application/vnd.nokia.radio-preset": ["rpst"], "application/vnd.nokia.radio-presets": ["rpss"], "application/vnd.novadigm.edm": ["edm"], "application/vnd.novadigm.edx": ["edx"], "application/vnd.novadigm.ext": ["ext"], "application/vnd.oasis.opendocument.chart": ["odc"], "application/vnd.oasis.opendocument.chart-template": ["otc"], "application/vnd.oasis.opendocument.database": ["odb"], "application/vnd.oasis.opendocument.formula": ["odf"], "application/vnd.oasis.opendocument.formula-template": ["odft"], "application/vnd.oasis.opendocument.graphics": ["odg"], "application/vnd.oasis.opendocument.graphics-template": ["otg"], "application/vnd.oasis.opendocument.image": ["odi"], "application/vnd.oasis.opendocument.image-template": ["oti"], "application/vnd.oasis.opendocument.presentation": ["odp"], "application/vnd.oasis.opendocument.presentation-template": ["otp"], "application/vnd.oasis.opendocument.spreadsheet": ["ods"], "application/vnd.oasis.opendocument.spreadsheet-template": ["ots"], "application/vnd.oasis.opendocument.text": ["odt"], "application/vnd.oasis.opendocument.text-master": ["odm"], "application/vnd.oasis.opendocument.text-template": ["ott"], "application/vnd.oasis.opendocument.text-web": ["oth"], "application/vnd.olpc-sugar": ["xo"], "application/vnd.oma.dd2+xml": ["dd2"], "application/vnd.openblox.game+xml": ["obgx"], "application/vnd.openofficeorg.extension": ["oxt"], "application/vnd.openstreetmap.data+xml": ["osm"], "application/vnd.openxmlformats-officedocument.presentationml.presentation": ["pptx"], "application/vnd.openxmlformats-officedocument.presentationml.slide": ["sldx"], "application/vnd.openxmlformats-officedocument.presentationml.slideshow": ["ppsx"], "application/vnd.openxmlformats-officedocument.presentationml.template": ["potx"], "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ["xlsx"], "application/vnd.openxmlformats-officedocument.spreadsheetml.template": ["xltx"], "application/vnd.openxmlformats-officedocument.wordprocessingml.document": ["docx"], "application/vnd.openxmlformats-officedocument.wordprocessingml.template": ["dotx"], "application/vnd.osgeo.mapguide.package": ["mgp"], "application/vnd.osgi.dp": ["dp"], "application/vnd.osgi.subsystem": ["esa"], "application/vnd.palm": ["pdb", "pqa", "oprc"], "application/vnd.pawaafile": ["paw"], "application/vnd.pg.format": ["str"], "application/vnd.pg.osasli": ["ei6"], "application/vnd.picsel": ["efif"], "application/vnd.pmi.widget": ["wg"], "application/vnd.pocketlearn": ["plf"], "application/vnd.powerbuilder6": ["pbd"], "application/vnd.previewsystems.box": ["box"], "application/vnd.proteus.magazine": ["mgz"], "application/vnd.publishare-delta-tree": ["qps"], "application/vnd.pvi.ptid1": ["ptid"], "application/vnd.quark.quarkxpress": ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"], "application/vnd.rar": ["rar"], "application/vnd.realvnc.bed": ["bed"], "application/vnd.recordare.musicxml": ["mxl"], "application/vnd.recordare.musicxml+xml": ["musicxml"], "application/vnd.rig.cryptonote": ["cryptonote"], "application/vnd.rim.cod": ["cod"], "application/vnd.rn-realmedia": ["rm"], "application/vnd.rn-realmedia-vbr": ["rmvb"], "application/vnd.route66.link66+xml": ["link66"], "application/vnd.sailingtracker.track": ["st"], "application/vnd.seemail": ["see"], "application/vnd.sema": ["sema"], "application/vnd.semd": ["semd"], "application/vnd.semf": ["semf"], "application/vnd.shana.informed.formdata": ["ifm"], "application/vnd.shana.informed.formtemplate": ["itp"], "application/vnd.shana.informed.interchange": ["iif"], "application/vnd.shana.informed.package": ["ipk"], "application/vnd.simtech-mindmapper": ["twd", "twds"], "application/vnd.smaf": ["mmf"], "application/vnd.smart.teacher": ["teacher"], "application/vnd.software602.filler.form+xml": ["fo"], "application/vnd.solent.sdkm+xml": ["sdkm", "sdkd"], "application/vnd.spotfire.dxp": ["dxp"], "application/vnd.spotfire.sfs": ["sfs"], "application/vnd.stardivision.calc": ["sdc"], "application/vnd.stardivision.draw": ["sda"], "application/vnd.stardivision.impress": ["sdd"], "application/vnd.stardivision.math": ["smf"], "application/vnd.stardivision.writer": ["sdw", "vor"], "application/vnd.stardivision.writer-global": ["sgl"], "application/vnd.stepmania.package": ["smzip"], "application/vnd.stepmania.stepchart": ["sm"], "application/vnd.sun.wadl+xml": ["wadl"], "application/vnd.sun.xml.calc": ["sxc"], "application/vnd.sun.xml.calc.template": ["stc"], "application/vnd.sun.xml.draw": ["sxd"], "application/vnd.sun.xml.draw.template": ["std"], "application/vnd.sun.xml.impress": ["sxi"], "application/vnd.sun.xml.impress.template": ["sti"], "application/vnd.sun.xml.math": ["sxm"], "application/vnd.sun.xml.writer": ["sxw"], "application/vnd.sun.xml.writer.global": ["sxg"], "application/vnd.sun.xml.writer.template": ["stw"], "application/vnd.sus-calendar": ["sus", "susp"], "application/vnd.svd": ["svd"], "application/vnd.symbian.install": ["sis", "sisx"], "application/vnd.syncml+xml": ["xsm"], "application/vnd.syncml.dm+wbxml": ["bdm"], "application/vnd.syncml.dm+xml": ["xdm"], "application/vnd.syncml.dmddf+xml": ["ddf"], "application/vnd.tao.intent-module-archive": ["tao"], "application/vnd.tcpdump.pcap": ["pcap", "cap", "dmp"], "application/vnd.tmobile-livetv": ["tmo"], "application/vnd.trid.tpt": ["tpt"], "application/vnd.triscape.mxs": ["mxs"], "application/vnd.trueapp": ["tra"], "application/vnd.ufdl": ["ufd", "ufdl"], "application/vnd.uiq.theme": ["utz"], "application/vnd.umajin": ["umj"], "application/vnd.unity": ["unityweb"], "application/vnd.uoml+xml": ["uoml"], "application/vnd.vcx": ["vcx"], "application/vnd.visio": ["vsd", "vst", "vss", "vsw"], "application/vnd.visionary": ["vis"], "application/vnd.vsf": ["vsf"], "application/vnd.wap.wbxml": ["wbxml"], "application/vnd.wap.wmlc": ["wmlc"], "application/vnd.wap.wmlscriptc": ["wmlsc"], "application/vnd.webturbo": ["wtb"], "application/vnd.wolfram.player": ["nbp"], "application/vnd.wordperfect": ["wpd"], "application/vnd.wqd": ["wqd"], "application/vnd.wt.stf": ["stf"], "application/vnd.xara": ["xar"], "application/vnd.xfdl": ["xfdl"], "application/vnd.yamaha.hv-dic": ["hvd"], "application/vnd.yamaha.hv-script": ["hvs"], "application/vnd.yamaha.hv-voice": ["hvp"], "application/vnd.yamaha.openscoreformat": ["osf"], "application/vnd.yamaha.openscoreformat.osfpvg+xml": ["osfpvg"], "application/vnd.yamaha.smaf-audio": ["saf"], "application/vnd.yamaha.smaf-phrase": ["spf"], "application/vnd.yellowriver-custom-menu": ["cmp"], "application/vnd.zul": ["zir", "zirz"], "application/vnd.zzazz.deck+xml": ["zaz"], "application/x-7z-compressed": ["7z"], "application/x-abiword": ["abw"], "application/x-ace-compressed": ["ace"], "application/x-apple-diskimage": ["*dmg"], "application/x-arj": ["arj"], "application/x-authorware-bin": ["aab", "x32", "u32", "vox"], "application/x-authorware-map": ["aam"], "application/x-authorware-seg": ["aas"], "application/x-bcpio": ["bcpio"], "application/x-bdoc": ["*bdoc"], "application/x-bittorrent": ["torrent"], "application/x-blorb": ["blb", "blorb"], "application/x-bzip": ["bz"], "application/x-bzip2": ["bz2", "boz"], "application/x-cbr": ["cbr", "cba", "cbt", "cbz", "cb7"], "application/x-cdlink": ["vcd"], "application/x-cfs-compressed": ["cfs"], "application/x-chat": ["chat"], "application/x-chess-pgn": ["pgn"], "application/x-chrome-extension": ["crx"], "application/x-cocoa": ["cco"], "application/x-conference": ["nsc"], "application/x-cpio": ["cpio"], "application/x-csh": ["csh"], "application/x-debian-package": ["*deb", "udeb"], "application/x-dgc-compressed": ["dgc"], "application/x-director": ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"], "application/x-doom": ["wad"], "application/x-dtbncx+xml": ["ncx"], "application/x-dtbook+xml": ["dtb"], "application/x-dtbresource+xml": ["res"], "application/x-dvi": ["dvi"], "application/x-envoy": ["evy"], "application/x-eva": ["eva"], "application/x-font-bdf": ["bdf"], "application/x-font-ghostscript": ["gsf"], "application/x-font-linux-psf": ["psf"], "application/x-font-pcf": ["pcf"], "application/x-font-snf": ["snf"], "application/x-font-type1": ["pfa", "pfb", "pfm", "afm"], "application/x-freearc": ["arc"], "application/x-futuresplash": ["spl"], "application/x-gca-compressed": ["gca"], "application/x-glulx": ["ulx"], "application/x-gnumeric": ["gnumeric"], "application/x-gramps-xml": ["gramps"], "application/x-gtar": ["gtar"], "application/x-hdf": ["hdf"], "application/x-httpd-php": ["php"], "application/x-install-instructions": ["install"], "application/x-iso9660-image": ["*iso"], "application/x-iwork-keynote-sffkey": ["*key"], "application/x-iwork-numbers-sffnumbers": ["*numbers"], "application/x-iwork-pages-sffpages": ["*pages"], "application/x-java-archive-diff": ["jardiff"], "application/x-java-jnlp-file": ["jnlp"], "application/x-keepass2": ["kdbx"], "application/x-latex": ["latex"], "application/x-lua-bytecode": ["luac"], "application/x-lzh-compressed": ["lzh", "lha"], "application/x-makeself": ["run"], "application/x-mie": ["mie"], "application/x-mobipocket-ebook": ["prc", "mobi"], "application/x-ms-application": ["application"], "application/x-ms-shortcut": ["lnk"], "application/x-ms-wmd": ["wmd"], "application/x-ms-wmz": ["wmz"], "application/x-ms-xbap": ["xbap"], "application/x-msaccess": ["mdb"], "application/x-msbinder": ["obd"], "application/x-mscardfile": ["crd"], "application/x-msclip": ["clp"], "application/x-msdos-program": ["*exe"], "application/x-msdownload": ["*exe", "*dll", "com", "bat", "*msi"], "application/x-msmediaview": ["mvb", "m13", "m14"], "application/x-msmetafile": ["*wmf", "*wmz", "*emf", "emz"], "application/x-msmoney": ["mny"], "application/x-mspublisher": ["pub"], "application/x-msschedule": ["scd"], "application/x-msterminal": ["trm"], "application/x-mswrite": ["wri"], "application/x-netcdf": ["nc", "cdf"], "application/x-ns-proxy-autoconfig": ["pac"], "application/x-nzb": ["nzb"], "application/x-perl": ["pl", "pm"], "application/x-pilot": ["*prc", "*pdb"], "application/x-pkcs12": ["p12", "pfx"], "application/x-pkcs7-certificates": ["p7b", "spc"], "application/x-pkcs7-certreqresp": ["p7r"], "application/x-rar-compressed": ["*rar"], "application/x-redhat-package-manager": ["rpm"], "application/x-research-info-systems": ["ris"], "application/x-sea": ["sea"], "application/x-sh": ["sh"], "application/x-shar": ["shar"], "application/x-shockwave-flash": ["swf"], "application/x-silverlight-app": ["xap"], "application/x-sql": ["sql"], "application/x-stuffit": ["sit"], "application/x-stuffitx": ["sitx"], "application/x-subrip": ["srt"], "application/x-sv4cpio": ["sv4cpio"], "application/x-sv4crc": ["sv4crc"], "application/x-t3vm-image": ["t3"], "application/x-tads": ["gam"], "application/x-tar": ["tar"], "application/x-tcl": ["tcl", "tk"], "application/x-tex": ["tex"], "application/x-tex-tfm": ["tfm"], "application/x-texinfo": ["texinfo", "texi"], "application/x-tgif": ["*obj"], "application/x-ustar": ["ustar"], "application/x-virtualbox-hdd": ["hdd"], "application/x-virtualbox-ova": ["ova"], "application/x-virtualbox-ovf": ["ovf"], "application/x-virtualbox-vbox": ["vbox"], "application/x-virtualbox-vbox-extpack": ["vbox-extpack"], "application/x-virtualbox-vdi": ["vdi"], "application/x-virtualbox-vhd": ["vhd"], "application/x-virtualbox-vmdk": ["vmdk"], "application/x-wais-source": ["src"], "application/x-web-app-manifest+json": ["webapp"], "application/x-x509-ca-cert": ["der", "crt", "pem"], "application/x-xfig": ["fig"], "application/x-xliff+xml": ["*xlf"], "application/x-xpinstall": ["xpi"], "application/x-xz": ["xz"], "application/x-zmachine": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"], "audio/vnd.dece.audio": ["uva", "uvva"], "audio/vnd.digital-winds": ["eol"], "audio/vnd.dra": ["dra"], "audio/vnd.dts": ["dts"], "audio/vnd.dts.hd": ["dtshd"], "audio/vnd.lucent.voice": ["lvp"], "audio/vnd.ms-playready.media.pya": ["pya"], "audio/vnd.nuera.ecelp4800": ["ecelp4800"], "audio/vnd.nuera.ecelp7470": ["ecelp7470"], "audio/vnd.nuera.ecelp9600": ["ecelp9600"], "audio/vnd.rip": ["rip"], "audio/x-aac": ["aac"], "audio/x-aiff": ["aif", "aiff", "aifc"], "audio/x-caf": ["caf"], "audio/x-flac": ["flac"], "audio/x-m4a": ["*m4a"], "audio/x-matroska": ["mka"], "audio/x-mpegurl": ["m3u"], "audio/x-ms-wax": ["wax"], "audio/x-ms-wma": ["wma"], "audio/x-pn-realaudio": ["ram", "ra"], "audio/x-pn-realaudio-plugin": ["rmp"], "audio/x-realaudio": ["*ra"], "audio/x-wav": ["*wav"], "chemical/x-cdx": ["cdx"], "chemical/x-cif": ["cif"], "chemical/x-cmdf": ["cmdf"], "chemical/x-cml": ["cml"], "chemical/x-csml": ["csml"], "chemical/x-xyz": ["xyz"], "image/prs.btif": ["btif"], "image/prs.pti": ["pti"], "image/vnd.adobe.photoshop": ["psd"], "image/vnd.airzip.accelerator.azv": ["azv"], "image/vnd.dece.graphic": ["uvi", "uvvi", "uvg", "uvvg"], "image/vnd.djvu": ["djvu", "djv"], "image/vnd.dvb.subtitle": ["*sub"], "image/vnd.dwg": ["dwg"], "image/vnd.dxf": ["dxf"], "image/vnd.fastbidsheet": ["fbs"], "image/vnd.fpx": ["fpx"], "image/vnd.fst": ["fst"], "image/vnd.fujixerox.edmics-mmr": ["mmr"], "image/vnd.fujixerox.edmics-rlc": ["rlc"], "image/vnd.microsoft.icon": ["ico"], "image/vnd.ms-dds": ["dds"], "image/vnd.ms-modi": ["mdi"], "image/vnd.ms-photo": ["wdp"], "image/vnd.net-fpx": ["npx"], "image/vnd.pco.b16": ["b16"], "image/vnd.tencent.tap": ["tap"], "image/vnd.valve.source.texture": ["vtf"], "image/vnd.wap.wbmp": ["wbmp"], "image/vnd.xiff": ["xif"], "image/vnd.zbrush.pcx": ["pcx"], "image/x-3ds": ["3ds"], "image/x-cmu-raster": ["ras"], "image/x-cmx": ["cmx"], "image/x-freehand": ["fh", "fhc", "fh4", "fh5", "fh7"], "image/x-icon": ["*ico"], "image/x-jng": ["jng"], "image/x-mrsid-image": ["sid"], "image/x-ms-bmp": ["*bmp"], "image/x-pcx": ["*pcx"], "image/x-pict": ["pic", "pct"], "image/x-portable-anymap": ["pnm"], "image/x-portable-bitmap": ["pbm"], "image/x-portable-graymap": ["pgm"], "image/x-portable-pixmap": ["ppm"], "image/x-rgb": ["rgb"], "image/x-tga": ["tga"], "image/x-xbitmap": ["xbm"], "image/x-xpixmap": ["xpm"], "image/x-xwindowdump": ["xwd"], "message/vnd.wfa.wsc": ["wsc"], "model/vnd.collada+xml": ["dae"], "model/vnd.dwf": ["dwf"], "model/vnd.gdl": ["gdl"], "model/vnd.gtw": ["gtw"], "model/vnd.mts": ["mts"], "model/vnd.opengex": ["ogex"], "model/vnd.parasolid.transmit.binary": ["x_b"], "model/vnd.parasolid.transmit.text": ["x_t"], "model/vnd.sap.vds": ["vds"], "model/vnd.usdz+zip": ["usdz"], "model/vnd.valve.source.compiled-map": ["bsp"], "model/vnd.vtu": ["vtu"], "text/prs.lines.tag": ["dsc"], "text/vnd.curl": ["curl"], "text/vnd.curl.dcurl": ["dcurl"], "text/vnd.curl.mcurl": ["mcurl"], "text/vnd.curl.scurl": ["scurl"], "text/vnd.dvb.subtitle": ["sub"], "text/vnd.fly": ["fly"], "text/vnd.fmi.flexstor": ["flx"], "text/vnd.graphviz": ["gv"], "text/vnd.in3d.3dml": ["3dml"], "text/vnd.in3d.spot": ["spot"], "text/vnd.sun.j2me.app-descriptor": ["jad"], "text/vnd.wap.wml": ["wml"], "text/vnd.wap.wmlscript": ["wmls"], "text/x-asm": ["s", "asm"], "text/x-c": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"], "text/x-component": ["htc"], "text/x-fortran": ["f", "for", "f77", "f90"], "text/x-handlebars-template": ["hbs"], "text/x-java-source": ["java"], "text/x-lua": ["lua"], "text/x-markdown": ["mkd"], "text/x-nfo": ["nfo"], "text/x-opml": ["opml"], "text/x-org": ["*org"], "text/x-pascal": ["p", "pas"], "text/x-processing": ["pde"], "text/x-sass": ["sass"], "text/x-scss": ["scss"], "text/x-setext": ["etx"], "text/x-sfv": ["sfv"], "text/x-suse-ymp": ["ymp"], "text/x-uuencode": ["uu"], "text/x-vcalendar": ["vcs"], "text/x-vcard": ["vcf"], "video/vnd.dece.hd": ["uvh", "uvvh"], "video/vnd.dece.mobile": ["uvm", "uvvm"], "video/vnd.dece.pd": ["uvp", "uvvp"], "video/vnd.dece.sd": ["uvs", "uvvs"], "video/vnd.dece.video": ["uvv", "uvvv"], "video/vnd.dvb.file": ["dvb"], "video/vnd.fvt": ["fvt"], "video/vnd.mpegurl": ["mxu", "m4u"], "video/vnd.ms-playready.media.pyv": ["pyv"], "video/vnd.uvvu.mp4": ["uvu", "uvvu"], "video/vnd.vivo": ["viv"], "video/x-f4v": ["f4v"], "video/x-fli": ["fli"], "video/x-flv": ["flv"], "video/x-m4v": ["m4v"], "video/x-matroska": ["mkv", "mk3d", "mks"], "video/x-mng": ["mng"], "video/x-ms-asf": ["asf", "asx"], "video/x-ms-vob": ["vob"], "video/x-ms-wm": ["wm"], "video/x-ms-wmv": ["wmv"], "video/x-ms-wmx": ["wmx"], "video/x-ms-wvx": ["wvx"], "video/x-msvideo": ["avi"], "video/x-sgi-movie": ["movie"], "video/x-smv": ["smv"], "x-conference/x-cooltalk": ["ice"] }; + } +}); + +// ../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/index.js +var require_mime = __commonJS({ + "../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/index.js"(exports2, module2) { + "use strict"; + var Mime = require_Mime(); + module2.exports = new Mime(require_standard(), require_other()); + } +}); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + ASSETS_PLUGIN: () => ASSETS_PLUGIN, + AssetsOptionsSchema: () => AssetsOptionsSchema, + CACHE_PLUGIN: () => CACHE_PLUGIN, + CACHE_PLUGIN_NAME: () => CACHE_PLUGIN_NAME, + CORE_PLUGIN: () => CORE_PLUGIN, + CORE_PLUGIN_NAME: () => CORE_PLUGIN_NAME2, + CacheBindings: () => CacheBindings, + CacheHeaders: () => CacheHeaders, + CacheOptionsSchema: () => CacheOptionsSchema, + CacheSharedOptionsSchema: () => CacheSharedOptionsSchema, + CloseEvent: () => CloseEvent, + CoreBindings: () => CoreBindings, + CoreHeaders: () => CoreHeaders, + CoreOptionsSchema: () => CoreOptionsSchema, + CoreSharedOptionsSchema: () => CoreSharedOptionsSchema, + D1OptionsSchema: () => D1OptionsSchema, + D1SharedOptionsSchema: () => D1SharedOptionsSchema, + D1_PLUGIN: () => D1_PLUGIN, + D1_PLUGIN_NAME: () => D1_PLUGIN_NAME, + DEFAULT_PERSIST_ROOT: () => DEFAULT_PERSIST_ROOT, + DURABLE_OBJECTS_PLUGIN: () => DURABLE_OBJECTS_PLUGIN, + DURABLE_OBJECTS_PLUGIN_NAME: () => DURABLE_OBJECTS_PLUGIN_NAME, + DURABLE_OBJECTS_STORAGE_SERVICE_NAME: () => DURABLE_OBJECTS_STORAGE_SERVICE_NAME, + DeferredPromise: () => DeferredPromise, + DispatchFetchDispatcher: () => DispatchFetchDispatcher, + DurableObjectsOptionsSchema: () => DurableObjectsOptionsSchema, + DurableObjectsSharedOptionsSchema: () => DurableObjectsSharedOptionsSchema, + ErrorEvent: () => ErrorEvent, + File: () => import_undici4.File, + FormData: () => import_undici4.FormData, + HOST_CAPNP_CONNECT: () => HOST_CAPNP_CONNECT, + HYPERDRIVE_PLUGIN: () => HYPERDRIVE_PLUGIN, + HYPERDRIVE_PLUGIN_NAME: () => HYPERDRIVE_PLUGIN_NAME, + Headers: () => import_undici4.Headers, + HttpOptions_Style: () => HttpOptions_Style, + HyperdriveInputOptionsSchema: () => HyperdriveInputOptionsSchema, + HyperdriveSchema: () => HyperdriveSchema, + JsonSchema: () => JsonSchema, + KVHeaders: () => KVHeaders, + KVLimits: () => KVLimits, + KVOptionsSchema: () => KVOptionsSchema, + KVParams: () => KVParams, + KVSharedOptionsSchema: () => KVSharedOptionsSchema, + KV_PLUGIN: () => KV_PLUGIN, + KV_PLUGIN_NAME: () => KV_PLUGIN_NAME, + LiteralSchema: () => LiteralSchema, + Log: () => Log, + LogLevel: () => LogLevel, + MessageEvent: () => MessageEvent, + Miniflare: () => Miniflare2, + MiniflareCoreError: () => MiniflareCoreError, + MiniflareError: () => MiniflareError, + ModuleDefinitionSchema: () => ModuleDefinitionSchema, + ModuleRuleSchema: () => ModuleRuleSchema, + ModuleRuleTypeSchema: () => ModuleRuleTypeSchema, + Mutex: () => Mutex, + NoOpLog: () => NoOpLog, + PIPELINES_PLUGIN_NAME: () => PIPELINES_PLUGIN_NAME, + PIPELINE_PLUGIN: () => PIPELINE_PLUGIN, + PLUGINS: () => PLUGINS, + PLUGIN_ENTRIES: () => PLUGIN_ENTRIES, + PathSchema: () => PathSchema, + PeriodType: () => PeriodType, + PersistenceSchema: () => PersistenceSchema, + PipelineOptionsSchema: () => PipelineOptionsSchema, + ProxyAddresses: () => ProxyAddresses, + ProxyClient: () => ProxyClient, + ProxyNodeBinding: () => ProxyNodeBinding, + ProxyOps: () => ProxyOps, + QUEUES_PLUGIN: () => QUEUES_PLUGIN, + QUEUES_PLUGIN_NAME: () => QUEUES_PLUGIN_NAME, + QueueBindings: () => QueueBindings, + QueueConsumerOptionsSchema: () => QueueConsumerOptionsSchema, + QueueConsumerSchema: () => QueueConsumerSchema, + QueueConsumersSchema: () => QueueConsumersSchema, + QueueContentTypeSchema: () => QueueContentTypeSchema, + QueueIncomingMessageSchema: () => QueueIncomingMessageSchema, + QueueMessageDelaySchema: () => QueueMessageDelaySchema, + QueueProducerOptionsSchema: () => QueueProducerOptionsSchema, + QueueProducerSchema: () => QueueProducerSchema, + QueueProducersSchema: () => QueueProducersSchema, + QueuesBatchRequestSchema: () => QueuesBatchRequestSchema, + QueuesError: () => QueuesError, + QueuesOptionsSchema: () => QueuesOptionsSchema, + R2OptionsSchema: () => R2OptionsSchema, + R2SharedOptionsSchema: () => R2SharedOptionsSchema, + R2_PLUGIN: () => R2_PLUGIN, + R2_PLUGIN_NAME: () => R2_PLUGIN_NAME, + RATELIMIT_PLUGIN: () => RATELIMIT_PLUGIN, + RATELIMIT_PLUGIN_NAME: () => RATELIMIT_PLUGIN_NAME, + RatelimitConfigSchema: () => RatelimitConfigSchema, + RatelimitOptionsSchema: () => RatelimitOptionsSchema, + Request: () => Request, + Response: () => Response, + RouterError: () => RouterError, + Runtime: () => Runtime, + SERVICE_ENTRY: () => SERVICE_ENTRY, + SERVICE_LOOPBACK: () => SERVICE_LOOPBACK, + SITES_NO_CACHE_PREFIX: () => SITES_NO_CACHE_PREFIX, + SOCKET_ENTRY: () => SOCKET_ENTRY, + SOCKET_ENTRY_LOCAL: () => SOCKET_ENTRY_LOCAL, + SharedBindings: () => SharedBindings, + SharedHeaders: () => SharedHeaders, + SiteBindings: () => SiteBindings, + SourceOptionsSchema: () => SourceOptionsSchema, + TlsOptions_Version: () => TlsOptions_Version, + TypedEventTarget: () => TypedEventTarget, + WORKER_BINDING_SERVICE_LOOPBACK: () => WORKER_BINDING_SERVICE_LOOPBACK, + WORKFLOWS_PLUGIN: () => WORKFLOWS_PLUGIN, + WORKFLOWS_PLUGIN_NAME: () => WORKFLOWS_PLUGIN_NAME, + WORKFLOWS_STORAGE_SERVICE_NAME: () => WORKFLOWS_STORAGE_SERVICE_NAME, + WaitGroup: () => WaitGroup, + WebSocket: () => WebSocket, + WebSocketPair: () => WebSocketPair, + Worker_Binding_CryptoKey_Usage: () => Worker_Binding_CryptoKey_Usage, + WorkflowsOptionsSchema: () => WorkflowsOptionsSchema, + WorkflowsSharedOptionsSchema: () => WorkflowsSharedOptionsSchema, + __MiniflareFunctionWrapper: () => __MiniflareFunctionWrapper, + _enableControlEndpoints: () => _enableControlEndpoints, + _forceColour: () => _forceColour, + _initialiseInstanceRegistry: () => _initialiseInstanceRegistry, + _isCyclic: () => _isCyclic, + _transformsForContentEncodingAndContentType: () => _transformsForContentEncodingAndContentType, + base64Decode: () => base64Decode, + base64Encode: () => base64Encode, + buildAssetManifest: () => buildAssetManifest, + compileModuleRules: () => compileModuleRules, + coupleWebSocket: () => coupleWebSocket, + createFetchMock: () => createFetchMock, + createHTTPReducers: () => createHTTPReducers, + createHTTPRevivers: () => createHTTPRevivers, + decodeSitesKey: () => decodeSitesKey, + deserialiseRegExps: () => deserialiseRegExps, + deserialiseSiteRegExps: () => deserialiseSiteRegExps, + encodeSitesKey: () => encodeSitesKey, + fetch: () => fetch4, + formatZodError: () => formatZodError, + getAccessibleHosts: () => getAccessibleHosts, + getAssetsBindingsNames: () => getAssetsBindingsNames, + getCacheServiceName: () => getCacheServiceName, + getDirectSocketName: () => getDirectSocketName, + getEntrySocketHttpOptions: () => getEntrySocketHttpOptions, + getFreshSourceMapSupport: () => getFreshSourceMapSupport, + getGlobalServices: () => getGlobalServices, + getMiniflareObjectBindings: () => getMiniflareObjectBindings, + getNodeCompat: () => getNodeCompat, + getPersistPath: () => getPersistPath, + getRootPath: () => getRootPath, + globsToRegExps: () => globsToRegExps, + isFetcherFetch: () => isFetcherFetch, + isR2ObjectWriteHttpMetadata: () => isR2ObjectWriteHttpMetadata, + isSitesRequest: () => isSitesRequest, + kCurrentWorker: () => kCurrentWorker, + kInspectorSocket: () => kInspectorSocket, + kUnsafeEphemeralUniqueKey: () => kUnsafeEphemeralUniqueKey, + kVoid: () => kVoid, + matchRoutes: () => matchRoutes, + maybeApply: () => maybeApply, + maybeParseURL: () => maybeParseURL, + mergeWorkerOptions: () => mergeWorkerOptions, + migrateDatabase: () => migrateDatabase, + namespaceEntries: () => namespaceEntries, + namespaceKeys: () => namespaceKeys, + normaliseDurableObject: () => normaliseDurableObject, + objectEntryWorker: () => objectEntryWorker, + parseRanges: () => parseRanges, + parseRoutes: () => parseRoutes, + parseWithReadableStreams: () => parseWithReadableStreams, + parseWithRootPath: () => parseWithRootPath, + prefixError: () => prefixError, + prefixStream: () => prefixStream, + readPrefix: () => readPrefix, + reduceError: () => reduceError, + sanitisePath: () => sanitisePath, + serialiseRegExps: () => serialiseRegExps, + serialiseSiteRegExps: () => serialiseSiteRegExps, + serializeConfig: () => serializeConfig, + stringifyWithStreams: () => stringifyWithStreams, + stripAnsi: () => stripAnsi, + structuredSerializableReducers: () => structuredSerializableReducers, + structuredSerializableRevivers: () => structuredSerializableRevivers, + supportedCompatibilityDate: () => import_workerd2.compatibilityDate, + testRegExps: () => testRegExps, + testSiteRegExps: () => testSiteRegExps, + viewToBuffer: () => viewToBuffer, + zAwaitable: () => zAwaitable +}); +module.exports = __toCommonJS(src_exports); +var import_assert12 = __toESM(require("assert")); +var import_crypto3 = __toESM(require("crypto")); +var import_fs24 = __toESM(require("fs")); +var import_http6 = __toESM(require("http")); +var import_net = __toESM(require("net")); +var import_os2 = __toESM(require("os")); +var import_path28 = __toESM(require("path")); +var import_web5 = require("stream/web"); +var import_util5 = __toESM(require("util")); +var import_zlib = __toESM(require("zlib")); +var import_exit_hook = __toESM(require("exit-hook")); + +// ../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs +var FORCE_COLOR; +var NODE_DISABLE_COLORS; +var NO_COLOR; +var TERM; +var isTTY = true; +if (typeof process !== "undefined") { + ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {}); + isTTY = process.stdout && process.stdout.isTTY; +} +var $ = { + enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY) +}; +function init(x, y) { + let rgx = new RegExp(`\\x1b\\[${y}m`, "g"); + let open = `\x1B[${x}m`, close = `\x1B[${y}m`; + return function(txt) { + if (!$.enabled || txt == null) return txt; + return open + (!!~("" + txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close; + }; +} +var reset = init(0, 0); +var bold = init(1, 22); +var dim = init(2, 22); +var italic = init(3, 23); +var underline = init(4, 24); +var inverse = init(7, 27); +var hidden = init(8, 28); +var strikethrough = init(9, 29); +var black = init(30, 39); +var red = init(31, 39); +var green = init(32, 39); +var yellow = init(33, 39); +var blue = init(34, 39); +var magenta = init(35, 39); +var cyan = init(36, 39); +var white = init(37, 39); +var gray = init(90, 39); +var grey = init(90, 39); +var bgBlack = init(40, 49); +var bgRed = init(41, 49); +var bgGreen = init(42, 49); +var bgYellow = init(43, 49); +var bgBlue = init(44, 49); +var bgMagenta = init(45, 49); +var bgCyan = init(46, 49); +var bgWhite = init(47, 49); + +// src/index.ts +var import_stoppable = __toESM(require("stoppable")); +var import_undici8 = require("undici"); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/shared/index.worker.ts +var import_fs = __toESM(require("fs")); +var import_path = __toESM(require("path")); +var import_url = __toESM(require("url")); +var contents; +function index_worker_default() { + if (contents !== void 0) return contents; + const filePath = import_path.default.join(__dirname, "workers", "shared/index.worker.js"); + contents = import_fs.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url.default.pathToFileURL(filePath); + return contents; +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/shared/zod.worker.ts +var import_fs2 = __toESM(require("fs")); +var import_path2 = __toESM(require("path")); +var import_url2 = __toESM(require("url")); +var contents2; +function zod_worker_default() { + if (contents2 !== void 0) return contents2; + const filePath = import_path2.default.join(__dirname, "workers", "shared/zod.worker.js"); + contents2 = import_fs2.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url2.default.pathToFileURL(filePath); + return contents2; +} + +// src/index.ts +var import_ws5 = require("ws"); +var import_zod23 = require("zod"); + +// src/cf.ts +var import_assert = __toESM(require("assert")); +var import_promises = require("fs/promises"); +var import_path3 = __toESM(require("path")); +var import_undici = require("undici"); +var defaultCfPath = import_path3.default.resolve("node_modules", ".mf", "cf.json"); +var defaultCfFetchEndpoint = "https://workers.cloudflare.com/cf.json"; +var fallbackCf = { + asOrganization: "", + asn: 395747, + colo: "DFW", + city: "Austin", + region: "Texas", + regionCode: "TX", + metroCode: "635", + postalCode: "78701", + country: "US", + continent: "NA", + timezone: "America/Chicago", + latitude: "30.27130", + longitude: "-97.74260", + clientTcpRtt: 0, + httpProtocol: "HTTP/1.1", + requestPriority: "weight=192;exclusive=0", + tlsCipher: "AEAD-AES128-GCM-SHA256", + tlsVersion: "TLSv1.3", + tlsClientAuth: { + certPresented: "0", + certVerified: "NONE", + certRevoked: "0", + certIssuerDN: "", + certSubjectDN: "", + certIssuerDNRFC2253: "", + certSubjectDNRFC2253: "", + certIssuerDNLegacy: "", + certSubjectDNLegacy: "", + certSerial: "", + certIssuerSerial: "", + certSKI: "", + certIssuerSKI: "", + certFingerprintSHA1: "", + certFingerprintSHA256: "", + certNotBefore: "", + certNotAfter: "" + }, + edgeRequestKeepAliveStatus: 0, + hostMetadata: void 0, + clientTrustScore: 99, + botManagement: { + corporateProxy: false, + verifiedBot: false, + ja3Hash: "25b4882c2bcb50cd6b469ff28c596742", + staticResource: false, + detectionIds: [], + score: 99 + } +}; +var DAY = 864e5; +var CF_DAYS = 30; +async function setupCf(log, cf) { + if (!(cf ?? process.env.NODE_ENV !== "test")) { + return fallbackCf; + } + if (typeof cf === "object") { + return cf; + } + let cfPath = defaultCfPath; + if (typeof cf === "string") { + cfPath = cf; + } + try { + const storedCf = JSON.parse(await (0, import_promises.readFile)(cfPath, "utf8")); + const cfStat = await (0, import_promises.stat)(cfPath); + (0, import_assert.default)(Date.now() - cfStat.mtimeMs <= CF_DAYS * DAY); + return storedCf; + } catch { + } + try { + const res = await (0, import_undici.fetch)(defaultCfFetchEndpoint); + const cfText = await res.text(); + const storedCf = JSON.parse(cfText); + await (0, import_promises.mkdir)(import_path3.default.dirname(cfPath), { recursive: true }); + await (0, import_promises.writeFile)(cfPath, cfText, "utf8"); + log.debug("Updated `Request.cf` object cache!"); + return storedCf; + } catch (e) { + log.warn( + "Unable to fetch the `Request.cf` object! Falling back to a default placeholder...\n" + dim(e.cause ? e.cause.stack : e.stack) + ); + return fallbackCf; + } +} + +// src/http/fetch.ts +var undici = __toESM(require("undici")); +var import_ws2 = __toESM(require("ws")); + +// src/workers/cache/constants.ts +var CacheHeaders = { + NAMESPACE: "cf-cache-namespace", + STATUS: "cf-cache-status" +}; +var CacheBindings = { + MAYBE_JSON_CACHE_WARN_USAGE: "MINIFLARE_CACHE_WARN_USAGE" +}; + +// src/workers/core/constants.ts +var CoreHeaders = { + CUSTOM_SERVICE: "MF-Custom-Service", + ORIGINAL_URL: "MF-Original-URL", + PROXY_SHARED_SECRET: "MF-Proxy-Shared-Secret", + DISABLE_PRETTY_ERROR: "MF-Disable-Pretty-Error", + ERROR_STACK: "MF-Experimental-Error-Stack", + ROUTE_OVERRIDE: "MF-Route-Override", + CF_BLOB: "MF-CF-Blob", + // API Proxy + OP_SECRET: "MF-Op-Secret", + OP: "MF-Op", + OP_TARGET: "MF-Op-Target", + OP_KEY: "MF-Op-Key", + OP_SYNC: "MF-Op-Sync", + OP_STRINGIFIED_SIZE: "MF-Op-Stringified-Size", + OP_RESULT_TYPE: "MF-Op-Result-Type" +}; +var CoreBindings = { + SERVICE_LOOPBACK: "MINIFLARE_LOOPBACK", + SERVICE_USER_ROUTE_PREFIX: "MINIFLARE_USER_ROUTE_", + SERVICE_USER_FALLBACK: "MINIFLARE_USER_FALLBACK", + TEXT_CUSTOM_SERVICE: "MINIFLARE_CUSTOM_SERVICE", + TEXT_UPSTREAM_URL: "MINIFLARE_UPSTREAM_URL", + JSON_CF_BLOB: "CF_BLOB", + JSON_ROUTES: "MINIFLARE_ROUTES", + JSON_LOG_LEVEL: "MINIFLARE_LOG_LEVEL", + DATA_LIVE_RELOAD_SCRIPT: "MINIFLARE_LIVE_RELOAD_SCRIPT", + DURABLE_OBJECT_NAMESPACE_PROXY: "MINIFLARE_PROXY", + DATA_PROXY_SECRET: "MINIFLARE_PROXY_SECRET", + DATA_PROXY_SHARED_SECRET: "MINIFLARE_PROXY_SHARED_SECRET" +}; +var ProxyOps = { + // Get the target or a property of the target + GET: "GET", + // Get the descriptor for a property of the target + GET_OWN_DESCRIPTOR: "GET_OWN_DESCRIPTOR", + // Get the target's own property names + GET_OWN_KEYS: "GET_OWN_KEYS", + // Call a method on the target + CALL: "CALL", + // Remove the strong reference to the target on the "heap", allowing it to be + // garbage collected + FREE: "FREE" +}; +var ProxyAddresses = { + GLOBAL: 0, + // globalThis + ENV: 1, + // env + USER_START: 2 +}; +function isFetcherFetch(targetName, key) { + return (targetName === "Fetcher" || targetName === "DurableObject" || targetName === "WorkerRpc") && key === "fetch"; +} +function isR2ObjectWriteHttpMetadata(targetName, key) { + return (targetName === "HeadResult" || targetName === "GetResult") && key === "writeHttpMetadata"; +} + +// src/workers/core/devalue.ts +var import_node_assert = __toESM(require("node:assert")); +var import_node_buffer = require("node:buffer"); + +// ../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/utils.js +var DevalueError = class extends Error { + /** + * @param {string} message + * @param {string[]} keys + */ + constructor(message, keys) { + super(message); + this.name = "DevalueError"; + this.path = keys.join(""); + } +}; +function is_primitive(thing) { + return Object(thing) !== thing; +} +var object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames( + Object.prototype +).sort().join("\0"); +function is_plain_object(thing) { + const proto = Object.getPrototypeOf(thing); + return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join("\0") === object_proto_names; +} +function get_type(thing) { + return Object.prototype.toString.call(thing).slice(8, -1); +} +function get_escaped_char(char) { + switch (char) { + case '"': + return '\\"'; + case "<": + return "\\u003C"; + case "\\": + return "\\\\"; + case "\n": + return "\\n"; + case "\r": + return "\\r"; + case " ": + return "\\t"; + case "\b": + return "\\b"; + case "\f": + return "\\f"; + case "\u2028": + return "\\u2028"; + case "\u2029": + return "\\u2029"; + default: + return char < " " ? `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}` : ""; + } +} +function stringify_string(str) { + let result = ""; + let last_pos = 0; + const len = str.length; + for (let i = 0; i < len; i += 1) { + const char = str[i]; + const replacement = get_escaped_char(char); + if (replacement) { + result += str.slice(last_pos, i) + replacement; + last_pos = i + 1; + } + } + return `"${last_pos === 0 ? str : result + str.slice(last_pos)}"`; +} + +// ../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/constants.js +var UNDEFINED = -1; +var HOLE = -2; +var NAN = -3; +var POSITIVE_INFINITY = -4; +var NEGATIVE_INFINITY = -5; +var NEGATIVE_ZERO = -6; + +// ../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/parse.js +function parse(serialized, revivers2) { + return unflatten(JSON.parse(serialized), revivers2); +} +function unflatten(parsed, revivers2) { + if (typeof parsed === "number") return hydrate(parsed, true); + if (!Array.isArray(parsed) || parsed.length === 0) { + throw new Error("Invalid input"); + } + const values = ( + /** @type {any[]} */ + parsed + ); + const hydrated = Array(values.length); + function hydrate(index, standalone = false) { + if (index === UNDEFINED) return void 0; + if (index === NAN) return NaN; + if (index === POSITIVE_INFINITY) return Infinity; + if (index === NEGATIVE_INFINITY) return -Infinity; + if (index === NEGATIVE_ZERO) return -0; + if (standalone) throw new Error(`Invalid input`); + if (index in hydrated) return hydrated[index]; + const value = values[index]; + if (!value || typeof value !== "object") { + hydrated[index] = value; + } else if (Array.isArray(value)) { + if (typeof value[0] === "string") { + const type = value[0]; + const reviver = revivers2?.[type]; + if (reviver) { + return hydrated[index] = reviver(hydrate(value[1])); + } + switch (type) { + case "Date": + hydrated[index] = new Date(value[1]); + break; + case "Set": + const set = /* @__PURE__ */ new Set(); + hydrated[index] = set; + for (let i = 1; i < value.length; i += 1) { + set.add(hydrate(value[i])); + } + break; + case "Map": + const map = /* @__PURE__ */ new Map(); + hydrated[index] = map; + for (let i = 1; i < value.length; i += 2) { + map.set(hydrate(value[i]), hydrate(value[i + 1])); + } + break; + case "RegExp": + hydrated[index] = new RegExp(value[1], value[2]); + break; + case "Object": + hydrated[index] = Object(value[1]); + break; + case "BigInt": + hydrated[index] = BigInt(value[1]); + break; + case "null": + const obj = /* @__PURE__ */ Object.create(null); + hydrated[index] = obj; + for (let i = 1; i < value.length; i += 2) { + obj[value[i]] = hydrate(value[i + 1]); + } + break; + default: + throw new Error(`Unknown type ${type}`); + } + } else { + const array = new Array(value.length); + hydrated[index] = array; + for (let i = 0; i < value.length; i += 1) { + const n = value[i]; + if (n === HOLE) continue; + array[i] = hydrate(n); + } + } + } else { + const object = {}; + hydrated[index] = object; + for (const key in value) { + const n = value[key]; + object[key] = hydrate(n); + } + } + return hydrated[index]; + } + return hydrate(0); +} + +// ../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/stringify.js +function stringify(value, reducers2) { + const stringified = []; + const indexes = /* @__PURE__ */ new Map(); + const custom = []; + for (const key in reducers2) { + custom.push({ key, fn: reducers2[key] }); + } + const keys = []; + let p = 0; + function flatten(thing) { + if (typeof thing === "function") { + throw new DevalueError(`Cannot stringify a function`, keys); + } + if (indexes.has(thing)) return indexes.get(thing); + if (thing === void 0) return UNDEFINED; + if (Number.isNaN(thing)) return NAN; + if (thing === Infinity) return POSITIVE_INFINITY; + if (thing === -Infinity) return NEGATIVE_INFINITY; + if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO; + const index2 = p++; + indexes.set(thing, index2); + for (const { key, fn } of custom) { + const value2 = fn(thing); + if (value2) { + stringified[index2] = `["${key}",${flatten(value2)}]`; + return index2; + } + } + let str = ""; + if (is_primitive(thing)) { + str = stringify_primitive(thing); + } else { + const type = get_type(thing); + switch (type) { + case "Number": + case "String": + case "Boolean": + str = `["Object",${stringify_primitive(thing)}]`; + break; + case "BigInt": + str = `["BigInt",${thing}]`; + break; + case "Date": + str = `["Date","${thing.toISOString()}"]`; + break; + case "RegExp": + const { source, flags } = thing; + str = flags ? `["RegExp",${stringify_string(source)},"${flags}"]` : `["RegExp",${stringify_string(source)}]`; + break; + case "Array": + str = "["; + for (let i = 0; i < thing.length; i += 1) { + if (i > 0) str += ","; + if (i in thing) { + keys.push(`[${i}]`); + str += flatten(thing[i]); + keys.pop(); + } else { + str += HOLE; + } + } + str += "]"; + break; + case "Set": + str = '["Set"'; + for (const value2 of thing) { + str += `,${flatten(value2)}`; + } + str += "]"; + break; + case "Map": + str = '["Map"'; + for (const [key, value2] of thing) { + keys.push( + `.get(${is_primitive(key) ? stringify_primitive(key) : "..."})` + ); + str += `,${flatten(key)},${flatten(value2)}`; + } + str += "]"; + break; + default: + if (!is_plain_object(thing)) { + throw new DevalueError( + `Cannot stringify arbitrary non-POJOs`, + keys + ); + } + if (Object.getOwnPropertySymbols(thing).length > 0) { + throw new DevalueError( + `Cannot stringify POJOs with symbolic keys`, + keys + ); + } + if (Object.getPrototypeOf(thing) === null) { + str = '["null"'; + for (const key in thing) { + keys.push(`.${key}`); + str += `,${stringify_string(key)},${flatten(thing[key])}`; + keys.pop(); + } + str += "]"; + } else { + str = "{"; + let started = false; + for (const key in thing) { + if (started) str += ","; + started = true; + keys.push(`.${key}`); + str += `${stringify_string(key)}:${flatten(thing[key])}`; + keys.pop(); + } + str += "}"; + } + } + } + stringified[index2] = str; + return index2; + } + const index = flatten(value); + if (index < 0) return `${index}`; + return `[${stringified.join(",")}]`; +} +function stringify_primitive(thing) { + const type = typeof thing; + if (type === "string") return stringify_string(thing); + if (thing instanceof String) return stringify_string(thing.toString()); + if (thing === void 0) return UNDEFINED.toString(); + if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO.toString(); + if (type === "bigint") return `["BigInt","${thing}"]`; + return String(thing); +} + +// src/workers/core/devalue.ts +var ALLOWED_ARRAY_BUFFER_VIEW_CONSTRUCTORS = [ + DataView, + Int8Array, + Uint8Array, + Uint8ClampedArray, + Int16Array, + Uint16Array, + Int32Array, + Uint32Array, + Float32Array, + Float64Array, + BigInt64Array, + BigUint64Array +]; +var ALLOWED_ERROR_CONSTRUCTORS = [ + EvalError, + RangeError, + ReferenceError, + SyntaxError, + TypeError, + URIError, + Error + // `Error` last so more specific error subclasses preferred +]; +var structuredSerializableReducers = { + ArrayBuffer(value) { + if (value instanceof ArrayBuffer) { + return [import_node_buffer.Buffer.from(value).toString("base64")]; + } + }, + ArrayBufferView(value) { + if (ArrayBuffer.isView(value)) { + return [ + value.constructor.name, + value.buffer, + value.byteOffset, + value.byteLength + ]; + } + }, + Error(value) { + for (const ctor of ALLOWED_ERROR_CONSTRUCTORS) { + if (value instanceof ctor && value.name === ctor.name) { + return [value.name, value.message, value.stack, value.cause]; + } + } + if (value instanceof Error) { + return ["Error", value.message, value.stack, value.cause]; + } + } +}; +var structuredSerializableRevivers = { + ArrayBuffer(value) { + (0, import_node_assert.default)(Array.isArray(value)); + const [encoded] = value; + (0, import_node_assert.default)(typeof encoded === "string"); + const view = import_node_buffer.Buffer.from(encoded, "base64"); + return view.buffer.slice( + view.byteOffset, + view.byteOffset + view.byteLength + ); + }, + ArrayBufferView(value) { + (0, import_node_assert.default)(Array.isArray(value)); + const [name, buffer, byteOffset, byteLength] = value; + (0, import_node_assert.default)(typeof name === "string"); + (0, import_node_assert.default)(buffer instanceof ArrayBuffer); + (0, import_node_assert.default)(typeof byteOffset === "number"); + (0, import_node_assert.default)(typeof byteLength === "number"); + const ctor = globalThis[name]; + (0, import_node_assert.default)(ALLOWED_ARRAY_BUFFER_VIEW_CONSTRUCTORS.includes(ctor)); + let length = byteLength; + if ("BYTES_PER_ELEMENT" in ctor) length /= ctor.BYTES_PER_ELEMENT; + return new ctor(buffer, byteOffset, length); + }, + Error(value) { + (0, import_node_assert.default)(Array.isArray(value)); + const [name, message, stack, cause] = value; + (0, import_node_assert.default)(typeof name === "string"); + (0, import_node_assert.default)(typeof message === "string"); + (0, import_node_assert.default)(stack === void 0 || typeof stack === "string"); + const ctor = globalThis[name]; + (0, import_node_assert.default)(ALLOWED_ERROR_CONSTRUCTORS.includes(ctor)); + const error = new ctor(message, { cause }); + error.stack = stack; + return error; + } +}; +function createHTTPReducers(impl) { + return { + Headers(val) { + if (val instanceof impl.Headers) return Object.fromEntries(val); + }, + Request(val) { + if (val instanceof impl.Request) { + return [val.method, val.url, val.headers, val.cf, val.body]; + } + }, + Response(val) { + if (val instanceof impl.Response) { + return [val.status, val.statusText, val.headers, val.cf, val.body]; + } + } + }; +} +function createHTTPRevivers(impl) { + return { + Headers(value) { + (0, import_node_assert.default)(typeof value === "object" && value !== null); + return new impl.Headers(value); + }, + Request(value) { + (0, import_node_assert.default)(Array.isArray(value)); + const [method, url20, headers, cf, body] = value; + (0, import_node_assert.default)(typeof method === "string"); + (0, import_node_assert.default)(typeof url20 === "string"); + (0, import_node_assert.default)(headers instanceof impl.Headers); + (0, import_node_assert.default)(body === null || impl.isReadableStream(body)); + return new impl.Request(url20, { + method, + headers, + cf, + // @ts-expect-error `duplex` is not required by `workerd` yet + duplex: body === null ? void 0 : "half", + body + }); + }, + Response(value) { + (0, import_node_assert.default)(Array.isArray(value)); + const [status, statusText, headers, cf, body] = value; + (0, import_node_assert.default)(typeof status === "number"); + (0, import_node_assert.default)(typeof statusText === "string"); + (0, import_node_assert.default)(headers instanceof impl.Headers); + (0, import_node_assert.default)(body === null || impl.isReadableStream(body)); + return new impl.Response(body, { + status, + statusText, + headers, + cf + }); + } + }; +} +function stringifyWithStreams(impl, value, reducers2, allowUnbufferedStream) { + let unbufferedStream; + const bufferPromises = []; + const streamReducers = { + ReadableStream(value2) { + if (impl.isReadableStream(value2)) { + if (allowUnbufferedStream && unbufferedStream === void 0) { + unbufferedStream = value2; + } else { + bufferPromises.push(impl.bufferReadableStream(value2)); + } + return true; + } + }, + Blob(value2) { + if (value2 instanceof impl.Blob) { + bufferPromises.push(value2.arrayBuffer()); + return true; + } + }, + ...reducers2 + }; + if (typeof value === "function") { + value = new __MiniflareFunctionWrapper( + value + ); + } + const stringifiedValue = stringify(value, streamReducers); + if (bufferPromises.length === 0) { + return { value: stringifiedValue, unbufferedStream }; + } + return Promise.all(bufferPromises).then((streamBuffers) => { + streamReducers.ReadableStream = function(value2) { + if (impl.isReadableStream(value2)) { + if (value2 === unbufferedStream) { + return true; + } else { + return streamBuffers.shift(); + } + } + }; + streamReducers.Blob = function(value2) { + if (value2 instanceof impl.Blob) { + const array = [streamBuffers.shift(), value2.type]; + if (value2 instanceof impl.File) { + array.push(value2.name, value2.lastModified); + } + return array; + } + }; + const stringifiedValue2 = stringify(value, streamReducers); + return { value: stringifiedValue2, unbufferedStream }; + }); +} +var __MiniflareFunctionWrapper = class { + constructor(fnWithProps) { + return new Proxy(this, { + get: (_, key) => { + if (key === "__miniflareWrappedFunction") return fnWithProps; + return fnWithProps[key]; + } + }); + } +}; +function parseWithReadableStreams(impl, stringified, revivers2) { + const streamRevivers = { + ReadableStream(value) { + if (value === true) { + (0, import_node_assert.default)(stringified.unbufferedStream !== void 0); + return stringified.unbufferedStream; + } + (0, import_node_assert.default)(value instanceof ArrayBuffer); + return impl.unbufferReadableStream(value); + }, + Blob(value) { + (0, import_node_assert.default)(Array.isArray(value)); + if (value.length === 2) { + const [buffer, type] = value; + (0, import_node_assert.default)(buffer instanceof ArrayBuffer); + (0, import_node_assert.default)(typeof type === "string"); + const opts = {}; + if (type !== "") opts.type = type; + return new impl.Blob([buffer], opts); + } else { + (0, import_node_assert.default)(value.length === 4); + const [buffer, type, name, lastModified] = value; + (0, import_node_assert.default)(buffer instanceof ArrayBuffer); + (0, import_node_assert.default)(typeof type === "string"); + (0, import_node_assert.default)(typeof name === "string"); + (0, import_node_assert.default)(typeof lastModified === "number"); + const opts = { lastModified }; + if (type !== "") opts.type = type; + return new impl.File([buffer], name, opts); + } + }, + ...revivers2 + }; + return parse(stringified.value, streamRevivers); +} + +// src/workers/core/routing.ts +function matchRoutes(routes, url20) { + for (const route of routes) { + if (route.protocol && route.protocol !== url20.protocol) continue; + if (route.allowHostnamePrefix) { + if (!url20.hostname.endsWith(route.hostname)) continue; + } else { + if (url20.hostname !== route.hostname) continue; + } + const path30 = url20.pathname + url20.search; + if (route.allowPathSuffix) { + if (!path30.startsWith(route.path)) continue; + } else { + if (path30 !== route.path) continue; + } + return route.target; + } + return null; +} + +// src/workers/shared/constants.ts +var SharedHeaders = { + LOG_LEVEL: "MF-Log-Level" +}; +var SharedBindings = { + TEXT_NAMESPACE: "MINIFLARE_NAMESPACE", + DURABLE_OBJECT_NAMESPACE_OBJECT: "MINIFLARE_OBJECT", + MAYBE_SERVICE_BLOBS: "MINIFLARE_BLOBS", + MAYBE_SERVICE_LOOPBACK: "MINIFLARE_LOOPBACK", + MAYBE_JSON_ENABLE_CONTROL_ENDPOINTS: "MINIFLARE_ENABLE_CONTROL_ENDPOINTS", + MAYBE_JSON_ENABLE_STICKY_BLOBS: "MINIFLARE_STICKY_BLOBS" +}; +var LogLevel = /* @__PURE__ */ ((LogLevel2) => { + LogLevel2[LogLevel2["NONE"] = 0] = "NONE"; + LogLevel2[LogLevel2["ERROR"] = 1] = "ERROR"; + LogLevel2[LogLevel2["WARN"] = 2] = "WARN"; + LogLevel2[LogLevel2["INFO"] = 3] = "INFO"; + LogLevel2[LogLevel2["DEBUG"] = 4] = "DEBUG"; + LogLevel2[LogLevel2["VERBOSE"] = 5] = "VERBOSE"; + return LogLevel2; +})(LogLevel || {}); + +// src/workers/shared/data.ts +var import_node_buffer2 = require("node:buffer"); +function viewToBuffer(view) { + return view.buffer.slice( + view.byteOffset, + view.byteOffset + view.byteLength + ); +} +function base64Encode(value) { + return import_node_buffer2.Buffer.from(value, "utf8").toString("base64"); +} +function base64Decode(encoded) { + return import_node_buffer2.Buffer.from(encoded, "base64").toString("utf8"); +} +var dotRegexp = /(^|\/|\\)(\.+)(\/|\\|$)/g; +var illegalRegexp = /[?<>*"'^/\\:|\x00-\x1f\x80-\x9f]/g; +var windowsReservedRegexp = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i; +var leadingRegexp = /^[ /\\]+/; +var trailingRegexp = /[ /\\]+$/; +function dotReplacement(match, g1, g2, g3) { + return `${g1}${"".padStart(g2.length, "_")}${g3}`; +} +function underscoreReplacement(match) { + return "".padStart(match.length, "_"); +} +function sanitisePath(unsafe) { + return unsafe.replace(dotRegexp, dotReplacement).replace(dotRegexp, dotReplacement).replace(illegalRegexp, "_").replace(windowsReservedRegexp, "_").replace(leadingRegexp, underscoreReplacement).replace(trailingRegexp, underscoreReplacement).substring(0, 255); +} + +// src/workers/shared/matcher.ts +function testRegExps(matcher, value) { + for (const exclude of matcher.exclude) if (exclude.test(value)) return false; + for (const include of matcher.include) if (include.test(value)) return true; + return false; +} + +// src/workers/shared/range.ts +var rangePrefixRegexp = /^ *bytes *=/i; +var rangeRegexp = /^ *(?\d+)? *- *(?\d+)? *$/; +function parseRanges(rangeHeader, length) { + const prefixMatch = rangePrefixRegexp.exec(rangeHeader); + if (prefixMatch === null) return; + rangeHeader = rangeHeader.substring(prefixMatch[0].length); + if (rangeHeader.trimStart() === "") return []; + const ranges = rangeHeader.split(","); + const result = []; + for (const range of ranges) { + const match = rangeRegexp.exec(range); + if (match === null) return; + const { start, end } = match.groups; + if (start !== void 0 && end !== void 0) { + const rangeStart = parseInt(start); + let rangeEnd = parseInt(end); + if (rangeStart > rangeEnd) return; + if (rangeStart >= length) return; + if (rangeEnd >= length) rangeEnd = length - 1; + result.push({ start: rangeStart, end: rangeEnd }); + } else if (start !== void 0 && end === void 0) { + const rangeStart = parseInt(start); + if (rangeStart >= length) return; + result.push({ start: rangeStart, end: length - 1 }); + } else if (start === void 0 && end !== void 0) { + const suffix = parseInt(end); + if (suffix >= length) return []; + if (suffix === 0) continue; + result.push({ start: length - suffix, end: length - 1 }); + } else { + return; + } + } + return result; +} + +// src/workers/shared/sync.ts +var import_node_assert2 = __toESM(require("node:assert")); +var DeferredPromise = class extends Promise { + resolve; + reject; + constructor(executor = () => { + }) { + let promiseResolve; + let promiseReject; + super((resolve2, reject) => { + promiseResolve = resolve2; + promiseReject = reject; + return executor(resolve2, reject); + }); + this.resolve = promiseResolve; + this.reject = promiseReject; + } +}; +var Mutex = class { + locked = false; + resolveQueue = []; + drainQueue = []; + lock() { + if (!this.locked) { + this.locked = true; + return; + } + return new Promise((resolve2) => this.resolveQueue.push(resolve2)); + } + unlock() { + (0, import_node_assert2.default)(this.locked); + if (this.resolveQueue.length > 0) { + this.resolveQueue.shift()?.(); + } else { + this.locked = false; + let resolve2; + while ((resolve2 = this.drainQueue.shift()) !== void 0) resolve2(); + } + } + get hasWaiting() { + return this.resolveQueue.length > 0; + } + async runWith(closure) { + const acquireAwaitable = this.lock(); + if (acquireAwaitable instanceof Promise) await acquireAwaitable; + try { + const awaitable = closure(); + if (awaitable instanceof Promise) return await awaitable; + return awaitable; + } finally { + this.unlock(); + } + } + async drained() { + if (this.resolveQueue.length === 0 && !this.locked) return; + return new Promise((resolve2) => this.drainQueue.push(resolve2)); + } +}; +var WaitGroup = class { + counter = 0; + resolveQueue = []; + add() { + this.counter++; + } + done() { + (0, import_node_assert2.default)(this.counter > 0); + this.counter--; + if (this.counter === 0) { + let resolve2; + while ((resolve2 = this.resolveQueue.shift()) !== void 0) resolve2(); + } + } + wait() { + if (this.counter === 0) return Promise.resolve(); + return new Promise((resolve2) => this.resolveQueue.push(resolve2)); + } +}; + +// src/workers/shared/types.ts +function reduceError(e) { + return { + name: e?.name, + message: e?.message ?? String(e), + stack: e?.stack, + cause: e?.cause === void 0 ? void 0 : reduceError(e.cause) + }; +} +function maybeApply(f, maybeValue) { + return maybeValue === void 0 ? void 0 : f(maybeValue); +} + +// src/workers/kv/constants.ts +var KVLimits = { + MIN_CACHE_TTL: 60, + MAX_LIST_KEYS: 1e3, + MAX_KEY_SIZE: 512, + MAX_VALUE_SIZE: 25 * 1024 * 1024, + MAX_VALUE_SIZE_TEST: 1024, + MAX_METADATA_SIZE: 1024 +}; +var KVParams = { + URL_ENCODED: "urlencoded", + CACHE_TTL: "cache_ttl", + EXPIRATION: "expiration", + EXPIRATION_TTL: "expiration_ttl", + LIST_LIMIT: "key_count_limit", + LIST_PREFIX: "prefix", + LIST_CURSOR: "cursor" +}; +var KVHeaders = { + EXPIRATION: "CF-Expiration", + METADATA: "CF-KV-Metadata" +}; +var SiteBindings = { + KV_NAMESPACE_SITE: "__STATIC_CONTENT", + JSON_SITE_MANIFEST: "__STATIC_CONTENT_MANIFEST", + JSON_SITE_FILTER: "MINIFLARE_SITE_FILTER" +}; +var SITES_NO_CACHE_PREFIX = "$__MINIFLARE_SITES__$/"; +function encodeSitesKey(key) { + return SITES_NO_CACHE_PREFIX + encodeURIComponent(key); +} +function decodeSitesKey(key) { + return key.startsWith(SITES_NO_CACHE_PREFIX) ? decodeURIComponent(key.substring(SITES_NO_CACHE_PREFIX.length)) : key; +} +function isSitesRequest(request) { + const url20 = new URL(request.url); + return url20.pathname.startsWith(`/${SITES_NO_CACHE_PREFIX}`); +} +function serialiseRegExp(regExp) { + const str = regExp.toString(); + return str.substring(str.indexOf("/") + 1, str.lastIndexOf("/")); +} +function serialiseRegExps(matcher) { + return { + include: matcher.include.map(serialiseRegExp), + exclude: matcher.exclude.map(serialiseRegExp) + }; +} +function deserialiseRegExps(matcher) { + return { + include: matcher.include.map((regExp) => new RegExp(regExp)), + exclude: matcher.exclude.map((regExp) => new RegExp(regExp)) + }; +} +function serialiseSiteRegExps(siteRegExps) { + return { + include: siteRegExps.include && serialiseRegExps(siteRegExps.include), + exclude: siteRegExps.exclude && serialiseRegExps(siteRegExps.exclude) + }; +} +function deserialiseSiteRegExps(siteRegExps) { + return { + include: siteRegExps.include && deserialiseRegExps(siteRegExps.include), + exclude: siteRegExps.exclude && deserialiseRegExps(siteRegExps.exclude) + }; +} +function testSiteRegExps(regExps, key) { + if (regExps.include !== void 0) return testRegExps(regExps.include, key); + if (regExps.exclude !== void 0) return !testRegExps(regExps.exclude, key); + return true; +} +function getAssetsBindingsNames(assetsKVBindingName = "__STATIC_ASSETS_CONTENT", assetsManifestBindingName = "__STATIC_ASSETS_CONTENT_MANIFEST") { + return { + ASSETS_KV_NAMESPACE: assetsKVBindingName, + ASSETS_MANIFEST: assetsManifestBindingName + }; +} + +// src/workers/queues/constants.ts +var QueueBindings = { + SERVICE_WORKER_PREFIX: "MINIFLARE_WORKER_", + MAYBE_JSON_QUEUE_PRODUCERS: "MINIFLARE_QUEUE_PRODUCERS", + MAYBE_JSON_QUEUE_CONSUMERS: "MINIFLARE_QUEUE_CONSUMERS" +}; + +// src/workers/shared/zod.worker.ts +var import_node_buffer3 = require("node:buffer"); +var import_zod = require("zod"); +var import_zod2 = require("zod"); +var HEX_REGEXP = /^[0-9a-f]*$/i; +var BASE64_REGEXP = /^[0-9a-z+/=]*$/i; +var HexDataSchema = import_zod.z.string().regex(HEX_REGEXP).transform((hex) => import_node_buffer3.Buffer.from(hex, "hex")); +var Base64DataSchema = import_zod.z.string().regex(BASE64_REGEXP).transform((base64) => import_node_buffer3.Buffer.from(base64, "base64")); + +// src/workers/queues/schemas.ts +var QueueMessageDelaySchema = import_zod2.z.number().int().min(0).max(43200).optional(); +var QueueProducerOptionsSchema = /* @__PURE__ */ import_zod2.z.object({ + // https://developers.cloudflare.com/queues/platform/configuration/#producer + queueName: import_zod2.z.string(), + deliveryDelay: QueueMessageDelaySchema +}); +var QueueProducerSchema = /* @__PURE__ */ import_zod2.z.intersection( + QueueProducerOptionsSchema, + import_zod2.z.object({ workerName: import_zod2.z.string() }) +); +var QueueProducersSchema = /* @__PURE__ */ import_zod2.z.record(QueueProducerSchema); +var QueueConsumerOptionsSchema = /* @__PURE__ */ import_zod2.z.object({ + // https://developers.cloudflare.com/queues/platform/configuration/#consumer + // https://developers.cloudflare.com/queues/platform/limits/ + maxBatchSize: import_zod2.z.number().min(0).max(100).optional(), + maxBatchTimeout: import_zod2.z.number().min(0).max(60).optional(), + // seconds + maxRetires: import_zod2.z.number().min(0).max(100).optional(), + // deprecated + maxRetries: import_zod2.z.number().min(0).max(100).optional(), + deadLetterQueue: import_zod2.z.ostring(), + retryDelay: QueueMessageDelaySchema +}).transform((queue) => { + if (queue.maxRetires !== void 0) { + queue.maxRetries = queue.maxRetires; + } + return queue; +}); +var QueueConsumerSchema = /* @__PURE__ */ import_zod2.z.intersection( + QueueConsumerOptionsSchema, + import_zod2.z.object({ workerName: import_zod2.z.string() }) +); +var QueueConsumersSchema = /* @__PURE__ */ import_zod2.z.record(QueueConsumerSchema); +var QueueContentTypeSchema = /* @__PURE__ */ import_zod2.z.enum(["text", "json", "bytes", "v8"]).default("v8"); +var QueueIncomingMessageSchema = /* @__PURE__ */ import_zod2.z.object({ + contentType: QueueContentTypeSchema, + delaySecs: QueueMessageDelaySchema, + body: Base64DataSchema, + // When enqueuing messages on dead-letter queues, we want to reuse the same ID + // and timestamp + id: import_zod2.z.ostring(), + timestamp: import_zod2.z.onumber() +}); +var QueuesBatchRequestSchema = /* @__PURE__ */ import_zod2.z.object({ + messages: import_zod2.z.array(QueueIncomingMessageSchema) +}); + +// src/http/request.ts +var import_undici2 = require("undici"); +var kCf = Symbol("kCf"); +var Request = class _Request extends import_undici2.Request { + // We should be able to use a private `#cf` property here instead of a symbol + // here, but we need to set this on a clone, which would otherwise lead to a + // "Cannot write private member to an object whose class did not declare it" + // error. + [kCf]; + constructor(input, init2) { + super(input, init2); + this[kCf] = init2?.cf; + if (input instanceof _Request) this[kCf] ??= input.cf; + } + get cf() { + return this[kCf]; + } + // JSDoc comment so retained when bundling types with api-extractor + /** @ts-expect-error `clone` is actually defined as a method internally */ + clone() { + const request = super.clone(); + Object.setPrototypeOf(request, _Request.prototype); + request[kCf] = this[kCf]; + return request; + } +}; + +// src/http/response.ts +var import_undici3 = require("undici"); +var kWebSocket = Symbol("kWebSocket"); +var Response = class _Response extends import_undici3.Response { + // We should be able to use a private `#webSocket` property here instead of a + // symbol here, but `undici` calls `this.status` in its constructor, which + // causes a "Cannot read private member from an object whose class did not + // declare it" error. + [kWebSocket]; + // Override BaseResponse's static methods for building Responses to return + // our type instead. Ideally, we don't want to use `Object.setPrototypeOf`. + // Unfortunately, `error()` and `redirect()` set the internal header guard + // to "immutable". + static error() { + const response = import_undici3.Response.error(); + Object.setPrototypeOf(response, _Response.prototype); + return response; + } + static redirect(url20, status) { + const response = import_undici3.Response.redirect(url20, status); + Object.setPrototypeOf(response, _Response.prototype); + return response; + } + static json(data, init2) { + const body = JSON.stringify(data); + const response = new _Response(body, init2); + response.headers.set("Content-Type", "application/json"); + return response; + } + constructor(body, init2) { + if (init2?.webSocket) { + if (init2.status !== 101) { + throw new RangeError( + "Responses with a WebSocket must have status code 101." + ); + } + init2 = { ...init2, status: 200 }; + } + super(body, init2); + this[kWebSocket] = init2?.webSocket ?? null; + } + // JSDoc comment so retained when bundling types with api-extractor + /** @ts-expect-error `status` is actually defined as a getter internally */ + get status() { + return this[kWebSocket] ? 101 : super.status; + } + get webSocket() { + return this[kWebSocket]; + } + // JSDoc comment so retained when bundling types with api-extractor + /** @ts-expect-error `clone` is actually defined as a method internally */ + clone() { + if (this[kWebSocket]) { + throw new TypeError("Cannot clone a response to a WebSocket handshake."); + } + const response = super.clone(); + Object.setPrototypeOf(response, _Response.prototype); + return response; + } +}; + +// src/http/websocket.ts +var import_assert3 = __toESM(require("assert")); +var import_events = require("events"); +var import_ws = __toESM(require("ws")); + +// src/shared/colour.ts +var originalEnabled = $.enabled; +function _forceColour(enabled = originalEnabled) { + $.enabled = enabled; +} + +// src/shared/error.ts +var MiniflareError = class extends Error { + constructor(code, message, cause) { + super(message); + this.code = code; + this.cause = cause; + Object.setPrototypeOf(this, new.target.prototype); + this.name = `${new.target.name} [${code}]`; + } +}; +var MiniflareCoreError = class extends MiniflareError { +}; + +// src/shared/event.ts +var TypedEventTarget = class extends EventTarget { + addEventListener(type, listener, options) { + super.addEventListener( + type, + listener, + options + ); + } + removeEventListener(type, listener, options) { + super.removeEventListener( + type, + listener, + options + ); + } + dispatchEvent(event) { + return super.dispatchEvent(event); + } +}; + +// src/shared/log.ts +var import_path4 = __toESM(require("path")); +var cwd = process.cwd(); +var cwdNodeModules = import_path4.default.join(cwd, "node_modules"); +var LEVEL_PREFIX = { + [0 /* NONE */]: "", + [1 /* ERROR */]: "err", + [2 /* WARN */]: "wrn", + [3 /* INFO */]: "inf", + [4 /* DEBUG */]: "dbg", + [5 /* VERBOSE */]: "vrb" +}; +var LEVEL_COLOUR = { + [0 /* NONE */]: reset, + [1 /* ERROR */]: red, + [2 /* WARN */]: yellow, + [3 /* INFO */]: green, + [4 /* DEBUG */]: grey, + [5 /* VERBOSE */]: (input) => dim(grey(input)) +}; +function prefixError(prefix, e) { + if (e.stack) { + return new Proxy(e, { + get(target, propertyKey, receiver) { + const value = Reflect.get(target, propertyKey, receiver); + return propertyKey === "stack" ? `${prefix}: ${value}` : value; + } + }); + } + return e; +} +function dimInternalStackLine(line) { + if (line.startsWith(" at") && (!line.includes(cwd) || line.includes(cwdNodeModules))) { + return dim(line); + } + return line; +} +var Log = class _Log { + constructor(level = 3 /* INFO */, opts = {}) { + this.level = level; + const prefix = opts.prefix ?? "mf"; + const suffix = opts.suffix ?? ""; + this.#prefix = prefix ? prefix + ":" : ""; + this.#suffix = suffix ? ":" + suffix : ""; + } + #prefix; + #suffix; + log(message) { + _Log.#beforeLogHook?.(); + console.log(message); + _Log.#afterLogHook?.(); + } + static #beforeLogHook; + static unstable_registerBeforeLogHook(callback) { + this.#beforeLogHook = callback; + } + static #afterLogHook; + static unstable_registerAfterLogHook(callback) { + this.#afterLogHook = callback; + } + logWithLevel(level, message) { + if (level <= this.level) { + const prefix = `[${this.#prefix}${LEVEL_PREFIX[level]}${this.#suffix}]`; + this.log(LEVEL_COLOUR[level](`${prefix} ${message}`)); + } + } + error(message) { + if (this.level < 1 /* ERROR */) { + } else if (message.stack) { + const lines = message.stack.split("\n").map(dimInternalStackLine); + this.logWithLevel(1 /* ERROR */, lines.join("\n")); + } else { + this.logWithLevel(1 /* ERROR */, message.toString()); + } + if (message.cause) { + this.error(prefixError("Cause", message.cause)); + } + } + warn(message) { + this.logWithLevel(2 /* WARN */, message); + } + info(message) { + this.logWithLevel(3 /* INFO */, message); + } + debug(message) { + this.logWithLevel(4 /* DEBUG */, message); + } + verbose(message) { + this.logWithLevel(5 /* VERBOSE */, message); + } +}; +var NoOpLog = class extends Log { + constructor() { + super(0 /* NONE */); + } + log() { + } + error(_message) { + } +}; +var ansiRegexpPattern = [ + "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", + "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))" +].join("|"); +var ansiRegexp = new RegExp(ansiRegexpPattern, "g"); +function stripAnsi(value) { + return value.replace(ansiRegexp, ""); +} + +// src/shared/matcher.ts +var import_glob_to_regexp = __toESM(require("glob-to-regexp")); +function globsToRegExps(globs = []) { + const include = []; + const exclude = []; + const opts = { globstar: true, flags: "g" }; + for (const glob of globs) { + if (glob.startsWith("!")) { + exclude.push(new RegExp((0, import_glob_to_regexp.default)(glob.slice(1), opts), "")); + } else { + include.push(new RegExp((0, import_glob_to_regexp.default)(glob, opts), "")); + } + } + return { include, exclude }; +} + +// src/shared/streams.ts +var import_web = require("stream/web"); +function prefixStream(prefix, stream) { + const identity = new import_web.TransformStream(); + const writer = identity.writable.getWriter(); + void writer.write(prefix).then(() => { + writer.releaseLock(); + return stream.pipeTo(identity.writable); + }).catch((error) => { + return writer.abort(error); + }); + return identity.readable; +} +async function readPrefix(stream, prefixLength) { + const chunks = []; + let chunksLength = 0; + for await (const chunk of stream.values({ preventCancel: true })) { + chunks.push(chunk); + chunksLength += chunk.byteLength; + if (chunksLength >= prefixLength) break; + } + if (chunksLength < prefixLength) { + throw new RangeError( + `Expected ${prefixLength} byte prefix, but received ${chunksLength} byte stream` + ); + } + const atLeastPrefix = Buffer.concat(chunks, chunksLength); + const prefix = atLeastPrefix.subarray(0, prefixLength); + let rest = stream; + if (chunksLength > prefixLength) { + rest = prefixStream(atLeastPrefix.subarray(prefixLength), stream); + } + return [prefix, rest]; +} + +// src/shared/types.ts +var import_assert2 = __toESM(require("assert")); +var import_path5 = __toESM(require("path")); +var import_zod3 = require("zod"); +function zAwaitable(type) { + return type.or(import_zod3.z.promise(type)); +} +var LiteralSchema = import_zod3.z.union([ + import_zod3.z.string(), + import_zod3.z.number(), + import_zod3.z.boolean(), + import_zod3.z.null() +]); +var JsonSchema = import_zod3.z.lazy( + () => import_zod3.z.union([LiteralSchema, import_zod3.z.array(JsonSchema), import_zod3.z.record(JsonSchema)]) +); +var rootPath; +function parseWithRootPath(newRootPath, schema, data, params) { + rootPath = newRootPath; + try { + return schema.parse(data, params); + } finally { + rootPath = void 0; + } +} +var PathSchema = import_zod3.z.string().transform((p) => { + (0, import_assert2.default)( + rootPath !== void 0, + "Expected `PathSchema` to be parsed within `parseWithRootPath()`" + ); + return import_path5.default.resolve(rootPath, p); +}); +function _isCyclic(value, seen = /* @__PURE__ */ new Set()) { + if (typeof value !== "object" || value === null) return false; + for (const child of Object.values(value)) { + if (seen.has(child)) return true; + seen.add(child); + if (_isCyclic(child, seen)) return true; + seen.delete(child); + } + return false; +} + +// src/http/websocket.ts +var MessageEvent = class extends Event { + data; + constructor(type, init2) { + super(type); + this.data = init2.data; + } +}; +var CloseEvent = class extends Event { + code; + reason; + wasClean; + constructor(type, init2) { + super(type); + this.code = init2?.code ?? 1005; + this.reason = init2?.reason ?? ""; + this.wasClean = init2?.wasClean ?? false; + } +}; +var ErrorEvent = class extends Event { + error; + constructor(type, init2) { + super(type); + this.error = init2?.error ?? null; + } +}; +var kPair = Symbol("kPair"); +var kAccepted = Symbol("kAccepted"); +var kCoupled = Symbol("kCoupled"); +var kClosedOutgoing = Symbol("kClosedOutgoing"); +var kClosedIncoming = Symbol("kClosedIncoming"); +var kSend = Symbol("kSend"); +var kClose = Symbol("kClose"); +var kError = Symbol("kError"); +var WebSocket = class _WebSocket extends TypedEventTarget { + // The Workers runtime prefixes these constants with `READY_STATE_`, unlike + // those in the spec: https://websockets.spec.whatwg.org/#interface-definition + static READY_STATE_CONNECTING = 0; + static READY_STATE_OPEN = 1; + static READY_STATE_CLOSING = 2; + static READY_STATE_CLOSED = 3; + #dispatchQueue = []; + [kPair]; + [kAccepted] = false; + [kCoupled] = false; + [kClosedOutgoing] = false; + [kClosedIncoming] = false; + get readyState() { + if (this[kClosedOutgoing] && this[kClosedIncoming]) { + return _WebSocket.READY_STATE_CLOSED; + } else if (this[kClosedOutgoing] || this[kClosedIncoming]) { + return _WebSocket.READY_STATE_CLOSING; + } + return _WebSocket.READY_STATE_OPEN; + } + async #queuingDispatchToPair(event) { + const pair = this[kPair]; + (0, import_assert3.default)(pair !== void 0); + if (pair[kAccepted]) { + pair.dispatchEvent(event); + } else { + (0, import_assert3.default)(pair.#dispatchQueue !== void 0); + pair.#dispatchQueue.push(event); + } + } + accept() { + if (this[kCoupled]) { + throw new TypeError( + "Can't accept() WebSocket that was already used in a response." + ); + } + if (this[kAccepted]) return; + this[kAccepted] = true; + if (this.#dispatchQueue !== void 0) { + for (const event of this.#dispatchQueue) this.dispatchEvent(event); + this.#dispatchQueue = void 0; + } + } + send(message) { + if (!this[kAccepted]) { + throw new TypeError( + "You must call accept() on this WebSocket before sending messages." + ); + } + this[kSend](message); + } + [kSend](message) { + if (this[kClosedOutgoing]) { + throw new TypeError("Can't call WebSocket send() after close()."); + } + const event = new MessageEvent("message", { data: message }); + void this.#queuingDispatchToPair(event); + } + close(code, reason) { + if (code) { + const validCode = code >= 1e3 && code < 5e3 && code !== 1004 && code !== 1005 && code !== 1006 && code !== 1015; + if (!validCode) throw new TypeError("Invalid WebSocket close code."); + } + if (reason !== void 0 && code === void 0) { + throw new TypeError( + "If you specify a WebSocket close reason, you must also specify a code." + ); + } + if (!this[kAccepted]) { + throw new TypeError( + "You must call accept() on this WebSocket before sending messages." + ); + } + this[kClose](code, reason); + } + [kClose](code, reason) { + if (this[kClosedOutgoing]) throw new TypeError("WebSocket already closed"); + const pair = this[kPair]; + (0, import_assert3.default)(pair !== void 0); + this[kClosedOutgoing] = true; + pair[kClosedIncoming] = true; + const event = new CloseEvent("close", { code, reason }); + void this.#queuingDispatchToPair(event); + } + [kError](error) { + const event = new ErrorEvent("error", { error }); + void this.#queuingDispatchToPair(event); + } +}; +var WebSocketPair = function() { + if (!(this instanceof WebSocketPair)) { + throw new TypeError( + "Failed to construct 'WebSocketPair': Please use the 'new' operator, this object constructor cannot be called as a function." + ); + } + this[0] = new WebSocket(); + this[1] = new WebSocket(); + this[0][kPair] = this[1]; + this[1][kPair] = this[0]; +}; +async function coupleWebSocket(ws, pair) { + if (pair[kCoupled]) { + throw new TypeError( + "Can't return WebSocket that was already used in a response." + ); + } + if (pair[kAccepted]) { + throw new TypeError( + "Can't return WebSocket in a Response after calling accept()." + ); + } + ws.on("message", (message, isBinary) => { + if (!pair[kClosedOutgoing]) { + pair[kSend](isBinary ? viewToBuffer(message) : message.toString()); + } + }); + ws.on("close", (code, reason) => { + if (!pair[kClosedOutgoing]) { + pair[kClose](code, reason.toString()); + } + }); + ws.on("error", (error) => { + pair[kError](error); + }); + pair.addEventListener("message", (e) => { + ws.send(e.data); + }); + pair.addEventListener("close", (e) => { + if (e.code === 1005) { + ws.close(); + } else if (e.code === 1006) { + ws.terminate(); + } else { + ws.close(e.code, e.reason); + } + }); + if (ws.readyState === import_ws.default.CONNECTING) { + await (0, import_events.once)(ws, "open"); + } else if (ws.readyState >= import_ws.default.CLOSING) { + throw new TypeError("Incoming WebSocket connection already closed."); + } + pair.accept(); + pair[kCoupled] = true; +} + +// src/http/fetch.ts +var ignored = ["transfer-encoding", "connection", "keep-alive", "expect"]; +function headersFromIncomingRequest(req) { + const entries = Object.entries(req.headers).filter( + (pair) => { + const [name, value] = pair; + return !ignored.includes(name) && value !== void 0; + } + ); + return new undici.Headers(Object.fromEntries(entries)); +} +async function fetch4(input, init2) { + const requestInit = init2; + const request = new Request(input, requestInit); + if (request.method === "GET" && request.headers.get("upgrade") === "websocket") { + const url20 = new URL(request.url); + if (url20.protocol !== "http:" && url20.protocol !== "https:") { + throw new TypeError( + `Fetch API cannot load: ${url20.toString()}. +Make sure you're using http(s):// URLs for WebSocket requests via fetch.` + ); + } + url20.protocol = url20.protocol.replace("http", "ws"); + const headers = {}; + let protocols; + for (const [key, value] of request.headers.entries()) { + if (key.toLowerCase() === "sec-websocket-protocol") { + protocols = value.split(",").map((protocol) => protocol.trim()); + } else { + headers[key] = value; + } + } + let rejectUnauthorized; + if (requestInit.dispatcher instanceof DispatchFetchDispatcher) { + requestInit.dispatcher.addHeaders(headers, url20.pathname + url20.search); + rejectUnauthorized = { rejectUnauthorized: false }; + } + const ws = new import_ws2.default(url20, protocols, { + followRedirects: request.redirect === "follow", + headers, + ...rejectUnauthorized + }); + const responsePromise = new DeferredPromise(); + ws.once("upgrade", (req) => { + const headers2 = headersFromIncomingRequest(req); + const [worker, client] = Object.values(new WebSocketPair()); + const couplePromise = coupleWebSocket(ws, client); + const response2 = new Response(null, { + status: 101, + webSocket: worker, + headers: headers2 + }); + responsePromise.resolve(couplePromise.then(() => response2)); + }); + ws.once("unexpected-response", (_, req) => { + const headers2 = headersFromIncomingRequest(req); + const response2 = new Response(req, { + status: req.statusCode, + headers: headers2 + }); + responsePromise.resolve(response2); + }); + return responsePromise; + } + const response = await undici.fetch(request, { + dispatcher: requestInit?.dispatcher + }); + return new Response(response.body, response); +} +function addHeader(headers, key, value) { + if (Array.isArray(headers)) headers.push(key, value); + else headers[key] = value; +} +var DispatchFetchDispatcher = class extends undici.Dispatcher { + /** + * @param globalDispatcher Dispatcher to use for all non-runtime requests + * (rejects unauthorised certificates) + * @param runtimeDispatcher Dispatcher to use for runtime requests + * (permits unauthorised certificates) + * @param actualRuntimeOrigin Origin to send all runtime requests to + * @param userRuntimeOrigin Origin to treat as runtime request + * (initial URL passed by user to `dispatchFetch()`) + * @param cfBlob `request.cf` blob override for runtime requests + */ + constructor(globalDispatcher, runtimeDispatcher, actualRuntimeOrigin, userRuntimeOrigin, cfBlob) { + super(); + this.globalDispatcher = globalDispatcher; + this.runtimeDispatcher = runtimeDispatcher; + this.actualRuntimeOrigin = actualRuntimeOrigin; + this.userRuntimeOrigin = userRuntimeOrigin; + if (cfBlob !== void 0) this.cfBlobJson = JSON.stringify(cfBlob); + } + cfBlobJson; + addHeaders(headers, path30) { + const originalURL = this.userRuntimeOrigin + path30; + addHeader(headers, CoreHeaders.ORIGINAL_URL, originalURL); + addHeader(headers, CoreHeaders.DISABLE_PRETTY_ERROR, "true"); + if (this.cfBlobJson !== void 0) { + addHeader(headers, CoreHeaders.CF_BLOB, this.cfBlobJson); + } + } + dispatch(options, handler) { + let origin = String(options.origin); + if (origin === this.userRuntimeOrigin) origin = this.actualRuntimeOrigin; + if (origin === this.actualRuntimeOrigin) { + options.origin = origin; + let path30 = options.path; + if (options.query !== void 0) { + const url20 = new URL(path30, "http://placeholder/"); + for (const [key, value] of Object.entries(options.query)) { + url20.searchParams.append(key, value); + } + path30 = url20.pathname + url20.search; + } + options.headers ??= {}; + this.addHeaders(options.headers, path30); + return this.runtimeDispatcher.dispatch(options, handler); + } else { + return this.globalDispatcher.dispatch(options, handler); + } + } + async close(callback) { + await Promise.all([ + this.globalDispatcher.close(), + this.runtimeDispatcher.close() + ]); + callback?.(); + } + async destroy(errCallback, callback) { + let err = null; + if (typeof errCallback === "function") callback = errCallback; + if (errCallback instanceof Error) err = errCallback; + await Promise.all([ + this.globalDispatcher.destroy(err), + this.runtimeDispatcher.destroy(err) + ]); + callback?.(); + } + get isMockActive() { + return this.globalDispatcher.isMockActive ?? false; + } +}; + +// src/http/server.ts +var import_promises2 = __toESM(require("fs/promises")); + +// src/http/cert.ts +var KEY = ` +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIC+umAaVUbEfPqGA9M7b5zAP7tN2eLT1bu8U8gpbaKbsoAoGCCqGSM49 +AwEHoUQDQgAEtrIEgzogjrUHIvB4qgjg/cT7blhWuLUfSUp6H62NCo21NrVWgPtC +mCWw+vbGTBwIr/9X1S4UL1/f3zDICC7YSA== +-----END EC PRIVATE KEY----- +`; +var CERT = ` +-----BEGIN CERTIFICATE----- +MIICcDCCAhegAwIBAgIUE97EcbEWw3YZMN/ucGBSzJ/5qA4wCgYIKoZIzj0EAwIw +VTELMAkGA1UEBhMCVVMxDjAMBgNVBAgMBVRleGFzMQ8wDQYDVQQHDAZBdXN0aW4x +EzARBgNVBAoMCkNsb3VkZmxhcmUxEDAOBgNVBAsMB1dvcmtlcnMwIBcNMjMwNjIy +MTg1ODQ3WhgPMjEyMzA1MjkxODU4NDdaMFUxCzAJBgNVBAYTAlVTMQ4wDAYDVQQI +DAVUZXhhczEPMA0GA1UEBwwGQXVzdGluMRMwEQYDVQQKDApDbG91ZGZsYXJlMRAw +DgYDVQQLDAdXb3JrZXJzMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEtrIEgzog +jrUHIvB4qgjg/cT7blhWuLUfSUp6H62NCo21NrVWgPtCmCWw+vbGTBwIr/9X1S4U +L1/f3zDICC7YSKOBwjCBvzAdBgNVHQ4EFgQUSXahTksi00c6KhUECHIY4FLW7Sow +HwYDVR0jBBgwFoAUSXahTksi00c6KhUECHIY4FLW7SowDwYDVR0TAQH/BAUwAwEB +/zAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUw +CwYDVR0PBAQDAgL0MDEGA1UdJQQqMCgGCCsGAQUFBwMBBggrBgEFBQcDAgYIKwYB +BQUHAwMGCCsGAQUFBwMIMAoGCCqGSM49BAMCA0cAMEQCIE2qnXbKTHQ8wtwI+9XR +h4ivDyz7w7iGxn3+ccmj/CQqAiApdX/Iz/jGRzi04xFlE4GoPVG/zaMi64ckmIpE +ez/dHA== +-----END CERTIFICATE----- +`; + +// src/http/server.ts +async function getEntrySocketHttpOptions(coreOpts) { + let privateKey = void 0; + let certificateChain = void 0; + if ((coreOpts.httpsKey || coreOpts.httpsKeyPath) && (coreOpts.httpsCert || coreOpts.httpsCertPath)) { + privateKey = await valueOrFile(coreOpts.httpsKey, coreOpts.httpsKeyPath); + certificateChain = await valueOrFile( + coreOpts.httpsCert, + coreOpts.httpsCertPath + ); + } else if (coreOpts.https) { + privateKey = KEY; + certificateChain = CERT; + } + if (privateKey && certificateChain) { + return { + https: { + tlsOptions: { + keypair: { + privateKey, + certificateChain + } + } + } + }; + } else { + return { http: {} }; + } +} +function valueOrFile(value, filePath) { + return value ?? (filePath && import_promises2.default.readFile(filePath, "utf8")); +} + +// src/http/helpers.ts +var import_os = require("os"); +function getAccessibleHosts(ipv4Only = false) { + const hosts = []; + Object.values((0, import_os.networkInterfaces)()).forEach((net3) => { + net3?.forEach(({ family, address }) => { + if (family === "IPv4" || family === 4) { + hosts.push(address); + } else if (!ipv4Only) { + hosts.push(address); + } + }); + }); + return hosts; +} + +// src/http/index.ts +var import_undici4 = require("undici"); + +// src/plugins/assets/index.ts +var import_node_crypto = __toESM(require("node:crypto")); +var import_promises7 = __toESM(require("node:fs/promises")); +var import_node_path3 = __toESM(require("node:path")); + +// ../workers-shared/utils/constants.ts +var HEADER_SIZE = 20; +var PATH_HASH_SIZE = 16; +var CONTENT_HASH_SIZE = 16; +var TAIL_SIZE = 8; +var PATH_HASH_OFFSET = 0; +var CONTENT_HASH_OFFSET = PATH_HASH_SIZE; +var ENTRY_SIZE = PATH_HASH_SIZE + CONTENT_HASH_SIZE + TAIL_SIZE; +var MAX_ASSET_COUNT = 2e4; +var MAX_ASSET_SIZE = 25 * 1024 * 1024; +var CF_ASSETS_IGNORE_FILENAME = ".assetsignore"; +var REDIRECTS_FILENAME = "_redirects"; +var HEADERS_FILENAME = "_headers"; + +// ../workers-shared/utils/types.ts +var import_zod4 = require("zod"); +var InternalConfigSchema = import_zod4.z.object({ + account_id: import_zod4.z.number().optional(), + script_id: import_zod4.z.number().optional() +}); +var RouterConfigSchema = import_zod4.z.object({ + invoke_user_worker_ahead_of_assets: import_zod4.z.boolean().optional(), + has_user_worker: import_zod4.z.boolean().optional(), + ...InternalConfigSchema.shape +}); +var MetadataStaticRedirectEntry = import_zod4.z.object({ + status: import_zod4.z.number(), + to: import_zod4.z.string(), + lineNumber: import_zod4.z.number() +}); +var MetadataRedirectEntry = import_zod4.z.object({ + status: import_zod4.z.number(), + to: import_zod4.z.string() +}); +var MetadataStaticRedirects = import_zod4.z.record(MetadataStaticRedirectEntry); +var MetadataRedirects = import_zod4.z.record(MetadataRedirectEntry); +var MetadataHeaderEntry = import_zod4.z.object({ + set: import_zod4.z.record(import_zod4.z.string()).optional(), + unset: import_zod4.z.array(import_zod4.z.string()).optional() +}); +var MetadataHeaders = import_zod4.z.record(MetadataHeaderEntry); +var RedirectsSchema = import_zod4.z.object({ + version: import_zod4.z.literal(1), + staticRules: MetadataStaticRedirects, + rules: MetadataRedirects +}).optional(); +var HeadersSchema = import_zod4.z.object({ + version: import_zod4.z.literal(2), + rules: MetadataHeaders +}).optional(); +var AssetConfigSchema = import_zod4.z.object({ + compatibility_date: import_zod4.z.string().optional(), + compatibility_flags: import_zod4.z.array(import_zod4.z.string()).optional(), + html_handling: import_zod4.z.enum([ + "auto-trailing-slash", + "force-trailing-slash", + "drop-trailing-slash", + "none" + ]).optional(), + not_found_handling: import_zod4.z.enum(["single-page-application", "404-page", "none"]).optional(), + redirects: RedirectsSchema, + headers: HeadersSchema, + ...InternalConfigSchema.shape +}); + +// ../workers-shared/utils/helpers.ts +var import_node_fs = require("node:fs"); +var import_node_path = require("node:path"); +var import_ignore = __toESM(require_ignore()); +var import_mime = __toESM(require_mime()); +var normalizeFilePath = (relativeFilepath) => { + if ((0, import_node_path.isAbsolute)(relativeFilepath)) { + throw new Error(`Expected relative path`); + } + return "/" + relativeFilepath.split(import_node_path.sep).join("/"); +}; +var getContentType = (absFilePath) => { + let contentType = (0, import_mime.getType)(absFilePath); + if (contentType && contentType.startsWith("text/") && !contentType.includes("charset")) { + contentType = `${contentType}; charset=utf-8`; + } + return contentType; +}; +function createPatternMatcher(patterns, exclude) { + if (patterns.length === 0) { + return (_filePath) => !exclude; + } else { + const ignorer = (0, import_ignore.default)().add(patterns); + return (filePath) => ignorer.test(filePath).ignored; + } +} +function thrownIsDoesNotExistError(thrown) { + return thrown instanceof Error && "code" in thrown && thrown.code === "ENOENT"; +} +function maybeGetFile(filePath) { + try { + return (0, import_node_fs.readFileSync)(filePath, "utf8"); + } catch (e) { + if (!thrownIsDoesNotExistError(e)) { + throw e; + } + } +} +async function createAssetsIgnoreFunction(dir) { + const cfAssetIgnorePath = (0, import_node_path.resolve)(dir, CF_ASSETS_IGNORE_FILENAME); + const ignorePatterns = [ + // Ignore the `.assetsignore` file and other metafiles by default. + // The ignore lib expects unix-style paths for its patterns + `/${CF_ASSETS_IGNORE_FILENAME}`, + `/${REDIRECTS_FILENAME}`, + `/${HEADERS_FILENAME}` + ]; + let assetsIgnoreFilePresent = false; + const assetsIgnore = maybeGetFile(cfAssetIgnorePath); + if (assetsIgnore !== void 0) { + assetsIgnoreFilePresent = true; + ignorePatterns.push(...assetsIgnore.split("\n")); + } + return { + assetsIgnoreFunction: createPatternMatcher(ignorePatterns, true), + assetsIgnoreFilePresent + }; +} + +// ../workers-shared/utils/configuration/constructConfiguration.ts +var import_node_path2 = require("node:path"); + +// ../workers-shared/utils/configuration/constants.ts +var REDIRECTS_VERSION = 1; +var HEADERS_VERSION = 2; +var PERMITTED_STATUS_CODES = /* @__PURE__ */ new Set([200, 301, 302, 303, 307, 308]); +var HEADER_SEPARATOR = ":"; +var MAX_LINE_LENGTH = 2e3; +var MAX_HEADER_RULES = 100; +var MAX_DYNAMIC_REDIRECT_RULES = 100; +var MAX_STATIC_REDIRECT_RULES = 2e3; +var UNSET_OPERATOR = "! "; +var SPLAT_REGEX = /\*/g; +var PLACEHOLDER_REGEX = /:[A-Za-z]\w*/g; + +// ../workers-shared/utils/configuration/constructConfiguration.ts +function constructRedirects({ + redirects, + redirectsFile, + logger +}) { + if (!redirects) { + return {}; + } + const num_valid = redirects.rules.length; + const num_invalid = redirects.invalid.length; + const redirectsRelativePath = redirectsFile ? (0, import_node_path2.relative)(process.cwd(), redirectsFile) : ""; + logger.log( + `\u2728 Parsed ${num_valid} valid redirect rule${num_valid === 1 ? "" : "s"}.` + ); + if (num_invalid > 0) { + let invalidRedirectRulesList = ``; + for (const { line, lineNumber, message } of redirects.invalid) { + invalidRedirectRulesList += `\u25B6\uFE0E ${message} +`; + if (line) { + invalidRedirectRulesList += ` at ${redirectsRelativePath}${lineNumber ? `:${lineNumber}` : ""} | ${line} + +`; + } + } + logger.warn( + `Found ${num_invalid} invalid redirect rule${num_invalid === 1 ? "" : "s"}: +${invalidRedirectRulesList}` + ); + } + if (num_valid === 0) { + return {}; + } + const staticRedirects = {}; + const dynamicRedirects = {}; + let canCreateStaticRule = true; + for (const rule of redirects.rules) { + if (!rule.from.match(SPLAT_REGEX) && !rule.from.match(PLACEHOLDER_REGEX)) { + if (canCreateStaticRule) { + staticRedirects[rule.from] = { + status: rule.status, + to: rule.to, + lineNumber: rule.lineNumber + }; + continue; + } else { + logger.info( + `The redirect rule ${rule.from} \u2192 ${rule.status} ${rule.to} could be made more performant by bringing it above any lines with splats or placeholders.` + ); + } + } + dynamicRedirects[rule.from] = { status: rule.status, to: rule.to }; + canCreateStaticRule = false; + } + return { + redirects: { + version: REDIRECTS_VERSION, + staticRules: staticRedirects, + rules: dynamicRedirects + } + }; +} +function constructHeaders({ + headers, + headersFile, + logger +}) { + if (!headers) { + return {}; + } + const num_valid = headers.rules.length; + const num_invalid = headers.invalid.length; + const headersRelativePath = headersFile ? (0, import_node_path2.relative)(process.cwd(), headersFile) : ""; + logger.log( + `\u2728 Parsed ${num_valid} valid header rule${num_valid === 1 ? "" : "s"}.` + ); + if (num_invalid > 0) { + let invalidHeaderRulesList = ``; + for (const { line, lineNumber, message } of headers.invalid) { + invalidHeaderRulesList += `\u25B6\uFE0E ${message} +`; + if (line) { + invalidHeaderRulesList += ` at ${headersRelativePath}${lineNumber ? `:${lineNumber}` : ""} | ${line} + +`; + } + } + logger.warn( + `Found ${num_invalid} invalid header rule${num_invalid === 1 ? "" : "s"}: +${invalidHeaderRulesList}` + ); + } + if (num_valid === 0) { + return {}; + } + const rules = {}; + for (const rule of headers.rules) { + rules[rule.path] = {}; + if (Object.keys(rule.headers).length) { + rules[rule.path].set = rule.headers; + } + if (rule.unsetHeaders.length) { + rules[rule.path].unset = rule.unsetHeaders; + } + } + return { + headers: { + version: HEADERS_VERSION, + rules + } + }; +} + +// ../workers-shared/utils/configuration/validateURL.ts +var extractPathname = (path30 = "/", includeSearch, includeHash) => { + if (!path30.startsWith("/")) { + path30 = `/${path30}`; + } + const url20 = new URL(`//${path30}`, "relative://"); + return `${url20.pathname}${includeSearch ? url20.search : ""}${includeHash ? url20.hash : ""}`; +}; +var URL_REGEX = /^https:\/\/+(?[^/]+)\/?(?.*)/; +var HOST_WITH_PORT_REGEX = /.*:\d+$/; +var PATH_REGEX = /^\//; +var validateUrl = (token, onlyRelative = false, disallowPorts = false, includeSearch = false, includeHash = false) => { + const host = URL_REGEX.exec(token); + if (host && host.groups && host.groups.host) { + if (onlyRelative) { + return [ + void 0, + `Only relative URLs are allowed. Skipping absolute URL ${token}.` + ]; + } + if (disallowPorts && host.groups.host.match(HOST_WITH_PORT_REGEX)) { + return [ + void 0, + `Specifying ports is not supported. Skipping absolute URL ${token}.` + ]; + } + return [ + `https://${host.groups.host}${extractPathname( + host.groups.path, + includeSearch, + includeHash + )}`, + void 0 + ]; + } else { + if (!token.startsWith("/") && onlyRelative) { + token = `/${token}`; + } + const path30 = PATH_REGEX.exec(token); + if (path30) { + try { + return [extractPathname(token, includeSearch, includeHash), void 0]; + } catch { + return [void 0, `Error parsing URL segment ${token}. Skipping.`]; + } + } + } + return [ + void 0, + onlyRelative ? "URLs should begin with a forward-slash." : 'URLs should either be relative (e.g. begin with a forward-slash), or use HTTPS (e.g. begin with "https://").' + ]; +}; +function urlHasHost(token) { + const host = URL_REGEX.exec(token); + return Boolean(host && host.groups && host.groups.host); +} + +// ../workers-shared/utils/configuration/parseHeaders.ts +var LINE_IS_PROBABLY_A_PATH = new RegExp(/^([^\s]+:\/\/|^\/)/); +function parseHeaders(input) { + const lines = input.split("\n"); + const rules = []; + const invalid = []; + let rule = void 0; + for (let i = 0; i < lines.length; i++) { + const line = lines[i].trim(); + if (line.length === 0 || line.startsWith("#")) { + continue; + } + if (line.length > MAX_LINE_LENGTH) { + invalid.push({ + message: `Ignoring line ${i + 1} as it exceeds the maximum allowed length of ${MAX_LINE_LENGTH}.` + }); + continue; + } + if (LINE_IS_PROBABLY_A_PATH.test(line)) { + if (rules.length >= MAX_HEADER_RULES) { + invalid.push({ + message: `Maximum number of rules supported is ${MAX_HEADER_RULES}. Skipping remaining ${lines.length - i} lines of file.` + }); + break; + } + if (rule) { + if (isValidRule(rule)) { + rules.push({ + path: rule.path, + headers: rule.headers, + unsetHeaders: rule.unsetHeaders + }); + } else { + invalid.push({ + line: rule.line, + lineNumber: i + 1, + message: "No headers specified" + }); + } + } + const [path30, pathError] = validateUrl(line, false, true); + if (pathError) { + invalid.push({ + line, + lineNumber: i + 1, + message: pathError + }); + rule = void 0; + continue; + } + rule = { + path: path30, + line, + headers: {}, + unsetHeaders: [] + }; + continue; + } + if (!line.includes(HEADER_SEPARATOR)) { + if (!rule) { + invalid.push({ + line, + lineNumber: i + 1, + message: "Expected a path beginning with at least one forward-slash" + }); + } else { + if (line.trim().startsWith(UNSET_OPERATOR)) { + rule.unsetHeaders.push(line.trim().replace(UNSET_OPERATOR, "")); + } else { + invalid.push({ + line, + lineNumber: i + 1, + message: "Expected a colon-separated header pair (e.g. name: value)" + }); + } + } + continue; + } + const [rawName, ...rawValue] = line.split(HEADER_SEPARATOR); + const name = rawName.trim().toLowerCase(); + if (name.includes(" ")) { + invalid.push({ + line, + lineNumber: i + 1, + message: "Header name cannot include spaces" + }); + continue; + } + const value = rawValue.join(HEADER_SEPARATOR).trim(); + if (name === "") { + invalid.push({ + line, + lineNumber: i + 1, + message: "No header name specified" + }); + continue; + } + if (value === "") { + invalid.push({ + line, + lineNumber: i + 1, + message: "No header value specified" + }); + continue; + } + if (!rule) { + invalid.push({ + line, + lineNumber: i + 1, + message: `Path should come before header (${name}: ${value})` + }); + continue; + } + const existingValues = rule.headers[name]; + rule.headers[name] = existingValues ? `${existingValues}, ${value}` : value; + } + if (rule) { + if (isValidRule(rule)) { + rules.push({ + path: rule.path, + headers: rule.headers, + unsetHeaders: rule.unsetHeaders + }); + } else { + invalid.push({ line: rule.line, message: "No headers specified" }); + } + } + return { + rules, + invalid + }; +} +function isValidRule(rule) { + return Object.keys(rule.headers).length > 0 || rule.unsetHeaders.length > 0; +} + +// ../workers-shared/utils/configuration/parseRedirects.ts +function parseRedirects(input) { + const lines = input.split("\n"); + const rules = []; + const seen_paths = /* @__PURE__ */ new Set(); + const invalid = []; + let staticRules = 0; + let dynamicRules = 0; + let canCreateStaticRule = true; + for (let i = 0; i < lines.length; i++) { + const line = lines[i].trim(); + if (line.length === 0 || line.startsWith("#")) { + continue; + } + if (line.length > MAX_LINE_LENGTH) { + invalid.push({ + message: `Ignoring line ${i + 1} as it exceeds the maximum allowed length of ${MAX_LINE_LENGTH}.` + }); + continue; + } + const tokens = line.split(/\s+/); + if (tokens.length < 2 || tokens.length > 3) { + invalid.push({ + line, + lineNumber: i + 1, + message: `Expected exactly 2 or 3 whitespace-separated tokens. Got ${tokens.length}.` + }); + continue; + } + const [str_from, str_to, str_status = "302"] = tokens; + const fromResult = validateUrl(str_from, true, true, false, false); + if (fromResult[0] === void 0) { + invalid.push({ + line, + lineNumber: i + 1, + message: fromResult[1] + }); + continue; + } + const from = fromResult[0]; + if (canCreateStaticRule && !from.match(SPLAT_REGEX) && !from.match(PLACEHOLDER_REGEX)) { + staticRules += 1; + if (staticRules > MAX_STATIC_REDIRECT_RULES) { + invalid.push({ + message: `Maximum number of static rules supported is ${MAX_STATIC_REDIRECT_RULES}. Skipping line.` + }); + continue; + } + } else { + dynamicRules += 1; + canCreateStaticRule = false; + if (dynamicRules > MAX_DYNAMIC_REDIRECT_RULES) { + invalid.push({ + message: `Maximum number of dynamic rules supported is ${MAX_DYNAMIC_REDIRECT_RULES}. Skipping remaining ${lines.length - i} lines of file.` + }); + break; + } + } + const toResult = validateUrl(str_to, false, false, true, true); + if (toResult[0] === void 0) { + invalid.push({ + line, + lineNumber: i + 1, + message: toResult[1] + }); + continue; + } + const to = toResult[0]; + const status = Number(str_status); + if (isNaN(status) || !PERMITTED_STATUS_CODES.has(status)) { + invalid.push({ + line, + lineNumber: i + 1, + message: `Valid status codes are 200, 301, 302 (default), 303, 307, or 308. Got ${str_status}.` + }); + continue; + } + if (/\/\*?$/.test(from) && /\/index(.html)?$/.test(to) && !urlHasHost(to)) { + invalid.push({ + line, + lineNumber: i + 1, + message: "Infinite loop detected in this rule and has been ignored. This will cause a redirect to strip `.html` or `/index` and end up triggering this rule again. Please fix or remove this rule to silence this warning." + }); + continue; + } + if (seen_paths.has(from)) { + invalid.push({ + line, + lineNumber: i + 1, + message: `Ignoring duplicate rule for path ${from}.` + }); + continue; + } + seen_paths.add(from); + if (status === 200) { + if (urlHasHost(to)) { + invalid.push({ + line, + lineNumber: i + 1, + message: `Proxy (200) redirects can only point to relative paths. Got ${to}` + }); + continue; + } + } + rules.push({ from, to, status, lineNumber: i + 1 }); + } + return { + rules, + invalid + }; +} + +// ../../node_modules/.pnpm/pretty-bytes@6.1.1/node_modules/pretty-bytes/index.js +var BYTE_UNITS = [ + "B", + "kB", + "MB", + "GB", + "TB", + "PB", + "EB", + "ZB", + "YB" +]; +var BIBYTE_UNITS = [ + "B", + "KiB", + "MiB", + "GiB", + "TiB", + "PiB", + "EiB", + "ZiB", + "YiB" +]; +var BIT_UNITS = [ + "b", + "kbit", + "Mbit", + "Gbit", + "Tbit", + "Pbit", + "Ebit", + "Zbit", + "Ybit" +]; +var BIBIT_UNITS = [ + "b", + "kibit", + "Mibit", + "Gibit", + "Tibit", + "Pibit", + "Eibit", + "Zibit", + "Yibit" +]; +var toLocaleString = (number, locale, options) => { + let result = number; + if (typeof locale === "string" || Array.isArray(locale)) { + result = number.toLocaleString(locale, options); + } else if (locale === true || options !== void 0) { + result = number.toLocaleString(void 0, options); + } + return result; +}; +function prettyBytes(number, options) { + if (!Number.isFinite(number)) { + throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`); + } + options = { + bits: false, + binary: false, + space: true, + ...options + }; + const UNITS = options.bits ? options.binary ? BIBIT_UNITS : BIT_UNITS : options.binary ? BIBYTE_UNITS : BYTE_UNITS; + const separator = options.space ? " " : ""; + if (options.signed && number === 0) { + return ` 0${separator}${UNITS[0]}`; + } + const isNegative = number < 0; + const prefix = isNegative ? "-" : options.signed ? "+" : ""; + if (isNegative) { + number = -number; + } + let localeOptions; + if (options.minimumFractionDigits !== void 0) { + localeOptions = { minimumFractionDigits: options.minimumFractionDigits }; + } + if (options.maximumFractionDigits !== void 0) { + localeOptions = { maximumFractionDigits: options.maximumFractionDigits, ...localeOptions }; + } + if (number < 1) { + const numberString2 = toLocaleString(number, options.locale, localeOptions); + return prefix + numberString2 + separator + UNITS[0]; + } + const exponent = Math.min(Math.floor(options.binary ? Math.log(number) / Math.log(1024) : Math.log10(number) / 3), UNITS.length - 1); + number /= (options.binary ? 1024 : 1e3) ** exponent; + if (!localeOptions) { + number = number.toPrecision(3); + } + const numberString = toLocaleString(Number(number), options.locale, localeOptions); + const unit = UNITS[exponent]; + return prefix + numberString + separator + unit; +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/assets/assets.worker.ts +var import_fs3 = __toESM(require("fs")); +var import_path6 = __toESM(require("path")); +var import_url3 = __toESM(require("url")); +var contents3; +function assets_worker_default() { + if (contents3 !== void 0) return contents3; + const filePath = import_path6.default.join(__dirname, "workers", "assets/assets.worker.js"); + contents3 = import_fs3.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url3.default.pathToFileURL(filePath); + return contents3; +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/assets/assets-kv.worker.ts +var import_fs4 = __toESM(require("fs")); +var import_path7 = __toESM(require("path")); +var import_url4 = __toESM(require("url")); +var contents4; +function assets_kv_worker_default() { + if (contents4 !== void 0) return contents4; + const filePath = import_path7.default.join(__dirname, "workers", "assets/assets-kv.worker.js"); + contents4 = import_fs4.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url4.default.pathToFileURL(filePath); + return contents4; +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/assets/router.worker.ts +var import_fs5 = __toESM(require("fs")); +var import_path8 = __toESM(require("path")); +var import_url5 = __toESM(require("url")); +var contents5; +function router_worker_default() { + if (contents5 !== void 0) return contents5; + const filePath = import_path8.default.join(__dirname, "workers", "assets/router.worker.js"); + contents5 = import_fs5.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url5.default.pathToFileURL(filePath); + return contents5; +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/assets/rpc-proxy.worker.ts +var import_fs6 = __toESM(require("fs")); +var import_path9 = __toESM(require("path")); +var import_url6 = __toESM(require("url")); +var contents6; +function rpc_proxy_worker_default() { + if (contents6 !== void 0) return contents6; + const filePath = import_path9.default.join(__dirname, "workers", "assets/rpc-proxy.worker.js"); + contents6 = import_fs6.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url6.default.pathToFileURL(filePath); + return contents6; +} + +// src/plugins/core/index.ts +var import_assert9 = __toESM(require("assert")); +var import_fs15 = require("fs"); +var import_promises6 = __toESM(require("fs/promises")); +var import_path18 = __toESM(require("path")); +var import_stream2 = require("stream"); +var import_tls = __toESM(require("tls")); +var import_util3 = require("util"); +var import_undici7 = require("undici"); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/core/entry.worker.ts +var import_fs7 = __toESM(require("fs")); +var import_path10 = __toESM(require("path")); +var import_url7 = __toESM(require("url")); +var contents7; +function entry_worker_default() { + if (contents7 !== void 0) return contents7; + const filePath = import_path10.default.join(__dirname, "workers", "core/entry.worker.js"); + contents7 = import_fs7.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url7.default.pathToFileURL(filePath); + return contents7; +} + +// src/plugins/core/index.ts +var import_zod12 = require("zod"); + +// src/runtime/index.ts +var import_assert4 = __toESM(require("assert")); +var import_child_process = __toESM(require("child_process")); +var import_events2 = require("events"); +var import_readline = __toESM(require("readline")); +var import_stream = require("stream"); +var import_workerd2 = __toESM(require("workerd")); +var import_zod5 = require("zod"); + +// ../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/shared/capnp-es.DAoyiaGr.mjs +var ListElementSize = /* @__PURE__ */ ((ListElementSize2) => { + ListElementSize2[ListElementSize2["VOID"] = 0] = "VOID"; + ListElementSize2[ListElementSize2["BIT"] = 1] = "BIT"; + ListElementSize2[ListElementSize2["BYTE"] = 2] = "BYTE"; + ListElementSize2[ListElementSize2["BYTE_2"] = 3] = "BYTE_2"; + ListElementSize2[ListElementSize2["BYTE_4"] = 4] = "BYTE_4"; + ListElementSize2[ListElementSize2["BYTE_8"] = 5] = "BYTE_8"; + ListElementSize2[ListElementSize2["POINTER"] = 6] = "POINTER"; + ListElementSize2[ListElementSize2["COMPOSITE"] = 7] = "COMPOSITE"; + return ListElementSize2; +})(ListElementSize || {}); +var tmpWord = new DataView(new ArrayBuffer(8)); +new Uint16Array(tmpWord.buffer)[0] = 258; +var DEFAULT_BUFFER_SIZE = 4096; +var DEFAULT_TRAVERSE_LIMIT = 64 << 20; +var LIST_SIZE_MASK = 7; +var MAX_BUFFER_DUMP_BYTES = 8192; +var MAX_INT32 = 2147483647; +var MAX_UINT32 = 4294967295; +var MIN_SINGLE_SEGMENT_GROWTH = 4096; +var NATIVE_LITTLE_ENDIAN = tmpWord.getUint8(0) === 2; +var PACK_SPAN_THRESHOLD = 2; +var POINTER_DOUBLE_FAR_MASK = 4; +var POINTER_TYPE_MASK = 3; +var MAX_DEPTH = MAX_INT32; +var MAX_SEGMENT_LENGTH = MAX_UINT32; +var INVARIANT_UNREACHABLE_CODE = "CAPNP-TS000 Unreachable code detected."; +function assertNever(n) { + throw new Error(INVARIANT_UNREACHABLE_CODE + ` (never block hit with: ${n})`); +} +var MSG_INVALID_FRAME_HEADER = "CAPNP-TS001 Attempted to parse an invalid message frame header; are you sure this is a Cap'n Proto message?"; +var MSG_PACK_NOT_WORD_ALIGNED = "CAPNP-TS003 Attempted to pack a message that was not word-aligned."; +var MSG_SEGMENT_OUT_OF_BOUNDS = "CAPNP-TS004 Segment ID %X is out of bounds for message %s."; +var MSG_SEGMENT_TOO_SMALL = "CAPNP-TS005 First segment must have at least enough room to hold the root pointer (8 bytes)."; +var PTR_ADOPT_WRONG_MESSAGE = "CAPNP-TS008 Attempted to adopt %s into a pointer in a different message %s."; +var PTR_ALREADY_ADOPTED = "CAPNP-TS009 Attempted to adopt %s more than once."; +var PTR_COMPOSITE_SIZE_UNDEFINED = "CAPNP-TS010 Attempted to set a composite list without providing a composite element size."; +var PTR_DEPTH_LIMIT_EXCEEDED = "CAPNP-TS011 Nesting depth limit exceeded for %s."; +var PTR_INIT_COMPOSITE_STRUCT = "CAPNP-TS013 Attempted to initialize a struct member from a composite list (%s)."; +var PTR_INVALID_FAR_TARGET = "CAPNP-TS015 Target of a far pointer (%s) is another far pointer."; +var PTR_INVALID_LIST_SIZE = "CAPNP-TS016 Invalid list element size: %x."; +var PTR_INVALID_POINTER_TYPE = "CAPNP-TS017 Invalid pointer type: %x."; +var PTR_INVALID_UNION_ACCESS = "CAPNP-TS018 Attempted to access getter on %s for union field %s that is not currently set (wanted: %d, found: %d)."; +var PTR_OFFSET_OUT_OF_BOUNDS = "CAPNP-TS019 Pointer offset %a is out of bounds for underlying buffer."; +var PTR_STRUCT_DATA_OUT_OF_BOUNDS = "CAPNP-TS020 Attempted to access out-of-bounds struct data (struct: %s, %d bytes at %a, data words: %d)."; +var PTR_STRUCT_POINTER_OUT_OF_BOUNDS = "CAPNP-TS021 Attempted to access out-of-bounds struct pointer (%s, index: %d, length: %d)."; +var PTR_TRAVERSAL_LIMIT_EXCEEDED = "CAPNP-TS022 Traversal limit exceeded! Slow down! %s"; +var PTR_WRONG_LIST_TYPE = "CAPNP-TS023 Cannot convert %s to a %s list."; +var PTR_WRONG_POINTER_TYPE = "CAPNP-TS024 Attempted to convert pointer %s to a %s type."; +var SEG_GET_NON_ZERO_SINGLE = "CAPNP-TS035 Attempted to get a segment other than 0 (%d) from a single segment arena."; +var SEG_ID_OUT_OF_BOUNDS = "CAPNP-TS036 Attempted to get an out-of-bounds segment (%d)."; +var SEG_NOT_WORD_ALIGNED = "CAPNP-TS037 Segment buffer length %d is not a multiple of 8."; +var SEG_REPLACEMENT_BUFFER_TOO_SMALL = "CAPNP-TS038 Attempted to replace a segment buffer with one that is smaller than the allocated space."; +var SEG_SIZE_OVERFLOW = `CAPNP-TS039 Requested size %x exceeds maximum value (${MAX_SEGMENT_LENGTH}).`; +var TYPE_COMPOSITE_SIZE_UNDEFINED = "CAPNP-TS040 Must provide a composite element size for composite list pointers."; +var LIST_NO_MUTABLE = "CAPNP-TS045: Cannot call mutative methods on an immutable list."; +var LIST_NO_SEARCH = "CAPNP-TS046: Search is not supported for list."; +var RPC_NULL_CLIENT = "CAPNP-TS100 Call on null client."; +function bufferToHex(buffer) { + const a = new Uint8Array(buffer); + const h = []; + for (let i = 0; i < a.byteLength; i++) { + h.push(pad(a[i].toString(16), 2)); + } + return `[${h.join(" ")}]`; +} +function dumpBuffer(buffer) { + const b = buffer instanceof ArrayBuffer ? new Uint8Array(buffer) : new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); + const byteLength = Math.min(b.byteLength, MAX_BUFFER_DUMP_BYTES); + let r = format("\n=== buffer[%d] ===", byteLength); + for (let j = 0; j < byteLength; j += 16) { + r += ` +${pad(j.toString(16), 8)}: `; + let s = ""; + let k; + for (k = 0; k < 16 && j + k < b.byteLength; k++) { + const v = b[j + k]; + r += `${pad(v.toString(16), 2)} `; + s += v > 31 && v < 255 ? String.fromCharCode(v) : "\xB7"; + if (k === 7) r += " "; + } + r += `${repeat((17 - k) * 3, " ")}${s}`; + } + r += "\n"; + if (byteLength !== b.byteLength) { + r += format("=== (truncated %d bytes) ===\n", b.byteLength - byteLength); + } + return r; +} +function format(s, ...args) { + const n = s.length; + let arg; + let argIndex = 0; + let c; + let escaped2 = false; + let i = 0; + let leadingZero = false; + let precision; + let result = ""; + function nextArg() { + return args[argIndex++]; + } + function slurpNumber() { + let digits = ""; + while (/\d/.test(s[i])) { + digits += s[i++]; + c = s[i]; + } + return digits.length > 0 ? Number.parseInt(digits, 10) : null; + } + for (; i < n; ++i) { + c = s[i]; + if (escaped2) { + escaped2 = false; + if (c === ".") { + leadingZero = false; + c = s[++i]; + } else if (c === "0" && s[i + 1] === ".") { + leadingZero = true; + i += 2; + c = s[i]; + } else { + leadingZero = true; + } + precision = slurpNumber(); + switch (c) { + case "a": { + result += "0x" + pad(Number.parseInt(String(nextArg()), 10).toString(16), 8); + break; + } + case "b": { + result += Number.parseInt(String(nextArg()), 10).toString(2); + break; + } + case "c": { + arg = nextArg(); + result += typeof arg === "string" || arg instanceof String ? arg : String.fromCharCode(Number.parseInt(String(arg), 10)); + break; + } + case "d": { + result += Number.parseInt(String(nextArg()), 10); + break; + } + case "f": { + const tmp = Number.parseFloat(String(nextArg())).toFixed( + precision || 6 + ); + result += leadingZero ? tmp : tmp.replace(/^0/, ""); + break; + } + case "j": { + result += JSON.stringify(nextArg()); + break; + } + case "o": { + result += "0" + Number.parseInt(String(nextArg()), 10).toString(8); + break; + } + case "s": { + result += nextArg(); + break; + } + case "x": { + result += "0x" + Number.parseInt(String(nextArg()), 10).toString(16); + break; + } + case "X": { + result += "0x" + Number.parseInt(String(nextArg()), 10).toString(16).toUpperCase(); + break; + } + default: { + result += c; + break; + } + } + } else if (c === "%") { + escaped2 = true; + } else { + result += c; + } + } + return result; +} +function pad(v, width, pad2 = "0") { + return v.length >= width ? v : Array.from({ length: width - v.length + 1 }).join(pad2) + v; +} +function padToWord$1(size) { + return size + 7 & -8; +} +function repeat(times, str) { + let out = ""; + let n = times; + let s = str; + if (n < 1 || n > Number.MAX_VALUE) return out; + do { + if (n % 2) out += s; + n = Math.floor(n / 2); + if (n) s += s; + } while (n); + return out; +} +var ObjectSize = class { + /** The number of bytes required for the data section. */ + dataByteLength; + /** The number of pointers in the object. */ + pointerLength; + constructor(dataByteLength, pointerCount) { + this.dataByteLength = dataByteLength; + this.pointerLength = pointerCount; + } + toString() { + return format( + "ObjectSize_dw:%d,pc:%d", + getDataWordLength(this), + this.pointerLength + ); + } +}; +function getByteLength(o) { + return o.dataByteLength + o.pointerLength * 8; +} +function getDataWordLength(o) { + return o.dataByteLength / 8; +} +function getWordLength(o) { + return o.dataByteLength / 8 + o.pointerLength; +} +function padToWord(o) { + return new ObjectSize(padToWord$1(o.dataByteLength), o.pointerLength); +} +var Orphan = class { + /** If this member is not present then the orphan has already been adopted, or something went very wrong. */ + _capnp; + byteOffset; + segment; + constructor(src) { + const c = getContent(src); + this.segment = c.segment; + this.byteOffset = c.byteOffset; + this._capnp = {}; + this._capnp.type = getTargetPointerType(src); + switch (this._capnp.type) { + case PointerType.STRUCT: { + this._capnp.size = getTargetStructSize(src); + break; + } + case PointerType.LIST: { + this._capnp.length = getTargetListLength(src); + this._capnp.elementSize = getTargetListElementSize(src); + if (this._capnp.elementSize === ListElementSize.COMPOSITE) { + this._capnp.size = getTargetCompositeListSize(src); + } + break; + } + case PointerType.OTHER: { + this._capnp.capId = getCapabilityId(src); + break; + } + default: { + throw new Error(PTR_INVALID_POINTER_TYPE); + } + } + erasePointer(src); + } + /** + * Adopt (move) this orphan into the target pointer location. This will allocate far pointers in `dst` as needed. + * + * @param {T} dst The destination pointer. + * @returns {void} + */ + _moveTo(dst) { + if (this._capnp === void 0) { + throw new Error(format(PTR_ALREADY_ADOPTED, this)); + } + if (this.segment.message !== dst.segment.message) { + throw new Error(format(PTR_ADOPT_WRONG_MESSAGE, this, dst)); + } + erase(dst); + const res = initPointer(this.segment, this.byteOffset, dst); + switch (this._capnp.type) { + case PointerType.STRUCT: { + setStructPointer(res.offsetWords, this._capnp.size, res.pointer); + break; + } + case PointerType.LIST: { + let offsetWords = res.offsetWords; + if (this._capnp.elementSize === ListElementSize.COMPOSITE) { + offsetWords--; + } + setListPointer( + offsetWords, + this._capnp.elementSize, + this._capnp.length, + res.pointer, + this._capnp.size + ); + break; + } + case PointerType.OTHER: { + setInterfacePointer(this._capnp.capId, res.pointer); + break; + } + /* istanbul ignore next */ + default: { + throw new Error(PTR_INVALID_POINTER_TYPE); + } + } + this._capnp = void 0; + } + dispose() { + if (this._capnp === void 0) { + return; + } + switch (this._capnp.type) { + case PointerType.STRUCT: { + this.segment.fillZeroWords( + this.byteOffset, + getWordLength(this._capnp.size) + ); + break; + } + case PointerType.LIST: { + const byteLength = getListByteLength( + this._capnp.elementSize, + this._capnp.length, + this._capnp.size + ); + this.segment.fillZeroWords(this.byteOffset, byteLength); + break; + } + } + this._capnp = void 0; + } + [Symbol.for("nodejs.util.inspect.custom")]() { + return format( + "Orphan_%d@%a,type:%s", + this.segment.id, + this.byteOffset, + this._capnp && this._capnp.type + ); + } +}; +function adopt(src, p) { + src._moveTo(p); +} +function disown(p) { + return new Orphan(p); +} +function dump(p) { + return bufferToHex(p.segment.buffer.slice(p.byteOffset, p.byteOffset + 8)); +} +function getListByteLength(elementSize, length, compositeSize) { + switch (elementSize) { + case ListElementSize.BIT: { + return padToWord$1(length + 7 >>> 3); + } + case ListElementSize.BYTE: + case ListElementSize.BYTE_2: + case ListElementSize.BYTE_4: + case ListElementSize.BYTE_8: + case ListElementSize.POINTER: + case ListElementSize.VOID: { + return padToWord$1(getListElementByteLength(elementSize) * length); + } + /* istanbul ignore next */ + case ListElementSize.COMPOSITE: { + if (compositeSize === void 0) { + throw new Error(format(PTR_INVALID_LIST_SIZE, Number.NaN)); + } + return length * padToWord$1(getByteLength(compositeSize)); + } + /* istanbul ignore next */ + default: { + throw new Error(PTR_INVALID_LIST_SIZE); + } + } +} +function getListElementByteLength(elementSize) { + switch (elementSize) { + /* istanbul ignore next */ + case ListElementSize.BIT: { + return Number.NaN; + } + case ListElementSize.BYTE: { + return 1; + } + case ListElementSize.BYTE_2: { + return 2; + } + case ListElementSize.BYTE_4: { + return 4; + } + case ListElementSize.BYTE_8: + case ListElementSize.POINTER: { + return 8; + } + /* istanbul ignore next */ + case ListElementSize.COMPOSITE: { + return Number.NaN; + } + /* istanbul ignore next */ + case ListElementSize.VOID: { + return 0; + } + /* istanbul ignore next */ + default: { + throw new Error(format(PTR_INVALID_LIST_SIZE, elementSize)); + } + } +} +function add(offset, p) { + return new Pointer(p.segment, p.byteOffset + offset, p._capnp.depthLimit); +} +function copyFrom(src, p) { + if (p.segment === src.segment && p.byteOffset === src.byteOffset) { + return; + } + erase(p); + if (isNull(src)) return; + switch (getTargetPointerType(src)) { + case PointerType.STRUCT: { + copyFromStruct(src, p); + break; + } + case PointerType.LIST: { + copyFromList(src, p); + break; + } + case PointerType.OTHER: { + copyFromInterface(src, p); + break; + } + /* istanbul ignore next */ + default: { + throw new Error( + format(PTR_INVALID_POINTER_TYPE, getTargetPointerType(p)) + ); + } + } +} +function erase(p) { + if (isNull(p)) return; + let c; + switch (getTargetPointerType(p)) { + case PointerType.STRUCT: { + const size = getTargetStructSize(p); + c = getContent(p); + c.segment.fillZeroWords(c.byteOffset, size.dataByteLength / 8); + for (let i = 0; i < size.pointerLength; i++) { + erase(add(i * 8, c)); + } + break; + } + case PointerType.LIST: { + const elementSize = getTargetListElementSize(p); + const length = getTargetListLength(p); + let contentWords = padToWord$1( + length * getListElementByteLength(elementSize) + ); + c = getContent(p); + if (elementSize === ListElementSize.POINTER) { + for (let i = 0; i < length; i++) { + erase( + new Pointer( + c.segment, + c.byteOffset + i * 8, + p._capnp.depthLimit - 1 + ) + ); + } + break; + } else if (elementSize === ListElementSize.COMPOSITE) { + const tag = add(-8, c); + const compositeSize = getStructSize(tag); + const compositeByteLength = getByteLength(compositeSize); + contentWords = getOffsetWords(tag); + c.segment.setWordZero(c.byteOffset - 8); + for (let i = 0; i < length; i++) { + for (let j = 0; j < compositeSize.pointerLength; j++) { + erase( + new Pointer( + c.segment, + c.byteOffset + i * compositeByteLength + j * 8, + p._capnp.depthLimit - 1 + ) + ); + } + } + } + c.segment.fillZeroWords(c.byteOffset, contentWords); + break; + } + case PointerType.OTHER: { + break; + } + default: { + throw new Error( + format(PTR_INVALID_POINTER_TYPE, getTargetPointerType(p)) + ); + } + } + erasePointer(p); +} +function erasePointer(p) { + if (getPointerType(p) === PointerType.FAR) { + const landingPad = followFar(p); + if (isDoubleFar(p)) { + landingPad.segment.setWordZero(landingPad.byteOffset + 8); + } + landingPad.segment.setWordZero(landingPad.byteOffset); + } + p.segment.setWordZero(p.byteOffset); +} +function followFar(p) { + const targetSegment = p.segment.message.getSegment( + p.segment.getUint32(p.byteOffset + 4) + ); + const targetWordOffset = p.segment.getUint32(p.byteOffset) >>> 3; + return new Pointer( + targetSegment, + targetWordOffset * 8, + p._capnp.depthLimit - 1 + ); +} +function followFars(p) { + if (getPointerType(p) === PointerType.FAR) { + const landingPad = followFar(p); + if (isDoubleFar(p)) landingPad.byteOffset += 8; + return landingPad; + } + return p; +} +function getCapabilityId(p) { + return p.segment.getUint32(p.byteOffset + 4); +} +function isCompositeList(p) { + return getTargetPointerType(p) === PointerType.LIST && getTargetListElementSize(p) === ListElementSize.COMPOSITE; +} +function getContent(p, ignoreCompositeIndex) { + let c; + if (isDoubleFar(p)) { + const landingPad = followFar(p); + c = new Pointer( + p.segment.message.getSegment(getFarSegmentId(landingPad)), + getOffsetWords(landingPad) * 8 + ); + } else { + const target = followFars(p); + c = new Pointer( + target.segment, + target.byteOffset + 8 + getOffsetWords(target) * 8 + ); + } + if (isCompositeList(p)) c.byteOffset += 8; + if (!ignoreCompositeIndex && p._capnp.compositeIndex !== void 0) { + c.byteOffset -= 8; + c.byteOffset += 8 + p._capnp.compositeIndex * getByteLength(padToWord(getStructSize(c))); + } + return c; +} +function getFarSegmentId(p) { + return p.segment.getUint32(p.byteOffset + 4); +} +function getListElementSize(p) { + return p.segment.getUint32(p.byteOffset + 4) & LIST_SIZE_MASK; +} +function getListLength(p) { + return p.segment.getUint32(p.byteOffset + 4) >>> 3; +} +function getOffsetWords(p) { + const o = p.segment.getInt32(p.byteOffset); + return o & 2 ? o >> 3 : o >> 2; +} +function getPointerType(p) { + return p.segment.getUint32(p.byteOffset) & POINTER_TYPE_MASK; +} +function getStructDataWords(p) { + return p.segment.getUint16(p.byteOffset + 4); +} +function getStructPointerLength(p) { + return p.segment.getUint16(p.byteOffset + 6); +} +function getStructSize(p) { + return new ObjectSize(getStructDataWords(p) * 8, getStructPointerLength(p)); +} +function getTargetCompositeListTag(p) { + const c = getContent(p); + c.byteOffset -= 8; + return c; +} +function getTargetCompositeListSize(p) { + return getStructSize(getTargetCompositeListTag(p)); +} +function getTargetListElementSize(p) { + return getListElementSize(followFars(p)); +} +function getTargetListLength(p) { + const t = followFars(p); + if (getListElementSize(t) === ListElementSize.COMPOSITE) { + return getOffsetWords(getTargetCompositeListTag(p)); + } + return getListLength(t); +} +function getTargetPointerType(p) { + const t = getPointerType(followFars(p)); + if (t === PointerType.FAR) throw new Error(format(PTR_INVALID_FAR_TARGET, p)); + return t; +} +function getTargetStructSize(p) { + return getStructSize(followFars(p)); +} +function initPointer(contentSegment, contentOffset, p) { + if (p.segment !== contentSegment) { + if (!contentSegment.hasCapacity(8)) { + const landingPad2 = p.segment.allocate(16); + setFarPointer(true, landingPad2.byteOffset / 8, landingPad2.segment.id, p); + setFarPointer(false, contentOffset / 8, contentSegment.id, landingPad2); + landingPad2.byteOffset += 8; + return new PointerAllocationResult(landingPad2, 0); + } + const landingPad = contentSegment.allocate(8); + if (landingPad.segment.id !== contentSegment.id) { + throw new Error(INVARIANT_UNREACHABLE_CODE); + } + setFarPointer(false, landingPad.byteOffset / 8, landingPad.segment.id, p); + return new PointerAllocationResult( + landingPad, + (contentOffset - landingPad.byteOffset - 8) / 8 + ); + } + return new PointerAllocationResult(p, (contentOffset - p.byteOffset - 8) / 8); +} +function isDoubleFar(p) { + return getPointerType(p) === PointerType.FAR && (p.segment.getUint32(p.byteOffset) & POINTER_DOUBLE_FAR_MASK) !== 0; +} +function isNull(p) { + return p.segment.isWordZero(p.byteOffset); +} +function relocateTo(dst, src) { + const t = followFars(src); + const lo = t.segment.getUint8(t.byteOffset) & 3; + const hi = t.segment.getUint32(t.byteOffset + 4); + erase(dst); + const res = initPointer( + t.segment, + t.byteOffset + 8 + getOffsetWords(t) * 8, + dst + ); + res.pointer.segment.setUint32( + res.pointer.byteOffset, + lo | res.offsetWords << 2 + ); + res.pointer.segment.setUint32(res.pointer.byteOffset + 4, hi); + erasePointer(src); +} +function setFarPointer(doubleFar, offsetWords, segmentId, p) { + const A = PointerType.FAR; + const B = doubleFar ? 1 : 0; + const C = offsetWords; + const D = segmentId; + p.segment.setUint32(p.byteOffset, A | B << 2 | C << 3); + p.segment.setUint32(p.byteOffset + 4, D); +} +function setInterfacePointer(capId, p) { + p.segment.setUint32(p.byteOffset, PointerType.OTHER); + p.segment.setUint32(p.byteOffset + 4, capId); +} +function getInterfacePointer(p) { + return p.segment.getUint32(p.byteOffset + 4); +} +function setListPointer(offsetWords, size, length, p, compositeSize) { + const A = PointerType.LIST; + const B = offsetWords; + const C = size; + let D = length; + if (size === ListElementSize.COMPOSITE) { + if (compositeSize === void 0) { + throw new TypeError(TYPE_COMPOSITE_SIZE_UNDEFINED); + } + D *= getWordLength(compositeSize); + } + p.segment.setUint32(p.byteOffset, A | B << 2); + p.segment.setUint32(p.byteOffset + 4, C | D << 3); +} +function setStructPointer(offsetWords, size, p) { + const A = PointerType.STRUCT; + const B = offsetWords; + const C = getDataWordLength(size); + const D = size.pointerLength; + p.segment.setUint32(p.byteOffset, A | B << 2); + p.segment.setUint16(p.byteOffset + 4, C); + p.segment.setUint16(p.byteOffset + 6, D); +} +function validate(pointerType, p, elementSize) { + if (isNull(p)) return; + const t = followFars(p); + const A = t.segment.getUint32(t.byteOffset) & POINTER_TYPE_MASK; + if (A !== pointerType) { + throw new Error(format(PTR_WRONG_POINTER_TYPE, p, pointerType)); + } + if (elementSize !== void 0) { + const C = t.segment.getUint32(t.byteOffset + 4) & LIST_SIZE_MASK; + if (C !== elementSize) { + throw new Error( + format(PTR_WRONG_LIST_TYPE, p, ListElementSize[elementSize]) + ); + } + } +} +function copyFromInterface(src, dst) { + const srcCapId = getInterfacePointer(src); + if (srcCapId < 0) { + return; + } + const srcCapTable = src.segment.message._capnp.capTable; + if (!srcCapTable) { + return; + } + const client = srcCapTable[srcCapId]; + if (!client) { + return; + } + const dstCapId = dst.segment.message.addCap(client); + setInterfacePointer(dstCapId, dst); +} +function copyFromList(src, dst) { + if (dst._capnp.depthLimit <= 0) throw new Error(PTR_DEPTH_LIMIT_EXCEEDED); + const srcContent = getContent(src); + const srcElementSize = getTargetListElementSize(src); + const srcLength = getTargetListLength(src); + let srcCompositeSize; + let srcStructByteLength; + let dstContent; + if (srcElementSize === ListElementSize.POINTER) { + dstContent = dst.segment.allocate(srcLength << 3); + for (let i = 0; i < srcLength; i++) { + const srcPtr = new Pointer( + srcContent.segment, + srcContent.byteOffset + (i << 3), + src._capnp.depthLimit - 1 + ); + const dstPtr = new Pointer( + dstContent.segment, + dstContent.byteOffset + (i << 3), + dst._capnp.depthLimit - 1 + ); + copyFrom(srcPtr, dstPtr); + } + } else if (srcElementSize === ListElementSize.COMPOSITE) { + srcCompositeSize = padToWord(getTargetCompositeListSize(src)); + srcStructByteLength = getByteLength(srcCompositeSize); + dstContent = dst.segment.allocate( + getByteLength(srcCompositeSize) * srcLength + 8 + ); + dstContent.segment.copyWord( + dstContent.byteOffset, + srcContent.segment, + srcContent.byteOffset - 8 + ); + if (srcCompositeSize.dataByteLength > 0) { + const wordLength = getWordLength(srcCompositeSize) * srcLength; + dstContent.segment.copyWords( + dstContent.byteOffset + 8, + srcContent.segment, + srcContent.byteOffset, + wordLength + ); + } + for (let i = 0; i < srcLength; i++) { + for (let j = 0; j < srcCompositeSize.pointerLength; j++) { + const offset = i * srcStructByteLength + srcCompositeSize.dataByteLength + (j << 3); + const srcPtr = new Pointer( + srcContent.segment, + srcContent.byteOffset + offset, + src._capnp.depthLimit - 1 + ); + const dstPtr = new Pointer( + dstContent.segment, + dstContent.byteOffset + offset + 8, + dst._capnp.depthLimit - 1 + ); + copyFrom(srcPtr, dstPtr); + } + } + } else { + const byteLength = padToWord$1( + srcElementSize === ListElementSize.BIT ? srcLength + 7 >>> 3 : getListElementByteLength(srcElementSize) * srcLength + ); + const wordLength = byteLength >>> 3; + dstContent = dst.segment.allocate(byteLength); + dstContent.segment.copyWords( + dstContent.byteOffset, + srcContent.segment, + srcContent.byteOffset, + wordLength + ); + } + const res = initPointer(dstContent.segment, dstContent.byteOffset, dst); + setListPointer( + res.offsetWords, + srcElementSize, + srcLength, + res.pointer, + srcCompositeSize + ); +} +function copyFromStruct(src, dst) { + if (dst._capnp.depthLimit <= 0) throw new Error(PTR_DEPTH_LIMIT_EXCEEDED); + const srcContent = getContent(src); + const srcSize = getTargetStructSize(src); + const srcDataWordLength = getDataWordLength(srcSize); + const dstContent = dst.segment.allocate(getByteLength(srcSize)); + dstContent.segment.copyWords( + dstContent.byteOffset, + srcContent.segment, + srcContent.byteOffset, + srcDataWordLength + ); + for (let i = 0; i < srcSize.pointerLength; i++) { + const offset = srcSize.dataByteLength + i * 8; + const srcPtr = new Pointer( + srcContent.segment, + srcContent.byteOffset + offset, + src._capnp.depthLimit - 1 + ); + const dstPtr = new Pointer( + dstContent.segment, + dstContent.byteOffset + offset, + dst._capnp.depthLimit - 1 + ); + copyFrom(srcPtr, dstPtr); + } + if (dst._capnp.compositeList) return; + const res = initPointer(dstContent.segment, dstContent.byteOffset, dst); + setStructPointer(res.offsetWords, srcSize, res.pointer); +} +function trackPointerAllocation(message, p) { + message._capnp.traversalLimit -= 8; + if (message._capnp.traversalLimit <= 0) { + throw new Error(format(PTR_TRAVERSAL_LIMIT_EXCEEDED, p)); + } +} +var PointerAllocationResult = class { + offsetWords; + pointer; + constructor(pointer, offsetWords) { + this.pointer = pointer; + this.offsetWords = offsetWords; + } +}; +var PointerType = /* @__PURE__ */ ((PointerType2) => { + PointerType2[PointerType2["STRUCT"] = 0] = "STRUCT"; + PointerType2[PointerType2["LIST"] = 1] = "LIST"; + PointerType2[PointerType2["FAR"] = 2] = "FAR"; + PointerType2[PointerType2["OTHER"] = 3] = "OTHER"; + return PointerType2; +})(PointerType || {}); +var Pointer = class { + static _capnp = { + displayName: "Pointer" + }; + _capnp; + /** Offset, in bytes, from the start of the segment to the beginning of this pointer. */ + byteOffset; + /** + * The starting segment for this pointer's data. In the case of a far pointer, the actual content this pointer is + * referencing will be in another segment within the same message. + */ + segment; + constructor(segment, byteOffset, depthLimit = MAX_DEPTH) { + this._capnp = { compositeList: false, depthLimit }; + this.segment = segment; + this.byteOffset = byteOffset; + if (depthLimit < 1) { + throw new Error(format(PTR_DEPTH_LIMIT_EXCEEDED, this)); + } + trackPointerAllocation(segment.message, this); + if (byteOffset < 0 || byteOffset > segment.byteLength) { + throw new Error(format(PTR_OFFSET_OUT_OF_BOUNDS, byteOffset)); + } + } + [Symbol.toStringTag]() { + return format("Pointer_%d", this.segment.id); + } + toString() { + return format("->%d@%a%s", this.segment.id, this.byteOffset, dump(this)); + } +}; +var List = class _List extends Pointer { + static _capnp = { + displayName: "List", + size: ListElementSize.VOID + }; + constructor(segment, byteOffset, depthLimit) { + super(segment, byteOffset, depthLimit); + return new Proxy(this, _List.#proxyHandler); + } + static #proxyHandler = { + get(target, prop, receiver) { + const val = Reflect.get(target, prop, receiver); + if (val !== void 0) return val; + if (typeof prop === "string") { + return target.get(+prop); + } + } + }; + get length() { + return getTargetListLength(this); + } + toArray() { + const length = this.length; + const res = Array.from({ length }); + for (let i = 0; i < length; i++) { + res[i] = this.at(i); + } + return res; + } + get(_index) { + throw new TypeError("Cannot get from a generic list."); + } + set(_index, _value) { + throw new TypeError("Cannot set on a generic list."); + } + at(index) { + if (index < 0) { + const length = this.length; + index += length; + } + return this.get(index); + } + concat(other) { + const length = this.length; + const otherLength = other.length; + const res = Array.from({ length: length + otherLength }); + for (let i = 0; i < length; i++) res[i] = this.at(i); + for (let i = 0; i < otherLength; i++) res[i + length] = other.at(i); + return res; + } + some(cb, _this) { + const length = this.length; + for (let i = 0; i < length; i++) { + if (cb.call(_this, this.at(i), i, this)) { + return true; + } + } + return false; + } + filter(cb, _this) { + const length = this.length; + const res = []; + for (let i = 0; i < length; i++) { + const value = this.at(i); + if (cb.call(_this, value, i, this)) { + res.push(value); + } + } + return res; + } + find(cb, _this) { + const length = this.length; + for (let i = 0; i < length; i++) { + const value = this.at(i); + if (cb.call(_this, value, i, this)) { + return value; + } + } + return void 0; + } + findIndex(cb, _this) { + const length = this.length; + for (let i = 0; i < length; i++) { + const value = this.at(i); + if (cb.call(_this, value, i, this)) { + return i; + } + } + return -1; + } + forEach(cb, _this) { + const length = this.length; + for (let i = 0; i < length; i++) { + cb.call(_this, this.at(i), i, this); + } + } + map(cb, _this) { + const length = this.length; + const res = Array.from({ length }); + for (let i = 0; i < length; i++) { + res[i] = cb.call(_this, this.at(i), i, this); + } + return res; + } + flatMap(cb, _this) { + const length = this.length; + const res = []; + for (let i = 0; i < length; i++) { + const r = cb.call(_this, this.at(i), i, this); + res.push(...Array.isArray(r) ? r : [r]); + } + return res; + } + every(cb, _this) { + const length = this.length; + for (let i = 0; i < length; i++) { + if (!cb.call(_this, this.at(i), i, this)) { + return false; + } + } + return true; + } + reduce(cb, initialValue) { + let i = 0; + let res; + if (initialValue === void 0) { + res = this.at(0); + i++; + } else { + res = initialValue; + } + for (; i < this.length; i++) { + res = cb(res, this.at(i), i, this); + } + return res; + } + reduceRight(cb, initialValue) { + let i = this.length - 1; + let res; + if (initialValue === void 0) { + res = this.at(i); + i--; + } else { + res = initialValue; + } + for (; i >= 0; i--) { + res = cb(res, this.at(i), i, this); + } + return res; + } + slice(start = 0, end) { + const length = end ? Math.min(this.length, end) : this.length; + const res = Array.from({ length: length - start }); + for (let i = start; i < length; i++) res[i] = this.at(i); + return res; + } + join(separator) { + return this.toArray().join(separator); + } + toReversed() { + return this.toArray().reverse(); + } + toSorted(compareFn) { + return this.toArray().sort(compareFn); + } + toSpliced(start, deleteCount, ...items) { + return this.toArray().splice(start, deleteCount, ...items); + } + fill(value, start, end) { + const length = this.length; + const s = Math.max(start ?? 0, 0); + const e = Math.min(end ?? length, length); + for (let i = s; i < e; i++) { + this.set(i, value); + } + return this; + } + copyWithin(target, start, end) { + const length = this.length; + const e = end ?? length; + const s = start < 0 ? Math.max(length + start, 0) : start; + const t = target < 0 ? Math.max(length + target, 0) : target; + const len = Math.min(e - s, length - t); + for (let i = 0; i < len; i++) { + this.set(t + i, this.at(s + i)); + } + return this; + } + keys() { + const length = this.length; + return Array.from({ length }, (_, i) => i)[Symbol.iterator](); + } + values() { + return this.toArray().values(); + } + entries() { + return this.toArray().entries(); + } + flat(depth) { + return this.toArray().flat(depth); + } + with(index, value) { + return this.toArray().with(index, value); + } + includes(_searchElement, _fromIndex) { + throw new Error(LIST_NO_SEARCH); + } + findLast(_cb, _thisArg) { + throw new Error(LIST_NO_SEARCH); + } + findLastIndex(_cb, _t) { + throw new Error(LIST_NO_SEARCH); + } + indexOf(_searchElement, _fromIndex) { + throw new Error(LIST_NO_SEARCH); + } + lastIndexOf(_searchElement, _fromIndex) { + throw new Error(LIST_NO_SEARCH); + } + pop() { + throw new Error(LIST_NO_MUTABLE); + } + push(..._items) { + throw new Error(LIST_NO_MUTABLE); + } + reverse() { + throw new Error(LIST_NO_MUTABLE); + } + shift() { + throw new Error(LIST_NO_MUTABLE); + } + unshift(..._items) { + throw new Error(LIST_NO_MUTABLE); + } + splice(_start, _deleteCount, ..._rest) { + throw new Error(LIST_NO_MUTABLE); + } + sort(_fn) { + throw new Error(LIST_NO_MUTABLE); + } + get [Symbol.unscopables]() { + return Array.prototype[Symbol.unscopables]; + } + [Symbol.iterator]() { + return this.values(); + } + toJSON() { + return this.toArray(); + } + toString() { + return this.join(","); + } + toLocaleString(_locales, _options) { + return this.toString(); + } + [Symbol.toStringTag]() { + return "[object Array]"; + } + static [Symbol.toStringTag]() { + return this._capnp.displayName; + } +}; +function initList$1(elementSize, length, l, compositeSize) { + let c; + switch (elementSize) { + case ListElementSize.BIT: { + c = l.segment.allocate(Math.ceil(length / 8)); + break; + } + case ListElementSize.BYTE: + case ListElementSize.BYTE_2: + case ListElementSize.BYTE_4: + case ListElementSize.BYTE_8: + case ListElementSize.POINTER: { + c = l.segment.allocate(length * getListElementByteLength(elementSize)); + break; + } + case ListElementSize.COMPOSITE: { + if (compositeSize === void 0) { + throw new Error(format(PTR_COMPOSITE_SIZE_UNDEFINED)); + } + compositeSize = padToWord(compositeSize); + const byteLength = getByteLength(compositeSize) * length; + c = l.segment.allocate(byteLength + 8); + setStructPointer(length, compositeSize, c); + break; + } + case ListElementSize.VOID: { + setListPointer(0, elementSize, length, l); + return; + } + default: { + throw new Error(format(PTR_INVALID_LIST_SIZE, elementSize)); + } + } + const res = initPointer(c.segment, c.byteOffset, l); + setListPointer( + res.offsetWords, + elementSize, + length, + res.pointer, + compositeSize + ); +} +var Data = class extends List { + static fromPointer(pointer) { + validate(PointerType.LIST, pointer, ListElementSize.BYTE); + return this._fromPointerUnchecked(pointer); + } + static _fromPointerUnchecked(pointer) { + return new this( + pointer.segment, + pointer.byteOffset, + pointer._capnp.depthLimit + ); + } + /** + * Copy the contents of `src` into this Data pointer. If `src` is smaller than the length of this pointer then the + * remaining bytes will be zeroed out. Extra bytes in `src` are ignored. + * + * @param {(ArrayBuffer | ArrayBufferView)} src The source buffer. + * @returns {void} + */ + // TODO: Would be nice to have a way to zero-copy a buffer by allocating a new segment into the message with that + // buffer data. + copyBuffer(src) { + const c = getContent(this); + const dstLength = this.length; + const srcLength = src.byteLength; + const i = src instanceof ArrayBuffer ? new Uint8Array(src) : new Uint8Array( + src.buffer, + src.byteOffset, + Math.min(dstLength, srcLength) + ); + const o = new Uint8Array(c.segment.buffer, c.byteOffset, this.length); + o.set(i); + if (dstLength > srcLength) { + o.fill(0, srcLength, dstLength); + } + } + /** + * Read a byte from the specified offset. + * + * @param {number} byteOffset The byte offset to read. + * @returns {number} The byte value. + */ + get(byteOffset) { + const c = getContent(this); + return c.segment.getUint8(c.byteOffset + byteOffset); + } + /** + * Write a byte at the specified offset. + * + * @param {number} byteOffset The byte offset to set. + * @param {number} value The byte value to set. + * @returns {void} + */ + set(byteOffset, value) { + const c = getContent(this); + c.segment.setUint8(c.byteOffset + byteOffset, value); + } + /** + * Creates a **copy** of the underlying buffer data and returns it as an ArrayBuffer. + * + * To obtain a reference to the underlying buffer instead, use `toUint8Array()` or `toDataView()`. + * + * @returns {ArrayBuffer} A copy of this data buffer. + */ + toArrayBuffer() { + const c = getContent(this); + return c.segment.buffer.slice(c.byteOffset, c.byteOffset + this.length); + } + /** + * Convert this Data pointer to a DataView representing the pointer's contents. + * + * WARNING: The DataView references memory from a message segment, so do not venture outside the bounds of the + * DataView or else BAD THINGS. + * + * @returns {DataView} A live reference to the underlying buffer. + */ + toDataView() { + const c = getContent(this); + return new DataView(c.segment.buffer, c.byteOffset, this.length); + } + [Symbol.toStringTag]() { + return `Data_${super.toString()}`; + } + /** + * Convert this Data pointer to a Uint8Array representing the pointer's contents. + * + * WARNING: The Uint8Array references memory from a message segment, so do not venture outside the bounds of the + * Uint8Array or else BAD THINGS. + * + * @returns {DataView} A live reference to the underlying buffer. + */ + toUint8Array() { + const c = getContent(this); + return new Uint8Array(c.segment.buffer, c.byteOffset, this.length); + } +}; +var textEncoder = new TextEncoder(); +var textDecoder = new TextDecoder(); +var Text = class extends List { + static fromPointer(pointer) { + validate(PointerType.LIST, pointer, ListElementSize.BYTE); + return textFromPointerUnchecked(pointer); + } + /** + * Read a utf-8 encoded string value from this pointer. + * + * @param {number} [index] The index at which to start reading; defaults to zero. + * @returns {string} The string value. + */ + get(index = 0) { + if (isNull(this)) return ""; + const c = getContent(this); + return textDecoder.decode( + new Uint8Array( + c.segment.buffer, + c.byteOffset + index, + this.length - index + ) + ); + } + /** + * Get the number of utf-8 encoded bytes in this text. This does **not** include the NUL byte. + * + * @returns {number} The number of bytes allocated for the text. + */ + get length() { + return super.length - 1; + } + /** + * Write a utf-8 encoded string value starting at the specified index. + * + * @param {number} index The index at which to start copying the string. Note that if this is not zero the bytes + * before `index` will be left as-is. All bytes after `index` will be overwritten. + * @param {string} value The string value to set. + * @returns {void} + */ + set(index, value) { + const src = textEncoder.encode(value); + const dstLength = src.byteLength + index; + let c; + let original; + if (!isNull(this)) { + c = getContent(this); + let originalLength = this.length; + if (originalLength >= index) { + originalLength = index; + } + original = new Uint8Array( + c.segment.buffer.slice( + c.byteOffset, + c.byteOffset + Math.min(originalLength, index) + ) + ); + erase(this); + } + initList$1(ListElementSize.BYTE, dstLength + 1, this); + c = getContent(this); + const dst = new Uint8Array(c.segment.buffer, c.byteOffset, dstLength); + if (original) dst.set(original); + dst.set(src, index); + } + toString() { + return this.get(); + } + toJSON() { + return this.get(); + } + [Symbol.toPrimitive]() { + return this.get(); + } + [Symbol.toStringTag]() { + return `Text_${super.toString()}`; + } +}; +function textFromPointerUnchecked(pointer) { + return new Text( + pointer.segment, + pointer.byteOffset, + pointer._capnp.depthLimit + ); +} +var Struct = class extends Pointer { + static _capnp = { + displayName: "Struct" + }; + /** + * Create a new pointer to a struct. + * + * @constructor {Struct} + * @param {Segment} segment The segment the pointer resides in. + * @param {number} byteOffset The offset from the beginning of the segment to the beginning of the pointer data. + * @param {any} [depthLimit=MAX_DEPTH] The nesting depth limit for this object. + * @param {number} [compositeIndex] If set, then this pointer is actually a reference to a composite list + * (`this._getPointerTargetType() === PointerType.LIST`), and this number is used as the index of the struct within + * the list. It is not valid to call `initStruct()` on a composite struct – the struct contents are initialized when + * the list pointer is initialized. + */ + constructor(segment, byteOffset, depthLimit = MAX_DEPTH, compositeIndex) { + super(segment, byteOffset, depthLimit); + this._capnp.compositeIndex = compositeIndex; + this._capnp.compositeList = compositeIndex !== void 0; + } + static [Symbol.toStringTag]() { + return this._capnp.displayName; + } + [Symbol.toStringTag]() { + return `Struct_${super.toString()}${this._capnp.compositeIndex === void 0 ? "" : `,ci:${this._capnp.compositeIndex}`} > ${getContent(this).toString()}`; + } +}; +var AnyStruct = class extends Struct { + static _capnp = { + displayName: "AnyStruct", + id: "0", + size: new ObjectSize(0, 0) + }; +}; +var FixedAnswer = class { + struct() { + return Promise.resolve(this.structSync()); + } +}; +var ErrorAnswer = class extends FixedAnswer { + err; + constructor(err) { + super(); + this.err = err; + } + structSync() { + throw this.err; + } + pipelineCall(_transform, _call) { + return this; + } + pipelineClose(_transform) { + throw this.err; + } +}; +var ErrorClient = class { + err; + constructor(err) { + this.err = err; + } + call(_call) { + return new ErrorAnswer(this.err); + } + close() { + throw this.err; + } +}; +function clientOrNull(client) { + return client ? client : new ErrorClient(new Error(RPC_NULL_CLIENT)); +} +var TMP_WORD = new DataView(new ArrayBuffer(8)); +function initStruct(size, s) { + if (s._capnp.compositeIndex !== void 0) { + throw new Error(format(PTR_INIT_COMPOSITE_STRUCT, s)); + } + erase(s); + const c = s.segment.allocate(getByteLength(size)); + const res = initPointer(c.segment, c.byteOffset, s); + setStructPointer(res.offsetWords, size, res.pointer); +} +function initStructAt(index, StructClass, p) { + const s = getPointerAs(index, StructClass, p); + initStruct(StructClass._capnp.size, s); + return s; +} +function checkPointerBounds(index, s) { + const pointerLength = getSize(s).pointerLength; + if (index < 0 || index >= pointerLength) { + throw new Error( + format(PTR_STRUCT_POINTER_OUT_OF_BOUNDS, s, index, pointerLength) + ); + } +} +function getInterfaceClientOrNullAt(index, s) { + return getInterfaceClientOrNull(getPointer(index, s)); +} +function getInterfaceClientOrNull(p) { + let client = null; + const capId = getInterfacePointer(p); + const capTable = p.segment.message._capnp.capTable; + if (capTable && capId >= 0 && capId < capTable.length) { + client = capTable[capId]; + } + return clientOrNull(client); +} +function resize(dstSize, s) { + const srcSize = getSize(s); + const srcContent = getContent(s); + const dstContent = s.segment.allocate(getByteLength(dstSize)); + dstContent.segment.copyWords( + dstContent.byteOffset, + srcContent.segment, + srcContent.byteOffset, + Math.min(getDataWordLength(srcSize), getDataWordLength(dstSize)) + ); + const res = initPointer(dstContent.segment, dstContent.byteOffset, s); + setStructPointer(res.offsetWords, dstSize, res.pointer); + for (let i = 0; i < Math.min(srcSize.pointerLength, dstSize.pointerLength); i++) { + const srcPtr = new Pointer( + srcContent.segment, + srcContent.byteOffset + srcSize.dataByteLength + i * 8 + ); + if (isNull(srcPtr)) { + continue; + } + const srcPtrTarget = followFars(srcPtr); + const srcPtrContent = getContent(srcPtr); + const dstPtr = new Pointer( + dstContent.segment, + dstContent.byteOffset + dstSize.dataByteLength + i * 8 + ); + if (getTargetPointerType(srcPtr) === PointerType.LIST && getTargetListElementSize(srcPtr) === ListElementSize.COMPOSITE) { + srcPtrContent.byteOffset -= 8; + } + const r = initPointer( + srcPtrContent.segment, + srcPtrContent.byteOffset, + dstPtr + ); + const a = srcPtrTarget.segment.getUint8(srcPtrTarget.byteOffset) & 3; + const b = srcPtrTarget.segment.getUint32(srcPtrTarget.byteOffset + 4); + r.pointer.segment.setUint32(r.pointer.byteOffset, a | r.offsetWords << 2); + r.pointer.segment.setUint32(r.pointer.byteOffset + 4, b); + } + srcContent.segment.fillZeroWords( + srcContent.byteOffset, + getWordLength(srcSize) + ); +} +function getAs(StructClass, s) { + return new StructClass( + s.segment, + s.byteOffset, + s._capnp.depthLimit, + s._capnp.compositeIndex + ); +} +function getBit(bitOffset, s, defaultMask) { + const byteOffset = Math.floor(bitOffset / 8); + const bitMask = 1 << bitOffset % 8; + checkDataBounds(byteOffset, 1, s); + const ds = getDataSection(s); + const v = ds.segment.getUint8(ds.byteOffset + byteOffset); + if (defaultMask === void 0) return (v & bitMask) !== 0; + const defaultValue = defaultMask.getUint8(0); + return ((v ^ defaultValue) & bitMask) !== 0; +} +function getData(index, s, defaultValue) { + checkPointerBounds(index, s); + const ps = getPointerSection(s); + ps.byteOffset += index * 8; + const l = new Data(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1); + if (isNull(l)) { + if (defaultValue) { + copyFrom(defaultValue, l); + } else { + initList$1(ListElementSize.BYTE, 0, l); + } + } + return l; +} +function getDataSection(s) { + return getContent(s); +} +function getFloat32(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 4, s); + const ds = getDataSection(s); + if (defaultMask === void 0) { + return ds.segment.getFloat32(ds.byteOffset + byteOffset); + } + const v = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true); + TMP_WORD.setUint32(0, v, NATIVE_LITTLE_ENDIAN); + return TMP_WORD.getFloat32(0, NATIVE_LITTLE_ENDIAN); +} +function getFloat64(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 8, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + const lo = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true); + const hi = ds.segment.getUint32(ds.byteOffset + byteOffset + 4) ^ defaultMask.getUint32(4, true); + TMP_WORD.setUint32(0, lo, NATIVE_LITTLE_ENDIAN); + TMP_WORD.setUint32(4, hi, NATIVE_LITTLE_ENDIAN); + return TMP_WORD.getFloat64(0, NATIVE_LITTLE_ENDIAN); + } + return ds.segment.getFloat64(ds.byteOffset + byteOffset); +} +function getInt16(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 2, s); + const ds = getDataSection(s); + if (defaultMask === void 0) { + return ds.segment.getInt16(ds.byteOffset + byteOffset); + } + const v = ds.segment.getUint16(ds.byteOffset + byteOffset) ^ defaultMask.getUint16(0, true); + TMP_WORD.setUint16(0, v, NATIVE_LITTLE_ENDIAN); + return TMP_WORD.getInt16(0, NATIVE_LITTLE_ENDIAN); +} +function getInt32(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 4, s); + const ds = getDataSection(s); + if (defaultMask === void 0) { + return ds.segment.getInt32(ds.byteOffset + byteOffset); + } + const v = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint16(0, true); + TMP_WORD.setUint32(0, v, NATIVE_LITTLE_ENDIAN); + return TMP_WORD.getInt32(0, NATIVE_LITTLE_ENDIAN); +} +function getInt64(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 8, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + const lo = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true); + const hi = ds.segment.getUint32(ds.byteOffset + byteOffset + 4) ^ defaultMask.getUint32(4, true); + TMP_WORD.setUint32(NATIVE_LITTLE_ENDIAN ? 0 : 4, lo, NATIVE_LITTLE_ENDIAN); + TMP_WORD.setUint32(NATIVE_LITTLE_ENDIAN ? 4 : 0, hi, NATIVE_LITTLE_ENDIAN); + return TMP_WORD.getBigInt64(0, NATIVE_LITTLE_ENDIAN); + } + return ds.segment.getInt64(ds.byteOffset + byteOffset); +} +function getInt8(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 1, s); + const ds = getDataSection(s); + if (defaultMask === void 0) { + return ds.segment.getInt8(ds.byteOffset + byteOffset); + } + const v = ds.segment.getUint8(ds.byteOffset + byteOffset) ^ defaultMask.getUint8(0); + TMP_WORD.setUint8(0, v); + return TMP_WORD.getInt8(0); +} +function getList(index, ListClass, s, defaultValue) { + checkPointerBounds(index, s); + const ps = getPointerSection(s); + ps.byteOffset += index * 8; + const l = new ListClass(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1); + if (isNull(l)) { + if (defaultValue) { + copyFrom(defaultValue, l); + } else { + initList$1(ListClass._capnp.size, 0, l, ListClass._capnp.compositeSize); + } + } else if (ListClass._capnp.compositeSize !== void 0) { + const srcSize = getTargetCompositeListSize(l); + const dstSize = ListClass._capnp.compositeSize; + if (dstSize.dataByteLength > srcSize.dataByteLength || dstSize.pointerLength > srcSize.pointerLength) { + const srcContent = getContent(l); + const srcLength = getTargetListLength(l); + const dstContent = l.segment.allocate( + getByteLength(dstSize) * srcLength + 8 + ); + const res = initPointer(dstContent.segment, dstContent.byteOffset, l); + setListPointer( + res.offsetWords, + ListClass._capnp.size, + srcLength, + res.pointer, + dstSize + ); + setStructPointer(srcLength, dstSize, dstContent); + dstContent.byteOffset += 8; + for (let i = 0; i < srcLength; i++) { + const srcElementOffset = srcContent.byteOffset + i * getByteLength(srcSize); + const dstElementOffset = dstContent.byteOffset + i * getByteLength(dstSize); + dstContent.segment.copyWords( + dstElementOffset, + srcContent.segment, + srcElementOffset, + getWordLength(srcSize) + ); + for (let j = 0; j < srcSize.pointerLength; j++) { + const srcPtr = new Pointer( + srcContent.segment, + srcElementOffset + srcSize.dataByteLength + j * 8 + ); + const dstPtr = new Pointer( + dstContent.segment, + dstElementOffset + dstSize.dataByteLength + j * 8 + ); + const srcPtrTarget = followFars(srcPtr); + const srcPtrContent = getContent(srcPtr); + if (getTargetPointerType(srcPtr) === PointerType.LIST && getTargetListElementSize(srcPtr) === ListElementSize.COMPOSITE) { + srcPtrContent.byteOffset -= 8; + } + const r = initPointer( + srcPtrContent.segment, + srcPtrContent.byteOffset, + dstPtr + ); + const a = srcPtrTarget.segment.getUint8(srcPtrTarget.byteOffset) & 3; + const b = srcPtrTarget.segment.getUint32(srcPtrTarget.byteOffset + 4); + r.pointer.segment.setUint32( + r.pointer.byteOffset, + a | r.offsetWords << 2 + ); + r.pointer.segment.setUint32(r.pointer.byteOffset + 4, b); + } + } + srcContent.segment.fillZeroWords( + srcContent.byteOffset, + getWordLength(srcSize) * srcLength + ); + } + } + return l; +} +function getPointer(index, s) { + checkPointerBounds(index, s); + const ps = getPointerSection(s); + ps.byteOffset += index * 8; + return new Pointer(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1); +} +function getPointerAs(index, PointerClass, s) { + checkPointerBounds(index, s); + const ps = getPointerSection(s); + ps.byteOffset += index * 8; + return new PointerClass(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1); +} +function getPointerSection(s) { + const ps = getContent(s); + ps.byteOffset += padToWord$1(getSize(s).dataByteLength); + return ps; +} +function getSize(s) { + if (s._capnp.compositeIndex !== void 0) { + const c = getContent(s, true); + c.byteOffset -= 8; + return getStructSize(c); + } + return getTargetStructSize(s); +} +function getStruct(index, StructClass, s, defaultValue) { + const t = getPointerAs(index, StructClass, s); + if (isNull(t)) { + if (defaultValue) { + copyFrom(defaultValue, t); + } else { + initStruct(StructClass._capnp.size, t); + } + } else { + validate(PointerType.STRUCT, t); + const ts = getTargetStructSize(t); + if (ts.dataByteLength < StructClass._capnp.size.dataByteLength || ts.pointerLength < StructClass._capnp.size.pointerLength) { + resize(StructClass._capnp.size, t); + } + } + return t; +} +function getText(index, s, defaultValue) { + const t = Text.fromPointer(getPointer(index, s)); + if (isNull(t) && defaultValue) t.set(0, defaultValue); + return t.get(0); +} +function getUint16(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 2, s); + const ds = getDataSection(s); + if (defaultMask === void 0) { + return ds.segment.getUint16(ds.byteOffset + byteOffset); + } + return ds.segment.getUint16(ds.byteOffset + byteOffset) ^ defaultMask.getUint16(0, true); +} +function getUint32(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 4, s); + const ds = getDataSection(s); + if (defaultMask === void 0) { + return ds.segment.getUint32(ds.byteOffset + byteOffset); + } + return ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true); +} +function getUint64(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 8, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + const lo = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true); + const hi = ds.segment.getUint32(ds.byteOffset + byteOffset + 4) ^ defaultMask.getUint32(4, true); + TMP_WORD.setUint32(NATIVE_LITTLE_ENDIAN ? 0 : 4, lo, NATIVE_LITTLE_ENDIAN); + TMP_WORD.setUint32(NATIVE_LITTLE_ENDIAN ? 4 : 0, hi, NATIVE_LITTLE_ENDIAN); + return TMP_WORD.getBigUint64(0, NATIVE_LITTLE_ENDIAN); + } + return ds.segment.getUint64(ds.byteOffset + byteOffset); +} +function getUint8(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 1, s); + const ds = getDataSection(s); + if (defaultMask === void 0) { + return ds.segment.getUint8(ds.byteOffset + byteOffset); + } + return ds.segment.getUint8(ds.byteOffset + byteOffset) ^ defaultMask.getUint8(0); +} +function initData(index, length, s) { + checkPointerBounds(index, s); + const ps = getPointerSection(s); + ps.byteOffset += index * 8; + const l = new Data(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1); + erase(l); + initList$1(ListElementSize.BYTE, length, l); + return l; +} +function initList(index, ListClass, length, s) { + checkPointerBounds(index, s); + const ps = getPointerSection(s); + ps.byteOffset += index * 8; + const l = new ListClass(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1); + erase(l); + initList$1(ListClass._capnp.size, length, l, ListClass._capnp.compositeSize); + return l; +} +function setBit(bitOffset, value, s, defaultMask) { + const byteOffset = Math.floor(bitOffset / 8); + const bitMask = 1 << bitOffset % 8; + checkDataBounds(byteOffset, 1, s); + const ds = getDataSection(s); + const b = ds.segment.getUint8(ds.byteOffset + byteOffset); + if (defaultMask !== void 0) { + value = (defaultMask.getUint8(0) & bitMask) === 0 ? value : !value; + } + ds.segment.setUint8( + ds.byteOffset + byteOffset, + value ? b | bitMask : b & ~bitMask + ); +} +function setFloat32(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 4, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + TMP_WORD.setFloat32(0, value, NATIVE_LITTLE_ENDIAN); + const v = TMP_WORD.getUint32(0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true); + ds.segment.setUint32(ds.byteOffset + byteOffset, v); + return; + } + ds.segment.setFloat32(ds.byteOffset + byteOffset, value); +} +function setFloat64(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 8, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + TMP_WORD.setFloat64(0, value, NATIVE_LITTLE_ENDIAN); + const lo = TMP_WORD.getUint32(0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true); + const hi = TMP_WORD.getUint32(4, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(4, true); + ds.segment.setUint32(ds.byteOffset + byteOffset, lo); + ds.segment.setUint32(ds.byteOffset + byteOffset + 4, hi); + return; + } + ds.segment.setFloat64(ds.byteOffset + byteOffset, value); +} +function setInt16(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 2, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + TMP_WORD.setInt16(0, value, NATIVE_LITTLE_ENDIAN); + const v = TMP_WORD.getUint16(0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint16(0, true); + ds.segment.setUint16(ds.byteOffset + byteOffset, v); + return; + } + ds.segment.setInt16(ds.byteOffset + byteOffset, value); +} +function setInt32(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 4, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + TMP_WORD.setInt32(0, value, NATIVE_LITTLE_ENDIAN); + const v = TMP_WORD.getUint32(0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true); + ds.segment.setUint32(ds.byteOffset + byteOffset, v); + return; + } + ds.segment.setInt32(ds.byteOffset + byteOffset, value); +} +function setInt64(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 8, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + TMP_WORD.setBigInt64(0, value, NATIVE_LITTLE_ENDIAN); + const lo = TMP_WORD.getUint32(NATIVE_LITTLE_ENDIAN ? 0 : 4, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true); + const hi = TMP_WORD.getUint32(NATIVE_LITTLE_ENDIAN ? 4 : 0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(4, true); + ds.segment.setUint32(ds.byteOffset + byteOffset, lo); + ds.segment.setUint32(ds.byteOffset + byteOffset + 4, hi); + return; + } + ds.segment.setInt64(ds.byteOffset + byteOffset, value); +} +function setInt8(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 1, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + TMP_WORD.setInt8(0, value); + const v = TMP_WORD.getUint8(0) ^ defaultMask.getUint8(0); + ds.segment.setUint8(ds.byteOffset + byteOffset, v); + return; + } + ds.segment.setInt8(ds.byteOffset + byteOffset, value); +} +function setText(index, value, s) { + Text.fromPointer(getPointer(index, s)).set(0, value); +} +function setUint16(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 2, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) value ^= defaultMask.getUint16(0, true); + ds.segment.setUint16(ds.byteOffset + byteOffset, value); +} +function setUint32(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 4, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) value ^= defaultMask.getUint32(0, true); + ds.segment.setUint32(ds.byteOffset + byteOffset, value); +} +function setUint64(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 8, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + TMP_WORD.setBigUint64(0, value, NATIVE_LITTLE_ENDIAN); + const lo = TMP_WORD.getUint32(NATIVE_LITTLE_ENDIAN ? 0 : 4, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true); + const hi = TMP_WORD.getUint32(NATIVE_LITTLE_ENDIAN ? 4 : 0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(4, true); + ds.segment.setUint32(ds.byteOffset + byteOffset, lo); + ds.segment.setUint32(ds.byteOffset + byteOffset + 4, hi); + return; + } + ds.segment.setUint64(ds.byteOffset + byteOffset, value); +} +function setUint8(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 1, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) value ^= defaultMask.getUint8(0); + ds.segment.setUint8(ds.byteOffset + byteOffset, value); +} +function testWhich(name, found, wanted, s) { + if (found !== wanted) { + throw new Error(format(PTR_INVALID_UNION_ACCESS, s, name, found, wanted)); + } +} +function checkDataBounds(byteOffset, byteLength, s) { + const dataByteLength = getSize(s).dataByteLength; + if (byteOffset < 0 || byteLength < 0 || byteOffset + byteLength > dataByteLength) { + throw new Error( + format( + PTR_STRUCT_DATA_OUT_OF_BOUNDS, + s, + byteLength, + byteOffset, + dataByteLength + ) + ); + } +} + +// ../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/shared/capnp-es.Cx0B_Qxd.mjs +var ArenaKind = /* @__PURE__ */ ((ArenaKind2) => { + ArenaKind2[ArenaKind2["SINGLE_SEGMENT"] = 0] = "SINGLE_SEGMENT"; + ArenaKind2[ArenaKind2["MULTI_SEGMENT"] = 1] = "MULTI_SEGMENT"; + return ArenaKind2; +})(ArenaKind || {}); +var ArenaAllocationResult = class { + /** + * The newly allocated buffer. This buffer might be a copy of an existing segment's buffer with free space appended. + * + * @type {ArrayBuffer} + */ + buffer; + /** + * The id of the newly-allocated segment. + * + * @type {number} + */ + id; + constructor(id, buffer) { + this.id = id; + this.buffer = buffer; + } +}; +var MultiSegmentArena = class { + constructor(buffers = [new ArrayBuffer(DEFAULT_BUFFER_SIZE)]) { + this.buffers = buffers; + let i = buffers.length; + while (--i >= 0) { + if ((buffers[i].byteLength & 7) !== 0) { + throw new Error(format(SEG_NOT_WORD_ALIGNED, buffers[i].byteLength)); + } + } + } + static allocate = allocate$2; + static getBuffer = getBuffer$2; + static getNumSegments = getNumSegments$2; + kind = ArenaKind.MULTI_SEGMENT; + toString() { + return format("MultiSegmentArena_segments:%d", getNumSegments$2(this)); + } +}; +function allocate$2(minSize, m) { + const b = new ArrayBuffer(padToWord$1(Math.max(minSize, DEFAULT_BUFFER_SIZE))); + m.buffers.push(b); + return new ArenaAllocationResult(m.buffers.length - 1, b); +} +function getBuffer$2(id, m) { + if (id < 0 || id >= m.buffers.length) { + throw new Error(format(SEG_ID_OUT_OF_BOUNDS, id)); + } + return m.buffers[id]; +} +function getNumSegments$2(m) { + return m.buffers.length; +} +var SingleSegmentArena = class { + static allocate = allocate$1; + static getBuffer = getBuffer$1; + static getNumSegments = getNumSegments$1; + buffer; + kind = ArenaKind.SINGLE_SEGMENT; + constructor(buffer = new ArrayBuffer(DEFAULT_BUFFER_SIZE)) { + if ((buffer.byteLength & 7) !== 0) { + throw new Error(format(SEG_NOT_WORD_ALIGNED, buffer.byteLength)); + } + this.buffer = buffer; + } + toString() { + return format("SingleSegmentArena_len:%x", this.buffer.byteLength); + } +}; +function allocate$1(minSize, segments, s) { + const srcBuffer = segments.length > 0 ? segments[0].buffer : s.buffer; + minSize = minSize < MIN_SINGLE_SEGMENT_GROWTH ? MIN_SINGLE_SEGMENT_GROWTH : padToWord$1(minSize); + s.buffer = new ArrayBuffer(srcBuffer.byteLength + minSize); + new Float64Array(s.buffer).set(new Float64Array(srcBuffer)); + return new ArenaAllocationResult(0, s.buffer); +} +function getBuffer$1(id, s) { + if (id !== 0) throw new Error(format(SEG_GET_NON_ZERO_SINGLE, id)); + return s.buffer; +} +function getNumSegments$1() { + return 1; +} +var Arena = class { + static allocate = allocate; + static copy = copy$1; + static getBuffer = getBuffer; + static getNumSegments = getNumSegments; +}; +function allocate(minSize, segments, a) { + switch (a.kind) { + case ArenaKind.MULTI_SEGMENT: { + return MultiSegmentArena.allocate(minSize, a); + } + case ArenaKind.SINGLE_SEGMENT: { + return SingleSegmentArena.allocate(minSize, segments, a); + } + default: { + return assertNever(a); + } + } +} +function copy$1(a) { + switch (a.kind) { + case ArenaKind.MULTI_SEGMENT: { + let i = a.buffers.length; + const buffers = Array.from({ length: i }); + while (--i >= 0) { + buffers[i] = a.buffers[i].slice(0); + } + return new MultiSegmentArena(buffers); + } + case ArenaKind.SINGLE_SEGMENT: { + return new SingleSegmentArena(a.buffer.slice(0)); + } + default: { + return assertNever(a); + } + } +} +function getBuffer(id, a) { + switch (a.kind) { + case ArenaKind.MULTI_SEGMENT: { + return MultiSegmentArena.getBuffer(id, a); + } + case ArenaKind.SINGLE_SEGMENT: { + return SingleSegmentArena.getBuffer(id, a); + } + default: { + return assertNever(a); + } + } +} +function getNumSegments(a) { + switch (a.kind) { + case ArenaKind.MULTI_SEGMENT: { + return MultiSegmentArena.getNumSegments(a); + } + case ArenaKind.SINGLE_SEGMENT: { + return SingleSegmentArena.getNumSegments(); + } + default: { + return assertNever(a); + } + } +} +function getHammingWeight(x) { + let w = x - (x >> 1 & 1431655765); + w = (w & 858993459) + (w >> 2 & 858993459); + return (w + (w >> 4) & 252645135) * 16843009 >> 24; +} +function getTagByte(a, b, c, d, e, f, g, h) { + return (a === 0 ? 0 : 1) | (b === 0 ? 0 : 2) | (c === 0 ? 0 : 4) | (d === 0 ? 0 : 8) | (e === 0 ? 0 : 16) | (f === 0 ? 0 : 32) | (g === 0 ? 0 : 64) | (h === 0 ? 0 : 128); +} +function getUnpackedByteLength(packed) { + const p = new Uint8Array(packed); + let wordCount = 0; + let lastTag = 119; + for (let i = 0; i < p.byteLength; ) { + const tag = p[i]; + if (lastTag === 0) { + wordCount += tag; + i++; + lastTag = 119; + } else if (lastTag === 255) { + wordCount += tag; + i += tag * 8 + 1; + lastTag = 119; + } else { + wordCount++; + i += getHammingWeight(tag) + 1; + lastTag = tag; + } + } + return wordCount * 8; +} +function getZeroByteCount(a, b, c, d, e, f, g, h) { + return (a === 0 ? 1 : 0) + (b === 0 ? 1 : 0) + (c === 0 ? 1 : 0) + (d === 0 ? 1 : 0) + (e === 0 ? 1 : 0) + (f === 0 ? 1 : 0) + (g === 0 ? 1 : 0) + (h === 0 ? 1 : 0); +} +function pack(unpacked, byteOffset = 0, byteLength) { + if (unpacked.byteLength % 8 !== 0) throw new Error(MSG_PACK_NOT_WORD_ALIGNED); + const src = new Uint8Array(unpacked, byteOffset, byteLength); + const dst = []; + let lastTag = 119; + let spanWordCountOffset = 0; + let rangeWordCount = 0; + for (let srcByteOffset = 0; srcByteOffset < src.byteLength; srcByteOffset += 8) { + const a = src[srcByteOffset]; + const b = src[srcByteOffset + 1]; + const c = src[srcByteOffset + 2]; + const d = src[srcByteOffset + 3]; + const e = src[srcByteOffset + 4]; + const f = src[srcByteOffset + 5]; + const g = src[srcByteOffset + 6]; + const h = src[srcByteOffset + 7]; + const tag = getTagByte(a, b, c, d, e, f, g, h); + let skipWriteWord = true; + switch (lastTag) { + case 0: { + if (tag !== 0 || rangeWordCount >= 255) { + dst.push(rangeWordCount); + rangeWordCount = 0; + skipWriteWord = false; + } else { + rangeWordCount++; + } + break; + } + case 255: { + const zeroCount = getZeroByteCount(a, b, c, d, e, f, g, h); + if (zeroCount >= PACK_SPAN_THRESHOLD || rangeWordCount >= 255) { + dst[spanWordCountOffset] = rangeWordCount; + rangeWordCount = 0; + skipWriteWord = false; + } else { + dst.push(a, b, c, d, e, f, g, h); + rangeWordCount++; + } + break; + } + default: { + skipWriteWord = false; + break; + } + } + if (skipWriteWord) continue; + dst.push(tag); + lastTag = tag; + if (a !== 0) dst.push(a); + if (b !== 0) dst.push(b); + if (c !== 0) dst.push(c); + if (d !== 0) dst.push(d); + if (e !== 0) dst.push(e); + if (f !== 0) dst.push(f); + if (g !== 0) dst.push(g); + if (h !== 0) dst.push(h); + if (tag === 255) { + spanWordCountOffset = dst.length; + dst.push(0); + } + } + if (lastTag === 0) { + dst.push(rangeWordCount); + } else if (lastTag === 255) { + dst[spanWordCountOffset] = rangeWordCount; + } + return new Uint8Array(dst).buffer; +} +function unpack(packed) { + const src = new Uint8Array(packed); + const dst = new Uint8Array(new ArrayBuffer(getUnpackedByteLength(packed))); + let lastTag = 119; + for (let srcByteOffset = 0, dstByteOffset = 0; srcByteOffset < src.byteLength; ) { + const tag = src[srcByteOffset]; + if (lastTag === 0) { + dstByteOffset += tag * 8; + srcByteOffset++; + lastTag = 119; + } else if (lastTag === 255) { + const spanByteLength = tag * 8; + dst.set( + src.subarray(srcByteOffset + 1, srcByteOffset + 1 + spanByteLength), + dstByteOffset + ); + dstByteOffset += spanByteLength; + srcByteOffset += 1 + spanByteLength; + lastTag = 119; + } else { + srcByteOffset++; + for (let i = 1; i <= 128; i <<= 1) { + if ((tag & i) !== 0) dst[dstByteOffset] = src[srcByteOffset++]; + dstByteOffset++; + } + lastTag = tag; + } + } + return dst.buffer; +} +var Segment = class { + buffer; + /** The number of bytes currently allocated in the segment. */ + byteLength; + /** + * This value should always be zero. It's only here to satisfy the DataView interface. + * + * In the future the Segment implementation (or a child class) may allow accessing the buffer from a nonzero offset, + * but that adds a lot of extra arithmetic. + */ + byteOffset; + [Symbol.toStringTag] = "Segment"; + id; + message; + _dv; + constructor(id, message, buffer, byteLength = 0) { + this.id = id; + this.message = message; + this.buffer = buffer; + this._dv = new DataView(buffer); + this.byteOffset = 0; + this.byteLength = byteLength; + } + /** + * Attempt to allocate the requested number of bytes in this segment. If this segment is full this method will return + * a pointer to freshly allocated space in another segment from the same message. + * + * @param {number} byteLength The number of bytes to allocate, will be rounded up to the nearest word. + * @returns {Pointer} A pointer to the newly allocated space. + */ + allocate(byteLength) { + let segment = this; + byteLength = padToWord$1(byteLength); + if (byteLength > MAX_SEGMENT_LENGTH - 8) { + throw new Error(format(SEG_SIZE_OVERFLOW, byteLength)); + } + if (!segment.hasCapacity(byteLength)) { + segment = segment.message.allocateSegment(byteLength); + } + const byteOffset = segment.byteLength; + segment.byteLength = segment.byteLength + byteLength; + return new Pointer(segment, byteOffset); + } + /** + * Quickly copy a word (8 bytes) from `srcSegment` into this one at the given offset. + * + * @param {number} byteOffset The offset to write the word to. + * @param {Segment} srcSegment The segment to copy the word from. + * @param {number} srcByteOffset The offset from the start of `srcSegment` to copy from. + * @returns {void} + */ + copyWord(byteOffset, srcSegment, srcByteOffset) { + const value = srcSegment._dv.getFloat64( + srcByteOffset, + NATIVE_LITTLE_ENDIAN + ); + this._dv.setFloat64(byteOffset, value, NATIVE_LITTLE_ENDIAN); + } + /** + * Quickly copy words from `srcSegment` into this one. + * + * @param {number} byteOffset The offset to start copying into. + * @param {Segment} srcSegment The segment to copy from. + * @param {number} srcByteOffset The start offset to copy from. + * @param {number} wordLength The number of words to copy. + * @returns {void} + */ + copyWords(byteOffset, srcSegment, srcByteOffset, wordLength) { + const dst = new Float64Array(this.buffer, byteOffset, wordLength); + const src = new Float64Array(srcSegment.buffer, srcByteOffset, wordLength); + dst.set(src); + } + /** + * Quickly fill a number of words in the buffer with zeroes. + * + * @param {number} byteOffset The first byte to set to zero. + * @param {number} wordLength The number of words (not bytes!) to zero out. + * @returns {void} + */ + fillZeroWords(byteOffset, wordLength) { + new Float64Array(this.buffer, byteOffset, wordLength).fill(0); + } + getBigInt64(byteOffset, littleEndian) { + return this._dv.getBigInt64(byteOffset, littleEndian); + } + getBigUint64(byteOffset, littleEndian) { + return this._dv.getBigUint64(byteOffset, littleEndian); + } + /** + * Get the total number of bytes available in this segment (the size of its underlying buffer). + * + * @returns {number} The total number of bytes this segment can hold. + */ + getCapacity() { + return this.buffer.byteLength; + } + /** + * Read a float32 value out of this segment. + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getFloat32(byteOffset) { + return this._dv.getFloat32(byteOffset, true); + } + /** + * Read a float64 value out of this segment. + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getFloat64(byteOffset) { + return this._dv.getFloat64(byteOffset, true); + } + /** + * Read an int16 value out of this segment. + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getInt16(byteOffset) { + return this._dv.getInt16(byteOffset, true); + } + /** + * Read an int32 value out of this segment. + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getInt32(byteOffset) { + return this._dv.getInt32(byteOffset, true); + } + /** + * Read an int64 value out of this segment. + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getInt64(byteOffset) { + return this._dv.getBigInt64(byteOffset, true); + } + /** + * Read an int8 value out of this segment. + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getInt8(byteOffset) { + return this._dv.getInt8(byteOffset); + } + /** + * Read a uint16 value out of this segment. + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getUint16(byteOffset) { + return this._dv.getUint16(byteOffset, true); + } + /** + * Read a uint32 value out of this segment. + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getUint32(byteOffset) { + return this._dv.getUint32(byteOffset, true); + } + /** + * Read a uint64 value (as a bigint) out of this segment. + * NOTE: this does not copy the memory region, so updates to the underlying buffer will affect the returned value! + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getUint64(byteOffset) { + return this._dv.getBigUint64(byteOffset, true); + } + /** + * Read a uint8 value out of this segment. + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getUint8(byteOffset) { + return this._dv.getUint8(byteOffset); + } + hasCapacity(byteLength) { + return this.buffer.byteLength - this.byteLength >= byteLength; + } + /** + * Quickly check the word at the given offset to see if it is equal to zero. + * + * PERF_V8: Fastest way to do this is by reading the whole word as a `number` (float64) in the _native_ endian format + * and see if it's zero. + * + * Benchmark: http://jsben.ch/#/Pjooc + * + * @param {number} byteOffset The offset to the word. + * @returns {boolean} `true` if the word is zero. + */ + isWordZero(byteOffset) { + return this._dv.getFloat64(byteOffset, NATIVE_LITTLE_ENDIAN) === 0; + } + /** + * Swap out this segment's underlying buffer with a new one. It's assumed that the new buffer has the same content but + * more free space, otherwise all existing pointers to this segment will be hilariously broken. + * + * @param {ArrayBuffer} buffer The new buffer to use. + * @returns {void} + */ + replaceBuffer(buffer) { + if (this.buffer === buffer) return; + if (buffer.byteLength < this.byteLength) { + throw new Error(SEG_REPLACEMENT_BUFFER_TOO_SMALL); + } + this._dv = new DataView(buffer); + this.buffer = buffer; + } + setBigInt64(byteOffset, value, littleEndian) { + this._dv.setBigInt64(byteOffset, value, littleEndian); + } + /** WARNING: This function is not yet implemented. */ + setBigUint64(byteOffset, value, littleEndian) { + this._dv.setBigUint64(byteOffset, value, littleEndian); + } + /** + * Write a float32 value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {number} val The value to store. + * @returns {void} + */ + setFloat32(byteOffset, val) { + this._dv.setFloat32(byteOffset, val, true); + } + /** + * Write an float64 value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {number} val The value to store. + * @returns {void} + */ + setFloat64(byteOffset, val) { + this._dv.setFloat64(byteOffset, val, true); + } + /** + * Write an int16 value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {number} val The value to store. + * @returns {void} + */ + setInt16(byteOffset, val) { + this._dv.setInt16(byteOffset, val, true); + } + /** + * Write an int32 value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {number} val The value to store. + * @returns {void} + */ + setInt32(byteOffset, val) { + this._dv.setInt32(byteOffset, val, true); + } + /** + * Write an int8 value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {number} val The value to store. + * @returns {void} + */ + setInt8(byteOffset, val) { + this._dv.setInt8(byteOffset, val); + } + /** + * Write an int64 value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {bigint} val The value to store. + * @returns {void} + */ + setInt64(byteOffset, val) { + this._dv.setBigInt64(byteOffset, val, true); + } + /** + * Write a uint16 value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {number} val The value to store. + * @returns {void} + */ + setUint16(byteOffset, val) { + this._dv.setUint16(byteOffset, val, true); + } + /** + * Write a uint32 value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {number} val The value to store. + * @returns {void} + */ + setUint32(byteOffset, val) { + this._dv.setUint32(byteOffset, val, true); + } + /** + * Write a uint64 value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {bigint} val The value to store. + * @returns {void} + */ + setUint64(byteOffset, val) { + this._dv.setBigUint64(byteOffset, val, true); + } + /** + * Write a uint8 (byte) value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {number} val The value to store. + * @returns {void} + */ + setUint8(byteOffset, val) { + this._dv.setUint8(byteOffset, val); + } + /** + * Write a zero word (8 bytes) to the specified offset. This is slightly faster than calling `setUint64` or + * `setFloat64` with a zero value. + * + * Benchmark: http://jsben.ch/#/dUdPI + * + * @param {number} byteOffset The offset of the word to set to zero. + * @returns {void} + */ + setWordZero(byteOffset) { + this._dv.setFloat64(byteOffset, 0, NATIVE_LITTLE_ENDIAN); + } + toString() { + return format( + "Segment_id:%d,off:%a,len:%a,cap:%a", + this.id, + this.byteLength, + this.byteOffset, + this.buffer.byteLength + ); + } +}; +var Message = class { + static allocateSegment = allocateSegment; + static dump = dump2; + static getRoot = getRoot; + static getSegment = getSegment; + static initRoot = initRoot; + static readRawPointer = readRawPointer; + static toArrayBuffer = toArrayBuffer; + static toPackedArrayBuffer = toPackedArrayBuffer; + _capnp; + /** + * A Cap'n Proto message. + * + * SECURITY WARNING: In Node.js do not pass a Buffer's internal array buffer into this constructor. Pass the buffer + * directly and everything will be fine. If not, your message will potentially be initialized with random memory + * contents! + * + * The constructor method creates a new Message, optionally using a provided arena for segment allocation, or a buffer + * to read from. + * + * @constructor {Message} + * + * @param {AnyArena|ArrayBufferView|ArrayBuffer} [src] The source for the message. + * A value of `undefined` will cause the message to initialize with a single segment arena only big enough for the + * root pointer; it will expand as you go. This is a reasonable choice for most messages. + * + * Passing an arena will cause the message to use that arena for its segment allocation. Contents will be accepted + * as-is. + * + * Passing an array buffer view (like `DataView`, `Uint8Array` or `Buffer`) will create a **copy** of the source + * buffer; beware of the potential performance cost! + * + * @param {boolean} [packed] Whether or not the message is packed. If `true` (the default), the message will be + * unpacked. + * + * @param {boolean} [singleSegment] If true, `src` will be treated as a message consisting of a single segment without + * a framing header. + * + */ + constructor(src, packed = true, singleSegment = false) { + this._capnp = initMessage(src, packed, singleSegment); + if (src) preallocateSegments(this); + } + allocateSegment(byteLength) { + return allocateSegment(byteLength, this); + } + /** + * Copies the contents of this message into an identical message with its own ArrayBuffers. + * + * @returns A copy of this message. + */ + copy() { + return copy(this); + } + /** + * Create a pretty-printed string dump of this message; incredibly useful for debugging. + * + * WARNING: Do not call this method on large messages! + * + * @returns {string} A big steaming pile of pretty hex digits. + */ + dump() { + return dump2(this); + } + /** + * Get a struct pointer for the root of this message. This is primarily used when reading a message; it will not + * overwrite existing data. + * + * @template T + * @param {StructCtor} RootStruct The struct type to use as the root. + * @returns {T} A struct representing the root of the message. + */ + getRoot(RootStruct) { + return getRoot(RootStruct, this); + } + /** + * Get a segment by its id. + * + * This will lazily allocate the first segment if it doesn't already exist. + * + * @param {number} id The segment id. + * @returns {Segment} The requested segment. + */ + getSegment(id) { + return getSegment(id, this); + } + /** + * Initialize a new message using the provided struct type as the root. + * + * @template T + * @param {StructCtor} RootStruct The struct type to use as the root. + * @returns {T} An initialized struct pointing to the root of the message. + */ + initRoot(RootStruct) { + return initRoot(RootStruct, this); + } + /** + * Set the root of the message to a copy of the given pointer. Used internally + * to make copies of pointers for default values. + * + * @param {Pointer} src The source pointer to copy. + * @returns {void} + */ + setRoot(src) { + setRoot(src, this); + } + /** + * Combine the contents of this message's segments into a single array buffer and prepend a stream framing header + * containing information about the following segment data. + * + * @returns {ArrayBuffer} An ArrayBuffer with the contents of this message. + */ + toArrayBuffer() { + return toArrayBuffer(this); + } + /** + * Like `toArrayBuffer()`, but also applies the packing algorithm to the output. This is typically what you want to + * use if you're sending the message over a network link or other slow I/O interface where size matters. + * + * @returns {ArrayBuffer} A packed message. + */ + toPackedArrayBuffer() { + return toPackedArrayBuffer(this); + } + addCap(client) { + if (!this._capnp.capTable) { + this._capnp.capTable = []; + } + const id = this._capnp.capTable.length; + this._capnp.capTable.push(client); + return id; + } + toString() { + return `Message_arena:${this._capnp.arena}`; + } +}; +function initMessage(src, packed = true, singleSegment = false) { + if (src === void 0) { + return { + arena: new SingleSegmentArena(), + segments: [], + traversalLimit: DEFAULT_TRAVERSE_LIMIT + }; + } + if (isAnyArena(src)) { + return { arena: src, segments: [], traversalLimit: DEFAULT_TRAVERSE_LIMIT }; + } + let buf = src; + if (isArrayBufferView(buf)) { + buf = buf.buffer.slice( + buf.byteOffset, + buf.byteOffset + buf.byteLength + ); + } + if (packed) buf = unpack(buf); + if (singleSegment) { + return { + arena: new SingleSegmentArena(buf), + segments: [], + traversalLimit: DEFAULT_TRAVERSE_LIMIT + }; + } + return { + arena: new MultiSegmentArena(getFramedSegments(buf)), + segments: [], + traversalLimit: DEFAULT_TRAVERSE_LIMIT + }; +} +function getFramedSegments(message) { + const dv = new DataView(message); + const segmentCount = dv.getUint32(0, true) + 1; + const segments = Array.from({ length: segmentCount }); + let byteOffset = 4 + segmentCount * 4; + byteOffset += byteOffset % 8; + if (byteOffset + segmentCount * 4 > message.byteLength) { + throw new Error(MSG_INVALID_FRAME_HEADER); + } + for (let i = 0; i < segmentCount; i++) { + const byteLength = dv.getUint32(4 + i * 4, true) * 8; + if (byteOffset + byteLength > message.byteLength) { + throw new Error(MSG_INVALID_FRAME_HEADER); + } + segments[i] = message.slice(byteOffset, byteOffset + byteLength); + byteOffset += byteLength; + } + return segments; +} +function preallocateSegments(m) { + const numSegments = Arena.getNumSegments(m._capnp.arena); + m._capnp.segments = Array.from({ length: numSegments }); + for (let i = 0; i < numSegments; i++) { + if (i === 0 && Arena.getBuffer(i, m._capnp.arena).byteLength < 8) { + throw new Error(MSG_SEGMENT_TOO_SMALL); + } + const buffer = Arena.getBuffer(i, m._capnp.arena); + const segment = new Segment(i, m, buffer, buffer.byteLength); + m._capnp.segments[i] = segment; + } +} +function isArrayBufferView(src) { + return src.byteOffset !== void 0; +} +function isAnyArena(o) { + return o.kind !== void 0; +} +function allocateSegment(byteLength, m) { + const res = Arena.allocate(byteLength, m._capnp.segments, m._capnp.arena); + let s; + if (res.id === m._capnp.segments.length) { + s = new Segment(res.id, m, res.buffer); + m._capnp.segments.push(s); + } else if (res.id < 0 || res.id > m._capnp.segments.length) { + throw new Error(format(MSG_SEGMENT_OUT_OF_BOUNDS, res.id, m)); + } else { + s = m._capnp.segments[res.id]; + s.replaceBuffer(res.buffer); + } + return s; +} +function dump2(m) { + let r = ""; + if (m._capnp.segments.length === 0) { + return "================\nNo Segments\n================\n"; + } + for (let i = 0; i < m._capnp.segments.length; i++) { + r += `================ +Segment #${i} +================ +`; + const { buffer, byteLength } = m._capnp.segments[i]; + const b = new Uint8Array(buffer, 0, byteLength); + r += dumpBuffer(b); + } + return r; +} +function getRoot(RootStruct, m) { + const root = new RootStruct(m.getSegment(0), 0); + validate(PointerType.STRUCT, root); + const ts = getTargetStructSize(root); + if (ts.dataByteLength < RootStruct._capnp.size.dataByteLength || ts.pointerLength < RootStruct._capnp.size.pointerLength) { + resize(RootStruct._capnp.size, root); + } + return root; +} +function getSegment(id, m) { + const segmentLength = m._capnp.segments.length; + if (id === 0 && segmentLength === 0) { + const arenaSegments = Arena.getNumSegments(m._capnp.arena); + if (arenaSegments === 0) { + allocateSegment(DEFAULT_BUFFER_SIZE, m); + } else { + m._capnp.segments[0] = new Segment( + 0, + m, + Arena.getBuffer(0, m._capnp.arena) + ); + } + if (!m._capnp.segments[0].hasCapacity(8)) { + throw new Error(MSG_SEGMENT_TOO_SMALL); + } + m._capnp.segments[0].allocate(8); + return m._capnp.segments[0]; + } + if (id < 0 || id >= segmentLength) { + throw new Error(format(MSG_SEGMENT_OUT_OF_BOUNDS, id, m)); + } + return m._capnp.segments[id]; +} +function initRoot(RootStruct, m) { + const root = new RootStruct(m.getSegment(0), 0); + initStruct(RootStruct._capnp.size, root); + return root; +} +function readRawPointer(data) { + return new Pointer(new Message(data).getSegment(0), 0); +} +function setRoot(src, m) { + copyFrom(src, new Pointer(m.getSegment(0), 0)); +} +function toArrayBuffer(m) { + const streamFrame = getStreamFrame(m); + if (m._capnp.segments.length === 0) getSegment(0, m); + const segments = m._capnp.segments; + const totalLength = streamFrame.byteLength + segments.reduce((l, s) => l + padToWord$1(s.byteLength), 0); + const out = new Uint8Array(new ArrayBuffer(totalLength)); + let o = streamFrame.byteLength; + out.set(new Uint8Array(streamFrame)); + for (const s of segments) { + const segmentLength = padToWord$1(s.byteLength); + out.set(new Uint8Array(s.buffer, 0, segmentLength), o); + o += segmentLength; + } + return out.buffer; +} +function toPackedArrayBuffer(m) { + const streamFrame = pack(getStreamFrame(m)); + if (m._capnp.segments.length === 0) m.getSegment(0); + const segments = m._capnp.segments.map( + (s) => pack(s.buffer, 0, padToWord$1(s.byteLength)) + ); + const totalLength = streamFrame.byteLength + segments.reduce((l, s) => l + s.byteLength, 0); + const out = new Uint8Array(new ArrayBuffer(totalLength)); + let o = streamFrame.byteLength; + out.set(new Uint8Array(streamFrame)); + for (const s of segments) { + out.set(new Uint8Array(s), o); + o += s.byteLength; + } + return out.buffer; +} +function getStreamFrame(m) { + const length = m._capnp.segments.length; + if (length === 0) { + return new Float64Array(1).buffer; + } + const frameLength = 4 + length * 4 + (1 - length % 2) * 4; + const out = new DataView(new ArrayBuffer(frameLength)); + out.setUint32(0, length - 1, true); + for (const [i, s] of m._capnp.segments.entries()) { + out.setUint32(i * 4 + 4, s.byteLength / 8, true); + } + return out.buffer; +} +function copy(m) { + return new Message(Arena.copy(m._capnp.arena)); +} + +// ../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/shared/capnp-es.DCKndyix.mjs +function CompositeList(CompositeClass) { + return class extends List { + static _capnp = { + compositeSize: CompositeClass._capnp.size, + displayName: `List<${CompositeClass._capnp.displayName}>`, + size: ListElementSize.COMPOSITE + }; + get(index) { + return new CompositeClass( + this.segment, + this.byteOffset, + this._capnp.depthLimit - 1, + index + ); + } + set(index, value) { + copyFrom(value, this.get(index)); + } + [Symbol.toStringTag]() { + return `Composite_${super.toString()},cls:${CompositeClass.toString()}`; + } + }; +} +function _makePrimitiveMaskFn(byteLength, setter) { + return (x) => { + const dv = new DataView(new ArrayBuffer(byteLength)); + setter.call(dv, 0, x, true); + return dv; + }; +} +var getFloat32Mask = _makePrimitiveMaskFn( + 4, + DataView.prototype.setFloat32 +); +var getFloat64Mask = _makePrimitiveMaskFn( + 8, + DataView.prototype.setFloat64 +); +var getInt16Mask = _makePrimitiveMaskFn( + 2, + DataView.prototype.setInt16 +); +var getInt32Mask = _makePrimitiveMaskFn( + 4, + DataView.prototype.setInt32 +); +var getInt64Mask = _makePrimitiveMaskFn( + 8, + DataView.prototype.setBigInt64 +); +var getInt8Mask = _makePrimitiveMaskFn(1, DataView.prototype.setInt8); +var getUint16Mask = _makePrimitiveMaskFn( + 2, + DataView.prototype.setUint16 +); +var getUint32Mask = _makePrimitiveMaskFn( + 4, + DataView.prototype.setUint32 +); +var getUint64Mask = _makePrimitiveMaskFn( + 8, + DataView.prototype.setBigUint64 +); +var getUint8Mask = _makePrimitiveMaskFn( + 1, + DataView.prototype.setUint8 +); +function getBitMask(value, bitOffset) { + const dv = new DataView(new ArrayBuffer(1)); + if (!value) return dv; + dv.setUint8(0, 1 << bitOffset % 8); + return dv; +} + +// ../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/shared/capnp-es.B1ADXvSS.mjs +var Interface = class extends Pointer { + static _capnp = { + displayName: "Interface" + }; + static getCapID = getCapID; + static getAsInterface = getAsInterface; + static isInterface = isInterface; + static getClient = getClient; + constructor(segment, byteOffset, depthLimit = MAX_DEPTH) { + super(segment, byteOffset, depthLimit); + } + static fromPointer(p) { + return getAsInterface(p); + } + getCapId() { + return getCapID(this); + } + getClient() { + return getClient(this); + } + [Symbol.for("nodejs.util.inspect.custom")]() { + return format( + "Interface_%d@%a,%d,limit:%x", + this.segment.id, + this.byteOffset, + this.getCapId(), + this._capnp.depthLimit + ); + } +}; +function getAsInterface(p) { + if (getTargetPointerType(p) === PointerType.OTHER) { + return new Interface(p.segment, p.byteOffset, p._capnp.depthLimit); + } + return null; +} +function isInterface(p) { + return getTargetPointerType(p) === PointerType.OTHER; +} +function getCapID(i) { + if (i.segment.getUint32(i.byteOffset) !== PointerType.OTHER) { + return -1; + } + return i.segment.getUint32(i.byteOffset + 4); +} +function getClient(i) { + const capID = getCapID(i); + const { capTable } = i.segment.message._capnp; + if (!capTable) { + return null; + } + return capTable[capID]; +} + +// ../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/index.mjs +var Void = class extends Struct { + static _capnp = { + displayName: "Void", + id: "0", + size: new ObjectSize(0, 0) + }; +}; +var utils = { + __proto__: null, + PointerAllocationResult, + add, + adopt, + checkDataBounds, + checkPointerBounds, + copyFrom, + copyFromInterface, + copyFromList, + copyFromStruct, + disown, + dump, + erase, + erasePointer, + followFar, + followFars, + getAs, + getBit, + getCapabilityId, + getContent, + getData, + getDataSection, + getFarSegmentId, + getFloat32, + getFloat64, + getInt16, + getInt32, + getInt64, + getInt8, + getInterfaceClientOrNull, + getInterfaceClientOrNullAt, + getInterfacePointer, + getList, + getListByteLength, + getListElementByteLength, + getListElementSize, + getListLength, + getOffsetWords, + getPointer, + getPointerAs, + getPointerSection, + getPointerType, + getSize, + getStruct, + getStructDataWords, + getStructPointerLength, + getStructSize, + getTargetCompositeListSize, + getTargetCompositeListTag, + getTargetListElementSize, + getTargetListLength, + getTargetPointerType, + getTargetStructSize, + getText, + getUint16, + getUint32, + getUint64, + getUint8, + initData, + initList, + initPointer, + initStruct, + initStructAt, + isDoubleFar, + isNull, + relocateTo, + resize, + setBit, + setFarPointer, + setFloat32, + setFloat64, + setInt16, + setInt32, + setInt64, + setInt8, + setInterfacePointer, + setListPointer, + setStructPointer, + setText, + setUint16, + setUint32, + setUint64, + setUint8, + testWhich, + trackPointerAllocation, + validate +}; +function PointerList(PointerClass) { + return class extends List { + static _capnp = { + displayName: `List<${PointerClass._capnp.displayName}>`, + size: ListElementSize.POINTER + }; + get(index) { + const c = getContent(this); + return new PointerClass( + c.segment, + c.byteOffset + index * 8, + this._capnp.depthLimit - 1 + ); + } + set(index, value) { + copyFrom(value, this.get(index)); + } + [Symbol.toStringTag]() { + return `Pointer_${super.toString()},cls:${PointerClass.toString()}`; + } + }; +} +var AnyPointerList = PointerList(Pointer); +var BoolList = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BIT + }; + get(index) { + const bitMask = 1 << index % 8; + const byteOffset = index >>> 3; + const c = getContent(this); + const v = c.segment.getUint8(c.byteOffset + byteOffset); + return (v & bitMask) !== 0; + } + set(index, value) { + const bitMask = 1 << index % 8; + const c = getContent(this); + const byteOffset = c.byteOffset + (index >>> 3); + const v = c.segment.getUint8(byteOffset); + c.segment.setUint8(byteOffset, value ? v | bitMask : v & ~bitMask); + } + [Symbol.toStringTag]() { + return `Bool_${super.toString()}`; + } +}; +var DataList = PointerList(Data); +var Float32List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE_4 + }; + get(index) { + const c = getContent(this); + return c.segment.getFloat32(c.byteOffset + index * 4); + } + set(index, value) { + const c = getContent(this); + c.segment.setFloat32(c.byteOffset + index * 4, value); + } + [Symbol.toStringTag]() { + return `Float32_${super.toString()}`; + } +}; +var Float64List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE_8 + }; + get(index) { + const c = getContent(this); + return c.segment.getFloat64(c.byteOffset + index * 8); + } + set(index, value) { + const c = getContent(this); + c.segment.setFloat64(c.byteOffset + index * 8, value); + } + [Symbol.toStringTag]() { + return `Float64_${super.toString()}`; + } +}; +var Int8List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE + }; + get(index) { + const c = getContent(this); + return c.segment.getInt8(c.byteOffset + index); + } + set(index, value) { + const c = getContent(this); + c.segment.setInt8(c.byteOffset + index, value); + } + [Symbol.toStringTag]() { + return `Int8_${super.toString()}`; + } +}; +var Int16List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE_2 + }; + get(index) { + const c = getContent(this); + return c.segment.getInt16(c.byteOffset + index * 2); + } + set(index, value) { + const c = getContent(this); + c.segment.setInt16(c.byteOffset + index * 2, value); + } + [Symbol.toStringTag]() { + return `Int16_${super.toString()}`; + } +}; +var Int32List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE_4 + }; + get(index) { + const c = getContent(this); + return c.segment.getInt32(c.byteOffset + index * 4); + } + set(index, value) { + const c = getContent(this); + c.segment.setInt32(c.byteOffset + index * 4, value); + } + [Symbol.toStringTag]() { + return `Int32_${super.toString()}`; + } +}; +var Int64List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE_8 + }; + get(index) { + const c = getContent(this); + return c.segment.getInt64(c.byteOffset + index * 8); + } + set(index, value) { + const c = getContent(this); + c.segment.setInt64(c.byteOffset + index * 8, value); + } + [Symbol.toStringTag]() { + return `Int64_${super.toString()}`; + } +}; +var InterfaceList = PointerList(Interface); +var TextList = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.POINTER + }; + get(index) { + const c = getContent(this); + c.byteOffset += index * 8; + return Text.fromPointer(c).get(0); + } + set(index, value) { + const c = getContent(this); + c.byteOffset += index * 8; + Text.fromPointer(c).set(0, value); + } + [Symbol.toStringTag]() { + return `Text_${super.toString()}`; + } +}; +var Uint8List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE + }; + get(index) { + const c = getContent(this); + return c.segment.getUint8(c.byteOffset + index); + } + set(index, value) { + const c = getContent(this); + c.segment.setUint8(c.byteOffset + index, value); + } + [Symbol.toStringTag]() { + return `Uint8_${super.toString()}`; + } +}; +var Uint16List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE_2 + }; + get(index) { + const c = getContent(this); + return c.segment.getUint16(c.byteOffset + index * 2); + } + set(index, value) { + const c = getContent(this); + c.segment.setUint16(c.byteOffset + index * 2, value); + } + [Symbol.toStringTag]() { + return `Uint16_${super.toString()}`; + } +}; +var Uint32List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE_4 + }; + get(index) { + const c = getContent(this); + return c.segment.getUint32(c.byteOffset + index * 4); + } + set(index, value) { + const c = getContent(this); + c.segment.setUint32(c.byteOffset + index * 4, value); + } + [Symbol.toStringTag]() { + return `Uint32_${super.toString()}`; + } +}; +var Uint64List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE_8 + }; + get(index) { + const c = getContent(this); + return c.segment.getUint64(c.byteOffset + index * 8); + } + set(index, value) { + const c = getContent(this); + c.segment.setUint64(c.byteOffset + index * 8, value); + } + [Symbol.toStringTag]() { + return `Uint64_${super.toString()}`; + } +}; +var VoidList = PointerList(Void); +var ConnWeakRefRegistry = globalThis.FinalizationRegistry ? new FinalizationRegistry((cb) => cb()) : void 0; + +// src/runtime/config/generated.ts +var _capnpFileId = BigInt("0xe6afd26682091c01"); +var Config = class _Config extends Struct { + static _capnp = { + displayName: "Config", + id: "8794486c76aaa7d6", + size: new ObjectSize(0, 5) + }; + static _Services; + static _Sockets; + static _Extensions; + _adoptServices(value) { + utils.adopt(value, utils.getPointer(0, this)); + } + _disownServices() { + return utils.disown(this.services); + } + /** + * List of named services defined by this server. These names are private; they are only used + * to refer to the services from elsewhere in this config file, as well as for logging and the + * like. Services are not reachable until you configure some way to make them reachable, such + * as via a Socket. + * + * If you do not define any service called "internet", one is defined implicitly, representing + * the ability to access public internet servers. An explicit definition would look like: + * + * ( name = "internet", + * network = ( + * allow = ["public"], # Allows connections to publicly-routable addresses only. + * tlsOptions = (trustBrowserCas = true) + * ) + * ) + * + * The "internet" service backs the global `fetch()` function in a Worker, unless that Worker's + * configuration specifies some other service using the `globalOutbound` setting. + * */ + get services() { + return utils.getList(0, _Config._Services, this); + } + _hasServices() { + return !utils.isNull(utils.getPointer(0, this)); + } + _initServices(length) { + return utils.initList(0, _Config._Services, length, this); + } + set services(value) { + utils.copyFrom(value, utils.getPointer(0, this)); + } + _adoptSockets(value) { + utils.adopt(value, utils.getPointer(1, this)); + } + _disownSockets() { + return utils.disown(this.sockets); + } + /** + * List of sockets on which this server will listen, and the services that will be exposed + * through them. + * */ + get sockets() { + return utils.getList(1, _Config._Sockets, this); + } + _hasSockets() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initSockets(length) { + return utils.initList(1, _Config._Sockets, length, this); + } + set sockets(value) { + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptV8Flags(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownV8Flags() { + return utils.disown(this.v8Flags); + } + /** + * List of "command-line" flags to pass to V8, like "--expose-gc". We put these in the config + * rather than on the actual command line because for most use cases, managing these via the + * config file is probably cleaner and easier than passing on the actual CLI. + * + * WARNING: Use at your own risk. V8 flags can have all sorts of wild effects including completely + * breaking everything. V8 flags also generally do not come with any guarantee of stability + * between V8 versions. Most users should not set any V8 flags. + * */ + get v8Flags() { + return utils.getList(2, TextList, this); + } + _hasV8Flags() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initV8Flags(length) { + return utils.initList(2, TextList, length, this); + } + set v8Flags(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + _adoptExtensions(value) { + utils.adopt(value, utils.getPointer(3, this)); + } + _disownExtensions() { + return utils.disown(this.extensions); + } + /** + * Extensions provide capabilities to all workers. Extensions are usually prepared separately + * and are late-linked with the app using this config field. + * */ + get extensions() { + return utils.getList(3, _Config._Extensions, this); + } + _hasExtensions() { + return !utils.isNull(utils.getPointer(3, this)); + } + _initExtensions(length) { + return utils.initList(3, _Config._Extensions, length, this); + } + set extensions(value) { + utils.copyFrom(value, utils.getPointer(3, this)); + } + _adoptAutogates(value) { + utils.adopt(value, utils.getPointer(4, this)); + } + _disownAutogates() { + return utils.disown(this.autogates); + } + /** + * A list of gates which are enabled. + * These are used to gate features/changes in workerd and in our internal repo. See the equivalent + * config definition in our internal repo for more details. + * */ + get autogates() { + return utils.getList(4, TextList, this); + } + _hasAutogates() { + return !utils.isNull(utils.getPointer(4, this)); + } + _initAutogates(length) { + return utils.initList(4, TextList, length, this); + } + set autogates(value) { + utils.copyFrom(value, utils.getPointer(4, this)); + } + toString() { + return "Config_" + super.toString(); + } +}; +var Socket_Https = class extends Struct { + static _capnp = { + displayName: "https", + id: "de123876383cbbdc", + size: new ObjectSize(8, 5) + }; + _adoptOptions(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownOptions() { + return utils.disown(this.options); + } + get options() { + return utils.getStruct(2, HttpOptions, this); + } + _hasOptions() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initOptions() { + return utils.initStructAt(2, HttpOptions, this); + } + set options(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + _adoptTlsOptions(value) { + utils.adopt(value, utils.getPointer(3, this)); + } + _disownTlsOptions() { + return utils.disown(this.tlsOptions); + } + get tlsOptions() { + return utils.getStruct(3, TlsOptions, this); + } + _hasTlsOptions() { + return !utils.isNull(utils.getPointer(3, this)); + } + _initTlsOptions() { + return utils.initStructAt(3, TlsOptions, this); + } + set tlsOptions(value) { + utils.copyFrom(value, utils.getPointer(3, this)); + } + toString() { + return "Socket_Https_" + super.toString(); + } +}; +var Socket_Which = { + HTTP: 0, + HTTPS: 1 +}; +var Socket = class extends Struct { + static HTTP = Socket_Which.HTTP; + static HTTPS = Socket_Which.HTTPS; + static _capnp = { + displayName: "Socket", + id: "9a0eba45530ee79f", + size: new ObjectSize(8, 5) + }; + /** + * Each socket has a unique name which can be used on the command line to override the socket's + * address with `--socket-addr =` or `--socket-fd =`. + * */ + get name() { + return utils.getText(0, this); + } + set name(value) { + utils.setText(0, value, this); + } + /** + * Address/port on which this socket will listen. Optional; if not specified, then you will be + * required to specify the socket on the command line with with `--socket-addr =` or + * `--socket-fd =`. + * + * Examples: + * - "*:80": Listen on port 80 on all local IPv4 and IPv6 interfaces. + * - "1.2.3.4": Listen on the specific IPv4 address on the default port for the protocol. + * - "1.2.3.4:80": Listen on the specific IPv4 address and port. + * - "1234:5678::abcd": Listen on the specific IPv6 address on the default port for the protocol. + * - "[1234:5678::abcd]:80": Listen on the specific IPv6 address and port. + * - "unix:/path/to/socket": Listen on a Unix socket. + * - "unix-abstract:name": On Linux, listen on the given "abstract" Unix socket name. + * - "example.com:80": Perform a DNS lookup to determine the address, and then listen on it. If + * this resolves to multiple addresses, listen on all of them. + * + * (These are the formats supported by KJ's parseAddress().) + * */ + get address() { + return utils.getText(1, this); + } + set address(value) { + utils.setText(1, value, this); + } + _adoptHttp(value) { + utils.setUint16(0, 0, this); + utils.adopt(value, utils.getPointer(2, this)); + } + _disownHttp() { + return utils.disown(this.http); + } + get http() { + utils.testWhich("http", utils.getUint16(0, this), 0, this); + return utils.getStruct(2, HttpOptions, this); + } + _hasHttp() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initHttp() { + utils.setUint16(0, 0, this); + return utils.initStructAt(2, HttpOptions, this); + } + get _isHttp() { + return utils.getUint16(0, this) === 0; + } + set http(value) { + utils.setUint16(0, 0, this); + utils.copyFrom(value, utils.getPointer(2, this)); + } + get https() { + utils.testWhich("https", utils.getUint16(0, this), 1, this); + return utils.getAs(Socket_Https, this); + } + _initHttps() { + utils.setUint16(0, 1, this); + return utils.getAs(Socket_Https, this); + } + get _isHttps() { + return utils.getUint16(0, this) === 1; + } + set https(_) { + utils.setUint16(0, 1, this); + } + _adoptService(value) { + utils.adopt(value, utils.getPointer(4, this)); + } + _disownService() { + return utils.disown(this.service); + } + /** + * Service name which should handle requests on this socket. + * */ + get service() { + return utils.getStruct(4, ServiceDesignator, this); + } + _hasService() { + return !utils.isNull(utils.getPointer(4, this)); + } + _initService() { + return utils.initStructAt(4, ServiceDesignator, this); + } + set service(value) { + utils.copyFrom(value, utils.getPointer(4, this)); + } + toString() { + return "Socket_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var Service_Which = { + UNSPECIFIED: 0, + WORKER: 1, + NETWORK: 2, + EXTERNAL: 3, + DISK: 4 +}; +var Service = class extends Struct { + static UNSPECIFIED = Service_Which.UNSPECIFIED; + static WORKER = Service_Which.WORKER; + static NETWORK = Service_Which.NETWORK; + static EXTERNAL = Service_Which.EXTERNAL; + static DISK = Service_Which.DISK; + static _capnp = { + displayName: "Service", + id: "e5c88e8bb7bcb6b9", + size: new ObjectSize(8, 2) + }; + /** + * Name of the service. Used only to refer to the service from elsewhere in the config file. + * Services are not accessible unless you explicitly configure them to be, such as through a + * `Socket` or through a binding from another Worker. + * */ + get name() { + return utils.getText(0, this); + } + set name(value) { + utils.setText(0, value, this); + } + get _isUnspecified() { + return utils.getUint16(0, this) === 0; + } + set unspecified(_) { + utils.setUint16(0, 0, this); + } + _adoptWorker(value) { + utils.setUint16(0, 1, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownWorker() { + return utils.disown(this.worker); + } + /** + * A Worker! + * */ + get worker() { + utils.testWhich("worker", utils.getUint16(0, this), 1, this); + return utils.getStruct(1, Worker, this); + } + _hasWorker() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initWorker() { + utils.setUint16(0, 1, this); + return utils.initStructAt(1, Worker, this); + } + get _isWorker() { + return utils.getUint16(0, this) === 1; + } + set worker(value) { + utils.setUint16(0, 1, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptNetwork(value) { + utils.setUint16(0, 2, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownNetwork() { + return utils.disown(this.network); + } + /** + * A service that implements access to a network. fetch() requests are routed according to + * the URL hostname. + * */ + get network() { + utils.testWhich("network", utils.getUint16(0, this), 2, this); + return utils.getStruct(1, Network, this); + } + _hasNetwork() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initNetwork() { + utils.setUint16(0, 2, this); + return utils.initStructAt(1, Network, this); + } + get _isNetwork() { + return utils.getUint16(0, this) === 2; + } + set network(value) { + utils.setUint16(0, 2, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptExternal(value) { + utils.setUint16(0, 3, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownExternal() { + return utils.disown(this.external); + } + /** + * A service that forwards all requests to a specific remote server. Typically used to + * connect to a back-end server on your internal network. + * */ + get external() { + utils.testWhich("external", utils.getUint16(0, this), 3, this); + return utils.getStruct(1, ExternalServer, this); + } + _hasExternal() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initExternal() { + utils.setUint16(0, 3, this); + return utils.initStructAt(1, ExternalServer, this); + } + get _isExternal() { + return utils.getUint16(0, this) === 3; + } + set external(value) { + utils.setUint16(0, 3, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptDisk(value) { + utils.setUint16(0, 4, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownDisk() { + return utils.disown(this.disk); + } + /** + * An HTTP service backed by a directory on disk, supporting a basic HTTP GET/PUT. Generally + * not intended to be exposed directly to the internet; typically you want to bind this into + * a Worker that adds logic for setting Content-Type and the like. + * */ + get disk() { + utils.testWhich("disk", utils.getUint16(0, this), 4, this); + return utils.getStruct(1, DiskDirectory, this); + } + _hasDisk() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initDisk() { + utils.setUint16(0, 4, this); + return utils.initStructAt(1, DiskDirectory, this); + } + get _isDisk() { + return utils.getUint16(0, this) === 4; + } + set disk(value) { + utils.setUint16(0, 4, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + toString() { + return "Service_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var ServiceDesignator_Props_Which = { + EMPTY: 0, + JSON: 1 +}; +var ServiceDesignator_Props = class extends Struct { + static EMPTY = ServiceDesignator_Props_Which.EMPTY; + static JSON = ServiceDesignator_Props_Which.JSON; + static _capnp = { + displayName: "props", + id: "f0dc90173b494522", + size: new ObjectSize(8, 3) + }; + get _isEmpty() { + return utils.getUint16(0, this) === 0; + } + set empty(_) { + utils.setUint16(0, 0, this); + } + /** + * A JSON-encoded value. + * */ + get json() { + utils.testWhich("json", utils.getUint16(0, this), 1, this); + return utils.getText(2, this); + } + get _isJson() { + return utils.getUint16(0, this) === 1; + } + set json(value) { + utils.setUint16(0, 1, this); + utils.setText(2, value, this); + } + toString() { + return "ServiceDesignator_Props_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var ServiceDesignator = class extends Struct { + static _capnp = { + displayName: "ServiceDesignator", + id: "ae8ec91cee724450", + size: new ObjectSize(8, 3) + }; + /** + * Name of the service in the Config.services list. + * */ + get name() { + return utils.getText(0, this); + } + set name(value) { + utils.setText(0, value, this); + } + /** + * A modules-syntax Worker can export multiple named entrypoints. `export default {` specifies + * the default entrypoint, whereas `export let foo = {` defines an entrypoint named `foo`. If + * `entrypoint` is specified here, it names an alternate entrypoint to use on the target worker, + * otherwise the default is used. + * */ + get entrypoint() { + return utils.getText(1, this); + } + set entrypoint(value) { + utils.setText(1, value, this); + } + /** + * Value to provide in `ctx.props` in the target worker. + * */ + get props() { + return utils.getAs(ServiceDesignator_Props, this); + } + _initProps() { + return utils.getAs(ServiceDesignator_Props, this); + } + toString() { + return "ServiceDesignator_" + super.toString(); + } +}; +var Worker_Module_Which = { + ES_MODULE: 0, + COMMON_JS_MODULE: 1, + TEXT: 2, + DATA: 3, + WASM: 4, + JSON: 5, + NODE_JS_COMPAT_MODULE: 6, + PYTHON_MODULE: 7, + PYTHON_REQUIREMENT: 8 +}; +var Worker_Module = class extends Struct { + static ES_MODULE = Worker_Module_Which.ES_MODULE; + static COMMON_JS_MODULE = Worker_Module_Which.COMMON_JS_MODULE; + static TEXT = Worker_Module_Which.TEXT; + static DATA = Worker_Module_Which.DATA; + static WASM = Worker_Module_Which.WASM; + static JSON = Worker_Module_Which.JSON; + static NODE_JS_COMPAT_MODULE = Worker_Module_Which.NODE_JS_COMPAT_MODULE; + static PYTHON_MODULE = Worker_Module_Which.PYTHON_MODULE; + static PYTHON_REQUIREMENT = Worker_Module_Which.PYTHON_REQUIREMENT; + static _capnp = { + displayName: "Module", + id: "d9d87a63770a12f3", + size: new ObjectSize(8, 3) + }; + /** + * Name (or path) used to import the module. + * */ + get name() { + return utils.getText(0, this); + } + set name(value) { + utils.setText(0, value, this); + } + /** + * An ES module file with imports and exports. + * + * As with `serviceWorkerScript`, above, the value is the raw source code. + * */ + get esModule() { + utils.testWhich("esModule", utils.getUint16(0, this), 0, this); + return utils.getText(1, this); + } + get _isEsModule() { + return utils.getUint16(0, this) === 0; + } + set esModule(value) { + utils.setUint16(0, 0, this); + utils.setText(1, value, this); + } + /** + * A common JS module, using require(). + * */ + get commonJsModule() { + utils.testWhich("commonJsModule", utils.getUint16(0, this), 1, this); + return utils.getText(1, this); + } + get _isCommonJsModule() { + return utils.getUint16(0, this) === 1; + } + set commonJsModule(value) { + utils.setUint16(0, 1, this); + utils.setText(1, value, this); + } + /** + * A raw text blob. Importing this will produce a string with the value. + * */ + get text() { + utils.testWhich("text", utils.getUint16(0, this), 2, this); + return utils.getText(1, this); + } + get _isText() { + return utils.getUint16(0, this) === 2; + } + set text(value) { + utils.setUint16(0, 2, this); + utils.setText(1, value, this); + } + _adoptData(value) { + utils.setUint16(0, 3, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownData() { + return utils.disown(this.data); + } + /** + * A raw data blob. Importing this will produce an ArrayBuffer with the value. + * */ + get data() { + utils.testWhich("data", utils.getUint16(0, this), 3, this); + return utils.getData(1, this); + } + _hasData() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initData(length) { + utils.setUint16(0, 3, this); + return utils.initData(1, length, this); + } + get _isData() { + return utils.getUint16(0, this) === 3; + } + set data(value) { + utils.setUint16(0, 3, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptWasm(value) { + utils.setUint16(0, 4, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownWasm() { + return utils.disown(this.wasm); + } + /** + * A Wasm module. The value is a compiled binary Wasm module file. Importing this will produce + * a `WebAssembly.Module` object, which you can then instantiate. + * */ + get wasm() { + utils.testWhich("wasm", utils.getUint16(0, this), 4, this); + return utils.getData(1, this); + } + _hasWasm() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initWasm(length) { + utils.setUint16(0, 4, this); + return utils.initData(1, length, this); + } + get _isWasm() { + return utils.getUint16(0, this) === 4; + } + set wasm(value) { + utils.setUint16(0, 4, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + /** + * Importing this will produce the result of parsing the given text as JSON. + * */ + get json() { + utils.testWhich("json", utils.getUint16(0, this), 5, this); + return utils.getText(1, this); + } + get _isJson() { + return utils.getUint16(0, this) === 5; + } + set json(value) { + utils.setUint16(0, 5, this); + utils.setText(1, value, this); + } + /** + * A Node.js module is a specialization of a commonJsModule that: + * (a) allows for importing Node.js-compat built-ins without the node: specifier-prefix + * (b) exposes the subset of common Node.js globals such as process, Buffer, etc that + * we implement in the workerd runtime. + * */ + get nodeJsCompatModule() { + utils.testWhich( + "nodeJsCompatModule", + utils.getUint16(0, this), + 6, + this + ); + return utils.getText(1, this); + } + get _isNodeJsCompatModule() { + return utils.getUint16(0, this) === 6; + } + set nodeJsCompatModule(value) { + utils.setUint16(0, 6, this); + utils.setText(1, value, this); + } + /** + * A Python module. All bundles containing this value type are converted into a JS/WASM Worker + * Bundle prior to execution. + * */ + get pythonModule() { + utils.testWhich("pythonModule", utils.getUint16(0, this), 7, this); + return utils.getText(1, this); + } + get _isPythonModule() { + return utils.getUint16(0, this) === 7; + } + set pythonModule(value) { + utils.setUint16(0, 7, this); + utils.setText(1, value, this); + } + /** + * A Python package that is required by this bundle. The package must be supported by + * Pyodide (https://pyodide.org/en/stable/usage/packages-in-pyodide.html). All packages listed + * will be installed prior to the execution of the worker. + * */ + get pythonRequirement() { + utils.testWhich("pythonRequirement", utils.getUint16(0, this), 8, this); + return utils.getText(1, this); + } + get _isPythonRequirement() { + return utils.getUint16(0, this) === 8; + } + set pythonRequirement(value) { + utils.setUint16(0, 8, this); + utils.setText(1, value, this); + } + _adoptNamedExports(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownNamedExports() { + return utils.disown(this.namedExports); + } + /** + * For commonJsModule and nodeJsCompatModule, this is a list of named exports that the + * module expects to be exported once the evaluation is complete. + * */ + get namedExports() { + return utils.getList(2, TextList, this); + } + _hasNamedExports() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initNamedExports(length) { + return utils.initList(2, TextList, length, this); + } + set namedExports(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + toString() { + return "Worker_Module_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var Worker_Binding_Type_Which = { + UNSPECIFIED: 0, + TEXT: 1, + DATA: 2, + JSON: 3, + WASM: 4, + CRYPTO_KEY: 5, + SERVICE: 6, + DURABLE_OBJECT_NAMESPACE: 7, + KV_NAMESPACE: 8, + R2BUCKET: 9, + R2ADMIN: 10, + QUEUE: 11, + ANALYTICS_ENGINE: 12, + HYPERDRIVE: 13 +}; +var Worker_Binding_Type = class extends Struct { + static UNSPECIFIED = Worker_Binding_Type_Which.UNSPECIFIED; + static TEXT = Worker_Binding_Type_Which.TEXT; + static DATA = Worker_Binding_Type_Which.DATA; + static JSON = Worker_Binding_Type_Which.JSON; + static WASM = Worker_Binding_Type_Which.WASM; + static CRYPTO_KEY = Worker_Binding_Type_Which.CRYPTO_KEY; + static SERVICE = Worker_Binding_Type_Which.SERVICE; + static DURABLE_OBJECT_NAMESPACE = Worker_Binding_Type_Which.DURABLE_OBJECT_NAMESPACE; + static KV_NAMESPACE = Worker_Binding_Type_Which.KV_NAMESPACE; + static R2BUCKET = Worker_Binding_Type_Which.R2BUCKET; + static R2ADMIN = Worker_Binding_Type_Which.R2ADMIN; + static QUEUE = Worker_Binding_Type_Which.QUEUE; + static ANALYTICS_ENGINE = Worker_Binding_Type_Which.ANALYTICS_ENGINE; + static HYPERDRIVE = Worker_Binding_Type_Which.HYPERDRIVE; + static _capnp = { + displayName: "Type", + id: "8906a1296519bf8a", + size: new ObjectSize(8, 1) + }; + get _isUnspecified() { + return utils.getUint16(0, this) === 0; + } + set unspecified(_) { + utils.setUint16(0, 0, this); + } + get _isText() { + return utils.getUint16(0, this) === 1; + } + set text(_) { + utils.setUint16(0, 1, this); + } + get _isData() { + return utils.getUint16(0, this) === 2; + } + set data(_) { + utils.setUint16(0, 2, this); + } + get _isJson() { + return utils.getUint16(0, this) === 3; + } + set json(_) { + utils.setUint16(0, 3, this); + } + get _isWasm() { + return utils.getUint16(0, this) === 4; + } + set wasm(_) { + utils.setUint16(0, 4, this); + } + _adoptCryptoKey(value) { + utils.setUint16(0, 5, this); + utils.adopt(value, utils.getPointer(0, this)); + } + _disownCryptoKey() { + return utils.disown(this.cryptoKey); + } + get cryptoKey() { + utils.testWhich("cryptoKey", utils.getUint16(0, this), 5, this); + return utils.getList( + 0, + Uint16List, + this + ); + } + _hasCryptoKey() { + return !utils.isNull(utils.getPointer(0, this)); + } + _initCryptoKey(length) { + utils.setUint16(0, 5, this); + return utils.initList( + 0, + Uint16List, + length, + this + ); + } + get _isCryptoKey() { + return utils.getUint16(0, this) === 5; + } + set cryptoKey(value) { + utils.setUint16(0, 5, this); + utils.copyFrom(value, utils.getPointer(0, this)); + } + get _isService() { + return utils.getUint16(0, this) === 6; + } + set service(_) { + utils.setUint16(0, 6, this); + } + get _isDurableObjectNamespace() { + return utils.getUint16(0, this) === 7; + } + set durableObjectNamespace(_) { + utils.setUint16(0, 7, this); + } + get _isKvNamespace() { + return utils.getUint16(0, this) === 8; + } + set kvNamespace(_) { + utils.setUint16(0, 8, this); + } + get _isR2Bucket() { + return utils.getUint16(0, this) === 9; + } + set r2Bucket(_) { + utils.setUint16(0, 9, this); + } + get _isR2Admin() { + return utils.getUint16(0, this) === 10; + } + set r2Admin(_) { + utils.setUint16(0, 10, this); + } + get _isQueue() { + return utils.getUint16(0, this) === 11; + } + set queue(_) { + utils.setUint16(0, 11, this); + } + get _isAnalyticsEngine() { + return utils.getUint16(0, this) === 12; + } + set analyticsEngine(_) { + utils.setUint16(0, 12, this); + } + get _isHyperdrive() { + return utils.getUint16(0, this) === 13; + } + set hyperdrive(_) { + utils.setUint16(0, 13, this); + } + toString() { + return "Worker_Binding_Type_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var Worker_Binding_DurableObjectNamespaceDesignator = class extends Struct { + static _capnp = { + displayName: "DurableObjectNamespaceDesignator", + id: "804f144ff477aac7", + size: new ObjectSize(0, 2) + }; + /** + * Exported class name that implements the Durable Object. + * */ + get className() { + return utils.getText(0, this); + } + set className(value) { + utils.setText(0, value, this); + } + /** + * The service name of the worker that defines this class. If omitted, the current worker + * is assumed. + * + * Use of this field is discouraged. Instead, when accessing a different Worker's Durable + * Objects, specify a `service` binding to that worker, and have the worker implement an + * appropriate API. + * + * (This is intentionally not a ServiceDesignator because you cannot choose an alternate + * entrypoint here; the class name IS the entrypoint.) + * */ + get serviceName() { + return utils.getText(1, this); + } + set serviceName(value) { + utils.setText(1, value, this); + } + toString() { + return "Worker_Binding_DurableObjectNamespaceDesignator_" + super.toString(); + } +}; +var Worker_Binding_CryptoKey_Usage = { + ENCRYPT: 0, + DECRYPT: 1, + SIGN: 2, + VERIFY: 3, + DERIVE_KEY: 4, + DERIVE_BITS: 5, + WRAP_KEY: 6, + UNWRAP_KEY: 7 +}; +var Worker_Binding_CryptoKey_Algorithm_Which = { + NAME: 0, + JSON: 1 +}; +var Worker_Binding_CryptoKey_Algorithm = class extends Struct { + static NAME = Worker_Binding_CryptoKey_Algorithm_Which.NAME; + static JSON = Worker_Binding_CryptoKey_Algorithm_Which.JSON; + static _capnp = { + displayName: "algorithm", + id: "a1a040c5e00d7021", + size: new ObjectSize(8, 3) + }; + /** + * Just a name, like `AES-GCM`. + * */ + get name() { + utils.testWhich("name", utils.getUint16(2, this), 0, this); + return utils.getText(1, this); + } + get _isName() { + return utils.getUint16(2, this) === 0; + } + set name(value) { + utils.setUint16(2, 0, this); + utils.setText(1, value, this); + } + /** + * An object, encoded here as JSON. + * */ + get json() { + utils.testWhich("json", utils.getUint16(2, this), 1, this); + return utils.getText(1, this); + } + get _isJson() { + return utils.getUint16(2, this) === 1; + } + set json(value) { + utils.setUint16(2, 1, this); + utils.setText(1, value, this); + } + toString() { + return "Worker_Binding_CryptoKey_Algorithm_" + super.toString(); + } + which() { + return utils.getUint16( + 2, + this + ); + } +}; +var Worker_Binding_CryptoKey_Which = { + RAW: 0, + HEX: 1, + BASE64: 2, + PKCS8: 3, + SPKI: 4, + JWK: 5 +}; +var Worker_Binding_CryptoKey = class _Worker_Binding_CryptoKey extends Struct { + static RAW = Worker_Binding_CryptoKey_Which.RAW; + static HEX = Worker_Binding_CryptoKey_Which.HEX; + static BASE64 = Worker_Binding_CryptoKey_Which.BASE64; + static PKCS8 = Worker_Binding_CryptoKey_Which.PKCS8; + static SPKI = Worker_Binding_CryptoKey_Which.SPKI; + static JWK = Worker_Binding_CryptoKey_Which.JWK; + static Usage = Worker_Binding_CryptoKey_Usage; + static _capnp = { + displayName: "CryptoKey", + id: "b5e1bff0e57d6eb0", + size: new ObjectSize(8, 3), + defaultExtractable: getBitMask(false, 0) + }; + _adoptRaw(value) { + utils.setUint16(0, 0, this); + utils.adopt(value, utils.getPointer(0, this)); + } + _disownRaw() { + return utils.disown(this.raw); + } + get raw() { + utils.testWhich("raw", utils.getUint16(0, this), 0, this); + return utils.getData(0, this); + } + _hasRaw() { + return !utils.isNull(utils.getPointer(0, this)); + } + _initRaw(length) { + utils.setUint16(0, 0, this); + return utils.initData(0, length, this); + } + get _isRaw() { + return utils.getUint16(0, this) === 0; + } + set raw(value) { + utils.setUint16(0, 0, this); + utils.copyFrom(value, utils.getPointer(0, this)); + } + get hex() { + utils.testWhich("hex", utils.getUint16(0, this), 1, this); + return utils.getText(0, this); + } + get _isHex() { + return utils.getUint16(0, this) === 1; + } + set hex(value) { + utils.setUint16(0, 1, this); + utils.setText(0, value, this); + } + /** + * Raw key material, possibly hex or base64-encoded. Use this for symmetric keys. + * + * Hint: `raw` would typically be used with Cap'n Proto's `embed` syntax to embed an + * external binary key file. `hex` or `base64` could do that too but can also be specified + * inline. + * */ + get base64() { + utils.testWhich("base64", utils.getUint16(0, this), 2, this); + return utils.getText(0, this); + } + get _isBase64() { + return utils.getUint16(0, this) === 2; + } + set base64(value) { + utils.setUint16(0, 2, this); + utils.setText(0, value, this); + } + /** + * Private key in PEM-encoded PKCS#8 format. + * */ + get pkcs8() { + utils.testWhich("pkcs8", utils.getUint16(0, this), 3, this); + return utils.getText(0, this); + } + get _isPkcs8() { + return utils.getUint16(0, this) === 3; + } + set pkcs8(value) { + utils.setUint16(0, 3, this); + utils.setText(0, value, this); + } + /** + * Public key in PEM-encoded SPKI format. + * */ + get spki() { + utils.testWhich("spki", utils.getUint16(0, this), 4, this); + return utils.getText(0, this); + } + get _isSpki() { + return utils.getUint16(0, this) === 4; + } + set spki(value) { + utils.setUint16(0, 4, this); + utils.setText(0, value, this); + } + /** + * Key in JSON format. + * */ + get jwk() { + utils.testWhich("jwk", utils.getUint16(0, this), 5, this); + return utils.getText(0, this); + } + get _isJwk() { + return utils.getUint16(0, this) === 5; + } + set jwk(value) { + utils.setUint16(0, 5, this); + utils.setText(0, value, this); + } + /** + * Value for the `algorithm` parameter. + * */ + get algorithm() { + return utils.getAs(Worker_Binding_CryptoKey_Algorithm, this); + } + _initAlgorithm() { + return utils.getAs(Worker_Binding_CryptoKey_Algorithm, this); + } + /** + * Is the Worker allowed to export this key to obtain the underlying key material? Setting + * this false ensures that the key cannot be leaked by errant JavaScript code; the key can + * only be used in WebCrypto operations. + * */ + get extractable() { + return utils.getBit( + 32, + this, + _Worker_Binding_CryptoKey._capnp.defaultExtractable + ); + } + set extractable(value) { + utils.setBit( + 32, + value, + this, + _Worker_Binding_CryptoKey._capnp.defaultExtractable + ); + } + _adoptUsages(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownUsages() { + return utils.disown(this.usages); + } + /** + * What operations is this key permitted to be used for? + * */ + get usages() { + return utils.getList( + 2, + Uint16List, + this + ); + } + _hasUsages() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initUsages(length) { + return utils.initList( + 2, + Uint16List, + length, + this + ); + } + set usages(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + toString() { + return "Worker_Binding_CryptoKey_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var Worker_Binding_MemoryCacheLimits = class extends Struct { + static _capnp = { + displayName: "MemoryCacheLimits", + id: "8d66725b0867e634", + size: new ObjectSize(16, 0) + }; + get maxKeys() { + return utils.getUint32(0, this); + } + set maxKeys(value) { + utils.setUint32(0, value, this); + } + get maxValueSize() { + return utils.getUint32(4, this); + } + set maxValueSize(value) { + utils.setUint32(4, value, this); + } + get maxTotalValueSize() { + return utils.getUint64(8, this); + } + set maxTotalValueSize(value) { + utils.setUint64(8, value, this); + } + toString() { + return "Worker_Binding_MemoryCacheLimits_" + super.toString(); + } +}; +var Worker_Binding_WrappedBinding = class _Worker_Binding_WrappedBinding extends Struct { + static _capnp = { + displayName: "WrappedBinding", + id: "e6f066b75f0ea113", + size: new ObjectSize(0, 3), + defaultEntrypoint: "default" + }; + static _InnerBindings; + /** + * Wrapper module name. + * The module must be an internal one (provided by extension or registered in the c++ code). + * Module will be instantitated during binding initialization phase. + * */ + get moduleName() { + return utils.getText(0, this); + } + set moduleName(value) { + utils.setText(0, value, this); + } + /** + * Module needs to export a function with a given name (default export gets "default" name). + * The function needs to accept a single `env` argument - a dictionary with inner bindings. + * Function will be invoked during initialization phase and its return value will be used as + * resulting binding value. + * */ + get entrypoint() { + return utils.getText( + 1, + this, + _Worker_Binding_WrappedBinding._capnp.defaultEntrypoint + ); + } + set entrypoint(value) { + utils.setText(1, value, this); + } + _adoptInnerBindings(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownInnerBindings() { + return utils.disown(this.innerBindings); + } + /** + * Inner bindings that will be created and passed in the env dictionary. + * These bindings shall be used to implement end-user api, and are not available to the + * binding consumers unless "re-exported" in wrapBindings function. + * */ + get innerBindings() { + return utils.getList( + 2, + _Worker_Binding_WrappedBinding._InnerBindings, + this + ); + } + _hasInnerBindings() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initInnerBindings(length) { + return utils.initList( + 2, + _Worker_Binding_WrappedBinding._InnerBindings, + length, + this + ); + } + set innerBindings(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + toString() { + return "Worker_Binding_WrappedBinding_" + super.toString(); + } +}; +var Worker_Binding_Parameter = class extends Struct { + static _capnp = { + displayName: "parameter", + id: "dc57e1258d26d152", + size: new ObjectSize(8, 6) + }; + _adoptType(value) { + utils.adopt(value, utils.getPointer(1, this)); + } + _disownType() { + return utils.disown(this.type); + } + /** + * Expected type of this parameter. + * */ + get type() { + return utils.getStruct(1, Worker_Binding_Type, this); + } + _hasType() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initType() { + return utils.initStructAt(1, Worker_Binding_Type, this); + } + set type(value) { + utils.copyFrom(value, utils.getPointer(1, this)); + } + /** + * If true, this binding is optional. Derived workers need not specify it, in which case + * the binding won't be present in the environment object passed to the worker. + * + * When a Worker has any non-optional parameters that haven't been filled in, then it can + * only be used for inheritance; it cannot be invoked directly. + * */ + get optional() { + return utils.getBit(16, this); + } + set optional(value) { + utils.setBit(16, value, this); + } + toString() { + return "Worker_Binding_Parameter_" + super.toString(); + } +}; +var Worker_Binding_Hyperdrive = class extends Struct { + static _capnp = { + displayName: "hyperdrive", + id: "ad6c391cd55f3134", + size: new ObjectSize(8, 6) + }; + _adoptDesignator(value) { + utils.adopt(value, utils.getPointer(1, this)); + } + _disownDesignator() { + return utils.disown(this.designator); + } + get designator() { + return utils.getStruct(1, ServiceDesignator, this); + } + _hasDesignator() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initDesignator() { + return utils.initStructAt(1, ServiceDesignator, this); + } + set designator(value) { + utils.copyFrom(value, utils.getPointer(1, this)); + } + get database() { + return utils.getText(2, this); + } + set database(value) { + utils.setText(2, value, this); + } + get user() { + return utils.getText(3, this); + } + set user(value) { + utils.setText(3, value, this); + } + get password() { + return utils.getText(4, this); + } + set password(value) { + utils.setText(4, value, this); + } + get scheme() { + return utils.getText(5, this); + } + set scheme(value) { + utils.setText(5, value, this); + } + toString() { + return "Worker_Binding_Hyperdrive_" + super.toString(); + } +}; +var Worker_Binding_MemoryCache = class extends Struct { + static _capnp = { + displayName: "memoryCache", + id: "aed5760c349869da", + size: new ObjectSize(8, 6) + }; + /** + * The identifier associated with this cache. Any number of isolates + * can access the same in-memory cache (within the same process), and + * each worker may use any number of in-memory caches. + * */ + get id() { + return utils.getText(1, this); + } + set id(value) { + utils.setText(1, value, this); + } + _adoptLimits(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownLimits() { + return utils.disown(this.limits); + } + get limits() { + return utils.getStruct(2, Worker_Binding_MemoryCacheLimits, this); + } + _hasLimits() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initLimits() { + return utils.initStructAt(2, Worker_Binding_MemoryCacheLimits, this); + } + set limits(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + toString() { + return "Worker_Binding_MemoryCache_" + super.toString(); + } +}; +var Worker_Binding_Which = { + UNSPECIFIED: 0, + PARAMETER: 1, + TEXT: 2, + DATA: 3, + JSON: 4, + WASM_MODULE: 5, + CRYPTO_KEY: 6, + SERVICE: 7, + DURABLE_OBJECT_NAMESPACE: 8, + KV_NAMESPACE: 9, + R2BUCKET: 10, + R2ADMIN: 11, + WRAPPED: 12, + QUEUE: 13, + FROM_ENVIRONMENT: 14, + ANALYTICS_ENGINE: 15, + HYPERDRIVE: 16, + UNSAFE_EVAL: 17, + MEMORY_CACHE: 18 +}; +var Worker_Binding = class extends Struct { + static UNSPECIFIED = Worker_Binding_Which.UNSPECIFIED; + static PARAMETER = Worker_Binding_Which.PARAMETER; + static TEXT = Worker_Binding_Which.TEXT; + static DATA = Worker_Binding_Which.DATA; + static JSON = Worker_Binding_Which.JSON; + static WASM_MODULE = Worker_Binding_Which.WASM_MODULE; + static CRYPTO_KEY = Worker_Binding_Which.CRYPTO_KEY; + static SERVICE = Worker_Binding_Which.SERVICE; + static DURABLE_OBJECT_NAMESPACE = Worker_Binding_Which.DURABLE_OBJECT_NAMESPACE; + static KV_NAMESPACE = Worker_Binding_Which.KV_NAMESPACE; + static R2BUCKET = Worker_Binding_Which.R2BUCKET; + static R2ADMIN = Worker_Binding_Which.R2ADMIN; + static WRAPPED = Worker_Binding_Which.WRAPPED; + static QUEUE = Worker_Binding_Which.QUEUE; + static FROM_ENVIRONMENT = Worker_Binding_Which.FROM_ENVIRONMENT; + static ANALYTICS_ENGINE = Worker_Binding_Which.ANALYTICS_ENGINE; + static HYPERDRIVE = Worker_Binding_Which.HYPERDRIVE; + static UNSAFE_EVAL = Worker_Binding_Which.UNSAFE_EVAL; + static MEMORY_CACHE = Worker_Binding_Which.MEMORY_CACHE; + static Type = Worker_Binding_Type; + static DurableObjectNamespaceDesignator = Worker_Binding_DurableObjectNamespaceDesignator; + static CryptoKey = Worker_Binding_CryptoKey; + static MemoryCacheLimits = Worker_Binding_MemoryCacheLimits; + static WrappedBinding = Worker_Binding_WrappedBinding; + static _capnp = { + displayName: "Binding", + id: "8e7e492fd7e35f3e", + size: new ObjectSize(8, 6) + }; + get name() { + return utils.getText(0, this); + } + set name(value) { + utils.setText(0, value, this); + } + get _isUnspecified() { + return utils.getUint16(0, this) === 0; + } + set unspecified(_) { + utils.setUint16(0, 0, this); + } + /** + * Indicates that the Worker requires a binding of the given type, but it won't be specified + * here. Another Worker can inherit this Worker and fill in this binding. + * */ + get parameter() { + utils.testWhich("parameter", utils.getUint16(0, this), 1, this); + return utils.getAs(Worker_Binding_Parameter, this); + } + _initParameter() { + utils.setUint16(0, 1, this); + return utils.getAs(Worker_Binding_Parameter, this); + } + get _isParameter() { + return utils.getUint16(0, this) === 1; + } + set parameter(_) { + utils.setUint16(0, 1, this); + } + /** + * A string. + * */ + get text() { + utils.testWhich("text", utils.getUint16(0, this), 2, this); + return utils.getText(1, this); + } + get _isText() { + return utils.getUint16(0, this) === 2; + } + set text(value) { + utils.setUint16(0, 2, this); + utils.setText(1, value, this); + } + _adoptData(value) { + utils.setUint16(0, 3, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownData() { + return utils.disown(this.data); + } + /** + * An ArrayBuffer. + * */ + get data() { + utils.testWhich("data", utils.getUint16(0, this), 3, this); + return utils.getData(1, this); + } + _hasData() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initData(length) { + utils.setUint16(0, 3, this); + return utils.initData(1, length, this); + } + get _isData() { + return utils.getUint16(0, this) === 3; + } + set data(value) { + utils.setUint16(0, 3, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + /** + * A value parsed from JSON. + * */ + get json() { + utils.testWhich("json", utils.getUint16(0, this), 4, this); + return utils.getText(1, this); + } + get _isJson() { + return utils.getUint16(0, this) === 4; + } + set json(value) { + utils.setUint16(0, 4, this); + utils.setText(1, value, this); + } + _adoptWasmModule(value) { + utils.setUint16(0, 5, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownWasmModule() { + return utils.disown(this.wasmModule); + } + /** + * A WebAssembly module. The binding will be an instance of `WebAssembly.Module`. Only + * supported when using Service Workers syntax. + * + * DEPRECATED: Please switch to ES modules syntax instead, and embed Wasm modules as modules. + * */ + get wasmModule() { + utils.testWhich("wasmModule", utils.getUint16(0, this), 5, this); + return utils.getData(1, this); + } + _hasWasmModule() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initWasmModule(length) { + utils.setUint16(0, 5, this); + return utils.initData(1, length, this); + } + get _isWasmModule() { + return utils.getUint16(0, this) === 5; + } + set wasmModule(value) { + utils.setUint16(0, 5, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptCryptoKey(value) { + utils.setUint16(0, 6, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownCryptoKey() { + return utils.disown(this.cryptoKey); + } + /** + * A CryptoKey instance, for use with the WebCrypto API. + * + * Note that by setting `extractable = false`, you can prevent the Worker code from accessing + * or leaking the raw key material; it will only be able to use the key to perform WebCrypto + * operations. + * */ + get cryptoKey() { + utils.testWhich("cryptoKey", utils.getUint16(0, this), 6, this); + return utils.getStruct(1, Worker_Binding_CryptoKey, this); + } + _hasCryptoKey() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initCryptoKey() { + utils.setUint16(0, 6, this); + return utils.initStructAt(1, Worker_Binding_CryptoKey, this); + } + get _isCryptoKey() { + return utils.getUint16(0, this) === 6; + } + set cryptoKey(value) { + utils.setUint16(0, 6, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptService(value) { + utils.setUint16(0, 7, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownService() { + return utils.disown(this.service); + } + /** + * Binding to a named service (possibly, a worker). + * */ + get service() { + utils.testWhich("service", utils.getUint16(0, this), 7, this); + return utils.getStruct(1, ServiceDesignator, this); + } + _hasService() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initService() { + utils.setUint16(0, 7, this); + return utils.initStructAt(1, ServiceDesignator, this); + } + get _isService() { + return utils.getUint16(0, this) === 7; + } + set service(value) { + utils.setUint16(0, 7, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptDurableObjectNamespace(value) { + utils.setUint16(0, 8, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownDurableObjectNamespace() { + return utils.disown(this.durableObjectNamespace); + } + /** + * Binding to the durable object namespace implemented by the given class. + * + * In the common case that this refers to a class in the same Worker, you can specify just + * a string, like: + * + * durableObjectNamespace = "MyClass" + * */ + get durableObjectNamespace() { + utils.testWhich( + "durableObjectNamespace", + utils.getUint16(0, this), + 8, + this + ); + return utils.getStruct( + 1, + Worker_Binding_DurableObjectNamespaceDesignator, + this + ); + } + _hasDurableObjectNamespace() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initDurableObjectNamespace() { + utils.setUint16(0, 8, this); + return utils.initStructAt( + 1, + Worker_Binding_DurableObjectNamespaceDesignator, + this + ); + } + get _isDurableObjectNamespace() { + return utils.getUint16(0, this) === 8; + } + set durableObjectNamespace(value) { + utils.setUint16(0, 8, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptKvNamespace(value) { + utils.setUint16(0, 9, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownKvNamespace() { + return utils.disown(this.kvNamespace); + } + /** + * A KV namespace, implemented by the named service. The Worker sees a KvNamespace-typed + * binding. Requests to the namespace will be converted into HTTP requests targeting the + * given service name. + * */ + get kvNamespace() { + utils.testWhich("kvNamespace", utils.getUint16(0, this), 9, this); + return utils.getStruct(1, ServiceDesignator, this); + } + _hasKvNamespace() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initKvNamespace() { + utils.setUint16(0, 9, this); + return utils.initStructAt(1, ServiceDesignator, this); + } + get _isKvNamespace() { + return utils.getUint16(0, this) === 9; + } + set kvNamespace(value) { + utils.setUint16(0, 9, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptR2Bucket(value) { + utils.setUint16(0, 10, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownR2Bucket() { + return utils.disown(this.r2Bucket); + } + get r2Bucket() { + utils.testWhich("r2Bucket", utils.getUint16(0, this), 10, this); + return utils.getStruct(1, ServiceDesignator, this); + } + _hasR2Bucket() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initR2Bucket() { + utils.setUint16(0, 10, this); + return utils.initStructAt(1, ServiceDesignator, this); + } + get _isR2Bucket() { + return utils.getUint16(0, this) === 10; + } + set r2Bucket(value) { + utils.setUint16(0, 10, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptR2Admin(value) { + utils.setUint16(0, 11, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownR2Admin() { + return utils.disown(this.r2Admin); + } + /** + * R2 bucket and admin API bindings. Similar to KV namespaces, these turn operations into + * HTTP requests aimed at the named service. + * */ + get r2Admin() { + utils.testWhich("r2Admin", utils.getUint16(0, this), 11, this); + return utils.getStruct(1, ServiceDesignator, this); + } + _hasR2Admin() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initR2Admin() { + utils.setUint16(0, 11, this); + return utils.initStructAt(1, ServiceDesignator, this); + } + get _isR2Admin() { + return utils.getUint16(0, this) === 11; + } + set r2Admin(value) { + utils.setUint16(0, 11, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptWrapped(value) { + utils.setUint16(0, 12, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownWrapped() { + return utils.disown(this.wrapped); + } + /** + * Wraps a collection of inner bindings in a common api functionality. + * */ + get wrapped() { + utils.testWhich("wrapped", utils.getUint16(0, this), 12, this); + return utils.getStruct(1, Worker_Binding_WrappedBinding, this); + } + _hasWrapped() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initWrapped() { + utils.setUint16(0, 12, this); + return utils.initStructAt(1, Worker_Binding_WrappedBinding, this); + } + get _isWrapped() { + return utils.getUint16(0, this) === 12; + } + set wrapped(value) { + utils.setUint16(0, 12, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptQueue(value) { + utils.setUint16(0, 13, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownQueue() { + return utils.disown(this.queue); + } + /** + * A Queue binding, implemented by the named service. Requests to the + * namespace will be converted into HTTP requests targeting the given + * service name. + * */ + get queue() { + utils.testWhich("queue", utils.getUint16(0, this), 13, this); + return utils.getStruct(1, ServiceDesignator, this); + } + _hasQueue() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initQueue() { + utils.setUint16(0, 13, this); + return utils.initStructAt(1, ServiceDesignator, this); + } + get _isQueue() { + return utils.getUint16(0, this) === 13; + } + set queue(value) { + utils.setUint16(0, 13, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + /** + * Takes the value of an environment variable from the system. The value specified here is + * the name of a system environment variable. The value of the binding is obtained by invoking + * `getenv()` with that name. If the environment variable isn't set, the binding value is + * `null`. + * */ + get fromEnvironment() { + utils.testWhich("fromEnvironment", utils.getUint16(0, this), 14, this); + return utils.getText(1, this); + } + get _isFromEnvironment() { + return utils.getUint16(0, this) === 14; + } + set fromEnvironment(value) { + utils.setUint16(0, 14, this); + utils.setText(1, value, this); + } + _adoptAnalyticsEngine(value) { + utils.setUint16(0, 15, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownAnalyticsEngine() { + return utils.disown(this.analyticsEngine); + } + /** + * A binding for Analytics Engine. Allows workers to store information through Analytics Engine Events. + * workerd will forward AnalyticsEngineEvents to designated service in the body of HTTP requests + * This binding is subject to change and requires the `--experimental` flag + * */ + get analyticsEngine() { + utils.testWhich("analyticsEngine", utils.getUint16(0, this), 15, this); + return utils.getStruct(1, ServiceDesignator, this); + } + _hasAnalyticsEngine() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initAnalyticsEngine() { + utils.setUint16(0, 15, this); + return utils.initStructAt(1, ServiceDesignator, this); + } + get _isAnalyticsEngine() { + return utils.getUint16(0, this) === 15; + } + set analyticsEngine(value) { + utils.setUint16(0, 15, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + /** + * A binding for Hyperdrive. Allows workers to use Hyperdrive caching & pooling for Postgres + * databases. + * */ + get hyperdrive() { + utils.testWhich("hyperdrive", utils.getUint16(0, this), 16, this); + return utils.getAs(Worker_Binding_Hyperdrive, this); + } + _initHyperdrive() { + utils.setUint16(0, 16, this); + return utils.getAs(Worker_Binding_Hyperdrive, this); + } + get _isHyperdrive() { + return utils.getUint16(0, this) === 16; + } + set hyperdrive(_) { + utils.setUint16(0, 16, this); + } + get _isUnsafeEval() { + return utils.getUint16(0, this) === 17; + } + set unsafeEval(_) { + utils.setUint16(0, 17, this); + } + /** + * A binding representing access to an in-memory cache. + * */ + get memoryCache() { + utils.testWhich("memoryCache", utils.getUint16(0, this), 18, this); + return utils.getAs(Worker_Binding_MemoryCache, this); + } + _initMemoryCache() { + utils.setUint16(0, 18, this); + return utils.getAs(Worker_Binding_MemoryCache, this); + } + get _isMemoryCache() { + return utils.getUint16(0, this) === 18; + } + set memoryCache(_) { + utils.setUint16(0, 18, this); + } + toString() { + return "Worker_Binding_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var Worker_DurableObjectNamespace_Which = { + UNIQUE_KEY: 0, + EPHEMERAL_LOCAL: 1 +}; +var Worker_DurableObjectNamespace = class extends Struct { + static UNIQUE_KEY = Worker_DurableObjectNamespace_Which.UNIQUE_KEY; + static EPHEMERAL_LOCAL = Worker_DurableObjectNamespace_Which.EPHEMERAL_LOCAL; + static _capnp = { + displayName: "DurableObjectNamespace", + id: "b429dd547d15747d", + size: new ObjectSize(8, 2) + }; + /** + * Exported class name that implements the Durable Object. + * + * Changing the class name will not break compatibility with existing storage, so long as + * `uniqueKey` stays the same. + * */ + get className() { + return utils.getText(0, this); + } + set className(value) { + utils.setText(0, value, this); + } + /** + * A unique, stable ID associated with this namespace. This could be a GUID, or any other + * string which does not appear anywhere else in the world. + * + * This string is used to ensure that objects of this class have unique identifiers distinct + * from objects of any other class. Object IDs are cryptographically derived from `uniqueKey` + * and validated against it. It is impossible to guess or forge a valid object ID without + * knowing the `uniqueKey`. Hence, if you keep the key secret, you can prevent anyone from + * forging IDs. However, if you don't care if users can forge valid IDs, then it's not a big + * deal if the key leaks. + * + * DO NOT LOSE this key, otherwise it may be difficult or impossible to recover stored data. + * */ + get uniqueKey() { + utils.testWhich("uniqueKey", utils.getUint16(0, this), 0, this); + return utils.getText(1, this); + } + get _isUniqueKey() { + return utils.getUint16(0, this) === 0; + } + set uniqueKey(value) { + utils.setUint16(0, 0, this); + utils.setText(1, value, this); + } + get _isEphemeralLocal() { + return utils.getUint16(0, this) === 1; + } + set ephemeralLocal(_) { + utils.setUint16(0, 1, this); + } + /** + * By default, Durable Objects are evicted after 10 seconds of inactivity, and expire 70 seconds + * after all clients have disconnected. Some applications may want to keep their Durable Objects + * pinned to memory forever, so we provide this flag to change the default behavior. + * + * Note that this is only supported in Workerd; production Durable Objects cannot toggle eviction. + * */ + get preventEviction() { + return utils.getBit(16, this); + } + set preventEviction(value) { + utils.setBit(16, value, this); + } + /** + * Whether or not Durable Objects in this namespace can use the `storage.sql` API to execute SQL + * queries. + * + * workerd uses SQLite to back all Durable Objects, but the SQL API is hidden by default to + * emulate behavior of traditional DO namespaces on Cloudflare that aren't SQLite-backed. This + * flag should be enabled when testing code that will run on a SQLite-backed namespace. + * */ + get enableSql() { + return utils.getBit(17, this); + } + set enableSql(value) { + utils.setBit(17, value, this); + } + toString() { + return "Worker_DurableObjectNamespace_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var Worker_DurableObjectStorage_Which = { + NONE: 0, + IN_MEMORY: 1, + LOCAL_DISK: 2 +}; +var Worker_DurableObjectStorage = class extends Struct { + static NONE = Worker_DurableObjectStorage_Which.NONE; + static IN_MEMORY = Worker_DurableObjectStorage_Which.IN_MEMORY; + static LOCAL_DISK = Worker_DurableObjectStorage_Which.LOCAL_DISK; + static _capnp = { + displayName: "durableObjectStorage", + id: "cc72b3faa57827d4", + size: new ObjectSize(8, 11) + }; + get _isNone() { + return utils.getUint16(2, this) === 0; + } + set none(_) { + utils.setUint16(2, 0, this); + } + get _isInMemory() { + return utils.getUint16(2, this) === 1; + } + set inMemory(_) { + utils.setUint16(2, 1, this); + } + /** + * ** EXPERIMENTAL; SUBJECT TO BACKWARDS-INCOMPATIBLE CHANGE ** + * + * Durable Object data will be stored in a directory on local disk. This field is the name of + * a service, which must be a DiskDirectory service. For each Durable Object class, a + * subdirectory will be created using `uniqueKey` as the name. Within the directory, one or + * more files are created for each object, with names `.`, where `.` may be any of + * a number of different extensions depending on the storage mode. (Currently, the main storage + * is a file with the extension `.sqlite`, and in certain situations extra files with the + * extensions `.sqlite-wal`, and `.sqlite-shm` may also be present.) + * */ + get localDisk() { + utils.testWhich("localDisk", utils.getUint16(2, this), 2, this); + return utils.getText(8, this); + } + get _isLocalDisk() { + return utils.getUint16(2, this) === 2; + } + set localDisk(value) { + utils.setUint16(2, 2, this); + utils.setText(8, value, this); + } + toString() { + return "Worker_DurableObjectStorage_" + super.toString(); + } + which() { + return utils.getUint16(2, this); + } +}; +var Worker_Which = { + MODULES: 0, + SERVICE_WORKER_SCRIPT: 1, + INHERIT: 2 +}; +var Worker = class _Worker extends Struct { + static MODULES = Worker_Which.MODULES; + static SERVICE_WORKER_SCRIPT = Worker_Which.SERVICE_WORKER_SCRIPT; + static INHERIT = Worker_Which.INHERIT; + static Module = Worker_Module; + static Binding = Worker_Binding; + static DurableObjectNamespace = Worker_DurableObjectNamespace; + static _capnp = { + displayName: "Worker", + id: "acfa77e88fd97d1c", + size: new ObjectSize(8, 11), + defaultGlobalOutbound: readRawPointer( + new Uint8Array([ + 16, + 7, + 80, + 1, + 3, + 0, + 0, + 17, + 9, + 74, + 0, + 1, + 255, + 105, + 110, + 116, + 101, + 114, + 110, + 101, + 116, + 0, + 0, + 0 + ]).buffer + ) + }; + static _Modules; + static _Bindings; + static _DurableObjectNamespaces; + static _Tails; + _adoptModules(value) { + utils.setUint16(0, 0, this); + utils.adopt(value, utils.getPointer(0, this)); + } + _disownModules() { + return utils.disown(this.modules); + } + /** + * The Worker is composed of ES modules that may import each other. The first module in the list + * is the main module, which exports event handlers. + * */ + get modules() { + utils.testWhich("modules", utils.getUint16(0, this), 0, this); + return utils.getList(0, _Worker._Modules, this); + } + _hasModules() { + return !utils.isNull(utils.getPointer(0, this)); + } + _initModules(length) { + utils.setUint16(0, 0, this); + return utils.initList(0, _Worker._Modules, length, this); + } + get _isModules() { + return utils.getUint16(0, this) === 0; + } + set modules(value) { + utils.setUint16(0, 0, this); + utils.copyFrom(value, utils.getPointer(0, this)); + } + /** + * The Worker is composed of one big script that uses global `addEventListener()` to register + * event handlers. + * + * The value of this field is the raw source code. When using Cap'n Proto text format, use the + * `embed` directive to read the code from an external file: + * + * serviceWorkerScript = embed "worker.js" + * */ + get serviceWorkerScript() { + utils.testWhich( + "serviceWorkerScript", + utils.getUint16(0, this), + 1, + this + ); + return utils.getText(0, this); + } + get _isServiceWorkerScript() { + return utils.getUint16(0, this) === 1; + } + set serviceWorkerScript(value) { + utils.setUint16(0, 1, this); + utils.setText(0, value, this); + } + /** + * Inherit the configuration of some other Worker by its service name. This Worker is a clone + * of the other worker, but various settings can be modified: + * * `bindings`, if specified, overrides specific named bindings. (Each binding listed in the + * derived worker must match the name and type of some binding in the inherited worker.) + * * `globalOutbound`, if non-null, overrides the one specified in the inherited worker. + * * `compatibilityDate` and `compatibilityFlags` CANNOT be modified; they must be null. + * * If the inherited worker defines durable object namespaces, then the derived worker must + * specify `durableObjectStorage` to specify where its instances should be stored. Each + * devived worker receives its own namespace of objects. `durableObjectUniqueKeyModifier` + * must also be specified by derived workers. + * + * This can be useful when you want to run the same Worker in multiple configurations or hooked + * up to different back-ends. Note that all derived workers run in the same isolate as the + * base worker; they differ in the content of the `env` object passed to them, which contains + * the bindings. (When using service workers syntax, the global scope contains the bindings; + * in this case each derived worker runs in its own global scope, though still in the same + * isolate.) + * */ + get inherit() { + utils.testWhich("inherit", utils.getUint16(0, this), 2, this); + return utils.getText(0, this); + } + get _isInherit() { + return utils.getUint16(0, this) === 2; + } + set inherit(value) { + utils.setUint16(0, 2, this); + utils.setText(0, value, this); + } + get compatibilityDate() { + return utils.getText(1, this); + } + set compatibilityDate(value) { + utils.setText(1, value, this); + } + _adoptCompatibilityFlags(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownCompatibilityFlags() { + return utils.disown(this.compatibilityFlags); + } + /** + * See: https://developers.cloudflare.com/workers/platform/compatibility-dates/ + * + * `compatibilityDate` must be specified, unless the Worker inhits from another worker, in which + * case it must not be specified. `compatibilityFlags` can optionally be specified when + * `compatibilityDate` is specified. + * */ + get compatibilityFlags() { + return utils.getList(2, TextList, this); + } + _hasCompatibilityFlags() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initCompatibilityFlags(length) { + return utils.initList(2, TextList, length, this); + } + set compatibilityFlags(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + _adoptBindings(value) { + utils.adopt(value, utils.getPointer(3, this)); + } + _disownBindings() { + return utils.disown(this.bindings); + } + /** + * List of bindings, which give the Worker access to external resources and configuration + * settings. + * + * For Workers using ES modules syntax, the bindings are delivered via the `env` object. For + * service workers syntax, each binding shows up as a global variable. + * */ + get bindings() { + return utils.getList(3, _Worker._Bindings, this); + } + _hasBindings() { + return !utils.isNull(utils.getPointer(3, this)); + } + _initBindings(length) { + return utils.initList(3, _Worker._Bindings, length, this); + } + set bindings(value) { + utils.copyFrom(value, utils.getPointer(3, this)); + } + _adoptGlobalOutbound(value) { + utils.adopt(value, utils.getPointer(4, this)); + } + _disownGlobalOutbound() { + return utils.disown(this.globalOutbound); + } + /** + * Where should the global "fetch" go to? The default is the service called "internet", which + * should usually be configured to talk to the public internet. + * */ + get globalOutbound() { + return utils.getStruct( + 4, + ServiceDesignator, + this, + _Worker._capnp.defaultGlobalOutbound + ); + } + _hasGlobalOutbound() { + return !utils.isNull(utils.getPointer(4, this)); + } + _initGlobalOutbound() { + return utils.initStructAt(4, ServiceDesignator, this); + } + set globalOutbound(value) { + utils.copyFrom(value, utils.getPointer(4, this)); + } + _adoptCacheApiOutbound(value) { + utils.adopt(value, utils.getPointer(7, this)); + } + _disownCacheApiOutbound() { + return utils.disown(this.cacheApiOutbound); + } + /** + * List of durable object namespaces in this Worker. + * */ + get cacheApiOutbound() { + return utils.getStruct(7, ServiceDesignator, this); + } + _hasCacheApiOutbound() { + return !utils.isNull(utils.getPointer(7, this)); + } + _initCacheApiOutbound() { + return utils.initStructAt(7, ServiceDesignator, this); + } + set cacheApiOutbound(value) { + utils.copyFrom(value, utils.getPointer(7, this)); + } + _adoptDurableObjectNamespaces(value) { + utils.adopt(value, utils.getPointer(5, this)); + } + _disownDurableObjectNamespaces() { + return utils.disown(this.durableObjectNamespaces); + } + /** + * Additional text which is hashed together with `DurableObjectNamespace.uniqueKey`. When using + * worker inheritance, each derived worker must specify a unique modifier to ensure that its + * Durable Object instances have unique IDs from all other workers inheriting the same parent. + * + * DO NOT LOSE this value, otherwise it may be difficult or impossible to recover stored data. + * */ + get durableObjectNamespaces() { + return utils.getList(5, _Worker._DurableObjectNamespaces, this); + } + _hasDurableObjectNamespaces() { + return !utils.isNull(utils.getPointer(5, this)); + } + _initDurableObjectNamespaces(length) { + return utils.initList(5, _Worker._DurableObjectNamespaces, length, this); + } + set durableObjectNamespaces(value) { + utils.copyFrom(value, utils.getPointer(5, this)); + } + /** + * Specifies where this worker's Durable Objects are stored. + * */ + get durableObjectUniqueKeyModifier() { + return utils.getText(6, this); + } + set durableObjectUniqueKeyModifier(value) { + utils.setText(6, value, this); + } + /** + * Where should cache API (i.e. caches.default and caches.open(...)) requests go? + * */ + get durableObjectStorage() { + return utils.getAs(Worker_DurableObjectStorage, this); + } + _initDurableObjectStorage() { + return utils.getAs(Worker_DurableObjectStorage, this); + } + get moduleFallback() { + return utils.getText(9, this); + } + set moduleFallback(value) { + utils.setText(9, value, this); + } + _adoptTails(value) { + utils.adopt(value, utils.getPointer(10, this)); + } + _disownTails() { + return utils.disown(this.tails); + } + /** + * List of tail worker services that should receive tail events for this worker. + * See: https://developers.cloudflare.com/workers/observability/logs/tail-workers/ + * */ + get tails() { + return utils.getList(10, _Worker._Tails, this); + } + _hasTails() { + return !utils.isNull(utils.getPointer(10, this)); + } + _initTails(length) { + return utils.initList(10, _Worker._Tails, length, this); + } + set tails(value) { + utils.copyFrom(value, utils.getPointer(10, this)); + } + toString() { + return "Worker_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var ExternalServer_Https = class extends Struct { + static _capnp = { + displayName: "https", + id: "ac37e02afd3dc6db", + size: new ObjectSize(8, 4) + }; + _adoptOptions(value) { + utils.adopt(value, utils.getPointer(1, this)); + } + _disownOptions() { + return utils.disown(this.options); + } + get options() { + return utils.getStruct(1, HttpOptions, this); + } + _hasOptions() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initOptions() { + return utils.initStructAt(1, HttpOptions, this); + } + set options(value) { + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptTlsOptions(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownTlsOptions() { + return utils.disown(this.tlsOptions); + } + get tlsOptions() { + return utils.getStruct(2, TlsOptions, this); + } + _hasTlsOptions() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initTlsOptions() { + return utils.initStructAt(2, TlsOptions, this); + } + set tlsOptions(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + /** + * If present, expect the host to present a certificate authenticating it as this hostname. + * If `certificateHost` is not provided, then the certificate is checked against `address`. + * */ + get certificateHost() { + return utils.getText(3, this); + } + set certificateHost(value) { + utils.setText(3, value, this); + } + toString() { + return "ExternalServer_Https_" + super.toString(); + } +}; +var ExternalServer_Tcp = class extends Struct { + static _capnp = { + displayName: "tcp", + id: "d941637df0fb39f1", + size: new ObjectSize(8, 4) + }; + _adoptTlsOptions(value) { + utils.adopt(value, utils.getPointer(1, this)); + } + _disownTlsOptions() { + return utils.disown(this.tlsOptions); + } + get tlsOptions() { + return utils.getStruct(1, TlsOptions, this); + } + _hasTlsOptions() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initTlsOptions() { + return utils.initStructAt(1, TlsOptions, this); + } + set tlsOptions(value) { + utils.copyFrom(value, utils.getPointer(1, this)); + } + get certificateHost() { + return utils.getText(2, this); + } + set certificateHost(value) { + utils.setText(2, value, this); + } + toString() { + return "ExternalServer_Tcp_" + super.toString(); + } +}; +var ExternalServer_Which = { + HTTP: 0, + HTTPS: 1, + TCP: 2 +}; +var ExternalServer = class extends Struct { + static HTTP = ExternalServer_Which.HTTP; + static HTTPS = ExternalServer_Which.HTTPS; + static TCP = ExternalServer_Which.TCP; + static _capnp = { + displayName: "ExternalServer", + id: "ff209f9aa352f5a4", + size: new ObjectSize(8, 4) + }; + /** + * Address/port of the server. Optional; if not specified, then you will be required to specify + * the address on the command line with with `--external-addr =`. + * + * Examples: + * - "1.2.3.4": Connect to the given IPv4 address on the protocol's default port. + * - "1.2.3.4:80": Connect to the given IPv4 address and port. + * - "1234:5678::abcd": Connect to the given IPv6 address on the protocol's default port. + * - "[1234:5678::abcd]:80": Connect to the given IPv6 address and port. + * - "unix:/path/to/socket": Connect to the given Unix Domain socket by path. + * - "unix-abstract:name": On Linux, connect to the given "abstract" Unix socket name. + * - "example.com:80": Perform a DNS lookup to determine the address, and then connect to it. + * + * (These are the formats supported by KJ's parseAddress().) + * */ + get address() { + return utils.getText(0, this); + } + set address(value) { + utils.setText(0, value, this); + } + _adoptHttp(value) { + utils.setUint16(0, 0, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownHttp() { + return utils.disown(this.http); + } + /** + * Talk to the server over unencrypted HTTP. + * */ + get http() { + utils.testWhich("http", utils.getUint16(0, this), 0, this); + return utils.getStruct(1, HttpOptions, this); + } + _hasHttp() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initHttp() { + utils.setUint16(0, 0, this); + return utils.initStructAt(1, HttpOptions, this); + } + get _isHttp() { + return utils.getUint16(0, this) === 0; + } + set http(value) { + utils.setUint16(0, 0, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + /** + * Talk to the server over encrypted HTTPS. + * */ + get https() { + utils.testWhich("https", utils.getUint16(0, this), 1, this); + return utils.getAs(ExternalServer_Https, this); + } + _initHttps() { + utils.setUint16(0, 1, this); + return utils.getAs(ExternalServer_Https, this); + } + get _isHttps() { + return utils.getUint16(0, this) === 1; + } + set https(_) { + utils.setUint16(0, 1, this); + } + /** + * Connect to the server over raw TCP. Bindings to this service will only support the + * `connect()` method; `fetch()` will throw an exception. + * */ + get tcp() { + utils.testWhich("tcp", utils.getUint16(0, this), 2, this); + return utils.getAs(ExternalServer_Tcp, this); + } + _initTcp() { + utils.setUint16(0, 2, this); + return utils.getAs(ExternalServer_Tcp, this); + } + get _isTcp() { + return utils.getUint16(0, this) === 2; + } + set tcp(_) { + utils.setUint16(0, 2, this); + } + toString() { + return "ExternalServer_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var Network = class _Network extends Struct { + static _capnp = { + displayName: "Network", + id: "fa42244f950c9b9c", + size: new ObjectSize(0, 3), + defaultAllow: readRawPointer( + new Uint8Array([ + 16, + 3, + 17, + 1, + 14, + 17, + 1, + 58, + 63, + 112, + 117, + 98, + 108, + 105, + 99 + ]).buffer + ) + }; + _adoptAllow(value) { + utils.adopt(value, utils.getPointer(0, this)); + } + _disownAllow() { + return utils.disown(this.allow); + } + get allow() { + return utils.getList(0, TextList, this, _Network._capnp.defaultAllow); + } + _hasAllow() { + return !utils.isNull(utils.getPointer(0, this)); + } + _initAllow(length) { + return utils.initList(0, TextList, length, this); + } + set allow(value) { + utils.copyFrom(value, utils.getPointer(0, this)); + } + _adoptDeny(value) { + utils.adopt(value, utils.getPointer(1, this)); + } + _disownDeny() { + return utils.disown(this.deny); + } + /** + * Specifies which network addresses the Worker will be allowed to connect to, e.g. using fetch(). + * The default allows publicly-routable IP addresses only, in order to prevent SSRF attacks. + * + * The allow and deny lists specify network blocks in CIDR notation (IPv4 and IPv6), such as + * "192.0.2.0/24" or "2001:db8::/32". Traffic will be permitted as long as the address + * matches at least one entry in the allow list and none in the deny list. + * + * In addition to IPv4 and IPv6 CIDR notation, several special strings may be specified: + * - "private": Matches network addresses that are reserved by standards for private networks, + * such as "10.0.0.0/8" or "192.168.0.0/16". This is a superset of "local". + * - "public": Opposite of "private". + * - "local": Matches network addresses that are defined by standards to only be accessible from + * the local machine, such as "127.0.0.0/8" or Unix domain addresses. + * - "network": Opposite of "local". + * - "unix": Matches all Unix domain socket addresses. (In the future, we may support specifying a + * glob to narrow this to specific paths.) + * - "unix-abstract": Matches Linux's "abstract unix domain" addresses. (In the future, we may + * support specifying a glob.) + * + * In the case that the Worker specifies a DNS hostname rather than a raw address, these rules are + * used to filter the addresses returned by the lookup. If none of the returned addresses turn + * out to be permitted, then the system will behave as if the DNS entry did not exist. + * + * (The above is exactly the format supported by kj::Network::restrictPeers().) + * */ + get deny() { + return utils.getList(1, TextList, this); + } + _hasDeny() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initDeny(length) { + return utils.initList(1, TextList, length, this); + } + set deny(value) { + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptTlsOptions(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownTlsOptions() { + return utils.disown(this.tlsOptions); + } + get tlsOptions() { + return utils.getStruct(2, TlsOptions, this); + } + _hasTlsOptions() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initTlsOptions() { + return utils.initStructAt(2, TlsOptions, this); + } + set tlsOptions(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + toString() { + return "Network_" + super.toString(); + } +}; +var DiskDirectory = class _DiskDirectory extends Struct { + static _capnp = { + displayName: "DiskDirectory", + id: "9048ab22835f51c3", + size: new ObjectSize(8, 1), + defaultWritable: getBitMask(false, 0), + defaultAllowDotfiles: getBitMask(false, 1) + }; + /** + * The filesystem path of the directory. If not specified, then it must be specified on the + * command line with `--directory-path =`. + * + * Relative paths are interpreted relative to the current directory where the server is executed, + * NOT relative to the config file. So, you should usually use absolute paths in the config file. + * */ + get path() { + return utils.getText(0, this); + } + set path(value) { + utils.setText(0, value, this); + } + /** + * Whether to support PUT requests for writing. A PUT will write to a temporary file which + * is atomically moved into place upon successful completion of the upload. Parent directories are + * created as needed. + * */ + get writable() { + return utils.getBit(0, this, _DiskDirectory._capnp.defaultWritable); + } + set writable(value) { + utils.setBit(0, value, this, _DiskDirectory._capnp.defaultWritable); + } + /** + * Whether to allow access to files and directories whose name starts with '.'. These are made + * inaccessible by default since they very often store metadata that is not meant to be served, + * e.g. a git repository or an `.htaccess` file. + * + * Note that the special links "." and ".." will never be accessible regardless of this setting. + * */ + get allowDotfiles() { + return utils.getBit(1, this, _DiskDirectory._capnp.defaultAllowDotfiles); + } + set allowDotfiles(value) { + utils.setBit(1, value, this, _DiskDirectory._capnp.defaultAllowDotfiles); + } + toString() { + return "DiskDirectory_" + super.toString(); + } +}; +var HttpOptions_Style = { + HOST: 0, + PROXY: 1 +}; +var HttpOptions_Header = class extends Struct { + static _capnp = { + displayName: "Header", + id: "dc0394b5a6f3417e", + size: new ObjectSize(0, 2) + }; + /** + * Case-insensitive. + * */ + get name() { + return utils.getText(0, this); + } + set name(value) { + utils.setText(0, value, this); + } + /** + * If null, the header will be removed. + * */ + get value() { + return utils.getText(1, this); + } + set value(value) { + utils.setText(1, value, this); + } + toString() { + return "HttpOptions_Header_" + super.toString(); + } +}; +var HttpOptions = class _HttpOptions extends Struct { + static Style = HttpOptions_Style; + static Header = HttpOptions_Header; + static _capnp = { + displayName: "HttpOptions", + id: "aa8dc6885da78f19", + size: new ObjectSize(8, 5), + defaultStyle: getUint16Mask(0) + }; + static _InjectRequestHeaders; + static _InjectResponseHeaders; + get style() { + return utils.getUint16( + 0, + this, + _HttpOptions._capnp.defaultStyle + ); + } + set style(value) { + utils.setUint16(0, value, this, _HttpOptions._capnp.defaultStyle); + } + /** + * If specified, then when the given header is present on a request, it specifies the protocol + * ("http" or "https") that was used by the original client. The request URL reported to the + * Worker will reflect this protocol. Otherwise, the URL will reflect the actual physical protocol + * used by the server in receiving the request. + * + * This option is useful when this server sits behind a reverse proxy that performs TLS + * termination. Typically such proxies forward the original protocol in a header named something + * like "X-Forwarded-Proto". + * + * This setting is ignored when `style` is `proxy`. + * */ + get forwardedProtoHeader() { + return utils.getText(0, this); + } + set forwardedProtoHeader(value) { + utils.setText(0, value, this); + } + /** + * If set, then the `request.cf` object will be encoded (as JSON) into / parsed from the header + * with this name. Otherwise, it will be discarded on send / `undefined` on receipt. + * */ + get cfBlobHeader() { + return utils.getText(1, this); + } + set cfBlobHeader(value) { + utils.setText(1, value, this); + } + _adoptInjectRequestHeaders(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownInjectRequestHeaders() { + return utils.disown(this.injectRequestHeaders); + } + /** + * List of headers which will be automatically injected into all requests. This can be used + * e.g. to add an authorization token to all requests when using `ExternalServer`. It can also + * apply to incoming requests received on a `Socket` to modify the headers that will be delivered + * to the app. Any existing header with the same name is removed. + * */ + get injectRequestHeaders() { + return utils.getList(2, _HttpOptions._InjectRequestHeaders, this); + } + _hasInjectRequestHeaders() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initInjectRequestHeaders(length) { + return utils.initList(2, _HttpOptions._InjectRequestHeaders, length, this); + } + set injectRequestHeaders(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + _adoptInjectResponseHeaders(value) { + utils.adopt(value, utils.getPointer(3, this)); + } + _disownInjectResponseHeaders() { + return utils.disown(this.injectResponseHeaders); + } + /** + * Same as `injectRequestHeaders` but for responses. + * */ + get injectResponseHeaders() { + return utils.getList(3, _HttpOptions._InjectResponseHeaders, this); + } + _hasInjectResponseHeaders() { + return !utils.isNull(utils.getPointer(3, this)); + } + _initInjectResponseHeaders(length) { + return utils.initList( + 3, + _HttpOptions._InjectResponseHeaders, + length, + this + ); + } + set injectResponseHeaders(value) { + utils.copyFrom(value, utils.getPointer(3, this)); + } + /** + * A CONNECT request for this host+port will be treated as a request to form a Cap'n Proto RPC + * connection. The server will expose a WorkerdBootstrap as the bootstrap interface, allowing + * events to be delivered to the target worker via capnp. Clients will use capnp for non-HTTP + * event types (especially JSRPC). + * */ + get capnpConnectHost() { + return utils.getText(4, this); + } + set capnpConnectHost(value) { + utils.setText(4, value, this); + } + toString() { + return "HttpOptions_" + super.toString(); + } +}; +var TlsOptions_Keypair = class extends Struct { + static _capnp = { + displayName: "Keypair", + id: "f546bf2d5d8bd13e", + size: new ObjectSize(0, 2) + }; + /** + * Private key in PEM format. Supports PKCS8 keys as well as "traditional format" RSA and DSA + * keys. + * + * Remember that you can use Cap'n Proto's `embed` syntax to reference an external file. + * */ + get privateKey() { + return utils.getText(0, this); + } + set privateKey(value) { + utils.setText(0, value, this); + } + /** + * Certificate chain in PEM format. A chain can be constructed by concatenating multiple + * PEM-encoded certificates, starting with the leaf certificate. + * */ + get certificateChain() { + return utils.getText(1, this); + } + set certificateChain(value) { + utils.setText(1, value, this); + } + toString() { + return "TlsOptions_Keypair_" + super.toString(); + } +}; +var TlsOptions_Version = { + GOOD_DEFAULT: 0, + SSL3: 1, + TLS1DOT0: 2, + TLS1DOT1: 3, + TLS1DOT2: 4, + TLS1DOT3: 5 +}; +var TlsOptions = class _TlsOptions extends Struct { + static Keypair = TlsOptions_Keypair; + static Version = TlsOptions_Version; + static _capnp = { + displayName: "TlsOptions", + id: "aabb3c3778ac4311", + size: new ObjectSize(8, 3), + defaultRequireClientCerts: getBitMask(false, 0), + defaultTrustBrowserCas: getBitMask(false, 1), + defaultMinVersion: getUint16Mask(0) + }; + _adoptKeypair(value) { + utils.adopt(value, utils.getPointer(0, this)); + } + _disownKeypair() { + return utils.disown(this.keypair); + } + /** + * The default private key and certificate to use. Optional when acting as a client. + * */ + get keypair() { + return utils.getStruct(0, TlsOptions_Keypair, this); + } + _hasKeypair() { + return !utils.isNull(utils.getPointer(0, this)); + } + _initKeypair() { + return utils.initStructAt(0, TlsOptions_Keypair, this); + } + set keypair(value) { + utils.copyFrom(value, utils.getPointer(0, this)); + } + /** + * If true, then when acting as a server, incoming connections will be rejected unless they bear + * a certificate signed by one of the trusted CAs. + * + * Typically, when using this, you'd set `trustBrowserCas = false` and list a specific private CA + * in `trustedCertificates`. + * */ + get requireClientCerts() { + return utils.getBit(0, this, _TlsOptions._capnp.defaultRequireClientCerts); + } + set requireClientCerts(value) { + utils.setBit(0, value, this, _TlsOptions._capnp.defaultRequireClientCerts); + } + /** + * If true, trust certificates which are signed by one of the CAs that browsers normally trust. + * You should typically set this true when talking to the public internet, but you may want to + * set it false when talking to servers on your internal network. + * */ + get trustBrowserCas() { + return utils.getBit(1, this, _TlsOptions._capnp.defaultTrustBrowserCas); + } + set trustBrowserCas(value) { + utils.setBit(1, value, this, _TlsOptions._capnp.defaultTrustBrowserCas); + } + _adoptTrustedCertificates(value) { + utils.adopt(value, utils.getPointer(1, this)); + } + _disownTrustedCertificates() { + return utils.disown(this.trustedCertificates); + } + /** + * Additional CA certificates to trust, in PEM format. Remember that you can use Cap'n Proto's + * `embed` syntax to read the certificates from other files. + * */ + get trustedCertificates() { + return utils.getList(1, TextList, this); + } + _hasTrustedCertificates() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initTrustedCertificates(length) { + return utils.initList(1, TextList, length, this); + } + set trustedCertificates(value) { + utils.copyFrom(value, utils.getPointer(1, this)); + } + /** + * Minimum TLS version that will be allowed. Generally you should not override this unless you + * have unusual backwards-compatibility needs. + * */ + get minVersion() { + return utils.getUint16( + 2, + this, + _TlsOptions._capnp.defaultMinVersion + ); + } + set minVersion(value) { + utils.setUint16(2, value, this, _TlsOptions._capnp.defaultMinVersion); + } + /** + * OpenSSL cipher list string. The default is a curated list designed to be compatible with + * almost all software in current use (specifically, based on Mozilla's "intermediate" + * recommendations). The defaults will change in future versions of this software to account + * for the latest cryptanalysis. + * + * Generally you should only specify your own `cipherList` if: + * - You have extreme backwards-compatibility needs and wish to enable obsolete and/or broken + * algorithms. + * - You need quickly to disable an algorithm recently discovered to be broken. + * */ + get cipherList() { + return utils.getText(2, this); + } + set cipherList(value) { + utils.setText(2, value, this); + } + toString() { + return "TlsOptions_" + super.toString(); + } +}; +var Extension_Module = class _Extension_Module extends Struct { + static _capnp = { + displayName: "Module", + id: "d5d16e76fdedc37d", + size: new ObjectSize(8, 2), + defaultInternal: getBitMask(false, 0) + }; + /** + * Full js module name. + * */ + get name() { + return utils.getText(0, this); + } + set name(value) { + utils.setText(0, value, this); + } + /** + * Internal modules can be imported by other extension modules only and not the user code. + * */ + get internal() { + return utils.getBit(0, this, _Extension_Module._capnp.defaultInternal); + } + set internal(value) { + utils.setBit(0, value, this, _Extension_Module._capnp.defaultInternal); + } + /** + * Raw source code of ES module. + * */ + get esModule() { + return utils.getText(1, this); + } + set esModule(value) { + utils.setText(1, value, this); + } + toString() { + return "Extension_Module_" + super.toString(); + } +}; +var Extension = class _Extension extends Struct { + static Module = Extension_Module; + static _capnp = { + displayName: "Extension", + id: "e390128a861973a6", + size: new ObjectSize(0, 1) + }; + static _Modules; + _adoptModules(value) { + utils.adopt(value, utils.getPointer(0, this)); + } + _disownModules() { + return utils.disown(this.modules); + } + /** + * List of javascript modules provided by the extension. + * These modules can either be imported directly as user-level api (if not marked internal) + * or used to define more complicated workerd constructs such as wrapped bindings and events. + * */ + get modules() { + return utils.getList(0, _Extension._Modules, this); + } + _hasModules() { + return !utils.isNull(utils.getPointer(0, this)); + } + _initModules(length) { + return utils.initList(0, _Extension._Modules, length, this); + } + set modules(value) { + utils.copyFrom(value, utils.getPointer(0, this)); + } + toString() { + return "Extension_" + super.toString(); + } +}; +Config._Services = CompositeList(Service); +Config._Sockets = CompositeList(Socket); +Config._Extensions = CompositeList(Extension); +Worker_Binding_WrappedBinding._InnerBindings = CompositeList(Worker_Binding); +Worker._Modules = CompositeList(Worker_Module); +Worker._Bindings = CompositeList(Worker_Binding); +Worker._DurableObjectNamespaces = CompositeList( + Worker_DurableObjectNamespace +); +Worker._Tails = CompositeList(ServiceDesignator); +HttpOptions._InjectRequestHeaders = CompositeList(HttpOptions_Header); +HttpOptions._InjectResponseHeaders = CompositeList(HttpOptions_Header); +Extension._Modules = CompositeList(Extension_Module); + +// src/runtime/config/workerd.ts +var kVoid = Symbol("kVoid"); + +// src/runtime/config/index.ts +function capitalize(str) { + return str.length > 0 ? str[0].toUpperCase() + str.substring(1) : str; +} +function encodeCapnpStruct(obj, struct) { + const anyStruct = struct; + for (const [key, value] of Object.entries(obj)) { + const capitalized = capitalize(key); + const safeKey = key === "constructor" ? `$${key}` : key; + if (value instanceof Uint8Array) { + const newData = anyStruct[`_init${capitalized}`](value.byteLength); + newData.copyBuffer(value); + } else if (Array.isArray(value)) { + const newList = anyStruct[`_init${capitalized}`](value.length); + for (let i = 0; i < value.length; i++) { + if (typeof value[i] === "object") { + encodeCapnpStruct(value[i], newList.get(i)); + } else { + newList.set(i, value[i]); + } + } + } else if (typeof value === "object") { + const newStruct = anyStruct[`_init${capitalized}`](); + encodeCapnpStruct(value, newStruct); + } else if (value === kVoid) { + anyStruct[safeKey] = void 0; + } else if (value !== void 0) { + anyStruct[safeKey] = value; + } + } +} +function serializeConfig(config) { + const message = new Message(); + const struct = message.initRoot(Config); + encodeCapnpStruct(config, struct); + return Buffer.from(message.toArrayBuffer()); +} + +// src/runtime/index.ts +var ControlMessageSchema = import_zod5.z.discriminatedUnion("event", [ + import_zod5.z.object({ + event: import_zod5.z.literal("listen"), + socket: import_zod5.z.string(), + port: import_zod5.z.number() + }), + import_zod5.z.object({ + event: import_zod5.z.literal("listen-inspector"), + port: import_zod5.z.number() + }) +]); +var kInspectorSocket = Symbol("kInspectorSocket"); +async function waitForPorts(stream, options) { + if (options?.signal?.aborted) return; + const lines = import_readline.default.createInterface(stream); + const abortListener = () => lines.close(); + options?.signal?.addEventListener("abort", abortListener, { once: true }); + const requiredSockets = Array.from(options.requiredSockets); + const socketPorts = /* @__PURE__ */ new Map(); + try { + for await (const line of lines) { + const message = ControlMessageSchema.safeParse(JSON.parse(line)); + if (!message.success) continue; + const data = message.data; + const socket = data.event === "listen-inspector" ? kInspectorSocket : data.socket; + const index = requiredSockets.indexOf(socket); + if (index === -1) continue; + socketPorts.set(socket, data.port); + requiredSockets.splice(index, 1); + if (requiredSockets.length === 0) return socketPorts; + } + } finally { + options?.signal?.removeEventListener("abort", abortListener); + } +} +function waitForExit(process2) { + return new Promise((resolve2) => { + process2.once("exit", () => resolve2()); + }); +} +function pipeOutput(stdout, stderr) { + import_readline.default.createInterface(stdout).on("line", (data) => console.log(data)); + import_readline.default.createInterface(stderr).on("line", (data) => console.error(red(data))); +} +function getRuntimeCommand() { + return process.env.MINIFLARE_WORKERD_PATH ?? import_workerd2.default; +} +function getRuntimeArgs(options) { + const args = [ + "serve", + // Required to use binary capnp config + "--binary", + // Required to use compatibility flags without a default-on date, + // (e.g. "streams_enable_constructors"), see https://github.com/cloudflare/workerd/pull/21 + "--experimental", + `--socket-addr=${SOCKET_ENTRY}=${options.entryAddress}`, + `--external-addr=${SERVICE_LOOPBACK}=${options.loopbackAddress}`, + // Configure extra pipe for receiving control messages (e.g. when ready) + "--control-fd=3", + // Read config from stdin + "-" + ]; + if (options.inspectorAddress !== void 0) { + args.push(`--inspector-addr=${options.inspectorAddress}`); + } + if (options.verbose) { + args.push("--verbose"); + } + return args; +} +var Runtime = class { + #process; + #processExitPromise; + async updateConfig(configBuffer, options) { + await this.dispose(); + const command = getRuntimeCommand(); + const args = getRuntimeArgs(options); + const FORCE_COLOR2 = $.enabled ? "1" : "0"; + const runtimeProcess = import_child_process.default.spawn(command, args, { + stdio: ["pipe", "pipe", "pipe", "pipe"], + env: { ...process.env, FORCE_COLOR: FORCE_COLOR2 } + }); + this.#process = runtimeProcess; + this.#processExitPromise = waitForExit(runtimeProcess); + const handleRuntimeStdio = options.handleRuntimeStdio ?? pipeOutput; + handleRuntimeStdio(runtimeProcess.stdout, runtimeProcess.stderr); + const controlPipe = runtimeProcess.stdio[3]; + (0, import_assert4.default)(controlPipe instanceof import_stream.Readable); + runtimeProcess.stdin.write(configBuffer); + runtimeProcess.stdin.end(); + await (0, import_events2.once)(runtimeProcess.stdin, "finish"); + return waitForPorts(controlPipe, options); + } + dispose() { + this.#process?.kill("SIGKILL"); + return this.#processExitPromise; + } +}; + +// src/plugins/assets/constants.ts +var ASSETS_PLUGIN_NAME = "assets"; +var ASSETS_SERVICE_NAME = `${ASSETS_PLUGIN_NAME}:assets-service`; +var ROUTER_SERVICE_NAME = `${ASSETS_PLUGIN_NAME}:router`; +var RPC_PROXY_SERVICE_NAME = `${ASSETS_PLUGIN_NAME}:rpc-proxy`; +var ASSETS_KV_SERVICE_NAME = `${ASSETS_PLUGIN_NAME}:kv`; + +// src/plugins/cache/index.ts +var import_promises4 = __toESM(require("fs/promises")); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/cache/cache.worker.ts +var import_fs8 = __toESM(require("fs")); +var import_path11 = __toESM(require("path")); +var import_url8 = __toESM(require("url")); +var contents8; +function cache_worker_default() { + if (contents8 !== void 0) return contents8; + const filePath = import_path11.default.join(__dirname, "workers", "cache/cache.worker.js"); + contents8 = import_fs8.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url8.default.pathToFileURL(filePath); + return contents8; +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/cache/cache-entry.worker.ts +var import_fs9 = __toESM(require("fs")); +var import_path12 = __toESM(require("path")); +var import_url9 = __toESM(require("url")); +var contents9; +function cache_entry_worker_default() { + if (contents9 !== void 0) return contents9; + const filePath = import_path12.default.join(__dirname, "workers", "cache/cache-entry.worker.js"); + contents9 = import_fs9.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url9.default.pathToFileURL(filePath); + return contents9; +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/cache/cache-entry-noop.worker.ts +var import_fs10 = __toESM(require("fs")); +var import_path13 = __toESM(require("path")); +var import_url10 = __toESM(require("url")); +var contents10; +function cache_entry_noop_worker_default() { + if (contents10 !== void 0) return contents10; + const filePath = import_path13.default.join(__dirname, "workers", "cache/cache-entry-noop.worker.js"); + contents10 = import_fs10.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url10.default.pathToFileURL(filePath); + return contents10; +} + +// src/plugins/cache/index.ts +var import_zod7 = require("zod"); + +// src/plugins/shared/index.ts +var import_crypto = __toESM(require("crypto")); +var import_fs12 = require("fs"); +var import_promises3 = __toESM(require("fs/promises")); +var import_path15 = __toESM(require("path")); +var import_url13 = require("url"); +var import_zod6 = require("zod"); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/shared/object-entry.worker.ts +var import_fs11 = __toESM(require("fs")); +var import_path14 = __toESM(require("path")); +var import_url11 = __toESM(require("url")); +var contents11; +function object_entry_worker_default() { + if (contents11 !== void 0) return contents11; + const filePath = import_path14.default.join(__dirname, "workers", "shared/object-entry.worker.js"); + contents11 = import_fs11.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url11.default.pathToFileURL(filePath); + return contents11; +} + +// src/plugins/shared/constants.ts +var SOCKET_ENTRY = "entry"; +var SOCKET_ENTRY_LOCAL = "entry:local"; +var SOCKET_DIRECT_PREFIX = "direct"; +function getDirectSocketName(workerIndex, entrypoint) { + return `${SOCKET_DIRECT_PREFIX}:${workerIndex}:${entrypoint}`; +} +var SERVICE_LOOPBACK = "loopback"; +var HOST_CAPNP_CONNECT = "miniflare-unsafe-internal-capnp-connect"; +var WORKER_BINDING_SERVICE_LOOPBACK = { + name: CoreBindings.SERVICE_LOOPBACK, + service: { name: SERVICE_LOOPBACK } +}; +var WORKER_BINDING_ENABLE_CONTROL_ENDPOINTS = { + name: SharedBindings.MAYBE_JSON_ENABLE_CONTROL_ENDPOINTS, + json: "true" +}; +var WORKER_BINDING_ENABLE_STICKY_BLOBS = { + name: SharedBindings.MAYBE_JSON_ENABLE_STICKY_BLOBS, + json: "true" +}; +var enableControlEndpoints = false; +function getMiniflareObjectBindings(unsafeStickyBlobs) { + const result = []; + if (enableControlEndpoints) { + result.push(WORKER_BINDING_ENABLE_CONTROL_ENDPOINTS); + } + if (unsafeStickyBlobs) { + result.push(WORKER_BINDING_ENABLE_STICKY_BLOBS); + } + return result; +} +function _enableControlEndpoints() { + enableControlEndpoints = true; +} +function objectEntryWorker(durableObjectNamespace, namespace) { + return { + compatibilityDate: "2023-07-24", + modules: [ + { name: "object-entry.worker.js", esModule: object_entry_worker_default() } + ], + bindings: [ + { name: SharedBindings.TEXT_NAMESPACE, text: namespace }, + { + name: SharedBindings.DURABLE_OBJECT_NAMESPACE_OBJECT, + durableObjectNamespace + } + ] + }; +} +var kUnsafeEphemeralUniqueKey = Symbol.for( + "miniflare.kUnsafeEphemeralUniqueKey" +); + +// src/plugins/shared/routing.ts +var import_url12 = require("url"); +var RouterError = class extends MiniflareError { +}; +function routeSpecificity(url20) { + const hostParts = url20.host.split("."); + let hostScore = hostParts.length; + if (hostParts[0] === "*") hostScore -= 2; + const pathParts = url20.pathname.split("/"); + let pathScore = pathParts.length; + if (pathParts[pathParts.length - 1] === "*") pathScore -= 2; + return hostScore * 26 + pathScore; +} +function parseRoutes(allRoutes) { + const routes = []; + for (const [target, targetRoutes] of allRoutes) { + for (const route of targetRoutes) { + const hasProtocol = /^[a-z0-9+\-.]+:\/\//i.test(route); + let urlInput = route; + if (!hasProtocol) urlInput = `https://${urlInput}`; + const url20 = new import_url12.URL(urlInput); + const specificity = routeSpecificity(url20); + const protocol = hasProtocol ? url20.protocol : void 0; + const internationalisedAllowHostnamePrefix = url20.hostname.startsWith("xn--*"); + const allowHostnamePrefix = url20.hostname.startsWith("*") || internationalisedAllowHostnamePrefix; + const anyHostname = url20.hostname === "*"; + if (allowHostnamePrefix && !anyHostname) { + let hostname = url20.hostname; + if (internationalisedAllowHostnamePrefix) { + hostname = (0, import_url12.domainToUnicode)(hostname); + } + url20.hostname = hostname.substring(1); + } + const allowPathSuffix = url20.pathname.endsWith("*"); + if (allowPathSuffix) { + url20.pathname = url20.pathname.substring(0, url20.pathname.length - 1); + } + if (url20.search) { + throw new RouterError( + "ERR_QUERY_STRING", + `Route "${route}" for "${target}" contains a query string. This is not allowed.` + ); + } + if (url20.toString().includes("*") && !anyHostname) { + throw new RouterError( + "ERR_INFIX_WILDCARD", + `Route "${route}" for "${target}" contains an infix wildcard. This is not allowed.` + ); + } + routes.push({ + target, + route, + specificity, + protocol, + allowHostnamePrefix, + hostname: anyHostname ? "" : url20.hostname, + path: url20.pathname, + allowPathSuffix + }); + } + } + routes.sort((a, b) => { + if (a.specificity === b.specificity) { + return b.route.length - a.route.length; + } else { + return b.specificity - a.specificity; + } + }); + return routes; +} + +// src/plugins/shared/index.ts +var DEFAULT_PERSIST_ROOT = ".mf"; +var PersistenceSchema = import_zod6.z.union([import_zod6.z.boolean(), import_zod6.z.string().url(), PathSchema]).optional(); +var ProxyNodeBinding = class { + constructor(proxyOverrideHandler) { + this.proxyOverrideHandler = proxyOverrideHandler; + } +}; +function namespaceKeys(namespaces) { + if (Array.isArray(namespaces)) { + return namespaces; + } else if (namespaces !== void 0) { + return Object.keys(namespaces); + } else { + return []; + } +} +function namespaceEntries(namespaces) { + if (Array.isArray(namespaces)) { + return namespaces.map((bindingName) => [bindingName, bindingName]); + } else if (namespaces !== void 0) { + return Object.entries(namespaces); + } else { + return []; + } +} +function maybeParseURL(url20) { + if (typeof url20 !== "string" || import_path15.default.isAbsolute(url20)) return; + try { + return new URL(url20); + } catch { + } +} +function getPersistPath(pluginName, tmpPath, persist) { + const memoryishPath = import_path15.default.join(tmpPath, pluginName); + if (persist === void 0 || persist === false) { + return memoryishPath; + } + const url20 = maybeParseURL(persist); + if (url20 !== void 0) { + if (url20.protocol === "memory:") { + return memoryishPath; + } else if (url20.protocol === "file:") { + return (0, import_url13.fileURLToPath)(url20); + } + throw new MiniflareCoreError( + "ERR_PERSIST_UNSUPPORTED", + `Unsupported "${url20.protocol}" persistence protocol for storage: ${url20.href}` + ); + } + return persist === true ? import_path15.default.join(DEFAULT_PERSIST_ROOT, pluginName) : persist; +} +function durableObjectNamespaceIdFromName(uniqueKey, name) { + const key = import_crypto.default.createHash("sha256").update(uniqueKey).digest(); + const nameHmac = import_crypto.default.createHmac("sha256", key).update(name).digest().subarray(0, 16); + const hmac = import_crypto.default.createHmac("sha256", key).update(nameHmac).digest().subarray(0, 16); + return Buffer.concat([nameHmac, hmac]).toString("hex"); +} +async function migrateDatabase(log, uniqueKey, persistPath, namespace) { + const sanitisedNamespace = sanitisePath(namespace); + const previousDir = import_path15.default.join(persistPath, sanitisedNamespace); + const previousPath = import_path15.default.join(previousDir, "db.sqlite"); + const previousWalPath = import_path15.default.join(previousDir, "db.sqlite-wal"); + if (!(0, import_fs12.existsSync)(previousPath)) return; + const id = durableObjectNamespaceIdFromName(uniqueKey, namespace); + const newDir = import_path15.default.join(persistPath, uniqueKey); + const newPath = import_path15.default.join(newDir, `${id}.sqlite`); + const newWalPath = import_path15.default.join(newDir, `${id}.sqlite-wal`); + if ((0, import_fs12.existsSync)(newPath)) { + log.debug( + `Not migrating ${previousPath} to ${newPath} as it already exists` + ); + return; + } + log.debug(`Migrating ${previousPath} to ${newPath}...`); + await import_promises3.default.mkdir(newDir, { recursive: true }); + try { + await import_promises3.default.copyFile(previousPath, newPath); + if ((0, import_fs12.existsSync)(previousWalPath)) { + await import_promises3.default.copyFile(previousWalPath, newWalPath); + } + await import_promises3.default.unlink(previousPath); + await import_promises3.default.unlink(previousWalPath); + } catch (e) { + log.warn(`Error migrating ${previousPath} to ${newPath}: ${e}`); + } +} + +// src/plugins/cache/index.ts +var CacheOptionsSchema = import_zod7.z.object({ + cache: import_zod7.z.boolean().optional(), + cacheWarnUsage: import_zod7.z.boolean().optional() +}); +var CacheSharedOptionsSchema = import_zod7.z.object({ + cachePersist: PersistenceSchema +}); +var CACHE_PLUGIN_NAME = "cache"; +var CACHE_STORAGE_SERVICE_NAME = `${CACHE_PLUGIN_NAME}:storage`; +var CACHE_SERVICE_PREFIX = `${CACHE_PLUGIN_NAME}:cache`; +var CACHE_OBJECT_CLASS_NAME = "CacheObject"; +var CACHE_OBJECT = { + serviceName: CACHE_SERVICE_PREFIX, + className: CACHE_OBJECT_CLASS_NAME +}; +function getCacheServiceName(workerIndex) { + return `${CACHE_PLUGIN_NAME}:${workerIndex}`; +} +var CACHE_PLUGIN = { + options: CacheOptionsSchema, + sharedOptions: CacheSharedOptionsSchema, + getBindings() { + return []; + }, + getNodeBindings() { + return {}; + }, + async getServices({ + sharedOptions, + options, + workerIndex, + tmpPath, + unsafeStickyBlobs + }) { + const cache = options.cache ?? true; + const cacheWarnUsage = options.cacheWarnUsage ?? false; + let entryWorker; + if (cache) { + entryWorker = { + compatibilityDate: "2023-07-24", + compatibilityFlags: ["nodejs_compat", "experimental"], + modules: [ + { name: "cache-entry.worker.js", esModule: cache_entry_worker_default() } + ], + bindings: [ + { + name: SharedBindings.DURABLE_OBJECT_NAMESPACE_OBJECT, + durableObjectNamespace: CACHE_OBJECT + }, + { + name: CacheBindings.MAYBE_JSON_CACHE_WARN_USAGE, + json: JSON.stringify(cacheWarnUsage) + } + ] + }; + } else { + entryWorker = { + compatibilityDate: "2023-07-24", + compatibilityFlags: ["nodejs_compat", "experimental"], + modules: [ + { + name: "cache-entry-noop.worker.js", + esModule: cache_entry_noop_worker_default() + } + ] + }; + } + const services = [ + { name: getCacheServiceName(workerIndex), worker: entryWorker } + ]; + if (cache) { + const uniqueKey = `miniflare-${CACHE_OBJECT_CLASS_NAME}`; + const persist = sharedOptions.cachePersist; + const persistPath = getPersistPath(CACHE_PLUGIN_NAME, tmpPath, persist); + await import_promises4.default.mkdir(persistPath, { recursive: true }); + const storageService = { + name: CACHE_STORAGE_SERVICE_NAME, + disk: { path: persistPath, writable: true } + }; + const objectService = { + name: CACHE_SERVICE_PREFIX, + worker: { + compatibilityDate: "2023-07-24", + compatibilityFlags: ["nodejs_compat", "experimental"], + modules: [ + { + name: "cache.worker.js", + esModule: cache_worker_default() + } + ], + durableObjectNamespaces: [ + { + className: CACHE_OBJECT_CLASS_NAME, + uniqueKey + } + ], + // Store Durable Object SQL databases in persist path + durableObjectStorage: { localDisk: CACHE_STORAGE_SERVICE_NAME }, + // Bind blob disk directory service to object + bindings: [ + { + name: SharedBindings.MAYBE_SERVICE_BLOBS, + service: { name: CACHE_STORAGE_SERVICE_NAME } + }, + { + name: SharedBindings.MAYBE_SERVICE_LOOPBACK, + service: { name: SERVICE_LOOPBACK } + }, + ...getMiniflareObjectBindings(unsafeStickyBlobs) + ] + } + }; + services.push(storageService, objectService); + } + return services; + }, + getPersistPath({ cachePersist }, tmpPath) { + return getPersistPath(CACHE_PLUGIN_NAME, tmpPath, cachePersist); + } +}; + +// src/plugins/do/index.ts +var import_promises5 = __toESM(require("fs/promises")); +var import_zod8 = require("zod"); +var DurableObjectsOptionsSchema = import_zod8.z.object({ + durableObjects: import_zod8.z.record( + import_zod8.z.union([ + import_zod8.z.string(), + import_zod8.z.object({ + className: import_zod8.z.string(), + scriptName: import_zod8.z.string().optional(), + useSQLite: import_zod8.z.boolean().optional(), + // Allow `uniqueKey` to be customised. We use in Wrangler when setting + // up stub Durable Objects that proxy requests to Durable Objects in + // another `workerd` process, to ensure the IDs created by the stub + // object can be used by the real object too. + unsafeUniqueKey: import_zod8.z.union([import_zod8.z.string(), import_zod8.z.literal(kUnsafeEphemeralUniqueKey)]).optional(), + // Prevents the Durable Object being evicted. + unsafePreventEviction: import_zod8.z.boolean().optional() + }) + ]) + ).optional() +}); +var DurableObjectsSharedOptionsSchema = import_zod8.z.object({ + durableObjectsPersist: PersistenceSchema +}); +function normaliseDurableObject(designator) { + const isObject = typeof designator === "object"; + const className = isObject ? designator.className : designator; + const serviceName = isObject && designator.scriptName !== void 0 ? getUserServiceName(designator.scriptName) : void 0; + const enableSql = isObject ? designator.useSQLite : void 0; + const unsafeUniqueKey = isObject ? designator.unsafeUniqueKey : void 0; + const unsafePreventEviction = isObject ? designator.unsafePreventEviction : void 0; + return { + className, + serviceName, + enableSql, + unsafeUniqueKey, + unsafePreventEviction + }; +} +var DURABLE_OBJECTS_PLUGIN_NAME = "do"; +var DURABLE_OBJECTS_STORAGE_SERVICE_NAME = `${DURABLE_OBJECTS_PLUGIN_NAME}:storage`; +var DURABLE_OBJECTS_PLUGIN = { + options: DurableObjectsOptionsSchema, + sharedOptions: DurableObjectsSharedOptionsSchema, + getBindings(options) { + return Object.entries(options.durableObjects ?? {}).map( + ([name, klass]) => { + const { className, serviceName } = normaliseDurableObject(klass); + return { + name, + durableObjectNamespace: { className, serviceName } + }; + } + ); + }, + getNodeBindings(options) { + const objects = Object.keys(options.durableObjects ?? {}); + return Object.fromEntries( + objects.map((name) => [name, new ProxyNodeBinding()]) + ); + }, + async getServices({ + sharedOptions, + tmpPath, + durableObjectClassNames, + unsafeEphemeralDurableObjects + }) { + let hasDurableObjects = false; + for (const classNames of durableObjectClassNames.values()) { + if (classNames.size > 0) { + hasDurableObjects = true; + break; + } + } + if (!hasDurableObjects) return; + if (unsafeEphemeralDurableObjects) return; + const storagePath = getPersistPath( + DURABLE_OBJECTS_PLUGIN_NAME, + tmpPath, + sharedOptions.durableObjectsPersist + ); + await import_promises5.default.mkdir(storagePath, { recursive: true }); + return [ + { + // Note this service will be de-duped by name if multiple Workers create + // it. Each Worker will have the same `sharedOptions` though, so this + // isn't a problem. + name: DURABLE_OBJECTS_STORAGE_SERVICE_NAME, + disk: { path: storagePath, writable: true } + } + ]; + }, + getPersistPath({ durableObjectsPersist }, tmpPath) { + return getPersistPath( + DURABLE_OBJECTS_PLUGIN_NAME, + tmpPath, + durableObjectsPersist + ); + } +}; + +// src/plugins/core/constants.ts +var CORE_PLUGIN_NAME = "core"; +var SERVICE_ENTRY = `${CORE_PLUGIN_NAME}:entry`; +var SERVICE_USER_PREFIX = `${CORE_PLUGIN_NAME}:user`; +var SERVICE_BUILTIN_PREFIX = `${CORE_PLUGIN_NAME}:builtin`; +var SERVICE_CUSTOM_PREFIX = `${CORE_PLUGIN_NAME}:custom`; +function getUserServiceName(workerName = "") { + return `${SERVICE_USER_PREFIX}:${workerName}`; +} +var CUSTOM_SERVICE_KNOWN_OUTBOUND = "outbound"; +function getBuiltinServiceName(workerIndex, kind, bindingName) { + return `${SERVICE_BUILTIN_PREFIX}:${workerIndex}:${kind}${bindingName}`; +} +function getCustomServiceName(workerIndex, kind, bindingName) { + return `${SERVICE_CUSTOM_PREFIX}:${workerIndex}:${kind}${bindingName}`; +} + +// src/plugins/core/modules.ts +var import_assert5 = __toESM(require("assert")); +var import_fs13 = require("fs"); +var import_module = require("module"); +var import_path16 = __toESM(require("path")); +var import_url14 = require("url"); +var import_util = require("util"); +var import_acorn = require("acorn"); +var import_acorn_walk = require("acorn-walk"); +var import_zod9 = require("zod"); + +// src/plugins/core/node-compat.ts +function getNodeCompat(compatibilityDate = "2000-01-01", compatibilityFlags) { + const { + hasNodejsAlsFlag, + hasNodejsCompatFlag, + hasNodejsCompatV2Flag, + hasNoNodejsCompatV2Flag, + hasExperimentalNodejsCompatV2Flag + } = parseNodeCompatibilityFlags(compatibilityFlags); + const nodeCompatSwitchOverDate = "2024-09-23"; + let mode = null; + if (hasNodejsCompatV2Flag || hasNodejsCompatFlag && compatibilityDate >= nodeCompatSwitchOverDate && !hasNoNodejsCompatV2Flag) { + mode = "v2"; + } else if (hasNodejsCompatFlag) { + mode = "v1"; + } else if (hasNodejsAlsFlag) { + mode = "als"; + } + return { + mode, + hasNodejsAlsFlag, + hasNodejsCompatFlag, + hasNodejsCompatV2Flag, + hasNoNodejsCompatV2Flag, + hasExperimentalNodejsCompatV2Flag + }; +} +function parseNodeCompatibilityFlags(compatibilityFlags) { + return { + hasNodejsAlsFlag: compatibilityFlags.includes("nodejs_als"), + hasNodejsCompatFlag: compatibilityFlags.includes("nodejs_compat"), + hasNodejsCompatV2Flag: compatibilityFlags.includes("nodejs_compat_v2"), + hasNoNodejsCompatV2Flag: compatibilityFlags.includes("no_nodejs_compat_v2"), + hasExperimentalNodejsCompatV2Flag: compatibilityFlags.includes( + "experimental:nodejs_compat_v2" + ) + }; +} + +// src/plugins/core/modules.ts +var SUGGEST_BUNDLE = "If you're trying to import an npm package, you'll need to bundle your Worker first."; +var SUGGEST_NODE = "If you're trying to import a Node.js built-in module, or an npm package that uses Node.js built-ins, you'll either need to:\n- Bundle your Worker, configuring your bundler to polyfill Node.js built-ins\n- Configure your bundler to load Workers-compatible builds by changing the main fields/conditions\n- Enable the `nodejs_compat` compatibility flag and use the `NodeJsCompatModule` module type\n- Find an alternative package that doesn't require Node.js built-ins"; +var builtinModulesWithPrefix = import_module.builtinModules.concat( + import_module.builtinModules.map((module2) => `node:${module2}`) +); +function buildStringScriptPath(workerIndex) { + return `script:${workerIndex}`; +} +var stringScriptRegexp = /^script:(\d+)$/; +function maybeGetStringScriptPathIndex(scriptPath) { + const match = stringScriptRegexp.exec(scriptPath); + return match === null ? void 0 : parseInt(match[1]); +} +var ModuleRuleTypeSchema = import_zod9.z.enum([ + "ESModule", + "CommonJS", + "NodeJsCompatModule", + "Text", + "Data", + "CompiledWasm", + "PythonModule", + "PythonRequirement" +]); +var ModuleRuleSchema = import_zod9.z.object({ + type: ModuleRuleTypeSchema, + include: import_zod9.z.string().array(), + fallthrough: import_zod9.z.boolean().optional() +}); +var ModuleDefinitionSchema = import_zod9.z.object({ + type: ModuleRuleTypeSchema, + path: PathSchema, + contents: import_zod9.z.string().or(import_zod9.z.instanceof(Uint8Array)).optional() +}); +var SourceOptionsSchema = import_zod9.z.union([ + import_zod9.z.object({ + // Manually defined modules + // (used by Wrangler which has its own module collection code) + modules: import_zod9.z.array(ModuleDefinitionSchema), + // `modules` "name"s will be their paths relative to this value. + // This ensures file paths in stack traces are correct. + modulesRoot: PathSchema.optional() + }), + import_zod9.z.object({ + script: import_zod9.z.string(), + // Optional script path for resolving modules, and stack traces file names + scriptPath: PathSchema.optional(), + // Automatically collect modules by parsing `script` if `true`, or treat as + // service-worker if `false` + modules: import_zod9.z.boolean().optional(), + // How to interpret automatically collected modules + modulesRules: import_zod9.z.array(ModuleRuleSchema).optional(), + // `modules` "name"s will be their paths relative to this value. + // This ensures file paths in stack traces are correct. + modulesRoot: PathSchema.optional() + }), + import_zod9.z.object({ + scriptPath: PathSchema, + // Automatically collect modules by parsing `scriptPath` if `true`, or treat + // as service-worker if `false` + modules: import_zod9.z.boolean().optional(), + // How to interpret automatically collected modules + modulesRules: import_zod9.z.array(ModuleRuleSchema).optional(), + // `modules` "name"s will be their paths relative to this value. + // This ensures file paths in stack traces are correct. + modulesRoot: PathSchema.optional() + }) +]); +var DEFAULT_MODULE_RULES = [ + { type: "ESModule", include: ["**/*.mjs"] }, + { type: "CommonJS", include: ["**/*.js", "**/*.cjs"] } +]; +function compileModuleRules(rules) { + const compiledRules = []; + const finalisedTypes = /* @__PURE__ */ new Set(); + for (const rule of rules) { + if (finalisedTypes.has(rule.type)) continue; + compiledRules.push({ + type: rule.type, + include: globsToRegExps(rule.include) + }); + if (!rule.fallthrough) finalisedTypes.add(rule.type); + } + return compiledRules; +} +function moduleName(modulesRoot, modulePath) { + const name = import_path16.default.relative(modulesRoot, modulePath); + return import_path16.default.sep === "\\" ? name.replaceAll("\\", "/") : name; +} +function withSourceURL(script, scriptPath) { + if (script.lastIndexOf("//# sourceURL=") !== -1) return script; + let scriptURL = scriptPath; + if (maybeGetStringScriptPathIndex(scriptPath) === void 0) { + scriptURL = (0, import_url14.pathToFileURL)(scriptPath); + } + const sourceURL = ` +//# sourceURL=${scriptURL} +`; + return script + sourceURL; +} +function getResolveErrorPrefix(referencingPath) { + const relative2 = import_path16.default.relative("", referencingPath); + return `Unable to resolve "${relative2}" dependency`; +} +var ModuleLocator = class { + constructor(modulesRoot, additionalModuleNames, rules = [], compatibilityDate, compatibilityFlags) { + this.modulesRoot = modulesRoot; + this.additionalModuleNames = additionalModuleNames; + rules = rules.concat(DEFAULT_MODULE_RULES); + this.#compiledRules = compileModuleRules(rules); + this.#nodejsCompatMode = getNodeCompat( + compatibilityDate, + compatibilityFlags ?? [] + ).mode; + } + #compiledRules; + #nodejsCompatMode; + #visitedPaths = /* @__PURE__ */ new Set(); + modules = []; + visitEntrypoint(code, modulePath) { + if (this.#visitedPaths.has(modulePath)) return; + this.#visitedPaths.add(modulePath); + this.#visitJavaScriptModule(code, modulePath, "ESModule"); + } + #visitJavaScriptModule(code, modulePath, type) { + const name = moduleName(this.modulesRoot, modulePath); + const module2 = createJavaScriptModule(code, name, modulePath, type); + this.modules.push(module2); + const isESM = type === "ESModule"; + let root; + try { + root = (0, import_acorn.parse)(code, { + ecmaVersion: "latest", + sourceType: isESM ? "module" : "script", + locations: true + }); + } catch (e) { + let loc = ""; + if (e.loc?.line !== void 0) { + loc += `:${e.loc.line}`; + if (e.loc.column !== void 0) loc += `:${e.loc.column}`; + } + throw new MiniflareCoreError( + "ERR_MODULE_PARSE", + `Unable to parse "${name}": ${e.message ?? e} + at ${modulePath}${loc}` + ); + } + const visitors = { + ImportDeclaration: (node) => { + this.#visitModule(modulePath, name, type, node.source); + }, + ExportNamedDeclaration: (node) => { + if (node.source != null) { + this.#visitModule(modulePath, name, type, node.source); + } + }, + ExportAllDeclaration: (node) => { + this.#visitModule(modulePath, name, type, node.source); + }, + ImportExpression: (node) => { + this.#visitModule(modulePath, name, type, node.source); + }, + CallExpression: isESM ? void 0 : (node) => { + const argument = node.arguments[0]; + if (node.callee.type === "Identifier" && node.callee.name === "require" && argument !== void 0) { + this.#visitModule(modulePath, name, type, argument); + } + } + }; + (0, import_acorn_walk.simple)(root, visitors); + } + #visitModule(referencingPath, referencingName, referencingType, specExpression) { + if (specExpression.type !== "Literal" || typeof specExpression.value !== "string") { + const modules = this.modules.map((mod) => { + const def = convertWorkerModule(mod); + return ` { type: "${def.type}", path: "${def.path}" }`; + }); + const modulesConfig = ` new Miniflare({ + ..., + modules: [ +${modules.join(",\n")}, + ... + ] + })`; + const prefix = getResolveErrorPrefix(referencingPath); + let message = `${prefix}: dynamic module specifiers are unsupported. +You must manually define your modules when constructing Miniflare: +${dim(modulesConfig)}`; + if (specExpression.loc != null) { + const { line, column } = specExpression.loc.start; + message += ` + at ${referencingPath}:${line}:${column}`; + } + throw new MiniflareCoreError("ERR_MODULE_DYNAMIC_SPEC", message); + } + const spec = specExpression.value; + const isNodeJsCompatModule = referencingType === "NodeJsCompatModule"; + if ( + // `cloudflare:` and `workerd:` imports don't need to be included explicitly + spec.startsWith("cloudflare:") || spec.startsWith("workerd:") || // Node.js compat v1 requires imports to be prefixed with `node:` + this.#nodejsCompatMode === "v1" && spec.startsWith("node:") || // Node.js compat modules and v2 can also handle non-prefixed imports + (this.#nodejsCompatMode === "v2" || isNodeJsCompatModule) && builtinModulesWithPrefix.includes(spec) || // Async Local Storage mode (node_als) only deals with `node:async_hooks` imports + this.#nodejsCompatMode === "als" && spec === "node:async_hooks" || // Any "additional" external modules can be ignored + this.additionalModuleNames.includes(spec) + ) { + return; + } + if (maybeGetStringScriptPathIndex(referencingName) !== void 0) { + const prefix = getResolveErrorPrefix(referencingPath); + throw new MiniflareCoreError( + "ERR_MODULE_STRING_SCRIPT", + `${prefix}: imports are unsupported in string \`script\` without defined \`scriptPath\`` + ); + } + const identifier = import_path16.default.resolve(import_path16.default.dirname(referencingPath), spec); + const name = moduleName(this.modulesRoot, identifier); + if (this.#visitedPaths.has(identifier)) return; + this.#visitedPaths.add(identifier); + const rule = this.#compiledRules.find( + (rule2) => testRegExps(rule2.include, identifier) + ); + if (rule === void 0) { + const prefix = getResolveErrorPrefix(referencingPath); + const isBuiltin = builtinModulesWithPrefix.includes(spec); + const suggestion = isBuiltin ? SUGGEST_NODE : SUGGEST_BUNDLE; + throw new MiniflareCoreError( + "ERR_MODULE_RULE", + `${prefix} "${spec}": no matching module rules. +${suggestion}` + ); + } + const data = (0, import_fs13.readFileSync)(identifier); + switch (rule.type) { + case "ESModule": + case "CommonJS": + case "NodeJsCompatModule": + const code = data.toString("utf8"); + this.#visitJavaScriptModule(code, identifier, rule.type); + break; + case "Text": + this.modules.push({ name, text: data.toString("utf8") }); + break; + case "Data": + this.modules.push({ name, data }); + break; + case "CompiledWasm": + this.modules.push({ name, wasm: data }); + break; + case "PythonModule": + this.modules.push({ name, pythonModule: data.toString("utf-8") }); + break; + case "PythonRequirement": + this.modules.push({ name, pythonRequirement: data.toString("utf-8") }); + break; + default: + const exhaustive = rule.type; + import_assert5.default.fail(`Unreachable: ${exhaustive} modules are unsupported`); + } + } +}; +function createJavaScriptModule(code, name, modulePath, type) { + code = withSourceURL(code, modulePath); + if (type === "ESModule") { + return { name, esModule: code }; + } else if (type === "CommonJS") { + return { name, commonJsModule: code }; + } else if (type === "NodeJsCompatModule") { + return { name, nodeJsCompatModule: code }; + } + const exhaustive = type; + import_assert5.default.fail(`Unreachable: ${exhaustive} JavaScript modules are unsupported`); +} +var encoder = new import_util.TextEncoder(); +var decoder = new import_util.TextDecoder(); +function contentsToString(contents20) { + return typeof contents20 === "string" ? contents20 : decoder.decode(contents20); +} +function contentsToArray(contents20) { + return typeof contents20 === "string" ? encoder.encode(contents20) : contents20; +} +function convertModuleDefinition(modulesRoot, def) { + const name = moduleName(modulesRoot, def.path); + const contents20 = def.contents ?? (0, import_fs13.readFileSync)(def.path); + switch (def.type) { + case "ESModule": + case "CommonJS": + case "NodeJsCompatModule": + return createJavaScriptModule( + contentsToString(contents20), + name, + import_path16.default.resolve(modulesRoot, def.path), + def.type + ); + case "Text": + return { name, text: contentsToString(contents20) }; + case "Data": + return { name, data: contentsToArray(contents20) }; + case "CompiledWasm": + return { name, wasm: contentsToArray(contents20) }; + case "PythonModule": + return { name, pythonModule: contentsToString(contents20) }; + case "PythonRequirement": + return { name, pythonRequirement: contentsToString(contents20) }; + default: + const exhaustive = def.type; + import_assert5.default.fail(`Unreachable: ${exhaustive} modules are unsupported`); + } +} +function convertWorkerModule(mod) { + const path30 = mod.name; + (0, import_assert5.default)(path30 !== void 0); + const m = mod; + if ("esModule" in m) return { path: path30, type: "ESModule" }; + else if ("commonJsModule" in m) return { path: path30, type: "CommonJS" }; + else if ("nodeJsCompatModule" in m) + return { path: path30, type: "NodeJsCompatModule" }; + else if ("text" in m) return { path: path30, type: "Text" }; + else if ("data" in m) return { path: path30, type: "Data" }; + else if ("wasm" in m) return { path: path30, type: "CompiledWasm" }; + else if ("pythonModule" in m) return { path: path30, type: "PythonModule" }; + else if ("pythonRequirement" in m) return { path: path30, type: "PythonRequirement" }; + (0, import_assert5.default)( + !("json" in m || "fallbackService" in m), + "Unreachable: json or fallbackService modules aren't generated" + ); + const exhaustive = m; + import_assert5.default.fail( + `Unreachable: [${Object.keys(exhaustive).join( + ", " + )}] modules are unsupported` + ); +} + +// src/plugins/core/proxy/client.ts +var import_assert8 = __toESM(require("assert")); +var import_crypto2 = __toESM(require("crypto")); +var import_web4 = require("stream/web"); +var import_util2 = __toESM(require("util")); +var import_undici6 = require("undici"); + +// src/plugins/core/proxy/fetch-sync.ts +var import_assert7 = __toESM(require("assert")); +var import_web2 = require("stream/web"); +var import_worker_threads = require("worker_threads"); + +// src/plugins/core/errors/index.ts +var import_fs14 = __toESM(require("fs")); +var import_path17 = __toESM(require("path")); +var import_url15 = require("url"); +var import_zod10 = require("zod"); + +// src/plugins/core/errors/sourcemap.ts +var import_assert6 = __toESM(require("assert")); + +// src/plugins/core/errors/callsite.ts +function parseStack(stack) { + return stack.split("\n").slice(1).map(parseCallSite).filter((site) => site !== void 0); +} +function parseCallSite(line) { + const lineMatch = line.match( + /at (?:(.+?)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/ + ); + if (!lineMatch) { + return; + } + let object = null; + let method = null; + let functionName = null; + let typeName = null; + let methodName = null; + const isNative = lineMatch[5] === "native"; + if (lineMatch[1]) { + functionName = lineMatch[1]; + let methodStart = functionName.lastIndexOf("."); + if (functionName[methodStart - 1] == ".") methodStart--; + if (methodStart > 0) { + object = functionName.substring(0, methodStart); + method = functionName.substring(methodStart + 1); + const objectEnd = object.indexOf(".Module"); + if (objectEnd > 0) { + functionName = functionName.substring(objectEnd + 1); + object = object.substring(0, objectEnd); + } + } + } + if (method) { + typeName = object; + methodName = method; + } + if (method === "") { + methodName = null; + functionName = null; + } + return new CallSite({ + typeName, + functionName, + methodName, + fileName: lineMatch[2] || null, + lineNumber: parseInt(lineMatch[3]) || null, + columnNumber: parseInt(lineMatch[4]) || null, + native: isNative + }); +} +var CallSite = class { + constructor(opts) { + this.opts = opts; + } + getThis() { + return null; + } + getTypeName() { + return this.opts.typeName; + } + // eslint-disable-next-line @typescript-eslint/ban-types + getFunction() { + return void 0; + } + getFunctionName() { + return this.opts.functionName; + } + getMethodName() { + return this.opts.methodName; + } + getFileName() { + return this.opts.fileName ?? void 0; + } + getScriptNameOrSourceURL() { + return this.opts.fileName; + } + getLineNumber() { + return this.opts.lineNumber; + } + getColumnNumber() { + return this.opts.columnNumber; + } + getEvalOrigin() { + return void 0; + } + isToplevel() { + return false; + } + isEval() { + return false; + } + isNative() { + return this.opts.native; + } + isConstructor() { + return false; + } + isAsync() { + return false; + } + isPromiseAll() { + return false; + } + isPromiseAny() { + return false; + } + getPromiseIndex() { + return null; + } +}; + +// src/plugins/core/errors/sourcemap.ts +function getFreshSourceMapSupport() { + const resolvedSupportPath = require.resolve("@cspotcode/source-map-support"); + const originalSymbolFor = Symbol.for; + const originalSupport = require.cache[resolvedSupportPath]; + try { + Symbol.for = (key) => { + import_assert6.default.strictEqual(key, "source-map-support/sharedData"); + return Symbol(key); + }; + delete require.cache[resolvedSupportPath]; + return require(resolvedSupportPath); + } finally { + Symbol.for = originalSymbolFor; + require.cache[resolvedSupportPath] = originalSupport; + } +} +var sourceMapInstallBaseOptions = { + environment: "node", + // Don't add Node `uncaughtException` handler + handleUncaughtExceptions: false, + // Don't hook Node `require` function + hookRequire: false, + redirectConflictingLibrary: false, + // Make sure we're using fresh copies of files (i.e. between `setOptions()`) + emptyCacheBetweenOperations: true, + // Always remove existing retrievers when calling `install()`, we should be + // specifying them each time we want to source map + overrideRetrieveFile: true, + overrideRetrieveSourceMap: true +}; +var sourceMapper; +function getSourceMapper() { + if (sourceMapper !== void 0) return sourceMapper; + const support = getFreshSourceMapSupport(); + const originalPrepareStackTrace = Error.prepareStackTrace; + support.install(sourceMapInstallBaseOptions); + const prepareStackTrace = Error.prepareStackTrace; + (0, import_assert6.default)(prepareStackTrace !== void 0); + Error.prepareStackTrace = originalPrepareStackTrace; + sourceMapper = (retrieveSourceMap, error) => { + support.install({ + ...sourceMapInstallBaseOptions, + retrieveFile(_file) { + return ""; + }, + retrieveSourceMap + }); + const callSites = parseStack(error.stack ?? ""); + return prepareStackTrace(error, callSites); + }; + return sourceMapper; +} + +// src/plugins/core/errors/index.ts +function maybeGetDiskFile(filePath) { + try { + const contents20 = import_fs14.default.readFileSync(filePath, "utf8"); + return { path: filePath, contents: contents20 }; + } catch (e) { + if (e.code !== "ENOENT") throw e; + } +} +function maybeGetFile2(workerSrcOpts, fileSpecifier) { + const maybeUrl = maybeParseURL(fileSpecifier); + if (maybeUrl !== void 0 && maybeUrl.protocol === "file:") { + const filePath = (0, import_url15.fileURLToPath)(maybeUrl); + for (const srcOpts of workerSrcOpts) { + if (Array.isArray(srcOpts.modules)) { + const modulesRoot = srcOpts.modulesRoot ?? ""; + for (const module2 of srcOpts.modules) { + if (module2.contents !== void 0 && import_path17.default.resolve(modulesRoot, module2.path) === filePath) { + const contents20 = contentsToString(module2.contents); + return { path: filePath, contents: contents20 }; + } + } + } else if ("script" in srcOpts && "scriptPath" in srcOpts && srcOpts.script !== void 0 && srcOpts.scriptPath !== void 0) { + const modulesRoot = srcOpts.modules && srcOpts.modulesRoot || ""; + if (import_path17.default.resolve(modulesRoot, srcOpts.scriptPath) === filePath) { + return { path: filePath, contents: srcOpts.script }; + } + } + } + return maybeGetDiskFile(filePath); + } + const workerIndex = maybeGetStringScriptPathIndex(fileSpecifier); + if (workerIndex !== void 0) { + const srcOpts = workerSrcOpts[workerIndex]; + if ("script" in srcOpts && srcOpts.script !== void 0) { + return { contents: srcOpts.script }; + } + } +} +function getSourceMappedStack(workerSrcOpts, error) { + function retrieveSourceMap(fileSpecifier) { + const sourceFile = maybeGetFile2(workerSrcOpts, fileSpecifier); + if (sourceFile?.path === void 0) return null; + const sourceMapRegexp = /# sourceMappingURL=(.+)/g; + const matches = [...sourceFile.contents.matchAll(sourceMapRegexp)]; + if (matches.length === 0) return null; + const sourceMapMatch = matches[matches.length - 1]; + const root = import_path17.default.dirname(sourceFile.path); + const sourceMapPath = import_path17.default.resolve(root, sourceMapMatch[1]); + const sourceMapFile = maybeGetDiskFile(sourceMapPath); + if (sourceMapFile === void 0) return null; + return { map: sourceMapFile.contents, url: sourceMapFile.path }; + } + return getSourceMapper()(retrieveSourceMap, error); +} +var JsonErrorSchema = import_zod10.z.lazy( + () => import_zod10.z.object({ + message: import_zod10.z.string().optional(), + name: import_zod10.z.string().optional(), + stack: import_zod10.z.string().optional(), + cause: JsonErrorSchema.optional() + }) +); +var ALLOWED_ERROR_SUBCLASS_CONSTRUCTORS = [ + EvalError, + RangeError, + ReferenceError, + SyntaxError, + TypeError, + URIError +]; +function reviveError(workerSrcOpts, jsonError) { + let cause; + if (jsonError.cause !== void 0) { + cause = reviveError(workerSrcOpts, jsonError.cause); + } + let ctor = Error; + if (jsonError.name !== void 0 && jsonError.name in globalThis) { + const maybeCtor = globalThis[jsonError.name]; + if (ALLOWED_ERROR_SUBCLASS_CONSTRUCTORS.includes(maybeCtor)) { + ctor = maybeCtor; + } + } + const error = new ctor(jsonError.message, { cause }); + if (jsonError.name !== void 0) error.name = jsonError.name; + error.stack = jsonError.stack; + error.stack = getSourceMappedStack(workerSrcOpts, error); + return error; +} +async function handlePrettyErrorRequest(log, workerSrcOpts, request) { + const caught = JsonErrorSchema.parse(await request.json()); + const error = reviveError(workerSrcOpts, caught); + log.error(error); + const accept = request.headers.get("Accept")?.toLowerCase() ?? ""; + const userAgent = request.headers.get("User-Agent")?.toLowerCase() ?? ""; + const acceptsPrettyError = !userAgent.includes("curl/") && (accept.includes("text/html") || accept.includes("*/*") || accept.includes("text/*")); + if (!acceptsPrettyError) { + return new Response(error.stack, { status: 500 }); + } + const Youch = require("youch"); + const youch = new Youch(error.cause ?? error, { + url: request.cf?.prettyErrorOriginalUrl ?? request.url, + method: request.method, + headers: Object.fromEntries(request.headers) + }); + youch.addLink(() => { + return [ + '\u{1F4DA} Workers Docs', + '\u{1F4AC} Workers Discord' + ].join(""); + }); + return new Response(await youch.toHTML(), { + status: 500, + headers: { "Content-Type": "text/html;charset=utf-8" } + }); +} + +// src/plugins/core/proxy/fetch-sync.ts +var DECODER = new TextDecoder(); +var WORKER_SCRIPT = ( + /* javascript */ + ` +const { createRequire } = require("module"); +const { workerData } = require("worker_threads"); + +// Not using parentPort here so we can call receiveMessageOnPort() in host +const { notifyHandle, port, filename } = workerData; + +// When running Miniflare from Jest, regular 'require("undici")' will fail here +// with "Error: Cannot find module 'undici'". Instead we need to create a +// 'require' using the '__filename' of the host... :( +const actualRequire = createRequire(filename); +const { Pool, fetch } = actualRequire("undici"); + +let dispatcherUrl; +let dispatcher; + +port.addEventListener("message", async (event) => { + const { id, method, url, headers, body } = event.data; + if (dispatcherUrl !== url) { + dispatcherUrl = url; + dispatcher = new Pool(url, { + connect: { rejectUnauthorized: false }, + }); + } + headers["${CoreHeaders.OP_SYNC}"] = "true"; + try { + // body cannot be a ReadableStream, so no need to specify duplex + const response = await fetch(url, { method, headers, body, dispatcher }); + const responseBody = response.headers.get("${CoreHeaders.OP_RESULT_TYPE}") === "ReadableStream" + ? response.body + : await response.arrayBuffer(); + const transferList = responseBody === null ? undefined : [responseBody]; + port.postMessage( + { + id, + response: { + status: response.status, + headers: Object.fromEntries(response.headers), + body: responseBody, + } + }, + transferList + ); + } catch (error) { + try { + port.postMessage({ id, error }); + } catch { + // If error failed to serialise, post simplified version + port.postMessage({ id, error: new Error(String(error)) }); + } + } + Atomics.store(notifyHandle, /* index */ 0, /* value */ 1); + Atomics.notify(notifyHandle, /* index */ 0); +}); +` +); +var SynchronousFetcher = class { + #channel; + #notifyHandle; + #worker; + #nextId = 0; + constructor() { + this.#channel = new import_worker_threads.MessageChannel(); + this.#notifyHandle = new Int32Array(new SharedArrayBuffer(4)); + } + #ensureWorker() { + if (this.#worker !== void 0) return; + this.#worker = new import_worker_threads.Worker(WORKER_SCRIPT, { + eval: true, + workerData: { + notifyHandle: this.#notifyHandle, + port: this.#channel.port2, + filename: __filename + }, + transferList: [this.#channel.port2] + }); + } + fetch(url20, init2) { + this.#ensureWorker(); + Atomics.store( + this.#notifyHandle, + /* index */ + 0, + /* value */ + 0 + ); + const id = this.#nextId++; + this.#channel.port1.postMessage({ + id, + method: init2.method, + url: url20.toString(), + headers: init2.headers, + body: init2.body + }); + Atomics.wait( + this.#notifyHandle, + /* index */ + 0, + /* value */ + 0 + ); + const message = (0, import_worker_threads.receiveMessageOnPort)( + this.#channel.port1 + )?.message; + (0, import_assert7.default)(message?.id === id); + if ("response" in message) { + const { status, headers: rawHeaders, body } = message.response; + const headers = new import_undici4.Headers(rawHeaders); + const stack = headers.get(CoreHeaders.ERROR_STACK); + if (status === 500 && stack !== null && body !== null) { + (0, import_assert7.default)(!(body instanceof import_web2.ReadableStream)); + const caught = JsonErrorSchema.parse(JSON.parse(DECODER.decode(body))); + throw reviveError([], caught); + } + return { status, headers, body }; + } else { + throw message.error; + } + } + async dispose() { + await this.#worker?.terminate(); + } +}; + +// src/plugins/core/proxy/types.ts +var import_buffer = require("buffer"); +var import_consumers = require("stream/consumers"); +var import_web3 = require("stream/web"); +var import_undici5 = require("undici"); +var NODE_PLATFORM_IMPL = { + // Node's implementation of these classes don't quite match Workers', + // but they're close enough for us + Blob: import_buffer.Blob, + File: import_undici5.File, + Headers: import_undici5.Headers, + Request, + Response, + isReadableStream(value) { + return value instanceof import_web3.ReadableStream; + }, + bufferReadableStream(stream) { + return (0, import_consumers.arrayBuffer)(stream); + }, + unbufferReadableStream(buffer) { + return new import_buffer.Blob([new Uint8Array(buffer)]).stream(); + } +}; + +// src/plugins/core/proxy/client.ts +var kAddress = Symbol("kAddress"); +var kName = Symbol("kName"); +var kIsFunction = Symbol("kIsFunction"); +function isNativeTarget(value) { + return typeof value === "object" && value !== null && kAddress in value && kIsFunction in value; +} +var TARGET_GLOBAL = { + [kAddress]: ProxyAddresses.GLOBAL, + [kName]: "global", + [kIsFunction]: false +}; +var TARGET_ENV = { + [kAddress]: ProxyAddresses.ENV, + [kName]: "env", + [kIsFunction]: false +}; +var reducers = { + ...structuredSerializableReducers, + ...createHTTPReducers(NODE_PLATFORM_IMPL), + Native(value) { + if (isNativeTarget(value)) + return [value[kAddress], value[kName], value[kIsFunction]]; + } +}; +var revivers = { + ...structuredSerializableRevivers, + ...createHTTPRevivers(NODE_PLATFORM_IMPL) + // `Native` reviver depends on `ProxyStubHandler` methods +}; +var PROXY_SECRET = import_crypto2.default.randomBytes(16); +var PROXY_SECRET_HEX = PROXY_SECRET.toString("hex"); +function isClientError(status) { + return 400 <= status && status < 500; +} +var ProxyClient = class { + #bridge; + constructor(runtimeEntryURL, dispatchFetch) { + this.#bridge = new ProxyClientBridge(runtimeEntryURL, dispatchFetch); + } + // Lazily initialise proxies as required + #globalProxy; + #envProxy; + get global() { + return this.#globalProxy ??= this.#bridge.getProxy(TARGET_GLOBAL); + } + get env() { + return this.#envProxy ??= this.#bridge.getProxy(TARGET_ENV); + } + poisonProxies() { + this.#bridge.poisonProxies(); + this.#globalProxy = void 0; + this.#envProxy = void 0; + } + setRuntimeEntryURL(runtimeEntryURL) { + this.#bridge.url = runtimeEntryURL; + } + dispose() { + return this.#bridge.dispose(); + } +}; +var ProxyClientBridge = class { + constructor(url20, dispatchFetch) { + this.url = url20; + this.dispatchFetch = dispatchFetch; + this.#finalizationRegistry = new FinalizationRegistry(this.#finalizeProxy); + } + // Each proxy stub is initialised with the version stored here. Whenever + // `poisonProxies()` is called, this version is incremented. Before the + // proxy makes any request to `workerd`, it checks the version number here + // matches its own internal version, and throws if not. + #version = 0; + // Whenever the `ProxyServer` returns a native target, it adds a strong + // reference to the "heap" in the singleton object. This prevents the object + // being garbage collected. To solve this, we register the native target + // proxies on the client in a `FinalizationRegistry`. When the proxies get + // garbage collected, we let the `ProxyServer` know it can release the strong + // "heap" reference, as we'll never be able to access it again. Importantly, + // we need to unregister all proxies from the registry when we poison them, + // as the references will be invalid, and a new object with the same address + // may be added to the "heap". + #finalizationRegistry; + // Garbage collection passes will free lots of objects at once. Rather than + // sending a `DELETE` request for each address, we batch finalisations within + // 100ms of each other into one request. This ensures we don't create *lots* + // of TCP connections to `workerd` in `dispatchFetch()` for all the concurrent + // requests. + #finalizeBatch = []; + #finalizeBatchTimeout; + sync = new SynchronousFetcher(); + get version() { + return this.#version; + } + #finalizeProxy = (held) => { + this.#finalizeBatch.push(held); + clearTimeout(this.#finalizeBatchTimeout); + this.#finalizeBatchTimeout = setTimeout(this.#finalizeProxyBatch, 100); + }; + #finalizeProxyBatch = async () => { + const addresses = []; + for (const held of this.#finalizeBatch.splice(0)) { + if (held.version === this.#version) addresses.push(held.address); + } + if (addresses.length === 0) return; + try { + await this.dispatchFetch(this.url, { + method: "DELETE", + headers: { + [CoreHeaders.OP_SECRET]: PROXY_SECRET_HEX, + [CoreHeaders.OP]: ProxyOps.FREE, + [CoreHeaders.OP_TARGET]: addresses.join(",") + } + }); + } catch { + } + }; + getProxy(target) { + const handler = new ProxyStubHandler(this, target); + let proxyTarget; + if (target[kIsFunction]) { + proxyTarget = new Function(); + } else { + proxyTarget = {}; + } + proxyTarget[import_util2.default.inspect.custom] = handler.inspect; + const proxy = new Proxy(proxyTarget, handler); + const held = { + address: target[kAddress], + version: this.#version + }; + this.#finalizationRegistry.register(proxy, held, this); + return proxy; + } + poisonProxies() { + this.#version++; + this.#finalizationRegistry.unregister(this); + } + dispose() { + this.poisonProxies(); + return this.sync.dispose(); + } +}; +var ProxyStubHandler = class extends Function { + constructor(bridge, target) { + super(); + this.bridge = bridge; + this.target = target; + this.#version = bridge.version; + this.#stringifiedTarget = stringify(this.target, reducers); + } + #version; + #stringifiedTarget; + #knownValues = /* @__PURE__ */ new Map(); + #knownDescriptors = /* @__PURE__ */ new Map(); + #knownOwnKeys; + revivers = { + ...revivers, + Native: (value) => { + (0, import_assert8.default)(Array.isArray(value)); + const [address, name, isFunction] = value; + (0, import_assert8.default)(typeof address === "number"); + (0, import_assert8.default)(typeof name === "string"); + (0, import_assert8.default)(typeof isFunction === "boolean"); + const target = { + [kAddress]: address, + [kName]: name, + [kIsFunction]: isFunction + }; + if (name === "Promise") { + const resPromise = this.bridge.dispatchFetch(this.bridge.url, { + method: "POST", + headers: { + [CoreHeaders.OP_SECRET]: PROXY_SECRET_HEX, + [CoreHeaders.OP]: ProxyOps.GET, + // GET without key just gets target + [CoreHeaders.OP_TARGET]: stringify(target, reducers) + } + }); + return this.#parseAsyncResponse(resPromise); + } else { + return this.bridge.getProxy(target); + } + } + }; + get #poisoned() { + return this.#version !== this.bridge.version; + } + #assertSafe() { + if (this.#poisoned) { + throw new Error( + "Attempted to use poisoned stub. Stubs to runtime objects must be re-created after calling `Miniflare#setOptions()` or `Miniflare#dispose()`." + ); + } + } + inspect = (depth, options) => { + const details = { name: this.target[kName], poisoned: this.#poisoned }; + return `ProxyStub ${import_util2.default.inspect(details, options)}`; + }; + #maybeThrow(res, result, caller) { + if (res.status === 500) { + if (typeof result === "object" && result !== null) { + Error.captureStackTrace(result, caller); + } + throw result; + } else { + (0, import_assert8.default)(res.status === 200); + return result; + } + } + async #parseAsyncResponse(resPromise) { + const res = await resPromise; + (0, import_assert8.default)(!isClientError(res.status)); + const typeHeader = res.headers.get(CoreHeaders.OP_RESULT_TYPE); + if (typeHeader === "Promise, ReadableStream") return res.body; + (0, import_assert8.default)(typeHeader === "Promise"); + let stringifiedResult; + let unbufferedStream; + const stringifiedSizeHeader = res.headers.get( + CoreHeaders.OP_STRINGIFIED_SIZE + ); + if (stringifiedSizeHeader === null) { + stringifiedResult = await res.text(); + } else { + const stringifiedSize = parseInt(stringifiedSizeHeader); + (0, import_assert8.default)(!Number.isNaN(stringifiedSize)); + (0, import_assert8.default)(res.body !== null); + const [buffer, rest] = await readPrefix(res.body, stringifiedSize); + stringifiedResult = buffer.toString(); + unbufferedStream = rest.pipeThrough(new import_web4.TransformStream()); + } + const result = parseWithReadableStreams( + NODE_PLATFORM_IMPL, + { value: stringifiedResult, unbufferedStream }, + this.revivers + ); + return this.#maybeThrow(res, result, this.#parseAsyncResponse); + } + #parseSyncResponse(syncRes, caller) { + (0, import_assert8.default)(!isClientError(syncRes.status)); + (0, import_assert8.default)(syncRes.body !== null); + (0, import_assert8.default)(syncRes.headers.get(CoreHeaders.OP_STRINGIFIED_SIZE) === null); + if (syncRes.body instanceof import_web4.ReadableStream) return syncRes.body; + const stringifiedResult = DECODER.decode(syncRes.body); + const result = parseWithReadableStreams( + NODE_PLATFORM_IMPL, + { value: stringifiedResult }, + this.revivers + ); + return this.#maybeThrow(syncRes, result, caller); + } + #thisFnKnownAsync = false; + apply(_target, ...args) { + const result = this.#call( + "__miniflareWrappedFunction", + this.#thisFnKnownAsync, + args[1], + this + ); + if (!this.#thisFnKnownAsync && result instanceof Promise) { + this.#thisFnKnownAsync = true; + } + return result; + } + get(_target, key, _receiver) { + this.#assertSafe(); + if (key === kAddress) return this.target[kAddress]; + if (key === kName) return this.target[kName]; + if (key === kIsFunction) return this.target[kIsFunction]; + if (typeof key === "symbol" || key === "then") return void 0; + const maybeKnown = this.#knownValues.get(key); + if (maybeKnown !== void 0) return maybeKnown; + const syncRes = this.bridge.sync.fetch(this.bridge.url, { + method: "POST", + headers: { + [CoreHeaders.OP_SECRET]: PROXY_SECRET_HEX, + [CoreHeaders.OP]: ProxyOps.GET, + [CoreHeaders.OP_TARGET]: this.#stringifiedTarget, + [CoreHeaders.OP_KEY]: key + } + }); + let result; + if (syncRes.headers.get(CoreHeaders.OP_RESULT_TYPE) === "Function") { + result = this.#createFunction(key); + } else { + result = this.#parseSyncResponse(syncRes, this.get); + } + if ( + // Optimisation: if this property is a function, we assume constant + // prototypes of proxied objects, so it's never going to change + typeof result === "function" || // Optimisation: if this property is a reference, we assume it's never + // going to change. This allows us to reuse the known cache of nested + // objects on multiple access (e.g. reusing `env["..."]` proxy if + // `getR2Bucket()` is called on the same bucket multiple times). + isNativeTarget(result) || // Once a `ReadableStream` sent across proxy, we won't be able to read it + // again in the server, so reuse the same stream for future accesses + // (e.g. accessing `R2ObjectBody#body` multiple times) + result instanceof import_web4.ReadableStream + ) { + this.#knownValues.set(key, result); + } + return result; + } + has(target, key) { + return this.get(target, key, void 0) !== void 0; + } + getOwnPropertyDescriptor(target, key) { + this.#assertSafe(); + if (typeof key === "symbol") return void 0; + const maybeKnown = this.#knownDescriptors.get(key); + if (maybeKnown !== void 0) return maybeKnown; + const syncRes = this.bridge.sync.fetch(this.bridge.url, { + method: "POST", + headers: { + [CoreHeaders.OP_SECRET]: PROXY_SECRET_HEX, + [CoreHeaders.OP]: ProxyOps.GET_OWN_DESCRIPTOR, + [CoreHeaders.OP_KEY]: key, + [CoreHeaders.OP_TARGET]: this.#stringifiedTarget + } + }); + const result = this.#parseSyncResponse( + syncRes, + this.getOwnPropertyDescriptor + ); + this.#knownDescriptors.set(key, result); + return result; + } + ownKeys(_target) { + this.#assertSafe(); + if (this.#knownOwnKeys !== void 0) return this.#knownOwnKeys; + const syncRes = this.bridge.sync.fetch(this.bridge.url, { + method: "POST", + headers: { + [CoreHeaders.OP_SECRET]: PROXY_SECRET_HEX, + [CoreHeaders.OP]: ProxyOps.GET_OWN_KEYS, + [CoreHeaders.OP_TARGET]: this.#stringifiedTarget + } + }); + const result = this.#parseSyncResponse(syncRes, this.ownKeys); + this.#knownOwnKeys = result; + return result; + } + getPrototypeOf(_target) { + this.#assertSafe(); + return null; + } + #createFunction(key) { + let knownAsync = false; + const func = { + [key]: (...args) => { + const result = this.#call(key, knownAsync, args, func); + if (!knownAsync && result instanceof Promise) knownAsync = true; + return result; + } + }[key]; + return func; + } + #call(key, knownAsync, args, caller) { + this.#assertSafe(); + const targetName = this.target[kName]; + if (isFetcherFetch(targetName, key)) return this.#fetcherFetchCall(args); + const stringified = stringifyWithStreams( + NODE_PLATFORM_IMPL, + args, + reducers, + /* allowUnbufferedStream */ + true + ); + if (knownAsync || // We assume every call with `ReadableStream`/`Blob` arguments is async. + // Note that you can't consume `ReadableStream`/`Blob` synchronously: if + // you tried a similar trick to `SynchronousFetcher`, blocking the main + // thread with `Atomics.wait()` would prevent chunks being read. This + // assumption doesn't hold for `Blob`s and `FormData#{append,set}()`, but + // we should never expose proxies for those APIs to users. + stringified instanceof Promise || // (instanceof Promise if buffered `ReadableStream`/`Blob`s) + stringified.unbufferedStream !== void 0) { + return this.#asyncCall(key, stringified); + } else { + const result = this.#syncCall(key, stringified.value, caller); + if (isR2ObjectWriteHttpMetadata(targetName, key)) { + const arg = args[0]; + (0, import_assert8.default)(arg instanceof import_undici6.Headers); + (0, import_assert8.default)(result instanceof import_undici6.Headers); + for (const [key2, value] of result) arg.set(key2, value); + return; + } + return result; + } + } + #syncCall(key, stringifiedValue, caller) { + const argsSize = Buffer.byteLength(stringifiedValue).toString(); + const syncRes = this.bridge.sync.fetch(this.bridge.url, { + method: "POST", + headers: { + [CoreHeaders.OP_SECRET]: PROXY_SECRET_HEX, + [CoreHeaders.OP]: ProxyOps.CALL, + [CoreHeaders.OP_TARGET]: this.#stringifiedTarget, + [CoreHeaders.OP_KEY]: key, + [CoreHeaders.OP_STRINGIFIED_SIZE]: argsSize, + "Content-Length": argsSize + }, + body: stringifiedValue + }); + return this.#parseSyncResponse(syncRes, caller); + } + async #asyncCall(key, stringifiedAwaitable) { + const stringified = await stringifiedAwaitable; + let resPromise; + if (stringified.unbufferedStream === void 0) { + const argsSize = Buffer.byteLength(stringified.value).toString(); + resPromise = this.bridge.dispatchFetch(this.bridge.url, { + method: "POST", + headers: { + [CoreHeaders.OP_SECRET]: PROXY_SECRET_HEX, + [CoreHeaders.OP]: ProxyOps.CALL, + [CoreHeaders.OP_TARGET]: this.#stringifiedTarget, + [CoreHeaders.OP_KEY]: key, + [CoreHeaders.OP_STRINGIFIED_SIZE]: argsSize, + "Content-Length": argsSize + }, + body: stringified.value + }); + } else { + const encodedArgs = Buffer.from(stringified.value); + const argsSize = encodedArgs.byteLength.toString(); + const body = prefixStream(encodedArgs, stringified.unbufferedStream); + resPromise = this.bridge.dispatchFetch(this.bridge.url, { + method: "POST", + headers: { + [CoreHeaders.OP_SECRET]: PROXY_SECRET_HEX, + [CoreHeaders.OP]: ProxyOps.CALL, + [CoreHeaders.OP_TARGET]: this.#stringifiedTarget, + [CoreHeaders.OP_KEY]: key, + [CoreHeaders.OP_STRINGIFIED_SIZE]: argsSize + }, + duplex: "half", + body + }); + } + return this.#parseAsyncResponse(resPromise); + } + #fetcherFetchCall(args) { + const request = new Request(...args); + request.headers.set(CoreHeaders.OP_SECRET, PROXY_SECRET_HEX); + request.headers.set(CoreHeaders.OP, ProxyOps.CALL); + request.headers.set(CoreHeaders.OP_TARGET, this.#stringifiedTarget); + request.headers.set(CoreHeaders.OP_KEY, "fetch"); + return this.bridge.dispatchFetch(request); + } +}; + +// src/plugins/core/services.ts +var import_zod11 = require("zod"); +var kCurrentWorker = Symbol.for("miniflare.kCurrentWorker"); +var HttpOptionsHeaderSchema = import_zod11.z.object({ + name: import_zod11.z.string(), + // name should be required + value: import_zod11.z.ostring() + // If omitted, the header will be removed +}); +var HttpOptionsSchema = import_zod11.z.object({ + style: import_zod11.z.nativeEnum(HttpOptions_Style).optional(), + forwardedProtoHeader: import_zod11.z.ostring(), + cfBlobHeader: import_zod11.z.ostring(), + injectRequestHeaders: HttpOptionsHeaderSchema.array().optional(), + injectResponseHeaders: HttpOptionsHeaderSchema.array().optional() +}).transform((options) => ({ + ...options, + capnpConnectHost: HOST_CAPNP_CONNECT +})); +var TlsOptionsKeypairSchema = import_zod11.z.object({ + privateKey: import_zod11.z.ostring(), + certificateChain: import_zod11.z.ostring() +}); +var TlsOptionsSchema = import_zod11.z.object({ + keypair: TlsOptionsKeypairSchema.optional(), + requireClientCerts: import_zod11.z.oboolean(), + trustBrowserCas: import_zod11.z.oboolean(), + trustedCertificates: import_zod11.z.string().array().optional(), + minVersion: import_zod11.z.nativeEnum(TlsOptions_Version).optional(), + cipherList: import_zod11.z.ostring() +}); +var NetworkSchema = import_zod11.z.object({ + allow: import_zod11.z.string().array().optional(), + deny: import_zod11.z.string().array().optional(), + tlsOptions: TlsOptionsSchema.optional() +}); +var ExternalServerSchema = import_zod11.z.intersection( + import_zod11.z.object({ address: import_zod11.z.string() }), + // address should be required + import_zod11.z.union([ + import_zod11.z.object({ http: import_zod11.z.optional(HttpOptionsSchema) }), + import_zod11.z.object({ + https: import_zod11.z.optional( + import_zod11.z.object({ + options: HttpOptionsSchema.optional(), + tlsOptions: TlsOptionsSchema.optional(), + certificateHost: import_zod11.z.ostring() + }) + ) + }) + ]) +); +var DiskDirectorySchema = import_zod11.z.object({ + path: import_zod11.z.string(), + // path should be required + writable: import_zod11.z.oboolean() +}); +var ServiceFetchSchema = import_zod11.z.custom((v) => typeof v === "function"); +var ServiceDesignatorSchema = import_zod11.z.union([ + import_zod11.z.string(), + import_zod11.z.literal(kCurrentWorker), + import_zod11.z.object({ + name: import_zod11.z.union([import_zod11.z.string(), import_zod11.z.literal(kCurrentWorker)]), + entrypoint: import_zod11.z.ostring() + }), + import_zod11.z.object({ network: NetworkSchema }), + import_zod11.z.object({ external: ExternalServerSchema }), + import_zod11.z.object({ disk: DiskDirectorySchema }), + ServiceFetchSchema +]); + +// src/plugins/core/index.ts +var trustedCertificates = process.platform === "win32" ? Array.from(import_tls.default.rootCertificates) : []; +if (process.env.NODE_EXTRA_CA_CERTS !== void 0) { + try { + const extra = (0, import_fs15.readFileSync)(process.env.NODE_EXTRA_CA_CERTS, "utf8"); + const pemBegin = "-----BEGIN"; + for (const cert of extra.split(pemBegin)) { + if (cert.trim() !== "") trustedCertificates.push(pemBegin + cert); + } + } catch { + } +} +var encoder2 = new import_util3.TextEncoder(); +var numericCompare = new Intl.Collator(void 0, { numeric: true }).compare; +function createFetchMock() { + return new import_undici7.MockAgent(); +} +var WrappedBindingSchema = import_zod12.z.object({ + scriptName: import_zod12.z.string(), + entrypoint: import_zod12.z.string().optional(), + bindings: import_zod12.z.record(JsonSchema).optional() +}); +var UnusableStringSchema = import_zod12.z.string().transform(() => void 0); +var UnsafeDirectSocketSchema = import_zod12.z.object({ + host: import_zod12.z.ostring(), + port: import_zod12.z.onumber(), + entrypoint: import_zod12.z.ostring(), + proxy: import_zod12.z.oboolean() +}); +var CoreOptionsSchemaInput = import_zod12.z.intersection( + SourceOptionsSchema, + import_zod12.z.object({ + name: import_zod12.z.string().optional(), + rootPath: UnusableStringSchema.optional(), + compatibilityDate: import_zod12.z.string().optional(), + compatibilityFlags: import_zod12.z.string().array().optional(), + unsafeInspectorProxy: import_zod12.z.boolean().optional(), + routes: import_zod12.z.string().array().optional(), + bindings: import_zod12.z.record(JsonSchema).optional(), + wasmBindings: import_zod12.z.record(import_zod12.z.union([PathSchema, import_zod12.z.instanceof(Uint8Array)])).optional(), + textBlobBindings: import_zod12.z.record(PathSchema).optional(), + dataBlobBindings: import_zod12.z.record(import_zod12.z.union([PathSchema, import_zod12.z.instanceof(Uint8Array)])).optional(), + serviceBindings: import_zod12.z.record(ServiceDesignatorSchema).optional(), + wrappedBindings: import_zod12.z.record(import_zod12.z.union([import_zod12.z.string(), WrappedBindingSchema])).optional(), + outboundService: ServiceDesignatorSchema.optional(), + fetchMock: import_zod12.z.instanceof(import_undici7.MockAgent).optional(), + // TODO(soon): remove this in favour of per-object `unsafeUniqueKey: kEphemeralUniqueKey` + unsafeEphemeralDurableObjects: import_zod12.z.boolean().optional(), + unsafeDirectSockets: UnsafeDirectSocketSchema.array().optional(), + unsafeEvalBinding: import_zod12.z.string().optional(), + unsafeUseModuleFallbackService: import_zod12.z.boolean().optional(), + /** Used to set the vitest pool worker SELF binding to point to the Router Worker if there are assets. + (If there are assets but we're not using vitest, the miniflare entry worker can point directly to + Router Worker) + */ + hasAssetsAndIsVitest: import_zod12.z.boolean().optional(), + unsafeEnableAssetsRpc: import_zod12.z.boolean().optional() + }) +); +var CoreOptionsSchema = CoreOptionsSchemaInput.transform((value) => { + const fetchMock = value.fetchMock; + if (fetchMock !== void 0) { + if (value.outboundService !== void 0) { + throw new MiniflareCoreError( + "ERR_MULTIPLE_OUTBOUNDS", + "Only one of `outboundService` or `fetchMock` may be specified per worker" + ); + } + value.fetchMock = void 0; + value.outboundService = (req) => fetch4(req, { dispatcher: fetchMock }); + } + return value; +}); +var CoreSharedOptionsSchema = import_zod12.z.object({ + rootPath: UnusableStringSchema.optional(), + host: import_zod12.z.string().optional(), + port: import_zod12.z.number().optional(), + https: import_zod12.z.boolean().optional(), + httpsKey: import_zod12.z.string().optional(), + httpsKeyPath: import_zod12.z.string().optional(), + httpsCert: import_zod12.z.string().optional(), + httpsCertPath: import_zod12.z.string().optional(), + inspectorPort: import_zod12.z.number().optional(), + verbose: import_zod12.z.boolean().optional(), + log: import_zod12.z.instanceof(Log).optional(), + handleRuntimeStdio: import_zod12.z.function(import_zod12.z.tuple([import_zod12.z.instanceof(import_stream2.Readable), import_zod12.z.instanceof(import_stream2.Readable)])).optional(), + upstream: import_zod12.z.string().optional(), + // TODO: add back validation of cf object + cf: import_zod12.z.union([import_zod12.z.boolean(), import_zod12.z.string(), import_zod12.z.record(import_zod12.z.any())]).optional(), + liveReload: import_zod12.z.boolean().optional(), + // This is a shared secret between a proxy server and miniflare that can be + // passed in a header to prove that the request came from the proxy and not + // some malicious attacker. + unsafeProxySharedSecret: import_zod12.z.string().optional(), + unsafeModuleFallbackService: ServiceFetchSchema.optional(), + // Keep blobs when deleting/overwriting keys, required for stacked storage + unsafeStickyBlobs: import_zod12.z.boolean().optional(), + unsafeEnableAssetsRpc: import_zod12.z.boolean().optional() +}); +var CORE_PLUGIN_NAME2 = "core"; +var LIVE_RELOAD_SCRIPT_TEMPLATE = (port) => ``; +var SCRIPT_CUSTOM_SERVICE = `addEventListener("fetch", (event) => { + const request = new Request(event.request); + request.headers.set("${CoreHeaders.CUSTOM_SERVICE}", ${CoreBindings.TEXT_CUSTOM_SERVICE}); + request.headers.set("${CoreHeaders.ORIGINAL_URL}", request.url); + event.respondWith(${CoreBindings.SERVICE_LOOPBACK}.fetch(request)); +})`; +function getCustomServiceDesignator(refererName, workerIndex, kind, name, service, hasAssetsAndIsVitest = false, unsafeEnableAssetsRpc = false) { + let serviceName; + let entrypoint; + if (typeof service === "function") { + serviceName = getCustomServiceName(workerIndex, kind, name); + } else if (typeof service === "object") { + if ("name" in service) { + if (service.name === kCurrentWorker) { + serviceName = getUserServiceName(refererName); + } else { + serviceName = getUserServiceName(service.name); + } + entrypoint = service.entrypoint; + } else { + serviceName = getBuiltinServiceName(workerIndex, kind, name); + } + } else if (service === kCurrentWorker) { + serviceName = hasAssetsAndIsVitest ? unsafeEnableAssetsRpc ? `${RPC_PROXY_SERVICE_NAME}:${refererName}` : `${ROUTER_SERVICE_NAME}:${refererName}` : getUserServiceName(refererName); + } else { + serviceName = getUserServiceName(service); + } + return { name: serviceName, entrypoint }; +} +function maybeGetCustomServiceService(workerIndex, kind, name, service) { + if (typeof service === "function") { + return { + name: getCustomServiceName(workerIndex, kind, name), + worker: { + serviceWorkerScript: SCRIPT_CUSTOM_SERVICE, + compatibilityDate: "2022-09-01", + bindings: [ + { + name: CoreBindings.TEXT_CUSTOM_SERVICE, + text: `${workerIndex}/${kind}${name}` + }, + WORKER_BINDING_SERVICE_LOOPBACK + ] + } + }; + } else if (typeof service === "object" && !("name" in service)) { + return { + name: getBuiltinServiceName(workerIndex, kind, name), + ...service + }; + } +} +var FALLBACK_COMPATIBILITY_DATE = "2000-01-01"; +function getCurrentCompatibilityDate() { + const now = (/* @__PURE__ */ new Date()).toISOString(); + return now.substring(0, now.indexOf("T")); +} +function validateCompatibilityDate(log, compatibilityDate) { + if (numericCompare(compatibilityDate, getCurrentCompatibilityDate()) > 0) { + throw new MiniflareCoreError( + "ERR_FUTURE_COMPATIBILITY_DATE", + `Compatibility date "${compatibilityDate}" is in the future and unsupported` + ); + } else if (numericCompare(compatibilityDate, import_workerd2.compatibilityDate) > 0) { + log.warn( + [ + "The latest compatibility date supported by the installed Cloudflare Workers Runtime is ", + bold(`"${import_workerd2.compatibilityDate}"`), + ",\nbut you've requested ", + bold(`"${compatibilityDate}"`), + ". Falling back to ", + bold(`"${import_workerd2.compatibilityDate}"`), + "..." + ].join("") + ); + return import_workerd2.compatibilityDate; + } + return compatibilityDate; +} +function buildBindings(bindings) { + return Object.entries(bindings).map(([name, value]) => { + if (typeof value === "string") { + return { + name, + text: value + }; + } else { + return { + name, + json: JSON.stringify(value) + }; + } + }); +} +var WRAPPED_MODULE_PREFIX = "miniflare-internal:wrapped:"; +function workerNameToWrappedModule(workerName) { + return WRAPPED_MODULE_PREFIX + workerName; +} +function maybeWrappedModuleToWorkerName(name) { + if (name.startsWith(WRAPPED_MODULE_PREFIX)) { + return name.substring(WRAPPED_MODULE_PREFIX.length); + } +} +var CORE_PLUGIN = { + options: CoreOptionsSchema, + sharedOptions: CoreSharedOptionsSchema, + getBindings(options, workerIndex) { + const bindings = []; + if (options.bindings !== void 0) { + bindings.push(...buildBindings(options.bindings)); + } + if (options.wasmBindings !== void 0) { + bindings.push( + ...Object.entries(options.wasmBindings).map( + ([name, value]) => typeof value === "string" ? import_promises6.default.readFile(value).then((wasmModule) => ({ name, wasmModule })) : { name, wasmModule: value } + ) + ); + } + if (options.textBlobBindings !== void 0) { + bindings.push( + ...Object.entries(options.textBlobBindings).map( + ([name, path30]) => import_promises6.default.readFile(path30, "utf8").then((text) => ({ name, text })) + ) + ); + } + if (options.dataBlobBindings !== void 0) { + bindings.push( + ...Object.entries(options.dataBlobBindings).map( + ([name, value]) => typeof value === "string" ? import_promises6.default.readFile(value).then((data) => ({ name, data })) : { name, data: value } + ) + ); + } + if (options.serviceBindings !== void 0) { + bindings.push( + ...Object.entries(options.serviceBindings).map(([name, service]) => { + return { + name, + service: getCustomServiceDesignator( + /* referrer */ + options.name, + workerIndex, + "#" /* UNKNOWN */, + name, + service, + options.hasAssetsAndIsVitest, + options.unsafeEnableAssetsRpc + ) + }; + }) + ); + } + if (options.wrappedBindings !== void 0) { + bindings.push( + ...Object.entries(options.wrappedBindings).map(([name, designator]) => { + const isObject = typeof designator === "object"; + const scriptName = isObject ? designator.scriptName : designator; + const entrypoint = isObject ? designator.entrypoint : void 0; + const bindings2 = isObject ? designator.bindings : void 0; + const moduleName2 = workerNameToWrappedModule(scriptName); + const innerBindings = bindings2 === void 0 ? [] : buildBindings(bindings2); + return { + name, + wrapped: { moduleName: moduleName2, entrypoint, innerBindings } + }; + }) + ); + } + if (options.unsafeEvalBinding !== void 0) { + bindings.push({ + name: options.unsafeEvalBinding, + unsafeEval: kVoid + }); + } + return Promise.all(bindings); + }, + async getNodeBindings(options) { + const bindingEntries3 = []; + if (options.bindings !== void 0) { + bindingEntries3.push( + ...Object.entries(options.bindings).map(([name, value]) => [ + name, + JSON.parse(JSON.stringify(value)) + ]) + ); + } + if (options.wasmBindings !== void 0) { + bindingEntries3.push( + ...Object.entries(options.wasmBindings).map( + ([name, value]) => typeof value === "string" ? import_promises6.default.readFile(value).then((buffer) => [name, new WebAssembly.Module(buffer)]) : [name, new WebAssembly.Module(value)] + ) + ); + } + if (options.textBlobBindings !== void 0) { + bindingEntries3.push( + ...Object.entries(options.textBlobBindings).map( + ([name, path30]) => import_promises6.default.readFile(path30, "utf8").then((text) => [name, text]) + ) + ); + } + if (options.dataBlobBindings !== void 0) { + bindingEntries3.push( + ...Object.entries(options.dataBlobBindings).map( + ([name, value]) => typeof value === "string" ? import_promises6.default.readFile(value).then((buffer) => [name, viewToBuffer(buffer)]) : [name, viewToBuffer(value)] + ) + ); + } + if (options.serviceBindings !== void 0) { + bindingEntries3.push( + ...Object.keys(options.serviceBindings).map((name) => [ + name, + new ProxyNodeBinding() + ]) + ); + } + if (options.wrappedBindings !== void 0) { + bindingEntries3.push( + ...Object.keys(options.wrappedBindings).map((name) => [ + name, + new ProxyNodeBinding() + ]) + ); + } + return Object.fromEntries(await Promise.all(bindingEntries3)); + }, + async getServices({ + log, + options, + sharedOptions, + workerBindings, + workerIndex, + wrappedBindingNames, + durableObjectClassNames, + additionalModules, + loopbackPort + }) { + const additionalModuleNames = additionalModules.map(({ name: name2 }) => name2); + const workerScript = getWorkerScript( + options, + workerIndex, + additionalModuleNames + ); + if ("modules" in workerScript) { + const subDirs = new Set( + workerScript.modules.map(({ name: name2 }) => import_path18.default.posix.dirname(name2)) + ); + subDirs.delete("."); + for (const module2 of additionalModules) { + workerScript.modules.push(module2); + for (const subDir of subDirs) { + const relativePath = import_path18.default.posix.relative(subDir, module2.name); + const relativePathString = JSON.stringify(relativePath); + workerScript.modules.push({ + name: import_path18.default.posix.join(subDir, module2.name), + // TODO(someday): if we ever have additional modules without + // default exports, this may be a problem. For now, our only + // additional module is `__STATIC_CONTENT_MANIFEST` so it's fine. + // If needed, we could look for instances of `export default` or + // `as default` in the module's code as a heuristic. + esModule: `export * from ${relativePathString}; export { default } from ${relativePathString};` + }); + } + } + } + const name = options.name ?? ""; + const serviceName = getUserServiceName(options.name); + const classNames = durableObjectClassNames.get(serviceName); + const classNamesEntries = Array.from(classNames ?? []); + const compatibilityDate = validateCompatibilityDate( + log, + options.compatibilityDate ?? FALLBACK_COMPATIBILITY_DATE + ); + const isWrappedBinding = wrappedBindingNames.has(name); + const services = []; + const extensions = []; + if (isWrappedBinding) { + let invalidWrapped2 = function(reason) { + const message = `Cannot use ${stringName} for wrapped binding because ${reason}`; + throw new MiniflareCoreError("ERR_INVALID_WRAPPED", message); + }; + var invalidWrapped = invalidWrapped2; + const stringName = JSON.stringify(name); + if (workerIndex === 0) { + invalidWrapped2( + `it's the entrypoint. +Ensure ${stringName} isn't the first entry in the \`workers\` array.` + ); + } + if (!("modules" in workerScript)) { + invalidWrapped2( + `it's a service worker. +Ensure ${stringName} sets \`modules\` to \`true\` or an array of modules` + ); + } + if (workerScript.modules.length !== 1) { + invalidWrapped2( + `it isn't a single module. +Ensure ${stringName} doesn't include unbundled \`import\`s.` + ); + } + const firstModule = workerScript.modules[0]; + if (!("esModule" in firstModule)) { + invalidWrapped2("it isn't a single ES module"); + } + if (options.compatibilityDate !== void 0) { + invalidWrapped2( + "it defines a compatibility date.\nWrapped bindings use the compatibility date of the worker with the binding." + ); + } + if (options.compatibilityFlags?.length) { + invalidWrapped2( + "it defines compatibility flags.\nWrapped bindings use the compatibility flags of the worker with the binding." + ); + } + if (options.outboundService !== void 0) { + invalidWrapped2( + "it defines an outbound service.\nWrapped bindings use the outbound service of the worker with the binding." + ); + } + extensions.push({ + modules: [ + { + name: workerNameToWrappedModule(name), + esModule: firstModule.esModule, + internal: true + } + ] + }); + } else { + services.push({ + name: serviceName, + worker: { + ...workerScript, + compatibilityDate, + compatibilityFlags: options.compatibilityFlags, + bindings: workerBindings, + durableObjectNamespaces: classNamesEntries.map( + ([ + className, + { enableSql, unsafeUniqueKey, unsafePreventEviction } + ]) => { + if (unsafeUniqueKey === kUnsafeEphemeralUniqueKey) { + return { + className, + enableSql, + ephemeralLocal: kVoid, + preventEviction: unsafePreventEviction + }; + } else { + return { + className, + enableSql, + // This `uniqueKey` will (among other things) be used as part of the + // path when persisting to the file-system. `-` is invalid in + // JavaScript class names, but safe on filesystems (incl. Windows). + uniqueKey: unsafeUniqueKey ?? `${options.name ?? ""}-${className}`, + preventEviction: unsafePreventEviction + }; + } + } + ), + durableObjectStorage: classNamesEntries.length === 0 ? void 0 : options.unsafeEphemeralDurableObjects ? { inMemory: kVoid } : { localDisk: DURABLE_OBJECTS_STORAGE_SERVICE_NAME }, + globalOutbound: options.outboundService === void 0 ? void 0 : getCustomServiceDesignator( + /* referrer */ + options.name, + workerIndex, + "$" /* KNOWN */, + CUSTOM_SERVICE_KNOWN_OUTBOUND, + options.outboundService, + options.hasAssetsAndIsVitest, + options.unsafeEnableAssetsRpc + ), + cacheApiOutbound: { name: getCacheServiceName(workerIndex) }, + moduleFallback: options.unsafeUseModuleFallbackService && sharedOptions.unsafeModuleFallbackService !== void 0 ? `localhost:${loopbackPort}` : void 0 + } + }); + } + if (options.serviceBindings !== void 0) { + for (const [name2, service] of Object.entries(options.serviceBindings)) { + const maybeService = maybeGetCustomServiceService( + workerIndex, + "#" /* UNKNOWN */, + name2, + service + ); + if (maybeService !== void 0) services.push(maybeService); + } + } + if (options.outboundService !== void 0) { + const maybeService = maybeGetCustomServiceService( + workerIndex, + "$" /* KNOWN */, + CUSTOM_SERVICE_KNOWN_OUTBOUND, + options.outboundService + ); + if (maybeService !== void 0) services.push(maybeService); + } + return { services, extensions }; + } +}; +function getGlobalServices({ + sharedOptions, + allWorkerRoutes, + fallbackWorkerName, + loopbackPort, + log, + proxyBindings +}) { + const workerNames = [...allWorkerRoutes.keys()]; + const routes = parseRoutes(allWorkerRoutes); + const serviceEntryBindings = [ + WORKER_BINDING_SERVICE_LOOPBACK, + // For converting stack-traces to pretty-error pages + { name: CoreBindings.JSON_ROUTES, json: JSON.stringify(routes) }, + { name: CoreBindings.JSON_CF_BLOB, json: JSON.stringify(sharedOptions.cf) }, + { name: CoreBindings.JSON_LOG_LEVEL, json: JSON.stringify(log.level) }, + { + name: CoreBindings.SERVICE_USER_FALLBACK, + service: { name: fallbackWorkerName } + }, + ...workerNames.map((name) => ({ + name: CoreBindings.SERVICE_USER_ROUTE_PREFIX + name, + service: { name: getUserServiceName(name) } + })), + { + name: CoreBindings.DURABLE_OBJECT_NAMESPACE_PROXY, + durableObjectNamespace: { className: "ProxyServer" } + }, + { + name: CoreBindings.DATA_PROXY_SECRET, + data: PROXY_SECRET + }, + // Add `proxyBindings` here, they'll be added to the `ProxyServer` `env` + ...proxyBindings + ]; + if (sharedOptions.upstream !== void 0) { + serviceEntryBindings.push({ + name: CoreBindings.TEXT_UPSTREAM_URL, + text: sharedOptions.upstream + }); + } + if (sharedOptions.unsafeProxySharedSecret !== void 0) { + serviceEntryBindings.push({ + name: CoreBindings.DATA_PROXY_SHARED_SECRET, + data: encoder2.encode(sharedOptions.unsafeProxySharedSecret) + }); + } + if (sharedOptions.liveReload) { + const liveReloadScript = LIVE_RELOAD_SCRIPT_TEMPLATE(loopbackPort); + serviceEntryBindings.push({ + name: CoreBindings.DATA_LIVE_RELOAD_SCRIPT, + data: encoder2.encode(liveReloadScript) + }); + } + return [ + { + name: SERVICE_LOOPBACK, + external: { http: { cfBlobHeader: CoreHeaders.CF_BLOB } } + }, + { + name: SERVICE_ENTRY, + worker: { + modules: [{ name: "entry.worker.js", esModule: entry_worker_default() }], + compatibilityDate: "2023-04-04", + compatibilityFlags: [ + "nodejs_compat", + "service_binding_extra_handlers", + "brotli_content_encoding", + "rpc" + ], + bindings: serviceEntryBindings, + durableObjectNamespaces: [ + { + className: "ProxyServer", + uniqueKey: `${SERVICE_ENTRY}-ProxyServer`, + // `ProxyServer` relies on a singleton object containing of "heap" + // mapping addresses to native references. If the singleton object + // were evicted, addresses would be invalidated. Therefore, we + // prevent eviction to ensure heap addresses stay valid for the + // lifetime of the `workerd` process + preventEviction: true + } + ], + // `ProxyServer` doesn't make use of Durable Object storage + durableObjectStorage: { inMemory: kVoid }, + // Always use the entrypoints cache implementation for proxying. This + // means if the entrypoint disables caching, proxied cache operations + // will be no-ops. Note we always require at least one worker to be set. + cacheApiOutbound: { name: "cache:0" } + } + }, + { + name: "internet", + network: { + // Allow access to private/public addresses: + // https://github.com/cloudflare/miniflare/issues/412 + allow: ["public", "private", "240.0.0.0/4"], + deny: [], + tlsOptions: { + trustBrowserCas: true, + trustedCertificates + } + } + } + ]; +} +function getWorkerScript(options, workerIndex, additionalModuleNames) { + const modulesRoot = import_path18.default.resolve( + ("modulesRoot" in options ? options.modulesRoot : void 0) ?? "" + ); + if (Array.isArray(options.modules)) { + return { + modules: options.modules.map( + (module2) => convertModuleDefinition(modulesRoot, module2) + ) + }; + } + let code; + if ("script" in options && options.script !== void 0) { + code = options.script; + } else if ("scriptPath" in options && options.scriptPath !== void 0) { + code = (0, import_fs15.readFileSync)(options.scriptPath, "utf8"); + } else { + import_assert9.default.fail("Unreachable: Workers must have code"); + } + const scriptPath = options.scriptPath ?? buildStringScriptPath(workerIndex); + if (options.modules) { + const locator = new ModuleLocator( + modulesRoot, + additionalModuleNames, + options.modulesRules, + options.compatibilityDate, + options.compatibilityFlags + ); + locator.visitEntrypoint(code, scriptPath); + return { modules: locator.modules }; + } else { + code = withSourceURL(code, scriptPath); + return { serviceWorkerScript: code }; + } +} + +// src/plugins/assets/schema.ts +var import_zod13 = require("zod"); +var AssetsOptionsSchema = import_zod13.z.object({ + assets: import_zod13.z.object({ + // User Worker name or vitest runner - this is only ever set inside miniflare + // The assets plugin needs access to the worker name to create the router worker - user worker binding + workerName: import_zod13.z.string().optional(), + directory: PathSchema, + binding: import_zod13.z.string().optional(), + routerConfig: RouterConfigSchema.optional(), + assetConfig: AssetConfigSchema.optional() + }).optional() +}); + +// src/plugins/assets/index.ts +var ASSETS_PLUGIN = { + options: AssetsOptionsSchema, + async getBindings(options) { + if (!options.assets?.binding) { + return []; + } + return [ + { + // binding between User Worker and Asset Worker + name: options.assets.binding, + service: { + name: `${ASSETS_SERVICE_NAME}:${options.assets.workerName}` + } + } + ]; + }, + async getNodeBindings(options) { + if (!options.assets?.binding) { + return {}; + } + return { + [options.assets.binding]: new ProxyNodeBinding() + }; + }, + async getServices({ options, unsafeEnableAssetsRpc }) { + if (!options.assets) { + return []; + } + const storageServiceName = `${ASSETS_PLUGIN_NAME}:storage`; + const storageService = { + name: storageServiceName, + disk: { path: options.assets.directory, writable: true } + }; + const { encodedAssetManifest, assetsReverseMap } = await buildAssetManifest( + options.assets.directory + ); + const redirectsFile = (0, import_node_path3.join)(options.assets.directory, REDIRECTS_FILENAME); + const headersFile = (0, import_node_path3.join)(options.assets.directory, HEADERS_FILENAME); + const redirectsContents = maybeGetFile(redirectsFile); + const headersContents = maybeGetFile(headersFile); + const logger = new Log(); + const assetParserLogger = { + debug: (message) => logger.debug(message), + log: (message) => logger.info(message), + info: (message) => logger.info(message), + warn: (message) => logger.warn(message), + error: (error) => logger.error(error) + }; + let parsedRedirects; + if (redirectsContents !== void 0) { + const redirects = parseRedirects(redirectsContents); + parsedRedirects = RedirectsSchema.parse( + constructRedirects({ + redirects, + redirectsFile, + logger: assetParserLogger + }).redirects + ); + } + let parsedHeaders; + if (headersContents !== void 0) { + const headers = parseHeaders(headersContents); + parsedHeaders = HeadersSchema.parse( + constructHeaders({ + headers, + headersFile, + logger: assetParserLogger + }).headers + ); + } + const assetConfig = { + ...options.assets.assetConfig, + redirects: parsedRedirects, + headers: parsedHeaders + }; + const id = options.assets.workerName; + const namespaceService = { + name: `${ASSETS_KV_SERVICE_NAME}:${id}`, + worker: { + compatibilityDate: "2023-07-24", + compatibilityFlags: ["nodejs_compat"], + modules: [ + { + name: "assets-kv-worker.mjs", + esModule: assets_kv_worker_default() + } + ], + bindings: [ + { + name: SharedBindings.MAYBE_SERVICE_BLOBS, + service: { name: storageServiceName } + }, + { + name: "ASSETS_REVERSE_MAP", + json: JSON.stringify(assetsReverseMap) + } + ] + } + }; + const assetService = { + name: `${ASSETS_SERVICE_NAME}:${id}`, + worker: { + // TODO: read these from the wrangler.toml + compatibilityDate: "2024-07-31", + compatibilityFlags: ["nodejs_compat"], + modules: [ + { + name: "asset-worker.mjs", + esModule: assets_worker_default() + } + ], + bindings: [ + { + name: "ASSETS_KV_NAMESPACE", + kvNamespace: { + name: `${ASSETS_KV_SERVICE_NAME}:${id}` + } + }, + { + name: "ASSETS_MANIFEST", + data: encodedAssetManifest + }, + { + name: "CONFIG", + json: JSON.stringify(assetConfig) + } + ] + } + }; + const routerService = { + name: `${ROUTER_SERVICE_NAME}:${id}`, + worker: { + // TODO: read these from the wrangler.toml + compatibilityDate: "2024-07-31", + compatibilityFlags: ["nodejs_compat", "no_nodejs_compat_v2"], + modules: [ + { + name: "router-worker.mjs", + esModule: router_worker_default() + } + ], + bindings: [ + { + name: "ASSET_WORKER", + service: { + name: `${ASSETS_SERVICE_NAME}:${id}` + } + }, + { + name: "USER_WORKER", + service: { name: getUserServiceName(id) } + }, + { + name: "CONFIG", + json: JSON.stringify(options.assets.routerConfig ?? {}) + } + ] + } + }; + const services = [ + storageService, + namespaceService, + assetService, + routerService + ]; + if (unsafeEnableAssetsRpc) { + const assetsProxyService = { + name: `${RPC_PROXY_SERVICE_NAME}:${id}`, + worker: { + compatibilityDate: "2024-08-01", + modules: [ + { + name: "assets-proxy-worker.mjs", + esModule: rpc_proxy_worker_default() + } + ], + bindings: [ + { + name: "ROUTER_WORKER", + service: { + name: `${ROUTER_SERVICE_NAME}:${id}` + } + } + ] + } + }; + services.push(assetsProxyService); + } + return services; + } +}; +var buildAssetManifest = async (dir) => { + const { manifest, assetsReverseMap } = await walk(dir); + const sortedAssetManifest = sortManifest(manifest); + const encodedAssetManifest = encodeManifest(sortedAssetManifest); + return { encodedAssetManifest, assetsReverseMap }; +}; +var walk = async (dir) => { + const files = await import_promises7.default.readdir(dir, { recursive: true }); + const manifest = []; + const assetsReverseMap = {}; + const { assetsIgnoreFunction } = await createAssetsIgnoreFunction(dir); + let counter = 0; + await Promise.all( + files.map(async (file) => { + if (assetsIgnoreFunction(file)) { + return; + } + const filepath = import_node_path3.default.join(dir, file); + const relativeFilepath = import_node_path3.default.relative(dir, filepath); + const filestat = await import_promises7.default.stat(filepath); + if (filestat.isSymbolicLink() || filestat.isDirectory()) { + return; + } else { + if (filestat.size > MAX_ASSET_SIZE) { + throw new Error( + `Asset too large. +Cloudflare Workers supports assets with sizes of up to ${prettyBytes( + MAX_ASSET_SIZE, + { + binary: true + } + )}. We found a file ${filepath} with a size of ${prettyBytes( + filestat.size, + { + binary: true + } + )}. +Ensure all assets in your assets directory "${dir}" conform with the Workers maximum size requirement.` + ); + } + const [pathHash, contentHash] = await Promise.all([ + hashPath(normalizeFilePath(relativeFilepath)), + // used absolute filepath here so that changes to the enclosing asset folder will be registered + hashPath(filepath + filestat.mtimeMs.toString()) + ]); + manifest.push({ + pathHash, + contentHash + }); + assetsReverseMap[bytesToHex(contentHash)] = { + filePath: relativeFilepath, + contentType: getContentType(filepath) + }; + counter++; + } + }) + ); + if (counter > MAX_ASSET_COUNT) { + throw new Error( + `Maximum number of assets exceeded. +Cloudflare Workers supports up to ${MAX_ASSET_COUNT.toLocaleString()} assets in a version. We found ${counter.toLocaleString()} files in the specified assets directory "${dir}". +Ensure your assets directory contains a maximum of ${MAX_ASSET_COUNT.toLocaleString()} files, and that you have specified your assets directory correctly.` + ); + } + return { manifest, assetsReverseMap }; +}; +var sortManifest = (manifest) => { + return manifest.sort(comparisonFn); +}; +var comparisonFn = (a, b) => { + if (a.pathHash.length < b.pathHash.length) { + return -1; + } + if (a.pathHash.length > b.pathHash.length) { + return 1; + } + for (const [i, v] of a.pathHash.entries()) { + if (v < b.pathHash[i]) { + return -1; + } + if (v > b.pathHash[i]) { + return 1; + } + } + return 1; +}; +var encodeManifest = (manifest) => { + const assetManifestBytes = new Uint8Array( + HEADER_SIZE + manifest.length * ENTRY_SIZE + ); + for (const [i, entry] of manifest.entries()) { + const entryOffset = HEADER_SIZE + i * ENTRY_SIZE; + assetManifestBytes.set(entry.pathHash, entryOffset + PATH_HASH_OFFSET); + assetManifestBytes.set( + entry.contentHash, + entryOffset + CONTENT_HASH_OFFSET + ); + } + return assetManifestBytes; +}; +var bytesToHex = (buffer) => { + return [...new Uint8Array(buffer)].map((b) => b.toString(16).padStart(2, "0")).join(""); +}; +var hashPath = async (path30) => { + const encoder3 = new TextEncoder(); + const data = encoder3.encode(path30); + const hashBuffer = await import_node_crypto.default.subtle.digest( + "SHA-256", + data.buffer + ); + return new Uint8Array(hashBuffer, 0, PATH_HASH_SIZE); +}; + +// src/plugins/d1/index.ts +var import_promises8 = __toESM(require("fs/promises")); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/d1/database.worker.ts +var import_fs16 = __toESM(require("fs")); +var import_path19 = __toESM(require("path")); +var import_url16 = __toESM(require("url")); +var contents12; +function database_worker_default() { + if (contents12 !== void 0) return contents12; + const filePath = import_path19.default.join(__dirname, "workers", "d1/database.worker.js"); + contents12 = import_fs16.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url16.default.pathToFileURL(filePath); + return contents12; +} + +// src/plugins/d1/index.ts +var import_zod14 = require("zod"); +var D1OptionsSchema = import_zod14.z.object({ + d1Databases: import_zod14.z.union([import_zod14.z.record(import_zod14.z.string()), import_zod14.z.string().array()]).optional() +}); +var D1SharedOptionsSchema = import_zod14.z.object({ + d1Persist: PersistenceSchema +}); +var D1_PLUGIN_NAME = "d1"; +var D1_STORAGE_SERVICE_NAME = `${D1_PLUGIN_NAME}:storage`; +var D1_DATABASE_SERVICE_PREFIX = `${D1_PLUGIN_NAME}:db`; +var D1_DATABASE_OBJECT_CLASS_NAME = "D1DatabaseObject"; +var D1_DATABASE_OBJECT = { + serviceName: D1_DATABASE_SERVICE_PREFIX, + className: D1_DATABASE_OBJECT_CLASS_NAME +}; +var D1_PLUGIN = { + options: D1OptionsSchema, + sharedOptions: D1SharedOptionsSchema, + getBindings(options) { + const databases = namespaceEntries(options.d1Databases); + return databases.map(([name, id]) => { + const binding = name.startsWith("__D1_BETA__") ? ( + // Used before Wrangler 3.3 + { + service: { name: `${D1_DATABASE_SERVICE_PREFIX}:${id}` } + } + ) : ( + // Used after Wrangler 3.3 + { + wrapped: { + moduleName: "cloudflare-internal:d1-api", + innerBindings: [ + { + name: "fetcher", + service: { name: `${D1_DATABASE_SERVICE_PREFIX}:${id}` } + } + ] + } + } + ); + return { name, ...binding }; + }); + }, + getNodeBindings(options) { + const databases = namespaceKeys(options.d1Databases); + return Object.fromEntries( + databases.map((name) => [name, new ProxyNodeBinding()]) + ); + }, + async getServices({ + options, + sharedOptions, + tmpPath, + log, + unsafeStickyBlobs + }) { + const persist = sharedOptions.d1Persist; + const databases = namespaceEntries(options.d1Databases); + const services = databases.map(([_, id]) => ({ + name: `${D1_DATABASE_SERVICE_PREFIX}:${id}`, + worker: objectEntryWorker(D1_DATABASE_OBJECT, id) + })); + if (databases.length > 0) { + const uniqueKey = `miniflare-${D1_DATABASE_OBJECT_CLASS_NAME}`; + const persistPath = getPersistPath(D1_PLUGIN_NAME, tmpPath, persist); + await import_promises8.default.mkdir(persistPath, { recursive: true }); + const storageService = { + name: D1_STORAGE_SERVICE_NAME, + disk: { path: persistPath, writable: true } + }; + const objectService = { + name: D1_DATABASE_SERVICE_PREFIX, + worker: { + compatibilityDate: "2023-07-24", + compatibilityFlags: ["nodejs_compat", "experimental"], + modules: [ + { + name: "database.worker.js", + esModule: database_worker_default() + } + ], + durableObjectNamespaces: [ + { + className: D1_DATABASE_OBJECT_CLASS_NAME, + uniqueKey + } + ], + // Store Durable Object SQL databases in persist path + durableObjectStorage: { localDisk: D1_STORAGE_SERVICE_NAME }, + // Bind blob disk directory service to object + bindings: [ + { + name: SharedBindings.MAYBE_SERVICE_BLOBS, + service: { name: D1_STORAGE_SERVICE_NAME } + }, + { + name: SharedBindings.MAYBE_SERVICE_LOOPBACK, + service: { name: SERVICE_LOOPBACK } + }, + ...getMiniflareObjectBindings(unsafeStickyBlobs) + ] + } + }; + services.push(storageService, objectService); + for (const database of databases) { + await migrateDatabase(log, uniqueKey, persistPath, database[1]); + } + } + return services; + }, + getPersistPath({ d1Persist }, tmpPath) { + return getPersistPath(D1_PLUGIN_NAME, tmpPath, d1Persist); + } +}; + +// src/plugins/hyperdrive/index.ts +var import_node_assert3 = __toESM(require("node:assert")); +var import_zod15 = require("zod"); +var HYPERDRIVE_PLUGIN_NAME = "hyperdrive"; +function hasPostgresProtocol(url20) { + return url20.protocol === "postgresql:" || url20.protocol === "postgres:"; +} +function getPort(url20) { + if (url20.port !== "") return url20.port; + if (hasPostgresProtocol(url20)) return "5432"; + import_node_assert3.default.fail(`Expected known protocol, got ${url20.protocol}`); +} +var HyperdriveSchema = import_zod15.z.union([import_zod15.z.string().url(), import_zod15.z.instanceof(URL)]).transform((url20, ctx) => { + if (typeof url20 === "string") url20 = new URL(url20); + if (url20.protocol === "") { + ctx.addIssue({ + code: import_zod15.z.ZodIssueCode.custom, + message: "You must specify the database protocol - e.g. 'postgresql'." + }); + } else if (!hasPostgresProtocol(url20)) { + ctx.addIssue({ + code: import_zod15.z.ZodIssueCode.custom, + message: "Only PostgreSQL or PostgreSQL compatible databases are currently supported." + }); + } + if (url20.host === "") { + ctx.addIssue({ + code: import_zod15.z.ZodIssueCode.custom, + message: "You must provide a hostname or IP address in your connection string - e.g. 'user:password@database-hostname.example.com:5432/databasename" + }); + } + if (url20.pathname === "") { + ctx.addIssue({ + code: import_zod15.z.ZodIssueCode.custom, + message: "You must provide a database name as the path component - e.g. /postgres" + }); + } + if (url20.username === "") { + ctx.addIssue({ + code: import_zod15.z.ZodIssueCode.custom, + message: "You must provide a username - e.g. 'user:password@database.example.com:port/databasename'" + }); + } + if (url20.password === "") { + ctx.addIssue({ + code: import_zod15.z.ZodIssueCode.custom, + message: "You must provide a password - e.g. 'user:password@database.example.com:port/databasename' " + }); + } + return url20; +}); +var HyperdriveInputOptionsSchema = import_zod15.z.object({ + hyperdrives: import_zod15.z.record(import_zod15.z.string(), HyperdriveSchema).optional() +}); +var HYPERDRIVE_PLUGIN = { + options: HyperdriveInputOptionsSchema, + getBindings(options) { + return Object.entries(options.hyperdrives ?? {}).map( + ([name, url20]) => { + const database = url20.pathname.replace("/", ""); + const scheme = url20.protocol.replace(":", ""); + return { + name, + hyperdrive: { + designator: { + name: `${HYPERDRIVE_PLUGIN_NAME}:${name}` + }, + database: decodeURIComponent(database), + user: decodeURIComponent(url20.username), + password: decodeURIComponent(url20.password), + scheme + } + }; + } + ); + }, + getNodeBindings(options) { + return Object.fromEntries( + Object.entries(options.hyperdrives ?? {}).map(([name, url20]) => { + const connectionOverrides = { + connectionString: `${url20}`, + port: Number.parseInt(url20.port), + host: url20.hostname + }; + const proxyNodeBinding = new ProxyNodeBinding({ + get(target, prop) { + return prop in connectionOverrides ? connectionOverrides[prop] : target[prop]; + } + }); + return [name, proxyNodeBinding]; + }) + ); + }, + async getServices({ options }) { + return Object.entries(options.hyperdrives ?? {}).map( + ([name, url20]) => ({ + name: `${HYPERDRIVE_PLUGIN_NAME}:${name}`, + external: { + address: `${url20.hostname}:${getPort(url20)}`, + tcp: {} + } + }) + ); + } +}; + +// src/plugins/kv/index.ts +var import_promises10 = __toESM(require("fs/promises")); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/kv/namespace.worker.ts +var import_fs17 = __toESM(require("fs")); +var import_path20 = __toESM(require("path")); +var import_url17 = __toESM(require("url")); +var contents13; +function namespace_worker_default() { + if (contents13 !== void 0) return contents13; + const filePath = import_path20.default.join(__dirname, "workers", "kv/namespace.worker.js"); + contents13 = import_fs17.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url17.default.pathToFileURL(filePath); + return contents13; +} + +// src/plugins/kv/index.ts +var import_zod16 = require("zod"); + +// src/plugins/kv/constants.ts +var KV_PLUGIN_NAME = "kv"; + +// src/plugins/kv/sites.ts +var import_assert10 = __toESM(require("assert")); +var import_promises9 = __toESM(require("fs/promises")); +var import_path22 = __toESM(require("path")); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/kv/sites.worker.ts +var import_fs18 = __toESM(require("fs")); +var import_path21 = __toESM(require("path")); +var import_url18 = __toESM(require("url")); +var contents14; +function sites_worker_default() { + if (contents14 !== void 0) return contents14; + const filePath = import_path21.default.join(__dirname, "workers", "kv/sites.worker.js"); + contents14 = import_fs18.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url18.default.pathToFileURL(filePath); + return contents14; +} + +// src/plugins/kv/sites.ts +async function* listKeysInDirectoryInner(rootPath2, currentPath) { + const fileEntries = await import_promises9.default.readdir(currentPath, { withFileTypes: true }); + for (const fileEntry of fileEntries) { + const filePath = import_path22.default.posix.join(currentPath, fileEntry.name); + if (fileEntry.isDirectory()) { + yield* listKeysInDirectoryInner(rootPath2, filePath); + } else { + yield filePath.substring(rootPath2.length + 1); + } + } +} +function listKeysInDirectory(rootPath2) { + rootPath2 = import_path22.default.resolve(rootPath2); + return listKeysInDirectoryInner(rootPath2, rootPath2); +} +var sitesRegExpsCache = /* @__PURE__ */ new WeakMap(); +var SERVICE_NAMESPACE_SITE = `${KV_PLUGIN_NAME}:site`; +async function buildStaticContentManifest(sitePath, siteRegExps) { + const staticContentManifest = {}; + for await (const key of listKeysInDirectory(sitePath)) { + if (testSiteRegExps(siteRegExps, key)) { + staticContentManifest[key] = encodeSitesKey(key); + } + } + return staticContentManifest; +} +async function getSitesBindings(options) { + const siteRegExps = { + include: options.siteInclude && globsToRegExps(options.siteInclude), + exclude: options.siteExclude && globsToRegExps(options.siteExclude) + }; + sitesRegExpsCache.set(options, siteRegExps); + const __STATIC_CONTENT_MANIFEST = await buildStaticContentManifest( + options.sitePath, + siteRegExps + ); + return [ + { + name: SiteBindings.KV_NAMESPACE_SITE, + kvNamespace: { name: SERVICE_NAMESPACE_SITE } + }, + { + name: SiteBindings.JSON_SITE_MANIFEST, + json: JSON.stringify(__STATIC_CONTENT_MANIFEST) + } + ]; +} +async function getSitesNodeBindings(options) { + const siteRegExps = sitesRegExpsCache.get(options); + (0, import_assert10.default)(siteRegExps !== void 0); + const __STATIC_CONTENT_MANIFEST = await buildStaticContentManifest( + options.sitePath, + siteRegExps + ); + return { + [SiteBindings.KV_NAMESPACE_SITE]: new ProxyNodeBinding(), + [SiteBindings.JSON_SITE_MANIFEST]: __STATIC_CONTENT_MANIFEST + }; +} +function getSitesServices(options) { + const siteRegExps = sitesRegExpsCache.get(options); + (0, import_assert10.default)(siteRegExps !== void 0); + const serialisedSiteRegExps = serialiseSiteRegExps(siteRegExps); + const persist = import_path22.default.resolve(options.sitePath); + const storageServiceName = `${SERVICE_NAMESPACE_SITE}:storage`; + const storageService = { + name: storageServiceName, + disk: { path: persist, writable: true } + }; + const namespaceService = { + name: SERVICE_NAMESPACE_SITE, + worker: { + compatibilityDate: "2023-07-24", + compatibilityFlags: ["nodejs_compat"], + modules: [ + { + name: "site.worker.js", + esModule: sites_worker_default() + } + ], + bindings: [ + { + name: SharedBindings.MAYBE_SERVICE_BLOBS, + service: { name: storageServiceName } + }, + { + name: SiteBindings.JSON_SITE_FILTER, + json: JSON.stringify(serialisedSiteRegExps) + } + ] + } + }; + return [storageService, namespaceService]; +} + +// src/plugins/kv/index.ts +var KVOptionsSchema = import_zod16.z.object({ + kvNamespaces: import_zod16.z.union([import_zod16.z.record(import_zod16.z.string()), import_zod16.z.string().array()]).optional(), + // Workers Sites + sitePath: PathSchema.optional(), + siteInclude: import_zod16.z.string().array().optional(), + siteExclude: import_zod16.z.string().array().optional() +}); +var KVSharedOptionsSchema = import_zod16.z.object({ + kvPersist: PersistenceSchema +}); +var SERVICE_NAMESPACE_PREFIX = `${KV_PLUGIN_NAME}:ns`; +var KV_STORAGE_SERVICE_NAME = `${KV_PLUGIN_NAME}:storage`; +var KV_NAMESPACE_OBJECT_CLASS_NAME = "KVNamespaceObject"; +var KV_NAMESPACE_OBJECT = { + serviceName: SERVICE_NAMESPACE_PREFIX, + className: KV_NAMESPACE_OBJECT_CLASS_NAME +}; +function isWorkersSitesEnabled(options) { + return options.sitePath !== void 0; +} +var KV_PLUGIN = { + options: KVOptionsSchema, + sharedOptions: KVSharedOptionsSchema, + async getBindings(options) { + const namespaces = namespaceEntries(options.kvNamespaces); + const bindings = namespaces.map(([name, id]) => ({ + name, + kvNamespace: { name: `${SERVICE_NAMESPACE_PREFIX}:${id}` } + })); + if (isWorkersSitesEnabled(options)) { + bindings.push(...await getSitesBindings(options)); + } + return bindings; + }, + async getNodeBindings(options) { + const namespaces = namespaceKeys(options.kvNamespaces); + const bindings = Object.fromEntries( + namespaces.map((name) => [name, new ProxyNodeBinding()]) + ); + if (isWorkersSitesEnabled(options)) { + Object.assign(bindings, await getSitesNodeBindings(options)); + } + return bindings; + }, + async getServices({ + options, + sharedOptions, + tmpPath, + log, + unsafeStickyBlobs + }) { + const persist = sharedOptions.kvPersist; + const namespaces = namespaceEntries(options.kvNamespaces); + const services = namespaces.map(([_, id]) => ({ + name: `${SERVICE_NAMESPACE_PREFIX}:${id}`, + worker: objectEntryWorker(KV_NAMESPACE_OBJECT, id) + })); + if (services.length > 0) { + const uniqueKey = `miniflare-${KV_NAMESPACE_OBJECT_CLASS_NAME}`; + const persistPath = getPersistPath(KV_PLUGIN_NAME, tmpPath, persist); + await import_promises10.default.mkdir(persistPath, { recursive: true }); + const storageService = { + name: KV_STORAGE_SERVICE_NAME, + disk: { path: persistPath, writable: true } + }; + const objectService = { + name: SERVICE_NAMESPACE_PREFIX, + worker: { + compatibilityDate: "2023-07-24", + compatibilityFlags: ["nodejs_compat", "experimental"], + modules: [ + { + name: "namespace.worker.js", + esModule: namespace_worker_default() + } + ], + durableObjectNamespaces: [ + { className: KV_NAMESPACE_OBJECT_CLASS_NAME, uniqueKey } + ], + // Store Durable Object SQL databases in persist path + durableObjectStorage: { localDisk: KV_STORAGE_SERVICE_NAME }, + // Bind blob disk directory service to object + bindings: [ + { + name: SharedBindings.MAYBE_SERVICE_BLOBS, + service: { name: KV_STORAGE_SERVICE_NAME } + }, + { + name: SharedBindings.MAYBE_SERVICE_LOOPBACK, + service: { name: SERVICE_LOOPBACK } + }, + ...getMiniflareObjectBindings(unsafeStickyBlobs) + ] + } + }; + services.push(storageService, objectService); + for (const namespace of namespaces) { + await migrateDatabase(log, uniqueKey, persistPath, namespace[1]); + } + } + if (isWorkersSitesEnabled(options)) { + services.push(...getSitesServices(options)); + } + return services; + }, + getPersistPath({ kvPersist }, tmpPath) { + return getPersistPath(KV_PLUGIN_NAME, tmpPath, kvPersist); + } +}; + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/pipelines/pipeline.worker.ts +var import_fs19 = __toESM(require("fs")); +var import_path23 = __toESM(require("path")); +var import_url19 = __toESM(require("url")); +var contents15; +function pipeline_worker_default() { + if (contents15 !== void 0) return contents15; + const filePath = import_path23.default.join(__dirname, "workers", "pipelines/pipeline.worker.js"); + contents15 = import_fs19.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url19.default.pathToFileURL(filePath); + return contents15; +} + +// src/plugins/pipelines/index.ts +var import_zod17 = require("zod"); +var PipelineOptionsSchema = import_zod17.z.object({ + pipelines: import_zod17.z.union([import_zod17.z.record(import_zod17.z.string()), import_zod17.z.string().array()]).optional() +}); +var PIPELINES_PLUGIN_NAME = "pipelines"; +var SERVICE_PIPELINE_PREFIX = `${PIPELINES_PLUGIN_NAME}:pipeline`; +var PIPELINE_PLUGIN = { + options: PipelineOptionsSchema, + getBindings(options) { + const pipelines = bindingEntries(options.pipelines); + return pipelines.map(([name, id]) => ({ + name, + service: { name: `${SERVICE_PIPELINE_PREFIX}:${id}` } + })); + }, + getNodeBindings(options) { + const buckets = namespaceKeys(options.pipelines); + return Object.fromEntries( + buckets.map((name) => [name, new ProxyNodeBinding()]) + ); + }, + async getServices({ options }) { + const pipelines = bindingEntries(options.pipelines); + const services = []; + for (const pipeline of pipelines) { + services.push({ + name: `${SERVICE_PIPELINE_PREFIX}:${pipeline[1]}`, + worker: { + compatibilityDate: "2024-12-30", + modules: [ + { + name: "pipeline.worker.js", + esModule: pipeline_worker_default() + } + ] + } + }); + } + return services; + } +}; +function bindingEntries(namespaces) { + if (Array.isArray(namespaces)) { + return namespaces.map((bindingName) => [bindingName, bindingName]); + } else if (namespaces !== void 0) { + return Object.entries(namespaces).map(([name, opts]) => [ + name, + typeof opts === "string" ? opts : opts.pipelineName + ]); + } else { + return []; + } +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/queues/broker.worker.ts +var import_fs20 = __toESM(require("fs")); +var import_path24 = __toESM(require("path")); +var import_url20 = __toESM(require("url")); +var contents16; +function broker_worker_default() { + if (contents16 !== void 0) return contents16; + const filePath = import_path24.default.join(__dirname, "workers", "queues/broker.worker.js"); + contents16 = import_fs20.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url20.default.pathToFileURL(filePath); + return contents16; +} + +// src/plugins/queues/index.ts +var import_zod18 = require("zod"); + +// src/plugins/queues/errors.ts +var QueuesError = class extends MiniflareError { +}; + +// src/plugins/queues/index.ts +var QueuesOptionsSchema = import_zod18.z.object({ + queueProducers: import_zod18.z.union([ + import_zod18.z.record(QueueProducerOptionsSchema), + import_zod18.z.string().array(), + import_zod18.z.record(import_zod18.z.string()) + ]).optional(), + queueConsumers: import_zod18.z.union([import_zod18.z.record(QueueConsumerOptionsSchema), import_zod18.z.string().array()]).optional() +}); +var QUEUES_PLUGIN_NAME = "queues"; +var SERVICE_QUEUE_PREFIX = `${QUEUES_PLUGIN_NAME}:queue`; +var QUEUE_BROKER_OBJECT_CLASS_NAME = "QueueBrokerObject"; +var QUEUE_BROKER_OBJECT = { + serviceName: SERVICE_QUEUE_PREFIX, + className: QUEUE_BROKER_OBJECT_CLASS_NAME +}; +var QUEUES_PLUGIN = { + options: QueuesOptionsSchema, + getBindings(options) { + const queues = bindingEntries2(options.queueProducers); + return queues.map(([name, id]) => ({ + name, + queue: { name: `${SERVICE_QUEUE_PREFIX}:${id}` } + })); + }, + getNodeBindings(options) { + const queues = bindingKeys(options.queueProducers); + return Object.fromEntries( + queues.map((name) => [name, new ProxyNodeBinding()]) + ); + }, + async getServices({ + options, + workerNames, + queueProducers: allQueueProducers, + queueConsumers: allQueueConsumers, + unsafeStickyBlobs + }) { + const queues = bindingEntries2(options.queueProducers); + if (queues.length === 0) return []; + const services = queues.map(([_, id]) => ({ + name: `${SERVICE_QUEUE_PREFIX}:${id}`, + worker: objectEntryWorker(QUEUE_BROKER_OBJECT, id) + })); + const uniqueKey = `miniflare-${QUEUE_BROKER_OBJECT_CLASS_NAME}`; + const objectService = { + name: SERVICE_QUEUE_PREFIX, + worker: { + compatibilityDate: "2023-07-24", + compatibilityFlags: [ + "nodejs_compat", + "experimental", + "service_binding_extra_handlers" + ], + modules: [ + { name: "broker.worker.js", esModule: broker_worker_default() } + ], + durableObjectNamespaces: [ + { + className: QUEUE_BROKER_OBJECT_CLASS_NAME, + uniqueKey, + preventEviction: true + } + ], + // Miniflare's Queue broker is in-memory only at the moment + durableObjectStorage: { inMemory: kVoid }, + bindings: [ + { + name: SharedBindings.MAYBE_SERVICE_LOOPBACK, + service: { name: SERVICE_LOOPBACK } + }, + ...getMiniflareObjectBindings(unsafeStickyBlobs), + { + name: SharedBindings.DURABLE_OBJECT_NAMESPACE_OBJECT, + durableObjectNamespace: { + className: QUEUE_BROKER_OBJECT_CLASS_NAME + } + }, + { + name: QueueBindings.MAYBE_JSON_QUEUE_PRODUCERS, + json: JSON.stringify(Object.fromEntries(allQueueProducers)) + }, + { + name: QueueBindings.MAYBE_JSON_QUEUE_CONSUMERS, + json: JSON.stringify(Object.fromEntries(allQueueConsumers)) + }, + ...workerNames.map((name) => ({ + name: QueueBindings.SERVICE_WORKER_PREFIX + name, + service: { name: getUserServiceName(name) } + })) + ] + } + }; + services.push(objectService); + return services; + } +}; +function bindingEntries2(namespaces) { + if (Array.isArray(namespaces)) { + return namespaces.map((bindingName) => [bindingName, bindingName]); + } else if (namespaces !== void 0) { + return Object.entries(namespaces).map(([name, opts]) => [ + name, + typeof opts === "string" ? opts : opts.queueName + ]); + } else { + return []; + } +} +function bindingKeys(namespaces) { + if (Array.isArray(namespaces)) { + return namespaces; + } else if (namespaces !== void 0) { + return Object.keys(namespaces); + } else { + return []; + } +} + +// src/plugins/r2/index.ts +var import_promises11 = __toESM(require("fs/promises")); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/r2/bucket.worker.ts +var import_fs21 = __toESM(require("fs")); +var import_path25 = __toESM(require("path")); +var import_url21 = __toESM(require("url")); +var contents17; +function bucket_worker_default() { + if (contents17 !== void 0) return contents17; + const filePath = import_path25.default.join(__dirname, "workers", "r2/bucket.worker.js"); + contents17 = import_fs21.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url21.default.pathToFileURL(filePath); + return contents17; +} + +// src/plugins/r2/index.ts +var import_zod19 = require("zod"); +var R2OptionsSchema = import_zod19.z.object({ + r2Buckets: import_zod19.z.union([import_zod19.z.record(import_zod19.z.string()), import_zod19.z.string().array()]).optional() +}); +var R2SharedOptionsSchema = import_zod19.z.object({ + r2Persist: PersistenceSchema +}); +var R2_PLUGIN_NAME = "r2"; +var R2_STORAGE_SERVICE_NAME = `${R2_PLUGIN_NAME}:storage`; +var R2_BUCKET_SERVICE_PREFIX = `${R2_PLUGIN_NAME}:bucket`; +var R2_BUCKET_OBJECT_CLASS_NAME = "R2BucketObject"; +var R2_BUCKET_OBJECT = { + serviceName: R2_BUCKET_SERVICE_PREFIX, + className: R2_BUCKET_OBJECT_CLASS_NAME +}; +var R2_PLUGIN = { + options: R2OptionsSchema, + sharedOptions: R2SharedOptionsSchema, + getBindings(options) { + const buckets = namespaceEntries(options.r2Buckets); + return buckets.map(([name, id]) => ({ + name, + r2Bucket: { name: `${R2_BUCKET_SERVICE_PREFIX}:${id}` } + })); + }, + getNodeBindings(options) { + const buckets = namespaceKeys(options.r2Buckets); + return Object.fromEntries( + buckets.map((name) => [name, new ProxyNodeBinding()]) + ); + }, + async getServices({ + options, + sharedOptions, + tmpPath, + log, + unsafeStickyBlobs + }) { + const persist = sharedOptions.r2Persist; + const buckets = namespaceEntries(options.r2Buckets); + const services = buckets.map(([_, id]) => ({ + name: `${R2_BUCKET_SERVICE_PREFIX}:${id}`, + worker: objectEntryWorker(R2_BUCKET_OBJECT, id) + })); + if (buckets.length > 0) { + const uniqueKey = `miniflare-${R2_BUCKET_OBJECT_CLASS_NAME}`; + const persistPath = getPersistPath(R2_PLUGIN_NAME, tmpPath, persist); + await import_promises11.default.mkdir(persistPath, { recursive: true }); + const storageService = { + name: R2_STORAGE_SERVICE_NAME, + disk: { path: persistPath, writable: true } + }; + const objectService = { + name: R2_BUCKET_SERVICE_PREFIX, + worker: { + compatibilityDate: "2023-07-24", + compatibilityFlags: ["nodejs_compat", "experimental"], + modules: [ + { + name: "bucket.worker.js", + esModule: bucket_worker_default() + } + ], + durableObjectNamespaces: [ + { + className: R2_BUCKET_OBJECT_CLASS_NAME, + uniqueKey + } + ], + // Store Durable Object SQL databases in persist path + durableObjectStorage: { localDisk: R2_STORAGE_SERVICE_NAME }, + // Bind blob disk directory service to object + bindings: [ + { + name: SharedBindings.MAYBE_SERVICE_BLOBS, + service: { name: R2_STORAGE_SERVICE_NAME } + }, + { + name: SharedBindings.MAYBE_SERVICE_LOOPBACK, + service: { name: SERVICE_LOOPBACK } + }, + ...getMiniflareObjectBindings(unsafeStickyBlobs) + ] + } + }; + services.push(storageService, objectService); + for (const bucket of buckets) { + await migrateDatabase(log, uniqueKey, persistPath, bucket[1]); + } + } + return services; + }, + getPersistPath({ r2Persist }, tmpPath) { + return getPersistPath(R2_PLUGIN_NAME, tmpPath, r2Persist); + } +}; + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/ratelimit/ratelimit.worker.ts +var import_fs22 = __toESM(require("fs")); +var import_path26 = __toESM(require("path")); +var import_url22 = __toESM(require("url")); +var contents18; +function ratelimit_worker_default() { + if (contents18 !== void 0) return contents18; + const filePath = import_path26.default.join(__dirname, "workers", "ratelimit/ratelimit.worker.js"); + contents18 = import_fs22.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url22.default.pathToFileURL(filePath); + return contents18; +} + +// src/plugins/ratelimit/index.ts +var import_zod20 = require("zod"); +var PeriodType = /* @__PURE__ */ ((PeriodType2) => { + PeriodType2[PeriodType2["TENSECONDS"] = 10] = "TENSECONDS"; + PeriodType2[PeriodType2["MINUTE"] = 60] = "MINUTE"; + return PeriodType2; +})(PeriodType || {}); +var RatelimitConfigSchema = import_zod20.z.object({ + simple: import_zod20.z.object({ + limit: import_zod20.z.number().gt(0), + // may relax this to be any number in the future + period: import_zod20.z.nativeEnum(PeriodType).optional() + }) +}); +var RatelimitOptionsSchema = import_zod20.z.object({ + ratelimits: import_zod20.z.record(RatelimitConfigSchema).optional() +}); +var RATELIMIT_PLUGIN_NAME = "ratelimit"; +var SERVICE_RATELIMIT_PREFIX = `${RATELIMIT_PLUGIN_NAME}`; +var SERVICE_RATELIMIT_MODULE = `cloudflare-internal:${SERVICE_RATELIMIT_PREFIX}:module`; +function buildJsonBindings(bindings) { + return Object.entries(bindings).map(([name, value]) => ({ + name, + json: JSON.stringify(value) + })); +} +var RATELIMIT_PLUGIN = { + options: RatelimitOptionsSchema, + getBindings(options) { + if (!options.ratelimits) { + return []; + } + const bindings = Object.entries(options.ratelimits).map( + ([name, config]) => ({ + name, + wrapped: { + moduleName: SERVICE_RATELIMIT_MODULE, + innerBindings: buildJsonBindings({ + namespaceId: name, + limit: config.simple.limit, + period: config.simple.period + }) + } + }) + ); + return bindings; + }, + getNodeBindings(options) { + if (!options.ratelimits) { + return {}; + } + return Object.fromEntries( + Object.keys(options.ratelimits).map((name) => [ + name, + new ProxyNodeBinding() + ]) + ); + }, + async getServices({ options }) { + if (!options.ratelimits) { + return []; + } + return { + services: [], + extensions: [ + { + modules: [ + { + name: SERVICE_RATELIMIT_MODULE, + esModule: ratelimit_worker_default(), + internal: true + } + ] + } + ] + }; + } +}; + +// src/plugins/workflows/index.ts +var import_promises12 = __toESM(require("fs/promises")); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/workflows/binding.worker.ts +var import_fs23 = __toESM(require("fs")); +var import_path27 = __toESM(require("path")); +var import_url23 = __toESM(require("url")); +var contents19; +function binding_worker_default() { + if (contents19 !== void 0) return contents19; + const filePath = import_path27.default.join(__dirname, "workers", "workflows/binding.worker.js"); + contents19 = import_fs23.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url23.default.pathToFileURL(filePath); + return contents19; +} + +// src/plugins/workflows/index.ts +var import_zod21 = require("zod"); +var WorkflowsOptionsSchema = import_zod21.z.object({ + workflows: import_zod21.z.record( + import_zod21.z.object({ + name: import_zod21.z.string(), + className: import_zod21.z.string(), + scriptName: import_zod21.z.string().optional() + }) + ).optional() +}); +var WorkflowsSharedOptionsSchema = import_zod21.z.object({ + workflowsPersist: PersistenceSchema +}); +var WORKFLOWS_PLUGIN_NAME = "workflows"; +var WORKFLOWS_STORAGE_SERVICE_NAME = `${WORKFLOWS_PLUGIN_NAME}:storage`; +var WORKFLOWS_PLUGIN = { + options: WorkflowsOptionsSchema, + sharedOptions: WorkflowsSharedOptionsSchema, + async getBindings(options) { + return Object.entries(options.workflows ?? {}).map( + ([bindingName, workflow]) => ({ + name: bindingName, + service: { + name: `${WORKFLOWS_PLUGIN_NAME}:${workflow.name}`, + entrypoint: "WorkflowBinding" + } + }) + ); + }, + async getNodeBindings(options) { + return Object.fromEntries( + Object.keys(options.workflows ?? {}).map((bindingName) => [ + bindingName, + new ProxyNodeBinding() + ]) + ); + }, + async getServices({ options, sharedOptions, tmpPath }) { + const persistPath = getPersistPath( + WORKFLOWS_PLUGIN_NAME, + tmpPath, + sharedOptions.workflowsPersist + ); + await import_promises12.default.mkdir(persistPath, { recursive: true }); + const storageServices = Object.entries( + options.workflows ?? {} + ).map(([_, workflow]) => ({ + name: `${WORKFLOWS_STORAGE_SERVICE_NAME}-${workflow.name}`, + disk: { path: persistPath, writable: true } + })); + const services = Object.entries(options.workflows ?? {}).map( + ([_bindingName, workflow]) => { + const uniqueKey = `miniflare-workflows-${workflow.name}`; + const workflowsBinding = { + name: `${WORKFLOWS_PLUGIN_NAME}:${workflow.name}`, + worker: { + compatibilityDate: "2024-10-22", + modules: [ + { + name: "workflows.mjs", + esModule: binding_worker_default() + } + ], + durableObjectNamespaces: [ + { + className: "Engine", + enableSql: true, + uniqueKey, + preventEviction: true + } + ], + durableObjectStorage: { + localDisk: `${WORKFLOWS_STORAGE_SERVICE_NAME}-${workflow.name}` + }, + bindings: [ + { + name: "ENGINE", + durableObjectNamespace: { className: "Engine" } + }, + { + name: "USER_WORKFLOW", + service: { + name: getUserServiceName(workflow.scriptName), + entrypoint: workflow.className + } + } + ] + } + }; + return workflowsBinding; + } + ); + if (services.length === 0) { + return []; + } + return [...storageServices, ...services]; + }, + getPersistPath({ workflowsPersist }, tmpPath) { + return getPersistPath(WORKFLOWS_PLUGIN_NAME, tmpPath, workflowsPersist); + } +}; + +// src/plugins/index.ts +var PLUGINS = { + [CORE_PLUGIN_NAME2]: CORE_PLUGIN, + [CACHE_PLUGIN_NAME]: CACHE_PLUGIN, + [D1_PLUGIN_NAME]: D1_PLUGIN, + [DURABLE_OBJECTS_PLUGIN_NAME]: DURABLE_OBJECTS_PLUGIN, + [KV_PLUGIN_NAME]: KV_PLUGIN, + [QUEUES_PLUGIN_NAME]: QUEUES_PLUGIN, + [R2_PLUGIN_NAME]: R2_PLUGIN, + [HYPERDRIVE_PLUGIN_NAME]: HYPERDRIVE_PLUGIN, + [RATELIMIT_PLUGIN_NAME]: RATELIMIT_PLUGIN, + [ASSETS_PLUGIN_NAME]: ASSETS_PLUGIN, + [WORKFLOWS_PLUGIN_NAME]: WORKFLOWS_PLUGIN, + [PIPELINES_PLUGIN_NAME]: PIPELINE_PLUGIN +}; +var PLUGIN_ENTRIES = Object.entries(PLUGINS); + +// src/plugins/core/inspector-proxy/inspector-proxy-controller.ts +var import_node_crypto2 = __toESM(require("node:crypto")); +var import_node_http = require("node:http"); + +// ../../node_modules/.pnpm/get-port@7.1.0/node_modules/get-port/index.js +var import_node_net = __toESM(require("node:net"), 1); +var import_node_os = __toESM(require("node:os"), 1); +var Locked = class extends Error { + constructor(port) { + super(`${port} is locked`); + } +}; +var lockedPorts = { + old: /* @__PURE__ */ new Set(), + young: /* @__PURE__ */ new Set() +}; +var releaseOldLockedPortsIntervalMs = 1e3 * 15; +var timeout; +var getLocalHosts = () => { + const interfaces = import_node_os.default.networkInterfaces(); + const results = /* @__PURE__ */ new Set([void 0, "0.0.0.0"]); + for (const _interface of Object.values(interfaces)) { + for (const config of _interface) { + results.add(config.address); + } + } + return results; +}; +var checkAvailablePort = (options) => new Promise((resolve2, reject) => { + const server = import_node_net.default.createServer(); + server.unref(); + server.on("error", reject); + server.listen(options, () => { + const { port } = server.address(); + server.close(() => { + resolve2(port); + }); + }); +}); +var getAvailablePort = async (options, hosts) => { + if (options.host || options.port === 0) { + return checkAvailablePort(options); + } + for (const host of hosts) { + try { + await checkAvailablePort({ port: options.port, host }); + } catch (error) { + if (!["EADDRNOTAVAIL", "EINVAL"].includes(error.code)) { + throw error; + } + } + } + return options.port; +}; +var portCheckSequence = function* (ports) { + if (ports) { + yield* ports; + } + yield 0; +}; +async function getPorts(options) { + let ports; + let exclude = /* @__PURE__ */ new Set(); + if (options) { + if (options.port) { + ports = typeof options.port === "number" ? [options.port] : options.port; + } + if (options.exclude) { + const excludeIterable = options.exclude; + if (typeof excludeIterable[Symbol.iterator] !== "function") { + throw new TypeError("The `exclude` option must be an iterable."); + } + for (const element of excludeIterable) { + if (typeof element !== "number") { + throw new TypeError("Each item in the `exclude` option must be a number corresponding to the port you want excluded."); + } + if (!Number.isSafeInteger(element)) { + throw new TypeError(`Number ${element} in the exclude option is not a safe integer and can't be used`); + } + } + exclude = new Set(excludeIterable); + } + } + if (timeout === void 0) { + timeout = setTimeout(() => { + timeout = void 0; + lockedPorts.old = lockedPorts.young; + lockedPorts.young = /* @__PURE__ */ new Set(); + }, releaseOldLockedPortsIntervalMs); + if (timeout.unref) { + timeout.unref(); + } + } + const hosts = getLocalHosts(); + for (const port of portCheckSequence(ports)) { + try { + if (exclude.has(port)) { + continue; + } + let availablePort = await getAvailablePort({ ...options, port }, hosts); + while (lockedPorts.old.has(availablePort) || lockedPorts.young.has(availablePort)) { + if (port !== 0) { + throw new Locked(port); + } + availablePort = await getAvailablePort({ ...options, port }, hosts); + } + lockedPorts.young.add(availablePort); + return availablePort; + } catch (error) { + if (!["EADDRINUSE", "EACCES"].includes(error.code) && !(error instanceof Locked)) { + throw error; + } + } + } + throw new Error("No available ports found"); +} + +// src/plugins/core/inspector-proxy/inspector-proxy-controller.ts +var import_ws4 = __toESM(require("ws")); + +// package.json +var version = "4.20250317.1"; + +// src/plugins/core/inspector-proxy/inspector-proxy.ts +var import_node_assert4 = __toESM(require("node:assert")); +var import_ws3 = __toESM(require("ws")); + +// src/plugins/core/inspector-proxy/devtools.ts +function isDevToolsEvent(event, name) { + return typeof event === "object" && event !== null && "method" in event && event.method === name; +} + +// src/plugins/core/inspector-proxy/inspector-proxy.ts +var InspectorProxy = class { + #workerName; + #runtimeWs; + #devtoolsWs; + #devtoolsHaveFileSystemAccess = false; + constructor(workerName, runtimeWs) { + this.#workerName = workerName; + this.#runtimeWs = runtimeWs; + this.#runtimeWs.once("open", () => this.#handleRuntimeWebSocketOpen()); + } + get workerName() { + return this.#workerName; + } + get path() { + return `/${this.#workerName}`; + } + onDevtoolsConnected(devtoolsWs, devtoolsHaveFileSystemAccess) { + if (this.#devtoolsWs) { + devtoolsWs.close( + 1013, + "Too many clients; only one can be connected at a time" + ); + return; + } + this.#devtoolsWs = devtoolsWs; + this.#devtoolsHaveFileSystemAccess = devtoolsHaveFileSystemAccess; + (0, import_node_assert4.default)(this.#devtoolsWs?.readyState === import_ws3.default.OPEN); + this.#devtoolsWs.on("error", console.error); + this.#devtoolsWs.once("close", () => { + if (this.#runtimeWs?.OPEN) { + this.#sendMessageToRuntime({ + method: "Debugger.disable", + id: this.#nextCounter() + }); + } + this.#devtoolsWs = void 0; + }); + this.#devtoolsWs.on("message", (data) => { + const message = JSON.parse(data.toString()); + (0, import_node_assert4.default)(this.#runtimeWs?.OPEN); + this.#sendMessageToRuntime(message); + }); + } + #runtimeMessageCounter = 1e8; + #nextCounter() { + return ++this.#runtimeMessageCounter; + } + #runtimeKeepAliveInterval; + #handleRuntimeWebSocketOpen() { + (0, import_node_assert4.default)(this.#runtimeWs?.OPEN); + this.#runtimeWs.on("message", (data) => { + const message = JSON.parse(data.toString()); + if (!this.#devtoolsWs) { + return; + } + if (isDevToolsEvent(message, "Debugger.scriptParsed")) { + return this.#handleRuntimeScriptParsed(message); + } + return this.#sendMessageToDevtools(message); + }); + clearInterval(this.#runtimeKeepAliveInterval); + this.#runtimeKeepAliveInterval = setInterval(() => { + if (this.#runtimeWs?.OPEN) { + this.#sendMessageToRuntime({ + method: "Runtime.getIsolateId", + id: this.#nextCounter() + }); + } + }, 1e4); + } + #handleRuntimeScriptParsed(message) { + if (!this.#devtoolsHaveFileSystemAccess && message.params.sourceMapURL !== void 0 && // Don't try to find a sourcemap for e.g. node-internal: scripts + message.params.url.startsWith("file:")) { + const url20 = new URL(message.params.sourceMapURL, message.params.url); + if (url20.protocol === "file:") { + message.params.sourceMapURL = url20.href.replace( + "file:", + "wrangler-file:" + ); + } + } + return this.#sendMessageToDevtools(message); + } + #sendMessageToDevtools(message) { + (0, import_node_assert4.default)(this.#devtoolsWs); + if (!this.#devtoolsWs.OPEN) { + this.#devtoolsWs.once( + "open", + () => this.#devtoolsWs?.send(JSON.stringify(message)) + ); + return; + } + this.#devtoolsWs.send(JSON.stringify(message)); + } + #sendMessageToRuntime(message) { + (0, import_node_assert4.default)(this.#runtimeWs?.OPEN); + this.#runtimeWs.send(JSON.stringify(message)); + } + async dispose() { + clearInterval(this.#runtimeKeepAliveInterval); + this.#devtoolsWs?.close(); + } +}; + +// src/plugins/core/inspector-proxy/inspector-proxy-controller.ts +var InspectorProxyController = class { + constructor(userInspectorPort, log, workerNamesToProxy) { + this.log = log; + this.workerNamesToProxy = workerNamesToProxy; + this.#inspectorPort = userInspectorPort !== 0 ? userInspectorPort : getPorts(); + this.#server = this.#initializeServer(); + this.#runtimeConnectionEstablished = new DeferredPromise(); + } + #runtimeConnectionEstablished; + #proxies = []; + #server; + #inspectorPort; + async #initializeServer() { + const server = (0, import_node_http.createServer)(async (req, res) => { + const maybeJson = await this.#handleDevToolsJsonRequest( + req.headers.host ?? "localhost", + req.url ?? "/" + ); + if (maybeJson !== null) { + res.setHeader("Content-Type", "application/json"); + res.end(JSON.stringify(maybeJson)); + return; + } + res.statusCode = 404; + res.end(null); + }); + this.#initializeWebSocketServer(server); + server.listen(await this.#inspectorPort); + return server; + } + #initializeWebSocketServer(server) { + const devtoolsWebSocketServer = new import_ws4.WebSocketServer({ server }); + devtoolsWebSocketServer.on("connection", (devtoolsWs, upgradeRequest) => { + const validationError = this.#validateDevToolsWebSocketUpgradeRequest(upgradeRequest); + if (validationError !== null) { + devtoolsWs.close(); + return; + } + const proxy = this.#proxies.find( + ({ path: path30 }) => upgradeRequest.url === path30 + ); + if (!proxy) { + this.log.warn( + `Warning: An inspector connection was requested for the ${upgradeRequest.url} path but no such inspector exists` + ); + devtoolsWs.close(); + return; + } + proxy.onDevtoolsConnected( + devtoolsWs, + this.#checkIfDevtoolsHaveFileSystemAccess(upgradeRequest) + ); + }); + } + #validateDevToolsWebSocketUpgradeRequest(req) { + const hostHeader = req.headers.host; + if (hostHeader == null) return { statusText: null, status: 400 }; + try { + const host = new URL(`http://${hostHeader}`); + if (!ALLOWED_HOST_HOSTNAMES.includes(host.hostname)) { + return { statusText: "Disallowed `Host` header", status: 401 }; + } + } catch { + return { statusText: "Expected `Host` header", status: 400 }; + } + let originHeader = req.headers.origin; + if (!originHeader && !req.headers["user-agent"]) { + originHeader = "http://localhost"; + } + if (!originHeader) { + return { statusText: "Expected `Origin` header", status: 400 }; + } + try { + const origin = new URL(originHeader); + const allowed = ALLOWED_ORIGIN_HOSTNAMES.some((rule) => { + if (typeof rule === "string") return origin.hostname === rule; + else return rule.test(origin.hostname); + }); + if (!allowed) { + return { statusText: "Disallowed `Origin` header", status: 401 }; + } + } catch { + return { statusText: "Expected `Origin` header", status: 400 }; + } + return null; + } + #checkIfDevtoolsHaveFileSystemAccess(req) { + const userAgent = req.headers["user-agent"] ?? ""; + const hasFileSystemAccess = !/mozilla/i.test(userAgent); + return hasFileSystemAccess; + } + #inspectorId = import_node_crypto2.default.randomUUID(); + async #handleDevToolsJsonRequest(host, path30) { + if (path30 === "/json/version") { + return { + Browser: `miniflare/v${version}`, + // TODO: (someday): The DevTools protocol should match that of workerd. + // This could be exposed by the preview API. + "Protocol-Version": "1.3" + }; + } + if (path30 === "/json" || path30 === "/json/list") { + return this.#proxies.map(({ workerName }) => { + const localHost = `${host}/${workerName}`; + const devtoolsFrontendUrl = `https://devtools.devprod.cloudflare.dev/js_app?theme=systemPreferred&debugger=true&ws=${localHost}`; + return { + id: `${this.#inspectorId}-${workerName}`, + type: "node", + // TODO: can we specify different type? + description: "workers", + webSocketDebuggerUrl: `ws://${localHost}`, + devtoolsFrontendUrl, + devtoolsFrontendUrlCompat: devtoolsFrontendUrl, + // Below are fields that are visible in the DevTools UI. + title: workerName.length === 0 || this.#proxies.length === 1 ? `Cloudflare Worker` : `Cloudflare Worker: ${workerName}`, + faviconUrl: "https://workers.cloudflare.com/favicon.ico" + // url: "http://" + localHost, // looks unnecessary + }; + }); + } + return null; + } + async getInspectorURL() { + return getWebsocketURL(await this.#inspectorPort); + } + async updateConnection(runtimeInspectorPort) { + const workerdInspectorJson = await fetch( + `http://127.0.0.1:${runtimeInspectorPort}/json` + ).then((resp) => resp.json()); + this.#proxies = workerdInspectorJson.map(({ id }) => { + if (!id.startsWith("core:user:")) { + return; + } + const workerName = id.replace(/^core:user:/, ""); + if (!this.workerNamesToProxy.has(workerName)) { + return; + } + return new InspectorProxy( + workerName, + new import_ws4.default(`ws://127.0.0.1:${runtimeInspectorPort}/${id}`) + ); + }).filter(Boolean); + this.#runtimeConnectionEstablished.resolve(); + } + async #waitForReady() { + await this.#runtimeConnectionEstablished; + } + get ready() { + return this.#waitForReady(); + } + async dispose() { + await Promise.all(this.#proxies.map((proxy) => proxy.dispose())); + const server = await this.#server; + return new Promise((resolve2, reject) => { + server.close((err) => err ? reject(err) : resolve2()); + }); + } +}; +function getWebsocketURL(port) { + return new URL(`ws://127.0.0.1:${port}`); +} +var ALLOWED_HOST_HOSTNAMES = ["127.0.0.1", "[::1]", "localhost"]; +var ALLOWED_ORIGIN_HOSTNAMES = [ + "devtools.devprod.cloudflare.dev", + "cloudflare-devtools.pages.dev", + /^[a-z0-9]+\.cloudflare-devtools\.pages\.dev$/, + "127.0.0.1", + "[::1]", + "localhost" +]; + +// src/shared/mime-types.ts +var compressedByCloudflareFL = /* @__PURE__ */ new Set([ + // list copied from https://developers.cloudflare.com/speed/optimization/content/brotli/content-compression/#:~:text=If%20supported%20by%20visitors%E2%80%99%20web%20browsers%2C%20Cloudflare%20will%20return%20Gzip%20or%20Brotli%2Dencoded%20responses%20for%20the%20following%20content%20types%3A + "text/html", + "text/richtext", + "text/plain", + "text/css", + "text/x-script", + "text/x-component", + "text/x-java-source", + "text/x-markdown", + "application/javascript", + "application/x-javascript", + "text/javascript", + "text/js", + "image/x-icon", + "image/vnd.microsoft.icon", + "application/x-perl", + "application/x-httpd-cgi", + "text/xml", + "application/xml", + "application/rss+xml", + "application/vnd.api+json", + "application/x-protobuf", + "application/json", + "multipart/bag", + "multipart/mixed", + "application/xhtml+xml", + "font/ttf", + "font/otf", + "font/x-woff", + "image/svg+xml", + "application/vnd.ms-fontobject", + "application/ttf", + "application/x-ttf", + "application/otf", + "application/x-otf", + "application/truetype", + "application/opentype", + "application/x-opentype", + "application/font-woff", + "application/eot", + "application/font", + "application/font-sfnt", + "application/wasm", + "application/javascript-binast", + "application/manifest+json", + "application/ld+json", + "application/graphql+json", + "application/geo+json" +]); +function isCompressedByCloudflareFL(contentTypeHeader) { + if (!contentTypeHeader) return true; + const [contentType] = contentTypeHeader.split(";"); + return compressedByCloudflareFL.has(contentType); +} + +// src/zod-format.ts +var import_assert11 = __toESM(require("assert")); +var import_util4 = __toESM(require("util")); +var kMessages = Symbol("kMessages"); +var kActual = Symbol("kActual"); +var kGroupId = Symbol("kGroupId"); +var groupColours = [ + yellow, + /* (green) */ + cyan, + blue, + magenta, + green +]; +var GroupCountsMap = Map; +function isAnnotation(value) { + return typeof value === "object" && value !== null && kMessages in value && kActual in value; +} +function isRecord(value) { + return typeof value === "object" && value !== null; +} +function arrayShallowEqual(a, b) { + if (a.length !== b.length) return false; + for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false; + return true; +} +function issueEqual(a, b) { + return a.message === b.message && arrayShallowEqual(a.path, b.path); +} +function hasMultipleDistinctMessages(issues, atDepth) { + let firstIssue; + for (const issue of issues) { + if (issue.path.length < atDepth) continue; + if (firstIssue === void 0) firstIssue = issue; + else if (!issueEqual(firstIssue, issue)) return true; + } + return false; +} +function annotate(groupCounts, annotated, input, issue, path30, groupId) { + if (path30.length === 0) { + if (issue.code === "invalid_union") { + const unionIssues = issue.unionErrors.flatMap(({ issues }) => issues); + let newGroupId; + const multipleDistinct = hasMultipleDistinctMessages( + unionIssues, + // For this check, we only include messages that are deeper than our + // current level, so we don't include messages we'd ignore if we grouped + issue.path.length + 1 + ); + if (isRecord(input) && multipleDistinct) { + newGroupId = groupCounts.size; + groupCounts.set(newGroupId, 0); + } + for (const unionIssue of unionIssues) { + const unionPath = unionIssue.path.slice(issue.path.length); + if (multipleDistinct && unionPath.length === 0) continue; + annotated = annotate( + groupCounts, + annotated, + input, + unionIssue, + unionPath, + newGroupId + ); + } + return annotated; + } + const message = issue.message; + if (annotated !== void 0) { + if (isAnnotation(annotated) && !annotated[kMessages].includes(message)) { + annotated[kMessages].push(message); + } + return annotated; + } + if (groupId !== void 0) { + const current = groupCounts.get(groupId); + (0, import_assert11.default)(current !== void 0); + groupCounts.set(groupId, current + 1); + } + return { + [kMessages]: [message], + [kActual]: input, + [kGroupId]: groupId + }; + } + const [head, ...tail] = path30; + (0, import_assert11.default)(isRecord(input), "Expected object/array input for nested issue"); + if (annotated === void 0) { + if (Array.isArray(input)) { + annotated = new Array(input.length); + } else { + const entries = Object.keys(input).map((key) => [key, void 0]); + annotated = Object.fromEntries(entries); + } + } + (0, import_assert11.default)(isRecord(annotated), "Expected object/array for nested issue"); + annotated[head] = annotate( + groupCounts, + annotated[head], + input[head], + issue, + tail, + groupId + ); + return annotated; +} +function print(inspectOptions, groupCounts, annotated, indent = "", extras) { + const prefix = extras?.prefix ?? ""; + const suffix = extras?.suffix ?? ""; + if (isAnnotation(annotated)) { + const prefixIndent = indent + " ".repeat(prefix.length); + const actual = import_util4.default.inspect(annotated[kActual], inspectOptions); + const actualIndented = actual.split("\n").map((line, i) => i > 0 ? prefixIndent + line : line).join("\n"); + let messageColour = red; + let messagePrefix = prefixIndent + "^"; + let groupOr = ""; + if (annotated[kGroupId] !== void 0) { + messageColour = groupColours[annotated[kGroupId] % groupColours.length]; + messagePrefix += annotated[kGroupId] + 1; + const remaining = groupCounts.get(annotated[kGroupId]); + (0, import_assert11.default)(remaining !== void 0); + if (remaining > 1) groupOr = " *or*"; + groupCounts.set(annotated[kGroupId], remaining - 1); + } + messagePrefix += " "; + const messageIndent = " ".repeat(messagePrefix.length); + const messageIndented = annotated[kMessages].flatMap((m) => m.split("\n")).map((line, i) => i > 0 ? messageIndent + line : line).join("\n"); + const error = messageColour(`${messagePrefix}${messageIndented}${groupOr}`); + return `${indent}${dim(prefix)}${actualIndented}${dim(suffix)} +${error}`; + } else if (Array.isArray(annotated)) { + let result = `${indent}${dim(`${prefix}[`)} +`; + const arrayIndent = indent + " "; + for (let i = 0; i < annotated.length; i++) { + const value = annotated[i]; + if (value === void 0 && (i === 0 || annotated[i - 1] !== void 0)) { + result += `${arrayIndent}${dim("...,")} +`; + } + if (value !== void 0) { + result += print(inspectOptions, groupCounts, value, arrayIndent, { + prefix: `/* [${i}] */ `, + suffix: "," + }); + result += "\n"; + } + } + result += `${indent}${dim(`]${suffix}`)}`; + return result; + } else if (isRecord(annotated)) { + let result = `${indent}${dim(`${prefix}{`)} +`; + const objectIndent = indent + " "; + const entries = Object.entries(annotated); + for (let i = 0; i < entries.length; i++) { + const [key, value] = entries[i]; + if (value === void 0 && (i === 0 || entries[i - 1][1] !== void 0)) { + result += `${objectIndent}${dim("...,")} +`; + } + if (value !== void 0) { + result += print(inspectOptions, groupCounts, value, objectIndent, { + prefix: `${key}: `, + suffix: "," + }); + result += "\n"; + } + } + result += `${indent}${dim(`}${suffix}`)}`; + return result; + } + return ""; +} +function formatZodError(error, input) { + const sortedIssues = Array.from(error.issues).sort((a, b) => { + if (a.code !== b.code) { + if (a.code === "invalid_union") return -1; + if (b.code === "invalid_union") return 1; + } + return 0; + }); + let annotated; + const groupCounts = new GroupCountsMap(); + for (const issue of sortedIssues) { + annotated = annotate(groupCounts, annotated, input, issue, issue.path); + } + const inspectOptions = { + depth: 0, + colors: $.enabled + }; + return print(inspectOptions, groupCounts, annotated); +} + +// src/merge.ts +var objectProtoNames = Object.getOwnPropertyNames(Object.prototype).sort().join("\0"); +function isPlainObject(value) { + const proto = Object.getPrototypeOf(value); + return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join("\0") === objectProtoNames; +} +function convertWorkerOptionsArrayToObject(key, array) { + const _ = array; + if (key === "queueConsumers") { + const object = Object.fromEntries( + array.map((item) => [item, {}]) + ); + return object; + } else { + const object = Object.fromEntries(array.map((item) => [item, item])); + return object; + } +} +function mergeWorkerOptions(a, b) { + const aRecord = a; + for (const [key, bValue] of Object.entries(b)) { + const aValue = aRecord[key]; + if (aValue === void 0) { + aRecord[key] = bValue; + continue; + } + const aIsArray = Array.isArray(aValue); + const bIsArray = Array.isArray(bValue); + const aIsObject = isPlainObject(aValue); + const bIsObject = isPlainObject(bValue); + if (aIsArray && bIsArray) { + aRecord[key] = Array.from(new Set(aValue.concat(bValue))); + } else if (aIsArray && bIsObject) { + const aNewValue = convertWorkerOptionsArrayToObject( + // Must be an array/record key if `aValue` & `bValue` are array/record + key, + aValue + ); + Object.assign(aNewValue, bValue); + aRecord[key] = aNewValue; + } else if (aIsObject && bIsArray) { + const bNewValue = convertWorkerOptionsArrayToObject( + // Must be an array/record key if `aValue` & `bValue` are array/record + key, + bValue + ); + Object.assign(aValue, bNewValue); + } else if (aIsObject && bIsObject) { + Object.assign(aValue, bValue); + } else { + aRecord[key] = bValue; + } + } + return a; +} + +// src/index.ts +var DEFAULT_HOST = "127.0.0.1"; +function getURLSafeHost(host) { + return import_net.default.isIPv6(host) ? `[${host}]` : host; +} +function maybeGetLocallyAccessibleHost(h) { + if (h === "localhost") return "localhost"; + if (h === "127.0.0.1" || h === "*" || h === "0.0.0.0" || h === "::") { + return "127.0.0.1"; + } + if (h === "::1") return "[::1]"; +} +function getServerPort(server) { + const address = server.address(); + (0, import_assert12.default)(address !== null && typeof address === "object"); + return address.port; +} +function hasMultipleWorkers(opts) { + return typeof opts === "object" && opts !== null && "workers" in opts && Array.isArray(opts.workers); +} +function getRootPath(opts) { + if (typeof opts === "object" && opts !== null && "rootPath" in opts && typeof opts.rootPath === "string") { + return opts.rootPath; + } else { + return ""; + } +} +function validateOptions(opts) { + const sharedOpts = opts; + const multipleWorkers = hasMultipleWorkers(opts); + const workerOpts = multipleWorkers ? opts.workers : [opts]; + if (workerOpts.length === 0) { + throw new MiniflareCoreError("ERR_NO_WORKERS", "No workers defined"); + } + const pluginSharedOpts = {}; + const pluginWorkerOpts = Array.from(Array(workerOpts.length)).map( + () => ({}) + ); + const sharedRootPath = multipleWorkers ? getRootPath(sharedOpts) : ""; + const workerRootPaths = workerOpts.map( + (opts2) => import_path28.default.resolve(sharedRootPath, getRootPath(opts2)) + ); + try { + for (const [key, plugin] of PLUGIN_ENTRIES) { + pluginSharedOpts[key] = plugin.sharedOptions === void 0 ? void 0 : parseWithRootPath(sharedRootPath, plugin.sharedOptions, sharedOpts); + for (let i = 0; i < workerOpts.length; i++) { + const optionsPath = multipleWorkers ? ["workers", i] : void 0; + pluginWorkerOpts[i][key] = parseWithRootPath( + workerRootPaths[i], + plugin.options, + workerOpts[i], + { path: optionsPath } + ); + } + } + } catch (e) { + if (e instanceof import_zod23.z.ZodError) { + let formatted; + try { + formatted = formatZodError(e, opts); + } catch (formatError) { + const title = "[Miniflare] Validation Error Format Failure"; + const message = [ + "### Input", + "```", + import_util5.default.inspect(opts, { depth: null }), + "```", + "", + "### Validation Error", + "```", + e.stack, + "```", + "", + "### Format Error", + "```", + typeof formatError === "object" && formatError !== null && "stack" in formatError && typeof formatError.stack === "string" ? formatError.stack : String(formatError), + "```" + ].join("\n"); + const githubIssueUrl = new URL( + "https://github.com/cloudflare/miniflare/issues/new" + ); + githubIssueUrl.searchParams.set("title", title); + githubIssueUrl.searchParams.set("body", message); + formatted = [ + "Unable to format validation error.", + "Please open the following URL in your browser to create a GitHub issue:", + githubIssueUrl, + "", + message, + "" + ].join("\n"); + } + const error = new MiniflareCoreError( + "ERR_VALIDATION", + `Unexpected options passed to \`new Miniflare()\` constructor: +${formatted}` + ); + Object.defineProperty(error, "cause", { get: () => e }); + throw error; + } + throw e; + } + const names = /* @__PURE__ */ new Set(); + for (const opts2 of pluginWorkerOpts) { + const name = opts2.core.name ?? ""; + if (names.has(name)) { + throw new MiniflareCoreError( + "ERR_DUPLICATE_NAME", + name === "" ? "Multiple workers defined without a `name`" : `Multiple workers defined with the same \`name\`: "${name}"` + ); + } + names.add(name); + } + return [pluginSharedOpts, pluginWorkerOpts]; +} +function getDurableObjectClassNames(allWorkerOpts) { + const serviceClassNames = /* @__PURE__ */ new Map(); + for (const workerOpts of allWorkerOpts) { + const workerServiceName = getUserServiceName(workerOpts.core.name); + for (const designator of Object.values( + workerOpts.do.durableObjects ?? {} + )) { + const { + className, + // Fallback to current worker service if name not defined + serviceName = workerServiceName, + enableSql, + unsafeUniqueKey, + unsafePreventEviction + } = normaliseDurableObject(designator); + let classNames = serviceClassNames.get(serviceName); + if (classNames === void 0) { + classNames = /* @__PURE__ */ new Map(); + serviceClassNames.set(serviceName, classNames); + } + if (classNames.has(className)) { + const existingInfo = classNames.get(className); + if (existingInfo?.enableSql !== enableSql) { + throw new MiniflareCoreError( + "ERR_DIFFERENT_STORAGE_BACKEND", + `Different storage backends defined for Durable Object "${className}" in "${serviceName}": ${JSON.stringify( + enableSql + )} and ${JSON.stringify(existingInfo?.enableSql)}` + ); + } + if (existingInfo?.unsafeUniqueKey !== unsafeUniqueKey) { + throw new MiniflareCoreError( + "ERR_DIFFERENT_UNIQUE_KEYS", + `Multiple unsafe unique keys defined for Durable Object "${className}" in "${serviceName}": ${JSON.stringify( + unsafeUniqueKey + )} and ${JSON.stringify(existingInfo?.unsafeUniqueKey)}` + ); + } + if (existingInfo?.unsafePreventEviction !== unsafePreventEviction) { + throw new MiniflareCoreError( + "ERR_DIFFERENT_PREVENT_EVICTION", + `Multiple unsafe prevent eviction values defined for Durable Object "${className}" in "${serviceName}": ${JSON.stringify( + unsafePreventEviction + )} and ${JSON.stringify(existingInfo?.unsafePreventEviction)}` + ); + } + } else { + classNames.set(className, { + enableSql, + unsafeUniqueKey, + unsafePreventEviction + }); + } + } + } + return serviceClassNames; +} +function invalidWrappedAsBound(name, bindingType) { + const stringName = JSON.stringify(name); + throw new MiniflareCoreError( + "ERR_INVALID_WRAPPED", + `Cannot use ${stringName} for wrapped binding because it is bound to with ${bindingType} bindings. +Ensure other workers don't define ${bindingType} bindings to ${stringName}.` + ); +} +function getWrappedBindingNames(allWorkerOpts, durableObjectClassNames) { + const wrappedBindingWorkerNames = /* @__PURE__ */ new Set(); + for (const workerOpts of allWorkerOpts) { + for (const designator of Object.values( + workerOpts.core.wrappedBindings ?? {} + )) { + const scriptName = typeof designator === "object" ? designator.scriptName : designator; + if (durableObjectClassNames.has(getUserServiceName(scriptName))) { + invalidWrappedAsBound(scriptName, "Durable Object"); + } + wrappedBindingWorkerNames.add(scriptName); + } + } + for (const workerOpts of allWorkerOpts) { + for (const designator of Object.values( + workerOpts.core.serviceBindings ?? {} + )) { + if (typeof designator !== "string") continue; + if (wrappedBindingWorkerNames.has(designator)) { + invalidWrappedAsBound(designator, "service"); + } + } + } + return wrappedBindingWorkerNames; +} +function getQueueProducers(allWorkerOpts) { + const queueProducers = /* @__PURE__ */ new Map(); + for (const workerOpts of allWorkerOpts) { + const workerName = workerOpts.core.name ?? ""; + let workerProducers = workerOpts.queues.queueProducers; + if (workerProducers !== void 0) { + if (Array.isArray(workerProducers)) { + workerProducers = Object.fromEntries( + workerProducers.map((bindingName) => [ + bindingName, + { queueName: bindingName } + ]) + ); + } + const producersIterable = Object.entries( + workerProducers + ); + for (const [bindingName, opts] of producersIterable) { + if (typeof opts === "string") { + queueProducers.set(bindingName, { workerName, queueName: opts }); + } else { + queueProducers.set(bindingName, { workerName, ...opts }); + } + } + } + } + return queueProducers; +} +function getQueueConsumers(allWorkerOpts) { + const queueConsumers = /* @__PURE__ */ new Map(); + for (const workerOpts of allWorkerOpts) { + const workerName = workerOpts.core.name ?? ""; + let workerConsumers = workerOpts.queues.queueConsumers; + if (workerConsumers !== void 0) { + if (Array.isArray(workerConsumers)) { + workerConsumers = Object.fromEntries( + workerConsumers.map((queueName) => [queueName, {}]) + ); + } + for (const [queueName, opts] of Object.entries(workerConsumers)) { + const existingConsumer = queueConsumers.get(queueName); + if (existingConsumer !== void 0) { + throw new QueuesError( + "ERR_MULTIPLE_CONSUMERS", + `Multiple consumers defined for queue "${queueName}": "${existingConsumer.workerName}" and "${workerName}"` + ); + } + queueConsumers.set(queueName, { workerName, ...opts }); + } + } + } + for (const [queueName, consumer] of queueConsumers) { + if (consumer.deadLetterQueue === queueName) { + throw new QueuesError( + "ERR_DEAD_LETTER_QUEUE_CYCLE", + `Dead letter queue for queue "${queueName}" cannot be itself` + ); + } + } + return queueConsumers; +} +function getWorkerRoutes(allWorkerOpts, wrappedBindingNames) { + const allRoutes = /* @__PURE__ */ new Map(); + for (const workerOpts of allWorkerOpts) { + const name = workerOpts.core.name ?? ""; + if (wrappedBindingNames.has(name)) continue; + (0, import_assert12.default)(!allRoutes.has(name)); + allRoutes.set(name, workerOpts.core.routes ?? []); + } + return allRoutes; +} +function getProxyBindingName(plugin, worker, binding) { + return [ + CoreBindings.DURABLE_OBJECT_NAMESPACE_PROXY, + plugin, + worker, + binding + ].join(":"); +} +function isNativeTargetBinding(binding) { + return !("json" in binding || "wasmModule" in binding || "text" in binding || "data" in binding); +} +function buildProxyBinding(plugin, worker, binding) { + (0, import_assert12.default)(binding.name !== void 0); + const name = getProxyBindingName(plugin, worker, binding.name); + const proxyBinding = { ...binding, name }; + if ("durableObjectNamespace" in proxyBinding && proxyBinding.durableObjectNamespace !== void 0) { + proxyBinding.durableObjectNamespace.serviceName ??= getUserServiceName(worker); + } + return proxyBinding; +} +function getInternalDurableObjectProxyBindings(plugin, service) { + if (!("worker" in service)) return; + (0, import_assert12.default)(service.worker !== void 0); + const serviceName = service.name; + (0, import_assert12.default)(serviceName !== void 0); + return service.worker.durableObjectNamespaces?.map(({ className }) => { + (0, import_assert12.default)(className !== void 0); + return { + name: getProxyBindingName(`${plugin}-internal`, serviceName, className), + durableObjectNamespace: { serviceName, className } + }; + }); +} +var restrictedUndiciHeaders = [ + // From Miniflare 2: + // https://github.com/cloudflare/miniflare/blob/9c135599dc21fe69080ada17fce6153692793bf1/packages/core/src/standards/http.ts#L129-L132 + "transfer-encoding", + "connection", + "keep-alive", + "expect" +]; +var restrictedWebSocketUpgradeHeaders = [ + "upgrade", + "connection", + "sec-websocket-accept" +]; +function _transformsForContentEncodingAndContentType(encoding, type) { + const encoders = []; + if (!encoding) return encoders; + if (!isCompressedByCloudflareFL(type)) return encoders; + const codings = encoding.toLowerCase().split(",").map((x) => x.trim()); + for (const coding of codings) { + if (/(x-)?gzip/.test(coding)) { + encoders.push(import_zlib.default.createGzip()); + } else if (/(x-)?deflate/.test(coding)) { + encoders.push(import_zlib.default.createDeflate()); + } else if (coding === "br") { + encoders.push(import_zlib.default.createBrotliCompress()); + } else { + encoders.length = 0; + break; + } + } + return encoders; +} +async function writeResponse(response, res) { + const headers = {}; + for (const entry of response.headers) { + const key = entry[0].toLowerCase(); + const value = entry[1]; + if (key === "set-cookie") { + headers[key] = response.headers.getSetCookie(); + } else { + headers[key] = value; + } + } + const encoding = headers["content-encoding"]?.toString(); + const type = headers["content-type"]?.toString(); + const encoders = _transformsForContentEncodingAndContentType(encoding, type); + if (encoders.length > 0) { + delete headers["content-length"]; + } + res.writeHead(response.status, response.statusText, headers); + let initialStream = res; + for (let i = encoders.length - 1; i >= 0; i--) { + encoders[i].pipe(initialStream); + initialStream = encoders[i]; + } + if (response.body) { + for await (const chunk of response.body) { + if (chunk) initialStream.write(chunk); + } + } + initialStream.end(); +} +function safeReadableStreamFrom(iterable) { + let iterator; + return new import_web5.ReadableStream({ + async start() { + iterator = iterable[Symbol.asyncIterator](); + }, + // @ts-expect-error `pull` may return anything + async pull(controller) { + try { + const { done, value } = await iterator.next(); + if (done) { + queueMicrotask(() => controller.close()); + } else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); + controller.enqueue(new Uint8Array(buf)); + } + } catch { + queueMicrotask(() => controller.close()); + } + return controller.desiredSize > 0; + }, + async cancel() { + await iterator.return?.(); + } + }); +} +var maybeInstanceRegistry; +function _initialiseInstanceRegistry() { + return maybeInstanceRegistry = /* @__PURE__ */ new Map(); +} +var Miniflare2 = class _Miniflare { + #previousSharedOpts; + #previousWorkerOpts; + #sharedOpts; + #workerOpts; + #log; + #runtime; + #removeExitHook; + #runtimeEntryURL; + #socketPorts; + #runtimeDispatcher; + #proxyClient; + #cfObject = {}; + // Path to temporary directory for use as scratch space/"in-memory" Durable + // Object storage. Note this may not exist, it's up to the consumers to + // create this if needed. Deleted on `dispose()`. + #tmpPath; + // Mutual exclusion lock for runtime operations (i.e. initialisation and + // updating config). This essentially puts initialisation and future updates + // in a queue, ensuring they're performed in calling order. + #runtimeMutex; + // Store `#init()` `Promise`, so we can propagate initialisation errors in + // `ready`. We would have no way of catching these otherwise. + #initPromise; + // Aborted when dispose() is called + #disposeController; + #loopbackServer; + #loopbackHost; + #liveReloadServer; + #webSocketServer; + #webSocketExtraHeaders; + #maybeInspectorProxyController; + #previousRuntimeInspectorPort; + constructor(opts) { + const [sharedOpts, workerOpts] = validateOptions(opts); + this.#sharedOpts = sharedOpts; + this.#workerOpts = workerOpts; + const workerNamesToProxy = new Set( + this.#workerOpts.filter(({ core: { unsafeInspectorProxy } }) => !!unsafeInspectorProxy).map((w) => w.core.name ?? "") + ); + const enableInspectorProxy = workerNamesToProxy.size > 0; + if (enableInspectorProxy) { + if (this.#sharedOpts.core.inspectorPort === void 0) { + throw new MiniflareCoreError( + "ERR_MISSING_INSPECTOR_PROXY_PORT", + "inspector proxy requested but without an inspectorPort specified" + ); + } + } + if (maybeInstanceRegistry !== void 0) { + const object = { name: "Miniflare", stack: "" }; + Error.captureStackTrace(object, _Miniflare); + maybeInstanceRegistry.set(this, object.stack); + } + this.#log = this.#sharedOpts.core.log ?? new NoOpLog(); + if (enableInspectorProxy) { + if (this.#sharedOpts.core.inspectorPort === void 0) { + throw new MiniflareCoreError( + "ERR_MISSING_INSPECTOR_PROXY_PORT", + "inspector proxy requested but without an inspectorPort specified" + ); + } + this.#maybeInspectorProxyController = new InspectorProxyController( + this.#sharedOpts.core.inspectorPort, + this.#log, + workerNamesToProxy + ); + } + this.#liveReloadServer = new import_ws5.WebSocketServer({ noServer: true }); + this.#webSocketServer = new import_ws5.WebSocketServer({ + noServer: true, + // Disable automatic handling of `Sec-WebSocket-Protocol` header, + // Cloudflare Workers require users to include this header themselves in + // `Response`s: https://github.com/cloudflare/miniflare/issues/179 + handleProtocols: () => false + }); + this.#webSocketExtraHeaders = /* @__PURE__ */ new WeakMap(); + this.#webSocketServer.on("headers", (headers, req) => { + const extra = this.#webSocketExtraHeaders.get(req); + this.#webSocketExtraHeaders.delete(req); + if (extra) { + for (const [key, value] of extra) { + if (!restrictedWebSocketUpgradeHeaders.includes(key.toLowerCase())) { + headers.push(`${key}: ${value}`); + } + } + } + }); + this.#tmpPath = import_path28.default.join( + import_os2.default.tmpdir(), + `miniflare-${import_crypto3.default.randomBytes(16).toString("hex")}` + ); + this.#runtime = new Runtime(); + this.#removeExitHook = (0, import_exit_hook.default)(() => { + void this.#runtime?.dispose(); + try { + import_fs24.default.rmSync(this.#tmpPath, { force: true, recursive: true }); + } catch (e) { + this.#log.debug(`Unable to remove temporary directory: ${String(e)}`); + } + }); + this.#disposeController = new AbortController(); + this.#runtimeMutex = new Mutex(); + this.#initPromise = this.#runtimeMutex.runWith(() => this.#assembleAndUpdateConfig()).catch((e) => { + maybeInstanceRegistry?.delete(this); + throw e; + }); + } + #handleReload() { + for (const ws of this.#liveReloadServer.clients) { + ws.close(1012, "Service Restart"); + } + for (const ws of this.#webSocketServer.clients) { + ws.close(1012, "Service Restart"); + } + } + async #handleLoopbackCustomService(request, customService) { + const slashIndex = customService.indexOf("/"); + const workerIndex = parseInt(customService.substring(0, slashIndex)); + const serviceKind = customService[slashIndex + 1]; + const serviceName = customService.substring(slashIndex + 2); + let service; + if (serviceKind === "#" /* UNKNOWN */) { + service = this.#workerOpts[workerIndex]?.core.serviceBindings?.[serviceName]; + } else if (serviceName === CUSTOM_SERVICE_KNOWN_OUTBOUND) { + service = this.#workerOpts[workerIndex]?.core.outboundService; + } + (0, import_assert12.default)(typeof service === "function"); + try { + let response = await service(request, this); + if (!(response instanceof Response)) { + response = new Response(response.body, response); + } + return import_zod23.z.instanceof(Response).parse(response); + } catch (e) { + return new Response(e?.stack ?? e, { status: 500 }); + } + } + get #workerSrcOpts() { + return this.#workerOpts.map(({ core }) => core); + } + #handleLoopback = async (req, res) => { + const headers = new import_undici4.Headers(); + for (const [name, values] of Object.entries(req.headers)) { + if (restrictedUndiciHeaders.includes(name)) continue; + if (Array.isArray(values)) { + for (const value of values) headers.append(name, value); + } else if (values !== void 0) { + headers.append(name, values); + } + } + const cfBlob = headers.get(CoreHeaders.CF_BLOB); + headers.delete(CoreHeaders.CF_BLOB); + (0, import_assert12.default)(!Array.isArray(cfBlob)); + const cf = cfBlob ? JSON.parse(cfBlob) : void 0; + const originalUrl = headers.get(CoreHeaders.ORIGINAL_URL); + const url20 = new URL(originalUrl ?? req.url ?? "", "http://localhost"); + headers.delete(CoreHeaders.ORIGINAL_URL); + const noBody = req.method === "GET" || req.method === "HEAD"; + const body = noBody ? void 0 : safeReadableStreamFrom(req); + const request = new Request(url20, { + method: req.method, + headers, + body, + duplex: "half", + cf + }); + let response; + try { + const customService = request.headers.get(CoreHeaders.CUSTOM_SERVICE); + if (customService !== null) { + request.headers.delete(CoreHeaders.CUSTOM_SERVICE); + response = await this.#handleLoopbackCustomService( + request, + customService + ); + } else if (this.#sharedOpts.core.unsafeModuleFallbackService !== void 0 && request.headers.has("X-Resolve-Method") && originalUrl === null) { + response = await this.#sharedOpts.core.unsafeModuleFallbackService( + request, + this + ); + } else if (url20.pathname === "/core/error") { + response = await handlePrettyErrorRequest( + this.#log, + this.#workerSrcOpts, + request + ); + } else if (url20.pathname === "/core/log") { + const level = parseInt(request.headers.get(SharedHeaders.LOG_LEVEL)); + (0, import_assert12.default)( + 0 /* NONE */ <= level && level <= 5 /* VERBOSE */, + `Expected ${SharedHeaders.LOG_LEVEL} header to be log level, got ${level}` + ); + const logLevel = level; + let message = await request.text(); + if (!$.enabled) message = stripAnsi(message); + this.#log.logWithLevel(logLevel, message); + response = new Response(null, { status: 204 }); + } + } catch (e) { + this.#log.error(e); + res?.writeHead(500); + res?.end(e?.stack ?? String(e)); + return; + } + if (res !== void 0) { + if (response === void 0) { + res.writeHead(404); + res.end(); + } else { + await writeResponse(response, res); + } + } + return response; + }; + #handleLoopbackUpgrade = async (req, socket, head) => { + const { pathname } = new URL(req.url ?? "", "http://localhost"); + if (pathname === "/cdn-cgi/mf/reload") { + this.#liveReloadServer.handleUpgrade(req, socket, head, (ws) => { + this.#liveReloadServer.emit("connection", ws, req); + }); + return; + } + const response = await this.#handleLoopback(req); + const webSocket = response?.webSocket; + if (response?.status === 101 && webSocket) { + this.#webSocketExtraHeaders.set(req, response.headers); + this.#webSocketServer.handleUpgrade(req, socket, head, (ws) => { + void coupleWebSocket(ws, webSocket); + this.#webSocketServer.emit("connection", ws, req); + }); + return; + } + const res = new import_http6.default.ServerResponse(req); + (0, import_assert12.default)(socket instanceof import_net.default.Socket); + res.assignSocket(socket); + if (!response || response.ok) { + res.writeHead(500); + res.end(); + this.#log.error( + new TypeError( + "Web Socket request did not return status 101 Switching Protocols response with Web Socket" + ) + ); + return; + } + await writeResponse(response, res); + }; + async #getLoopbackPort() { + const loopbackHost = this.#sharedOpts.core.host ?? DEFAULT_HOST; + if (this.#loopbackServer !== void 0) { + if (this.#loopbackHost === loopbackHost) { + return getServerPort(this.#loopbackServer); + } + await this.#stopLoopbackServer(); + } + this.#loopbackServer = await this.#startLoopbackServer(loopbackHost); + this.#loopbackHost = loopbackHost; + return getServerPort(this.#loopbackServer); + } + #startLoopbackServer(hostname) { + if (hostname === "*") hostname = "::"; + return new Promise((resolve2) => { + const server = (0, import_stoppable.default)( + import_http6.default.createServer(this.#handleLoopback), + /* grace */ + 0 + ); + server.on("upgrade", this.#handleLoopbackUpgrade); + server.listen(0, hostname, () => resolve2(server)); + }); + } + #stopLoopbackServer() { + return new Promise((resolve2, reject) => { + (0, import_assert12.default)(this.#loopbackServer !== void 0); + this.#loopbackServer.stop((err) => err ? reject(err) : resolve2()); + }); + } + #getSocketAddress(id, previousRequestedPort, host = DEFAULT_HOST, requestedPort) { + if (requestedPort === 0 && previousRequestedPort === 0) { + requestedPort = this.#socketPorts?.get(id); + } + return `${getURLSafeHost(host)}:${requestedPort ?? 0}`; + } + async #assembleConfig(loopbackPort) { + const allPreviousWorkerOpts = this.#previousWorkerOpts; + const allWorkerOpts = this.#workerOpts; + const sharedOpts = this.#sharedOpts; + sharedOpts.core.cf = await setupCf(this.#log, sharedOpts.core.cf); + this.#cfObject = sharedOpts.core.cf; + const durableObjectClassNames = getDurableObjectClassNames(allWorkerOpts); + const wrappedBindingNames = getWrappedBindingNames( + allWorkerOpts, + durableObjectClassNames + ); + const queueProducers = getQueueProducers(allWorkerOpts); + const queueConsumers = getQueueConsumers(allWorkerOpts); + const allWorkerRoutes = getWorkerRoutes(allWorkerOpts, wrappedBindingNames); + const workerNames = [...allWorkerRoutes.keys()]; + const services = /* @__PURE__ */ new Map(); + const extensions = [ + { + modules: [ + { name: "miniflare:shared", esModule: index_worker_default() }, + { name: "miniflare:zod", esModule: zod_worker_default() } + ] + } + ]; + const sockets = [ + { + name: SOCKET_ENTRY, + service: { name: SERVICE_ENTRY }, + ...await getEntrySocketHttpOptions(sharedOpts.core) + } + ]; + const configuredHost = sharedOpts.core.host ?? DEFAULT_HOST; + if (maybeGetLocallyAccessibleHost(configuredHost) === void 0) { + sockets.push({ + name: SOCKET_ENTRY_LOCAL, + service: { name: SERVICE_ENTRY }, + http: {}, + address: "127.0.0.1:0" + }); + } + const proxyBindings = []; + const allWorkerBindings = /* @__PURE__ */ new Map(); + const wrappedBindingsToPopulate = []; + for (let i = 0; i < allWorkerOpts.length; i++) { + const previousWorkerOpts = allPreviousWorkerOpts?.[i]; + const workerOpts = allWorkerOpts[i]; + const workerName = workerOpts.core.name ?? ""; + const isModulesWorker = Boolean(workerOpts.core.modules); + if (workerOpts.workflows.workflows) { + for (const workflow of Object.values(workerOpts.workflows.workflows)) { + workflow.scriptName ??= workerOpts.core.name; + } + } + if (workerOpts.assets.assets) { + workerOpts.assets.assets.workerName = workerOpts.core.name; + } + const workerBindings = []; + allWorkerBindings.set(workerName, workerBindings); + const additionalModules = []; + for (const [key, plugin] of PLUGIN_ENTRIES) { + const pluginBindings = await plugin.getBindings(workerOpts[key], i); + if (pluginBindings !== void 0) { + for (const binding of pluginBindings) { + if (key === "kv" && binding.name === SiteBindings.JSON_SITE_MANIFEST && isModulesWorker) { + (0, import_assert12.default)("json" in binding && binding.json !== void 0); + additionalModules.push({ + name: SiteBindings.JSON_SITE_MANIFEST, + text: binding.json + }); + } else { + workerBindings.push(binding); + } + if (isNativeTargetBinding(binding)) { + proxyBindings.push(buildProxyBinding(key, workerName, binding)); + } + if ("wrapped" in binding && binding.wrapped?.moduleName !== void 0 && binding.wrapped.innerBindings !== void 0) { + const workerName2 = maybeWrappedModuleToWorkerName( + binding.wrapped.moduleName + ); + if (workerName2 !== void 0) { + wrappedBindingsToPopulate.push({ + workerName: workerName2, + innerBindings: binding.wrapped.innerBindings + }); + } + } + if ("service" in binding) { + const targetWorkerName = binding.service?.name?.replace( + "core:user:", + "" + ); + const maybeAssetTargetService = allWorkerOpts.find( + (worker) => worker.core.name === targetWorkerName && worker.assets.assets + ); + if (maybeAssetTargetService && !binding.service?.entrypoint) { + (0, import_assert12.default)(binding.service?.name); + binding.service.name = this.#sharedOpts.core.unsafeEnableAssetsRpc ? `${RPC_PROXY_SERVICE_NAME}:${targetWorkerName}` : `${ROUTER_SERVICE_NAME}:${targetWorkerName}`; + } + } + } + } + } + const unsafeStickyBlobs = sharedOpts.core.unsafeStickyBlobs ?? false; + const unsafeEnableAssetsRpc = sharedOpts.core.unsafeEnableAssetsRpc ?? false; + const unsafeEphemeralDurableObjects = workerOpts.core.unsafeEphemeralDurableObjects ?? false; + const pluginServicesOptionsBase = { + log: this.#log, + workerBindings, + workerIndex: i, + additionalModules, + tmpPath: this.#tmpPath, + workerNames, + loopbackPort, + unsafeStickyBlobs, + wrappedBindingNames, + durableObjectClassNames, + unsafeEphemeralDurableObjects, + queueProducers, + queueConsumers, + unsafeEnableAssetsRpc + }; + for (const [key, plugin] of PLUGIN_ENTRIES) { + const pluginServicesExtensions = await plugin.getServices({ + ...pluginServicesOptionsBase, + // @ts-expect-error `CoreOptionsSchema` has required options which are + // missing in other plugins' options. + options: workerOpts[key], + // @ts-expect-error `QueuesPlugin` doesn't define shared options + sharedOptions: sharedOpts[key] + }); + if (pluginServicesExtensions !== void 0) { + let pluginServices; + if (Array.isArray(pluginServicesExtensions)) { + pluginServices = pluginServicesExtensions; + } else { + pluginServices = pluginServicesExtensions.services; + extensions.push(...pluginServicesExtensions.extensions); + } + for (const service of pluginServices) { + if (service.name !== void 0 && !services.has(service.name)) { + services.set(service.name, service); + if (key !== DURABLE_OBJECTS_PLUGIN_NAME) { + const maybeBindings = getInternalDurableObjectProxyBindings( + key, + service + ); + if (maybeBindings !== void 0) { + proxyBindings.push(...maybeBindings); + } + } + } + } + } + } + const previousDirectSockets = previousWorkerOpts?.core.unsafeDirectSockets ?? []; + const directSockets = workerOpts.core.unsafeDirectSockets ?? []; + for (let j = 0; j < directSockets.length; j++) { + const previousDirectSocket = previousDirectSockets[j]; + const directSocket = directSockets[j]; + const entrypoint = directSocket.entrypoint ?? "default"; + const name = getDirectSocketName(i, entrypoint); + const address = this.#getSocketAddress( + name, + previousDirectSocket?.port, + directSocket.host, + directSocket.port + ); + sockets.push({ + name, + address, + service: { + name: getUserServiceName(workerName), + entrypoint: entrypoint === "default" ? void 0 : entrypoint + }, + http: { + style: directSocket.proxy ? HttpOptions_Style.PROXY : void 0, + cfBlobHeader: CoreHeaders.CF_BLOB, + capnpConnectHost: HOST_CAPNP_CONNECT + } + }); + } + } + const globalServices = getGlobalServices({ + sharedOptions: sharedOpts.core, + allWorkerRoutes, + /* + * - if Workers + Assets project but NOT Vitest, point to Router Worker or + * Proxy Worker depending on whether experimental flag `unsafeEnableAssetsRpc` + * was set + * - if Vitest with assets, the self binding on the test runner will point to + * Router Worker + */ + fallbackWorkerName: this.#workerOpts[0].assets.assets && !this.#workerOpts[0].core.name?.startsWith( + "vitest-pool-workers-runner-" + ) ? this.#sharedOpts.core.unsafeEnableAssetsRpc ? `${RPC_PROXY_SERVICE_NAME}:${this.#workerOpts[0].core.name}` : `${ROUTER_SERVICE_NAME}:${this.#workerOpts[0].core.name}` : getUserServiceName(this.#workerOpts[0].core.name), + loopbackPort, + log: this.#log, + proxyBindings + }); + for (const service of globalServices) { + (0, import_assert12.default)(service.name !== void 0 && !services.has(service.name)); + services.set(service.name, service); + } + for (const toPopulate of wrappedBindingsToPopulate) { + const bindings = allWorkerBindings.get(toPopulate.workerName); + if (bindings === void 0) continue; + const existingBindingNames = new Set( + toPopulate.innerBindings.map(({ name }) => name) + ); + toPopulate.innerBindings.push( + ...bindings.filter(({ name }) => !existingBindingNames.has(name)) + ); + } + const servicesArray = Array.from(services.values()); + if (wrappedBindingsToPopulate.length > 0 && _isCyclic(servicesArray)) { + throw new MiniflareCoreError( + "ERR_CYCLIC", + "Generated workerd config contains cycles. Ensure wrapped bindings don't have bindings to themselves." + ); + } + return { services: servicesArray, sockets, extensions }; + } + async #assembleAndUpdateConfig() { + const initial = !this.#runtimeEntryURL; + (0, import_assert12.default)(this.#runtime !== void 0); + const loopbackPort = await this.#getLoopbackPort(); + const config = await this.#assembleConfig(loopbackPort); + const configBuffer = serializeConfig(config); + (0, import_assert12.default)(config.sockets !== void 0); + const requiredSockets = config.sockets.map( + ({ name }) => { + (0, import_assert12.default)(name !== void 0); + return name; + } + ); + if (this.#sharedOpts.core.inspectorPort !== void 0) { + requiredSockets.push(kInspectorSocket); + } + const configuredHost = this.#sharedOpts.core.host ?? DEFAULT_HOST; + const entryAddress = this.#getSocketAddress( + SOCKET_ENTRY, + this.#previousSharedOpts?.core.port, + configuredHost, + this.#sharedOpts.core.port + ); + let runtimeInspectorAddress; + if (this.#sharedOpts.core.inspectorPort !== void 0) { + let runtimeInspectorPort = this.#sharedOpts.core.inspectorPort; + if (this.#maybeInspectorProxyController !== void 0) { + runtimeInspectorPort = 0; + } + runtimeInspectorAddress = this.#getSocketAddress( + kInspectorSocket, + this.#previousRuntimeInspectorPort, + "localhost", + runtimeInspectorPort + ); + this.#previousRuntimeInspectorPort = runtimeInspectorPort; + } + const loopbackAddress = `${maybeGetLocallyAccessibleHost(configuredHost) ?? getURLSafeHost(configuredHost)}:${loopbackPort}`; + const runtimeOpts = { + signal: this.#disposeController.signal, + entryAddress, + loopbackAddress, + requiredSockets, + inspectorAddress: runtimeInspectorAddress, + verbose: this.#sharedOpts.core.verbose, + handleRuntimeStdio: this.#sharedOpts.core.handleRuntimeStdio + }; + const maybeSocketPorts = await this.#runtime.updateConfig( + configBuffer, + runtimeOpts + ); + if (this.#disposeController.signal.aborted) return; + if (maybeSocketPorts === void 0) { + throw new MiniflareCoreError( + "ERR_RUNTIME_FAILURE", + "The Workers runtime failed to start. There is likely additional logging output above." + ); + } + this.#socketPorts = maybeSocketPorts; + if (this.#maybeInspectorProxyController !== void 0) { + const maybePort = this.#socketPorts.get(kInspectorSocket); + if (maybePort === void 0) { + throw new MiniflareCoreError( + "ERR_RUNTIME_FAILURE", + "Unable to access the runtime inspector socket." + ); + } else { + this.#maybeInspectorProxyController.updateConnection(maybePort); + } + } + const entrySocket = config.sockets?.[0]; + const secure = entrySocket !== void 0 && "https" in entrySocket; + const previousEntryURL = this.#runtimeEntryURL; + const entryPort = maybeSocketPorts.get(SOCKET_ENTRY); + (0, import_assert12.default)(entryPort !== void 0); + const maybeAccessibleHost = maybeGetLocallyAccessibleHost(configuredHost); + if (maybeAccessibleHost === void 0) { + const localEntryPort = maybeSocketPorts.get(SOCKET_ENTRY_LOCAL); + (0, import_assert12.default)(localEntryPort !== void 0, "Expected local entry socket port"); + this.#runtimeEntryURL = new URL(`http://127.0.0.1:${localEntryPort}`); + } else { + this.#runtimeEntryURL = new URL( + `${secure ? "https" : "http"}://${maybeAccessibleHost}:${entryPort}` + ); + } + if (previousEntryURL?.toString() !== this.#runtimeEntryURL.toString()) { + this.#runtimeDispatcher = new import_undici8.Pool(this.#runtimeEntryURL, { + connect: { rejectUnauthorized: false } + }); + } + if (this.#proxyClient === void 0) { + this.#proxyClient = new ProxyClient( + this.#runtimeEntryURL, + this.dispatchFetch + ); + } else { + this.#proxyClient.setRuntimeEntryURL(this.#runtimeEntryURL); + } + if (!this.#runtimeMutex.hasWaiting) { + const ready = initial ? "Ready" : "Updated and ready"; + const urlSafeHost = getURLSafeHost(configuredHost); + this.#log.info( + `${ready} on ${secure ? "https" : "http"}://${urlSafeHost}:${entryPort}` + ); + if (initial) { + const hosts = []; + if (configuredHost === "::" || configuredHost === "*") { + hosts.push("localhost"); + hosts.push("[::1]"); + } + if (configuredHost === "::" || configuredHost === "*" || configuredHost === "0.0.0.0") { + hosts.push(...getAccessibleHosts(true)); + } + for (const h of hosts) { + this.#log.info(`- ${secure ? "https" : "http"}://${h}:${entryPort}`); + } + } + this.#handleReload(); + } + } + async #waitForReady(disposing = false) { + await this.#initPromise; + await this.#runtimeMutex.drained(); + if (disposing) return new URL("http://[100::]/"); + await this.#maybeInspectorProxyController?.ready; + this.#checkDisposed(); + (0, import_assert12.default)(this.#runtimeEntryURL !== void 0); + return new URL(this.#runtimeEntryURL.toString()); + } + get ready() { + return this.#waitForReady(); + } + async getCf() { + this.#checkDisposed(); + await this.ready; + return JSON.parse(JSON.stringify(this.#cfObject)); + } + async getInspectorURL() { + this.#checkDisposed(); + await this.ready; + if (this.#maybeInspectorProxyController !== void 0) { + return this.#maybeInspectorProxyController.getInspectorURL(); + } + (0, import_assert12.default)(this.#socketPorts !== void 0); + const maybePort = this.#socketPorts.get(kInspectorSocket); + if (maybePort === void 0) { + throw new TypeError( + "Inspector not enabled in Miniflare instance. Set the `inspectorPort` option to enable it." + ); + } + return new URL(`ws://127.0.0.1:${maybePort}`); + } + async unsafeGetDirectURL(workerName, entrypoint = "default") { + this.#checkDisposed(); + await this.ready; + const workerIndex = this.#findAndAssertWorkerIndex(workerName); + const workerOpts = this.#workerOpts[workerIndex]; + const socketName = getDirectSocketName(workerIndex, entrypoint); + (0, import_assert12.default)(this.#socketPorts !== void 0); + const maybePort = this.#socketPorts.get(socketName); + if (maybePort === void 0) { + const friendlyWorkerName = workerName === void 0 ? "entrypoint" : JSON.stringify(workerName); + const friendlyEntrypointName = entrypoint === "default" ? entrypoint : JSON.stringify(entrypoint); + throw new TypeError( + `Direct access disabled in ${friendlyWorkerName} worker for ${friendlyEntrypointName} entrypoint` + ); + } + const directSocket = workerOpts.core.unsafeDirectSockets?.find( + (socket) => (socket.entrypoint ?? "default") === entrypoint + ); + (0, import_assert12.default)(directSocket !== void 0); + const host = directSocket.host ?? DEFAULT_HOST; + const accessibleHost = maybeGetLocallyAccessibleHost(host) ?? getURLSafeHost(host); + return new URL(`http://${accessibleHost}:${maybePort}`); + } + #checkDisposed() { + if (this.#disposeController.signal.aborted) { + throw new MiniflareCoreError( + "ERR_DISPOSED", + "Cannot use disposed instance" + ); + } + } + async #setOptions(opts) { + const [sharedOpts, workerOpts] = validateOptions(opts); + this.#previousSharedOpts = this.#sharedOpts; + this.#previousWorkerOpts = this.#workerOpts; + this.#sharedOpts = sharedOpts; + this.#workerOpts = workerOpts; + this.#log = this.#sharedOpts.core.log ?? this.#log; + await this.#assembleAndUpdateConfig(); + } + setOptions(opts) { + this.#checkDisposed(); + this.#proxyClient?.poisonProxies(); + return this.#runtimeMutex.runWith(() => this.#setOptions(opts)); + } + dispatchFetch = async (input, init2) => { + this.#checkDisposed(); + await this.ready; + (0, import_assert12.default)(this.#runtimeEntryURL !== void 0); + (0, import_assert12.default)(this.#runtimeDispatcher !== void 0); + const forward = new Request(input, init2); + const url20 = new URL(forward.url); + const actualRuntimeOrigin = this.#runtimeEntryURL.origin; + const userRuntimeOrigin = url20.origin; + url20.protocol = this.#runtimeEntryURL.protocol; + url20.host = this.#runtimeEntryURL.host; + if (forward.body !== null && forward.headers.get("Content-Length") === "0") { + forward.headers.delete("Content-Length"); + } + const cfBlob = forward.cf ? { ...fallbackCf, ...forward.cf } : void 0; + const dispatcher = new DispatchFetchDispatcher( + (0, import_undici8.getGlobalDispatcher)(), + this.#runtimeDispatcher, + actualRuntimeOrigin, + userRuntimeOrigin, + cfBlob + ); + const forwardInit = forward; + forwardInit.dispatcher = dispatcher; + const response = await fetch4(url20, forwardInit); + const stack = response.headers.get(CoreHeaders.ERROR_STACK); + if (response.status === 500 && stack !== null) { + const caught = JsonErrorSchema.parse(await response.json()); + throw reviveError(this.#workerSrcOpts, caught); + } + const contentEncoding = response.headers.get("Content-Encoding"); + if (contentEncoding) + response.headers.set("MF-Content-Encoding", contentEncoding); + response.headers.delete("Content-Encoding"); + if (process.env.MINIFLARE_ASSERT_BODIES_CONSUMED === "true" && response.body !== null) { + const originalLimit = Error.stackTraceLimit; + Error.stackTraceLimit = Infinity; + const error = new Error( + "`body` returned from `Miniflare#dispatchFetch()` not consumed immediately" + ); + Error.stackTraceLimit = originalLimit; + setImmediate(() => { + if (!response.bodyUsed) throw error; + }); + } + return response; + }; + /** @internal */ + async _getProxyClient() { + this.#checkDisposed(); + await this.ready; + (0, import_assert12.default)(this.#proxyClient !== void 0); + return this.#proxyClient; + } + #findAndAssertWorkerIndex(workerName) { + if (workerName === void 0) { + return 0; + } else { + const index = this.#workerOpts.findIndex( + ({ core }) => (core.name ?? "") === workerName + ); + if (index === -1) { + throw new TypeError(`${JSON.stringify(workerName)} worker not found`); + } + return index; + } + } + async getBindings(workerName) { + const bindings = {}; + const proxyClient = await this._getProxyClient(); + const workerIndex = this.#findAndAssertWorkerIndex(workerName); + const workerOpts = this.#workerOpts[workerIndex]; + workerName = workerOpts.core.name ?? ""; + for (const [key, plugin] of PLUGIN_ENTRIES) { + const pluginBindings = await plugin.getNodeBindings(workerOpts[key]); + for (const [name, binding] of Object.entries(pluginBindings)) { + if (binding instanceof ProxyNodeBinding) { + const proxyBindingName = getProxyBindingName(key, workerName, name); + let proxy = proxyClient.env[proxyBindingName]; + (0, import_assert12.default)( + proxy !== void 0, + `Expected ${proxyBindingName} to be bound` + ); + if (binding.proxyOverrideHandler) { + proxy = new Proxy(proxy, binding.proxyOverrideHandler); + } + bindings[name] = proxy; + } else { + bindings[name] = binding; + } + } + } + return bindings; + } + async getWorker(workerName) { + const proxyClient = await this._getProxyClient(); + const workerIndex = this.#findAndAssertWorkerIndex(workerName); + const workerOpts = this.#workerOpts[workerIndex]; + workerName = workerOpts.core.name ?? ""; + const bindingName = CoreBindings.SERVICE_USER_ROUTE_PREFIX + workerName; + const fetcher = proxyClient.env[bindingName]; + if (fetcher === void 0) { + const stringName = JSON.stringify(workerName); + throw new TypeError( + `${stringName} is being used as a wrapped binding, and cannot be accessed as a worker` + ); + } + return fetcher; + } + async #getProxy(pluginName, bindingName, workerName) { + const proxyClient = await this._getProxyClient(); + const proxyBindingName = getProxyBindingName( + pluginName, + // Default to entrypoint worker if none specified + workerName ?? this.#workerOpts[0].core.name ?? "", + bindingName + ); + const proxy = proxyClient.env[proxyBindingName]; + if (proxy === void 0) { + const friendlyWorkerName = workerName === void 0 ? "entrypoint" : JSON.stringify(workerName); + throw new TypeError( + `${JSON.stringify(bindingName)} unbound in ${friendlyWorkerName} worker` + ); + } + return proxy; + } + // TODO(someday): would be nice to define these in plugins + async getCaches() { + const proxyClient = await this._getProxyClient(); + return proxyClient.global.caches; + } + getD1Database(bindingName, workerName) { + return this.#getProxy(D1_PLUGIN_NAME, bindingName, workerName); + } + getDurableObjectNamespace(bindingName, workerName) { + return this.#getProxy(DURABLE_OBJECTS_PLUGIN_NAME, bindingName, workerName); + } + getKVNamespace(bindingName, workerName) { + return this.#getProxy(KV_PLUGIN_NAME, bindingName, workerName); + } + getQueueProducer(bindingName, workerName) { + return this.#getProxy(QUEUES_PLUGIN_NAME, bindingName, workerName); + } + getR2Bucket(bindingName, workerName) { + return this.#getProxy(R2_PLUGIN_NAME, bindingName, workerName); + } + /** @internal */ + _getInternalDurableObjectNamespace(pluginName, serviceName, className) { + return this.#getProxy(`${pluginName}-internal`, className, serviceName); + } + unsafeGetPersistPaths() { + const result = /* @__PURE__ */ new Map(); + for (const [key, plugin] of PLUGIN_ENTRIES) { + const sharedOpts = this.#sharedOpts[key]; + const maybePath = plugin.getPersistPath?.(sharedOpts, this.#tmpPath); + if (maybePath !== void 0) result.set(key, maybePath); + } + return result; + } + async dispose() { + this.#disposeController.abort(); + this.#proxyClient?.poisonProxies(); + try { + await this.#waitForReady( + /* disposing */ + true + ); + } finally { + this.#removeExitHook?.(); + await this.#proxyClient?.dispose(); + await this.#runtime?.dispose(); + await this.#stopLoopbackServer(); + await import_fs24.default.promises.rm(this.#tmpPath, { force: true, recursive: true }); + await this.#maybeInspectorProxyController?.dispose(); + maybeInstanceRegistry?.delete(this); + } + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + ASSETS_PLUGIN, + AssetsOptionsSchema, + CACHE_PLUGIN, + CACHE_PLUGIN_NAME, + CORE_PLUGIN, + CORE_PLUGIN_NAME, + CacheBindings, + CacheHeaders, + CacheOptionsSchema, + CacheSharedOptionsSchema, + CloseEvent, + CoreBindings, + CoreHeaders, + CoreOptionsSchema, + CoreSharedOptionsSchema, + D1OptionsSchema, + D1SharedOptionsSchema, + D1_PLUGIN, + D1_PLUGIN_NAME, + DEFAULT_PERSIST_ROOT, + DURABLE_OBJECTS_PLUGIN, + DURABLE_OBJECTS_PLUGIN_NAME, + DURABLE_OBJECTS_STORAGE_SERVICE_NAME, + DeferredPromise, + DispatchFetchDispatcher, + DurableObjectsOptionsSchema, + DurableObjectsSharedOptionsSchema, + ErrorEvent, + File, + FormData, + HOST_CAPNP_CONNECT, + HYPERDRIVE_PLUGIN, + HYPERDRIVE_PLUGIN_NAME, + Headers, + HttpOptions_Style, + HyperdriveInputOptionsSchema, + HyperdriveSchema, + JsonSchema, + KVHeaders, + KVLimits, + KVOptionsSchema, + KVParams, + KVSharedOptionsSchema, + KV_PLUGIN, + KV_PLUGIN_NAME, + LiteralSchema, + Log, + LogLevel, + MessageEvent, + Miniflare, + MiniflareCoreError, + MiniflareError, + ModuleDefinitionSchema, + ModuleRuleSchema, + ModuleRuleTypeSchema, + Mutex, + NoOpLog, + PIPELINES_PLUGIN_NAME, + PIPELINE_PLUGIN, + PLUGINS, + PLUGIN_ENTRIES, + PathSchema, + PeriodType, + PersistenceSchema, + PipelineOptionsSchema, + ProxyAddresses, + ProxyClient, + ProxyNodeBinding, + ProxyOps, + QUEUES_PLUGIN, + QUEUES_PLUGIN_NAME, + QueueBindings, + QueueConsumerOptionsSchema, + QueueConsumerSchema, + QueueConsumersSchema, + QueueContentTypeSchema, + QueueIncomingMessageSchema, + QueueMessageDelaySchema, + QueueProducerOptionsSchema, + QueueProducerSchema, + QueueProducersSchema, + QueuesBatchRequestSchema, + QueuesError, + QueuesOptionsSchema, + R2OptionsSchema, + R2SharedOptionsSchema, + R2_PLUGIN, + R2_PLUGIN_NAME, + RATELIMIT_PLUGIN, + RATELIMIT_PLUGIN_NAME, + RatelimitConfigSchema, + RatelimitOptionsSchema, + Request, + Response, + RouterError, + Runtime, + SERVICE_ENTRY, + SERVICE_LOOPBACK, + SITES_NO_CACHE_PREFIX, + SOCKET_ENTRY, + SOCKET_ENTRY_LOCAL, + SharedBindings, + SharedHeaders, + SiteBindings, + SourceOptionsSchema, + TlsOptions_Version, + TypedEventTarget, + WORKER_BINDING_SERVICE_LOOPBACK, + WORKFLOWS_PLUGIN, + WORKFLOWS_PLUGIN_NAME, + WORKFLOWS_STORAGE_SERVICE_NAME, + WaitGroup, + WebSocket, + WebSocketPair, + Worker_Binding_CryptoKey_Usage, + WorkflowsOptionsSchema, + WorkflowsSharedOptionsSchema, + __MiniflareFunctionWrapper, + _enableControlEndpoints, + _forceColour, + _initialiseInstanceRegistry, + _isCyclic, + _transformsForContentEncodingAndContentType, + base64Decode, + base64Encode, + buildAssetManifest, + compileModuleRules, + coupleWebSocket, + createFetchMock, + createHTTPReducers, + createHTTPRevivers, + decodeSitesKey, + deserialiseRegExps, + deserialiseSiteRegExps, + encodeSitesKey, + fetch, + formatZodError, + getAccessibleHosts, + getAssetsBindingsNames, + getCacheServiceName, + getDirectSocketName, + getEntrySocketHttpOptions, + getFreshSourceMapSupport, + getGlobalServices, + getMiniflareObjectBindings, + getNodeCompat, + getPersistPath, + getRootPath, + globsToRegExps, + isFetcherFetch, + isR2ObjectWriteHttpMetadata, + isSitesRequest, + kCurrentWorker, + kInspectorSocket, + kUnsafeEphemeralUniqueKey, + kVoid, + matchRoutes, + maybeApply, + maybeParseURL, + mergeWorkerOptions, + migrateDatabase, + namespaceEntries, + namespaceKeys, + normaliseDurableObject, + objectEntryWorker, + parseRanges, + parseRoutes, + parseWithReadableStreams, + parseWithRootPath, + prefixError, + prefixStream, + readPrefix, + reduceError, + sanitisePath, + serialiseRegExps, + serialiseSiteRegExps, + serializeConfig, + stringifyWithStreams, + stripAnsi, + structuredSerializableReducers, + structuredSerializableRevivers, + supportedCompatibilityDate, + testRegExps, + testSiteRegExps, + viewToBuffer, + zAwaitable +}); +/*! Path sanitisation regexps adapted from node-sanitize-filename: + * https://github.com/parshap/node-sanitize-filename/blob/209c39b914c8eb48ee27bcbde64b2c7822fdf3de/index.js#L4-L37 + * + * Licensed under the ISC license: + * + * Copyright Parsha Pourkhomami + * + * 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. + */ +/*! + * MIT License + * + * Copyright (c) Sindre Sorhus (https://sindresorhus.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. + */ +/*! + * Copyright (c) 2011 Felix Geisendörfer (felix@debuggable.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. + */ +//# sourceMappingURL=index.js.map diff --git a/node_modules/miniflare/dist/src/index.js.map b/node_modules/miniflare/dist/src/index.js.map new file mode 100644 index 0000000..7c87114 --- /dev/null +++ b/node_modules/miniflare/dist/src/index.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../node_modules/.pnpm/ignore@5.3.1/node_modules/ignore/index.js", "../../../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/Mime.js", "../../../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/types/standard.js", "../../../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/types/other.js", "../../../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/index.js", "../../src/index.ts", "../../../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/shared/index.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/shared/zod.worker.ts", "../../src/cf.ts", "../../src/http/fetch.ts", "../../src/workers/cache/constants.ts", "../../src/workers/core/constants.ts", "../../src/workers/core/devalue.ts", "../../../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/utils.js", "../../../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/constants.js", "../../../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/parse.js", "../../../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/stringify.js", "../../src/workers/core/routing.ts", "../../src/workers/shared/constants.ts", "../../src/workers/shared/data.ts", "../../src/workers/shared/matcher.ts", "../../src/workers/shared/range.ts", "../../src/workers/shared/sync.ts", "../../src/workers/shared/types.ts", "../../src/workers/kv/constants.ts", "../../src/workers/queues/constants.ts", "../../src/workers/shared/zod.worker.ts", "../../src/workers/queues/schemas.ts", "../../src/http/request.ts", "../../src/http/response.ts", "../../src/http/websocket.ts", "../../src/shared/colour.ts", "../../src/shared/error.ts", "../../src/shared/event.ts", "../../src/shared/log.ts", "../../src/shared/matcher.ts", "../../src/shared/streams.ts", "../../src/shared/types.ts", "../../src/http/server.ts", "../../src/http/cert.ts", "../../src/http/helpers.ts", "../../src/http/index.ts", "../../src/plugins/assets/index.ts", "../../../workers-shared/utils/constants.ts", "../../../workers-shared/utils/types.ts", "../../../workers-shared/utils/helpers.ts", "../../../workers-shared/utils/configuration/constructConfiguration.ts", "../../../workers-shared/utils/configuration/constants.ts", "../../../workers-shared/utils/configuration/validateURL.ts", "../../../workers-shared/utils/configuration/parseHeaders.ts", "../../../workers-shared/utils/configuration/parseRedirects.ts", "../../../../node_modules/.pnpm/pretty-bytes@6.1.1/node_modules/pretty-bytes/index.js", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/assets/assets.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/assets/assets-kv.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/assets/router.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/assets/rpc-proxy.worker.ts", "../../src/plugins/core/index.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/core/entry.worker.ts", "../../src/runtime/index.ts", "../../../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/shared/capnp-es.DAoyiaGr.mjs", "../../../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/shared/capnp-es.Cx0B_Qxd.mjs", "../../../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/shared/capnp-es.DCKndyix.mjs", "../../../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/shared/capnp-es.B1ADXvSS.mjs", "../../../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/index.mjs", "../../src/runtime/config/generated.ts", "../../src/runtime/config/workerd.ts", "../../src/runtime/config/index.ts", "../../src/plugins/assets/constants.ts", "../../src/plugins/cache/index.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/cache/cache.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/cache/cache-entry.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/cache/cache-entry-noop.worker.ts", "../../src/plugins/shared/index.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/shared/object-entry.worker.ts", "../../src/plugins/shared/constants.ts", "../../src/plugins/shared/routing.ts", "../../src/plugins/do/index.ts", "../../src/plugins/core/constants.ts", "../../src/plugins/core/modules.ts", "../../src/plugins/core/node-compat.ts", "../../src/plugins/core/proxy/client.ts", "../../src/plugins/core/proxy/fetch-sync.ts", "../../src/plugins/core/errors/index.ts", "../../src/plugins/core/errors/sourcemap.ts", "../../src/plugins/core/errors/callsite.ts", "../../src/plugins/core/proxy/types.ts", "../../src/plugins/core/services.ts", "../../src/plugins/assets/schema.ts", "../../src/plugins/d1/index.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/d1/database.worker.ts", "../../src/plugins/hyperdrive/index.ts", "../../src/plugins/kv/index.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/kv/namespace.worker.ts", "../../src/plugins/kv/constants.ts", "../../src/plugins/kv/sites.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/kv/sites.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/pipelines/pipeline.worker.ts", "../../src/plugins/pipelines/index.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/queues/broker.worker.ts", "../../src/plugins/queues/index.ts", "../../src/plugins/queues/errors.ts", "../../src/plugins/r2/index.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/r2/bucket.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/ratelimit/ratelimit.worker.ts", "../../src/plugins/ratelimit/index.ts", "../../src/plugins/workflows/index.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/workflows/binding.worker.ts", "../../src/plugins/index.ts", "../../src/plugins/core/inspector-proxy/inspector-proxy-controller.ts", "../../../../node_modules/.pnpm/get-port@7.1.0/node_modules/get-port/index.js", "../../package.json", "../../src/plugins/core/inspector-proxy/inspector-proxy.ts", "../../src/plugins/core/inspector-proxy/devtools.ts", "../../src/shared/mime-types.ts", "../../src/zod-format.ts", "../../src/merge.ts"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,uEAAAA,UAAAC,SAAA;AAAA;AACA,aAAS,UAAW,SAAS;AAC3B,aAAO,MAAM,QAAQ,OAAO,IACxB,UACA,CAAC,OAAO;AAAA,IACd;AAEA,QAAM,QAAQ;AACd,QAAM,QAAQ;AACd,QAAM,SAAS;AACf,QAAM,wBAAwB;AAC9B,QAAM,mCAAmC;AACzC,QAAM,4CAA4C;AAClD,QAAM,qCAAqC;AAC3C,QAAM,sBAAsB;AAM5B,QAAM,0BAA0B;AAEhC,QAAM,QAAQ;AAGd,QAAI,iBAAiB;AAErB,QAAI,OAAO,WAAW,aAAa;AACjC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A,YACuD;AACvD,WAAO,KAAK,UAAU,6BAA6B,aAAa,UAAU;AAAA,EAC3E;AAAA,EACA,eACC,aACA,YAC4C;AAC5C,WAAO,KAAK,UAAU,gBAAgB,aAAa,UAAU;AAAA,EAC9D;AAAA,EACA,iBACC,aACA,YACuB;AACvB,WAAO,KAAK,UAAU,oBAAoB,aAAa,UAAU;AAAA,EAClE;AAAA,EACA,YACC,aACA,YACyC;AACzC,WAAO,KAAK,UAAU,gBAAgB,aAAa,UAAU;AAAA,EAC9D;AAAA;AAAA,EAGA,mCACC,YACA,aACA,WACuD;AACvD,WAAO,KAAK,UAAU,GAAG,UAAU,aAAa,WAAW,WAAW;AAAA,EACvE;AAAA,EAEA,wBAAoD;AACnD,UAAM,SAAS,oBAAI,IAA2B;AAC9C,eAAW,CAAC,KAAK,MAAM,KAAK,gBAAgB;AAC3C,YAAM,aAAa,KAAK,YAAY,GAAG;AAEvC,YAAM,YAAY,OAAO,iBAAiB,YAAY,KAAK,QAAQ;AACnE,UAAI,cAAc,OAAW,QAAO,IAAI,KAAK,SAAS;AAAA,IACvD;AACA,WAAO;AAAA,EACR;AAAA,EAEA,MAAM,UAAyB;AAC9B,SAAK,mBAAmB,MAAM;AAK9B,SAAK,cAAc,cAAc;AACjC,QAAI;AACH,YAAM,KAAK;AAAA;AAAA,QAA8B;AAAA,MAAI;AAAA,IAC9C,UAAE;AAED,WAAK,kBAAkB;AAGvB,YAAM,KAAK,cAAc,QAAQ;AACjC,YAAM,KAAK,UAAU,QAAQ;AAC7B,YAAM,KAAK,oBAAoB;AAE/B,YAAM,YAAAS,QAAG,SAAS,GAAG,KAAK,UAAU,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAGpE,YAAM,KAAK,gCAAgC,QAAQ;AAInD,6BAAuB,OAAO,IAAI;AAAA,IACnC;AAAA,EACD;AACD;", + "names": ["exports", "module", "path", "ignored", "exports", "module", "path", "exports", "module", "exports", "module", "exports", "module", "CORE_PLUGIN_NAME", "Miniflare", "fetch", "supportedCompatibilityDate", "import_assert", "import_crypto", "import_fs", "import_http", "import_os", "import_path", "import_web", "import_util", "import_undici", "path", "fs", "url", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_ws", "import_zod", "import_path", "path", "assert", "import_ws", "revivers", "reducers", "index", "value", "assert", "url", "reducers", "value", "stringifiedValue", "revivers", "url", "path", "LogLevel", "import_node_buffer", "import_node_assert", "resolve", "assert", "url", "import_node_buffer", "import_zod", "import_undici", "BaseRequest", "init", "import_undici", "BaseResponse", "url", "init", "import_assert", "import_path", "path", "globToRegexp", "import_assert", "import_path", "import_zod", "assert", "path", "init", "assert", "NodeWebSocket", "fetch", "init", "url", "NodeWebSocket", "headers", "response", "path", "import_promises", "fs", "net", "import_undici", "import_promises", "import_node_path", "import_zod", "ignore", "import_node_path", "path", "url", "path", "numberString", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_assert", "import_fs", "import_promises", "import_path", "import_stream", "import_util", "import_undici", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "import_assert", "import_events", "import_workerd", "import_zod", "escaped", "dump", "rl", "process", "resolve", "workerdPath", "FORCE_COLOR", "childProcess", "assert", "import_promises", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "import_fs", "import_promises", "import_path", "import_url", "import_zod", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_url", "url", "url", "path", "crypto", "fs", "fs", "import_promises", "import_zod", "fs", "import_assert", "import_fs", "import_path", "import_url", "import_zod", "module", "path", "relative", "rule", "assert", "contents", "import_assert", "import_crypto", "import_web", "import_util", "import_undici", "import_assert", "import_web", "import_fs", "import_path", "import_url", "import_zod", "import_assert", "assert", "contents", "fs", "maybeGetFile", "module", "path", "url", "init", "assert", "import_web", "import_undici", "crypto", "url", "util", "assert", "key", "import_zod", "tls", "encoder", "fetch", "CORE_PLUGIN_NAME", "supportedCompatibilityDate", "fs", "path", "bindings", "moduleName", "bindingEntries", "name", "module", "invalidWrapped", "assert", "import_zod", "fs", "path", "encoder", "crypto", "import_promises", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "fs", "import_node_assert", "import_zod", "url", "assert", "import_promises", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "import_assert", "import_promises", "import_path", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "rootPath", "fs", "path", "assert", "fs", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "bindingEntries", "import_promises", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "fs", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "PeriodType", "import_promises", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "fs", "CORE_PLUGIN_NAME", "import_node_crypto", "os", "resolve", "net", "import_ws", "import_node_assert", "import_ws", "assert", "WebSocket", "url", "path", "crypto", "WebSocket", "resolve", "import_assert", "import_util", "path", "assert", "util", "net", "assert", "opts", "path", "util", "zlib", "Miniflare", "os", "crypto", "exitHook", "fs", "url", "http", "resolve", "stoppable", "workerName", "init", "fetch"] +} diff --git a/node_modules/miniflare/dist/src/workers/assets/assets-kv.worker.js b/node_modules/miniflare/dist/src/workers/assets/assets-kv.worker.js new file mode 100644 index 0000000..6c39fbe --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/assets/assets-kv.worker.js @@ -0,0 +1,28 @@ +// src/workers/assets/assets-kv.worker.ts +import { SharedBindings } from "miniflare:shared"; +var assets_kv_worker_default = { + async fetch(request, env) { + if (request.method !== "GET") { + let message = `Cannot ${request.method.toLowerCase()}() with Workers Assets namespace`; + return new Response(message, { status: 405, statusText: message }); + } + let pathHash = new URL(request.url).pathname.substring(1), entry = env.ASSETS_REVERSE_MAP[pathHash]; + if (entry === void 0) + return new Response("Not Found", { status: 404 }); + let { filePath, contentType } = entry, response = await env[SharedBindings.MAYBE_SERVICE_BLOBS].fetch( + new URL( + // somewhere in blobservice I think this is being decoded again + filePath.split("/").map((x) => encodeURIComponent(x)).join("/"), + "http://placeholder" + ) + ), newResponse = new Response(response.body, response); + return contentType !== null && newResponse.headers.append( + "cf-kv-metadata", + `{"contentType": "${contentType}"}` + ), newResponse; + } +}; +export { + assets_kv_worker_default as default +}; +//# sourceMappingURL=assets-kv.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/assets/assets-kv.worker.js.map b/node_modules/miniflare/dist/src/workers/assets/assets-kv.worker.js.map new file mode 100644 index 0000000..b1353f6 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/assets/assets-kv.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/assets/assets-kv.worker.ts"], + "mappings": ";AAAA,SAAS,sBAAsB;AAW/B,IAAO,2BAA8B;AAAA,EACpC,MAAM,MAAM,SAAS,KAAK;AAEzB,QAAI,QAAQ,WAAW,OAAO;AAC7B,UAAM,UAAU,UAAU,QAAQ,OAAO,YAAY,CAAC;AACtD,aAAO,IAAI,SAAS,SAAS,EAAE,QAAQ,KAAK,YAAY,QAAQ,CAAC;AAAA,IAClE;AAEA,QAAM,WAAW,IAAI,IAAI,QAAQ,GAAG,EAAE,SAAS,UAAU,CAAC,GACpD,QAAQ,IAAI,mBAAmB,QAAQ;AAC7C,QAAI,UAAU;AACb,aAAO,IAAI,SAAS,aAAa,EAAE,QAAQ,IAAI,CAAC;AAGjD,QAAM,EAAE,UAAU,YAAY,IAAI,OAE5B,WAAW,MADI,IAAI,eAAe,mBAAmB,EACvB;AAAA,MACnC,IAAI;AAAA;AAAA,QAEH,SACE,MAAM,GAAG,EACT,IAAI,CAAC,MAAM,mBAAmB,CAAC,CAAC,EAChC,KAAK,GAAG;AAAA,QACV;AAAA,MACD;AAAA,IACD,GACM,cAAc,IAAI,SAAS,SAAS,MAAM,QAAQ;AAExD,WAAI,gBAAgB,QACnB,YAAY,QAAQ;AAAA,MACnB;AAAA,MACA,oBAAoB,WAAW;AAAA,IAChC,GAEM;AAAA,EACR;AACD;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/assets/assets.worker.js b/node_modules/miniflare/dist/src/workers/assets/assets.worker.js new file mode 100644 index 0000000..e4d86b8 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/assets/assets.worker.js @@ -0,0 +1,8811 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from == "object" || typeof from == "function") + for (let key of __getOwnPropNames(from)) + !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target, + mod +)); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/is.js +var require_is = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/is.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var objectToString = Object.prototype.toString; + function isError(wat) { + switch (objectToString.call(wat)) { + case "[object Error]": + case "[object Exception]": + case "[object DOMException]": + return !0; + default: + return isInstanceOf(wat, Error); + } + } + function isBuiltin(wat, className) { + return objectToString.call(wat) === `[object ${className}]`; + } + function isErrorEvent(wat) { + return isBuiltin(wat, "ErrorEvent"); + } + function isDOMError(wat) { + return isBuiltin(wat, "DOMError"); + } + function isDOMException(wat) { + return isBuiltin(wat, "DOMException"); + } + function isString(wat) { + return isBuiltin(wat, "String"); + } + function isParameterizedString(wat) { + return typeof wat == "object" && wat !== null && "__sentry_template_string__" in wat && "__sentry_template_values__" in wat; + } + function isPrimitive(wat) { + return wat === null || isParameterizedString(wat) || typeof wat != "object" && typeof wat != "function"; + } + function isPlainObject(wat) { + return isBuiltin(wat, "Object"); + } + function isEvent(wat) { + return typeof Event < "u" && isInstanceOf(wat, Event); + } + function isElement(wat) { + return typeof Element < "u" && isInstanceOf(wat, Element); + } + function isRegExp(wat) { + return isBuiltin(wat, "RegExp"); + } + function isThenable(wat) { + return !!(wat && wat.then && typeof wat.then == "function"); + } + function isSyntheticEvent(wat) { + return isPlainObject(wat) && "nativeEvent" in wat && "preventDefault" in wat && "stopPropagation" in wat; + } + function isInstanceOf(wat, base) { + try { + return wat instanceof base; + } catch { + return !1; + } + } + function isVueViewModel(wat) { + return !!(typeof wat == "object" && wat !== null && (wat.__isVue || wat._isVue)); + } + exports.isDOMError = isDOMError; + exports.isDOMException = isDOMException; + exports.isElement = isElement; + exports.isError = isError; + exports.isErrorEvent = isErrorEvent; + exports.isEvent = isEvent; + exports.isInstanceOf = isInstanceOf; + exports.isParameterizedString = isParameterizedString; + exports.isPlainObject = isPlainObject; + exports.isPrimitive = isPrimitive; + exports.isRegExp = isRegExp; + exports.isString = isString; + exports.isSyntheticEvent = isSyntheticEvent; + exports.isThenable = isThenable; + exports.isVueViewModel = isVueViewModel; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/string.js +var require_string = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/string.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(); + function truncate(str, max = 0) { + return typeof str != "string" || max === 0 || str.length <= max ? str : `${str.slice(0, max)}...`; + } + function snipLine(line, colno) { + let newLine = line, lineLength = newLine.length; + if (lineLength <= 150) + return newLine; + colno > lineLength && (colno = lineLength); + let start = Math.max(colno - 60, 0); + start < 5 && (start = 0); + let end = Math.min(start + 140, lineLength); + return end > lineLength - 5 && (end = lineLength), end === lineLength && (start = Math.max(end - 140, 0)), newLine = newLine.slice(start, end), start > 0 && (newLine = `'{snip} ${newLine}`), end < lineLength && (newLine += " {snip}"), newLine; + } + function safeJoin(input, delimiter) { + if (!Array.isArray(input)) + return ""; + let output = []; + for (let i = 0; i < input.length; i++) { + let value = input[i]; + try { + is.isVueViewModel(value) ? output.push("[VueViewModel]") : output.push(String(value)); + } catch { + output.push("[value cannot be serialized]"); + } + } + return output.join(delimiter); + } + function isMatchingPattern(value, pattern, requireExactStringMatch = !1) { + return is.isString(value) ? is.isRegExp(pattern) ? pattern.test(value) : is.isString(pattern) ? requireExactStringMatch ? value === pattern : value.includes(pattern) : !1 : !1; + } + function stringMatchesSomePattern(testString, patterns = [], requireExactStringMatch = !1) { + return patterns.some((pattern) => isMatchingPattern(testString, pattern, requireExactStringMatch)); + } + exports.isMatchingPattern = isMatchingPattern; + exports.safeJoin = safeJoin; + exports.snipLine = snipLine; + exports.stringMatchesSomePattern = stringMatchesSomePattern; + exports.truncate = truncate; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/aggregate-errors.js +var require_aggregate_errors = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/aggregate-errors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), string = require_string(); + function applyAggregateErrorsToEvent(exceptionFromErrorImplementation, parser, maxValueLimit = 250, key, limit, event, hint) { + if (!event.exception || !event.exception.values || !hint || !is.isInstanceOf(hint.originalException, Error)) + return; + let originalException = event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : void 0; + originalException && (event.exception.values = truncateAggregateExceptions( + aggregateExceptionsFromError( + exceptionFromErrorImplementation, + parser, + limit, + hint.originalException, + key, + event.exception.values, + originalException, + 0 + ), + maxValueLimit + )); + } + function aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, error, key, prevExceptions, exception, exceptionId) { + if (prevExceptions.length >= limit + 1) + return prevExceptions; + let newExceptions = [...prevExceptions]; + if (is.isInstanceOf(error[key], Error)) { + applyExceptionGroupFieldsForParentException(exception, exceptionId); + let newException = exceptionFromErrorImplementation(parser, error[key]), newExceptionId = newExceptions.length; + applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId), newExceptions = aggregateExceptionsFromError( + exceptionFromErrorImplementation, + parser, + limit, + error[key], + key, + [newException, ...newExceptions], + newException, + newExceptionId + ); + } + return Array.isArray(error.errors) && error.errors.forEach((childError, i) => { + if (is.isInstanceOf(childError, Error)) { + applyExceptionGroupFieldsForParentException(exception, exceptionId); + let newException = exceptionFromErrorImplementation(parser, childError), newExceptionId = newExceptions.length; + applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId), newExceptions = aggregateExceptionsFromError( + exceptionFromErrorImplementation, + parser, + limit, + childError, + key, + [newException, ...newExceptions], + newException, + newExceptionId + ); + } + }), newExceptions; + } + function applyExceptionGroupFieldsForParentException(exception, exceptionId) { + exception.mechanism = exception.mechanism || { type: "generic", handled: !0 }, exception.mechanism = { + ...exception.mechanism, + ...exception.type === "AggregateError" && { is_exception_group: !0 }, + exception_id: exceptionId + }; + } + function applyExceptionGroupFieldsForChildException(exception, source, exceptionId, parentId) { + exception.mechanism = exception.mechanism || { type: "generic", handled: !0 }, exception.mechanism = { + ...exception.mechanism, + type: "chained", + source, + exception_id: exceptionId, + parent_id: parentId + }; + } + function truncateAggregateExceptions(exceptions, maxValueLength) { + return exceptions.map((exception) => (exception.value && (exception.value = string.truncate(exception.value, maxValueLength)), exception)); + } + exports.applyAggregateErrorsToEvent = applyAggregateErrorsToEvent; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/array.js +var require_array = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/array.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function flatten(input) { + let result = [], flattenHelper = (input2) => { + input2.forEach((el) => { + Array.isArray(el) ? flattenHelper(el) : result.push(el); + }); + }; + return flattenHelper(input), result; + } + exports.flatten = flatten; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/version.js +var require_version = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/version.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var SDK_VERSION = "8.9.2"; + exports.SDK_VERSION = SDK_VERSION; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/worldwide.js +var require_worldwide = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/worldwide.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var version = require_version(), GLOBAL_OBJ = globalThis; + function getGlobalSingleton(name, creator, obj) { + let gbl = obj || GLOBAL_OBJ, __SENTRY__ = gbl.__SENTRY__ = gbl.__SENTRY__ || {}, versionedCarrier = __SENTRY__[version.SDK_VERSION] = __SENTRY__[version.SDK_VERSION] || {}; + return versionedCarrier[name] || (versionedCarrier[name] = creator()); + } + exports.GLOBAL_OBJ = GLOBAL_OBJ; + exports.getGlobalSingleton = getGlobalSingleton; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/browser.js +var require_browser = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/browser.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), worldwide = require_worldwide(), WINDOW = worldwide.GLOBAL_OBJ, DEFAULT_MAX_STRING_LENGTH = 80; + function htmlTreeAsString(elem, options = {}) { + if (!elem) + return ""; + try { + let currentElem = elem, MAX_TRAVERSE_HEIGHT = 5, out = [], height = 0, len = 0, separator = " > ", sepLength = separator.length, nextStr, keyAttrs = Array.isArray(options) ? options : options.keyAttrs, maxStringLength = !Array.isArray(options) && options.maxStringLength || DEFAULT_MAX_STRING_LENGTH; + for (; currentElem && height++ < MAX_TRAVERSE_HEIGHT && (nextStr = _htmlElementAsString(currentElem, keyAttrs), !(nextStr === "html" || height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)); ) + out.push(nextStr), len += nextStr.length, currentElem = currentElem.parentNode; + return out.reverse().join(separator); + } catch { + return ""; + } + } + function _htmlElementAsString(el, keyAttrs) { + let elem = el, out = [], className, classes, key, attr, i; + if (!elem || !elem.tagName) + return ""; + if (WINDOW.HTMLElement && elem instanceof HTMLElement && elem.dataset) { + if (elem.dataset.sentryComponent) + return elem.dataset.sentryComponent; + if (elem.dataset.sentryElement) + return elem.dataset.sentryElement; + } + out.push(elem.tagName.toLowerCase()); + let keyAttrPairs = keyAttrs && keyAttrs.length ? keyAttrs.filter((keyAttr) => elem.getAttribute(keyAttr)).map((keyAttr) => [keyAttr, elem.getAttribute(keyAttr)]) : null; + if (keyAttrPairs && keyAttrPairs.length) + keyAttrPairs.forEach((keyAttrPair) => { + out.push(`[${keyAttrPair[0]}="${keyAttrPair[1]}"]`); + }); + else if (elem.id && out.push(`#${elem.id}`), className = elem.className, className && is.isString(className)) + for (classes = className.split(/\s+/), i = 0; i < classes.length; i++) + out.push(`.${classes[i]}`); + let allowedAttrs = ["aria-label", "type", "name", "title", "alt"]; + for (i = 0; i < allowedAttrs.length; i++) + key = allowedAttrs[i], attr = elem.getAttribute(key), attr && out.push(`[${key}="${attr}"]`); + return out.join(""); + } + function getLocationHref() { + try { + return WINDOW.document.location.href; + } catch { + return ""; + } + } + function getDomElement(selector) { + return WINDOW.document && WINDOW.document.querySelector ? WINDOW.document.querySelector(selector) : null; + } + function getComponentName(elem) { + if (!WINDOW.HTMLElement) + return null; + let currentElem = elem, MAX_TRAVERSE_HEIGHT = 5; + for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) { + if (!currentElem) + return null; + if (currentElem instanceof HTMLElement) { + if (currentElem.dataset.sentryComponent) + return currentElem.dataset.sentryComponent; + if (currentElem.dataset.sentryElement) + return currentElem.dataset.sentryElement; + } + currentElem = currentElem.parentNode; + } + return null; + } + exports.getComponentName = getComponentName; + exports.getDomElement = getDomElement; + exports.getLocationHref = getLocationHref; + exports.htmlTreeAsString = htmlTreeAsString; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/debug-build.js +var require_debug_build = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/debug-build.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var DEBUG_BUILD = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__; + exports.DEBUG_BUILD = DEBUG_BUILD; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/logger.js +var require_logger = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/logger.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), worldwide = require_worldwide(), PREFIX = "Sentry Logger ", CONSOLE_LEVELS = [ + "debug", + "info", + "warn", + "error", + "log", + "assert", + "trace" + ], originalConsoleMethods = {}; + function consoleSandbox(callback) { + if (!("console" in worldwide.GLOBAL_OBJ)) + return callback(); + let console2 = worldwide.GLOBAL_OBJ.console, wrappedFuncs = {}, wrappedLevels = Object.keys(originalConsoleMethods); + wrappedLevels.forEach((level) => { + let originalConsoleMethod = originalConsoleMethods[level]; + wrappedFuncs[level] = console2[level], console2[level] = originalConsoleMethod; + }); + try { + return callback(); + } finally { + wrappedLevels.forEach((level) => { + console2[level] = wrappedFuncs[level]; + }); + } + } + function makeLogger() { + let enabled = !1, logger2 = { + enable: () => { + enabled = !0; + }, + disable: () => { + enabled = !1; + }, + isEnabled: () => enabled + }; + return debugBuild.DEBUG_BUILD ? CONSOLE_LEVELS.forEach((name) => { + logger2[name] = (...args) => { + enabled && consoleSandbox(() => { + worldwide.GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args); + }); + }; + }) : CONSOLE_LEVELS.forEach((name) => { + logger2[name] = () => { + }; + }), logger2; + } + var logger = makeLogger(); + exports.CONSOLE_LEVELS = CONSOLE_LEVELS; + exports.consoleSandbox = consoleSandbox; + exports.logger = logger; + exports.originalConsoleMethods = originalConsoleMethods; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/dsn.js +var require_dsn = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/dsn.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), logger = require_logger(), DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/; + function isValidProtocol(protocol) { + return protocol === "http" || protocol === "https"; + } + function dsnToString(dsn, withPassword = !1) { + let { host, path, pass, port, projectId, protocol, publicKey } = dsn; + return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ""}@${host}${port ? `:${port}` : ""}/${path && `${path}/`}${projectId}`; + } + function dsnFromString(str) { + let match = DSN_REGEX.exec(str); + if (!match) { + logger.consoleSandbox(() => { + console.error(`Invalid Sentry Dsn: ${str}`); + }); + return; + } + let [protocol, publicKey, pass = "", host, port = "", lastPath] = match.slice(1), path = "", projectId = lastPath, split = projectId.split("/"); + if (split.length > 1 && (path = split.slice(0, -1).join("/"), projectId = split.pop()), projectId) { + let projectMatch = projectId.match(/^\d+/); + projectMatch && (projectId = projectMatch[0]); + } + return dsnFromComponents({ host, pass, path, projectId, port, protocol, publicKey }); + } + function dsnFromComponents(components) { + return { + protocol: components.protocol, + publicKey: components.publicKey || "", + pass: components.pass || "", + host: components.host, + port: components.port || "", + path: components.path || "", + projectId: components.projectId + }; + } + function validateDsn(dsn) { + if (!debugBuild.DEBUG_BUILD) + return !0; + let { port, projectId, protocol } = dsn; + return ["protocol", "publicKey", "host", "projectId"].find((component) => dsn[component] ? !1 : (logger.logger.error(`Invalid Sentry Dsn: ${component} missing`), !0)) ? !1 : projectId.match(/^\d+$/) ? isValidProtocol(protocol) ? port && isNaN(parseInt(port, 10)) ? (logger.logger.error(`Invalid Sentry Dsn: Invalid port ${port}`), !1) : !0 : (logger.logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`), !1) : (logger.logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`), !1); + } + function makeDsn(from) { + let components = typeof from == "string" ? dsnFromString(from) : dsnFromComponents(from); + if (!(!components || !validateDsn(components))) + return components; + } + exports.dsnFromString = dsnFromString; + exports.dsnToString = dsnToString; + exports.makeDsn = makeDsn; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/error.js +var require_error = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/error.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var SentryError = class extends Error { + /** Display name of this error instance. */ + constructor(message, logLevel = "warn") { + super(message), this.message = message, this.name = new.target.prototype.constructor.name, Object.setPrototypeOf(this, new.target.prototype), this.logLevel = logLevel; + } + }; + exports.SentryError = SentryError; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/object.js +var require_object = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/object.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var browser = require_browser(), debugBuild = require_debug_build(), is = require_is(), logger = require_logger(), string = require_string(); + function fill(source, name, replacementFactory) { + if (!(name in source)) + return; + let original = source[name], wrapped = replacementFactory(original); + typeof wrapped == "function" && markFunctionWrapped(wrapped, original), source[name] = wrapped; + } + function addNonEnumerableProperty(obj, name, value) { + try { + Object.defineProperty(obj, name, { + // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it + value, + writable: !0, + configurable: !0 + }); + } catch { + debugBuild.DEBUG_BUILD && logger.logger.log(`Failed to add non-enumerable property "${name}" to object`, obj); + } + } + function markFunctionWrapped(wrapped, original) { + try { + let proto = original.prototype || {}; + wrapped.prototype = original.prototype = proto, addNonEnumerableProperty(wrapped, "__sentry_original__", original); + } catch { + } + } + function getOriginalFunction(func) { + return func.__sentry_original__; + } + function urlEncode(object) { + return Object.keys(object).map((key) => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`).join("&"); + } + function convertToPlainObject(value) { + if (is.isError(value)) + return { + message: value.message, + name: value.name, + stack: value.stack, + ...getOwnProperties(value) + }; + if (is.isEvent(value)) { + let newObj = { + type: value.type, + target: serializeEventTarget(value.target), + currentTarget: serializeEventTarget(value.currentTarget), + ...getOwnProperties(value) + }; + return typeof CustomEvent < "u" && is.isInstanceOf(value, CustomEvent) && (newObj.detail = value.detail), newObj; + } else + return value; + } + function serializeEventTarget(target) { + try { + return is.isElement(target) ? browser.htmlTreeAsString(target) : Object.prototype.toString.call(target); + } catch { + return ""; + } + } + function getOwnProperties(obj) { + if (typeof obj == "object" && obj !== null) { + let extractedProps = {}; + for (let property in obj) + Object.prototype.hasOwnProperty.call(obj, property) && (extractedProps[property] = obj[property]); + return extractedProps; + } else + return {}; + } + function extractExceptionKeysForMessage(exception, maxLength = 40) { + let keys = Object.keys(convertToPlainObject(exception)); + if (keys.sort(), !keys.length) + return "[object has no keys]"; + if (keys[0].length >= maxLength) + return string.truncate(keys[0], maxLength); + for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) { + let serialized = keys.slice(0, includedKeys).join(", "); + if (!(serialized.length > maxLength)) + return includedKeys === keys.length ? serialized : string.truncate(serialized, maxLength); + } + return ""; + } + function dropUndefinedKeys(inputValue) { + return _dropUndefinedKeys(inputValue, /* @__PURE__ */ new Map()); + } + function _dropUndefinedKeys(inputValue, memoizationMap) { + if (isPojo(inputValue)) { + let memoVal = memoizationMap.get(inputValue); + if (memoVal !== void 0) + return memoVal; + let returnValue = {}; + memoizationMap.set(inputValue, returnValue); + for (let key of Object.keys(inputValue)) + typeof inputValue[key] < "u" && (returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap)); + return returnValue; + } + if (Array.isArray(inputValue)) { + let memoVal = memoizationMap.get(inputValue); + if (memoVal !== void 0) + return memoVal; + let returnValue = []; + return memoizationMap.set(inputValue, returnValue), inputValue.forEach((item) => { + returnValue.push(_dropUndefinedKeys(item, memoizationMap)); + }), returnValue; + } + return inputValue; + } + function isPojo(input) { + if (!is.isPlainObject(input)) + return !1; + try { + let name = Object.getPrototypeOf(input).constructor.name; + return !name || name === "Object"; + } catch { + return !0; + } + } + function objectify(wat) { + let objectified; + switch (!0) { + case wat == null: + objectified = new String(wat); + break; + // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason + // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as + // an object in order to wrap it. + case (typeof wat == "symbol" || typeof wat == "bigint"): + objectified = Object(wat); + break; + // this will catch the remaining primitives: `String`, `Number`, and `Boolean` + case is.isPrimitive(wat): + objectified = new wat.constructor(wat); + break; + // by process of elimination, at this point we know that `wat` must already be an object + default: + objectified = wat; + break; + } + return objectified; + } + exports.addNonEnumerableProperty = addNonEnumerableProperty; + exports.convertToPlainObject = convertToPlainObject; + exports.dropUndefinedKeys = dropUndefinedKeys; + exports.extractExceptionKeysForMessage = extractExceptionKeysForMessage; + exports.fill = fill; + exports.getOriginalFunction = getOriginalFunction; + exports.markFunctionWrapped = markFunctionWrapped; + exports.objectify = objectify; + exports.urlEncode = urlEncode; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/stacktrace.js +var require_stacktrace = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/stacktrace.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var STACKTRACE_FRAME_LIMIT = 50, UNKNOWN_FUNCTION = "?", WEBPACK_ERROR_REGEXP = /\(error: (.*)\)/, STRIP_FRAME_REGEXP = /captureMessage|captureException/; + function createStackParser(...parsers) { + let sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map((p) => p[1]); + return (stack, skipFirstLines = 0, framesToPop = 0) => { + let frames = [], lines = stack.split(` +`); + for (let i = skipFirstLines; i < lines.length; i++) { + let line = lines[i]; + if (line.length > 1024) + continue; + let cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, "$1") : line; + if (!cleanedLine.match(/\S*Error: /)) { + for (let parser of sortedParsers) { + let frame = parser(cleanedLine); + if (frame) { + frames.push(frame); + break; + } + } + if (frames.length >= STACKTRACE_FRAME_LIMIT + framesToPop) + break; + } + } + return stripSentryFramesAndReverse(frames.slice(framesToPop)); + }; + } + function stackParserFromStackParserOptions(stackParser) { + return Array.isArray(stackParser) ? createStackParser(...stackParser) : stackParser; + } + function stripSentryFramesAndReverse(stack) { + if (!stack.length) + return []; + let localStack = Array.from(stack); + return /sentryWrapped/.test(localStack[localStack.length - 1].function || "") && localStack.pop(), localStack.reverse(), STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || "") && (localStack.pop(), STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || "") && localStack.pop()), localStack.slice(0, STACKTRACE_FRAME_LIMIT).map((frame) => ({ + ...frame, + filename: frame.filename || localStack[localStack.length - 1].filename, + function: frame.function || UNKNOWN_FUNCTION + })); + } + var defaultFunctionName = ""; + function getFunctionName(fn) { + try { + return !fn || typeof fn != "function" ? defaultFunctionName : fn.name || defaultFunctionName; + } catch { + return defaultFunctionName; + } + } + function getFramesFromEvent(event) { + let exception = event.exception; + if (exception) { + let frames = []; + try { + return exception.values.forEach((value) => { + value.stacktrace.frames && frames.push(...value.stacktrace.frames); + }), frames; + } catch { + return; + } + } + } + exports.UNKNOWN_FUNCTION = UNKNOWN_FUNCTION; + exports.createStackParser = createStackParser; + exports.getFramesFromEvent = getFramesFromEvent; + exports.getFunctionName = getFunctionName; + exports.stackParserFromStackParserOptions = stackParserFromStackParserOptions; + exports.stripSentryFramesAndReverse = stripSentryFramesAndReverse; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/handlers.js +var require_handlers = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/handlers.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), logger = require_logger(), stacktrace = require_stacktrace(), handlers = {}, instrumented = {}; + function addHandler(type, handler) { + handlers[type] = handlers[type] || [], handlers[type].push(handler); + } + function resetInstrumentationHandlers() { + Object.keys(handlers).forEach((key) => { + handlers[key] = void 0; + }); + } + function maybeInstrument(type, instrumentFn) { + instrumented[type] || (instrumentFn(), instrumented[type] = !0); + } + function triggerHandlers(type, data) { + let typeHandlers = type && handlers[type]; + if (typeHandlers) + for (let handler of typeHandlers) + try { + handler(data); + } catch (e) { + debugBuild.DEBUG_BUILD && logger.logger.error( + `Error while triggering instrumentation handler. +Type: ${type} +Name: ${stacktrace.getFunctionName(handler)} +Error:`, + e + ); + } + } + exports.addHandler = addHandler; + exports.maybeInstrument = maybeInstrument; + exports.resetInstrumentationHandlers = resetInstrumentationHandlers; + exports.triggerHandlers = triggerHandlers; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/console.js +var require_console = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/console.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var logger = require_logger(), object = require_object(), worldwide = require_worldwide(), handlers = require_handlers(); + function addConsoleInstrumentationHandler(handler) { + let type = "console"; + handlers.addHandler(type, handler), handlers.maybeInstrument(type, instrumentConsole); + } + function instrumentConsole() { + "console" in worldwide.GLOBAL_OBJ && logger.CONSOLE_LEVELS.forEach(function(level) { + level in worldwide.GLOBAL_OBJ.console && object.fill(worldwide.GLOBAL_OBJ.console, level, function(originalConsoleMethod) { + return logger.originalConsoleMethods[level] = originalConsoleMethod, function(...args) { + let handlerData = { args, level }; + handlers.triggerHandlers("console", handlerData); + let log = logger.originalConsoleMethods[level]; + log && log.apply(worldwide.GLOBAL_OBJ.console, args); + }; + }); + }); + } + exports.addConsoleInstrumentationHandler = addConsoleInstrumentationHandler; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/supports.js +var require_supports = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/supports.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), logger = require_logger(), worldwide = require_worldwide(), WINDOW = worldwide.GLOBAL_OBJ; + function supportsErrorEvent() { + try { + return new ErrorEvent(""), !0; + } catch { + return !1; + } + } + function supportsDOMError() { + try { + return new DOMError(""), !0; + } catch { + return !1; + } + } + function supportsDOMException() { + try { + return new DOMException(""), !0; + } catch { + return !1; + } + } + function supportsFetch() { + if (!("fetch" in WINDOW)) + return !1; + try { + return new Headers(), new Request("http://www.example.com"), new Response(), !0; + } catch { + return !1; + } + } + function isNativeFunction(func) { + return func && /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString()); + } + function supportsNativeFetch() { + if (typeof EdgeRuntime == "string") + return !0; + if (!supportsFetch()) + return !1; + if (isNativeFunction(WINDOW.fetch)) + return !0; + let result = !1, doc = WINDOW.document; + if (doc && typeof doc.createElement == "function") + try { + let sandbox = doc.createElement("iframe"); + sandbox.hidden = !0, doc.head.appendChild(sandbox), sandbox.contentWindow && sandbox.contentWindow.fetch && (result = isNativeFunction(sandbox.contentWindow.fetch)), doc.head.removeChild(sandbox); + } catch (err) { + debugBuild.DEBUG_BUILD && logger.logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", err); + } + return result; + } + function supportsReportingObserver() { + return "ReportingObserver" in WINDOW; + } + function supportsReferrerPolicy() { + if (!supportsFetch()) + return !1; + try { + return new Request("_", { + referrerPolicy: "origin" + }), !0; + } catch { + return !1; + } + } + exports.isNativeFunction = isNativeFunction; + exports.supportsDOMError = supportsDOMError; + exports.supportsDOMException = supportsDOMException; + exports.supportsErrorEvent = supportsErrorEvent; + exports.supportsFetch = supportsFetch; + exports.supportsNativeFetch = supportsNativeFetch; + exports.supportsReferrerPolicy = supportsReferrerPolicy; + exports.supportsReportingObserver = supportsReportingObserver; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/time.js +var require_time = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/time.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var worldwide = require_worldwide(), ONE_SECOND_IN_MS = 1e3; + function dateTimestampInSeconds() { + return Date.now() / ONE_SECOND_IN_MS; + } + function createUnixTimestampInSecondsFunc() { + let { performance } = worldwide.GLOBAL_OBJ; + if (!performance || !performance.now) + return dateTimestampInSeconds; + let approxStartingTimeOrigin = Date.now() - performance.now(), timeOrigin = performance.timeOrigin == null ? approxStartingTimeOrigin : performance.timeOrigin; + return () => (timeOrigin + performance.now()) / ONE_SECOND_IN_MS; + } + var timestampInSeconds = createUnixTimestampInSecondsFunc(); + exports._browserPerformanceTimeOriginMode = void 0; + var browserPerformanceTimeOrigin = (() => { + let { performance } = worldwide.GLOBAL_OBJ; + if (!performance || !performance.now) { + exports._browserPerformanceTimeOriginMode = "none"; + return; + } + let threshold = 3600 * 1e3, performanceNow = performance.now(), dateNow = Date.now(), timeOriginDelta = performance.timeOrigin ? Math.abs(performance.timeOrigin + performanceNow - dateNow) : threshold, timeOriginIsReliable = timeOriginDelta < threshold, navigationStart = performance.timing && performance.timing.navigationStart, navigationStartDelta = typeof navigationStart == "number" ? Math.abs(navigationStart + performanceNow - dateNow) : threshold, navigationStartIsReliable = navigationStartDelta < threshold; + return timeOriginIsReliable || navigationStartIsReliable ? timeOriginDelta <= navigationStartDelta ? (exports._browserPerformanceTimeOriginMode = "timeOrigin", performance.timeOrigin) : (exports._browserPerformanceTimeOriginMode = "navigationStart", navigationStart) : (exports._browserPerformanceTimeOriginMode = "dateNow", dateNow); + })(); + exports.browserPerformanceTimeOrigin = browserPerformanceTimeOrigin; + exports.dateTimestampInSeconds = dateTimestampInSeconds; + exports.timestampInSeconds = timestampInSeconds; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/fetch.js +var require_fetch = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/fetch.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), object = require_object(), supports = require_supports(), time = require_time(), worldwide = require_worldwide(), handlers = require_handlers(); + function addFetchInstrumentationHandler(handler) { + let type = "fetch"; + handlers.addHandler(type, handler), handlers.maybeInstrument(type, instrumentFetch); + } + function instrumentFetch() { + supports.supportsNativeFetch() && object.fill(worldwide.GLOBAL_OBJ, "fetch", function(originalFetch) { + return function(...args) { + let { method, url } = parseFetchArgs(args), handlerData = { + args, + fetchData: { + method, + url + }, + startTimestamp: time.timestampInSeconds() * 1e3 + }; + handlers.triggerHandlers("fetch", { + ...handlerData + }); + let virtualStackTrace = new Error().stack; + return originalFetch.apply(worldwide.GLOBAL_OBJ, args).then( + (response) => { + let finishedHandlerData = { + ...handlerData, + endTimestamp: time.timestampInSeconds() * 1e3, + response + }; + return handlers.triggerHandlers("fetch", finishedHandlerData), response; + }, + (error) => { + let erroredHandlerData = { + ...handlerData, + endTimestamp: time.timestampInSeconds() * 1e3, + error + }; + throw handlers.triggerHandlers("fetch", erroredHandlerData), is.isError(error) && error.stack === void 0 && (error.stack = virtualStackTrace, object.addNonEnumerableProperty(error, "framesToPop", 1)), error; + } + ); + }; + }); + } + function hasProp(obj, prop) { + return !!obj && typeof obj == "object" && !!obj[prop]; + } + function getUrlFromResource(resource) { + return typeof resource == "string" ? resource : resource ? hasProp(resource, "url") ? resource.url : resource.toString ? resource.toString() : "" : ""; + } + function parseFetchArgs(fetchArgs) { + if (fetchArgs.length === 0) + return { method: "GET", url: "" }; + if (fetchArgs.length === 2) { + let [url, options] = fetchArgs; + return { + url: getUrlFromResource(url), + method: hasProp(options, "method") ? String(options.method).toUpperCase() : "GET" + }; + } + let arg = fetchArgs[0]; + return { + url: getUrlFromResource(arg), + method: hasProp(arg, "method") ? String(arg.method).toUpperCase() : "GET" + }; + } + exports.addFetchInstrumentationHandler = addFetchInstrumentationHandler; + exports.parseFetchArgs = parseFetchArgs; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/globalError.js +var require_globalError = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/globalError.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var worldwide = require_worldwide(), handlers = require_handlers(), _oldOnErrorHandler = null; + function addGlobalErrorInstrumentationHandler(handler) { + let type = "error"; + handlers.addHandler(type, handler), handlers.maybeInstrument(type, instrumentError); + } + function instrumentError() { + _oldOnErrorHandler = worldwide.GLOBAL_OBJ.onerror, worldwide.GLOBAL_OBJ.onerror = function(msg, url, line, column, error) { + let handlerData = { + column, + error, + line, + msg, + url + }; + return handlers.triggerHandlers("error", handlerData), _oldOnErrorHandler && !_oldOnErrorHandler.__SENTRY_LOADER__ ? _oldOnErrorHandler.apply(this, arguments) : !1; + }, worldwide.GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = !0; + } + exports.addGlobalErrorInstrumentationHandler = addGlobalErrorInstrumentationHandler; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/globalUnhandledRejection.js +var require_globalUnhandledRejection = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/globalUnhandledRejection.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var worldwide = require_worldwide(), handlers = require_handlers(), _oldOnUnhandledRejectionHandler = null; + function addGlobalUnhandledRejectionInstrumentationHandler(handler) { + let type = "unhandledrejection"; + handlers.addHandler(type, handler), handlers.maybeInstrument(type, instrumentUnhandledRejection); + } + function instrumentUnhandledRejection() { + _oldOnUnhandledRejectionHandler = worldwide.GLOBAL_OBJ.onunhandledrejection, worldwide.GLOBAL_OBJ.onunhandledrejection = function(e) { + let handlerData = e; + return handlers.triggerHandlers("unhandledrejection", handlerData), _oldOnUnhandledRejectionHandler && !_oldOnUnhandledRejectionHandler.__SENTRY_LOADER__ ? _oldOnUnhandledRejectionHandler.apply(this, arguments) : !0; + }, worldwide.GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = !0; + } + exports.addGlobalUnhandledRejectionInstrumentationHandler = addGlobalUnhandledRejectionInstrumentationHandler; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/env.js +var require_env = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/env.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function isBrowserBundle() { + return typeof __SENTRY_BROWSER_BUNDLE__ < "u" && !!__SENTRY_BROWSER_BUNDLE__; + } + function getSDKSource() { + return "npm"; + } + exports.getSDKSource = getSDKSource; + exports.isBrowserBundle = isBrowserBundle; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/node.js +var require_node = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/node.js"(exports, module) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var env = require_env(); + function isNodeEnv() { + return !env.isBrowserBundle() && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]"; + } + function dynamicRequire(mod, request) { + return mod.require(request); + } + function loadModule(moduleName) { + let mod; + try { + mod = dynamicRequire(module, moduleName); + } catch { + } + try { + let { cwd } = dynamicRequire(module, "process"); + mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`); + } catch { + } + return mod; + } + exports.dynamicRequire = dynamicRequire; + exports.isNodeEnv = isNodeEnv; + exports.loadModule = loadModule; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/isBrowser.js +var require_isBrowser = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/isBrowser.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var node = require_node(), worldwide = require_worldwide(); + function isBrowser() { + return typeof window < "u" && (!node.isNodeEnv() || isElectronNodeRenderer()); + } + function isElectronNodeRenderer() { + return ( + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any + worldwide.GLOBAL_OBJ.process !== void 0 && worldwide.GLOBAL_OBJ.process.type === "renderer" + ); + } + exports.isBrowser = isBrowser; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/memo.js +var require_memo = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/memo.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function memoBuilder() { + let hasWeakSet = typeof WeakSet == "function", inner = hasWeakSet ? /* @__PURE__ */ new WeakSet() : []; + function memoize(obj) { + if (hasWeakSet) + return inner.has(obj) ? !0 : (inner.add(obj), !1); + for (let i = 0; i < inner.length; i++) + if (inner[i] === obj) + return !0; + return inner.push(obj), !1; + } + function unmemoize(obj) { + if (hasWeakSet) + inner.delete(obj); + else + for (let i = 0; i < inner.length; i++) + if (inner[i] === obj) { + inner.splice(i, 1); + break; + } + } + return [memoize, unmemoize]; + } + exports.memoBuilder = memoBuilder; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/misc.js +var require_misc = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/misc.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var object = require_object(), string = require_string(), worldwide = require_worldwide(); + function uuid4() { + let gbl = worldwide.GLOBAL_OBJ, crypto2 = gbl.crypto || gbl.msCrypto, getRandomByte = () => Math.random() * 16; + try { + if (crypto2 && crypto2.randomUUID) + return crypto2.randomUUID().replace(/-/g, ""); + crypto2 && crypto2.getRandomValues && (getRandomByte = () => { + let typedArray = new Uint8Array(1); + return crypto2.getRandomValues(typedArray), typedArray[0]; + }); + } catch { + } + return ("10000000100040008000" + 1e11).replace( + /[018]/g, + (c) => ( + // eslint-disable-next-line no-bitwise + (c ^ (getRandomByte() & 15) >> c / 4).toString(16) + ) + ); + } + function getFirstException(event) { + return event.exception && event.exception.values ? event.exception.values[0] : void 0; + } + function getEventDescription(event) { + let { message, event_id: eventId } = event; + if (message) + return message; + let firstException = getFirstException(event); + return firstException ? firstException.type && firstException.value ? `${firstException.type}: ${firstException.value}` : firstException.type || firstException.value || eventId || "" : eventId || ""; + } + function addExceptionTypeValue(event, value, type) { + let exception = event.exception = event.exception || {}, values = exception.values = exception.values || [], firstException = values[0] = values[0] || {}; + firstException.value || (firstException.value = value || ""), firstException.type || (firstException.type = type || "Error"); + } + function addExceptionMechanism(event, newMechanism) { + let firstException = getFirstException(event); + if (!firstException) + return; + let defaultMechanism = { type: "generic", handled: !0 }, currentMechanism = firstException.mechanism; + if (firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism }, newMechanism && "data" in newMechanism) { + let mergedData = { ...currentMechanism && currentMechanism.data, ...newMechanism.data }; + firstException.mechanism.data = mergedData; + } + } + var SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; + function parseSemver(input) { + let match = input.match(SEMVER_REGEXP) || [], major = parseInt(match[1], 10), minor = parseInt(match[2], 10), patch = parseInt(match[3], 10); + return { + buildmetadata: match[5], + major: isNaN(major) ? void 0 : major, + minor: isNaN(minor) ? void 0 : minor, + patch: isNaN(patch) ? void 0 : patch, + prerelease: match[4] + }; + } + function addContextToFrame(lines, frame, linesOfContext = 5) { + if (frame.lineno === void 0) + return; + let maxLines = lines.length, sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0); + frame.pre_context = lines.slice(Math.max(0, sourceLine - linesOfContext), sourceLine).map((line) => string.snipLine(line, 0)), frame.context_line = string.snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0), frame.post_context = lines.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext).map((line) => string.snipLine(line, 0)); + } + function checkOrSetAlreadyCaught(exception) { + if (exception && exception.__sentry_captured__) + return !0; + try { + object.addNonEnumerableProperty(exception, "__sentry_captured__", !0); + } catch { + } + return !1; + } + function arrayify(maybeArray) { + return Array.isArray(maybeArray) ? maybeArray : [maybeArray]; + } + exports.addContextToFrame = addContextToFrame; + exports.addExceptionMechanism = addExceptionMechanism; + exports.addExceptionTypeValue = addExceptionTypeValue; + exports.arrayify = arrayify; + exports.checkOrSetAlreadyCaught = checkOrSetAlreadyCaught; + exports.getEventDescription = getEventDescription; + exports.parseSemver = parseSemver; + exports.uuid4 = uuid4; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/normalize.js +var require_normalize = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/normalize.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), memo = require_memo(), object = require_object(), stacktrace = require_stacktrace(); + function normalize(input, depth = 100, maxProperties = 1 / 0) { + try { + return visit("", input, depth, maxProperties); + } catch (err) { + return { ERROR: `**non-serializable** (${err})` }; + } + } + function normalizeToSize(object2, depth = 3, maxSize = 100 * 1024) { + let normalized = normalize(object2, depth); + return jsonSize(normalized) > maxSize ? normalizeToSize(object2, depth - 1, maxSize) : normalized; + } + function visit(key, value, depth = 1 / 0, maxProperties = 1 / 0, memo$1 = memo.memoBuilder()) { + let [memoize, unmemoize] = memo$1; + if (value == null || // this matches null and undefined -> eqeq not eqeqeq + ["number", "boolean", "string"].includes(typeof value) && !Number.isNaN(value)) + return value; + let stringified = stringifyValue(key, value); + if (!stringified.startsWith("[object ")) + return stringified; + if (value.__sentry_skip_normalization__) + return value; + let remainingDepth = typeof value.__sentry_override_normalization_depth__ == "number" ? value.__sentry_override_normalization_depth__ : depth; + if (remainingDepth === 0) + return stringified.replace("object ", ""); + if (memoize(value)) + return "[Circular ~]"; + let valueWithToJSON = value; + if (valueWithToJSON && typeof valueWithToJSON.toJSON == "function") + try { + let jsonValue = valueWithToJSON.toJSON(); + return visit("", jsonValue, remainingDepth - 1, maxProperties, memo$1); + } catch { + } + let normalized = Array.isArray(value) ? [] : {}, numAdded = 0, visitable = object.convertToPlainObject(value); + for (let visitKey in visitable) { + if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) + continue; + if (numAdded >= maxProperties) { + normalized[visitKey] = "[MaxProperties ~]"; + break; + } + let visitValue = visitable[visitKey]; + normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo$1), numAdded++; + } + return unmemoize(value), normalized; + } + function stringifyValue(key, value) { + try { + if (key === "domain" && value && typeof value == "object" && value._events) + return "[Domain]"; + if (key === "domainEmitter") + return "[DomainEmitter]"; + if (typeof global < "u" && value === global) + return "[Global]"; + if (typeof window < "u" && value === window) + return "[Window]"; + if (typeof document < "u" && value === document) + return "[Document]"; + if (is.isVueViewModel(value)) + return "[VueViewModel]"; + if (is.isSyntheticEvent(value)) + return "[SyntheticEvent]"; + if (typeof value == "number" && value !== value) + return "[NaN]"; + if (typeof value == "function") + return `[Function: ${stacktrace.getFunctionName(value)}]`; + if (typeof value == "symbol") + return `[${String(value)}]`; + if (typeof value == "bigint") + return `[BigInt: ${String(value)}]`; + let objName = getConstructorName(value); + return /^HTML(\w*)Element$/.test(objName) ? `[HTMLElement: ${objName}]` : `[object ${objName}]`; + } catch (err) { + return `**non-serializable** (${err})`; + } + } + function getConstructorName(value) { + let prototype = Object.getPrototypeOf(value); + return prototype ? prototype.constructor.name : "null prototype"; + } + function utf8Length(value) { + return ~-encodeURI(value).split(/%..|./).length; + } + function jsonSize(value) { + return utf8Length(JSON.stringify(value)); + } + function normalizeUrlToBase(url, basePath) { + let escapedBase = basePath.replace(/\\/g, "/").replace(/[|\\{}()[\]^$+*?.]/g, "\\$&"), newUrl = url; + try { + newUrl = decodeURI(url); + } catch { + } + return newUrl.replace(/\\/g, "/").replace(/webpack:\/?/g, "").replace(new RegExp(`(file://)?/*${escapedBase}/*`, "ig"), "app:///"); + } + exports.normalize = normalize; + exports.normalizeToSize = normalizeToSize; + exports.normalizeUrlToBase = normalizeUrlToBase; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/path.js +var require_path = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/path.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function normalizeArray(parts, allowAboveRoot) { + let up = 0; + for (let i = parts.length - 1; i >= 0; i--) { + let last = parts[i]; + last === "." ? parts.splice(i, 1) : last === ".." ? (parts.splice(i, 1), up++) : up && (parts.splice(i, 1), up--); + } + if (allowAboveRoot) + for (; up--; up) + parts.unshift(".."); + return parts; + } + var splitPathRe = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/; + function splitPath(filename) { + let truncated = filename.length > 1024 ? `${filename.slice(-1024)}` : filename, parts = splitPathRe.exec(truncated); + return parts ? parts.slice(1) : []; + } + function resolve(...args) { + let resolvedPath = "", resolvedAbsolute = !1; + for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) { + let path = i >= 0 ? args[i] : "/"; + path && (resolvedPath = `${path}/${resolvedPath}`, resolvedAbsolute = path.charAt(0) === "/"); + } + return resolvedPath = normalizeArray( + resolvedPath.split("/").filter((p) => !!p), + !resolvedAbsolute + ).join("/"), (resolvedAbsolute ? "/" : "") + resolvedPath || "."; + } + function trim(arr) { + let start = 0; + for (; start < arr.length && arr[start] === ""; start++) + ; + let end = arr.length - 1; + for (; end >= 0 && arr[end] === ""; end--) + ; + return start > end ? [] : arr.slice(start, end - start + 1); + } + function relative(from, to) { + from = resolve(from).slice(1), to = resolve(to).slice(1); + let fromParts = trim(from.split("/")), toParts = trim(to.split("/")), length = Math.min(fromParts.length, toParts.length), samePartsLength = length; + for (let i = 0; i < length; i++) + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + let outputParts = []; + for (let i = samePartsLength; i < fromParts.length; i++) + outputParts.push(".."); + return outputParts = outputParts.concat(toParts.slice(samePartsLength)), outputParts.join("/"); + } + function normalizePath(path) { + let isPathAbsolute = isAbsolute(path), trailingSlash = path.slice(-1) === "/", normalizedPath = normalizeArray( + path.split("/").filter((p) => !!p), + !isPathAbsolute + ).join("/"); + return !normalizedPath && !isPathAbsolute && (normalizedPath = "."), normalizedPath && trailingSlash && (normalizedPath += "/"), (isPathAbsolute ? "/" : "") + normalizedPath; + } + function isAbsolute(path) { + return path.charAt(0) === "/"; + } + function join(...args) { + return normalizePath(args.join("/")); + } + function dirname(path) { + let result = splitPath(path), root = result[0], dir = result[1]; + return !root && !dir ? "." : (dir && (dir = dir.slice(0, dir.length - 1)), root + dir); + } + function basename(path, ext) { + let f = splitPath(path)[2]; + return ext && f.slice(ext.length * -1) === ext && (f = f.slice(0, f.length - ext.length)), f; + } + exports.basename = basename; + exports.dirname = dirname; + exports.isAbsolute = isAbsolute; + exports.join = join; + exports.normalizePath = normalizePath; + exports.relative = relative; + exports.resolve = resolve; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/syncpromise.js +var require_syncpromise = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/syncpromise.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), States; + (function(States2) { + States2[States2.PENDING = 0] = "PENDING"; + let RESOLVED = 1; + States2[States2.RESOLVED = RESOLVED] = "RESOLVED"; + let REJECTED = 2; + States2[States2.REJECTED = REJECTED] = "REJECTED"; + })(States || (States = {})); + function resolvedSyncPromise(value) { + return new SyncPromise((resolve) => { + resolve(value); + }); + } + function rejectedSyncPromise(reason) { + return new SyncPromise((_, reject) => { + reject(reason); + }); + } + var SyncPromise = class _SyncPromise { + constructor(executor) { + _SyncPromise.prototype.__init.call(this), _SyncPromise.prototype.__init2.call(this), _SyncPromise.prototype.__init3.call(this), _SyncPromise.prototype.__init4.call(this), this._state = States.PENDING, this._handlers = []; + try { + executor(this._resolve, this._reject); + } catch (e) { + this._reject(e); + } + } + /** JSDoc */ + then(onfulfilled, onrejected) { + return new _SyncPromise((resolve, reject) => { + this._handlers.push([ + !1, + (result) => { + if (!onfulfilled) + resolve(result); + else + try { + resolve(onfulfilled(result)); + } catch (e) { + reject(e); + } + }, + (reason) => { + if (!onrejected) + reject(reason); + else + try { + resolve(onrejected(reason)); + } catch (e) { + reject(e); + } + } + ]), this._executeHandlers(); + }); + } + /** JSDoc */ + catch(onrejected) { + return this.then((val) => val, onrejected); + } + /** JSDoc */ + finally(onfinally) { + return new _SyncPromise((resolve, reject) => { + let val, isRejected; + return this.then( + (value) => { + isRejected = !1, val = value, onfinally && onfinally(); + }, + (reason) => { + isRejected = !0, val = reason, onfinally && onfinally(); + } + ).then(() => { + if (isRejected) { + reject(val); + return; + } + resolve(val); + }); + }); + } + /** JSDoc */ + __init() { + this._resolve = (value) => { + this._setResult(States.RESOLVED, value); + }; + } + /** JSDoc */ + __init2() { + this._reject = (reason) => { + this._setResult(States.REJECTED, reason); + }; + } + /** JSDoc */ + __init3() { + this._setResult = (state, value) => { + if (this._state === States.PENDING) { + if (is.isThenable(value)) { + value.then(this._resolve, this._reject); + return; + } + this._state = state, this._value = value, this._executeHandlers(); + } + }; + } + /** JSDoc */ + __init4() { + this._executeHandlers = () => { + if (this._state === States.PENDING) + return; + let cachedHandlers = this._handlers.slice(); + this._handlers = [], cachedHandlers.forEach((handler) => { + handler[0] || (this._state === States.RESOLVED && handler[1](this._value), this._state === States.REJECTED && handler[2](this._value), handler[0] = !0); + }); + }; + } + }; + exports.SyncPromise = SyncPromise; + exports.rejectedSyncPromise = rejectedSyncPromise; + exports.resolvedSyncPromise = resolvedSyncPromise; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/promisebuffer.js +var require_promisebuffer = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/promisebuffer.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var error = require_error(), syncpromise = require_syncpromise(); + function makePromiseBuffer(limit) { + let buffer = []; + function isReady() { + return limit === void 0 || buffer.length < limit; + } + function remove(task) { + return buffer.splice(buffer.indexOf(task), 1)[0]; + } + function add(taskProducer) { + if (!isReady()) + return syncpromise.rejectedSyncPromise(new error.SentryError("Not adding Promise because buffer limit was reached.")); + let task = taskProducer(); + return buffer.indexOf(task) === -1 && buffer.push(task), task.then(() => remove(task)).then( + null, + () => remove(task).then(null, () => { + }) + ), task; + } + function drain(timeout) { + return new syncpromise.SyncPromise((resolve, reject) => { + let counter = buffer.length; + if (!counter) + return resolve(!0); + let capturedSetTimeout = setTimeout(() => { + timeout && timeout > 0 && resolve(!1); + }, timeout); + buffer.forEach((item) => { + syncpromise.resolvedSyncPromise(item).then(() => { + --counter || (clearTimeout(capturedSetTimeout), resolve(!0)); + }, reject); + }); + }); + } + return { + $: buffer, + add, + drain + }; + } + exports.makePromiseBuffer = makePromiseBuffer; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/cookie.js +var require_cookie = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/cookie.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function parseCookie(str) { + let obj = {}, index = 0; + for (; index < str.length; ) { + let eqIdx = str.indexOf("=", index); + if (eqIdx === -1) + break; + let endIdx = str.indexOf(";", index); + if (endIdx === -1) + endIdx = str.length; + else if (endIdx < eqIdx) { + index = str.lastIndexOf(";", eqIdx - 1) + 1; + continue; + } + let key = str.slice(index, eqIdx).trim(); + if (obj[key] === void 0) { + let val = str.slice(eqIdx + 1, endIdx).trim(); + val.charCodeAt(0) === 34 && (val = val.slice(1, -1)); + try { + obj[key] = val.indexOf("%") !== -1 ? decodeURIComponent(val) : val; + } catch { + obj[key] = val; + } + } + index = endIdx + 1; + } + return obj; + } + exports.parseCookie = parseCookie; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/url.js +var require_url = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/url.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function parseUrl(url) { + if (!url) + return {}; + let match = url.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); + if (!match) + return {}; + let query = match[6] || "", fragment = match[8] || ""; + return { + host: match[4], + path: match[5], + protocol: match[2], + search: query, + hash: fragment, + relative: match[5] + query + fragment + // everything minus origin + }; + } + function stripUrlQueryAndFragment(urlPath) { + return urlPath.split(/[\?#]/, 1)[0]; + } + function getNumberOfUrlSegments(url) { + return url.split(/\\?\//).filter((s) => s.length > 0 && s !== ",").length; + } + function getSanitizedUrlString(url) { + let { protocol, host, path } = url, filteredHost = host && host.replace(/^.*@/, "[filtered]:[filtered]@").replace(/(:80)$/, "").replace(/(:443)$/, "") || ""; + return `${protocol ? `${protocol}://` : ""}${filteredHost}${path}`; + } + exports.getNumberOfUrlSegments = getNumberOfUrlSegments; + exports.getSanitizedUrlString = getSanitizedUrlString; + exports.parseUrl = parseUrl; + exports.stripUrlQueryAndFragment = stripUrlQueryAndFragment; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/requestdata.js +var require_requestdata = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/requestdata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var cookie = require_cookie(), debugBuild = require_debug_build(), is = require_is(), logger = require_logger(), normalize = require_normalize(), url = require_url(), DEFAULT_INCLUDES = { + ip: !1, + request: !0, + transaction: !0, + user: !0 + }, DEFAULT_REQUEST_INCLUDES = ["cookies", "data", "headers", "method", "query_string", "url"], DEFAULT_USER_INCLUDES = ["id", "username", "email"]; + function extractPathForTransaction(req, options = {}) { + let method = req.method && req.method.toUpperCase(), path = "", source = "url"; + options.customRoute || req.route ? (path = options.customRoute || `${req.baseUrl || ""}${req.route && req.route.path}`, source = "route") : (req.originalUrl || req.url) && (path = url.stripUrlQueryAndFragment(req.originalUrl || req.url || "")); + let name = ""; + return options.method && method && (name += method), options.method && options.path && (name += " "), options.path && path && (name += path), [name, source]; + } + function extractTransaction(req, type) { + switch (type) { + case "path": + return extractPathForTransaction(req, { path: !0 })[0]; + case "handler": + return req.route && req.route.stack && req.route.stack[0] && req.route.stack[0].name || ""; + case "methodPath": + default: { + let customRoute = req._reconstructedRoute ? req._reconstructedRoute : void 0; + return extractPathForTransaction(req, { path: !0, method: !0, customRoute })[0]; + } + } + } + function extractUserData(user, keys) { + let extractedUser = {}; + return (Array.isArray(keys) ? keys : DEFAULT_USER_INCLUDES).forEach((key) => { + user && key in user && (extractedUser[key] = user[key]); + }), extractedUser; + } + function extractRequestData(req, options) { + let { include = DEFAULT_REQUEST_INCLUDES } = options || {}, requestData = {}, headers = req.headers || {}, method = req.method, host = headers.host || req.hostname || req.host || "", protocol = req.protocol === "https" || req.socket && req.socket.encrypted ? "https" : "http", originalUrl = req.originalUrl || req.url || "", absoluteUrl = originalUrl.startsWith(protocol) ? originalUrl : `${protocol}://${host}${originalUrl}`; + return include.forEach((key) => { + switch (key) { + case "headers": { + requestData.headers = headers, include.includes("cookies") || delete requestData.headers.cookie; + break; + } + case "method": { + requestData.method = method; + break; + } + case "url": { + requestData.url = absoluteUrl; + break; + } + case "cookies": { + requestData.cookies = // TODO (v8 / #5257): We're only sending the empty object for backwards compatibility, so the last bit can + // come off in v8 + req.cookies || headers.cookie && cookie.parseCookie(headers.cookie) || {}; + break; + } + case "query_string": { + requestData.query_string = extractQueryParams(req); + break; + } + case "data": { + if (method === "GET" || method === "HEAD") + break; + req.body !== void 0 && (requestData.data = is.isString(req.body) ? req.body : JSON.stringify(normalize.normalize(req.body))); + break; + } + default: + ({}).hasOwnProperty.call(req, key) && (requestData[key] = req[key]); + } + }), requestData; + } + function addRequestDataToEvent(event, req, options) { + let include = { + ...DEFAULT_INCLUDES, + ...options && options.include + }; + if (include.request) { + let extractedRequestData = Array.isArray(include.request) ? extractRequestData(req, { include: include.request }) : extractRequestData(req); + event.request = { + ...event.request, + ...extractedRequestData + }; + } + if (include.user) { + let extractedUser = req.user && is.isPlainObject(req.user) ? extractUserData(req.user, include.user) : {}; + Object.keys(extractedUser).length && (event.user = { + ...event.user, + ...extractedUser + }); + } + if (include.ip) { + let ip = req.ip || req.socket && req.socket.remoteAddress; + ip && (event.user = { + ...event.user, + ip_address: ip + }); + } + return include.transaction && !event.transaction && event.type === "transaction" && (event.transaction = extractTransaction(req, include.transaction)), event; + } + function extractQueryParams(req) { + let originalUrl = req.originalUrl || req.url || ""; + if (originalUrl) { + originalUrl.startsWith("/") && (originalUrl = `http://dogs.are.great${originalUrl}`); + try { + let queryParams = req.query || new URL(originalUrl).search.slice(1); + return queryParams.length ? queryParams : void 0; + } catch { + return; + } + } + } + function winterCGHeadersToDict(winterCGHeaders) { + let headers = {}; + try { + winterCGHeaders.forEach((value, key) => { + typeof value == "string" && (headers[key] = value); + }); + } catch { + debugBuild.DEBUG_BUILD && logger.logger.warn("Sentry failed extracting headers from a request object. If you see this, please file an issue."); + } + return headers; + } + function winterCGRequestToRequestData(req) { + let headers = winterCGHeadersToDict(req.headers); + return { + method: req.method, + url: req.url, + headers + }; + } + exports.DEFAULT_USER_INCLUDES = DEFAULT_USER_INCLUDES; + exports.addRequestDataToEvent = addRequestDataToEvent; + exports.extractPathForTransaction = extractPathForTransaction; + exports.extractRequestData = extractRequestData; + exports.winterCGHeadersToDict = winterCGHeadersToDict; + exports.winterCGRequestToRequestData = winterCGRequestToRequestData; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/severity.js +var require_severity = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/severity.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var validSeverityLevels = ["fatal", "error", "warning", "log", "info", "debug"]; + function severityLevelFromString(level) { + return level === "warn" ? "warning" : validSeverityLevels.includes(level) ? level : "log"; + } + exports.severityLevelFromString = severityLevelFromString; + exports.validSeverityLevels = validSeverityLevels; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/node-stack-trace.js +var require_node_stack_trace = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/node-stack-trace.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var stacktrace = require_stacktrace(); + function filenameIsInApp(filename, isNative = !1) { + return !(isNative || filename && // It's not internal if it's an absolute linux path + !filename.startsWith("/") && // It's not internal if it's an absolute windows path + !filename.match(/^[A-Z]:/) && // It's not internal if the path is starting with a dot + !filename.startsWith(".") && // It's not internal if the frame has a protocol. In node, this is usually the case if the file got pre-processed with a bundler like webpack + !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//)) && filename !== void 0 && !filename.includes("node_modules/"); + } + function node(getModule) { + let FILENAME_MATCH = /^\s*[-]{4,}$/, FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/; + return (line) => { + let lineMatch = line.match(FULL_MATCH); + if (lineMatch) { + let object, method, functionName, typeName, methodName; + if (lineMatch[1]) { + functionName = lineMatch[1]; + let methodStart = functionName.lastIndexOf("."); + if (functionName[methodStart - 1] === "." && methodStart--, methodStart > 0) { + object = functionName.slice(0, methodStart), method = functionName.slice(methodStart + 1); + let objectEnd = object.indexOf(".Module"); + objectEnd > 0 && (functionName = functionName.slice(objectEnd + 1), object = object.slice(0, objectEnd)); + } + typeName = void 0; + } + method && (typeName = object, methodName = method), method === "" && (methodName = void 0, functionName = void 0), functionName === void 0 && (methodName = methodName || stacktrace.UNKNOWN_FUNCTION, functionName = typeName ? `${typeName}.${methodName}` : methodName); + let filename = lineMatch[2] && lineMatch[2].startsWith("file://") ? lineMatch[2].slice(7) : lineMatch[2], isNative = lineMatch[5] === "native"; + return filename && filename.match(/\/[A-Z]:/) && (filename = filename.slice(1)), !filename && lineMatch[5] && !isNative && (filename = lineMatch[5]), { + filename, + module: getModule ? getModule(filename) : void 0, + function: functionName, + lineno: parseInt(lineMatch[3], 10) || void 0, + colno: parseInt(lineMatch[4], 10) || void 0, + in_app: filenameIsInApp(filename, isNative) + }; + } + if (line.match(FILENAME_MATCH)) + return { + filename: line + }; + }; + } + function nodeStackLineParser(getModule) { + return [90, node(getModule)]; + } + exports.filenameIsInApp = filenameIsInApp; + exports.node = node; + exports.nodeStackLineParser = nodeStackLineParser; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/baggage.js +var require_baggage = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/baggage.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), is = require_is(), logger = require_logger(), BAGGAGE_HEADER_NAME = "baggage", SENTRY_BAGGAGE_KEY_PREFIX = "sentry-", SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/, MAX_BAGGAGE_STRING_LENGTH = 8192; + function baggageHeaderToDynamicSamplingContext(baggageHeader) { + let baggageObject = parseBaggageHeader(baggageHeader); + if (!baggageObject) + return; + let dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => { + if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) { + let nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length); + acc[nonPrefixedKey] = value; + } + return acc; + }, {}); + if (Object.keys(dynamicSamplingContext).length > 0) + return dynamicSamplingContext; + } + function dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext) { + if (!dynamicSamplingContext) + return; + let sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce( + (acc, [dscKey, dscValue]) => (dscValue && (acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue), acc), + {} + ); + return objectToBaggageHeader(sentryPrefixedDSC); + } + function parseBaggageHeader(baggageHeader) { + if (!(!baggageHeader || !is.isString(baggageHeader) && !Array.isArray(baggageHeader))) + return Array.isArray(baggageHeader) ? baggageHeader.reduce((acc, curr) => { + let currBaggageObject = baggageHeaderToObject(curr); + for (let key of Object.keys(currBaggageObject)) + acc[key] = currBaggageObject[key]; + return acc; + }, {}) : baggageHeaderToObject(baggageHeader); + } + function baggageHeaderToObject(baggageHeader) { + return baggageHeader.split(",").map((baggageEntry) => baggageEntry.split("=").map((keyOrValue) => decodeURIComponent(keyOrValue.trim()))).reduce((acc, [key, value]) => (acc[key] = value, acc), {}); + } + function objectToBaggageHeader(object) { + if (Object.keys(object).length !== 0) + return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => { + let baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`, newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`; + return newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH ? (debugBuild.DEBUG_BUILD && logger.logger.warn( + `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.` + ), baggageHeader) : newBaggageHeader; + }, ""); + } + exports.BAGGAGE_HEADER_NAME = BAGGAGE_HEADER_NAME; + exports.MAX_BAGGAGE_STRING_LENGTH = MAX_BAGGAGE_STRING_LENGTH; + exports.SENTRY_BAGGAGE_KEY_PREFIX = SENTRY_BAGGAGE_KEY_PREFIX; + exports.SENTRY_BAGGAGE_KEY_PREFIX_REGEX = SENTRY_BAGGAGE_KEY_PREFIX_REGEX; + exports.baggageHeaderToDynamicSamplingContext = baggageHeaderToDynamicSamplingContext; + exports.dynamicSamplingContextToSentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader; + exports.parseBaggageHeader = parseBaggageHeader; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/tracing.js +var require_tracing = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/tracing.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var baggage = require_baggage(), misc = require_misc(), TRACEPARENT_REGEXP = new RegExp( + "^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$" + // whitespace + ); + function extractTraceparentData(traceparent) { + if (!traceparent) + return; + let matches = traceparent.match(TRACEPARENT_REGEXP); + if (!matches) + return; + let parentSampled; + return matches[3] === "1" ? parentSampled = !0 : matches[3] === "0" && (parentSampled = !1), { + traceId: matches[1], + parentSampled, + parentSpanId: matches[2] + }; + } + function propagationContextFromHeaders(sentryTrace, baggage$1) { + let traceparentData = extractTraceparentData(sentryTrace), dynamicSamplingContext = baggage.baggageHeaderToDynamicSamplingContext(baggage$1), { traceId, parentSpanId, parentSampled } = traceparentData || {}; + return traceparentData ? { + traceId: traceId || misc.uuid4(), + parentSpanId: parentSpanId || misc.uuid4().substring(16), + spanId: misc.uuid4().substring(16), + sampled: parentSampled, + dsc: dynamicSamplingContext || {} + // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it + } : { + traceId: traceId || misc.uuid4(), + spanId: misc.uuid4().substring(16) + }; + } + function generateSentryTraceHeader(traceId = misc.uuid4(), spanId = misc.uuid4().substring(16), sampled) { + let sampledString = ""; + return sampled !== void 0 && (sampledString = sampled ? "-1" : "-0"), `${traceId}-${spanId}${sampledString}`; + } + exports.TRACEPARENT_REGEXP = TRACEPARENT_REGEXP; + exports.extractTraceparentData = extractTraceparentData; + exports.generateSentryTraceHeader = generateSentryTraceHeader; + exports.propagationContextFromHeaders = propagationContextFromHeaders; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/envelope.js +var require_envelope = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/envelope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var dsn = require_dsn(), normalize = require_normalize(), object = require_object(), worldwide = require_worldwide(); + function createEnvelope(headers, items = []) { + return [headers, items]; + } + function addItemToEnvelope(envelope, newItem) { + let [headers, items] = envelope; + return [headers, [...items, newItem]]; + } + function forEachEnvelopeItem(envelope, callback) { + let envelopeItems = envelope[1]; + for (let envelopeItem of envelopeItems) { + let envelopeItemType = envelopeItem[0].type; + if (callback(envelopeItem, envelopeItemType)) + return !0; + } + return !1; + } + function envelopeContainsItemType(envelope, types) { + return forEachEnvelopeItem(envelope, (_, type) => types.includes(type)); + } + function encodeUTF8(input) { + return worldwide.GLOBAL_OBJ.__SENTRY__ && worldwide.GLOBAL_OBJ.__SENTRY__.encodePolyfill ? worldwide.GLOBAL_OBJ.__SENTRY__.encodePolyfill(input) : new TextEncoder().encode(input); + } + function decodeUTF8(input) { + return worldwide.GLOBAL_OBJ.__SENTRY__ && worldwide.GLOBAL_OBJ.__SENTRY__.decodePolyfill ? worldwide.GLOBAL_OBJ.__SENTRY__.decodePolyfill(input) : new TextDecoder().decode(input); + } + function serializeEnvelope(envelope) { + let [envHeaders, items] = envelope, parts = JSON.stringify(envHeaders); + function append(next) { + typeof parts == "string" ? parts = typeof next == "string" ? parts + next : [encodeUTF8(parts), next] : parts.push(typeof next == "string" ? encodeUTF8(next) : next); + } + for (let item of items) { + let [itemHeaders, payload] = item; + if (append(` +${JSON.stringify(itemHeaders)} +`), typeof payload == "string" || payload instanceof Uint8Array) + append(payload); + else { + let stringifiedPayload; + try { + stringifiedPayload = JSON.stringify(payload); + } catch { + stringifiedPayload = JSON.stringify(normalize.normalize(payload)); + } + append(stringifiedPayload); + } + } + return typeof parts == "string" ? parts : concatBuffers(parts); + } + function concatBuffers(buffers) { + let totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0), merged = new Uint8Array(totalLength), offset = 0; + for (let buffer of buffers) + merged.set(buffer, offset), offset += buffer.length; + return merged; + } + function parseEnvelope(env) { + let buffer = typeof env == "string" ? encodeUTF8(env) : env; + function readBinary(length) { + let bin = buffer.subarray(0, length); + return buffer = buffer.subarray(length + 1), bin; + } + function readJson() { + let i = buffer.indexOf(10); + return i < 0 && (i = buffer.length), JSON.parse(decodeUTF8(readBinary(i))); + } + let envelopeHeader = readJson(), items = []; + for (; buffer.length; ) { + let itemHeader = readJson(), binaryLength = typeof itemHeader.length == "number" ? itemHeader.length : void 0; + items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]); + } + return [envelopeHeader, items]; + } + function createSpanEnvelopeItem(spanJson) { + return [{ + type: "span" + }, spanJson]; + } + function createAttachmentEnvelopeItem(attachment) { + let buffer = typeof attachment.data == "string" ? encodeUTF8(attachment.data) : attachment.data; + return [ + object.dropUndefinedKeys({ + type: "attachment", + length: buffer.length, + filename: attachment.filename, + content_type: attachment.contentType, + attachment_type: attachment.attachmentType + }), + buffer + ]; + } + var ITEM_TYPE_TO_DATA_CATEGORY_MAP = { + session: "session", + sessions: "session", + attachment: "attachment", + transaction: "transaction", + event: "error", + client_report: "internal", + user_report: "default", + profile: "profile", + profile_chunk: "profile", + replay_event: "replay", + replay_recording: "replay", + check_in: "monitor", + feedback: "feedback", + span: "span", + statsd: "metric_bucket" + }; + function envelopeItemTypeToDataCategory(type) { + return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type]; + } + function getSdkMetadataForEnvelopeHeader(metadataOrEvent) { + if (!metadataOrEvent || !metadataOrEvent.sdk) + return; + let { name, version } = metadataOrEvent.sdk; + return { name, version }; + } + function createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn$1) { + let dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext; + return { + event_id: event.event_id, + sent_at: (/* @__PURE__ */ new Date()).toISOString(), + ...sdkInfo && { sdk: sdkInfo }, + ...!!tunnel && dsn$1 && { dsn: dsn.dsnToString(dsn$1) }, + ...dynamicSamplingContext && { + trace: object.dropUndefinedKeys({ ...dynamicSamplingContext }) + } + }; + } + exports.addItemToEnvelope = addItemToEnvelope; + exports.createAttachmentEnvelopeItem = createAttachmentEnvelopeItem; + exports.createEnvelope = createEnvelope; + exports.createEventEnvelopeHeaders = createEventEnvelopeHeaders; + exports.createSpanEnvelopeItem = createSpanEnvelopeItem; + exports.envelopeContainsItemType = envelopeContainsItemType; + exports.envelopeItemTypeToDataCategory = envelopeItemTypeToDataCategory; + exports.forEachEnvelopeItem = forEachEnvelopeItem; + exports.getSdkMetadataForEnvelopeHeader = getSdkMetadataForEnvelopeHeader; + exports.parseEnvelope = parseEnvelope; + exports.serializeEnvelope = serializeEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/clientreport.js +var require_clientreport = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/clientreport.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var envelope = require_envelope(), time = require_time(); + function createClientReportEnvelope(discarded_events, dsn, timestamp) { + let clientReportItem = [ + { type: "client_report" }, + { + timestamp: timestamp || time.dateTimestampInSeconds(), + discarded_events + } + ]; + return envelope.createEnvelope(dsn ? { dsn } : {}, [clientReportItem]); + } + exports.createClientReportEnvelope = createClientReportEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/ratelimit.js +var require_ratelimit = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/ratelimit.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var DEFAULT_RETRY_AFTER = 60 * 1e3; + function parseRetryAfterHeader(header, now = Date.now()) { + let headerDelay = parseInt(`${header}`, 10); + if (!isNaN(headerDelay)) + return headerDelay * 1e3; + let headerDate = Date.parse(`${header}`); + return isNaN(headerDate) ? DEFAULT_RETRY_AFTER : headerDate - now; + } + function disabledUntil(limits, dataCategory) { + return limits[dataCategory] || limits.all || 0; + } + function isRateLimited(limits, dataCategory, now = Date.now()) { + return disabledUntil(limits, dataCategory) > now; + } + function updateRateLimits(limits, { statusCode, headers }, now = Date.now()) { + let updatedRateLimits = { + ...limits + }, rateLimitHeader = headers && headers["x-sentry-rate-limits"], retryAfterHeader = headers && headers["retry-after"]; + if (rateLimitHeader) + for (let limit of rateLimitHeader.trim().split(",")) { + let [retryAfter, categories, , , namespaces] = limit.split(":", 5), headerDelay = parseInt(retryAfter, 10), delay = (isNaN(headerDelay) ? 60 : headerDelay) * 1e3; + if (!categories) + updatedRateLimits.all = now + delay; + else + for (let category of categories.split(";")) + category === "metric_bucket" ? (!namespaces || namespaces.split(";").includes("custom")) && (updatedRateLimits[category] = now + delay) : updatedRateLimits[category] = now + delay; + } + else retryAfterHeader ? updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now) : statusCode === 429 && (updatedRateLimits.all = now + 60 * 1e3); + return updatedRateLimits; + } + exports.DEFAULT_RETRY_AFTER = DEFAULT_RETRY_AFTER; + exports.disabledUntil = disabledUntil; + exports.isRateLimited = isRateLimited; + exports.parseRetryAfterHeader = parseRetryAfterHeader; + exports.updateRateLimits = updateRateLimits; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/cache.js +var require_cache = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/cache.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function makeFifoCache(size) { + let evictionOrder = [], cache = {}; + return { + add(key, value) { + for (; evictionOrder.length >= size; ) { + let evictCandidate = evictionOrder.shift(); + evictCandidate !== void 0 && delete cache[evictCandidate]; + } + cache[key] && this.delete(key), evictionOrder.push(key), cache[key] = value; + }, + clear() { + cache = {}, evictionOrder = []; + }, + get(key) { + return cache[key]; + }, + size() { + return evictionOrder.length; + }, + // Delete cache key and return true if it existed, false otherwise. + delete(key) { + if (!cache[key]) + return !1; + delete cache[key]; + for (let i = 0; i < evictionOrder.length; i++) + if (evictionOrder[i] === key) { + evictionOrder.splice(i, 1); + break; + } + return !0; + } + }; + } + exports.makeFifoCache = makeFifoCache; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/eventbuilder.js +var require_eventbuilder = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/eventbuilder.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), misc = require_misc(), normalize = require_normalize(), object = require_object(); + function parseStackFrames(stackParser, error) { + return stackParser(error.stack || "", 1); + } + function exceptionFromError(stackParser, error) { + let exception = { + type: error.name || error.constructor.name, + value: error.message + }, frames = parseStackFrames(stackParser, error); + return frames.length && (exception.stacktrace = { frames }), exception; + } + function getErrorPropertyFromObject(obj) { + for (let prop in obj) + if (Object.prototype.hasOwnProperty.call(obj, prop)) { + let value = obj[prop]; + if (value instanceof Error) + return value; + } + } + function getMessageForObject(exception) { + if ("name" in exception && typeof exception.name == "string") { + let message = `'${exception.name}' captured as exception`; + return "message" in exception && typeof exception.message == "string" && (message += ` with message '${exception.message}'`), message; + } else if ("message" in exception && typeof exception.message == "string") + return exception.message; + let keys = object.extractExceptionKeysForMessage(exception); + if (is.isErrorEvent(exception)) + return `Event \`ErrorEvent\` captured as exception with message \`${exception.message}\``; + let className = getObjectClassName(exception); + return `${className && className !== "Object" ? `'${className}'` : "Object"} captured as exception with keys: ${keys}`; + } + function getObjectClassName(obj) { + try { + let prototype = Object.getPrototypeOf(obj); + return prototype ? prototype.constructor.name : void 0; + } catch { + } + } + function getException(client, mechanism, exception, hint) { + if (is.isError(exception)) + return [exception, void 0]; + if (mechanism.synthetic = !0, is.isPlainObject(exception)) { + let normalizeDepth = client && client.getOptions().normalizeDepth, extras = { __serialized__: normalize.normalizeToSize(exception, normalizeDepth) }, errorFromProp = getErrorPropertyFromObject(exception); + if (errorFromProp) + return [errorFromProp, extras]; + let message = getMessageForObject(exception), ex2 = hint && hint.syntheticException || new Error(message); + return ex2.message = message, [ex2, extras]; + } + let ex = hint && hint.syntheticException || new Error(exception); + return ex.message = `${exception}`, [ex, void 0]; + } + function eventFromUnknownInput(client, stackParser, exception, hint) { + let mechanism = hint && hint.data && hint.data.mechanism || { + handled: !0, + type: "generic" + }, [ex, extras] = getException(client, mechanism, exception, hint), event = { + exception: { + values: [exceptionFromError(stackParser, ex)] + } + }; + return extras && (event.extra = extras), misc.addExceptionTypeValue(event, void 0, void 0), misc.addExceptionMechanism(event, mechanism), { + ...event, + event_id: hint && hint.event_id + }; + } + function eventFromMessage(stackParser, message, level = "info", hint, attachStacktrace) { + let event = { + event_id: hint && hint.event_id, + level + }; + if (attachStacktrace && hint && hint.syntheticException) { + let frames = parseStackFrames(stackParser, hint.syntheticException); + frames.length && (event.exception = { + values: [ + { + value: message, + stacktrace: { frames } + } + ] + }); + } + if (is.isParameterizedString(message)) { + let { __sentry_template_string__, __sentry_template_values__ } = message; + return event.logentry = { + message: __sentry_template_string__, + params: __sentry_template_values__ + }, event; + } + return event.message = message, event; + } + exports.eventFromMessage = eventFromMessage; + exports.eventFromUnknownInput = eventFromUnknownInput; + exports.exceptionFromError = exceptionFromError; + exports.parseStackFrames = parseStackFrames; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/anr.js +var require_anr = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/anr.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var nodeStackTrace = require_node_stack_trace(), object = require_object(), stacktrace = require_stacktrace(); + function watchdogTimer(createTimer, pollInterval, anrThreshold, callback) { + let timer = createTimer(), triggered = !1, enabled = !0; + return setInterval(() => { + let diffMs = timer.getTimeMs(); + triggered === !1 && diffMs > pollInterval + anrThreshold && (triggered = !0, enabled && callback()), diffMs < pollInterval + anrThreshold && (triggered = !1); + }, 20), { + poll: () => { + timer.reset(); + }, + enabled: (state) => { + enabled = state; + } + }; + } + function callFrameToStackFrame(frame, url, getModuleFromFilename) { + let filename = url ? url.replace(/^file:\/\//, "") : void 0, colno = frame.location.columnNumber ? frame.location.columnNumber + 1 : void 0, lineno = frame.location.lineNumber ? frame.location.lineNumber + 1 : void 0; + return object.dropUndefinedKeys({ + filename, + module: getModuleFromFilename(filename), + function: frame.functionName || stacktrace.UNKNOWN_FUNCTION, + colno, + lineno, + in_app: filename ? nodeStackTrace.filenameIsInApp(filename) : void 0 + }); + } + exports.callFrameToStackFrame = callFrameToStackFrame; + exports.watchdogTimer = watchdogTimer; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/lru.js +var require_lru = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/lru.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var LRUMap = class { + constructor(_maxSize) { + this._maxSize = _maxSize, this._cache = /* @__PURE__ */ new Map(); + } + /** Get the current size of the cache */ + get size() { + return this._cache.size; + } + /** Get an entry or undefined if it was not in the cache. Re-inserts to update the recently used order */ + get(key) { + let value = this._cache.get(key); + if (value !== void 0) + return this._cache.delete(key), this._cache.set(key, value), value; + } + /** Insert an entry and evict an older entry if we've reached maxSize */ + set(key, value) { + this._cache.size >= this._maxSize && this._cache.delete(this._cache.keys().next().value), this._cache.set(key, value); + } + /** Remove an entry and return the entry if it was in the cache */ + remove(key) { + let value = this._cache.get(key); + return value && this._cache.delete(key), value; + } + /** Clear all entries */ + clear() { + this._cache.clear(); + } + /** Get all the keys */ + keys() { + return Array.from(this._cache.keys()); + } + /** Get all the values */ + values() { + let values = []; + return this._cache.forEach((value) => values.push(value)), values; + } + }; + exports.LRUMap = LRUMap; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_nullishCoalesce.js +var require_nullishCoalesce = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_nullishCoalesce.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function _nullishCoalesce(lhs, rhsFn) { + return lhs ?? rhsFn(); + } + exports._nullishCoalesce = _nullishCoalesce; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncNullishCoalesce.js +var require_asyncNullishCoalesce = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncNullishCoalesce.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var _nullishCoalesce = require_nullishCoalesce(); + async function _asyncNullishCoalesce(lhs, rhsFn) { + return _nullishCoalesce._nullishCoalesce(lhs, rhsFn); + } + exports._asyncNullishCoalesce = _asyncNullishCoalesce; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncOptionalChain.js +var require_asyncOptionalChain = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncOptionalChain.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + async function _asyncOptionalChain(ops) { + let lastAccessLHS, value = ops[0], i = 1; + for (; i < ops.length; ) { + let op = ops[i], fn = ops[i + 1]; + if (i += 2, (op === "optionalAccess" || op === "optionalCall") && value == null) + return; + op === "access" || op === "optionalAccess" ? (lastAccessLHS = value, value = await fn(value)) : (op === "call" || op === "optionalCall") && (value = await fn((...args) => value.call(lastAccessLHS, ...args)), lastAccessLHS = void 0); + } + return value; + } + exports._asyncOptionalChain = _asyncOptionalChain; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncOptionalChainDelete.js +var require_asyncOptionalChainDelete = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncOptionalChainDelete.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var _asyncOptionalChain = require_asyncOptionalChain(); + async function _asyncOptionalChainDelete(ops) { + let result = await _asyncOptionalChain._asyncOptionalChain(ops); + return result ?? !0; + } + exports._asyncOptionalChainDelete = _asyncOptionalChainDelete; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_optionalChain.js +var require_optionalChain = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_optionalChain.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function _optionalChain(ops) { + let lastAccessLHS, value = ops[0], i = 1; + for (; i < ops.length; ) { + let op = ops[i], fn = ops[i + 1]; + if (i += 2, (op === "optionalAccess" || op === "optionalCall") && value == null) + return; + op === "access" || op === "optionalAccess" ? (lastAccessLHS = value, value = fn(value)) : (op === "call" || op === "optionalCall") && (value = fn((...args) => value.call(lastAccessLHS, ...args)), lastAccessLHS = void 0); + } + return value; + } + exports._optionalChain = _optionalChain; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_optionalChainDelete.js +var require_optionalChainDelete = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_optionalChainDelete.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var _optionalChain = require_optionalChain(); + function _optionalChainDelete(ops) { + let result = _optionalChain._optionalChain(ops); + return result ?? !0; + } + exports._optionalChainDelete = _optionalChainDelete; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/propagationContext.js +var require_propagationContext = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/propagationContext.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var misc = require_misc(); + function generatePropagationContext() { + return { + traceId: misc.uuid4(), + spanId: misc.uuid4().substring(16) + }; + } + exports.generatePropagationContext = generatePropagationContext; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/vendor/escapeStringForRegex.js +var require_escapeStringForRegex = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/vendor/escapeStringForRegex.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function escapeStringForRegex(regexString) { + return regexString.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); + } + exports.escapeStringForRegex = escapeStringForRegex; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/vendor/supportsHistory.js +var require_supportsHistory = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/vendor/supportsHistory.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var worldwide = require_worldwide(), WINDOW = worldwide.GLOBAL_OBJ; + function supportsHistory() { + let chromeVar = WINDOW.chrome, isChromePackagedApp = chromeVar && chromeVar.app && chromeVar.app.runtime, hasHistoryApi = "history" in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState; + return !isChromePackagedApp && hasHistoryApi; + } + exports.supportsHistory = supportsHistory; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/index.js +var require_cjs = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var aggregateErrors = require_aggregate_errors(), array = require_array(), browser = require_browser(), dsn = require_dsn(), error = require_error(), worldwide = require_worldwide(), console2 = require_console(), fetch2 = require_fetch(), globalError = require_globalError(), globalUnhandledRejection = require_globalUnhandledRejection(), handlers = require_handlers(), is = require_is(), isBrowser = require_isBrowser(), logger = require_logger(), memo = require_memo(), misc = require_misc(), node = require_node(), normalize = require_normalize(), object = require_object(), path = require_path(), promisebuffer = require_promisebuffer(), requestdata = require_requestdata(), severity = require_severity(), stacktrace = require_stacktrace(), nodeStackTrace = require_node_stack_trace(), string = require_string(), supports = require_supports(), syncpromise = require_syncpromise(), time = require_time(), tracing = require_tracing(), env = require_env(), envelope = require_envelope(), clientreport = require_clientreport(), ratelimit = require_ratelimit(), baggage = require_baggage(), url = require_url(), cache = require_cache(), eventbuilder = require_eventbuilder(), anr = require_anr(), lru = require_lru(), _asyncNullishCoalesce = require_asyncNullishCoalesce(), _asyncOptionalChain = require_asyncOptionalChain(), _asyncOptionalChainDelete = require_asyncOptionalChainDelete(), _nullishCoalesce = require_nullishCoalesce(), _optionalChain = require_optionalChain(), _optionalChainDelete = require_optionalChainDelete(), propagationContext = require_propagationContext(), version = require_version(), escapeStringForRegex = require_escapeStringForRegex(), supportsHistory = require_supportsHistory(); + exports.applyAggregateErrorsToEvent = aggregateErrors.applyAggregateErrorsToEvent; + exports.flatten = array.flatten; + exports.getComponentName = browser.getComponentName; + exports.getDomElement = browser.getDomElement; + exports.getLocationHref = browser.getLocationHref; + exports.htmlTreeAsString = browser.htmlTreeAsString; + exports.dsnFromString = dsn.dsnFromString; + exports.dsnToString = dsn.dsnToString; + exports.makeDsn = dsn.makeDsn; + exports.SentryError = error.SentryError; + exports.GLOBAL_OBJ = worldwide.GLOBAL_OBJ; + exports.getGlobalSingleton = worldwide.getGlobalSingleton; + exports.addConsoleInstrumentationHandler = console2.addConsoleInstrumentationHandler; + exports.addFetchInstrumentationHandler = fetch2.addFetchInstrumentationHandler; + exports.addGlobalErrorInstrumentationHandler = globalError.addGlobalErrorInstrumentationHandler; + exports.addGlobalUnhandledRejectionInstrumentationHandler = globalUnhandledRejection.addGlobalUnhandledRejectionInstrumentationHandler; + exports.addHandler = handlers.addHandler; + exports.maybeInstrument = handlers.maybeInstrument; + exports.resetInstrumentationHandlers = handlers.resetInstrumentationHandlers; + exports.triggerHandlers = handlers.triggerHandlers; + exports.isDOMError = is.isDOMError; + exports.isDOMException = is.isDOMException; + exports.isElement = is.isElement; + exports.isError = is.isError; + exports.isErrorEvent = is.isErrorEvent; + exports.isEvent = is.isEvent; + exports.isInstanceOf = is.isInstanceOf; + exports.isParameterizedString = is.isParameterizedString; + exports.isPlainObject = is.isPlainObject; + exports.isPrimitive = is.isPrimitive; + exports.isRegExp = is.isRegExp; + exports.isString = is.isString; + exports.isSyntheticEvent = is.isSyntheticEvent; + exports.isThenable = is.isThenable; + exports.isVueViewModel = is.isVueViewModel; + exports.isBrowser = isBrowser.isBrowser; + exports.CONSOLE_LEVELS = logger.CONSOLE_LEVELS; + exports.consoleSandbox = logger.consoleSandbox; + exports.logger = logger.logger; + exports.originalConsoleMethods = logger.originalConsoleMethods; + exports.memoBuilder = memo.memoBuilder; + exports.addContextToFrame = misc.addContextToFrame; + exports.addExceptionMechanism = misc.addExceptionMechanism; + exports.addExceptionTypeValue = misc.addExceptionTypeValue; + exports.arrayify = misc.arrayify; + exports.checkOrSetAlreadyCaught = misc.checkOrSetAlreadyCaught; + exports.getEventDescription = misc.getEventDescription; + exports.parseSemver = misc.parseSemver; + exports.uuid4 = misc.uuid4; + exports.dynamicRequire = node.dynamicRequire; + exports.isNodeEnv = node.isNodeEnv; + exports.loadModule = node.loadModule; + exports.normalize = normalize.normalize; + exports.normalizeToSize = normalize.normalizeToSize; + exports.normalizeUrlToBase = normalize.normalizeUrlToBase; + exports.addNonEnumerableProperty = object.addNonEnumerableProperty; + exports.convertToPlainObject = object.convertToPlainObject; + exports.dropUndefinedKeys = object.dropUndefinedKeys; + exports.extractExceptionKeysForMessage = object.extractExceptionKeysForMessage; + exports.fill = object.fill; + exports.getOriginalFunction = object.getOriginalFunction; + exports.markFunctionWrapped = object.markFunctionWrapped; + exports.objectify = object.objectify; + exports.urlEncode = object.urlEncode; + exports.basename = path.basename; + exports.dirname = path.dirname; + exports.isAbsolute = path.isAbsolute; + exports.join = path.join; + exports.normalizePath = path.normalizePath; + exports.relative = path.relative; + exports.resolve = path.resolve; + exports.makePromiseBuffer = promisebuffer.makePromiseBuffer; + exports.DEFAULT_USER_INCLUDES = requestdata.DEFAULT_USER_INCLUDES; + exports.addRequestDataToEvent = requestdata.addRequestDataToEvent; + exports.extractPathForTransaction = requestdata.extractPathForTransaction; + exports.extractRequestData = requestdata.extractRequestData; + exports.winterCGHeadersToDict = requestdata.winterCGHeadersToDict; + exports.winterCGRequestToRequestData = requestdata.winterCGRequestToRequestData; + exports.severityLevelFromString = severity.severityLevelFromString; + exports.validSeverityLevels = severity.validSeverityLevels; + exports.UNKNOWN_FUNCTION = stacktrace.UNKNOWN_FUNCTION; + exports.createStackParser = stacktrace.createStackParser; + exports.getFramesFromEvent = stacktrace.getFramesFromEvent; + exports.getFunctionName = stacktrace.getFunctionName; + exports.stackParserFromStackParserOptions = stacktrace.stackParserFromStackParserOptions; + exports.stripSentryFramesAndReverse = stacktrace.stripSentryFramesAndReverse; + exports.filenameIsInApp = nodeStackTrace.filenameIsInApp; + exports.node = nodeStackTrace.node; + exports.nodeStackLineParser = nodeStackTrace.nodeStackLineParser; + exports.isMatchingPattern = string.isMatchingPattern; + exports.safeJoin = string.safeJoin; + exports.snipLine = string.snipLine; + exports.stringMatchesSomePattern = string.stringMatchesSomePattern; + exports.truncate = string.truncate; + exports.isNativeFunction = supports.isNativeFunction; + exports.supportsDOMError = supports.supportsDOMError; + exports.supportsDOMException = supports.supportsDOMException; + exports.supportsErrorEvent = supports.supportsErrorEvent; + exports.supportsFetch = supports.supportsFetch; + exports.supportsNativeFetch = supports.supportsNativeFetch; + exports.supportsReferrerPolicy = supports.supportsReferrerPolicy; + exports.supportsReportingObserver = supports.supportsReportingObserver; + exports.SyncPromise = syncpromise.SyncPromise; + exports.rejectedSyncPromise = syncpromise.rejectedSyncPromise; + exports.resolvedSyncPromise = syncpromise.resolvedSyncPromise; + Object.defineProperty(exports, "_browserPerformanceTimeOriginMode", { + enumerable: !0, + get: () => time._browserPerformanceTimeOriginMode + }); + exports.browserPerformanceTimeOrigin = time.browserPerformanceTimeOrigin; + exports.dateTimestampInSeconds = time.dateTimestampInSeconds; + exports.timestampInSeconds = time.timestampInSeconds; + exports.TRACEPARENT_REGEXP = tracing.TRACEPARENT_REGEXP; + exports.extractTraceparentData = tracing.extractTraceparentData; + exports.generateSentryTraceHeader = tracing.generateSentryTraceHeader; + exports.propagationContextFromHeaders = tracing.propagationContextFromHeaders; + exports.getSDKSource = env.getSDKSource; + exports.isBrowserBundle = env.isBrowserBundle; + exports.addItemToEnvelope = envelope.addItemToEnvelope; + exports.createAttachmentEnvelopeItem = envelope.createAttachmentEnvelopeItem; + exports.createEnvelope = envelope.createEnvelope; + exports.createEventEnvelopeHeaders = envelope.createEventEnvelopeHeaders; + exports.createSpanEnvelopeItem = envelope.createSpanEnvelopeItem; + exports.envelopeContainsItemType = envelope.envelopeContainsItemType; + exports.envelopeItemTypeToDataCategory = envelope.envelopeItemTypeToDataCategory; + exports.forEachEnvelopeItem = envelope.forEachEnvelopeItem; + exports.getSdkMetadataForEnvelopeHeader = envelope.getSdkMetadataForEnvelopeHeader; + exports.parseEnvelope = envelope.parseEnvelope; + exports.serializeEnvelope = envelope.serializeEnvelope; + exports.createClientReportEnvelope = clientreport.createClientReportEnvelope; + exports.DEFAULT_RETRY_AFTER = ratelimit.DEFAULT_RETRY_AFTER; + exports.disabledUntil = ratelimit.disabledUntil; + exports.isRateLimited = ratelimit.isRateLimited; + exports.parseRetryAfterHeader = ratelimit.parseRetryAfterHeader; + exports.updateRateLimits = ratelimit.updateRateLimits; + exports.BAGGAGE_HEADER_NAME = baggage.BAGGAGE_HEADER_NAME; + exports.MAX_BAGGAGE_STRING_LENGTH = baggage.MAX_BAGGAGE_STRING_LENGTH; + exports.SENTRY_BAGGAGE_KEY_PREFIX = baggage.SENTRY_BAGGAGE_KEY_PREFIX; + exports.SENTRY_BAGGAGE_KEY_PREFIX_REGEX = baggage.SENTRY_BAGGAGE_KEY_PREFIX_REGEX; + exports.baggageHeaderToDynamicSamplingContext = baggage.baggageHeaderToDynamicSamplingContext; + exports.dynamicSamplingContextToSentryBaggageHeader = baggage.dynamicSamplingContextToSentryBaggageHeader; + exports.parseBaggageHeader = baggage.parseBaggageHeader; + exports.getNumberOfUrlSegments = url.getNumberOfUrlSegments; + exports.getSanitizedUrlString = url.getSanitizedUrlString; + exports.parseUrl = url.parseUrl; + exports.stripUrlQueryAndFragment = url.stripUrlQueryAndFragment; + exports.makeFifoCache = cache.makeFifoCache; + exports.eventFromMessage = eventbuilder.eventFromMessage; + exports.eventFromUnknownInput = eventbuilder.eventFromUnknownInput; + exports.exceptionFromError = eventbuilder.exceptionFromError; + exports.parseStackFrames = eventbuilder.parseStackFrames; + exports.callFrameToStackFrame = anr.callFrameToStackFrame; + exports.watchdogTimer = anr.watchdogTimer; + exports.LRUMap = lru.LRUMap; + exports._asyncNullishCoalesce = _asyncNullishCoalesce._asyncNullishCoalesce; + exports._asyncOptionalChain = _asyncOptionalChain._asyncOptionalChain; + exports._asyncOptionalChainDelete = _asyncOptionalChainDelete._asyncOptionalChainDelete; + exports._nullishCoalesce = _nullishCoalesce._nullishCoalesce; + exports._optionalChain = _optionalChain._optionalChain; + exports._optionalChainDelete = _optionalChainDelete._optionalChainDelete; + exports.generatePropagationContext = propagationContext.generatePropagationContext; + exports.SDK_VERSION = version.SDK_VERSION; + exports.escapeStringForRegex = escapeStringForRegex.escapeStringForRegex; + exports.supportsHistory = supportsHistory.supportsHistory; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/debug-build.js +var require_debug_build2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/debug-build.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var DEBUG_BUILD = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__; + exports.DEBUG_BUILD = DEBUG_BUILD; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/carrier.js +var require_carrier = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/carrier.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function getMainCarrier() { + return getSentryCarrier(utils.GLOBAL_OBJ), utils.GLOBAL_OBJ; + } + function getSentryCarrier(carrier) { + let __SENTRY__ = carrier.__SENTRY__ = carrier.__SENTRY__ || {}; + return __SENTRY__.version = __SENTRY__.version || utils.SDK_VERSION, __SENTRY__[utils.SDK_VERSION] = __SENTRY__[utils.SDK_VERSION] || {}; + } + exports.getMainCarrier = getMainCarrier; + exports.getSentryCarrier = getSentryCarrier; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/session.js +var require_session = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/session.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function makeSession(context) { + let startingTime = utils.timestampInSeconds(), session = { + sid: utils.uuid4(), + init: !0, + timestamp: startingTime, + started: startingTime, + duration: 0, + status: "ok", + errors: 0, + ignoreDuration: !1, + toJSON: () => sessionToJSON(session) + }; + return context && updateSession(session, context), session; + } + function updateSession(session, context = {}) { + if (context.user && (!session.ipAddress && context.user.ip_address && (session.ipAddress = context.user.ip_address), !session.did && !context.did && (session.did = context.user.id || context.user.email || context.user.username)), session.timestamp = context.timestamp || utils.timestampInSeconds(), context.abnormal_mechanism && (session.abnormal_mechanism = context.abnormal_mechanism), context.ignoreDuration && (session.ignoreDuration = context.ignoreDuration), context.sid && (session.sid = context.sid.length === 32 ? context.sid : utils.uuid4()), context.init !== void 0 && (session.init = context.init), !session.did && context.did && (session.did = `${context.did}`), typeof context.started == "number" && (session.started = context.started), session.ignoreDuration) + session.duration = void 0; + else if (typeof context.duration == "number") + session.duration = context.duration; + else { + let duration = session.timestamp - session.started; + session.duration = duration >= 0 ? duration : 0; + } + context.release && (session.release = context.release), context.environment && (session.environment = context.environment), !session.ipAddress && context.ipAddress && (session.ipAddress = context.ipAddress), !session.userAgent && context.userAgent && (session.userAgent = context.userAgent), typeof context.errors == "number" && (session.errors = context.errors), context.status && (session.status = context.status); + } + function closeSession(session, status) { + let context = {}; + status ? context = { status } : session.status === "ok" && (context = { status: "exited" }), updateSession(session, context); + } + function sessionToJSON(session) { + return utils.dropUndefinedKeys({ + sid: `${session.sid}`, + init: session.init, + // Make sure that sec is converted to ms for date constructor + started: new Date(session.started * 1e3).toISOString(), + timestamp: new Date(session.timestamp * 1e3).toISOString(), + status: session.status, + errors: session.errors, + did: typeof session.did == "number" || typeof session.did == "string" ? `${session.did}` : void 0, + duration: session.duration, + abnormal_mechanism: session.abnormal_mechanism, + attrs: { + release: session.release, + environment: session.environment, + ip_address: session.ipAddress, + user_agent: session.userAgent + } + }); + } + exports.closeSession = closeSession; + exports.makeSession = makeSession; + exports.updateSession = updateSession; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/spanOnScope.js +var require_spanOnScope = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/spanOnScope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), SCOPE_SPAN_FIELD = "_sentrySpan"; + function _setSpanForScope(scope, span) { + span ? utils.addNonEnumerableProperty(scope, SCOPE_SPAN_FIELD, span) : delete scope[SCOPE_SPAN_FIELD]; + } + function _getSpanForScope(scope) { + return scope[SCOPE_SPAN_FIELD]; + } + exports._getSpanForScope = _getSpanForScope; + exports._setSpanForScope = _setSpanForScope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/scope.js +var require_scope = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/scope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), session = require_session(), spanOnScope = require_spanOnScope(), DEFAULT_MAX_BREADCRUMBS = 100, ScopeClass = class _ScopeClass { + /** Flag if notifying is happening. */ + /** Callback for client to receive scope changes. */ + /** Callback list that will be called during event processing. */ + /** Array of breadcrumbs. */ + /** User */ + /** Tags */ + /** Extra */ + /** Contexts */ + /** Attachments */ + /** Propagation Context for distributed tracing */ + /** + * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get + * sent to Sentry + */ + /** Fingerprint */ + /** Severity */ + /** + * Transaction Name + * + * IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects. + * It's purpose is to assign a transaction to the scope that's added to non-transaction events. + */ + /** Session */ + /** Request Mode Session Status */ + /** The client on this scope */ + /** Contains the last event id of a captured event. */ + // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method. + constructor() { + this._notifyingListeners = !1, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = utils.generatePropagationContext(); + } + /** + * @inheritDoc + */ + clone() { + let newScope = new _ScopeClass(); + return newScope._breadcrumbs = [...this._breadcrumbs], newScope._tags = { ...this._tags }, newScope._extra = { ...this._extra }, newScope._contexts = { ...this._contexts }, newScope._user = this._user, newScope._level = this._level, newScope._session = this._session, newScope._transactionName = this._transactionName, newScope._fingerprint = this._fingerprint, newScope._eventProcessors = [...this._eventProcessors], newScope._requestSession = this._requestSession, newScope._attachments = [...this._attachments], newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, newScope._propagationContext = { ...this._propagationContext }, newScope._client = this._client, newScope._lastEventId = this._lastEventId, spanOnScope._setSpanForScope(newScope, spanOnScope._getSpanForScope(this)), newScope; + } + /** + * @inheritDoc + */ + setClient(client) { + this._client = client; + } + /** + * @inheritDoc + */ + setLastEventId(lastEventId) { + this._lastEventId = lastEventId; + } + /** + * @inheritDoc + */ + getClient() { + return this._client; + } + /** + * @inheritDoc + */ + lastEventId() { + return this._lastEventId; + } + /** + * @inheritDoc + */ + addScopeListener(callback) { + this._scopeListeners.push(callback); + } + /** + * @inheritDoc + */ + addEventProcessor(callback) { + return this._eventProcessors.push(callback), this; + } + /** + * @inheritDoc + */ + setUser(user) { + return this._user = user || { + email: void 0, + id: void 0, + ip_address: void 0, + username: void 0 + }, this._session && session.updateSession(this._session, { user }), this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + getUser() { + return this._user; + } + /** + * @inheritDoc + */ + getRequestSession() { + return this._requestSession; + } + /** + * @inheritDoc + */ + setRequestSession(requestSession) { + return this._requestSession = requestSession, this; + } + /** + * @inheritDoc + */ + setTags(tags) { + return this._tags = { + ...this._tags, + ...tags + }, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setTag(key, value) { + return this._tags = { ...this._tags, [key]: value }, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setExtras(extras) { + return this._extra = { + ...this._extra, + ...extras + }, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setExtra(key, extra) { + return this._extra = { ...this._extra, [key]: extra }, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setFingerprint(fingerprint) { + return this._fingerprint = fingerprint, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setLevel(level) { + return this._level = level, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setTransactionName(name) { + return this._transactionName = name, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setContext(key, context) { + return context === null ? delete this._contexts[key] : this._contexts[key] = context, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setSession(session2) { + return session2 ? this._session = session2 : delete this._session, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + getSession() { + return this._session; + } + /** + * @inheritDoc + */ + update(captureContext) { + if (!captureContext) + return this; + let scopeToMerge = typeof captureContext == "function" ? captureContext(this) : captureContext, [scopeInstance, requestSession] = scopeToMerge instanceof Scope ? [scopeToMerge.getScopeData(), scopeToMerge.getRequestSession()] : utils.isPlainObject(scopeToMerge) ? [captureContext, captureContext.requestSession] : [], { tags, extra, user, contexts, level, fingerprint = [], propagationContext } = scopeInstance || {}; + return this._tags = { ...this._tags, ...tags }, this._extra = { ...this._extra, ...extra }, this._contexts = { ...this._contexts, ...contexts }, user && Object.keys(user).length && (this._user = user), level && (this._level = level), fingerprint.length && (this._fingerprint = fingerprint), propagationContext && (this._propagationContext = propagationContext), requestSession && (this._requestSession = requestSession), this; + } + /** + * @inheritDoc + */ + clear() { + return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._session = void 0, spanOnScope._setSpanForScope(this, void 0), this._attachments = [], this._propagationContext = utils.generatePropagationContext(), this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + addBreadcrumb(breadcrumb, maxBreadcrumbs) { + let maxCrumbs = typeof maxBreadcrumbs == "number" ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS; + if (maxCrumbs <= 0) + return this; + let mergedBreadcrumb = { + timestamp: utils.dateTimestampInSeconds(), + ...breadcrumb + }, breadcrumbs = this._breadcrumbs; + return breadcrumbs.push(mergedBreadcrumb), this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + getLastBreadcrumb() { + return this._breadcrumbs[this._breadcrumbs.length - 1]; + } + /** + * @inheritDoc + */ + clearBreadcrumbs() { + return this._breadcrumbs = [], this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + addAttachment(attachment) { + return this._attachments.push(attachment), this; + } + /** + * @inheritDoc + */ + clearAttachments() { + return this._attachments = [], this; + } + /** @inheritDoc */ + getScopeData() { + return { + breadcrumbs: this._breadcrumbs, + attachments: this._attachments, + contexts: this._contexts, + tags: this._tags, + extra: this._extra, + user: this._user, + level: this._level, + fingerprint: this._fingerprint || [], + eventProcessors: this._eventProcessors, + propagationContext: this._propagationContext, + sdkProcessingMetadata: this._sdkProcessingMetadata, + transactionName: this._transactionName, + span: spanOnScope._getSpanForScope(this) + }; + } + /** + * @inheritDoc + */ + setSDKProcessingMetadata(newData) { + return this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData }, this; + } + /** + * @inheritDoc + */ + setPropagationContext(context) { + return this._propagationContext = context, this; + } + /** + * @inheritDoc + */ + getPropagationContext() { + return this._propagationContext; + } + /** + * @inheritDoc + */ + captureException(exception, hint) { + let eventId = hint && hint.event_id ? hint.event_id : utils.uuid4(); + if (!this._client) + return utils.logger.warn("No client configured on scope - will not capture exception!"), eventId; + let syntheticException = new Error("Sentry syntheticException"); + return this._client.captureException( + exception, + { + originalException: exception, + syntheticException, + ...hint, + event_id: eventId + }, + this + ), eventId; + } + /** + * @inheritDoc + */ + captureMessage(message, level, hint) { + let eventId = hint && hint.event_id ? hint.event_id : utils.uuid4(); + if (!this._client) + return utils.logger.warn("No client configured on scope - will not capture message!"), eventId; + let syntheticException = new Error(message); + return this._client.captureMessage( + message, + level, + { + originalException: message, + syntheticException, + ...hint, + event_id: eventId + }, + this + ), eventId; + } + /** + * @inheritDoc + */ + captureEvent(event, hint) { + let eventId = hint && hint.event_id ? hint.event_id : utils.uuid4(); + return this._client ? (this._client.captureEvent(event, { ...hint, event_id: eventId }, this), eventId) : (utils.logger.warn("No client configured on scope - will not capture event!"), eventId); + } + /** + * This will be called on every set call. + */ + _notifyScopeListeners() { + this._notifyingListeners || (this._notifyingListeners = !0, this._scopeListeners.forEach((callback) => { + callback(this); + }), this._notifyingListeners = !1); + } + }, Scope = ScopeClass; + exports.Scope = Scope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/defaultScopes.js +var require_defaultScopes = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/defaultScopes.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), scope = require_scope(); + function getDefaultCurrentScope() { + return utils.getGlobalSingleton("defaultCurrentScope", () => new scope.Scope()); + } + function getDefaultIsolationScope() { + return utils.getGlobalSingleton("defaultIsolationScope", () => new scope.Scope()); + } + exports.getDefaultCurrentScope = getDefaultCurrentScope; + exports.getDefaultIsolationScope = getDefaultIsolationScope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/asyncContext/stackStrategy.js +var require_stackStrategy = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/asyncContext/stackStrategy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), defaultScopes = require_defaultScopes(), scope = require_scope(), carrier = require_carrier(), AsyncContextStack = class { + constructor(scope$1, isolationScope) { + let assignedScope; + scope$1 ? assignedScope = scope$1 : assignedScope = new scope.Scope(); + let assignedIsolationScope; + isolationScope ? assignedIsolationScope = isolationScope : assignedIsolationScope = new scope.Scope(), this._stack = [{ scope: assignedScope }], this._isolationScope = assignedIsolationScope; + } + /** + * Fork a scope for the stack. + */ + withScope(callback) { + let scope2 = this._pushScope(), maybePromiseResult; + try { + maybePromiseResult = callback(scope2); + } catch (e) { + throw this._popScope(), e; + } + return utils.isThenable(maybePromiseResult) ? maybePromiseResult.then( + (res) => (this._popScope(), res), + (e) => { + throw this._popScope(), e; + } + ) : (this._popScope(), maybePromiseResult); + } + /** + * Get the client of the stack. + */ + getClient() { + return this.getStackTop().client; + } + /** + * Returns the scope of the top stack. + */ + getScope() { + return this.getStackTop().scope; + } + /** + * Get the isolation scope for the stack. + */ + getIsolationScope() { + return this._isolationScope; + } + /** + * Returns the scope stack for domains or the process. + */ + getStack() { + return this._stack; + } + /** + * Returns the topmost scope layer in the order domain > local > process. + */ + getStackTop() { + return this._stack[this._stack.length - 1]; + } + /** + * Push a scope to the stack. + */ + _pushScope() { + let scope2 = this.getScope().clone(); + return this.getStack().push({ + client: this.getClient(), + scope: scope2 + }), scope2; + } + /** + * Pop a scope from the stack. + */ + _popScope() { + return this.getStack().length <= 1 ? !1 : !!this.getStack().pop(); + } + }; + function getAsyncContextStack() { + let registry = carrier.getMainCarrier(), sentry = carrier.getSentryCarrier(registry); + return sentry.stack = sentry.stack || new AsyncContextStack(defaultScopes.getDefaultCurrentScope(), defaultScopes.getDefaultIsolationScope()); + } + function withScope(callback) { + return getAsyncContextStack().withScope(callback); + } + function withSetScope(scope2, callback) { + let stack = getAsyncContextStack(); + return stack.withScope(() => (stack.getStackTop().scope = scope2, callback(scope2))); + } + function withIsolationScope(callback) { + return getAsyncContextStack().withScope(() => callback(getAsyncContextStack().getIsolationScope())); + } + function getStackAsyncContextStrategy() { + return { + withIsolationScope, + withScope, + withSetScope, + withSetIsolationScope: (_isolationScope, callback) => withIsolationScope(callback), + getCurrentScope: () => getAsyncContextStack().getScope(), + getIsolationScope: () => getAsyncContextStack().getIsolationScope() + }; + } + exports.AsyncContextStack = AsyncContextStack; + exports.getStackAsyncContextStrategy = getStackAsyncContextStrategy; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/asyncContext/index.js +var require_asyncContext = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/asyncContext/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var carrier = require_carrier(), stackStrategy = require_stackStrategy(); + function setAsyncContextStrategy(strategy) { + let registry = carrier.getMainCarrier(), sentry = carrier.getSentryCarrier(registry); + sentry.acs = strategy; + } + function getAsyncContextStrategy(carrier$1) { + let sentry = carrier.getSentryCarrier(carrier$1); + return sentry.acs ? sentry.acs : stackStrategy.getStackAsyncContextStrategy(); + } + exports.getAsyncContextStrategy = getAsyncContextStrategy; + exports.setAsyncContextStrategy = setAsyncContextStrategy; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/currentScopes.js +var require_currentScopes = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/currentScopes.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), index = require_asyncContext(), carrier = require_carrier(), scope = require_scope(); + function getCurrentScope() { + let carrier$1 = carrier.getMainCarrier(); + return index.getAsyncContextStrategy(carrier$1).getCurrentScope(); + } + function getIsolationScope() { + let carrier$1 = carrier.getMainCarrier(); + return index.getAsyncContextStrategy(carrier$1).getIsolationScope(); + } + function getGlobalScope() { + return utils.getGlobalSingleton("globalScope", () => new scope.Scope()); + } + function withScope(...rest) { + let carrier$1 = carrier.getMainCarrier(), acs = index.getAsyncContextStrategy(carrier$1); + if (rest.length === 2) { + let [scope2, callback] = rest; + return scope2 ? acs.withSetScope(scope2, callback) : acs.withScope(callback); + } + return acs.withScope(rest[0]); + } + function withIsolationScope(...rest) { + let carrier$1 = carrier.getMainCarrier(), acs = index.getAsyncContextStrategy(carrier$1); + if (rest.length === 2) { + let [isolationScope, callback] = rest; + return isolationScope ? acs.withSetIsolationScope(isolationScope, callback) : acs.withIsolationScope(callback); + } + return acs.withIsolationScope(rest[0]); + } + function getClient() { + return getCurrentScope().getClient(); + } + exports.getClient = getClient; + exports.getCurrentScope = getCurrentScope; + exports.getGlobalScope = getGlobalScope; + exports.getIsolationScope = getIsolationScope; + exports.withIsolationScope = withIsolationScope; + exports.withScope = withScope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/metric-summary.js +var require_metric_summary = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/metric-summary.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), METRICS_SPAN_FIELD = "_sentryMetrics"; + function getMetricSummaryJsonForSpan(span) { + let storage = span[METRICS_SPAN_FIELD]; + if (!storage) + return; + let output = {}; + for (let [, [exportKey, summary]] of storage) + output[exportKey] || (output[exportKey] = []), output[exportKey].push(utils.dropUndefinedKeys(summary)); + return output; + } + function updateMetricSummaryOnSpan(span, metricType, sanitizedName, value, unit, tags, bucketKey) { + let storage = span[METRICS_SPAN_FIELD] || (span[METRICS_SPAN_FIELD] = /* @__PURE__ */ new Map()), exportKey = `${metricType}:${sanitizedName}@${unit}`, bucketItem = storage.get(bucketKey); + if (bucketItem) { + let [, summary] = bucketItem; + storage.set(bucketKey, [ + exportKey, + { + min: Math.min(summary.min, value), + max: Math.max(summary.max, value), + count: summary.count += 1, + sum: summary.sum += value, + tags: summary.tags + } + ]); + } else + storage.set(bucketKey, [ + exportKey, + { + min: value, + max: value, + count: 1, + sum: value, + tags + } + ]); + } + exports.getMetricSummaryJsonForSpan = getMetricSummaryJsonForSpan; + exports.updateMetricSummaryOnSpan = updateMetricSummaryOnSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/semanticAttributes.js +var require_semanticAttributes = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/semanticAttributes.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = "sentry.source", SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = "sentry.sample_rate", SEMANTIC_ATTRIBUTE_SENTRY_OP = "sentry.op", SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = "sentry.origin", SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = "sentry.idle_span_finish_reason", SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = "sentry.measurement_unit", SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = "sentry.measurement_value", SEMANTIC_ATTRIBUTE_PROFILE_ID = "sentry.profile_id", SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = "sentry.exclusive_time", SEMANTIC_ATTRIBUTE_CACHE_HIT = "cache.hit", SEMANTIC_ATTRIBUTE_CACHE_KEY = "cache.key", SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = "cache.item_size"; + exports.SEMANTIC_ATTRIBUTE_CACHE_HIT = SEMANTIC_ATTRIBUTE_CACHE_HIT; + exports.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE; + exports.SEMANTIC_ATTRIBUTE_CACHE_KEY = SEMANTIC_ATTRIBUTE_CACHE_KEY; + exports.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME; + exports.SEMANTIC_ATTRIBUTE_PROFILE_ID = SEMANTIC_ATTRIBUTE_PROFILE_ID; + exports.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON; + exports.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT; + exports.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE; + exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = SEMANTIC_ATTRIBUTE_SENTRY_OP; + exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN; + exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE; + exports.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = SEMANTIC_ATTRIBUTE_SENTRY_SOURCE; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/spanstatus.js +var require_spanstatus = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/spanstatus.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var SPAN_STATUS_UNSET = 0, SPAN_STATUS_OK = 1, SPAN_STATUS_ERROR = 2; + function getSpanStatusFromHttpCode(httpStatus) { + if (httpStatus < 400 && httpStatus >= 100) + return { code: SPAN_STATUS_OK }; + if (httpStatus >= 400 && httpStatus < 500) + switch (httpStatus) { + case 401: + return { code: SPAN_STATUS_ERROR, message: "unauthenticated" }; + case 403: + return { code: SPAN_STATUS_ERROR, message: "permission_denied" }; + case 404: + return { code: SPAN_STATUS_ERROR, message: "not_found" }; + case 409: + return { code: SPAN_STATUS_ERROR, message: "already_exists" }; + case 413: + return { code: SPAN_STATUS_ERROR, message: "failed_precondition" }; + case 429: + return { code: SPAN_STATUS_ERROR, message: "resource_exhausted" }; + case 499: + return { code: SPAN_STATUS_ERROR, message: "cancelled" }; + default: + return { code: SPAN_STATUS_ERROR, message: "invalid_argument" }; + } + if (httpStatus >= 500 && httpStatus < 600) + switch (httpStatus) { + case 501: + return { code: SPAN_STATUS_ERROR, message: "unimplemented" }; + case 503: + return { code: SPAN_STATUS_ERROR, message: "unavailable" }; + case 504: + return { code: SPAN_STATUS_ERROR, message: "deadline_exceeded" }; + default: + return { code: SPAN_STATUS_ERROR, message: "internal_error" }; + } + return { code: SPAN_STATUS_ERROR, message: "unknown_error" }; + } + function setHttpStatus(span, httpStatus) { + span.setAttribute("http.response.status_code", httpStatus); + let spanStatus = getSpanStatusFromHttpCode(httpStatus); + spanStatus.message !== "unknown_error" && span.setStatus(spanStatus); + } + exports.SPAN_STATUS_ERROR = SPAN_STATUS_ERROR; + exports.SPAN_STATUS_OK = SPAN_STATUS_OK; + exports.SPAN_STATUS_UNSET = SPAN_STATUS_UNSET; + exports.getSpanStatusFromHttpCode = getSpanStatusFromHttpCode; + exports.setHttpStatus = setHttpStatus; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/spanUtils.js +var require_spanUtils = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/spanUtils.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), index = require_asyncContext(), carrier = require_carrier(), currentScopes = require_currentScopes(), metricSummary = require_metric_summary(), semanticAttributes = require_semanticAttributes(), spanstatus = require_spanstatus(), spanOnScope = require_spanOnScope(), TRACE_FLAG_NONE = 0, TRACE_FLAG_SAMPLED = 1; + function spanToTransactionTraceContext(span) { + let { spanId: span_id, traceId: trace_id } = span.spanContext(), { data, op, parent_span_id, status, origin } = spanToJSON(span); + return utils.dropUndefinedKeys({ + parent_span_id, + span_id, + trace_id, + data, + op, + status, + origin + }); + } + function spanToTraceContext(span) { + let { spanId: span_id, traceId: trace_id } = span.spanContext(), { parent_span_id } = spanToJSON(span); + return utils.dropUndefinedKeys({ parent_span_id, span_id, trace_id }); + } + function spanToTraceHeader(span) { + let { traceId, spanId } = span.spanContext(), sampled = spanIsSampled(span); + return utils.generateSentryTraceHeader(traceId, spanId, sampled); + } + function spanTimeInputToSeconds(input) { + return typeof input == "number" ? ensureTimestampInSeconds(input) : Array.isArray(input) ? input[0] + input[1] / 1e9 : input instanceof Date ? ensureTimestampInSeconds(input.getTime()) : utils.timestampInSeconds(); + } + function ensureTimestampInSeconds(timestamp) { + return timestamp > 9999999999 ? timestamp / 1e3 : timestamp; + } + function spanToJSON(span) { + if (spanIsSentrySpan(span)) + return span.getSpanJSON(); + try { + let { spanId: span_id, traceId: trace_id } = span.spanContext(); + if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) { + let { attributes, startTime, name, endTime, parentSpanId, status } = span; + return utils.dropUndefinedKeys({ + span_id, + trace_id, + data: attributes, + description: name, + parent_span_id: parentSpanId, + start_timestamp: spanTimeInputToSeconds(startTime), + // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time + timestamp: spanTimeInputToSeconds(endTime) || void 0, + status: getStatusMessage(status), + op: attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP], + origin: attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN], + _metrics_summary: metricSummary.getMetricSummaryJsonForSpan(span) + }); + } + return { + span_id, + trace_id + }; + } catch { + return {}; + } + } + function spanIsOpenTelemetrySdkTraceBaseSpan(span) { + let castSpan = span; + return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status; + } + function spanIsSentrySpan(span) { + return typeof span.getSpanJSON == "function"; + } + function spanIsSampled(span) { + let { traceFlags } = span.spanContext(); + return traceFlags === TRACE_FLAG_SAMPLED; + } + function getStatusMessage(status) { + if (!(!status || status.code === spanstatus.SPAN_STATUS_UNSET)) + return status.code === spanstatus.SPAN_STATUS_OK ? "ok" : status.message || "unknown_error"; + } + var CHILD_SPANS_FIELD = "_sentryChildSpans", ROOT_SPAN_FIELD = "_sentryRootSpan"; + function addChildSpanToSpan(span, childSpan) { + let rootSpan = span[ROOT_SPAN_FIELD] || span; + utils.addNonEnumerableProperty(childSpan, ROOT_SPAN_FIELD, rootSpan), span[CHILD_SPANS_FIELD] ? span[CHILD_SPANS_FIELD].add(childSpan) : utils.addNonEnumerableProperty(span, CHILD_SPANS_FIELD, /* @__PURE__ */ new Set([childSpan])); + } + function removeChildSpanFromSpan(span, childSpan) { + span[CHILD_SPANS_FIELD] && span[CHILD_SPANS_FIELD].delete(childSpan); + } + function getSpanDescendants(span) { + let resultSet = /* @__PURE__ */ new Set(); + function addSpanChildren(span2) { + if (!resultSet.has(span2) && spanIsSampled(span2)) { + resultSet.add(span2); + let childSpans = span2[CHILD_SPANS_FIELD] ? Array.from(span2[CHILD_SPANS_FIELD]) : []; + for (let childSpan of childSpans) + addSpanChildren(childSpan); + } + } + return addSpanChildren(span), Array.from(resultSet); + } + function getRootSpan(span) { + return span[ROOT_SPAN_FIELD] || span; + } + function getActiveSpan() { + let carrier$1 = carrier.getMainCarrier(), acs = index.getAsyncContextStrategy(carrier$1); + return acs.getActiveSpan ? acs.getActiveSpan() : spanOnScope._getSpanForScope(currentScopes.getCurrentScope()); + } + function updateMetricSummaryOnActiveSpan(metricType, sanitizedName, value, unit, tags, bucketKey) { + let span = getActiveSpan(); + span && metricSummary.updateMetricSummaryOnSpan(span, metricType, sanitizedName, value, unit, tags, bucketKey); + } + exports.TRACE_FLAG_NONE = TRACE_FLAG_NONE; + exports.TRACE_FLAG_SAMPLED = TRACE_FLAG_SAMPLED; + exports.addChildSpanToSpan = addChildSpanToSpan; + exports.getActiveSpan = getActiveSpan; + exports.getRootSpan = getRootSpan; + exports.getSpanDescendants = getSpanDescendants; + exports.getStatusMessage = getStatusMessage; + exports.removeChildSpanFromSpan = removeChildSpanFromSpan; + exports.spanIsSampled = spanIsSampled; + exports.spanTimeInputToSeconds = spanTimeInputToSeconds; + exports.spanToJSON = spanToJSON; + exports.spanToTraceContext = spanToTraceContext; + exports.spanToTraceHeader = spanToTraceHeader; + exports.spanToTransactionTraceContext = spanToTransactionTraceContext; + exports.updateMetricSummaryOnActiveSpan = updateMetricSummaryOnActiveSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/errors.js +var require_errors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/errors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), spanUtils = require_spanUtils(), spanstatus = require_spanstatus(), errorsInstrumented = !1; + function registerSpanErrorInstrumentation() { + errorsInstrumented || (errorsInstrumented = !0, utils.addGlobalErrorInstrumentationHandler(errorCallback), utils.addGlobalUnhandledRejectionInstrumentationHandler(errorCallback)); + } + function errorCallback() { + let activeSpan = spanUtils.getActiveSpan(), rootSpan = activeSpan && spanUtils.getRootSpan(activeSpan); + if (rootSpan) { + let message = "internal_error"; + debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Root span: ${message} -> Global error occured`), rootSpan.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message }); + } + } + errorCallback.tag = "sentry_tracingErrorCallback"; + exports.registerSpanErrorInstrumentation = registerSpanErrorInstrumentation; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/utils.js +var require_utils = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/utils.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), SCOPE_ON_START_SPAN_FIELD = "_sentryScope", ISOLATION_SCOPE_ON_START_SPAN_FIELD = "_sentryIsolationScope"; + function setCapturedScopesOnSpan(span, scope, isolationScope) { + span && (utils.addNonEnumerableProperty(span, ISOLATION_SCOPE_ON_START_SPAN_FIELD, isolationScope), utils.addNonEnumerableProperty(span, SCOPE_ON_START_SPAN_FIELD, scope)); + } + function getCapturedScopesOnSpan(span) { + return { + scope: span[SCOPE_ON_START_SPAN_FIELD], + isolationScope: span[ISOLATION_SCOPE_ON_START_SPAN_FIELD] + }; + } + exports.stripUrlQueryAndFragment = utils.stripUrlQueryAndFragment; + exports.getCapturedScopesOnSpan = getCapturedScopesOnSpan; + exports.setCapturedScopesOnSpan = setCapturedScopesOnSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/hubextensions.js +var require_hubextensions = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/hubextensions.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var errors = require_errors(); + function addTracingExtensions() { + errors.registerSpanErrorInstrumentation(); + } + exports.addTracingExtensions = addTracingExtensions; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/hasTracingEnabled.js +var require_hasTracingEnabled = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/hasTracingEnabled.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var currentScopes = require_currentScopes(); + function hasTracingEnabled(maybeOptions) { + if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__) + return !1; + let options = maybeOptions || getClientOptions(); + return !!options && (options.enableTracing || "tracesSampleRate" in options || "tracesSampler" in options); + } + function getClientOptions() { + let client = currentScopes.getClient(); + return client && client.getOptions(); + } + exports.hasTracingEnabled = hasTracingEnabled; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sentryNonRecordingSpan.js +var require_sentryNonRecordingSpan = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sentryNonRecordingSpan.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), spanUtils = require_spanUtils(), SentryNonRecordingSpan = class { + constructor(spanContext = {}) { + this._traceId = spanContext.traceId || utils.uuid4(), this._spanId = spanContext.spanId || utils.uuid4().substring(16); + } + /** @inheritdoc */ + spanContext() { + return { + spanId: this._spanId, + traceId: this._traceId, + traceFlags: spanUtils.TRACE_FLAG_NONE + }; + } + /** @inheritdoc */ + // eslint-disable-next-line @typescript-eslint/no-empty-function + end(_timestamp) { + } + /** @inheritdoc */ + setAttribute(_key, _value) { + return this; + } + /** @inheritdoc */ + setAttributes(_values) { + return this; + } + /** @inheritdoc */ + setStatus(_status) { + return this; + } + /** @inheritdoc */ + updateName(_name) { + return this; + } + /** @inheritdoc */ + isRecording() { + return !1; + } + /** @inheritdoc */ + addEvent(_name, _attributesOrStartTime, _startTime) { + return this; + } + }; + exports.SentryNonRecordingSpan = SentryNonRecordingSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/handleCallbackErrors.js +var require_handleCallbackErrors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/handleCallbackErrors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function handleCallbackErrors(fn, onError, onFinally = () => { + }) { + let maybePromiseResult; + try { + maybePromiseResult = fn(); + } catch (e) { + throw onError(e), onFinally(), e; + } + return maybeHandlePromiseRejection(maybePromiseResult, onError, onFinally); + } + function maybeHandlePromiseRejection(value, onError, onFinally) { + return utils.isThenable(value) ? value.then( + (res) => (onFinally(), res), + (e) => { + throw onError(e), onFinally(), e; + } + ) : (onFinally(), value); + } + exports.handleCallbackErrors = handleCallbackErrors; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/constants.js +var require_constants = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/constants.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var DEFAULT_ENVIRONMENT = "production"; + exports.DEFAULT_ENVIRONMENT = DEFAULT_ENVIRONMENT; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/dynamicSamplingContext.js +var require_dynamicSamplingContext = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/dynamicSamplingContext.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), constants = require_constants(), currentScopes = require_currentScopes(), semanticAttributes = require_semanticAttributes(), spanUtils = require_spanUtils(), FROZEN_DSC_FIELD = "_frozenDsc"; + function freezeDscOnSpan(span, dsc) { + let spanWithMaybeDsc = span; + utils.addNonEnumerableProperty(spanWithMaybeDsc, FROZEN_DSC_FIELD, dsc); + } + function getDynamicSamplingContextFromClient(trace_id, client) { + let options = client.getOptions(), { publicKey: public_key } = client.getDsn() || {}, dsc = utils.dropUndefinedKeys({ + environment: options.environment || constants.DEFAULT_ENVIRONMENT, + release: options.release, + public_key, + trace_id + }); + return client.emit("createDsc", dsc), dsc; + } + function getDynamicSamplingContextFromSpan(span) { + let client = currentScopes.getClient(); + if (!client) + return {}; + let dsc = getDynamicSamplingContextFromClient(spanUtils.spanToJSON(span).trace_id || "", client), rootSpan = spanUtils.getRootSpan(span); + if (!rootSpan) + return dsc; + let frozenDsc = rootSpan[FROZEN_DSC_FIELD]; + if (frozenDsc) + return frozenDsc; + let jsonSpan = spanUtils.spanToJSON(rootSpan), attributes = jsonSpan.data || {}, maybeSampleRate = attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]; + maybeSampleRate != null && (dsc.sample_rate = `${maybeSampleRate}`); + let source = attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]; + return source && source !== "url" && (dsc.transaction = jsonSpan.description), dsc.sampled = String(spanUtils.spanIsSampled(rootSpan)), client.emit("createDsc", dsc), dsc; + } + function spanToBaggageHeader(span) { + let dsc = getDynamicSamplingContextFromSpan(span); + return utils.dynamicSamplingContextToSentryBaggageHeader(dsc); + } + exports.freezeDscOnSpan = freezeDscOnSpan; + exports.getDynamicSamplingContextFromClient = getDynamicSamplingContextFromClient; + exports.getDynamicSamplingContextFromSpan = getDynamicSamplingContextFromSpan; + exports.spanToBaggageHeader = spanToBaggageHeader; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/logSpans.js +var require_logSpans = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/logSpans.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), spanUtils = require_spanUtils(); + function logSpanStart(span) { + if (!debugBuild.DEBUG_BUILD) return; + let { description = "< unknown name >", op = "< unknown op >", parent_span_id: parentSpanId } = spanUtils.spanToJSON(span), { spanId } = span.spanContext(), sampled = spanUtils.spanIsSampled(span), rootSpan = spanUtils.getRootSpan(span), isRootSpan = rootSpan === span, header = `[Tracing] Starting ${sampled ? "sampled" : "unsampled"} ${isRootSpan ? "root " : ""}span`, infoParts = [`op: ${op}`, `name: ${description}`, `ID: ${spanId}`]; + if (parentSpanId && infoParts.push(`parent ID: ${parentSpanId}`), !isRootSpan) { + let { op: op2, description: description2 } = spanUtils.spanToJSON(rootSpan); + infoParts.push(`root ID: ${rootSpan.spanContext().spanId}`), op2 && infoParts.push(`root op: ${op2}`), description2 && infoParts.push(`root description: ${description2}`); + } + utils.logger.log(`${header} + ${infoParts.join(` + `)}`); + } + function logSpanEnd(span) { + if (!debugBuild.DEBUG_BUILD) return; + let { description = "< unknown name >", op = "< unknown op >" } = spanUtils.spanToJSON(span), { spanId } = span.spanContext(), isRootSpan = spanUtils.getRootSpan(span) === span, msg = `[Tracing] Finishing "${op}" ${isRootSpan ? "root " : ""}span "${description}" with ID ${spanId}`; + utils.logger.log(msg); + } + exports.logSpanEnd = logSpanEnd; + exports.logSpanStart = logSpanStart; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/parseSampleRate.js +var require_parseSampleRate = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/parseSampleRate.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(); + function parseSampleRate(sampleRate) { + if (typeof sampleRate == "boolean") + return Number(sampleRate); + let rate = typeof sampleRate == "string" ? parseFloat(sampleRate) : sampleRate; + if (typeof rate != "number" || isNaN(rate) || rate < 0 || rate > 1) { + debugBuild.DEBUG_BUILD && utils.logger.warn( + `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify( + sampleRate + )} of type ${JSON.stringify(typeof sampleRate)}.` + ); + return; + } + return rate; + } + exports.parseSampleRate = parseSampleRate; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sampling.js +var require_sampling = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sampling.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), hasTracingEnabled = require_hasTracingEnabled(), parseSampleRate = require_parseSampleRate(); + function sampleSpan(options, samplingContext) { + if (!hasTracingEnabled.hasTracingEnabled(options)) + return [!1]; + let sampleRate; + typeof options.tracesSampler == "function" ? sampleRate = options.tracesSampler(samplingContext) : samplingContext.parentSampled !== void 0 ? sampleRate = samplingContext.parentSampled : typeof options.tracesSampleRate < "u" ? sampleRate = options.tracesSampleRate : sampleRate = 1; + let parsedSampleRate = parseSampleRate.parseSampleRate(sampleRate); + return parsedSampleRate === void 0 ? (debugBuild.DEBUG_BUILD && utils.logger.warn("[Tracing] Discarding transaction because of invalid sample rate."), [!1]) : parsedSampleRate ? Math.random() < parsedSampleRate ? [!0, parsedSampleRate] : (debugBuild.DEBUG_BUILD && utils.logger.log( + `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number( + sampleRate + )})` + ), [!1, parsedSampleRate]) : (debugBuild.DEBUG_BUILD && utils.logger.log( + `[Tracing] Discarding transaction because ${typeof options.tracesSampler == "function" ? "tracesSampler returned 0 or false" : "a negative sampling decision was inherited or tracesSampleRate is set to 0"}` + ), [!1, parsedSampleRate]); + } + exports.sampleSpan = sampleSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/envelope.js +var require_envelope2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/envelope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), dynamicSamplingContext = require_dynamicSamplingContext(), spanUtils = require_spanUtils(); + function enhanceEventWithSdkInfo(event, sdkInfo) { + return sdkInfo && (event.sdk = event.sdk || {}, event.sdk.name = event.sdk.name || sdkInfo.name, event.sdk.version = event.sdk.version || sdkInfo.version, event.sdk.integrations = [...event.sdk.integrations || [], ...sdkInfo.integrations || []], event.sdk.packages = [...event.sdk.packages || [], ...sdkInfo.packages || []]), event; + } + function createSessionEnvelope(session, dsn, metadata, tunnel) { + let sdkInfo = utils.getSdkMetadataForEnvelopeHeader(metadata), envelopeHeaders = { + sent_at: (/* @__PURE__ */ new Date()).toISOString(), + ...sdkInfo && { sdk: sdkInfo }, + ...!!tunnel && dsn && { dsn: utils.dsnToString(dsn) } + }, envelopeItem = "aggregates" in session ? [{ type: "sessions" }, session] : [{ type: "session" }, session.toJSON()]; + return utils.createEnvelope(envelopeHeaders, [envelopeItem]); + } + function createEventEnvelope(event, dsn, metadata, tunnel) { + let sdkInfo = utils.getSdkMetadataForEnvelopeHeader(metadata), eventType = event.type && event.type !== "replay_event" ? event.type : "event"; + enhanceEventWithSdkInfo(event, metadata && metadata.sdk); + let envelopeHeaders = utils.createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn); + delete event.sdkProcessingMetadata; + let eventItem = [{ type: eventType }, event]; + return utils.createEnvelope(envelopeHeaders, [eventItem]); + } + function createSpanEnvelope(spans, client) { + function dscHasRequiredProps(dsc2) { + return !!dsc2.trace_id && !!dsc2.public_key; + } + let dsc = dynamicSamplingContext.getDynamicSamplingContextFromSpan(spans[0]), dsn = client && client.getDsn(), tunnel = client && client.getOptions().tunnel, headers = { + sent_at: (/* @__PURE__ */ new Date()).toISOString(), + ...dscHasRequiredProps(dsc) && { trace: dsc }, + ...!!tunnel && dsn && { dsn: utils.dsnToString(dsn) } + }, beforeSendSpan = client && client.getOptions().beforeSendSpan, convertToSpanJSON = beforeSendSpan ? (span) => beforeSendSpan(spanUtils.spanToJSON(span)) : (span) => spanUtils.spanToJSON(span), items = []; + for (let span of spans) { + let spanJson = convertToSpanJSON(span); + spanJson && items.push(utils.createSpanEnvelopeItem(spanJson)); + } + return utils.createEnvelope(headers, items); + } + exports.createEventEnvelope = createEventEnvelope; + exports.createSessionEnvelope = createSessionEnvelope; + exports.createSpanEnvelope = createSpanEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/measurement.js +var require_measurement = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/measurement.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var semanticAttributes = require_semanticAttributes(), spanUtils = require_spanUtils(); + function setMeasurement(name, value, unit) { + let activeSpan = spanUtils.getActiveSpan(), rootSpan = activeSpan && spanUtils.getRootSpan(activeSpan); + rootSpan && rootSpan.addEvent(name, { + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: value, + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: unit + }); + } + function timedEventsToMeasurements(events) { + if (!events || events.length === 0) + return; + let measurements = {}; + return events.forEach((event) => { + let attributes = event.attributes || {}, unit = attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT], value = attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]; + typeof unit == "string" && typeof value == "number" && (measurements[event.name] = { value, unit }); + }), measurements; + } + exports.setMeasurement = setMeasurement; + exports.timedEventsToMeasurements = timedEventsToMeasurements; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sentrySpan.js +var require_sentrySpan = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sentrySpan.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), envelope = require_envelope2(), metricSummary = require_metric_summary(), semanticAttributes = require_semanticAttributes(), spanUtils = require_spanUtils(), dynamicSamplingContext = require_dynamicSamplingContext(), logSpans = require_logSpans(), measurement = require_measurement(), utils$1 = require_utils(), MAX_SPAN_COUNT = 1e3, SentrySpan = class { + /** Epoch timestamp in seconds when the span started. */ + /** Epoch timestamp in seconds when the span ended. */ + /** Internal keeper of the status */ + /** The timed events added to this span. */ + /** if true, treat span as a standalone span (not part of a transaction) */ + /** + * You should never call the constructor manually, always use `Sentry.startSpan()` + * or other span methods. + * @internal + * @hideconstructor + * @hidden + */ + constructor(spanContext = {}) { + this._traceId = spanContext.traceId || utils.uuid4(), this._spanId = spanContext.spanId || utils.uuid4().substring(16), this._startTime = spanContext.startTimestamp || utils.timestampInSeconds(), this._attributes = {}, this.setAttributes({ + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "manual", + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op, + ...spanContext.attributes + }), this._name = spanContext.name, spanContext.parentSpanId && (this._parentSpanId = spanContext.parentSpanId), "sampled" in spanContext && (this._sampled = spanContext.sampled), spanContext.endTimestamp && (this._endTime = spanContext.endTimestamp), this._events = [], this._isStandaloneSpan = spanContext.isStandalone, this._endTime && this._onSpanEnded(); + } + /** @inheritdoc */ + spanContext() { + let { _spanId: spanId, _traceId: traceId, _sampled: sampled } = this; + return { + spanId, + traceId, + traceFlags: sampled ? spanUtils.TRACE_FLAG_SAMPLED : spanUtils.TRACE_FLAG_NONE + }; + } + /** @inheritdoc */ + setAttribute(key, value) { + value === void 0 ? delete this._attributes[key] : this._attributes[key] = value; + } + /** @inheritdoc */ + setAttributes(attributes) { + Object.keys(attributes).forEach((key) => this.setAttribute(key, attributes[key])); + } + /** + * This should generally not be used, + * but we need it for browser tracing where we want to adjust the start time afterwards. + * USE THIS WITH CAUTION! + * + * @hidden + * @internal + */ + updateStartTime(timeInput) { + this._startTime = spanUtils.spanTimeInputToSeconds(timeInput); + } + /** + * @inheritDoc + */ + setStatus(value) { + return this._status = value, this; + } + /** + * @inheritDoc + */ + updateName(name) { + return this._name = name, this; + } + /** @inheritdoc */ + end(endTimestamp) { + this._endTime || (this._endTime = spanUtils.spanTimeInputToSeconds(endTimestamp), logSpans.logSpanEnd(this), this._onSpanEnded()); + } + /** + * Get JSON representation of this span. + * + * @hidden + * @internal This method is purely for internal purposes and should not be used outside + * of SDK code. If you need to get a JSON representation of a span, + * use `spanToJSON(span)` instead. + */ + getSpanJSON() { + return utils.dropUndefinedKeys({ + data: this._attributes, + description: this._name, + op: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP], + parent_span_id: this._parentSpanId, + span_id: this._spanId, + start_timestamp: this._startTime, + status: spanUtils.getStatusMessage(this._status), + timestamp: this._endTime, + trace_id: this._traceId, + origin: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN], + _metrics_summary: metricSummary.getMetricSummaryJsonForSpan(this), + profile_id: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_PROFILE_ID], + exclusive_time: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME], + measurements: measurement.timedEventsToMeasurements(this._events), + is_segment: this._isStandaloneSpan && spanUtils.getRootSpan(this) === this || void 0, + segment_id: this._isStandaloneSpan ? spanUtils.getRootSpan(this).spanContext().spanId : void 0 + }); + } + /** @inheritdoc */ + isRecording() { + return !this._endTime && !!this._sampled; + } + /** + * @inheritdoc + */ + addEvent(name, attributesOrStartTime, startTime) { + debugBuild.DEBUG_BUILD && utils.logger.log("[Tracing] Adding an event to span:", name); + let time = isSpanTimeInput(attributesOrStartTime) ? attributesOrStartTime : startTime || utils.timestampInSeconds(), attributes = isSpanTimeInput(attributesOrStartTime) ? {} : attributesOrStartTime || {}, event = { + name, + time: spanUtils.spanTimeInputToSeconds(time), + attributes + }; + return this._events.push(event), this; + } + /** + * This method should generally not be used, + * but for now we need a way to publicly check if the `_isStandaloneSpan` flag is set. + * USE THIS WITH CAUTION! + * @internal + * @hidden + * @experimental + */ + isStandaloneSpan() { + return !!this._isStandaloneSpan; + } + /** Emit `spanEnd` when the span is ended. */ + _onSpanEnded() { + let client = currentScopes.getClient(); + if (client && client.emit("spanEnd", this), !(this._isStandaloneSpan || this === spanUtils.getRootSpan(this))) + return; + if (this._isStandaloneSpan) { + sendSpanEnvelope(envelope.createSpanEnvelope([this], client)); + return; + } + let transactionEvent = this._convertSpanToTransaction(); + transactionEvent && (utils$1.getCapturedScopesOnSpan(this).scope || currentScopes.getCurrentScope()).captureEvent(transactionEvent); + } + /** + * Finish the transaction & prepare the event to send to Sentry. + */ + _convertSpanToTransaction() { + if (!isFullFinishedSpan(spanUtils.spanToJSON(this))) + return; + this._name || (debugBuild.DEBUG_BUILD && utils.logger.warn("Transaction has no name, falling back to ``."), this._name = ""); + let { scope: capturedSpanScope, isolationScope: capturedSpanIsolationScope } = utils$1.getCapturedScopesOnSpan(this), client = (capturedSpanScope || currentScopes.getCurrentScope()).getClient() || currentScopes.getClient(); + if (this._sampled !== !0) { + debugBuild.DEBUG_BUILD && utils.logger.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."), client && client.recordDroppedEvent("sample_rate", "transaction"); + return; + } + let spans = spanUtils.getSpanDescendants(this).filter((span) => span !== this && !isStandaloneSpan(span)).map((span) => spanUtils.spanToJSON(span)).filter(isFullFinishedSpan), source = this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE], transaction = { + contexts: { + trace: spanUtils.spanToTransactionTraceContext(this) + }, + spans: ( + // spans.sort() mutates the array, but `spans` is already a copy so we can safely do this here + // we do not use spans anymore after this point + spans.length > MAX_SPAN_COUNT ? spans.sort((a, b) => a.start_timestamp - b.start_timestamp).slice(0, MAX_SPAN_COUNT) : spans + ), + start_timestamp: this._startTime, + timestamp: this._endTime, + transaction: this._name, + type: "transaction", + sdkProcessingMetadata: { + capturedSpanScope, + capturedSpanIsolationScope, + ...utils.dropUndefinedKeys({ + dynamicSamplingContext: dynamicSamplingContext.getDynamicSamplingContextFromSpan(this) + }) + }, + _metrics_summary: metricSummary.getMetricSummaryJsonForSpan(this), + ...source && { + transaction_info: { + source + } + } + }, measurements = measurement.timedEventsToMeasurements(this._events); + return measurements && Object.keys(measurements).length && (debugBuild.DEBUG_BUILD && utils.logger.log( + "[Measurements] Adding measurements to transaction event", + JSON.stringify(measurements, void 0, 2) + ), transaction.measurements = measurements), transaction; + } + }; + function isSpanTimeInput(value) { + return value && typeof value == "number" || value instanceof Date || Array.isArray(value); + } + function isFullFinishedSpan(input) { + return !!input.start_timestamp && !!input.timestamp && !!input.span_id && !!input.trace_id; + } + function isStandaloneSpan(span) { + return span instanceof SentrySpan && span.isStandaloneSpan(); + } + function sendSpanEnvelope(envelope2) { + let client = currentScopes.getClient(); + if (!client) + return; + let spanItems = envelope2[1]; + if (!spanItems || spanItems.length === 0) { + client.recordDroppedEvent("before_send", "span"); + return; + } + let transport = client.getTransport(); + transport && transport.send(envelope2).then(null, (reason) => { + debugBuild.DEBUG_BUILD && utils.logger.error("Error while sending span:", reason); + }); + } + exports.SentrySpan = SentrySpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/trace.js +var require_trace = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/trace.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), carrier = require_carrier(), currentScopes = require_currentScopes(), index = require_asyncContext(), debugBuild = require_debug_build2(), semanticAttributes = require_semanticAttributes(), handleCallbackErrors = require_handleCallbackErrors(), hasTracingEnabled = require_hasTracingEnabled(), spanOnScope = require_spanOnScope(), spanUtils = require_spanUtils(), dynamicSamplingContext = require_dynamicSamplingContext(), logSpans = require_logSpans(), sampling = require_sampling(), sentryNonRecordingSpan = require_sentryNonRecordingSpan(), sentrySpan = require_sentrySpan(), spanstatus = require_spanstatus(), utils$1 = require_utils(), SUPPRESS_TRACING_KEY = "__SENTRY_SUPPRESS_TRACING__"; + function startSpan(context, callback) { + let acs = getAcs(); + if (acs.startSpan) + return acs.startSpan(context, callback); + let spanContext = normalizeContext(context); + return currentScopes.withScope(context.scope, (scope) => { + let parentSpan = getParentSpan(scope), activeSpan = context.onlyIfParent && !parentSpan ? new sentryNonRecordingSpan.SentryNonRecordingSpan() : createChildOrRootSpan({ + parentSpan, + spanContext, + forceTransaction: context.forceTransaction, + scope + }); + return spanOnScope._setSpanForScope(scope, activeSpan), handleCallbackErrors.handleCallbackErrors( + () => callback(activeSpan), + () => { + let { status } = spanUtils.spanToJSON(activeSpan); + activeSpan.isRecording() && (!status || status === "ok") && activeSpan.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "internal_error" }); + }, + () => activeSpan.end() + ); + }); + } + function startSpanManual(context, callback) { + let acs = getAcs(); + if (acs.startSpanManual) + return acs.startSpanManual(context, callback); + let spanContext = normalizeContext(context); + return currentScopes.withScope(context.scope, (scope) => { + let parentSpan = getParentSpan(scope), activeSpan = context.onlyIfParent && !parentSpan ? new sentryNonRecordingSpan.SentryNonRecordingSpan() : createChildOrRootSpan({ + parentSpan, + spanContext, + forceTransaction: context.forceTransaction, + scope + }); + spanOnScope._setSpanForScope(scope, activeSpan); + function finishAndSetSpan() { + activeSpan.end(); + } + return handleCallbackErrors.handleCallbackErrors( + () => callback(activeSpan, finishAndSetSpan), + () => { + let { status } = spanUtils.spanToJSON(activeSpan); + activeSpan.isRecording() && (!status || status === "ok") && activeSpan.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "internal_error" }); + } + ); + }); + } + function startInactiveSpan(context) { + let acs = getAcs(); + if (acs.startInactiveSpan) + return acs.startInactiveSpan(context); + let spanContext = normalizeContext(context), scope = context.scope || currentScopes.getCurrentScope(), parentSpan = getParentSpan(scope); + return context.onlyIfParent && !parentSpan ? new sentryNonRecordingSpan.SentryNonRecordingSpan() : createChildOrRootSpan({ + parentSpan, + spanContext, + forceTransaction: context.forceTransaction, + scope + }); + } + var continueTrace = ({ + sentryTrace, + baggage + }, callback) => currentScopes.withScope((scope) => { + let propagationContext = utils.propagationContextFromHeaders(sentryTrace, baggage); + return scope.setPropagationContext(propagationContext), callback(); + }); + function withActiveSpan(span, callback) { + let acs = getAcs(); + return acs.withActiveSpan ? acs.withActiveSpan(span, callback) : currentScopes.withScope((scope) => (spanOnScope._setSpanForScope(scope, span || void 0), callback(scope))); + } + function suppressTracing(callback) { + let acs = getAcs(); + return acs.suppressTracing ? acs.suppressTracing(callback) : currentScopes.withScope((scope) => (scope.setSDKProcessingMetadata({ [SUPPRESS_TRACING_KEY]: !0 }), callback())); + } + function startNewTrace(callback) { + return currentScopes.withScope((scope) => (scope.setPropagationContext(utils.generatePropagationContext()), debugBuild.DEBUG_BUILD && utils.logger.info(`Starting a new trace with id ${scope.getPropagationContext().traceId}`), withActiveSpan(null, callback))); + } + function createChildOrRootSpan({ + parentSpan, + spanContext, + forceTransaction, + scope + }) { + if (!hasTracingEnabled.hasTracingEnabled()) + return new sentryNonRecordingSpan.SentryNonRecordingSpan(); + let isolationScope = currentScopes.getIsolationScope(), span; + if (parentSpan && !forceTransaction) + span = _startChildSpan(parentSpan, scope, spanContext), spanUtils.addChildSpanToSpan(parentSpan, span); + else if (parentSpan) { + let dsc = dynamicSamplingContext.getDynamicSamplingContextFromSpan(parentSpan), { traceId, spanId: parentSpanId } = parentSpan.spanContext(), parentSampled = spanUtils.spanIsSampled(parentSpan); + span = _startRootSpan( + { + traceId, + parentSpanId, + ...spanContext + }, + scope, + parentSampled + ), dynamicSamplingContext.freezeDscOnSpan(span, dsc); + } else { + let { + traceId, + dsc, + parentSpanId, + sampled: parentSampled + } = { + ...isolationScope.getPropagationContext(), + ...scope.getPropagationContext() + }; + span = _startRootSpan( + { + traceId, + parentSpanId, + ...spanContext + }, + scope, + parentSampled + ), dsc && dynamicSamplingContext.freezeDscOnSpan(span, dsc); + } + return logSpans.logSpanStart(span), utils$1.setCapturedScopesOnSpan(span, scope, isolationScope), span; + } + function normalizeContext(context) { + let initialCtx = { + isStandalone: (context.experimental || {}).standalone, + ...context + }; + if (context.startTime) { + let ctx = { ...initialCtx }; + return ctx.startTimestamp = spanUtils.spanTimeInputToSeconds(context.startTime), delete ctx.startTime, ctx; + } + return initialCtx; + } + function getAcs() { + let carrier$1 = carrier.getMainCarrier(); + return index.getAsyncContextStrategy(carrier$1); + } + function _startRootSpan(spanArguments, scope, parentSampled) { + let client = currentScopes.getClient(), options = client && client.getOptions() || {}, { name = "", attributes } = spanArguments, [sampled, sampleRate] = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] ? [!1] : sampling.sampleSpan(options, { + name, + parentSampled, + attributes, + transactionContext: { + name, + parentSampled + } + }), rootSpan = new sentrySpan.SentrySpan({ + ...spanArguments, + attributes: { + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "custom", + ...spanArguments.attributes + }, + sampled + }); + return sampleRate !== void 0 && rootSpan.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, sampleRate), client && client.emit("spanStart", rootSpan), rootSpan; + } + function _startChildSpan(parentSpan, scope, spanArguments) { + let { spanId, traceId } = parentSpan.spanContext(), sampled = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] ? !1 : spanUtils.spanIsSampled(parentSpan), childSpan = sampled ? new sentrySpan.SentrySpan({ + ...spanArguments, + parentSpanId: spanId, + traceId, + sampled + }) : new sentryNonRecordingSpan.SentryNonRecordingSpan({ traceId }); + spanUtils.addChildSpanToSpan(parentSpan, childSpan); + let client = currentScopes.getClient(); + return client && (client.emit("spanStart", childSpan), spanArguments.endTimestamp && client.emit("spanEnd", childSpan)), childSpan; + } + function getParentSpan(scope) { + let span = spanOnScope._getSpanForScope(scope); + if (!span) + return; + let client = currentScopes.getClient(); + return (client ? client.getOptions() : {}).parentSpanIsAlwaysRootSpan ? spanUtils.getRootSpan(span) : span; + } + exports.continueTrace = continueTrace; + exports.startInactiveSpan = startInactiveSpan; + exports.startNewTrace = startNewTrace; + exports.startSpan = startSpan; + exports.startSpanManual = startSpanManual; + exports.suppressTracing = suppressTracing; + exports.withActiveSpan = withActiveSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/idleSpan.js +var require_idleSpan = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/idleSpan.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), semanticAttributes = require_semanticAttributes(), hasTracingEnabled = require_hasTracingEnabled(), spanOnScope = require_spanOnScope(), spanUtils = require_spanUtils(), sentryNonRecordingSpan = require_sentryNonRecordingSpan(), spanstatus = require_spanstatus(), trace = require_trace(), TRACING_DEFAULTS = { + idleTimeout: 1e3, + finalTimeout: 3e4, + childSpanTimeout: 15e3 + }, FINISH_REASON_HEARTBEAT_FAILED = "heartbeatFailed", FINISH_REASON_IDLE_TIMEOUT = "idleTimeout", FINISH_REASON_FINAL_TIMEOUT = "finalTimeout", FINISH_REASON_EXTERNAL_FINISH = "externalFinish"; + function startIdleSpan(startSpanOptions, options = {}) { + let activities = /* @__PURE__ */ new Map(), _finished = !1, _idleTimeoutID, _finishReason = FINISH_REASON_EXTERNAL_FINISH, _autoFinishAllowed = !options.disableAutoFinish, { + idleTimeout = TRACING_DEFAULTS.idleTimeout, + finalTimeout = TRACING_DEFAULTS.finalTimeout, + childSpanTimeout = TRACING_DEFAULTS.childSpanTimeout, + beforeSpanEnd + } = options, client = currentScopes.getClient(); + if (!client || !hasTracingEnabled.hasTracingEnabled()) + return new sentryNonRecordingSpan.SentryNonRecordingSpan(); + let scope = currentScopes.getCurrentScope(), previousActiveSpan = spanUtils.getActiveSpan(), span = _startIdleSpan(startSpanOptions); + span.end = new Proxy(span.end, { + apply(target, thisArg, args) { + beforeSpanEnd && beforeSpanEnd(span); + let [definedEndTimestamp, ...rest] = args, timestamp = definedEndTimestamp || utils.timestampInSeconds(), spanEndTimestamp = spanUtils.spanTimeInputToSeconds(timestamp), spans = spanUtils.getSpanDescendants(span).filter((child) => child !== span); + if (!spans.length) + return onIdleSpanEnded(spanEndTimestamp), Reflect.apply(target, thisArg, [spanEndTimestamp, ...rest]); + let childEndTimestamps = spans.map((span2) => spanUtils.spanToJSON(span2).timestamp).filter((timestamp2) => !!timestamp2), latestSpanEndTimestamp = childEndTimestamps.length ? Math.max(...childEndTimestamps) : void 0, spanStartTimestamp = spanUtils.spanToJSON(span).start_timestamp, endTimestamp = Math.min( + spanStartTimestamp ? spanStartTimestamp + finalTimeout / 1e3 : 1 / 0, + Math.max(spanStartTimestamp || -1 / 0, Math.min(spanEndTimestamp, latestSpanEndTimestamp || 1 / 0)) + ); + return onIdleSpanEnded(endTimestamp), Reflect.apply(target, thisArg, [endTimestamp, ...rest]); + } + }); + function _cancelIdleTimeout() { + _idleTimeoutID && (clearTimeout(_idleTimeoutID), _idleTimeoutID = void 0); + } + function _restartIdleTimeout(endTimestamp) { + _cancelIdleTimeout(), _idleTimeoutID = setTimeout(() => { + !_finished && activities.size === 0 && _autoFinishAllowed && (_finishReason = FINISH_REASON_IDLE_TIMEOUT, span.end(endTimestamp)); + }, idleTimeout); + } + function _restartChildSpanTimeout(endTimestamp) { + _idleTimeoutID = setTimeout(() => { + !_finished && _autoFinishAllowed && (_finishReason = FINISH_REASON_HEARTBEAT_FAILED, span.end(endTimestamp)); + }, childSpanTimeout); + } + function _pushActivity(spanId) { + _cancelIdleTimeout(), activities.set(spanId, !0); + let endTimestamp = utils.timestampInSeconds(); + _restartChildSpanTimeout(endTimestamp + childSpanTimeout / 1e3); + } + function _popActivity(spanId) { + if (activities.has(spanId) && activities.delete(spanId), activities.size === 0) { + let endTimestamp = utils.timestampInSeconds(); + _restartIdleTimeout(endTimestamp + idleTimeout / 1e3); + } + } + function onIdleSpanEnded(endTimestamp) { + _finished = !0, activities.clear(), spanOnScope._setSpanForScope(scope, previousActiveSpan); + let spanJSON = spanUtils.spanToJSON(span), { start_timestamp: startTimestamp } = spanJSON; + if (!startTimestamp) + return; + (spanJSON.data || {})[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON] || span.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, _finishReason), utils.logger.log(`[Tracing] Idle span "${spanJSON.op}" finished`); + let childSpans = spanUtils.getSpanDescendants(span).filter((child) => child !== span), discardedSpans = 0; + childSpans.forEach((childSpan) => { + childSpan.isRecording() && (childSpan.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "cancelled" }), childSpan.end(endTimestamp), debugBuild.DEBUG_BUILD && utils.logger.log("[Tracing] Cancelling span since span ended early", JSON.stringify(childSpan, void 0, 2))); + let childSpanJSON = spanUtils.spanToJSON(childSpan), { timestamp: childEndTimestamp = 0, start_timestamp: childStartTimestamp = 0 } = childSpanJSON, spanStartedBeforeIdleSpanEnd = childStartTimestamp <= endTimestamp, timeoutWithMarginOfError = (finalTimeout + idleTimeout) / 1e3, spanEndedBeforeFinalTimeout = childEndTimestamp - childStartTimestamp <= timeoutWithMarginOfError; + if (debugBuild.DEBUG_BUILD) { + let stringifiedSpan = JSON.stringify(childSpan, void 0, 2); + spanStartedBeforeIdleSpanEnd ? spanEndedBeforeFinalTimeout || utils.logger.log("[Tracing] Discarding span since it finished after idle span final timeout", stringifiedSpan) : utils.logger.log("[Tracing] Discarding span since it happened after idle span was finished", stringifiedSpan); + } + (!spanEndedBeforeFinalTimeout || !spanStartedBeforeIdleSpanEnd) && (spanUtils.removeChildSpanFromSpan(span, childSpan), discardedSpans++); + }), discardedSpans > 0 && span.setAttribute("sentry.idle_span_discarded_spans", discardedSpans); + } + return client.on("spanStart", (startedSpan) => { + if (_finished || startedSpan === span || spanUtils.spanToJSON(startedSpan).timestamp) + return; + spanUtils.getSpanDescendants(span).includes(startedSpan) && _pushActivity(startedSpan.spanContext().spanId); + }), client.on("spanEnd", (endedSpan) => { + _finished || _popActivity(endedSpan.spanContext().spanId); + }), client.on("idleSpanEnableAutoFinish", (spanToAllowAutoFinish) => { + spanToAllowAutoFinish === span && (_autoFinishAllowed = !0, _restartIdleTimeout(), activities.size && _restartChildSpanTimeout()); + }), options.disableAutoFinish || _restartIdleTimeout(), setTimeout(() => { + _finished || (span.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "deadline_exceeded" }), _finishReason = FINISH_REASON_FINAL_TIMEOUT, span.end()); + }, finalTimeout), span; + } + function _startIdleSpan(options) { + let span = trace.startInactiveSpan(options); + return spanOnScope._setSpanForScope(currentScopes.getCurrentScope(), span), debugBuild.DEBUG_BUILD && utils.logger.log("[Tracing] Started span is an idle span"), span; + } + exports.TRACING_DEFAULTS = TRACING_DEFAULTS; + exports.startIdleSpan = startIdleSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/eventProcessors.js +var require_eventProcessors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/eventProcessors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(); + function notifyEventProcessors(processors, event, hint, index = 0) { + return new utils.SyncPromise((resolve, reject) => { + let processor = processors[index]; + if (event === null || typeof processor != "function") + resolve(event); + else { + let result = processor({ ...event }, hint); + debugBuild.DEBUG_BUILD && processor.id && result === null && utils.logger.log(`Event processor "${processor.id}" dropped event`), utils.isThenable(result) ? result.then((final) => notifyEventProcessors(processors, final, hint, index + 1).then(resolve)).then(null, reject) : notifyEventProcessors(processors, result, hint, index + 1).then(resolve).then(null, reject); + } + }); + } + exports.notifyEventProcessors = notifyEventProcessors; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/applyScopeDataToEvent.js +var require_applyScopeDataToEvent = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/applyScopeDataToEvent.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), dynamicSamplingContext = require_dynamicSamplingContext(), spanUtils = require_spanUtils(); + function applyScopeDataToEvent(event, data) { + let { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data; + applyDataToEvent(event, data), span && applySpanToEvent(event, span), applyFingerprintToEvent(event, fingerprint), applyBreadcrumbsToEvent(event, breadcrumbs), applySdkMetadataToEvent(event, sdkProcessingMetadata); + } + function mergeScopeData(data, mergeData) { + let { + extra, + tags, + user, + contexts, + level, + sdkProcessingMetadata, + breadcrumbs, + fingerprint, + eventProcessors, + attachments, + propagationContext, + transactionName, + span + } = mergeData; + mergeAndOverwriteScopeData(data, "extra", extra), mergeAndOverwriteScopeData(data, "tags", tags), mergeAndOverwriteScopeData(data, "user", user), mergeAndOverwriteScopeData(data, "contexts", contexts), mergeAndOverwriteScopeData(data, "sdkProcessingMetadata", sdkProcessingMetadata), level && (data.level = level), transactionName && (data.transactionName = transactionName), span && (data.span = span), breadcrumbs.length && (data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs]), fingerprint.length && (data.fingerprint = [...data.fingerprint, ...fingerprint]), eventProcessors.length && (data.eventProcessors = [...data.eventProcessors, ...eventProcessors]), attachments.length && (data.attachments = [...data.attachments, ...attachments]), data.propagationContext = { ...data.propagationContext, ...propagationContext }; + } + function mergeAndOverwriteScopeData(data, prop, mergeVal) { + if (mergeVal && Object.keys(mergeVal).length) { + data[prop] = { ...data[prop] }; + for (let key in mergeVal) + Object.prototype.hasOwnProperty.call(mergeVal, key) && (data[prop][key] = mergeVal[key]); + } + } + function applyDataToEvent(event, data) { + let { extra, tags, user, contexts, level, transactionName } = data, cleanedExtra = utils.dropUndefinedKeys(extra); + cleanedExtra && Object.keys(cleanedExtra).length && (event.extra = { ...cleanedExtra, ...event.extra }); + let cleanedTags = utils.dropUndefinedKeys(tags); + cleanedTags && Object.keys(cleanedTags).length && (event.tags = { ...cleanedTags, ...event.tags }); + let cleanedUser = utils.dropUndefinedKeys(user); + cleanedUser && Object.keys(cleanedUser).length && (event.user = { ...cleanedUser, ...event.user }); + let cleanedContexts = utils.dropUndefinedKeys(contexts); + cleanedContexts && Object.keys(cleanedContexts).length && (event.contexts = { ...cleanedContexts, ...event.contexts }), level && (event.level = level), transactionName && event.type !== "transaction" && (event.transaction = transactionName); + } + function applyBreadcrumbsToEvent(event, breadcrumbs) { + let mergedBreadcrumbs = [...event.breadcrumbs || [], ...breadcrumbs]; + event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : void 0; + } + function applySdkMetadataToEvent(event, sdkProcessingMetadata) { + event.sdkProcessingMetadata = { + ...event.sdkProcessingMetadata, + ...sdkProcessingMetadata + }; + } + function applySpanToEvent(event, span) { + event.contexts = { + trace: spanUtils.spanToTraceContext(span), + ...event.contexts + }, event.sdkProcessingMetadata = { + dynamicSamplingContext: dynamicSamplingContext.getDynamicSamplingContextFromSpan(span), + ...event.sdkProcessingMetadata + }; + let rootSpan = spanUtils.getRootSpan(span), transactionName = spanUtils.spanToJSON(rootSpan).description; + transactionName && !event.transaction && event.type === "transaction" && (event.transaction = transactionName); + } + function applyFingerprintToEvent(event, fingerprint) { + event.fingerprint = event.fingerprint ? utils.arrayify(event.fingerprint) : [], fingerprint && (event.fingerprint = event.fingerprint.concat(fingerprint)), event.fingerprint && !event.fingerprint.length && delete event.fingerprint; + } + exports.applyScopeDataToEvent = applyScopeDataToEvent; + exports.mergeAndOverwriteScopeData = mergeAndOverwriteScopeData; + exports.mergeScopeData = mergeScopeData; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/prepareEvent.js +var require_prepareEvent = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/prepareEvent.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), constants = require_constants(), currentScopes = require_currentScopes(), eventProcessors = require_eventProcessors(), scope = require_scope(), applyScopeDataToEvent = require_applyScopeDataToEvent(); + function prepareEvent(options, event, hint, scope2, client, isolationScope) { + let { normalizeDepth = 3, normalizeMaxBreadth = 1e3 } = options, prepared = { + ...event, + event_id: event.event_id || hint.event_id || utils.uuid4(), + timestamp: event.timestamp || utils.dateTimestampInSeconds() + }, integrations = hint.integrations || options.integrations.map((i) => i.name); + applyClientOptions(prepared, options), applyIntegrationsMetadata(prepared, integrations), event.type === void 0 && applyDebugIds(prepared, options.stackParser); + let finalScope = getFinalScope(scope2, hint.captureContext); + hint.mechanism && utils.addExceptionMechanism(prepared, hint.mechanism); + let clientEventProcessors = client ? client.getEventProcessors() : [], data = currentScopes.getGlobalScope().getScopeData(); + if (isolationScope) { + let isolationData = isolationScope.getScopeData(); + applyScopeDataToEvent.mergeScopeData(data, isolationData); + } + if (finalScope) { + let finalScopeData = finalScope.getScopeData(); + applyScopeDataToEvent.mergeScopeData(data, finalScopeData); + } + let attachments = [...hint.attachments || [], ...data.attachments]; + attachments.length && (hint.attachments = attachments), applyScopeDataToEvent.applyScopeDataToEvent(prepared, data); + let eventProcessors$1 = [ + ...clientEventProcessors, + // Run scope event processors _after_ all other processors + ...data.eventProcessors + ]; + return eventProcessors.notifyEventProcessors(eventProcessors$1, prepared, hint).then((evt) => (evt && applyDebugMeta(evt), typeof normalizeDepth == "number" && normalizeDepth > 0 ? normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth) : evt)); + } + function applyClientOptions(event, options) { + let { environment, release, dist, maxValueLength = 250 } = options; + "environment" in event || (event.environment = "environment" in options ? environment : constants.DEFAULT_ENVIRONMENT), event.release === void 0 && release !== void 0 && (event.release = release), event.dist === void 0 && dist !== void 0 && (event.dist = dist), event.message && (event.message = utils.truncate(event.message, maxValueLength)); + let exception = event.exception && event.exception.values && event.exception.values[0]; + exception && exception.value && (exception.value = utils.truncate(exception.value, maxValueLength)); + let request = event.request; + request && request.url && (request.url = utils.truncate(request.url, maxValueLength)); + } + var debugIdStackParserCache = /* @__PURE__ */ new WeakMap(); + function applyDebugIds(event, stackParser) { + let debugIdMap = utils.GLOBAL_OBJ._sentryDebugIds; + if (!debugIdMap) + return; + let debugIdStackFramesCache, cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser); + cachedDebugIdStackFrameCache ? debugIdStackFramesCache = cachedDebugIdStackFrameCache : (debugIdStackFramesCache = /* @__PURE__ */ new Map(), debugIdStackParserCache.set(stackParser, debugIdStackFramesCache)); + let filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => { + let parsedStack, cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace); + cachedParsedStack ? parsedStack = cachedParsedStack : (parsedStack = stackParser(debugIdStackTrace), debugIdStackFramesCache.set(debugIdStackTrace, parsedStack)); + for (let i = parsedStack.length - 1; i >= 0; i--) { + let stackFrame = parsedStack[i]; + if (stackFrame.filename) { + acc[stackFrame.filename] = debugIdMap[debugIdStackTrace]; + break; + } + } + return acc; + }, {}); + try { + event.exception.values.forEach((exception) => { + exception.stacktrace.frames.forEach((frame) => { + frame.filename && (frame.debug_id = filenameDebugIdMap[frame.filename]); + }); + }); + } catch { + } + } + function applyDebugMeta(event) { + let filenameDebugIdMap = {}; + try { + event.exception.values.forEach((exception) => { + exception.stacktrace.frames.forEach((frame) => { + frame.debug_id && (frame.abs_path ? filenameDebugIdMap[frame.abs_path] = frame.debug_id : frame.filename && (filenameDebugIdMap[frame.filename] = frame.debug_id), delete frame.debug_id); + }); + }); + } catch { + } + if (Object.keys(filenameDebugIdMap).length === 0) + return; + event.debug_meta = event.debug_meta || {}, event.debug_meta.images = event.debug_meta.images || []; + let images = event.debug_meta.images; + Object.keys(filenameDebugIdMap).forEach((filename) => { + images.push({ + type: "sourcemap", + code_file: filename, + debug_id: filenameDebugIdMap[filename] + }); + }); + } + function applyIntegrationsMetadata(event, integrationNames) { + integrationNames.length > 0 && (event.sdk = event.sdk || {}, event.sdk.integrations = [...event.sdk.integrations || [], ...integrationNames]); + } + function normalizeEvent(event, depth, maxBreadth) { + if (!event) + return null; + let normalized = { + ...event, + ...event.breadcrumbs && { + breadcrumbs: event.breadcrumbs.map((b) => ({ + ...b, + ...b.data && { + data: utils.normalize(b.data, depth, maxBreadth) + } + })) + }, + ...event.user && { + user: utils.normalize(event.user, depth, maxBreadth) + }, + ...event.contexts && { + contexts: utils.normalize(event.contexts, depth, maxBreadth) + }, + ...event.extra && { + extra: utils.normalize(event.extra, depth, maxBreadth) + } + }; + return event.contexts && event.contexts.trace && normalized.contexts && (normalized.contexts.trace = event.contexts.trace, event.contexts.trace.data && (normalized.contexts.trace.data = utils.normalize(event.contexts.trace.data, depth, maxBreadth))), event.spans && (normalized.spans = event.spans.map((span) => ({ + ...span, + ...span.data && { + data: utils.normalize(span.data, depth, maxBreadth) + } + }))), normalized; + } + function getFinalScope(scope$1, captureContext) { + if (!captureContext) + return scope$1; + let finalScope = scope$1 ? scope$1.clone() : new scope.Scope(); + return finalScope.update(captureContext), finalScope; + } + function parseEventHintOrCaptureContext(hint) { + if (hint) + return hintIsScopeOrFunction(hint) ? { captureContext: hint } : hintIsScopeContext(hint) ? { + captureContext: hint + } : hint; + } + function hintIsScopeOrFunction(hint) { + return hint instanceof scope.Scope || typeof hint == "function"; + } + var captureContextKeys = [ + "user", + "level", + "extra", + "contexts", + "tags", + "fingerprint", + "requestSession", + "propagationContext" + ]; + function hintIsScopeContext(hint) { + return Object.keys(hint).some((key) => captureContextKeys.includes(key)); + } + exports.applyDebugIds = applyDebugIds; + exports.applyDebugMeta = applyDebugMeta; + exports.parseEventHintOrCaptureContext = parseEventHintOrCaptureContext; + exports.prepareEvent = prepareEvent; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/exports.js +var require_exports = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/exports.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), constants = require_constants(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), session = require_session(), prepareEvent = require_prepareEvent(); + function captureException(exception, hint) { + return currentScopes.getCurrentScope().captureException(exception, prepareEvent.parseEventHintOrCaptureContext(hint)); + } + function captureMessage(message, captureContext) { + let level = typeof captureContext == "string" ? captureContext : void 0, context = typeof captureContext != "string" ? { captureContext } : void 0; + return currentScopes.getCurrentScope().captureMessage(message, level, context); + } + function captureEvent(event, hint) { + return currentScopes.getCurrentScope().captureEvent(event, hint); + } + function setContext(name, context) { + currentScopes.getIsolationScope().setContext(name, context); + } + function setExtras(extras) { + currentScopes.getIsolationScope().setExtras(extras); + } + function setExtra(key, extra) { + currentScopes.getIsolationScope().setExtra(key, extra); + } + function setTags(tags) { + currentScopes.getIsolationScope().setTags(tags); + } + function setTag(key, value) { + currentScopes.getIsolationScope().setTag(key, value); + } + function setUser(user) { + currentScopes.getIsolationScope().setUser(user); + } + function lastEventId() { + return currentScopes.getIsolationScope().lastEventId(); + } + function captureCheckIn(checkIn, upsertMonitorConfig) { + let scope = currentScopes.getCurrentScope(), client = currentScopes.getClient(); + if (!client) + debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot capture check-in. No client defined."); + else if (!client.captureCheckIn) + debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot capture check-in. Client does not support sending check-ins."); + else + return client.captureCheckIn(checkIn, upsertMonitorConfig, scope); + return utils.uuid4(); + } + function withMonitor(monitorSlug, callback, upsertMonitorConfig) { + let checkInId = captureCheckIn({ monitorSlug, status: "in_progress" }, upsertMonitorConfig), now = utils.timestampInSeconds(); + function finishCheckIn(status) { + captureCheckIn({ monitorSlug, status, checkInId, duration: utils.timestampInSeconds() - now }); + } + return currentScopes.withIsolationScope(() => { + let maybePromiseResult; + try { + maybePromiseResult = callback(); + } catch (e) { + throw finishCheckIn("error"), e; + } + return utils.isThenable(maybePromiseResult) ? Promise.resolve(maybePromiseResult).then( + () => { + finishCheckIn("ok"); + }, + () => { + finishCheckIn("error"); + } + ) : finishCheckIn("ok"), maybePromiseResult; + }); + } + async function flush(timeout) { + let client = currentScopes.getClient(); + return client ? client.flush(timeout) : (debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot flush events. No client defined."), Promise.resolve(!1)); + } + async function close(timeout) { + let client = currentScopes.getClient(); + return client ? client.close(timeout) : (debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot flush events and disable SDK. No client defined."), Promise.resolve(!1)); + } + function isInitialized() { + return !!currentScopes.getClient(); + } + function isEnabled() { + let client = currentScopes.getClient(); + return !!client && client.getOptions().enabled !== !1 && !!client.getTransport(); + } + function addEventProcessor(callback) { + currentScopes.getIsolationScope().addEventProcessor(callback); + } + function startSession(context) { + let client = currentScopes.getClient(), isolationScope = currentScopes.getIsolationScope(), currentScope = currentScopes.getCurrentScope(), { release, environment = constants.DEFAULT_ENVIRONMENT } = client && client.getOptions() || {}, { userAgent } = utils.GLOBAL_OBJ.navigator || {}, session$1 = session.makeSession({ + release, + environment, + user: currentScope.getUser() || isolationScope.getUser(), + ...userAgent && { userAgent }, + ...context + }), currentSession = isolationScope.getSession(); + return currentSession && currentSession.status === "ok" && session.updateSession(currentSession, { status: "exited" }), endSession(), isolationScope.setSession(session$1), currentScope.setSession(session$1), session$1; + } + function endSession() { + let isolationScope = currentScopes.getIsolationScope(), currentScope = currentScopes.getCurrentScope(), session$1 = currentScope.getSession() || isolationScope.getSession(); + session$1 && session.closeSession(session$1), _sendSessionUpdate(), isolationScope.setSession(), currentScope.setSession(); + } + function _sendSessionUpdate() { + let isolationScope = currentScopes.getIsolationScope(), currentScope = currentScopes.getCurrentScope(), client = currentScopes.getClient(), session2 = currentScope.getSession() || isolationScope.getSession(); + session2 && client && client.captureSession(session2); + } + function captureSession(end = !1) { + if (end) { + endSession(); + return; + } + _sendSessionUpdate(); + } + exports.addEventProcessor = addEventProcessor; + exports.captureCheckIn = captureCheckIn; + exports.captureEvent = captureEvent; + exports.captureException = captureException; + exports.captureMessage = captureMessage; + exports.captureSession = captureSession; + exports.close = close; + exports.endSession = endSession; + exports.flush = flush; + exports.isEnabled = isEnabled; + exports.isInitialized = isInitialized; + exports.lastEventId = lastEventId; + exports.setContext = setContext; + exports.setExtra = setExtra; + exports.setExtras = setExtras; + exports.setTag = setTag; + exports.setTags = setTags; + exports.setUser = setUser; + exports.startSession = startSession; + exports.withMonitor = withMonitor; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/sessionflusher.js +var require_sessionflusher = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/sessionflusher.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), SessionFlusher = class { + // Cast to any so that it can use Node.js timeout + // eslint-disable-next-line @typescript-eslint/no-explicit-any + constructor(client, attrs) { + this._client = client, this.flushTimeout = 60, this._pendingAggregates = {}, this._isEnabled = !0, this._intervalId = setInterval(() => this.flush(), this.flushTimeout * 1e3), this._intervalId.unref && this._intervalId.unref(), this._sessionAttrs = attrs; + } + /** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSession` */ + flush() { + let sessionAggregates = this.getSessionAggregates(); + sessionAggregates.aggregates.length !== 0 && (this._pendingAggregates = {}, this._client.sendSession(sessionAggregates)); + } + /** Massages the entries in `pendingAggregates` and returns aggregated sessions */ + getSessionAggregates() { + let aggregates = Object.keys(this._pendingAggregates).map((key) => this._pendingAggregates[parseInt(key)]), sessionAggregates = { + attrs: this._sessionAttrs, + aggregates + }; + return utils.dropUndefinedKeys(sessionAggregates); + } + /** JSDoc */ + close() { + clearInterval(this._intervalId), this._isEnabled = !1, this.flush(); + } + /** + * Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then + * fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to + * `_incrementSessionStatusCount` along with the start date + */ + incrementSessionStatusCount() { + if (!this._isEnabled) + return; + let isolationScope = currentScopes.getIsolationScope(), requestSession = isolationScope.getRequestSession(); + requestSession && requestSession.status && (this._incrementSessionStatusCount(requestSession.status, /* @__PURE__ */ new Date()), isolationScope.setRequestSession(void 0)); + } + /** + * Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of + * the session received + */ + _incrementSessionStatusCount(status, date) { + let sessionStartedTrunc = new Date(date).setSeconds(0, 0); + this._pendingAggregates[sessionStartedTrunc] = this._pendingAggregates[sessionStartedTrunc] || {}; + let aggregationCounts = this._pendingAggregates[sessionStartedTrunc]; + switch (aggregationCounts.started || (aggregationCounts.started = new Date(sessionStartedTrunc).toISOString()), status) { + case "errored": + return aggregationCounts.errored = (aggregationCounts.errored || 0) + 1, aggregationCounts.errored; + case "ok": + return aggregationCounts.exited = (aggregationCounts.exited || 0) + 1, aggregationCounts.exited; + default: + return aggregationCounts.crashed = (aggregationCounts.crashed || 0) + 1, aggregationCounts.crashed; + } + } + }; + exports.SessionFlusher = SessionFlusher; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/api.js +var require_api = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/api.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), SENTRY_API_VERSION = "7"; + function getBaseApiEndpoint(dsn) { + let protocol = dsn.protocol ? `${dsn.protocol}:` : "", port = dsn.port ? `:${dsn.port}` : ""; + return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ""}/api/`; + } + function _getIngestEndpoint(dsn) { + return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`; + } + function _encodedAuth(dsn, sdkInfo) { + return utils.urlEncode({ + // We send only the minimum set of required information. See + // https://github.com/getsentry/sentry-javascript/issues/2572. + sentry_key: dsn.publicKey, + sentry_version: SENTRY_API_VERSION, + ...sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` } + }); + } + function getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel, sdkInfo) { + return tunnel || `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`; + } + function getReportDialogEndpoint(dsnLike, dialogOptions) { + let dsn = utils.makeDsn(dsnLike); + if (!dsn) + return ""; + let endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`, encodedOptions = `dsn=${utils.dsnToString(dsn)}`; + for (let key in dialogOptions) + if (key !== "dsn" && key !== "onClose") + if (key === "user") { + let user = dialogOptions.user; + if (!user) + continue; + user.name && (encodedOptions += `&name=${encodeURIComponent(user.name)}`), user.email && (encodedOptions += `&email=${encodeURIComponent(user.email)}`); + } else + encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key])}`; + return `${endpoint}?${encodedOptions}`; + } + exports.getEnvelopeEndpointWithUrlEncodedAuth = getEnvelopeEndpointWithUrlEncodedAuth; + exports.getReportDialogEndpoint = getReportDialogEndpoint; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integration.js +var require_integration = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integration.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), installedIntegrations = []; + function filterDuplicates(integrations) { + let integrationsByName = {}; + return integrations.forEach((currentInstance) => { + let { name } = currentInstance, existingInstance = integrationsByName[name]; + existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance || (integrationsByName[name] = currentInstance); + }), Object.keys(integrationsByName).map((k) => integrationsByName[k]); + } + function getIntegrationsToSetup(options) { + let defaultIntegrations = options.defaultIntegrations || [], userIntegrations = options.integrations; + defaultIntegrations.forEach((integration) => { + integration.isDefaultInstance = !0; + }); + let integrations; + Array.isArray(userIntegrations) ? integrations = [...defaultIntegrations, ...userIntegrations] : typeof userIntegrations == "function" ? integrations = utils.arrayify(userIntegrations(defaultIntegrations)) : integrations = defaultIntegrations; + let finalIntegrations = filterDuplicates(integrations), debugIndex = findIndex(finalIntegrations, (integration) => integration.name === "Debug"); + if (debugIndex !== -1) { + let [debugInstance] = finalIntegrations.splice(debugIndex, 1); + finalIntegrations.push(debugInstance); + } + return finalIntegrations; + } + function setupIntegrations(client, integrations) { + let integrationIndex = {}; + return integrations.forEach((integration) => { + integration && setupIntegration(client, integration, integrationIndex); + }), integrationIndex; + } + function afterSetupIntegrations(client, integrations) { + for (let integration of integrations) + integration && integration.afterAllSetup && integration.afterAllSetup(client); + } + function setupIntegration(client, integration, integrationIndex) { + if (integrationIndex[integration.name]) { + debugBuild.DEBUG_BUILD && utils.logger.log(`Integration skipped because it was already installed: ${integration.name}`); + return; + } + if (integrationIndex[integration.name] = integration, installedIntegrations.indexOf(integration.name) === -1 && typeof integration.setupOnce == "function" && (integration.setupOnce(), installedIntegrations.push(integration.name)), integration.setup && typeof integration.setup == "function" && integration.setup(client), typeof integration.preprocessEvent == "function") { + let callback = integration.preprocessEvent.bind(integration); + client.on("preprocessEvent", (event, hint) => callback(event, hint, client)); + } + if (typeof integration.processEvent == "function") { + let callback = integration.processEvent.bind(integration), processor = Object.assign((event, hint) => callback(event, hint, client), { + id: integration.name + }); + client.addEventProcessor(processor); + } + debugBuild.DEBUG_BUILD && utils.logger.log(`Integration installed: ${integration.name}`); + } + function addIntegration(integration) { + let client = currentScopes.getClient(); + if (!client) { + debugBuild.DEBUG_BUILD && utils.logger.warn(`Cannot add integration "${integration.name}" because no SDK Client is available.`); + return; + } + client.addIntegration(integration); + } + function findIndex(arr, callback) { + for (let i = 0; i < arr.length; i++) + if (callback(arr[i]) === !0) + return i; + return -1; + } + function defineIntegration(fn) { + return fn; + } + exports.addIntegration = addIntegration; + exports.afterSetupIntegrations = afterSetupIntegrations; + exports.defineIntegration = defineIntegration; + exports.getIntegrationsToSetup = getIntegrationsToSetup; + exports.installedIntegrations = installedIntegrations; + exports.setupIntegration = setupIntegration; + exports.setupIntegrations = setupIntegrations; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/baseclient.js +var require_baseclient = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/baseclient.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), api = require_api(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), envelope = require_envelope2(), integration = require_integration(), session = require_session(), dynamicSamplingContext = require_dynamicSamplingContext(), parseSampleRate = require_parseSampleRate(), prepareEvent = require_prepareEvent(), ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured.", BaseClient = class { + /** Options passed to the SDK. */ + /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */ + /** Array of set up integrations. */ + /** Number of calls being processed */ + /** Holds flushable */ + // eslint-disable-next-line @typescript-eslint/ban-types + /** + * Initializes this client instance. + * + * @param options Options for the client. + */ + constructor(options) { + if (this._options = options, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], options.dsn ? this._dsn = utils.makeDsn(options.dsn) : debugBuild.DEBUG_BUILD && utils.logger.warn("No DSN provided, client will not send events."), this._dsn) { + let url = api.getEnvelopeEndpointWithUrlEncodedAuth( + this._dsn, + options.tunnel, + options._metadata ? options._metadata.sdk : void 0 + ); + this._transport = options.transport({ + tunnel: this._options.tunnel, + recordDroppedEvent: this.recordDroppedEvent.bind(this), + ...options.transportOptions, + url + }); + } + } + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + captureException(exception, hint, scope) { + let eventId = utils.uuid4(); + if (utils.checkOrSetAlreadyCaught(exception)) + return debugBuild.DEBUG_BUILD && utils.logger.log(ALREADY_SEEN_ERROR), eventId; + let hintWithEventId = { + event_id: eventId, + ...hint + }; + return this._process( + this.eventFromException(exception, hintWithEventId).then( + (event) => this._captureEvent(event, hintWithEventId, scope) + ) + ), hintWithEventId.event_id; + } + /** + * @inheritDoc + */ + captureMessage(message, level, hint, currentScope) { + let hintWithEventId = { + event_id: utils.uuid4(), + ...hint + }, eventMessage = utils.isParameterizedString(message) ? message : String(message), promisedEvent = utils.isPrimitive(message) ? this.eventFromMessage(eventMessage, level, hintWithEventId) : this.eventFromException(message, hintWithEventId); + return this._process(promisedEvent.then((event) => this._captureEvent(event, hintWithEventId, currentScope))), hintWithEventId.event_id; + } + /** + * @inheritDoc + */ + captureEvent(event, hint, currentScope) { + let eventId = utils.uuid4(); + if (hint && hint.originalException && utils.checkOrSetAlreadyCaught(hint.originalException)) + return debugBuild.DEBUG_BUILD && utils.logger.log(ALREADY_SEEN_ERROR), eventId; + let hintWithEventId = { + event_id: eventId, + ...hint + }, capturedSpanScope = (event.sdkProcessingMetadata || {}).capturedSpanScope; + return this._process(this._captureEvent(event, hintWithEventId, capturedSpanScope || currentScope)), hintWithEventId.event_id; + } + /** + * @inheritDoc + */ + captureSession(session$1) { + typeof session$1.release != "string" ? debugBuild.DEBUG_BUILD && utils.logger.warn("Discarded session because of missing or non-string release") : (this.sendSession(session$1), session.updateSession(session$1, { init: !1 })); + } + /** + * @inheritDoc + */ + getDsn() { + return this._dsn; + } + /** + * @inheritDoc + */ + getOptions() { + return this._options; + } + /** + * @see SdkMetadata in @sentry/types + * + * @return The metadata of the SDK + */ + getSdkMetadata() { + return this._options._metadata; + } + /** + * @inheritDoc + */ + getTransport() { + return this._transport; + } + /** + * @inheritDoc + */ + flush(timeout) { + let transport = this._transport; + return transport ? (this.emit("flush"), this._isClientDoneProcessing(timeout).then((clientFinished) => transport.flush(timeout).then((transportFlushed) => clientFinished && transportFlushed))) : utils.resolvedSyncPromise(!0); + } + /** + * @inheritDoc + */ + close(timeout) { + return this.flush(timeout).then((result) => (this.getOptions().enabled = !1, this.emit("close"), result)); + } + /** Get all installed event processors. */ + getEventProcessors() { + return this._eventProcessors; + } + /** @inheritDoc */ + addEventProcessor(eventProcessor) { + this._eventProcessors.push(eventProcessor); + } + /** @inheritdoc */ + init() { + this._isEnabled() && this._setupIntegrations(); + } + /** + * Gets an installed integration by its name. + * + * @returns The installed integration or `undefined` if no integration with that `name` was installed. + */ + getIntegrationByName(integrationName) { + return this._integrations[integrationName]; + } + /** + * @inheritDoc + */ + addIntegration(integration$1) { + let isAlreadyInstalled = this._integrations[integration$1.name]; + integration.setupIntegration(this, integration$1, this._integrations), isAlreadyInstalled || integration.afterSetupIntegrations(this, [integration$1]); + } + /** + * @inheritDoc + */ + sendEvent(event, hint = {}) { + this.emit("beforeSendEvent", event, hint); + let env = envelope.createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel); + for (let attachment of hint.attachments || []) + env = utils.addItemToEnvelope(env, utils.createAttachmentEnvelopeItem(attachment)); + let promise = this.sendEnvelope(env); + promise && promise.then((sendResponse) => this.emit("afterSendEvent", event, sendResponse), null); + } + /** + * @inheritDoc + */ + sendSession(session2) { + let env = envelope.createSessionEnvelope(session2, this._dsn, this._options._metadata, this._options.tunnel); + this.sendEnvelope(env); + } + /** + * @inheritDoc + */ + recordDroppedEvent(reason, category, _event) { + if (this._options.sendClientReports) { + let key = `${reason}:${category}`; + debugBuild.DEBUG_BUILD && utils.logger.log(`Adding outcome: "${key}"`), this._outcomes[key] = this._outcomes[key] + 1 || 1; + } + } + // Keep on() & emit() signatures in sync with types' client.ts interface + /* eslint-disable @typescript-eslint/unified-signatures */ + /** @inheritdoc */ + /** @inheritdoc */ + on(hook, callback) { + this._hooks[hook] || (this._hooks[hook] = []), this._hooks[hook].push(callback); + } + /** @inheritdoc */ + /** @inheritdoc */ + emit(hook, ...rest) { + this._hooks[hook] && this._hooks[hook].forEach((callback) => callback(...rest)); + } + /** + * @inheritdoc + */ + sendEnvelope(envelope2) { + return this.emit("beforeEnvelope", envelope2), this._isEnabled() && this._transport ? this._transport.send(envelope2).then(null, (reason) => (debugBuild.DEBUG_BUILD && utils.logger.error("Error while sending event:", reason), reason)) : (debugBuild.DEBUG_BUILD && utils.logger.error("Transport disabled"), utils.resolvedSyncPromise({})); + } + /* eslint-enable @typescript-eslint/unified-signatures */ + /** Setup integrations for this client. */ + _setupIntegrations() { + let { integrations } = this._options; + this._integrations = integration.setupIntegrations(this, integrations), integration.afterSetupIntegrations(this, integrations); + } + /** Updates existing session based on the provided event */ + _updateSessionFromEvent(session$1, event) { + let crashed = !1, errored = !1, exceptions = event.exception && event.exception.values; + if (exceptions) { + errored = !0; + for (let ex of exceptions) { + let mechanism = ex.mechanism; + if (mechanism && mechanism.handled === !1) { + crashed = !0; + break; + } + } + } + let sessionNonTerminal = session$1.status === "ok"; + (sessionNonTerminal && session$1.errors === 0 || sessionNonTerminal && crashed) && (session.updateSession(session$1, { + ...crashed && { status: "crashed" }, + errors: session$1.errors || Number(errored || crashed) + }), this.captureSession(session$1)); + } + /** + * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying + * "no" (resolving to `false`) in order to give the client a chance to potentially finish first. + * + * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not + * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to + * `true`. + * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and + * `false` otherwise + */ + _isClientDoneProcessing(timeout) { + return new utils.SyncPromise((resolve) => { + let ticked = 0, tick = 1, interval = setInterval(() => { + this._numProcessing == 0 ? (clearInterval(interval), resolve(!0)) : (ticked += tick, timeout && ticked >= timeout && (clearInterval(interval), resolve(!1))); + }, tick); + }); + } + /** Determines whether this SDK is enabled and a transport is present. */ + _isEnabled() { + return this.getOptions().enabled !== !1 && this._transport !== void 0; + } + /** + * Adds common information to events. + * + * The information includes release and environment from `options`, + * breadcrumbs and context (extra, tags and user) from the scope. + * + * Information that is already present in the event is never overwritten. For + * nested objects, such as the context, keys are merged. + * + * @param event The original event. + * @param hint May contain additional information about the original exception. + * @param currentScope A scope containing event metadata. + * @returns A new event with more information. + */ + _prepareEvent(event, hint, currentScope, isolationScope = currentScopes.getIsolationScope()) { + let options = this.getOptions(), integrations = Object.keys(this._integrations); + return !hint.integrations && integrations.length > 0 && (hint.integrations = integrations), this.emit("preprocessEvent", event, hint), event.type || isolationScope.setLastEventId(event.event_id || hint.event_id), prepareEvent.prepareEvent(options, event, hint, currentScope, this, isolationScope).then((evt) => { + if (evt === null) + return evt; + let propagationContext = { + ...isolationScope.getPropagationContext(), + ...currentScope ? currentScope.getPropagationContext() : void 0 + }; + if (!(evt.contexts && evt.contexts.trace) && propagationContext) { + let { traceId: trace_id, spanId, parentSpanId, dsc } = propagationContext; + evt.contexts = { + trace: utils.dropUndefinedKeys({ + trace_id, + span_id: spanId, + parent_span_id: parentSpanId + }), + ...evt.contexts + }; + let dynamicSamplingContext$1 = dsc || dynamicSamplingContext.getDynamicSamplingContextFromClient(trace_id, this); + evt.sdkProcessingMetadata = { + dynamicSamplingContext: dynamicSamplingContext$1, + ...evt.sdkProcessingMetadata + }; + } + return evt; + }); + } + /** + * Processes the event and logs an error in case of rejection + * @param event + * @param hint + * @param scope + */ + _captureEvent(event, hint = {}, scope) { + return this._processEvent(event, hint, scope).then( + (finalEvent) => finalEvent.event_id, + (reason) => { + if (debugBuild.DEBUG_BUILD) { + let sentryError = reason; + sentryError.logLevel === "log" ? utils.logger.log(sentryError.message) : utils.logger.warn(sentryError); + } + } + ); + } + /** + * Processes an event (either error or message) and sends it to Sentry. + * + * This also adds breadcrumbs and context information to the event. However, + * platform specific meta data (such as the User's IP address) must be added + * by the SDK implementor. + * + * + * @param event The event to send to Sentry. + * @param hint May contain additional information about the original exception. + * @param currentScope A scope containing event metadata. + * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send. + */ + _processEvent(event, hint, currentScope) { + let options = this.getOptions(), { sampleRate } = options, isTransaction = isTransactionEvent(event), isError = isErrorEvent(event), eventType = event.type || "error", beforeSendLabel = `before send for type \`${eventType}\``, parsedSampleRate = typeof sampleRate > "u" ? void 0 : parseSampleRate.parseSampleRate(sampleRate); + if (isError && typeof parsedSampleRate == "number" && Math.random() > parsedSampleRate) + return this.recordDroppedEvent("sample_rate", "error", event), utils.rejectedSyncPromise( + new utils.SentryError( + `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`, + "log" + ) + ); + let dataCategory = eventType === "replay_event" ? "replay" : eventType, capturedSpanIsolationScope = (event.sdkProcessingMetadata || {}).capturedSpanIsolationScope; + return this._prepareEvent(event, hint, currentScope, capturedSpanIsolationScope).then((prepared) => { + if (prepared === null) + throw this.recordDroppedEvent("event_processor", dataCategory, event), new utils.SentryError("An event processor returned `null`, will not send event.", "log"); + if (hint.data && hint.data.__sentry__ === !0) + return prepared; + let result = processBeforeSend(options, prepared, hint); + return _validateBeforeSendResult(result, beforeSendLabel); + }).then((processedEvent) => { + if (processedEvent === null) + throw this.recordDroppedEvent("before_send", dataCategory, event), new utils.SentryError(`${beforeSendLabel} returned \`null\`, will not send event.`, "log"); + let session2 = currentScope && currentScope.getSession(); + !isTransaction && session2 && this._updateSessionFromEvent(session2, processedEvent); + let transactionInfo = processedEvent.transaction_info; + if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) { + let source = "custom"; + processedEvent.transaction_info = { + ...transactionInfo, + source + }; + } + return this.sendEvent(processedEvent, hint), processedEvent; + }).then(null, (reason) => { + throw reason instanceof utils.SentryError ? reason : (this.captureException(reason, { + data: { + __sentry__: !0 + }, + originalException: reason + }), new utils.SentryError( + `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. +Reason: ${reason}` + )); + }); + } + /** + * Occupies the client with processing and event + */ + _process(promise) { + this._numProcessing++, promise.then( + (value) => (this._numProcessing--, value), + (reason) => (this._numProcessing--, reason) + ); + } + /** + * Clears outcomes on this client and returns them. + */ + _clearOutcomes() { + let outcomes = this._outcomes; + return this._outcomes = {}, Object.keys(outcomes).map((key) => { + let [reason, category] = key.split(":"); + return { + reason, + category, + quantity: outcomes[key] + }; + }); + } + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + }; + function _validateBeforeSendResult(beforeSendResult, beforeSendLabel) { + let invalidValueError = `${beforeSendLabel} must return \`null\` or a valid event.`; + if (utils.isThenable(beforeSendResult)) + return beforeSendResult.then( + (event) => { + if (!utils.isPlainObject(event) && event !== null) + throw new utils.SentryError(invalidValueError); + return event; + }, + (e) => { + throw new utils.SentryError(`${beforeSendLabel} rejected with ${e}`); + } + ); + if (!utils.isPlainObject(beforeSendResult) && beforeSendResult !== null) + throw new utils.SentryError(invalidValueError); + return beforeSendResult; + } + function processBeforeSend(options, event, hint) { + let { beforeSend, beforeSendTransaction, beforeSendSpan } = options; + if (isErrorEvent(event) && beforeSend) + return beforeSend(event, hint); + if (isTransactionEvent(event)) { + if (event.spans && beforeSendSpan) { + let processedSpans = []; + for (let span of event.spans) { + let processedSpan = beforeSendSpan(span); + processedSpan && processedSpans.push(processedSpan); + } + event.spans = processedSpans; + } + if (beforeSendTransaction) + return beforeSendTransaction(event, hint); + } + return event; + } + function isErrorEvent(event) { + return event.type === void 0; + } + function isTransactionEvent(event) { + return event.type === "transaction"; + } + exports.BaseClient = BaseClient; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/checkin.js +var require_checkin = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/checkin.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function createCheckInEnvelope(checkIn, dynamicSamplingContext, metadata, tunnel, dsn) { + let headers = { + sent_at: (/* @__PURE__ */ new Date()).toISOString() + }; + metadata && metadata.sdk && (headers.sdk = { + name: metadata.sdk.name, + version: metadata.sdk.version + }), tunnel && dsn && (headers.dsn = utils.dsnToString(dsn)), dynamicSamplingContext && (headers.trace = utils.dropUndefinedKeys(dynamicSamplingContext)); + let item = createCheckInEnvelopeItem(checkIn); + return utils.createEnvelope(headers, [item]); + } + function createCheckInEnvelopeItem(checkIn) { + return [{ + type: "check_in" + }, checkIn]; + } + exports.createCheckInEnvelope = createCheckInEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/server-runtime-client.js +var require_server_runtime_client = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/server-runtime-client.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), baseclient = require_baseclient(), checkin = require_checkin(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), sessionflusher = require_sessionflusher(), errors = require_errors(), spanOnScope = require_spanOnScope(), spanUtils = require_spanUtils(), dynamicSamplingContext = require_dynamicSamplingContext(), ServerRuntimeClient = class extends baseclient.BaseClient { + /** + * Creates a new Edge SDK instance. + * @param options Configuration options for this SDK. + */ + constructor(options) { + errors.registerSpanErrorInstrumentation(), super(options); + } + /** + * @inheritDoc + */ + eventFromException(exception, hint) { + return utils.resolvedSyncPromise(utils.eventFromUnknownInput(this, this._options.stackParser, exception, hint)); + } + /** + * @inheritDoc + */ + eventFromMessage(message, level = "info", hint) { + return utils.resolvedSyncPromise( + utils.eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace) + ); + } + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + captureException(exception, hint, scope) { + if (this._options.autoSessionTracking && this._sessionFlusher) { + let requestSession = currentScopes.getIsolationScope().getRequestSession(); + requestSession && requestSession.status === "ok" && (requestSession.status = "errored"); + } + return super.captureException(exception, hint, scope); + } + /** + * @inheritDoc + */ + captureEvent(event, hint, scope) { + if (this._options.autoSessionTracking && this._sessionFlusher && (event.type || "exception") === "exception" && event.exception && event.exception.values && event.exception.values.length > 0) { + let requestSession = currentScopes.getIsolationScope().getRequestSession(); + requestSession && requestSession.status === "ok" && (requestSession.status = "errored"); + } + return super.captureEvent(event, hint, scope); + } + /** + * + * @inheritdoc + */ + close(timeout) { + return this._sessionFlusher && this._sessionFlusher.close(), super.close(timeout); + } + /** Method that initialises an instance of SessionFlusher on Client */ + initSessionFlusher() { + let { release, environment } = this._options; + release ? this._sessionFlusher = new sessionflusher.SessionFlusher(this, { + release, + environment + }) : debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot initialise an instance of SessionFlusher if no release is provided!"); + } + /** + * Create a cron monitor check in and send it to Sentry. + * + * @param checkIn An object that describes a check in. + * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want + * to create a monitor automatically when sending a check in. + */ + captureCheckIn(checkIn, monitorConfig, scope) { + let id = "checkInId" in checkIn && checkIn.checkInId ? checkIn.checkInId : utils.uuid4(); + if (!this._isEnabled()) + return debugBuild.DEBUG_BUILD && utils.logger.warn("SDK not enabled, will not capture checkin."), id; + let options = this.getOptions(), { release, environment, tunnel } = options, serializedCheckIn = { + check_in_id: id, + monitor_slug: checkIn.monitorSlug, + status: checkIn.status, + release, + environment + }; + "duration" in checkIn && (serializedCheckIn.duration = checkIn.duration), monitorConfig && (serializedCheckIn.monitor_config = { + schedule: monitorConfig.schedule, + checkin_margin: monitorConfig.checkinMargin, + max_runtime: monitorConfig.maxRuntime, + timezone: monitorConfig.timezone, + failure_issue_threshold: monitorConfig.failureIssueThreshold, + recovery_threshold: monitorConfig.recoveryThreshold + }); + let [dynamicSamplingContext2, traceContext] = this._getTraceInfoFromScope(scope); + traceContext && (serializedCheckIn.contexts = { + trace: traceContext + }); + let envelope = checkin.createCheckInEnvelope( + serializedCheckIn, + dynamicSamplingContext2, + this.getSdkMetadata(), + tunnel, + this.getDsn() + ); + return debugBuild.DEBUG_BUILD && utils.logger.info("Sending checkin:", checkIn.monitorSlug, checkIn.status), this.sendEnvelope(envelope), id; + } + /** + * Method responsible for capturing/ending a request session by calling `incrementSessionStatusCount` to increment + * appropriate session aggregates bucket + */ + _captureRequestSession() { + this._sessionFlusher ? this._sessionFlusher.incrementSessionStatusCount() : debugBuild.DEBUG_BUILD && utils.logger.warn("Discarded request mode session because autoSessionTracking option was disabled"); + } + /** + * @inheritDoc + */ + _prepareEvent(event, hint, scope, isolationScope) { + return this._options.platform && (event.platform = event.platform || this._options.platform), this._options.runtime && (event.contexts = { + ...event.contexts, + runtime: (event.contexts || {}).runtime || this._options.runtime + }), this._options.serverName && (event.server_name = event.server_name || this._options.serverName), super._prepareEvent(event, hint, scope, isolationScope); + } + /** Extract trace information from scope */ + _getTraceInfoFromScope(scope) { + if (!scope) + return [void 0, void 0]; + let span = spanOnScope._getSpanForScope(scope); + if (span) { + let rootSpan = spanUtils.getRootSpan(span); + return [dynamicSamplingContext.getDynamicSamplingContextFromSpan(rootSpan), spanUtils.spanToTraceContext(rootSpan)]; + } + let { traceId, spanId, parentSpanId, dsc } = scope.getPropagationContext(), traceContext = { + trace_id: traceId, + span_id: spanId, + parent_span_id: parentSpanId + }; + return dsc ? [dsc, traceContext] : [dynamicSamplingContext.getDynamicSamplingContextFromClient(traceId, this), traceContext]; + } + }; + exports.ServerRuntimeClient = ServerRuntimeClient; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/sdk.js +var require_sdk = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/sdk.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(); + function initAndBind(clientClass, options) { + options.debug === !0 && (debugBuild.DEBUG_BUILD ? utils.logger.enable() : utils.consoleSandbox(() => { + console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."); + })), currentScopes.getCurrentScope().update(options.initialScope); + let client = new clientClass(options); + setCurrentClient(client), client.init(); + } + function setCurrentClient(client) { + currentScopes.getCurrentScope().setClient(client); + } + exports.initAndBind = initAndBind; + exports.setCurrentClient = setCurrentClient; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/base.js +var require_base = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/base.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), DEFAULT_TRANSPORT_BUFFER_SIZE = 64; + function createTransport(options, makeRequest, buffer = utils.makePromiseBuffer( + options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE + )) { + let rateLimits = {}, flush = (timeout) => buffer.drain(timeout); + function send(envelope) { + let filteredEnvelopeItems = []; + if (utils.forEachEnvelopeItem(envelope, (item, type) => { + let dataCategory = utils.envelopeItemTypeToDataCategory(type); + if (utils.isRateLimited(rateLimits, dataCategory)) { + let event = getEventForEnvelopeItem(item, type); + options.recordDroppedEvent("ratelimit_backoff", dataCategory, event); + } else + filteredEnvelopeItems.push(item); + }), filteredEnvelopeItems.length === 0) + return utils.resolvedSyncPromise({}); + let filteredEnvelope = utils.createEnvelope(envelope[0], filteredEnvelopeItems), recordEnvelopeLoss = (reason) => { + utils.forEachEnvelopeItem(filteredEnvelope, (item, type) => { + let event = getEventForEnvelopeItem(item, type); + options.recordDroppedEvent(reason, utils.envelopeItemTypeToDataCategory(type), event); + }); + }, requestTask = () => makeRequest({ body: utils.serializeEnvelope(filteredEnvelope) }).then( + (response) => (response.statusCode !== void 0 && (response.statusCode < 200 || response.statusCode >= 300) && debugBuild.DEBUG_BUILD && utils.logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`), rateLimits = utils.updateRateLimits(rateLimits, response), response), + (error) => { + throw recordEnvelopeLoss("network_error"), error; + } + ); + return buffer.add(requestTask).then( + (result) => result, + (error) => { + if (error instanceof utils.SentryError) + return debugBuild.DEBUG_BUILD && utils.logger.error("Skipped sending event because buffer is full."), recordEnvelopeLoss("queue_overflow"), utils.resolvedSyncPromise({}); + throw error; + } + ); + } + return { + send, + flush + }; + } + function getEventForEnvelopeItem(item, type) { + if (!(type !== "event" && type !== "transaction")) + return Array.isArray(item) ? item[1] : void 0; + } + exports.DEFAULT_TRANSPORT_BUFFER_SIZE = DEFAULT_TRANSPORT_BUFFER_SIZE; + exports.createTransport = createTransport; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/offline.js +var require_offline = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/offline.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), MIN_DELAY = 100, START_DELAY = 5e3, MAX_DELAY = 36e5; + function makeOfflineTransport(createTransport) { + function log(...args) { + debugBuild.DEBUG_BUILD && utils.logger.info("[Offline]:", ...args); + } + return (options) => { + let transport = createTransport(options); + if (!options.createStore) + throw new Error("No `createStore` function was provided"); + let store = options.createStore(options), retryDelay = START_DELAY, flushTimer; + function shouldQueue(env, error, retryDelay2) { + return utils.envelopeContainsItemType(env, ["client_report"]) ? !1 : options.shouldStore ? options.shouldStore(env, error, retryDelay2) : !0; + } + function flushIn(delay) { + flushTimer && clearTimeout(flushTimer), flushTimer = setTimeout(async () => { + flushTimer = void 0; + let found = await store.shift(); + found && (log("Attempting to send previously queued event"), found[0].sent_at = (/* @__PURE__ */ new Date()).toISOString(), send(found, !0).catch((e) => { + log("Failed to retry sending", e); + })); + }, delay), typeof flushTimer != "number" && flushTimer.unref && flushTimer.unref(); + } + function flushWithBackOff() { + flushTimer || (flushIn(retryDelay), retryDelay = Math.min(retryDelay * 2, MAX_DELAY)); + } + async function send(envelope, isRetry = !1) { + if (!isRetry && utils.envelopeContainsItemType(envelope, ["replay_event", "replay_recording"])) + return await store.push(envelope), flushIn(MIN_DELAY), {}; + try { + let result = await transport.send(envelope), delay = MIN_DELAY; + if (result) { + if (result.headers && result.headers["retry-after"]) + delay = utils.parseRetryAfterHeader(result.headers["retry-after"]); + else if (result.headers && result.headers["x-sentry-rate-limits"]) + delay = 6e4; + else if ((result.statusCode || 0) >= 400) + return result; + } + return flushIn(delay), retryDelay = START_DELAY, result; + } catch (e) { + if (await shouldQueue(envelope, e, retryDelay)) + return isRetry ? await store.unshift(envelope) : await store.push(envelope), flushWithBackOff(), log("Error sending. Event queued.", e), {}; + throw e; + } + } + return options.flushAtStartup && flushWithBackOff(), { + send, + flush: (t) => transport.flush(t) + }; + }; + } + exports.MIN_DELAY = MIN_DELAY; + exports.START_DELAY = START_DELAY; + exports.makeOfflineTransport = makeOfflineTransport; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/multiplexed.js +var require_multiplexed = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/multiplexed.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), api = require_api(); + function eventFromEnvelope(env, types) { + let event; + return utils.forEachEnvelopeItem(env, (item, type) => (types.includes(type) && (event = Array.isArray(item) ? item[1] : void 0), !!event)), event; + } + function makeOverrideReleaseTransport(createTransport, release) { + return (options) => { + let transport = createTransport(options); + return { + ...transport, + send: async (envelope) => { + let event = eventFromEnvelope(envelope, ["event", "transaction", "profile", "replay_event"]); + return event && (event.release = release), transport.send(envelope); + } + }; + }; + } + function overrideDsn(envelope, dsn) { + return utils.createEnvelope( + dsn ? { + ...envelope[0], + dsn + } : envelope[0], + envelope[1] + ); + } + function makeMultiplexedTransport(createTransport, matcher) { + return (options) => { + let fallbackTransport = createTransport(options), otherTransports = /* @__PURE__ */ new Map(); + function getTransport(dsn, release) { + let key = release ? `${dsn}:${release}` : dsn, transport = otherTransports.get(key); + if (!transport) { + let validatedDsn = utils.dsnFromString(dsn); + if (!validatedDsn) + return; + let url = api.getEnvelopeEndpointWithUrlEncodedAuth(validatedDsn, options.tunnel); + transport = release ? makeOverrideReleaseTransport(createTransport, release)({ ...options, url }) : createTransport({ ...options, url }), otherTransports.set(key, transport); + } + return [dsn, transport]; + } + async function send(envelope) { + function getEvent(types) { + let eventTypes = types && types.length ? types : ["event"]; + return eventFromEnvelope(envelope, eventTypes); + } + let transports = matcher({ envelope, getEvent }).map((result) => typeof result == "string" ? getTransport(result, void 0) : getTransport(result.dsn, result.release)).filter((t) => !!t); + return transports.length === 0 && transports.push(["", fallbackTransport]), (await Promise.all( + transports.map(([dsn, transport]) => transport.send(overrideDsn(envelope, dsn))) + ))[0]; + } + async function flush(timeout) { + let allTransports = [...otherTransports.values(), fallbackTransport]; + return (await Promise.all(allTransports.map((transport) => transport.flush(timeout)))).every((r) => r); + } + return { + send, + flush + }; + }; + } + exports.eventFromEnvelope = eventFromEnvelope; + exports.makeMultiplexedTransport = makeMultiplexedTransport; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/isSentryRequestUrl.js +var require_isSentryRequestUrl = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/isSentryRequestUrl.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function isSentryRequestUrl(url, client) { + let dsn = client && client.getDsn(), tunnel = client && client.getOptions().tunnel; + return checkDsn(url, dsn) || checkTunnel(url, tunnel); + } + function checkTunnel(url, tunnel) { + return tunnel ? removeTrailingSlash(url) === removeTrailingSlash(tunnel) : !1; + } + function checkDsn(url, dsn) { + return dsn ? url.includes(dsn.host) : !1; + } + function removeTrailingSlash(str) { + return str[str.length - 1] === "/" ? str.slice(0, -1) : str; + } + exports.isSentryRequestUrl = isSentryRequestUrl; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/parameterize.js +var require_parameterize = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/parameterize.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function parameterize(strings, ...values) { + let formatted = new String(String.raw(strings, ...values)); + return formatted.__sentry_template_string__ = strings.join("\0").replace(/%/g, "%%").replace(/\0/g, "%s"), formatted.__sentry_template_values__ = values, formatted; + } + exports.parameterize = parameterize; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/sdkMetadata.js +var require_sdkMetadata = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/sdkMetadata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function applySdkMetadata(options, name, names = [name], source = "npm") { + let metadata = options._metadata || {}; + metadata.sdk || (metadata.sdk = { + name: `sentry.javascript.${name}`, + packages: names.map((name2) => ({ + name: `${source}:@sentry/${name2}`, + version: utils.SDK_VERSION + })), + version: utils.SDK_VERSION + }), options._metadata = metadata; + } + exports.applySdkMetadata = applySdkMetadata; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/breadcrumbs.js +var require_breadcrumbs = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/breadcrumbs.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), DEFAULT_BREADCRUMBS = 100; + function addBreadcrumb(breadcrumb, hint) { + let client = currentScopes.getClient(), isolationScope = currentScopes.getIsolationScope(); + if (!client) return; + let { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = client.getOptions(); + if (maxBreadcrumbs <= 0) return; + let mergedBreadcrumb = { timestamp: utils.dateTimestampInSeconds(), ...breadcrumb }, finalBreadcrumb = beforeBreadcrumb ? utils.consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) : mergedBreadcrumb; + finalBreadcrumb !== null && (client.emit && client.emit("beforeAddBreadcrumb", finalBreadcrumb, hint), isolationScope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs)); + } + exports.addBreadcrumb = addBreadcrumb; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/functiontostring.js +var require_functiontostring = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/functiontostring.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), integration = require_integration(), originalFunctionToString, INTEGRATION_NAME = "FunctionToString", SETUP_CLIENTS = /* @__PURE__ */ new WeakMap(), _functionToStringIntegration = () => ({ + name: INTEGRATION_NAME, + setupOnce() { + originalFunctionToString = Function.prototype.toString; + try { + Function.prototype.toString = function(...args) { + let originalFunction = utils.getOriginalFunction(this), context = SETUP_CLIENTS.has(currentScopes.getClient()) && originalFunction !== void 0 ? originalFunction : this; + return originalFunctionToString.apply(context, args); + }; + } catch { + } + }, + setup(client) { + SETUP_CLIENTS.set(client, !0); + } + }), functionToStringIntegration = integration.defineIntegration(_functionToStringIntegration); + exports.functionToStringIntegration = functionToStringIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/inboundfilters.js +var require_inboundfilters = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/inboundfilters.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), integration = require_integration(), DEFAULT_IGNORE_ERRORS = [ + /^Script error\.?$/, + /^Javascript error: Script error\.? on line 0$/, + /^ResizeObserver loop completed with undelivered notifications.$/, + // The browser logs this when a ResizeObserver handler takes a bit longer. Usually this is not an actual issue though. It indicates slowness. + /^Cannot redefine property: googletag$/, + // This is thrown when google tag manager is used in combination with an ad blocker + "undefined is not an object (evaluating 'a.L')", + // Random error that happens but not actionable or noticeable to end-users. + `can't redefine non-configurable property "solana"`, + // Probably a browser extension or custom browser (Brave) throwing this error + "vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)", + // Error thrown by GTM, seemingly not affecting end-users + "Can't find variable: _AutofillCallbackHandler" + // Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/ + ], INTEGRATION_NAME = "InboundFilters", _inboundFiltersIntegration = (options = {}) => ({ + name: INTEGRATION_NAME, + processEvent(event, _hint, client) { + let clientOptions = client.getOptions(), mergedOptions = _mergeOptions(options, clientOptions); + return _shouldDropEvent(event, mergedOptions) ? null : event; + } + }), inboundFiltersIntegration = integration.defineIntegration(_inboundFiltersIntegration); + function _mergeOptions(internalOptions = {}, clientOptions = {}) { + return { + allowUrls: [...internalOptions.allowUrls || [], ...clientOptions.allowUrls || []], + denyUrls: [...internalOptions.denyUrls || [], ...clientOptions.denyUrls || []], + ignoreErrors: [ + ...internalOptions.ignoreErrors || [], + ...clientOptions.ignoreErrors || [], + ...internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS + ], + ignoreTransactions: [...internalOptions.ignoreTransactions || [], ...clientOptions.ignoreTransactions || []], + ignoreInternal: internalOptions.ignoreInternal !== void 0 ? internalOptions.ignoreInternal : !0 + }; + } + function _shouldDropEvent(event, options) { + return options.ignoreInternal && _isSentryError(event) ? (debugBuild.DEBUG_BUILD && utils.logger.warn(`Event dropped due to being internal Sentry Error. +Event: ${utils.getEventDescription(event)}`), !0) : _isIgnoredError(event, options.ignoreErrors) ? (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to being matched by \`ignoreErrors\` option. +Event: ${utils.getEventDescription(event)}` + ), !0) : _isUselessError(event) ? (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to not having an error message, error type or stacktrace. +Event: ${utils.getEventDescription( + event + )}` + ), !0) : _isIgnoredTransaction(event, options.ignoreTransactions) ? (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to being matched by \`ignoreTransactions\` option. +Event: ${utils.getEventDescription(event)}` + ), !0) : _isDeniedUrl(event, options.denyUrls) ? (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to being matched by \`denyUrls\` option. +Event: ${utils.getEventDescription( + event + )}. +Url: ${_getEventFilterUrl(event)}` + ), !0) : _isAllowedUrl(event, options.allowUrls) ? !1 : (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to not being matched by \`allowUrls\` option. +Event: ${utils.getEventDescription( + event + )}. +Url: ${_getEventFilterUrl(event)}` + ), !0); + } + function _isIgnoredError(event, ignoreErrors) { + return event.type || !ignoreErrors || !ignoreErrors.length ? !1 : _getPossibleEventMessages(event).some((message) => utils.stringMatchesSomePattern(message, ignoreErrors)); + } + function _isIgnoredTransaction(event, ignoreTransactions) { + if (event.type !== "transaction" || !ignoreTransactions || !ignoreTransactions.length) + return !1; + let name = event.transaction; + return name ? utils.stringMatchesSomePattern(name, ignoreTransactions) : !1; + } + function _isDeniedUrl(event, denyUrls) { + if (!denyUrls || !denyUrls.length) + return !1; + let url = _getEventFilterUrl(event); + return url ? utils.stringMatchesSomePattern(url, denyUrls) : !1; + } + function _isAllowedUrl(event, allowUrls) { + if (!allowUrls || !allowUrls.length) + return !0; + let url = _getEventFilterUrl(event); + return url ? utils.stringMatchesSomePattern(url, allowUrls) : !0; + } + function _getPossibleEventMessages(event) { + let possibleMessages = []; + event.message && possibleMessages.push(event.message); + let lastException; + try { + lastException = event.exception.values[event.exception.values.length - 1]; + } catch { + } + return lastException && lastException.value && (possibleMessages.push(lastException.value), lastException.type && possibleMessages.push(`${lastException.type}: ${lastException.value}`)), possibleMessages; + } + function _isSentryError(event) { + try { + return event.exception.values[0].type === "SentryError"; + } catch { + } + return !1; + } + function _getLastValidUrl(frames = []) { + for (let i = frames.length - 1; i >= 0; i--) { + let frame = frames[i]; + if (frame && frame.filename !== "" && frame.filename !== "[native code]") + return frame.filename || null; + } + return null; + } + function _getEventFilterUrl(event) { + try { + let frames; + try { + frames = event.exception.values[0].stacktrace.frames; + } catch { + } + return frames ? _getLastValidUrl(frames) : null; + } catch { + return debugBuild.DEBUG_BUILD && utils.logger.error(`Cannot extract url for event ${utils.getEventDescription(event)}`), null; + } + } + function _isUselessError(event) { + return event.type || !event.exception || !event.exception.values || event.exception.values.length === 0 ? !1 : ( + // No top-level message + !event.message && // There are no exception values that have a stacktrace, a non-generic-Error type or value + !event.exception.values.some((value) => value.stacktrace || value.type && value.type !== "Error" || value.value) + ); + } + exports.inboundFiltersIntegration = inboundFiltersIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/linkederrors.js +var require_linkederrors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/linkederrors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), DEFAULT_KEY = "cause", DEFAULT_LIMIT = 5, INTEGRATION_NAME = "LinkedErrors", _linkedErrorsIntegration = (options = {}) => { + let limit = options.limit || DEFAULT_LIMIT, key = options.key || DEFAULT_KEY; + return { + name: INTEGRATION_NAME, + preprocessEvent(event, hint, client) { + let options2 = client.getOptions(); + utils.applyAggregateErrorsToEvent( + utils.exceptionFromError, + options2.stackParser, + options2.maxValueLength, + key, + limit, + event, + hint + ); + } + }; + }, linkedErrorsIntegration = integration.defineIntegration(_linkedErrorsIntegration); + exports.linkedErrorsIntegration = linkedErrorsIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metadata.js +var require_metadata = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metadata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), filenameMetadataMap = /* @__PURE__ */ new Map(), parsedStacks = /* @__PURE__ */ new Set(); + function ensureMetadataStacksAreParsed(parser) { + if (utils.GLOBAL_OBJ._sentryModuleMetadata) + for (let stack of Object.keys(utils.GLOBAL_OBJ._sentryModuleMetadata)) { + let metadata = utils.GLOBAL_OBJ._sentryModuleMetadata[stack]; + if (parsedStacks.has(stack)) + continue; + parsedStacks.add(stack); + let frames = parser(stack); + for (let frame of frames.reverse()) + if (frame.filename) { + filenameMetadataMap.set(frame.filename, metadata); + break; + } + } + } + function getMetadataForUrl(parser, filename) { + return ensureMetadataStacksAreParsed(parser), filenameMetadataMap.get(filename); + } + function addMetadataToStackFrames(parser, event) { + try { + event.exception.values.forEach((exception) => { + if (exception.stacktrace) + for (let frame of exception.stacktrace.frames || []) { + if (!frame.filename || frame.module_metadata) + continue; + let metadata = getMetadataForUrl(parser, frame.filename); + metadata && (frame.module_metadata = metadata); + } + }); + } catch { + } + } + function stripMetadataFromStackFrames(event) { + try { + event.exception.values.forEach((exception) => { + if (exception.stacktrace) + for (let frame of exception.stacktrace.frames || []) + delete frame.module_metadata; + }); + } catch { + } + } + exports.addMetadataToStackFrames = addMetadataToStackFrames; + exports.getMetadataForUrl = getMetadataForUrl; + exports.stripMetadataFromStackFrames = stripMetadataFromStackFrames; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/metadata.js +var require_metadata2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/metadata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), metadata = require_metadata(), INTEGRATION_NAME = "ModuleMetadata", _moduleMetadataIntegration = () => ({ + name: INTEGRATION_NAME, + setup(client) { + client.on("beforeEnvelope", (envelope) => { + utils.forEachEnvelopeItem(envelope, (item, type) => { + if (type === "event") { + let event = Array.isArray(item) ? item[1] : void 0; + event && (metadata.stripMetadataFromStackFrames(event), item[1] = event); + } + }); + }); + }, + processEvent(event, _hint, client) { + let stackParser = client.getOptions().stackParser; + return metadata.addMetadataToStackFrames(stackParser, event), event; + } + }), moduleMetadataIntegration = integration.defineIntegration(_moduleMetadataIntegration); + exports.moduleMetadataIntegration = moduleMetadataIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/requestdata.js +var require_requestdata2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/requestdata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), DEFAULT_OPTIONS = { + include: { + cookies: !0, + data: !0, + headers: !0, + ip: !1, + query_string: !0, + url: !0, + user: { + id: !0, + username: !0, + email: !0 + } + }, + transactionNamingScheme: "methodPath" + }, INTEGRATION_NAME = "RequestData", _requestDataIntegration = (options = {}) => { + let _options = { + ...DEFAULT_OPTIONS, + ...options, + include: { + ...DEFAULT_OPTIONS.include, + ...options.include, + user: options.include && typeof options.include.user == "boolean" ? options.include.user : { + ...DEFAULT_OPTIONS.include.user, + // Unclear why TS still thinks `options.include.user` could be a boolean at this point + ...(options.include || {}).user + } + } + }; + return { + name: INTEGRATION_NAME, + processEvent(event) { + let { sdkProcessingMetadata = {} } = event, req = sdkProcessingMetadata.request; + if (!req) + return event; + let addRequestDataOptions = convertReqDataIntegrationOptsToAddReqDataOpts(_options); + return utils.addRequestDataToEvent(event, req, addRequestDataOptions); + } + }; + }, requestDataIntegration = integration.defineIntegration(_requestDataIntegration); + function convertReqDataIntegrationOptsToAddReqDataOpts(integrationOptions) { + let { + transactionNamingScheme, + include: { ip, user, ...requestOptions } + } = integrationOptions, requestIncludeKeys = ["method"]; + for (let [key, value] of Object.entries(requestOptions)) + value && requestIncludeKeys.push(key); + let addReqDataUserOpt; + if (user === void 0) + addReqDataUserOpt = !0; + else if (typeof user == "boolean") + addReqDataUserOpt = user; + else { + let userIncludeKeys = []; + for (let [key, value] of Object.entries(user)) + value && userIncludeKeys.push(key); + addReqDataUserOpt = userIncludeKeys; + } + return { + include: { + ip, + user: addReqDataUserOpt, + request: requestIncludeKeys.length !== 0 ? requestIncludeKeys : void 0, + transaction: transactionNamingScheme + } + }; + } + exports.requestDataIntegration = requestDataIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/captureconsole.js +var require_captureconsole = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/captureconsole.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), exports$1 = require_exports(), integration = require_integration(), INTEGRATION_NAME = "CaptureConsole", _captureConsoleIntegration = (options = {}) => { + let levels = options.levels || utils.CONSOLE_LEVELS; + return { + name: INTEGRATION_NAME, + setup(client) { + "console" in utils.GLOBAL_OBJ && utils.addConsoleInstrumentationHandler(({ args, level }) => { + currentScopes.getClient() !== client || !levels.includes(level) || consoleHandler(args, level); + }); + } + }; + }, captureConsoleIntegration = integration.defineIntegration(_captureConsoleIntegration); + function consoleHandler(args, level) { + let captureContext = { + level: utils.severityLevelFromString(level), + extra: { + arguments: args + } + }; + currentScopes.withScope((scope) => { + if (scope.addEventProcessor((event) => (event.logger = "console", utils.addExceptionMechanism(event, { + handled: !1, + type: "console" + }), event)), level === "assert") { + if (!args[0]) { + let message2 = `Assertion failed: ${utils.safeJoin(args.slice(1), " ") || "console.assert"}`; + scope.setExtra("arguments", args.slice(1)), exports$1.captureMessage(message2, captureContext); + } + return; + } + let error = args.find((arg) => arg instanceof Error); + if (error) { + exports$1.captureException(error, captureContext); + return; + } + let message = utils.safeJoin(args, " "); + exports$1.captureMessage(message, captureContext); + }); + } + exports.captureConsoleIntegration = captureConsoleIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/debug.js +var require_debug = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/debug.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), INTEGRATION_NAME = "Debug", _debugIntegration = (options = {}) => { + let _options = { + debugger: !1, + stringify: !1, + ...options + }; + return { + name: INTEGRATION_NAME, + setup(client) { + client.on("beforeSendEvent", (event, hint) => { + if (_options.debugger) + debugger; + utils.consoleSandbox(() => { + _options.stringify ? (console.log(JSON.stringify(event, null, 2)), hint && Object.keys(hint).length && console.log(JSON.stringify(hint, null, 2))) : (console.log(event), hint && Object.keys(hint).length && console.log(hint)); + }); + }); + } + }; + }, debugIntegration = integration.defineIntegration(_debugIntegration); + exports.debugIntegration = debugIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/dedupe.js +var require_dedupe = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/dedupe.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), debugBuild = require_debug_build2(), INTEGRATION_NAME = "Dedupe", _dedupeIntegration = () => { + let previousEvent; + return { + name: INTEGRATION_NAME, + processEvent(currentEvent) { + if (currentEvent.type) + return currentEvent; + try { + if (_shouldDropEvent(currentEvent, previousEvent)) + return debugBuild.DEBUG_BUILD && utils.logger.warn("Event dropped due to being a duplicate of previously captured event."), null; + } catch { + } + return previousEvent = currentEvent; + } + }; + }, dedupeIntegration = integration.defineIntegration(_dedupeIntegration); + function _shouldDropEvent(currentEvent, previousEvent) { + return previousEvent ? !!(_isSameMessageEvent(currentEvent, previousEvent) || _isSameExceptionEvent(currentEvent, previousEvent)) : !1; + } + function _isSameMessageEvent(currentEvent, previousEvent) { + let currentMessage = currentEvent.message, previousMessage = previousEvent.message; + return !(!currentMessage && !previousMessage || currentMessage && !previousMessage || !currentMessage && previousMessage || currentMessage !== previousMessage || !_isSameFingerprint(currentEvent, previousEvent) || !_isSameStacktrace(currentEvent, previousEvent)); + } + function _isSameExceptionEvent(currentEvent, previousEvent) { + let previousException = _getExceptionFromEvent(previousEvent), currentException = _getExceptionFromEvent(currentEvent); + return !(!previousException || !currentException || previousException.type !== currentException.type || previousException.value !== currentException.value || !_isSameFingerprint(currentEvent, previousEvent) || !_isSameStacktrace(currentEvent, previousEvent)); + } + function _isSameStacktrace(currentEvent, previousEvent) { + let currentFrames = utils.getFramesFromEvent(currentEvent), previousFrames = utils.getFramesFromEvent(previousEvent); + if (!currentFrames && !previousFrames) + return !0; + if (currentFrames && !previousFrames || !currentFrames && previousFrames || (currentFrames = currentFrames, previousFrames = previousFrames, previousFrames.length !== currentFrames.length)) + return !1; + for (let i = 0; i < previousFrames.length; i++) { + let frameA = previousFrames[i], frameB = currentFrames[i]; + if (frameA.filename !== frameB.filename || frameA.lineno !== frameB.lineno || frameA.colno !== frameB.colno || frameA.function !== frameB.function) + return !1; + } + return !0; + } + function _isSameFingerprint(currentEvent, previousEvent) { + let currentFingerprint = currentEvent.fingerprint, previousFingerprint = previousEvent.fingerprint; + if (!currentFingerprint && !previousFingerprint) + return !0; + if (currentFingerprint && !previousFingerprint || !currentFingerprint && previousFingerprint) + return !1; + currentFingerprint = currentFingerprint, previousFingerprint = previousFingerprint; + try { + return currentFingerprint.join("") === previousFingerprint.join(""); + } catch { + return !1; + } + } + function _getExceptionFromEvent(event) { + return event.exception && event.exception.values && event.exception.values[0]; + } + exports._shouldDropEvent = _shouldDropEvent; + exports.dedupeIntegration = dedupeIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/extraerrordata.js +var require_extraerrordata = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/extraerrordata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), debugBuild = require_debug_build2(), INTEGRATION_NAME = "ExtraErrorData", _extraErrorDataIntegration = (options = {}) => { + let { depth = 3, captureErrorCause = !0 } = options; + return { + name: INTEGRATION_NAME, + processEvent(event, hint) { + return _enhanceEventWithErrorData(event, hint, depth, captureErrorCause); + } + }; + }, extraErrorDataIntegration = integration.defineIntegration(_extraErrorDataIntegration); + function _enhanceEventWithErrorData(event, hint = {}, depth, captureErrorCause) { + if (!hint.originalException || !utils.isError(hint.originalException)) + return event; + let exceptionName = hint.originalException.name || hint.originalException.constructor.name, errorData = _extractErrorData(hint.originalException, captureErrorCause); + if (errorData) { + let contexts = { + ...event.contexts + }, normalizedErrorData = utils.normalize(errorData, depth); + return utils.isPlainObject(normalizedErrorData) && (utils.addNonEnumerableProperty(normalizedErrorData, "__sentry_skip_normalization__", !0), contexts[exceptionName] = normalizedErrorData), { + ...event, + contexts + }; + } + return event; + } + function _extractErrorData(error, captureErrorCause) { + try { + let nativeKeys = [ + "name", + "message", + "stack", + "line", + "column", + "fileName", + "lineNumber", + "columnNumber", + "toJSON" + ], extraErrorInfo = {}; + for (let key of Object.keys(error)) { + if (nativeKeys.indexOf(key) !== -1) + continue; + let value = error[key]; + extraErrorInfo[key] = utils.isError(value) ? value.toString() : value; + } + if (captureErrorCause && error.cause !== void 0 && (extraErrorInfo.cause = utils.isError(error.cause) ? error.cause.toString() : error.cause), typeof error.toJSON == "function") { + let serializedError = error.toJSON(); + for (let key of Object.keys(serializedError)) { + let value = serializedError[key]; + extraErrorInfo[key] = utils.isError(value) ? value.toString() : value; + } + } + return extraErrorInfo; + } catch (oO) { + debugBuild.DEBUG_BUILD && utils.logger.error("Unable to extract extra data from the Error object:", oO); + } + return null; + } + exports.extraErrorDataIntegration = extraErrorDataIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/rewriteframes.js +var require_rewriteframes = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/rewriteframes.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), INTEGRATION_NAME = "RewriteFrames", rewriteFramesIntegration2 = integration.defineIntegration((options = {}) => { + let root = options.root, prefix = options.prefix || "app:///", isBrowser = "window" in utils.GLOBAL_OBJ && utils.GLOBAL_OBJ.window !== void 0, iteratee = options.iteratee || generateIteratee({ isBrowser, root, prefix }); + function _processExceptionsEvent(event) { + try { + return { + ...event, + exception: { + ...event.exception, + // The check for this is performed inside `process` call itself, safe to skip here + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + values: event.exception.values.map((value) => ({ + ...value, + ...value.stacktrace && { stacktrace: _processStacktrace(value.stacktrace) } + })) + } + }; + } catch { + return event; + } + } + function _processStacktrace(stacktrace) { + return { + ...stacktrace, + frames: stacktrace && stacktrace.frames && stacktrace.frames.map((f) => iteratee(f)) + }; + } + return { + name: INTEGRATION_NAME, + processEvent(originalEvent) { + let processedEvent = originalEvent; + return originalEvent.exception && Array.isArray(originalEvent.exception.values) && (processedEvent = _processExceptionsEvent(processedEvent)), processedEvent; + } + }; + }); + function generateIteratee({ + isBrowser, + root, + prefix + }) { + return (frame) => { + if (!frame.filename) + return frame; + let isWindowsFrame = /^[a-zA-Z]:\\/.test(frame.filename) || // or the presence of a backslash without a forward slash (which are not allowed on Windows) + frame.filename.includes("\\") && !frame.filename.includes("/"), startsWithSlash = /^\//.test(frame.filename); + if (isBrowser) { + if (root) { + let oldFilename = frame.filename; + oldFilename.indexOf(root) === 0 && (frame.filename = oldFilename.replace(root, prefix)); + } + } else if (isWindowsFrame || startsWithSlash) { + let filename = isWindowsFrame ? frame.filename.replace(/^[a-zA-Z]:/, "").replace(/\\/g, "/") : frame.filename, base = root ? utils.relative(root, filename) : utils.basename(filename); + frame.filename = `${prefix}${base}`; + } + return frame; + }; + } + exports.generateIteratee = generateIteratee; + exports.rewriteFramesIntegration = rewriteFramesIntegration2; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/sessiontiming.js +var require_sessiontiming = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/sessiontiming.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), INTEGRATION_NAME = "SessionTiming", _sessionTimingIntegration = () => { + let startTime = utils.timestampInSeconds() * 1e3; + return { + name: INTEGRATION_NAME, + processEvent(event) { + let now = utils.timestampInSeconds() * 1e3; + return { + ...event, + extra: { + ...event.extra, + "session:start": startTime, + "session:duration": now - startTime, + "session:end": now + } + }; + } + }; + }, sessionTimingIntegration = integration.defineIntegration(_sessionTimingIntegration); + exports.sessionTimingIntegration = sessionTimingIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/zoderrors.js +var require_zoderrors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/zoderrors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), DEFAULT_LIMIT = 10, INTEGRATION_NAME = "ZodErrors"; + function originalExceptionIsZodError(originalException) { + return utils.isError(originalException) && originalException.name === "ZodError" && Array.isArray(originalException.errors); + } + function formatIssueTitle(issue) { + return { + ...issue, + path: "path" in issue && Array.isArray(issue.path) ? issue.path.join(".") : void 0, + keys: "keys" in issue ? JSON.stringify(issue.keys) : void 0, + unionErrors: "unionErrors" in issue ? JSON.stringify(issue.unionErrors) : void 0 + }; + } + function formatIssueMessage(zodError) { + let errorKeyMap = /* @__PURE__ */ new Set(); + for (let iss of zodError.issues) + iss.path && errorKeyMap.add(iss.path[0]); + let errorKeys = Array.from(errorKeyMap); + return `Failed to validate keys: ${utils.truncate(errorKeys.join(", "), 100)}`; + } + function applyZodErrorsToEvent(limit, event, hint) { + return !event.exception || !event.exception.values || !hint || !hint.originalException || !originalExceptionIsZodError(hint.originalException) || hint.originalException.issues.length === 0 ? event : { + ...event, + exception: { + ...event.exception, + values: [ + { + ...event.exception.values[0], + value: formatIssueMessage(hint.originalException) + }, + ...event.exception.values.slice(1) + ] + }, + extra: { + ...event.extra, + "zoderror.issues": hint.originalException.errors.slice(0, limit).map(formatIssueTitle) + } + }; + } + var _zodErrorsIntegration = (options = {}) => { + let limit = options.limit || DEFAULT_LIMIT; + return { + name: INTEGRATION_NAME, + processEvent(originalEvent, hint) { + return applyZodErrorsToEvent(limit, originalEvent, hint); + } + }; + }, zodErrorsIntegration = integration.defineIntegration(_zodErrorsIntegration); + exports.applyZodErrorsToEvent = applyZodErrorsToEvent; + exports.zodErrorsIntegration = zodErrorsIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/third-party-errors-filter.js +var require_third_party_errors_filter = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/third-party-errors-filter.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), metadata = require_metadata(), thirdPartyErrorFilterIntegration = integration.defineIntegration((options) => ({ + name: "ThirdPartyErrorsFilter", + setup(client) { + client.on("beforeEnvelope", (envelope) => { + utils.forEachEnvelopeItem(envelope, (item, type) => { + if (type === "event") { + let event = Array.isArray(item) ? item[1] : void 0; + event && (metadata.stripMetadataFromStackFrames(event), item[1] = event); + } + }); + }); + }, + processEvent(event, _hint, client) { + let stackParser = client.getOptions().stackParser; + metadata.addMetadataToStackFrames(stackParser, event); + let frameKeys = getBundleKeysForAllFramesWithFilenames(event); + if (frameKeys) { + let arrayMethod = options.behaviour === "drop-error-if-contains-third-party-frames" || options.behaviour === "apply-tag-if-contains-third-party-frames" ? "some" : "every"; + if (frameKeys[arrayMethod]((keys) => !keys.some((key) => options.filterKeys.includes(key)))) { + if (options.behaviour === "drop-error-if-contains-third-party-frames" || options.behaviour === "drop-error-if-exclusively-contains-third-party-frames") + return null; + event.tags = { + ...event.tags, + third_party_code: !0 + }; + } + } + return event; + } + })); + function getBundleKeysForAllFramesWithFilenames(event) { + let frames = utils.getFramesFromEvent(event); + if (frames) + return frames.filter((frame) => !!frame.filename).map((frame) => frame.module_metadata ? Object.keys(frame.module_metadata).filter((key) => key.startsWith(BUNDLER_PLUGIN_APP_KEY_PREFIX)).map((key) => key.slice(BUNDLER_PLUGIN_APP_KEY_PREFIX.length)) : []); + } + var BUNDLER_PLUGIN_APP_KEY_PREFIX = "_sentryBundlerPluginAppKey:"; + exports.thirdPartyErrorFilterIntegration = thirdPartyErrorFilterIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/constants.js +var require_constants2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/constants.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var COUNTER_METRIC_TYPE = "c", GAUGE_METRIC_TYPE = "g", SET_METRIC_TYPE = "s", DISTRIBUTION_METRIC_TYPE = "d", DEFAULT_BROWSER_FLUSH_INTERVAL = 5e3, DEFAULT_FLUSH_INTERVAL = 1e4, MAX_WEIGHT = 1e4; + exports.COUNTER_METRIC_TYPE = COUNTER_METRIC_TYPE; + exports.DEFAULT_BROWSER_FLUSH_INTERVAL = DEFAULT_BROWSER_FLUSH_INTERVAL; + exports.DEFAULT_FLUSH_INTERVAL = DEFAULT_FLUSH_INTERVAL; + exports.DISTRIBUTION_METRIC_TYPE = DISTRIBUTION_METRIC_TYPE; + exports.GAUGE_METRIC_TYPE = GAUGE_METRIC_TYPE; + exports.MAX_WEIGHT = MAX_WEIGHT; + exports.SET_METRIC_TYPE = SET_METRIC_TYPE; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/exports.js +var require_exports2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/exports.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(); + require_errors(); + var spanUtils = require_spanUtils(), trace = require_trace(), handleCallbackErrors = require_handleCallbackErrors(), constants = require_constants2(); + function getMetricsAggregatorForClient(client, Aggregator) { + let globalMetricsAggregators = utils.getGlobalSingleton( + "globalMetricsAggregators", + () => /* @__PURE__ */ new WeakMap() + ), aggregator = globalMetricsAggregators.get(client); + if (aggregator) + return aggregator; + let newAggregator = new Aggregator(client); + return client.on("flush", () => newAggregator.flush()), client.on("close", () => newAggregator.close()), globalMetricsAggregators.set(client, newAggregator), newAggregator; + } + function addToMetricsAggregator(Aggregator, metricType, name, value, data = {}) { + let client = data.client || currentScopes.getClient(); + if (!client) + return; + let span = spanUtils.getActiveSpan(), rootSpan = span ? spanUtils.getRootSpan(span) : void 0, transactionName = rootSpan && spanUtils.spanToJSON(rootSpan).description, { unit, tags, timestamp } = data, { release, environment } = client.getOptions(), metricTags = {}; + release && (metricTags.release = release), environment && (metricTags.environment = environment), transactionName && (metricTags.transaction = transactionName), debugBuild.DEBUG_BUILD && utils.logger.log(`Adding value of ${value} to ${metricType} metric ${name}`), getMetricsAggregatorForClient(client, Aggregator).add(metricType, name, value, unit, { ...metricTags, ...tags }, timestamp); + } + function increment(aggregator, name, value = 1, data) { + addToMetricsAggregator(aggregator, constants.COUNTER_METRIC_TYPE, name, ensureNumber(value), data); + } + function distribution(aggregator, name, value, data) { + addToMetricsAggregator(aggregator, constants.DISTRIBUTION_METRIC_TYPE, name, ensureNumber(value), data); + } + function timing(aggregator, name, value, unit = "second", data) { + if (typeof value == "function") { + let startTime = utils.timestampInSeconds(); + return trace.startSpanManual( + { + op: "metrics.timing", + name, + startTime, + onlyIfParent: !0 + }, + (span) => handleCallbackErrors.handleCallbackErrors( + () => value(), + () => { + }, + () => { + let endTime = utils.timestampInSeconds(), timeDiff = endTime - startTime; + distribution(aggregator, name, timeDiff, { ...data, unit: "second" }), span.end(endTime); + } + ) + ); + } + distribution(aggregator, name, value, { ...data, unit }); + } + function set(aggregator, name, value, data) { + addToMetricsAggregator(aggregator, constants.SET_METRIC_TYPE, name, value, data); + } + function gauge(aggregator, name, value, data) { + addToMetricsAggregator(aggregator, constants.GAUGE_METRIC_TYPE, name, ensureNumber(value), data); + } + var metrics = { + increment, + distribution, + set, + gauge, + timing, + /** + * @ignore This is for internal use only. + */ + getMetricsAggregatorForClient + }; + function ensureNumber(number) { + return typeof number == "string" ? parseInt(number) : number; + } + exports.metrics = metrics; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/utils.js +var require_utils2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/utils.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function getBucketKey(metricType, name, unit, tags) { + let stringifiedTags = Object.entries(utils.dropUndefinedKeys(tags)).sort((a, b) => a[0].localeCompare(b[0])); + return `${metricType}${name}${unit}${stringifiedTags}`; + } + function simpleHash(s) { + let rv = 0; + for (let i = 0; i < s.length; i++) { + let c = s.charCodeAt(i); + rv = (rv << 5) - rv + c, rv &= rv; + } + return rv >>> 0; + } + function serializeMetricBuckets(metricBucketItems) { + let out = ""; + for (let item of metricBucketItems) { + let tagEntries = Object.entries(item.tags), maybeTags = tagEntries.length > 0 ? `|#${tagEntries.map(([key, value]) => `${key}:${value}`).join(",")}` : ""; + out += `${item.name}@${item.unit}:${item.metric}|${item.metricType}${maybeTags}|T${item.timestamp} +`; + } + return out; + } + function sanitizeUnit(unit) { + return unit.replace(/[^\w]+/gi, "_"); + } + function sanitizeMetricKey(key) { + return key.replace(/[^\w\-.]+/gi, "_"); + } + function sanitizeTagKey(key) { + return key.replace(/[^\w\-./]+/gi, ""); + } + var tagValueReplacements = [ + [` +`, "\\n"], + ["\r", "\\r"], + [" ", "\\t"], + ["\\", "\\\\"], + ["|", "\\u{7c}"], + [",", "\\u{2c}"] + ]; + function getCharOrReplacement(input) { + for (let [search, replacement] of tagValueReplacements) + if (input === search) + return replacement; + return input; + } + function sanitizeTagValue(value) { + return [...value].reduce((acc, char) => acc + getCharOrReplacement(char), ""); + } + function sanitizeTags(unsanitizedTags) { + let tags = {}; + for (let key in unsanitizedTags) + if (Object.prototype.hasOwnProperty.call(unsanitizedTags, key)) { + let sanitizedKey = sanitizeTagKey(key); + tags[sanitizedKey] = sanitizeTagValue(String(unsanitizedTags[key])); + } + return tags; + } + exports.getBucketKey = getBucketKey; + exports.sanitizeMetricKey = sanitizeMetricKey; + exports.sanitizeTags = sanitizeTags; + exports.sanitizeUnit = sanitizeUnit; + exports.serializeMetricBuckets = serializeMetricBuckets; + exports.simpleHash = simpleHash; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/envelope.js +var require_envelope3 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/envelope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), utils$1 = require_utils2(); + function captureAggregateMetrics(client, metricBucketItems) { + utils.logger.log(`Flushing aggregated metrics, number of metrics: ${metricBucketItems.length}`); + let dsn = client.getDsn(), metadata = client.getSdkMetadata(), tunnel = client.getOptions().tunnel, metricsEnvelope = createMetricEnvelope(metricBucketItems, dsn, metadata, tunnel); + client.sendEnvelope(metricsEnvelope); + } + function createMetricEnvelope(metricBucketItems, dsn, metadata, tunnel) { + let headers = { + sent_at: (/* @__PURE__ */ new Date()).toISOString() + }; + metadata && metadata.sdk && (headers.sdk = { + name: metadata.sdk.name, + version: metadata.sdk.version + }), tunnel && dsn && (headers.dsn = utils.dsnToString(dsn)); + let item = createMetricEnvelopeItem(metricBucketItems); + return utils.createEnvelope(headers, [item]); + } + function createMetricEnvelopeItem(metricBucketItems) { + let payload = utils$1.serializeMetricBuckets(metricBucketItems); + return [{ + type: "statsd", + length: payload.length + }, payload]; + } + exports.captureAggregateMetrics = captureAggregateMetrics; + exports.createMetricEnvelope = createMetricEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/instance.js +var require_instance = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/instance.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var constants = require_constants2(), utils = require_utils2(), CounterMetric = class { + constructor(_value) { + this._value = _value; + } + /** @inheritDoc */ + get weight() { + return 1; + } + /** @inheritdoc */ + add(value) { + this._value += value; + } + /** @inheritdoc */ + toString() { + return `${this._value}`; + } + }, GaugeMetric = class { + constructor(value) { + this._last = value, this._min = value, this._max = value, this._sum = value, this._count = 1; + } + /** @inheritDoc */ + get weight() { + return 5; + } + /** @inheritdoc */ + add(value) { + this._last = value, value < this._min && (this._min = value), value > this._max && (this._max = value), this._sum += value, this._count++; + } + /** @inheritdoc */ + toString() { + return `${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`; + } + }, DistributionMetric = class { + constructor(first) { + this._value = [first]; + } + /** @inheritDoc */ + get weight() { + return this._value.length; + } + /** @inheritdoc */ + add(value) { + this._value.push(value); + } + /** @inheritdoc */ + toString() { + return this._value.join(":"); + } + }, SetMetric = class { + constructor(first) { + this.first = first, this._value = /* @__PURE__ */ new Set([first]); + } + /** @inheritDoc */ + get weight() { + return this._value.size; + } + /** @inheritdoc */ + add(value) { + this._value.add(value); + } + /** @inheritdoc */ + toString() { + return Array.from(this._value).map((val) => typeof val == "string" ? utils.simpleHash(val) : val).join(":"); + } + }, METRIC_MAP = { + [constants.COUNTER_METRIC_TYPE]: CounterMetric, + [constants.GAUGE_METRIC_TYPE]: GaugeMetric, + [constants.DISTRIBUTION_METRIC_TYPE]: DistributionMetric, + [constants.SET_METRIC_TYPE]: SetMetric + }; + exports.CounterMetric = CounterMetric; + exports.DistributionMetric = DistributionMetric; + exports.GaugeMetric = GaugeMetric; + exports.METRIC_MAP = METRIC_MAP; + exports.SetMetric = SetMetric; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/aggregator.js +var require_aggregator = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/aggregator.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils$1 = require_cjs(), spanUtils = require_spanUtils(), constants = require_constants2(), envelope = require_envelope3(), instance = require_instance(), utils = require_utils2(), MetricsAggregator = class { + // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets + // when the aggregator is garbage collected. + // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry + // Different metrics have different weights. We use this to limit the number of metrics + // that we store in memory. + // Cast to any so that it can use Node.js timeout + // eslint-disable-next-line @typescript-eslint/no-explicit-any + // SDKs are required to shift the flush interval by random() * rollup_in_seconds. + // That shift is determined once per startup to create jittering. + // An SDK is required to perform force flushing ahead of scheduled time if the memory + // pressure is too high. There is no rule for this other than that SDKs should be tracking + // abstract aggregation complexity (eg: a counter only carries a single float, whereas a + // distribution is a float per emission). + // + // Force flush is used on either shutdown, flush() or when we exceed the max weight. + constructor(_client) { + this._client = _client, this._buckets = /* @__PURE__ */ new Map(), this._bucketsTotalWeight = 0, this._interval = setInterval(() => this._flush(), constants.DEFAULT_FLUSH_INTERVAL), this._interval.unref && this._interval.unref(), this._flushShift = Math.floor(Math.random() * constants.DEFAULT_FLUSH_INTERVAL / 1e3), this._forceFlush = !1; + } + /** + * @inheritDoc + */ + add(metricType, unsanitizedName, value, unsanitizedUnit = "none", unsanitizedTags = {}, maybeFloatTimestamp = utils$1.timestampInSeconds()) { + let timestamp = Math.floor(maybeFloatTimestamp), name = utils.sanitizeMetricKey(unsanitizedName), tags = utils.sanitizeTags(unsanitizedTags), unit = utils.sanitizeUnit(unsanitizedUnit), bucketKey = utils.getBucketKey(metricType, name, unit, tags), bucketItem = this._buckets.get(bucketKey), previousWeight = bucketItem && metricType === constants.SET_METRIC_TYPE ? bucketItem.metric.weight : 0; + bucketItem ? (bucketItem.metric.add(value), bucketItem.timestamp < timestamp && (bucketItem.timestamp = timestamp)) : (bucketItem = { + // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size. + metric: new instance.METRIC_MAP[metricType](value), + timestamp, + metricType, + name, + unit, + tags + }, this._buckets.set(bucketKey, bucketItem)); + let val = typeof value == "string" ? bucketItem.metric.weight - previousWeight : value; + spanUtils.updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey), this._bucketsTotalWeight += bucketItem.metric.weight, this._bucketsTotalWeight >= constants.MAX_WEIGHT && this.flush(); + } + /** + * Flushes the current metrics to the transport via the transport. + */ + flush() { + this._forceFlush = !0, this._flush(); + } + /** + * Shuts down metrics aggregator and clears all metrics. + */ + close() { + this._forceFlush = !0, clearInterval(this._interval), this._flush(); + } + /** + * Flushes the buckets according to the internal state of the aggregator. + * If it is a force flush, which happens on shutdown, it will flush all buckets. + * Otherwise, it will only flush buckets that are older than the flush interval, + * and according to the flush shift. + * + * This function mutates `_forceFlush` and `_bucketsTotalWeight` properties. + */ + _flush() { + if (this._forceFlush) { + this._forceFlush = !1, this._bucketsTotalWeight = 0, this._captureMetrics(this._buckets), this._buckets.clear(); + return; + } + let cutoffSeconds = Math.floor(utils$1.timestampInSeconds()) - constants.DEFAULT_FLUSH_INTERVAL / 1e3 - this._flushShift, flushedBuckets = /* @__PURE__ */ new Map(); + for (let [key, bucket] of this._buckets) + bucket.timestamp <= cutoffSeconds && (flushedBuckets.set(key, bucket), this._bucketsTotalWeight -= bucket.metric.weight); + for (let [key] of flushedBuckets) + this._buckets.delete(key); + this._captureMetrics(flushedBuckets); + } + /** + * Only captures a subset of the buckets passed to this function. + * @param flushedBuckets + */ + _captureMetrics(flushedBuckets) { + if (flushedBuckets.size > 0) { + let buckets = Array.from(flushedBuckets).map(([, bucketItem]) => bucketItem); + envelope.captureAggregateMetrics(this._client, buckets); + } + } + }; + exports.MetricsAggregator = MetricsAggregator; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/exports-default.js +var require_exports_default = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/exports-default.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var aggregator = require_aggregator(), exports$1 = require_exports2(); + function increment(name, value = 1, data) { + exports$1.metrics.increment(aggregator.MetricsAggregator, name, value, data); + } + function distribution(name, value, data) { + exports$1.metrics.distribution(aggregator.MetricsAggregator, name, value, data); + } + function set(name, value, data) { + exports$1.metrics.set(aggregator.MetricsAggregator, name, value, data); + } + function gauge(name, value, data) { + exports$1.metrics.gauge(aggregator.MetricsAggregator, name, value, data); + } + function timing(name, value, unit = "second", data) { + return exports$1.metrics.timing(aggregator.MetricsAggregator, name, value, unit, data); + } + function getMetricsAggregatorForClient(client) { + return exports$1.metrics.getMetricsAggregatorForClient(client, aggregator.MetricsAggregator); + } + var metricsDefault = { + increment, + distribution, + set, + gauge, + timing, + /** + * @ignore This is for internal use only. + */ + getMetricsAggregatorForClient + }; + exports.metricsDefault = metricsDefault; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/browser-aggregator.js +var require_browser_aggregator = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/browser-aggregator.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils$1 = require_cjs(), spanUtils = require_spanUtils(), constants = require_constants2(), envelope = require_envelope3(), instance = require_instance(), utils = require_utils2(), BrowserMetricsAggregator = class { + // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets + // when the aggregator is garbage collected. + // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry + constructor(_client) { + this._client = _client, this._buckets = /* @__PURE__ */ new Map(), this._interval = setInterval(() => this.flush(), constants.DEFAULT_BROWSER_FLUSH_INTERVAL); + } + /** + * @inheritDoc + */ + add(metricType, unsanitizedName, value, unsanitizedUnit = "none", unsanitizedTags = {}, maybeFloatTimestamp = utils$1.timestampInSeconds()) { + let timestamp = Math.floor(maybeFloatTimestamp), name = utils.sanitizeMetricKey(unsanitizedName), tags = utils.sanitizeTags(unsanitizedTags), unit = utils.sanitizeUnit(unsanitizedUnit), bucketKey = utils.getBucketKey(metricType, name, unit, tags), bucketItem = this._buckets.get(bucketKey), previousWeight = bucketItem && metricType === constants.SET_METRIC_TYPE ? bucketItem.metric.weight : 0; + bucketItem ? (bucketItem.metric.add(value), bucketItem.timestamp < timestamp && (bucketItem.timestamp = timestamp)) : (bucketItem = { + // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size. + metric: new instance.METRIC_MAP[metricType](value), + timestamp, + metricType, + name, + unit, + tags + }, this._buckets.set(bucketKey, bucketItem)); + let val = typeof value == "string" ? bucketItem.metric.weight - previousWeight : value; + spanUtils.updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey); + } + /** + * @inheritDoc + */ + flush() { + if (this._buckets.size === 0) + return; + let metricBuckets = Array.from(this._buckets.values()); + envelope.captureAggregateMetrics(this._client, metricBuckets), this._buckets.clear(); + } + /** + * @inheritDoc + */ + close() { + clearInterval(this._interval), this.flush(); + } + }; + exports.BrowserMetricsAggregator = BrowserMetricsAggregator; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/fetch.js +var require_fetch2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/fetch.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), semanticAttributes = require_semanticAttributes(); + require_errors(); + require_debug_build2(); + var hasTracingEnabled = require_hasTracingEnabled(), spanUtils = require_spanUtils(), sentryNonRecordingSpan = require_sentryNonRecordingSpan(), spanstatus = require_spanstatus(), trace = require_trace(), dynamicSamplingContext = require_dynamicSamplingContext(); + function instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeaders, spans, spanOrigin = "auto.http.browser") { + if (!handlerData.fetchData) + return; + let shouldCreateSpanResult = hasTracingEnabled.hasTracingEnabled() && shouldCreateSpan(handlerData.fetchData.url); + if (handlerData.endTimestamp && shouldCreateSpanResult) { + let spanId = handlerData.fetchData.__span; + if (!spanId) return; + let span2 = spans[spanId]; + span2 && (endSpan(span2, handlerData), delete spans[spanId]); + return; + } + let scope = currentScopes.getCurrentScope(), client = currentScopes.getClient(), { method, url } = handlerData.fetchData, fullUrl = getFullURL(url), host = fullUrl ? utils.parseUrl(fullUrl).host : void 0, hasParent = !!spanUtils.getActiveSpan(), span = shouldCreateSpanResult && hasParent ? trace.startInactiveSpan({ + name: `${method} ${url}`, + attributes: { + url, + type: "fetch", + "http.method": method, + "http.url": fullUrl, + "server.address": host, + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin, + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP]: "http.client" + } + }) : new sentryNonRecordingSpan.SentryNonRecordingSpan(); + if (handlerData.fetchData.__span = span.spanContext().spanId, spans[span.spanContext().spanId] = span, shouldAttachHeaders(handlerData.fetchData.url) && client) { + let request = handlerData.args[0]; + handlerData.args[1] = handlerData.args[1] || {}; + let options = handlerData.args[1]; + options.headers = addTracingHeadersToFetchRequest( + request, + client, + scope, + options, + // If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction), + // we do not want to use the span as base for the trace headers, + // which means that the headers will be generated from the scope and the sampling decision is deferred + hasTracingEnabled.hasTracingEnabled() && hasParent ? span : void 0 + ); + } + return span; + } + function addTracingHeadersToFetchRequest(request, client, scope, options, span) { + let isolationScope = currentScopes.getIsolationScope(), { traceId, spanId, sampled, dsc } = { + ...isolationScope.getPropagationContext(), + ...scope.getPropagationContext() + }, sentryTraceHeader = span ? spanUtils.spanToTraceHeader(span) : utils.generateSentryTraceHeader(traceId, spanId, sampled), sentryBaggageHeader = utils.dynamicSamplingContextToSentryBaggageHeader( + dsc || (span ? dynamicSamplingContext.getDynamicSamplingContextFromSpan(span) : dynamicSamplingContext.getDynamicSamplingContextFromClient(traceId, client)) + ), headers = options.headers || (typeof Request < "u" && utils.isInstanceOf(request, Request) ? request.headers : void 0); + if (headers) + if (typeof Headers < "u" && utils.isInstanceOf(headers, Headers)) { + let newHeaders = new Headers(headers); + return newHeaders.append("sentry-trace", sentryTraceHeader), sentryBaggageHeader && newHeaders.append(utils.BAGGAGE_HEADER_NAME, sentryBaggageHeader), newHeaders; + } else if (Array.isArray(headers)) { + let newHeaders = [...headers, ["sentry-trace", sentryTraceHeader]]; + return sentryBaggageHeader && newHeaders.push([utils.BAGGAGE_HEADER_NAME, sentryBaggageHeader]), newHeaders; + } else { + let existingBaggageHeader = "baggage" in headers ? headers.baggage : void 0, newBaggageHeaders = []; + return Array.isArray(existingBaggageHeader) ? newBaggageHeaders.push(...existingBaggageHeader) : existingBaggageHeader && newBaggageHeaders.push(existingBaggageHeader), sentryBaggageHeader && newBaggageHeaders.push(sentryBaggageHeader), { + ...headers, + "sentry-trace": sentryTraceHeader, + baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(",") : void 0 + }; + } + else return { "sentry-trace": sentryTraceHeader, baggage: sentryBaggageHeader }; + } + function getFullURL(url) { + try { + return new URL(url).href; + } catch { + return; + } + } + function endSpan(span, handlerData) { + if (handlerData.response) { + spanstatus.setHttpStatus(span, handlerData.response.status); + let contentLength = handlerData.response && handlerData.response.headers && handlerData.response.headers.get("content-length"); + if (contentLength) { + let contentLengthNum = parseInt(contentLength); + contentLengthNum > 0 && span.setAttribute("http.response_content_length", contentLengthNum); + } + } else handlerData.error && span.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "internal_error" }); + span.end(); + } + exports.addTracingHeadersToFetchRequest = addTracingHeadersToFetchRequest; + exports.instrumentFetchRequest = instrumentFetchRequest; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/trpc.js +var require_trpc = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/trpc.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), exports$1 = require_exports(), semanticAttributes = require_semanticAttributes(); + require_errors(); + require_debug_build2(); + var trace = require_trace(), trpcCaptureContext = { mechanism: { handled: !1, data: { function: "trpcMiddleware" } } }; + function trpcMiddleware(options = {}) { + return function(opts) { + let { path, type, next, rawInput } = opts, client = currentScopes.getClient(), clientOptions = client && client.getOptions(), trpcContext = { + procedure_type: type + }; + (options.attachRpcInput !== void 0 ? options.attachRpcInput : clientOptions && clientOptions.sendDefaultPii) && (trpcContext.input = utils.normalize(rawInput)), exports$1.setContext("trpc", trpcContext); + function captureIfError(nextResult) { + typeof nextResult == "object" && nextResult !== null && "ok" in nextResult && !nextResult.ok && "error" in nextResult && exports$1.captureException(nextResult.error, trpcCaptureContext); + } + return trace.startSpanManual( + { + name: `trpc/${path}`, + op: "rpc.server", + attributes: { + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "route", + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.rpc.trpc" + } + }, + (span) => { + let maybePromiseResult; + try { + maybePromiseResult = next(); + } catch (e) { + throw exports$1.captureException(e, trpcCaptureContext), span.end(), e; + } + return utils.isThenable(maybePromiseResult) ? maybePromiseResult.then( + (nextResult) => (captureIfError(nextResult), span.end(), nextResult), + (e) => { + throw exports$1.captureException(e, trpcCaptureContext), span.end(), e; + } + ) : (captureIfError(maybePromiseResult), span.end(), maybePromiseResult); + } + ); + }; + } + exports.trpcMiddleware = trpcMiddleware; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/feedback.js +var require_feedback = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/feedback.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(); + function captureFeedback(feedbackParams, hint = {}, scope = currentScopes.getCurrentScope()) { + let { message, name, email, url, source, associatedEventId } = feedbackParams, feedbackEvent = { + contexts: { + feedback: utils.dropUndefinedKeys({ + contact_email: email, + name, + message, + url, + source, + associated_event_id: associatedEventId + }) + }, + type: "feedback", + level: "info" + }, client = scope && scope.getClient() || currentScopes.getClient(); + return client && client.emit("beforeSendFeedback", feedbackEvent, hint), scope.captureEvent(feedbackEvent, hint); + } + exports.captureFeedback = captureFeedback; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/getCurrentHubShim.js +var require_getCurrentHubShim = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/getCurrentHubShim.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var breadcrumbs = require_breadcrumbs(), currentScopes = require_currentScopes(), exports$1 = require_exports(); + function getCurrentHubShim() { + return { + bindClient(client) { + currentScopes.getCurrentScope().setClient(client); + }, + withScope: currentScopes.withScope, + getClient: () => currentScopes.getClient(), + getScope: currentScopes.getCurrentScope, + getIsolationScope: currentScopes.getIsolationScope, + captureException: (exception, hint) => currentScopes.getCurrentScope().captureException(exception, hint), + captureMessage: (message, level, hint) => currentScopes.getCurrentScope().captureMessage(message, level, hint), + captureEvent: exports$1.captureEvent, + addBreadcrumb: breadcrumbs.addBreadcrumb, + setUser: exports$1.setUser, + setTags: exports$1.setTags, + setTag: exports$1.setTag, + setExtra: exports$1.setExtra, + setExtras: exports$1.setExtras, + setContext: exports$1.setContext, + getIntegration(integration) { + let client = currentScopes.getClient(); + return client && client.getIntegrationByName(integration.id) || null; + }, + startSession: exports$1.startSession, + endSession: exports$1.endSession, + captureSession(end) { + if (end) + return exports$1.endSession(); + _sendSessionUpdate(); + } + }; + } + var getCurrentHub = getCurrentHubShim; + function _sendSessionUpdate() { + let scope = currentScopes.getCurrentScope(), client = currentScopes.getClient(), session = scope.getSession(); + client && session && client.captureSession(session); + } + exports.getCurrentHub = getCurrentHub; + exports.getCurrentHubShim = getCurrentHubShim; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/index.js +var require_cjs2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var errors = require_errors(), utils$1 = require_utils(), hubextensions = require_hubextensions(), idleSpan = require_idleSpan(), sentrySpan = require_sentrySpan(), sentryNonRecordingSpan = require_sentryNonRecordingSpan(), spanstatus = require_spanstatus(), trace = require_trace(), dynamicSamplingContext = require_dynamicSamplingContext(), measurement = require_measurement(), sampling = require_sampling(), logSpans = require_logSpans(), semanticAttributes = require_semanticAttributes(), envelope = require_envelope2(), exports$1 = require_exports(), currentScopes = require_currentScopes(), defaultScopes = require_defaultScopes(), index = require_asyncContext(), carrier = require_carrier(), session = require_session(), sessionflusher = require_sessionflusher(), scope = require_scope(), eventProcessors = require_eventProcessors(), api = require_api(), baseclient = require_baseclient(), serverRuntimeClient = require_server_runtime_client(), sdk = require_sdk(), base = require_base(), offline = require_offline(), multiplexed = require_multiplexed(), integration = require_integration(), applyScopeDataToEvent = require_applyScopeDataToEvent(), prepareEvent = require_prepareEvent(), checkin = require_checkin(), hasTracingEnabled = require_hasTracingEnabled(), isSentryRequestUrl = require_isSentryRequestUrl(), handleCallbackErrors = require_handleCallbackErrors(), parameterize = require_parameterize(), spanUtils = require_spanUtils(), parseSampleRate = require_parseSampleRate(), sdkMetadata = require_sdkMetadata(), constants = require_constants(), breadcrumbs = require_breadcrumbs(), functiontostring = require_functiontostring(), inboundfilters = require_inboundfilters(), linkederrors = require_linkederrors(), metadata = require_metadata2(), requestdata = require_requestdata2(), captureconsole = require_captureconsole(), debug = require_debug(), dedupe = require_dedupe(), extraerrordata = require_extraerrordata(), rewriteframes = require_rewriteframes(), sessiontiming = require_sessiontiming(), zoderrors = require_zoderrors(), thirdPartyErrorsFilter = require_third_party_errors_filter(), exports$2 = require_exports2(), exportsDefault = require_exports_default(), browserAggregator = require_browser_aggregator(), metricSummary = require_metric_summary(), fetch2 = require_fetch2(), trpc = require_trpc(), feedback = require_feedback(), getCurrentHubShim = require_getCurrentHubShim(), utils = require_cjs(); + exports.registerSpanErrorInstrumentation = errors.registerSpanErrorInstrumentation; + exports.getCapturedScopesOnSpan = utils$1.getCapturedScopesOnSpan; + exports.setCapturedScopesOnSpan = utils$1.setCapturedScopesOnSpan; + exports.addTracingExtensions = hubextensions.addTracingExtensions; + exports.TRACING_DEFAULTS = idleSpan.TRACING_DEFAULTS; + exports.startIdleSpan = idleSpan.startIdleSpan; + exports.SentrySpan = sentrySpan.SentrySpan; + exports.SentryNonRecordingSpan = sentryNonRecordingSpan.SentryNonRecordingSpan; + exports.SPAN_STATUS_ERROR = spanstatus.SPAN_STATUS_ERROR; + exports.SPAN_STATUS_OK = spanstatus.SPAN_STATUS_OK; + exports.SPAN_STATUS_UNSET = spanstatus.SPAN_STATUS_UNSET; + exports.getSpanStatusFromHttpCode = spanstatus.getSpanStatusFromHttpCode; + exports.setHttpStatus = spanstatus.setHttpStatus; + exports.continueTrace = trace.continueTrace; + exports.startInactiveSpan = trace.startInactiveSpan; + exports.startNewTrace = trace.startNewTrace; + exports.startSpan = trace.startSpan; + exports.startSpanManual = trace.startSpanManual; + exports.suppressTracing = trace.suppressTracing; + exports.withActiveSpan = trace.withActiveSpan; + exports.getDynamicSamplingContextFromClient = dynamicSamplingContext.getDynamicSamplingContextFromClient; + exports.getDynamicSamplingContextFromSpan = dynamicSamplingContext.getDynamicSamplingContextFromSpan; + exports.spanToBaggageHeader = dynamicSamplingContext.spanToBaggageHeader; + exports.setMeasurement = measurement.setMeasurement; + exports.timedEventsToMeasurements = measurement.timedEventsToMeasurements; + exports.sampleSpan = sampling.sampleSpan; + exports.logSpanEnd = logSpans.logSpanEnd; + exports.logSpanStart = logSpans.logSpanStart; + exports.SEMANTIC_ATTRIBUTE_CACHE_HIT = semanticAttributes.SEMANTIC_ATTRIBUTE_CACHE_HIT; + exports.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = semanticAttributes.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE; + exports.SEMANTIC_ATTRIBUTE_CACHE_KEY = semanticAttributes.SEMANTIC_ATTRIBUTE_CACHE_KEY; + exports.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = semanticAttributes.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME; + exports.SEMANTIC_ATTRIBUTE_PROFILE_ID = semanticAttributes.SEMANTIC_ATTRIBUTE_PROFILE_ID; + exports.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON; + exports.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT; + exports.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE; + exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP; + exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN; + exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE; + exports.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE; + exports.createEventEnvelope = envelope.createEventEnvelope; + exports.createSessionEnvelope = envelope.createSessionEnvelope; + exports.createSpanEnvelope = envelope.createSpanEnvelope; + exports.addEventProcessor = exports$1.addEventProcessor; + exports.captureCheckIn = exports$1.captureCheckIn; + exports.captureEvent = exports$1.captureEvent; + exports.captureException = exports$1.captureException; + exports.captureMessage = exports$1.captureMessage; + exports.captureSession = exports$1.captureSession; + exports.close = exports$1.close; + exports.endSession = exports$1.endSession; + exports.flush = exports$1.flush; + exports.isEnabled = exports$1.isEnabled; + exports.isInitialized = exports$1.isInitialized; + exports.lastEventId = exports$1.lastEventId; + exports.setContext = exports$1.setContext; + exports.setExtra = exports$1.setExtra; + exports.setExtras = exports$1.setExtras; + exports.setTag = exports$1.setTag; + exports.setTags = exports$1.setTags; + exports.setUser = exports$1.setUser; + exports.startSession = exports$1.startSession; + exports.withMonitor = exports$1.withMonitor; + exports.getClient = currentScopes.getClient; + exports.getCurrentScope = currentScopes.getCurrentScope; + exports.getGlobalScope = currentScopes.getGlobalScope; + exports.getIsolationScope = currentScopes.getIsolationScope; + exports.withIsolationScope = currentScopes.withIsolationScope; + exports.withScope = currentScopes.withScope; + exports.getDefaultCurrentScope = defaultScopes.getDefaultCurrentScope; + exports.getDefaultIsolationScope = defaultScopes.getDefaultIsolationScope; + exports.setAsyncContextStrategy = index.setAsyncContextStrategy; + exports.getMainCarrier = carrier.getMainCarrier; + exports.closeSession = session.closeSession; + exports.makeSession = session.makeSession; + exports.updateSession = session.updateSession; + exports.SessionFlusher = sessionflusher.SessionFlusher; + exports.Scope = scope.Scope; + exports.notifyEventProcessors = eventProcessors.notifyEventProcessors; + exports.getEnvelopeEndpointWithUrlEncodedAuth = api.getEnvelopeEndpointWithUrlEncodedAuth; + exports.getReportDialogEndpoint = api.getReportDialogEndpoint; + exports.BaseClient = baseclient.BaseClient; + exports.ServerRuntimeClient = serverRuntimeClient.ServerRuntimeClient; + exports.initAndBind = sdk.initAndBind; + exports.setCurrentClient = sdk.setCurrentClient; + exports.createTransport = base.createTransport; + exports.makeOfflineTransport = offline.makeOfflineTransport; + exports.makeMultiplexedTransport = multiplexed.makeMultiplexedTransport; + exports.addIntegration = integration.addIntegration; + exports.defineIntegration = integration.defineIntegration; + exports.getIntegrationsToSetup = integration.getIntegrationsToSetup; + exports.applyScopeDataToEvent = applyScopeDataToEvent.applyScopeDataToEvent; + exports.mergeScopeData = applyScopeDataToEvent.mergeScopeData; + exports.prepareEvent = prepareEvent.prepareEvent; + exports.createCheckInEnvelope = checkin.createCheckInEnvelope; + exports.hasTracingEnabled = hasTracingEnabled.hasTracingEnabled; + exports.isSentryRequestUrl = isSentryRequestUrl.isSentryRequestUrl; + exports.handleCallbackErrors = handleCallbackErrors.handleCallbackErrors; + exports.parameterize = parameterize.parameterize; + exports.addChildSpanToSpan = spanUtils.addChildSpanToSpan; + exports.getActiveSpan = spanUtils.getActiveSpan; + exports.getRootSpan = spanUtils.getRootSpan; + exports.getSpanDescendants = spanUtils.getSpanDescendants; + exports.getStatusMessage = spanUtils.getStatusMessage; + exports.spanIsSampled = spanUtils.spanIsSampled; + exports.spanToJSON = spanUtils.spanToJSON; + exports.spanToTraceContext = spanUtils.spanToTraceContext; + exports.spanToTraceHeader = spanUtils.spanToTraceHeader; + exports.parseSampleRate = parseSampleRate.parseSampleRate; + exports.applySdkMetadata = sdkMetadata.applySdkMetadata; + exports.DEFAULT_ENVIRONMENT = constants.DEFAULT_ENVIRONMENT; + exports.addBreadcrumb = breadcrumbs.addBreadcrumb; + exports.functionToStringIntegration = functiontostring.functionToStringIntegration; + exports.inboundFiltersIntegration = inboundfilters.inboundFiltersIntegration; + exports.linkedErrorsIntegration = linkederrors.linkedErrorsIntegration; + exports.moduleMetadataIntegration = metadata.moduleMetadataIntegration; + exports.requestDataIntegration = requestdata.requestDataIntegration; + exports.captureConsoleIntegration = captureconsole.captureConsoleIntegration; + exports.debugIntegration = debug.debugIntegration; + exports.dedupeIntegration = dedupe.dedupeIntegration; + exports.extraErrorDataIntegration = extraerrordata.extraErrorDataIntegration; + exports.rewriteFramesIntegration = rewriteframes.rewriteFramesIntegration; + exports.sessionTimingIntegration = sessiontiming.sessionTimingIntegration; + exports.zodErrorsIntegration = zoderrors.zodErrorsIntegration; + exports.thirdPartyErrorFilterIntegration = thirdPartyErrorsFilter.thirdPartyErrorFilterIntegration; + exports.metrics = exports$2.metrics; + exports.metricsDefault = exportsDefault.metricsDefault; + exports.BrowserMetricsAggregator = browserAggregator.BrowserMetricsAggregator; + exports.getMetricSummaryJsonForSpan = metricSummary.getMetricSummaryJsonForSpan; + exports.addTracingHeadersToFetchRequest = fetch2.addTracingHeadersToFetchRequest; + exports.instrumentFetchRequest = fetch2.instrumentFetchRequest; + exports.trpcMiddleware = trpc.trpcMiddleware; + exports.captureFeedback = feedback.captureFeedback; + exports.getCurrentHub = getCurrentHubShim.getCurrentHub; + exports.getCurrentHubShim = getCurrentHubShim.getCurrentHubShim; + exports.SDK_VERSION = utils.SDK_VERSION; + } +}); + +// ../../node_modules/.pnpm/toucan-js@4.0.0_patch_hash=qxsfpdzvzbhq2ecirbu5xq4vlq/node_modules/toucan-js/dist/index.cjs.js +var require_index_cjs = __commonJS({ + "../../node_modules/.pnpm/toucan-js@4.0.0_patch_hash=qxsfpdzvzbhq2ecirbu5xq4vlq/node_modules/toucan-js/dist/index.cjs.js"(exports) { + "use strict"; + var utils = require_cjs(), core = require_cjs2(); + function isObject(value) { + return typeof value == "object" && value !== null; + } + function isMechanism(value) { + return isObject(value) && "handled" in value && typeof value.handled == "boolean" && "type" in value && typeof value.type == "string"; + } + function containsMechanism(value) { + return isObject(value) && "mechanism" in value && isMechanism(value.mechanism); + } + function getSentryRelease() { + if (utils.GLOBAL_OBJ.SENTRY_RELEASE && utils.GLOBAL_OBJ.SENTRY_RELEASE.id) + return utils.GLOBAL_OBJ.SENTRY_RELEASE.id; + } + function setOnOptional(target, entry) { + return target !== void 0 ? (target[entry[0]] = entry[1], target) : { [entry[0]]: entry[1] }; + } + function parseStackFrames(stackParser, error) { + return stackParser(error.stack || "", 1); + } + function extractMessage(ex) { + let message = ex && ex.message; + return message ? message.error && typeof message.error.message == "string" ? message.error.message : message : "No error message"; + } + function exceptionFromError(stackParser, error) { + let exception = { + type: error.name || error.constructor.name, + value: extractMessage(error) + }, frames = parseStackFrames(stackParser, error); + return frames.length && (exception.stacktrace = { frames }), exception.type === void 0 && exception.value === "" && (exception.value = "Unrecoverable error caught"), exception; + } + function eventFromUnknownInput(sdk, stackParser, exception, hint) { + let ex, mechanism = (hint && hint.data && containsMechanism(hint.data) ? hint.data.mechanism : void 0) ?? { + handled: !0, + type: "generic" + }; + if (utils.isError(exception)) + ex = exception; + else { + if (utils.isPlainObject(exception)) { + let message = `Non-Error exception captured with keys: ${utils.extractExceptionKeysForMessage(exception)}`, client = sdk?.getClient(), normalizeDepth = client && client.getOptions().normalizeDepth; + sdk?.setExtra("__serialized__", utils.normalizeToSize(exception, normalizeDepth)), ex = hint && hint.syntheticException || new Error(message), ex.message = message; + } else + ex = hint && hint.syntheticException || new Error(exception), ex.message = exception; + mechanism.synthetic = !0; + } + let event = { + exception: { + values: [exceptionFromError(stackParser, ex)] + } + }; + return utils.addExceptionTypeValue(event, void 0, void 0), utils.addExceptionMechanism(event, mechanism), { + ...event, + event_id: hint && hint.event_id + }; + } + function eventFromMessage(stackParser, message, level = "info", hint, attachStacktrace) { + let event = { + event_id: hint && hint.event_id, + level, + message + }; + if (attachStacktrace && hint && hint.syntheticException) { + let frames = parseStackFrames(stackParser, hint.syntheticException); + frames.length && (event.exception = { + values: [ + { + value: message, + stacktrace: { frames } + } + ] + }); + } + return event; + } + var DEFAULT_LIMIT = 5, linkedErrorsIntegration = core.defineIntegration((options = { limit: DEFAULT_LIMIT }) => ({ + name: "LinkedErrors", + processEvent: (event, hint, client) => handler(client.getOptions().stackParser, options.limit, event, hint) + })); + function handler(parser, limit, event, hint) { + if (!event.exception || !event.exception.values || !hint || !utils.isInstanceOf(hint.originalException, Error)) + return event; + let linkedErrors = walkErrorTree(parser, limit, hint.originalException); + return event.exception.values = [...linkedErrors, ...event.exception.values], event; + } + function walkErrorTree(parser, limit, error, stack = []) { + if (!utils.isInstanceOf(error.cause, Error) || stack.length + 1 >= limit) + return stack; + let exception = exceptionFromError(parser, error.cause); + return walkErrorTree(parser, limit, error.cause, [ + exception, + ...stack + ]); + } + var defaultRequestDataOptions = { + allowedHeaders: ["CF-RAY", "CF-Worker"] + }, requestDataIntegration = core.defineIntegration((userOptions = {}) => { + let options = { ...defaultRequestDataOptions, ...userOptions }; + return { + name: "RequestData", + preprocessEvent: (event) => { + let { sdkProcessingMetadata } = event; + return sdkProcessingMetadata && ("request" in sdkProcessingMetadata && sdkProcessingMetadata.request instanceof Request && (event.request = toEventRequest(sdkProcessingMetadata.request, options), event.user = toEventUser(event.user ?? {}, sdkProcessingMetadata.request, options)), "requestData" in sdkProcessingMetadata && (event.request ? event.request.data = sdkProcessingMetadata.requestData : event.request = { + data: sdkProcessingMetadata.requestData + })), event; + } + }; + }); + function toEventUser(user, request, options) { + let ip_address = request.headers.get("CF-Connecting-IP"), { allowedIps } = options, newUser = { ...user }; + return !("ip_address" in user) && // If ip_address is already set from explicitly called setUser, we don't want to overwrite it + ip_address && allowedIps !== void 0 && testAllowlist(ip_address, allowedIps) && (newUser.ip_address = ip_address), Object.keys(newUser).length > 0 ? newUser : void 0; + } + function toEventRequest(request, options) { + let cookieString = request.headers.get("cookie"), cookies; + if (cookieString) + try { + cookies = parseCookie(cookieString); + } catch { + } + let headers = {}; + for (let [k, v] of request.headers.entries()) + k !== "cookie" && (headers[k] = v); + let eventRequest = { + method: request.method, + cookies, + headers + }; + try { + let url = new URL(request.url); + eventRequest.url = `${url.protocol}//${url.hostname}${url.pathname}`, eventRequest.query_string = url.search; + } catch { + let qi = request.url.indexOf("?"); + qi < 0 ? eventRequest.url = request.url : (eventRequest.url = request.url.substr(0, qi), eventRequest.query_string = request.url.substr(qi + 1)); + } + let { allowedHeaders, allowedCookies, allowedSearchParams } = options; + if (allowedHeaders !== void 0 && eventRequest.headers ? (eventRequest.headers = applyAllowlistToObject(eventRequest.headers, allowedHeaders), Object.keys(eventRequest.headers).length === 0 && delete eventRequest.headers) : delete eventRequest.headers, allowedCookies !== void 0 && eventRequest.cookies ? (eventRequest.cookies = applyAllowlistToObject(eventRequest.cookies, allowedCookies), Object.keys(eventRequest.cookies).length === 0 && delete eventRequest.cookies) : delete eventRequest.cookies, allowedSearchParams !== void 0) { + let params = Object.fromEntries(new URLSearchParams(eventRequest.query_string)), allowedParams = new URLSearchParams(); + Object.keys(applyAllowlistToObject(params, allowedSearchParams)).forEach((allowedKey) => { + allowedParams.set(allowedKey, params[allowedKey]); + }), eventRequest.query_string = allowedParams.toString(); + } else + delete eventRequest.query_string; + return eventRequest; + } + function testAllowlist(target, allowlist) { + return typeof allowlist == "boolean" ? allowlist : allowlist instanceof RegExp ? allowlist.test(target) : Array.isArray(allowlist) ? allowlist.map((item) => item.toLowerCase()).includes(target) : !1; + } + function applyAllowlistToObject(target, allowlist) { + let predicate = () => !1; + if (typeof allowlist == "boolean") + return allowlist ? target : {}; + if (allowlist instanceof RegExp) + predicate = (item) => allowlist.test(item); + else if (Array.isArray(allowlist)) { + let allowlistLowercased = allowlist.map((item) => item.toLowerCase()); + predicate = (item) => allowlistLowercased.includes(item.toLowerCase()); + } else + return {}; + return Object.keys(target).filter(predicate).reduce((allowed, key) => (allowed[key] = target[key], allowed), {}); + } + function parseCookie(cookieString) { + if (typeof cookieString != "string") + return {}; + try { + return cookieString.split(";").map((part) => part.split("=")).reduce((acc, [cookieKey, cookieValue]) => (acc[decodeURIComponent(cookieKey.trim())] = decodeURIComponent(cookieValue.trim()), acc), {}); + } catch { + return {}; + } + } + function setupIntegrations(integrations, sdk) { + let integrationIndex = {}; + return integrations.forEach((integration) => { + integrationIndex[integration.name] = integration, typeof integration.setupOnce == "function" && integration.setupOnce(); + let client = sdk.getClient(); + if (client) { + if (typeof integration.setup == "function" && integration.setup(client), typeof integration.preprocessEvent == "function") { + let callback = integration.preprocessEvent.bind(integration); + client.on("preprocessEvent", (event, hint) => callback(event, hint, client)); + } + if (typeof integration.processEvent == "function") { + let callback = integration.processEvent.bind(integration), processor = Object.assign((event, hint) => callback(event, hint, client), { + id: integration.name + }); + client.addEventProcessor(processor); + } + } + }), integrationIndex; + } + var ToucanClient = class extends core.ServerRuntimeClient { + /** + * Some functions need to access the scope (Toucan instance) this client is bound to, + * but calling 'getCurrentHub()' is unsafe because it uses globals. + * So we store a reference to the Hub after binding to it and provide it to methods that need it. + */ + #sdk = null; + #integrationsInitialized = !1; + /** + * Creates a new Toucan SDK instance. + * @param options Configuration options for this SDK. + */ + constructor(options) { + options._metadata = options._metadata || {}, options._metadata.sdk = options._metadata.sdk || { + name: "toucan-js", + packages: [ + { + name: "npm:toucan-js", + version: "4.0.0" + } + ], + version: "4.0.0" + }, super(options); + } + /** + * By default, integrations are stored in a global. We want to store them in a local instance because they may have contextual data, such as event request. + */ + setupIntegrations() { + this._isEnabled() && !this.#integrationsInitialized && this.#sdk && (this._integrations = setupIntegrations(this._options.integrations, this.#sdk), this.#integrationsInitialized = !0); + } + eventFromException(exception, hint) { + return utils.resolvedSyncPromise(eventFromUnknownInput(this.#sdk, this._options.stackParser, exception, hint)); + } + eventFromMessage(message, level = "info", hint) { + return utils.resolvedSyncPromise(eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace)); + } + _prepareEvent(event, hint, scope) { + return event.platform = event.platform || "javascript", this.getOptions().request && (event.sdkProcessingMetadata = setOnOptional(event.sdkProcessingMetadata, [ + "request", + this.getOptions().request + ])), this.getOptions().requestData && (event.sdkProcessingMetadata = setOnOptional(event.sdkProcessingMetadata, [ + "requestData", + this.getOptions().requestData + ])), super._prepareEvent(event, hint, scope); + } + getSdk() { + return this.#sdk; + } + setSdk(sdk) { + this.#sdk = sdk; + } + /** + * Sets the request body context on all future events. + * + * @param body Request body. + * @example + * const body = await request.text(); + * toucan.setRequestBody(body); + */ + setRequestBody(body) { + this.getOptions().requestData = body; + } + /** + * Enable/disable the SDK. + * + * @param enabled + */ + setEnabled(enabled) { + this.getOptions().enabled = enabled; + } + }; + function workersStackLineParser(getModule2) { + let [arg1, arg2] = utils.nodeStackLineParser(getModule2); + return [arg1, (line) => { + let result = arg2(line); + if (result) { + let filename = result.filename; + result.abs_path = filename !== void 0 && !filename.startsWith("/") ? `/${filename}` : filename, result.in_app = filename !== void 0; + } + return result; + }]; + } + function getModule(filename) { + if (filename) + return utils.basename(filename, ".js"); + } + var defaultStackParser = utils.createStackParser(workersStackLineParser(getModule)); + function makeFetchTransport(options) { + function makeRequest({ body }) { + try { + let request = (options.fetcher ?? fetch)(options.url, { + method: "POST", + headers: options.headers, + body + }).then((response) => ({ + statusCode: response.status, + headers: { + "retry-after": response.headers.get("Retry-After"), + "x-sentry-rate-limits": response.headers.get("X-Sentry-Rate-Limits") + } + })); + return options.context && options.context.waitUntil(request), request; + } catch (e) { + return utils.rejectedSyncPromise(e); + } + } + return core.createTransport(options, makeRequest); + } + var Toucan2 = class _Toucan extends core.Scope { + #options; + constructor(options) { + if (super(), options.defaultIntegrations = options.defaultIntegrations === !1 ? [] : [ + ...Array.isArray(options.defaultIntegrations) ? options.defaultIntegrations : [ + requestDataIntegration(options.requestDataOptions), + linkedErrorsIntegration() + ] + ], options.release === void 0) { + let detectedRelease = getSentryRelease(); + detectedRelease !== void 0 && (options.release = detectedRelease); + } + this.#options = options, this.attachNewClient(); + } + /** + * Creates new ToucanClient and links it to this instance. + */ + attachNewClient() { + let client = new ToucanClient({ + ...this.#options, + transport: makeFetchTransport, + integrations: core.getIntegrationsToSetup(this.#options), + stackParser: utils.stackParserFromStackParserOptions(this.#options.stackParser || defaultStackParser), + transportOptions: { + ...this.#options.transportOptions, + context: this.#options.context + } + }); + this.setClient(client), client.setSdk(this), client.setupIntegrations(); + } + /** + * Sets the request body context on all future events. + * + * @param body Request body. + * @example + * const body = await request.text(); + * toucan.setRequestBody(body); + */ + setRequestBody(body) { + this.getClient()?.setRequestBody(body); + } + /** + * Enable/disable the SDK. + * + * @param enabled + */ + setEnabled(enabled) { + this.getClient()?.setEnabled(enabled); + } + /** + * Create a cron monitor check in and send it to Sentry. + * + * @param checkIn An object that describes a check in. + * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want + * to create a monitor automatically when sending a check in. + */ + captureCheckIn(checkIn, monitorConfig, scope) { + return checkIn.status === "in_progress" && this.setContext("monitor", { slug: checkIn.monitorSlug }), this.getClient().captureCheckIn(checkIn, monitorConfig, scope); + } + /** + * Add a breadcrumb to the current scope. + */ + addBreadcrumb(breadcrumb, maxBreadcrumbs = 100) { + let max = this.getClient().getOptions().maxBreadcrumbs || maxBreadcrumbs; + return super.addBreadcrumb(breadcrumb, max); + } + /** + * Clone all data from this instance into a new Toucan instance. + * + * @override + * @returns New Toucan instance. + */ + clone() { + let toucan = new _Toucan({ ...this.#options }); + return toucan._breadcrumbs = [...this._breadcrumbs], toucan._tags = { ...this._tags }, toucan._extra = { ...this._extra }, toucan._contexts = { ...this._contexts }, toucan._user = this._user, toucan._level = this._level, toucan._session = this._session, toucan._transactionName = this._transactionName, toucan._fingerprint = this._fingerprint, toucan._eventProcessors = [...this._eventProcessors], toucan._requestSession = this._requestSession, toucan._attachments = [...this._attachments], toucan._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, toucan._propagationContext = { ...this._propagationContext }, toucan._lastEventId = this._lastEventId, toucan; + } + /** + * Creates a new scope with and executes the given operation within. + * The scope is automatically removed once the operation + * finishes or throws. + */ + withScope(callback) { + let toucan = this.clone(); + return callback(toucan); + } + }; + Object.defineProperty(exports, "dedupeIntegration", { + enumerable: !0, + get: function() { + return core.dedupeIntegration; + } + }); + Object.defineProperty(exports, "extraErrorDataIntegration", { + enumerable: !0, + get: function() { + return core.extraErrorDataIntegration; + } + }); + Object.defineProperty(exports, "rewriteFramesIntegration", { + enumerable: !0, + get: function() { + return core.rewriteFramesIntegration; + } + }); + Object.defineProperty(exports, "sessionTimingIntegration", { + enumerable: !0, + get: function() { + return core.sessionTimingIntegration; + } + }); + exports.Toucan = Toucan2; + exports.linkedErrorsIntegration = linkedErrorsIntegration; + exports.requestDataIntegration = requestDataIntegration; + } +}); + +// ../workers-shared/asset-worker/src/index.ts +import { WorkerEntrypoint } from "cloudflare:workers"; + +// ../workers-shared/utils/performance.ts +var PerformanceTimer = class { + constructor(performanceTimer) { + this.performanceTimer = performanceTimer; + } + now() { + return this.performanceTimer ? this.performanceTimer.timeOrigin + this.performanceTimer.now() : Date.now(); + } +}; + +// ../workers-shared/utils/sentry.ts +var import_toucan_js = __toESM(require_index_cjs()); +function setupSentry(request, context, dsn, clientId, clientSecret, coloMetadata, versionMetadata, accountId, scriptId) { + if (!(dsn && clientId && clientSecret)) + return; + let sentry = new import_toucan_js.Toucan({ + dsn, + request, + context, + sampleRate: 1, + release: versionMetadata?.tag, + integrations: [ + (0, import_toucan_js.rewriteFramesIntegration)({ + iteratee(frame) { + return frame.filename = "/index.js", frame; + } + }) + ], + requestDataOptions: { + allowedHeaders: [ + "user-agent", + "cf-challenge", + "accept-encoding", + "accept-language", + "cf-ray", + "content-length", + "content-type", + "host" + ], + allowedSearchParams: /(.*)/ + }, + transportOptions: { + headers: { + "CF-Access-Client-ID": clientId, + "CF-Access-Client-Secret": clientSecret + } + } + }); + return coloMetadata && (sentry.setTag("colo", coloMetadata.coloId), sentry.setTag("metal", coloMetadata.metalId)), accountId && scriptId && (sentry.setTag("accountId", accountId), sentry.setTag("scriptId", scriptId)), sentry.setUser({ id: accountId?.toString() }), sentry; +} + +// ../workers-shared/utils/tracing.ts +function mockJaegerBindingSpan() { + return { + addLogs: () => { + }, + setTags: () => { + }, + end: () => { + }, + isRecording: !0 + }; +} +function mockJaegerBinding() { + return { + enterSpan: (_, span, ...args) => span(mockJaegerBindingSpan(), ...args), + getSpanContext: () => ({ + traceId: "test-trace", + spanId: "test-span", + parentSpanId: "test-parent-span", + traceFlags: 0 + }), + runWithSpanContext: (_, callback, ...args) => callback(...args), + traceId: "test-trace", + spanId: "test-span", + parentSpanId: "test-parent-span", + cfTraceIdHeader: "test-trace:test-span:0" + }; +} + +// ../workers-shared/asset-worker/src/analytics.ts +var Analytics = class { + constructor(readyAnalytics) { + this.data = {}; + this.readyAnalytics = readyAnalytics; + } + setData(newData) { + this.data = { ...this.data, ...newData }; + } + getData(key) { + return this.data[key]; + } + write() { + this.readyAnalytics && this.readyAnalytics.logEvent({ + version: 1, + accountId: this.data.accountId, + indexId: this.data.scriptId?.toString(), + doubles: [ + this.data.requestTime ?? -1, + // double1 + this.data.coloId ?? -1, + // double2 + this.data.metalId ?? -1, + // double3 + this.data.coloTier ?? -1, + // double4 + this.data.status ?? -1 + // double5 + ], + blobs: [ + this.data.hostname?.substring(0, 256), + // blob1 - trim to 256 bytes + this.data.userAgent?.substring(0, 256), + // blob2 - trim to 256 bytes + this.data.htmlHandling, + // blob3 + this.data.notFoundHandling, + // blob4 + this.data.error?.substring(0, 256), + // blob5 - trim to 256 bytes + this.data.version, + // blob6 + this.data.coloRegion, + // blob7 + this.data.cacheStatus + // blob8 + ] + }); + } +}; + +// ../workers-shared/asset-worker/src/assets-manifest.ts +var AssetsManifest = class { + constructor(data) { + this.data = data; + } + async get(pathname) { + let pathHash = await hashPath(pathname), entry = binarySearch( + new Uint8Array(this.data, 20), + pathHash + ); + return entry ? contentHashToKey(entry) : null; + } +}, hashPath = async (path) => { + let data = new TextEncoder().encode(path), hashBuffer = await crypto.subtle.digest( + "SHA-256", + data.buffer + ); + return new Uint8Array(hashBuffer, 0, 16); +}, binarySearch = (arr, searchValue) => { + if (arr.byteLength === 0) + return !1; + let offset = arr.byteOffset + (arr.byteLength / 40 >> 1) * 40, current = new Uint8Array(arr.buffer, offset, 16); + if (current.byteLength !== searchValue.byteLength) + throw new TypeError( + "Search value and current value are of different lengths" + ); + let cmp = compare(searchValue, current); + if (cmp < 0) { + let nextOffset = arr.byteOffset, nextLength = offset - arr.byteOffset; + return binarySearch( + new Uint8Array(arr.buffer, nextOffset, nextLength), + searchValue + ); + } else if (cmp > 0) { + let nextOffset = offset + 40, nextLength = arr.buffer.byteLength - offset - 40; + return binarySearch( + new Uint8Array(arr.buffer, nextOffset, nextLength), + searchValue + ); + } else + return new Uint8Array(arr.buffer, offset, 40); +}, compare = (a, b) => { + if (a.byteLength < b.byteLength) + return -1; + if (a.byteLength > b.byteLength) + return 1; + for (let [i, v] of a.entries()) { + if (v < b[i]) + return -1; + if (v > b[i]) + return 1; + } + return 0; +}, contentHashToKey = (buffer) => [...buffer.slice( + 16, + 32 +)].map((b) => b.toString(16).padStart(2, "0")).join(""); + +// ../workers-shared/asset-worker/src/configuration.ts +var applyConfigurationDefaults = (configuration) => ({ + compatibility_date: configuration?.compatibility_date ?? "2021-11-02", + compatibility_flags: configuration?.compatibility_flags ?? [], + html_handling: configuration?.html_handling ?? "auto-trailing-slash", + not_found_handling: configuration?.not_found_handling ?? "none", + redirects: configuration?.redirects ?? { + version: 1, + staticRules: {}, + rules: {} + }, + headers: configuration?.headers ?? { + version: 2, + rules: {} + }, + account_id: configuration?.account_id ?? -1, + script_id: configuration?.script_id ?? -1 +}); + +// ../workers-shared/asset-worker/src/experiment-analytics.ts +var ExperimentAnalytics = class { + constructor(readyAnalytics) { + this.data = {}; + this.readyAnalytics = readyAnalytics; + } + setData(newData) { + this.data = { ...this.data, ...newData }; + } + getData(key) { + return this.data[key]; + } + write() { + this.readyAnalytics && this.readyAnalytics.logEvent({ + version: 1, + accountId: this.data.accountId, + indexId: this.data.experimentName, + doubles: [ + this.data.manifestReadTime ?? -1 + // double1 + ], + blobs: [] + }); + } +}; + +// ../workers-shared/utils/responses.ts +var OkResponse = class _OkResponse extends Response { + static { + this.status = 200; + } + constructor(body, init) { + super(body, { + ...init, + status: _OkResponse.status + }); + } +}, NotFoundResponse = class _NotFoundResponse extends Response { + static { + this.status = 404; + } + constructor(...[body, init]) { + super(body, { + ...init, + status: _NotFoundResponse.status, + statusText: "Not Found" + }); + } +}, NoIntentResponse = class extends NotFoundResponse { + constructor() { + super(); + } +}, MethodNotAllowedResponse = class _MethodNotAllowedResponse extends Response { + static { + this.status = 405; + } + constructor(...[body, init]) { + super(body, { + ...init, + status: _MethodNotAllowedResponse.status, + statusText: "Method Not Allowed" + }); + } +}, InternalServerErrorResponse = class _InternalServerErrorResponse extends Response { + static { + this.status = 500; + } + constructor(err, init) { + super(null, { + ...init, + status: _InternalServerErrorResponse.status + }); + } +}, NotModifiedResponse = class _NotModifiedResponse extends Response { + static { + this.status = 304; + } + constructor(...[_body, init]) { + super(null, { + ...init, + status: _NotModifiedResponse.status, + statusText: "Not Modified" + }); + } +}, MovedPermanentlyResponse = class _MovedPermanentlyResponse extends Response { + static { + this.status = 301; + } + constructor(location, init) { + super(null, { + ...init, + status: _MovedPermanentlyResponse.status, + statusText: "Moved Permanently", + headers: { + ...init?.headers, + Location: location + } + }); + } +}, FoundResponse = class _FoundResponse extends Response { + static { + this.status = 302; + } + constructor(location, init) { + super(null, { + ...init, + status: _FoundResponse.status, + statusText: "Found", + headers: { + ...init?.headers, + Location: location + } + }); + } +}, SeeOtherResponse = class _SeeOtherResponse extends Response { + static { + this.status = 303; + } + constructor(location, init) { + super(null, { + ...init, + status: _SeeOtherResponse.status, + statusText: "See Other", + headers: { + ...init?.headers, + Location: location + } + }); + } +}, TemporaryRedirectResponse = class _TemporaryRedirectResponse extends Response { + static { + this.status = 307; + } + constructor(location, init) { + super(null, { + ...init, + status: _TemporaryRedirectResponse.status, + statusText: "Temporary Redirect", + headers: { + ...init?.headers, + Location: location + } + }); + } +}, PermanentRedirectResponse = class _PermanentRedirectResponse extends Response { + static { + this.status = 308; + } + constructor(location, init) { + super(null, { + ...init, + status: _PermanentRedirectResponse.status, + statusText: "Permanent Redirect", + headers: { + ...init?.headers, + Location: location + } + }); + } +}; + +// ../workers-shared/asset-worker/src/constants.ts +var CACHE_CONTROL_BROWSER = "public, max-age=0, must-revalidate"; + +// ../workers-shared/asset-worker/src/utils/rules-engine.ts +var ESCAPE_REGEX_CHARACTERS = /[-/\\^$*+?.()|[\]{}]/g, escapeRegex = (str) => str.replace(ESCAPE_REGEX_CHARACTERS, "\\$&"), HOST_PLACEHOLDER_REGEX = /(?<=^https:\\\/\\\/[^/]*?):([A-Za-z]\w*)(?=\\)/g, PLACEHOLDER_REGEX = /:([A-Za-z]\w*)/g, replacer = (str, replacements) => { + for (let [replacement, value] of Object.entries(replacements)) + str = str.replaceAll(`:${replacement}`, value); + return str; +}, generateRulesMatcher = (rules, replacerFn = (match) => match) => { + if (!rules) + return () => []; + let compiledRules = Object.entries(rules).map(([rule, match]) => { + let crossHost = rule.startsWith("https://"); + rule = rule.split("*").map(escapeRegex).join("(?.*)"); + let host_matches = rule.matchAll(HOST_PLACEHOLDER_REGEX); + for (let host_match of host_matches) + rule = rule.split(host_match[0]).join(`(?<${host_match[1]}>[^/.]+)`); + let path_matches = rule.matchAll(PLACEHOLDER_REGEX); + for (let path_match of path_matches) + rule = rule.split(path_match[0]).join(`(?<${path_match[1]}>[^/]+)`); + rule = "^" + rule + "$"; + try { + let regExp = new RegExp(rule); + return [{ crossHost, regExp }, match]; + } catch { + } + }).filter((value) => value !== void 0); + return ({ request }) => { + let { pathname, hostname } = new URL(request.url); + return compiledRules.map(([{ crossHost, regExp }, match]) => { + let test = crossHost ? `https://${hostname}${pathname}` : pathname, result = regExp.exec(test); + if (result) + return replacerFn(match, result.groups || {}); + }).filter((value) => value !== void 0); + }; +}; + +// ../workers-shared/asset-worker/src/utils/headers.ts +function getAssetHeaders(eTag, contentType, cacheStatus, request) { + let headers = new Headers({ + ETag: `"${eTag}"` + }); + return contentType !== void 0 && headers.append("Content-Type", contentType), isCacheable(request) && headers.append("Cache-Control", CACHE_CONTROL_BROWSER), headers.append("CF-Cache-Status", cacheStatus), headers; +} +function isCacheable(request) { + return !request.headers.has("Authorization") && !request.headers.has("Range"); +} +function attachCustomHeaders(request, response, configuration) { + let matches = generateRulesMatcher( + configuration.headers?.version === HEADERS_VERSION ? configuration.headers.rules : {}, + ({ set = {}, unset = [] }, replacements) => { + let replacedSet = {}; + return Object.keys(set).forEach((key) => { + replacedSet[key] = replacer(set[key], replacements); + }), { + set: replacedSet, + unset + }; + } + )({ request }), setMap = /* @__PURE__ */ new Set(); + return matches.forEach(({ set = {}, unset = [] }) => { + unset.forEach((key) => { + response.headers.delete(key); + }), Object.keys(set).forEach((key) => { + setMap.has(key.toLowerCase()) ? response.headers.append(key, set[key]) : (response.headers.set(key, set[key]), setMap.add(key.toLowerCase())); + }); + }), response; +} + +// ../workers-shared/asset-worker/src/handler.ts +var REDIRECTS_VERSION = 1, HEADERS_VERSION = 2, getResponseOrAssetIntent = async (request, env, configuration, exists) => { + let url = new URL(request.url), { host, search } = url, { pathname } = url, staticRedirectsMatcher = () => { + let withHostMatch = configuration.redirects.staticRules[`https://${host}${pathname}`], withoutHostMatch = configuration.redirects.staticRules[pathname]; + return withHostMatch && withoutHostMatch ? withHostMatch.lineNumber < withoutHostMatch.lineNumber ? withHostMatch : withoutHostMatch : withHostMatch || withoutHostMatch; + }, generateRedirectsMatcher = () => generateRulesMatcher( + configuration.redirects.version === REDIRECTS_VERSION ? configuration.redirects.rules : {}, + ({ status, to }, replacements) => ({ + status, + to: replacer(to, replacements) + }) + ), redirectMatch = staticRedirectsMatcher() || generateRedirectsMatcher()({ request })[0], proxied = !1; + if (redirectMatch) + if (redirectMatch.status === 200) + pathname = new URL(redirectMatch.to, request.url).pathname, proxied = !0; + else { + let { status, to } = redirectMatch, destination = new URL(to, request.url), location = destination.origin === new URL(request.url).origin ? `${destination.pathname}${destination.search || search}${destination.hash}` : `${destination.href.slice(0, destination.href.length - (destination.search.length + destination.hash.length))}${destination.search ? destination.search : search}${destination.hash}`; + switch (status) { + case MovedPermanentlyResponse.status: + return new MovedPermanentlyResponse(location); + case SeeOtherResponse.status: + return new SeeOtherResponse(location); + case TemporaryRedirectResponse.status: + return new TemporaryRedirectResponse(location); + case PermanentRedirectResponse.status: + return new PermanentRedirectResponse(location); + case FoundResponse.status: + default: + return new FoundResponse(location); + } + } + let decodedPathname = decodePath(pathname), intent = await getIntent(decodedPathname, configuration, exists); + if (!intent) { + let response = proxied ? new NotFoundResponse() : new NoIntentResponse(); + return env.JAEGER.enterSpan("no_intent", (span) => (span.setTags({ + decodedPathname, + configuration: JSON.stringify(configuration), + proxied, + status: response.status + }), response)); + } + let method = request.method.toUpperCase(); + if (!["GET", "HEAD"].includes(method)) + return env.JAEGER.enterSpan("method_not_allowed", (span) => (span.setTags({ + method, + status: MethodNotAllowedResponse.status + }), new MethodNotAllowedResponse())); + let decodedDestination = intent.redirect ?? decodedPathname, encodedDestination = encodePath(decodedDestination); + return encodedDestination !== pathname && intent.asset || intent.redirect ? env.JAEGER.enterSpan("redirect", (span) => (span.setTags({ + originalPath: pathname, + location: encodedDestination !== pathname ? encodedDestination : intent.redirect ?? "", + status: TemporaryRedirectResponse.status + }), new TemporaryRedirectResponse(encodedDestination + search))) : intent.asset ? intent.asset : env.JAEGER.enterSpan("unknown_action", (span) => (span.setTags({ + pathname, + status: InternalServerErrorResponse.status + }), new InternalServerErrorResponse(new Error("Unknown action")))); +}, resolveAssetIntentToResponse = async (assetIntent, request, env, getByETag, analytics) => { + let { pathname } = new URL(request.url), method = request.method.toUpperCase(), asset = await env.JAEGER.enterSpan("getByETag", async (span) => (span.setTags({ + pathname, + eTag: assetIntent.eTag, + status: assetIntent.status + }), await getByETag(assetIntent.eTag))), headers = getAssetHeaders( + assetIntent.eTag, + asset.contentType, + asset.cacheStatus, + request + ); + analytics.setData({ cacheStatus: asset.cacheStatus }); + let strongETag = `"${assetIntent.eTag}"`, weakETag = `W/${strongETag}`, ifNoneMatch = request.headers.get("If-None-Match") || ""; + return [weakETag, strongETag].includes(ifNoneMatch) ? env.JAEGER.enterSpan("matched_etag", (span) => (span.setTags({ + matchedEtag: ifNoneMatch, + status: NotModifiedResponse.status + }), new NotModifiedResponse(null, { headers }))) : env.JAEGER.enterSpan("response", (span) => { + span.setTags({ + etag: assetIntent.eTag, + status: assetIntent.status, + head: method === "HEAD" + }); + let body = method === "HEAD" ? null : asset.readableStream; + switch (assetIntent.status) { + case NotFoundResponse.status: + return new NotFoundResponse(body, { headers }); + case OkResponse.status: + return new OkResponse(body, { headers }); + } + }); +}, canFetch = async (request, env, configuration, exists) => !(await getResponseOrAssetIntent( + request, + env, + { + ...configuration, + not_found_handling: "none" + }, + exists +) instanceof NoIntentResponse), handleRequest = async (request, env, configuration, exists, getByETag, analytics) => { + let responseOrAssetIntent = await getResponseOrAssetIntent( + request, + env, + configuration, + exists + ), response = responseOrAssetIntent instanceof Response ? responseOrAssetIntent : await resolveAssetIntentToResponse( + responseOrAssetIntent, + request, + env, + getByETag, + analytics + ); + return attachCustomHeaders(request, response, configuration); +}, getIntent = async (pathname, configuration, exists, skipRedirects = !1) => { + switch (configuration.html_handling) { + case "auto-trailing-slash": + return htmlHandlingAutoTrailingSlash( + pathname, + configuration, + exists, + skipRedirects + ); + case "force-trailing-slash": + return htmlHandlingForceTrailingSlash( + pathname, + configuration, + exists, + skipRedirects + ); + case "drop-trailing-slash": + return htmlHandlingDropTrailingSlash( + pathname, + configuration, + exists, + skipRedirects + ); + case "none": + return htmlHandlingNone(pathname, configuration, exists); + } +}, htmlHandlingAutoTrailingSlash = async (pathname, configuration, exists, skipRedirects) => { + let redirectResult = null, eTagResult = null, exactETag = await exists(pathname); + if (pathname.endsWith("/index")) { + if (exactETag) + return { + asset: { eTag: exactETag, status: OkResponse.status }, + redirect: null + }; + if (redirectResult = await safeRedirect( + `${pathname}.html`, + pathname.slice(0, -5), + configuration, + exists, + skipRedirects + )) + return redirectResult; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -6)}.html`, + pathname.slice(0, -6), + configuration, + exists, + skipRedirects + )) + return redirectResult; + } else if (pathname.endsWith("/index.html")) { + if (redirectResult = await safeRedirect( + pathname, + pathname.slice(0, -10), + configuration, + exists, + skipRedirects + )) + return redirectResult; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -11)}.html`, + pathname.slice(0, -11), + configuration, + exists, + skipRedirects + )) + return redirectResult; + } else if (pathname.endsWith("/")) { + if (eTagResult = await exists(`${pathname}index.html`)) + return { + asset: { eTag: eTagResult, status: OkResponse.status }, + redirect: null + }; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -1)}.html`, + pathname.slice(0, -1), + configuration, + exists, + skipRedirects + )) + return redirectResult; + } else if (pathname.endsWith(".html")) { + if (redirectResult = await safeRedirect( + pathname, + pathname.slice(0, -5), + configuration, + exists, + skipRedirects + )) + return redirectResult; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -5)}/index.html`, + `${pathname.slice(0, -5)}/`, + configuration, + exists, + skipRedirects + )) + return redirectResult; + } + return exactETag ? { + asset: { eTag: exactETag, status: OkResponse.status }, + redirect: null + } : (eTagResult = await exists(`${pathname}.html`)) ? { + asset: { eTag: eTagResult, status: OkResponse.status }, + redirect: null + } : (redirectResult = await safeRedirect( + `${pathname}/index.html`, + `${pathname}/`, + configuration, + exists, + skipRedirects + )) ? redirectResult : notFound(pathname, configuration, exists); +}, htmlHandlingForceTrailingSlash = async (pathname, configuration, exists, skipRedirects) => { + let redirectResult = null, eTagResult = null, exactETag = await exists(pathname); + if (pathname.endsWith("/index")) { + if (exactETag) + return { + asset: { eTag: exactETag, status: OkResponse.status }, + redirect: null + }; + if (redirectResult = await safeRedirect( + `${pathname}.html`, + pathname.slice(0, -5), + configuration, + exists, + skipRedirects + )) + return redirectResult; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -6)}.html`, + pathname.slice(0, -5), + configuration, + exists, + skipRedirects + )) + return redirectResult; + } else if (pathname.endsWith("/index.html")) { + if (redirectResult = await safeRedirect( + pathname, + pathname.slice(0, -10), + configuration, + exists, + skipRedirects + )) + return redirectResult; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -11)}.html`, + pathname.slice(0, -10), + configuration, + exists, + skipRedirects + )) + return redirectResult; + } else if (pathname.endsWith("/")) { + if (eTagResult = await exists(`${pathname}index.html`)) + return { + asset: { eTag: eTagResult, status: OkResponse.status }, + redirect: null + }; + if (eTagResult = await exists(`${pathname.slice(0, -1)}.html`)) + return { + asset: { eTag: eTagResult, status: OkResponse.status }, + redirect: null + }; + } else if (pathname.endsWith(".html")) { + if (redirectResult = await safeRedirect( + pathname, + `${pathname.slice(0, -5)}/`, + configuration, + exists, + skipRedirects + )) + return redirectResult; + if (exactETag) + return { + asset: { eTag: exactETag, status: OkResponse.status }, + redirect: null + }; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -5)}/index.html`, + `${pathname.slice(0, -5)}/`, + configuration, + exists, + skipRedirects + )) + return redirectResult; + } + return exactETag ? { + asset: { eTag: exactETag, status: OkResponse.status }, + redirect: null + } : (redirectResult = await safeRedirect( + `${pathname}.html`, + `${pathname}/`, + configuration, + exists, + skipRedirects + )) || (redirectResult = await safeRedirect( + `${pathname}/index.html`, + `${pathname}/`, + configuration, + exists, + skipRedirects + )) ? redirectResult : notFound(pathname, configuration, exists); +}, htmlHandlingDropTrailingSlash = async (pathname, configuration, exists, skipRedirects) => { + let redirectResult = null, eTagResult = null, exactETag = await exists(pathname); + if (pathname.endsWith("/index")) { + if (exactETag) + return { + asset: { eTag: exactETag, status: OkResponse.status }, + redirect: null + }; + if (pathname === "/index") { + if (redirectResult = await safeRedirect( + "/index.html", + "/", + configuration, + exists, + skipRedirects + )) + return redirectResult; + } else { + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -6)}.html`, + pathname.slice(0, -6), + configuration, + exists, + skipRedirects + )) + return redirectResult; + if (redirectResult = await safeRedirect( + `${pathname}.html`, + pathname.slice(0, -6), + configuration, + exists, + skipRedirects + )) + return redirectResult; + } + } else if (pathname.endsWith("/index.html")) + if (pathname === "/index.html") { + if (redirectResult = await safeRedirect( + "/index.html", + "/", + configuration, + exists, + skipRedirects + )) + return redirectResult; + } else { + if (redirectResult = await safeRedirect( + pathname, + pathname.slice(0, -11), + configuration, + exists, + skipRedirects + )) + return redirectResult; + if (exactETag) + return { + asset: { eTag: exactETag, status: OkResponse.status }, + redirect: null + }; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -11)}.html`, + pathname.slice(0, -11), + configuration, + exists, + skipRedirects + )) + return redirectResult; + } + else if (pathname.endsWith("/")) + if (pathname === "/") { + if (eTagResult = await exists("/index.html")) + return { + asset: { eTag: eTagResult, status: OkResponse.status }, + redirect: null + }; + } else { + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -1)}.html`, + pathname.slice(0, -1), + configuration, + exists, + skipRedirects + )) + return redirectResult; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -1)}/index.html`, + pathname.slice(0, -1), + configuration, + exists, + skipRedirects + )) + return redirectResult; + } + else if (pathname.endsWith(".html")) { + if (redirectResult = await safeRedirect( + pathname, + pathname.slice(0, -5), + configuration, + exists, + skipRedirects + )) + return redirectResult; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -5)}/index.html`, + pathname.slice(0, -5), + configuration, + exists, + skipRedirects + )) + return redirectResult; + } + return exactETag ? { + asset: { eTag: exactETag, status: OkResponse.status }, + redirect: null + } : (eTagResult = await exists(`${pathname}.html`)) ? { + asset: { eTag: eTagResult, status: OkResponse.status }, + redirect: null + } : (eTagResult = await exists(`${pathname}/index.html`)) ? { + asset: { eTag: eTagResult, status: OkResponse.status }, + redirect: null + } : notFound(pathname, configuration, exists); +}, htmlHandlingNone = async (pathname, configuration, exists) => { + let exactETag = await exists(pathname); + return exactETag ? { + asset: { eTag: exactETag, status: OkResponse.status }, + redirect: null + } : notFound(pathname, configuration, exists); +}, notFound = async (pathname, configuration, exists) => { + switch (configuration.not_found_handling) { + case "single-page-application": { + let eTag = await exists("/index.html"); + return eTag ? { + asset: { eTag, status: OkResponse.status }, + redirect: null + } : null; + } + case "404-page": { + let cwd = pathname; + for (; cwd; ) { + cwd = cwd.slice(0, cwd.lastIndexOf("/")); + let eTag = await exists(`${cwd}/404.html`); + if (eTag) + return { + asset: { eTag, status: NotFoundResponse.status }, + redirect: null + }; + } + return null; + } + case "none": + default: + return null; + } +}, safeRedirect = async (file, destination, configuration, exists, skip) => { + if (skip) + return null; + if (!await exists(destination)) { + let intent = await getIntent(destination, configuration, exists, !0); + if (intent?.asset && intent.asset.eTag === await exists(file)) + return { + asset: null, + redirect: destination + }; + } + return null; +}, decodePath = (pathname) => pathname.split("/").map((x) => { + try { + return decodeURIComponent(x); + } catch { + return x; + } +}).join("/").replace(/\/+/g, "/"), encodePath = (pathname) => pathname.split("/").map((x) => { + try { + return encodeURIComponent(x); + } catch { + return x; + } +}).join("/"); + +// ../workers-shared/asset-worker/src/utils/final-operations.ts +function handleError(sentry, analytics, err) { + try { + let response = new InternalServerErrorResponse(err); + return sentry && sentry.captureException(err), err instanceof Error && analytics.setData({ error: err.message }), response; + } catch (e) { + return console.error("Error handling error", e), new InternalServerErrorResponse(e); + } +} +function submitMetrics(analytics, performance, startTimeMs) { + try { + analytics.setData({ requestTime: performance.now() - startTimeMs }), analytics.write(); + } catch (e) { + console.error("Error submitting metrics", e); + } +} + +// ../workers-shared/asset-worker/src/utils/kv.ts +async function getAssetWithMetadataFromKV(assetsKVNamespace, assetKey, sentry, retries = 1) { + let attempts = 0; + for (; attempts <= retries; ) + try { + let asset = await assetsKVNamespace.getWithMetadata( + assetKey, + { + type: "stream", + cacheTtl: 31536e3 + // 1 year + } + ); + if (asset.value === null) { + let retriedAsset = await assetsKVNamespace.getWithMetadata(assetKey, { + type: "stream", + cacheTtl: 60 + // Minimum value allowed + }); + return retriedAsset.value !== null && sentry && sentry.captureException( + new Error( + `Initial request for asset ${assetKey} failed, but subsequent request succeeded.` + ) + ), retriedAsset; + } + return asset; + } catch (err) { + if (attempts >= retries) { + let message = `KV GET ${assetKey} failed.`; + throw err instanceof Error && (message = `KV GET ${assetKey} failed: ${err.message}`), new Error(message); + } + await new Promise( + (resolvePromise) => setTimeout(resolvePromise, Math.pow(2, attempts++) * 1e3) + ); + } +} + +// ../workers-shared/asset-worker/src/index.ts +var src_default = class extends WorkerEntrypoint { + async fetch(request) { + let sentry, analytics = new Analytics(this.env.ANALYTICS), performance = new PerformanceTimer(this.env.UNSAFE_PERFORMANCE), startTimeMs = performance.now(); + try { + this.env.JAEGER ??= mockJaegerBinding(), sentry = setupSentry( + request, + this.ctx, + this.env.SENTRY_DSN, + this.env.SENTRY_ACCESS_CLIENT_ID, + this.env.SENTRY_ACCESS_CLIENT_SECRET, + this.env.COLO_METADATA, + this.env.VERSION_METADATA, + this.env.CONFIG?.account_id, + this.env.CONFIG?.script_id + ); + let config = applyConfigurationDefaults(this.env.CONFIG), userAgent = request.headers.get("user-agent") ?? "UA UNKNOWN", url = new URL(request.url); + return this.env.COLO_METADATA && this.env.VERSION_METADATA && this.env.CONFIG && analytics.setData({ + accountId: this.env.CONFIG.account_id, + scriptId: this.env.CONFIG.script_id, + coloId: this.env.COLO_METADATA.coloId, + metalId: this.env.COLO_METADATA.metalId, + coloTier: this.env.COLO_METADATA.coloTier, + coloRegion: this.env.COLO_METADATA.coloRegion, + version: this.env.VERSION_METADATA.tag, + hostname: url.hostname, + htmlHandling: config.html_handling, + notFoundHandling: config.not_found_handling, + userAgent + }), await this.env.JAEGER.enterSpan("handleRequest", async (span) => { + span.setTags({ + hostname: url.hostname, + eyeballPath: url.pathname, + env: this.env.ENVIRONMENT, + version: this.env.VERSION_METADATA?.id + }); + let response = await handleRequest( + request, + this.env, + config, + this.unstable_exists.bind(this), + this.unstable_getByETag.bind(this), + analytics + ); + return analytics.setData({ status: response.status }), response; + }); + } catch (err) { + return handleError(sentry, analytics, err); + } finally { + submitMetrics(analytics, performance, startTimeMs); + } + } + // TODO: Add observability to these methods + async unstable_canFetch(request) { + return this.env.JAEGER ??= mockJaegerBinding(), canFetch( + request, + this.env, + applyConfigurationDefaults(this.env.CONFIG), + this.unstable_exists.bind(this) + ); + } + async unstable_getByETag(eTag) { + let performance = new PerformanceTimer(this.env.UNSAFE_PERFORMANCE), startTime = performance.now(), asset = await getAssetWithMetadataFromKV( + this.env.ASSETS_KV_NAMESPACE, + eTag + ), assetFetchTime = performance.now() - startTime; + if (!asset || !asset.value) + throw new Error( + `Requested asset ${eTag} exists in the asset manifest but not in the KV namespace.` + ); + return { + readableStream: asset.value, + contentType: asset.metadata?.contentType, + // KV does not yet provide a way to check if a value was fetched from cache + // so we assume that if the fetch time is less than 100ms, it was a cache hit. + // This is a reasonable assumption given the data we have and how KV works. + cacheStatus: assetFetchTime <= 100 ? "HIT" : "MISS" + }; + } + async unstable_getByPathname(pathname) { + let eTag = await this.unstable_exists(pathname); + return eTag ? this.unstable_getByETag(eTag) : null; + } + async unstable_exists(pathname) { + let analytics = new ExperimentAnalytics(this.env.EXPERIMENT_ANALYTICS), performance = new PerformanceTimer(this.env.UNSAFE_PERFORMANCE); + this.env.COLO_METADATA && this.env.VERSION_METADATA && this.env.CONFIG && analytics.setData({ + accountId: this.env.CONFIG.account_id, + experimentName: "manifest-read-timing" + }); + let startTimeMs = performance.now(); + try { + return await new AssetsManifest(this.env.ASSETS_MANIFEST).get(pathname); + } finally { + analytics.setData({ manifestReadTime: performance.now() - startTimeMs }), analytics.write(); + } + } +}; + +// src/workers/assets/assets.worker.ts +var assets_worker_default = src_default; +export { + assets_worker_default as default +}; +//# sourceMappingURL=assets.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/assets/assets.worker.js.map b/node_modules/miniflare/dist/src/workers/assets/assets.worker.js.map new file mode 100644 index 0000000..4f281f9 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/assets/assets.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/is.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/string.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/aggregate-errors.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/array.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/version.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/worldwide.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/browser.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/debug-build.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/logger.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/dsn.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/error.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/object.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/stacktrace.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/handlers.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/console.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/supports.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/time.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/fetch.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/globalError.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/globalUnhandledRejection.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/env.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/node.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/isBrowser.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/memo.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/misc.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/normalize.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/path.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/syncpromise.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/promisebuffer.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/cookie.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/url.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/requestdata.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/severity.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/node-stack-trace.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/baggage.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/tracing.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/envelope.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/clientreport.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/ratelimit.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/cache.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/eventbuilder.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/anr.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/lru.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_nullishCoalesce.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_asyncNullishCoalesce.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_asyncOptionalChain.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_asyncOptionalChainDelete.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_optionalChain.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_optionalChainDelete.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/propagationContext.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/vendor/escapeStringForRegex.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/vendor/supportsHistory.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/index.js", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/debug-build.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/carrier.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/session.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/spanOnScope.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/scope.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/defaultScopes.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/asyncContext/stackStrategy.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/asyncContext/index.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/currentScopes.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/metric-summary.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/semanticAttributes.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/spanstatus.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/spanUtils.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/errors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/utils.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/hubextensions.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/hasTracingEnabled.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/sentryNonRecordingSpan.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/handleCallbackErrors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/constants.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/dynamicSamplingContext.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/logSpans.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/parseSampleRate.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/sampling.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/envelope.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/measurement.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/sentrySpan.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/trace.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/idleSpan.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/eventProcessors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/applyScopeDataToEvent.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/prepareEvent.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/exports.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/sessionflusher.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/api.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integration.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/baseclient.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/checkin.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/server-runtime-client.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/sdk.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/transports/base.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/transports/offline.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/transports/multiplexed.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/isSentryRequestUrl.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/parameterize.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/sdkMetadata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/breadcrumbs.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/functiontostring.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/inboundfilters.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/linkederrors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metadata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/metadata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/requestdata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/captureconsole.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/debug.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/dedupe.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/extraerrordata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/rewriteframes.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/sessiontiming.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/zoderrors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/third-party-errors-filter.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/constants.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/exports.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/utils.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/envelope.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/instance.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/aggregator.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/exports-default.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/browser-aggregator.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/fetch.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/trpc.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/feedback.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/getCurrentHubShim.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/index.js", "../../../../../../node_modules/.pnpm/toucan-js@4.0.0_patch_hash=qxsfpdzvzbhq2ecirbu5xq4vlq/node_modules/toucan-js/dist/index.cjs.js", "../../../../../workers-shared/asset-worker/src/index.ts", "../../../../../workers-shared/utils/performance.ts", "../../../../../workers-shared/utils/sentry.ts", "../../../../../workers-shared/utils/tracing.ts", "../../../../../workers-shared/asset-worker/src/analytics.ts", "../../../../../workers-shared/asset-worker/src/assets-manifest.ts", "../../../../../workers-shared/asset-worker/src/configuration.ts", "../../../../../workers-shared/asset-worker/src/experiment-analytics.ts", "../../../../../workers-shared/utils/responses.ts", "../../../../../workers-shared/asset-worker/src/constants.ts", "../../../../../workers-shared/asset-worker/src/utils/rules-engine.ts", "../../../../../workers-shared/asset-worker/src/utils/headers.ts", "../../../../../workers-shared/asset-worker/src/handler.ts", "../../../../../workers-shared/asset-worker/src/utils/final-operations.ts", "../../../../../workers-shared/asset-worker/src/utils/kv.ts", "../../../../src/workers/assets/assets.worker.ts"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,QAAM,iBAAiB,OAAO,UAAU;AASjC,aAAS,QAAQ,KAA4B;AAClD,cAAQ,eAAe,KAAK,GAAG,GAAC;QAC9B,KAAK;QACL,KAAK;QACL,KAAK;AACH,iBAAO;QACT;AACE,iBAAO,aAAa,KAAK,KAAK;MACpC;IACA;AAQA,aAAS,UAAU,KAAc,WAA4B;AAC3D,aAAO,eAAe,KAAK,GAAG,MAAM,WAAW,SAAS;IAC1D;AASO,aAAS,aAAa,KAAuB;AAClD,aAAO,UAAU,KAAK,YAAY;IACpC;AASO,aAAS,WAAW,KAAuB;AAChD,aAAO,UAAU,KAAK,UAAU;IAClC;AASO,aAAS,eAAe,KAAuB;AACpD,aAAO,UAAU,KAAK,cAAc;IACtC;AASO,aAAS,SAAS,KAA6B;AACpD,aAAO,UAAU,KAAK,QAAQ;IAChC;AASO,aAAS,sBAAsB,KAA0C;AAC9E,aACE,OAAO,OAAQ,YACf,QAAQ,QACR,gCAAgC,OAChC,gCAAgC;IAEpC;AASO,aAAS,YAAY,KAAgC;AAC1D,aAAO,QAAQ,QAAQ,sBAAsB,GAAG,KAAM,OAAO,OAAQ,YAAY,OAAO,OAAQ;IAClG;AASO,aAAS,cAAc,KAA8C;AAC1E,aAAO,UAAU,KAAK,QAAQ;IAChC;AASO,aAAS,QAAQ,KAAuC;AAC7D,aAAO,OAAO,QAAU,OAAe,aAAa,KAAK,KAAK;IAChE;AASO,aAAS,UAAU,KAAuB;AAC/C,aAAO,OAAO,UAAY,OAAe,aAAa,KAAK,OAAO;IACpE;AASO,aAAS,SAAS,KAA6B;AACpD,aAAO,UAAU,KAAK,QAAQ;IAChC;AAMO,aAA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QACT,mBAAmB,IAAI;AAAA,MACxB;AAGD,WAAO;AAAA,MACN,gBAAgB,MAAM;AAAA,MACtB,aAAa,MAAM,UAAU;AAAA;AAAA;AAAA;AAAA,MAI7B,aAAa,kBAAkB,MAAM,QAAQ;AAAA,IAC9C;AAAA,EACD;AAAA,EAEA,MAAM,uBAAuB,UAInB;AACT,QAAM,OAAO,MAAM,KAAK,gBAAgB,QAAQ;AAChD,WAAK,OAIE,KAAK,mBAAmB,IAAI,IAH3B;AAAA,EAIT;AAAA,EAEA,MAAM,gBAAgB,UAA0C;AAC/D,QAAM,YAAY,IAAI,oBAAoB,KAAK,IAAI,oBAAoB,GACjE,cAAc,IAAI,iBAAiB,KAAK,IAAI,kBAAkB;AAEpE,IACC,KAAK,IAAI,iBACT,KAAK,IAAI,oBACT,KAAK,IAAI,UAET,UAAU,QAAQ;AAAA,MACjB,WAAW,KAAK,IAAI,OAAO;AAAA,MAC3B,gBAAgB;AAAA,IACjB,CAAC;AAGF,QAAM,cAAc,YAAY,IAAI;AACpC,QAAI;AAEH,aAAO,MADgB,IAAI,eAAe,KAAK,IAAI,eAAe,EACtC,IAAI,QAAQ;AAAA,IACzC,UAAE;AACD,gBAAU,QAAQ,EAAE,kBAAkB,YAAY,IAAI,IAAI,YAAY,CAAC,GACvE,UAAU,MAAM;AAAA,IACjB;AAAA,EACD;AACD;;;AepNA,IAAO,wBAAQ;", + "names": ["isVueViewModel", "isString", "isRegExp", "isInstanceOf", "truncate", "input", "SDK_VERSION", "GLOBAL_OBJ", "isString", "GLOBAL_OBJ", "console", "logger", "DEBUG_BUILD", "consoleSandbox", "DEBUG_BUILD", "logger", "DEBUG_BUILD", "logger", "isError", "isEvent", "isInstanceOf", "isElement", "htmlTreeAsString", "truncate", "isPlainObject", "isPrimitive", "DEBUG_BUILD", "logger", "getFunctionName", "addHandler", "maybeInstrument", "GLOBAL_OBJ", "CONSOLE_LEVELS", "fill", "originalConsoleMethods", "triggerHandlers", "GLOBAL_OBJ", "DEBUG_BUILD", "logger", "GLOBAL_OBJ", "_browserPerformanceTimeOriginMode", "addHandler", "maybeInstrument", "supportsNativeFetch", "fill", "GLOBAL_OBJ", "timestampInSeconds", "triggerHandlers", "isError", "addNonEnumerableProperty", "addHandler", "maybeInstrument", "GLOBAL_OBJ", "triggerHandlers", "addHandler", "maybeInstrument", "GLOBAL_OBJ", "triggerHandlers", "isBrowserBundle", "isNodeEnv", "GLOBAL_OBJ", "GLOBAL_OBJ", "crypto", "snipLine", "addNonEnumerableProperty", "object", "memo", "memoBuilder", "convertToPlainObject", "isVueViewModel", "isSyntheticEvent", "getFunctionName", "States", "isThenable", "rejectedSyncPromise", "SentryError", "SyncPromise", "resolvedSyncPromise", "stripUrlQueryAndFragment", "parseCookie", "isString", "normalize", "isPlainObject", "DEBUG_BUILD", "logger", "UNKNOWN_FUNCTION", "isString", "DEBUG_BUILD", "logger", "baggage", "baggageHeaderToDynamicSamplingContext", "uuid4", "GLOBAL_OBJ", "normalize", "dropUndefinedKeys", "dsn", "dsnToString", "dateTimestampInSeconds", "createEnvelope", "extractExceptionKeysForMessage", "isErrorEvent", "isError", "isPlainObject", "normalizeToSize", "ex", "addExceptionTypeValue", "addExceptionMechanism", "isParameterizedString", "dropUndefinedKeys", "UNKNOWN_FUNCTION", "filenameIsInApp", "_nullishCoalesce", "_asyncOptionalChain", "_optionalChain", "uuid4", "GLOBAL_OBJ", "console", "fetch", "GLOBAL_OBJ", "SDK_VERSION", "timestampInSeconds", "uuid4", "dropUndefinedKeys", "addNonEnumerableProperty", "generatePropagationContext", "_setSpanForScope", "_getSpanForScope", "updateSession", "session", "isPlainObject", "dateTimestampInSeconds", "uuid4", "logger", "getGlobalSingleton", "ScopeClass", "scope", "Scope", "isThenable", "getMainCarrier", "getSentryCarrier", "getDefaultCurrentScope", "getDefaultIsolationScope", "getMainCarrier", "getSentryCarrier", "carrier", "getStackAsyncContextStrategy", "carrier", "getMainCarrier", "getAsyncContextStrategy", "getGlobalSingleton", "ScopeClass", "scope", "dropUndefinedKeys", "dropUndefinedKeys", "generateSentryTraceHeader", "timestampInSeconds", "SEMANTIC_ATTRIBUTE_SENTRY_OP", "SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN", "getMetricSummaryJsonForSpan", "SPAN_STATUS_UNSET", "SPAN_STATUS_OK", "addNonEnumerableProperty", "span", "carrier", "getMainCarrier", "getAsyncContextStrategy", "_getSpanForScope", "getCurrentScope", "updateMetricSummaryOnSpan", "addGlobalErrorInstrumentationHandler", "addGlobalUnhandledRejectionInstrumentationHandler", "getActiveSpan", "getRootSpan", "DEBUG_BUILD", "logger", "SPAN_STATUS_ERROR", "addNonEnumerableProperty", "registerSpanErrorInstrumentation", "getClient", "uuid4", "TRACE_FLAG_NONE", "isThenable", "addNonEnumerableProperty", "dropUndefinedKeys", "DEFAULT_ENVIRONMENT", "getClient", "spanToJSON", "getRootSpan", "SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE", "SEMANTIC_ATTRIBUTE_SENTRY_SOURCE", "spanIsSampled", "dynamicSamplingContextToSentryBaggageHeader", "DEBUG_BUILD", "spanToJSON", "spanIsSampled", "getRootSpan", "op", "description", "logger", "DEBUG_BUILD", "logger", "hasTracingEnabled", "parseSampleRate", "DEBUG_BUILD", "logger", "getSdkMetadataForEnvelopeHeader", "dsnToString", "createEnvelope", "createEventEnvelopeHeaders", "dsc", "getDynamicSamplingContextFromSpan", "spanToJSON", "createSpanEnvelopeItem", "getActiveSpan", "getRootSpan", "SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE", "SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT", "uuid4", "timestampInSeconds", "SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN", "SEMANTIC_ATTRIBUTE_SENTRY_OP", "TRACE_FLAG_SAMPLED", "TRACE_FLAG_NONE", "spanTimeInputToSeconds", "logSpanEnd", "dropUndefinedKeys", "getStatusMessage", "getMetricSummaryJsonForSpan", "SEMANTIC_ATTRIBUTE_PROFILE_ID", "SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME", "timedEventsToMeasurements", "getRootSpan", "DEBUG_BUILD", "logger", "getClient", "createSpanEnvelope", "getCapturedScopesOnSpan", "getCurrentScope", "spanToJSON", "getSpanDescendants", "SEMANTIC_ATTRIBUTE_SENTRY_SOURCE", "spanToTransactionTraceContext", "getDynamicSamplingContextFromSpan", "envelope", "withScope", "SentryNonRecordingSpan", "_setSpanForScope", "handleCallbackErrors", "spanToJSON", "SPAN_STATUS_ERROR", "getCurrentScope", "propagationContextFromHeaders", "generatePropagationContext", "DEBUG_BUILD", "logger", "hasTracingEnabled", "getIsolationScope", "addChildSpanToSpan", "getDynamicSamplingContextFromSpan", "spanIsSampled", "freezeDscOnSpan", "logSpanStart", "setCapturedScopesOnSpan", "spanTimeInputToSeconds", "carrier", "getMainCarrier", "getAsyncContextStrategy", "getClient", "sampleSpan", "SentrySpan", "SEMANTIC_ATTRIBUTE_SENTRY_SOURCE", "SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE", "_getSpanForScope", "getRootSpan", "getClient", "hasTracingEnabled", "SentryNonRecordingSpan", "getCurrentScope", "getActiveSpan", "timestampInSeconds", "spanTimeInputToSeconds", "getSpanDescendants", "span", "spanToJSON", "timestamp", "_setSpanForScope", "SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON", "logger", "SPAN_STATUS_ERROR", "DEBUG_BUILD", "removeChildSpanFromSpan", "startInactiveSpan", "SyncPromise", "DEBUG_BUILD", "logger", "isThenable", "dropUndefinedKeys", "spanToTraceContext", "getDynamicSamplingContextFromSpan", "getRootSpan", "spanToJSON", "arrayify", "scope", "uuid4", "dateTimestampInSeconds", "addExceptionMechanism", "getGlobalScope", "mergeScopeData", "applyScopeDataToEvent", "eventProcessors", "notifyEventProcessors", "DEFAULT_ENVIRONMENT", "truncate", "GLOBAL_OBJ", "normalize", "Scope", "getCurrentScope", "parseEventHintOrCaptureContext", "getIsolationScope", "getClient", "DEBUG_BUILD", "logger", "uuid4", "timestampInSeconds", "withIsolationScope", "isThenable", "DEFAULT_ENVIRONMENT", "GLOBAL_OBJ", "session", "makeSession", "updateSession", "closeSession", "dropUndefinedKeys", "getIsolationScope", "urlEncode", "makeDsn", "dsnToString", "arrayify", "DEBUG_BUILD", "logger", "getClient", "makeDsn", "DEBUG_BUILD", "logger", "getEnvelopeEndpointWithUrlEncodedAuth", "uuid4", "checkOrSetAlreadyCaught", "isParameterizedString", "isPrimitive", "session", "updateSession", "resolvedSyncPromise", "integration", "setupIntegration", "afterSetupIntegrations", "createEventEnvelope", "addItemToEnvelope", "createAttachmentEnvelopeItem", "createSessionEnvelope", "envelope", "setupIntegrations", "SyncPromise", "getIsolationScope", "prepareEvent", "dropUndefinedKeys", "dynamicSamplingContext", "getDynamicSamplingContextFromClient", "parseSampleRate", "rejectedSyncPromise", "SentryError", "isThenable", "isPlainObject", "dsnToString", "dropUndefinedKeys", "createEnvelope", "BaseClient", "registerSpanErrorInstrumentation", "resolvedSyncPromise", "eventFromUnknownInput", "eventFromMessage", "getIsolationScope", "SessionFlusher", "DEBUG_BUILD", "logger", "uuid4", "dynamicSamplingContext", "createCheckInEnvelope", "_getSpanForScope", "getRootSpan", "getDynamicSamplingContextFromSpan", "spanToTraceContext", "getDynamicSamplingContextFromClient", "DEBUG_BUILD", "logger", "consoleSandbox", "getCurrentScope", "makePromiseBuffer", "forEachEnvelopeItem", "envelopeItemTypeToDataCategory", "isRateLimited", "resolvedSyncPromise", "createEnvelope", "serializeEnvelope", "DEBUG_BUILD", "logger", "updateRateLimits", "SentryError", "DEBUG_BUILD", "logger", "retryDelay", "envelopeContainsItemType", "parseRetryAfterHeader", "forEachEnvelopeItem", "createEnvelope", "dsnFromString", "getEnvelopeEndpointWithUrlEncodedAuth", "name", "SDK_VERSION", "getClient", "getIsolationScope", "dateTimestampInSeconds", "consoleSandbox", "getOriginalFunction", "getClient", "defineIntegration", "defineIntegration", "DEBUG_BUILD", "logger", "getEventDescription", "stringMatchesSomePattern", "options", "applyAggregateErrorsToEvent", "exceptionFromError", "defineIntegration", "GLOBAL_OBJ", "forEachEnvelopeItem", "stripMetadataFromStackFrames", "addMetadataToStackFrames", "defineIntegration", "addRequestDataToEvent", "defineIntegration", "CONSOLE_LEVELS", "GLOBAL_OBJ", "addConsoleInstrumentationHandler", "getClient", "defineIntegration", "severityLevelFromString", "withScope", "addExceptionMechanism", "message", "safeJoin", "captureMessage", "captureException", "consoleSandbox", "defineIntegration", "DEBUG_BUILD", "logger", "defineIntegration", "getFramesFromEvent", "defineIntegration", "isError", "normalize", "isPlainObject", "addNonEnumerableProperty", "DEBUG_BUILD", "logger", "rewriteFramesIntegration", "defineIntegration", "GLOBAL_OBJ", "relative", "basename", "timestampInSeconds", "defineIntegration", "isError", "truncate", "defineIntegration", "defineIntegration", "forEachEnvelopeItem", "stripMetadataFromStackFrames", "addMetadataToStackFrames", "getFramesFromEvent", "getGlobalSingleton", "getClient", "getActiveSpan", "getRootSpan", "spanToJSON", "DEBUG_BUILD", "logger", "COUNTER_METRIC_TYPE", "DISTRIBUTION_METRIC_TYPE", "timestampInSeconds", "startSpanManual", "handleCallbackErrors", "SET_METRIC_TYPE", "GAUGE_METRIC_TYPE", "dropUndefinedKeys", "logger", "dsnToString", "createEnvelope", "serializeMetricBuckets", "simpleHash", "COUNTER_METRIC_TYPE", "GAUGE_METRIC_TYPE", "DISTRIBUTION_METRIC_TYPE", "SET_METRIC_TYPE", "DEFAULT_FLUSH_INTERVAL", "timestampInSeconds", "sanitizeMetricKey", "sanitizeTags", "sanitizeUnit", "getBucketKey", "SET_METRIC_TYPE", "METRIC_MAP", "updateMetricSummaryOnActiveSpan", "MAX_WEIGHT", "captureAggregateMetrics", "metricsCore", "MetricsAggregator", "DEFAULT_BROWSER_FLUSH_INTERVAL", "timestampInSeconds", "sanitizeMetricKey", "sanitizeTags", "sanitizeUnit", "getBucketKey", "SET_METRIC_TYPE", "METRIC_MAP", "updateMetricSummaryOnActiveSpan", "captureAggregateMetrics", "hasTracingEnabled", "span", "getCurrentScope", "getClient", "parseUrl", "getActiveSpan", "startInactiveSpan", "SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN", "SEMANTIC_ATTRIBUTE_SENTRY_OP", "SentryNonRecordingSpan", "getIsolationScope", "spanToTraceHeader", "generateSentryTraceHeader", "dynamicSamplingContextToSentryBaggageHeader", "getDynamicSamplingContextFromSpan", "getDynamicSamplingContextFromClient", "isInstanceOf", "BAGGAGE_HEADER_NAME", "setHttpStatus", "SPAN_STATUS_ERROR", "getClient", "normalize", "setContext", "captureException", "startSpanManual", "SEMANTIC_ATTRIBUTE_SENTRY_SOURCE", "SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN", "isThenable", "getCurrentScope", "dropUndefinedKeys", "getClient", "getCurrentScope", "withScope", "getClient", "getIsolationScope", "captureEvent", "addBreadcrumb", "setUser", "setTags", "setTag", "setExtra", "setExtras", "setContext", "startSession", "endSession", "require_cjs", "fetch", "getModule", "Toucan"] +} diff --git a/node_modules/miniflare/dist/src/workers/assets/router.worker.js b/node_modules/miniflare/dist/src/workers/assets/router.worker.js new file mode 100644 index 0000000..165aaa6 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/assets/router.worker.js @@ -0,0 +1,7919 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from == "object" || typeof from == "function") + for (let key of __getOwnPropNames(from)) + !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target, + mod +)); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/is.js +var require_is = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/is.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var objectToString = Object.prototype.toString; + function isError(wat) { + switch (objectToString.call(wat)) { + case "[object Error]": + case "[object Exception]": + case "[object DOMException]": + return !0; + default: + return isInstanceOf(wat, Error); + } + } + function isBuiltin(wat, className) { + return objectToString.call(wat) === `[object ${className}]`; + } + function isErrorEvent(wat) { + return isBuiltin(wat, "ErrorEvent"); + } + function isDOMError(wat) { + return isBuiltin(wat, "DOMError"); + } + function isDOMException(wat) { + return isBuiltin(wat, "DOMException"); + } + function isString(wat) { + return isBuiltin(wat, "String"); + } + function isParameterizedString(wat) { + return typeof wat == "object" && wat !== null && "__sentry_template_string__" in wat && "__sentry_template_values__" in wat; + } + function isPrimitive(wat) { + return wat === null || isParameterizedString(wat) || typeof wat != "object" && typeof wat != "function"; + } + function isPlainObject(wat) { + return isBuiltin(wat, "Object"); + } + function isEvent(wat) { + return typeof Event < "u" && isInstanceOf(wat, Event); + } + function isElement(wat) { + return typeof Element < "u" && isInstanceOf(wat, Element); + } + function isRegExp(wat) { + return isBuiltin(wat, "RegExp"); + } + function isThenable(wat) { + return !!(wat && wat.then && typeof wat.then == "function"); + } + function isSyntheticEvent(wat) { + return isPlainObject(wat) && "nativeEvent" in wat && "preventDefault" in wat && "stopPropagation" in wat; + } + function isInstanceOf(wat, base) { + try { + return wat instanceof base; + } catch { + return !1; + } + } + function isVueViewModel(wat) { + return !!(typeof wat == "object" && wat !== null && (wat.__isVue || wat._isVue)); + } + exports.isDOMError = isDOMError; + exports.isDOMException = isDOMException; + exports.isElement = isElement; + exports.isError = isError; + exports.isErrorEvent = isErrorEvent; + exports.isEvent = isEvent; + exports.isInstanceOf = isInstanceOf; + exports.isParameterizedString = isParameterizedString; + exports.isPlainObject = isPlainObject; + exports.isPrimitive = isPrimitive; + exports.isRegExp = isRegExp; + exports.isString = isString; + exports.isSyntheticEvent = isSyntheticEvent; + exports.isThenable = isThenable; + exports.isVueViewModel = isVueViewModel; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/string.js +var require_string = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/string.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(); + function truncate(str, max = 0) { + return typeof str != "string" || max === 0 || str.length <= max ? str : `${str.slice(0, max)}...`; + } + function snipLine(line, colno) { + let newLine = line, lineLength = newLine.length; + if (lineLength <= 150) + return newLine; + colno > lineLength && (colno = lineLength); + let start = Math.max(colno - 60, 0); + start < 5 && (start = 0); + let end = Math.min(start + 140, lineLength); + return end > lineLength - 5 && (end = lineLength), end === lineLength && (start = Math.max(end - 140, 0)), newLine = newLine.slice(start, end), start > 0 && (newLine = `'{snip} ${newLine}`), end < lineLength && (newLine += " {snip}"), newLine; + } + function safeJoin(input, delimiter) { + if (!Array.isArray(input)) + return ""; + let output = []; + for (let i = 0; i < input.length; i++) { + let value = input[i]; + try { + is.isVueViewModel(value) ? output.push("[VueViewModel]") : output.push(String(value)); + } catch { + output.push("[value cannot be serialized]"); + } + } + return output.join(delimiter); + } + function isMatchingPattern(value, pattern, requireExactStringMatch = !1) { + return is.isString(value) ? is.isRegExp(pattern) ? pattern.test(value) : is.isString(pattern) ? requireExactStringMatch ? value === pattern : value.includes(pattern) : !1 : !1; + } + function stringMatchesSomePattern(testString, patterns = [], requireExactStringMatch = !1) { + return patterns.some((pattern) => isMatchingPattern(testString, pattern, requireExactStringMatch)); + } + exports.isMatchingPattern = isMatchingPattern; + exports.safeJoin = safeJoin; + exports.snipLine = snipLine; + exports.stringMatchesSomePattern = stringMatchesSomePattern; + exports.truncate = truncate; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/aggregate-errors.js +var require_aggregate_errors = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/aggregate-errors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), string = require_string(); + function applyAggregateErrorsToEvent(exceptionFromErrorImplementation, parser, maxValueLimit = 250, key, limit, event, hint) { + if (!event.exception || !event.exception.values || !hint || !is.isInstanceOf(hint.originalException, Error)) + return; + let originalException = event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : void 0; + originalException && (event.exception.values = truncateAggregateExceptions( + aggregateExceptionsFromError( + exceptionFromErrorImplementation, + parser, + limit, + hint.originalException, + key, + event.exception.values, + originalException, + 0 + ), + maxValueLimit + )); + } + function aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, error, key, prevExceptions, exception, exceptionId) { + if (prevExceptions.length >= limit + 1) + return prevExceptions; + let newExceptions = [...prevExceptions]; + if (is.isInstanceOf(error[key], Error)) { + applyExceptionGroupFieldsForParentException(exception, exceptionId); + let newException = exceptionFromErrorImplementation(parser, error[key]), newExceptionId = newExceptions.length; + applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId), newExceptions = aggregateExceptionsFromError( + exceptionFromErrorImplementation, + parser, + limit, + error[key], + key, + [newException, ...newExceptions], + newException, + newExceptionId + ); + } + return Array.isArray(error.errors) && error.errors.forEach((childError, i) => { + if (is.isInstanceOf(childError, Error)) { + applyExceptionGroupFieldsForParentException(exception, exceptionId); + let newException = exceptionFromErrorImplementation(parser, childError), newExceptionId = newExceptions.length; + applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId), newExceptions = aggregateExceptionsFromError( + exceptionFromErrorImplementation, + parser, + limit, + childError, + key, + [newException, ...newExceptions], + newException, + newExceptionId + ); + } + }), newExceptions; + } + function applyExceptionGroupFieldsForParentException(exception, exceptionId) { + exception.mechanism = exception.mechanism || { type: "generic", handled: !0 }, exception.mechanism = { + ...exception.mechanism, + ...exception.type === "AggregateError" && { is_exception_group: !0 }, + exception_id: exceptionId + }; + } + function applyExceptionGroupFieldsForChildException(exception, source, exceptionId, parentId) { + exception.mechanism = exception.mechanism || { type: "generic", handled: !0 }, exception.mechanism = { + ...exception.mechanism, + type: "chained", + source, + exception_id: exceptionId, + parent_id: parentId + }; + } + function truncateAggregateExceptions(exceptions, maxValueLength) { + return exceptions.map((exception) => (exception.value && (exception.value = string.truncate(exception.value, maxValueLength)), exception)); + } + exports.applyAggregateErrorsToEvent = applyAggregateErrorsToEvent; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/array.js +var require_array = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/array.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function flatten(input) { + let result = [], flattenHelper = (input2) => { + input2.forEach((el) => { + Array.isArray(el) ? flattenHelper(el) : result.push(el); + }); + }; + return flattenHelper(input), result; + } + exports.flatten = flatten; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/version.js +var require_version = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/version.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var SDK_VERSION = "8.9.2"; + exports.SDK_VERSION = SDK_VERSION; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/worldwide.js +var require_worldwide = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/worldwide.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var version = require_version(), GLOBAL_OBJ = globalThis; + function getGlobalSingleton(name, creator, obj) { + let gbl = obj || GLOBAL_OBJ, __SENTRY__ = gbl.__SENTRY__ = gbl.__SENTRY__ || {}, versionedCarrier = __SENTRY__[version.SDK_VERSION] = __SENTRY__[version.SDK_VERSION] || {}; + return versionedCarrier[name] || (versionedCarrier[name] = creator()); + } + exports.GLOBAL_OBJ = GLOBAL_OBJ; + exports.getGlobalSingleton = getGlobalSingleton; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/browser.js +var require_browser = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/browser.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), worldwide = require_worldwide(), WINDOW = worldwide.GLOBAL_OBJ, DEFAULT_MAX_STRING_LENGTH = 80; + function htmlTreeAsString(elem, options = {}) { + if (!elem) + return ""; + try { + let currentElem = elem, MAX_TRAVERSE_HEIGHT = 5, out = [], height = 0, len = 0, separator = " > ", sepLength = separator.length, nextStr, keyAttrs = Array.isArray(options) ? options : options.keyAttrs, maxStringLength = !Array.isArray(options) && options.maxStringLength || DEFAULT_MAX_STRING_LENGTH; + for (; currentElem && height++ < MAX_TRAVERSE_HEIGHT && (nextStr = _htmlElementAsString(currentElem, keyAttrs), !(nextStr === "html" || height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)); ) + out.push(nextStr), len += nextStr.length, currentElem = currentElem.parentNode; + return out.reverse().join(separator); + } catch { + return ""; + } + } + function _htmlElementAsString(el, keyAttrs) { + let elem = el, out = [], className, classes, key, attr, i; + if (!elem || !elem.tagName) + return ""; + if (WINDOW.HTMLElement && elem instanceof HTMLElement && elem.dataset) { + if (elem.dataset.sentryComponent) + return elem.dataset.sentryComponent; + if (elem.dataset.sentryElement) + return elem.dataset.sentryElement; + } + out.push(elem.tagName.toLowerCase()); + let keyAttrPairs = keyAttrs && keyAttrs.length ? keyAttrs.filter((keyAttr) => elem.getAttribute(keyAttr)).map((keyAttr) => [keyAttr, elem.getAttribute(keyAttr)]) : null; + if (keyAttrPairs && keyAttrPairs.length) + keyAttrPairs.forEach((keyAttrPair) => { + out.push(`[${keyAttrPair[0]}="${keyAttrPair[1]}"]`); + }); + else if (elem.id && out.push(`#${elem.id}`), className = elem.className, className && is.isString(className)) + for (classes = className.split(/\s+/), i = 0; i < classes.length; i++) + out.push(`.${classes[i]}`); + let allowedAttrs = ["aria-label", "type", "name", "title", "alt"]; + for (i = 0; i < allowedAttrs.length; i++) + key = allowedAttrs[i], attr = elem.getAttribute(key), attr && out.push(`[${key}="${attr}"]`); + return out.join(""); + } + function getLocationHref() { + try { + return WINDOW.document.location.href; + } catch { + return ""; + } + } + function getDomElement(selector) { + return WINDOW.document && WINDOW.document.querySelector ? WINDOW.document.querySelector(selector) : null; + } + function getComponentName(elem) { + if (!WINDOW.HTMLElement) + return null; + let currentElem = elem, MAX_TRAVERSE_HEIGHT = 5; + for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) { + if (!currentElem) + return null; + if (currentElem instanceof HTMLElement) { + if (currentElem.dataset.sentryComponent) + return currentElem.dataset.sentryComponent; + if (currentElem.dataset.sentryElement) + return currentElem.dataset.sentryElement; + } + currentElem = currentElem.parentNode; + } + return null; + } + exports.getComponentName = getComponentName; + exports.getDomElement = getDomElement; + exports.getLocationHref = getLocationHref; + exports.htmlTreeAsString = htmlTreeAsString; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/debug-build.js +var require_debug_build = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/debug-build.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var DEBUG_BUILD = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__; + exports.DEBUG_BUILD = DEBUG_BUILD; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/logger.js +var require_logger = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/logger.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), worldwide = require_worldwide(), PREFIX = "Sentry Logger ", CONSOLE_LEVELS = [ + "debug", + "info", + "warn", + "error", + "log", + "assert", + "trace" + ], originalConsoleMethods = {}; + function consoleSandbox(callback) { + if (!("console" in worldwide.GLOBAL_OBJ)) + return callback(); + let console2 = worldwide.GLOBAL_OBJ.console, wrappedFuncs = {}, wrappedLevels = Object.keys(originalConsoleMethods); + wrappedLevels.forEach((level) => { + let originalConsoleMethod = originalConsoleMethods[level]; + wrappedFuncs[level] = console2[level], console2[level] = originalConsoleMethod; + }); + try { + return callback(); + } finally { + wrappedLevels.forEach((level) => { + console2[level] = wrappedFuncs[level]; + }); + } + } + function makeLogger() { + let enabled = !1, logger2 = { + enable: () => { + enabled = !0; + }, + disable: () => { + enabled = !1; + }, + isEnabled: () => enabled + }; + return debugBuild.DEBUG_BUILD ? CONSOLE_LEVELS.forEach((name) => { + logger2[name] = (...args) => { + enabled && consoleSandbox(() => { + worldwide.GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args); + }); + }; + }) : CONSOLE_LEVELS.forEach((name) => { + logger2[name] = () => { + }; + }), logger2; + } + var logger = makeLogger(); + exports.CONSOLE_LEVELS = CONSOLE_LEVELS; + exports.consoleSandbox = consoleSandbox; + exports.logger = logger; + exports.originalConsoleMethods = originalConsoleMethods; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/dsn.js +var require_dsn = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/dsn.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), logger = require_logger(), DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/; + function isValidProtocol(protocol) { + return protocol === "http" || protocol === "https"; + } + function dsnToString(dsn, withPassword = !1) { + let { host, path, pass, port, projectId, protocol, publicKey } = dsn; + return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ""}@${host}${port ? `:${port}` : ""}/${path && `${path}/`}${projectId}`; + } + function dsnFromString(str) { + let match = DSN_REGEX.exec(str); + if (!match) { + logger.consoleSandbox(() => { + console.error(`Invalid Sentry Dsn: ${str}`); + }); + return; + } + let [protocol, publicKey, pass = "", host, port = "", lastPath] = match.slice(1), path = "", projectId = lastPath, split = projectId.split("/"); + if (split.length > 1 && (path = split.slice(0, -1).join("/"), projectId = split.pop()), projectId) { + let projectMatch = projectId.match(/^\d+/); + projectMatch && (projectId = projectMatch[0]); + } + return dsnFromComponents({ host, pass, path, projectId, port, protocol, publicKey }); + } + function dsnFromComponents(components) { + return { + protocol: components.protocol, + publicKey: components.publicKey || "", + pass: components.pass || "", + host: components.host, + port: components.port || "", + path: components.path || "", + projectId: components.projectId + }; + } + function validateDsn(dsn) { + if (!debugBuild.DEBUG_BUILD) + return !0; + let { port, projectId, protocol } = dsn; + return ["protocol", "publicKey", "host", "projectId"].find((component) => dsn[component] ? !1 : (logger.logger.error(`Invalid Sentry Dsn: ${component} missing`), !0)) ? !1 : projectId.match(/^\d+$/) ? isValidProtocol(protocol) ? port && isNaN(parseInt(port, 10)) ? (logger.logger.error(`Invalid Sentry Dsn: Invalid port ${port}`), !1) : !0 : (logger.logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`), !1) : (logger.logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`), !1); + } + function makeDsn(from) { + let components = typeof from == "string" ? dsnFromString(from) : dsnFromComponents(from); + if (!(!components || !validateDsn(components))) + return components; + } + exports.dsnFromString = dsnFromString; + exports.dsnToString = dsnToString; + exports.makeDsn = makeDsn; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/error.js +var require_error = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/error.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var SentryError = class extends Error { + /** Display name of this error instance. */ + constructor(message, logLevel = "warn") { + super(message), this.message = message, this.name = new.target.prototype.constructor.name, Object.setPrototypeOf(this, new.target.prototype), this.logLevel = logLevel; + } + }; + exports.SentryError = SentryError; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/object.js +var require_object = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/object.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var browser = require_browser(), debugBuild = require_debug_build(), is = require_is(), logger = require_logger(), string = require_string(); + function fill(source, name, replacementFactory) { + if (!(name in source)) + return; + let original = source[name], wrapped = replacementFactory(original); + typeof wrapped == "function" && markFunctionWrapped(wrapped, original), source[name] = wrapped; + } + function addNonEnumerableProperty(obj, name, value) { + try { + Object.defineProperty(obj, name, { + // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it + value, + writable: !0, + configurable: !0 + }); + } catch { + debugBuild.DEBUG_BUILD && logger.logger.log(`Failed to add non-enumerable property "${name}" to object`, obj); + } + } + function markFunctionWrapped(wrapped, original) { + try { + let proto = original.prototype || {}; + wrapped.prototype = original.prototype = proto, addNonEnumerableProperty(wrapped, "__sentry_original__", original); + } catch { + } + } + function getOriginalFunction(func) { + return func.__sentry_original__; + } + function urlEncode(object) { + return Object.keys(object).map((key) => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`).join("&"); + } + function convertToPlainObject(value) { + if (is.isError(value)) + return { + message: value.message, + name: value.name, + stack: value.stack, + ...getOwnProperties(value) + }; + if (is.isEvent(value)) { + let newObj = { + type: value.type, + target: serializeEventTarget(value.target), + currentTarget: serializeEventTarget(value.currentTarget), + ...getOwnProperties(value) + }; + return typeof CustomEvent < "u" && is.isInstanceOf(value, CustomEvent) && (newObj.detail = value.detail), newObj; + } else + return value; + } + function serializeEventTarget(target) { + try { + return is.isElement(target) ? browser.htmlTreeAsString(target) : Object.prototype.toString.call(target); + } catch { + return ""; + } + } + function getOwnProperties(obj) { + if (typeof obj == "object" && obj !== null) { + let extractedProps = {}; + for (let property in obj) + Object.prototype.hasOwnProperty.call(obj, property) && (extractedProps[property] = obj[property]); + return extractedProps; + } else + return {}; + } + function extractExceptionKeysForMessage(exception, maxLength = 40) { + let keys = Object.keys(convertToPlainObject(exception)); + if (keys.sort(), !keys.length) + return "[object has no keys]"; + if (keys[0].length >= maxLength) + return string.truncate(keys[0], maxLength); + for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) { + let serialized = keys.slice(0, includedKeys).join(", "); + if (!(serialized.length > maxLength)) + return includedKeys === keys.length ? serialized : string.truncate(serialized, maxLength); + } + return ""; + } + function dropUndefinedKeys(inputValue) { + return _dropUndefinedKeys(inputValue, /* @__PURE__ */ new Map()); + } + function _dropUndefinedKeys(inputValue, memoizationMap) { + if (isPojo(inputValue)) { + let memoVal = memoizationMap.get(inputValue); + if (memoVal !== void 0) + return memoVal; + let returnValue = {}; + memoizationMap.set(inputValue, returnValue); + for (let key of Object.keys(inputValue)) + typeof inputValue[key] < "u" && (returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap)); + return returnValue; + } + if (Array.isArray(inputValue)) { + let memoVal = memoizationMap.get(inputValue); + if (memoVal !== void 0) + return memoVal; + let returnValue = []; + return memoizationMap.set(inputValue, returnValue), inputValue.forEach((item) => { + returnValue.push(_dropUndefinedKeys(item, memoizationMap)); + }), returnValue; + } + return inputValue; + } + function isPojo(input) { + if (!is.isPlainObject(input)) + return !1; + try { + let name = Object.getPrototypeOf(input).constructor.name; + return !name || name === "Object"; + } catch { + return !0; + } + } + function objectify(wat) { + let objectified; + switch (!0) { + case wat == null: + objectified = new String(wat); + break; + // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason + // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as + // an object in order to wrap it. + case (typeof wat == "symbol" || typeof wat == "bigint"): + objectified = Object(wat); + break; + // this will catch the remaining primitives: `String`, `Number`, and `Boolean` + case is.isPrimitive(wat): + objectified = new wat.constructor(wat); + break; + // by process of elimination, at this point we know that `wat` must already be an object + default: + objectified = wat; + break; + } + return objectified; + } + exports.addNonEnumerableProperty = addNonEnumerableProperty; + exports.convertToPlainObject = convertToPlainObject; + exports.dropUndefinedKeys = dropUndefinedKeys; + exports.extractExceptionKeysForMessage = extractExceptionKeysForMessage; + exports.fill = fill; + exports.getOriginalFunction = getOriginalFunction; + exports.markFunctionWrapped = markFunctionWrapped; + exports.objectify = objectify; + exports.urlEncode = urlEncode; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/stacktrace.js +var require_stacktrace = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/stacktrace.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var STACKTRACE_FRAME_LIMIT = 50, UNKNOWN_FUNCTION = "?", WEBPACK_ERROR_REGEXP = /\(error: (.*)\)/, STRIP_FRAME_REGEXP = /captureMessage|captureException/; + function createStackParser(...parsers) { + let sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map((p) => p[1]); + return (stack, skipFirstLines = 0, framesToPop = 0) => { + let frames = [], lines = stack.split(` +`); + for (let i = skipFirstLines; i < lines.length; i++) { + let line = lines[i]; + if (line.length > 1024) + continue; + let cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, "$1") : line; + if (!cleanedLine.match(/\S*Error: /)) { + for (let parser of sortedParsers) { + let frame = parser(cleanedLine); + if (frame) { + frames.push(frame); + break; + } + } + if (frames.length >= STACKTRACE_FRAME_LIMIT + framesToPop) + break; + } + } + return stripSentryFramesAndReverse(frames.slice(framesToPop)); + }; + } + function stackParserFromStackParserOptions(stackParser) { + return Array.isArray(stackParser) ? createStackParser(...stackParser) : stackParser; + } + function stripSentryFramesAndReverse(stack) { + if (!stack.length) + return []; + let localStack = Array.from(stack); + return /sentryWrapped/.test(localStack[localStack.length - 1].function || "") && localStack.pop(), localStack.reverse(), STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || "") && (localStack.pop(), STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || "") && localStack.pop()), localStack.slice(0, STACKTRACE_FRAME_LIMIT).map((frame) => ({ + ...frame, + filename: frame.filename || localStack[localStack.length - 1].filename, + function: frame.function || UNKNOWN_FUNCTION + })); + } + var defaultFunctionName = ""; + function getFunctionName(fn) { + try { + return !fn || typeof fn != "function" ? defaultFunctionName : fn.name || defaultFunctionName; + } catch { + return defaultFunctionName; + } + } + function getFramesFromEvent(event) { + let exception = event.exception; + if (exception) { + let frames = []; + try { + return exception.values.forEach((value) => { + value.stacktrace.frames && frames.push(...value.stacktrace.frames); + }), frames; + } catch { + return; + } + } + } + exports.UNKNOWN_FUNCTION = UNKNOWN_FUNCTION; + exports.createStackParser = createStackParser; + exports.getFramesFromEvent = getFramesFromEvent; + exports.getFunctionName = getFunctionName; + exports.stackParserFromStackParserOptions = stackParserFromStackParserOptions; + exports.stripSentryFramesAndReverse = stripSentryFramesAndReverse; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/handlers.js +var require_handlers = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/handlers.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), logger = require_logger(), stacktrace = require_stacktrace(), handlers = {}, instrumented = {}; + function addHandler(type, handler) { + handlers[type] = handlers[type] || [], handlers[type].push(handler); + } + function resetInstrumentationHandlers() { + Object.keys(handlers).forEach((key) => { + handlers[key] = void 0; + }); + } + function maybeInstrument(type, instrumentFn) { + instrumented[type] || (instrumentFn(), instrumented[type] = !0); + } + function triggerHandlers(type, data) { + let typeHandlers = type && handlers[type]; + if (typeHandlers) + for (let handler of typeHandlers) + try { + handler(data); + } catch (e) { + debugBuild.DEBUG_BUILD && logger.logger.error( + `Error while triggering instrumentation handler. +Type: ${type} +Name: ${stacktrace.getFunctionName(handler)} +Error:`, + e + ); + } + } + exports.addHandler = addHandler; + exports.maybeInstrument = maybeInstrument; + exports.resetInstrumentationHandlers = resetInstrumentationHandlers; + exports.triggerHandlers = triggerHandlers; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/console.js +var require_console = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/console.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var logger = require_logger(), object = require_object(), worldwide = require_worldwide(), handlers = require_handlers(); + function addConsoleInstrumentationHandler(handler) { + let type = "console"; + handlers.addHandler(type, handler), handlers.maybeInstrument(type, instrumentConsole); + } + function instrumentConsole() { + "console" in worldwide.GLOBAL_OBJ && logger.CONSOLE_LEVELS.forEach(function(level) { + level in worldwide.GLOBAL_OBJ.console && object.fill(worldwide.GLOBAL_OBJ.console, level, function(originalConsoleMethod) { + return logger.originalConsoleMethods[level] = originalConsoleMethod, function(...args) { + let handlerData = { args, level }; + handlers.triggerHandlers("console", handlerData); + let log = logger.originalConsoleMethods[level]; + log && log.apply(worldwide.GLOBAL_OBJ.console, args); + }; + }); + }); + } + exports.addConsoleInstrumentationHandler = addConsoleInstrumentationHandler; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/supports.js +var require_supports = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/supports.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), logger = require_logger(), worldwide = require_worldwide(), WINDOW = worldwide.GLOBAL_OBJ; + function supportsErrorEvent() { + try { + return new ErrorEvent(""), !0; + } catch { + return !1; + } + } + function supportsDOMError() { + try { + return new DOMError(""), !0; + } catch { + return !1; + } + } + function supportsDOMException() { + try { + return new DOMException(""), !0; + } catch { + return !1; + } + } + function supportsFetch() { + if (!("fetch" in WINDOW)) + return !1; + try { + return new Headers(), new Request("http://www.example.com"), new Response(), !0; + } catch { + return !1; + } + } + function isNativeFunction(func) { + return func && /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString()); + } + function supportsNativeFetch() { + if (typeof EdgeRuntime == "string") + return !0; + if (!supportsFetch()) + return !1; + if (isNativeFunction(WINDOW.fetch)) + return !0; + let result = !1, doc = WINDOW.document; + if (doc && typeof doc.createElement == "function") + try { + let sandbox = doc.createElement("iframe"); + sandbox.hidden = !0, doc.head.appendChild(sandbox), sandbox.contentWindow && sandbox.contentWindow.fetch && (result = isNativeFunction(sandbox.contentWindow.fetch)), doc.head.removeChild(sandbox); + } catch (err) { + debugBuild.DEBUG_BUILD && logger.logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", err); + } + return result; + } + function supportsReportingObserver() { + return "ReportingObserver" in WINDOW; + } + function supportsReferrerPolicy() { + if (!supportsFetch()) + return !1; + try { + return new Request("_", { + referrerPolicy: "origin" + }), !0; + } catch { + return !1; + } + } + exports.isNativeFunction = isNativeFunction; + exports.supportsDOMError = supportsDOMError; + exports.supportsDOMException = supportsDOMException; + exports.supportsErrorEvent = supportsErrorEvent; + exports.supportsFetch = supportsFetch; + exports.supportsNativeFetch = supportsNativeFetch; + exports.supportsReferrerPolicy = supportsReferrerPolicy; + exports.supportsReportingObserver = supportsReportingObserver; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/time.js +var require_time = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/time.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var worldwide = require_worldwide(), ONE_SECOND_IN_MS = 1e3; + function dateTimestampInSeconds() { + return Date.now() / ONE_SECOND_IN_MS; + } + function createUnixTimestampInSecondsFunc() { + let { performance } = worldwide.GLOBAL_OBJ; + if (!performance || !performance.now) + return dateTimestampInSeconds; + let approxStartingTimeOrigin = Date.now() - performance.now(), timeOrigin = performance.timeOrigin == null ? approxStartingTimeOrigin : performance.timeOrigin; + return () => (timeOrigin + performance.now()) / ONE_SECOND_IN_MS; + } + var timestampInSeconds = createUnixTimestampInSecondsFunc(); + exports._browserPerformanceTimeOriginMode = void 0; + var browserPerformanceTimeOrigin = (() => { + let { performance } = worldwide.GLOBAL_OBJ; + if (!performance || !performance.now) { + exports._browserPerformanceTimeOriginMode = "none"; + return; + } + let threshold = 3600 * 1e3, performanceNow = performance.now(), dateNow = Date.now(), timeOriginDelta = performance.timeOrigin ? Math.abs(performance.timeOrigin + performanceNow - dateNow) : threshold, timeOriginIsReliable = timeOriginDelta < threshold, navigationStart = performance.timing && performance.timing.navigationStart, navigationStartDelta = typeof navigationStart == "number" ? Math.abs(navigationStart + performanceNow - dateNow) : threshold, navigationStartIsReliable = navigationStartDelta < threshold; + return timeOriginIsReliable || navigationStartIsReliable ? timeOriginDelta <= navigationStartDelta ? (exports._browserPerformanceTimeOriginMode = "timeOrigin", performance.timeOrigin) : (exports._browserPerformanceTimeOriginMode = "navigationStart", navigationStart) : (exports._browserPerformanceTimeOriginMode = "dateNow", dateNow); + })(); + exports.browserPerformanceTimeOrigin = browserPerformanceTimeOrigin; + exports.dateTimestampInSeconds = dateTimestampInSeconds; + exports.timestampInSeconds = timestampInSeconds; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/fetch.js +var require_fetch = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/fetch.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), object = require_object(), supports = require_supports(), time = require_time(), worldwide = require_worldwide(), handlers = require_handlers(); + function addFetchInstrumentationHandler(handler) { + let type = "fetch"; + handlers.addHandler(type, handler), handlers.maybeInstrument(type, instrumentFetch); + } + function instrumentFetch() { + supports.supportsNativeFetch() && object.fill(worldwide.GLOBAL_OBJ, "fetch", function(originalFetch) { + return function(...args) { + let { method, url } = parseFetchArgs(args), handlerData = { + args, + fetchData: { + method, + url + }, + startTimestamp: time.timestampInSeconds() * 1e3 + }; + handlers.triggerHandlers("fetch", { + ...handlerData + }); + let virtualStackTrace = new Error().stack; + return originalFetch.apply(worldwide.GLOBAL_OBJ, args).then( + (response) => { + let finishedHandlerData = { + ...handlerData, + endTimestamp: time.timestampInSeconds() * 1e3, + response + }; + return handlers.triggerHandlers("fetch", finishedHandlerData), response; + }, + (error) => { + let erroredHandlerData = { + ...handlerData, + endTimestamp: time.timestampInSeconds() * 1e3, + error + }; + throw handlers.triggerHandlers("fetch", erroredHandlerData), is.isError(error) && error.stack === void 0 && (error.stack = virtualStackTrace, object.addNonEnumerableProperty(error, "framesToPop", 1)), error; + } + ); + }; + }); + } + function hasProp(obj, prop) { + return !!obj && typeof obj == "object" && !!obj[prop]; + } + function getUrlFromResource(resource) { + return typeof resource == "string" ? resource : resource ? hasProp(resource, "url") ? resource.url : resource.toString ? resource.toString() : "" : ""; + } + function parseFetchArgs(fetchArgs) { + if (fetchArgs.length === 0) + return { method: "GET", url: "" }; + if (fetchArgs.length === 2) { + let [url, options] = fetchArgs; + return { + url: getUrlFromResource(url), + method: hasProp(options, "method") ? String(options.method).toUpperCase() : "GET" + }; + } + let arg = fetchArgs[0]; + return { + url: getUrlFromResource(arg), + method: hasProp(arg, "method") ? String(arg.method).toUpperCase() : "GET" + }; + } + exports.addFetchInstrumentationHandler = addFetchInstrumentationHandler; + exports.parseFetchArgs = parseFetchArgs; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/globalError.js +var require_globalError = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/globalError.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var worldwide = require_worldwide(), handlers = require_handlers(), _oldOnErrorHandler = null; + function addGlobalErrorInstrumentationHandler(handler) { + let type = "error"; + handlers.addHandler(type, handler), handlers.maybeInstrument(type, instrumentError); + } + function instrumentError() { + _oldOnErrorHandler = worldwide.GLOBAL_OBJ.onerror, worldwide.GLOBAL_OBJ.onerror = function(msg, url, line, column, error) { + let handlerData = { + column, + error, + line, + msg, + url + }; + return handlers.triggerHandlers("error", handlerData), _oldOnErrorHandler && !_oldOnErrorHandler.__SENTRY_LOADER__ ? _oldOnErrorHandler.apply(this, arguments) : !1; + }, worldwide.GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = !0; + } + exports.addGlobalErrorInstrumentationHandler = addGlobalErrorInstrumentationHandler; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/globalUnhandledRejection.js +var require_globalUnhandledRejection = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/globalUnhandledRejection.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var worldwide = require_worldwide(), handlers = require_handlers(), _oldOnUnhandledRejectionHandler = null; + function addGlobalUnhandledRejectionInstrumentationHandler(handler) { + let type = "unhandledrejection"; + handlers.addHandler(type, handler), handlers.maybeInstrument(type, instrumentUnhandledRejection); + } + function instrumentUnhandledRejection() { + _oldOnUnhandledRejectionHandler = worldwide.GLOBAL_OBJ.onunhandledrejection, worldwide.GLOBAL_OBJ.onunhandledrejection = function(e) { + let handlerData = e; + return handlers.triggerHandlers("unhandledrejection", handlerData), _oldOnUnhandledRejectionHandler && !_oldOnUnhandledRejectionHandler.__SENTRY_LOADER__ ? _oldOnUnhandledRejectionHandler.apply(this, arguments) : !0; + }, worldwide.GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = !0; + } + exports.addGlobalUnhandledRejectionInstrumentationHandler = addGlobalUnhandledRejectionInstrumentationHandler; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/env.js +var require_env = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/env.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function isBrowserBundle() { + return typeof __SENTRY_BROWSER_BUNDLE__ < "u" && !!__SENTRY_BROWSER_BUNDLE__; + } + function getSDKSource() { + return "npm"; + } + exports.getSDKSource = getSDKSource; + exports.isBrowserBundle = isBrowserBundle; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/node.js +var require_node = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/node.js"(exports, module) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var env = require_env(); + function isNodeEnv() { + return !env.isBrowserBundle() && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]"; + } + function dynamicRequire(mod, request) { + return mod.require(request); + } + function loadModule(moduleName) { + let mod; + try { + mod = dynamicRequire(module, moduleName); + } catch { + } + try { + let { cwd } = dynamicRequire(module, "process"); + mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`); + } catch { + } + return mod; + } + exports.dynamicRequire = dynamicRequire; + exports.isNodeEnv = isNodeEnv; + exports.loadModule = loadModule; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/isBrowser.js +var require_isBrowser = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/isBrowser.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var node = require_node(), worldwide = require_worldwide(); + function isBrowser() { + return typeof window < "u" && (!node.isNodeEnv() || isElectronNodeRenderer()); + } + function isElectronNodeRenderer() { + return ( + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any + worldwide.GLOBAL_OBJ.process !== void 0 && worldwide.GLOBAL_OBJ.process.type === "renderer" + ); + } + exports.isBrowser = isBrowser; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/memo.js +var require_memo = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/memo.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function memoBuilder() { + let hasWeakSet = typeof WeakSet == "function", inner = hasWeakSet ? /* @__PURE__ */ new WeakSet() : []; + function memoize(obj) { + if (hasWeakSet) + return inner.has(obj) ? !0 : (inner.add(obj), !1); + for (let i = 0; i < inner.length; i++) + if (inner[i] === obj) + return !0; + return inner.push(obj), !1; + } + function unmemoize(obj) { + if (hasWeakSet) + inner.delete(obj); + else + for (let i = 0; i < inner.length; i++) + if (inner[i] === obj) { + inner.splice(i, 1); + break; + } + } + return [memoize, unmemoize]; + } + exports.memoBuilder = memoBuilder; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/misc.js +var require_misc = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/misc.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var object = require_object(), string = require_string(), worldwide = require_worldwide(); + function uuid4() { + let gbl = worldwide.GLOBAL_OBJ, crypto = gbl.crypto || gbl.msCrypto, getRandomByte = () => Math.random() * 16; + try { + if (crypto && crypto.randomUUID) + return crypto.randomUUID().replace(/-/g, ""); + crypto && crypto.getRandomValues && (getRandomByte = () => { + let typedArray = new Uint8Array(1); + return crypto.getRandomValues(typedArray), typedArray[0]; + }); + } catch { + } + return ("10000000100040008000" + 1e11).replace( + /[018]/g, + (c) => ( + // eslint-disable-next-line no-bitwise + (c ^ (getRandomByte() & 15) >> c / 4).toString(16) + ) + ); + } + function getFirstException(event) { + return event.exception && event.exception.values ? event.exception.values[0] : void 0; + } + function getEventDescription(event) { + let { message, event_id: eventId } = event; + if (message) + return message; + let firstException = getFirstException(event); + return firstException ? firstException.type && firstException.value ? `${firstException.type}: ${firstException.value}` : firstException.type || firstException.value || eventId || "" : eventId || ""; + } + function addExceptionTypeValue(event, value, type) { + let exception = event.exception = event.exception || {}, values = exception.values = exception.values || [], firstException = values[0] = values[0] || {}; + firstException.value || (firstException.value = value || ""), firstException.type || (firstException.type = type || "Error"); + } + function addExceptionMechanism(event, newMechanism) { + let firstException = getFirstException(event); + if (!firstException) + return; + let defaultMechanism = { type: "generic", handled: !0 }, currentMechanism = firstException.mechanism; + if (firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism }, newMechanism && "data" in newMechanism) { + let mergedData = { ...currentMechanism && currentMechanism.data, ...newMechanism.data }; + firstException.mechanism.data = mergedData; + } + } + var SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; + function parseSemver(input) { + let match = input.match(SEMVER_REGEXP) || [], major = parseInt(match[1], 10), minor = parseInt(match[2], 10), patch = parseInt(match[3], 10); + return { + buildmetadata: match[5], + major: isNaN(major) ? void 0 : major, + minor: isNaN(minor) ? void 0 : minor, + patch: isNaN(patch) ? void 0 : patch, + prerelease: match[4] + }; + } + function addContextToFrame(lines, frame, linesOfContext = 5) { + if (frame.lineno === void 0) + return; + let maxLines = lines.length, sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0); + frame.pre_context = lines.slice(Math.max(0, sourceLine - linesOfContext), sourceLine).map((line) => string.snipLine(line, 0)), frame.context_line = string.snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0), frame.post_context = lines.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext).map((line) => string.snipLine(line, 0)); + } + function checkOrSetAlreadyCaught(exception) { + if (exception && exception.__sentry_captured__) + return !0; + try { + object.addNonEnumerableProperty(exception, "__sentry_captured__", !0); + } catch { + } + return !1; + } + function arrayify(maybeArray) { + return Array.isArray(maybeArray) ? maybeArray : [maybeArray]; + } + exports.addContextToFrame = addContextToFrame; + exports.addExceptionMechanism = addExceptionMechanism; + exports.addExceptionTypeValue = addExceptionTypeValue; + exports.arrayify = arrayify; + exports.checkOrSetAlreadyCaught = checkOrSetAlreadyCaught; + exports.getEventDescription = getEventDescription; + exports.parseSemver = parseSemver; + exports.uuid4 = uuid4; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/normalize.js +var require_normalize = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/normalize.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), memo = require_memo(), object = require_object(), stacktrace = require_stacktrace(); + function normalize(input, depth = 100, maxProperties = 1 / 0) { + try { + return visit("", input, depth, maxProperties); + } catch (err) { + return { ERROR: `**non-serializable** (${err})` }; + } + } + function normalizeToSize(object2, depth = 3, maxSize = 100 * 1024) { + let normalized = normalize(object2, depth); + return jsonSize(normalized) > maxSize ? normalizeToSize(object2, depth - 1, maxSize) : normalized; + } + function visit(key, value, depth = 1 / 0, maxProperties = 1 / 0, memo$1 = memo.memoBuilder()) { + let [memoize, unmemoize] = memo$1; + if (value == null || // this matches null and undefined -> eqeq not eqeqeq + ["number", "boolean", "string"].includes(typeof value) && !Number.isNaN(value)) + return value; + let stringified = stringifyValue(key, value); + if (!stringified.startsWith("[object ")) + return stringified; + if (value.__sentry_skip_normalization__) + return value; + let remainingDepth = typeof value.__sentry_override_normalization_depth__ == "number" ? value.__sentry_override_normalization_depth__ : depth; + if (remainingDepth === 0) + return stringified.replace("object ", ""); + if (memoize(value)) + return "[Circular ~]"; + let valueWithToJSON = value; + if (valueWithToJSON && typeof valueWithToJSON.toJSON == "function") + try { + let jsonValue = valueWithToJSON.toJSON(); + return visit("", jsonValue, remainingDepth - 1, maxProperties, memo$1); + } catch { + } + let normalized = Array.isArray(value) ? [] : {}, numAdded = 0, visitable = object.convertToPlainObject(value); + for (let visitKey in visitable) { + if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) + continue; + if (numAdded >= maxProperties) { + normalized[visitKey] = "[MaxProperties ~]"; + break; + } + let visitValue = visitable[visitKey]; + normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo$1), numAdded++; + } + return unmemoize(value), normalized; + } + function stringifyValue(key, value) { + try { + if (key === "domain" && value && typeof value == "object" && value._events) + return "[Domain]"; + if (key === "domainEmitter") + return "[DomainEmitter]"; + if (typeof global < "u" && value === global) + return "[Global]"; + if (typeof window < "u" && value === window) + return "[Window]"; + if (typeof document < "u" && value === document) + return "[Document]"; + if (is.isVueViewModel(value)) + return "[VueViewModel]"; + if (is.isSyntheticEvent(value)) + return "[SyntheticEvent]"; + if (typeof value == "number" && value !== value) + return "[NaN]"; + if (typeof value == "function") + return `[Function: ${stacktrace.getFunctionName(value)}]`; + if (typeof value == "symbol") + return `[${String(value)}]`; + if (typeof value == "bigint") + return `[BigInt: ${String(value)}]`; + let objName = getConstructorName(value); + return /^HTML(\w*)Element$/.test(objName) ? `[HTMLElement: ${objName}]` : `[object ${objName}]`; + } catch (err) { + return `**non-serializable** (${err})`; + } + } + function getConstructorName(value) { + let prototype = Object.getPrototypeOf(value); + return prototype ? prototype.constructor.name : "null prototype"; + } + function utf8Length(value) { + return ~-encodeURI(value).split(/%..|./).length; + } + function jsonSize(value) { + return utf8Length(JSON.stringify(value)); + } + function normalizeUrlToBase(url, basePath) { + let escapedBase = basePath.replace(/\\/g, "/").replace(/[|\\{}()[\]^$+*?.]/g, "\\$&"), newUrl = url; + try { + newUrl = decodeURI(url); + } catch { + } + return newUrl.replace(/\\/g, "/").replace(/webpack:\/?/g, "").replace(new RegExp(`(file://)?/*${escapedBase}/*`, "ig"), "app:///"); + } + exports.normalize = normalize; + exports.normalizeToSize = normalizeToSize; + exports.normalizeUrlToBase = normalizeUrlToBase; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/path.js +var require_path = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/path.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function normalizeArray(parts, allowAboveRoot) { + let up = 0; + for (let i = parts.length - 1; i >= 0; i--) { + let last = parts[i]; + last === "." ? parts.splice(i, 1) : last === ".." ? (parts.splice(i, 1), up++) : up && (parts.splice(i, 1), up--); + } + if (allowAboveRoot) + for (; up--; up) + parts.unshift(".."); + return parts; + } + var splitPathRe = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/; + function splitPath(filename) { + let truncated = filename.length > 1024 ? `${filename.slice(-1024)}` : filename, parts = splitPathRe.exec(truncated); + return parts ? parts.slice(1) : []; + } + function resolve(...args) { + let resolvedPath = "", resolvedAbsolute = !1; + for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) { + let path = i >= 0 ? args[i] : "/"; + path && (resolvedPath = `${path}/${resolvedPath}`, resolvedAbsolute = path.charAt(0) === "/"); + } + return resolvedPath = normalizeArray( + resolvedPath.split("/").filter((p) => !!p), + !resolvedAbsolute + ).join("/"), (resolvedAbsolute ? "/" : "") + resolvedPath || "."; + } + function trim(arr) { + let start = 0; + for (; start < arr.length && arr[start] === ""; start++) + ; + let end = arr.length - 1; + for (; end >= 0 && arr[end] === ""; end--) + ; + return start > end ? [] : arr.slice(start, end - start + 1); + } + function relative(from, to) { + from = resolve(from).slice(1), to = resolve(to).slice(1); + let fromParts = trim(from.split("/")), toParts = trim(to.split("/")), length = Math.min(fromParts.length, toParts.length), samePartsLength = length; + for (let i = 0; i < length; i++) + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + let outputParts = []; + for (let i = samePartsLength; i < fromParts.length; i++) + outputParts.push(".."); + return outputParts = outputParts.concat(toParts.slice(samePartsLength)), outputParts.join("/"); + } + function normalizePath(path) { + let isPathAbsolute = isAbsolute(path), trailingSlash = path.slice(-1) === "/", normalizedPath = normalizeArray( + path.split("/").filter((p) => !!p), + !isPathAbsolute + ).join("/"); + return !normalizedPath && !isPathAbsolute && (normalizedPath = "."), normalizedPath && trailingSlash && (normalizedPath += "/"), (isPathAbsolute ? "/" : "") + normalizedPath; + } + function isAbsolute(path) { + return path.charAt(0) === "/"; + } + function join(...args) { + return normalizePath(args.join("/")); + } + function dirname(path) { + let result = splitPath(path), root = result[0], dir = result[1]; + return !root && !dir ? "." : (dir && (dir = dir.slice(0, dir.length - 1)), root + dir); + } + function basename(path, ext) { + let f = splitPath(path)[2]; + return ext && f.slice(ext.length * -1) === ext && (f = f.slice(0, f.length - ext.length)), f; + } + exports.basename = basename; + exports.dirname = dirname; + exports.isAbsolute = isAbsolute; + exports.join = join; + exports.normalizePath = normalizePath; + exports.relative = relative; + exports.resolve = resolve; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/syncpromise.js +var require_syncpromise = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/syncpromise.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), States; + (function(States2) { + States2[States2.PENDING = 0] = "PENDING"; + let RESOLVED = 1; + States2[States2.RESOLVED = RESOLVED] = "RESOLVED"; + let REJECTED = 2; + States2[States2.REJECTED = REJECTED] = "REJECTED"; + })(States || (States = {})); + function resolvedSyncPromise(value) { + return new SyncPromise((resolve) => { + resolve(value); + }); + } + function rejectedSyncPromise(reason) { + return new SyncPromise((_, reject) => { + reject(reason); + }); + } + var SyncPromise = class _SyncPromise { + constructor(executor) { + _SyncPromise.prototype.__init.call(this), _SyncPromise.prototype.__init2.call(this), _SyncPromise.prototype.__init3.call(this), _SyncPromise.prototype.__init4.call(this), this._state = States.PENDING, this._handlers = []; + try { + executor(this._resolve, this._reject); + } catch (e) { + this._reject(e); + } + } + /** JSDoc */ + then(onfulfilled, onrejected) { + return new _SyncPromise((resolve, reject) => { + this._handlers.push([ + !1, + (result) => { + if (!onfulfilled) + resolve(result); + else + try { + resolve(onfulfilled(result)); + } catch (e) { + reject(e); + } + }, + (reason) => { + if (!onrejected) + reject(reason); + else + try { + resolve(onrejected(reason)); + } catch (e) { + reject(e); + } + } + ]), this._executeHandlers(); + }); + } + /** JSDoc */ + catch(onrejected) { + return this.then((val) => val, onrejected); + } + /** JSDoc */ + finally(onfinally) { + return new _SyncPromise((resolve, reject) => { + let val, isRejected; + return this.then( + (value) => { + isRejected = !1, val = value, onfinally && onfinally(); + }, + (reason) => { + isRejected = !0, val = reason, onfinally && onfinally(); + } + ).then(() => { + if (isRejected) { + reject(val); + return; + } + resolve(val); + }); + }); + } + /** JSDoc */ + __init() { + this._resolve = (value) => { + this._setResult(States.RESOLVED, value); + }; + } + /** JSDoc */ + __init2() { + this._reject = (reason) => { + this._setResult(States.REJECTED, reason); + }; + } + /** JSDoc */ + __init3() { + this._setResult = (state, value) => { + if (this._state === States.PENDING) { + if (is.isThenable(value)) { + value.then(this._resolve, this._reject); + return; + } + this._state = state, this._value = value, this._executeHandlers(); + } + }; + } + /** JSDoc */ + __init4() { + this._executeHandlers = () => { + if (this._state === States.PENDING) + return; + let cachedHandlers = this._handlers.slice(); + this._handlers = [], cachedHandlers.forEach((handler) => { + handler[0] || (this._state === States.RESOLVED && handler[1](this._value), this._state === States.REJECTED && handler[2](this._value), handler[0] = !0); + }); + }; + } + }; + exports.SyncPromise = SyncPromise; + exports.rejectedSyncPromise = rejectedSyncPromise; + exports.resolvedSyncPromise = resolvedSyncPromise; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/promisebuffer.js +var require_promisebuffer = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/promisebuffer.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var error = require_error(), syncpromise = require_syncpromise(); + function makePromiseBuffer(limit) { + let buffer = []; + function isReady() { + return limit === void 0 || buffer.length < limit; + } + function remove(task) { + return buffer.splice(buffer.indexOf(task), 1)[0]; + } + function add(taskProducer) { + if (!isReady()) + return syncpromise.rejectedSyncPromise(new error.SentryError("Not adding Promise because buffer limit was reached.")); + let task = taskProducer(); + return buffer.indexOf(task) === -1 && buffer.push(task), task.then(() => remove(task)).then( + null, + () => remove(task).then(null, () => { + }) + ), task; + } + function drain(timeout) { + return new syncpromise.SyncPromise((resolve, reject) => { + let counter = buffer.length; + if (!counter) + return resolve(!0); + let capturedSetTimeout = setTimeout(() => { + timeout && timeout > 0 && resolve(!1); + }, timeout); + buffer.forEach((item) => { + syncpromise.resolvedSyncPromise(item).then(() => { + --counter || (clearTimeout(capturedSetTimeout), resolve(!0)); + }, reject); + }); + }); + } + return { + $: buffer, + add, + drain + }; + } + exports.makePromiseBuffer = makePromiseBuffer; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/cookie.js +var require_cookie = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/cookie.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function parseCookie(str) { + let obj = {}, index = 0; + for (; index < str.length; ) { + let eqIdx = str.indexOf("=", index); + if (eqIdx === -1) + break; + let endIdx = str.indexOf(";", index); + if (endIdx === -1) + endIdx = str.length; + else if (endIdx < eqIdx) { + index = str.lastIndexOf(";", eqIdx - 1) + 1; + continue; + } + let key = str.slice(index, eqIdx).trim(); + if (obj[key] === void 0) { + let val = str.slice(eqIdx + 1, endIdx).trim(); + val.charCodeAt(0) === 34 && (val = val.slice(1, -1)); + try { + obj[key] = val.indexOf("%") !== -1 ? decodeURIComponent(val) : val; + } catch { + obj[key] = val; + } + } + index = endIdx + 1; + } + return obj; + } + exports.parseCookie = parseCookie; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/url.js +var require_url = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/url.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function parseUrl(url) { + if (!url) + return {}; + let match = url.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); + if (!match) + return {}; + let query = match[6] || "", fragment = match[8] || ""; + return { + host: match[4], + path: match[5], + protocol: match[2], + search: query, + hash: fragment, + relative: match[5] + query + fragment + // everything minus origin + }; + } + function stripUrlQueryAndFragment(urlPath) { + return urlPath.split(/[\?#]/, 1)[0]; + } + function getNumberOfUrlSegments(url) { + return url.split(/\\?\//).filter((s) => s.length > 0 && s !== ",").length; + } + function getSanitizedUrlString(url) { + let { protocol, host, path } = url, filteredHost = host && host.replace(/^.*@/, "[filtered]:[filtered]@").replace(/(:80)$/, "").replace(/(:443)$/, "") || ""; + return `${protocol ? `${protocol}://` : ""}${filteredHost}${path}`; + } + exports.getNumberOfUrlSegments = getNumberOfUrlSegments; + exports.getSanitizedUrlString = getSanitizedUrlString; + exports.parseUrl = parseUrl; + exports.stripUrlQueryAndFragment = stripUrlQueryAndFragment; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/requestdata.js +var require_requestdata = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/requestdata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var cookie = require_cookie(), debugBuild = require_debug_build(), is = require_is(), logger = require_logger(), normalize = require_normalize(), url = require_url(), DEFAULT_INCLUDES = { + ip: !1, + request: !0, + transaction: !0, + user: !0 + }, DEFAULT_REQUEST_INCLUDES = ["cookies", "data", "headers", "method", "query_string", "url"], DEFAULT_USER_INCLUDES = ["id", "username", "email"]; + function extractPathForTransaction(req, options = {}) { + let method = req.method && req.method.toUpperCase(), path = "", source = "url"; + options.customRoute || req.route ? (path = options.customRoute || `${req.baseUrl || ""}${req.route && req.route.path}`, source = "route") : (req.originalUrl || req.url) && (path = url.stripUrlQueryAndFragment(req.originalUrl || req.url || "")); + let name = ""; + return options.method && method && (name += method), options.method && options.path && (name += " "), options.path && path && (name += path), [name, source]; + } + function extractTransaction(req, type) { + switch (type) { + case "path": + return extractPathForTransaction(req, { path: !0 })[0]; + case "handler": + return req.route && req.route.stack && req.route.stack[0] && req.route.stack[0].name || ""; + case "methodPath": + default: { + let customRoute = req._reconstructedRoute ? req._reconstructedRoute : void 0; + return extractPathForTransaction(req, { path: !0, method: !0, customRoute })[0]; + } + } + } + function extractUserData(user, keys) { + let extractedUser = {}; + return (Array.isArray(keys) ? keys : DEFAULT_USER_INCLUDES).forEach((key) => { + user && key in user && (extractedUser[key] = user[key]); + }), extractedUser; + } + function extractRequestData(req, options) { + let { include = DEFAULT_REQUEST_INCLUDES } = options || {}, requestData = {}, headers = req.headers || {}, method = req.method, host = headers.host || req.hostname || req.host || "", protocol = req.protocol === "https" || req.socket && req.socket.encrypted ? "https" : "http", originalUrl = req.originalUrl || req.url || "", absoluteUrl = originalUrl.startsWith(protocol) ? originalUrl : `${protocol}://${host}${originalUrl}`; + return include.forEach((key) => { + switch (key) { + case "headers": { + requestData.headers = headers, include.includes("cookies") || delete requestData.headers.cookie; + break; + } + case "method": { + requestData.method = method; + break; + } + case "url": { + requestData.url = absoluteUrl; + break; + } + case "cookies": { + requestData.cookies = // TODO (v8 / #5257): We're only sending the empty object for backwards compatibility, so the last bit can + // come off in v8 + req.cookies || headers.cookie && cookie.parseCookie(headers.cookie) || {}; + break; + } + case "query_string": { + requestData.query_string = extractQueryParams(req); + break; + } + case "data": { + if (method === "GET" || method === "HEAD") + break; + req.body !== void 0 && (requestData.data = is.isString(req.body) ? req.body : JSON.stringify(normalize.normalize(req.body))); + break; + } + default: + ({}).hasOwnProperty.call(req, key) && (requestData[key] = req[key]); + } + }), requestData; + } + function addRequestDataToEvent(event, req, options) { + let include = { + ...DEFAULT_INCLUDES, + ...options && options.include + }; + if (include.request) { + let extractedRequestData = Array.isArray(include.request) ? extractRequestData(req, { include: include.request }) : extractRequestData(req); + event.request = { + ...event.request, + ...extractedRequestData + }; + } + if (include.user) { + let extractedUser = req.user && is.isPlainObject(req.user) ? extractUserData(req.user, include.user) : {}; + Object.keys(extractedUser).length && (event.user = { + ...event.user, + ...extractedUser + }); + } + if (include.ip) { + let ip = req.ip || req.socket && req.socket.remoteAddress; + ip && (event.user = { + ...event.user, + ip_address: ip + }); + } + return include.transaction && !event.transaction && event.type === "transaction" && (event.transaction = extractTransaction(req, include.transaction)), event; + } + function extractQueryParams(req) { + let originalUrl = req.originalUrl || req.url || ""; + if (originalUrl) { + originalUrl.startsWith("/") && (originalUrl = `http://dogs.are.great${originalUrl}`); + try { + let queryParams = req.query || new URL(originalUrl).search.slice(1); + return queryParams.length ? queryParams : void 0; + } catch { + return; + } + } + } + function winterCGHeadersToDict(winterCGHeaders) { + let headers = {}; + try { + winterCGHeaders.forEach((value, key) => { + typeof value == "string" && (headers[key] = value); + }); + } catch { + debugBuild.DEBUG_BUILD && logger.logger.warn("Sentry failed extracting headers from a request object. If you see this, please file an issue."); + } + return headers; + } + function winterCGRequestToRequestData(req) { + let headers = winterCGHeadersToDict(req.headers); + return { + method: req.method, + url: req.url, + headers + }; + } + exports.DEFAULT_USER_INCLUDES = DEFAULT_USER_INCLUDES; + exports.addRequestDataToEvent = addRequestDataToEvent; + exports.extractPathForTransaction = extractPathForTransaction; + exports.extractRequestData = extractRequestData; + exports.winterCGHeadersToDict = winterCGHeadersToDict; + exports.winterCGRequestToRequestData = winterCGRequestToRequestData; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/severity.js +var require_severity = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/severity.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var validSeverityLevels = ["fatal", "error", "warning", "log", "info", "debug"]; + function severityLevelFromString(level) { + return level === "warn" ? "warning" : validSeverityLevels.includes(level) ? level : "log"; + } + exports.severityLevelFromString = severityLevelFromString; + exports.validSeverityLevels = validSeverityLevels; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/node-stack-trace.js +var require_node_stack_trace = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/node-stack-trace.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var stacktrace = require_stacktrace(); + function filenameIsInApp(filename, isNative = !1) { + return !(isNative || filename && // It's not internal if it's an absolute linux path + !filename.startsWith("/") && // It's not internal if it's an absolute windows path + !filename.match(/^[A-Z]:/) && // It's not internal if the path is starting with a dot + !filename.startsWith(".") && // It's not internal if the frame has a protocol. In node, this is usually the case if the file got pre-processed with a bundler like webpack + !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//)) && filename !== void 0 && !filename.includes("node_modules/"); + } + function node(getModule) { + let FILENAME_MATCH = /^\s*[-]{4,}$/, FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/; + return (line) => { + let lineMatch = line.match(FULL_MATCH); + if (lineMatch) { + let object, method, functionName, typeName, methodName; + if (lineMatch[1]) { + functionName = lineMatch[1]; + let methodStart = functionName.lastIndexOf("."); + if (functionName[methodStart - 1] === "." && methodStart--, methodStart > 0) { + object = functionName.slice(0, methodStart), method = functionName.slice(methodStart + 1); + let objectEnd = object.indexOf(".Module"); + objectEnd > 0 && (functionName = functionName.slice(objectEnd + 1), object = object.slice(0, objectEnd)); + } + typeName = void 0; + } + method && (typeName = object, methodName = method), method === "" && (methodName = void 0, functionName = void 0), functionName === void 0 && (methodName = methodName || stacktrace.UNKNOWN_FUNCTION, functionName = typeName ? `${typeName}.${methodName}` : methodName); + let filename = lineMatch[2] && lineMatch[2].startsWith("file://") ? lineMatch[2].slice(7) : lineMatch[2], isNative = lineMatch[5] === "native"; + return filename && filename.match(/\/[A-Z]:/) && (filename = filename.slice(1)), !filename && lineMatch[5] && !isNative && (filename = lineMatch[5]), { + filename, + module: getModule ? getModule(filename) : void 0, + function: functionName, + lineno: parseInt(lineMatch[3], 10) || void 0, + colno: parseInt(lineMatch[4], 10) || void 0, + in_app: filenameIsInApp(filename, isNative) + }; + } + if (line.match(FILENAME_MATCH)) + return { + filename: line + }; + }; + } + function nodeStackLineParser(getModule) { + return [90, node(getModule)]; + } + exports.filenameIsInApp = filenameIsInApp; + exports.node = node; + exports.nodeStackLineParser = nodeStackLineParser; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/baggage.js +var require_baggage = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/baggage.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), is = require_is(), logger = require_logger(), BAGGAGE_HEADER_NAME = "baggage", SENTRY_BAGGAGE_KEY_PREFIX = "sentry-", SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/, MAX_BAGGAGE_STRING_LENGTH = 8192; + function baggageHeaderToDynamicSamplingContext(baggageHeader) { + let baggageObject = parseBaggageHeader(baggageHeader); + if (!baggageObject) + return; + let dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => { + if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) { + let nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length); + acc[nonPrefixedKey] = value; + } + return acc; + }, {}); + if (Object.keys(dynamicSamplingContext).length > 0) + return dynamicSamplingContext; + } + function dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext) { + if (!dynamicSamplingContext) + return; + let sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce( + (acc, [dscKey, dscValue]) => (dscValue && (acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue), acc), + {} + ); + return objectToBaggageHeader(sentryPrefixedDSC); + } + function parseBaggageHeader(baggageHeader) { + if (!(!baggageHeader || !is.isString(baggageHeader) && !Array.isArray(baggageHeader))) + return Array.isArray(baggageHeader) ? baggageHeader.reduce((acc, curr) => { + let currBaggageObject = baggageHeaderToObject(curr); + for (let key of Object.keys(currBaggageObject)) + acc[key] = currBaggageObject[key]; + return acc; + }, {}) : baggageHeaderToObject(baggageHeader); + } + function baggageHeaderToObject(baggageHeader) { + return baggageHeader.split(",").map((baggageEntry) => baggageEntry.split("=").map((keyOrValue) => decodeURIComponent(keyOrValue.trim()))).reduce((acc, [key, value]) => (acc[key] = value, acc), {}); + } + function objectToBaggageHeader(object) { + if (Object.keys(object).length !== 0) + return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => { + let baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`, newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`; + return newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH ? (debugBuild.DEBUG_BUILD && logger.logger.warn( + `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.` + ), baggageHeader) : newBaggageHeader; + }, ""); + } + exports.BAGGAGE_HEADER_NAME = BAGGAGE_HEADER_NAME; + exports.MAX_BAGGAGE_STRING_LENGTH = MAX_BAGGAGE_STRING_LENGTH; + exports.SENTRY_BAGGAGE_KEY_PREFIX = SENTRY_BAGGAGE_KEY_PREFIX; + exports.SENTRY_BAGGAGE_KEY_PREFIX_REGEX = SENTRY_BAGGAGE_KEY_PREFIX_REGEX; + exports.baggageHeaderToDynamicSamplingContext = baggageHeaderToDynamicSamplingContext; + exports.dynamicSamplingContextToSentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader; + exports.parseBaggageHeader = parseBaggageHeader; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/tracing.js +var require_tracing = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/tracing.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var baggage = require_baggage(), misc = require_misc(), TRACEPARENT_REGEXP = new RegExp( + "^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$" + // whitespace + ); + function extractTraceparentData(traceparent) { + if (!traceparent) + return; + let matches = traceparent.match(TRACEPARENT_REGEXP); + if (!matches) + return; + let parentSampled; + return matches[3] === "1" ? parentSampled = !0 : matches[3] === "0" && (parentSampled = !1), { + traceId: matches[1], + parentSampled, + parentSpanId: matches[2] + }; + } + function propagationContextFromHeaders(sentryTrace, baggage$1) { + let traceparentData = extractTraceparentData(sentryTrace), dynamicSamplingContext = baggage.baggageHeaderToDynamicSamplingContext(baggage$1), { traceId, parentSpanId, parentSampled } = traceparentData || {}; + return traceparentData ? { + traceId: traceId || misc.uuid4(), + parentSpanId: parentSpanId || misc.uuid4().substring(16), + spanId: misc.uuid4().substring(16), + sampled: parentSampled, + dsc: dynamicSamplingContext || {} + // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it + } : { + traceId: traceId || misc.uuid4(), + spanId: misc.uuid4().substring(16) + }; + } + function generateSentryTraceHeader(traceId = misc.uuid4(), spanId = misc.uuid4().substring(16), sampled) { + let sampledString = ""; + return sampled !== void 0 && (sampledString = sampled ? "-1" : "-0"), `${traceId}-${spanId}${sampledString}`; + } + exports.TRACEPARENT_REGEXP = TRACEPARENT_REGEXP; + exports.extractTraceparentData = extractTraceparentData; + exports.generateSentryTraceHeader = generateSentryTraceHeader; + exports.propagationContextFromHeaders = propagationContextFromHeaders; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/envelope.js +var require_envelope = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/envelope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var dsn = require_dsn(), normalize = require_normalize(), object = require_object(), worldwide = require_worldwide(); + function createEnvelope(headers, items = []) { + return [headers, items]; + } + function addItemToEnvelope(envelope, newItem) { + let [headers, items] = envelope; + return [headers, [...items, newItem]]; + } + function forEachEnvelopeItem(envelope, callback) { + let envelopeItems = envelope[1]; + for (let envelopeItem of envelopeItems) { + let envelopeItemType = envelopeItem[0].type; + if (callback(envelopeItem, envelopeItemType)) + return !0; + } + return !1; + } + function envelopeContainsItemType(envelope, types) { + return forEachEnvelopeItem(envelope, (_, type) => types.includes(type)); + } + function encodeUTF8(input) { + return worldwide.GLOBAL_OBJ.__SENTRY__ && worldwide.GLOBAL_OBJ.__SENTRY__.encodePolyfill ? worldwide.GLOBAL_OBJ.__SENTRY__.encodePolyfill(input) : new TextEncoder().encode(input); + } + function decodeUTF8(input) { + return worldwide.GLOBAL_OBJ.__SENTRY__ && worldwide.GLOBAL_OBJ.__SENTRY__.decodePolyfill ? worldwide.GLOBAL_OBJ.__SENTRY__.decodePolyfill(input) : new TextDecoder().decode(input); + } + function serializeEnvelope(envelope) { + let [envHeaders, items] = envelope, parts = JSON.stringify(envHeaders); + function append(next) { + typeof parts == "string" ? parts = typeof next == "string" ? parts + next : [encodeUTF8(parts), next] : parts.push(typeof next == "string" ? encodeUTF8(next) : next); + } + for (let item of items) { + let [itemHeaders, payload] = item; + if (append(` +${JSON.stringify(itemHeaders)} +`), typeof payload == "string" || payload instanceof Uint8Array) + append(payload); + else { + let stringifiedPayload; + try { + stringifiedPayload = JSON.stringify(payload); + } catch { + stringifiedPayload = JSON.stringify(normalize.normalize(payload)); + } + append(stringifiedPayload); + } + } + return typeof parts == "string" ? parts : concatBuffers(parts); + } + function concatBuffers(buffers) { + let totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0), merged = new Uint8Array(totalLength), offset = 0; + for (let buffer of buffers) + merged.set(buffer, offset), offset += buffer.length; + return merged; + } + function parseEnvelope(env) { + let buffer = typeof env == "string" ? encodeUTF8(env) : env; + function readBinary(length) { + let bin = buffer.subarray(0, length); + return buffer = buffer.subarray(length + 1), bin; + } + function readJson() { + let i = buffer.indexOf(10); + return i < 0 && (i = buffer.length), JSON.parse(decodeUTF8(readBinary(i))); + } + let envelopeHeader = readJson(), items = []; + for (; buffer.length; ) { + let itemHeader = readJson(), binaryLength = typeof itemHeader.length == "number" ? itemHeader.length : void 0; + items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]); + } + return [envelopeHeader, items]; + } + function createSpanEnvelopeItem(spanJson) { + return [{ + type: "span" + }, spanJson]; + } + function createAttachmentEnvelopeItem(attachment) { + let buffer = typeof attachment.data == "string" ? encodeUTF8(attachment.data) : attachment.data; + return [ + object.dropUndefinedKeys({ + type: "attachment", + length: buffer.length, + filename: attachment.filename, + content_type: attachment.contentType, + attachment_type: attachment.attachmentType + }), + buffer + ]; + } + var ITEM_TYPE_TO_DATA_CATEGORY_MAP = { + session: "session", + sessions: "session", + attachment: "attachment", + transaction: "transaction", + event: "error", + client_report: "internal", + user_report: "default", + profile: "profile", + profile_chunk: "profile", + replay_event: "replay", + replay_recording: "replay", + check_in: "monitor", + feedback: "feedback", + span: "span", + statsd: "metric_bucket" + }; + function envelopeItemTypeToDataCategory(type) { + return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type]; + } + function getSdkMetadataForEnvelopeHeader(metadataOrEvent) { + if (!metadataOrEvent || !metadataOrEvent.sdk) + return; + let { name, version } = metadataOrEvent.sdk; + return { name, version }; + } + function createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn$1) { + let dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext; + return { + event_id: event.event_id, + sent_at: (/* @__PURE__ */ new Date()).toISOString(), + ...sdkInfo && { sdk: sdkInfo }, + ...!!tunnel && dsn$1 && { dsn: dsn.dsnToString(dsn$1) }, + ...dynamicSamplingContext && { + trace: object.dropUndefinedKeys({ ...dynamicSamplingContext }) + } + }; + } + exports.addItemToEnvelope = addItemToEnvelope; + exports.createAttachmentEnvelopeItem = createAttachmentEnvelopeItem; + exports.createEnvelope = createEnvelope; + exports.createEventEnvelopeHeaders = createEventEnvelopeHeaders; + exports.createSpanEnvelopeItem = createSpanEnvelopeItem; + exports.envelopeContainsItemType = envelopeContainsItemType; + exports.envelopeItemTypeToDataCategory = envelopeItemTypeToDataCategory; + exports.forEachEnvelopeItem = forEachEnvelopeItem; + exports.getSdkMetadataForEnvelopeHeader = getSdkMetadataForEnvelopeHeader; + exports.parseEnvelope = parseEnvelope; + exports.serializeEnvelope = serializeEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/clientreport.js +var require_clientreport = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/clientreport.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var envelope = require_envelope(), time = require_time(); + function createClientReportEnvelope(discarded_events, dsn, timestamp) { + let clientReportItem = [ + { type: "client_report" }, + { + timestamp: timestamp || time.dateTimestampInSeconds(), + discarded_events + } + ]; + return envelope.createEnvelope(dsn ? { dsn } : {}, [clientReportItem]); + } + exports.createClientReportEnvelope = createClientReportEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/ratelimit.js +var require_ratelimit = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/ratelimit.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var DEFAULT_RETRY_AFTER = 60 * 1e3; + function parseRetryAfterHeader(header, now = Date.now()) { + let headerDelay = parseInt(`${header}`, 10); + if (!isNaN(headerDelay)) + return headerDelay * 1e3; + let headerDate = Date.parse(`${header}`); + return isNaN(headerDate) ? DEFAULT_RETRY_AFTER : headerDate - now; + } + function disabledUntil(limits, dataCategory) { + return limits[dataCategory] || limits.all || 0; + } + function isRateLimited(limits, dataCategory, now = Date.now()) { + return disabledUntil(limits, dataCategory) > now; + } + function updateRateLimits(limits, { statusCode, headers }, now = Date.now()) { + let updatedRateLimits = { + ...limits + }, rateLimitHeader = headers && headers["x-sentry-rate-limits"], retryAfterHeader = headers && headers["retry-after"]; + if (rateLimitHeader) + for (let limit of rateLimitHeader.trim().split(",")) { + let [retryAfter, categories, , , namespaces] = limit.split(":", 5), headerDelay = parseInt(retryAfter, 10), delay = (isNaN(headerDelay) ? 60 : headerDelay) * 1e3; + if (!categories) + updatedRateLimits.all = now + delay; + else + for (let category of categories.split(";")) + category === "metric_bucket" ? (!namespaces || namespaces.split(";").includes("custom")) && (updatedRateLimits[category] = now + delay) : updatedRateLimits[category] = now + delay; + } + else retryAfterHeader ? updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now) : statusCode === 429 && (updatedRateLimits.all = now + 60 * 1e3); + return updatedRateLimits; + } + exports.DEFAULT_RETRY_AFTER = DEFAULT_RETRY_AFTER; + exports.disabledUntil = disabledUntil; + exports.isRateLimited = isRateLimited; + exports.parseRetryAfterHeader = parseRetryAfterHeader; + exports.updateRateLimits = updateRateLimits; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/cache.js +var require_cache = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/cache.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function makeFifoCache(size) { + let evictionOrder = [], cache = {}; + return { + add(key, value) { + for (; evictionOrder.length >= size; ) { + let evictCandidate = evictionOrder.shift(); + evictCandidate !== void 0 && delete cache[evictCandidate]; + } + cache[key] && this.delete(key), evictionOrder.push(key), cache[key] = value; + }, + clear() { + cache = {}, evictionOrder = []; + }, + get(key) { + return cache[key]; + }, + size() { + return evictionOrder.length; + }, + // Delete cache key and return true if it existed, false otherwise. + delete(key) { + if (!cache[key]) + return !1; + delete cache[key]; + for (let i = 0; i < evictionOrder.length; i++) + if (evictionOrder[i] === key) { + evictionOrder.splice(i, 1); + break; + } + return !0; + } + }; + } + exports.makeFifoCache = makeFifoCache; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/eventbuilder.js +var require_eventbuilder = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/eventbuilder.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), misc = require_misc(), normalize = require_normalize(), object = require_object(); + function parseStackFrames(stackParser, error) { + return stackParser(error.stack || "", 1); + } + function exceptionFromError(stackParser, error) { + let exception = { + type: error.name || error.constructor.name, + value: error.message + }, frames = parseStackFrames(stackParser, error); + return frames.length && (exception.stacktrace = { frames }), exception; + } + function getErrorPropertyFromObject(obj) { + for (let prop in obj) + if (Object.prototype.hasOwnProperty.call(obj, prop)) { + let value = obj[prop]; + if (value instanceof Error) + return value; + } + } + function getMessageForObject(exception) { + if ("name" in exception && typeof exception.name == "string") { + let message = `'${exception.name}' captured as exception`; + return "message" in exception && typeof exception.message == "string" && (message += ` with message '${exception.message}'`), message; + } else if ("message" in exception && typeof exception.message == "string") + return exception.message; + let keys = object.extractExceptionKeysForMessage(exception); + if (is.isErrorEvent(exception)) + return `Event \`ErrorEvent\` captured as exception with message \`${exception.message}\``; + let className = getObjectClassName(exception); + return `${className && className !== "Object" ? `'${className}'` : "Object"} captured as exception with keys: ${keys}`; + } + function getObjectClassName(obj) { + try { + let prototype = Object.getPrototypeOf(obj); + return prototype ? prototype.constructor.name : void 0; + } catch { + } + } + function getException(client, mechanism, exception, hint) { + if (is.isError(exception)) + return [exception, void 0]; + if (mechanism.synthetic = !0, is.isPlainObject(exception)) { + let normalizeDepth = client && client.getOptions().normalizeDepth, extras = { __serialized__: normalize.normalizeToSize(exception, normalizeDepth) }, errorFromProp = getErrorPropertyFromObject(exception); + if (errorFromProp) + return [errorFromProp, extras]; + let message = getMessageForObject(exception), ex2 = hint && hint.syntheticException || new Error(message); + return ex2.message = message, [ex2, extras]; + } + let ex = hint && hint.syntheticException || new Error(exception); + return ex.message = `${exception}`, [ex, void 0]; + } + function eventFromUnknownInput(client, stackParser, exception, hint) { + let mechanism = hint && hint.data && hint.data.mechanism || { + handled: !0, + type: "generic" + }, [ex, extras] = getException(client, mechanism, exception, hint), event = { + exception: { + values: [exceptionFromError(stackParser, ex)] + } + }; + return extras && (event.extra = extras), misc.addExceptionTypeValue(event, void 0, void 0), misc.addExceptionMechanism(event, mechanism), { + ...event, + event_id: hint && hint.event_id + }; + } + function eventFromMessage(stackParser, message, level = "info", hint, attachStacktrace) { + let event = { + event_id: hint && hint.event_id, + level + }; + if (attachStacktrace && hint && hint.syntheticException) { + let frames = parseStackFrames(stackParser, hint.syntheticException); + frames.length && (event.exception = { + values: [ + { + value: message, + stacktrace: { frames } + } + ] + }); + } + if (is.isParameterizedString(message)) { + let { __sentry_template_string__, __sentry_template_values__ } = message; + return event.logentry = { + message: __sentry_template_string__, + params: __sentry_template_values__ + }, event; + } + return event.message = message, event; + } + exports.eventFromMessage = eventFromMessage; + exports.eventFromUnknownInput = eventFromUnknownInput; + exports.exceptionFromError = exceptionFromError; + exports.parseStackFrames = parseStackFrames; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/anr.js +var require_anr = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/anr.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var nodeStackTrace = require_node_stack_trace(), object = require_object(), stacktrace = require_stacktrace(); + function watchdogTimer(createTimer, pollInterval, anrThreshold, callback) { + let timer = createTimer(), triggered = !1, enabled = !0; + return setInterval(() => { + let diffMs = timer.getTimeMs(); + triggered === !1 && diffMs > pollInterval + anrThreshold && (triggered = !0, enabled && callback()), diffMs < pollInterval + anrThreshold && (triggered = !1); + }, 20), { + poll: () => { + timer.reset(); + }, + enabled: (state) => { + enabled = state; + } + }; + } + function callFrameToStackFrame(frame, url, getModuleFromFilename) { + let filename = url ? url.replace(/^file:\/\//, "") : void 0, colno = frame.location.columnNumber ? frame.location.columnNumber + 1 : void 0, lineno = frame.location.lineNumber ? frame.location.lineNumber + 1 : void 0; + return object.dropUndefinedKeys({ + filename, + module: getModuleFromFilename(filename), + function: frame.functionName || stacktrace.UNKNOWN_FUNCTION, + colno, + lineno, + in_app: filename ? nodeStackTrace.filenameIsInApp(filename) : void 0 + }); + } + exports.callFrameToStackFrame = callFrameToStackFrame; + exports.watchdogTimer = watchdogTimer; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/lru.js +var require_lru = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/lru.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var LRUMap = class { + constructor(_maxSize) { + this._maxSize = _maxSize, this._cache = /* @__PURE__ */ new Map(); + } + /** Get the current size of the cache */ + get size() { + return this._cache.size; + } + /** Get an entry or undefined if it was not in the cache. Re-inserts to update the recently used order */ + get(key) { + let value = this._cache.get(key); + if (value !== void 0) + return this._cache.delete(key), this._cache.set(key, value), value; + } + /** Insert an entry and evict an older entry if we've reached maxSize */ + set(key, value) { + this._cache.size >= this._maxSize && this._cache.delete(this._cache.keys().next().value), this._cache.set(key, value); + } + /** Remove an entry and return the entry if it was in the cache */ + remove(key) { + let value = this._cache.get(key); + return value && this._cache.delete(key), value; + } + /** Clear all entries */ + clear() { + this._cache.clear(); + } + /** Get all the keys */ + keys() { + return Array.from(this._cache.keys()); + } + /** Get all the values */ + values() { + let values = []; + return this._cache.forEach((value) => values.push(value)), values; + } + }; + exports.LRUMap = LRUMap; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_nullishCoalesce.js +var require_nullishCoalesce = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_nullishCoalesce.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function _nullishCoalesce(lhs, rhsFn) { + return lhs ?? rhsFn(); + } + exports._nullishCoalesce = _nullishCoalesce; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncNullishCoalesce.js +var require_asyncNullishCoalesce = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncNullishCoalesce.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var _nullishCoalesce = require_nullishCoalesce(); + async function _asyncNullishCoalesce(lhs, rhsFn) { + return _nullishCoalesce._nullishCoalesce(lhs, rhsFn); + } + exports._asyncNullishCoalesce = _asyncNullishCoalesce; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncOptionalChain.js +var require_asyncOptionalChain = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncOptionalChain.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + async function _asyncOptionalChain(ops) { + let lastAccessLHS, value = ops[0], i = 1; + for (; i < ops.length; ) { + let op = ops[i], fn = ops[i + 1]; + if (i += 2, (op === "optionalAccess" || op === "optionalCall") && value == null) + return; + op === "access" || op === "optionalAccess" ? (lastAccessLHS = value, value = await fn(value)) : (op === "call" || op === "optionalCall") && (value = await fn((...args) => value.call(lastAccessLHS, ...args)), lastAccessLHS = void 0); + } + return value; + } + exports._asyncOptionalChain = _asyncOptionalChain; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncOptionalChainDelete.js +var require_asyncOptionalChainDelete = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncOptionalChainDelete.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var _asyncOptionalChain = require_asyncOptionalChain(); + async function _asyncOptionalChainDelete(ops) { + let result = await _asyncOptionalChain._asyncOptionalChain(ops); + return result ?? !0; + } + exports._asyncOptionalChainDelete = _asyncOptionalChainDelete; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_optionalChain.js +var require_optionalChain = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_optionalChain.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function _optionalChain(ops) { + let lastAccessLHS, value = ops[0], i = 1; + for (; i < ops.length; ) { + let op = ops[i], fn = ops[i + 1]; + if (i += 2, (op === "optionalAccess" || op === "optionalCall") && value == null) + return; + op === "access" || op === "optionalAccess" ? (lastAccessLHS = value, value = fn(value)) : (op === "call" || op === "optionalCall") && (value = fn((...args) => value.call(lastAccessLHS, ...args)), lastAccessLHS = void 0); + } + return value; + } + exports._optionalChain = _optionalChain; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_optionalChainDelete.js +var require_optionalChainDelete = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_optionalChainDelete.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var _optionalChain = require_optionalChain(); + function _optionalChainDelete(ops) { + let result = _optionalChain._optionalChain(ops); + return result ?? !0; + } + exports._optionalChainDelete = _optionalChainDelete; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/propagationContext.js +var require_propagationContext = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/propagationContext.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var misc = require_misc(); + function generatePropagationContext() { + return { + traceId: misc.uuid4(), + spanId: misc.uuid4().substring(16) + }; + } + exports.generatePropagationContext = generatePropagationContext; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/vendor/escapeStringForRegex.js +var require_escapeStringForRegex = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/vendor/escapeStringForRegex.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function escapeStringForRegex(regexString) { + return regexString.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); + } + exports.escapeStringForRegex = escapeStringForRegex; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/vendor/supportsHistory.js +var require_supportsHistory = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/vendor/supportsHistory.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var worldwide = require_worldwide(), WINDOW = worldwide.GLOBAL_OBJ; + function supportsHistory() { + let chromeVar = WINDOW.chrome, isChromePackagedApp = chromeVar && chromeVar.app && chromeVar.app.runtime, hasHistoryApi = "history" in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState; + return !isChromePackagedApp && hasHistoryApi; + } + exports.supportsHistory = supportsHistory; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/index.js +var require_cjs = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var aggregateErrors = require_aggregate_errors(), array = require_array(), browser = require_browser(), dsn = require_dsn(), error = require_error(), worldwide = require_worldwide(), console2 = require_console(), fetch2 = require_fetch(), globalError = require_globalError(), globalUnhandledRejection = require_globalUnhandledRejection(), handlers = require_handlers(), is = require_is(), isBrowser = require_isBrowser(), logger = require_logger(), memo = require_memo(), misc = require_misc(), node = require_node(), normalize = require_normalize(), object = require_object(), path = require_path(), promisebuffer = require_promisebuffer(), requestdata = require_requestdata(), severity = require_severity(), stacktrace = require_stacktrace(), nodeStackTrace = require_node_stack_trace(), string = require_string(), supports = require_supports(), syncpromise = require_syncpromise(), time = require_time(), tracing = require_tracing(), env = require_env(), envelope = require_envelope(), clientreport = require_clientreport(), ratelimit = require_ratelimit(), baggage = require_baggage(), url = require_url(), cache = require_cache(), eventbuilder = require_eventbuilder(), anr = require_anr(), lru = require_lru(), _asyncNullishCoalesce = require_asyncNullishCoalesce(), _asyncOptionalChain = require_asyncOptionalChain(), _asyncOptionalChainDelete = require_asyncOptionalChainDelete(), _nullishCoalesce = require_nullishCoalesce(), _optionalChain = require_optionalChain(), _optionalChainDelete = require_optionalChainDelete(), propagationContext = require_propagationContext(), version = require_version(), escapeStringForRegex = require_escapeStringForRegex(), supportsHistory = require_supportsHistory(); + exports.applyAggregateErrorsToEvent = aggregateErrors.applyAggregateErrorsToEvent; + exports.flatten = array.flatten; + exports.getComponentName = browser.getComponentName; + exports.getDomElement = browser.getDomElement; + exports.getLocationHref = browser.getLocationHref; + exports.htmlTreeAsString = browser.htmlTreeAsString; + exports.dsnFromString = dsn.dsnFromString; + exports.dsnToString = dsn.dsnToString; + exports.makeDsn = dsn.makeDsn; + exports.SentryError = error.SentryError; + exports.GLOBAL_OBJ = worldwide.GLOBAL_OBJ; + exports.getGlobalSingleton = worldwide.getGlobalSingleton; + exports.addConsoleInstrumentationHandler = console2.addConsoleInstrumentationHandler; + exports.addFetchInstrumentationHandler = fetch2.addFetchInstrumentationHandler; + exports.addGlobalErrorInstrumentationHandler = globalError.addGlobalErrorInstrumentationHandler; + exports.addGlobalUnhandledRejectionInstrumentationHandler = globalUnhandledRejection.addGlobalUnhandledRejectionInstrumentationHandler; + exports.addHandler = handlers.addHandler; + exports.maybeInstrument = handlers.maybeInstrument; + exports.resetInstrumentationHandlers = handlers.resetInstrumentationHandlers; + exports.triggerHandlers = handlers.triggerHandlers; + exports.isDOMError = is.isDOMError; + exports.isDOMException = is.isDOMException; + exports.isElement = is.isElement; + exports.isError = is.isError; + exports.isErrorEvent = is.isErrorEvent; + exports.isEvent = is.isEvent; + exports.isInstanceOf = is.isInstanceOf; + exports.isParameterizedString = is.isParameterizedString; + exports.isPlainObject = is.isPlainObject; + exports.isPrimitive = is.isPrimitive; + exports.isRegExp = is.isRegExp; + exports.isString = is.isString; + exports.isSyntheticEvent = is.isSyntheticEvent; + exports.isThenable = is.isThenable; + exports.isVueViewModel = is.isVueViewModel; + exports.isBrowser = isBrowser.isBrowser; + exports.CONSOLE_LEVELS = logger.CONSOLE_LEVELS; + exports.consoleSandbox = logger.consoleSandbox; + exports.logger = logger.logger; + exports.originalConsoleMethods = logger.originalConsoleMethods; + exports.memoBuilder = memo.memoBuilder; + exports.addContextToFrame = misc.addContextToFrame; + exports.addExceptionMechanism = misc.addExceptionMechanism; + exports.addExceptionTypeValue = misc.addExceptionTypeValue; + exports.arrayify = misc.arrayify; + exports.checkOrSetAlreadyCaught = misc.checkOrSetAlreadyCaught; + exports.getEventDescription = misc.getEventDescription; + exports.parseSemver = misc.parseSemver; + exports.uuid4 = misc.uuid4; + exports.dynamicRequire = node.dynamicRequire; + exports.isNodeEnv = node.isNodeEnv; + exports.loadModule = node.loadModule; + exports.normalize = normalize.normalize; + exports.normalizeToSize = normalize.normalizeToSize; + exports.normalizeUrlToBase = normalize.normalizeUrlToBase; + exports.addNonEnumerableProperty = object.addNonEnumerableProperty; + exports.convertToPlainObject = object.convertToPlainObject; + exports.dropUndefinedKeys = object.dropUndefinedKeys; + exports.extractExceptionKeysForMessage = object.extractExceptionKeysForMessage; + exports.fill = object.fill; + exports.getOriginalFunction = object.getOriginalFunction; + exports.markFunctionWrapped = object.markFunctionWrapped; + exports.objectify = object.objectify; + exports.urlEncode = object.urlEncode; + exports.basename = path.basename; + exports.dirname = path.dirname; + exports.isAbsolute = path.isAbsolute; + exports.join = path.join; + exports.normalizePath = path.normalizePath; + exports.relative = path.relative; + exports.resolve = path.resolve; + exports.makePromiseBuffer = promisebuffer.makePromiseBuffer; + exports.DEFAULT_USER_INCLUDES = requestdata.DEFAULT_USER_INCLUDES; + exports.addRequestDataToEvent = requestdata.addRequestDataToEvent; + exports.extractPathForTransaction = requestdata.extractPathForTransaction; + exports.extractRequestData = requestdata.extractRequestData; + exports.winterCGHeadersToDict = requestdata.winterCGHeadersToDict; + exports.winterCGRequestToRequestData = requestdata.winterCGRequestToRequestData; + exports.severityLevelFromString = severity.severityLevelFromString; + exports.validSeverityLevels = severity.validSeverityLevels; + exports.UNKNOWN_FUNCTION = stacktrace.UNKNOWN_FUNCTION; + exports.createStackParser = stacktrace.createStackParser; + exports.getFramesFromEvent = stacktrace.getFramesFromEvent; + exports.getFunctionName = stacktrace.getFunctionName; + exports.stackParserFromStackParserOptions = stacktrace.stackParserFromStackParserOptions; + exports.stripSentryFramesAndReverse = stacktrace.stripSentryFramesAndReverse; + exports.filenameIsInApp = nodeStackTrace.filenameIsInApp; + exports.node = nodeStackTrace.node; + exports.nodeStackLineParser = nodeStackTrace.nodeStackLineParser; + exports.isMatchingPattern = string.isMatchingPattern; + exports.safeJoin = string.safeJoin; + exports.snipLine = string.snipLine; + exports.stringMatchesSomePattern = string.stringMatchesSomePattern; + exports.truncate = string.truncate; + exports.isNativeFunction = supports.isNativeFunction; + exports.supportsDOMError = supports.supportsDOMError; + exports.supportsDOMException = supports.supportsDOMException; + exports.supportsErrorEvent = supports.supportsErrorEvent; + exports.supportsFetch = supports.supportsFetch; + exports.supportsNativeFetch = supports.supportsNativeFetch; + exports.supportsReferrerPolicy = supports.supportsReferrerPolicy; + exports.supportsReportingObserver = supports.supportsReportingObserver; + exports.SyncPromise = syncpromise.SyncPromise; + exports.rejectedSyncPromise = syncpromise.rejectedSyncPromise; + exports.resolvedSyncPromise = syncpromise.resolvedSyncPromise; + Object.defineProperty(exports, "_browserPerformanceTimeOriginMode", { + enumerable: !0, + get: () => time._browserPerformanceTimeOriginMode + }); + exports.browserPerformanceTimeOrigin = time.browserPerformanceTimeOrigin; + exports.dateTimestampInSeconds = time.dateTimestampInSeconds; + exports.timestampInSeconds = time.timestampInSeconds; + exports.TRACEPARENT_REGEXP = tracing.TRACEPARENT_REGEXP; + exports.extractTraceparentData = tracing.extractTraceparentData; + exports.generateSentryTraceHeader = tracing.generateSentryTraceHeader; + exports.propagationContextFromHeaders = tracing.propagationContextFromHeaders; + exports.getSDKSource = env.getSDKSource; + exports.isBrowserBundle = env.isBrowserBundle; + exports.addItemToEnvelope = envelope.addItemToEnvelope; + exports.createAttachmentEnvelopeItem = envelope.createAttachmentEnvelopeItem; + exports.createEnvelope = envelope.createEnvelope; + exports.createEventEnvelopeHeaders = envelope.createEventEnvelopeHeaders; + exports.createSpanEnvelopeItem = envelope.createSpanEnvelopeItem; + exports.envelopeContainsItemType = envelope.envelopeContainsItemType; + exports.envelopeItemTypeToDataCategory = envelope.envelopeItemTypeToDataCategory; + exports.forEachEnvelopeItem = envelope.forEachEnvelopeItem; + exports.getSdkMetadataForEnvelopeHeader = envelope.getSdkMetadataForEnvelopeHeader; + exports.parseEnvelope = envelope.parseEnvelope; + exports.serializeEnvelope = envelope.serializeEnvelope; + exports.createClientReportEnvelope = clientreport.createClientReportEnvelope; + exports.DEFAULT_RETRY_AFTER = ratelimit.DEFAULT_RETRY_AFTER; + exports.disabledUntil = ratelimit.disabledUntil; + exports.isRateLimited = ratelimit.isRateLimited; + exports.parseRetryAfterHeader = ratelimit.parseRetryAfterHeader; + exports.updateRateLimits = ratelimit.updateRateLimits; + exports.BAGGAGE_HEADER_NAME = baggage.BAGGAGE_HEADER_NAME; + exports.MAX_BAGGAGE_STRING_LENGTH = baggage.MAX_BAGGAGE_STRING_LENGTH; + exports.SENTRY_BAGGAGE_KEY_PREFIX = baggage.SENTRY_BAGGAGE_KEY_PREFIX; + exports.SENTRY_BAGGAGE_KEY_PREFIX_REGEX = baggage.SENTRY_BAGGAGE_KEY_PREFIX_REGEX; + exports.baggageHeaderToDynamicSamplingContext = baggage.baggageHeaderToDynamicSamplingContext; + exports.dynamicSamplingContextToSentryBaggageHeader = baggage.dynamicSamplingContextToSentryBaggageHeader; + exports.parseBaggageHeader = baggage.parseBaggageHeader; + exports.getNumberOfUrlSegments = url.getNumberOfUrlSegments; + exports.getSanitizedUrlString = url.getSanitizedUrlString; + exports.parseUrl = url.parseUrl; + exports.stripUrlQueryAndFragment = url.stripUrlQueryAndFragment; + exports.makeFifoCache = cache.makeFifoCache; + exports.eventFromMessage = eventbuilder.eventFromMessage; + exports.eventFromUnknownInput = eventbuilder.eventFromUnknownInput; + exports.exceptionFromError = eventbuilder.exceptionFromError; + exports.parseStackFrames = eventbuilder.parseStackFrames; + exports.callFrameToStackFrame = anr.callFrameToStackFrame; + exports.watchdogTimer = anr.watchdogTimer; + exports.LRUMap = lru.LRUMap; + exports._asyncNullishCoalesce = _asyncNullishCoalesce._asyncNullishCoalesce; + exports._asyncOptionalChain = _asyncOptionalChain._asyncOptionalChain; + exports._asyncOptionalChainDelete = _asyncOptionalChainDelete._asyncOptionalChainDelete; + exports._nullishCoalesce = _nullishCoalesce._nullishCoalesce; + exports._optionalChain = _optionalChain._optionalChain; + exports._optionalChainDelete = _optionalChainDelete._optionalChainDelete; + exports.generatePropagationContext = propagationContext.generatePropagationContext; + exports.SDK_VERSION = version.SDK_VERSION; + exports.escapeStringForRegex = escapeStringForRegex.escapeStringForRegex; + exports.supportsHistory = supportsHistory.supportsHistory; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/debug-build.js +var require_debug_build2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/debug-build.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var DEBUG_BUILD = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__; + exports.DEBUG_BUILD = DEBUG_BUILD; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/carrier.js +var require_carrier = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/carrier.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function getMainCarrier() { + return getSentryCarrier(utils.GLOBAL_OBJ), utils.GLOBAL_OBJ; + } + function getSentryCarrier(carrier) { + let __SENTRY__ = carrier.__SENTRY__ = carrier.__SENTRY__ || {}; + return __SENTRY__.version = __SENTRY__.version || utils.SDK_VERSION, __SENTRY__[utils.SDK_VERSION] = __SENTRY__[utils.SDK_VERSION] || {}; + } + exports.getMainCarrier = getMainCarrier; + exports.getSentryCarrier = getSentryCarrier; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/session.js +var require_session = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/session.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function makeSession(context) { + let startingTime = utils.timestampInSeconds(), session = { + sid: utils.uuid4(), + init: !0, + timestamp: startingTime, + started: startingTime, + duration: 0, + status: "ok", + errors: 0, + ignoreDuration: !1, + toJSON: () => sessionToJSON(session) + }; + return context && updateSession(session, context), session; + } + function updateSession(session, context = {}) { + if (context.user && (!session.ipAddress && context.user.ip_address && (session.ipAddress = context.user.ip_address), !session.did && !context.did && (session.did = context.user.id || context.user.email || context.user.username)), session.timestamp = context.timestamp || utils.timestampInSeconds(), context.abnormal_mechanism && (session.abnormal_mechanism = context.abnormal_mechanism), context.ignoreDuration && (session.ignoreDuration = context.ignoreDuration), context.sid && (session.sid = context.sid.length === 32 ? context.sid : utils.uuid4()), context.init !== void 0 && (session.init = context.init), !session.did && context.did && (session.did = `${context.did}`), typeof context.started == "number" && (session.started = context.started), session.ignoreDuration) + session.duration = void 0; + else if (typeof context.duration == "number") + session.duration = context.duration; + else { + let duration = session.timestamp - session.started; + session.duration = duration >= 0 ? duration : 0; + } + context.release && (session.release = context.release), context.environment && (session.environment = context.environment), !session.ipAddress && context.ipAddress && (session.ipAddress = context.ipAddress), !session.userAgent && context.userAgent && (session.userAgent = context.userAgent), typeof context.errors == "number" && (session.errors = context.errors), context.status && (session.status = context.status); + } + function closeSession(session, status) { + let context = {}; + status ? context = { status } : session.status === "ok" && (context = { status: "exited" }), updateSession(session, context); + } + function sessionToJSON(session) { + return utils.dropUndefinedKeys({ + sid: `${session.sid}`, + init: session.init, + // Make sure that sec is converted to ms for date constructor + started: new Date(session.started * 1e3).toISOString(), + timestamp: new Date(session.timestamp * 1e3).toISOString(), + status: session.status, + errors: session.errors, + did: typeof session.did == "number" || typeof session.did == "string" ? `${session.did}` : void 0, + duration: session.duration, + abnormal_mechanism: session.abnormal_mechanism, + attrs: { + release: session.release, + environment: session.environment, + ip_address: session.ipAddress, + user_agent: session.userAgent + } + }); + } + exports.closeSession = closeSession; + exports.makeSession = makeSession; + exports.updateSession = updateSession; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/spanOnScope.js +var require_spanOnScope = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/spanOnScope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), SCOPE_SPAN_FIELD = "_sentrySpan"; + function _setSpanForScope(scope, span) { + span ? utils.addNonEnumerableProperty(scope, SCOPE_SPAN_FIELD, span) : delete scope[SCOPE_SPAN_FIELD]; + } + function _getSpanForScope(scope) { + return scope[SCOPE_SPAN_FIELD]; + } + exports._getSpanForScope = _getSpanForScope; + exports._setSpanForScope = _setSpanForScope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/scope.js +var require_scope = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/scope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), session = require_session(), spanOnScope = require_spanOnScope(), DEFAULT_MAX_BREADCRUMBS = 100, ScopeClass = class _ScopeClass { + /** Flag if notifying is happening. */ + /** Callback for client to receive scope changes. */ + /** Callback list that will be called during event processing. */ + /** Array of breadcrumbs. */ + /** User */ + /** Tags */ + /** Extra */ + /** Contexts */ + /** Attachments */ + /** Propagation Context for distributed tracing */ + /** + * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get + * sent to Sentry + */ + /** Fingerprint */ + /** Severity */ + /** + * Transaction Name + * + * IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects. + * It's purpose is to assign a transaction to the scope that's added to non-transaction events. + */ + /** Session */ + /** Request Mode Session Status */ + /** The client on this scope */ + /** Contains the last event id of a captured event. */ + // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method. + constructor() { + this._notifyingListeners = !1, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = utils.generatePropagationContext(); + } + /** + * @inheritDoc + */ + clone() { + let newScope = new _ScopeClass(); + return newScope._breadcrumbs = [...this._breadcrumbs], newScope._tags = { ...this._tags }, newScope._extra = { ...this._extra }, newScope._contexts = { ...this._contexts }, newScope._user = this._user, newScope._level = this._level, newScope._session = this._session, newScope._transactionName = this._transactionName, newScope._fingerprint = this._fingerprint, newScope._eventProcessors = [...this._eventProcessors], newScope._requestSession = this._requestSession, newScope._attachments = [...this._attachments], newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, newScope._propagationContext = { ...this._propagationContext }, newScope._client = this._client, newScope._lastEventId = this._lastEventId, spanOnScope._setSpanForScope(newScope, spanOnScope._getSpanForScope(this)), newScope; + } + /** + * @inheritDoc + */ + setClient(client) { + this._client = client; + } + /** + * @inheritDoc + */ + setLastEventId(lastEventId) { + this._lastEventId = lastEventId; + } + /** + * @inheritDoc + */ + getClient() { + return this._client; + } + /** + * @inheritDoc + */ + lastEventId() { + return this._lastEventId; + } + /** + * @inheritDoc + */ + addScopeListener(callback) { + this._scopeListeners.push(callback); + } + /** + * @inheritDoc + */ + addEventProcessor(callback) { + return this._eventProcessors.push(callback), this; + } + /** + * @inheritDoc + */ + setUser(user) { + return this._user = user || { + email: void 0, + id: void 0, + ip_address: void 0, + username: void 0 + }, this._session && session.updateSession(this._session, { user }), this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + getUser() { + return this._user; + } + /** + * @inheritDoc + */ + getRequestSession() { + return this._requestSession; + } + /** + * @inheritDoc + */ + setRequestSession(requestSession) { + return this._requestSession = requestSession, this; + } + /** + * @inheritDoc + */ + setTags(tags) { + return this._tags = { + ...this._tags, + ...tags + }, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setTag(key, value) { + return this._tags = { ...this._tags, [key]: value }, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setExtras(extras) { + return this._extra = { + ...this._extra, + ...extras + }, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setExtra(key, extra) { + return this._extra = { ...this._extra, [key]: extra }, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setFingerprint(fingerprint) { + return this._fingerprint = fingerprint, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setLevel(level) { + return this._level = level, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setTransactionName(name) { + return this._transactionName = name, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setContext(key, context) { + return context === null ? delete this._contexts[key] : this._contexts[key] = context, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setSession(session2) { + return session2 ? this._session = session2 : delete this._session, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + getSession() { + return this._session; + } + /** + * @inheritDoc + */ + update(captureContext) { + if (!captureContext) + return this; + let scopeToMerge = typeof captureContext == "function" ? captureContext(this) : captureContext, [scopeInstance, requestSession] = scopeToMerge instanceof Scope ? [scopeToMerge.getScopeData(), scopeToMerge.getRequestSession()] : utils.isPlainObject(scopeToMerge) ? [captureContext, captureContext.requestSession] : [], { tags, extra, user, contexts, level, fingerprint = [], propagationContext } = scopeInstance || {}; + return this._tags = { ...this._tags, ...tags }, this._extra = { ...this._extra, ...extra }, this._contexts = { ...this._contexts, ...contexts }, user && Object.keys(user).length && (this._user = user), level && (this._level = level), fingerprint.length && (this._fingerprint = fingerprint), propagationContext && (this._propagationContext = propagationContext), requestSession && (this._requestSession = requestSession), this; + } + /** + * @inheritDoc + */ + clear() { + return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._session = void 0, spanOnScope._setSpanForScope(this, void 0), this._attachments = [], this._propagationContext = utils.generatePropagationContext(), this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + addBreadcrumb(breadcrumb, maxBreadcrumbs) { + let maxCrumbs = typeof maxBreadcrumbs == "number" ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS; + if (maxCrumbs <= 0) + return this; + let mergedBreadcrumb = { + timestamp: utils.dateTimestampInSeconds(), + ...breadcrumb + }, breadcrumbs = this._breadcrumbs; + return breadcrumbs.push(mergedBreadcrumb), this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + getLastBreadcrumb() { + return this._breadcrumbs[this._breadcrumbs.length - 1]; + } + /** + * @inheritDoc + */ + clearBreadcrumbs() { + return this._breadcrumbs = [], this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + addAttachment(attachment) { + return this._attachments.push(attachment), this; + } + /** + * @inheritDoc + */ + clearAttachments() { + return this._attachments = [], this; + } + /** @inheritDoc */ + getScopeData() { + return { + breadcrumbs: this._breadcrumbs, + attachments: this._attachments, + contexts: this._contexts, + tags: this._tags, + extra: this._extra, + user: this._user, + level: this._level, + fingerprint: this._fingerprint || [], + eventProcessors: this._eventProcessors, + propagationContext: this._propagationContext, + sdkProcessingMetadata: this._sdkProcessingMetadata, + transactionName: this._transactionName, + span: spanOnScope._getSpanForScope(this) + }; + } + /** + * @inheritDoc + */ + setSDKProcessingMetadata(newData) { + return this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData }, this; + } + /** + * @inheritDoc + */ + setPropagationContext(context) { + return this._propagationContext = context, this; + } + /** + * @inheritDoc + */ + getPropagationContext() { + return this._propagationContext; + } + /** + * @inheritDoc + */ + captureException(exception, hint) { + let eventId = hint && hint.event_id ? hint.event_id : utils.uuid4(); + if (!this._client) + return utils.logger.warn("No client configured on scope - will not capture exception!"), eventId; + let syntheticException = new Error("Sentry syntheticException"); + return this._client.captureException( + exception, + { + originalException: exception, + syntheticException, + ...hint, + event_id: eventId + }, + this + ), eventId; + } + /** + * @inheritDoc + */ + captureMessage(message, level, hint) { + let eventId = hint && hint.event_id ? hint.event_id : utils.uuid4(); + if (!this._client) + return utils.logger.warn("No client configured on scope - will not capture message!"), eventId; + let syntheticException = new Error(message); + return this._client.captureMessage( + message, + level, + { + originalException: message, + syntheticException, + ...hint, + event_id: eventId + }, + this + ), eventId; + } + /** + * @inheritDoc + */ + captureEvent(event, hint) { + let eventId = hint && hint.event_id ? hint.event_id : utils.uuid4(); + return this._client ? (this._client.captureEvent(event, { ...hint, event_id: eventId }, this), eventId) : (utils.logger.warn("No client configured on scope - will not capture event!"), eventId); + } + /** + * This will be called on every set call. + */ + _notifyScopeListeners() { + this._notifyingListeners || (this._notifyingListeners = !0, this._scopeListeners.forEach((callback) => { + callback(this); + }), this._notifyingListeners = !1); + } + }, Scope = ScopeClass; + exports.Scope = Scope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/defaultScopes.js +var require_defaultScopes = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/defaultScopes.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), scope = require_scope(); + function getDefaultCurrentScope() { + return utils.getGlobalSingleton("defaultCurrentScope", () => new scope.Scope()); + } + function getDefaultIsolationScope() { + return utils.getGlobalSingleton("defaultIsolationScope", () => new scope.Scope()); + } + exports.getDefaultCurrentScope = getDefaultCurrentScope; + exports.getDefaultIsolationScope = getDefaultIsolationScope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/asyncContext/stackStrategy.js +var require_stackStrategy = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/asyncContext/stackStrategy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), defaultScopes = require_defaultScopes(), scope = require_scope(), carrier = require_carrier(), AsyncContextStack = class { + constructor(scope$1, isolationScope) { + let assignedScope; + scope$1 ? assignedScope = scope$1 : assignedScope = new scope.Scope(); + let assignedIsolationScope; + isolationScope ? assignedIsolationScope = isolationScope : assignedIsolationScope = new scope.Scope(), this._stack = [{ scope: assignedScope }], this._isolationScope = assignedIsolationScope; + } + /** + * Fork a scope for the stack. + */ + withScope(callback) { + let scope2 = this._pushScope(), maybePromiseResult; + try { + maybePromiseResult = callback(scope2); + } catch (e) { + throw this._popScope(), e; + } + return utils.isThenable(maybePromiseResult) ? maybePromiseResult.then( + (res) => (this._popScope(), res), + (e) => { + throw this._popScope(), e; + } + ) : (this._popScope(), maybePromiseResult); + } + /** + * Get the client of the stack. + */ + getClient() { + return this.getStackTop().client; + } + /** + * Returns the scope of the top stack. + */ + getScope() { + return this.getStackTop().scope; + } + /** + * Get the isolation scope for the stack. + */ + getIsolationScope() { + return this._isolationScope; + } + /** + * Returns the scope stack for domains or the process. + */ + getStack() { + return this._stack; + } + /** + * Returns the topmost scope layer in the order domain > local > process. + */ + getStackTop() { + return this._stack[this._stack.length - 1]; + } + /** + * Push a scope to the stack. + */ + _pushScope() { + let scope2 = this.getScope().clone(); + return this.getStack().push({ + client: this.getClient(), + scope: scope2 + }), scope2; + } + /** + * Pop a scope from the stack. + */ + _popScope() { + return this.getStack().length <= 1 ? !1 : !!this.getStack().pop(); + } + }; + function getAsyncContextStack() { + let registry = carrier.getMainCarrier(), sentry = carrier.getSentryCarrier(registry); + return sentry.stack = sentry.stack || new AsyncContextStack(defaultScopes.getDefaultCurrentScope(), defaultScopes.getDefaultIsolationScope()); + } + function withScope(callback) { + return getAsyncContextStack().withScope(callback); + } + function withSetScope(scope2, callback) { + let stack = getAsyncContextStack(); + return stack.withScope(() => (stack.getStackTop().scope = scope2, callback(scope2))); + } + function withIsolationScope(callback) { + return getAsyncContextStack().withScope(() => callback(getAsyncContextStack().getIsolationScope())); + } + function getStackAsyncContextStrategy() { + return { + withIsolationScope, + withScope, + withSetScope, + withSetIsolationScope: (_isolationScope, callback) => withIsolationScope(callback), + getCurrentScope: () => getAsyncContextStack().getScope(), + getIsolationScope: () => getAsyncContextStack().getIsolationScope() + }; + } + exports.AsyncContextStack = AsyncContextStack; + exports.getStackAsyncContextStrategy = getStackAsyncContextStrategy; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/asyncContext/index.js +var require_asyncContext = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/asyncContext/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var carrier = require_carrier(), stackStrategy = require_stackStrategy(); + function setAsyncContextStrategy(strategy) { + let registry = carrier.getMainCarrier(), sentry = carrier.getSentryCarrier(registry); + sentry.acs = strategy; + } + function getAsyncContextStrategy(carrier$1) { + let sentry = carrier.getSentryCarrier(carrier$1); + return sentry.acs ? sentry.acs : stackStrategy.getStackAsyncContextStrategy(); + } + exports.getAsyncContextStrategy = getAsyncContextStrategy; + exports.setAsyncContextStrategy = setAsyncContextStrategy; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/currentScopes.js +var require_currentScopes = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/currentScopes.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), index = require_asyncContext(), carrier = require_carrier(), scope = require_scope(); + function getCurrentScope() { + let carrier$1 = carrier.getMainCarrier(); + return index.getAsyncContextStrategy(carrier$1).getCurrentScope(); + } + function getIsolationScope() { + let carrier$1 = carrier.getMainCarrier(); + return index.getAsyncContextStrategy(carrier$1).getIsolationScope(); + } + function getGlobalScope() { + return utils.getGlobalSingleton("globalScope", () => new scope.Scope()); + } + function withScope(...rest) { + let carrier$1 = carrier.getMainCarrier(), acs = index.getAsyncContextStrategy(carrier$1); + if (rest.length === 2) { + let [scope2, callback] = rest; + return scope2 ? acs.withSetScope(scope2, callback) : acs.withScope(callback); + } + return acs.withScope(rest[0]); + } + function withIsolationScope(...rest) { + let carrier$1 = carrier.getMainCarrier(), acs = index.getAsyncContextStrategy(carrier$1); + if (rest.length === 2) { + let [isolationScope, callback] = rest; + return isolationScope ? acs.withSetIsolationScope(isolationScope, callback) : acs.withIsolationScope(callback); + } + return acs.withIsolationScope(rest[0]); + } + function getClient() { + return getCurrentScope().getClient(); + } + exports.getClient = getClient; + exports.getCurrentScope = getCurrentScope; + exports.getGlobalScope = getGlobalScope; + exports.getIsolationScope = getIsolationScope; + exports.withIsolationScope = withIsolationScope; + exports.withScope = withScope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/metric-summary.js +var require_metric_summary = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/metric-summary.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), METRICS_SPAN_FIELD = "_sentryMetrics"; + function getMetricSummaryJsonForSpan(span) { + let storage = span[METRICS_SPAN_FIELD]; + if (!storage) + return; + let output = {}; + for (let [, [exportKey, summary]] of storage) + output[exportKey] || (output[exportKey] = []), output[exportKey].push(utils.dropUndefinedKeys(summary)); + return output; + } + function updateMetricSummaryOnSpan(span, metricType, sanitizedName, value, unit, tags, bucketKey) { + let storage = span[METRICS_SPAN_FIELD] || (span[METRICS_SPAN_FIELD] = /* @__PURE__ */ new Map()), exportKey = `${metricType}:${sanitizedName}@${unit}`, bucketItem = storage.get(bucketKey); + if (bucketItem) { + let [, summary] = bucketItem; + storage.set(bucketKey, [ + exportKey, + { + min: Math.min(summary.min, value), + max: Math.max(summary.max, value), + count: summary.count += 1, + sum: summary.sum += value, + tags: summary.tags + } + ]); + } else + storage.set(bucketKey, [ + exportKey, + { + min: value, + max: value, + count: 1, + sum: value, + tags + } + ]); + } + exports.getMetricSummaryJsonForSpan = getMetricSummaryJsonForSpan; + exports.updateMetricSummaryOnSpan = updateMetricSummaryOnSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/semanticAttributes.js +var require_semanticAttributes = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/semanticAttributes.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = "sentry.source", SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = "sentry.sample_rate", SEMANTIC_ATTRIBUTE_SENTRY_OP = "sentry.op", SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = "sentry.origin", SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = "sentry.idle_span_finish_reason", SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = "sentry.measurement_unit", SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = "sentry.measurement_value", SEMANTIC_ATTRIBUTE_PROFILE_ID = "sentry.profile_id", SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = "sentry.exclusive_time", SEMANTIC_ATTRIBUTE_CACHE_HIT = "cache.hit", SEMANTIC_ATTRIBUTE_CACHE_KEY = "cache.key", SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = "cache.item_size"; + exports.SEMANTIC_ATTRIBUTE_CACHE_HIT = SEMANTIC_ATTRIBUTE_CACHE_HIT; + exports.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE; + exports.SEMANTIC_ATTRIBUTE_CACHE_KEY = SEMANTIC_ATTRIBUTE_CACHE_KEY; + exports.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME; + exports.SEMANTIC_ATTRIBUTE_PROFILE_ID = SEMANTIC_ATTRIBUTE_PROFILE_ID; + exports.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON; + exports.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT; + exports.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE; + exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = SEMANTIC_ATTRIBUTE_SENTRY_OP; + exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN; + exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE; + exports.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = SEMANTIC_ATTRIBUTE_SENTRY_SOURCE; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/spanstatus.js +var require_spanstatus = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/spanstatus.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var SPAN_STATUS_UNSET = 0, SPAN_STATUS_OK = 1, SPAN_STATUS_ERROR = 2; + function getSpanStatusFromHttpCode(httpStatus) { + if (httpStatus < 400 && httpStatus >= 100) + return { code: SPAN_STATUS_OK }; + if (httpStatus >= 400 && httpStatus < 500) + switch (httpStatus) { + case 401: + return { code: SPAN_STATUS_ERROR, message: "unauthenticated" }; + case 403: + return { code: SPAN_STATUS_ERROR, message: "permission_denied" }; + case 404: + return { code: SPAN_STATUS_ERROR, message: "not_found" }; + case 409: + return { code: SPAN_STATUS_ERROR, message: "already_exists" }; + case 413: + return { code: SPAN_STATUS_ERROR, message: "failed_precondition" }; + case 429: + return { code: SPAN_STATUS_ERROR, message: "resource_exhausted" }; + case 499: + return { code: SPAN_STATUS_ERROR, message: "cancelled" }; + default: + return { code: SPAN_STATUS_ERROR, message: "invalid_argument" }; + } + if (httpStatus >= 500 && httpStatus < 600) + switch (httpStatus) { + case 501: + return { code: SPAN_STATUS_ERROR, message: "unimplemented" }; + case 503: + return { code: SPAN_STATUS_ERROR, message: "unavailable" }; + case 504: + return { code: SPAN_STATUS_ERROR, message: "deadline_exceeded" }; + default: + return { code: SPAN_STATUS_ERROR, message: "internal_error" }; + } + return { code: SPAN_STATUS_ERROR, message: "unknown_error" }; + } + function setHttpStatus(span, httpStatus) { + span.setAttribute("http.response.status_code", httpStatus); + let spanStatus = getSpanStatusFromHttpCode(httpStatus); + spanStatus.message !== "unknown_error" && span.setStatus(spanStatus); + } + exports.SPAN_STATUS_ERROR = SPAN_STATUS_ERROR; + exports.SPAN_STATUS_OK = SPAN_STATUS_OK; + exports.SPAN_STATUS_UNSET = SPAN_STATUS_UNSET; + exports.getSpanStatusFromHttpCode = getSpanStatusFromHttpCode; + exports.setHttpStatus = setHttpStatus; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/spanUtils.js +var require_spanUtils = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/spanUtils.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), index = require_asyncContext(), carrier = require_carrier(), currentScopes = require_currentScopes(), metricSummary = require_metric_summary(), semanticAttributes = require_semanticAttributes(), spanstatus = require_spanstatus(), spanOnScope = require_spanOnScope(), TRACE_FLAG_NONE = 0, TRACE_FLAG_SAMPLED = 1; + function spanToTransactionTraceContext(span) { + let { spanId: span_id, traceId: trace_id } = span.spanContext(), { data, op, parent_span_id, status, origin } = spanToJSON(span); + return utils.dropUndefinedKeys({ + parent_span_id, + span_id, + trace_id, + data, + op, + status, + origin + }); + } + function spanToTraceContext(span) { + let { spanId: span_id, traceId: trace_id } = span.spanContext(), { parent_span_id } = spanToJSON(span); + return utils.dropUndefinedKeys({ parent_span_id, span_id, trace_id }); + } + function spanToTraceHeader(span) { + let { traceId, spanId } = span.spanContext(), sampled = spanIsSampled(span); + return utils.generateSentryTraceHeader(traceId, spanId, sampled); + } + function spanTimeInputToSeconds(input) { + return typeof input == "number" ? ensureTimestampInSeconds(input) : Array.isArray(input) ? input[0] + input[1] / 1e9 : input instanceof Date ? ensureTimestampInSeconds(input.getTime()) : utils.timestampInSeconds(); + } + function ensureTimestampInSeconds(timestamp) { + return timestamp > 9999999999 ? timestamp / 1e3 : timestamp; + } + function spanToJSON(span) { + if (spanIsSentrySpan(span)) + return span.getSpanJSON(); + try { + let { spanId: span_id, traceId: trace_id } = span.spanContext(); + if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) { + let { attributes, startTime, name, endTime, parentSpanId, status } = span; + return utils.dropUndefinedKeys({ + span_id, + trace_id, + data: attributes, + description: name, + parent_span_id: parentSpanId, + start_timestamp: spanTimeInputToSeconds(startTime), + // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time + timestamp: spanTimeInputToSeconds(endTime) || void 0, + status: getStatusMessage(status), + op: attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP], + origin: attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN], + _metrics_summary: metricSummary.getMetricSummaryJsonForSpan(span) + }); + } + return { + span_id, + trace_id + }; + } catch { + return {}; + } + } + function spanIsOpenTelemetrySdkTraceBaseSpan(span) { + let castSpan = span; + return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status; + } + function spanIsSentrySpan(span) { + return typeof span.getSpanJSON == "function"; + } + function spanIsSampled(span) { + let { traceFlags } = span.spanContext(); + return traceFlags === TRACE_FLAG_SAMPLED; + } + function getStatusMessage(status) { + if (!(!status || status.code === spanstatus.SPAN_STATUS_UNSET)) + return status.code === spanstatus.SPAN_STATUS_OK ? "ok" : status.message || "unknown_error"; + } + var CHILD_SPANS_FIELD = "_sentryChildSpans", ROOT_SPAN_FIELD = "_sentryRootSpan"; + function addChildSpanToSpan(span, childSpan) { + let rootSpan = span[ROOT_SPAN_FIELD] || span; + utils.addNonEnumerableProperty(childSpan, ROOT_SPAN_FIELD, rootSpan), span[CHILD_SPANS_FIELD] ? span[CHILD_SPANS_FIELD].add(childSpan) : utils.addNonEnumerableProperty(span, CHILD_SPANS_FIELD, /* @__PURE__ */ new Set([childSpan])); + } + function removeChildSpanFromSpan(span, childSpan) { + span[CHILD_SPANS_FIELD] && span[CHILD_SPANS_FIELD].delete(childSpan); + } + function getSpanDescendants(span) { + let resultSet = /* @__PURE__ */ new Set(); + function addSpanChildren(span2) { + if (!resultSet.has(span2) && spanIsSampled(span2)) { + resultSet.add(span2); + let childSpans = span2[CHILD_SPANS_FIELD] ? Array.from(span2[CHILD_SPANS_FIELD]) : []; + for (let childSpan of childSpans) + addSpanChildren(childSpan); + } + } + return addSpanChildren(span), Array.from(resultSet); + } + function getRootSpan(span) { + return span[ROOT_SPAN_FIELD] || span; + } + function getActiveSpan() { + let carrier$1 = carrier.getMainCarrier(), acs = index.getAsyncContextStrategy(carrier$1); + return acs.getActiveSpan ? acs.getActiveSpan() : spanOnScope._getSpanForScope(currentScopes.getCurrentScope()); + } + function updateMetricSummaryOnActiveSpan(metricType, sanitizedName, value, unit, tags, bucketKey) { + let span = getActiveSpan(); + span && metricSummary.updateMetricSummaryOnSpan(span, metricType, sanitizedName, value, unit, tags, bucketKey); + } + exports.TRACE_FLAG_NONE = TRACE_FLAG_NONE; + exports.TRACE_FLAG_SAMPLED = TRACE_FLAG_SAMPLED; + exports.addChildSpanToSpan = addChildSpanToSpan; + exports.getActiveSpan = getActiveSpan; + exports.getRootSpan = getRootSpan; + exports.getSpanDescendants = getSpanDescendants; + exports.getStatusMessage = getStatusMessage; + exports.removeChildSpanFromSpan = removeChildSpanFromSpan; + exports.spanIsSampled = spanIsSampled; + exports.spanTimeInputToSeconds = spanTimeInputToSeconds; + exports.spanToJSON = spanToJSON; + exports.spanToTraceContext = spanToTraceContext; + exports.spanToTraceHeader = spanToTraceHeader; + exports.spanToTransactionTraceContext = spanToTransactionTraceContext; + exports.updateMetricSummaryOnActiveSpan = updateMetricSummaryOnActiveSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/errors.js +var require_errors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/errors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), spanUtils = require_spanUtils(), spanstatus = require_spanstatus(), errorsInstrumented = !1; + function registerSpanErrorInstrumentation() { + errorsInstrumented || (errorsInstrumented = !0, utils.addGlobalErrorInstrumentationHandler(errorCallback), utils.addGlobalUnhandledRejectionInstrumentationHandler(errorCallback)); + } + function errorCallback() { + let activeSpan = spanUtils.getActiveSpan(), rootSpan = activeSpan && spanUtils.getRootSpan(activeSpan); + if (rootSpan) { + let message = "internal_error"; + debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Root span: ${message} -> Global error occured`), rootSpan.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message }); + } + } + errorCallback.tag = "sentry_tracingErrorCallback"; + exports.registerSpanErrorInstrumentation = registerSpanErrorInstrumentation; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/utils.js +var require_utils = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/utils.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), SCOPE_ON_START_SPAN_FIELD = "_sentryScope", ISOLATION_SCOPE_ON_START_SPAN_FIELD = "_sentryIsolationScope"; + function setCapturedScopesOnSpan(span, scope, isolationScope) { + span && (utils.addNonEnumerableProperty(span, ISOLATION_SCOPE_ON_START_SPAN_FIELD, isolationScope), utils.addNonEnumerableProperty(span, SCOPE_ON_START_SPAN_FIELD, scope)); + } + function getCapturedScopesOnSpan(span) { + return { + scope: span[SCOPE_ON_START_SPAN_FIELD], + isolationScope: span[ISOLATION_SCOPE_ON_START_SPAN_FIELD] + }; + } + exports.stripUrlQueryAndFragment = utils.stripUrlQueryAndFragment; + exports.getCapturedScopesOnSpan = getCapturedScopesOnSpan; + exports.setCapturedScopesOnSpan = setCapturedScopesOnSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/hubextensions.js +var require_hubextensions = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/hubextensions.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var errors = require_errors(); + function addTracingExtensions() { + errors.registerSpanErrorInstrumentation(); + } + exports.addTracingExtensions = addTracingExtensions; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/hasTracingEnabled.js +var require_hasTracingEnabled = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/hasTracingEnabled.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var currentScopes = require_currentScopes(); + function hasTracingEnabled(maybeOptions) { + if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__) + return !1; + let options = maybeOptions || getClientOptions(); + return !!options && (options.enableTracing || "tracesSampleRate" in options || "tracesSampler" in options); + } + function getClientOptions() { + let client = currentScopes.getClient(); + return client && client.getOptions(); + } + exports.hasTracingEnabled = hasTracingEnabled; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sentryNonRecordingSpan.js +var require_sentryNonRecordingSpan = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sentryNonRecordingSpan.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), spanUtils = require_spanUtils(), SentryNonRecordingSpan = class { + constructor(spanContext = {}) { + this._traceId = spanContext.traceId || utils.uuid4(), this._spanId = spanContext.spanId || utils.uuid4().substring(16); + } + /** @inheritdoc */ + spanContext() { + return { + spanId: this._spanId, + traceId: this._traceId, + traceFlags: spanUtils.TRACE_FLAG_NONE + }; + } + /** @inheritdoc */ + // eslint-disable-next-line @typescript-eslint/no-empty-function + end(_timestamp) { + } + /** @inheritdoc */ + setAttribute(_key, _value) { + return this; + } + /** @inheritdoc */ + setAttributes(_values) { + return this; + } + /** @inheritdoc */ + setStatus(_status) { + return this; + } + /** @inheritdoc */ + updateName(_name) { + return this; + } + /** @inheritdoc */ + isRecording() { + return !1; + } + /** @inheritdoc */ + addEvent(_name, _attributesOrStartTime, _startTime) { + return this; + } + }; + exports.SentryNonRecordingSpan = SentryNonRecordingSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/handleCallbackErrors.js +var require_handleCallbackErrors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/handleCallbackErrors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function handleCallbackErrors(fn, onError, onFinally = () => { + }) { + let maybePromiseResult; + try { + maybePromiseResult = fn(); + } catch (e) { + throw onError(e), onFinally(), e; + } + return maybeHandlePromiseRejection(maybePromiseResult, onError, onFinally); + } + function maybeHandlePromiseRejection(value, onError, onFinally) { + return utils.isThenable(value) ? value.then( + (res) => (onFinally(), res), + (e) => { + throw onError(e), onFinally(), e; + } + ) : (onFinally(), value); + } + exports.handleCallbackErrors = handleCallbackErrors; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/constants.js +var require_constants = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/constants.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var DEFAULT_ENVIRONMENT = "production"; + exports.DEFAULT_ENVIRONMENT = DEFAULT_ENVIRONMENT; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/dynamicSamplingContext.js +var require_dynamicSamplingContext = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/dynamicSamplingContext.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), constants = require_constants(), currentScopes = require_currentScopes(), semanticAttributes = require_semanticAttributes(), spanUtils = require_spanUtils(), FROZEN_DSC_FIELD = "_frozenDsc"; + function freezeDscOnSpan(span, dsc) { + let spanWithMaybeDsc = span; + utils.addNonEnumerableProperty(spanWithMaybeDsc, FROZEN_DSC_FIELD, dsc); + } + function getDynamicSamplingContextFromClient(trace_id, client) { + let options = client.getOptions(), { publicKey: public_key } = client.getDsn() || {}, dsc = utils.dropUndefinedKeys({ + environment: options.environment || constants.DEFAULT_ENVIRONMENT, + release: options.release, + public_key, + trace_id + }); + return client.emit("createDsc", dsc), dsc; + } + function getDynamicSamplingContextFromSpan(span) { + let client = currentScopes.getClient(); + if (!client) + return {}; + let dsc = getDynamicSamplingContextFromClient(spanUtils.spanToJSON(span).trace_id || "", client), rootSpan = spanUtils.getRootSpan(span); + if (!rootSpan) + return dsc; + let frozenDsc = rootSpan[FROZEN_DSC_FIELD]; + if (frozenDsc) + return frozenDsc; + let jsonSpan = spanUtils.spanToJSON(rootSpan), attributes = jsonSpan.data || {}, maybeSampleRate = attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]; + maybeSampleRate != null && (dsc.sample_rate = `${maybeSampleRate}`); + let source = attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]; + return source && source !== "url" && (dsc.transaction = jsonSpan.description), dsc.sampled = String(spanUtils.spanIsSampled(rootSpan)), client.emit("createDsc", dsc), dsc; + } + function spanToBaggageHeader(span) { + let dsc = getDynamicSamplingContextFromSpan(span); + return utils.dynamicSamplingContextToSentryBaggageHeader(dsc); + } + exports.freezeDscOnSpan = freezeDscOnSpan; + exports.getDynamicSamplingContextFromClient = getDynamicSamplingContextFromClient; + exports.getDynamicSamplingContextFromSpan = getDynamicSamplingContextFromSpan; + exports.spanToBaggageHeader = spanToBaggageHeader; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/logSpans.js +var require_logSpans = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/logSpans.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), spanUtils = require_spanUtils(); + function logSpanStart(span) { + if (!debugBuild.DEBUG_BUILD) return; + let { description = "< unknown name >", op = "< unknown op >", parent_span_id: parentSpanId } = spanUtils.spanToJSON(span), { spanId } = span.spanContext(), sampled = spanUtils.spanIsSampled(span), rootSpan = spanUtils.getRootSpan(span), isRootSpan = rootSpan === span, header = `[Tracing] Starting ${sampled ? "sampled" : "unsampled"} ${isRootSpan ? "root " : ""}span`, infoParts = [`op: ${op}`, `name: ${description}`, `ID: ${spanId}`]; + if (parentSpanId && infoParts.push(`parent ID: ${parentSpanId}`), !isRootSpan) { + let { op: op2, description: description2 } = spanUtils.spanToJSON(rootSpan); + infoParts.push(`root ID: ${rootSpan.spanContext().spanId}`), op2 && infoParts.push(`root op: ${op2}`), description2 && infoParts.push(`root description: ${description2}`); + } + utils.logger.log(`${header} + ${infoParts.join(` + `)}`); + } + function logSpanEnd(span) { + if (!debugBuild.DEBUG_BUILD) return; + let { description = "< unknown name >", op = "< unknown op >" } = spanUtils.spanToJSON(span), { spanId } = span.spanContext(), isRootSpan = spanUtils.getRootSpan(span) === span, msg = `[Tracing] Finishing "${op}" ${isRootSpan ? "root " : ""}span "${description}" with ID ${spanId}`; + utils.logger.log(msg); + } + exports.logSpanEnd = logSpanEnd; + exports.logSpanStart = logSpanStart; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/parseSampleRate.js +var require_parseSampleRate = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/parseSampleRate.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(); + function parseSampleRate(sampleRate) { + if (typeof sampleRate == "boolean") + return Number(sampleRate); + let rate = typeof sampleRate == "string" ? parseFloat(sampleRate) : sampleRate; + if (typeof rate != "number" || isNaN(rate) || rate < 0 || rate > 1) { + debugBuild.DEBUG_BUILD && utils.logger.warn( + `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify( + sampleRate + )} of type ${JSON.stringify(typeof sampleRate)}.` + ); + return; + } + return rate; + } + exports.parseSampleRate = parseSampleRate; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sampling.js +var require_sampling = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sampling.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), hasTracingEnabled = require_hasTracingEnabled(), parseSampleRate = require_parseSampleRate(); + function sampleSpan(options, samplingContext) { + if (!hasTracingEnabled.hasTracingEnabled(options)) + return [!1]; + let sampleRate; + typeof options.tracesSampler == "function" ? sampleRate = options.tracesSampler(samplingContext) : samplingContext.parentSampled !== void 0 ? sampleRate = samplingContext.parentSampled : typeof options.tracesSampleRate < "u" ? sampleRate = options.tracesSampleRate : sampleRate = 1; + let parsedSampleRate = parseSampleRate.parseSampleRate(sampleRate); + return parsedSampleRate === void 0 ? (debugBuild.DEBUG_BUILD && utils.logger.warn("[Tracing] Discarding transaction because of invalid sample rate."), [!1]) : parsedSampleRate ? Math.random() < parsedSampleRate ? [!0, parsedSampleRate] : (debugBuild.DEBUG_BUILD && utils.logger.log( + `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number( + sampleRate + )})` + ), [!1, parsedSampleRate]) : (debugBuild.DEBUG_BUILD && utils.logger.log( + `[Tracing] Discarding transaction because ${typeof options.tracesSampler == "function" ? "tracesSampler returned 0 or false" : "a negative sampling decision was inherited or tracesSampleRate is set to 0"}` + ), [!1, parsedSampleRate]); + } + exports.sampleSpan = sampleSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/envelope.js +var require_envelope2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/envelope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), dynamicSamplingContext = require_dynamicSamplingContext(), spanUtils = require_spanUtils(); + function enhanceEventWithSdkInfo(event, sdkInfo) { + return sdkInfo && (event.sdk = event.sdk || {}, event.sdk.name = event.sdk.name || sdkInfo.name, event.sdk.version = event.sdk.version || sdkInfo.version, event.sdk.integrations = [...event.sdk.integrations || [], ...sdkInfo.integrations || []], event.sdk.packages = [...event.sdk.packages || [], ...sdkInfo.packages || []]), event; + } + function createSessionEnvelope(session, dsn, metadata, tunnel) { + let sdkInfo = utils.getSdkMetadataForEnvelopeHeader(metadata), envelopeHeaders = { + sent_at: (/* @__PURE__ */ new Date()).toISOString(), + ...sdkInfo && { sdk: sdkInfo }, + ...!!tunnel && dsn && { dsn: utils.dsnToString(dsn) } + }, envelopeItem = "aggregates" in session ? [{ type: "sessions" }, session] : [{ type: "session" }, session.toJSON()]; + return utils.createEnvelope(envelopeHeaders, [envelopeItem]); + } + function createEventEnvelope(event, dsn, metadata, tunnel) { + let sdkInfo = utils.getSdkMetadataForEnvelopeHeader(metadata), eventType = event.type && event.type !== "replay_event" ? event.type : "event"; + enhanceEventWithSdkInfo(event, metadata && metadata.sdk); + let envelopeHeaders = utils.createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn); + delete event.sdkProcessingMetadata; + let eventItem = [{ type: eventType }, event]; + return utils.createEnvelope(envelopeHeaders, [eventItem]); + } + function createSpanEnvelope(spans, client) { + function dscHasRequiredProps(dsc2) { + return !!dsc2.trace_id && !!dsc2.public_key; + } + let dsc = dynamicSamplingContext.getDynamicSamplingContextFromSpan(spans[0]), dsn = client && client.getDsn(), tunnel = client && client.getOptions().tunnel, headers = { + sent_at: (/* @__PURE__ */ new Date()).toISOString(), + ...dscHasRequiredProps(dsc) && { trace: dsc }, + ...!!tunnel && dsn && { dsn: utils.dsnToString(dsn) } + }, beforeSendSpan = client && client.getOptions().beforeSendSpan, convertToSpanJSON = beforeSendSpan ? (span) => beforeSendSpan(spanUtils.spanToJSON(span)) : (span) => spanUtils.spanToJSON(span), items = []; + for (let span of spans) { + let spanJson = convertToSpanJSON(span); + spanJson && items.push(utils.createSpanEnvelopeItem(spanJson)); + } + return utils.createEnvelope(headers, items); + } + exports.createEventEnvelope = createEventEnvelope; + exports.createSessionEnvelope = createSessionEnvelope; + exports.createSpanEnvelope = createSpanEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/measurement.js +var require_measurement = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/measurement.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var semanticAttributes = require_semanticAttributes(), spanUtils = require_spanUtils(); + function setMeasurement(name, value, unit) { + let activeSpan = spanUtils.getActiveSpan(), rootSpan = activeSpan && spanUtils.getRootSpan(activeSpan); + rootSpan && rootSpan.addEvent(name, { + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: value, + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: unit + }); + } + function timedEventsToMeasurements(events) { + if (!events || events.length === 0) + return; + let measurements = {}; + return events.forEach((event) => { + let attributes = event.attributes || {}, unit = attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT], value = attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]; + typeof unit == "string" && typeof value == "number" && (measurements[event.name] = { value, unit }); + }), measurements; + } + exports.setMeasurement = setMeasurement; + exports.timedEventsToMeasurements = timedEventsToMeasurements; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sentrySpan.js +var require_sentrySpan = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sentrySpan.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), envelope = require_envelope2(), metricSummary = require_metric_summary(), semanticAttributes = require_semanticAttributes(), spanUtils = require_spanUtils(), dynamicSamplingContext = require_dynamicSamplingContext(), logSpans = require_logSpans(), measurement = require_measurement(), utils$1 = require_utils(), MAX_SPAN_COUNT = 1e3, SentrySpan = class { + /** Epoch timestamp in seconds when the span started. */ + /** Epoch timestamp in seconds when the span ended. */ + /** Internal keeper of the status */ + /** The timed events added to this span. */ + /** if true, treat span as a standalone span (not part of a transaction) */ + /** + * You should never call the constructor manually, always use `Sentry.startSpan()` + * or other span methods. + * @internal + * @hideconstructor + * @hidden + */ + constructor(spanContext = {}) { + this._traceId = spanContext.traceId || utils.uuid4(), this._spanId = spanContext.spanId || utils.uuid4().substring(16), this._startTime = spanContext.startTimestamp || utils.timestampInSeconds(), this._attributes = {}, this.setAttributes({ + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "manual", + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op, + ...spanContext.attributes + }), this._name = spanContext.name, spanContext.parentSpanId && (this._parentSpanId = spanContext.parentSpanId), "sampled" in spanContext && (this._sampled = spanContext.sampled), spanContext.endTimestamp && (this._endTime = spanContext.endTimestamp), this._events = [], this._isStandaloneSpan = spanContext.isStandalone, this._endTime && this._onSpanEnded(); + } + /** @inheritdoc */ + spanContext() { + let { _spanId: spanId, _traceId: traceId, _sampled: sampled } = this; + return { + spanId, + traceId, + traceFlags: sampled ? spanUtils.TRACE_FLAG_SAMPLED : spanUtils.TRACE_FLAG_NONE + }; + } + /** @inheritdoc */ + setAttribute(key, value) { + value === void 0 ? delete this._attributes[key] : this._attributes[key] = value; + } + /** @inheritdoc */ + setAttributes(attributes) { + Object.keys(attributes).forEach((key) => this.setAttribute(key, attributes[key])); + } + /** + * This should generally not be used, + * but we need it for browser tracing where we want to adjust the start time afterwards. + * USE THIS WITH CAUTION! + * + * @hidden + * @internal + */ + updateStartTime(timeInput) { + this._startTime = spanUtils.spanTimeInputToSeconds(timeInput); + } + /** + * @inheritDoc + */ + setStatus(value) { + return this._status = value, this; + } + /** + * @inheritDoc + */ + updateName(name) { + return this._name = name, this; + } + /** @inheritdoc */ + end(endTimestamp) { + this._endTime || (this._endTime = spanUtils.spanTimeInputToSeconds(endTimestamp), logSpans.logSpanEnd(this), this._onSpanEnded()); + } + /** + * Get JSON representation of this span. + * + * @hidden + * @internal This method is purely for internal purposes and should not be used outside + * of SDK code. If you need to get a JSON representation of a span, + * use `spanToJSON(span)` instead. + */ + getSpanJSON() { + return utils.dropUndefinedKeys({ + data: this._attributes, + description: this._name, + op: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP], + parent_span_id: this._parentSpanId, + span_id: this._spanId, + start_timestamp: this._startTime, + status: spanUtils.getStatusMessage(this._status), + timestamp: this._endTime, + trace_id: this._traceId, + origin: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN], + _metrics_summary: metricSummary.getMetricSummaryJsonForSpan(this), + profile_id: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_PROFILE_ID], + exclusive_time: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME], + measurements: measurement.timedEventsToMeasurements(this._events), + is_segment: this._isStandaloneSpan && spanUtils.getRootSpan(this) === this || void 0, + segment_id: this._isStandaloneSpan ? spanUtils.getRootSpan(this).spanContext().spanId : void 0 + }); + } + /** @inheritdoc */ + isRecording() { + return !this._endTime && !!this._sampled; + } + /** + * @inheritdoc + */ + addEvent(name, attributesOrStartTime, startTime) { + debugBuild.DEBUG_BUILD && utils.logger.log("[Tracing] Adding an event to span:", name); + let time = isSpanTimeInput(attributesOrStartTime) ? attributesOrStartTime : startTime || utils.timestampInSeconds(), attributes = isSpanTimeInput(attributesOrStartTime) ? {} : attributesOrStartTime || {}, event = { + name, + time: spanUtils.spanTimeInputToSeconds(time), + attributes + }; + return this._events.push(event), this; + } + /** + * This method should generally not be used, + * but for now we need a way to publicly check if the `_isStandaloneSpan` flag is set. + * USE THIS WITH CAUTION! + * @internal + * @hidden + * @experimental + */ + isStandaloneSpan() { + return !!this._isStandaloneSpan; + } + /** Emit `spanEnd` when the span is ended. */ + _onSpanEnded() { + let client = currentScopes.getClient(); + if (client && client.emit("spanEnd", this), !(this._isStandaloneSpan || this === spanUtils.getRootSpan(this))) + return; + if (this._isStandaloneSpan) { + sendSpanEnvelope(envelope.createSpanEnvelope([this], client)); + return; + } + let transactionEvent = this._convertSpanToTransaction(); + transactionEvent && (utils$1.getCapturedScopesOnSpan(this).scope || currentScopes.getCurrentScope()).captureEvent(transactionEvent); + } + /** + * Finish the transaction & prepare the event to send to Sentry. + */ + _convertSpanToTransaction() { + if (!isFullFinishedSpan(spanUtils.spanToJSON(this))) + return; + this._name || (debugBuild.DEBUG_BUILD && utils.logger.warn("Transaction has no name, falling back to ``."), this._name = ""); + let { scope: capturedSpanScope, isolationScope: capturedSpanIsolationScope } = utils$1.getCapturedScopesOnSpan(this), client = (capturedSpanScope || currentScopes.getCurrentScope()).getClient() || currentScopes.getClient(); + if (this._sampled !== !0) { + debugBuild.DEBUG_BUILD && utils.logger.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."), client && client.recordDroppedEvent("sample_rate", "transaction"); + return; + } + let spans = spanUtils.getSpanDescendants(this).filter((span) => span !== this && !isStandaloneSpan(span)).map((span) => spanUtils.spanToJSON(span)).filter(isFullFinishedSpan), source = this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE], transaction = { + contexts: { + trace: spanUtils.spanToTransactionTraceContext(this) + }, + spans: ( + // spans.sort() mutates the array, but `spans` is already a copy so we can safely do this here + // we do not use spans anymore after this point + spans.length > MAX_SPAN_COUNT ? spans.sort((a, b) => a.start_timestamp - b.start_timestamp).slice(0, MAX_SPAN_COUNT) : spans + ), + start_timestamp: this._startTime, + timestamp: this._endTime, + transaction: this._name, + type: "transaction", + sdkProcessingMetadata: { + capturedSpanScope, + capturedSpanIsolationScope, + ...utils.dropUndefinedKeys({ + dynamicSamplingContext: dynamicSamplingContext.getDynamicSamplingContextFromSpan(this) + }) + }, + _metrics_summary: metricSummary.getMetricSummaryJsonForSpan(this), + ...source && { + transaction_info: { + source + } + } + }, measurements = measurement.timedEventsToMeasurements(this._events); + return measurements && Object.keys(measurements).length && (debugBuild.DEBUG_BUILD && utils.logger.log( + "[Measurements] Adding measurements to transaction event", + JSON.stringify(measurements, void 0, 2) + ), transaction.measurements = measurements), transaction; + } + }; + function isSpanTimeInput(value) { + return value && typeof value == "number" || value instanceof Date || Array.isArray(value); + } + function isFullFinishedSpan(input) { + return !!input.start_timestamp && !!input.timestamp && !!input.span_id && !!input.trace_id; + } + function isStandaloneSpan(span) { + return span instanceof SentrySpan && span.isStandaloneSpan(); + } + function sendSpanEnvelope(envelope2) { + let client = currentScopes.getClient(); + if (!client) + return; + let spanItems = envelope2[1]; + if (!spanItems || spanItems.length === 0) { + client.recordDroppedEvent("before_send", "span"); + return; + } + let transport = client.getTransport(); + transport && transport.send(envelope2).then(null, (reason) => { + debugBuild.DEBUG_BUILD && utils.logger.error("Error while sending span:", reason); + }); + } + exports.SentrySpan = SentrySpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/trace.js +var require_trace = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/trace.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), carrier = require_carrier(), currentScopes = require_currentScopes(), index = require_asyncContext(), debugBuild = require_debug_build2(), semanticAttributes = require_semanticAttributes(), handleCallbackErrors = require_handleCallbackErrors(), hasTracingEnabled = require_hasTracingEnabled(), spanOnScope = require_spanOnScope(), spanUtils = require_spanUtils(), dynamicSamplingContext = require_dynamicSamplingContext(), logSpans = require_logSpans(), sampling = require_sampling(), sentryNonRecordingSpan = require_sentryNonRecordingSpan(), sentrySpan = require_sentrySpan(), spanstatus = require_spanstatus(), utils$1 = require_utils(), SUPPRESS_TRACING_KEY = "__SENTRY_SUPPRESS_TRACING__"; + function startSpan(context, callback) { + let acs = getAcs(); + if (acs.startSpan) + return acs.startSpan(context, callback); + let spanContext = normalizeContext(context); + return currentScopes.withScope(context.scope, (scope) => { + let parentSpan = getParentSpan(scope), activeSpan = context.onlyIfParent && !parentSpan ? new sentryNonRecordingSpan.SentryNonRecordingSpan() : createChildOrRootSpan({ + parentSpan, + spanContext, + forceTransaction: context.forceTransaction, + scope + }); + return spanOnScope._setSpanForScope(scope, activeSpan), handleCallbackErrors.handleCallbackErrors( + () => callback(activeSpan), + () => { + let { status } = spanUtils.spanToJSON(activeSpan); + activeSpan.isRecording() && (!status || status === "ok") && activeSpan.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "internal_error" }); + }, + () => activeSpan.end() + ); + }); + } + function startSpanManual(context, callback) { + let acs = getAcs(); + if (acs.startSpanManual) + return acs.startSpanManual(context, callback); + let spanContext = normalizeContext(context); + return currentScopes.withScope(context.scope, (scope) => { + let parentSpan = getParentSpan(scope), activeSpan = context.onlyIfParent && !parentSpan ? new sentryNonRecordingSpan.SentryNonRecordingSpan() : createChildOrRootSpan({ + parentSpan, + spanContext, + forceTransaction: context.forceTransaction, + scope + }); + spanOnScope._setSpanForScope(scope, activeSpan); + function finishAndSetSpan() { + activeSpan.end(); + } + return handleCallbackErrors.handleCallbackErrors( + () => callback(activeSpan, finishAndSetSpan), + () => { + let { status } = spanUtils.spanToJSON(activeSpan); + activeSpan.isRecording() && (!status || status === "ok") && activeSpan.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "internal_error" }); + } + ); + }); + } + function startInactiveSpan(context) { + let acs = getAcs(); + if (acs.startInactiveSpan) + return acs.startInactiveSpan(context); + let spanContext = normalizeContext(context), scope = context.scope || currentScopes.getCurrentScope(), parentSpan = getParentSpan(scope); + return context.onlyIfParent && !parentSpan ? new sentryNonRecordingSpan.SentryNonRecordingSpan() : createChildOrRootSpan({ + parentSpan, + spanContext, + forceTransaction: context.forceTransaction, + scope + }); + } + var continueTrace = ({ + sentryTrace, + baggage + }, callback) => currentScopes.withScope((scope) => { + let propagationContext = utils.propagationContextFromHeaders(sentryTrace, baggage); + return scope.setPropagationContext(propagationContext), callback(); + }); + function withActiveSpan(span, callback) { + let acs = getAcs(); + return acs.withActiveSpan ? acs.withActiveSpan(span, callback) : currentScopes.withScope((scope) => (spanOnScope._setSpanForScope(scope, span || void 0), callback(scope))); + } + function suppressTracing(callback) { + let acs = getAcs(); + return acs.suppressTracing ? acs.suppressTracing(callback) : currentScopes.withScope((scope) => (scope.setSDKProcessingMetadata({ [SUPPRESS_TRACING_KEY]: !0 }), callback())); + } + function startNewTrace(callback) { + return currentScopes.withScope((scope) => (scope.setPropagationContext(utils.generatePropagationContext()), debugBuild.DEBUG_BUILD && utils.logger.info(`Starting a new trace with id ${scope.getPropagationContext().traceId}`), withActiveSpan(null, callback))); + } + function createChildOrRootSpan({ + parentSpan, + spanContext, + forceTransaction, + scope + }) { + if (!hasTracingEnabled.hasTracingEnabled()) + return new sentryNonRecordingSpan.SentryNonRecordingSpan(); + let isolationScope = currentScopes.getIsolationScope(), span; + if (parentSpan && !forceTransaction) + span = _startChildSpan(parentSpan, scope, spanContext), spanUtils.addChildSpanToSpan(parentSpan, span); + else if (parentSpan) { + let dsc = dynamicSamplingContext.getDynamicSamplingContextFromSpan(parentSpan), { traceId, spanId: parentSpanId } = parentSpan.spanContext(), parentSampled = spanUtils.spanIsSampled(parentSpan); + span = _startRootSpan( + { + traceId, + parentSpanId, + ...spanContext + }, + scope, + parentSampled + ), dynamicSamplingContext.freezeDscOnSpan(span, dsc); + } else { + let { + traceId, + dsc, + parentSpanId, + sampled: parentSampled + } = { + ...isolationScope.getPropagationContext(), + ...scope.getPropagationContext() + }; + span = _startRootSpan( + { + traceId, + parentSpanId, + ...spanContext + }, + scope, + parentSampled + ), dsc && dynamicSamplingContext.freezeDscOnSpan(span, dsc); + } + return logSpans.logSpanStart(span), utils$1.setCapturedScopesOnSpan(span, scope, isolationScope), span; + } + function normalizeContext(context) { + let initialCtx = { + isStandalone: (context.experimental || {}).standalone, + ...context + }; + if (context.startTime) { + let ctx = { ...initialCtx }; + return ctx.startTimestamp = spanUtils.spanTimeInputToSeconds(context.startTime), delete ctx.startTime, ctx; + } + return initialCtx; + } + function getAcs() { + let carrier$1 = carrier.getMainCarrier(); + return index.getAsyncContextStrategy(carrier$1); + } + function _startRootSpan(spanArguments, scope, parentSampled) { + let client = currentScopes.getClient(), options = client && client.getOptions() || {}, { name = "", attributes } = spanArguments, [sampled, sampleRate] = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] ? [!1] : sampling.sampleSpan(options, { + name, + parentSampled, + attributes, + transactionContext: { + name, + parentSampled + } + }), rootSpan = new sentrySpan.SentrySpan({ + ...spanArguments, + attributes: { + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "custom", + ...spanArguments.attributes + }, + sampled + }); + return sampleRate !== void 0 && rootSpan.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, sampleRate), client && client.emit("spanStart", rootSpan), rootSpan; + } + function _startChildSpan(parentSpan, scope, spanArguments) { + let { spanId, traceId } = parentSpan.spanContext(), sampled = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] ? !1 : spanUtils.spanIsSampled(parentSpan), childSpan = sampled ? new sentrySpan.SentrySpan({ + ...spanArguments, + parentSpanId: spanId, + traceId, + sampled + }) : new sentryNonRecordingSpan.SentryNonRecordingSpan({ traceId }); + spanUtils.addChildSpanToSpan(parentSpan, childSpan); + let client = currentScopes.getClient(); + return client && (client.emit("spanStart", childSpan), spanArguments.endTimestamp && client.emit("spanEnd", childSpan)), childSpan; + } + function getParentSpan(scope) { + let span = spanOnScope._getSpanForScope(scope); + if (!span) + return; + let client = currentScopes.getClient(); + return (client ? client.getOptions() : {}).parentSpanIsAlwaysRootSpan ? spanUtils.getRootSpan(span) : span; + } + exports.continueTrace = continueTrace; + exports.startInactiveSpan = startInactiveSpan; + exports.startNewTrace = startNewTrace; + exports.startSpan = startSpan; + exports.startSpanManual = startSpanManual; + exports.suppressTracing = suppressTracing; + exports.withActiveSpan = withActiveSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/idleSpan.js +var require_idleSpan = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/idleSpan.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), semanticAttributes = require_semanticAttributes(), hasTracingEnabled = require_hasTracingEnabled(), spanOnScope = require_spanOnScope(), spanUtils = require_spanUtils(), sentryNonRecordingSpan = require_sentryNonRecordingSpan(), spanstatus = require_spanstatus(), trace = require_trace(), TRACING_DEFAULTS = { + idleTimeout: 1e3, + finalTimeout: 3e4, + childSpanTimeout: 15e3 + }, FINISH_REASON_HEARTBEAT_FAILED = "heartbeatFailed", FINISH_REASON_IDLE_TIMEOUT = "idleTimeout", FINISH_REASON_FINAL_TIMEOUT = "finalTimeout", FINISH_REASON_EXTERNAL_FINISH = "externalFinish"; + function startIdleSpan(startSpanOptions, options = {}) { + let activities = /* @__PURE__ */ new Map(), _finished = !1, _idleTimeoutID, _finishReason = FINISH_REASON_EXTERNAL_FINISH, _autoFinishAllowed = !options.disableAutoFinish, { + idleTimeout = TRACING_DEFAULTS.idleTimeout, + finalTimeout = TRACING_DEFAULTS.finalTimeout, + childSpanTimeout = TRACING_DEFAULTS.childSpanTimeout, + beforeSpanEnd + } = options, client = currentScopes.getClient(); + if (!client || !hasTracingEnabled.hasTracingEnabled()) + return new sentryNonRecordingSpan.SentryNonRecordingSpan(); + let scope = currentScopes.getCurrentScope(), previousActiveSpan = spanUtils.getActiveSpan(), span = _startIdleSpan(startSpanOptions); + span.end = new Proxy(span.end, { + apply(target, thisArg, args) { + beforeSpanEnd && beforeSpanEnd(span); + let [definedEndTimestamp, ...rest] = args, timestamp = definedEndTimestamp || utils.timestampInSeconds(), spanEndTimestamp = spanUtils.spanTimeInputToSeconds(timestamp), spans = spanUtils.getSpanDescendants(span).filter((child) => child !== span); + if (!spans.length) + return onIdleSpanEnded(spanEndTimestamp), Reflect.apply(target, thisArg, [spanEndTimestamp, ...rest]); + let childEndTimestamps = spans.map((span2) => spanUtils.spanToJSON(span2).timestamp).filter((timestamp2) => !!timestamp2), latestSpanEndTimestamp = childEndTimestamps.length ? Math.max(...childEndTimestamps) : void 0, spanStartTimestamp = spanUtils.spanToJSON(span).start_timestamp, endTimestamp = Math.min( + spanStartTimestamp ? spanStartTimestamp + finalTimeout / 1e3 : 1 / 0, + Math.max(spanStartTimestamp || -1 / 0, Math.min(spanEndTimestamp, latestSpanEndTimestamp || 1 / 0)) + ); + return onIdleSpanEnded(endTimestamp), Reflect.apply(target, thisArg, [endTimestamp, ...rest]); + } + }); + function _cancelIdleTimeout() { + _idleTimeoutID && (clearTimeout(_idleTimeoutID), _idleTimeoutID = void 0); + } + function _restartIdleTimeout(endTimestamp) { + _cancelIdleTimeout(), _idleTimeoutID = setTimeout(() => { + !_finished && activities.size === 0 && _autoFinishAllowed && (_finishReason = FINISH_REASON_IDLE_TIMEOUT, span.end(endTimestamp)); + }, idleTimeout); + } + function _restartChildSpanTimeout(endTimestamp) { + _idleTimeoutID = setTimeout(() => { + !_finished && _autoFinishAllowed && (_finishReason = FINISH_REASON_HEARTBEAT_FAILED, span.end(endTimestamp)); + }, childSpanTimeout); + } + function _pushActivity(spanId) { + _cancelIdleTimeout(), activities.set(spanId, !0); + let endTimestamp = utils.timestampInSeconds(); + _restartChildSpanTimeout(endTimestamp + childSpanTimeout / 1e3); + } + function _popActivity(spanId) { + if (activities.has(spanId) && activities.delete(spanId), activities.size === 0) { + let endTimestamp = utils.timestampInSeconds(); + _restartIdleTimeout(endTimestamp + idleTimeout / 1e3); + } + } + function onIdleSpanEnded(endTimestamp) { + _finished = !0, activities.clear(), spanOnScope._setSpanForScope(scope, previousActiveSpan); + let spanJSON = spanUtils.spanToJSON(span), { start_timestamp: startTimestamp } = spanJSON; + if (!startTimestamp) + return; + (spanJSON.data || {})[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON] || span.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, _finishReason), utils.logger.log(`[Tracing] Idle span "${spanJSON.op}" finished`); + let childSpans = spanUtils.getSpanDescendants(span).filter((child) => child !== span), discardedSpans = 0; + childSpans.forEach((childSpan) => { + childSpan.isRecording() && (childSpan.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "cancelled" }), childSpan.end(endTimestamp), debugBuild.DEBUG_BUILD && utils.logger.log("[Tracing] Cancelling span since span ended early", JSON.stringify(childSpan, void 0, 2))); + let childSpanJSON = spanUtils.spanToJSON(childSpan), { timestamp: childEndTimestamp = 0, start_timestamp: childStartTimestamp = 0 } = childSpanJSON, spanStartedBeforeIdleSpanEnd = childStartTimestamp <= endTimestamp, timeoutWithMarginOfError = (finalTimeout + idleTimeout) / 1e3, spanEndedBeforeFinalTimeout = childEndTimestamp - childStartTimestamp <= timeoutWithMarginOfError; + if (debugBuild.DEBUG_BUILD) { + let stringifiedSpan = JSON.stringify(childSpan, void 0, 2); + spanStartedBeforeIdleSpanEnd ? spanEndedBeforeFinalTimeout || utils.logger.log("[Tracing] Discarding span since it finished after idle span final timeout", stringifiedSpan) : utils.logger.log("[Tracing] Discarding span since it happened after idle span was finished", stringifiedSpan); + } + (!spanEndedBeforeFinalTimeout || !spanStartedBeforeIdleSpanEnd) && (spanUtils.removeChildSpanFromSpan(span, childSpan), discardedSpans++); + }), discardedSpans > 0 && span.setAttribute("sentry.idle_span_discarded_spans", discardedSpans); + } + return client.on("spanStart", (startedSpan) => { + if (_finished || startedSpan === span || spanUtils.spanToJSON(startedSpan).timestamp) + return; + spanUtils.getSpanDescendants(span).includes(startedSpan) && _pushActivity(startedSpan.spanContext().spanId); + }), client.on("spanEnd", (endedSpan) => { + _finished || _popActivity(endedSpan.spanContext().spanId); + }), client.on("idleSpanEnableAutoFinish", (spanToAllowAutoFinish) => { + spanToAllowAutoFinish === span && (_autoFinishAllowed = !0, _restartIdleTimeout(), activities.size && _restartChildSpanTimeout()); + }), options.disableAutoFinish || _restartIdleTimeout(), setTimeout(() => { + _finished || (span.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "deadline_exceeded" }), _finishReason = FINISH_REASON_FINAL_TIMEOUT, span.end()); + }, finalTimeout), span; + } + function _startIdleSpan(options) { + let span = trace.startInactiveSpan(options); + return spanOnScope._setSpanForScope(currentScopes.getCurrentScope(), span), debugBuild.DEBUG_BUILD && utils.logger.log("[Tracing] Started span is an idle span"), span; + } + exports.TRACING_DEFAULTS = TRACING_DEFAULTS; + exports.startIdleSpan = startIdleSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/eventProcessors.js +var require_eventProcessors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/eventProcessors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(); + function notifyEventProcessors(processors, event, hint, index = 0) { + return new utils.SyncPromise((resolve, reject) => { + let processor = processors[index]; + if (event === null || typeof processor != "function") + resolve(event); + else { + let result = processor({ ...event }, hint); + debugBuild.DEBUG_BUILD && processor.id && result === null && utils.logger.log(`Event processor "${processor.id}" dropped event`), utils.isThenable(result) ? result.then((final) => notifyEventProcessors(processors, final, hint, index + 1).then(resolve)).then(null, reject) : notifyEventProcessors(processors, result, hint, index + 1).then(resolve).then(null, reject); + } + }); + } + exports.notifyEventProcessors = notifyEventProcessors; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/applyScopeDataToEvent.js +var require_applyScopeDataToEvent = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/applyScopeDataToEvent.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), dynamicSamplingContext = require_dynamicSamplingContext(), spanUtils = require_spanUtils(); + function applyScopeDataToEvent(event, data) { + let { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data; + applyDataToEvent(event, data), span && applySpanToEvent(event, span), applyFingerprintToEvent(event, fingerprint), applyBreadcrumbsToEvent(event, breadcrumbs), applySdkMetadataToEvent(event, sdkProcessingMetadata); + } + function mergeScopeData(data, mergeData) { + let { + extra, + tags, + user, + contexts, + level, + sdkProcessingMetadata, + breadcrumbs, + fingerprint, + eventProcessors, + attachments, + propagationContext, + transactionName, + span + } = mergeData; + mergeAndOverwriteScopeData(data, "extra", extra), mergeAndOverwriteScopeData(data, "tags", tags), mergeAndOverwriteScopeData(data, "user", user), mergeAndOverwriteScopeData(data, "contexts", contexts), mergeAndOverwriteScopeData(data, "sdkProcessingMetadata", sdkProcessingMetadata), level && (data.level = level), transactionName && (data.transactionName = transactionName), span && (data.span = span), breadcrumbs.length && (data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs]), fingerprint.length && (data.fingerprint = [...data.fingerprint, ...fingerprint]), eventProcessors.length && (data.eventProcessors = [...data.eventProcessors, ...eventProcessors]), attachments.length && (data.attachments = [...data.attachments, ...attachments]), data.propagationContext = { ...data.propagationContext, ...propagationContext }; + } + function mergeAndOverwriteScopeData(data, prop, mergeVal) { + if (mergeVal && Object.keys(mergeVal).length) { + data[prop] = { ...data[prop] }; + for (let key in mergeVal) + Object.prototype.hasOwnProperty.call(mergeVal, key) && (data[prop][key] = mergeVal[key]); + } + } + function applyDataToEvent(event, data) { + let { extra, tags, user, contexts, level, transactionName } = data, cleanedExtra = utils.dropUndefinedKeys(extra); + cleanedExtra && Object.keys(cleanedExtra).length && (event.extra = { ...cleanedExtra, ...event.extra }); + let cleanedTags = utils.dropUndefinedKeys(tags); + cleanedTags && Object.keys(cleanedTags).length && (event.tags = { ...cleanedTags, ...event.tags }); + let cleanedUser = utils.dropUndefinedKeys(user); + cleanedUser && Object.keys(cleanedUser).length && (event.user = { ...cleanedUser, ...event.user }); + let cleanedContexts = utils.dropUndefinedKeys(contexts); + cleanedContexts && Object.keys(cleanedContexts).length && (event.contexts = { ...cleanedContexts, ...event.contexts }), level && (event.level = level), transactionName && event.type !== "transaction" && (event.transaction = transactionName); + } + function applyBreadcrumbsToEvent(event, breadcrumbs) { + let mergedBreadcrumbs = [...event.breadcrumbs || [], ...breadcrumbs]; + event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : void 0; + } + function applySdkMetadataToEvent(event, sdkProcessingMetadata) { + event.sdkProcessingMetadata = { + ...event.sdkProcessingMetadata, + ...sdkProcessingMetadata + }; + } + function applySpanToEvent(event, span) { + event.contexts = { + trace: spanUtils.spanToTraceContext(span), + ...event.contexts + }, event.sdkProcessingMetadata = { + dynamicSamplingContext: dynamicSamplingContext.getDynamicSamplingContextFromSpan(span), + ...event.sdkProcessingMetadata + }; + let rootSpan = spanUtils.getRootSpan(span), transactionName = spanUtils.spanToJSON(rootSpan).description; + transactionName && !event.transaction && event.type === "transaction" && (event.transaction = transactionName); + } + function applyFingerprintToEvent(event, fingerprint) { + event.fingerprint = event.fingerprint ? utils.arrayify(event.fingerprint) : [], fingerprint && (event.fingerprint = event.fingerprint.concat(fingerprint)), event.fingerprint && !event.fingerprint.length && delete event.fingerprint; + } + exports.applyScopeDataToEvent = applyScopeDataToEvent; + exports.mergeAndOverwriteScopeData = mergeAndOverwriteScopeData; + exports.mergeScopeData = mergeScopeData; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/prepareEvent.js +var require_prepareEvent = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/prepareEvent.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), constants = require_constants(), currentScopes = require_currentScopes(), eventProcessors = require_eventProcessors(), scope = require_scope(), applyScopeDataToEvent = require_applyScopeDataToEvent(); + function prepareEvent(options, event, hint, scope2, client, isolationScope) { + let { normalizeDepth = 3, normalizeMaxBreadth = 1e3 } = options, prepared = { + ...event, + event_id: event.event_id || hint.event_id || utils.uuid4(), + timestamp: event.timestamp || utils.dateTimestampInSeconds() + }, integrations = hint.integrations || options.integrations.map((i) => i.name); + applyClientOptions(prepared, options), applyIntegrationsMetadata(prepared, integrations), event.type === void 0 && applyDebugIds(prepared, options.stackParser); + let finalScope = getFinalScope(scope2, hint.captureContext); + hint.mechanism && utils.addExceptionMechanism(prepared, hint.mechanism); + let clientEventProcessors = client ? client.getEventProcessors() : [], data = currentScopes.getGlobalScope().getScopeData(); + if (isolationScope) { + let isolationData = isolationScope.getScopeData(); + applyScopeDataToEvent.mergeScopeData(data, isolationData); + } + if (finalScope) { + let finalScopeData = finalScope.getScopeData(); + applyScopeDataToEvent.mergeScopeData(data, finalScopeData); + } + let attachments = [...hint.attachments || [], ...data.attachments]; + attachments.length && (hint.attachments = attachments), applyScopeDataToEvent.applyScopeDataToEvent(prepared, data); + let eventProcessors$1 = [ + ...clientEventProcessors, + // Run scope event processors _after_ all other processors + ...data.eventProcessors + ]; + return eventProcessors.notifyEventProcessors(eventProcessors$1, prepared, hint).then((evt) => (evt && applyDebugMeta(evt), typeof normalizeDepth == "number" && normalizeDepth > 0 ? normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth) : evt)); + } + function applyClientOptions(event, options) { + let { environment, release, dist, maxValueLength = 250 } = options; + "environment" in event || (event.environment = "environment" in options ? environment : constants.DEFAULT_ENVIRONMENT), event.release === void 0 && release !== void 0 && (event.release = release), event.dist === void 0 && dist !== void 0 && (event.dist = dist), event.message && (event.message = utils.truncate(event.message, maxValueLength)); + let exception = event.exception && event.exception.values && event.exception.values[0]; + exception && exception.value && (exception.value = utils.truncate(exception.value, maxValueLength)); + let request = event.request; + request && request.url && (request.url = utils.truncate(request.url, maxValueLength)); + } + var debugIdStackParserCache = /* @__PURE__ */ new WeakMap(); + function applyDebugIds(event, stackParser) { + let debugIdMap = utils.GLOBAL_OBJ._sentryDebugIds; + if (!debugIdMap) + return; + let debugIdStackFramesCache, cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser); + cachedDebugIdStackFrameCache ? debugIdStackFramesCache = cachedDebugIdStackFrameCache : (debugIdStackFramesCache = /* @__PURE__ */ new Map(), debugIdStackParserCache.set(stackParser, debugIdStackFramesCache)); + let filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => { + let parsedStack, cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace); + cachedParsedStack ? parsedStack = cachedParsedStack : (parsedStack = stackParser(debugIdStackTrace), debugIdStackFramesCache.set(debugIdStackTrace, parsedStack)); + for (let i = parsedStack.length - 1; i >= 0; i--) { + let stackFrame = parsedStack[i]; + if (stackFrame.filename) { + acc[stackFrame.filename] = debugIdMap[debugIdStackTrace]; + break; + } + } + return acc; + }, {}); + try { + event.exception.values.forEach((exception) => { + exception.stacktrace.frames.forEach((frame) => { + frame.filename && (frame.debug_id = filenameDebugIdMap[frame.filename]); + }); + }); + } catch { + } + } + function applyDebugMeta(event) { + let filenameDebugIdMap = {}; + try { + event.exception.values.forEach((exception) => { + exception.stacktrace.frames.forEach((frame) => { + frame.debug_id && (frame.abs_path ? filenameDebugIdMap[frame.abs_path] = frame.debug_id : frame.filename && (filenameDebugIdMap[frame.filename] = frame.debug_id), delete frame.debug_id); + }); + }); + } catch { + } + if (Object.keys(filenameDebugIdMap).length === 0) + return; + event.debug_meta = event.debug_meta || {}, event.debug_meta.images = event.debug_meta.images || []; + let images = event.debug_meta.images; + Object.keys(filenameDebugIdMap).forEach((filename) => { + images.push({ + type: "sourcemap", + code_file: filename, + debug_id: filenameDebugIdMap[filename] + }); + }); + } + function applyIntegrationsMetadata(event, integrationNames) { + integrationNames.length > 0 && (event.sdk = event.sdk || {}, event.sdk.integrations = [...event.sdk.integrations || [], ...integrationNames]); + } + function normalizeEvent(event, depth, maxBreadth) { + if (!event) + return null; + let normalized = { + ...event, + ...event.breadcrumbs && { + breadcrumbs: event.breadcrumbs.map((b) => ({ + ...b, + ...b.data && { + data: utils.normalize(b.data, depth, maxBreadth) + } + })) + }, + ...event.user && { + user: utils.normalize(event.user, depth, maxBreadth) + }, + ...event.contexts && { + contexts: utils.normalize(event.contexts, depth, maxBreadth) + }, + ...event.extra && { + extra: utils.normalize(event.extra, depth, maxBreadth) + } + }; + return event.contexts && event.contexts.trace && normalized.contexts && (normalized.contexts.trace = event.contexts.trace, event.contexts.trace.data && (normalized.contexts.trace.data = utils.normalize(event.contexts.trace.data, depth, maxBreadth))), event.spans && (normalized.spans = event.spans.map((span) => ({ + ...span, + ...span.data && { + data: utils.normalize(span.data, depth, maxBreadth) + } + }))), normalized; + } + function getFinalScope(scope$1, captureContext) { + if (!captureContext) + return scope$1; + let finalScope = scope$1 ? scope$1.clone() : new scope.Scope(); + return finalScope.update(captureContext), finalScope; + } + function parseEventHintOrCaptureContext(hint) { + if (hint) + return hintIsScopeOrFunction(hint) ? { captureContext: hint } : hintIsScopeContext(hint) ? { + captureContext: hint + } : hint; + } + function hintIsScopeOrFunction(hint) { + return hint instanceof scope.Scope || typeof hint == "function"; + } + var captureContextKeys = [ + "user", + "level", + "extra", + "contexts", + "tags", + "fingerprint", + "requestSession", + "propagationContext" + ]; + function hintIsScopeContext(hint) { + return Object.keys(hint).some((key) => captureContextKeys.includes(key)); + } + exports.applyDebugIds = applyDebugIds; + exports.applyDebugMeta = applyDebugMeta; + exports.parseEventHintOrCaptureContext = parseEventHintOrCaptureContext; + exports.prepareEvent = prepareEvent; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/exports.js +var require_exports = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/exports.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), constants = require_constants(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), session = require_session(), prepareEvent = require_prepareEvent(); + function captureException(exception, hint) { + return currentScopes.getCurrentScope().captureException(exception, prepareEvent.parseEventHintOrCaptureContext(hint)); + } + function captureMessage(message, captureContext) { + let level = typeof captureContext == "string" ? captureContext : void 0, context = typeof captureContext != "string" ? { captureContext } : void 0; + return currentScopes.getCurrentScope().captureMessage(message, level, context); + } + function captureEvent(event, hint) { + return currentScopes.getCurrentScope().captureEvent(event, hint); + } + function setContext(name, context) { + currentScopes.getIsolationScope().setContext(name, context); + } + function setExtras(extras) { + currentScopes.getIsolationScope().setExtras(extras); + } + function setExtra(key, extra) { + currentScopes.getIsolationScope().setExtra(key, extra); + } + function setTags(tags) { + currentScopes.getIsolationScope().setTags(tags); + } + function setTag(key, value) { + currentScopes.getIsolationScope().setTag(key, value); + } + function setUser(user) { + currentScopes.getIsolationScope().setUser(user); + } + function lastEventId() { + return currentScopes.getIsolationScope().lastEventId(); + } + function captureCheckIn(checkIn, upsertMonitorConfig) { + let scope = currentScopes.getCurrentScope(), client = currentScopes.getClient(); + if (!client) + debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot capture check-in. No client defined."); + else if (!client.captureCheckIn) + debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot capture check-in. Client does not support sending check-ins."); + else + return client.captureCheckIn(checkIn, upsertMonitorConfig, scope); + return utils.uuid4(); + } + function withMonitor(monitorSlug, callback, upsertMonitorConfig) { + let checkInId = captureCheckIn({ monitorSlug, status: "in_progress" }, upsertMonitorConfig), now = utils.timestampInSeconds(); + function finishCheckIn(status) { + captureCheckIn({ monitorSlug, status, checkInId, duration: utils.timestampInSeconds() - now }); + } + return currentScopes.withIsolationScope(() => { + let maybePromiseResult; + try { + maybePromiseResult = callback(); + } catch (e) { + throw finishCheckIn("error"), e; + } + return utils.isThenable(maybePromiseResult) ? Promise.resolve(maybePromiseResult).then( + () => { + finishCheckIn("ok"); + }, + () => { + finishCheckIn("error"); + } + ) : finishCheckIn("ok"), maybePromiseResult; + }); + } + async function flush(timeout) { + let client = currentScopes.getClient(); + return client ? client.flush(timeout) : (debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot flush events. No client defined."), Promise.resolve(!1)); + } + async function close(timeout) { + let client = currentScopes.getClient(); + return client ? client.close(timeout) : (debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot flush events and disable SDK. No client defined."), Promise.resolve(!1)); + } + function isInitialized() { + return !!currentScopes.getClient(); + } + function isEnabled() { + let client = currentScopes.getClient(); + return !!client && client.getOptions().enabled !== !1 && !!client.getTransport(); + } + function addEventProcessor(callback) { + currentScopes.getIsolationScope().addEventProcessor(callback); + } + function startSession(context) { + let client = currentScopes.getClient(), isolationScope = currentScopes.getIsolationScope(), currentScope = currentScopes.getCurrentScope(), { release, environment = constants.DEFAULT_ENVIRONMENT } = client && client.getOptions() || {}, { userAgent } = utils.GLOBAL_OBJ.navigator || {}, session$1 = session.makeSession({ + release, + environment, + user: currentScope.getUser() || isolationScope.getUser(), + ...userAgent && { userAgent }, + ...context + }), currentSession = isolationScope.getSession(); + return currentSession && currentSession.status === "ok" && session.updateSession(currentSession, { status: "exited" }), endSession(), isolationScope.setSession(session$1), currentScope.setSession(session$1), session$1; + } + function endSession() { + let isolationScope = currentScopes.getIsolationScope(), currentScope = currentScopes.getCurrentScope(), session$1 = currentScope.getSession() || isolationScope.getSession(); + session$1 && session.closeSession(session$1), _sendSessionUpdate(), isolationScope.setSession(), currentScope.setSession(); + } + function _sendSessionUpdate() { + let isolationScope = currentScopes.getIsolationScope(), currentScope = currentScopes.getCurrentScope(), client = currentScopes.getClient(), session2 = currentScope.getSession() || isolationScope.getSession(); + session2 && client && client.captureSession(session2); + } + function captureSession(end = !1) { + if (end) { + endSession(); + return; + } + _sendSessionUpdate(); + } + exports.addEventProcessor = addEventProcessor; + exports.captureCheckIn = captureCheckIn; + exports.captureEvent = captureEvent; + exports.captureException = captureException; + exports.captureMessage = captureMessage; + exports.captureSession = captureSession; + exports.close = close; + exports.endSession = endSession; + exports.flush = flush; + exports.isEnabled = isEnabled; + exports.isInitialized = isInitialized; + exports.lastEventId = lastEventId; + exports.setContext = setContext; + exports.setExtra = setExtra; + exports.setExtras = setExtras; + exports.setTag = setTag; + exports.setTags = setTags; + exports.setUser = setUser; + exports.startSession = startSession; + exports.withMonitor = withMonitor; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/sessionflusher.js +var require_sessionflusher = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/sessionflusher.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), SessionFlusher = class { + // Cast to any so that it can use Node.js timeout + // eslint-disable-next-line @typescript-eslint/no-explicit-any + constructor(client, attrs) { + this._client = client, this.flushTimeout = 60, this._pendingAggregates = {}, this._isEnabled = !0, this._intervalId = setInterval(() => this.flush(), this.flushTimeout * 1e3), this._intervalId.unref && this._intervalId.unref(), this._sessionAttrs = attrs; + } + /** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSession` */ + flush() { + let sessionAggregates = this.getSessionAggregates(); + sessionAggregates.aggregates.length !== 0 && (this._pendingAggregates = {}, this._client.sendSession(sessionAggregates)); + } + /** Massages the entries in `pendingAggregates` and returns aggregated sessions */ + getSessionAggregates() { + let aggregates = Object.keys(this._pendingAggregates).map((key) => this._pendingAggregates[parseInt(key)]), sessionAggregates = { + attrs: this._sessionAttrs, + aggregates + }; + return utils.dropUndefinedKeys(sessionAggregates); + } + /** JSDoc */ + close() { + clearInterval(this._intervalId), this._isEnabled = !1, this.flush(); + } + /** + * Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then + * fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to + * `_incrementSessionStatusCount` along with the start date + */ + incrementSessionStatusCount() { + if (!this._isEnabled) + return; + let isolationScope = currentScopes.getIsolationScope(), requestSession = isolationScope.getRequestSession(); + requestSession && requestSession.status && (this._incrementSessionStatusCount(requestSession.status, /* @__PURE__ */ new Date()), isolationScope.setRequestSession(void 0)); + } + /** + * Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of + * the session received + */ + _incrementSessionStatusCount(status, date) { + let sessionStartedTrunc = new Date(date).setSeconds(0, 0); + this._pendingAggregates[sessionStartedTrunc] = this._pendingAggregates[sessionStartedTrunc] || {}; + let aggregationCounts = this._pendingAggregates[sessionStartedTrunc]; + switch (aggregationCounts.started || (aggregationCounts.started = new Date(sessionStartedTrunc).toISOString()), status) { + case "errored": + return aggregationCounts.errored = (aggregationCounts.errored || 0) + 1, aggregationCounts.errored; + case "ok": + return aggregationCounts.exited = (aggregationCounts.exited || 0) + 1, aggregationCounts.exited; + default: + return aggregationCounts.crashed = (aggregationCounts.crashed || 0) + 1, aggregationCounts.crashed; + } + } + }; + exports.SessionFlusher = SessionFlusher; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/api.js +var require_api = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/api.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), SENTRY_API_VERSION = "7"; + function getBaseApiEndpoint(dsn) { + let protocol = dsn.protocol ? `${dsn.protocol}:` : "", port = dsn.port ? `:${dsn.port}` : ""; + return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ""}/api/`; + } + function _getIngestEndpoint(dsn) { + return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`; + } + function _encodedAuth(dsn, sdkInfo) { + return utils.urlEncode({ + // We send only the minimum set of required information. See + // https://github.com/getsentry/sentry-javascript/issues/2572. + sentry_key: dsn.publicKey, + sentry_version: SENTRY_API_VERSION, + ...sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` } + }); + } + function getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel, sdkInfo) { + return tunnel || `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`; + } + function getReportDialogEndpoint(dsnLike, dialogOptions) { + let dsn = utils.makeDsn(dsnLike); + if (!dsn) + return ""; + let endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`, encodedOptions = `dsn=${utils.dsnToString(dsn)}`; + for (let key in dialogOptions) + if (key !== "dsn" && key !== "onClose") + if (key === "user") { + let user = dialogOptions.user; + if (!user) + continue; + user.name && (encodedOptions += `&name=${encodeURIComponent(user.name)}`), user.email && (encodedOptions += `&email=${encodeURIComponent(user.email)}`); + } else + encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key])}`; + return `${endpoint}?${encodedOptions}`; + } + exports.getEnvelopeEndpointWithUrlEncodedAuth = getEnvelopeEndpointWithUrlEncodedAuth; + exports.getReportDialogEndpoint = getReportDialogEndpoint; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integration.js +var require_integration = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integration.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), installedIntegrations = []; + function filterDuplicates(integrations) { + let integrationsByName = {}; + return integrations.forEach((currentInstance) => { + let { name } = currentInstance, existingInstance = integrationsByName[name]; + existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance || (integrationsByName[name] = currentInstance); + }), Object.keys(integrationsByName).map((k) => integrationsByName[k]); + } + function getIntegrationsToSetup(options) { + let defaultIntegrations = options.defaultIntegrations || [], userIntegrations = options.integrations; + defaultIntegrations.forEach((integration) => { + integration.isDefaultInstance = !0; + }); + let integrations; + Array.isArray(userIntegrations) ? integrations = [...defaultIntegrations, ...userIntegrations] : typeof userIntegrations == "function" ? integrations = utils.arrayify(userIntegrations(defaultIntegrations)) : integrations = defaultIntegrations; + let finalIntegrations = filterDuplicates(integrations), debugIndex = findIndex(finalIntegrations, (integration) => integration.name === "Debug"); + if (debugIndex !== -1) { + let [debugInstance] = finalIntegrations.splice(debugIndex, 1); + finalIntegrations.push(debugInstance); + } + return finalIntegrations; + } + function setupIntegrations(client, integrations) { + let integrationIndex = {}; + return integrations.forEach((integration) => { + integration && setupIntegration(client, integration, integrationIndex); + }), integrationIndex; + } + function afterSetupIntegrations(client, integrations) { + for (let integration of integrations) + integration && integration.afterAllSetup && integration.afterAllSetup(client); + } + function setupIntegration(client, integration, integrationIndex) { + if (integrationIndex[integration.name]) { + debugBuild.DEBUG_BUILD && utils.logger.log(`Integration skipped because it was already installed: ${integration.name}`); + return; + } + if (integrationIndex[integration.name] = integration, installedIntegrations.indexOf(integration.name) === -1 && typeof integration.setupOnce == "function" && (integration.setupOnce(), installedIntegrations.push(integration.name)), integration.setup && typeof integration.setup == "function" && integration.setup(client), typeof integration.preprocessEvent == "function") { + let callback = integration.preprocessEvent.bind(integration); + client.on("preprocessEvent", (event, hint) => callback(event, hint, client)); + } + if (typeof integration.processEvent == "function") { + let callback = integration.processEvent.bind(integration), processor = Object.assign((event, hint) => callback(event, hint, client), { + id: integration.name + }); + client.addEventProcessor(processor); + } + debugBuild.DEBUG_BUILD && utils.logger.log(`Integration installed: ${integration.name}`); + } + function addIntegration(integration) { + let client = currentScopes.getClient(); + if (!client) { + debugBuild.DEBUG_BUILD && utils.logger.warn(`Cannot add integration "${integration.name}" because no SDK Client is available.`); + return; + } + client.addIntegration(integration); + } + function findIndex(arr, callback) { + for (let i = 0; i < arr.length; i++) + if (callback(arr[i]) === !0) + return i; + return -1; + } + function defineIntegration(fn) { + return fn; + } + exports.addIntegration = addIntegration; + exports.afterSetupIntegrations = afterSetupIntegrations; + exports.defineIntegration = defineIntegration; + exports.getIntegrationsToSetup = getIntegrationsToSetup; + exports.installedIntegrations = installedIntegrations; + exports.setupIntegration = setupIntegration; + exports.setupIntegrations = setupIntegrations; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/baseclient.js +var require_baseclient = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/baseclient.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), api = require_api(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), envelope = require_envelope2(), integration = require_integration(), session = require_session(), dynamicSamplingContext = require_dynamicSamplingContext(), parseSampleRate = require_parseSampleRate(), prepareEvent = require_prepareEvent(), ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured.", BaseClient = class { + /** Options passed to the SDK. */ + /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */ + /** Array of set up integrations. */ + /** Number of calls being processed */ + /** Holds flushable */ + // eslint-disable-next-line @typescript-eslint/ban-types + /** + * Initializes this client instance. + * + * @param options Options for the client. + */ + constructor(options) { + if (this._options = options, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], options.dsn ? this._dsn = utils.makeDsn(options.dsn) : debugBuild.DEBUG_BUILD && utils.logger.warn("No DSN provided, client will not send events."), this._dsn) { + let url = api.getEnvelopeEndpointWithUrlEncodedAuth( + this._dsn, + options.tunnel, + options._metadata ? options._metadata.sdk : void 0 + ); + this._transport = options.transport({ + tunnel: this._options.tunnel, + recordDroppedEvent: this.recordDroppedEvent.bind(this), + ...options.transportOptions, + url + }); + } + } + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + captureException(exception, hint, scope) { + let eventId = utils.uuid4(); + if (utils.checkOrSetAlreadyCaught(exception)) + return debugBuild.DEBUG_BUILD && utils.logger.log(ALREADY_SEEN_ERROR), eventId; + let hintWithEventId = { + event_id: eventId, + ...hint + }; + return this._process( + this.eventFromException(exception, hintWithEventId).then( + (event) => this._captureEvent(event, hintWithEventId, scope) + ) + ), hintWithEventId.event_id; + } + /** + * @inheritDoc + */ + captureMessage(message, level, hint, currentScope) { + let hintWithEventId = { + event_id: utils.uuid4(), + ...hint + }, eventMessage = utils.isParameterizedString(message) ? message : String(message), promisedEvent = utils.isPrimitive(message) ? this.eventFromMessage(eventMessage, level, hintWithEventId) : this.eventFromException(message, hintWithEventId); + return this._process(promisedEvent.then((event) => this._captureEvent(event, hintWithEventId, currentScope))), hintWithEventId.event_id; + } + /** + * @inheritDoc + */ + captureEvent(event, hint, currentScope) { + let eventId = utils.uuid4(); + if (hint && hint.originalException && utils.checkOrSetAlreadyCaught(hint.originalException)) + return debugBuild.DEBUG_BUILD && utils.logger.log(ALREADY_SEEN_ERROR), eventId; + let hintWithEventId = { + event_id: eventId, + ...hint + }, capturedSpanScope = (event.sdkProcessingMetadata || {}).capturedSpanScope; + return this._process(this._captureEvent(event, hintWithEventId, capturedSpanScope || currentScope)), hintWithEventId.event_id; + } + /** + * @inheritDoc + */ + captureSession(session$1) { + typeof session$1.release != "string" ? debugBuild.DEBUG_BUILD && utils.logger.warn("Discarded session because of missing or non-string release") : (this.sendSession(session$1), session.updateSession(session$1, { init: !1 })); + } + /** + * @inheritDoc + */ + getDsn() { + return this._dsn; + } + /** + * @inheritDoc + */ + getOptions() { + return this._options; + } + /** + * @see SdkMetadata in @sentry/types + * + * @return The metadata of the SDK + */ + getSdkMetadata() { + return this._options._metadata; + } + /** + * @inheritDoc + */ + getTransport() { + return this._transport; + } + /** + * @inheritDoc + */ + flush(timeout) { + let transport = this._transport; + return transport ? (this.emit("flush"), this._isClientDoneProcessing(timeout).then((clientFinished) => transport.flush(timeout).then((transportFlushed) => clientFinished && transportFlushed))) : utils.resolvedSyncPromise(!0); + } + /** + * @inheritDoc + */ + close(timeout) { + return this.flush(timeout).then((result) => (this.getOptions().enabled = !1, this.emit("close"), result)); + } + /** Get all installed event processors. */ + getEventProcessors() { + return this._eventProcessors; + } + /** @inheritDoc */ + addEventProcessor(eventProcessor) { + this._eventProcessors.push(eventProcessor); + } + /** @inheritdoc */ + init() { + this._isEnabled() && this._setupIntegrations(); + } + /** + * Gets an installed integration by its name. + * + * @returns The installed integration or `undefined` if no integration with that `name` was installed. + */ + getIntegrationByName(integrationName) { + return this._integrations[integrationName]; + } + /** + * @inheritDoc + */ + addIntegration(integration$1) { + let isAlreadyInstalled = this._integrations[integration$1.name]; + integration.setupIntegration(this, integration$1, this._integrations), isAlreadyInstalled || integration.afterSetupIntegrations(this, [integration$1]); + } + /** + * @inheritDoc + */ + sendEvent(event, hint = {}) { + this.emit("beforeSendEvent", event, hint); + let env = envelope.createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel); + for (let attachment of hint.attachments || []) + env = utils.addItemToEnvelope(env, utils.createAttachmentEnvelopeItem(attachment)); + let promise = this.sendEnvelope(env); + promise && promise.then((sendResponse) => this.emit("afterSendEvent", event, sendResponse), null); + } + /** + * @inheritDoc + */ + sendSession(session2) { + let env = envelope.createSessionEnvelope(session2, this._dsn, this._options._metadata, this._options.tunnel); + this.sendEnvelope(env); + } + /** + * @inheritDoc + */ + recordDroppedEvent(reason, category, _event) { + if (this._options.sendClientReports) { + let key = `${reason}:${category}`; + debugBuild.DEBUG_BUILD && utils.logger.log(`Adding outcome: "${key}"`), this._outcomes[key] = this._outcomes[key] + 1 || 1; + } + } + // Keep on() & emit() signatures in sync with types' client.ts interface + /* eslint-disable @typescript-eslint/unified-signatures */ + /** @inheritdoc */ + /** @inheritdoc */ + on(hook, callback) { + this._hooks[hook] || (this._hooks[hook] = []), this._hooks[hook].push(callback); + } + /** @inheritdoc */ + /** @inheritdoc */ + emit(hook, ...rest) { + this._hooks[hook] && this._hooks[hook].forEach((callback) => callback(...rest)); + } + /** + * @inheritdoc + */ + sendEnvelope(envelope2) { + return this.emit("beforeEnvelope", envelope2), this._isEnabled() && this._transport ? this._transport.send(envelope2).then(null, (reason) => (debugBuild.DEBUG_BUILD && utils.logger.error("Error while sending event:", reason), reason)) : (debugBuild.DEBUG_BUILD && utils.logger.error("Transport disabled"), utils.resolvedSyncPromise({})); + } + /* eslint-enable @typescript-eslint/unified-signatures */ + /** Setup integrations for this client. */ + _setupIntegrations() { + let { integrations } = this._options; + this._integrations = integration.setupIntegrations(this, integrations), integration.afterSetupIntegrations(this, integrations); + } + /** Updates existing session based on the provided event */ + _updateSessionFromEvent(session$1, event) { + let crashed = !1, errored = !1, exceptions = event.exception && event.exception.values; + if (exceptions) { + errored = !0; + for (let ex of exceptions) { + let mechanism = ex.mechanism; + if (mechanism && mechanism.handled === !1) { + crashed = !0; + break; + } + } + } + let sessionNonTerminal = session$1.status === "ok"; + (sessionNonTerminal && session$1.errors === 0 || sessionNonTerminal && crashed) && (session.updateSession(session$1, { + ...crashed && { status: "crashed" }, + errors: session$1.errors || Number(errored || crashed) + }), this.captureSession(session$1)); + } + /** + * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying + * "no" (resolving to `false`) in order to give the client a chance to potentially finish first. + * + * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not + * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to + * `true`. + * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and + * `false` otherwise + */ + _isClientDoneProcessing(timeout) { + return new utils.SyncPromise((resolve) => { + let ticked = 0, tick = 1, interval = setInterval(() => { + this._numProcessing == 0 ? (clearInterval(interval), resolve(!0)) : (ticked += tick, timeout && ticked >= timeout && (clearInterval(interval), resolve(!1))); + }, tick); + }); + } + /** Determines whether this SDK is enabled and a transport is present. */ + _isEnabled() { + return this.getOptions().enabled !== !1 && this._transport !== void 0; + } + /** + * Adds common information to events. + * + * The information includes release and environment from `options`, + * breadcrumbs and context (extra, tags and user) from the scope. + * + * Information that is already present in the event is never overwritten. For + * nested objects, such as the context, keys are merged. + * + * @param event The original event. + * @param hint May contain additional information about the original exception. + * @param currentScope A scope containing event metadata. + * @returns A new event with more information. + */ + _prepareEvent(event, hint, currentScope, isolationScope = currentScopes.getIsolationScope()) { + let options = this.getOptions(), integrations = Object.keys(this._integrations); + return !hint.integrations && integrations.length > 0 && (hint.integrations = integrations), this.emit("preprocessEvent", event, hint), event.type || isolationScope.setLastEventId(event.event_id || hint.event_id), prepareEvent.prepareEvent(options, event, hint, currentScope, this, isolationScope).then((evt) => { + if (evt === null) + return evt; + let propagationContext = { + ...isolationScope.getPropagationContext(), + ...currentScope ? currentScope.getPropagationContext() : void 0 + }; + if (!(evt.contexts && evt.contexts.trace) && propagationContext) { + let { traceId: trace_id, spanId, parentSpanId, dsc } = propagationContext; + evt.contexts = { + trace: utils.dropUndefinedKeys({ + trace_id, + span_id: spanId, + parent_span_id: parentSpanId + }), + ...evt.contexts + }; + let dynamicSamplingContext$1 = dsc || dynamicSamplingContext.getDynamicSamplingContextFromClient(trace_id, this); + evt.sdkProcessingMetadata = { + dynamicSamplingContext: dynamicSamplingContext$1, + ...evt.sdkProcessingMetadata + }; + } + return evt; + }); + } + /** + * Processes the event and logs an error in case of rejection + * @param event + * @param hint + * @param scope + */ + _captureEvent(event, hint = {}, scope) { + return this._processEvent(event, hint, scope).then( + (finalEvent) => finalEvent.event_id, + (reason) => { + if (debugBuild.DEBUG_BUILD) { + let sentryError = reason; + sentryError.logLevel === "log" ? utils.logger.log(sentryError.message) : utils.logger.warn(sentryError); + } + } + ); + } + /** + * Processes an event (either error or message) and sends it to Sentry. + * + * This also adds breadcrumbs and context information to the event. However, + * platform specific meta data (such as the User's IP address) must be added + * by the SDK implementor. + * + * + * @param event The event to send to Sentry. + * @param hint May contain additional information about the original exception. + * @param currentScope A scope containing event metadata. + * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send. + */ + _processEvent(event, hint, currentScope) { + let options = this.getOptions(), { sampleRate } = options, isTransaction = isTransactionEvent(event), isError = isErrorEvent(event), eventType = event.type || "error", beforeSendLabel = `before send for type \`${eventType}\``, parsedSampleRate = typeof sampleRate > "u" ? void 0 : parseSampleRate.parseSampleRate(sampleRate); + if (isError && typeof parsedSampleRate == "number" && Math.random() > parsedSampleRate) + return this.recordDroppedEvent("sample_rate", "error", event), utils.rejectedSyncPromise( + new utils.SentryError( + `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`, + "log" + ) + ); + let dataCategory = eventType === "replay_event" ? "replay" : eventType, capturedSpanIsolationScope = (event.sdkProcessingMetadata || {}).capturedSpanIsolationScope; + return this._prepareEvent(event, hint, currentScope, capturedSpanIsolationScope).then((prepared) => { + if (prepared === null) + throw this.recordDroppedEvent("event_processor", dataCategory, event), new utils.SentryError("An event processor returned `null`, will not send event.", "log"); + if (hint.data && hint.data.__sentry__ === !0) + return prepared; + let result = processBeforeSend(options, prepared, hint); + return _validateBeforeSendResult(result, beforeSendLabel); + }).then((processedEvent) => { + if (processedEvent === null) + throw this.recordDroppedEvent("before_send", dataCategory, event), new utils.SentryError(`${beforeSendLabel} returned \`null\`, will not send event.`, "log"); + let session2 = currentScope && currentScope.getSession(); + !isTransaction && session2 && this._updateSessionFromEvent(session2, processedEvent); + let transactionInfo = processedEvent.transaction_info; + if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) { + let source = "custom"; + processedEvent.transaction_info = { + ...transactionInfo, + source + }; + } + return this.sendEvent(processedEvent, hint), processedEvent; + }).then(null, (reason) => { + throw reason instanceof utils.SentryError ? reason : (this.captureException(reason, { + data: { + __sentry__: !0 + }, + originalException: reason + }), new utils.SentryError( + `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. +Reason: ${reason}` + )); + }); + } + /** + * Occupies the client with processing and event + */ + _process(promise) { + this._numProcessing++, promise.then( + (value) => (this._numProcessing--, value), + (reason) => (this._numProcessing--, reason) + ); + } + /** + * Clears outcomes on this client and returns them. + */ + _clearOutcomes() { + let outcomes = this._outcomes; + return this._outcomes = {}, Object.keys(outcomes).map((key) => { + let [reason, category] = key.split(":"); + return { + reason, + category, + quantity: outcomes[key] + }; + }); + } + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + }; + function _validateBeforeSendResult(beforeSendResult, beforeSendLabel) { + let invalidValueError = `${beforeSendLabel} must return \`null\` or a valid event.`; + if (utils.isThenable(beforeSendResult)) + return beforeSendResult.then( + (event) => { + if (!utils.isPlainObject(event) && event !== null) + throw new utils.SentryError(invalidValueError); + return event; + }, + (e) => { + throw new utils.SentryError(`${beforeSendLabel} rejected with ${e}`); + } + ); + if (!utils.isPlainObject(beforeSendResult) && beforeSendResult !== null) + throw new utils.SentryError(invalidValueError); + return beforeSendResult; + } + function processBeforeSend(options, event, hint) { + let { beforeSend, beforeSendTransaction, beforeSendSpan } = options; + if (isErrorEvent(event) && beforeSend) + return beforeSend(event, hint); + if (isTransactionEvent(event)) { + if (event.spans && beforeSendSpan) { + let processedSpans = []; + for (let span of event.spans) { + let processedSpan = beforeSendSpan(span); + processedSpan && processedSpans.push(processedSpan); + } + event.spans = processedSpans; + } + if (beforeSendTransaction) + return beforeSendTransaction(event, hint); + } + return event; + } + function isErrorEvent(event) { + return event.type === void 0; + } + function isTransactionEvent(event) { + return event.type === "transaction"; + } + exports.BaseClient = BaseClient; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/checkin.js +var require_checkin = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/checkin.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function createCheckInEnvelope(checkIn, dynamicSamplingContext, metadata, tunnel, dsn) { + let headers = { + sent_at: (/* @__PURE__ */ new Date()).toISOString() + }; + metadata && metadata.sdk && (headers.sdk = { + name: metadata.sdk.name, + version: metadata.sdk.version + }), tunnel && dsn && (headers.dsn = utils.dsnToString(dsn)), dynamicSamplingContext && (headers.trace = utils.dropUndefinedKeys(dynamicSamplingContext)); + let item = createCheckInEnvelopeItem(checkIn); + return utils.createEnvelope(headers, [item]); + } + function createCheckInEnvelopeItem(checkIn) { + return [{ + type: "check_in" + }, checkIn]; + } + exports.createCheckInEnvelope = createCheckInEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/server-runtime-client.js +var require_server_runtime_client = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/server-runtime-client.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), baseclient = require_baseclient(), checkin = require_checkin(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), sessionflusher = require_sessionflusher(), errors = require_errors(), spanOnScope = require_spanOnScope(), spanUtils = require_spanUtils(), dynamicSamplingContext = require_dynamicSamplingContext(), ServerRuntimeClient = class extends baseclient.BaseClient { + /** + * Creates a new Edge SDK instance. + * @param options Configuration options for this SDK. + */ + constructor(options) { + errors.registerSpanErrorInstrumentation(), super(options); + } + /** + * @inheritDoc + */ + eventFromException(exception, hint) { + return utils.resolvedSyncPromise(utils.eventFromUnknownInput(this, this._options.stackParser, exception, hint)); + } + /** + * @inheritDoc + */ + eventFromMessage(message, level = "info", hint) { + return utils.resolvedSyncPromise( + utils.eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace) + ); + } + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + captureException(exception, hint, scope) { + if (this._options.autoSessionTracking && this._sessionFlusher) { + let requestSession = currentScopes.getIsolationScope().getRequestSession(); + requestSession && requestSession.status === "ok" && (requestSession.status = "errored"); + } + return super.captureException(exception, hint, scope); + } + /** + * @inheritDoc + */ + captureEvent(event, hint, scope) { + if (this._options.autoSessionTracking && this._sessionFlusher && (event.type || "exception") === "exception" && event.exception && event.exception.values && event.exception.values.length > 0) { + let requestSession = currentScopes.getIsolationScope().getRequestSession(); + requestSession && requestSession.status === "ok" && (requestSession.status = "errored"); + } + return super.captureEvent(event, hint, scope); + } + /** + * + * @inheritdoc + */ + close(timeout) { + return this._sessionFlusher && this._sessionFlusher.close(), super.close(timeout); + } + /** Method that initialises an instance of SessionFlusher on Client */ + initSessionFlusher() { + let { release, environment } = this._options; + release ? this._sessionFlusher = new sessionflusher.SessionFlusher(this, { + release, + environment + }) : debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot initialise an instance of SessionFlusher if no release is provided!"); + } + /** + * Create a cron monitor check in and send it to Sentry. + * + * @param checkIn An object that describes a check in. + * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want + * to create a monitor automatically when sending a check in. + */ + captureCheckIn(checkIn, monitorConfig, scope) { + let id = "checkInId" in checkIn && checkIn.checkInId ? checkIn.checkInId : utils.uuid4(); + if (!this._isEnabled()) + return debugBuild.DEBUG_BUILD && utils.logger.warn("SDK not enabled, will not capture checkin."), id; + let options = this.getOptions(), { release, environment, tunnel } = options, serializedCheckIn = { + check_in_id: id, + monitor_slug: checkIn.monitorSlug, + status: checkIn.status, + release, + environment + }; + "duration" in checkIn && (serializedCheckIn.duration = checkIn.duration), monitorConfig && (serializedCheckIn.monitor_config = { + schedule: monitorConfig.schedule, + checkin_margin: monitorConfig.checkinMargin, + max_runtime: monitorConfig.maxRuntime, + timezone: monitorConfig.timezone, + failure_issue_threshold: monitorConfig.failureIssueThreshold, + recovery_threshold: monitorConfig.recoveryThreshold + }); + let [dynamicSamplingContext2, traceContext] = this._getTraceInfoFromScope(scope); + traceContext && (serializedCheckIn.contexts = { + trace: traceContext + }); + let envelope = checkin.createCheckInEnvelope( + serializedCheckIn, + dynamicSamplingContext2, + this.getSdkMetadata(), + tunnel, + this.getDsn() + ); + return debugBuild.DEBUG_BUILD && utils.logger.info("Sending checkin:", checkIn.monitorSlug, checkIn.status), this.sendEnvelope(envelope), id; + } + /** + * Method responsible for capturing/ending a request session by calling `incrementSessionStatusCount` to increment + * appropriate session aggregates bucket + */ + _captureRequestSession() { + this._sessionFlusher ? this._sessionFlusher.incrementSessionStatusCount() : debugBuild.DEBUG_BUILD && utils.logger.warn("Discarded request mode session because autoSessionTracking option was disabled"); + } + /** + * @inheritDoc + */ + _prepareEvent(event, hint, scope, isolationScope) { + return this._options.platform && (event.platform = event.platform || this._options.platform), this._options.runtime && (event.contexts = { + ...event.contexts, + runtime: (event.contexts || {}).runtime || this._options.runtime + }), this._options.serverName && (event.server_name = event.server_name || this._options.serverName), super._prepareEvent(event, hint, scope, isolationScope); + } + /** Extract trace information from scope */ + _getTraceInfoFromScope(scope) { + if (!scope) + return [void 0, void 0]; + let span = spanOnScope._getSpanForScope(scope); + if (span) { + let rootSpan = spanUtils.getRootSpan(span); + return [dynamicSamplingContext.getDynamicSamplingContextFromSpan(rootSpan), spanUtils.spanToTraceContext(rootSpan)]; + } + let { traceId, spanId, parentSpanId, dsc } = scope.getPropagationContext(), traceContext = { + trace_id: traceId, + span_id: spanId, + parent_span_id: parentSpanId + }; + return dsc ? [dsc, traceContext] : [dynamicSamplingContext.getDynamicSamplingContextFromClient(traceId, this), traceContext]; + } + }; + exports.ServerRuntimeClient = ServerRuntimeClient; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/sdk.js +var require_sdk = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/sdk.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(); + function initAndBind(clientClass, options) { + options.debug === !0 && (debugBuild.DEBUG_BUILD ? utils.logger.enable() : utils.consoleSandbox(() => { + console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."); + })), currentScopes.getCurrentScope().update(options.initialScope); + let client = new clientClass(options); + setCurrentClient(client), client.init(); + } + function setCurrentClient(client) { + currentScopes.getCurrentScope().setClient(client); + } + exports.initAndBind = initAndBind; + exports.setCurrentClient = setCurrentClient; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/base.js +var require_base = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/base.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), DEFAULT_TRANSPORT_BUFFER_SIZE = 64; + function createTransport(options, makeRequest, buffer = utils.makePromiseBuffer( + options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE + )) { + let rateLimits = {}, flush = (timeout) => buffer.drain(timeout); + function send(envelope) { + let filteredEnvelopeItems = []; + if (utils.forEachEnvelopeItem(envelope, (item, type) => { + let dataCategory = utils.envelopeItemTypeToDataCategory(type); + if (utils.isRateLimited(rateLimits, dataCategory)) { + let event = getEventForEnvelopeItem(item, type); + options.recordDroppedEvent("ratelimit_backoff", dataCategory, event); + } else + filteredEnvelopeItems.push(item); + }), filteredEnvelopeItems.length === 0) + return utils.resolvedSyncPromise({}); + let filteredEnvelope = utils.createEnvelope(envelope[0], filteredEnvelopeItems), recordEnvelopeLoss = (reason) => { + utils.forEachEnvelopeItem(filteredEnvelope, (item, type) => { + let event = getEventForEnvelopeItem(item, type); + options.recordDroppedEvent(reason, utils.envelopeItemTypeToDataCategory(type), event); + }); + }, requestTask = () => makeRequest({ body: utils.serializeEnvelope(filteredEnvelope) }).then( + (response) => (response.statusCode !== void 0 && (response.statusCode < 200 || response.statusCode >= 300) && debugBuild.DEBUG_BUILD && utils.logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`), rateLimits = utils.updateRateLimits(rateLimits, response), response), + (error) => { + throw recordEnvelopeLoss("network_error"), error; + } + ); + return buffer.add(requestTask).then( + (result) => result, + (error) => { + if (error instanceof utils.SentryError) + return debugBuild.DEBUG_BUILD && utils.logger.error("Skipped sending event because buffer is full."), recordEnvelopeLoss("queue_overflow"), utils.resolvedSyncPromise({}); + throw error; + } + ); + } + return { + send, + flush + }; + } + function getEventForEnvelopeItem(item, type) { + if (!(type !== "event" && type !== "transaction")) + return Array.isArray(item) ? item[1] : void 0; + } + exports.DEFAULT_TRANSPORT_BUFFER_SIZE = DEFAULT_TRANSPORT_BUFFER_SIZE; + exports.createTransport = createTransport; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/offline.js +var require_offline = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/offline.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), MIN_DELAY = 100, START_DELAY = 5e3, MAX_DELAY = 36e5; + function makeOfflineTransport(createTransport) { + function log(...args) { + debugBuild.DEBUG_BUILD && utils.logger.info("[Offline]:", ...args); + } + return (options) => { + let transport = createTransport(options); + if (!options.createStore) + throw new Error("No `createStore` function was provided"); + let store = options.createStore(options), retryDelay = START_DELAY, flushTimer; + function shouldQueue(env, error, retryDelay2) { + return utils.envelopeContainsItemType(env, ["client_report"]) ? !1 : options.shouldStore ? options.shouldStore(env, error, retryDelay2) : !0; + } + function flushIn(delay) { + flushTimer && clearTimeout(flushTimer), flushTimer = setTimeout(async () => { + flushTimer = void 0; + let found = await store.shift(); + found && (log("Attempting to send previously queued event"), found[0].sent_at = (/* @__PURE__ */ new Date()).toISOString(), send(found, !0).catch((e) => { + log("Failed to retry sending", e); + })); + }, delay), typeof flushTimer != "number" && flushTimer.unref && flushTimer.unref(); + } + function flushWithBackOff() { + flushTimer || (flushIn(retryDelay), retryDelay = Math.min(retryDelay * 2, MAX_DELAY)); + } + async function send(envelope, isRetry = !1) { + if (!isRetry && utils.envelopeContainsItemType(envelope, ["replay_event", "replay_recording"])) + return await store.push(envelope), flushIn(MIN_DELAY), {}; + try { + let result = await transport.send(envelope), delay = MIN_DELAY; + if (result) { + if (result.headers && result.headers["retry-after"]) + delay = utils.parseRetryAfterHeader(result.headers["retry-after"]); + else if (result.headers && result.headers["x-sentry-rate-limits"]) + delay = 6e4; + else if ((result.statusCode || 0) >= 400) + return result; + } + return flushIn(delay), retryDelay = START_DELAY, result; + } catch (e) { + if (await shouldQueue(envelope, e, retryDelay)) + return isRetry ? await store.unshift(envelope) : await store.push(envelope), flushWithBackOff(), log("Error sending. Event queued.", e), {}; + throw e; + } + } + return options.flushAtStartup && flushWithBackOff(), { + send, + flush: (t) => transport.flush(t) + }; + }; + } + exports.MIN_DELAY = MIN_DELAY; + exports.START_DELAY = START_DELAY; + exports.makeOfflineTransport = makeOfflineTransport; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/multiplexed.js +var require_multiplexed = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/multiplexed.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), api = require_api(); + function eventFromEnvelope(env, types) { + let event; + return utils.forEachEnvelopeItem(env, (item, type) => (types.includes(type) && (event = Array.isArray(item) ? item[1] : void 0), !!event)), event; + } + function makeOverrideReleaseTransport(createTransport, release) { + return (options) => { + let transport = createTransport(options); + return { + ...transport, + send: async (envelope) => { + let event = eventFromEnvelope(envelope, ["event", "transaction", "profile", "replay_event"]); + return event && (event.release = release), transport.send(envelope); + } + }; + }; + } + function overrideDsn(envelope, dsn) { + return utils.createEnvelope( + dsn ? { + ...envelope[0], + dsn + } : envelope[0], + envelope[1] + ); + } + function makeMultiplexedTransport(createTransport, matcher) { + return (options) => { + let fallbackTransport = createTransport(options), otherTransports = /* @__PURE__ */ new Map(); + function getTransport(dsn, release) { + let key = release ? `${dsn}:${release}` : dsn, transport = otherTransports.get(key); + if (!transport) { + let validatedDsn = utils.dsnFromString(dsn); + if (!validatedDsn) + return; + let url = api.getEnvelopeEndpointWithUrlEncodedAuth(validatedDsn, options.tunnel); + transport = release ? makeOverrideReleaseTransport(createTransport, release)({ ...options, url }) : createTransport({ ...options, url }), otherTransports.set(key, transport); + } + return [dsn, transport]; + } + async function send(envelope) { + function getEvent(types) { + let eventTypes = types && types.length ? types : ["event"]; + return eventFromEnvelope(envelope, eventTypes); + } + let transports = matcher({ envelope, getEvent }).map((result) => typeof result == "string" ? getTransport(result, void 0) : getTransport(result.dsn, result.release)).filter((t) => !!t); + return transports.length === 0 && transports.push(["", fallbackTransport]), (await Promise.all( + transports.map(([dsn, transport]) => transport.send(overrideDsn(envelope, dsn))) + ))[0]; + } + async function flush(timeout) { + let allTransports = [...otherTransports.values(), fallbackTransport]; + return (await Promise.all(allTransports.map((transport) => transport.flush(timeout)))).every((r) => r); + } + return { + send, + flush + }; + }; + } + exports.eventFromEnvelope = eventFromEnvelope; + exports.makeMultiplexedTransport = makeMultiplexedTransport; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/isSentryRequestUrl.js +var require_isSentryRequestUrl = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/isSentryRequestUrl.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function isSentryRequestUrl(url, client) { + let dsn = client && client.getDsn(), tunnel = client && client.getOptions().tunnel; + return checkDsn(url, dsn) || checkTunnel(url, tunnel); + } + function checkTunnel(url, tunnel) { + return tunnel ? removeTrailingSlash(url) === removeTrailingSlash(tunnel) : !1; + } + function checkDsn(url, dsn) { + return dsn ? url.includes(dsn.host) : !1; + } + function removeTrailingSlash(str) { + return str[str.length - 1] === "/" ? str.slice(0, -1) : str; + } + exports.isSentryRequestUrl = isSentryRequestUrl; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/parameterize.js +var require_parameterize = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/parameterize.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function parameterize(strings, ...values) { + let formatted = new String(String.raw(strings, ...values)); + return formatted.__sentry_template_string__ = strings.join("\0").replace(/%/g, "%%").replace(/\0/g, "%s"), formatted.__sentry_template_values__ = values, formatted; + } + exports.parameterize = parameterize; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/sdkMetadata.js +var require_sdkMetadata = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/sdkMetadata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function applySdkMetadata(options, name, names = [name], source = "npm") { + let metadata = options._metadata || {}; + metadata.sdk || (metadata.sdk = { + name: `sentry.javascript.${name}`, + packages: names.map((name2) => ({ + name: `${source}:@sentry/${name2}`, + version: utils.SDK_VERSION + })), + version: utils.SDK_VERSION + }), options._metadata = metadata; + } + exports.applySdkMetadata = applySdkMetadata; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/breadcrumbs.js +var require_breadcrumbs = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/breadcrumbs.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), DEFAULT_BREADCRUMBS = 100; + function addBreadcrumb(breadcrumb, hint) { + let client = currentScopes.getClient(), isolationScope = currentScopes.getIsolationScope(); + if (!client) return; + let { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = client.getOptions(); + if (maxBreadcrumbs <= 0) return; + let mergedBreadcrumb = { timestamp: utils.dateTimestampInSeconds(), ...breadcrumb }, finalBreadcrumb = beforeBreadcrumb ? utils.consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) : mergedBreadcrumb; + finalBreadcrumb !== null && (client.emit && client.emit("beforeAddBreadcrumb", finalBreadcrumb, hint), isolationScope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs)); + } + exports.addBreadcrumb = addBreadcrumb; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/functiontostring.js +var require_functiontostring = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/functiontostring.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), integration = require_integration(), originalFunctionToString, INTEGRATION_NAME = "FunctionToString", SETUP_CLIENTS = /* @__PURE__ */ new WeakMap(), _functionToStringIntegration = () => ({ + name: INTEGRATION_NAME, + setupOnce() { + originalFunctionToString = Function.prototype.toString; + try { + Function.prototype.toString = function(...args) { + let originalFunction = utils.getOriginalFunction(this), context = SETUP_CLIENTS.has(currentScopes.getClient()) && originalFunction !== void 0 ? originalFunction : this; + return originalFunctionToString.apply(context, args); + }; + } catch { + } + }, + setup(client) { + SETUP_CLIENTS.set(client, !0); + } + }), functionToStringIntegration = integration.defineIntegration(_functionToStringIntegration); + exports.functionToStringIntegration = functionToStringIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/inboundfilters.js +var require_inboundfilters = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/inboundfilters.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), integration = require_integration(), DEFAULT_IGNORE_ERRORS = [ + /^Script error\.?$/, + /^Javascript error: Script error\.? on line 0$/, + /^ResizeObserver loop completed with undelivered notifications.$/, + // The browser logs this when a ResizeObserver handler takes a bit longer. Usually this is not an actual issue though. It indicates slowness. + /^Cannot redefine property: googletag$/, + // This is thrown when google tag manager is used in combination with an ad blocker + "undefined is not an object (evaluating 'a.L')", + // Random error that happens but not actionable or noticeable to end-users. + `can't redefine non-configurable property "solana"`, + // Probably a browser extension or custom browser (Brave) throwing this error + "vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)", + // Error thrown by GTM, seemingly not affecting end-users + "Can't find variable: _AutofillCallbackHandler" + // Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/ + ], INTEGRATION_NAME = "InboundFilters", _inboundFiltersIntegration = (options = {}) => ({ + name: INTEGRATION_NAME, + processEvent(event, _hint, client) { + let clientOptions = client.getOptions(), mergedOptions = _mergeOptions(options, clientOptions); + return _shouldDropEvent(event, mergedOptions) ? null : event; + } + }), inboundFiltersIntegration = integration.defineIntegration(_inboundFiltersIntegration); + function _mergeOptions(internalOptions = {}, clientOptions = {}) { + return { + allowUrls: [...internalOptions.allowUrls || [], ...clientOptions.allowUrls || []], + denyUrls: [...internalOptions.denyUrls || [], ...clientOptions.denyUrls || []], + ignoreErrors: [ + ...internalOptions.ignoreErrors || [], + ...clientOptions.ignoreErrors || [], + ...internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS + ], + ignoreTransactions: [...internalOptions.ignoreTransactions || [], ...clientOptions.ignoreTransactions || []], + ignoreInternal: internalOptions.ignoreInternal !== void 0 ? internalOptions.ignoreInternal : !0 + }; + } + function _shouldDropEvent(event, options) { + return options.ignoreInternal && _isSentryError(event) ? (debugBuild.DEBUG_BUILD && utils.logger.warn(`Event dropped due to being internal Sentry Error. +Event: ${utils.getEventDescription(event)}`), !0) : _isIgnoredError(event, options.ignoreErrors) ? (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to being matched by \`ignoreErrors\` option. +Event: ${utils.getEventDescription(event)}` + ), !0) : _isUselessError(event) ? (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to not having an error message, error type or stacktrace. +Event: ${utils.getEventDescription( + event + )}` + ), !0) : _isIgnoredTransaction(event, options.ignoreTransactions) ? (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to being matched by \`ignoreTransactions\` option. +Event: ${utils.getEventDescription(event)}` + ), !0) : _isDeniedUrl(event, options.denyUrls) ? (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to being matched by \`denyUrls\` option. +Event: ${utils.getEventDescription( + event + )}. +Url: ${_getEventFilterUrl(event)}` + ), !0) : _isAllowedUrl(event, options.allowUrls) ? !1 : (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to not being matched by \`allowUrls\` option. +Event: ${utils.getEventDescription( + event + )}. +Url: ${_getEventFilterUrl(event)}` + ), !0); + } + function _isIgnoredError(event, ignoreErrors) { + return event.type || !ignoreErrors || !ignoreErrors.length ? !1 : _getPossibleEventMessages(event).some((message) => utils.stringMatchesSomePattern(message, ignoreErrors)); + } + function _isIgnoredTransaction(event, ignoreTransactions) { + if (event.type !== "transaction" || !ignoreTransactions || !ignoreTransactions.length) + return !1; + let name = event.transaction; + return name ? utils.stringMatchesSomePattern(name, ignoreTransactions) : !1; + } + function _isDeniedUrl(event, denyUrls) { + if (!denyUrls || !denyUrls.length) + return !1; + let url = _getEventFilterUrl(event); + return url ? utils.stringMatchesSomePattern(url, denyUrls) : !1; + } + function _isAllowedUrl(event, allowUrls) { + if (!allowUrls || !allowUrls.length) + return !0; + let url = _getEventFilterUrl(event); + return url ? utils.stringMatchesSomePattern(url, allowUrls) : !0; + } + function _getPossibleEventMessages(event) { + let possibleMessages = []; + event.message && possibleMessages.push(event.message); + let lastException; + try { + lastException = event.exception.values[event.exception.values.length - 1]; + } catch { + } + return lastException && lastException.value && (possibleMessages.push(lastException.value), lastException.type && possibleMessages.push(`${lastException.type}: ${lastException.value}`)), possibleMessages; + } + function _isSentryError(event) { + try { + return event.exception.values[0].type === "SentryError"; + } catch { + } + return !1; + } + function _getLastValidUrl(frames = []) { + for (let i = frames.length - 1; i >= 0; i--) { + let frame = frames[i]; + if (frame && frame.filename !== "" && frame.filename !== "[native code]") + return frame.filename || null; + } + return null; + } + function _getEventFilterUrl(event) { + try { + let frames; + try { + frames = event.exception.values[0].stacktrace.frames; + } catch { + } + return frames ? _getLastValidUrl(frames) : null; + } catch { + return debugBuild.DEBUG_BUILD && utils.logger.error(`Cannot extract url for event ${utils.getEventDescription(event)}`), null; + } + } + function _isUselessError(event) { + return event.type || !event.exception || !event.exception.values || event.exception.values.length === 0 ? !1 : ( + // No top-level message + !event.message && // There are no exception values that have a stacktrace, a non-generic-Error type or value + !event.exception.values.some((value) => value.stacktrace || value.type && value.type !== "Error" || value.value) + ); + } + exports.inboundFiltersIntegration = inboundFiltersIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/linkederrors.js +var require_linkederrors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/linkederrors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), DEFAULT_KEY = "cause", DEFAULT_LIMIT = 5, INTEGRATION_NAME = "LinkedErrors", _linkedErrorsIntegration = (options = {}) => { + let limit = options.limit || DEFAULT_LIMIT, key = options.key || DEFAULT_KEY; + return { + name: INTEGRATION_NAME, + preprocessEvent(event, hint, client) { + let options2 = client.getOptions(); + utils.applyAggregateErrorsToEvent( + utils.exceptionFromError, + options2.stackParser, + options2.maxValueLength, + key, + limit, + event, + hint + ); + } + }; + }, linkedErrorsIntegration = integration.defineIntegration(_linkedErrorsIntegration); + exports.linkedErrorsIntegration = linkedErrorsIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metadata.js +var require_metadata = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metadata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), filenameMetadataMap = /* @__PURE__ */ new Map(), parsedStacks = /* @__PURE__ */ new Set(); + function ensureMetadataStacksAreParsed(parser) { + if (utils.GLOBAL_OBJ._sentryModuleMetadata) + for (let stack of Object.keys(utils.GLOBAL_OBJ._sentryModuleMetadata)) { + let metadata = utils.GLOBAL_OBJ._sentryModuleMetadata[stack]; + if (parsedStacks.has(stack)) + continue; + parsedStacks.add(stack); + let frames = parser(stack); + for (let frame of frames.reverse()) + if (frame.filename) { + filenameMetadataMap.set(frame.filename, metadata); + break; + } + } + } + function getMetadataForUrl(parser, filename) { + return ensureMetadataStacksAreParsed(parser), filenameMetadataMap.get(filename); + } + function addMetadataToStackFrames(parser, event) { + try { + event.exception.values.forEach((exception) => { + if (exception.stacktrace) + for (let frame of exception.stacktrace.frames || []) { + if (!frame.filename || frame.module_metadata) + continue; + let metadata = getMetadataForUrl(parser, frame.filename); + metadata && (frame.module_metadata = metadata); + } + }); + } catch { + } + } + function stripMetadataFromStackFrames(event) { + try { + event.exception.values.forEach((exception) => { + if (exception.stacktrace) + for (let frame of exception.stacktrace.frames || []) + delete frame.module_metadata; + }); + } catch { + } + } + exports.addMetadataToStackFrames = addMetadataToStackFrames; + exports.getMetadataForUrl = getMetadataForUrl; + exports.stripMetadataFromStackFrames = stripMetadataFromStackFrames; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/metadata.js +var require_metadata2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/metadata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), metadata = require_metadata(), INTEGRATION_NAME = "ModuleMetadata", _moduleMetadataIntegration = () => ({ + name: INTEGRATION_NAME, + setup(client) { + client.on("beforeEnvelope", (envelope) => { + utils.forEachEnvelopeItem(envelope, (item, type) => { + if (type === "event") { + let event = Array.isArray(item) ? item[1] : void 0; + event && (metadata.stripMetadataFromStackFrames(event), item[1] = event); + } + }); + }); + }, + processEvent(event, _hint, client) { + let stackParser = client.getOptions().stackParser; + return metadata.addMetadataToStackFrames(stackParser, event), event; + } + }), moduleMetadataIntegration = integration.defineIntegration(_moduleMetadataIntegration); + exports.moduleMetadataIntegration = moduleMetadataIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/requestdata.js +var require_requestdata2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/requestdata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), DEFAULT_OPTIONS = { + include: { + cookies: !0, + data: !0, + headers: !0, + ip: !1, + query_string: !0, + url: !0, + user: { + id: !0, + username: !0, + email: !0 + } + }, + transactionNamingScheme: "methodPath" + }, INTEGRATION_NAME = "RequestData", _requestDataIntegration = (options = {}) => { + let _options = { + ...DEFAULT_OPTIONS, + ...options, + include: { + ...DEFAULT_OPTIONS.include, + ...options.include, + user: options.include && typeof options.include.user == "boolean" ? options.include.user : { + ...DEFAULT_OPTIONS.include.user, + // Unclear why TS still thinks `options.include.user` could be a boolean at this point + ...(options.include || {}).user + } + } + }; + return { + name: INTEGRATION_NAME, + processEvent(event) { + let { sdkProcessingMetadata = {} } = event, req = sdkProcessingMetadata.request; + if (!req) + return event; + let addRequestDataOptions = convertReqDataIntegrationOptsToAddReqDataOpts(_options); + return utils.addRequestDataToEvent(event, req, addRequestDataOptions); + } + }; + }, requestDataIntegration = integration.defineIntegration(_requestDataIntegration); + function convertReqDataIntegrationOptsToAddReqDataOpts(integrationOptions) { + let { + transactionNamingScheme, + include: { ip, user, ...requestOptions } + } = integrationOptions, requestIncludeKeys = ["method"]; + for (let [key, value] of Object.entries(requestOptions)) + value && requestIncludeKeys.push(key); + let addReqDataUserOpt; + if (user === void 0) + addReqDataUserOpt = !0; + else if (typeof user == "boolean") + addReqDataUserOpt = user; + else { + let userIncludeKeys = []; + for (let [key, value] of Object.entries(user)) + value && userIncludeKeys.push(key); + addReqDataUserOpt = userIncludeKeys; + } + return { + include: { + ip, + user: addReqDataUserOpt, + request: requestIncludeKeys.length !== 0 ? requestIncludeKeys : void 0, + transaction: transactionNamingScheme + } + }; + } + exports.requestDataIntegration = requestDataIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/captureconsole.js +var require_captureconsole = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/captureconsole.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), exports$1 = require_exports(), integration = require_integration(), INTEGRATION_NAME = "CaptureConsole", _captureConsoleIntegration = (options = {}) => { + let levels = options.levels || utils.CONSOLE_LEVELS; + return { + name: INTEGRATION_NAME, + setup(client) { + "console" in utils.GLOBAL_OBJ && utils.addConsoleInstrumentationHandler(({ args, level }) => { + currentScopes.getClient() !== client || !levels.includes(level) || consoleHandler(args, level); + }); + } + }; + }, captureConsoleIntegration = integration.defineIntegration(_captureConsoleIntegration); + function consoleHandler(args, level) { + let captureContext = { + level: utils.severityLevelFromString(level), + extra: { + arguments: args + } + }; + currentScopes.withScope((scope) => { + if (scope.addEventProcessor((event) => (event.logger = "console", utils.addExceptionMechanism(event, { + handled: !1, + type: "console" + }), event)), level === "assert") { + if (!args[0]) { + let message2 = `Assertion failed: ${utils.safeJoin(args.slice(1), " ") || "console.assert"}`; + scope.setExtra("arguments", args.slice(1)), exports$1.captureMessage(message2, captureContext); + } + return; + } + let error = args.find((arg) => arg instanceof Error); + if (error) { + exports$1.captureException(error, captureContext); + return; + } + let message = utils.safeJoin(args, " "); + exports$1.captureMessage(message, captureContext); + }); + } + exports.captureConsoleIntegration = captureConsoleIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/debug.js +var require_debug = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/debug.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), INTEGRATION_NAME = "Debug", _debugIntegration = (options = {}) => { + let _options = { + debugger: !1, + stringify: !1, + ...options + }; + return { + name: INTEGRATION_NAME, + setup(client) { + client.on("beforeSendEvent", (event, hint) => { + if (_options.debugger) + debugger; + utils.consoleSandbox(() => { + _options.stringify ? (console.log(JSON.stringify(event, null, 2)), hint && Object.keys(hint).length && console.log(JSON.stringify(hint, null, 2))) : (console.log(event), hint && Object.keys(hint).length && console.log(hint)); + }); + }); + } + }; + }, debugIntegration = integration.defineIntegration(_debugIntegration); + exports.debugIntegration = debugIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/dedupe.js +var require_dedupe = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/dedupe.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), debugBuild = require_debug_build2(), INTEGRATION_NAME = "Dedupe", _dedupeIntegration = () => { + let previousEvent; + return { + name: INTEGRATION_NAME, + processEvent(currentEvent) { + if (currentEvent.type) + return currentEvent; + try { + if (_shouldDropEvent(currentEvent, previousEvent)) + return debugBuild.DEBUG_BUILD && utils.logger.warn("Event dropped due to being a duplicate of previously captured event."), null; + } catch { + } + return previousEvent = currentEvent; + } + }; + }, dedupeIntegration = integration.defineIntegration(_dedupeIntegration); + function _shouldDropEvent(currentEvent, previousEvent) { + return previousEvent ? !!(_isSameMessageEvent(currentEvent, previousEvent) || _isSameExceptionEvent(currentEvent, previousEvent)) : !1; + } + function _isSameMessageEvent(currentEvent, previousEvent) { + let currentMessage = currentEvent.message, previousMessage = previousEvent.message; + return !(!currentMessage && !previousMessage || currentMessage && !previousMessage || !currentMessage && previousMessage || currentMessage !== previousMessage || !_isSameFingerprint(currentEvent, previousEvent) || !_isSameStacktrace(currentEvent, previousEvent)); + } + function _isSameExceptionEvent(currentEvent, previousEvent) { + let previousException = _getExceptionFromEvent(previousEvent), currentException = _getExceptionFromEvent(currentEvent); + return !(!previousException || !currentException || previousException.type !== currentException.type || previousException.value !== currentException.value || !_isSameFingerprint(currentEvent, previousEvent) || !_isSameStacktrace(currentEvent, previousEvent)); + } + function _isSameStacktrace(currentEvent, previousEvent) { + let currentFrames = utils.getFramesFromEvent(currentEvent), previousFrames = utils.getFramesFromEvent(previousEvent); + if (!currentFrames && !previousFrames) + return !0; + if (currentFrames && !previousFrames || !currentFrames && previousFrames || (currentFrames = currentFrames, previousFrames = previousFrames, previousFrames.length !== currentFrames.length)) + return !1; + for (let i = 0; i < previousFrames.length; i++) { + let frameA = previousFrames[i], frameB = currentFrames[i]; + if (frameA.filename !== frameB.filename || frameA.lineno !== frameB.lineno || frameA.colno !== frameB.colno || frameA.function !== frameB.function) + return !1; + } + return !0; + } + function _isSameFingerprint(currentEvent, previousEvent) { + let currentFingerprint = currentEvent.fingerprint, previousFingerprint = previousEvent.fingerprint; + if (!currentFingerprint && !previousFingerprint) + return !0; + if (currentFingerprint && !previousFingerprint || !currentFingerprint && previousFingerprint) + return !1; + currentFingerprint = currentFingerprint, previousFingerprint = previousFingerprint; + try { + return currentFingerprint.join("") === previousFingerprint.join(""); + } catch { + return !1; + } + } + function _getExceptionFromEvent(event) { + return event.exception && event.exception.values && event.exception.values[0]; + } + exports._shouldDropEvent = _shouldDropEvent; + exports.dedupeIntegration = dedupeIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/extraerrordata.js +var require_extraerrordata = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/extraerrordata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), debugBuild = require_debug_build2(), INTEGRATION_NAME = "ExtraErrorData", _extraErrorDataIntegration = (options = {}) => { + let { depth = 3, captureErrorCause = !0 } = options; + return { + name: INTEGRATION_NAME, + processEvent(event, hint) { + return _enhanceEventWithErrorData(event, hint, depth, captureErrorCause); + } + }; + }, extraErrorDataIntegration = integration.defineIntegration(_extraErrorDataIntegration); + function _enhanceEventWithErrorData(event, hint = {}, depth, captureErrorCause) { + if (!hint.originalException || !utils.isError(hint.originalException)) + return event; + let exceptionName = hint.originalException.name || hint.originalException.constructor.name, errorData = _extractErrorData(hint.originalException, captureErrorCause); + if (errorData) { + let contexts = { + ...event.contexts + }, normalizedErrorData = utils.normalize(errorData, depth); + return utils.isPlainObject(normalizedErrorData) && (utils.addNonEnumerableProperty(normalizedErrorData, "__sentry_skip_normalization__", !0), contexts[exceptionName] = normalizedErrorData), { + ...event, + contexts + }; + } + return event; + } + function _extractErrorData(error, captureErrorCause) { + try { + let nativeKeys = [ + "name", + "message", + "stack", + "line", + "column", + "fileName", + "lineNumber", + "columnNumber", + "toJSON" + ], extraErrorInfo = {}; + for (let key of Object.keys(error)) { + if (nativeKeys.indexOf(key) !== -1) + continue; + let value = error[key]; + extraErrorInfo[key] = utils.isError(value) ? value.toString() : value; + } + if (captureErrorCause && error.cause !== void 0 && (extraErrorInfo.cause = utils.isError(error.cause) ? error.cause.toString() : error.cause), typeof error.toJSON == "function") { + let serializedError = error.toJSON(); + for (let key of Object.keys(serializedError)) { + let value = serializedError[key]; + extraErrorInfo[key] = utils.isError(value) ? value.toString() : value; + } + } + return extraErrorInfo; + } catch (oO) { + debugBuild.DEBUG_BUILD && utils.logger.error("Unable to extract extra data from the Error object:", oO); + } + return null; + } + exports.extraErrorDataIntegration = extraErrorDataIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/rewriteframes.js +var require_rewriteframes = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/rewriteframes.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), INTEGRATION_NAME = "RewriteFrames", rewriteFramesIntegration2 = integration.defineIntegration((options = {}) => { + let root = options.root, prefix = options.prefix || "app:///", isBrowser = "window" in utils.GLOBAL_OBJ && utils.GLOBAL_OBJ.window !== void 0, iteratee = options.iteratee || generateIteratee({ isBrowser, root, prefix }); + function _processExceptionsEvent(event) { + try { + return { + ...event, + exception: { + ...event.exception, + // The check for this is performed inside `process` call itself, safe to skip here + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + values: event.exception.values.map((value) => ({ + ...value, + ...value.stacktrace && { stacktrace: _processStacktrace(value.stacktrace) } + })) + } + }; + } catch { + return event; + } + } + function _processStacktrace(stacktrace) { + return { + ...stacktrace, + frames: stacktrace && stacktrace.frames && stacktrace.frames.map((f) => iteratee(f)) + }; + } + return { + name: INTEGRATION_NAME, + processEvent(originalEvent) { + let processedEvent = originalEvent; + return originalEvent.exception && Array.isArray(originalEvent.exception.values) && (processedEvent = _processExceptionsEvent(processedEvent)), processedEvent; + } + }; + }); + function generateIteratee({ + isBrowser, + root, + prefix + }) { + return (frame) => { + if (!frame.filename) + return frame; + let isWindowsFrame = /^[a-zA-Z]:\\/.test(frame.filename) || // or the presence of a backslash without a forward slash (which are not allowed on Windows) + frame.filename.includes("\\") && !frame.filename.includes("/"), startsWithSlash = /^\//.test(frame.filename); + if (isBrowser) { + if (root) { + let oldFilename = frame.filename; + oldFilename.indexOf(root) === 0 && (frame.filename = oldFilename.replace(root, prefix)); + } + } else if (isWindowsFrame || startsWithSlash) { + let filename = isWindowsFrame ? frame.filename.replace(/^[a-zA-Z]:/, "").replace(/\\/g, "/") : frame.filename, base = root ? utils.relative(root, filename) : utils.basename(filename); + frame.filename = `${prefix}${base}`; + } + return frame; + }; + } + exports.generateIteratee = generateIteratee; + exports.rewriteFramesIntegration = rewriteFramesIntegration2; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/sessiontiming.js +var require_sessiontiming = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/sessiontiming.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), INTEGRATION_NAME = "SessionTiming", _sessionTimingIntegration = () => { + let startTime = utils.timestampInSeconds() * 1e3; + return { + name: INTEGRATION_NAME, + processEvent(event) { + let now = utils.timestampInSeconds() * 1e3; + return { + ...event, + extra: { + ...event.extra, + "session:start": startTime, + "session:duration": now - startTime, + "session:end": now + } + }; + } + }; + }, sessionTimingIntegration = integration.defineIntegration(_sessionTimingIntegration); + exports.sessionTimingIntegration = sessionTimingIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/zoderrors.js +var require_zoderrors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/zoderrors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), DEFAULT_LIMIT = 10, INTEGRATION_NAME = "ZodErrors"; + function originalExceptionIsZodError(originalException) { + return utils.isError(originalException) && originalException.name === "ZodError" && Array.isArray(originalException.errors); + } + function formatIssueTitle(issue) { + return { + ...issue, + path: "path" in issue && Array.isArray(issue.path) ? issue.path.join(".") : void 0, + keys: "keys" in issue ? JSON.stringify(issue.keys) : void 0, + unionErrors: "unionErrors" in issue ? JSON.stringify(issue.unionErrors) : void 0 + }; + } + function formatIssueMessage(zodError) { + let errorKeyMap = /* @__PURE__ */ new Set(); + for (let iss of zodError.issues) + iss.path && errorKeyMap.add(iss.path[0]); + let errorKeys = Array.from(errorKeyMap); + return `Failed to validate keys: ${utils.truncate(errorKeys.join(", "), 100)}`; + } + function applyZodErrorsToEvent(limit, event, hint) { + return !event.exception || !event.exception.values || !hint || !hint.originalException || !originalExceptionIsZodError(hint.originalException) || hint.originalException.issues.length === 0 ? event : { + ...event, + exception: { + ...event.exception, + values: [ + { + ...event.exception.values[0], + value: formatIssueMessage(hint.originalException) + }, + ...event.exception.values.slice(1) + ] + }, + extra: { + ...event.extra, + "zoderror.issues": hint.originalException.errors.slice(0, limit).map(formatIssueTitle) + } + }; + } + var _zodErrorsIntegration = (options = {}) => { + let limit = options.limit || DEFAULT_LIMIT; + return { + name: INTEGRATION_NAME, + processEvent(originalEvent, hint) { + return applyZodErrorsToEvent(limit, originalEvent, hint); + } + }; + }, zodErrorsIntegration = integration.defineIntegration(_zodErrorsIntegration); + exports.applyZodErrorsToEvent = applyZodErrorsToEvent; + exports.zodErrorsIntegration = zodErrorsIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/third-party-errors-filter.js +var require_third_party_errors_filter = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/third-party-errors-filter.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), metadata = require_metadata(), thirdPartyErrorFilterIntegration = integration.defineIntegration((options) => ({ + name: "ThirdPartyErrorsFilter", + setup(client) { + client.on("beforeEnvelope", (envelope) => { + utils.forEachEnvelopeItem(envelope, (item, type) => { + if (type === "event") { + let event = Array.isArray(item) ? item[1] : void 0; + event && (metadata.stripMetadataFromStackFrames(event), item[1] = event); + } + }); + }); + }, + processEvent(event, _hint, client) { + let stackParser = client.getOptions().stackParser; + metadata.addMetadataToStackFrames(stackParser, event); + let frameKeys = getBundleKeysForAllFramesWithFilenames(event); + if (frameKeys) { + let arrayMethod = options.behaviour === "drop-error-if-contains-third-party-frames" || options.behaviour === "apply-tag-if-contains-third-party-frames" ? "some" : "every"; + if (frameKeys[arrayMethod]((keys) => !keys.some((key) => options.filterKeys.includes(key)))) { + if (options.behaviour === "drop-error-if-contains-third-party-frames" || options.behaviour === "drop-error-if-exclusively-contains-third-party-frames") + return null; + event.tags = { + ...event.tags, + third_party_code: !0 + }; + } + } + return event; + } + })); + function getBundleKeysForAllFramesWithFilenames(event) { + let frames = utils.getFramesFromEvent(event); + if (frames) + return frames.filter((frame) => !!frame.filename).map((frame) => frame.module_metadata ? Object.keys(frame.module_metadata).filter((key) => key.startsWith(BUNDLER_PLUGIN_APP_KEY_PREFIX)).map((key) => key.slice(BUNDLER_PLUGIN_APP_KEY_PREFIX.length)) : []); + } + var BUNDLER_PLUGIN_APP_KEY_PREFIX = "_sentryBundlerPluginAppKey:"; + exports.thirdPartyErrorFilterIntegration = thirdPartyErrorFilterIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/constants.js +var require_constants2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/constants.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var COUNTER_METRIC_TYPE = "c", GAUGE_METRIC_TYPE = "g", SET_METRIC_TYPE = "s", DISTRIBUTION_METRIC_TYPE = "d", DEFAULT_BROWSER_FLUSH_INTERVAL = 5e3, DEFAULT_FLUSH_INTERVAL = 1e4, MAX_WEIGHT = 1e4; + exports.COUNTER_METRIC_TYPE = COUNTER_METRIC_TYPE; + exports.DEFAULT_BROWSER_FLUSH_INTERVAL = DEFAULT_BROWSER_FLUSH_INTERVAL; + exports.DEFAULT_FLUSH_INTERVAL = DEFAULT_FLUSH_INTERVAL; + exports.DISTRIBUTION_METRIC_TYPE = DISTRIBUTION_METRIC_TYPE; + exports.GAUGE_METRIC_TYPE = GAUGE_METRIC_TYPE; + exports.MAX_WEIGHT = MAX_WEIGHT; + exports.SET_METRIC_TYPE = SET_METRIC_TYPE; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/exports.js +var require_exports2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/exports.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(); + require_errors(); + var spanUtils = require_spanUtils(), trace = require_trace(), handleCallbackErrors = require_handleCallbackErrors(), constants = require_constants2(); + function getMetricsAggregatorForClient(client, Aggregator) { + let globalMetricsAggregators = utils.getGlobalSingleton( + "globalMetricsAggregators", + () => /* @__PURE__ */ new WeakMap() + ), aggregator = globalMetricsAggregators.get(client); + if (aggregator) + return aggregator; + let newAggregator = new Aggregator(client); + return client.on("flush", () => newAggregator.flush()), client.on("close", () => newAggregator.close()), globalMetricsAggregators.set(client, newAggregator), newAggregator; + } + function addToMetricsAggregator(Aggregator, metricType, name, value, data = {}) { + let client = data.client || currentScopes.getClient(); + if (!client) + return; + let span = spanUtils.getActiveSpan(), rootSpan = span ? spanUtils.getRootSpan(span) : void 0, transactionName = rootSpan && spanUtils.spanToJSON(rootSpan).description, { unit, tags, timestamp } = data, { release, environment } = client.getOptions(), metricTags = {}; + release && (metricTags.release = release), environment && (metricTags.environment = environment), transactionName && (metricTags.transaction = transactionName), debugBuild.DEBUG_BUILD && utils.logger.log(`Adding value of ${value} to ${metricType} metric ${name}`), getMetricsAggregatorForClient(client, Aggregator).add(metricType, name, value, unit, { ...metricTags, ...tags }, timestamp); + } + function increment(aggregator, name, value = 1, data) { + addToMetricsAggregator(aggregator, constants.COUNTER_METRIC_TYPE, name, ensureNumber(value), data); + } + function distribution(aggregator, name, value, data) { + addToMetricsAggregator(aggregator, constants.DISTRIBUTION_METRIC_TYPE, name, ensureNumber(value), data); + } + function timing(aggregator, name, value, unit = "second", data) { + if (typeof value == "function") { + let startTime = utils.timestampInSeconds(); + return trace.startSpanManual( + { + op: "metrics.timing", + name, + startTime, + onlyIfParent: !0 + }, + (span) => handleCallbackErrors.handleCallbackErrors( + () => value(), + () => { + }, + () => { + let endTime = utils.timestampInSeconds(), timeDiff = endTime - startTime; + distribution(aggregator, name, timeDiff, { ...data, unit: "second" }), span.end(endTime); + } + ) + ); + } + distribution(aggregator, name, value, { ...data, unit }); + } + function set(aggregator, name, value, data) { + addToMetricsAggregator(aggregator, constants.SET_METRIC_TYPE, name, value, data); + } + function gauge(aggregator, name, value, data) { + addToMetricsAggregator(aggregator, constants.GAUGE_METRIC_TYPE, name, ensureNumber(value), data); + } + var metrics = { + increment, + distribution, + set, + gauge, + timing, + /** + * @ignore This is for internal use only. + */ + getMetricsAggregatorForClient + }; + function ensureNumber(number) { + return typeof number == "string" ? parseInt(number) : number; + } + exports.metrics = metrics; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/utils.js +var require_utils2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/utils.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function getBucketKey(metricType, name, unit, tags) { + let stringifiedTags = Object.entries(utils.dropUndefinedKeys(tags)).sort((a, b) => a[0].localeCompare(b[0])); + return `${metricType}${name}${unit}${stringifiedTags}`; + } + function simpleHash(s) { + let rv = 0; + for (let i = 0; i < s.length; i++) { + let c = s.charCodeAt(i); + rv = (rv << 5) - rv + c, rv &= rv; + } + return rv >>> 0; + } + function serializeMetricBuckets(metricBucketItems) { + let out = ""; + for (let item of metricBucketItems) { + let tagEntries = Object.entries(item.tags), maybeTags = tagEntries.length > 0 ? `|#${tagEntries.map(([key, value]) => `${key}:${value}`).join(",")}` : ""; + out += `${item.name}@${item.unit}:${item.metric}|${item.metricType}${maybeTags}|T${item.timestamp} +`; + } + return out; + } + function sanitizeUnit(unit) { + return unit.replace(/[^\w]+/gi, "_"); + } + function sanitizeMetricKey(key) { + return key.replace(/[^\w\-.]+/gi, "_"); + } + function sanitizeTagKey(key) { + return key.replace(/[^\w\-./]+/gi, ""); + } + var tagValueReplacements = [ + [` +`, "\\n"], + ["\r", "\\r"], + [" ", "\\t"], + ["\\", "\\\\"], + ["|", "\\u{7c}"], + [",", "\\u{2c}"] + ]; + function getCharOrReplacement(input) { + for (let [search, replacement] of tagValueReplacements) + if (input === search) + return replacement; + return input; + } + function sanitizeTagValue(value) { + return [...value].reduce((acc, char) => acc + getCharOrReplacement(char), ""); + } + function sanitizeTags(unsanitizedTags) { + let tags = {}; + for (let key in unsanitizedTags) + if (Object.prototype.hasOwnProperty.call(unsanitizedTags, key)) { + let sanitizedKey = sanitizeTagKey(key); + tags[sanitizedKey] = sanitizeTagValue(String(unsanitizedTags[key])); + } + return tags; + } + exports.getBucketKey = getBucketKey; + exports.sanitizeMetricKey = sanitizeMetricKey; + exports.sanitizeTags = sanitizeTags; + exports.sanitizeUnit = sanitizeUnit; + exports.serializeMetricBuckets = serializeMetricBuckets; + exports.simpleHash = simpleHash; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/envelope.js +var require_envelope3 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/envelope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), utils$1 = require_utils2(); + function captureAggregateMetrics(client, metricBucketItems) { + utils.logger.log(`Flushing aggregated metrics, number of metrics: ${metricBucketItems.length}`); + let dsn = client.getDsn(), metadata = client.getSdkMetadata(), tunnel = client.getOptions().tunnel, metricsEnvelope = createMetricEnvelope(metricBucketItems, dsn, metadata, tunnel); + client.sendEnvelope(metricsEnvelope); + } + function createMetricEnvelope(metricBucketItems, dsn, metadata, tunnel) { + let headers = { + sent_at: (/* @__PURE__ */ new Date()).toISOString() + }; + metadata && metadata.sdk && (headers.sdk = { + name: metadata.sdk.name, + version: metadata.sdk.version + }), tunnel && dsn && (headers.dsn = utils.dsnToString(dsn)); + let item = createMetricEnvelopeItem(metricBucketItems); + return utils.createEnvelope(headers, [item]); + } + function createMetricEnvelopeItem(metricBucketItems) { + let payload = utils$1.serializeMetricBuckets(metricBucketItems); + return [{ + type: "statsd", + length: payload.length + }, payload]; + } + exports.captureAggregateMetrics = captureAggregateMetrics; + exports.createMetricEnvelope = createMetricEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/instance.js +var require_instance = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/instance.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var constants = require_constants2(), utils = require_utils2(), CounterMetric = class { + constructor(_value) { + this._value = _value; + } + /** @inheritDoc */ + get weight() { + return 1; + } + /** @inheritdoc */ + add(value) { + this._value += value; + } + /** @inheritdoc */ + toString() { + return `${this._value}`; + } + }, GaugeMetric = class { + constructor(value) { + this._last = value, this._min = value, this._max = value, this._sum = value, this._count = 1; + } + /** @inheritDoc */ + get weight() { + return 5; + } + /** @inheritdoc */ + add(value) { + this._last = value, value < this._min && (this._min = value), value > this._max && (this._max = value), this._sum += value, this._count++; + } + /** @inheritdoc */ + toString() { + return `${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`; + } + }, DistributionMetric = class { + constructor(first) { + this._value = [first]; + } + /** @inheritDoc */ + get weight() { + return this._value.length; + } + /** @inheritdoc */ + add(value) { + this._value.push(value); + } + /** @inheritdoc */ + toString() { + return this._value.join(":"); + } + }, SetMetric = class { + constructor(first) { + this.first = first, this._value = /* @__PURE__ */ new Set([first]); + } + /** @inheritDoc */ + get weight() { + return this._value.size; + } + /** @inheritdoc */ + add(value) { + this._value.add(value); + } + /** @inheritdoc */ + toString() { + return Array.from(this._value).map((val) => typeof val == "string" ? utils.simpleHash(val) : val).join(":"); + } + }, METRIC_MAP = { + [constants.COUNTER_METRIC_TYPE]: CounterMetric, + [constants.GAUGE_METRIC_TYPE]: GaugeMetric, + [constants.DISTRIBUTION_METRIC_TYPE]: DistributionMetric, + [constants.SET_METRIC_TYPE]: SetMetric + }; + exports.CounterMetric = CounterMetric; + exports.DistributionMetric = DistributionMetric; + exports.GaugeMetric = GaugeMetric; + exports.METRIC_MAP = METRIC_MAP; + exports.SetMetric = SetMetric; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/aggregator.js +var require_aggregator = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/aggregator.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils$1 = require_cjs(), spanUtils = require_spanUtils(), constants = require_constants2(), envelope = require_envelope3(), instance = require_instance(), utils = require_utils2(), MetricsAggregator = class { + // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets + // when the aggregator is garbage collected. + // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry + // Different metrics have different weights. We use this to limit the number of metrics + // that we store in memory. + // Cast to any so that it can use Node.js timeout + // eslint-disable-next-line @typescript-eslint/no-explicit-any + // SDKs are required to shift the flush interval by random() * rollup_in_seconds. + // That shift is determined once per startup to create jittering. + // An SDK is required to perform force flushing ahead of scheduled time if the memory + // pressure is too high. There is no rule for this other than that SDKs should be tracking + // abstract aggregation complexity (eg: a counter only carries a single float, whereas a + // distribution is a float per emission). + // + // Force flush is used on either shutdown, flush() or when we exceed the max weight. + constructor(_client) { + this._client = _client, this._buckets = /* @__PURE__ */ new Map(), this._bucketsTotalWeight = 0, this._interval = setInterval(() => this._flush(), constants.DEFAULT_FLUSH_INTERVAL), this._interval.unref && this._interval.unref(), this._flushShift = Math.floor(Math.random() * constants.DEFAULT_FLUSH_INTERVAL / 1e3), this._forceFlush = !1; + } + /** + * @inheritDoc + */ + add(metricType, unsanitizedName, value, unsanitizedUnit = "none", unsanitizedTags = {}, maybeFloatTimestamp = utils$1.timestampInSeconds()) { + let timestamp = Math.floor(maybeFloatTimestamp), name = utils.sanitizeMetricKey(unsanitizedName), tags = utils.sanitizeTags(unsanitizedTags), unit = utils.sanitizeUnit(unsanitizedUnit), bucketKey = utils.getBucketKey(metricType, name, unit, tags), bucketItem = this._buckets.get(bucketKey), previousWeight = bucketItem && metricType === constants.SET_METRIC_TYPE ? bucketItem.metric.weight : 0; + bucketItem ? (bucketItem.metric.add(value), bucketItem.timestamp < timestamp && (bucketItem.timestamp = timestamp)) : (bucketItem = { + // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size. + metric: new instance.METRIC_MAP[metricType](value), + timestamp, + metricType, + name, + unit, + tags + }, this._buckets.set(bucketKey, bucketItem)); + let val = typeof value == "string" ? bucketItem.metric.weight - previousWeight : value; + spanUtils.updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey), this._bucketsTotalWeight += bucketItem.metric.weight, this._bucketsTotalWeight >= constants.MAX_WEIGHT && this.flush(); + } + /** + * Flushes the current metrics to the transport via the transport. + */ + flush() { + this._forceFlush = !0, this._flush(); + } + /** + * Shuts down metrics aggregator and clears all metrics. + */ + close() { + this._forceFlush = !0, clearInterval(this._interval), this._flush(); + } + /** + * Flushes the buckets according to the internal state of the aggregator. + * If it is a force flush, which happens on shutdown, it will flush all buckets. + * Otherwise, it will only flush buckets that are older than the flush interval, + * and according to the flush shift. + * + * This function mutates `_forceFlush` and `_bucketsTotalWeight` properties. + */ + _flush() { + if (this._forceFlush) { + this._forceFlush = !1, this._bucketsTotalWeight = 0, this._captureMetrics(this._buckets), this._buckets.clear(); + return; + } + let cutoffSeconds = Math.floor(utils$1.timestampInSeconds()) - constants.DEFAULT_FLUSH_INTERVAL / 1e3 - this._flushShift, flushedBuckets = /* @__PURE__ */ new Map(); + for (let [key, bucket] of this._buckets) + bucket.timestamp <= cutoffSeconds && (flushedBuckets.set(key, bucket), this._bucketsTotalWeight -= bucket.metric.weight); + for (let [key] of flushedBuckets) + this._buckets.delete(key); + this._captureMetrics(flushedBuckets); + } + /** + * Only captures a subset of the buckets passed to this function. + * @param flushedBuckets + */ + _captureMetrics(flushedBuckets) { + if (flushedBuckets.size > 0) { + let buckets = Array.from(flushedBuckets).map(([, bucketItem]) => bucketItem); + envelope.captureAggregateMetrics(this._client, buckets); + } + } + }; + exports.MetricsAggregator = MetricsAggregator; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/exports-default.js +var require_exports_default = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/exports-default.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var aggregator = require_aggregator(), exports$1 = require_exports2(); + function increment(name, value = 1, data) { + exports$1.metrics.increment(aggregator.MetricsAggregator, name, value, data); + } + function distribution(name, value, data) { + exports$1.metrics.distribution(aggregator.MetricsAggregator, name, value, data); + } + function set(name, value, data) { + exports$1.metrics.set(aggregator.MetricsAggregator, name, value, data); + } + function gauge(name, value, data) { + exports$1.metrics.gauge(aggregator.MetricsAggregator, name, value, data); + } + function timing(name, value, unit = "second", data) { + return exports$1.metrics.timing(aggregator.MetricsAggregator, name, value, unit, data); + } + function getMetricsAggregatorForClient(client) { + return exports$1.metrics.getMetricsAggregatorForClient(client, aggregator.MetricsAggregator); + } + var metricsDefault = { + increment, + distribution, + set, + gauge, + timing, + /** + * @ignore This is for internal use only. + */ + getMetricsAggregatorForClient + }; + exports.metricsDefault = metricsDefault; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/browser-aggregator.js +var require_browser_aggregator = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/browser-aggregator.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils$1 = require_cjs(), spanUtils = require_spanUtils(), constants = require_constants2(), envelope = require_envelope3(), instance = require_instance(), utils = require_utils2(), BrowserMetricsAggregator = class { + // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets + // when the aggregator is garbage collected. + // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry + constructor(_client) { + this._client = _client, this._buckets = /* @__PURE__ */ new Map(), this._interval = setInterval(() => this.flush(), constants.DEFAULT_BROWSER_FLUSH_INTERVAL); + } + /** + * @inheritDoc + */ + add(metricType, unsanitizedName, value, unsanitizedUnit = "none", unsanitizedTags = {}, maybeFloatTimestamp = utils$1.timestampInSeconds()) { + let timestamp = Math.floor(maybeFloatTimestamp), name = utils.sanitizeMetricKey(unsanitizedName), tags = utils.sanitizeTags(unsanitizedTags), unit = utils.sanitizeUnit(unsanitizedUnit), bucketKey = utils.getBucketKey(metricType, name, unit, tags), bucketItem = this._buckets.get(bucketKey), previousWeight = bucketItem && metricType === constants.SET_METRIC_TYPE ? bucketItem.metric.weight : 0; + bucketItem ? (bucketItem.metric.add(value), bucketItem.timestamp < timestamp && (bucketItem.timestamp = timestamp)) : (bucketItem = { + // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size. + metric: new instance.METRIC_MAP[metricType](value), + timestamp, + metricType, + name, + unit, + tags + }, this._buckets.set(bucketKey, bucketItem)); + let val = typeof value == "string" ? bucketItem.metric.weight - previousWeight : value; + spanUtils.updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey); + } + /** + * @inheritDoc + */ + flush() { + if (this._buckets.size === 0) + return; + let metricBuckets = Array.from(this._buckets.values()); + envelope.captureAggregateMetrics(this._client, metricBuckets), this._buckets.clear(); + } + /** + * @inheritDoc + */ + close() { + clearInterval(this._interval), this.flush(); + } + }; + exports.BrowserMetricsAggregator = BrowserMetricsAggregator; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/fetch.js +var require_fetch2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/fetch.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), semanticAttributes = require_semanticAttributes(); + require_errors(); + require_debug_build2(); + var hasTracingEnabled = require_hasTracingEnabled(), spanUtils = require_spanUtils(), sentryNonRecordingSpan = require_sentryNonRecordingSpan(), spanstatus = require_spanstatus(), trace = require_trace(), dynamicSamplingContext = require_dynamicSamplingContext(); + function instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeaders, spans, spanOrigin = "auto.http.browser") { + if (!handlerData.fetchData) + return; + let shouldCreateSpanResult = hasTracingEnabled.hasTracingEnabled() && shouldCreateSpan(handlerData.fetchData.url); + if (handlerData.endTimestamp && shouldCreateSpanResult) { + let spanId = handlerData.fetchData.__span; + if (!spanId) return; + let span2 = spans[spanId]; + span2 && (endSpan(span2, handlerData), delete spans[spanId]); + return; + } + let scope = currentScopes.getCurrentScope(), client = currentScopes.getClient(), { method, url } = handlerData.fetchData, fullUrl = getFullURL(url), host = fullUrl ? utils.parseUrl(fullUrl).host : void 0, hasParent = !!spanUtils.getActiveSpan(), span = shouldCreateSpanResult && hasParent ? trace.startInactiveSpan({ + name: `${method} ${url}`, + attributes: { + url, + type: "fetch", + "http.method": method, + "http.url": fullUrl, + "server.address": host, + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin, + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP]: "http.client" + } + }) : new sentryNonRecordingSpan.SentryNonRecordingSpan(); + if (handlerData.fetchData.__span = span.spanContext().spanId, spans[span.spanContext().spanId] = span, shouldAttachHeaders(handlerData.fetchData.url) && client) { + let request = handlerData.args[0]; + handlerData.args[1] = handlerData.args[1] || {}; + let options = handlerData.args[1]; + options.headers = addTracingHeadersToFetchRequest( + request, + client, + scope, + options, + // If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction), + // we do not want to use the span as base for the trace headers, + // which means that the headers will be generated from the scope and the sampling decision is deferred + hasTracingEnabled.hasTracingEnabled() && hasParent ? span : void 0 + ); + } + return span; + } + function addTracingHeadersToFetchRequest(request, client, scope, options, span) { + let isolationScope = currentScopes.getIsolationScope(), { traceId, spanId, sampled, dsc } = { + ...isolationScope.getPropagationContext(), + ...scope.getPropagationContext() + }, sentryTraceHeader = span ? spanUtils.spanToTraceHeader(span) : utils.generateSentryTraceHeader(traceId, spanId, sampled), sentryBaggageHeader = utils.dynamicSamplingContextToSentryBaggageHeader( + dsc || (span ? dynamicSamplingContext.getDynamicSamplingContextFromSpan(span) : dynamicSamplingContext.getDynamicSamplingContextFromClient(traceId, client)) + ), headers = options.headers || (typeof Request < "u" && utils.isInstanceOf(request, Request) ? request.headers : void 0); + if (headers) + if (typeof Headers < "u" && utils.isInstanceOf(headers, Headers)) { + let newHeaders = new Headers(headers); + return newHeaders.append("sentry-trace", sentryTraceHeader), sentryBaggageHeader && newHeaders.append(utils.BAGGAGE_HEADER_NAME, sentryBaggageHeader), newHeaders; + } else if (Array.isArray(headers)) { + let newHeaders = [...headers, ["sentry-trace", sentryTraceHeader]]; + return sentryBaggageHeader && newHeaders.push([utils.BAGGAGE_HEADER_NAME, sentryBaggageHeader]), newHeaders; + } else { + let existingBaggageHeader = "baggage" in headers ? headers.baggage : void 0, newBaggageHeaders = []; + return Array.isArray(existingBaggageHeader) ? newBaggageHeaders.push(...existingBaggageHeader) : existingBaggageHeader && newBaggageHeaders.push(existingBaggageHeader), sentryBaggageHeader && newBaggageHeaders.push(sentryBaggageHeader), { + ...headers, + "sentry-trace": sentryTraceHeader, + baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(",") : void 0 + }; + } + else return { "sentry-trace": sentryTraceHeader, baggage: sentryBaggageHeader }; + } + function getFullURL(url) { + try { + return new URL(url).href; + } catch { + return; + } + } + function endSpan(span, handlerData) { + if (handlerData.response) { + spanstatus.setHttpStatus(span, handlerData.response.status); + let contentLength = handlerData.response && handlerData.response.headers && handlerData.response.headers.get("content-length"); + if (contentLength) { + let contentLengthNum = parseInt(contentLength); + contentLengthNum > 0 && span.setAttribute("http.response_content_length", contentLengthNum); + } + } else handlerData.error && span.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "internal_error" }); + span.end(); + } + exports.addTracingHeadersToFetchRequest = addTracingHeadersToFetchRequest; + exports.instrumentFetchRequest = instrumentFetchRequest; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/trpc.js +var require_trpc = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/trpc.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), exports$1 = require_exports(), semanticAttributes = require_semanticAttributes(); + require_errors(); + require_debug_build2(); + var trace = require_trace(), trpcCaptureContext = { mechanism: { handled: !1, data: { function: "trpcMiddleware" } } }; + function trpcMiddleware(options = {}) { + return function(opts) { + let { path, type, next, rawInput } = opts, client = currentScopes.getClient(), clientOptions = client && client.getOptions(), trpcContext = { + procedure_type: type + }; + (options.attachRpcInput !== void 0 ? options.attachRpcInput : clientOptions && clientOptions.sendDefaultPii) && (trpcContext.input = utils.normalize(rawInput)), exports$1.setContext("trpc", trpcContext); + function captureIfError(nextResult) { + typeof nextResult == "object" && nextResult !== null && "ok" in nextResult && !nextResult.ok && "error" in nextResult && exports$1.captureException(nextResult.error, trpcCaptureContext); + } + return trace.startSpanManual( + { + name: `trpc/${path}`, + op: "rpc.server", + attributes: { + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "route", + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.rpc.trpc" + } + }, + (span) => { + let maybePromiseResult; + try { + maybePromiseResult = next(); + } catch (e) { + throw exports$1.captureException(e, trpcCaptureContext), span.end(), e; + } + return utils.isThenable(maybePromiseResult) ? maybePromiseResult.then( + (nextResult) => (captureIfError(nextResult), span.end(), nextResult), + (e) => { + throw exports$1.captureException(e, trpcCaptureContext), span.end(), e; + } + ) : (captureIfError(maybePromiseResult), span.end(), maybePromiseResult); + } + ); + }; + } + exports.trpcMiddleware = trpcMiddleware; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/feedback.js +var require_feedback = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/feedback.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(); + function captureFeedback(feedbackParams, hint = {}, scope = currentScopes.getCurrentScope()) { + let { message, name, email, url, source, associatedEventId } = feedbackParams, feedbackEvent = { + contexts: { + feedback: utils.dropUndefinedKeys({ + contact_email: email, + name, + message, + url, + source, + associated_event_id: associatedEventId + }) + }, + type: "feedback", + level: "info" + }, client = scope && scope.getClient() || currentScopes.getClient(); + return client && client.emit("beforeSendFeedback", feedbackEvent, hint), scope.captureEvent(feedbackEvent, hint); + } + exports.captureFeedback = captureFeedback; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/getCurrentHubShim.js +var require_getCurrentHubShim = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/getCurrentHubShim.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var breadcrumbs = require_breadcrumbs(), currentScopes = require_currentScopes(), exports$1 = require_exports(); + function getCurrentHubShim() { + return { + bindClient(client) { + currentScopes.getCurrentScope().setClient(client); + }, + withScope: currentScopes.withScope, + getClient: () => currentScopes.getClient(), + getScope: currentScopes.getCurrentScope, + getIsolationScope: currentScopes.getIsolationScope, + captureException: (exception, hint) => currentScopes.getCurrentScope().captureException(exception, hint), + captureMessage: (message, level, hint) => currentScopes.getCurrentScope().captureMessage(message, level, hint), + captureEvent: exports$1.captureEvent, + addBreadcrumb: breadcrumbs.addBreadcrumb, + setUser: exports$1.setUser, + setTags: exports$1.setTags, + setTag: exports$1.setTag, + setExtra: exports$1.setExtra, + setExtras: exports$1.setExtras, + setContext: exports$1.setContext, + getIntegration(integration) { + let client = currentScopes.getClient(); + return client && client.getIntegrationByName(integration.id) || null; + }, + startSession: exports$1.startSession, + endSession: exports$1.endSession, + captureSession(end) { + if (end) + return exports$1.endSession(); + _sendSessionUpdate(); + } + }; + } + var getCurrentHub = getCurrentHubShim; + function _sendSessionUpdate() { + let scope = currentScopes.getCurrentScope(), client = currentScopes.getClient(), session = scope.getSession(); + client && session && client.captureSession(session); + } + exports.getCurrentHub = getCurrentHub; + exports.getCurrentHubShim = getCurrentHubShim; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/index.js +var require_cjs2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var errors = require_errors(), utils$1 = require_utils(), hubextensions = require_hubextensions(), idleSpan = require_idleSpan(), sentrySpan = require_sentrySpan(), sentryNonRecordingSpan = require_sentryNonRecordingSpan(), spanstatus = require_spanstatus(), trace = require_trace(), dynamicSamplingContext = require_dynamicSamplingContext(), measurement = require_measurement(), sampling = require_sampling(), logSpans = require_logSpans(), semanticAttributes = require_semanticAttributes(), envelope = require_envelope2(), exports$1 = require_exports(), currentScopes = require_currentScopes(), defaultScopes = require_defaultScopes(), index = require_asyncContext(), carrier = require_carrier(), session = require_session(), sessionflusher = require_sessionflusher(), scope = require_scope(), eventProcessors = require_eventProcessors(), api = require_api(), baseclient = require_baseclient(), serverRuntimeClient = require_server_runtime_client(), sdk = require_sdk(), base = require_base(), offline = require_offline(), multiplexed = require_multiplexed(), integration = require_integration(), applyScopeDataToEvent = require_applyScopeDataToEvent(), prepareEvent = require_prepareEvent(), checkin = require_checkin(), hasTracingEnabled = require_hasTracingEnabled(), isSentryRequestUrl = require_isSentryRequestUrl(), handleCallbackErrors = require_handleCallbackErrors(), parameterize = require_parameterize(), spanUtils = require_spanUtils(), parseSampleRate = require_parseSampleRate(), sdkMetadata = require_sdkMetadata(), constants = require_constants(), breadcrumbs = require_breadcrumbs(), functiontostring = require_functiontostring(), inboundfilters = require_inboundfilters(), linkederrors = require_linkederrors(), metadata = require_metadata2(), requestdata = require_requestdata2(), captureconsole = require_captureconsole(), debug = require_debug(), dedupe = require_dedupe(), extraerrordata = require_extraerrordata(), rewriteframes = require_rewriteframes(), sessiontiming = require_sessiontiming(), zoderrors = require_zoderrors(), thirdPartyErrorsFilter = require_third_party_errors_filter(), exports$2 = require_exports2(), exportsDefault = require_exports_default(), browserAggregator = require_browser_aggregator(), metricSummary = require_metric_summary(), fetch2 = require_fetch2(), trpc = require_trpc(), feedback = require_feedback(), getCurrentHubShim = require_getCurrentHubShim(), utils = require_cjs(); + exports.registerSpanErrorInstrumentation = errors.registerSpanErrorInstrumentation; + exports.getCapturedScopesOnSpan = utils$1.getCapturedScopesOnSpan; + exports.setCapturedScopesOnSpan = utils$1.setCapturedScopesOnSpan; + exports.addTracingExtensions = hubextensions.addTracingExtensions; + exports.TRACING_DEFAULTS = idleSpan.TRACING_DEFAULTS; + exports.startIdleSpan = idleSpan.startIdleSpan; + exports.SentrySpan = sentrySpan.SentrySpan; + exports.SentryNonRecordingSpan = sentryNonRecordingSpan.SentryNonRecordingSpan; + exports.SPAN_STATUS_ERROR = spanstatus.SPAN_STATUS_ERROR; + exports.SPAN_STATUS_OK = spanstatus.SPAN_STATUS_OK; + exports.SPAN_STATUS_UNSET = spanstatus.SPAN_STATUS_UNSET; + exports.getSpanStatusFromHttpCode = spanstatus.getSpanStatusFromHttpCode; + exports.setHttpStatus = spanstatus.setHttpStatus; + exports.continueTrace = trace.continueTrace; + exports.startInactiveSpan = trace.startInactiveSpan; + exports.startNewTrace = trace.startNewTrace; + exports.startSpan = trace.startSpan; + exports.startSpanManual = trace.startSpanManual; + exports.suppressTracing = trace.suppressTracing; + exports.withActiveSpan = trace.withActiveSpan; + exports.getDynamicSamplingContextFromClient = dynamicSamplingContext.getDynamicSamplingContextFromClient; + exports.getDynamicSamplingContextFromSpan = dynamicSamplingContext.getDynamicSamplingContextFromSpan; + exports.spanToBaggageHeader = dynamicSamplingContext.spanToBaggageHeader; + exports.setMeasurement = measurement.setMeasurement; + exports.timedEventsToMeasurements = measurement.timedEventsToMeasurements; + exports.sampleSpan = sampling.sampleSpan; + exports.logSpanEnd = logSpans.logSpanEnd; + exports.logSpanStart = logSpans.logSpanStart; + exports.SEMANTIC_ATTRIBUTE_CACHE_HIT = semanticAttributes.SEMANTIC_ATTRIBUTE_CACHE_HIT; + exports.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = semanticAttributes.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE; + exports.SEMANTIC_ATTRIBUTE_CACHE_KEY = semanticAttributes.SEMANTIC_ATTRIBUTE_CACHE_KEY; + exports.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = semanticAttributes.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME; + exports.SEMANTIC_ATTRIBUTE_PROFILE_ID = semanticAttributes.SEMANTIC_ATTRIBUTE_PROFILE_ID; + exports.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON; + exports.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT; + exports.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE; + exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP; + exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN; + exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE; + exports.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE; + exports.createEventEnvelope = envelope.createEventEnvelope; + exports.createSessionEnvelope = envelope.createSessionEnvelope; + exports.createSpanEnvelope = envelope.createSpanEnvelope; + exports.addEventProcessor = exports$1.addEventProcessor; + exports.captureCheckIn = exports$1.captureCheckIn; + exports.captureEvent = exports$1.captureEvent; + exports.captureException = exports$1.captureException; + exports.captureMessage = exports$1.captureMessage; + exports.captureSession = exports$1.captureSession; + exports.close = exports$1.close; + exports.endSession = exports$1.endSession; + exports.flush = exports$1.flush; + exports.isEnabled = exports$1.isEnabled; + exports.isInitialized = exports$1.isInitialized; + exports.lastEventId = exports$1.lastEventId; + exports.setContext = exports$1.setContext; + exports.setExtra = exports$1.setExtra; + exports.setExtras = exports$1.setExtras; + exports.setTag = exports$1.setTag; + exports.setTags = exports$1.setTags; + exports.setUser = exports$1.setUser; + exports.startSession = exports$1.startSession; + exports.withMonitor = exports$1.withMonitor; + exports.getClient = currentScopes.getClient; + exports.getCurrentScope = currentScopes.getCurrentScope; + exports.getGlobalScope = currentScopes.getGlobalScope; + exports.getIsolationScope = currentScopes.getIsolationScope; + exports.withIsolationScope = currentScopes.withIsolationScope; + exports.withScope = currentScopes.withScope; + exports.getDefaultCurrentScope = defaultScopes.getDefaultCurrentScope; + exports.getDefaultIsolationScope = defaultScopes.getDefaultIsolationScope; + exports.setAsyncContextStrategy = index.setAsyncContextStrategy; + exports.getMainCarrier = carrier.getMainCarrier; + exports.closeSession = session.closeSession; + exports.makeSession = session.makeSession; + exports.updateSession = session.updateSession; + exports.SessionFlusher = sessionflusher.SessionFlusher; + exports.Scope = scope.Scope; + exports.notifyEventProcessors = eventProcessors.notifyEventProcessors; + exports.getEnvelopeEndpointWithUrlEncodedAuth = api.getEnvelopeEndpointWithUrlEncodedAuth; + exports.getReportDialogEndpoint = api.getReportDialogEndpoint; + exports.BaseClient = baseclient.BaseClient; + exports.ServerRuntimeClient = serverRuntimeClient.ServerRuntimeClient; + exports.initAndBind = sdk.initAndBind; + exports.setCurrentClient = sdk.setCurrentClient; + exports.createTransport = base.createTransport; + exports.makeOfflineTransport = offline.makeOfflineTransport; + exports.makeMultiplexedTransport = multiplexed.makeMultiplexedTransport; + exports.addIntegration = integration.addIntegration; + exports.defineIntegration = integration.defineIntegration; + exports.getIntegrationsToSetup = integration.getIntegrationsToSetup; + exports.applyScopeDataToEvent = applyScopeDataToEvent.applyScopeDataToEvent; + exports.mergeScopeData = applyScopeDataToEvent.mergeScopeData; + exports.prepareEvent = prepareEvent.prepareEvent; + exports.createCheckInEnvelope = checkin.createCheckInEnvelope; + exports.hasTracingEnabled = hasTracingEnabled.hasTracingEnabled; + exports.isSentryRequestUrl = isSentryRequestUrl.isSentryRequestUrl; + exports.handleCallbackErrors = handleCallbackErrors.handleCallbackErrors; + exports.parameterize = parameterize.parameterize; + exports.addChildSpanToSpan = spanUtils.addChildSpanToSpan; + exports.getActiveSpan = spanUtils.getActiveSpan; + exports.getRootSpan = spanUtils.getRootSpan; + exports.getSpanDescendants = spanUtils.getSpanDescendants; + exports.getStatusMessage = spanUtils.getStatusMessage; + exports.spanIsSampled = spanUtils.spanIsSampled; + exports.spanToJSON = spanUtils.spanToJSON; + exports.spanToTraceContext = spanUtils.spanToTraceContext; + exports.spanToTraceHeader = spanUtils.spanToTraceHeader; + exports.parseSampleRate = parseSampleRate.parseSampleRate; + exports.applySdkMetadata = sdkMetadata.applySdkMetadata; + exports.DEFAULT_ENVIRONMENT = constants.DEFAULT_ENVIRONMENT; + exports.addBreadcrumb = breadcrumbs.addBreadcrumb; + exports.functionToStringIntegration = functiontostring.functionToStringIntegration; + exports.inboundFiltersIntegration = inboundfilters.inboundFiltersIntegration; + exports.linkedErrorsIntegration = linkederrors.linkedErrorsIntegration; + exports.moduleMetadataIntegration = metadata.moduleMetadataIntegration; + exports.requestDataIntegration = requestdata.requestDataIntegration; + exports.captureConsoleIntegration = captureconsole.captureConsoleIntegration; + exports.debugIntegration = debug.debugIntegration; + exports.dedupeIntegration = dedupe.dedupeIntegration; + exports.extraErrorDataIntegration = extraerrordata.extraErrorDataIntegration; + exports.rewriteFramesIntegration = rewriteframes.rewriteFramesIntegration; + exports.sessionTimingIntegration = sessiontiming.sessionTimingIntegration; + exports.zodErrorsIntegration = zoderrors.zodErrorsIntegration; + exports.thirdPartyErrorFilterIntegration = thirdPartyErrorsFilter.thirdPartyErrorFilterIntegration; + exports.metrics = exports$2.metrics; + exports.metricsDefault = exportsDefault.metricsDefault; + exports.BrowserMetricsAggregator = browserAggregator.BrowserMetricsAggregator; + exports.getMetricSummaryJsonForSpan = metricSummary.getMetricSummaryJsonForSpan; + exports.addTracingHeadersToFetchRequest = fetch2.addTracingHeadersToFetchRequest; + exports.instrumentFetchRequest = fetch2.instrumentFetchRequest; + exports.trpcMiddleware = trpc.trpcMiddleware; + exports.captureFeedback = feedback.captureFeedback; + exports.getCurrentHub = getCurrentHubShim.getCurrentHub; + exports.getCurrentHubShim = getCurrentHubShim.getCurrentHubShim; + exports.SDK_VERSION = utils.SDK_VERSION; + } +}); + +// ../../node_modules/.pnpm/toucan-js@4.0.0_patch_hash=qxsfpdzvzbhq2ecirbu5xq4vlq/node_modules/toucan-js/dist/index.cjs.js +var require_index_cjs = __commonJS({ + "../../node_modules/.pnpm/toucan-js@4.0.0_patch_hash=qxsfpdzvzbhq2ecirbu5xq4vlq/node_modules/toucan-js/dist/index.cjs.js"(exports) { + "use strict"; + var utils = require_cjs(), core = require_cjs2(); + function isObject(value) { + return typeof value == "object" && value !== null; + } + function isMechanism(value) { + return isObject(value) && "handled" in value && typeof value.handled == "boolean" && "type" in value && typeof value.type == "string"; + } + function containsMechanism(value) { + return isObject(value) && "mechanism" in value && isMechanism(value.mechanism); + } + function getSentryRelease() { + if (utils.GLOBAL_OBJ.SENTRY_RELEASE && utils.GLOBAL_OBJ.SENTRY_RELEASE.id) + return utils.GLOBAL_OBJ.SENTRY_RELEASE.id; + } + function setOnOptional(target, entry) { + return target !== void 0 ? (target[entry[0]] = entry[1], target) : { [entry[0]]: entry[1] }; + } + function parseStackFrames(stackParser, error) { + return stackParser(error.stack || "", 1); + } + function extractMessage(ex) { + let message = ex && ex.message; + return message ? message.error && typeof message.error.message == "string" ? message.error.message : message : "No error message"; + } + function exceptionFromError(stackParser, error) { + let exception = { + type: error.name || error.constructor.name, + value: extractMessage(error) + }, frames = parseStackFrames(stackParser, error); + return frames.length && (exception.stacktrace = { frames }), exception.type === void 0 && exception.value === "" && (exception.value = "Unrecoverable error caught"), exception; + } + function eventFromUnknownInput(sdk, stackParser, exception, hint) { + let ex, mechanism = (hint && hint.data && containsMechanism(hint.data) ? hint.data.mechanism : void 0) ?? { + handled: !0, + type: "generic" + }; + if (utils.isError(exception)) + ex = exception; + else { + if (utils.isPlainObject(exception)) { + let message = `Non-Error exception captured with keys: ${utils.extractExceptionKeysForMessage(exception)}`, client = sdk?.getClient(), normalizeDepth = client && client.getOptions().normalizeDepth; + sdk?.setExtra("__serialized__", utils.normalizeToSize(exception, normalizeDepth)), ex = hint && hint.syntheticException || new Error(message), ex.message = message; + } else + ex = hint && hint.syntheticException || new Error(exception), ex.message = exception; + mechanism.synthetic = !0; + } + let event = { + exception: { + values: [exceptionFromError(stackParser, ex)] + } + }; + return utils.addExceptionTypeValue(event, void 0, void 0), utils.addExceptionMechanism(event, mechanism), { + ...event, + event_id: hint && hint.event_id + }; + } + function eventFromMessage(stackParser, message, level = "info", hint, attachStacktrace) { + let event = { + event_id: hint && hint.event_id, + level, + message + }; + if (attachStacktrace && hint && hint.syntheticException) { + let frames = parseStackFrames(stackParser, hint.syntheticException); + frames.length && (event.exception = { + values: [ + { + value: message, + stacktrace: { frames } + } + ] + }); + } + return event; + } + var DEFAULT_LIMIT = 5, linkedErrorsIntegration = core.defineIntegration((options = { limit: DEFAULT_LIMIT }) => ({ + name: "LinkedErrors", + processEvent: (event, hint, client) => handler(client.getOptions().stackParser, options.limit, event, hint) + })); + function handler(parser, limit, event, hint) { + if (!event.exception || !event.exception.values || !hint || !utils.isInstanceOf(hint.originalException, Error)) + return event; + let linkedErrors = walkErrorTree(parser, limit, hint.originalException); + return event.exception.values = [...linkedErrors, ...event.exception.values], event; + } + function walkErrorTree(parser, limit, error, stack = []) { + if (!utils.isInstanceOf(error.cause, Error) || stack.length + 1 >= limit) + return stack; + let exception = exceptionFromError(parser, error.cause); + return walkErrorTree(parser, limit, error.cause, [ + exception, + ...stack + ]); + } + var defaultRequestDataOptions = { + allowedHeaders: ["CF-RAY", "CF-Worker"] + }, requestDataIntegration = core.defineIntegration((userOptions = {}) => { + let options = { ...defaultRequestDataOptions, ...userOptions }; + return { + name: "RequestData", + preprocessEvent: (event) => { + let { sdkProcessingMetadata } = event; + return sdkProcessingMetadata && ("request" in sdkProcessingMetadata && sdkProcessingMetadata.request instanceof Request && (event.request = toEventRequest(sdkProcessingMetadata.request, options), event.user = toEventUser(event.user ?? {}, sdkProcessingMetadata.request, options)), "requestData" in sdkProcessingMetadata && (event.request ? event.request.data = sdkProcessingMetadata.requestData : event.request = { + data: sdkProcessingMetadata.requestData + })), event; + } + }; + }); + function toEventUser(user, request, options) { + let ip_address = request.headers.get("CF-Connecting-IP"), { allowedIps } = options, newUser = { ...user }; + return !("ip_address" in user) && // If ip_address is already set from explicitly called setUser, we don't want to overwrite it + ip_address && allowedIps !== void 0 && testAllowlist(ip_address, allowedIps) && (newUser.ip_address = ip_address), Object.keys(newUser).length > 0 ? newUser : void 0; + } + function toEventRequest(request, options) { + let cookieString = request.headers.get("cookie"), cookies; + if (cookieString) + try { + cookies = parseCookie(cookieString); + } catch { + } + let headers = {}; + for (let [k, v] of request.headers.entries()) + k !== "cookie" && (headers[k] = v); + let eventRequest = { + method: request.method, + cookies, + headers + }; + try { + let url = new URL(request.url); + eventRequest.url = `${url.protocol}//${url.hostname}${url.pathname}`, eventRequest.query_string = url.search; + } catch { + let qi = request.url.indexOf("?"); + qi < 0 ? eventRequest.url = request.url : (eventRequest.url = request.url.substr(0, qi), eventRequest.query_string = request.url.substr(qi + 1)); + } + let { allowedHeaders, allowedCookies, allowedSearchParams } = options; + if (allowedHeaders !== void 0 && eventRequest.headers ? (eventRequest.headers = applyAllowlistToObject(eventRequest.headers, allowedHeaders), Object.keys(eventRequest.headers).length === 0 && delete eventRequest.headers) : delete eventRequest.headers, allowedCookies !== void 0 && eventRequest.cookies ? (eventRequest.cookies = applyAllowlistToObject(eventRequest.cookies, allowedCookies), Object.keys(eventRequest.cookies).length === 0 && delete eventRequest.cookies) : delete eventRequest.cookies, allowedSearchParams !== void 0) { + let params = Object.fromEntries(new URLSearchParams(eventRequest.query_string)), allowedParams = new URLSearchParams(); + Object.keys(applyAllowlistToObject(params, allowedSearchParams)).forEach((allowedKey) => { + allowedParams.set(allowedKey, params[allowedKey]); + }), eventRequest.query_string = allowedParams.toString(); + } else + delete eventRequest.query_string; + return eventRequest; + } + function testAllowlist(target, allowlist) { + return typeof allowlist == "boolean" ? allowlist : allowlist instanceof RegExp ? allowlist.test(target) : Array.isArray(allowlist) ? allowlist.map((item) => item.toLowerCase()).includes(target) : !1; + } + function applyAllowlistToObject(target, allowlist) { + let predicate = () => !1; + if (typeof allowlist == "boolean") + return allowlist ? target : {}; + if (allowlist instanceof RegExp) + predicate = (item) => allowlist.test(item); + else if (Array.isArray(allowlist)) { + let allowlistLowercased = allowlist.map((item) => item.toLowerCase()); + predicate = (item) => allowlistLowercased.includes(item.toLowerCase()); + } else + return {}; + return Object.keys(target).filter(predicate).reduce((allowed, key) => (allowed[key] = target[key], allowed), {}); + } + function parseCookie(cookieString) { + if (typeof cookieString != "string") + return {}; + try { + return cookieString.split(";").map((part) => part.split("=")).reduce((acc, [cookieKey, cookieValue]) => (acc[decodeURIComponent(cookieKey.trim())] = decodeURIComponent(cookieValue.trim()), acc), {}); + } catch { + return {}; + } + } + function setupIntegrations(integrations, sdk) { + let integrationIndex = {}; + return integrations.forEach((integration) => { + integrationIndex[integration.name] = integration, typeof integration.setupOnce == "function" && integration.setupOnce(); + let client = sdk.getClient(); + if (client) { + if (typeof integration.setup == "function" && integration.setup(client), typeof integration.preprocessEvent == "function") { + let callback = integration.preprocessEvent.bind(integration); + client.on("preprocessEvent", (event, hint) => callback(event, hint, client)); + } + if (typeof integration.processEvent == "function") { + let callback = integration.processEvent.bind(integration), processor = Object.assign((event, hint) => callback(event, hint, client), { + id: integration.name + }); + client.addEventProcessor(processor); + } + } + }), integrationIndex; + } + var ToucanClient = class extends core.ServerRuntimeClient { + /** + * Some functions need to access the scope (Toucan instance) this client is bound to, + * but calling 'getCurrentHub()' is unsafe because it uses globals. + * So we store a reference to the Hub after binding to it and provide it to methods that need it. + */ + #sdk = null; + #integrationsInitialized = !1; + /** + * Creates a new Toucan SDK instance. + * @param options Configuration options for this SDK. + */ + constructor(options) { + options._metadata = options._metadata || {}, options._metadata.sdk = options._metadata.sdk || { + name: "toucan-js", + packages: [ + { + name: "npm:toucan-js", + version: "4.0.0" + } + ], + version: "4.0.0" + }, super(options); + } + /** + * By default, integrations are stored in a global. We want to store them in a local instance because they may have contextual data, such as event request. + */ + setupIntegrations() { + this._isEnabled() && !this.#integrationsInitialized && this.#sdk && (this._integrations = setupIntegrations(this._options.integrations, this.#sdk), this.#integrationsInitialized = !0); + } + eventFromException(exception, hint) { + return utils.resolvedSyncPromise(eventFromUnknownInput(this.#sdk, this._options.stackParser, exception, hint)); + } + eventFromMessage(message, level = "info", hint) { + return utils.resolvedSyncPromise(eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace)); + } + _prepareEvent(event, hint, scope) { + return event.platform = event.platform || "javascript", this.getOptions().request && (event.sdkProcessingMetadata = setOnOptional(event.sdkProcessingMetadata, [ + "request", + this.getOptions().request + ])), this.getOptions().requestData && (event.sdkProcessingMetadata = setOnOptional(event.sdkProcessingMetadata, [ + "requestData", + this.getOptions().requestData + ])), super._prepareEvent(event, hint, scope); + } + getSdk() { + return this.#sdk; + } + setSdk(sdk) { + this.#sdk = sdk; + } + /** + * Sets the request body context on all future events. + * + * @param body Request body. + * @example + * const body = await request.text(); + * toucan.setRequestBody(body); + */ + setRequestBody(body) { + this.getOptions().requestData = body; + } + /** + * Enable/disable the SDK. + * + * @param enabled + */ + setEnabled(enabled) { + this.getOptions().enabled = enabled; + } + }; + function workersStackLineParser(getModule2) { + let [arg1, arg2] = utils.nodeStackLineParser(getModule2); + return [arg1, (line) => { + let result = arg2(line); + if (result) { + let filename = result.filename; + result.abs_path = filename !== void 0 && !filename.startsWith("/") ? `/${filename}` : filename, result.in_app = filename !== void 0; + } + return result; + }]; + } + function getModule(filename) { + if (filename) + return utils.basename(filename, ".js"); + } + var defaultStackParser = utils.createStackParser(workersStackLineParser(getModule)); + function makeFetchTransport(options) { + function makeRequest({ body }) { + try { + let request = (options.fetcher ?? fetch)(options.url, { + method: "POST", + headers: options.headers, + body + }).then((response) => ({ + statusCode: response.status, + headers: { + "retry-after": response.headers.get("Retry-After"), + "x-sentry-rate-limits": response.headers.get("X-Sentry-Rate-Limits") + } + })); + return options.context && options.context.waitUntil(request), request; + } catch (e) { + return utils.rejectedSyncPromise(e); + } + } + return core.createTransport(options, makeRequest); + } + var Toucan2 = class _Toucan extends core.Scope { + #options; + constructor(options) { + if (super(), options.defaultIntegrations = options.defaultIntegrations === !1 ? [] : [ + ...Array.isArray(options.defaultIntegrations) ? options.defaultIntegrations : [ + requestDataIntegration(options.requestDataOptions), + linkedErrorsIntegration() + ] + ], options.release === void 0) { + let detectedRelease = getSentryRelease(); + detectedRelease !== void 0 && (options.release = detectedRelease); + } + this.#options = options, this.attachNewClient(); + } + /** + * Creates new ToucanClient and links it to this instance. + */ + attachNewClient() { + let client = new ToucanClient({ + ...this.#options, + transport: makeFetchTransport, + integrations: core.getIntegrationsToSetup(this.#options), + stackParser: utils.stackParserFromStackParserOptions(this.#options.stackParser || defaultStackParser), + transportOptions: { + ...this.#options.transportOptions, + context: this.#options.context + } + }); + this.setClient(client), client.setSdk(this), client.setupIntegrations(); + } + /** + * Sets the request body context on all future events. + * + * @param body Request body. + * @example + * const body = await request.text(); + * toucan.setRequestBody(body); + */ + setRequestBody(body) { + this.getClient()?.setRequestBody(body); + } + /** + * Enable/disable the SDK. + * + * @param enabled + */ + setEnabled(enabled) { + this.getClient()?.setEnabled(enabled); + } + /** + * Create a cron monitor check in and send it to Sentry. + * + * @param checkIn An object that describes a check in. + * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want + * to create a monitor automatically when sending a check in. + */ + captureCheckIn(checkIn, monitorConfig, scope) { + return checkIn.status === "in_progress" && this.setContext("monitor", { slug: checkIn.monitorSlug }), this.getClient().captureCheckIn(checkIn, monitorConfig, scope); + } + /** + * Add a breadcrumb to the current scope. + */ + addBreadcrumb(breadcrumb, maxBreadcrumbs = 100) { + let max = this.getClient().getOptions().maxBreadcrumbs || maxBreadcrumbs; + return super.addBreadcrumb(breadcrumb, max); + } + /** + * Clone all data from this instance into a new Toucan instance. + * + * @override + * @returns New Toucan instance. + */ + clone() { + let toucan = new _Toucan({ ...this.#options }); + return toucan._breadcrumbs = [...this._breadcrumbs], toucan._tags = { ...this._tags }, toucan._extra = { ...this._extra }, toucan._contexts = { ...this._contexts }, toucan._user = this._user, toucan._level = this._level, toucan._session = this._session, toucan._transactionName = this._transactionName, toucan._fingerprint = this._fingerprint, toucan._eventProcessors = [...this._eventProcessors], toucan._requestSession = this._requestSession, toucan._attachments = [...this._attachments], toucan._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, toucan._propagationContext = { ...this._propagationContext }, toucan._lastEventId = this._lastEventId, toucan; + } + /** + * Creates a new scope with and executes the given operation within. + * The scope is automatically removed once the operation + * finishes or throws. + */ + withScope(callback) { + let toucan = this.clone(); + return callback(toucan); + } + }; + Object.defineProperty(exports, "dedupeIntegration", { + enumerable: !0, + get: function() { + return core.dedupeIntegration; + } + }); + Object.defineProperty(exports, "extraErrorDataIntegration", { + enumerable: !0, + get: function() { + return core.extraErrorDataIntegration; + } + }); + Object.defineProperty(exports, "rewriteFramesIntegration", { + enumerable: !0, + get: function() { + return core.rewriteFramesIntegration; + } + }); + Object.defineProperty(exports, "sessionTimingIntegration", { + enumerable: !0, + get: function() { + return core.sessionTimingIntegration; + } + }); + exports.Toucan = Toucan2; + exports.linkedErrorsIntegration = linkedErrorsIntegration; + exports.requestDataIntegration = requestDataIntegration; + } +}); + +// ../workers-shared/utils/performance.ts +var PerformanceTimer = class { + constructor(performanceTimer) { + this.performanceTimer = performanceTimer; + } + now() { + return this.performanceTimer ? this.performanceTimer.timeOrigin + this.performanceTimer.now() : Date.now(); + } +}; + +// ../workers-shared/utils/sentry.ts +var import_toucan_js = __toESM(require_index_cjs()); +function setupSentry(request, context, dsn, clientId, clientSecret, coloMetadata, versionMetadata, accountId, scriptId) { + if (!(dsn && clientId && clientSecret)) + return; + let sentry = new import_toucan_js.Toucan({ + dsn, + request, + context, + sampleRate: 1, + release: versionMetadata?.tag, + integrations: [ + (0, import_toucan_js.rewriteFramesIntegration)({ + iteratee(frame) { + return frame.filename = "/index.js", frame; + } + }) + ], + requestDataOptions: { + allowedHeaders: [ + "user-agent", + "cf-challenge", + "accept-encoding", + "accept-language", + "cf-ray", + "content-length", + "content-type", + "host" + ], + allowedSearchParams: /(.*)/ + }, + transportOptions: { + headers: { + "CF-Access-Client-ID": clientId, + "CF-Access-Client-Secret": clientSecret + } + } + }); + return coloMetadata && (sentry.setTag("colo", coloMetadata.coloId), sentry.setTag("metal", coloMetadata.metalId)), accountId && scriptId && (sentry.setTag("accountId", accountId), sentry.setTag("scriptId", scriptId)), sentry.setUser({ id: accountId?.toString() }), sentry; +} + +// ../workers-shared/utils/tracing.ts +function mockJaegerBindingSpan() { + return { + addLogs: () => { + }, + setTags: () => { + }, + end: () => { + }, + isRecording: !0 + }; +} +function mockJaegerBinding() { + return { + enterSpan: (_, span, ...args) => span(mockJaegerBindingSpan(), ...args), + getSpanContext: () => ({ + traceId: "test-trace", + spanId: "test-span", + parentSpanId: "test-parent-span", + traceFlags: 0 + }), + runWithSpanContext: (_, callback, ...args) => callback(...args), + traceId: "test-trace", + spanId: "test-span", + parentSpanId: "test-parent-span", + cfTraceIdHeader: "test-trace:test-span:0" + }; +} + +// ../workers-shared/router-worker/src/analytics.ts +var Analytics = class { + constructor(readyAnalytics) { + this.data = {}; + this.hasWritten = !1; + this.readyAnalytics = readyAnalytics; + } + setData(newData) { + this.data = { ...this.data, ...newData }; + } + getData(key) { + return this.data[key]; + } + write() { + this.hasWritten || this.readyAnalytics && (this.hasWritten = !0, this.readyAnalytics.logEvent({ + version: 1, + accountId: this.data.accountId, + indexId: this.data.scriptId?.toString(), + doubles: [ + this.data.requestTime ?? -1, + // double1 + this.data.coloId ?? -1, + // double2 + this.data.metalId ?? -1, + // double3 + this.data.coloTier ?? -1, + // double4 + this.data.userWorkerAhead === void 0 ? -1 : Number(this.data.userWorkerAhead) + ], + blobs: [ + this.data.hostname?.substring(0, 256), + // blob1 - trim to 256 bytes + this.data.dispatchtype, + // blob2 + this.data.error?.substring(0, 256), + // blob3 - trim to 256 bytes + this.data.version, + // blob4 + this.data.coloRegion + // blob5 + ] + })); + } +}; + +// ../workers-shared/router-worker/src/configuration.ts +var applyConfigurationDefaults = (configuration) => ({ + invoke_user_worker_ahead_of_assets: configuration?.invoke_user_worker_ahead_of_assets ?? !1, + has_user_worker: configuration?.has_user_worker ?? !1, + account_id: configuration?.account_id ?? -1, + script_id: configuration?.script_id ?? -1 +}); + +// ../workers-shared/router-worker/src/index.ts +var src_default = { + async fetch(request, env, ctx) { + let sentry, userWorkerInvocation = !1, analytics = new Analytics(env.ANALYTICS), performance = new PerformanceTimer(env.UNSAFE_PERFORMANCE), startTimeMs = performance.now(); + try { + env.JAEGER || (env.JAEGER = mockJaegerBinding()), sentry = setupSentry( + request, + ctx, + env.SENTRY_DSN, + env.SENTRY_ACCESS_CLIENT_ID, + env.SENTRY_ACCESS_CLIENT_SECRET, + env.COLO_METADATA, + env.VERSION_METADATA, + env.CONFIG?.account_id, + env.CONFIG?.script_id + ); + let config = applyConfigurationDefaults(env.CONFIG), url = new URL(request.url); + env.COLO_METADATA && env.VERSION_METADATA && env.CONFIG && analytics.setData({ + accountId: env.CONFIG.account_id, + scriptId: env.CONFIG.script_id, + coloId: env.COLO_METADATA.coloId, + metalId: env.COLO_METADATA.metalId, + coloTier: env.COLO_METADATA.coloTier, + coloRegion: env.COLO_METADATA.coloRegion, + hostname: url.hostname, + version: env.VERSION_METADATA.tag, + userWorkerAhead: config.invoke_user_worker_ahead_of_assets + }); + let maybeSecondRequest = request.clone(); + if (config.invoke_user_worker_ahead_of_assets) { + if (!config.has_user_worker) + throw new Error( + "Fetch for user worker without having a user worker binding" + ); + return analytics.setData({ dispatchtype: "worker" /* WORKER */ }), await env.JAEGER.enterSpan("dispatch_worker", async (span) => (span.setTags({ + hasUserWorker: !0, + asset: "ignored", + dispatchType: "worker" /* WORKER */ + }), userWorkerInvocation = !0, env.USER_WORKER.fetch(maybeSecondRequest))); + } + let assetsExist = await env.ASSET_WORKER.unstable_canFetch(request); + return config.has_user_worker && !assetsExist ? (analytics.setData({ dispatchtype: "worker" /* WORKER */ }), await env.JAEGER.enterSpan("dispatch_worker", async (span) => (span.setTags({ + hasUserWorker: config.has_user_worker, + asset: assetsExist, + dispatchType: "worker" /* WORKER */ + }), userWorkerInvocation = !0, env.USER_WORKER.fetch(maybeSecondRequest)))) : (analytics.setData({ dispatchtype: "asset" /* ASSETS */ }), await env.JAEGER.enterSpan("dispatch_assets", async (span) => (span.setTags({ + hasUserWorker: config.has_user_worker, + asset: assetsExist, + dispatchType: "asset" /* ASSETS */ + }), env.ASSET_WORKER.fetch(maybeSecondRequest)))); + } catch (err) { + throw userWorkerInvocation || (err instanceof Error && analytics.setData({ error: err.message }), sentry && sentry.captureException(err)), err; + } finally { + analytics.setData({ requestTime: performance.now() - startTimeMs }), analytics.write(); + } + } +}; + +// src/workers/assets/router.worker.ts +var router_worker_default = src_default; +export { + router_worker_default as default +}; +//# sourceMappingURL=router.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/assets/router.worker.js.map b/node_modules/miniflare/dist/src/workers/assets/router.worker.js.map new file mode 100644 index 0000000..c8db549 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/assets/router.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/is.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/string.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/aggregate-errors.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/array.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/version.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/worldwide.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/browser.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/debug-build.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/logger.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/dsn.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/error.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/object.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/stacktrace.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/handlers.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/console.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/supports.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/time.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/fetch.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/globalError.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/globalUnhandledRejection.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/env.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/node.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/isBrowser.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/memo.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/misc.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/normalize.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/path.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/syncpromise.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/promisebuffer.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/cookie.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/url.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/requestdata.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/severity.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/node-stack-trace.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/baggage.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/tracing.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/envelope.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/clientreport.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/ratelimit.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/cache.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/eventbuilder.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/anr.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/lru.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_nullishCoalesce.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_asyncNullishCoalesce.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_asyncOptionalChain.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_asyncOptionalChainDelete.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_optionalChain.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_optionalChainDelete.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/propagationContext.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/vendor/escapeStringForRegex.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/vendor/supportsHistory.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/index.js", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/debug-build.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/carrier.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/session.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/spanOnScope.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/scope.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/defaultScopes.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/asyncContext/stackStrategy.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/asyncContext/index.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/currentScopes.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/metric-summary.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/semanticAttributes.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/spanstatus.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/spanUtils.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/errors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/utils.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/hubextensions.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/hasTracingEnabled.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/sentryNonRecordingSpan.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/handleCallbackErrors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/constants.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/dynamicSamplingContext.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/logSpans.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/parseSampleRate.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/sampling.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/envelope.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/measurement.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/sentrySpan.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/trace.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/idleSpan.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/eventProcessors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/applyScopeDataToEvent.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/prepareEvent.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/exports.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/sessionflusher.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/api.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integration.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/baseclient.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/checkin.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/server-runtime-client.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/sdk.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/transports/base.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/transports/offline.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/transports/multiplexed.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/isSentryRequestUrl.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/parameterize.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/sdkMetadata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/breadcrumbs.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/functiontostring.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/inboundfilters.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/linkederrors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metadata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/metadata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/requestdata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/captureconsole.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/debug.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/dedupe.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/extraerrordata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/rewriteframes.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/sessiontiming.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/zoderrors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/third-party-errors-filter.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/constants.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/exports.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/utils.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/envelope.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/instance.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/aggregator.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/exports-default.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/browser-aggregator.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/fetch.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/trpc.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/feedback.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/getCurrentHubShim.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/index.js", "../../../../../../node_modules/.pnpm/toucan-js@4.0.0_patch_hash=qxsfpdzvzbhq2ecirbu5xq4vlq/node_modules/toucan-js/dist/index.cjs.js", "../../../../../workers-shared/utils/performance.ts", "../../../../../workers-shared/utils/sentry.ts", "../../../../../workers-shared/utils/tracing.ts", "../../../../../workers-shared/router-worker/src/analytics.ts", "../../../../../workers-shared/router-worker/src/configuration.ts", "../../../../../workers-shared/router-worker/src/index.ts", "../../../../src/workers/assets/router.worker.ts"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,QAAM,iBAAiB,OAAO,UAAU;AASjC,aAAS,QAAQ,KAA4B;AAClD,cAAQ,eAAe,KAAK,GAAG,GAAC;QAC9B,KAAK;QACL,KAAK;QACL,KAAK;AACH,iBAAO;QACT;AACE,iBAAO,aAAa,KAAK,KAAK;MACpC;IACA;AAQA,aAAS,UAAU,KAAc,WAA4B;AAC3D,aAAO,eAAe,KAAK,GAAG,MAAM,WAAW,SAAS;IAC1D;AASO,aAAS,aAAa,KAAuB;AAClD,aAAO,UAAU,KAAK,YAAY;IACpC;AASO,aAAS,WAAW,KAAuB;AAChD,aAAO,UAAU,KAAK,UAAU;IAClC;AASO,aAAS,eAAe,KAAuB;AACpD,aAAO,UAAU,KAAK,cAAc;IACtC;AASO,aAAS,SAAS,KAA6B;AACpD,aAAO,UAAU,KAAK,QAAQ;IAChC;AASO,aAAS,sBAAsB,KAA0C;AAC9E,aACE,OAAO,OAAQ,YACf,QAAQ,QACR,gCAAgC,OAChC,gCAAgC;IAEpC;AASO,aAAS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AY,IAAI,IAAI,YAAY,CAAC,GAClE,UAAU,MAAM;AAAA,IACjB;AAAA,EACD;AACD;;;AC9IA,IAAO,wBAAQ;", + "names": ["isVueViewModel", "isString", "isRegExp", "isInstanceOf", "truncate", "input", "SDK_VERSION", "GLOBAL_OBJ", "isString", "GLOBAL_OBJ", "console", "logger", "DEBUG_BUILD", "consoleSandbox", "DEBUG_BUILD", "logger", "DEBUG_BUILD", "logger", "isError", "isEvent", "isInstanceOf", "isElement", "htmlTreeAsString", "truncate", "isPlainObject", "isPrimitive", "DEBUG_BUILD", "logger", "getFunctionName", "addHandler", "maybeInstrument", "GLOBAL_OBJ", "CONSOLE_LEVELS", "fill", "originalConsoleMethods", "triggerHandlers", "GLOBAL_OBJ", "DEBUG_BUILD", "logger", "GLOBAL_OBJ", "_browserPerformanceTimeOriginMode", "addHandler", "maybeInstrument", "supportsNativeFetch", "fill", "GLOBAL_OBJ", "timestampInSeconds", "triggerHandlers", "isError", "addNonEnumerableProperty", "addHandler", "maybeInstrument", "GLOBAL_OBJ", "triggerHandlers", "addHandler", "maybeInstrument", "GLOBAL_OBJ", "triggerHandlers", "isBrowserBundle", "isNodeEnv", "GLOBAL_OBJ", "GLOBAL_OBJ", "snipLine", "addNonEnumerableProperty", "object", "memo", "memoBuilder", "convertToPlainObject", "isVueViewModel", "isSyntheticEvent", "getFunctionName", "States", "isThenable", "rejectedSyncPromise", "SentryError", "SyncPromise", "resolvedSyncPromise", "stripUrlQueryAndFragment", "parseCookie", "isString", "normalize", "isPlainObject", "DEBUG_BUILD", "logger", "UNKNOWN_FUNCTION", "isString", "DEBUG_BUILD", "logger", "baggage", "baggageHeaderToDynamicSamplingContext", "uuid4", "GLOBAL_OBJ", "normalize", "dropUndefinedKeys", "dsn", "dsnToString", "dateTimestampInSeconds", "createEnvelope", "extractExceptionKeysForMessage", "isErrorEvent", "isError", "isPlainObject", "normalizeToSize", "ex", "addExceptionTypeValue", "addExceptionMechanism", "isParameterizedString", "dropUndefinedKeys", "UNKNOWN_FUNCTION", "filenameIsInApp", "_nullishCoalesce", "_asyncOptionalChain", "_optionalChain", "uuid4", "GLOBAL_OBJ", "console", "fetch", "GLOBAL_OBJ", "SDK_VERSION", "timestampInSeconds", "uuid4", "dropUndefinedKeys", "addNonEnumerableProperty", "generatePropagationContext", "_setSpanForScope", "_getSpanForScope", "updateSession", "session", "isPlainObject", "dateTimestampInSeconds", "uuid4", "logger", "getGlobalSingleton", "ScopeClass", "scope", "Scope", "isThenable", "getMainCarrier", "getSentryCarrier", "getDefaultCurrentScope", "getDefaultIsolationScope", "getMainCarrier", "getSentryCarrier", "carrier", "getStackAsyncContextStrategy", "carrier", "getMainCarrier", "getAsyncContextStrategy", "getGlobalSingleton", "ScopeClass", "scope", "dropUndefinedKeys", "dropUndefinedKeys", "generateSentryTraceHeader", "timestampInSeconds", "SEMANTIC_ATTRIBUTE_SENTRY_OP", "SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN", "getMetricSummaryJsonForSpan", "SPAN_STATUS_UNSET", "SPAN_STATUS_OK", "addNonEnumerableProperty", "span", "carrier", "getMainCarrier", "getAsyncContextStrategy", "_getSpanForScope", "getCurrentScope", "updateMetricSummaryOnSpan", "addGlobalErrorInstrumentationHandler", "addGlobalUnhandledRejectionInstrumentationHandler", "getActiveSpan", "getRootSpan", "DEBUG_BUILD", "logger", "SPAN_STATUS_ERROR", "addNonEnumerableProperty", "registerSpanErrorInstrumentation", "getClient", "uuid4", "TRACE_FLAG_NONE", "isThenable", "addNonEnumerableProperty", "dropUndefinedKeys", "DEFAULT_ENVIRONMENT", "getClient", "spanToJSON", "getRootSpan", "SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE", "SEMANTIC_ATTRIBUTE_SENTRY_SOURCE", "spanIsSampled", "dynamicSamplingContextToSentryBaggageHeader", "DEBUG_BUILD", "spanToJSON", "spanIsSampled", "getRootSpan", "op", "description", "logger", "DEBUG_BUILD", "logger", "hasTracingEnabled", "parseSampleRate", "DEBUG_BUILD", "logger", "getSdkMetadataForEnvelopeHeader", "dsnToString", "createEnvelope", "createEventEnvelopeHeaders", "dsc", "getDynamicSamplingContextFromSpan", "spanToJSON", "createSpanEnvelopeItem", "getActiveSpan", "getRootSpan", "SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE", "SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT", "uuid4", "timestampInSeconds", "SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN", "SEMANTIC_ATTRIBUTE_SENTRY_OP", "TRACE_FLAG_SAMPLED", "TRACE_FLAG_NONE", "spanTimeInputToSeconds", "logSpanEnd", "dropUndefinedKeys", "getStatusMessage", "getMetricSummaryJsonForSpan", "SEMANTIC_ATTRIBUTE_PROFILE_ID", "SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME", "timedEventsToMeasurements", "getRootSpan", "DEBUG_BUILD", "logger", "getClient", "createSpanEnvelope", "getCapturedScopesOnSpan", "getCurrentScope", "spanToJSON", "getSpanDescendants", "SEMANTIC_ATTRIBUTE_SENTRY_SOURCE", "spanToTransactionTraceContext", "getDynamicSamplingContextFromSpan", "envelope", "withScope", "SentryNonRecordingSpan", "_setSpanForScope", "handleCallbackErrors", "spanToJSON", "SPAN_STATUS_ERROR", "getCurrentScope", "propagationContextFromHeaders", "generatePropagationContext", "DEBUG_BUILD", "logger", "hasTracingEnabled", "getIsolationScope", "addChildSpanToSpan", "getDynamicSamplingContextFromSpan", "spanIsSampled", "freezeDscOnSpan", "logSpanStart", "setCapturedScopesOnSpan", "spanTimeInputToSeconds", "carrier", "getMainCarrier", "getAsyncContextStrategy", "getClient", "sampleSpan", "SentrySpan", "SEMANTIC_ATTRIBUTE_SENTRY_SOURCE", "SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE", "_getSpanForScope", "getRootSpan", "getClient", "hasTracingEnabled", "SentryNonRecordingSpan", "getCurrentScope", "getActiveSpan", "timestampInSeconds", "spanTimeInputToSeconds", "getSpanDescendants", "span", "spanToJSON", "timestamp", "_setSpanForScope", "SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON", "logger", "SPAN_STATUS_ERROR", "DEBUG_BUILD", "removeChildSpanFromSpan", "startInactiveSpan", "SyncPromise", "DEBUG_BUILD", "logger", "isThenable", "dropUndefinedKeys", "spanToTraceContext", "getDynamicSamplingContextFromSpan", "getRootSpan", "spanToJSON", "arrayify", "scope", "uuid4", "dateTimestampInSeconds", "addExceptionMechanism", "getGlobalScope", "mergeScopeData", "applyScopeDataToEvent", "eventProcessors", "notifyEventProcessors", "DEFAULT_ENVIRONMENT", "truncate", "GLOBAL_OBJ", "normalize", "Scope", "getCurrentScope", "parseEventHintOrCaptureContext", "getIsolationScope", "getClient", "DEBUG_BUILD", "logger", "uuid4", "timestampInSeconds", "withIsolationScope", "isThenable", "DEFAULT_ENVIRONMENT", "GLOBAL_OBJ", "session", "makeSession", "updateSession", "closeSession", "dropUndefinedKeys", "getIsolationScope", "urlEncode", "makeDsn", "dsnToString", "arrayify", "DEBUG_BUILD", "logger", "getClient", "makeDsn", "DEBUG_BUILD", "logger", "getEnvelopeEndpointWithUrlEncodedAuth", "uuid4", "checkOrSetAlreadyCaught", "isParameterizedString", "isPrimitive", "session", "updateSession", "resolvedSyncPromise", "integration", "setupIntegration", "afterSetupIntegrations", "createEventEnvelope", "addItemToEnvelope", "createAttachmentEnvelopeItem", "createSessionEnvelope", "envelope", "setupIntegrations", "SyncPromise", "getIsolationScope", "prepareEvent", "dropUndefinedKeys", "dynamicSamplingContext", "getDynamicSamplingContextFromClient", "parseSampleRate", "rejectedSyncPromise", "SentryError", "isThenable", "isPlainObject", "dsnToString", "dropUndefinedKeys", "createEnvelope", "BaseClient", "registerSpanErrorInstrumentation", "resolvedSyncPromise", "eventFromUnknownInput", "eventFromMessage", "getIsolationScope", "SessionFlusher", "DEBUG_BUILD", "logger", "uuid4", "dynamicSamplingContext", "createCheckInEnvelope", "_getSpanForScope", "getRootSpan", "getDynamicSamplingContextFromSpan", "spanToTraceContext", "getDynamicSamplingContextFromClient", "DEBUG_BUILD", "logger", "consoleSandbox", "getCurrentScope", "makePromiseBuffer", "forEachEnvelopeItem", "envelopeItemTypeToDataCategory", "isRateLimited", "resolvedSyncPromise", "createEnvelope", "serializeEnvelope", "DEBUG_BUILD", "logger", "updateRateLimits", "SentryError", "DEBUG_BUILD", "logger", "retryDelay", "envelopeContainsItemType", "parseRetryAfterHeader", "forEachEnvelopeItem", "createEnvelope", "dsnFromString", "getEnvelopeEndpointWithUrlEncodedAuth", "name", "SDK_VERSION", "getClient", "getIsolationScope", "dateTimestampInSeconds", "consoleSandbox", "getOriginalFunction", "getClient", "defineIntegration", "defineIntegration", "DEBUG_BUILD", "logger", "getEventDescription", "stringMatchesSomePattern", "options", "applyAggregateErrorsToEvent", "exceptionFromError", "defineIntegration", "GLOBAL_OBJ", "forEachEnvelopeItem", "stripMetadataFromStackFrames", "addMetadataToStackFrames", "defineIntegration", "addRequestDataToEvent", "defineIntegration", "CONSOLE_LEVELS", "GLOBAL_OBJ", "addConsoleInstrumentationHandler", "getClient", "defineIntegration", "severityLevelFromString", "withScope", "addExceptionMechanism", "message", "safeJoin", "captureMessage", "captureException", "consoleSandbox", "defineIntegration", "DEBUG_BUILD", "logger", "defineIntegration", "getFramesFromEvent", "defineIntegration", "isError", "normalize", "isPlainObject", "addNonEnumerableProperty", "DEBUG_BUILD", "logger", "rewriteFramesIntegration", "defineIntegration", "GLOBAL_OBJ", "relative", "basename", "timestampInSeconds", "defineIntegration", "isError", "truncate", "defineIntegration", "defineIntegration", "forEachEnvelopeItem", "stripMetadataFromStackFrames", "addMetadataToStackFrames", "getFramesFromEvent", "getGlobalSingleton", "getClient", "getActiveSpan", "getRootSpan", "spanToJSON", "DEBUG_BUILD", "logger", "COUNTER_METRIC_TYPE", "DISTRIBUTION_METRIC_TYPE", "timestampInSeconds", "startSpanManual", "handleCallbackErrors", "SET_METRIC_TYPE", "GAUGE_METRIC_TYPE", "dropUndefinedKeys", "logger", "dsnToString", "createEnvelope", "serializeMetricBuckets", "simpleHash", "COUNTER_METRIC_TYPE", "GAUGE_METRIC_TYPE", "DISTRIBUTION_METRIC_TYPE", "SET_METRIC_TYPE", "DEFAULT_FLUSH_INTERVAL", "timestampInSeconds", "sanitizeMetricKey", "sanitizeTags", "sanitizeUnit", "getBucketKey", "SET_METRIC_TYPE", "METRIC_MAP", "updateMetricSummaryOnActiveSpan", "MAX_WEIGHT", "captureAggregateMetrics", "metricsCore", "MetricsAggregator", "DEFAULT_BROWSER_FLUSH_INTERVAL", "timestampInSeconds", "sanitizeMetricKey", "sanitizeTags", "sanitizeUnit", "getBucketKey", "SET_METRIC_TYPE", "METRIC_MAP", "updateMetricSummaryOnActiveSpan", "captureAggregateMetrics", "hasTracingEnabled", "span", "getCurrentScope", "getClient", "parseUrl", "getActiveSpan", "startInactiveSpan", "SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN", "SEMANTIC_ATTRIBUTE_SENTRY_OP", "SentryNonRecordingSpan", "getIsolationScope", "spanToTraceHeader", "generateSentryTraceHeader", "dynamicSamplingContextToSentryBaggageHeader", "getDynamicSamplingContextFromSpan", "getDynamicSamplingContextFromClient", "isInstanceOf", "BAGGAGE_HEADER_NAME", "setHttpStatus", "SPAN_STATUS_ERROR", "getClient", "normalize", "setContext", "captureException", "startSpanManual", "SEMANTIC_ATTRIBUTE_SENTRY_SOURCE", "SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN", "isThenable", "getCurrentScope", "dropUndefinedKeys", "getClient", "getCurrentScope", "withScope", "getClient", "getIsolationScope", "captureEvent", "addBreadcrumb", "setUser", "setTags", "setTag", "setExtra", "setExtras", "setContext", "startSession", "endSession", "require_cjs", "fetch", "getModule", "Toucan"] +} diff --git a/node_modules/miniflare/dist/src/workers/assets/rpc-proxy.worker.js b/node_modules/miniflare/dist/src/workers/assets/rpc-proxy.worker.js new file mode 100644 index 0000000..8e70d7c --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/assets/rpc-proxy.worker.js @@ -0,0 +1,11 @@ +// src/workers/assets/rpc-proxy.worker.ts +import { WorkerEntrypoint } from "cloudflare:workers"; +var RPCProxyWorker = class extends WorkerEntrypoint { + async fetch(request) { + return this.env.ROUTER_WORKER.fetch(request); + } +}; +export { + RPCProxyWorker as default +}; +//# sourceMappingURL=rpc-proxy.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/assets/rpc-proxy.worker.js.map b/node_modules/miniflare/dist/src/workers/assets/rpc-proxy.worker.js.map new file mode 100644 index 0000000..d025f4a --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/assets/rpc-proxy.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/assets/rpc-proxy.worker.ts"], + "mappings": ";AAAA,SAAS,wBAAwB;AAMjC,IAAqB,iBAArB,cAA4C,iBAAsB;AAAA,EACjE,MAAM,MAAM,SAAkB;AAI7B,WAAO,KAAK,IAAI,cAAc,MAAM,OAAO;AAAA,EAC5C;AACD;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/cache/cache-entry-noop.worker.js b/node_modules/miniflare/dist/src/workers/cache/cache-entry-noop.worker.js new file mode 100644 index 0000000..63b0686 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/cache/cache-entry-noop.worker.js @@ -0,0 +1,19 @@ +// src/workers/cache/constants.ts +var CacheHeaders = { + NAMESPACE: "cf-cache-namespace", + STATUS: "cf-cache-status" +}; + +// src/workers/cache/cache-entry-noop.worker.ts +var cache_entry_noop_worker_default = { + async fetch(request) { + return request.method === "GET" ? new Response(null, { + status: 504, + headers: { [CacheHeaders.STATUS]: "MISS" } + }) : request.method === "PUT" ? (await request.body?.pipeTo(new WritableStream()), new Response(null, { status: 204 })) : request.method === "PURGE" ? new Response(null, { status: 404 }) : new Response(null, { status: 405 }); + } +}; +export { + cache_entry_noop_worker_default as default +}; +//# sourceMappingURL=cache-entry-noop.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/cache/cache-entry-noop.worker.js.map b/node_modules/miniflare/dist/src/workers/cache/cache-entry-noop.worker.js.map new file mode 100644 index 0000000..27d36f9 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/cache/cache-entry-noop.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/cache/constants.ts", "../../../../src/workers/cache/cache-entry-noop.worker.ts"], + "mappings": ";AAAO,IAAM,eAAe;AAAA,EAC3B,WAAW;AAAA,EACX,QAAQ;AACT;;;ACDA,IAAO,kCAAyB;AAAA,EAC/B,MAAM,MAAM,SAAS;AACpB,WAAI,QAAQ,WAAW,QACf,IAAI,SAAS,MAAM;AAAA,MACzB,QAAQ;AAAA,MACR,SAAS,EAAE,CAAC,aAAa,MAAM,GAAG,OAAO;AAAA,IAC1C,CAAC,IACS,QAAQ,WAAW,SAE7B,MAAM,QAAQ,MAAM,OAAO,IAAI,eAAe,CAAC,GACxC,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC,KAC/B,QAAQ,WAAW,UACtB,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC,IAElC,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC;AAAA,EAE3C;AACD;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/cache/cache-entry.worker.js b/node_modules/miniflare/dist/src/workers/cache/cache-entry.worker.js new file mode 100644 index 0000000..de45782 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/cache/cache-entry.worker.js @@ -0,0 +1,28 @@ +// src/workers/cache/cache-entry.worker.ts +import { SharedBindings } from "miniflare:shared"; + +// src/workers/cache/constants.ts +var CacheHeaders = { + NAMESPACE: "cf-cache-namespace", + STATUS: "cf-cache-status" +}, CacheBindings = { + MAYBE_JSON_CACHE_WARN_USAGE: "MINIFLARE_CACHE_WARN_USAGE" +}; + +// src/workers/cache/cache-entry.worker.ts +var cache_entry_worker_default = { + async fetch(request, env) { + let namespace = request.headers.get(CacheHeaders.NAMESPACE), name = namespace === null ? "default" : `named:${namespace}`, objectNamespace = env[SharedBindings.DURABLE_OBJECT_NAMESPACE_OBJECT], id = objectNamespace.idFromName(name), stub = objectNamespace.get(id), cf = { + ...request.cf, + miniflare: { + name, + cacheWarnUsage: env[CacheBindings.MAYBE_JSON_CACHE_WARN_USAGE] + } + }; + return await stub.fetch(request, { cf }); + } +}; +export { + cache_entry_worker_default as default +}; +//# sourceMappingURL=cache-entry.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/cache/cache-entry.worker.js.map b/node_modules/miniflare/dist/src/workers/cache/cache-entry.worker.js.map new file mode 100644 index 0000000..3af10b2 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/cache/cache-entry.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/cache/cache-entry.worker.ts", "../../../../src/workers/cache/constants.ts"], + "mappings": ";AAAA,SAAmC,sBAAsB;;;ACAlD,IAAM,eAAe;AAAA,EAC3B,WAAW;AAAA,EACX,QAAQ;AACT,GAEa,gBAAgB;AAAA,EAC5B,6BAA6B;AAC9B;;;ADCA,IAAO,6BAA8B;AAAA,EACpC,MAAM,MAAM,SAAS,KAAK;AACzB,QAAM,YAAY,QAAQ,QAAQ,IAAI,aAAa,SAAS,GACtD,OAAO,cAAc,OAAO,YAAY,SAAS,SAAS,IAE1D,kBAAkB,IAAI,eAAe,+BAA+B,GACpE,KAAK,gBAAgB,WAAW,IAAI,GACpC,OAAO,gBAAgB,IAAI,EAAE,GAC7B,KAA+C;AAAA,MACpD,GAAG,QAAQ;AAAA,MACX,WAAW;AAAA,QACV;AAAA,QACA,gBAAgB,IAAI,cAAc,2BAA2B;AAAA,MAC9D;AAAA,IACD;AACA,WAAO,MAAM,KAAK,MAAM,SAAS,EAAE,GAAkC,CAAC;AAAA,EACvE;AACD;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/cache/cache.worker.js b/node_modules/miniflare/dist/src/workers/cache/cache.worker.js new file mode 100644 index 0000000..d8ced9b --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/cache/cache.worker.js @@ -0,0 +1,644 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from == "object" || typeof from == "function") + for (let key of __getOwnPropNames(from)) + !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target, + mod +)); +var __decorateClass = (decorators, target, key, kind) => { + for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--) + (decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result); + return kind && result && __defProp(target, key, result), result; +}; + +// ../../node_modules/.pnpm/http-cache-semantics@4.1.1/node_modules/http-cache-semantics/index.js +var require_http_cache_semantics = __commonJS({ + "../../node_modules/.pnpm/http-cache-semantics@4.1.1/node_modules/http-cache-semantics/index.js"(exports, module) { + "use strict"; + var statusCodeCacheableByDefault = /* @__PURE__ */ new Set([ + 200, + 203, + 204, + 206, + 300, + 301, + 308, + 404, + 405, + 410, + 414, + 501 + ]), understoodStatuses = /* @__PURE__ */ new Set([ + 200, + 203, + 204, + 300, + 301, + 302, + 303, + 307, + 308, + 404, + 405, + 410, + 414, + 501 + ]), errorStatusCodes = /* @__PURE__ */ new Set([ + 500, + 502, + 503, + 504 + ]), hopByHopHeaders = { + date: !0, + // included, because we add Age update Date + connection: !0, + "keep-alive": !0, + "proxy-authenticate": !0, + "proxy-authorization": !0, + te: !0, + trailer: !0, + "transfer-encoding": !0, + upgrade: !0 + }, excludedFromRevalidationUpdate = { + // Since the old body is reused, it doesn't make sense to change properties of the body + "content-length": !0, + "content-encoding": !0, + "transfer-encoding": !0, + "content-range": !0 + }; + function toNumberOrZero(s) { + let n = parseInt(s, 10); + return isFinite(n) ? n : 0; + } + function isErrorResponse(response) { + return response ? errorStatusCodes.has(response.status) : !0; + } + function parseCacheControl(header) { + let cc = {}; + if (!header) return cc; + let parts = header.trim().split(/,/); + for (let part of parts) { + let [k, v] = part.split(/=/, 2); + cc[k.trim()] = v === void 0 ? !0 : v.trim().replace(/^"|"$/g, ""); + } + return cc; + } + function formatCacheControl(cc) { + let parts = []; + for (let k in cc) { + let v = cc[k]; + parts.push(v === !0 ? k : k + "=" + v); + } + if (parts.length) + return parts.join(", "); + } + module.exports = class { + constructor(req, res, { + shared, + cacheHeuristic, + immutableMinTimeToLive, + ignoreCargoCult, + _fromObject + } = {}) { + if (_fromObject) { + this._fromObject(_fromObject); + return; + } + if (!res || !res.headers) + throw Error("Response headers missing"); + this._assertRequestHasHeaders(req), this._responseTime = this.now(), this._isShared = shared !== !1, this._cacheHeuristic = cacheHeuristic !== void 0 ? cacheHeuristic : 0.1, this._immutableMinTtl = immutableMinTimeToLive !== void 0 ? immutableMinTimeToLive : 24 * 3600 * 1e3, this._status = "status" in res ? res.status : 200, this._resHeaders = res.headers, this._rescc = parseCacheControl(res.headers["cache-control"]), this._method = "method" in req ? req.method : "GET", this._url = req.url, this._host = req.headers.host, this._noAuthorization = !req.headers.authorization, this._reqHeaders = res.headers.vary ? req.headers : null, this._reqcc = parseCacheControl(req.headers["cache-control"]), ignoreCargoCult && "pre-check" in this._rescc && "post-check" in this._rescc && (delete this._rescc["pre-check"], delete this._rescc["post-check"], delete this._rescc["no-cache"], delete this._rescc["no-store"], delete this._rescc["must-revalidate"], this._resHeaders = Object.assign({}, this._resHeaders, { + "cache-control": formatCacheControl(this._rescc) + }), delete this._resHeaders.expires, delete this._resHeaders.pragma), res.headers["cache-control"] == null && /no-cache/.test(res.headers.pragma) && (this._rescc["no-cache"] = !0); + } + now() { + return Date.now(); + } + storable() { + return !!(!this._reqcc["no-store"] && // A cache MUST NOT store a response to any request, unless: + // The request method is understood by the cache and defined as being cacheable, and + (this._method === "GET" || this._method === "HEAD" || this._method === "POST" && this._hasExplicitExpiration()) && // the response status code is understood by the cache, and + understoodStatuses.has(this._status) && // the "no-store" cache directive does not appear in request or response header fields, and + !this._rescc["no-store"] && // the "private" response directive does not appear in the response, if the cache is shared, and + (!this._isShared || !this._rescc.private) && // the Authorization header field does not appear in the request, if the cache is shared, + (!this._isShared || this._noAuthorization || this._allowsStoringAuthenticated()) && // the response either: + // contains an Expires header field, or + (this._resHeaders.expires || // contains a max-age response directive, or + // contains a s-maxage response directive and the cache is shared, or + // contains a public response directive. + this._rescc["max-age"] || this._isShared && this._rescc["s-maxage"] || this._rescc.public || // has a status code that is defined as cacheable by default + statusCodeCacheableByDefault.has(this._status))); + } + _hasExplicitExpiration() { + return this._isShared && this._rescc["s-maxage"] || this._rescc["max-age"] || this._resHeaders.expires; + } + _assertRequestHasHeaders(req) { + if (!req || !req.headers) + throw Error("Request headers missing"); + } + satisfiesWithoutRevalidation(req) { + this._assertRequestHasHeaders(req); + let requestCC = parseCacheControl(req.headers["cache-control"]); + return requestCC["no-cache"] || /no-cache/.test(req.headers.pragma) || requestCC["max-age"] && this.age() > requestCC["max-age"] || requestCC["min-fresh"] && this.timeToLive() < 1e3 * requestCC["min-fresh"] || this.stale() && !(requestCC["max-stale"] && !this._rescc["must-revalidate"] && (requestCC["max-stale"] === !0 || requestCC["max-stale"] > this.age() - this.maxAge())) ? !1 : this._requestMatches(req, !1); + } + _requestMatches(req, allowHeadMethod) { + return (!this._url || this._url === req.url) && this._host === req.headers.host && // the request method associated with the stored response allows it to be used for the presented request, and + (!req.method || this._method === req.method || allowHeadMethod && req.method === "HEAD") && // selecting header fields nominated by the stored response (if any) match those presented, and + this._varyMatches(req); + } + _allowsStoringAuthenticated() { + return this._rescc["must-revalidate"] || this._rescc.public || this._rescc["s-maxage"]; + } + _varyMatches(req) { + if (!this._resHeaders.vary) + return !0; + if (this._resHeaders.vary === "*") + return !1; + let fields = this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/); + for (let name of fields) + if (req.headers[name] !== this._reqHeaders[name]) return !1; + return !0; + } + _copyWithoutHopByHopHeaders(inHeaders) { + let headers = {}; + for (let name in inHeaders) + hopByHopHeaders[name] || (headers[name] = inHeaders[name]); + if (inHeaders.connection) { + let tokens = inHeaders.connection.trim().split(/\s*,\s*/); + for (let name of tokens) + delete headers[name]; + } + if (headers.warning) { + let warnings = headers.warning.split(/,/).filter((warning) => !/^\s*1[0-9][0-9]/.test(warning)); + warnings.length ? headers.warning = warnings.join(",").trim() : delete headers.warning; + } + return headers; + } + responseHeaders() { + let headers = this._copyWithoutHopByHopHeaders(this._resHeaders), age = this.age(); + return age > 3600 * 24 && !this._hasExplicitExpiration() && this.maxAge() > 3600 * 24 && (headers.warning = (headers.warning ? `${headers.warning}, ` : "") + '113 - "rfc7234 5.5.4"'), headers.age = `${Math.round(age)}`, headers.date = new Date(this.now()).toUTCString(), headers; + } + /** + * Value of the Date response header or current time if Date was invalid + * @return timestamp + */ + date() { + let serverDate = Date.parse(this._resHeaders.date); + return isFinite(serverDate) ? serverDate : this._responseTime; + } + /** + * Value of the Age header, in seconds, updated for the current time. + * May be fractional. + * + * @return Number + */ + age() { + let age = this._ageValue(), residentTime = (this.now() - this._responseTime) / 1e3; + return age + residentTime; + } + _ageValue() { + return toNumberOrZero(this._resHeaders.age); + } + /** + * Value of applicable max-age (or heuristic equivalent) in seconds. This counts since response's `Date`. + * + * For an up-to-date value, see `timeToLive()`. + * + * @return Number + */ + maxAge() { + if (!this.storable() || this._rescc["no-cache"] || this._isShared && this._resHeaders["set-cookie"] && !this._rescc.public && !this._rescc.immutable || this._resHeaders.vary === "*") + return 0; + if (this._isShared) { + if (this._rescc["proxy-revalidate"]) + return 0; + if (this._rescc["s-maxage"]) + return toNumberOrZero(this._rescc["s-maxage"]); + } + if (this._rescc["max-age"]) + return toNumberOrZero(this._rescc["max-age"]); + let defaultMinTtl = this._rescc.immutable ? this._immutableMinTtl : 0, serverDate = this.date(); + if (this._resHeaders.expires) { + let expires = Date.parse(this._resHeaders.expires); + return Number.isNaN(expires) || expires < serverDate ? 0 : Math.max(defaultMinTtl, (expires - serverDate) / 1e3); + } + if (this._resHeaders["last-modified"]) { + let lastModified = Date.parse(this._resHeaders["last-modified"]); + if (isFinite(lastModified) && serverDate > lastModified) + return Math.max( + defaultMinTtl, + (serverDate - lastModified) / 1e3 * this._cacheHeuristic + ); + } + return defaultMinTtl; + } + timeToLive() { + let age = this.maxAge() - this.age(), staleIfErrorAge = age + toNumberOrZero(this._rescc["stale-if-error"]), staleWhileRevalidateAge = age + toNumberOrZero(this._rescc["stale-while-revalidate"]); + return Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1e3; + } + stale() { + return this.maxAge() <= this.age(); + } + _useStaleIfError() { + return this.maxAge() + toNumberOrZero(this._rescc["stale-if-error"]) > this.age(); + } + useStaleWhileRevalidate() { + return this.maxAge() + toNumberOrZero(this._rescc["stale-while-revalidate"]) > this.age(); + } + static fromObject(obj) { + return new this(void 0, void 0, { _fromObject: obj }); + } + _fromObject(obj) { + if (this._responseTime) throw Error("Reinitialized"); + if (!obj || obj.v !== 1) throw Error("Invalid serialization"); + this._responseTime = obj.t, this._isShared = obj.sh, this._cacheHeuristic = obj.ch, this._immutableMinTtl = obj.imm !== void 0 ? obj.imm : 24 * 3600 * 1e3, this._status = obj.st, this._resHeaders = obj.resh, this._rescc = obj.rescc, this._method = obj.m, this._url = obj.u, this._host = obj.h, this._noAuthorization = obj.a, this._reqHeaders = obj.reqh, this._reqcc = obj.reqcc; + } + toObject() { + return { + v: 1, + t: this._responseTime, + sh: this._isShared, + ch: this._cacheHeuristic, + imm: this._immutableMinTtl, + st: this._status, + resh: this._resHeaders, + rescc: this._rescc, + m: this._method, + u: this._url, + h: this._host, + a: this._noAuthorization, + reqh: this._reqHeaders, + reqcc: this._reqcc + }; + } + /** + * Headers for sending to the origin server to revalidate stale response. + * Allows server to return 304 to allow reuse of the previous response. + * + * Hop by hop headers are always stripped. + * Revalidation headers may be added or removed, depending on request. + */ + revalidationHeaders(incomingReq) { + this._assertRequestHasHeaders(incomingReq); + let headers = this._copyWithoutHopByHopHeaders(incomingReq.headers); + if (delete headers["if-range"], !this._requestMatches(incomingReq, !0) || !this.storable()) + return delete headers["if-none-match"], delete headers["if-modified-since"], headers; + if (this._resHeaders.etag && (headers["if-none-match"] = headers["if-none-match"] ? `${headers["if-none-match"]}, ${this._resHeaders.etag}` : this._resHeaders.etag), headers["accept-ranges"] || headers["if-match"] || headers["if-unmodified-since"] || this._method && this._method != "GET") { + if (delete headers["if-modified-since"], headers["if-none-match"]) { + let etags = headers["if-none-match"].split(/,/).filter((etag) => !/^\s*W\//.test(etag)); + etags.length ? headers["if-none-match"] = etags.join(",").trim() : delete headers["if-none-match"]; + } + } else this._resHeaders["last-modified"] && !headers["if-modified-since"] && (headers["if-modified-since"] = this._resHeaders["last-modified"]); + return headers; + } + /** + * Creates new CachePolicy with information combined from the previews response, + * and the new revalidation response. + * + * Returns {policy, modified} where modified is a boolean indicating + * whether the response body has been modified, and old cached body can't be used. + * + * @return {Object} {policy: CachePolicy, modified: Boolean} + */ + revalidatedPolicy(request, response) { + if (this._assertRequestHasHeaders(request), this._useStaleIfError() && isErrorResponse(response)) + return { + modified: !1, + matches: !1, + policy: this + }; + if (!response || !response.headers) + throw Error("Response headers missing"); + let matches = !1; + if (response.status !== void 0 && response.status != 304 ? matches = !1 : response.headers.etag && !/^\s*W\//.test(response.headers.etag) ? matches = this._resHeaders.etag && this._resHeaders.etag.replace(/^\s*W\//, "") === response.headers.etag : this._resHeaders.etag && response.headers.etag ? matches = this._resHeaders.etag.replace(/^\s*W\//, "") === response.headers.etag.replace(/^\s*W\//, "") : this._resHeaders["last-modified"] ? matches = this._resHeaders["last-modified"] === response.headers["last-modified"] : !this._resHeaders.etag && !this._resHeaders["last-modified"] && !response.headers.etag && !response.headers["last-modified"] && (matches = !0), !matches) + return { + policy: new this.constructor(request, response), + // Client receiving 304 without body, even if it's invalid/mismatched has no option + // but to reuse a cached body. We don't have a good way to tell clients to do + // error recovery in such case. + modified: response.status != 304, + matches: !1 + }; + let headers = {}; + for (let k in this._resHeaders) + headers[k] = k in response.headers && !excludedFromRevalidationUpdate[k] ? response.headers[k] : this._resHeaders[k]; + let newResponse = Object.assign({}, response, { + status: this._status, + method: this._method, + headers + }); + return { + policy: new this.constructor(request, newResponse, { + shared: this._isShared, + cacheHeuristic: this._cacheHeuristic, + immutableMinTimeToLive: this._immutableMinTtl + }), + modified: !1, + matches: !0 + }; + } + }; + } +}); + +// src/workers/cache/cache.worker.ts +var import_http_cache_semantics = __toESM(require_http_cache_semantics()); +import assert from "node:assert"; +import { Buffer as Buffer2 } from "node:buffer"; +import { + DeferredPromise, + GET, + KeyValueStorage, + LogLevel, + MiniflareDurableObject, + parseRanges, + PURGE, + PUT +} from "miniflare:shared"; + +// src/workers/kv/constants.ts +import { testRegExps } from "miniflare:shared"; +var KVLimits = { + MIN_CACHE_TTL: 60, + MAX_LIST_KEYS: 1e3, + MAX_KEY_SIZE: 512, + MAX_VALUE_SIZE: 25 * 1024 * 1024, + MAX_VALUE_SIZE_TEST: 1024, + MAX_METADATA_SIZE: 1024 +}; +var SITES_NO_CACHE_PREFIX = "$__MINIFLARE_SITES__$/"; +function isSitesRequest(request) { + return new URL(request.url).pathname.startsWith(`/${SITES_NO_CACHE_PREFIX}`); +} + +// src/workers/cache/errors.worker.ts +import { HttpError } from "miniflare:shared"; + +// src/workers/cache/constants.ts +var CacheHeaders = { + NAMESPACE: "cf-cache-namespace", + STATUS: "cf-cache-status" +}; + +// src/workers/cache/errors.worker.ts +var CacheError = class extends HttpError { + constructor(code, message, headers = []) { + super(code, message); + this.headers = headers; + } + toResponse() { + return new Response(null, { + status: this.code, + headers: this.headers + }); + } + context(info) { + return this.message += ` (${info})`, this; + } +}, StorageFailure = class extends CacheError { + constructor() { + super(413, "Cache storage failed"); + } +}, PurgeFailure = class extends CacheError { + constructor() { + super(404, "Couldn't find asset to purge"); + } +}, CacheMiss = class extends CacheError { + constructor() { + super( + // workerd ignores this, but it's the correct status code + 504, + "Asset not found in cache", + [[CacheHeaders.STATUS, "MISS"]] + ); + } +}, RangeNotSatisfiable = class extends CacheError { + constructor(size) { + super(416, "Range not satisfiable", [ + ["Content-Range", `bytes */${size}`], + [CacheHeaders.STATUS, "HIT"] + ]); + } +}; + +// src/workers/cache/cache.worker.ts +function getCacheKey(req) { + return req.cf?.cacheKey ? String(req.cf?.cacheKey) : req.url; +} +function getExpiration(timers, req, res) { + let reqHeaders = normaliseHeaders(req.headers); + delete reqHeaders["cache-control"]; + let resHeaders = normaliseHeaders(res.headers); + resHeaders["cache-control"]?.toLowerCase().includes("private=set-cookie") && (resHeaders["cache-control"] = resHeaders["cache-control"]?.toLowerCase().replace(/private=set-cookie;?/i, ""), delete resHeaders["set-cookie"]); + let cacheReq = { + url: req.url, + // If a request gets to the Cache service, it's method will be GET. See README.md for details + method: "GET", + headers: reqHeaders + }, cacheRes = { + status: res.status, + headers: resHeaders + }, originalNow = import_http_cache_semantics.default.prototype.now; + import_http_cache_semantics.default.prototype.now = timers.now; + try { + let policy = new import_http_cache_semantics.default(cacheReq, cacheRes, { shared: !0 }); + return { + // Check if the request & response is cacheable + storable: policy.storable() && !("set-cookie" in resHeaders), + expiration: policy.timeToLive(), + // Cache Policy Headers is typed as [header: string]: string | string[] | undefined + // It's safe to ignore the undefined here, which is what casting to HeadersInit does + headers: policy.responseHeaders() + }; + } finally { + import_http_cache_semantics.default.prototype.now = originalNow; + } +} +function normaliseHeaders(headers) { + let result = {}; + for (let [key, value] of headers) result[key.toLowerCase()] = value; + return result; +} +var etagRegexp = /^(W\/)?"(.+)"$/; +function parseETag(value) { + return etagRegexp.exec(value.trim())?.[2] ?? void 0; +} +var utcDateRegexp = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d\d (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d\d\d\d \d\d:\d\d:\d\d GMT$/; +function parseUTCDate(value) { + return utcDateRegexp.test(value) ? Date.parse(value) : NaN; +} +function getMatchResponse(reqHeaders, res) { + let reqIfNoneMatchHeader = reqHeaders.get("If-None-Match"), resETagHeader = res.headers.get("ETag"); + if (reqIfNoneMatchHeader !== null && resETagHeader !== null) { + let resETag = parseETag(resETagHeader); + if (resETag !== void 0) { + if (reqIfNoneMatchHeader.trim() === "*") + return new Response(null, { status: 304, headers: res.headers }); + for (let reqIfNoneMatch of reqIfNoneMatchHeader.split(",")) + if (resETag === parseETag(reqIfNoneMatch)) + return new Response(null, { status: 304, headers: res.headers }); + } + } + let reqIfModifiedSinceHeader = reqHeaders.get("If-Modified-Since"), resLastModifiedHeader = res.headers.get("Last-Modified"); + if (reqIfModifiedSinceHeader !== null && resLastModifiedHeader !== null) { + let reqIfModifiedSince = parseUTCDate(reqIfModifiedSinceHeader); + if (parseUTCDate(resLastModifiedHeader) <= reqIfModifiedSince) + return new Response(null, { status: 304, headers: res.headers }); + } + if (res.ranges.length > 0) + if (res.status = 206, res.ranges.length > 1) + assert(!(res.body instanceof ReadableStream)), res.headers.set("Content-Type", res.body.multipartContentType); + else { + let { start, end } = res.ranges[0]; + res.headers.set( + "Content-Range", + `bytes ${start}-${end}/${res.totalSize}` + ), res.headers.set("Content-Length", `${end - start + 1}`); + } + return res.body instanceof ReadableStream || (res.body = res.body.body), new Response(res.body, { status: res.status, headers: res.headers }); +} +var CR = 13, LF = 10, STATUS_REGEXP = /^HTTP\/\d(?:\.\d)? (?\d+) (?.*)$/; +async function parseHttpResponse(stream) { + let buffer = Buffer2.alloc(0), blankLineIndex = -1; + for await (let chunk of stream.values({ preventCancel: !0 })) + if (buffer = Buffer2.concat([buffer, chunk]), blankLineIndex = buffer.findIndex( + (_value, index) => buffer[index] === CR && buffer[index + 1] === LF && buffer[index + 2] === CR && buffer[index + 3] === LF + ), blankLineIndex !== -1) break; + assert(blankLineIndex !== -1, "Expected to find blank line in HTTP message"); + let rawStatusHeaders = buffer.subarray(0, blankLineIndex).toString(), [rawStatus, ...rawHeaders] = rawStatusHeaders.split(`\r +`), statusMatch = rawStatus.match(STATUS_REGEXP); + assert( + statusMatch?.groups != null, + `Expected first line ${JSON.stringify(rawStatus)} to be HTTP status line` + ); + let { rawStatusCode, statusText } = statusMatch.groups, statusCode = parseInt(rawStatusCode), headers = rawHeaders.map((rawHeader) => { + let index = rawHeader.indexOf(":"); + return [ + rawHeader.substring(0, index), + rawHeader.substring(index + 1).trim() + ]; + }), prefix = buffer.subarray( + blankLineIndex + 4 + /* "\r\n\r\n" */ + ), { readable, writable } = new IdentityTransformStream(), writer = writable.getWriter(); + return writer.write(prefix).then(() => (writer.releaseLock(), stream.pipeTo(writable))).catch((e) => console.error("Error writing HTTP body:", e)), new Response(readable, { status: statusCode, statusText, headers }); +} +var SizingStream = class extends TransformStream { + size; + constructor() { + let sizePromise = new DeferredPromise(), size = 0; + super({ + transform(chunk, controller) { + size += chunk.byteLength, controller.enqueue(chunk); + }, + flush() { + sizePromise.resolve(size); + } + }), this.size = sizePromise; + } +}, CacheObject = class extends MiniflareDurableObject { + #warnedUsage = !1; + async #maybeWarnUsage(request) { + !this.#warnedUsage && request.cf?.miniflare?.cacheWarnUsage === !0 && (this.#warnedUsage = !0, await this.logWithLevel( + LogLevel.WARN, + "Cache operations will have no impact if you deploy to a workers.dev subdomain!" + )); + } + #storage; + get storage() { + return this.#storage ??= new KeyValueStorage(this); + } + match = async (req) => { + await this.#maybeWarnUsage(req); + let cacheKey = getCacheKey(req); + if (isSitesRequest(req)) throw new CacheMiss(); + let resHeaders, resRanges, cached = await this.storage.get(cacheKey, ({ size, headers }) => { + resHeaders = new Headers(headers); + let contentType = resHeaders.get("Content-Type"), rangeHeader = req.headers.get("Range"); + if (rangeHeader !== null && (resRanges = parseRanges(rangeHeader, size), resRanges === void 0)) + throw new RangeNotSatisfiable(size); + return { + ranges: resRanges, + contentLength: size, + contentType: contentType ?? void 0 + }; + }); + if (cached?.metadata === void 0) throw new CacheMiss(); + return assert(resHeaders !== void 0), resHeaders.set("CF-Cache-Status", "HIT"), resRanges ??= [], getMatchResponse(req.headers, { + status: cached.metadata.status, + headers: resHeaders, + ranges: resRanges, + body: cached.value, + totalSize: cached.metadata.size + }); + }; + put = async (req) => { + await this.#maybeWarnUsage(req); + let cacheKey = getCacheKey(req); + if (isSitesRequest(req)) throw new CacheMiss(); + assert(req.body !== null); + let res = await parseHttpResponse(req.body), body = res.body; + assert(body !== null); + let { storable, expiration, headers } = getExpiration( + this.timers, + req, + res + ); + if (!storable) { + try { + await body.pipeTo(new WritableStream()); + } catch { + } + throw new StorageFailure(); + } + let contentLength = parseInt(res.headers.get("Content-Length")), sizePromise; + if (Number.isNaN(contentLength)) { + let stream = new SizingStream(); + body = body.pipeThrough(stream), sizePromise = stream.size; + } else + sizePromise = Promise.resolve(contentLength); + let metadata = sizePromise.then((size) => ({ + headers: Object.entries(headers), + status: res.status, + size + })); + return await this.storage.put({ + key: cacheKey, + value: body, + expiration: this.timers.now() + expiration, + metadata + }), new Response(null, { status: 204 }); + }; + delete = async (req) => { + await this.#maybeWarnUsage(req); + let cacheKey = getCacheKey(req); + if (!await this.storage.delete(cacheKey)) throw new PurgeFailure(); + return new Response(null); + }; +}; +__decorateClass([ + GET() +], CacheObject.prototype, "match", 2), __decorateClass([ + PUT() +], CacheObject.prototype, "put", 2), __decorateClass([ + PURGE() +], CacheObject.prototype, "delete", 2); +export { + CacheObject, + parseHttpResponse +}; +//# sourceMappingURL=cache.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/cache/cache.worker.js.map b/node_modules/miniflare/dist/src/workers/cache/cache.worker.js.map new file mode 100644 index 0000000..fe86fff --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/cache/cache.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../../../node_modules/.pnpm/http-cache-semantics@4.1.1/node_modules/http-cache-semantics/index.js", "../../../../src/workers/cache/cache.worker.ts", "../../../../src/workers/kv/constants.ts", "../../../../src/workers/cache/errors.worker.ts", "../../../../src/workers/cache/constants.ts"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAEA,QAAM,+BAA+B,oBAAI,IAAI;AAAA,MACzC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ,CAAC,GAGK,qBAAqB,oBAAI,IAAI;AAAA,MAC/B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ,CAAC,GAEK,mBAAmB,oBAAI,IAAI;AAAA,MAC7B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ,CAAC,GAEK,kBAAkB;AAAA,MACpB,MAAM;AAAA;AAAA,MACN,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,sBAAsB;AAAA,MACtB,uBAAuB;AAAA,MACvB,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,qBAAqB;AAAA,MACrB,SAAS;AAAA,IACb,GAEM,iCAAiC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IAAI;AAAA,GAhEO,YAiEZ,sBAwDA;AAAA,EADC,MAAM;AAAA,GAxHK,YAyHZ;", + "names": ["Buffer", "CachePolicy", "Buffer"] +} diff --git a/node_modules/miniflare/dist/src/workers/core/entry.worker.js b/node_modules/miniflare/dist/src/workers/core/entry.worker.js new file mode 100644 index 0000000..257ad98 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/core/entry.worker.js @@ -0,0 +1,1011 @@ +// ../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs +var FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM, isTTY = !0; +typeof process < "u" && ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {}, isTTY = process.stdout && process.stdout.isTTY); +var $ = { + enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY) +}; +function init(x, y) { + let rgx = new RegExp(`\\x1b\\[${y}m`, "g"), open = `\x1B[${x}m`, close = `\x1B[${y}m`; + return function(txt) { + return !$.enabled || txt == null ? txt : open + (~("" + txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close; + }; +} +var reset = init(0, 0), bold = init(1, 22), dim = init(2, 22), italic = init(3, 23), underline = init(4, 24), inverse = init(7, 27), hidden = init(8, 28), strikethrough = init(9, 29), black = init(30, 39), red = init(31, 39), green = init(32, 39), yellow = init(33, 39), blue = init(34, 39), magenta = init(35, 39), cyan = init(36, 39), white = init(37, 39), gray = init(90, 39), grey = init(90, 39), bgBlack = init(40, 49), bgRed = init(41, 49), bgGreen = init(42, 49), bgYellow = init(43, 49), bgBlue = init(44, 49), bgMagenta = init(45, 49), bgCyan = init(46, 49), bgWhite = init(47, 49); + +// src/workers/core/entry.worker.ts +import { HttpError, LogLevel, SharedHeaders } from "miniflare:shared"; + +// src/shared/mime-types.ts +var compressedByCloudflareFL = /* @__PURE__ */ new Set([ + // list copied from https://developers.cloudflare.com/speed/optimization/content/brotli/content-compression/#:~:text=If%20supported%20by%20visitors%E2%80%99%20web%20browsers%2C%20Cloudflare%20will%20return%20Gzip%20or%20Brotli%2Dencoded%20responses%20for%20the%20following%20content%20types%3A + "text/html", + "text/richtext", + "text/plain", + "text/css", + "text/x-script", + "text/x-component", + "text/x-java-source", + "text/x-markdown", + "application/javascript", + "application/x-javascript", + "text/javascript", + "text/js", + "image/x-icon", + "image/vnd.microsoft.icon", + "application/x-perl", + "application/x-httpd-cgi", + "text/xml", + "application/xml", + "application/rss+xml", + "application/vnd.api+json", + "application/x-protobuf", + "application/json", + "multipart/bag", + "multipart/mixed", + "application/xhtml+xml", + "font/ttf", + "font/otf", + "font/x-woff", + "image/svg+xml", + "application/vnd.ms-fontobject", + "application/ttf", + "application/x-ttf", + "application/otf", + "application/x-otf", + "application/truetype", + "application/opentype", + "application/x-opentype", + "application/font-woff", + "application/eot", + "application/font", + "application/font-sfnt", + "application/wasm", + "application/javascript-binast", + "application/manifest+json", + "application/ld+json", + "application/graphql+json", + "application/geo+json" +]); +function isCompressedByCloudflareFL(contentTypeHeader) { + if (!contentTypeHeader) return !0; + let [contentType] = contentTypeHeader.split(";"); + return compressedByCloudflareFL.has(contentType); +} + +// src/workers/core/constants.ts +var CoreHeaders = { + CUSTOM_SERVICE: "MF-Custom-Service", + ORIGINAL_URL: "MF-Original-URL", + PROXY_SHARED_SECRET: "MF-Proxy-Shared-Secret", + DISABLE_PRETTY_ERROR: "MF-Disable-Pretty-Error", + ERROR_STACK: "MF-Experimental-Error-Stack", + ROUTE_OVERRIDE: "MF-Route-Override", + CF_BLOB: "MF-CF-Blob", + // API Proxy + OP_SECRET: "MF-Op-Secret", + OP: "MF-Op", + OP_TARGET: "MF-Op-Target", + OP_KEY: "MF-Op-Key", + OP_SYNC: "MF-Op-Sync", + OP_STRINGIFIED_SIZE: "MF-Op-Stringified-Size", + OP_RESULT_TYPE: "MF-Op-Result-Type" +}, CoreBindings = { + SERVICE_LOOPBACK: "MINIFLARE_LOOPBACK", + SERVICE_USER_ROUTE_PREFIX: "MINIFLARE_USER_ROUTE_", + SERVICE_USER_FALLBACK: "MINIFLARE_USER_FALLBACK", + TEXT_CUSTOM_SERVICE: "MINIFLARE_CUSTOM_SERVICE", + TEXT_UPSTREAM_URL: "MINIFLARE_UPSTREAM_URL", + JSON_CF_BLOB: "CF_BLOB", + JSON_ROUTES: "MINIFLARE_ROUTES", + JSON_LOG_LEVEL: "MINIFLARE_LOG_LEVEL", + DATA_LIVE_RELOAD_SCRIPT: "MINIFLARE_LIVE_RELOAD_SCRIPT", + DURABLE_OBJECT_NAMESPACE_PROXY: "MINIFLARE_PROXY", + DATA_PROXY_SECRET: "MINIFLARE_PROXY_SECRET", + DATA_PROXY_SHARED_SECRET: "MINIFLARE_PROXY_SHARED_SECRET" +}, ProxyOps = { + // Get the target or a property of the target + GET: "GET", + // Get the descriptor for a property of the target + GET_OWN_DESCRIPTOR: "GET_OWN_DESCRIPTOR", + // Get the target's own property names + GET_OWN_KEYS: "GET_OWN_KEYS", + // Call a method on the target + CALL: "CALL", + // Remove the strong reference to the target on the "heap", allowing it to be + // garbage collected + FREE: "FREE" +}, ProxyAddresses = { + GLOBAL: 0, + // globalThis + ENV: 1, + // env + USER_START: 2 +}; +function isFetcherFetch(targetName, key) { + return (targetName === "Fetcher" || targetName === "DurableObject" || targetName === "WorkerRpc") && key === "fetch"; +} +function isR2ObjectWriteHttpMetadata(targetName, key) { + return (targetName === "HeadResult" || targetName === "GetResult") && key === "writeHttpMetadata"; +} + +// src/workers/core/http.ts +var STATUS_CODES = { + 100: "Continue", + 101: "Switching Protocols", + 102: "Processing", + 103: "Early Hints", + 200: "OK", + 201: "Created", + 202: "Accepted", + 203: "Non-Authoritative Information", + 204: "No Content", + 205: "Reset Content", + 206: "Partial Content", + 207: "Multi-Status", + 208: "Already Reported", + 226: "IM Used", + 300: "Multiple Choices", + 301: "Moved Permanently", + 302: "Found", + 303: "See Other", + 304: "Not Modified", + 305: "Use Proxy", + 307: "Temporary Redirect", + 308: "Permanent Redirect", + 400: "Bad Request", + 401: "Unauthorized", + 402: "Payment Required", + 403: "Forbidden", + 404: "Not Found", + 405: "Method Not Allowed", + 406: "Not Acceptable", + 407: "Proxy Authentication Required", + 408: "Request Timeout", + 409: "Conflict", + 410: "Gone", + 411: "Length Required", + 412: "Precondition Failed", + 413: "Payload Too Large", + 414: "URI Too Long", + 415: "Unsupported Media Type", + 416: "Range Not Satisfiable", + 417: "Expectation Failed", + 418: "I'm a Teapot", + 421: "Misdirected Request", + 422: "Unprocessable Entity", + 423: "Locked", + 424: "Failed Dependency", + 425: "Too Early", + 426: "Upgrade Required", + 428: "Precondition Required", + 429: "Too Many Requests", + 431: "Request Header Fields Too Large", + 451: "Unavailable For Legal Reasons", + 500: "Internal Server Error", + 501: "Not Implemented", + 502: "Bad Gateway", + 503: "Service Unavailable", + 504: "Gateway Timeout", + 505: "HTTP Version Not Supported", + 506: "Variant Also Negotiates", + 507: "Insufficient Storage", + 508: "Loop Detected", + 509: "Bandwidth Limit Exceeded", + 510: "Not Extended", + 511: "Network Authentication Required" +}; + +// src/workers/core/routing.ts +function matchRoutes(routes, url) { + for (let route of routes) { + if (route.protocol && route.protocol !== url.protocol) continue; + if (route.allowHostnamePrefix) { + if (!url.hostname.endsWith(route.hostname)) continue; + } else if (url.hostname !== route.hostname) continue; + let path = url.pathname + url.search; + if (route.allowPathSuffix) { + if (!path.startsWith(route.path)) continue; + } else if (path !== route.path) continue; + return route.target; + } + return null; +} + +// src/workers/core/proxy.worker.ts +import assert2 from "node:assert"; +import { Buffer as Buffer2 } from "node:buffer"; + +// ../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/utils.js +var DevalueError = class extends Error { + /** + * @param {string} message + * @param {string[]} keys + */ + constructor(message, keys) { + super(message), this.name = "DevalueError", this.path = keys.join(""); + } +}; +function is_primitive(thing) { + return Object(thing) !== thing; +} +var object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames( + Object.prototype +).sort().join("\0"); +function is_plain_object(thing) { + let proto = Object.getPrototypeOf(thing); + return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join("\0") === object_proto_names; +} +function get_type(thing) { + return Object.prototype.toString.call(thing).slice(8, -1); +} +function get_escaped_char(char) { + switch (char) { + case '"': + return '\\"'; + case "<": + return "\\u003C"; + case "\\": + return "\\\\"; + case ` +`: + return "\\n"; + case "\r": + return "\\r"; + case " ": + return "\\t"; + case "\b": + return "\\b"; + case "\f": + return "\\f"; + case "\u2028": + return "\\u2028"; + case "\u2029": + return "\\u2029"; + default: + return char < " " ? `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}` : ""; + } +} +function stringify_string(str) { + let result = "", last_pos = 0, len = str.length; + for (let i = 0; i < len; i += 1) { + let char = str[i], replacement = get_escaped_char(char); + replacement && (result += str.slice(last_pos, i) + replacement, last_pos = i + 1); + } + return `"${last_pos === 0 ? str : result + str.slice(last_pos)}"`; +} + +// ../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/parse.js +function parse(serialized, revivers) { + return unflatten(JSON.parse(serialized), revivers); +} +function unflatten(parsed, revivers) { + if (typeof parsed == "number") return hydrate(parsed, !0); + if (!Array.isArray(parsed) || parsed.length === 0) + throw new Error("Invalid input"); + let values = ( + /** @type {any[]} */ + parsed + ), hydrated = Array(values.length); + function hydrate(index, standalone = !1) { + if (index === -1) return; + if (index === -3) return NaN; + if (index === -4) return 1 / 0; + if (index === -5) return -1 / 0; + if (index === -6) return -0; + if (standalone) throw new Error("Invalid input"); + if (index in hydrated) return hydrated[index]; + let value = values[index]; + if (!value || typeof value != "object") + hydrated[index] = value; + else if (Array.isArray(value)) + if (typeof value[0] == "string") { + let type = value[0], reviver = revivers?.[type]; + if (reviver) + return hydrated[index] = reviver(hydrate(value[1])); + switch (type) { + case "Date": + hydrated[index] = new Date(value[1]); + break; + case "Set": + let set = /* @__PURE__ */ new Set(); + hydrated[index] = set; + for (let i = 1; i < value.length; i += 1) + set.add(hydrate(value[i])); + break; + case "Map": + let map = /* @__PURE__ */ new Map(); + hydrated[index] = map; + for (let i = 1; i < value.length; i += 2) + map.set(hydrate(value[i]), hydrate(value[i + 1])); + break; + case "RegExp": + hydrated[index] = new RegExp(value[1], value[2]); + break; + case "Object": + hydrated[index] = Object(value[1]); + break; + case "BigInt": + hydrated[index] = BigInt(value[1]); + break; + case "null": + let obj = /* @__PURE__ */ Object.create(null); + hydrated[index] = obj; + for (let i = 1; i < value.length; i += 2) + obj[value[i]] = hydrate(value[i + 1]); + break; + default: + throw new Error(`Unknown type ${type}`); + } + } else { + let array = new Array(value.length); + hydrated[index] = array; + for (let i = 0; i < value.length; i += 1) { + let n = value[i]; + n !== -2 && (array[i] = hydrate(n)); + } + } + else { + let object = {}; + hydrated[index] = object; + for (let key in value) { + let n = value[key]; + object[key] = hydrate(n); + } + } + return hydrated[index]; + } + return hydrate(0); +} + +// ../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/stringify.js +function stringify(value, reducers) { + let stringified = [], indexes = /* @__PURE__ */ new Map(), custom = []; + for (let key in reducers) + custom.push({ key, fn: reducers[key] }); + let keys = [], p = 0; + function flatten(thing) { + if (typeof thing == "function") + throw new DevalueError("Cannot stringify a function", keys); + if (indexes.has(thing)) return indexes.get(thing); + if (thing === void 0) return -1; + if (Number.isNaN(thing)) return -3; + if (thing === 1 / 0) return -4; + if (thing === -1 / 0) return -5; + if (thing === 0 && 1 / thing < 0) return -6; + let index2 = p++; + indexes.set(thing, index2); + for (let { key, fn } of custom) { + let value2 = fn(thing); + if (value2) + return stringified[index2] = `["${key}",${flatten(value2)}]`, index2; + } + let str = ""; + if (is_primitive(thing)) + str = stringify_primitive(thing); + else + switch (get_type(thing)) { + case "Number": + case "String": + case "Boolean": + str = `["Object",${stringify_primitive(thing)}]`; + break; + case "BigInt": + str = `["BigInt",${thing}]`; + break; + case "Date": + str = `["Date","${thing.toISOString()}"]`; + break; + case "RegExp": + let { source, flags } = thing; + str = flags ? `["RegExp",${stringify_string(source)},"${flags}"]` : `["RegExp",${stringify_string(source)}]`; + break; + case "Array": + str = "["; + for (let i = 0; i < thing.length; i += 1) + i > 0 && (str += ","), i in thing ? (keys.push(`[${i}]`), str += flatten(thing[i]), keys.pop()) : str += -2; + str += "]"; + break; + case "Set": + str = '["Set"'; + for (let value2 of thing) + str += `,${flatten(value2)}`; + str += "]"; + break; + case "Map": + str = '["Map"'; + for (let [key, value2] of thing) + keys.push( + `.get(${is_primitive(key) ? stringify_primitive(key) : "..."})` + ), str += `,${flatten(key)},${flatten(value2)}`; + str += "]"; + break; + default: + if (!is_plain_object(thing)) + throw new DevalueError( + "Cannot stringify arbitrary non-POJOs", + keys + ); + if (Object.getOwnPropertySymbols(thing).length > 0) + throw new DevalueError( + "Cannot stringify POJOs with symbolic keys", + keys + ); + if (Object.getPrototypeOf(thing) === null) { + str = '["null"'; + for (let key in thing) + keys.push(`.${key}`), str += `,${stringify_string(key)},${flatten(thing[key])}`, keys.pop(); + str += "]"; + } else { + str = "{"; + let started = !1; + for (let key in thing) + started && (str += ","), started = !0, keys.push(`.${key}`), str += `${stringify_string(key)}:${flatten(thing[key])}`, keys.pop(); + str += "}"; + } + } + return stringified[index2] = str, index2; + } + let index = flatten(value); + return index < 0 ? `${index}` : `[${stringified.join(",")}]`; +} +function stringify_primitive(thing) { + let type = typeof thing; + return type === "string" ? stringify_string(thing) : thing instanceof String ? stringify_string(thing.toString()) : thing === void 0 ? (-1).toString() : thing === 0 && 1 / thing < 0 ? (-6).toString() : type === "bigint" ? `["BigInt","${thing}"]` : String(thing); +} + +// src/workers/core/proxy.worker.ts +import { readPrefix, reduceError } from "miniflare:shared"; + +// src/workers/core/devalue.ts +import assert from "node:assert"; +import { Buffer } from "node:buffer"; +var ALLOWED_ARRAY_BUFFER_VIEW_CONSTRUCTORS = [ + DataView, + Int8Array, + Uint8Array, + Uint8ClampedArray, + Int16Array, + Uint16Array, + Int32Array, + Uint32Array, + Float32Array, + Float64Array, + BigInt64Array, + BigUint64Array +], ALLOWED_ERROR_CONSTRUCTORS = [ + EvalError, + RangeError, + ReferenceError, + SyntaxError, + TypeError, + URIError, + Error + // `Error` last so more specific error subclasses preferred +], structuredSerializableReducers = { + ArrayBuffer(value) { + if (value instanceof ArrayBuffer) + return [Buffer.from(value).toString("base64")]; + }, + ArrayBufferView(value) { + if (ArrayBuffer.isView(value)) + return [ + value.constructor.name, + value.buffer, + value.byteOffset, + value.byteLength + ]; + }, + Error(value) { + for (let ctor of ALLOWED_ERROR_CONSTRUCTORS) + if (value instanceof ctor && value.name === ctor.name) + return [value.name, value.message, value.stack, value.cause]; + if (value instanceof Error) + return ["Error", value.message, value.stack, value.cause]; + } +}, structuredSerializableRevivers = { + ArrayBuffer(value) { + assert(Array.isArray(value)); + let [encoded] = value; + assert(typeof encoded == "string"); + let view = Buffer.from(encoded, "base64"); + return view.buffer.slice( + view.byteOffset, + view.byteOffset + view.byteLength + ); + }, + ArrayBufferView(value) { + assert(Array.isArray(value)); + let [name, buffer, byteOffset, byteLength] = value; + assert(typeof name == "string"), assert(buffer instanceof ArrayBuffer), assert(typeof byteOffset == "number"), assert(typeof byteLength == "number"); + let ctor = globalThis[name]; + assert(ALLOWED_ARRAY_BUFFER_VIEW_CONSTRUCTORS.includes(ctor)); + let length = byteLength; + return "BYTES_PER_ELEMENT" in ctor && (length /= ctor.BYTES_PER_ELEMENT), new ctor(buffer, byteOffset, length); + }, + Error(value) { + assert(Array.isArray(value)); + let [name, message, stack, cause] = value; + assert(typeof name == "string"), assert(typeof message == "string"), assert(stack === void 0 || typeof stack == "string"); + let ctor = globalThis[name]; + assert(ALLOWED_ERROR_CONSTRUCTORS.includes(ctor)); + let error = new ctor(message, { cause }); + return error.stack = stack, error; + } +}; +function createHTTPReducers(impl) { + return { + Headers(val) { + if (val instanceof impl.Headers) return Object.fromEntries(val); + }, + Request(val) { + if (val instanceof impl.Request) + return [val.method, val.url, val.headers, val.cf, val.body]; + }, + Response(val) { + if (val instanceof impl.Response) + return [val.status, val.statusText, val.headers, val.cf, val.body]; + } + }; +} +function createHTTPRevivers(impl) { + return { + Headers(value) { + return assert(typeof value == "object" && value !== null), new impl.Headers(value); + }, + Request(value) { + assert(Array.isArray(value)); + let [method, url, headers, cf, body] = value; + return assert(typeof method == "string"), assert(typeof url == "string"), assert(headers instanceof impl.Headers), assert(body === null || impl.isReadableStream(body)), new impl.Request(url, { + method, + headers, + cf, + // @ts-expect-error `duplex` is not required by `workerd` yet + duplex: body === null ? void 0 : "half", + body + }); + }, + Response(value) { + assert(Array.isArray(value)); + let [status, statusText, headers, cf, body] = value; + return assert(typeof status == "number"), assert(typeof statusText == "string"), assert(headers instanceof impl.Headers), assert(body === null || impl.isReadableStream(body)), new impl.Response(body, { + status, + statusText, + headers, + cf + }); + } + }; +} +function stringifyWithStreams(impl, value, reducers, allowUnbufferedStream) { + let unbufferedStream, bufferPromises = [], streamReducers = { + ReadableStream(value2) { + if (impl.isReadableStream(value2)) + return allowUnbufferedStream && unbufferedStream === void 0 ? unbufferedStream = value2 : bufferPromises.push(impl.bufferReadableStream(value2)), !0; + }, + Blob(value2) { + if (value2 instanceof impl.Blob) + return bufferPromises.push(value2.arrayBuffer()), !0; + }, + ...reducers + }; + typeof value == "function" && (value = new __MiniflareFunctionWrapper( + value + )); + let stringifiedValue = stringify(value, streamReducers); + return bufferPromises.length === 0 ? { value: stringifiedValue, unbufferedStream } : Promise.all(bufferPromises).then((streamBuffers) => (streamReducers.ReadableStream = function(value2) { + if (impl.isReadableStream(value2)) + return value2 === unbufferedStream ? !0 : streamBuffers.shift(); + }, streamReducers.Blob = function(value2) { + if (value2 instanceof impl.Blob) { + let array = [streamBuffers.shift(), value2.type]; + return value2 instanceof impl.File && array.push(value2.name, value2.lastModified), array; + } + }, { value: stringify(value, streamReducers), unbufferedStream })); +} +var __MiniflareFunctionWrapper = class { + constructor(fnWithProps) { + return new Proxy(this, { + get: (_, key) => key === "__miniflareWrappedFunction" ? fnWithProps : fnWithProps[key] + }); + } +}; +function parseWithReadableStreams(impl, stringified, revivers) { + let streamRevivers = { + ReadableStream(value) { + return value === !0 ? (assert(stringified.unbufferedStream !== void 0), stringified.unbufferedStream) : (assert(value instanceof ArrayBuffer), impl.unbufferReadableStream(value)); + }, + Blob(value) { + if (assert(Array.isArray(value)), value.length === 2) { + let [buffer, type] = value; + assert(buffer instanceof ArrayBuffer), assert(typeof type == "string"); + let opts = {}; + return type !== "" && (opts.type = type), new impl.Blob([buffer], opts); + } else { + assert(value.length === 4); + let [buffer, type, name, lastModified] = value; + assert(buffer instanceof ArrayBuffer), assert(typeof type == "string"), assert(typeof name == "string"), assert(typeof lastModified == "number"); + let opts = { lastModified }; + return type !== "" && (opts.type = type), new impl.File([buffer], name, opts); + } + }, + ...revivers + }; + return parse(stringified.value, streamRevivers); +} + +// src/workers/core/proxy.worker.ts +var ENCODER = new TextEncoder(), DECODER = new TextDecoder(), ALLOWED_HOSTNAMES = ["127.0.0.1", "[::1]", "localhost"], WORKERS_PLATFORM_IMPL = { + Blob, + File, + Headers, + Request, + Response, + isReadableStream(value) { + return value instanceof ReadableStream; + }, + bufferReadableStream(stream) { + return new Response(stream).arrayBuffer(); + }, + unbufferReadableStream(buffer) { + let body = new Response(buffer).body; + return assert2(body !== null), body; + } +}, objectProtoNames = Object.getOwnPropertyNames(Object.prototype).sort().join("\0"); +function isPlainObject(value) { + let proto = Object.getPrototypeOf(value); + return value?.constructor?.name === "RpcStub" || isObject(value) && objectContainsFunctions(value) ? !1 : proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join("\0") === objectProtoNames; +} +function objectContainsFunctions(obj) { + let propertyNames = Object.getOwnPropertyNames(obj), propertySymbols = Object.getOwnPropertySymbols(obj), properties = [...propertyNames, ...propertySymbols]; + for (let property of properties) { + let entry = obj[property]; + if (typeof entry == "function" || isObject(entry) && objectContainsFunctions(entry)) + return !0; + } + return !1; +} +function isObject(value) { + return !!value && typeof value == "object"; +} +function getType(value) { + return Object.prototype.toString.call(value).slice(8, -1); +} +function isInternal(value) { + return isObject(value) && value[Symbol.for("cloudflare:internal-class")]; +} +var ProxyServer = class { + constructor(_state, env) { + this.env = env; + this.heap.set(ProxyAddresses.GLOBAL, globalThis), this.heap.set(ProxyAddresses.ENV, env); + } + nextHeapAddress = ProxyAddresses.USER_START; + heap = /* @__PURE__ */ new Map(); + reducers = { + ...structuredSerializableReducers, + ...createHTTPReducers(WORKERS_PLATFORM_IMPL), + // Corresponding revivers in `ProxyClient` + // `Native` reducer *MUST* be applied last + Native: (value) => { + let type = getType(value); + if ((type === "Object" || isInternal(value)) && !isPlainObject(value) || type === "Promise") { + let address = this.nextHeapAddress++; + this.heap.set(address, value), assert2(value !== null); + let name = value?.constructor.name, isFunction = value instanceof __MiniflareFunctionWrapper; + return [address, name, isFunction]; + } + } + }; + revivers = { + ...structuredSerializableRevivers, + ...createHTTPRevivers(WORKERS_PLATFORM_IMPL), + // Corresponding reducers in `ProxyClient` + Native: (value) => { + assert2(Array.isArray(value)); + let [address] = value; + assert2(typeof address == "number"); + let heapValue = this.heap.get(address); + return assert2(heapValue !== void 0), heapValue instanceof Promise && this.heap.delete(address), heapValue; + } + }; + nativeReviver = { Native: this.revivers.Native }; + async fetch(request) { + try { + return await this.#fetch(request); + } catch (e) { + let error = reduceError(e); + return Response.json(error, { + status: 500, + headers: { [CoreHeaders.ERROR_STACK]: "true" } + }); + } + } + async #fetch(request) { + let hostHeader = request.headers.get("Host"); + if (hostHeader == null) return new Response(null, { status: 400 }); + try { + let host = new URL(`http://${hostHeader}`); + if (!ALLOWED_HOSTNAMES.includes(host.hostname)) + return new Response(null, { status: 401 }); + } catch { + return new Response(null, { status: 400 }); + } + let secretHex = request.headers.get(CoreHeaders.OP_SECRET); + if (secretHex == null) return new Response(null, { status: 401 }); + let expectedSecret = this.env[CoreBindings.DATA_PROXY_SECRET], secretBuffer = Buffer2.from(secretHex, "hex"); + if (secretBuffer.byteLength !== expectedSecret.byteLength || !crypto.subtle.timingSafeEqual(secretBuffer, expectedSecret)) + return new Response(null, { status: 401 }); + let opHeader = request.headers.get(CoreHeaders.OP), targetHeader = request.headers.get(CoreHeaders.OP_TARGET), keyHeader = request.headers.get(CoreHeaders.OP_KEY), allowAsync = request.headers.get(CoreHeaders.OP_SYNC) === null, argsSizeHeader = request.headers.get(CoreHeaders.OP_STRINGIFIED_SIZE), contentLengthHeader = request.headers.get("Content-Length"); + if (targetHeader === null) return new Response(null, { status: 400 }); + if (opHeader === ProxyOps.FREE) { + for (let targetValue of targetHeader.split(",")) { + let targetAddress = parseInt(targetValue); + assert2(!Number.isNaN(targetAddress)), this.heap.delete(targetAddress); + } + return new Response(null, { status: 204 }); + } + let target = parse( + targetHeader, + this.nativeReviver + ), targetName = target.constructor.name, status = 200, result, unbufferedRest; + if (opHeader === ProxyOps.GET) { + if (result = keyHeader === null ? target : target[keyHeader], result?.constructor.name === "RpcProperty" && (result = await result), typeof result == "function") + return new Response(null, { + status: 204, + headers: { [CoreHeaders.OP_RESULT_TYPE]: "Function" } + }); + } else if (opHeader === ProxyOps.GET_OWN_DESCRIPTOR) { + if (keyHeader === null) return new Response(null, { status: 400 }); + let descriptor = Object.getOwnPropertyDescriptor(target, keyHeader); + descriptor !== void 0 && (result = { + configurable: descriptor.configurable, + enumerable: descriptor.enumerable, + writable: descriptor.writable + }); + } else if (opHeader === ProxyOps.GET_OWN_KEYS) + result = Object.getOwnPropertyNames(target); + else if (opHeader === ProxyOps.CALL) { + assert2(keyHeader !== null); + let func = target[keyHeader]; + if (assert2(typeof func == "function"), isFetcherFetch(targetName, keyHeader)) { + let originalUrl = request.headers.get(CoreHeaders.ORIGINAL_URL), url = new URL(originalUrl ?? request.url); + return request = new Request(url, request), request.headers.delete(CoreHeaders.OP_SECRET), request.headers.delete(CoreHeaders.OP), request.headers.delete(CoreHeaders.OP_TARGET), request.headers.delete(CoreHeaders.OP_KEY), request.headers.delete(CoreHeaders.ORIGINAL_URL), request.headers.delete(CoreHeaders.DISABLE_PRETTY_ERROR), func.call(target, request); + } + let args; + if (argsSizeHeader === null || argsSizeHeader === contentLengthHeader) + args = parseWithReadableStreams( + WORKERS_PLATFORM_IMPL, + { value: await request.text() }, + this.revivers + ); + else { + let argsSize = parseInt(argsSizeHeader); + assert2(!Number.isNaN(argsSize)), assert2(request.body !== null); + let [encodedArgs, rest] = await readPrefix(request.body, argsSize); + unbufferedRest = rest; + let stringifiedArgs = DECODER.decode(encodedArgs); + args = parseWithReadableStreams( + WORKERS_PLATFORM_IMPL, + { value: stringifiedArgs, unbufferedStream: rest }, + this.revivers + ); + } + assert2(Array.isArray(args)); + try { + ["RpcProperty", "RpcStub"].includes(func.constructor.name) ? result = await func(...args) : result = func.apply(target, args), isR2ObjectWriteHttpMetadata(targetName, keyHeader) && (result = args[0]); + } catch (e) { + status = 500, result = e; + } + } else + return new Response(null, { status: 404 }); + let headers = new Headers(); + if (allowAsync && result instanceof Promise) { + try { + result = await result; + } catch (e) { + status = 500, result = e; + } + headers.append(CoreHeaders.OP_RESULT_TYPE, "Promise"); + } + if (unbufferedRest !== void 0 && !unbufferedRest.locked) + try { + await unbufferedRest.pipeTo(new WritableStream()); + } catch { + } + if (result instanceof ReadableStream) + return headers.append(CoreHeaders.OP_RESULT_TYPE, "ReadableStream"), new Response(result, { status, headers }); + { + let stringified = await stringifyWithStreams( + WORKERS_PLATFORM_IMPL, + result, + this.reducers, + /* allowUnbufferedStream */ + allowAsync + ); + if (stringified.unbufferedStream === void 0) + return new Response(stringified.value, { status, headers }); + { + let body = new IdentityTransformStream(), encodedValue = ENCODER.encode(stringified.value), encodedSize = encodedValue.byteLength.toString(); + return headers.set(CoreHeaders.OP_STRINGIFIED_SIZE, encodedSize), this.#writeWithUnbufferedStream( + body.writable, + encodedValue, + stringified.unbufferedStream + ), new Response(body.readable, { status, headers }); + } + } + } + async #writeWithUnbufferedStream(writable, encodedValue, unbufferedStream) { + let writer = writable.getWriter(); + await writer.write(encodedValue), writer.releaseLock(), await unbufferedStream.pipeTo(writable); + } +}; + +// src/workers/core/entry.worker.ts +var encoder = new TextEncoder(); +function getUserRequest(request, env, clientIp) { + let originalUrl = request.headers.get(CoreHeaders.ORIGINAL_URL), url = new URL(originalUrl ?? request.url), rewriteHeadersFromOriginalUrl = !1, proxySharedSecret = request.headers.get( + CoreHeaders.PROXY_SHARED_SECRET + ); + if (proxySharedSecret) { + let secretFromHeader = encoder.encode(proxySharedSecret), configuredSecret = env[CoreBindings.DATA_PROXY_SHARED_SECRET]; + if (secretFromHeader.byteLength === configuredSecret?.byteLength && crypto.subtle.timingSafeEqual(secretFromHeader, configuredSecret)) + rewriteHeadersFromOriginalUrl = !0; + else + throw new HttpError( + 400, + `Disallowed header in request: ${CoreHeaders.PROXY_SHARED_SECRET}=${proxySharedSecret}` + ); + } + let upstreamUrl = env[CoreBindings.TEXT_UPSTREAM_URL]; + if (upstreamUrl !== void 0) { + let path = url.pathname + url.search; + path.startsWith("/") && (path = `./${path.substring(1)}`), url = new URL(path, upstreamUrl), rewriteHeadersFromOriginalUrl = !0; + } + if (request = new Request(url, request), request.headers.set("Accept-Encoding", "br, gzip"), rewriteHeadersFromOriginalUrl && request.headers.set("Host", url.host), clientIp && !request.headers.get("CF-Connecting-IP")) { + let ipv4Regex = /(?.*?):\d+/, ipv6Regex = /\[(?.*?)\]:\d+/, ip = clientIp.match(ipv6Regex)?.groups?.ip ?? clientIp.match(ipv4Regex)?.groups?.ip; + ip && request.headers.set("CF-Connecting-IP", ip); + } + return request.headers.delete(CoreHeaders.PROXY_SHARED_SECRET), request.headers.delete(CoreHeaders.ORIGINAL_URL), request.headers.delete(CoreHeaders.DISABLE_PRETTY_ERROR), request; +} +function getTargetService(request, url, env) { + let service = env[CoreBindings.SERVICE_USER_FALLBACK], override = request.headers.get(CoreHeaders.ROUTE_OVERRIDE); + request.headers.delete(CoreHeaders.ROUTE_OVERRIDE); + let route = override ?? matchRoutes(env[CoreBindings.JSON_ROUTES], url); + return route !== null && (service = env[`${CoreBindings.SERVICE_USER_ROUTE_PREFIX}${route}`]), service; +} +function maybePrettifyError(request, response, env) { + return response.status !== 500 || response.headers.get(CoreHeaders.ERROR_STACK) === null ? response : env[CoreBindings.SERVICE_LOOPBACK].fetch( + "http://localhost/core/error", + { + method: "POST", + headers: request.headers, + body: response.body, + cf: { prettyErrorOriginalUrl: request.url } + } + ); +} +function maybeInjectLiveReload(response, env, ctx) { + let liveReloadScript = env[CoreBindings.DATA_LIVE_RELOAD_SCRIPT]; + if (liveReloadScript === void 0 || !response.headers.get("Content-Type")?.toLowerCase().includes("text/html")) + return response; + let headers = new Headers(response.headers), contentLength = parseInt(headers.get("content-length")); + isNaN(contentLength) || headers.set( + "content-length", + String(contentLength + liveReloadScript.byteLength) + ); + let { readable, writable } = new IdentityTransformStream(); + return ctx.waitUntil( + (async () => { + await response.body?.pipeTo(writable, { preventClose: !0 }); + let writer = writable.getWriter(); + await writer.write(liveReloadScript), await writer.close(); + })() + ), new Response(readable, { + status: response.status, + statusText: response.statusText, + headers + }); +} +var acceptEncodingElement = /^(?[a-z]+|\*)(?:\s*;\s*q=(?\d+(?:.\d+)?))?$/; +function maybeParseAcceptEncodingElement(element) { + let match = acceptEncodingElement.exec(element); + if (match?.groups != null) + return { + coding: match.groups.coding, + weight: match.groups.weight === void 0 ? 1 : parseFloat(match.groups.weight) + }; +} +function parseAcceptEncoding(header) { + let encodings = []; + for (let element of header.split(",")) { + let maybeEncoding = maybeParseAcceptEncodingElement(element.trim()); + maybeEncoding !== void 0 && encodings.push(maybeEncoding); + } + return encodings.sort((a, b) => b.weight - a.weight); +} +function ensureAcceptableEncoding(clientAcceptEncoding, response) { + if (clientAcceptEncoding === null) return response; + let encodings = parseAcceptEncoding(clientAcceptEncoding); + if (encodings.length === 0) return response; + let contentEncoding = response.headers.get("Content-Encoding"), contentType = response.headers.get("Content-Type"); + if (!isCompressedByCloudflareFL(contentType) || contentEncoding !== null && contentEncoding !== "gzip" && contentEncoding !== "br") + return response; + let desiredEncoding, identityDisallowed = !1; + for (let encoding of encodings) + if (encoding.weight === 0) + (encoding.coding === "identity" || encoding.coding === "*") && (identityDisallowed = !0); + else if (encoding.coding === "gzip" || encoding.coding === "br") { + desiredEncoding = encoding.coding; + break; + } else if (encoding.coding === "identity") + break; + return desiredEncoding === void 0 ? identityDisallowed ? new Response("Unsupported Media Type", { + status: 415, + headers: { "Accept-Encoding": "br, gzip" } + }) : (contentEncoding === null || (response = new Response(response.body, response), response.headers.delete("Content-Encoding")), response) : (contentEncoding === desiredEncoding || (response = new Response(response.body, response), response.headers.set("Content-Encoding", desiredEncoding)), response); +} +function colourFromHTTPStatus(status) { + return 200 <= status && status < 300 ? green : 400 <= status && status < 500 ? yellow : 500 <= status ? red : blue; +} +function maybeLogRequest(req, res, env, ctx, startTime) { + if (env[CoreBindings.JSON_LOG_LEVEL] < LogLevel.INFO) return; + let url = new URL(req.url), statusText = (res.statusText.trim() || STATUS_CODES[res.status]) ?? "", lines = [ + `${bold(req.method)} ${url.pathname} `, + colourFromHTTPStatus(res.status)(`${bold(res.status)} ${statusText} `), + grey(`(${Date.now() - startTime}ms)`) + ], message = reset(lines.join("")); + ctx.waitUntil( + env[CoreBindings.SERVICE_LOOPBACK].fetch("http://localhost/core/log", { + method: "POST", + headers: { [SharedHeaders.LOG_LEVEL]: LogLevel.INFO.toString() }, + body: message + }) + ); +} +function handleProxy(request, env) { + let ns = env[CoreBindings.DURABLE_OBJECT_NAMESPACE_PROXY], id = ns.idFromName(""); + return ns.get(id).fetch(request); +} +async function handleScheduled(params, service) { + let time = params.get("time"), scheduledTime = time ? new Date(parseInt(time)) : void 0, cron = params.get("cron") ?? void 0, result = await service.scheduled({ + scheduledTime, + cron + }); + return new Response(result.outcome, { + status: result.outcome === "ok" ? 200 : 500 + }); +} +var entry_worker_default = { + async fetch(request, env, ctx) { + let startTime = Date.now(), clientIp = request.cf?.clientIp, clientCfBlobHeader = request.headers.get(CoreHeaders.CF_BLOB), cf = clientCfBlobHeader ? JSON.parse(clientCfBlobHeader) : { + ...env[CoreBindings.JSON_CF_BLOB], + // Defaulting to empty string to preserve undefined `Accept-Encoding` + // through Wrangler's proxy worker. + clientAcceptEncoding: request.headers.get("Accept-Encoding") ?? "" + }; + if (request = new Request(request, { cf }), request.headers.get(CoreHeaders.OP) !== null) return handleProxy(request, env); + let disablePrettyErrorPage = request.headers.get(CoreHeaders.DISABLE_PRETTY_ERROR) !== null, clientAcceptEncoding = request.headers.get("Accept-Encoding"); + try { + request = getUserRequest(request, env, clientIp); + } catch (e) { + if (e instanceof HttpError) + return e.toResponse(); + throw e; + } + let url = new URL(request.url), service = getTargetService(request, url, env); + if (service === void 0) + return new Response("No entrypoint worker found", { status: 404 }); + try { + if (url.pathname === "/cdn-cgi/mf/scheduled") + return await handleScheduled(url.searchParams, service); + let response = await service.fetch(request); + return disablePrettyErrorPage || (response = await maybePrettifyError(request, response, env)), response = maybeInjectLiveReload(response, env, ctx), response = ensureAcceptableEncoding(clientAcceptEncoding, response), maybeLogRequest(request, response, env, ctx, startTime), response; + } catch (e) { + return new Response(e?.stack ?? String(e), { status: 500 }); + } + } +}; +export { + ProxyServer, + entry_worker_default as default +}; +//# sourceMappingURL=entry.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/core/entry.worker.js.map b/node_modules/miniflare/dist/src/workers/core/entry.worker.js.map new file mode 100644 index 0000000..807617b --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/core/entry.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs", "../../../../src/workers/core/entry.worker.ts", "../../../../src/shared/mime-types.ts", "../../../../src/workers/core/constants.ts", "../../../../src/workers/core/http.ts", "../../../../src/workers/core/routing.ts", "../../../../src/workers/core/proxy.worker.ts", "../../../../../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/utils.js", "../../../../../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/parse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AC,GAAG,EAAE,QAAQ,IAAI,CAAC;AAAA,IAC3D;AAAA,EACD;AACD;", + "names": ["assert", "Buffer", "index", "value", "value", "assert", "Buffer"] +} diff --git a/node_modules/miniflare/dist/src/workers/d1/database.worker.js b/node_modules/miniflare/dist/src/workers/d1/database.worker.js new file mode 100644 index 0000000..4d6dd72 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/d1/database.worker.js @@ -0,0 +1,352 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __decorateClass = (decorators, target, key, kind) => { + for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--) + (decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result); + return kind && result && __defProp(target, key, result), result; +}; + +// src/workers/d1/database.worker.ts +import assert from "node:assert"; +import { + get, + HttpError, + MiniflareDurableObject, + POST, + viewToBuffer +} from "miniflare:shared"; +import { z } from "miniflare:zod"; + +// src/workers/d1/dumpSql.ts +function* dumpSql(db, options) { + yield "PRAGMA defer_foreign_keys=TRUE;"; + let filterTables = new Set(options?.tables || []), { noData, noSchema } = options || {}, tables_cursor = db.prepare(` + SELECT name, type, sql + FROM sqlite_schema AS o + WHERE (true) AND type=='table' + AND sql NOT NULL + ORDER BY tbl_name='sqlite_sequence', rowid; + `)(), tables = Array.from(tables_cursor); + for (let { name: table, sql } of tables) { + if (filterTables.size > 0 && !filterTables.has(table)) continue; + if (table === "sqlite_sequence") + noSchema || (yield "DELETE FROM sqlite_sequence;"); + else if (table.match(/^sqlite_stat./)) + noSchema || (yield "ANALYZE sqlite_schema;"); + else { + if (sql.startsWith("CREATE VIRTUAL TABLE")) + throw new Error( + "D1 Export error: cannot export databases with Virtual Tables (fts5)" + ); + if (table.startsWith("_cf_") || table.startsWith("sqlite_")) + continue; + sql.match(/CREATE TABLE ['"].*/) ? noSchema || (yield `CREATE TABLE IF NOT EXISTS ${sql.substring(13)};`) : noSchema || (yield `${sql};`); + } + if (noData) continue; + let columns_cursor = db.exec(`PRAGMA table_info="${table}"`), columns = Array.from(columns_cursor), select = `SELECT ${columns.map((c) => c.name).join(", ")} + FROM "${table}";`, rows_cursor = db.exec(select); + for (let dataRow of rows_cursor.raw()) { + let formattedCells = dataRow.map((cell, i) => { + let colType = columns[i].type, cellType = typeof cell; + return cell === null ? "NULL" : colType === "INTEGER" || cellType === "number" ? cell : colType === "TEXT" || cellType === "string" ? outputQuotedEscapedString(cell) : cell instanceof ArrayBuffer ? `X'${Array.prototype.map.call(new Uint8Array(cell), (b) => b.toString(16).padStart(2, "0")).join("")}'` : (console.log({ colType, cellType, cell, column: columns[i] }), "ERROR"); + }); + yield `INSERT INTO ${sqliteQuote(table)} VALUES(${formattedCells.join(",")});`; + } + } + if (!noSchema) { + let rest_of_schema = db.exec( + "SELECT name, sql FROM sqlite_schema AS o WHERE (true) AND sql NOT NULL AND type IN ('index', 'trigger', 'view') ORDER BY type COLLATE NOCASE /* DESC */;" + ); + for (let { name, sql } of rest_of_schema) + filterTables.size > 0 && !filterTables.has(name) || (yield `${sql};`); + } +} +function outputQuotedEscapedString(cell) { + let lfs = !1, crs = !1, quotesOrNewlinesRegexp = /'|(\n)|(\r)/g, escapeQuotesDetectingNewlines = (_, lf, cr) => lf ? (lfs = !0, "\\n") : cr ? (crs = !0, "\\r") : "''", output_string = `'${cell.replace( + quotesOrNewlinesRegexp, + escapeQuotesDetectingNewlines + )}'`; + return crs && (output_string = `replace(${output_string},'\\r',char(13))`), lfs && (output_string = `replace(${output_string},'\\n',char(10))`), output_string; +} +function sqliteQuote(token) { + return token.length === 0 || // Doesn't start with alpha or underscore + !token.match(/^[a-zA-Z_]/) || token.match(/\W/) || SQLITE_KEYWORDS.has(token.toUpperCase()) ? `"${token}"` : token; +} +var SQLITE_KEYWORDS = /* @__PURE__ */ new Set([ + "ABORT", + "ACTION", + "ADD", + "AFTER", + "ALL", + "ALTER", + "ALWAYS", + "ANALYZE", + "AND", + "AS", + "ASC", + "ATTACH", + "AUTOINCREMENT", + "BEFORE", + "BEGIN", + "BETWEEN", + "BY", + "CASCADE", + "CASE", + "CAST", + "CHECK", + "COLLATE", + "COLUMN", + "COMMIT", + "CONFLICT", + "CONSTRAINT", + "CREATE", + "CROSS", + "CURRENT", + "CURRENT_DATE", + "CURRENT_TIME", + "CURRENT_TIMESTAMP", + "DATABASE", + "DEFAULT", + "DEFERRED", + "DEFERRABLE", + "DELETE", + "DESC", + "DETACH", + "DISTINCT", + "DO", + "DROP", + "END", + "EACH", + "ELSE", + "ESCAPE", + "EXCEPT", + "EXCLUSIVE", + "EXCLUDE", + "EXISTS", + "EXPLAIN", + "FAIL", + "FILTER", + "FIRST", + "FOLLOWING", + "FOR", + "FOREIGN", + "FROM", + "FULL", + "GENERATED", + "GLOB", + "GROUP", + "GROUPS", + "HAVING", + "IF", + "IGNORE", + "IMMEDIATE", + "IN", + "INDEX", + "INDEXED", + "INITIALLY", + "INNER", + "INSERT", + "INSTEAD", + "INTERSECT", + "INTO", + "IS", + "ISNULL", + "JOIN", + "KEY", + "LAST", + "LEFT", + "LIKE", + "LIMIT", + "MATCH", + "MATERIALIZED", + "NATURAL", + "NO", + "NOT", + "NOTHING", + "NOTNULL", + "NULL", + "NULLS", + "OF", + "OFFSET", + "ON", + "OR", + "ORDER", + "OTHERS", + "OUTER", + "OVER", + "PARTITION", + "PLAN", + "PRAGMA", + "PRECEDING", + "PRIMARY", + "QUERY", + "RAISE", + "RANGE", + "RECURSIVE", + "REFERENCES", + "REGEXP", + "REINDEX", + "RELEASE", + "RENAME", + "REPLACE", + "RESTRICT", + "RETURNING", + "RIGHT", + "ROLLBACK", + "ROW", + "ROWS", + "SAVEPOINT", + "SELECT", + "SET", + "TABLE", + "TEMP", + "TEMPORARY", + "THEN", + "TIES", + "TO", + "TRANSACTION", + "TRIGGER", + "UNBOUNDED", + "UNION", + "UNIQUE", + "UPDATE", + "USING", + "VACUUM", + "VALUES", + "VIEW", + "VIRTUAL", + "WHEN", + "WHERE", + "WINDOW", + "WITH", + "WITHOUT" +]); + +// src/workers/d1/database.worker.ts +var D1ValueSchema = z.union([ + z.number(), + z.string(), + z.null(), + z.number().array() +]), D1QuerySchema = z.object({ + sql: z.string(), + params: z.array(D1ValueSchema).nullable().optional() +}), D1QueriesSchema = z.union([D1QuerySchema, z.array(D1QuerySchema)]), D1_EXPORT_PRAGMA = "PRAGMA miniflare_d1_export(?,?,?);", D1ResultsFormatSchema = z.enum(["ARRAY_OF_OBJECTS", "ROWS_AND_COLUMNS", "NONE"]).catch("ARRAY_OF_OBJECTS"), served_by = "miniflare.db", D1_SESSION_COMMIT_TOKEN_HTTP_HEADER = "x-cf-d1-session-commit-token", D1Error = class extends HttpError { + constructor(cause) { + super(500); + this.cause = cause; + } + toResponse() { + let response = { success: !1, error: typeof this.cause == "object" && this.cause !== null && "message" in this.cause && typeof this.cause.message == "string" ? this.cause.message : String(this.cause) }; + return Response.json(response); + } +}; +function convertParams(params) { + return (params ?? []).map( + (param) => ( + // If `param` is an array, assume it's a byte array + Array.isArray(param) ? viewToBuffer(new Uint8Array(param)) : param + ) + ); +} +function convertRows(rows) { + return rows.map( + (row) => row.map((value) => { + let normalised; + return value instanceof ArrayBuffer ? normalised = Array.from(new Uint8Array(value)) : normalised = value, normalised; + }) + ); +} +function rowsToObjects(columns, rows) { + return rows.map( + (row) => Object.fromEntries(columns.map((name, i) => [name, row[i]])) + ); +} +function sqlStmts(db) { + return { + getChanges: db.prepare( + "SELECT total_changes() AS totalChanges, last_insert_rowid() AS lastRowId" + ) + }; +} +var D1DatabaseObject = class extends MiniflareDurableObject { + #stmts; + constructor(state, env) { + super(state, env), this.#stmts = sqlStmts(this.db); + } + #changes() { + let changes = get(this.#stmts.getChanges()); + return assert(changes !== void 0), changes; + } + #query = (format, query) => { + let beforeTime = performance.now(), beforeSize = this.state.storage.sql.databaseSize, beforeChanges = this.#changes(), params = convertParams(query.params ?? []), cursor = this.db.prepare(query.sql)(...params), columns = cursor.columnNames, rows = convertRows(Array.from(cursor.raw())), results; + format === "ROWS_AND_COLUMNS" ? results = { columns, rows } : results = rowsToObjects(columns, rows); + let afterTime = performance.now(), afterSize = this.state.storage.sql.databaseSize, afterChanges = this.#changes(), duration = afterTime - beforeTime, changes = afterChanges.totalChanges - beforeChanges.totalChanges, hasChanges = changes !== 0, lastRowChanged = afterChanges.lastRowId !== beforeChanges.lastRowId, changed = hasChanges || lastRowChanged || afterSize !== beforeSize; + return { + success: !0, + results, + meta: { + served_by, + duration, + changes, + last_row_id: afterChanges.lastRowId, + changed_db: changed, + size_after: afterSize, + rows_read: cursor.rowsRead, + rows_written: cursor.rowsWritten + } + }; + }; + #txn(queries, format) { + if (queries = queries.filter( + (query) => query.sql.replace(/^\s+--.*/gm, "").trim().length > 0 + ), queries.length === 0) { + let error = new Error("No SQL statements detected."); + throw new D1Error(error); + } + try { + return this.state.storage.transactionSync( + () => queries.map(this.#query.bind(this, format)) + ); + } catch (e) { + throw new D1Error(e); + } + } + queryExecute = async (req) => { + let queries = D1QueriesSchema.parse(await req.json()); + if (Array.isArray(queries) || (queries = [queries]), this.#isExportPragma(queries)) + return this.#doExportData(queries); + let { searchParams } = new URL(req.url), resultsFormat = D1ResultsFormatSchema.parse( + searchParams.get("resultsFormat") + ); + return Response.json(this.#txn(queries, resultsFormat), { + headers: { + [D1_SESSION_COMMIT_TOKEN_HTTP_HEADER]: await this.state.storage.getCurrentBookmark() + } + }); + }; + #isExportPragma(queries) { + return queries.length === 1 && queries[0].sql === D1_EXPORT_PRAGMA && (queries[0].params?.length || 0) >= 2; + } + #doExportData(queries) { + let [noSchema, noData, ...tables] = queries[0].params, options = { + noSchema: !!noSchema, + noData: !!noData, + tables + }; + return Response.json({ + success: !0, + results: [Array.from(dumpSql(this.state.storage.sql, options))], + meta: {} + }); + } +}; +__decorateClass([ + POST("/query"), + POST("/execute") +], D1DatabaseObject.prototype, "queryExecute", 2); +export { + D1DatabaseObject, + D1Error +}; +//# sourceMappingURL=database.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/d1/database.worker.js.map b/node_modules/miniflare/dist/src/workers/d1/database.worker.js.map new file mode 100644 index 0000000..076f5ea --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/d1/database.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/d1/database.worker.ts", "../../../../src/workers/d1/dumpSql.ts"], + "mappings": ";;;;;;;;;AAAA,OAAO,YAAY;AACnB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EAIA;AAAA,OACM;AACP,SAAS,SAAS;;;ACRX,UAAU,QAChB,IACA,SAKC;AACD,QAAM;AAGN,MAAM,eAAe,IAAI,IAAI,SAAS,UAAU,CAAC,CAAC,GAC5C,EAAE,QAAQ,SAAS,IAAI,WAAW,CAAC,GAInC,gBAAgB,GAAG,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAM/B,EAAE,GACE,SAAgB,MAAM,KAAK,aAAa;AAE9C,WAAW,EAAE,MAAM,OAAO,IAAI,KAAK,QAAQ;AAC1C,QAAI,aAAa,OAAO,KAAK,CAAC,aAAa,IAAI,KAAK,EAAG;AAEvD,QAAI,UAAU;AACb,MAAK,aAAU,MAAM;AAAA,aACX,MAAM,MAAM,eAAe;AAGrC,MAAK,aAAU,MAAM;AAAA,SACf;AAAA,UAAI,IAAI,WAAW,sBAAsB;AAC/C,cAAM,IAAI;AAAA,UACT;AAAA,QACD;AACM,UAAI,MAAM,WAAW,MAAM,KAAK,MAAM,WAAW,SAAS;AAChE;AAKA,MAAI,IAAI,MAAM,qBAAqB,IAC7B,aAAU,MAAM,8BAA8B,IAAI,UAAU,EAAE,CAAC,OAE/D,aAAU,MAAM,GAAG,GAAG;AAAA;AAI7B,QAAI,OAAQ;AACZ,QAAM,iBAAiB,GAAG,KAAK,sBAAsB,KAAK,GAAG,GACvD,UAAU,MAAM,KAAK,cAAc,GACnC,S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AU;AAAA,GA/EJ,iBAgFZ;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/kv/namespace.worker.js b/node_modules/miniflare/dist/src/workers/kv/namespace.worker.js new file mode 100644 index 0000000..629731d --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/kv/namespace.worker.js @@ -0,0 +1,256 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __decorateClass = (decorators, target, key, kind) => { + for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--) + (decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result); + return kind && result && __defProp(target, key, result), result; +}; + +// src/workers/kv/namespace.worker.ts +import assert from "node:assert"; +import { + DeferredPromise, + DELETE, + GET, + HttpError as HttpError2, + KeyValueStorage, + maybeApply, + MiniflareDurableObject, + PUT +} from "miniflare:shared"; + +// src/workers/kv/constants.ts +import { testRegExps } from "miniflare:shared"; +var KVLimits = { + MIN_CACHE_TTL: 60, + MAX_LIST_KEYS: 1e3, + MAX_KEY_SIZE: 512, + MAX_VALUE_SIZE: 25 * 1024 * 1024, + MAX_VALUE_SIZE_TEST: 1024, + MAX_METADATA_SIZE: 1024 +}, KVParams = { + URL_ENCODED: "urlencoded", + CACHE_TTL: "cache_ttl", + EXPIRATION: "expiration", + EXPIRATION_TTL: "expiration_ttl", + LIST_LIMIT: "key_count_limit", + LIST_PREFIX: "prefix", + LIST_CURSOR: "cursor" +}, KVHeaders = { + EXPIRATION: "CF-Expiration", + METADATA: "CF-KV-Metadata" +}; + +// src/workers/kv/validator.worker.ts +import { Buffer as Buffer2 } from "node:buffer"; +import { HttpError } from "miniflare:shared"; +function decodeKey({ key }, query) { + if (query.get(KVParams.URL_ENCODED)?.toLowerCase() !== "true") return key; + try { + return decodeURIComponent(key); + } catch (e) { + throw e instanceof URIError ? new HttpError(400, "Could not URL-decode key name") : e; + } +} +function validateKey(key) { + if (key === "") + throw new HttpError(400, "Key names must not be empty"); + if (key === "." || key === "..") + throw new HttpError( + 400, + `Illegal key name "${key}". Please use a different name.` + ); + validateKeyLength(key); +} +function validateKeyLength(key) { + let keyLength = Buffer2.byteLength(key); + if (keyLength > KVLimits.MAX_KEY_SIZE) + throw new HttpError( + 414, + `UTF-8 encoded length of ${keyLength} exceeds key length limit of ${KVLimits.MAX_KEY_SIZE}.` + ); +} +function validateGetOptions(key, options) { + validateKey(key); + let cacheTtl = options?.cacheTtl; + if (cacheTtl !== void 0 && (isNaN(cacheTtl) || cacheTtl < KVLimits.MIN_CACHE_TTL)) + throw new HttpError( + 400, + `Invalid ${KVParams.CACHE_TTL} of ${cacheTtl}. Cache TTL must be at least ${KVLimits.MIN_CACHE_TTL}.` + ); +} +function validatePutOptions(key, options) { + let { now, rawExpiration, rawExpirationTtl, rawMetadata } = options; + validateKey(key); + let expiration; + if (rawExpirationTtl !== null) { + let expirationTtl = parseInt(rawExpirationTtl); + if (Number.isNaN(expirationTtl) || expirationTtl <= 0) + throw new HttpError( + 400, + `Invalid ${KVParams.EXPIRATION_TTL} of ${rawExpirationTtl}. Please specify integer greater than 0.` + ); + if (expirationTtl < KVLimits.MIN_CACHE_TTL) + throw new HttpError( + 400, + `Invalid ${KVParams.EXPIRATION_TTL} of ${rawExpirationTtl}. Expiration TTL must be at least ${KVLimits.MIN_CACHE_TTL}.` + ); + expiration = now + expirationTtl; + } else if (rawExpiration !== null) { + if (expiration = parseInt(rawExpiration), Number.isNaN(expiration) || expiration <= now) + throw new HttpError( + 400, + `Invalid ${KVParams.EXPIRATION} of ${rawExpiration}. Please specify integer greater than the current number of seconds since the UNIX epoch.` + ); + if (expiration < now + KVLimits.MIN_CACHE_TTL) + throw new HttpError( + 400, + `Invalid ${KVParams.EXPIRATION} of ${rawExpiration}. Expiration times must be at least ${KVLimits.MIN_CACHE_TTL} seconds in the future.` + ); + } + let metadata; + if (rawMetadata !== null) { + let metadataLength = Buffer2.byteLength(rawMetadata); + if (metadataLength > KVLimits.MAX_METADATA_SIZE) + throw new HttpError( + 413, + `Metadata length of ${metadataLength} exceeds limit of ${KVLimits.MAX_METADATA_SIZE}.` + ); + metadata = JSON.parse(rawMetadata); + } + return { expiration, metadata }; +} +function decodeListOptions(url) { + let limitParam = url.searchParams.get(KVParams.LIST_LIMIT), limit = limitParam === null ? KVLimits.MAX_LIST_KEYS : parseInt(limitParam), prefix = url.searchParams.get(KVParams.LIST_PREFIX) ?? void 0, cursor = url.searchParams.get(KVParams.LIST_CURSOR) ?? void 0; + return { limit, prefix, cursor }; +} +function validateListOptions(options) { + let limit = options.limit; + if (limit !== void 0) { + if (isNaN(limit) || limit < 1) + throw new HttpError( + 400, + `Invalid ${KVParams.LIST_LIMIT} of ${limit}. Please specify an integer greater than 0.` + ); + if (limit > KVLimits.MAX_LIST_KEYS) + throw new HttpError( + 400, + `Invalid ${KVParams.LIST_LIMIT} of ${limit}. Please specify an integer less than ${KVLimits.MAX_LIST_KEYS}.` + ); + } + let prefix = options.prefix; + prefix != null && validateKeyLength(prefix); +} + +// src/workers/kv/namespace.worker.ts +function createMaxValueSizeError(length, maxValueSize) { + return new HttpError2( + 413, + `Value length of ${length} exceeds limit of ${maxValueSize}.` + ); +} +var MaxLengthStream = class extends TransformStream { + signal; + length; + constructor(maxLength) { + let abortController = new AbortController(), lengthPromise = new DeferredPromise(), length = 0; + super({ + transform(chunk, controller) { + length += chunk.byteLength, length <= maxLength ? controller.enqueue(chunk) : abortController.signal.aborted || abortController.abort(); + }, + flush() { + lengthPromise.resolve(length); + } + }), this.signal = abortController.signal, this.length = lengthPromise; + } +}; +function millisToSeconds(millis) { + return Math.floor(millis / 1e3); +} +function secondsToMillis(seconds) { + return seconds * 1e3; +} +var KVNamespaceObject = class extends MiniflareDurableObject { + #storage; + get storage() { + return this.#storage ??= new KeyValueStorage(this); + } + get = async (req, params, url) => { + let key = decodeKey(params, url.searchParams), cacheTtlParam = url.searchParams.get(KVParams.CACHE_TTL), cacheTtl = cacheTtlParam === null ? void 0 : parseInt(cacheTtlParam); + validateGetOptions(key, { cacheTtl }); + let entry = await this.storage.get(key); + if (entry === null) throw new HttpError2(404, "Not Found"); + let headers = new Headers(); + return entry.expiration !== void 0 && headers.set( + KVHeaders.EXPIRATION, + millisToSeconds(entry.expiration).toString() + ), entry.metadata !== void 0 && headers.set(KVHeaders.METADATA, JSON.stringify(entry.metadata)), new Response(entry.value, { headers }); + }; + put = async (req, params, url) => { + let key = decodeKey(params, url.searchParams), rawExpiration = url.searchParams.get(KVParams.EXPIRATION), rawExpirationTtl = url.searchParams.get(KVParams.EXPIRATION_TTL), rawMetadata = req.headers.get(KVHeaders.METADATA), now = millisToSeconds(this.timers.now()), { expiration, metadata } = validatePutOptions(key, { + now, + rawExpiration, + rawExpirationTtl, + rawMetadata + }), value = req.body, contentLength = parseInt(req.headers.get("Content-Length")), valueLengthHint; + Number.isNaN(contentLength) ? value === null && (valueLengthHint = 0) : valueLengthHint = contentLength, value ??= new ReadableStream({ + start(controller) { + controller.close(); + } + }); + let maxValueSize = this.beingTested ? KVLimits.MAX_VALUE_SIZE_TEST : KVLimits.MAX_VALUE_SIZE, maxLengthStream; + if (valueLengthHint !== void 0 && valueLengthHint > maxValueSize) + throw createMaxValueSizeError(valueLengthHint, maxValueSize); + maxLengthStream = new MaxLengthStream(maxValueSize), value = value.pipeThrough(maxLengthStream); + try { + await this.storage.put({ + key, + value, + expiration: maybeApply(secondsToMillis, expiration), + metadata, + signal: maxLengthStream?.signal + }); + } catch (e) { + if (typeof e == "object" && e !== null && "name" in e && e.name === "AbortError") { + assert(maxLengthStream !== void 0); + let length = await maxLengthStream.length; + throw createMaxValueSizeError(length, maxValueSize); + } else + throw e; + } + return new Response(); + }; + delete = async (req, params, url) => { + let key = decodeKey(params, url.searchParams); + return validateKey(key), await this.storage.delete(key), new Response(); + }; + list = async (req, params, url) => { + let options = decodeListOptions(url); + validateListOptions(options); + let res = await this.storage.list(options), keys = res.keys.map((key) => ({ + name: key.key, + expiration: maybeApply(millisToSeconds, key.expiration), + // workerd expects metadata to be a JSON-serialised string + metadata: maybeApply(JSON.stringify, key.metadata) + })), result; + return res.cursor === void 0 ? result = { keys, list_complete: !0, cacheStatus: null } : result = { + keys, + list_complete: !1, + cursor: res.cursor, + cacheStatus: null + }, Response.json(result); + }; +}; +__decorateClass([ + GET("/:key") +], KVNamespaceObject.prototype, "get", 2), __decorateClass([ + PUT("/:key") +], KVNamespaceObject.prototype, "put", 2), __decorateClass([ + DELETE("/:key") +], KVNamespaceObject.prototype, "delete", 2), __decorateClass([ + GET("/") +], KVNamespaceObject.prototype, "list", 2); +export { + KVNamespaceObject +}; +//# sourceMappingURL=namespace.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/kv/namespace.worker.js.map b/node_modules/miniflare/dist/src/workers/kv/namespace.worker.js.map new file mode 100644 index 0000000..9d19b5d --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/kv/namespace.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/kv/namespace.worker.ts", "../../../../src/workers/kv/constants.ts", "../../../../src/workers/kv/validator.worker.ts"], + "mappings": ";;;;;;;;;AAAA,OAAO,YAAY;AACnB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEM;;;ACXP,SAAyB,mBAAmB;AAErC,IAAM,WAAW;AAAA,EACvB,eAAe;AAAA,EACf,eAAe;AAAA,EACf,cAAc;AAAA,EACd,gBAAgB,KAAK,OAAO;AAAA,EAC5B,qBAAqB;AAAA,EACrB,mBAAmB;AACpB,GAEa,WAAW;AAAA,EACvB,aAAa;AAAA,EACb,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,aAAa;AACd,GAEa,YAAY;AAAA,EACxB,YAAY;AAAA,EACZ,UAAU;AAC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AA,EADC,OAAO,OAAO;AAAA,GAnHH,kBAoHZ,yBAWA;AAAA,EADC,IAAI,GAAG;AAAA,GA9HI,kBA+HZ;", + "names": ["HttpError", "Buffer", "Buffer", "HttpError"] +} diff --git a/node_modules/miniflare/dist/src/workers/kv/sites.worker.js b/node_modules/miniflare/dist/src/workers/kv/sites.worker.js new file mode 100644 index 0000000..57537de --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/kv/sites.worker.js @@ -0,0 +1,144 @@ +// src/workers/kv/sites.worker.ts +import { base64Decode, base64Encode, SharedBindings } from "miniflare:shared"; + +// src/workers/kv/constants.ts +import { testRegExps } from "miniflare:shared"; +var KVLimits = { + MIN_CACHE_TTL: 60, + MAX_LIST_KEYS: 1e3, + MAX_KEY_SIZE: 512, + MAX_VALUE_SIZE: 25 * 1024 * 1024, + MAX_VALUE_SIZE_TEST: 1024, + MAX_METADATA_SIZE: 1024 +}, KVParams = { + URL_ENCODED: "urlencoded", + CACHE_TTL: "cache_ttl", + EXPIRATION: "expiration", + EXPIRATION_TTL: "expiration_ttl", + LIST_LIMIT: "key_count_limit", + LIST_PREFIX: "prefix", + LIST_CURSOR: "cursor" +}; +var SiteBindings = { + KV_NAMESPACE_SITE: "__STATIC_CONTENT", + JSON_SITE_MANIFEST: "__STATIC_CONTENT_MANIFEST", + JSON_SITE_FILTER: "MINIFLARE_SITE_FILTER" +}, SITES_NO_CACHE_PREFIX = "$__MINIFLARE_SITES__$/"; +function encodeSitesKey(key) { + return SITES_NO_CACHE_PREFIX + encodeURIComponent(key); +} +function decodeSitesKey(key) { + return key.startsWith(SITES_NO_CACHE_PREFIX) ? decodeURIComponent(key.substring(SITES_NO_CACHE_PREFIX.length)) : key; +} +function deserialiseRegExps(matcher) { + return { + include: matcher.include.map((regExp) => new RegExp(regExp)), + exclude: matcher.exclude.map((regExp) => new RegExp(regExp)) + }; +} +function deserialiseSiteRegExps(siteRegExps) { + return { + include: siteRegExps.include && deserialiseRegExps(siteRegExps.include), + exclude: siteRegExps.exclude && deserialiseRegExps(siteRegExps.exclude) + }; +} +function testSiteRegExps(regExps, key) { + return regExps.include !== void 0 ? testRegExps(regExps.include, key) : regExps.exclude !== void 0 ? !testRegExps(regExps.exclude, key) : !0; +} + +// src/workers/kv/validator.worker.ts +import { Buffer } from "node:buffer"; +import { HttpError } from "miniflare:shared"; +function validateKeyLength(key) { + let keyLength = Buffer.byteLength(key); + if (keyLength > KVLimits.MAX_KEY_SIZE) + throw new HttpError( + 414, + `UTF-8 encoded length of ${keyLength} exceeds key length limit of ${KVLimits.MAX_KEY_SIZE}.` + ); +} +function decodeListOptions(url) { + let limitParam = url.searchParams.get(KVParams.LIST_LIMIT), limit = limitParam === null ? KVLimits.MAX_LIST_KEYS : parseInt(limitParam), prefix = url.searchParams.get(KVParams.LIST_PREFIX) ?? void 0, cursor = url.searchParams.get(KVParams.LIST_CURSOR) ?? void 0; + return { limit, prefix, cursor }; +} +function validateListOptions(options) { + let limit = options.limit; + if (limit !== void 0) { + if (isNaN(limit) || limit < 1) + throw new HttpError( + 400, + `Invalid ${KVParams.LIST_LIMIT} of ${limit}. Please specify an integer greater than 0.` + ); + if (limit > KVLimits.MAX_LIST_KEYS) + throw new HttpError( + 400, + `Invalid ${KVParams.LIST_LIMIT} of ${limit}. Please specify an integer less than ${KVLimits.MAX_LIST_KEYS}.` + ); + } + let prefix = options.prefix; + prefix != null && validateKeyLength(prefix); +} + +// src/workers/kv/sites.worker.ts +var siteRegExpsCache = /* @__PURE__ */ new WeakMap(); +function getSiteRegExps(env) { + let regExps = siteRegExpsCache.get(env); + return regExps !== void 0 || (regExps = deserialiseSiteRegExps(env[SiteBindings.JSON_SITE_FILTER]), siteRegExpsCache.set(env, regExps)), regExps; +} +async function* walkDirectory(blobsService, path = "") { + let res = await blobsService.fetch(`http://placeholder/${path}`); + if (!(res.headers.get("Content-Type") ?? "").toLowerCase().startsWith("application/json")) { + await res.body?.pipeTo(new WritableStream()), yield path; + return; + } + let entries = await res.json(); + for (let { name, type } of entries) { + let entryPath = `${path}${path === "" ? "" : "/"}${name}`; + type === "directory" ? yield* walkDirectory(blobsService, entryPath) : yield entryPath; + } +} +var encoder = new TextEncoder(); +function arrayCompare(a, b) { + let minLength = Math.min(a.length, b.length); + for (let i = 0; i < minLength; i++) { + let aElement = a[i], bElement = b[i]; + if (aElement < bElement) return -1; + if (aElement > bElement) return 1; + } + return a.length - b.length; +} +async function handleListRequest(url, blobsService, siteRegExps) { + let options = decodeListOptions(url); + validateListOptions(options); + let { limit = KVLimits.MAX_LIST_KEYS, prefix, cursor } = options, keys = []; + for await (let name of walkDirectory(blobsService)) + testSiteRegExps(siteRegExps, name) && (name = encodeSitesKey(name), !(prefix !== void 0 && !name.startsWith(prefix)) && keys.push({ name, encodedName: encoder.encode(name) })); + keys.sort((a, b) => arrayCompare(a.encodedName, b.encodedName)); + for (let key of keys) delete key.encodedName; + let startAfter = cursor === void 0 ? "" : base64Decode(cursor), startIndex = 0; + startAfter !== "" && (startIndex = keys.findIndex(({ name }) => name === startAfter), startIndex === -1 && (startIndex = keys.length), startIndex++); + let endIndex = startIndex + limit, nextCursor = endIndex < keys.length ? base64Encode(keys[endIndex - 1].name) : void 0; + return keys = keys.slice(startIndex, endIndex), nextCursor === void 0 ? Response.json({ keys, list_complete: !0 }) : Response.json({ keys, list_complete: !1, cursor: nextCursor }); +} +var sites_worker_default = { + async fetch(request, env) { + if (request.method !== "GET") { + let message = `Cannot ${request.method.toLowerCase()}() with Workers Sites namespace`; + return new Response(message, { status: 405, statusText: message }); + } + let url = new URL(request.url), key = url.pathname.substring(1); + url.searchParams.get(KVParams.URL_ENCODED)?.toLowerCase() === "true" && (key = decodeURIComponent(key)), key = decodeSitesKey(key); + let siteRegExps = getSiteRegExps(env); + if (key !== "" && !testSiteRegExps(siteRegExps, key)) + return new Response("Not Found", { + status: 404, + statusText: "Not Found" + }); + let blobsService = env[SharedBindings.MAYBE_SERVICE_BLOBS]; + return key === "" ? handleListRequest(url, blobsService, siteRegExps) : blobsService.fetch(new URL(key, "http://placeholder")); + } +}; +export { + sites_worker_default as default +}; +//# sourceMappingURL=sites.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/kv/sites.worker.js.map b/node_modules/miniflare/dist/src/workers/kv/sites.worker.js.map new file mode 100644 index 0000000..003d400 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/kv/sites.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/kv/sites.worker.ts", "../../../../src/workers/kv/constants.ts", "../../../../src/workers/kv/validator.worker.ts"], + "mappings": ";AAAA,SAAS,cAAc,cAAc,sBAAsB;;;ACA3D,SAAyB,mBAAmB;AAErC,IAAM,WAAW;AAAA,EACvB,eAAe;AAAA,EACf,eAAe;AAAA,EACf,cAAc;AAAA,EACd,gBAAgB,KAAK,OAAO;AAAA,EAC5B,qBAAqB;AAAA,EACrB,mBAAmB;AACpB,GAEa,WAAW;AAAA,EACvB,aAAa;AAAA,EACb,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,aAAa;AACd;AAOO,IAAM,eAAe;AAAA,EAC3B,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,kBAAkB;AACnB,GAKa,wBAAwB;AAE9B,SAAS,eAAe,KAAqB;AAGnD,SAAO,wBAAwB,mBAAmB,GAAG;AACtD;AACO,SAAS,eAAe,KAAqB;AACnD,SAAO,IAAI,WAAW,qBAAqB,IACxC,mBAAmB,IAAI,UAAU,sBAAsB,MAAM,CAAC,IAC9D;AACJ;AAoCO,SAAS,mBACf,SACiB;AACjB,SAAO;AAAA,IACN,SAAS,QAAQ,QAAQ,IAAI,CAAC,WAAW,IAAI,OAAO,MAAM,CAAC;AAAA,IAC3D,SAAS,QAAQ,QAAQ,IAAI,CAAC,WAAW,IAAI,OAAO,MAAM,CAAC;AAAA,EAC5D;AACD;AAWO,SAAS,uBACf,aACqB;AACr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AA,MACb,CAAC;AAGF,QAAM,eAAe,IAAI,eAAe,mBAAmB;AAC3D,WAAI,QAAQ,KACJ,kBAAkB,KAAK,cAAc,WAAW,IAEhD,aAAa,MAAM,IAAI,IAAI,KAAK,oBAAoB,CAAC;AAAA,EAE9D;AACD;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/pipelines/pipeline.worker.js b/node_modules/miniflare/dist/src/workers/pipelines/pipeline.worker.js new file mode 100644 index 0000000..ded30e4 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/pipelines/pipeline.worker.js @@ -0,0 +1,11 @@ +// src/workers/pipelines/pipeline.worker.ts +import { WorkerEntrypoint } from "cloudflare:workers"; +var Pipeline = class extends WorkerEntrypoint { + async send(data) { + console.log("Request received", data); + } +}; +export { + Pipeline as default +}; +//# sourceMappingURL=pipeline.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/pipelines/pipeline.worker.js.map b/node_modules/miniflare/dist/src/workers/pipelines/pipeline.worker.js.map new file mode 100644 index 0000000..8f0e995 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/pipelines/pipeline.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/pipelines/pipeline.worker.ts"], + "mappings": ";AAAA,SAAS,wBAAwB;AAEjC,IAAqB,WAArB,cAAsC,iBAAiB;AAAA,EACtD,MAAM,KAAK,MAA+B;AACzC,YAAQ,IAAI,oBAAoB,IAAI;AAAA,EACrC;AACD;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/queues/broker.worker.js b/node_modules/miniflare/dist/src/workers/queues/broker.worker.js new file mode 100644 index 0000000..104fad2 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/queues/broker.worker.js @@ -0,0 +1,289 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __decorateClass = (decorators, target, key, kind) => { + for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--) + (decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result); + return kind && result && __defProp(target, key, result), result; +}; + +// src/workers/queues/broker.worker.ts +import assert from "node:assert"; +import { Buffer as Buffer2 } from "node:buffer"; + +// ../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs +var FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM, isTTY = !0; +typeof process < "u" && ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {}, isTTY = process.stdout && process.stdout.isTTY); +var $ = { + enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY) +}; +function init(x, y) { + let rgx = new RegExp(`\\x1b\\[${y}m`, "g"), open = `\x1B[${x}m`, close = `\x1B[${y}m`; + return function(txt) { + return !$.enabled || txt == null ? txt : open + (~("" + txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close; + }; +} +var reset = init(0, 0), bold = init(1, 22), dim = init(2, 22), italic = init(3, 23), underline = init(4, 24), inverse = init(7, 27), hidden = init(8, 28), strikethrough = init(9, 29), black = init(30, 39), red = init(31, 39), green = init(32, 39), yellow = init(33, 39), blue = init(34, 39), magenta = init(35, 39), cyan = init(36, 39), white = init(37, 39), gray = init(90, 39), grey = init(90, 39), bgBlack = init(40, 49), bgRed = init(41, 49), bgGreen = init(42, 49), bgYellow = init(43, 49), bgBlue = init(44, 49), bgMagenta = init(45, 49), bgCyan = init(46, 49), bgWhite = init(47, 49); + +// src/workers/queues/broker.worker.ts +import { + HttpError, + LogLevel, + MiniflareDurableObject, + POST, + SharedBindings, + viewToBuffer +} from "miniflare:shared"; + +// src/workers/queues/constants.ts +var QueueBindings = { + SERVICE_WORKER_PREFIX: "MINIFLARE_WORKER_", + MAYBE_JSON_QUEUE_PRODUCERS: "MINIFLARE_QUEUE_PRODUCERS", + MAYBE_JSON_QUEUE_CONSUMERS: "MINIFLARE_QUEUE_CONSUMERS" +}; + +// src/workers/queues/schemas.ts +import { Base64DataSchema, z } from "miniflare:zod"; +var QueueMessageDelaySchema = z.number().int().min(0).max(43200).optional(), QueueProducerOptionsSchema = /* @__PURE__ */ z.object({ + // https://developers.cloudflare.com/queues/platform/configuration/#producer + queueName: z.string(), + deliveryDelay: QueueMessageDelaySchema +}), QueueProducerSchema = /* @__PURE__ */ z.intersection( + QueueProducerOptionsSchema, + z.object({ workerName: z.string() }) +), QueueProducersSchema = /* @__PURE__ */ z.record(QueueProducerSchema), QueueConsumerOptionsSchema = /* @__PURE__ */ z.object({ + // https://developers.cloudflare.com/queues/platform/configuration/#consumer + // https://developers.cloudflare.com/queues/platform/limits/ + maxBatchSize: z.number().min(0).max(100).optional(), + maxBatchTimeout: z.number().min(0).max(60).optional(), + // seconds + maxRetires: z.number().min(0).max(100).optional(), + // deprecated + maxRetries: z.number().min(0).max(100).optional(), + deadLetterQueue: z.ostring(), + retryDelay: QueueMessageDelaySchema +}).transform((queue) => (queue.maxRetires !== void 0 && (queue.maxRetries = queue.maxRetires), queue)), QueueConsumerSchema = /* @__PURE__ */ z.intersection( + QueueConsumerOptionsSchema, + z.object({ workerName: z.string() }) +), QueueConsumersSchema = /* @__PURE__ */ z.record(QueueConsumerSchema), QueueContentTypeSchema = /* @__PURE__ */ z.enum(["text", "json", "bytes", "v8"]).default("v8"), QueueIncomingMessageSchema = /* @__PURE__ */ z.object({ + contentType: QueueContentTypeSchema, + delaySecs: QueueMessageDelaySchema, + body: Base64DataSchema, + // When enqueuing messages on dead-letter queues, we want to reuse the same ID + // and timestamp + id: z.ostring(), + timestamp: z.onumber() +}), QueuesBatchRequestSchema = /* @__PURE__ */ z.object({ + messages: z.array(QueueIncomingMessageSchema) +}); + +// src/workers/queues/broker.worker.ts +var MAX_MESSAGE_SIZE_BYTES = 128 * 1e3, MAX_MESSAGE_BATCH_COUNT = 100, MAX_MESSAGE_BATCH_SIZE = 288 * 1e3, DEFAULT_BATCH_SIZE = 5, DEFAULT_BATCH_TIMEOUT = 1, DEFAULT_RETRIES = 2, exceptionQueueResponse = { + outcome: "exception", + retryBatch: { retry: !1 }, + ackAll: !1, + retryMessages: [], + explicitAcks: [] +}, PayloadTooLargeError = class extends HttpError { + constructor(message) { + super(413, message); + } +}; +function validateMessageSize(headers) { + let size = headers.get("Content-Length"); + if (size !== null && parseInt(size) > MAX_MESSAGE_SIZE_BYTES) + throw new PayloadTooLargeError( + `message length of ${size} bytes exceeds limit of ${MAX_MESSAGE_SIZE_BYTES}` + ); +} +function validateContentType(headers) { + let format = headers.get("X-Msg-Fmt") ?? void 0, result = QueueContentTypeSchema.safeParse(format); + if (!result.success) + throw new HttpError( + 400, + `message content type ${format} is invalid; if specified, must be one of 'text', 'json', 'bytes', or 'v8'` + ); + return result.data; +} +function validateMessageDelay(headers) { + let format = headers.get("X-Msg-Delay-Secs"); + if (!format) return; + let result = QueueMessageDelaySchema.safeParse(Number(format)); + if (!result.success) + throw new HttpError( + 400, + `message delay ${format} is invalid: ${result.error}` + ); + return result.data; +} +function validateBatchSize(headers) { + let count = headers.get("CF-Queue-Batch-Count"); + if (count !== null && parseInt(count) > MAX_MESSAGE_BATCH_COUNT) + throw new PayloadTooLargeError( + `batch message count of ${count} exceeds limit of ${MAX_MESSAGE_BATCH_COUNT}` + ); + let largestSize = headers.get("CF-Queue-Largest-Msg"); + if (largestSize !== null && parseInt(largestSize) > MAX_MESSAGE_SIZE_BYTES) + throw new PayloadTooLargeError( + `message in batch has length ${largestSize} bytes which exceeds single message size limit of ${MAX_MESSAGE_SIZE_BYTES}` + ); + let batchSize = headers.get("CF-Queue-Batch-Bytes"); + if (batchSize !== null && parseInt(batchSize) > MAX_MESSAGE_BATCH_SIZE) + throw new PayloadTooLargeError( + `batch size of ${batchSize} bytes exceeds limit of 256000` + ); +} +function deserialise({ contentType, body }) { + return contentType === "text" ? { contentType, body: body.toString() } : contentType === "json" ? { contentType, body: JSON.parse(body.toString()) } : contentType === "bytes" ? { contentType, body: viewToBuffer(body) } : { contentType, body }; +} +function serialise(msg) { + let body; + return msg.body.contentType === "text" ? body = Buffer2.from(msg.body.body) : msg.body.contentType === "json" ? body = Buffer2.from(JSON.stringify(msg.body.body)) : msg.body.contentType === "bytes" ? body = Buffer2.from(msg.body.body) : body = msg.body.body, { + id: msg.id, + timestamp: msg.timestamp.getTime(), + contentType: msg.body.contentType, + body: body.toString("base64") + }; +} +var QueueMessage = class { + constructor(id, timestamp, body) { + this.id = id; + this.timestamp = timestamp; + this.body = body; + } + #failedAttempts = 0; + incrementFailedAttempts() { + return ++this.#failedAttempts; + } + get failedAttempts() { + return this.#failedAttempts; + } +}; +function formatQueueResponse(queueName, acked, total, time) { + let colour; + acked === total ? colour = green : acked > 0 ? colour = yellow : colour = red; + let message = `${bold("QUEUE")} ${queueName} ${colour(`${acked}/${total}`)}`; + return time !== void 0 && (message += grey(` (${time}ms)`)), reset(message); +} +var QueueBrokerObject = class extends MiniflareDurableObject { + #producers; + #consumers; + #messages = []; + #pendingFlush; + constructor(state, env) { + super(state, env); + let maybeProducers = env[QueueBindings.MAYBE_JSON_QUEUE_PRODUCERS]; + maybeProducers === void 0 ? this.#producers = {} : this.#producers = QueueProducersSchema.parse(maybeProducers); + let maybeConsumers = env[QueueBindings.MAYBE_JSON_QUEUE_CONSUMERS]; + maybeConsumers === void 0 ? this.#consumers = {} : this.#consumers = QueueConsumersSchema.parse(maybeConsumers); + } + get #maybeProducer() { + return Object.values(this.#producers).find( + (p) => p?.queueName === this.name + ); + } + get #maybeConsumer() { + return this.#consumers[this.name]; + } + #dispatchBatch(workerName, batch) { + let bindingName = `${QueueBindings.SERVICE_WORKER_PREFIX}${workerName}`, maybeService = this.env[bindingName]; + assert( + maybeService !== void 0, + `Expected ${bindingName} service binding` + ); + let messages = batch.map(({ id, timestamp, body, failedAttempts }) => { + let attempts = failedAttempts + 1; + return body.contentType === "v8" ? { id, timestamp, serializedBody: body.body, attempts } : { id, timestamp, body: body.body, attempts }; + }); + return maybeService.queue(this.name, messages); + } + #flush = async () => { + let consumer = this.#maybeConsumer; + assert(consumer !== void 0); + let batchSize = consumer.maxBatchSize ?? DEFAULT_BATCH_SIZE, maxAttempts = (consumer.maxRetries ?? DEFAULT_RETRIES) + 1, maxAttemptsS = maxAttempts === 1 ? "" : "s", batch = this.#messages.splice(0, batchSize), startTime = Date.now(), endTime, response; + try { + response = await this.#dispatchBatch(consumer.workerName, batch), endTime = Date.now(); + } catch (e) { + endTime = Date.now(), await this.logWithLevel(LogLevel.ERROR, String(e)), response = exceptionQueueResponse; + } + let retryAll = response.retryBatch.retry || response.outcome !== "ok", retryMessages = new Map( + response.retryMessages?.map((r) => [r.msgId, r.delaySeconds]) + ), globalDelay = response.retryBatch.delaySeconds ?? consumer.retryDelay ?? 0, failedMessages = 0, toDeadLetterQueue = []; + for (let message of batch) + if (retryAll || retryMessages.has(message.id)) + if (failedMessages++, message.incrementFailedAttempts() < maxAttempts) { + await this.logWithLevel( + LogLevel.DEBUG, + `Retrying message "${message.id}" on queue "${this.name}"...` + ); + let fn = () => { + this.#messages.push(message), this.#ensurePendingFlush(); + }, delay = retryMessages.get(message.id) ?? globalDelay; + this.timers.setTimeout(fn, delay * 1e3); + } else consumer.deadLetterQueue !== void 0 ? (await this.logWithLevel( + LogLevel.WARN, + `Moving message "${message.id}" on queue "${this.name}" to dead letter queue "${consumer.deadLetterQueue}" after ${maxAttempts} failed attempt${maxAttemptsS}...` + ), toDeadLetterQueue.push(message)) : await this.logWithLevel( + LogLevel.WARN, + `Dropped message "${message.id}" on queue "${this.name}" after ${maxAttempts} failed attempt${maxAttemptsS}!` + ); + let acked = batch.length - failedMessages; + if (await this.logWithLevel( + LogLevel.INFO, + formatQueueResponse(this.name, acked, batch.length, endTime - startTime) + ), this.#pendingFlush = void 0, this.#messages.length > 0 && this.#ensurePendingFlush(), toDeadLetterQueue.length > 0) { + let name = consumer.deadLetterQueue; + assert(name !== void 0); + let ns = this.env[SharedBindings.DURABLE_OBJECT_NAMESPACE_OBJECT], id = ns.idFromName(name), stub = ns.get(id), cf = { miniflare: { name } }, batchRequest = { + messages: toDeadLetterQueue.map(serialise) + }, res = await stub.fetch("http://placeholder/batch", { + method: "POST", + body: JSON.stringify(batchRequest), + cf + }); + assert(res.ok); + } + }; + #ensurePendingFlush() { + let consumer = this.#maybeConsumer; + assert(consumer !== void 0); + let batchSize = consumer.maxBatchSize ?? DEFAULT_BATCH_SIZE, batchTimeout = consumer.maxBatchTimeout ?? DEFAULT_BATCH_TIMEOUT, batchHasSpace = this.#messages.length < batchSize; + if (this.#pendingFlush !== void 0) { + if (this.#pendingFlush.immediate || batchHasSpace) return; + this.timers.clearTimeout(this.#pendingFlush.timeout), this.#pendingFlush = void 0; + } + let delay = batchHasSpace ? batchTimeout * 1e3 : 0, timeout = this.timers.setTimeout(this.#flush, delay); + this.#pendingFlush = { immediate: delay === 0, timeout }; + } + #enqueue(messages, globalDelay = 0) { + for (let message of messages) { + let randomness = crypto.getRandomValues(new Uint8Array(16)), id = message.id ?? Buffer2.from(randomness).toString("hex"), timestamp = new Date(message.timestamp ?? this.timers.now()), body = deserialise(message), msg = new QueueMessage(id, timestamp, body), fn = () => { + this.#messages.push(msg), this.#ensurePendingFlush(); + }, delay = message.delaySecs ?? globalDelay; + this.timers.setTimeout(fn, delay * 1e3); + } + } + message = async (req) => { + if (this.#maybeConsumer === void 0) return new Response(); + validateMessageSize(req.headers); + let contentType = validateContentType(req.headers), delay = validateMessageDelay(req.headers) ?? this.#maybeProducer?.deliveryDelay, body = Buffer2.from(await req.arrayBuffer()); + return this.#enqueue( + [{ contentType, delaySecs: delay, body }], + this.#maybeProducer?.deliveryDelay + ), new Response(); + }; + batch = async (req) => { + if (this.#maybeConsumer === void 0) return new Response(); + validateBatchSize(req.headers); + let delay = validateMessageDelay(req.headers) ?? this.#maybeProducer?.deliveryDelay, body = QueuesBatchRequestSchema.parse(await req.json()); + return this.#enqueue(body.messages, delay), new Response(); + }; +}; +__decorateClass([ + POST("/message") +], QueueBrokerObject.prototype, "message", 2), __decorateClass([ + POST("/batch") +], QueueBrokerObject.prototype, "batch", 2); +export { + QueueBrokerObject +}; +//# sourceMappingURL=broker.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/queues/broker.worker.js.map b/node_modules/miniflare/dist/src/workers/queues/broker.worker.js.map new file mode 100644 index 0000000..6d54e99 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/queues/broker.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/queues/broker.worker.ts", "../../../../../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs", "../../../../src/workers/queues/constants.ts", "../../../../src/workers/queues/schemas.ts"], + "mappings": ";;;;;;;;;AAAA,OAAO,YAAY;AACnB,SAAS,UAAAA,eAAc;;;ACDvB,IAAI,aAAa,qBAAqB,UAAU,MAAM,QAAM;AACxD,OAAO,UAAY,QACrB,EAAE,aAAa,qBAAqB,UAAU,KAAK,IAAI,QAAQ,OAAO,CAAC,GACxE,QAAQ,QAAQ,UAAU,QAAQ,OAAO;AAGnC,IAAM,IAAI;AAAA,EAChB,SAAS,CAAC,uBAAuB,YAAY,QAAQ,SAAS,WAC7D,eAAe,QAAQ,gBAAgB,OAAO;AAEhD;AAEA,SAAS,KAAK,GAAG,GAAG;AACnB,MAAI,MAAM,IAAI,OAAO,WAAW,CAAC,KAAK,GAAG,GACrC,OAAO,QAAQ,CAAC,KAAK,QAAQ,QAAQ,CAAC;AAE1C,SAAO,SAAU,KAAK;AACrB,WAAI,CAAC,EAAE,WAAW,OAAO,OAAa,MAC/B,QAAU,EAAE,KAAG,KAAK,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,QAAQ,IAAI,IAAI,OAAO;AAAA,EACrF;AACD;AAGO,IAAM,QAAQ,KAAK,GAAG,CAAC,GACjB,OAAO,KAAK,GAAG,EAAE,GACjB,MAAM,KAAK,GAAG,EAAE,GACh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Q;AAAA,GAzMF,kBA0MZ;", + "names": ["Buffer", "Buffer"] +} diff --git a/node_modules/miniflare/dist/src/workers/r2/bucket.worker.js b/node_modules/miniflare/dist/src/workers/r2/bucket.worker.js new file mode 100644 index 0000000..6a48392 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/r2/bucket.worker.js @@ -0,0 +1,1134 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __decorateClass = (decorators, target, key, kind) => { + for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--) + (decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result); + return kind && result && __defProp(target, key, result), result; +}; + +// src/workers/r2/bucket.worker.ts +import assert2 from "node:assert"; +import { Buffer as Buffer3 } from "node:buffer"; +import { createHash } from "node:crypto"; +import { + all, + base64Decode, + base64Encode, + DeferredPromise, + GET, + get, + maybeApply, + MiniflareDurableObject, + PUT, + readPrefix, + WaitGroup +} from "miniflare:shared"; + +// src/workers/r2/constants.ts +var R2Limits = { + MAX_LIST_KEYS: 1e3, + MAX_KEY_SIZE: 1024, + // https://developers.cloudflare.com/r2/platform/limits/ + MAX_VALUE_SIZE: 5363466240, + // 5 GiB - 5 MiB + MAX_METADATA_SIZE: 2048, + // 2048 B + MIN_MULTIPART_PART_SIZE: 5242880, + MIN_MULTIPART_PART_SIZE_TEST: 50 +}, R2Headers = { + ERROR: "cf-r2-error", + REQUEST: "cf-r2-request", + METADATA_SIZE: "cf-r2-metadata-size" +}; + +// src/workers/r2/errors.worker.ts +import { HttpError } from "miniflare:shared"; +var R2ErrorCode = { + INTERNAL_ERROR: 10001, + NO_SUCH_OBJECT_KEY: 10007, + ENTITY_TOO_LARGE: 100100, + ENTITY_TOO_SMALL: 10011, + METADATA_TOO_LARGE: 10012, + INVALID_OBJECT_NAME: 10020, + INVALID_MAX_KEYS: 10022, + NO_SUCH_UPLOAD: 10024, + INVALID_PART: 10025, + INVALID_ARGUMENT: 10029, + PRECONDITION_FAILED: 10031, + BAD_DIGEST: 10037, + INVALID_RANGE: 10039, + BAD_UPLOAD: 10048 +}, R2Error = class extends HttpError { + constructor(code, message, v4Code) { + super(code, message); + this.v4Code = v4Code; + } + object; + toResponse() { + if (this.object !== void 0) { + let { metadataSize, value } = this.object.encode(); + return new Response(value, { + status: this.code, + headers: { + [R2Headers.METADATA_SIZE]: `${metadataSize}`, + "Content-Type": "application/json", + [R2Headers.ERROR]: JSON.stringify({ + message: this.message, + version: 1, + // Note the lowercase 'c', which the runtime expects + v4code: this.v4Code + }) + } + }); + } + return new Response(null, { + status: this.code, + headers: { + [R2Headers.ERROR]: JSON.stringify({ + message: this.message, + version: 1, + // Note the lowercase 'c', which the runtime expects + v4code: this.v4Code + }) + } + }); + } + context(info) { + return this.message += ` (${info})`, this; + } + attach(object) { + return this.object = object, this; + } +}, InvalidMetadata = class extends R2Error { + constructor() { + super(400, "Metadata missing or invalid", R2ErrorCode.INVALID_ARGUMENT); + } +}, InternalError = class extends R2Error { + constructor() { + super( + 500, + "We encountered an internal error. Please try again.", + R2ErrorCode.INTERNAL_ERROR + ); + } +}, NoSuchKey = class extends R2Error { + constructor() { + super( + 404, + "The specified key does not exist.", + R2ErrorCode.NO_SUCH_OBJECT_KEY + ); + } +}, EntityTooLarge = class extends R2Error { + constructor() { + super( + 400, + "Your proposed upload exceeds the maximum allowed object size.", + R2ErrorCode.ENTITY_TOO_LARGE + ); + } +}, EntityTooSmall = class extends R2Error { + constructor() { + super( + 400, + "Your proposed upload is smaller than the minimum allowed object size.", + R2ErrorCode.ENTITY_TOO_SMALL + ); + } +}, MetadataTooLarge = class extends R2Error { + constructor() { + super( + 400, + "Your metadata headers exceed the maximum allowed metadata size.", + R2ErrorCode.METADATA_TOO_LARGE + ); + } +}, BadDigest = class extends R2Error { + constructor(algorithm, provided, calculated) { + super( + 400, + [ + `The ${algorithm} checksum you specified did not match what we received.`, + `You provided a ${algorithm} checksum with value: ${provided.toString( + "hex" + )}`, + `Actual ${algorithm} was: ${calculated.toString("hex")}` + ].join(` +`), + R2ErrorCode.BAD_DIGEST + ); + } +}, InvalidObjectName = class extends R2Error { + constructor() { + super( + 400, + "The specified object name is not valid.", + R2ErrorCode.INVALID_OBJECT_NAME + ); + } +}, InvalidMaxKeys = class extends R2Error { + constructor() { + super( + 400, + "MaxKeys params must be positive integer <= 1000.", + R2ErrorCode.INVALID_MAX_KEYS + ); + } +}, NoSuchUpload = class extends R2Error { + constructor() { + super( + 400, + "The specified multipart upload does not exist.", + R2ErrorCode.NO_SUCH_UPLOAD + ); + } +}, InvalidPart = class extends R2Error { + constructor() { + super( + 400, + "One or more of the specified parts could not be found.", + R2ErrorCode.INVALID_PART + ); + } +}, PreconditionFailed = class extends R2Error { + constructor() { + super( + 412, + "At least one of the pre-conditions you specified did not hold.", + R2ErrorCode.PRECONDITION_FAILED + ); + } +}, InvalidRange = class extends R2Error { + constructor() { + super( + 416, + "The requested range is not satisfiable", + R2ErrorCode.INVALID_RANGE + ); + } +}, BadUpload = class extends R2Error { + constructor() { + super( + 500, + "There was a problem with the multipart upload.", + R2ErrorCode.BAD_UPLOAD + ); + } +}; + +// src/workers/r2/r2Object.worker.ts +import { HEX_REGEXP } from "miniflare:zod"; +var InternalR2Object = class { + key; + version; + size; + etag; + uploaded; + httpMetadata; + customMetadata; + range; + checksums; + constructor(row, range) { + this.key = row.key, this.version = row.version, this.size = row.size, this.etag = row.etag, this.uploaded = row.uploaded, this.httpMetadata = JSON.parse(row.http_metadata), this.customMetadata = JSON.parse(row.custom_metadata), this.range = range; + let checksums = JSON.parse(row.checksums); + this.etag.length === 32 && HEX_REGEXP.test(this.etag) && (checksums.md5 = row.etag), this.checksums = checksums; + } + // Format for return to the Workers Runtime + #rawProperties() { + return { + name: this.key, + version: this.version, + size: this.size, + etag: this.etag, + uploaded: this.uploaded, + httpFields: this.httpMetadata, + customFields: Object.entries(this.customMetadata).map(([k, v]) => ({ + k, + v + })), + range: this.range, + checksums: { + 0: this.checksums.md5, + 1: this.checksums.sha1, + 2: this.checksums.sha256, + 3: this.checksums.sha384, + 4: this.checksums.sha512 + } + }; + } + encode() { + let json = JSON.stringify(this.#rawProperties()), blob = new Blob([json]); + return { metadataSize: blob.size, value: blob.stream(), size: blob.size }; + } + static encodeMultiple(objects) { + let json = JSON.stringify({ + ...objects, + objects: objects.objects.map((o) => o.#rawProperties()) + }), blob = new Blob([json]); + return { metadataSize: blob.size, value: blob.stream(), size: blob.size }; + } +}, InternalR2ObjectBody = class extends InternalR2Object { + constructor(metadata, body, range) { + super(metadata, range); + this.body = body; + } + encode() { + let { metadataSize, value: metadata } = super.encode(), size = this.range?.length ?? this.size, identity2 = new FixedLengthStream(size + metadataSize); + return metadata.pipeTo(identity2.writable, { preventClose: !0 }).then(() => this.body.pipeTo(identity2.writable)), { + metadataSize, + value: identity2.readable, + size + }; + } +}; + +// src/workers/r2/schemas.worker.ts +import { Base64DataSchema, HexDataSchema, z } from "miniflare:zod"; +var MultipartUploadState = { + IN_PROGRESS: 0, + COMPLETED: 1, + ABORTED: 2 +}, SQL_SCHEMA = ` +CREATE TABLE IF NOT EXISTS _mf_objects ( + key TEXT PRIMARY KEY, + blob_id TEXT, + version TEXT NOT NULL, + size INTEGER NOT NULL, + etag TEXT NOT NULL, + uploaded INTEGER NOT NULL, + checksums TEXT NOT NULL, + http_metadata TEXT NOT NULL, + custom_metadata TEXT NOT NULL +); +CREATE TABLE IF NOT EXISTS _mf_multipart_uploads ( + upload_id TEXT PRIMARY KEY, + key TEXT NOT NULL, + http_metadata TEXT NOT NULL, + custom_metadata TEXT NOT NULL, + state TINYINT DEFAULT 0 NOT NULL +); +CREATE TABLE IF NOT EXISTS _mf_multipart_parts ( + upload_id TEXT NOT NULL REFERENCES _mf_multipart_uploads(upload_id), + part_number INTEGER NOT NULL, + blob_id TEXT NOT NULL, + size INTEGER NOT NULL, + etag TEXT NOT NULL, + checksum_md5 TEXT NOT NULL, + object_key TEXT REFERENCES _mf_objects(key) DEFERRABLE INITIALLY DEFERRED, + PRIMARY KEY (upload_id, part_number) +); +`, DateSchema = z.coerce.number().transform((value) => new Date(value)), RecordSchema = z.object({ + k: z.string(), + v: z.string() +}).array().transform( + (entries) => Object.fromEntries(entries.map(({ k, v }) => [k, v])) +), R2RangeSchema = z.object({ + offset: z.coerce.number().optional(), + length: z.coerce.number().optional(), + suffix: z.coerce.number().optional() +}), R2EtagSchema = z.discriminatedUnion("type", [ + z.object({ type: z.literal("strong"), value: z.string() }), + z.object({ type: z.literal("weak"), value: z.string() }), + z.object({ type: z.literal("wildcard") }) +]), R2EtagMatchSchema = R2EtagSchema.array().min(1).optional(), R2ConditionalSchema = z.object({ + // Performs the operation if the object's ETag matches the given string + etagMatches: R2EtagMatchSchema, + // "If-Match" + // Performs the operation if the object's ETag does NOT match the given string + etagDoesNotMatch: R2EtagMatchSchema, + // "If-None-Match" + // Performs the operation if the object was uploaded BEFORE the given date + uploadedBefore: DateSchema.optional(), + // "If-Unmodified-Since" + // Performs the operation if the object was uploaded AFTER the given date + uploadedAfter: DateSchema.optional(), + // "If-Modified-Since" + // Truncates dates to seconds before performing comparisons + secondsGranularity: z.oboolean() +}), R2ChecksumsSchema = z.object({ + 0: HexDataSchema.optional(), + 1: HexDataSchema.optional(), + 2: HexDataSchema.optional(), + 3: HexDataSchema.optional(), + 4: HexDataSchema.optional() +}).transform((checksums) => ({ + md5: checksums[0], + sha1: checksums[1], + sha256: checksums[2], + sha384: checksums[3], + sha512: checksums[4] +})), R2PublishedPartSchema = z.object({ + etag: z.string(), + part: z.number() +}), R2HttpFieldsSchema = z.object({ + contentType: z.ostring(), + contentLanguage: z.ostring(), + contentDisposition: z.ostring(), + contentEncoding: z.ostring(), + cacheControl: z.ostring(), + cacheExpiry: z.coerce.number().optional() +}), R2HeadRequestSchema = z.object({ + method: z.literal("head"), + object: z.string() +}), R2GetRequestSchema = z.object({ + method: z.literal("get"), + object: z.string(), + // Specifies that only a specific length (from an optional offset) or suffix + // of bytes from the object should be returned. Refer to + // https://developers.cloudflare.com/r2/runtime-apis/#ranged-reads. + range: R2RangeSchema.optional(), + rangeHeader: z.ostring(), + // Specifies that the object should only be returned given satisfaction of + // certain conditions in the R2Conditional. Refer to R2Conditional above. + onlyIf: R2ConditionalSchema.optional() +}), R2PutRequestSchema = z.object({ + method: z.literal("put"), + object: z.string(), + customFields: RecordSchema.optional(), + // (renamed in transform) + httpFields: R2HttpFieldsSchema.optional(), + // (renamed in transform) + onlyIf: R2ConditionalSchema.optional(), + md5: Base64DataSchema.optional(), + // (intentionally base64, not hex) + sha1: HexDataSchema.optional(), + sha256: HexDataSchema.optional(), + sha384: HexDataSchema.optional(), + sha512: HexDataSchema.optional() +}).transform((value) => ({ + method: value.method, + object: value.object, + customMetadata: value.customFields, + httpMetadata: value.httpFields, + onlyIf: value.onlyIf, + md5: value.md5, + sha1: value.sha1, + sha256: value.sha256, + sha384: value.sha384, + sha512: value.sha512 +})), R2CreateMultipartUploadRequestSchema = z.object({ + method: z.literal("createMultipartUpload"), + object: z.string(), + customFields: RecordSchema.optional(), + // (renamed in transform) + httpFields: R2HttpFieldsSchema.optional() + // (renamed in transform) +}).transform((value) => ({ + method: value.method, + object: value.object, + customMetadata: value.customFields, + httpMetadata: value.httpFields +})), R2UploadPartRequestSchema = z.object({ + method: z.literal("uploadPart"), + object: z.string(), + uploadId: z.string(), + partNumber: z.number() +}), R2CompleteMultipartUploadRequestSchema = z.object({ + method: z.literal("completeMultipartUpload"), + object: z.string(), + uploadId: z.string(), + parts: R2PublishedPartSchema.array() +}), R2AbortMultipartUploadRequestSchema = z.object({ + method: z.literal("abortMultipartUpload"), + object: z.string(), + uploadId: z.string() +}), R2ListRequestSchema = z.object({ + method: z.literal("list"), + limit: z.onumber(), + prefix: z.ostring(), + cursor: z.ostring(), + delimiter: z.ostring(), + startAfter: z.ostring(), + include: z.union([z.literal(0), z.literal(1)]).transform((value) => value === 0 ? "httpMetadata" : "customMetadata").array().optional() +}), R2DeleteRequestSchema = z.intersection( + z.object({ method: z.literal("delete") }), + z.union([ + z.object({ object: z.string() }), + z.object({ objects: z.string().array() }) + ]) +), R2BindingRequestSchema = z.union([ + R2HeadRequestSchema, + R2GetRequestSchema, + R2PutRequestSchema, + R2CreateMultipartUploadRequestSchema, + R2UploadPartRequestSchema, + R2CompleteMultipartUploadRequestSchema, + R2AbortMultipartUploadRequestSchema, + R2ListRequestSchema, + R2DeleteRequestSchema +]); + +// src/workers/r2/validator.worker.ts +import assert from "node:assert"; +import { Buffer as Buffer2 } from "node:buffer"; +import { parseRanges } from "miniflare:shared"; +function identity(ms) { + return ms; +} +function truncateToSeconds(ms) { + return Math.floor(ms / 1e3) * 1e3; +} +function includesEtag(conditions, etag, comparison) { + for (let condition of conditions) + if (condition.type === "wildcard" || condition.value === etag && (condition.type === "strong" || comparison === "weak")) + return !0; + return !1; +} +function _testR2Conditional(cond, metadata) { + if (metadata === void 0) { + let ifMatch2 = cond.etagMatches === void 0, ifModifiedSince2 = cond.uploadedAfter === void 0; + return ifMatch2 && ifModifiedSince2; + } + let { etag, uploaded: lastModifiedRaw } = metadata, ifMatch = cond.etagMatches === void 0 || includesEtag(cond.etagMatches, etag, "strong"), ifNoneMatch = cond.etagDoesNotMatch === void 0 || !includesEtag(cond.etagDoesNotMatch, etag, "weak"), maybeTruncate = cond.secondsGranularity ? truncateToSeconds : identity, lastModified = maybeTruncate(lastModifiedRaw), ifModifiedSince = cond.uploadedAfter === void 0 || maybeTruncate(cond.uploadedAfter.getTime()) < lastModified || cond.etagDoesNotMatch !== void 0 && ifNoneMatch, ifUnmodifiedSince = cond.uploadedBefore === void 0 || lastModified < maybeTruncate(cond.uploadedBefore.getTime()) || cond.etagMatches !== void 0 && ifMatch; + return ifMatch && ifNoneMatch && ifModifiedSince && ifUnmodifiedSince; +} +var R2_HASH_ALGORITHMS = [ + { name: "MD5", field: "md5" }, + { name: "SHA-1", field: "sha1" }, + { name: "SHA-256", field: "sha256" }, + { name: "SHA-384", field: "sha384" }, + { name: "SHA-512", field: "sha512" } +]; +function serialisedLength(x) { + for (let i = 0; i < x.length; i++) + if (x.charCodeAt(i) >= 256) return x.length * 2; + return x.length; +} +var Validator = class { + hash(digests, hashes) { + let checksums = {}; + for (let { name, field } of R2_HASH_ALGORITHMS) { + let providedHash = hashes[field]; + if (providedHash !== void 0) { + let computedHash = digests.get(name); + if (assert(computedHash !== void 0), !providedHash.equals(computedHash)) + throw new BadDigest(name, providedHash, computedHash); + checksums[field] = computedHash.toString("hex"); + } + } + return checksums; + } + condition(meta, onlyIf) { + if (onlyIf !== void 0 && !_testR2Conditional(onlyIf, meta)) + throw new PreconditionFailed(); + return this; + } + range(options, size) { + if (options.rangeHeader !== void 0) { + let ranges = parseRanges(options.rangeHeader, size); + if (ranges?.length === 1) return ranges[0]; + } else if (options.range !== void 0) { + let { offset, length, suffix } = options.range; + if (suffix !== void 0) { + if (suffix <= 0) throw new InvalidRange(); + suffix > size && (suffix = size), offset = size - suffix, length = suffix; + } + if (offset === void 0 && (offset = 0), length === void 0 && (length = size - offset), offset < 0 || offset > size || length <= 0) throw new InvalidRange(); + return offset + length > size && (length = size - offset), { start: offset, end: offset + length - 1 }; + } + } + size(size) { + if (size > R2Limits.MAX_VALUE_SIZE) + throw new EntityTooLarge(); + return this; + } + metadataSize(customMetadata) { + if (customMetadata === void 0) return this; + let metadataLength = 0; + for (let [key, value] of Object.entries(customMetadata)) + metadataLength += serialisedLength(key) + serialisedLength(value); + if (metadataLength > R2Limits.MAX_METADATA_SIZE) + throw new MetadataTooLarge(); + return this; + } + key(key) { + if (Buffer2.byteLength(key) > R2Limits.MAX_KEY_SIZE) + throw new InvalidObjectName(); + return this; + } + limit(limit) { + if (limit !== void 0 && (limit < 1 || limit > R2Limits.MAX_LIST_KEYS)) + throw new InvalidMaxKeys(); + return this; + } +}; + +// src/workers/r2/bucket.worker.ts +var DigestingStream = class extends TransformStream { + digests; + constructor(algorithms) { + let digests = new DeferredPromise(), hashes = algorithms.map((alg) => { + let stream = new crypto.DigestStream(alg), writer = stream.getWriter(); + return { stream, writer }; + }); + super({ + async transform(chunk, controller) { + for (let hash of hashes) await hash.writer.write(chunk); + controller.enqueue(chunk); + }, + async flush() { + let result = /* @__PURE__ */ new Map(); + for (let i = 0; i < hashes.length; i++) + await hashes[i].writer.close(), result.set(algorithms[i], Buffer3.from(await hashes[i].stream.digest)); + digests.resolve(result); + } + }), this.digests = digests; + } +}, validate = new Validator(), decoder = new TextDecoder(); +function generateVersion() { + return Buffer3.from(crypto.getRandomValues(new Uint8Array(16))).toString( + "hex" + ); +} +function generateId() { + return Buffer3.from(crypto.getRandomValues(new Uint8Array(128))).toString( + "base64url" + ); +} +function generateMultipartEtag(md5Hexes) { + let hash = createHash("md5"); + for (let md5Hex of md5Hexes) hash.update(md5Hex, "hex"); + return `${hash.digest("hex")}-${md5Hexes.length}`; +} +function rangeOverlaps(a, b) { + return a.start <= b.end && b.start <= a.end; +} +async function decodeMetadata(req) { + let metadataSize = parseInt(req.headers.get(R2Headers.METADATA_SIZE)); + if (Number.isNaN(metadataSize)) throw new InvalidMetadata(); + assert2(req.body !== null); + let body = req.body, [metadataBuffer, value] = await readPrefix(body, metadataSize), metadataJson = decoder.decode(metadataBuffer); + return { metadata: R2BindingRequestSchema.parse(JSON.parse(metadataJson)), metadataSize, value }; +} +function decodeHeaderMetadata(req) { + let header = req.headers.get(R2Headers.REQUEST); + if (header === null) throw new InvalidMetadata(); + return R2BindingRequestSchema.parse(JSON.parse(header)); +} +function encodeResult(result) { + let encoded; + return result instanceof InternalR2Object ? encoded = result.encode() : encoded = InternalR2Object.encodeMultiple(result), new Response(encoded.value, { + headers: { + [R2Headers.METADATA_SIZE]: `${encoded.metadataSize}`, + "Content-Type": "application/json", + "Content-Length": `${encoded.size}` + } + }); +} +function encodeJSONResult(result) { + let encoded = JSON.stringify(result); + return new Response(encoded, { + headers: { + [R2Headers.METADATA_SIZE]: `${Buffer3.byteLength(encoded)}`, + "Content-Type": "application/json" + } + }); +} +function sqlStmts(db) { + let stmtGetPreviousByKey = db.stmt("SELECT blob_id, etag, uploaded FROM _mf_objects WHERE key = :key"), stmtGetByKey = db.stmt(` + SELECT key, blob_id, version, size, etag, uploaded, checksums, http_metadata, custom_metadata + FROM _mf_objects WHERE key = :key + `), stmtPut = db.stmt(` + INSERT OR REPLACE INTO _mf_objects (key, blob_id, version, size, etag, uploaded, checksums, http_metadata, custom_metadata) + VALUES (:key, :blob_id, :version, :size, :etag, :uploaded, :checksums, :http_metadata, :custom_metadata) + `), stmtDelete = db.stmt("DELETE FROM _mf_objects WHERE key = :key RETURNING blob_id"); + function stmtListWithoutDelimiter(...extraColumns) { + let columns = [ + "key", + "version", + "size", + "etag", + "uploaded", + "checksums", + ...extraColumns + ]; + return db.stmt(` + SELECT ${columns.join(", ")} + FROM _mf_objects + WHERE substr(key, 1, length(:prefix)) = :prefix + AND (:start_after IS NULL OR key > :start_after) + ORDER BY key LIMIT :limit + `); + } + let stmtGetUploadState = db.stmt( + // For checking current upload state + "SELECT state FROM _mf_multipart_uploads WHERE upload_id = :upload_id AND key = :key" + ), stmtGetUploadMetadata = db.stmt( + // For checking current upload state, and getting metadata for completion + "SELECT http_metadata, custom_metadata, state FROM _mf_multipart_uploads WHERE upload_id = :upload_id AND key = :key" + ), stmtUpdateUploadState = db.stmt( + // For completing/aborting uploads + "UPDATE _mf_multipart_uploads SET state = :state WHERE upload_id = :upload_id" + ), stmtGetPreviousPartByNumber = db.stmt( + // For getting part number's previous blob ID to garbage collect + "SELECT blob_id FROM _mf_multipart_parts WHERE upload_id = :upload_id AND part_number = :part_number" + ), stmtPutPart = db.stmt( + // For recording metadata when uploading parts + `INSERT OR REPLACE INTO _mf_multipart_parts (upload_id, part_number, blob_id, size, etag, checksum_md5) + VALUES (:upload_id, :part_number, :blob_id, :size, :etag, :checksum_md5)` + ), stmtLinkPart = db.stmt( + // For linking parts with an object when completing uploads + `UPDATE _mf_multipart_parts SET object_key = :object_key + WHERE upload_id = :upload_id AND part_number = :part_number` + ), stmtDeletePartsByUploadId = db.stmt( + // For deleting parts when aborting uploads + "DELETE FROM _mf_multipart_parts WHERE upload_id = :upload_id RETURNING blob_id" + ), stmtDeleteUnlinkedPartsByUploadId = db.stmt( + // For deleting unused parts when completing uploads + "DELETE FROM _mf_multipart_parts WHERE upload_id = :upload_id AND object_key IS NULL RETURNING blob_id" + ), stmtDeletePartsByKey = db.stmt( + // For deleting dangling parts when overwriting an existing key + "DELETE FROM _mf_multipart_parts WHERE object_key = :object_key RETURNING blob_id" + ), stmtListPartsByUploadId = db.stmt( + // For getting part metadata when completing uploads + `SELECT upload_id, part_number, blob_id, size, etag, checksum_md5, object_key + FROM _mf_multipart_parts WHERE upload_id = :upload_id` + ), stmtListPartsByKey = db.stmt( + // For getting part metadata when getting values, size included for range + // requests, so we only need to read blobs containing the required data + "SELECT blob_id, size FROM _mf_multipart_parts WHERE object_key = :object_key ORDER BY part_number" + ); + return { + getByKey: stmtGetByKey, + getPartsByKey: db.txn((key) => { + let row = get(stmtGetByKey({ key })); + if (row !== void 0) + if (row.blob_id === null) { + let partsRows = all(stmtListPartsByKey({ object_key: key })); + return { row, parts: partsRows }; + } else + return { row }; + }), + put: db.txn((newRow, onlyIf) => { + let key = newRow.key, row = get(stmtGetPreviousByKey({ key })); + onlyIf !== void 0 && validate.condition(row, onlyIf), stmtPut(newRow); + let maybeOldBlobId = row?.blob_id; + return maybeOldBlobId === void 0 ? [] : maybeOldBlobId === null ? all(stmtDeletePartsByKey({ object_key: key })).map(({ blob_id }) => blob_id) : [maybeOldBlobId]; + }), + deleteByKeys: db.txn((keys) => { + let oldBlobIds = []; + for (let key of keys) { + let maybeOldBlobId = get(stmtDelete({ key }))?.blob_id; + if (maybeOldBlobId === null) { + let partRows = stmtDeletePartsByKey({ object_key: key }); + for (let partRow of partRows) oldBlobIds.push(partRow.blob_id); + } else maybeOldBlobId !== void 0 && oldBlobIds.push(maybeOldBlobId); + } + return oldBlobIds; + }), + listWithoutDelimiter: stmtListWithoutDelimiter(), + listHttpMetadataWithoutDelimiter: stmtListWithoutDelimiter("http_metadata"), + listCustomMetadataWithoutDelimiter: stmtListWithoutDelimiter("custom_metadata"), + listHttpCustomMetadataWithoutDelimiter: stmtListWithoutDelimiter( + "http_metadata", + "custom_metadata" + ), + listMetadata: db.stmt(` + SELECT + -- When grouping by a delimited prefix, this will give us the last key with that prefix. + -- NOTE: we'll use this for the next cursor. If we didn't return the last key, the next page may return the + -- same delimited prefix. Essentially, we're skipping over all keys with this group's delimited prefix. + -- When grouping by a key, this will just give us the key. + max(key) AS last_key, + iif( + -- Try get 1-indexed position \`i\` of :delimiter in rest of key after :prefix... + instr(substr(key, length(:prefix) + 1), :delimiter), + -- ...if found, we have a delimited prefix of the :prefix followed by the rest of key up to and including the :delimiter + 'dlp:' || substr(key, 1, length(:prefix) + instr(substr(key, length(:prefix) + 1), :delimiter) + length(:delimiter) - 1), + -- ...otherwise, we just have a regular key + 'key:' || key + ) AS delimited_prefix_or_key, + -- NOTE: we'll ignore metadata for delimited prefix rows, so it doesn't matter which keys' we return + version, size, etag, uploaded, checksums, http_metadata, custom_metadata + FROM _mf_objects + WHERE substr(key, 1, length(:prefix)) = :prefix + AND (:start_after IS NULL OR key > :start_after) + GROUP BY delimited_prefix_or_key -- Group keys with same delimited prefix into a row, leaving others in their own rows + ORDER BY last_key LIMIT :limit; + `), + createMultipartUpload: db.stmt(` + INSERT INTO _mf_multipart_uploads (upload_id, key, http_metadata, custom_metadata) + VALUES (:upload_id, :key, :http_metadata, :custom_metadata) + `), + putPart: db.txn( + (key, newRow) => { + if (get( + stmtGetUploadState({ + key, + upload_id: newRow.upload_id + }) + )?.state !== MultipartUploadState.IN_PROGRESS) + throw new NoSuchUpload(); + let partRow = get( + stmtGetPreviousPartByNumber({ + upload_id: newRow.upload_id, + part_number: newRow.part_number + }) + ); + return stmtPutPart(newRow), partRow?.blob_id; + } + ), + completeMultipartUpload: db.txn( + (key, upload_id, selectedParts, minPartSize) => { + let uploadRow = get(stmtGetUploadMetadata({ key, upload_id })); + if (uploadRow === void 0) + throw new InternalError(); + if (uploadRow.state > MultipartUploadState.IN_PROGRESS) + throw new NoSuchUpload(); + let partNumberSet = /* @__PURE__ */ new Set(); + for (let { part } of selectedParts) { + if (partNumberSet.has(part)) throw new InternalError(); + partNumberSet.add(part); + } + let uploadedPartRows = stmtListPartsByUploadId({ upload_id }), uploadedParts = /* @__PURE__ */ new Map(); + for (let row of uploadedPartRows) + uploadedParts.set(row.part_number, row); + let parts = selectedParts.map((selectedPart) => { + let uploadedPart = uploadedParts.get(selectedPart.part); + if (uploadedPart?.etag !== selectedPart.etag) + throw new InvalidPart(); + return uploadedPart; + }); + for (let part of parts.slice(0, -1)) + if (part.size < minPartSize) + throw new EntityTooSmall(); + parts.sort((a, b) => a.part_number - b.part_number); + let partSize; + for (let part of parts.slice(0, -1)) + if (partSize ??= part.size, part.size < minPartSize || part.size !== partSize) + throw new BadUpload(); + if (partSize !== void 0 && parts[parts.length - 1].size > partSize) + throw new BadUpload(); + let oldBlobIds = [], maybeOldBlobId = get(stmtGetPreviousByKey({ key }))?.blob_id; + if (maybeOldBlobId === null) { + let partRows2 = stmtDeletePartsByKey({ object_key: key }); + for (let partRow of partRows2) oldBlobIds.push(partRow.blob_id); + } else maybeOldBlobId !== void 0 && oldBlobIds.push(maybeOldBlobId); + let totalSize = parts.reduce((acc, { size }) => acc + size, 0), etag = generateMultipartEtag( + parts.map(({ checksum_md5 }) => checksum_md5) + ), newRow = { + key, + blob_id: null, + version: generateVersion(), + size: totalSize, + etag, + uploaded: Date.now(), + checksums: "{}", + http_metadata: uploadRow.http_metadata, + custom_metadata: uploadRow.custom_metadata + }; + stmtPut(newRow); + for (let part of parts) + stmtLinkPart({ + upload_id, + part_number: part.part_number, + object_key: key + }); + let partRows = stmtDeleteUnlinkedPartsByUploadId({ upload_id }); + for (let partRow of partRows) oldBlobIds.push(partRow.blob_id); + return stmtUpdateUploadState({ + upload_id, + state: MultipartUploadState.COMPLETED + }), { newRow, oldBlobIds }; + } + ), + abortMultipartUpload: db.txn((key, upload_id) => { + let uploadRow = get(stmtGetUploadState({ key, upload_id })); + if (uploadRow === void 0) + throw new InternalError(); + if (uploadRow.state > MultipartUploadState.IN_PROGRESS) + return []; + let oldBlobIds = all(stmtDeletePartsByUploadId({ upload_id })).map(({ blob_id }) => blob_id); + return stmtUpdateUploadState({ + upload_id, + state: MultipartUploadState.ABORTED + }), oldBlobIds; + }) + }; +} +var R2BucketObject = class extends MiniflareDurableObject { + #stmts; + // Multipart uploads are stored as multiple blobs. Therefore, when reading a + // multipart upload, we'll be reading multiple blobs. When an object is + // deleted, all its blobs are deleted in the background. + // + // Normally for single part objects, this is fine, since we'd open a handle to + // a single blob, which we'd have until we closed it, at which point the blob + // may be deleted. With multipart, we don't want to open handles for all blobs + // as we could hit open file descriptor limits. Similarly, we don't want to + // read all blobs first, as we'd have to buffer them. + // + // Instead, we set up in-process locking on blobs needed for multipart reads. + // When we start a multipart read, we acquire all the blobs we need, then + // release them as we've streamed each part. Multiple multipart reads may be + // in-progress at any given time, so we use a wait group. + // + // This assumes we only ever have a single Miniflare instance operating on a + // blob store, which is always true for in-memory stores, and usually true for + // on-disk ones. If we really wanted to do this properly, we could store the + // bookkeeping for the wait group in SQLite, but then we'd have to implement + // some inter-process signalling/subscription system. + #inUseBlobs = /* @__PURE__ */ new Map(); + constructor(state, env) { + super(state, env), this.db.exec("PRAGMA case_sensitive_like = TRUE"), this.db.exec(SQL_SCHEMA), this.#stmts = sqlStmts(this.db); + } + #acquireBlob(blobId) { + let waitGroup = this.#inUseBlobs.get(blobId); + waitGroup === void 0 ? (waitGroup = new WaitGroup(), this.#inUseBlobs.set(blobId, waitGroup), waitGroup.add(), waitGroup.wait().then(() => this.#inUseBlobs.delete(blobId))) : waitGroup.add(); + } + #releaseBlob(blobId) { + this.#inUseBlobs.get(blobId)?.done(); + } + #backgroundDelete(blobId) { + this.timers.queueMicrotask(async () => (await this.#inUseBlobs.get(blobId)?.wait(), this.blob.delete(blobId).catch((e) => { + console.error("R2BucketObject##backgroundDelete():", e); + }))); + } + #assembleMultipartValue(parts, queryRange) { + let requiredParts = [], start = 0; + for (let part of parts) { + let partRange = { start, end: start + part.size - 1 }; + if (rangeOverlaps(partRange, queryRange)) { + let range = { + start: Math.max(partRange.start, queryRange.start) - partRange.start, + end: Math.min(partRange.end, queryRange.end) - partRange.start + }; + this.#acquireBlob(part.blob_id), requiredParts.push({ blobId: part.blob_id, range }); + } + start = partRange.end + 1; + } + let identity2 = new TransformStream(); + return (async () => { + let i = 0; + try { + for (; i < requiredParts.length; i++) { + let { blobId, range } = requiredParts[i], value = await this.blob.get(blobId, range), msg = `Expected to find blob "${blobId}" for multipart value`; + assert2(value !== null, msg), await value.pipeTo(identity2.writable, { preventClose: !0 }), this.#releaseBlob(blobId); + } + await identity2.writable.close(); + } catch (e) { + await identity2.writable.abort(e); + } finally { + for (; i < requiredParts.length; i++) + this.#releaseBlob(requiredParts[i].blobId); + } + })(), identity2.readable; + } + async #head(key) { + validate.key(key); + let row = get(this.#stmts.getByKey({ key })); + if (row === void 0) throw new NoSuchKey(); + let range = { offset: 0, length: row.size }; + return new InternalR2Object(row, range); + } + async #get(key, opts) { + validate.key(key); + let result = this.#stmts.getPartsByKey(key); + if (result === void 0) throw new NoSuchKey(); + let { row, parts } = result, defaultR2Range = { offset: 0, length: row.size }; + try { + validate.condition(row, opts.onlyIf); + } catch (e) { + throw e instanceof PreconditionFailed && e.attach(new InternalR2Object(row, defaultR2Range)), e; + } + let range = validate.range(opts, row.size), r2Range; + if (range === void 0) + r2Range = defaultR2Range; + else { + let start = range.start, end = Math.min(range.end, row.size); + r2Range = { offset: start, length: end - start + 1 }; + } + let value; + if (row.blob_id === null) { + assert2(parts !== void 0); + let defaultRange = { start: 0, end: row.size - 1 }; + value = this.#assembleMultipartValue(parts, range ?? defaultRange); + } else if (value = await this.blob.get(row.blob_id, range), value === null) throw new NoSuchKey(); + return new InternalR2ObjectBody(row, value, r2Range); + } + async #put(key, value, valueSize, opts) { + let algorithms = []; + for (let { name, field } of R2_HASH_ALGORITHMS) + (field === "md5" || opts[field] !== void 0) && algorithms.push(name); + let digesting = new DigestingStream(algorithms), blobId = await this.blob.put(value.pipeThrough(digesting)), digests = await digesting.digests, md5Digest = digests.get("MD5"); + assert2(md5Digest !== void 0); + let md5DigestHex = md5Digest.toString("hex"), checksums = validate.key(key).size(valueSize).metadataSize(opts.customMetadata).hash(digests, opts), row = { + key, + blob_id: blobId, + version: generateVersion(), + size: valueSize, + etag: md5DigestHex, + uploaded: Date.now(), + checksums: JSON.stringify(checksums), + http_metadata: JSON.stringify(opts.httpMetadata ?? {}), + custom_metadata: JSON.stringify(opts.customMetadata ?? {}) + }, oldBlobIds; + try { + oldBlobIds = this.#stmts.put(row, opts.onlyIf); + } catch (e) { + throw this.#backgroundDelete(blobId), e; + } + if (oldBlobIds !== void 0) + for (let blobId2 of oldBlobIds) this.#backgroundDelete(blobId2); + return new InternalR2Object(row); + } + #delete(keys) { + Array.isArray(keys) || (keys = [keys]); + for (let key of keys) validate.key(key); + let oldBlobIds = this.#stmts.deleteByKeys(keys); + for (let blobId of oldBlobIds) this.#backgroundDelete(blobId); + } + #listWithoutDelimiterQuery(excludeHttp, excludeCustom) { + return excludeHttp && excludeCustom ? this.#stmts.listWithoutDelimiter : excludeHttp ? this.#stmts.listCustomMetadataWithoutDelimiter : excludeCustom ? this.#stmts.listHttpMetadataWithoutDelimiter : this.#stmts.listHttpCustomMetadataWithoutDelimiter; + } + async #list(opts) { + let prefix = opts.prefix ?? "", limit = opts.limit ?? R2Limits.MAX_LIST_KEYS; + validate.limit(limit); + let include = opts.include ?? []; + include.length > 0 && (limit = Math.min(limit, 100)); + let excludeHttp = !include.includes("httpMetadata"), excludeCustom = !include.includes("customMetadata"), rowObject = (row) => ((row.http_metadata === void 0 || excludeHttp) && (row.http_metadata = "{}"), (row.custom_metadata === void 0 || excludeCustom) && (row.custom_metadata = "{}"), new InternalR2Object(row)), startAfter = opts.startAfter; + if (opts.cursor !== void 0) { + let cursorStartAfter = base64Decode(opts.cursor); + (startAfter === void 0 || cursorStartAfter > startAfter) && (startAfter = cursorStartAfter); + } + let delimiter = opts.delimiter; + delimiter === "" && (delimiter = void 0); + let params = { + prefix, + start_after: startAfter ?? null, + // Increase the queried limit by 1, if we return this many results, we + // know there are more rows. We'll truncate to the original limit before + // returning results. + limit: limit + 1 + }, objects, delimitedPrefixes = [], nextCursorStartAfter; + if (delimiter !== void 0) { + let rows = all(this.#stmts.listMetadata({ ...params, delimiter })), hasMoreRows = rows.length === limit + 1; + rows.splice(limit, 1), objects = []; + for (let row of rows) + row.delimited_prefix_or_key.startsWith("dlp:") ? delimitedPrefixes.push(row.delimited_prefix_or_key.substring(4)) : objects.push(rowObject({ ...row, key: row.last_key })); + hasMoreRows && (nextCursorStartAfter = rows[limit - 1].last_key); + } else { + let query = this.#listWithoutDelimiterQuery(excludeHttp, excludeCustom), rows = all(query(params)), hasMoreRows = rows.length === limit + 1; + rows.splice(limit, 1), objects = rows.map(rowObject), hasMoreRows && (nextCursorStartAfter = rows[limit - 1].key); + } + let nextCursor = maybeApply(base64Encode, nextCursorStartAfter); + return { + objects, + truncated: nextCursor !== void 0, + cursor: nextCursor, + delimitedPrefixes + }; + } + async #createMultipartUpload(key, opts) { + validate.key(key); + let uploadId = generateId(); + return this.#stmts.createMultipartUpload({ + key, + upload_id: uploadId, + http_metadata: JSON.stringify(opts.httpMetadata ?? {}), + custom_metadata: JSON.stringify(opts.customMetadata ?? {}) + }), { uploadId }; + } + async #uploadPart(key, uploadId, partNumber, value, valueSize) { + validate.key(key); + let digesting = new DigestingStream(["MD5"]), blobId = await this.blob.put(value.pipeThrough(digesting)), md5Digest = (await digesting.digests).get("MD5"); + assert2(md5Digest !== void 0); + let etag = generateId(), maybeOldBlobId; + try { + maybeOldBlobId = this.#stmts.putPart(key, { + upload_id: uploadId, + part_number: partNumber, + blob_id: blobId, + size: valueSize, + etag, + checksum_md5: md5Digest.toString("hex") + }); + } catch (e) { + throw this.#backgroundDelete(blobId), e; + } + return maybeOldBlobId !== void 0 && this.#backgroundDelete(maybeOldBlobId), { etag }; + } + async #completeMultipartUpload(key, uploadId, parts) { + validate.key(key); + let minPartSize = this.beingTested ? R2Limits.MIN_MULTIPART_PART_SIZE_TEST : R2Limits.MIN_MULTIPART_PART_SIZE, { newRow, oldBlobIds } = this.#stmts.completeMultipartUpload( + key, + uploadId, + parts, + minPartSize + ); + for (let blobId of oldBlobIds) this.#backgroundDelete(blobId); + return new InternalR2Object(newRow); + } + async #abortMultipartUpload(key, uploadId) { + validate.key(key); + let oldBlobIds = this.#stmts.abortMultipartUpload(key, uploadId); + for (let blobId of oldBlobIds) this.#backgroundDelete(blobId); + } + get = async (req) => { + let metadata = decodeHeaderMetadata(req), result; + if (metadata.method === "head") + result = await this.#head(metadata.object); + else if (metadata.method === "get") + result = await this.#get(metadata.object, metadata); + else if (metadata.method === "list") + result = await this.#list(metadata); + else + throw new InternalError(); + return encodeResult(result); + }; + put = async (req) => { + let { metadata, metadataSize, value } = await decodeMetadata(req); + if (metadata.method === "delete") + return await this.#delete( + "object" in metadata ? metadata.object : metadata.objects + ), new Response(); + if (metadata.method === "put") { + let contentLength = parseInt(req.headers.get("Content-Length")); + assert2(!isNaN(contentLength)); + let valueSize = contentLength - metadataSize, result = await this.#put( + metadata.object, + value, + valueSize, + metadata + ); + return encodeResult(result); + } else if (metadata.method === "createMultipartUpload") { + let result = await this.#createMultipartUpload( + metadata.object, + metadata + ); + return encodeJSONResult(result); + } else if (metadata.method === "uploadPart") { + let contentLength = parseInt(req.headers.get("Content-Length")); + assert2(!isNaN(contentLength)); + let valueSize = contentLength - metadataSize, result = await this.#uploadPart( + metadata.object, + metadata.uploadId, + metadata.partNumber, + value, + valueSize + ); + return encodeJSONResult(result); + } else if (metadata.method === "completeMultipartUpload") { + let result = await this.#completeMultipartUpload( + metadata.object, + metadata.uploadId, + metadata.parts + ); + return encodeResult(result); + } else { + if (metadata.method === "abortMultipartUpload") + return await this.#abortMultipartUpload(metadata.object, metadata.uploadId), new Response(); + throw new InternalError(); + } + }; +}; +__decorateClass([ + GET("/") +], R2BucketObject.prototype, "get", 2), __decorateClass([ + PUT("/") +], R2BucketObject.prototype, "put", 2); +export { + R2BucketObject +}; +//# sourceMappingURL=bucket.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/r2/bucket.worker.js.map b/node_modules/miniflare/dist/src/workers/r2/bucket.worker.js.map new file mode 100644 index 0000000..1821aa9 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/r2/bucket.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/r2/bucket.worker.ts", "../../../../src/workers/r2/constants.ts", "../../../../src/workers/r2/errors.worker.ts", "../../../../src/workers/r2/r2Object.worker.ts", "../../../../src/workers/r2/schemas.worker.ts", "../../../../src/workers/r2/validator.worker.ts"], + "mappings": ";;;;;;;;;AAAA,OAAOA,aAAY;AACnB,SAAS,UAAAC,eAAc;AACvB,SAAS,kBAAkB;AAC3B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAGA;AAAA,OACM;;;ACpBA,IAAM,WAAW;AAAA,EACvB,eAAe;AAAA,EACf,cAAc;AAAA;AAAA,EAEd,gBAAgB;AAAA;AAAA,EAChB,mBAAmB;AAAA;AAAA,EACnB,yBAAyB;AAAA,EACzB,8BAA8B;AAC/B,GAEa,YAAY;AAAA,EACxB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,eAAe;AAChB;;;ACbA,SAAS,iBAAiB;AAI1B,IAAM,cAAc;AAAA,EACnB,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,oBAAoB;AAA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MAAM;AAAA,IAC/B,WAAW,SAAS,WAAW,2BAA2B;AACzD,UAAM,SAAS,MAAM,KAAK;AAAA,QACzB,SAAS;AAAA,QACT,SAAS;AAAA,QACT,SAAS;AAAA,MACV;AACA,aAAO,aAAa,MAAM;AAAA,IAC3B,OAAO;AAAA,UAAI,SAAS,WAAW;AAC9B,qBAAM,KAAK,sBAAsB,SAAS,QAAQ,SAAS,QAAQ,GAC5D,IAAI,SAAS;AAEpB,YAAM,IAAI,cAAc;AAAA;AAAA,EAE1B;AACD;AA7EC;AAAA,EADC,IAAI,GAAG;AAAA,GAvaI,eAwaZ,sBAkBA;AAAA,EADC,IAAI,GAAG;AAAA,GAzbI,eA0bZ;", + "names": ["assert", "Buffer", "identity", "Buffer", "ifMatch", "ifModifiedSince", "Buffer", "Buffer", "assert", "partRows", "identity", "blobId"] +} diff --git a/node_modules/miniflare/dist/src/workers/ratelimit/ratelimit.worker.js b/node_modules/miniflare/dist/src/workers/ratelimit/ratelimit.worker.js new file mode 100644 index 0000000..fb5e4d8 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/ratelimit/ratelimit.worker.js @@ -0,0 +1,54 @@ +// src/workers/ratelimit/ratelimit.worker.ts +var RatelimitOptionKeys = ["key", "limit", "period"], RatelimitPeriodValues = [10, 60]; +function validate(test, message) { + if (!test) + throw new Error(message); +} +var Ratelimit = class { + namespaceId; + limitVal; + period; + buckets; + epoch; + constructor(config) { + this.namespaceId = config.namespaceId, this.limitVal = config.limit, this.period = config.period, this.buckets = /* @__PURE__ */ new Map(), this.epoch = 0; + } + // method that counts and checks against the limit in in-memory buckets + async limit(options) { + validate( + typeof options == "object" && options !== null, + "invalid rate limit options" + ); + let invalidProps = Object.keys(options ?? {}).filter( + (key2) => !RatelimitOptionKeys.includes(key2) + ); + validate( + invalidProps.length == 0, + `bad rate limit options: [${invalidProps.join(",")}]` + ); + let { + key = "", + limit = this.limitVal, + period = this.period + } = options; + validate(typeof key == "string", `invalid key: ${key}`), validate(typeof limit == "number", `limit must be a number: ${limit}`), validate(typeof period == "number", `period must be a number: ${period}`), validate( + RatelimitPeriodValues.includes(period), + `unsupported period: ${period}` + ); + let epoch = Math.floor(Date.now() / (period * 1e3)); + epoch != this.epoch && (this.epoch = epoch, this.buckets.clear()); + let val = this.buckets.get(key) || 0; + return val >= limit ? { + success: !1 + } : (this.buckets.set(key, val + 1), { + success: !0 + }); + } +}; +function ratelimit_worker_default(env) { + return new Ratelimit(env); +} +export { + ratelimit_worker_default as default +}; +//# sourceMappingURL=ratelimit.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/ratelimit/ratelimit.worker.js.map b/node_modules/miniflare/dist/src/workers/ratelimit/ratelimit.worker.js.map new file mode 100644 index 0000000..19c81bf --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/ratelimit/ratelimit.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/ratelimit/ratelimit.worker.ts"], + "mappings": ";AAWA,IAAM,sBAAsB,CAAC,OAAO,SAAS,QAAQ,GAC/C,wBAAwB,CAAC,IAAI,EAAE;AAQrC,SAAS,SAAS,MAAe,SAA+B;AAC/D,MAAI,CAAC;AACJ,UAAM,IAAI,MAAM,OAAO;AAEzB;AAEA,IAAM,YAAN,MAAgB;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,YAAY,QAAyB;AACpC,SAAK,cAAc,OAAO,aAC1B,KAAK,WAAW,OAAO,OACvB,KAAK,SAAS,OAAO,QAErB,KAAK,UAAU,oBAAI,IAAoB,GACvC,KAAK,QAAQ;AAAA,EACd;AAAA;AAAA,EAGA,MAAM,MAAM,SAA4C;AAEvD;AAAA,MACC,OAAO,WAAY,YAAY,YAAY;AAAA,MAC3C;AAAA,IACD;AACA,QAAM,eAAe,OAAO,KAAK,WAAW,CAAC,CAAC,EAAE;AAAA,MAC/C,CAACA,SAAQ,CAAC,oBAAoB,SAASA,IAAG;AAAA,IAC3C;AACA;AAAA,MACC,aAAa,UAAU;AAAA,MACvB,4BAA4B,aAAa,KAAK,GAAG,CAAC;AAAA,IACnD;AACA,QAAM;AAAA,MACL,MAAM;AAAA,MACN,QAAQ,KAAK;AAAA,MACb,SAAS,KAAK;AAAA,IACf,IAAI;AACJ,aAAS,OAAO,OAAQ,UAAU,gBAAgB,GAAG,EAAE,GACvD,SAAS,OAAO,SAAU,UAAU,2BAA2B,KAAK,EAAE,GACtE,SAAS,OAAO,UAAW,UAAU,4BAA4B,MAAM,EAAE,GACzE;AAAA,MACC,sBAAsB,SAAS,MAAM;AAAA,MACrC,uBAAuB,MAAM;AAAA,IAC9B;AAEA,QAAM,QAAQ,KAAK,MAAM,KAAK,IAAI,KAAK,SAAS,IAAK;AACrD,IAAI,SAAS,KAAK,UAEjB,KAAK,QAAQ,OACb,KAAK,QAAQ,MAAM;AAEpB,QAAM,MAAM,KAAK,QAAQ,IAAI,GAAG,KAAK;AACrC,WAAI,OAAO,QACH;AAAA,MACN,SAAS;AAAA,IACV,KAED,KAAK,QAAQ,IAAI,KAAK,MAAM,CAAC,GACtB;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACD;AACD;AAGe,SAAR,yBAAkB,KAAsB;AAC9C,SAAO,IAAI,UAAU,GAAG;AACzB;", + "names": ["key"] +} diff --git a/node_modules/miniflare/dist/src/workers/shared/index.worker.js b/node_modules/miniflare/dist/src/workers/shared/index.worker.js new file mode 100644 index 0000000..b4a8b68 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/shared/index.worker.js @@ -0,0 +1,683 @@ +// src/workers/shared/blob.worker.ts +import assert from "node-internal:internal_assert"; +import { Buffer as Buffer2 } from "node-internal:internal_buffer"; + +// src/workers/shared/data.ts +import { Buffer } from "node-internal:internal_buffer"; +function viewToBuffer(view) { + return view.buffer.slice( + view.byteOffset, + view.byteOffset + view.byteLength + ); +} +function base64Encode(value) { + return Buffer.from(value, "utf8").toString("base64"); +} +function base64Decode(encoded) { + return Buffer.from(encoded, "base64").toString("utf8"); +} +var dotRegexp = /(^|\/|\\)(\.+)(\/|\\|$)/g, illegalRegexp = /[?<>*"'^/\\:|\x00-\x1f\x80-\x9f]/g, windowsReservedRegexp = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i, leadingRegexp = /^[ /\\]+/, trailingRegexp = /[ /\\]+$/; +function dotReplacement(match, g1, g2, g3) { + return `${g1}${"".padStart(g2.length, "_")}${g3}`; +} +function underscoreReplacement(match) { + return "".padStart(match.length, "_"); +} +function sanitisePath(unsafe) { + return unsafe.replace(dotRegexp, dotReplacement).replace(dotRegexp, dotReplacement).replace(illegalRegexp, "_").replace(windowsReservedRegexp, "_").replace(leadingRegexp, underscoreReplacement).replace(trailingRegexp, underscoreReplacement).substring(0, 255); +} + +// src/workers/shared/blob.worker.ts +var ENCODER = new TextEncoder(); +async function readPrefix(stream, prefixLength) { + let reader = await stream.getReader({ mode: "byob" }), result = await reader.readAtLeast( + prefixLength, + new Uint8Array(prefixLength) + ); + assert(result.value !== void 0), reader.releaseLock(); + let rest = stream.pipeThrough(new IdentityTransformStream()); + return [result.value, rest]; +} +function rangeHeaders(range) { + return { Range: `bytes=${range.start}-${range.end}` }; +} +function assertFullRangeRequest(range, contentLength) { + assert( + range.start === 0 && range.end === contentLength - 1, + "Received full content, but requested partial content" + ); +} +async function fetchSingleRange(fetcher, url, range) { + let headers = range === void 0 ? {} : rangeHeaders(range), res = await fetcher.fetch(url, { headers }); + if (res.status === 404) return null; + if (assert(res.ok && res.body !== null), range !== void 0 && res.status !== 206) { + let contentLength = parseInt(res.headers.get("Content-Length")); + assert(!Number.isNaN(contentLength)), assertFullRangeRequest(range, contentLength); + } + return res.body; +} +async function writeMultipleRanges(fetcher, url, ranges, boundary, writable, contentLength, contentType) { + for (let i = 0; i < ranges.length; i++) { + let range = ranges[i], writer2 = writable.getWriter(); + i > 0 && await writer2.write(ENCODER.encode(`\r +`)), await writer2.write(ENCODER.encode(`--${boundary}\r +`)), contentType !== void 0 && await writer2.write(ENCODER.encode(`Content-Type: ${contentType}\r +`)); + let start = range.start, end = Math.min(range.end, contentLength - 1); + await writer2.write( + ENCODER.encode( + `Content-Range: bytes ${start}-${end}/${contentLength}\r +\r +` + ) + ), writer2.releaseLock(); + let res = await fetcher.fetch(url, { headers: rangeHeaders(range) }); + assert( + res.ok && res.body !== null, + `Failed to fetch ${url}[${range.start},${range.end}], received ${res.status} ${res.statusText}` + ), res.status !== 206 && assertFullRangeRequest(range, contentLength), await res.body.pipeTo(writable, { preventClose: !0 }); + } + let writer = writable.getWriter(); + ranges.length > 0 && await writer.write(ENCODER.encode(`\r +`)), await writer.write(ENCODER.encode(`--${boundary}--`)), await writer.close(); +} +async function fetchMultipleRanges(fetcher, url, ranges, opts) { + let res = await fetcher.fetch(url, { method: "HEAD" }); + if (res.status === 404) return null; + assert(res.ok); + let contentLength = parseInt(res.headers.get("Content-Length")); + assert(!Number.isNaN(contentLength)); + let boundary = `miniflare-boundary-${crypto.randomUUID()}`, multipartContentType = `multipart/byteranges; boundary=${boundary}`, { readable, writable } = new IdentityTransformStream(); + return writeMultipleRanges( + fetcher, + url, + ranges, + boundary, + writable, + contentLength, + opts?.contentType + ).catch((e) => console.error("Error writing multipart stream:", e)), { multipartContentType, body: readable }; +} +async function fetchRange(fetcher, url, range, opts) { + return Array.isArray(range) ? fetchMultipleRanges(fetcher, url, range, opts) : fetchSingleRange(fetcher, url, range); +} +function generateBlobId() { + let idBuffer = Buffer2.alloc(40); + return crypto.getRandomValues( + new Uint8Array(idBuffer.buffer, idBuffer.byteOffset, 32) + ), idBuffer.writeBigInt64BE( + BigInt(performance.timeOrigin + performance.now()), + 32 + ), idBuffer.toString("hex"); +} +var BlobStore = class { + // Database for binary large objects. Provides single and multi-ranged + // streaming reads and writes. + // + // Blobs have unguessable identifiers, can be deleted, but are otherwise + // immutable. These properties make it possible to perform atomic updates with + // the SQLite metadata store. No other operations will be able to interact + // with the blob until it's committed to the metadata store, because they + // won't be able to guess the ID, and we don't allow listing blobs. + // + // For example, if we put a blob in the store, then fail to insert the blob ID + // into the SQLite database for some reason during a transaction (e.g. + // `onlyIf` condition failed), no other operations can read that blob because + // the ID is lost (we'll just background-delete the blob in this case). + #fetcher; + #baseURL; + #stickyBlobs; + constructor(fetcher, namespace, stickyBlobs) { + namespace = encodeURIComponent(sanitisePath(namespace)), this.#fetcher = fetcher, this.#baseURL = `http://placeholder/${namespace}/blobs/`, this.#stickyBlobs = stickyBlobs; + } + idURL(id) { + let url = new URL(this.#baseURL + id); + return url.toString().startsWith(this.#baseURL) ? url : null; + } + async get(id, range, opts) { + let idURL = this.idURL(id); + return idURL === null ? null : fetchRange(this.#fetcher, idURL, range, opts); + } + async put(stream) { + let id = generateBlobId(), idURL = this.idURL(id); + return assert(idURL !== null), await this.#fetcher.fetch(idURL, { + method: "PUT", + body: stream + }), id; + } + async delete(id) { + if (this.#stickyBlobs) return; + let idURL = this.idURL(id); + if (idURL === null) return; + let res = await this.#fetcher.fetch(idURL, { method: "DELETE" }); + assert(res.ok || res.status === 404); + } +}; + +// src/workers/shared/constants.ts +var SharedHeaders = { + LOG_LEVEL: "MF-Log-Level" +}, SharedBindings = { + TEXT_NAMESPACE: "MINIFLARE_NAMESPACE", + DURABLE_OBJECT_NAMESPACE_OBJECT: "MINIFLARE_OBJECT", + MAYBE_SERVICE_BLOBS: "MINIFLARE_BLOBS", + MAYBE_SERVICE_LOOPBACK: "MINIFLARE_LOOPBACK", + MAYBE_JSON_ENABLE_CONTROL_ENDPOINTS: "MINIFLARE_ENABLE_CONTROL_ENDPOINTS", + MAYBE_JSON_ENABLE_STICKY_BLOBS: "MINIFLARE_STICKY_BLOBS" +}, LogLevel = /* @__PURE__ */ ((LogLevel3) => (LogLevel3[LogLevel3.NONE = 0] = "NONE", LogLevel3[LogLevel3.ERROR = 1] = "ERROR", LogLevel3[LogLevel3.WARN = 2] = "WARN", LogLevel3[LogLevel3.INFO = 3] = "INFO", LogLevel3[LogLevel3.DEBUG = 4] = "DEBUG", LogLevel3[LogLevel3.VERBOSE = 5] = "VERBOSE", LogLevel3))(LogLevel || {}); + +// src/workers/shared/keyvalue.worker.ts +import assert3 from "node-internal:internal_assert"; + +// src/workers/shared/sql.worker.ts +import assert2 from "node-internal:internal_assert"; +function isTypedValue(value) { + return value === null || typeof value == "string" || typeof value == "number" || value instanceof ArrayBuffer; +} +function createStatementFactory(sql) { + return (query) => { + let keyIndices = /* @__PURE__ */ new Map(); + query = query.replace(/[:@$]([a-z0-9_]+)/gi, (_, name) => { + let index = keyIndices.get(name); + return index === void 0 && (index = keyIndices.size, keyIndices.set(name, index)), `?${index + 1}`; + }); + let stmt = sql.prepare(query); + return (argsObject) => { + let entries = Object.entries(argsObject); + assert2.strictEqual( + entries.length, + keyIndices.size, + "Expected same number of keys in bindings and query" + ); + let argsArray = new Array(entries.length); + for (let [key, value] of entries) { + let index = keyIndices.get(key); + assert2(index !== void 0, `Unexpected binding key: ${key}`), argsArray[index] = value; + } + return stmt(...argsArray); + }; + }; +} +function createTransactionFactory(storage) { + return (closure) => (...args) => storage.transactionSync(() => closure(...args)); +} +function createTypedSql(storage) { + let sql = storage.sql; + return sql.stmt = createStatementFactory(sql), sql.txn = createTransactionFactory(storage), sql; +} +function get(cursor) { + let result; + for (let row of cursor) result ??= row; + return result; +} +function all(cursor) { + return Array.from(cursor); +} +function drain(cursor) { + for (let _ of cursor) + ; +} + +// src/workers/shared/keyvalue.worker.ts +var SQL_SCHEMA = ` +CREATE TABLE IF NOT EXISTS _mf_entries ( + key TEXT PRIMARY KEY, + blob_id TEXT NOT NULL, + expiration INTEGER, + metadata TEXT +); +CREATE INDEX IF NOT EXISTS _mf_entries_expiration_idx ON _mf_entries(expiration); +`; +function sqlStmts(db) { + let stmtGetBlobIdByKey = db.stmt( + "SELECT blob_id FROM _mf_entries WHERE key = :key" + ), stmtPut = db.stmt( + `INSERT OR REPLACE INTO _mf_entries (key, blob_id, expiration, metadata) + VALUES (:key, :blob_id, :expiration, :metadata)` + ); + return { + getByKey: db.prepare( + "SELECT key, blob_id, expiration, metadata FROM _mf_entries WHERE key = ?1" + ), + put: db.txn((newEntry) => { + let key = newEntry.key, previousEntry = get(stmtGetBlobIdByKey({ key })); + return stmtPut(newEntry), previousEntry?.blob_id; + }), + deleteByKey: db.stmt( + "DELETE FROM _mf_entries WHERE key = :key RETURNING blob_id, expiration" + ), + deleteExpired: db.stmt( + // `expiration` may be `NULL`, but `NULL < ...` should be falsy + "DELETE FROM _mf_entries WHERE expiration < :now RETURNING blob_id" + ), + list: db.stmt( + `SELECT key, expiration, metadata FROM _mf_entries + WHERE substr(key, 1, length(:prefix)) = :prefix + AND key > :start_after + AND (expiration IS NULL OR expiration >= :now) + ORDER BY key LIMIT :limit` + ) + }; +} +function rowEntry(entry) { + return { + key: entry.key, + expiration: entry.expiration ?? void 0, + metadata: entry.metadata === null ? void 0 : JSON.parse(entry.metadata) + }; +} +var KeyValueStorage = class { + #stmts; + #blob; + #timers; + constructor(object) { + object.db.exec("PRAGMA case_sensitive_like = TRUE"), object.db.exec(SQL_SCHEMA), this.#stmts = sqlStmts(object.db), this.#blob = object.blob, this.#timers = object.timers; + } + #hasExpired(entry) { + return entry.expiration !== null && entry.expiration <= this.#timers.now(); + } + #backgroundDelete(blobId) { + this.#timers.queueMicrotask( + () => this.#blob.delete(blobId).catch(() => { + }) + ); + } + async get(key, optsFactory) { + let row = get(this.#stmts.getByKey(key)); + if (row === void 0) return null; + if (this.#hasExpired(row)) + return drain(this.#stmts.deleteByKey({ key })), this.#backgroundDelete(row.blob_id), null; + let entry = rowEntry(row), opts = entry.metadata && optsFactory?.(entry.metadata); + if (opts?.ranges === void 0 || opts.ranges.length <= 1) { + let value = await this.#blob.get(row.blob_id, opts?.ranges?.[0]); + return value === null ? null : { ...entry, value }; + } else { + let value = await this.#blob.get(row.blob_id, opts.ranges, opts); + return value === null ? null : { ...entry, value }; + } + } + async put(entry) { + assert3(entry.key !== ""); + let blobId = await this.#blob.put(entry.value); + entry.signal?.aborted && (this.#backgroundDelete(blobId), entry.signal.throwIfAborted()); + let maybeOldBlobId = this.#stmts.put({ + key: entry.key, + blob_id: blobId, + expiration: entry.expiration ?? null, + metadata: entry.metadata === void 0 ? null : JSON.stringify(await entry.metadata) + }); + maybeOldBlobId !== void 0 && this.#backgroundDelete(maybeOldBlobId); + } + async delete(key) { + let cursor = this.#stmts.deleteByKey({ key }), row = get(cursor); + return row === void 0 ? !1 : (this.#backgroundDelete(row.blob_id), !this.#hasExpired(row)); + } + async list(opts) { + let now = this.#timers.now(), prefix = opts.prefix ?? "", start_after = opts.cursor === void 0 ? "" : base64Decode(opts.cursor), limit = opts.limit + 1, rowsCursor = this.#stmts.list({ + now, + prefix, + start_after, + limit + }), rows = Array.from(rowsCursor), expiredRows = this.#stmts.deleteExpired({ now }); + for (let row of expiredRows) this.#backgroundDelete(row.blob_id); + let hasMoreRows = rows.length === opts.limit + 1; + rows.splice(opts.limit, 1); + let keys = rows.map((row) => rowEntry(row)), nextCursor = hasMoreRows ? base64Encode(rows[opts.limit - 1].key) : void 0; + return { keys, cursor: nextCursor }; + } +}; + +// src/workers/shared/matcher.ts +function testRegExps(matcher, value) { + for (let exclude of matcher.exclude) if (exclude.test(value)) return !1; + for (let include of matcher.include) if (include.test(value)) return !0; + return !1; +} + +// src/workers/shared/object.worker.ts +import assert5 from "node-internal:internal_assert"; + +// src/workers/shared/router.worker.ts +var HttpError = class extends Error { + constructor(code, message) { + super(message); + this.code = code; + Object.setPrototypeOf(this, new.target.prototype), this.name = `${new.target.name} [${code}]`; + } + toResponse() { + return new Response(this.message, { + status: this.code, + // Custom statusMessage is required for runtime error messages + statusText: this.message.substring(0, 512) + }); + } +}, kRoutesTemplate = Symbol("kRoutesTemplate"), Router = class { + // Routes added by @METHOD decorators + #routes; + constructor() { + this.#routes = new.target.prototype[kRoutesTemplate]; + } + async fetch(req) { + let url = new URL(req.url), methodRoutes = this.#routes?.get(req.method); + if (methodRoutes === void 0) return new Response(null, { status: 405 }); + let handlers = this; + try { + for (let [path, key] of methodRoutes) { + let match = path.exec(url.pathname); + if (match !== null) return await handlers[key](req, match.groups, url); + } + return new Response(null, { status: 404 }); + } catch (e) { + if (e instanceof HttpError) + return e.toResponse(); + throw e; + } + } +}; +function pathToRegexp(path) { + return path === void 0 ? /^.*$/ : (path.endsWith("/") || (path += "/?"), path = path.replace(/\//g, "\\/"), path = path.replace(/:(\w+)/g, "(?<$1>[^\\/]+)"), new RegExp(`^${path}$`)); +} +var createRouteDecorator = (method) => (path) => (prototype, key) => { + let route = [pathToRegexp(path), key], routes = prototype[kRoutesTemplate] ??= /* @__PURE__ */ new Map(), methodRoutes = routes.get(method); + methodRoutes ? methodRoutes.push(route) : routes.set(method, [route]); +}, GET = createRouteDecorator("GET"), HEAD = createRouteDecorator("HEAD"), POST = createRouteDecorator("POST"), PUT = createRouteDecorator("PUT"), DELETE = createRouteDecorator("DELETE"), PURGE = createRouteDecorator("PURGE"), PATCH = createRouteDecorator("PATCH"); + +// src/workers/shared/timers.worker.ts +import assert4 from "node-internal:internal_assert"; +var kFakeTimerHandle = Symbol("kFakeTimerHandle"), Timers = class { + // Fake unix time in milliseconds. If defined, fake timers will be enabled. + #fakeTimestamp; + #fakeNextTimerHandle = 0; + #fakePendingTimeouts = /* @__PURE__ */ new Map(); + #fakeRunningTasks = /* @__PURE__ */ new Set(); + // Timers API + now = () => this.#fakeTimestamp ?? Date.now(); + setTimeout(closure, delay, ...args) { + if (this.#fakeTimestamp === void 0) + return setTimeout(closure, delay, ...args); + let handle = this.#fakeNextTimerHandle++, argsClosure = () => closure(...args); + if (delay === 0) + this.queueMicrotask(argsClosure); + else { + let timeout = { + triggerTimestamp: this.#fakeTimestamp + delay, + closure: argsClosure + }; + this.#fakePendingTimeouts.set(handle, timeout); + } + return { [kFakeTimerHandle]: handle }; + } + clearTimeout(handle) { + if (typeof handle == "number") return clearTimeout(handle); + this.#fakePendingTimeouts.delete(handle[kFakeTimerHandle]); + } + queueMicrotask(closure) { + if (this.#fakeTimestamp === void 0) return queueMicrotask(closure); + let result = closure(); + result instanceof Promise && (this.#fakeRunningTasks.add(result), result.finally(() => this.#fakeRunningTasks.delete(result))); + } + // Fake Timers Control API + #runPendingTimeouts() { + if (this.#fakeTimestamp !== void 0) + for (let [handle, timeout] of this.#fakePendingTimeouts) + timeout.triggerTimestamp <= this.#fakeTimestamp && (this.#fakePendingTimeouts.delete(handle), this.queueMicrotask(timeout.closure)); + } + enableFakeTimers(timestamp) { + this.#fakeTimestamp = timestamp, this.#runPendingTimeouts(); + } + disableFakeTimers() { + this.#fakeTimestamp = void 0, this.#fakePendingTimeouts.clear(); + } + advanceFakeTime(delta) { + assert4( + this.#fakeTimestamp !== void 0, + "Expected fake timers to be enabled before `advanceFakeTime()` call" + ), this.#fakeTimestamp += delta, this.#runPendingTimeouts(); + } + async waitForFakeTasks() { + for (; this.#fakeRunningTasks.size > 0; ) + await Promise.all(this.#fakeRunningTasks); + } +}; + +// src/workers/shared/types.ts +function reduceError(e) { + return { + name: e?.name, + message: e?.message ?? String(e), + stack: e?.stack, + cause: e?.cause === void 0 ? void 0 : reduceError(e.cause) + }; +} +function maybeApply(f, maybeValue) { + return maybeValue === void 0 ? void 0 : f(maybeValue); +} + +// src/workers/shared/object.worker.ts +var MiniflareDurableObject = class extends Router { + constructor(state, env) { + super(); + this.state = state; + this.env = env; + } + timers = new Timers(); + // If this Durable Object receives a control op, assume it's being tested. + // We use this to adjust some limits in tests. + beingTested = !1; + #db; + get db() { + return this.#db ??= createTypedSql(this.state.storage); + } + #name; + get name() { + return assert5( + this.#name !== void 0, + "Expected `MiniflareDurableObject#fetch()` call before `name` access" + ), this.#name; + } + #blob; + get blob() { + if (this.#blob !== void 0) return this.#blob; + let maybeBlobsService = this.env[SharedBindings.MAYBE_SERVICE_BLOBS], stickyBlobs = !!this.env[SharedBindings.MAYBE_JSON_ENABLE_STICKY_BLOBS]; + return assert5( + maybeBlobsService !== void 0, + `Expected ${SharedBindings.MAYBE_SERVICE_BLOBS} service binding` + ), this.#blob = new BlobStore(maybeBlobsService, this.name, stickyBlobs), this.#blob; + } + async logWithLevel(level, message) { + await this.env[SharedBindings.MAYBE_SERVICE_LOOPBACK]?.fetch( + "http://localhost/core/log", + { + method: "POST", + headers: { [SharedHeaders.LOG_LEVEL]: level.toString() }, + body: message + } + ); + } + async #handleControlOp({ + name, + args + }) { + if (this.beingTested = !0, name === "sqlQuery") { + assert5(args !== void 0); + let [query, ...params] = args; + assert5(typeof query == "string"), assert5(params.every(isTypedValue)); + let results = all(this.db.prepare(query)(...params)); + return Response.json(results); + } else if (name === "getBlob") { + assert5(args !== void 0); + let [id] = args; + assert5(typeof id == "string"); + let stream = await this.blob.get(id); + return new Response(stream, { status: stream === null ? 404 : 200 }); + } else { + let func = this.timers[name]; + assert5(typeof func == "function"); + let result = await func.apply(this.timers, args); + return Response.json(result ?? null); + } + } + async fetch(req) { + if (this.env[SharedBindings.MAYBE_JSON_ENABLE_CONTROL_ENDPOINTS] === !0) { + let controlOp = req?.cf?.miniflare?.controlOp; + if (controlOp !== void 0) return this.#handleControlOp(controlOp); + } + let name = req.cf?.miniflare?.name; + assert5(name !== void 0, "Expected `cf.miniflare.name`"), this.#name = name; + try { + return await super.fetch(req); + } catch (e) { + let error = reduceError(e), fallback = error.stack ?? error.message, loopbackService = this.env[SharedBindings.MAYBE_SERVICE_LOOPBACK]; + return loopbackService !== void 0 ? loopbackService.fetch("http://localhost/core/error", { + method: "POST", + body: JSON.stringify(error) + }).catch(() => { + console.error(fallback); + }) : console.error(fallback), new Response(fallback, { status: 500 }); + } finally { + req.body !== null && !req.bodyUsed && await req.body.pipeTo(new WritableStream()); + } + } +}; + +// src/workers/shared/range.ts +var rangePrefixRegexp = /^ *bytes *=/i, rangeRegexp = /^ *(?\d+)? *- *(?\d+)? *$/; +function parseRanges(rangeHeader, length) { + let prefixMatch = rangePrefixRegexp.exec(rangeHeader); + if (prefixMatch === null) return; + if (rangeHeader = rangeHeader.substring(prefixMatch[0].length), rangeHeader.trimStart() === "") return []; + let ranges = rangeHeader.split(","), result = []; + for (let range of ranges) { + let match = rangeRegexp.exec(range); + if (match === null) return; + let { start, end } = match.groups; + if (start !== void 0 && end !== void 0) { + let rangeStart = parseInt(start), rangeEnd = parseInt(end); + if (rangeStart > rangeEnd || rangeStart >= length) return; + rangeEnd >= length && (rangeEnd = length - 1), result.push({ start: rangeStart, end: rangeEnd }); + } else if (start !== void 0 && end === void 0) { + let rangeStart = parseInt(start); + if (rangeStart >= length) return; + result.push({ start: rangeStart, end: length - 1 }); + } else if (start === void 0 && end !== void 0) { + let suffix = parseInt(end); + if (suffix >= length) return []; + if (suffix === 0) continue; + result.push({ start: length - suffix, end: length - 1 }); + } else + return; + } + return result; +} + +// src/workers/shared/sync.ts +import assert6 from "node-internal:internal_assert"; +var DeferredPromise = class extends Promise { + resolve; + reject; + constructor(executor = () => { + }) { + let promiseResolve, promiseReject; + super((resolve, reject) => (promiseResolve = resolve, promiseReject = reject, executor(resolve, reject))), this.resolve = promiseResolve, this.reject = promiseReject; + } +}, Mutex = class { + locked = !1; + resolveQueue = []; + drainQueue = []; + lock() { + if (!this.locked) { + this.locked = !0; + return; + } + return new Promise((resolve) => this.resolveQueue.push(resolve)); + } + unlock() { + if (assert6(this.locked), this.resolveQueue.length > 0) + this.resolveQueue.shift()?.(); + else { + this.locked = !1; + let resolve; + for (; (resolve = this.drainQueue.shift()) !== void 0; ) resolve(); + } + } + get hasWaiting() { + return this.resolveQueue.length > 0; + } + async runWith(closure) { + let acquireAwaitable = this.lock(); + acquireAwaitable instanceof Promise && await acquireAwaitable; + try { + let awaitable = closure(); + return awaitable instanceof Promise ? await awaitable : awaitable; + } finally { + this.unlock(); + } + } + async drained() { + if (!(this.resolveQueue.length === 0 && !this.locked)) + return new Promise((resolve) => this.drainQueue.push(resolve)); + } +}, WaitGroup = class { + counter = 0; + resolveQueue = []; + add() { + this.counter++; + } + done() { + if (assert6(this.counter > 0), this.counter--, this.counter === 0) { + let resolve; + for (; (resolve = this.resolveQueue.shift()) !== void 0; ) resolve(); + } + } + wait() { + return this.counter === 0 ? Promise.resolve() : new Promise((resolve) => this.resolveQueue.push(resolve)); + } +}; +export { + BlobStore, + DELETE, + DeferredPromise, + GET, + HEAD, + HttpError, + KeyValueStorage, + LogLevel, + MiniflareDurableObject, + Mutex, + PATCH, + POST, + PURGE, + PUT, + Router, + SharedBindings, + SharedHeaders, + Timers, + WaitGroup, + all, + base64Decode, + base64Encode, + drain, + get, + maybeApply, + parseRanges, + readPrefix, + reduceError, + testRegExps, + viewToBuffer +}; +/*! Path sanitisation regexps adapted from node-sanitize-filename: + * https://github.com/parshap/node-sanitize-filename/blob/209c39b914c8eb48ee27bcbde64b2c7822fdf3de/index.js#L4-L37 + * + * Licensed under the ISC license: + * + * Copyright Parsha Pourkhomami + * + * 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. + */ +//# sourceMappingURL=index.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/shared/index.worker.js.map b/node_modules/miniflare/dist/src/workers/shared/index.worker.js.map new file mode 100644 index 0000000..4c894c5 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/shared/index.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/shared/blob.worker.ts", "../../../../src/workers/shared/data.ts", "../../../../src/workers/shared/constants.ts", "../../../../src/workers/shared/keyvalue.worker.ts", "../../../../src/workers/shared/sql.worker.ts", "../../../../src/workers/shared/matcher.ts", "../../../../src/workers/shared/object.worker.ts", "../../../../src/workers/shared/router.worker.ts", "../../../../src/workers/shared/timers.worker.ts", "../../../../src/workers/shared/types.ts", "../../../../src/workers/shared/range.ts", "../../../../src/workers/shared/sync.ts"], + "mappings": ";AAAA,OAAO,YAAY;AACnB,SAAS,UAAAA,eAAc;;;ACDvB,SAAS,cAAc;AAEhB,SAAS,aAAa,MAAoC;AAChE,SAAO,KAAK,OAAO;AAAA,IAClB,KAAK;AAAA,IACL,KAAK,aAAa,KAAK;AAAA,EACxB;AACD;AAEO,SAAS,aAAa,OAAuB;AACnD,SAAO,OAAO,KAAK,OAAO,MAAM,EAAE,SAAS,QAAQ;AACpD;AACO,SAAS,aAAa,SAAyB;AACrD,SAAO,OAAO,KAAK,SAAS,QAAQ,EAAE,SAAS,MAAM;AACtD;AAiBA,IAAM,YAAY,4BACZ,gBAAgB,qCAChB,wBAAwB,iDACxB,gBAAgB,YAChB,iBAAiB;AAEvB,SAAS,eAAe,OAAe,IAAY,IAAY,IAAY;AAC1E,SAAO,GAAG,EAAE,GAAG,GAAG,SAAS,GAAG,QAAQ,GAAG,CAAC,GAAG,EAAE;AAChD;AAEA,SAAS,sBAAsB,OAAe;AAC7C,SAAO,GAAG,SAAS,MAAM,QAAQ,GAAG;AACrC;AAEO,SAAS,aAAa,QAAwB;AACpD,SAAO,OACL,QAAQ,WAAW,cAAc,EACjC,QAAQ,WAAW,cAAc,EACjC,QAAQ,eAAe,GAAG,EAC1B,QAAQ,uBAAuB,GAAG,EAClC,QAAQ,eAAe,qBAAqB,EAC5C,QAAQ,gBAAgB,qBAAqB,EAC7C,UAAU,GAAG,GAAG;AACnB;;;ADjDA,IAAM,UAAU,IAAI,YAAY;AAEhC,eAAsB,WACrB,QACA,c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M,IAAI;AAAA,SACtB;AACN,WAAK,SAAS;AACd,UAAI;AACJ,cAAQ,UAAU,KAAK,WAAW,MAAM,OAAO,SAAW,SAAQ;AAAA,IACnE;AAAA,EACD;AAAA,EAEA,IAAI,aAAsB;AACzB,WAAO,KAAK,aAAa,SAAS;AAAA,EACnC;AAAA,EAEA,MAAM,QAAW,SAAyC;AACzD,QAAM,mBAAmB,KAAK,KAAK;AACnC,IAAI,4BAA4B,WAAS,MAAM;AAC/C,QAAI;AACH,UAAM,YAAY,QAAQ;AAC1B,aAAI,qBAAqB,UAAgB,MAAM,YACxC;AAAA,IACR,UAAE;AACD,WAAK,OAAO;AAAA,IACb;AAAA,EACD;AAAA,EAEA,MAAM,UAAyB;AAC9B,QAAI,OAAK,aAAa,WAAW,KAAK,CAAC,KAAK;AAC5C,aAAO,IAAI,QAAQ,CAAC,YAAY,KAAK,WAAW,KAAK,OAAO,CAAC;AAAA,EAC9D;AACD,GAEa,YAAN,MAAgB;AAAA,EACd,UAAU;AAAA,EACV,eAA+B,CAAC;AAAA,EAExC,MAAY;AACX,SAAK;AAAA,EACN;AAAA,EAEA,OAAa;AAGZ,QAFAA,QAAO,KAAK,UAAU,CAAC,GACvB,KAAK,WACD,KAAK,YAAY,GAAG;AACvB,UAAI;AACJ,cAAQ,UAAU,KAAK,aAAa,MAAM,OAAO,SAAW,SAAQ;AAAA,IACrE;AAAA,EACD;AAAA,EAEA,OAAsB;AACrB,WAAI,KAAK,YAAY,IAAU,QAAQ,QAAQ,IACxC,IAAI,QAAQ,CAAC,YAAY,KAAK,aAAa,KAAK,OAAO,CAAC;AAAA,EAChE;AACD;", + "names": ["Buffer", "writer", "Buffer", "LogLevel", "assert", "assert", "assert", "assert", "assert", "assert", "assert"] +} diff --git a/node_modules/miniflare/dist/src/workers/shared/object-entry.worker.js b/node_modules/miniflare/dist/src/workers/shared/object-entry.worker.js new file mode 100644 index 0000000..824eed7 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/shared/object-entry.worker.js @@ -0,0 +1,21 @@ +// src/workers/shared/constants.ts +var SharedBindings = { + TEXT_NAMESPACE: "MINIFLARE_NAMESPACE", + DURABLE_OBJECT_NAMESPACE_OBJECT: "MINIFLARE_OBJECT", + MAYBE_SERVICE_BLOBS: "MINIFLARE_BLOBS", + MAYBE_SERVICE_LOOPBACK: "MINIFLARE_LOOPBACK", + MAYBE_JSON_ENABLE_CONTROL_ENDPOINTS: "MINIFLARE_ENABLE_CONTROL_ENDPOINTS", + MAYBE_JSON_ENABLE_STICKY_BLOBS: "MINIFLARE_STICKY_BLOBS" +}; + +// src/workers/shared/object-entry.worker.ts +var object_entry_worker_default = { + async fetch(request, env) { + let name = env[SharedBindings.TEXT_NAMESPACE], objectNamespace = env[SharedBindings.DURABLE_OBJECT_NAMESPACE_OBJECT], id = objectNamespace.idFromName(name), stub = objectNamespace.get(id), cf = { miniflare: { name } }; + return await stub.fetch(request, { cf }); + } +}; +export { + object_entry_worker_default as default +}; +//# sourceMappingURL=object-entry.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/shared/object-entry.worker.js.map b/node_modules/miniflare/dist/src/workers/shared/object-entry.worker.js.map new file mode 100644 index 0000000..45d138b --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/shared/object-entry.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/shared/constants.ts", "../../../../src/workers/shared/object-entry.worker.ts"], + "mappings": ";AAIO,IAAM,iBAAiB;AAAA,EAC7B,gBAAgB;AAAA,EAChB,iCAAiC;AAAA,EACjC,qBAAqB;AAAA,EACrB,wBAAwB;AAAA,EACxB,qCAAqC;AAAA,EACrC,gCAAgC;AACjC;;;ACHA,IAAO,8BAA8B;AAAA,EACpC,MAAM,MAAM,SAAS,KAAK;AACzB,QAAM,OAAO,IAAI,eAAe,cAAc,GACxC,kBAAkB,IAAI,eAAe,+BAA+B,GACpE,KAAK,gBAAgB,WAAW,IAAI,GACpC,OAAO,gBAAgB,IAAI,EAAE,GAC7B,KAA+B,EAAE,WAAW,EAAE,KAAK,EAAE;AAC3D,WAAO,MAAM,KAAK,MAAM,SAAS,EAAE,GAAkC,CAAC;AAAA,EACvE;AACD;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/shared/zod.worker.js b/node_modules/miniflare/dist/src/workers/shared/zod.worker.js new file mode 100644 index 0000000..3386804 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/shared/zod.worker.js @@ -0,0 +1,2715 @@ +// src/workers/shared/zod.worker.ts +import { Buffer } from "node-internal:internal_buffer"; + +// ../../node_modules/.pnpm/zod@3.22.3/node_modules/zod/lib/index.mjs +var util; +(function(util2) { + util2.assertEqual = (val) => val; + function assertIs(_arg) { + } + util2.assertIs = assertIs; + function assertNever(_x) { + throw new Error(); + } + util2.assertNever = assertNever, util2.arrayToEnum = (items) => { + let obj = {}; + for (let item of items) + obj[item] = item; + return obj; + }, util2.getValidEnumValues = (obj) => { + let validKeys = util2.objectKeys(obj).filter((k) => typeof obj[obj[k]] != "number"), filtered = {}; + for (let k of validKeys) + filtered[k] = obj[k]; + return util2.objectValues(filtered); + }, util2.objectValues = (obj) => util2.objectKeys(obj).map(function(e) { + return obj[e]; + }), util2.objectKeys = typeof Object.keys == "function" ? (obj) => Object.keys(obj) : (object) => { + let keys = []; + for (let key in object) + Object.prototype.hasOwnProperty.call(object, key) && keys.push(key); + return keys; + }, util2.find = (arr, checker) => { + for (let item of arr) + if (checker(item)) + return item; + }, util2.isInteger = typeof Number.isInteger == "function" ? (val) => Number.isInteger(val) : (val) => typeof val == "number" && isFinite(val) && Math.floor(val) === val; + function joinValues(array, separator = " | ") { + return array.map((val) => typeof val == "string" ? `'${val}'` : val).join(separator); + } + util2.joinValues = joinValues, util2.jsonStringifyReplacer = (_, value) => typeof value == "bigint" ? value.toString() : value; +})(util || (util = {})); +var objectUtil; +(function(objectUtil2) { + objectUtil2.mergeShapes = (first, second) => ({ + ...first, + ...second + // second overwrites first + }); +})(objectUtil || (objectUtil = {})); +var ZodParsedType = util.arrayToEnum([ + "string", + "nan", + "number", + "integer", + "float", + "boolean", + "date", + "bigint", + "symbol", + "function", + "undefined", + "null", + "array", + "object", + "unknown", + "promise", + "void", + "never", + "map", + "set" +]), getParsedType = (data) => { + switch (typeof data) { + case "undefined": + return ZodParsedType.undefined; + case "string": + return ZodParsedType.string; + case "number": + return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number; + case "boolean": + return ZodParsedType.boolean; + case "function": + return ZodParsedType.function; + case "bigint": + return ZodParsedType.bigint; + case "symbol": + return ZodParsedType.symbol; + case "object": + return Array.isArray(data) ? ZodParsedType.array : data === null ? ZodParsedType.null : data.then && typeof data.then == "function" && data.catch && typeof data.catch == "function" ? ZodParsedType.promise : typeof Map < "u" && data instanceof Map ? ZodParsedType.map : typeof Set < "u" && data instanceof Set ? ZodParsedType.set : typeof Date < "u" && data instanceof Date ? ZodParsedType.date : ZodParsedType.object; + default: + return ZodParsedType.unknown; + } +}, ZodIssueCode = util.arrayToEnum([ + "invalid_type", + "invalid_literal", + "custom", + "invalid_union", + "invalid_union_discriminator", + "invalid_enum_value", + "unrecognized_keys", + "invalid_arguments", + "invalid_return_type", + "invalid_date", + "invalid_string", + "too_small", + "too_big", + "invalid_intersection_types", + "not_multiple_of", + "not_finite" +]), quotelessJson = (obj) => JSON.stringify(obj, null, 2).replace(/"([^"]+)":/g, "$1:"), ZodError = class extends Error { + constructor(issues) { + super(), this.issues = [], this.addIssue = (sub) => { + this.issues = [...this.issues, sub]; + }, this.addIssues = (subs = []) => { + this.issues = [...this.issues, ...subs]; + }; + let actualProto = new.target.prototype; + Object.setPrototypeOf ? Object.setPrototypeOf(this, actualProto) : this.__proto__ = actualProto, this.name = "ZodError", this.issues = issues; + } + get errors() { + return this.issues; + } + format(_mapper) { + let mapper = _mapper || function(issue) { + return issue.message; + }, fieldErrors = { _errors: [] }, processError = (error) => { + for (let issue of error.issues) + if (issue.code === "invalid_union") + issue.unionErrors.map(processError); + else if (issue.code === "invalid_return_type") + processError(issue.returnTypeError); + else if (issue.code === "invalid_arguments") + processError(issue.argumentsError); + else if (issue.path.length === 0) + fieldErrors._errors.push(mapper(issue)); + else { + let curr = fieldErrors, i = 0; + for (; i < issue.path.length; ) { + let el = issue.path[i]; + i === issue.path.length - 1 ? (curr[el] = curr[el] || { _errors: [] }, curr[el]._errors.push(mapper(issue))) : curr[el] = curr[el] || { _errors: [] }, curr = curr[el], i++; + } + } + }; + return processError(this), fieldErrors; + } + toString() { + return this.message; + } + get message() { + return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2); + } + get isEmpty() { + return this.issues.length === 0; + } + flatten(mapper = (issue) => issue.message) { + let fieldErrors = {}, formErrors = []; + for (let sub of this.issues) + sub.path.length > 0 ? (fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [], fieldErrors[sub.path[0]].push(mapper(sub))) : formErrors.push(mapper(sub)); + return { formErrors, fieldErrors }; + } + get formErrors() { + return this.flatten(); + } +}; +ZodError.create = (issues) => new ZodError(issues); +var errorMap = (issue, _ctx) => { + let message; + switch (issue.code) { + case ZodIssueCode.invalid_type: + issue.received === ZodParsedType.undefined ? message = "Required" : message = `Expected ${issue.expected}, received ${issue.received}`; + break; + case ZodIssueCode.invalid_literal: + message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`; + break; + case ZodIssueCode.unrecognized_keys: + message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, ", ")}`; + break; + case ZodIssueCode.invalid_union: + message = "Invalid input"; + break; + case ZodIssueCode.invalid_union_discriminator: + message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`; + break; + case ZodIssueCode.invalid_enum_value: + message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`; + break; + case ZodIssueCode.invalid_arguments: + message = "Invalid function arguments"; + break; + case ZodIssueCode.invalid_return_type: + message = "Invalid function return type"; + break; + case ZodIssueCode.invalid_date: + message = "Invalid date"; + break; + case ZodIssueCode.invalid_string: + typeof issue.validation == "object" ? "includes" in issue.validation ? (message = `Invalid input: must include "${issue.validation.includes}"`, typeof issue.validation.position == "number" && (message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`)) : "startsWith" in issue.validation ? message = `Invalid input: must start with "${issue.validation.startsWith}"` : "endsWith" in issue.validation ? message = `Invalid input: must end with "${issue.validation.endsWith}"` : util.assertNever(issue.validation) : issue.validation !== "regex" ? message = `Invalid ${issue.validation}` : message = "Invalid"; + break; + case ZodIssueCode.too_small: + issue.type === "array" ? message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? "at least" : "more than"} ${issue.minimum} element(s)` : issue.type === "string" ? message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? "at least" : "over"} ${issue.minimum} character(s)` : issue.type === "number" ? message = `Number must be ${issue.exact ? "exactly equal to " : issue.inclusive ? "greater than or equal to " : "greater than "}${issue.minimum}` : issue.type === "date" ? message = `Date must be ${issue.exact ? "exactly equal to " : issue.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(issue.minimum))}` : message = "Invalid input"; + break; + case ZodIssueCode.too_big: + issue.type === "array" ? message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? "at most" : "less than"} ${issue.maximum} element(s)` : issue.type === "string" ? message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? "at most" : "under"} ${issue.maximum} character(s)` : issue.type === "number" ? message = `Number must be ${issue.exact ? "exactly" : issue.inclusive ? "less than or equal to" : "less than"} ${issue.maximum}` : issue.type === "bigint" ? message = `BigInt must be ${issue.exact ? "exactly" : issue.inclusive ? "less than or equal to" : "less than"} ${issue.maximum}` : issue.type === "date" ? message = `Date must be ${issue.exact ? "exactly" : issue.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(issue.maximum))}` : message = "Invalid input"; + break; + case ZodIssueCode.custom: + message = "Invalid input"; + break; + case ZodIssueCode.invalid_intersection_types: + message = "Intersection results could not be merged"; + break; + case ZodIssueCode.not_multiple_of: + message = `Number must be a multiple of ${issue.multipleOf}`; + break; + case ZodIssueCode.not_finite: + message = "Number must be finite"; + break; + default: + message = _ctx.defaultError, util.assertNever(issue); + } + return { message }; +}, overrideErrorMap = errorMap; +function setErrorMap(map) { + overrideErrorMap = map; +} +function getErrorMap() { + return overrideErrorMap; +} +var makeIssue = (params) => { + let { data, path, errorMaps, issueData } = params, fullPath = [...path, ...issueData.path || []], fullIssue = { + ...issueData, + path: fullPath + }, errorMessage = "", maps = errorMaps.filter((m) => !!m).slice().reverse(); + for (let map of maps) + errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message; + return { + ...issueData, + path: fullPath, + message: issueData.message || errorMessage + }; +}, EMPTY_PATH = []; +function addIssueToContext(ctx, issueData) { + let issue = makeIssue({ + issueData, + data: ctx.data, + path: ctx.path, + errorMaps: [ + ctx.common.contextualErrorMap, + ctx.schemaErrorMap, + getErrorMap(), + errorMap + // then global default map + ].filter((x) => !!x) + }); + ctx.common.issues.push(issue); +} +var ParseStatus = class _ParseStatus { + constructor() { + this.value = "valid"; + } + dirty() { + this.value === "valid" && (this.value = "dirty"); + } + abort() { + this.value !== "aborted" && (this.value = "aborted"); + } + static mergeArray(status, results) { + let arrayValue = []; + for (let s of results) { + if (s.status === "aborted") + return INVALID; + s.status === "dirty" && status.dirty(), arrayValue.push(s.value); + } + return { status: status.value, value: arrayValue }; + } + static async mergeObjectAsync(status, pairs) { + let syncPairs = []; + for (let pair of pairs) + syncPairs.push({ + key: await pair.key, + value: await pair.value + }); + return _ParseStatus.mergeObjectSync(status, syncPairs); + } + static mergeObjectSync(status, pairs) { + let finalObject = {}; + for (let pair of pairs) { + let { key, value } = pair; + if (key.status === "aborted" || value.status === "aborted") + return INVALID; + key.status === "dirty" && status.dirty(), value.status === "dirty" && status.dirty(), key.value !== "__proto__" && (typeof value.value < "u" || pair.alwaysSet) && (finalObject[key.value] = value.value); + } + return { status: status.value, value: finalObject }; + } +}, INVALID = Object.freeze({ + status: "aborted" +}), DIRTY = (value) => ({ status: "dirty", value }), OK = (value) => ({ status: "valid", value }), isAborted = (x) => x.status === "aborted", isDirty = (x) => x.status === "dirty", isValid = (x) => x.status === "valid", isAsync = (x) => typeof Promise < "u" && x instanceof Promise, errorUtil; +(function(errorUtil2) { + errorUtil2.errToObj = (message) => typeof message == "string" ? { message } : message || {}, errorUtil2.toString = (message) => typeof message == "string" ? message : message?.message; +})(errorUtil || (errorUtil = {})); +var ParseInputLazyPath = class { + constructor(parent, value, path, key) { + this._cachedPath = [], this.parent = parent, this.data = value, this._path = path, this._key = key; + } + get path() { + return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath; + } +}, handleResult = (ctx, result) => { + if (isValid(result)) + return { success: !0, data: result.value }; + if (!ctx.common.issues.length) + throw new Error("Validation failed but no issues detected."); + return { + success: !1, + get error() { + if (this._error) + return this._error; + let error = new ZodError(ctx.common.issues); + return this._error = error, this._error; + } + }; +}; +function processCreateParams(params) { + if (!params) + return {}; + let { errorMap: errorMap2, invalid_type_error, required_error, description } = params; + if (errorMap2 && (invalid_type_error || required_error)) + throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); + return errorMap2 ? { errorMap: errorMap2, description } : { errorMap: (iss, ctx) => iss.code !== "invalid_type" ? { message: ctx.defaultError } : typeof ctx.data > "u" ? { message: required_error ?? ctx.defaultError } : { message: invalid_type_error ?? ctx.defaultError }, description }; +} +var ZodType = class { + constructor(def) { + this.spa = this.safeParseAsync, this._def = def, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync = this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(this), this.brand = this.brand.bind(this), this.default = this.default.bind(this), this.catch = this.catch.bind(this), this.describe = this.describe.bind(this), this.pipe = this.pipe.bind(this), this.readonly = this.readonly.bind(this), this.isNullable = this.isNullable.bind(this), this.isOptional = this.isOptional.bind(this); + } + get description() { + return this._def.description; + } + _getType(input) { + return getParsedType(input.data); + } + _getOrReturnCtx(input, ctx) { + return ctx || { + common: input.parent.common, + data: input.data, + parsedType: getParsedType(input.data), + schemaErrorMap: this._def.errorMap, + path: input.path, + parent: input.parent + }; + } + _processInputParams(input) { + return { + status: new ParseStatus(), + ctx: { + common: input.parent.common, + data: input.data, + parsedType: getParsedType(input.data), + schemaErrorMap: this._def.errorMap, + path: input.path, + parent: input.parent + } + }; + } + _parseSync(input) { + let result = this._parse(input); + if (isAsync(result)) + throw new Error("Synchronous parse encountered promise."); + return result; + } + _parseAsync(input) { + let result = this._parse(input); + return Promise.resolve(result); + } + parse(data, params) { + let result = this.safeParse(data, params); + if (result.success) + return result.data; + throw result.error; + } + safeParse(data, params) { + var _a; + let ctx = { + common: { + issues: [], + async: (_a = params?.async) !== null && _a !== void 0 ? _a : !1, + contextualErrorMap: params?.errorMap + }, + path: params?.path || [], + schemaErrorMap: this._def.errorMap, + parent: null, + data, + parsedType: getParsedType(data) + }, result = this._parseSync({ data, path: ctx.path, parent: ctx }); + return handleResult(ctx, result); + } + async parseAsync(data, params) { + let result = await this.safeParseAsync(data, params); + if (result.success) + return result.data; + throw result.error; + } + async safeParseAsync(data, params) { + let ctx = { + common: { + issues: [], + contextualErrorMap: params?.errorMap, + async: !0 + }, + path: params?.path || [], + schemaErrorMap: this._def.errorMap, + parent: null, + data, + parsedType: getParsedType(data) + }, maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx }), result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult)); + return handleResult(ctx, result); + } + refine(check, message) { + let getIssueProperties = (val) => typeof message == "string" || typeof message > "u" ? { message } : typeof message == "function" ? message(val) : message; + return this._refinement((val, ctx) => { + let result = check(val), setError = () => ctx.addIssue({ + code: ZodIssueCode.custom, + ...getIssueProperties(val) + }); + return typeof Promise < "u" && result instanceof Promise ? result.then((data) => data ? !0 : (setError(), !1)) : result ? !0 : (setError(), !1); + }); + } + refinement(check, refinementData) { + return this._refinement((val, ctx) => check(val) ? !0 : (ctx.addIssue(typeof refinementData == "function" ? refinementData(val, ctx) : refinementData), !1)); + } + _refinement(refinement) { + return new ZodEffects({ + schema: this, + typeName: ZodFirstPartyTypeKind.ZodEffects, + effect: { type: "refinement", refinement } + }); + } + superRefine(refinement) { + return this._refinement(refinement); + } + optional() { + return ZodOptional.create(this, this._def); + } + nullable() { + return ZodNullable.create(this, this._def); + } + nullish() { + return this.nullable().optional(); + } + array() { + return ZodArray.create(this, this._def); + } + promise() { + return ZodPromise.create(this, this._def); + } + or(option) { + return ZodUnion.create([this, option], this._def); + } + and(incoming) { + return ZodIntersection.create(this, incoming, this._def); + } + transform(transform) { + return new ZodEffects({ + ...processCreateParams(this._def), + schema: this, + typeName: ZodFirstPartyTypeKind.ZodEffects, + effect: { type: "transform", transform } + }); + } + default(def) { + let defaultValueFunc = typeof def == "function" ? def : () => def; + return new ZodDefault({ + ...processCreateParams(this._def), + innerType: this, + defaultValue: defaultValueFunc, + typeName: ZodFirstPartyTypeKind.ZodDefault + }); + } + brand() { + return new ZodBranded({ + typeName: ZodFirstPartyTypeKind.ZodBranded, + type: this, + ...processCreateParams(this._def) + }); + } + catch(def) { + let catchValueFunc = typeof def == "function" ? def : () => def; + return new ZodCatch({ + ...processCreateParams(this._def), + innerType: this, + catchValue: catchValueFunc, + typeName: ZodFirstPartyTypeKind.ZodCatch + }); + } + describe(description) { + let This = this.constructor; + return new This({ + ...this._def, + description + }); + } + pipe(target) { + return ZodPipeline.create(this, target); + } + readonly() { + return ZodReadonly.create(this); + } + isOptional() { + return this.safeParse(void 0).success; + } + isNullable() { + return this.safeParse(null).success; + } +}, cuidRegex = /^c[^\s-]{8,}$/i, cuid2Regex = /^[a-z][a-z0-9]*$/, ulidRegex = /[0-9A-HJKMNP-TV-Z]{26}/, uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, emojiRegex = /^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u, ipv4Regex = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/, ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, datetimeRegex = (args) => args.precision ? args.offset ? new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`) : new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}Z$`) : args.precision === 0 ? args.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$") : args.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"); +function isValidIP(ip, version) { + return !!((version === "v4" || !version) && ipv4Regex.test(ip) || (version === "v6" || !version) && ipv6Regex.test(ip)); +} +var ZodString = class _ZodString extends ZodType { + constructor() { + super(...arguments), this._regex = (regex, validation, message) => this.refinement((data) => regex.test(data), { + validation, + code: ZodIssueCode.invalid_string, + ...errorUtil.errToObj(message) + }), this.nonempty = (message) => this.min(1, errorUtil.errToObj(message)), this.trim = () => new _ZodString({ + ...this._def, + checks: [...this._def.checks, { kind: "trim" }] + }), this.toLowerCase = () => new _ZodString({ + ...this._def, + checks: [...this._def.checks, { kind: "toLowerCase" }] + }), this.toUpperCase = () => new _ZodString({ + ...this._def, + checks: [...this._def.checks, { kind: "toUpperCase" }] + }); + } + _parse(input) { + if (this._def.coerce && (input.data = String(input.data)), this._getType(input) !== ZodParsedType.string) { + let ctx2 = this._getOrReturnCtx(input); + return addIssueToContext( + ctx2, + { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.string, + received: ctx2.parsedType + } + // + ), INVALID; + } + let status = new ParseStatus(), ctx; + for (let check of this._def.checks) + if (check.kind === "min") + input.data.length < check.value && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + minimum: check.value, + type: "string", + inclusive: !0, + exact: !1, + message: check.message + }), status.dirty()); + else if (check.kind === "max") + input.data.length > check.value && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + maximum: check.value, + type: "string", + inclusive: !0, + exact: !1, + message: check.message + }), status.dirty()); + else if (check.kind === "length") { + let tooBig = input.data.length > check.value, tooSmall = input.data.length < check.value; + (tooBig || tooSmall) && (ctx = this._getOrReturnCtx(input, ctx), tooBig ? addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + maximum: check.value, + type: "string", + inclusive: !0, + exact: !0, + message: check.message + }) : tooSmall && addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + minimum: check.value, + type: "string", + inclusive: !0, + exact: !0, + message: check.message + }), status.dirty()); + } else if (check.kind === "email") + emailRegex.test(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + validation: "email", + code: ZodIssueCode.invalid_string, + message: check.message + }), status.dirty()); + else if (check.kind === "emoji") + emojiRegex.test(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + validation: "emoji", + code: ZodIssueCode.invalid_string, + message: check.message + }), status.dirty()); + else if (check.kind === "uuid") + uuidRegex.test(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + validation: "uuid", + code: ZodIssueCode.invalid_string, + message: check.message + }), status.dirty()); + else if (check.kind === "cuid") + cuidRegex.test(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + validation: "cuid", + code: ZodIssueCode.invalid_string, + message: check.message + }), status.dirty()); + else if (check.kind === "cuid2") + cuid2Regex.test(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + validation: "cuid2", + code: ZodIssueCode.invalid_string, + message: check.message + }), status.dirty()); + else if (check.kind === "ulid") + ulidRegex.test(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + validation: "ulid", + code: ZodIssueCode.invalid_string, + message: check.message + }), status.dirty()); + else if (check.kind === "url") + try { + new URL(input.data); + } catch { + ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + validation: "url", + code: ZodIssueCode.invalid_string, + message: check.message + }), status.dirty(); + } + else check.kind === "regex" ? (check.regex.lastIndex = 0, check.regex.test(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + validation: "regex", + code: ZodIssueCode.invalid_string, + message: check.message + }), status.dirty())) : check.kind === "trim" ? input.data = input.data.trim() : check.kind === "includes" ? input.data.includes(check.value, check.position) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.invalid_string, + validation: { includes: check.value, position: check.position }, + message: check.message + }), status.dirty()) : check.kind === "toLowerCase" ? input.data = input.data.toLowerCase() : check.kind === "toUpperCase" ? input.data = input.data.toUpperCase() : check.kind === "startsWith" ? input.data.startsWith(check.value) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.invalid_string, + validation: { startsWith: check.value }, + message: check.message + }), status.dirty()) : check.kind === "endsWith" ? input.data.endsWith(check.value) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.invalid_string, + validation: { endsWith: check.value }, + message: check.message + }), status.dirty()) : check.kind === "datetime" ? datetimeRegex(check).test(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.invalid_string, + validation: "datetime", + message: check.message + }), status.dirty()) : check.kind === "ip" ? isValidIP(input.data, check.version) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + validation: "ip", + code: ZodIssueCode.invalid_string, + message: check.message + }), status.dirty()) : util.assertNever(check); + return { status: status.value, value: input.data }; + } + _addCheck(check) { + return new _ZodString({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + email(message) { + return this._addCheck({ kind: "email", ...errorUtil.errToObj(message) }); + } + url(message) { + return this._addCheck({ kind: "url", ...errorUtil.errToObj(message) }); + } + emoji(message) { + return this._addCheck({ kind: "emoji", ...errorUtil.errToObj(message) }); + } + uuid(message) { + return this._addCheck({ kind: "uuid", ...errorUtil.errToObj(message) }); + } + cuid(message) { + return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) }); + } + cuid2(message) { + return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message) }); + } + ulid(message) { + return this._addCheck({ kind: "ulid", ...errorUtil.errToObj(message) }); + } + ip(options) { + return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) }); + } + datetime(options) { + var _a; + return typeof options == "string" ? this._addCheck({ + kind: "datetime", + precision: null, + offset: !1, + message: options + }) : this._addCheck({ + kind: "datetime", + precision: typeof options?.precision > "u" ? null : options?.precision, + offset: (_a = options?.offset) !== null && _a !== void 0 ? _a : !1, + ...errorUtil.errToObj(options?.message) + }); + } + regex(regex, message) { + return this._addCheck({ + kind: "regex", + regex, + ...errorUtil.errToObj(message) + }); + } + includes(value, options) { + return this._addCheck({ + kind: "includes", + value, + position: options?.position, + ...errorUtil.errToObj(options?.message) + }); + } + startsWith(value, message) { + return this._addCheck({ + kind: "startsWith", + value, + ...errorUtil.errToObj(message) + }); + } + endsWith(value, message) { + return this._addCheck({ + kind: "endsWith", + value, + ...errorUtil.errToObj(message) + }); + } + min(minLength, message) { + return this._addCheck({ + kind: "min", + value: minLength, + ...errorUtil.errToObj(message) + }); + } + max(maxLength, message) { + return this._addCheck({ + kind: "max", + value: maxLength, + ...errorUtil.errToObj(message) + }); + } + length(len, message) { + return this._addCheck({ + kind: "length", + value: len, + ...errorUtil.errToObj(message) + }); + } + get isDatetime() { + return !!this._def.checks.find((ch) => ch.kind === "datetime"); + } + get isEmail() { + return !!this._def.checks.find((ch) => ch.kind === "email"); + } + get isURL() { + return !!this._def.checks.find((ch) => ch.kind === "url"); + } + get isEmoji() { + return !!this._def.checks.find((ch) => ch.kind === "emoji"); + } + get isUUID() { + return !!this._def.checks.find((ch) => ch.kind === "uuid"); + } + get isCUID() { + return !!this._def.checks.find((ch) => ch.kind === "cuid"); + } + get isCUID2() { + return !!this._def.checks.find((ch) => ch.kind === "cuid2"); + } + get isULID() { + return !!this._def.checks.find((ch) => ch.kind === "ulid"); + } + get isIP() { + return !!this._def.checks.find((ch) => ch.kind === "ip"); + } + get minLength() { + let min = null; + for (let ch of this._def.checks) + ch.kind === "min" && (min === null || ch.value > min) && (min = ch.value); + return min; + } + get maxLength() { + let max = null; + for (let ch of this._def.checks) + ch.kind === "max" && (max === null || ch.value < max) && (max = ch.value); + return max; + } +}; +ZodString.create = (params) => { + var _a; + return new ZodString({ + checks: [], + typeName: ZodFirstPartyTypeKind.ZodString, + coerce: (_a = params?.coerce) !== null && _a !== void 0 ? _a : !1, + ...processCreateParams(params) + }); +}; +function floatSafeRemainder(val, step) { + let valDecCount = (val.toString().split(".")[1] || "").length, stepDecCount = (step.toString().split(".")[1] || "").length, decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount, valInt = parseInt(val.toFixed(decCount).replace(".", "")), stepInt = parseInt(step.toFixed(decCount).replace(".", "")); + return valInt % stepInt / Math.pow(10, decCount); +} +var ZodNumber = class _ZodNumber extends ZodType { + constructor() { + super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf; + } + _parse(input) { + if (this._def.coerce && (input.data = Number(input.data)), this._getType(input) !== ZodParsedType.number) { + let ctx2 = this._getOrReturnCtx(input); + return addIssueToContext(ctx2, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.number, + received: ctx2.parsedType + }), INVALID; + } + let ctx, status = new ParseStatus(); + for (let check of this._def.checks) + check.kind === "int" ? util.isInteger(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: "integer", + received: "float", + message: check.message + }), status.dirty()) : check.kind === "min" ? (check.inclusive ? input.data < check.value : input.data <= check.value) && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + minimum: check.value, + type: "number", + inclusive: check.inclusive, + exact: !1, + message: check.message + }), status.dirty()) : check.kind === "max" ? (check.inclusive ? input.data > check.value : input.data >= check.value) && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + maximum: check.value, + type: "number", + inclusive: check.inclusive, + exact: !1, + message: check.message + }), status.dirty()) : check.kind === "multipleOf" ? floatSafeRemainder(input.data, check.value) !== 0 && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.not_multiple_of, + multipleOf: check.value, + message: check.message + }), status.dirty()) : check.kind === "finite" ? Number.isFinite(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.not_finite, + message: check.message + }), status.dirty()) : util.assertNever(check); + return { status: status.value, value: input.data }; + } + gte(value, message) { + return this.setLimit("min", value, !0, errorUtil.toString(message)); + } + gt(value, message) { + return this.setLimit("min", value, !1, errorUtil.toString(message)); + } + lte(value, message) { + return this.setLimit("max", value, !0, errorUtil.toString(message)); + } + lt(value, message) { + return this.setLimit("max", value, !1, errorUtil.toString(message)); + } + setLimit(kind, value, inclusive, message) { + return new _ZodNumber({ + ...this._def, + checks: [ + ...this._def.checks, + { + kind, + value, + inclusive, + message: errorUtil.toString(message) + } + ] + }); + } + _addCheck(check) { + return new _ZodNumber({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + int(message) { + return this._addCheck({ + kind: "int", + message: errorUtil.toString(message) + }); + } + positive(message) { + return this._addCheck({ + kind: "min", + value: 0, + inclusive: !1, + message: errorUtil.toString(message) + }); + } + negative(message) { + return this._addCheck({ + kind: "max", + value: 0, + inclusive: !1, + message: errorUtil.toString(message) + }); + } + nonpositive(message) { + return this._addCheck({ + kind: "max", + value: 0, + inclusive: !0, + message: errorUtil.toString(message) + }); + } + nonnegative(message) { + return this._addCheck({ + kind: "min", + value: 0, + inclusive: !0, + message: errorUtil.toString(message) + }); + } + multipleOf(value, message) { + return this._addCheck({ + kind: "multipleOf", + value, + message: errorUtil.toString(message) + }); + } + finite(message) { + return this._addCheck({ + kind: "finite", + message: errorUtil.toString(message) + }); + } + safe(message) { + return this._addCheck({ + kind: "min", + inclusive: !0, + value: Number.MIN_SAFE_INTEGER, + message: errorUtil.toString(message) + })._addCheck({ + kind: "max", + inclusive: !0, + value: Number.MAX_SAFE_INTEGER, + message: errorUtil.toString(message) + }); + } + get minValue() { + let min = null; + for (let ch of this._def.checks) + ch.kind === "min" && (min === null || ch.value > min) && (min = ch.value); + return min; + } + get maxValue() { + let max = null; + for (let ch of this._def.checks) + ch.kind === "max" && (max === null || ch.value < max) && (max = ch.value); + return max; + } + get isInt() { + return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value)); + } + get isFinite() { + let max = null, min = null; + for (let ch of this._def.checks) { + if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") + return !0; + ch.kind === "min" ? (min === null || ch.value > min) && (min = ch.value) : ch.kind === "max" && (max === null || ch.value < max) && (max = ch.value); + } + return Number.isFinite(min) && Number.isFinite(max); + } +}; +ZodNumber.create = (params) => new ZodNumber({ + checks: [], + typeName: ZodFirstPartyTypeKind.ZodNumber, + coerce: params?.coerce || !1, + ...processCreateParams(params) +}); +var ZodBigInt = class _ZodBigInt extends ZodType { + constructor() { + super(...arguments), this.min = this.gte, this.max = this.lte; + } + _parse(input) { + if (this._def.coerce && (input.data = BigInt(input.data)), this._getType(input) !== ZodParsedType.bigint) { + let ctx2 = this._getOrReturnCtx(input); + return addIssueToContext(ctx2, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.bigint, + received: ctx2.parsedType + }), INVALID; + } + let ctx, status = new ParseStatus(); + for (let check of this._def.checks) + check.kind === "min" ? (check.inclusive ? input.data < check.value : input.data <= check.value) && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + type: "bigint", + minimum: check.value, + inclusive: check.inclusive, + message: check.message + }), status.dirty()) : check.kind === "max" ? (check.inclusive ? input.data > check.value : input.data >= check.value) && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + type: "bigint", + maximum: check.value, + inclusive: check.inclusive, + message: check.message + }), status.dirty()) : check.kind === "multipleOf" ? input.data % check.value !== BigInt(0) && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.not_multiple_of, + multipleOf: check.value, + message: check.message + }), status.dirty()) : util.assertNever(check); + return { status: status.value, value: input.data }; + } + gte(value, message) { + return this.setLimit("min", value, !0, errorUtil.toString(message)); + } + gt(value, message) { + return this.setLimit("min", value, !1, errorUtil.toString(message)); + } + lte(value, message) { + return this.setLimit("max", value, !0, errorUtil.toString(message)); + } + lt(value, message) { + return this.setLimit("max", value, !1, errorUtil.toString(message)); + } + setLimit(kind, value, inclusive, message) { + return new _ZodBigInt({ + ...this._def, + checks: [ + ...this._def.checks, + { + kind, + value, + inclusive, + message: errorUtil.toString(message) + } + ] + }); + } + _addCheck(check) { + return new _ZodBigInt({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + positive(message) { + return this._addCheck({ + kind: "min", + value: BigInt(0), + inclusive: !1, + message: errorUtil.toString(message) + }); + } + negative(message) { + return this._addCheck({ + kind: "max", + value: BigInt(0), + inclusive: !1, + message: errorUtil.toString(message) + }); + } + nonpositive(message) { + return this._addCheck({ + kind: "max", + value: BigInt(0), + inclusive: !0, + message: errorUtil.toString(message) + }); + } + nonnegative(message) { + return this._addCheck({ + kind: "min", + value: BigInt(0), + inclusive: !0, + message: errorUtil.toString(message) + }); + } + multipleOf(value, message) { + return this._addCheck({ + kind: "multipleOf", + value, + message: errorUtil.toString(message) + }); + } + get minValue() { + let min = null; + for (let ch of this._def.checks) + ch.kind === "min" && (min === null || ch.value > min) && (min = ch.value); + return min; + } + get maxValue() { + let max = null; + for (let ch of this._def.checks) + ch.kind === "max" && (max === null || ch.value < max) && (max = ch.value); + return max; + } +}; +ZodBigInt.create = (params) => { + var _a; + return new ZodBigInt({ + checks: [], + typeName: ZodFirstPartyTypeKind.ZodBigInt, + coerce: (_a = params?.coerce) !== null && _a !== void 0 ? _a : !1, + ...processCreateParams(params) + }); +}; +var ZodBoolean = class extends ZodType { + _parse(input) { + if (this._def.coerce && (input.data = !!input.data), this._getType(input) !== ZodParsedType.boolean) { + let ctx = this._getOrReturnCtx(input); + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.boolean, + received: ctx.parsedType + }), INVALID; + } + return OK(input.data); + } +}; +ZodBoolean.create = (params) => new ZodBoolean({ + typeName: ZodFirstPartyTypeKind.ZodBoolean, + coerce: params?.coerce || !1, + ...processCreateParams(params) +}); +var ZodDate = class _ZodDate extends ZodType { + _parse(input) { + if (this._def.coerce && (input.data = new Date(input.data)), this._getType(input) !== ZodParsedType.date) { + let ctx2 = this._getOrReturnCtx(input); + return addIssueToContext(ctx2, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.date, + received: ctx2.parsedType + }), INVALID; + } + if (isNaN(input.data.getTime())) { + let ctx2 = this._getOrReturnCtx(input); + return addIssueToContext(ctx2, { + code: ZodIssueCode.invalid_date + }), INVALID; + } + let status = new ParseStatus(), ctx; + for (let check of this._def.checks) + check.kind === "min" ? input.data.getTime() < check.value && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + message: check.message, + inclusive: !0, + exact: !1, + minimum: check.value, + type: "date" + }), status.dirty()) : check.kind === "max" ? input.data.getTime() > check.value && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + message: check.message, + inclusive: !0, + exact: !1, + maximum: check.value, + type: "date" + }), status.dirty()) : util.assertNever(check); + return { + status: status.value, + value: new Date(input.data.getTime()) + }; + } + _addCheck(check) { + return new _ZodDate({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + min(minDate, message) { + return this._addCheck({ + kind: "min", + value: minDate.getTime(), + message: errorUtil.toString(message) + }); + } + max(maxDate, message) { + return this._addCheck({ + kind: "max", + value: maxDate.getTime(), + message: errorUtil.toString(message) + }); + } + get minDate() { + let min = null; + for (let ch of this._def.checks) + ch.kind === "min" && (min === null || ch.value > min) && (min = ch.value); + return min != null ? new Date(min) : null; + } + get maxDate() { + let max = null; + for (let ch of this._def.checks) + ch.kind === "max" && (max === null || ch.value < max) && (max = ch.value); + return max != null ? new Date(max) : null; + } +}; +ZodDate.create = (params) => new ZodDate({ + checks: [], + coerce: params?.coerce || !1, + typeName: ZodFirstPartyTypeKind.ZodDate, + ...processCreateParams(params) +}); +var ZodSymbol = class extends ZodType { + _parse(input) { + if (this._getType(input) !== ZodParsedType.symbol) { + let ctx = this._getOrReturnCtx(input); + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.symbol, + received: ctx.parsedType + }), INVALID; + } + return OK(input.data); + } +}; +ZodSymbol.create = (params) => new ZodSymbol({ + typeName: ZodFirstPartyTypeKind.ZodSymbol, + ...processCreateParams(params) +}); +var ZodUndefined = class extends ZodType { + _parse(input) { + if (this._getType(input) !== ZodParsedType.undefined) { + let ctx = this._getOrReturnCtx(input); + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.undefined, + received: ctx.parsedType + }), INVALID; + } + return OK(input.data); + } +}; +ZodUndefined.create = (params) => new ZodUndefined({ + typeName: ZodFirstPartyTypeKind.ZodUndefined, + ...processCreateParams(params) +}); +var ZodNull = class extends ZodType { + _parse(input) { + if (this._getType(input) !== ZodParsedType.null) { + let ctx = this._getOrReturnCtx(input); + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.null, + received: ctx.parsedType + }), INVALID; + } + return OK(input.data); + } +}; +ZodNull.create = (params) => new ZodNull({ + typeName: ZodFirstPartyTypeKind.ZodNull, + ...processCreateParams(params) +}); +var ZodAny = class extends ZodType { + constructor() { + super(...arguments), this._any = !0; + } + _parse(input) { + return OK(input.data); + } +}; +ZodAny.create = (params) => new ZodAny({ + typeName: ZodFirstPartyTypeKind.ZodAny, + ...processCreateParams(params) +}); +var ZodUnknown = class extends ZodType { + constructor() { + super(...arguments), this._unknown = !0; + } + _parse(input) { + return OK(input.data); + } +}; +ZodUnknown.create = (params) => new ZodUnknown({ + typeName: ZodFirstPartyTypeKind.ZodUnknown, + ...processCreateParams(params) +}); +var ZodNever = class extends ZodType { + _parse(input) { + let ctx = this._getOrReturnCtx(input); + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.never, + received: ctx.parsedType + }), INVALID; + } +}; +ZodNever.create = (params) => new ZodNever({ + typeName: ZodFirstPartyTypeKind.ZodNever, + ...processCreateParams(params) +}); +var ZodVoid = class extends ZodType { + _parse(input) { + if (this._getType(input) !== ZodParsedType.undefined) { + let ctx = this._getOrReturnCtx(input); + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.void, + received: ctx.parsedType + }), INVALID; + } + return OK(input.data); + } +}; +ZodVoid.create = (params) => new ZodVoid({ + typeName: ZodFirstPartyTypeKind.ZodVoid, + ...processCreateParams(params) +}); +var ZodArray = class _ZodArray extends ZodType { + _parse(input) { + let { ctx, status } = this._processInputParams(input), def = this._def; + if (ctx.parsedType !== ZodParsedType.array) + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.array, + received: ctx.parsedType + }), INVALID; + if (def.exactLength !== null) { + let tooBig = ctx.data.length > def.exactLength.value, tooSmall = ctx.data.length < def.exactLength.value; + (tooBig || tooSmall) && (addIssueToContext(ctx, { + code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small, + minimum: tooSmall ? def.exactLength.value : void 0, + maximum: tooBig ? def.exactLength.value : void 0, + type: "array", + inclusive: !0, + exact: !0, + message: def.exactLength.message + }), status.dirty()); + } + if (def.minLength !== null && ctx.data.length < def.minLength.value && (addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + minimum: def.minLength.value, + type: "array", + inclusive: !0, + exact: !1, + message: def.minLength.message + }), status.dirty()), def.maxLength !== null && ctx.data.length > def.maxLength.value && (addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + maximum: def.maxLength.value, + type: "array", + inclusive: !0, + exact: !1, + message: def.maxLength.message + }), status.dirty()), ctx.common.async) + return Promise.all([...ctx.data].map((item, i) => def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i)))).then((result2) => ParseStatus.mergeArray(status, result2)); + let result = [...ctx.data].map((item, i) => def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i))); + return ParseStatus.mergeArray(status, result); + } + get element() { + return this._def.type; + } + min(minLength, message) { + return new _ZodArray({ + ...this._def, + minLength: { value: minLength, message: errorUtil.toString(message) } + }); + } + max(maxLength, message) { + return new _ZodArray({ + ...this._def, + maxLength: { value: maxLength, message: errorUtil.toString(message) } + }); + } + length(len, message) { + return new _ZodArray({ + ...this._def, + exactLength: { value: len, message: errorUtil.toString(message) } + }); + } + nonempty(message) { + return this.min(1, message); + } +}; +ZodArray.create = (schema, params) => new ZodArray({ + type: schema, + minLength: null, + maxLength: null, + exactLength: null, + typeName: ZodFirstPartyTypeKind.ZodArray, + ...processCreateParams(params) +}); +function deepPartialify(schema) { + if (schema instanceof ZodObject) { + let newShape = {}; + for (let key in schema.shape) { + let fieldSchema = schema.shape[key]; + newShape[key] = ZodOptional.create(deepPartialify(fieldSchema)); + } + return new ZodObject({ + ...schema._def, + shape: () => newShape + }); + } else return schema instanceof ZodArray ? new ZodArray({ + ...schema._def, + type: deepPartialify(schema.element) + }) : schema instanceof ZodOptional ? ZodOptional.create(deepPartialify(schema.unwrap())) : schema instanceof ZodNullable ? ZodNullable.create(deepPartialify(schema.unwrap())) : schema instanceof ZodTuple ? ZodTuple.create(schema.items.map((item) => deepPartialify(item))) : schema; +} +var ZodObject = class _ZodObject extends ZodType { + constructor() { + super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend; + } + _getCached() { + if (this._cached !== null) + return this._cached; + let shape = this._def.shape(), keys = util.objectKeys(shape); + return this._cached = { shape, keys }; + } + _parse(input) { + if (this._getType(input) !== ZodParsedType.object) { + let ctx2 = this._getOrReturnCtx(input); + return addIssueToContext(ctx2, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.object, + received: ctx2.parsedType + }), INVALID; + } + let { status, ctx } = this._processInputParams(input), { shape, keys: shapeKeys } = this._getCached(), extraKeys = []; + if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === "strip")) + for (let key in ctx.data) + shapeKeys.includes(key) || extraKeys.push(key); + let pairs = []; + for (let key of shapeKeys) { + let keyValidator = shape[key], value = ctx.data[key]; + pairs.push({ + key: { status: "valid", value: key }, + value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)), + alwaysSet: key in ctx.data + }); + } + if (this._def.catchall instanceof ZodNever) { + let unknownKeys = this._def.unknownKeys; + if (unknownKeys === "passthrough") + for (let key of extraKeys) + pairs.push({ + key: { status: "valid", value: key }, + value: { status: "valid", value: ctx.data[key] } + }); + else if (unknownKeys === "strict") + extraKeys.length > 0 && (addIssueToContext(ctx, { + code: ZodIssueCode.unrecognized_keys, + keys: extraKeys + }), status.dirty()); + else if (unknownKeys !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value."); + } else { + let catchall = this._def.catchall; + for (let key of extraKeys) { + let value = ctx.data[key]; + pairs.push({ + key: { status: "valid", value: key }, + value: catchall._parse( + new ParseInputLazyPath(ctx, value, ctx.path, key) + //, ctx.child(key), value, getParsedType(value) + ), + alwaysSet: key in ctx.data + }); + } + } + return ctx.common.async ? Promise.resolve().then(async () => { + let syncPairs = []; + for (let pair of pairs) { + let key = await pair.key; + syncPairs.push({ + key, + value: await pair.value, + alwaysSet: pair.alwaysSet + }); + } + return syncPairs; + }).then((syncPairs) => ParseStatus.mergeObjectSync(status, syncPairs)) : ParseStatus.mergeObjectSync(status, pairs); + } + get shape() { + return this._def.shape(); + } + strict(message) { + return errorUtil.errToObj, new _ZodObject({ + ...this._def, + unknownKeys: "strict", + ...message !== void 0 ? { + errorMap: (issue, ctx) => { + var _a, _b, _c, _d; + let defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError; + return issue.code === "unrecognized_keys" ? { + message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError + } : { + message: defaultError + }; + } + } : {} + }); + } + strip() { + return new _ZodObject({ + ...this._def, + unknownKeys: "strip" + }); + } + passthrough() { + return new _ZodObject({ + ...this._def, + unknownKeys: "passthrough" + }); + } + // const AugmentFactory = + // (def: Def) => + // ( + // augmentation: Augmentation + // ): ZodObject< + // extendShape, Augmentation>, + // Def["unknownKeys"], + // Def["catchall"] + // > => { + // return new ZodObject({ + // ...def, + // shape: () => ({ + // ...def.shape(), + // ...augmentation, + // }), + // }) as any; + // }; + extend(augmentation) { + return new _ZodObject({ + ...this._def, + shape: () => ({ + ...this._def.shape(), + ...augmentation + }) + }); + } + /** + * Prior to zod@1.0.12 there was a bug in the + * inferred type of merged objects. Please + * upgrade if you are experiencing issues. + */ + merge(merging) { + return new _ZodObject({ + unknownKeys: merging._def.unknownKeys, + catchall: merging._def.catchall, + shape: () => ({ + ...this._def.shape(), + ...merging._def.shape() + }), + typeName: ZodFirstPartyTypeKind.ZodObject + }); + } + // merge< + // Incoming extends AnyZodObject, + // Augmentation extends Incoming["shape"], + // NewOutput extends { + // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation + // ? Augmentation[k]["_output"] + // : k extends keyof Output + // ? Output[k] + // : never; + // }, + // NewInput extends { + // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation + // ? Augmentation[k]["_input"] + // : k extends keyof Input + // ? Input[k] + // : never; + // } + // >( + // merging: Incoming + // ): ZodObject< + // extendShape>, + // Incoming["_def"]["unknownKeys"], + // Incoming["_def"]["catchall"], + // NewOutput, + // NewInput + // > { + // const merged: any = new ZodObject({ + // unknownKeys: merging._def.unknownKeys, + // catchall: merging._def.catchall, + // shape: () => + // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), + // typeName: ZodFirstPartyTypeKind.ZodObject, + // }) as any; + // return merged; + // } + setKey(key, schema) { + return this.augment({ [key]: schema }); + } + // merge( + // merging: Incoming + // ): //ZodObject = (merging) => { + // ZodObject< + // extendShape>, + // Incoming["_def"]["unknownKeys"], + // Incoming["_def"]["catchall"] + // > { + // // const mergedShape = objectUtil.mergeShapes( + // // this._def.shape(), + // // merging._def.shape() + // // ); + // const merged: any = new ZodObject({ + // unknownKeys: merging._def.unknownKeys, + // catchall: merging._def.catchall, + // shape: () => + // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), + // typeName: ZodFirstPartyTypeKind.ZodObject, + // }) as any; + // return merged; + // } + catchall(index) { + return new _ZodObject({ + ...this._def, + catchall: index + }); + } + pick(mask) { + let shape = {}; + return util.objectKeys(mask).forEach((key) => { + mask[key] && this.shape[key] && (shape[key] = this.shape[key]); + }), new _ZodObject({ + ...this._def, + shape: () => shape + }); + } + omit(mask) { + let shape = {}; + return util.objectKeys(this.shape).forEach((key) => { + mask[key] || (shape[key] = this.shape[key]); + }), new _ZodObject({ + ...this._def, + shape: () => shape + }); + } + /** + * @deprecated + */ + deepPartial() { + return deepPartialify(this); + } + partial(mask) { + let newShape = {}; + return util.objectKeys(this.shape).forEach((key) => { + let fieldSchema = this.shape[key]; + mask && !mask[key] ? newShape[key] = fieldSchema : newShape[key] = fieldSchema.optional(); + }), new _ZodObject({ + ...this._def, + shape: () => newShape + }); + } + required(mask) { + let newShape = {}; + return util.objectKeys(this.shape).forEach((key) => { + if (mask && !mask[key]) + newShape[key] = this.shape[key]; + else { + let newField = this.shape[key]; + for (; newField instanceof ZodOptional; ) + newField = newField._def.innerType; + newShape[key] = newField; + } + }), new _ZodObject({ + ...this._def, + shape: () => newShape + }); + } + keyof() { + return createZodEnum(util.objectKeys(this.shape)); + } +}; +ZodObject.create = (shape, params) => new ZodObject({ + shape: () => shape, + unknownKeys: "strip", + catchall: ZodNever.create(), + typeName: ZodFirstPartyTypeKind.ZodObject, + ...processCreateParams(params) +}); +ZodObject.strictCreate = (shape, params) => new ZodObject({ + shape: () => shape, + unknownKeys: "strict", + catchall: ZodNever.create(), + typeName: ZodFirstPartyTypeKind.ZodObject, + ...processCreateParams(params) +}); +ZodObject.lazycreate = (shape, params) => new ZodObject({ + shape, + unknownKeys: "strip", + catchall: ZodNever.create(), + typeName: ZodFirstPartyTypeKind.ZodObject, + ...processCreateParams(params) +}); +var ZodUnion = class extends ZodType { + _parse(input) { + let { ctx } = this._processInputParams(input), options = this._def.options; + function handleResults(results) { + for (let result of results) + if (result.result.status === "valid") + return result.result; + for (let result of results) + if (result.result.status === "dirty") + return ctx.common.issues.push(...result.ctx.common.issues), result.result; + let unionErrors = results.map((result) => new ZodError(result.ctx.common.issues)); + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_union, + unionErrors + }), INVALID; + } + if (ctx.common.async) + return Promise.all(options.map(async (option) => { + let childCtx = { + ...ctx, + common: { + ...ctx.common, + issues: [] + }, + parent: null + }; + return { + result: await option._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: childCtx + }), + ctx: childCtx + }; + })).then(handleResults); + { + let dirty, issues = []; + for (let option of options) { + let childCtx = { + ...ctx, + common: { + ...ctx.common, + issues: [] + }, + parent: null + }, result = option._parseSync({ + data: ctx.data, + path: ctx.path, + parent: childCtx + }); + if (result.status === "valid") + return result; + result.status === "dirty" && !dirty && (dirty = { result, ctx: childCtx }), childCtx.common.issues.length && issues.push(childCtx.common.issues); + } + if (dirty) + return ctx.common.issues.push(...dirty.ctx.common.issues), dirty.result; + let unionErrors = issues.map((issues2) => new ZodError(issues2)); + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_union, + unionErrors + }), INVALID; + } + } + get options() { + return this._def.options; + } +}; +ZodUnion.create = (types, params) => new ZodUnion({ + options: types, + typeName: ZodFirstPartyTypeKind.ZodUnion, + ...processCreateParams(params) +}); +var getDiscriminator = (type) => type instanceof ZodLazy ? getDiscriminator(type.schema) : type instanceof ZodEffects ? getDiscriminator(type.innerType()) : type instanceof ZodLiteral ? [type.value] : type instanceof ZodEnum ? type.options : type instanceof ZodNativeEnum ? Object.keys(type.enum) : type instanceof ZodDefault ? getDiscriminator(type._def.innerType) : type instanceof ZodUndefined ? [void 0] : type instanceof ZodNull ? [null] : null, ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType { + _parse(input) { + let { ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.object) + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.object, + received: ctx.parsedType + }), INVALID; + let discriminator = this.discriminator, discriminatorValue = ctx.data[discriminator], option = this.optionsMap.get(discriminatorValue); + return option ? ctx.common.async ? option._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }) : option._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }) : (addIssueToContext(ctx, { + code: ZodIssueCode.invalid_union_discriminator, + options: Array.from(this.optionsMap.keys()), + path: [discriminator] + }), INVALID); + } + get discriminator() { + return this._def.discriminator; + } + get options() { + return this._def.options; + } + get optionsMap() { + return this._def.optionsMap; + } + /** + * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor. + * However, it only allows a union of objects, all of which need to share a discriminator property. This property must + * have a different value for each object in the union. + * @param discriminator the name of the discriminator property + * @param types an array of object schemas + * @param params + */ + static create(discriminator, options, params) { + let optionsMap = /* @__PURE__ */ new Map(); + for (let type of options) { + let discriminatorValues = getDiscriminator(type.shape[discriminator]); + if (!discriminatorValues) + throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`); + for (let value of discriminatorValues) { + if (optionsMap.has(value)) + throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`); + optionsMap.set(value, type); + } + } + return new _ZodDiscriminatedUnion({ + typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion, + discriminator, + options, + optionsMap, + ...processCreateParams(params) + }); + } +}; +function mergeValues(a, b) { + let aType = getParsedType(a), bType = getParsedType(b); + if (a === b) + return { valid: !0, data: a }; + if (aType === ZodParsedType.object && bType === ZodParsedType.object) { + let bKeys = util.objectKeys(b), sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1), newObj = { ...a, ...b }; + for (let key of sharedKeys) { + let sharedValue = mergeValues(a[key], b[key]); + if (!sharedValue.valid) + return { valid: !1 }; + newObj[key] = sharedValue.data; + } + return { valid: !0, data: newObj }; + } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) { + if (a.length !== b.length) + return { valid: !1 }; + let newArray = []; + for (let index = 0; index < a.length; index++) { + let itemA = a[index], itemB = b[index], sharedValue = mergeValues(itemA, itemB); + if (!sharedValue.valid) + return { valid: !1 }; + newArray.push(sharedValue.data); + } + return { valid: !0, data: newArray }; + } else return aType === ZodParsedType.date && bType === ZodParsedType.date && +a == +b ? { valid: !0, data: a } : { valid: !1 }; +} +var ZodIntersection = class extends ZodType { + _parse(input) { + let { status, ctx } = this._processInputParams(input), handleParsed = (parsedLeft, parsedRight) => { + if (isAborted(parsedLeft) || isAborted(parsedRight)) + return INVALID; + let merged = mergeValues(parsedLeft.value, parsedRight.value); + return merged.valid ? ((isDirty(parsedLeft) || isDirty(parsedRight)) && status.dirty(), { status: status.value, value: merged.data }) : (addIssueToContext(ctx, { + code: ZodIssueCode.invalid_intersection_types + }), INVALID); + }; + return ctx.common.async ? Promise.all([ + this._def.left._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }), + this._def.right._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }) + ]).then(([left, right]) => handleParsed(left, right)) : handleParsed(this._def.left._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }), this._def.right._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + })); + } +}; +ZodIntersection.create = (left, right, params) => new ZodIntersection({ + left, + right, + typeName: ZodFirstPartyTypeKind.ZodIntersection, + ...processCreateParams(params) +}); +var ZodTuple = class _ZodTuple extends ZodType { + _parse(input) { + let { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.array) + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.array, + received: ctx.parsedType + }), INVALID; + if (ctx.data.length < this._def.items.length) + return addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + minimum: this._def.items.length, + inclusive: !0, + exact: !1, + type: "array" + }), INVALID; + !this._def.rest && ctx.data.length > this._def.items.length && (addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + maximum: this._def.items.length, + inclusive: !0, + exact: !1, + type: "array" + }), status.dirty()); + let items = [...ctx.data].map((item, itemIndex) => { + let schema = this._def.items[itemIndex] || this._def.rest; + return schema ? schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex)) : null; + }).filter((x) => !!x); + return ctx.common.async ? Promise.all(items).then((results) => ParseStatus.mergeArray(status, results)) : ParseStatus.mergeArray(status, items); + } + get items() { + return this._def.items; + } + rest(rest) { + return new _ZodTuple({ + ...this._def, + rest + }); + } +}; +ZodTuple.create = (schemas, params) => { + if (!Array.isArray(schemas)) + throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); + return new ZodTuple({ + items: schemas, + typeName: ZodFirstPartyTypeKind.ZodTuple, + rest: null, + ...processCreateParams(params) + }); +}; +var ZodRecord = class _ZodRecord extends ZodType { + get keySchema() { + return this._def.keyType; + } + get valueSchema() { + return this._def.valueType; + } + _parse(input) { + let { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.object) + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.object, + received: ctx.parsedType + }), INVALID; + let pairs = [], keyType = this._def.keyType, valueType = this._def.valueType; + for (let key in ctx.data) + pairs.push({ + key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)), + value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)) + }); + return ctx.common.async ? ParseStatus.mergeObjectAsync(status, pairs) : ParseStatus.mergeObjectSync(status, pairs); + } + get element() { + return this._def.valueType; + } + static create(first, second, third) { + return second instanceof ZodType ? new _ZodRecord({ + keyType: first, + valueType: second, + typeName: ZodFirstPartyTypeKind.ZodRecord, + ...processCreateParams(third) + }) : new _ZodRecord({ + keyType: ZodString.create(), + valueType: first, + typeName: ZodFirstPartyTypeKind.ZodRecord, + ...processCreateParams(second) + }); + } +}, ZodMap = class extends ZodType { + get keySchema() { + return this._def.keyType; + } + get valueSchema() { + return this._def.valueType; + } + _parse(input) { + let { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.map) + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.map, + received: ctx.parsedType + }), INVALID; + let keyType = this._def.keyType, valueType = this._def.valueType, pairs = [...ctx.data.entries()].map(([key, value], index) => ({ + key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, "key"])), + value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, "value"])) + })); + if (ctx.common.async) { + let finalMap = /* @__PURE__ */ new Map(); + return Promise.resolve().then(async () => { + for (let pair of pairs) { + let key = await pair.key, value = await pair.value; + if (key.status === "aborted" || value.status === "aborted") + return INVALID; + (key.status === "dirty" || value.status === "dirty") && status.dirty(), finalMap.set(key.value, value.value); + } + return { status: status.value, value: finalMap }; + }); + } else { + let finalMap = /* @__PURE__ */ new Map(); + for (let pair of pairs) { + let key = pair.key, value = pair.value; + if (key.status === "aborted" || value.status === "aborted") + return INVALID; + (key.status === "dirty" || value.status === "dirty") && status.dirty(), finalMap.set(key.value, value.value); + } + return { status: status.value, value: finalMap }; + } + } +}; +ZodMap.create = (keyType, valueType, params) => new ZodMap({ + valueType, + keyType, + typeName: ZodFirstPartyTypeKind.ZodMap, + ...processCreateParams(params) +}); +var ZodSet = class _ZodSet extends ZodType { + _parse(input) { + let { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.set) + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.set, + received: ctx.parsedType + }), INVALID; + let def = this._def; + def.minSize !== null && ctx.data.size < def.minSize.value && (addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + minimum: def.minSize.value, + type: "set", + inclusive: !0, + exact: !1, + message: def.minSize.message + }), status.dirty()), def.maxSize !== null && ctx.data.size > def.maxSize.value && (addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + maximum: def.maxSize.value, + type: "set", + inclusive: !0, + exact: !1, + message: def.maxSize.message + }), status.dirty()); + let valueType = this._def.valueType; + function finalizeSet(elements2) { + let parsedSet = /* @__PURE__ */ new Set(); + for (let element of elements2) { + if (element.status === "aborted") + return INVALID; + element.status === "dirty" && status.dirty(), parsedSet.add(element.value); + } + return { status: status.value, value: parsedSet }; + } + let elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i))); + return ctx.common.async ? Promise.all(elements).then((elements2) => finalizeSet(elements2)) : finalizeSet(elements); + } + min(minSize, message) { + return new _ZodSet({ + ...this._def, + minSize: { value: minSize, message: errorUtil.toString(message) } + }); + } + max(maxSize, message) { + return new _ZodSet({ + ...this._def, + maxSize: { value: maxSize, message: errorUtil.toString(message) } + }); + } + size(size, message) { + return this.min(size, message).max(size, message); + } + nonempty(message) { + return this.min(1, message); + } +}; +ZodSet.create = (valueType, params) => new ZodSet({ + valueType, + minSize: null, + maxSize: null, + typeName: ZodFirstPartyTypeKind.ZodSet, + ...processCreateParams(params) +}); +var ZodFunction = class _ZodFunction extends ZodType { + constructor() { + super(...arguments), this.validate = this.implement; + } + _parse(input) { + let { ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.function) + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.function, + received: ctx.parsedType + }), INVALID; + function makeArgsIssue(args, error) { + return makeIssue({ + data: args, + path: ctx.path, + errorMaps: [ + ctx.common.contextualErrorMap, + ctx.schemaErrorMap, + getErrorMap(), + errorMap + ].filter((x) => !!x), + issueData: { + code: ZodIssueCode.invalid_arguments, + argumentsError: error + } + }); + } + function makeReturnsIssue(returns, error) { + return makeIssue({ + data: returns, + path: ctx.path, + errorMaps: [ + ctx.common.contextualErrorMap, + ctx.schemaErrorMap, + getErrorMap(), + errorMap + ].filter((x) => !!x), + issueData: { + code: ZodIssueCode.invalid_return_type, + returnTypeError: error + } + }); + } + let params = { errorMap: ctx.common.contextualErrorMap }, fn = ctx.data; + if (this._def.returns instanceof ZodPromise) { + let me = this; + return OK(async function(...args) { + let error = new ZodError([]), parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => { + throw error.addIssue(makeArgsIssue(args, e)), error; + }), result = await Reflect.apply(fn, this, parsedArgs); + return await me._def.returns._def.type.parseAsync(result, params).catch((e) => { + throw error.addIssue(makeReturnsIssue(result, e)), error; + }); + }); + } else { + let me = this; + return OK(function(...args) { + let parsedArgs = me._def.args.safeParse(args, params); + if (!parsedArgs.success) + throw new ZodError([makeArgsIssue(args, parsedArgs.error)]); + let result = Reflect.apply(fn, this, parsedArgs.data), parsedReturns = me._def.returns.safeParse(result, params); + if (!parsedReturns.success) + throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]); + return parsedReturns.data; + }); + } + } + parameters() { + return this._def.args; + } + returnType() { + return this._def.returns; + } + args(...items) { + return new _ZodFunction({ + ...this._def, + args: ZodTuple.create(items).rest(ZodUnknown.create()) + }); + } + returns(returnType) { + return new _ZodFunction({ + ...this._def, + returns: returnType + }); + } + implement(func) { + return this.parse(func); + } + strictImplement(func) { + return this.parse(func); + } + static create(args, returns, params) { + return new _ZodFunction({ + args: args || ZodTuple.create([]).rest(ZodUnknown.create()), + returns: returns || ZodUnknown.create(), + typeName: ZodFirstPartyTypeKind.ZodFunction, + ...processCreateParams(params) + }); + } +}, ZodLazy = class extends ZodType { + get schema() { + return this._def.getter(); + } + _parse(input) { + let { ctx } = this._processInputParams(input); + return this._def.getter()._parse({ data: ctx.data, path: ctx.path, parent: ctx }); + } +}; +ZodLazy.create = (getter, params) => new ZodLazy({ + getter, + typeName: ZodFirstPartyTypeKind.ZodLazy, + ...processCreateParams(params) +}); +var ZodLiteral = class extends ZodType { + _parse(input) { + if (input.data !== this._def.value) { + let ctx = this._getOrReturnCtx(input); + return addIssueToContext(ctx, { + received: ctx.data, + code: ZodIssueCode.invalid_literal, + expected: this._def.value + }), INVALID; + } + return { status: "valid", value: input.data }; + } + get value() { + return this._def.value; + } +}; +ZodLiteral.create = (value, params) => new ZodLiteral({ + value, + typeName: ZodFirstPartyTypeKind.ZodLiteral, + ...processCreateParams(params) +}); +function createZodEnum(values, params) { + return new ZodEnum({ + values, + typeName: ZodFirstPartyTypeKind.ZodEnum, + ...processCreateParams(params) + }); +} +var ZodEnum = class _ZodEnum extends ZodType { + _parse(input) { + if (typeof input.data != "string") { + let ctx = this._getOrReturnCtx(input), expectedValues = this._def.values; + return addIssueToContext(ctx, { + expected: util.joinValues(expectedValues), + received: ctx.parsedType, + code: ZodIssueCode.invalid_type + }), INVALID; + } + if (this._def.values.indexOf(input.data) === -1) { + let ctx = this._getOrReturnCtx(input), expectedValues = this._def.values; + return addIssueToContext(ctx, { + received: ctx.data, + code: ZodIssueCode.invalid_enum_value, + options: expectedValues + }), INVALID; + } + return OK(input.data); + } + get options() { + return this._def.values; + } + get enum() { + let enumValues = {}; + for (let val of this._def.values) + enumValues[val] = val; + return enumValues; + } + get Values() { + let enumValues = {}; + for (let val of this._def.values) + enumValues[val] = val; + return enumValues; + } + get Enum() { + let enumValues = {}; + for (let val of this._def.values) + enumValues[val] = val; + return enumValues; + } + extract(values) { + return _ZodEnum.create(values); + } + exclude(values) { + return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt))); + } +}; +ZodEnum.create = createZodEnum; +var ZodNativeEnum = class extends ZodType { + _parse(input) { + let nativeEnumValues = util.getValidEnumValues(this._def.values), ctx = this._getOrReturnCtx(input); + if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) { + let expectedValues = util.objectValues(nativeEnumValues); + return addIssueToContext(ctx, { + expected: util.joinValues(expectedValues), + received: ctx.parsedType, + code: ZodIssueCode.invalid_type + }), INVALID; + } + if (nativeEnumValues.indexOf(input.data) === -1) { + let expectedValues = util.objectValues(nativeEnumValues); + return addIssueToContext(ctx, { + received: ctx.data, + code: ZodIssueCode.invalid_enum_value, + options: expectedValues + }), INVALID; + } + return OK(input.data); + } + get enum() { + return this._def.values; + } +}; +ZodNativeEnum.create = (values, params) => new ZodNativeEnum({ + values, + typeName: ZodFirstPartyTypeKind.ZodNativeEnum, + ...processCreateParams(params) +}); +var ZodPromise = class extends ZodType { + unwrap() { + return this._def.type; + } + _parse(input) { + let { ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === !1) + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.promise, + received: ctx.parsedType + }), INVALID; + let promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data); + return OK(promisified.then((data) => this._def.type.parseAsync(data, { + path: ctx.path, + errorMap: ctx.common.contextualErrorMap + }))); + } +}; +ZodPromise.create = (schema, params) => new ZodPromise({ + type: schema, + typeName: ZodFirstPartyTypeKind.ZodPromise, + ...processCreateParams(params) +}); +var ZodEffects = class extends ZodType { + innerType() { + return this._def.schema; + } + sourceType() { + return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects ? this._def.schema.sourceType() : this._def.schema; + } + _parse(input) { + let { status, ctx } = this._processInputParams(input), effect = this._def.effect || null, checkCtx = { + addIssue: (arg) => { + addIssueToContext(ctx, arg), arg.fatal ? status.abort() : status.dirty(); + }, + get path() { + return ctx.path; + } + }; + if (checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx), effect.type === "preprocess") { + let processed = effect.transform(ctx.data, checkCtx); + return ctx.common.issues.length ? { + status: "dirty", + value: ctx.data + } : ctx.common.async ? Promise.resolve(processed).then((processed2) => this._def.schema._parseAsync({ + data: processed2, + path: ctx.path, + parent: ctx + })) : this._def.schema._parseSync({ + data: processed, + path: ctx.path, + parent: ctx + }); + } + if (effect.type === "refinement") { + let executeRefinement = (acc) => { + let result = effect.refinement(acc, checkCtx); + if (ctx.common.async) + return Promise.resolve(result); + if (result instanceof Promise) + throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead."); + return acc; + }; + if (ctx.common.async === !1) { + let inner = this._def.schema._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + return inner.status === "aborted" ? INVALID : (inner.status === "dirty" && status.dirty(), executeRefinement(inner.value), { status: status.value, value: inner.value }); + } else + return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => inner.status === "aborted" ? INVALID : (inner.status === "dirty" && status.dirty(), executeRefinement(inner.value).then(() => ({ status: status.value, value: inner.value })))); + } + if (effect.type === "transform") + if (ctx.common.async === !1) { + let base = this._def.schema._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + if (!isValid(base)) + return base; + let result = effect.transform(base.value, checkCtx); + if (result instanceof Promise) + throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead."); + return { status: status.value, value: result }; + } else + return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => isValid(base) ? Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result })) : base); + util.assertNever(effect); + } +}; +ZodEffects.create = (schema, effect, params) => new ZodEffects({ + schema, + typeName: ZodFirstPartyTypeKind.ZodEffects, + effect, + ...processCreateParams(params) +}); +ZodEffects.createWithPreprocess = (preprocess, schema, params) => new ZodEffects({ + schema, + effect: { type: "preprocess", transform: preprocess }, + typeName: ZodFirstPartyTypeKind.ZodEffects, + ...processCreateParams(params) +}); +var ZodOptional = class extends ZodType { + _parse(input) { + return this._getType(input) === ZodParsedType.undefined ? OK(void 0) : this._def.innerType._parse(input); + } + unwrap() { + return this._def.innerType; + } +}; +ZodOptional.create = (type, params) => new ZodOptional({ + innerType: type, + typeName: ZodFirstPartyTypeKind.ZodOptional, + ...processCreateParams(params) +}); +var ZodNullable = class extends ZodType { + _parse(input) { + return this._getType(input) === ZodParsedType.null ? OK(null) : this._def.innerType._parse(input); + } + unwrap() { + return this._def.innerType; + } +}; +ZodNullable.create = (type, params) => new ZodNullable({ + innerType: type, + typeName: ZodFirstPartyTypeKind.ZodNullable, + ...processCreateParams(params) +}); +var ZodDefault = class extends ZodType { + _parse(input) { + let { ctx } = this._processInputParams(input), data = ctx.data; + return ctx.parsedType === ZodParsedType.undefined && (data = this._def.defaultValue()), this._def.innerType._parse({ + data, + path: ctx.path, + parent: ctx + }); + } + removeDefault() { + return this._def.innerType; + } +}; +ZodDefault.create = (type, params) => new ZodDefault({ + innerType: type, + typeName: ZodFirstPartyTypeKind.ZodDefault, + defaultValue: typeof params.default == "function" ? params.default : () => params.default, + ...processCreateParams(params) +}); +var ZodCatch = class extends ZodType { + _parse(input) { + let { ctx } = this._processInputParams(input), newCtx = { + ...ctx, + common: { + ...ctx.common, + issues: [] + } + }, result = this._def.innerType._parse({ + data: newCtx.data, + path: newCtx.path, + parent: { + ...newCtx + } + }); + return isAsync(result) ? result.then((result2) => ({ + status: "valid", + value: result2.status === "valid" ? result2.value : this._def.catchValue({ + get error() { + return new ZodError(newCtx.common.issues); + }, + input: newCtx.data + }) + })) : { + status: "valid", + value: result.status === "valid" ? result.value : this._def.catchValue({ + get error() { + return new ZodError(newCtx.common.issues); + }, + input: newCtx.data + }) + }; + } + removeCatch() { + return this._def.innerType; + } +}; +ZodCatch.create = (type, params) => new ZodCatch({ + innerType: type, + typeName: ZodFirstPartyTypeKind.ZodCatch, + catchValue: typeof params.catch == "function" ? params.catch : () => params.catch, + ...processCreateParams(params) +}); +var ZodNaN = class extends ZodType { + _parse(input) { + if (this._getType(input) !== ZodParsedType.nan) { + let ctx = this._getOrReturnCtx(input); + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.nan, + received: ctx.parsedType + }), INVALID; + } + return { status: "valid", value: input.data }; + } +}; +ZodNaN.create = (params) => new ZodNaN({ + typeName: ZodFirstPartyTypeKind.ZodNaN, + ...processCreateParams(params) +}); +var BRAND = Symbol("zod_brand"), ZodBranded = class extends ZodType { + _parse(input) { + let { ctx } = this._processInputParams(input), data = ctx.data; + return this._def.type._parse({ + data, + path: ctx.path, + parent: ctx + }); + } + unwrap() { + return this._def.type; + } +}, ZodPipeline = class _ZodPipeline extends ZodType { + _parse(input) { + let { status, ctx } = this._processInputParams(input); + if (ctx.common.async) + return (async () => { + let inResult = await this._def.in._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + return inResult.status === "aborted" ? INVALID : inResult.status === "dirty" ? (status.dirty(), DIRTY(inResult.value)) : this._def.out._parseAsync({ + data: inResult.value, + path: ctx.path, + parent: ctx + }); + })(); + { + let inResult = this._def.in._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + return inResult.status === "aborted" ? INVALID : inResult.status === "dirty" ? (status.dirty(), { + status: "dirty", + value: inResult.value + }) : this._def.out._parseSync({ + data: inResult.value, + path: ctx.path, + parent: ctx + }); + } + } + static create(a, b) { + return new _ZodPipeline({ + in: a, + out: b, + typeName: ZodFirstPartyTypeKind.ZodPipeline + }); + } +}, ZodReadonly = class extends ZodType { + _parse(input) { + let result = this._def.innerType._parse(input); + return isValid(result) && (result.value = Object.freeze(result.value)), result; + } +}; +ZodReadonly.create = (type, params) => new ZodReadonly({ + innerType: type, + typeName: ZodFirstPartyTypeKind.ZodReadonly, + ...processCreateParams(params) +}); +var custom = (check, params = {}, fatal) => check ? ZodAny.create().superRefine((data, ctx) => { + var _a, _b; + if (!check(data)) { + let p = typeof params == "function" ? params(data) : typeof params == "string" ? { message: params } : params, _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : !0, p2 = typeof p == "string" ? { message: p } : p; + ctx.addIssue({ code: "custom", ...p2, fatal: _fatal }); + } +}) : ZodAny.create(), late = { + object: ZodObject.lazycreate +}, ZodFirstPartyTypeKind; +(function(ZodFirstPartyTypeKind2) { + ZodFirstPartyTypeKind2.ZodString = "ZodString", ZodFirstPartyTypeKind2.ZodNumber = "ZodNumber", ZodFirstPartyTypeKind2.ZodNaN = "ZodNaN", ZodFirstPartyTypeKind2.ZodBigInt = "ZodBigInt", ZodFirstPartyTypeKind2.ZodBoolean = "ZodBoolean", ZodFirstPartyTypeKind2.ZodDate = "ZodDate", ZodFirstPartyTypeKind2.ZodSymbol = "ZodSymbol", ZodFirstPartyTypeKind2.ZodUndefined = "ZodUndefined", ZodFirstPartyTypeKind2.ZodNull = "ZodNull", ZodFirstPartyTypeKind2.ZodAny = "ZodAny", ZodFirstPartyTypeKind2.ZodUnknown = "ZodUnknown", ZodFirstPartyTypeKind2.ZodNever = "ZodNever", ZodFirstPartyTypeKind2.ZodVoid = "ZodVoid", ZodFirstPartyTypeKind2.ZodArray = "ZodArray", ZodFirstPartyTypeKind2.ZodObject = "ZodObject", ZodFirstPartyTypeKind2.ZodUnion = "ZodUnion", ZodFirstPartyTypeKind2.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", ZodFirstPartyTypeKind2.ZodIntersection = "ZodIntersection", ZodFirstPartyTypeKind2.ZodTuple = "ZodTuple", ZodFirstPartyTypeKind2.ZodRecord = "ZodRecord", ZodFirstPartyTypeKind2.ZodMap = "ZodMap", ZodFirstPartyTypeKind2.ZodSet = "ZodSet", ZodFirstPartyTypeKind2.ZodFunction = "ZodFunction", ZodFirstPartyTypeKind2.ZodLazy = "ZodLazy", ZodFirstPartyTypeKind2.ZodLiteral = "ZodLiteral", ZodFirstPartyTypeKind2.ZodEnum = "ZodEnum", ZodFirstPartyTypeKind2.ZodEffects = "ZodEffects", ZodFirstPartyTypeKind2.ZodNativeEnum = "ZodNativeEnum", ZodFirstPartyTypeKind2.ZodOptional = "ZodOptional", ZodFirstPartyTypeKind2.ZodNullable = "ZodNullable", ZodFirstPartyTypeKind2.ZodDefault = "ZodDefault", ZodFirstPartyTypeKind2.ZodCatch = "ZodCatch", ZodFirstPartyTypeKind2.ZodPromise = "ZodPromise", ZodFirstPartyTypeKind2.ZodBranded = "ZodBranded", ZodFirstPartyTypeKind2.ZodPipeline = "ZodPipeline", ZodFirstPartyTypeKind2.ZodReadonly = "ZodReadonly"; +})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {})); +var instanceOfType = (cls, params = { + message: `Input not instance of ${cls.name}` +}) => custom((data) => data instanceof cls, params), stringType = ZodString.create, numberType = ZodNumber.create, nanType = ZodNaN.create, bigIntType = ZodBigInt.create, booleanType = ZodBoolean.create, dateType = ZodDate.create, symbolType = ZodSymbol.create, undefinedType = ZodUndefined.create, nullType = ZodNull.create, anyType = ZodAny.create, unknownType = ZodUnknown.create, neverType = ZodNever.create, voidType = ZodVoid.create, arrayType = ZodArray.create, objectType = ZodObject.create, strictObjectType = ZodObject.strictCreate, unionType = ZodUnion.create, discriminatedUnionType = ZodDiscriminatedUnion.create, intersectionType = ZodIntersection.create, tupleType = ZodTuple.create, recordType = ZodRecord.create, mapType = ZodMap.create, setType = ZodSet.create, functionType = ZodFunction.create, lazyType = ZodLazy.create, literalType = ZodLiteral.create, enumType = ZodEnum.create, nativeEnumType = ZodNativeEnum.create, promiseType = ZodPromise.create, effectsType = ZodEffects.create, optionalType = ZodOptional.create, nullableType = ZodNullable.create, preprocessType = ZodEffects.createWithPreprocess, pipelineType = ZodPipeline.create, ostring = () => stringType().optional(), onumber = () => numberType().optional(), oboolean = () => booleanType().optional(), coerce = { + string: (arg) => ZodString.create({ ...arg, coerce: !0 }), + number: (arg) => ZodNumber.create({ ...arg, coerce: !0 }), + boolean: (arg) => ZodBoolean.create({ + ...arg, + coerce: !0 + }), + bigint: (arg) => ZodBigInt.create({ ...arg, coerce: !0 }), + date: (arg) => ZodDate.create({ ...arg, coerce: !0 }) +}, NEVER = INVALID, z = /* @__PURE__ */ Object.freeze({ + __proto__: null, + defaultErrorMap: errorMap, + setErrorMap, + getErrorMap, + makeIssue, + EMPTY_PATH, + addIssueToContext, + ParseStatus, + INVALID, + DIRTY, + OK, + isAborted, + isDirty, + isValid, + isAsync, + get util() { + return util; + }, + get objectUtil() { + return objectUtil; + }, + ZodParsedType, + getParsedType, + ZodType, + ZodString, + ZodNumber, + ZodBigInt, + ZodBoolean, + ZodDate, + ZodSymbol, + ZodUndefined, + ZodNull, + ZodAny, + ZodUnknown, + ZodNever, + ZodVoid, + ZodArray, + ZodObject, + ZodUnion, + ZodDiscriminatedUnion, + ZodIntersection, + ZodTuple, + ZodRecord, + ZodMap, + ZodSet, + ZodFunction, + ZodLazy, + ZodLiteral, + ZodEnum, + ZodNativeEnum, + ZodPromise, + ZodEffects, + ZodTransformer: ZodEffects, + ZodOptional, + ZodNullable, + ZodDefault, + ZodCatch, + ZodNaN, + BRAND, + ZodBranded, + ZodPipeline, + ZodReadonly, + custom, + Schema: ZodType, + ZodSchema: ZodType, + late, + get ZodFirstPartyTypeKind() { + return ZodFirstPartyTypeKind; + }, + coerce, + any: anyType, + array: arrayType, + bigint: bigIntType, + boolean: booleanType, + date: dateType, + discriminatedUnion: discriminatedUnionType, + effect: effectsType, + enum: enumType, + function: functionType, + instanceof: instanceOfType, + intersection: intersectionType, + lazy: lazyType, + literal: literalType, + map: mapType, + nan: nanType, + nativeEnum: nativeEnumType, + never: neverType, + null: nullType, + nullable: nullableType, + number: numberType, + object: objectType, + oboolean, + onumber, + optional: optionalType, + ostring, + pipeline: pipelineType, + preprocess: preprocessType, + promise: promiseType, + record: recordType, + set: setType, + strictObject: strictObjectType, + string: stringType, + symbol: symbolType, + transformer: effectsType, + tuple: tupleType, + undefined: undefinedType, + union: unionType, + unknown: unknownType, + void: voidType, + NEVER, + ZodIssueCode, + quotelessJson, + ZodError +}); + +// src/workers/shared/zod.worker.ts +var HEX_REGEXP = /^[0-9a-f]*$/i, BASE64_REGEXP = /^[0-9a-z+/=]*$/i, HexDataSchema = z.string().regex(HEX_REGEXP).transform((hex) => Buffer.from(hex, "hex")), Base64DataSchema = z.string().regex(BASE64_REGEXP).transform((base64) => Buffer.from(base64, "base64")); +export { + BASE64_REGEXP, + Base64DataSchema, + HEX_REGEXP, + HexDataSchema, + z +}; +//# sourceMappingURL=zod.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/shared/zod.worker.js.map b/node_modules/miniflare/dist/src/workers/shared/zod.worker.js.map new file mode 100644 index 0000000..16da15e --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/shared/zod.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/shared/zod.worker.ts", "../../../../../../node_modules/.pnpm/zod@3.22.3/node_modules/zod/lib/index.mjs"], + "mappings": ";AAAA,SAAS,cAAc;;;ACAvB,IAAI;AAAA,CACH,SAAUA,OAAM;AACb,EAAAA,MAAK,cAAc,CAAC,QAAQ;AAC5B,WAAS,SAAS,MAAM;AAAA,EAAE;AAC1B,EAAAA,MAAK,WAAW;AAChB,WAAS,YAAY,IAAI;AACrB,UAAM,IAAI,MAAM;AAAA,EACpB;AACA,EAAAA,MAAK,cAAc,aACnBA,MAAK,cAAc,CAAC,UAAU;AAC1B,QAAM,MAAM,CAAC;AACb,aAAW,QAAQ;AACf,UAAI,IAAI,IAAI;AAEhB,WAAO;AAAA,EACX,GACAA,MAAK,qBAAqB,CAAC,QAAQ;AAC/B,QAAM,YAAYA,MAAK,WAAW,GAAG,EAAE,OAAO,CAAC,MAAM,OAAO,IAAI,IAAI,CAAC,CAAC,KAAM,QAAQ,GAC9E,WAAW,CAAC;AAClB,aAAW,KAAK;AACZ,eAAS,CAAC,IAAI,IAAI,CAAC;AAEvB,WAAOA,MAAK,aAAa,QAAQ;AAAA,EACrC,GACAA,MAAK,eAAe,CAAC,QACVA,MAAK,WAAW,GAAG,EAAE,IAAI,SAAU,GAAG;AAC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AAAA,EACR,SAAS;AAAA,EACT,MAAM;AAAA,EACN,oBAAoB;AAAA,EACpB,QAAQ;AAAA,EACR,MAAQ;AAAA,EACR,UAAY;AAAA,EACZ,YAAc;AAAA,EACd,cAAc;AAAA,EACd,MAAM;AAAA,EACN,SAAS;AAAA,EACT,KAAK;AAAA,EACL,KAAK;AAAA,EACL,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,MAAQ;AAAA,EACR,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,OAAO;AAAA,EACP,WAAa;AAAA,EACb,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,CAAC;;;ADh6HM,IAAM,aAAa,gBAEb,gBAAgB,mBAChB,gBAAgB,EAC3B,OAAO,EACP,MAAM,UAAU,EAChB,UAAU,CAAC,QAAQ,OAAO,KAAK,KAAK,KAAK,CAAC,GAC/B,mBAAmB,EAC9B,OAAO,EACP,MAAM,aAAa,EACnB,UAAU,CAAC,WAAW,OAAO,KAAK,QAAQ,QAAQ,CAAC;", + "names": ["util", "objectUtil", "errorUtil", "errorMap", "ctx", "result", "issues", "elements", "processed", "ZodFirstPartyTypeKind"] +} diff --git a/node_modules/miniflare/dist/src/workers/workflows/binding.worker.js b/node_modules/miniflare/dist/src/workers/workflows/binding.worker.js new file mode 100644 index 0000000..5210ba8 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/workflows/binding.worker.js @@ -0,0 +1,1949 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from == "object" || typeof from == "function") + for (let key of __getOwnPropNames(from)) + !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target, + mod +)); + +// ../../node_modules/.pnpm/heap-js@2.5.0/node_modules/heap-js/dist/heap-js.umd.js +var require_heap_js_umd = __commonJS({ + "../../node_modules/.pnpm/heap-js@2.5.0/node_modules/heap-js/dist/heap-js.umd.js"(exports, module) { + (function(global, factory) { + typeof exports == "object" && typeof module < "u" ? factory(exports) : typeof define == "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis < "u" ? globalThis : global || self, factory(global.heap = {})); + })(exports, function(exports2) { + "use strict"; + var __awaiter = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator.throw(value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }, __generator$1 = function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), throw: verb(1), return: verb(2) }, typeof Symbol == "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n2) { + return function(v) { + return step([n2, v]); + }; + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + for (; g && (g = 0, op[0] && (_ = 0)), _; ) try { + if (f = 1, y && (t = op[0] & 2 ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + switch (y = 0, t && (op = [op[0] & 2, t.value]), op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + return _.label++, { value: op[1], done: !1 }; + case 5: + _.label++, y = op[1], op = [0]; + continue; + case 7: + op = _.ops.pop(), _.trys.pop(); + continue; + default: + if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1], t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2], _.ops.push(op); + break; + } + t[2] && _.ops.pop(), _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e], y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: !0 }; + } + }, __read$1 = function(o, n2) { + var m = typeof Symbol == "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r2, ar = [], e; + try { + for (; (n2 === void 0 || n2-- > 0) && !(r2 = i.next()).done; ) ar.push(r2.value); + } catch (error) { + e = { error }; + } finally { + try { + r2 && !r2.done && (m = i.return) && m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }, __spreadArray$1 = function(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) + (ar || !(i in from)) && (ar || (ar = Array.prototype.slice.call(from, 0, i)), ar[i] = from[i]); + return to.concat(ar || Array.prototype.slice.call(from)); + }, __values = function(o) { + var s = typeof Symbol == "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length == "number") return { + next: function() { + return o && i >= o.length && (o = void 0), { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }, HeapAsync = ( + /** @class */ + function() { + function HeapAsync2(compare) { + compare === void 0 && (compare = HeapAsync2.minComparator); + var _this = this; + this.compare = compare, this.heapArray = [], this._limit = 0, this.offer = this.add, this.element = this.peek, this.poll = this.pop, this._invertedCompare = function(a, b) { + return _this.compare(a, b).then(function(res) { + return -1 * res; + }); + }; + } + return HeapAsync2.getChildrenIndexOf = function(idx) { + return [idx * 2 + 1, idx * 2 + 2]; + }, HeapAsync2.getParentIndexOf = function(idx) { + if (idx <= 0) + return -1; + var whichChildren = idx % 2 ? 1 : 2; + return Math.floor((idx - whichChildren) / 2); + }, HeapAsync2.getSiblingIndexOf = function(idx) { + if (idx <= 0) + return -1; + var whichChildren = idx % 2 ? 1 : -1; + return idx + whichChildren; + }, HeapAsync2.minComparator = function(a, b) { + return __awaiter(this, void 0, void 0, function() { + return __generator$1(this, function(_a) { + return a > b ? [2, 1] : a < b ? [2, -1] : [2, 0]; + }); + }); + }, HeapAsync2.maxComparator = function(a, b) { + return __awaiter(this, void 0, void 0, function() { + return __generator$1(this, function(_a) { + return b > a ? [2, 1] : b < a ? [2, -1] : [2, 0]; + }); + }); + }, HeapAsync2.minComparatorNumber = function(a, b) { + return __awaiter(this, void 0, void 0, function() { + return __generator$1(this, function(_a) { + return [2, a - b]; + }); + }); + }, HeapAsync2.maxComparatorNumber = function(a, b) { + return __awaiter(this, void 0, void 0, function() { + return __generator$1(this, function(_a) { + return [2, b - a]; + }); + }); + }, HeapAsync2.defaultIsEqual = function(a, b) { + return __awaiter(this, void 0, void 0, function() { + return __generator$1(this, function(_a) { + return [2, a === b]; + }); + }); + }, HeapAsync2.print = function(heap) { + function deep(i2) { + var pi = HeapAsync2.getParentIndexOf(i2); + return Math.floor(Math.log2(pi + 1)); + } + function repeat(str, times) { + for (var out = ""; times > 0; --times) + out += str; + return out; + } + for (var node = 0, lines = [], maxLines = deep(heap.length - 1) + 2, maxLength = 0; node < heap.length; ) { + var i = deep(node) + 1; + node === 0 && (i = 0); + var nodeText = String(heap.get(node)); + nodeText.length > maxLength && (maxLength = nodeText.length), lines[i] = lines[i] || [], lines[i].push(nodeText), node += 1; + } + return lines.map(function(line, i2) { + var times = Math.pow(2, maxLines - i2) - 1; + return repeat(" ", Math.floor(times / 2) * maxLength) + line.map(function(el) { + var half = (maxLength - el.length) / 2; + return repeat(" ", Math.ceil(half)) + el + repeat(" ", Math.floor(half)); + }).join(repeat(" ", times * maxLength)); + }).join(` +`); + }, HeapAsync2.heapify = function(arr, compare) { + return __awaiter(this, void 0, void 0, function() { + var heap; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return heap = new HeapAsync2(compare), heap.heapArray = arr, [4, heap.init()]; + case 1: + return _a.sent(), [2, heap]; + } + }); + }); + }, HeapAsync2.heappop = function(heapArr, compare) { + var heap = new HeapAsync2(compare); + return heap.heapArray = heapArr, heap.pop(); + }, HeapAsync2.heappush = function(heapArr, item, compare) { + return __awaiter(this, void 0, void 0, function() { + var heap; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return heap = new HeapAsync2(compare), heap.heapArray = heapArr, [4, heap.push(item)]; + case 1: + return _a.sent(), [ + 2 + /*return*/ + ]; + } + }); + }); + }, HeapAsync2.heappushpop = function(heapArr, item, compare) { + var heap = new HeapAsync2(compare); + return heap.heapArray = heapArr, heap.pushpop(item); + }, HeapAsync2.heapreplace = function(heapArr, item, compare) { + var heap = new HeapAsync2(compare); + return heap.heapArray = heapArr, heap.replace(item); + }, HeapAsync2.heaptop = function(heapArr, n2, compare) { + n2 === void 0 && (n2 = 1); + var heap = new HeapAsync2(compare); + return heap.heapArray = heapArr, heap.top(n2); + }, HeapAsync2.heapbottom = function(heapArr, n2, compare) { + n2 === void 0 && (n2 = 1); + var heap = new HeapAsync2(compare); + return heap.heapArray = heapArr, heap.bottom(n2); + }, HeapAsync2.nlargest = function(n2, iterable, compare) { + return __awaiter(this, void 0, void 0, function() { + var heap; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return heap = new HeapAsync2(compare), heap.heapArray = __spreadArray$1([], __read$1(iterable), !1), [4, heap.init()]; + case 1: + return _a.sent(), [2, heap.top(n2)]; + } + }); + }); + }, HeapAsync2.nsmallest = function(n2, iterable, compare) { + return __awaiter(this, void 0, void 0, function() { + var heap; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return heap = new HeapAsync2(compare), heap.heapArray = __spreadArray$1([], __read$1(iterable), !1), [4, heap.init()]; + case 1: + return _a.sent(), [2, heap.bottom(n2)]; + } + }); + }); + }, HeapAsync2.prototype.add = function(element) { + return __awaiter(this, void 0, void 0, function() { + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return [4, this._sortNodeUp(this.heapArray.push(element) - 1)]; + case 1: + return _a.sent(), this._applyLimit(), [2, !0]; + } + }); + }); + }, HeapAsync2.prototype.addAll = function(elements) { + return __awaiter(this, void 0, void 0, function() { + var i, l, _a; + return __generator$1(this, function(_b) { + switch (_b.label) { + case 0: + i = this.length, (_a = this.heapArray).push.apply(_a, __spreadArray$1([], __read$1(elements), !1)), l = this.length, _b.label = 1; + case 1: + return i < l ? [4, this._sortNodeUp(i)] : [3, 4]; + case 2: + _b.sent(), _b.label = 3; + case 3: + return ++i, [3, 1]; + case 4: + return this._applyLimit(), [2, !0]; + } + }); + }); + }, HeapAsync2.prototype.bottom = function(n2) { + return n2 === void 0 && (n2 = 1), __awaiter(this, void 0, void 0, function() { + return __generator$1(this, function(_a) { + return this.heapArray.length === 0 || n2 <= 0 ? [2, []] : this.heapArray.length === 1 ? [2, [this.heapArray[0]]] : n2 >= this.heapArray.length ? [2, __spreadArray$1([], __read$1(this.heapArray), !1)] : [2, this._bottomN_push(~~n2)]; + }); + }); + }, HeapAsync2.prototype.check = function() { + return __awaiter(this, void 0, void 0, function() { + var j, el, children, children_1, children_1_1, ch, e_1_1, e_1, _a; + return __generator$1(this, function(_b) { + switch (_b.label) { + case 0: + j = 0, _b.label = 1; + case 1: + if (!(j < this.heapArray.length)) return [3, 10]; + el = this.heapArray[j], children = this.getChildrenOf(j), _b.label = 2; + case 2: + _b.trys.push([2, 7, 8, 9]), children_1 = (e_1 = void 0, __values(children)), children_1_1 = children_1.next(), _b.label = 3; + case 3: + return children_1_1.done ? [3, 6] : (ch = children_1_1.value, [4, this.compare(el, ch)]); + case 4: + if (_b.sent() > 0) + return [2, el]; + _b.label = 5; + case 5: + return children_1_1 = children_1.next(), [3, 3]; + case 6: + return [3, 9]; + case 7: + return e_1_1 = _b.sent(), e_1 = { error: e_1_1 }, [3, 9]; + case 8: + try { + children_1_1 && !children_1_1.done && (_a = children_1.return) && _a.call(children_1); + } finally { + if (e_1) throw e_1.error; + } + return [ + 7 + /*endfinally*/ + ]; + case 9: + return ++j, [3, 1]; + case 10: + return [ + 2 + /*return*/ + ]; + } + }); + }); + }, HeapAsync2.prototype.clear = function() { + this.heapArray = []; + }, HeapAsync2.prototype.clone = function() { + var cloned = new HeapAsync2(this.comparator()); + return cloned.heapArray = this.toArray(), cloned._limit = this._limit, cloned; + }, HeapAsync2.prototype.comparator = function() { + return this.compare; + }, HeapAsync2.prototype.contains = function(o, fn) { + return fn === void 0 && (fn = HeapAsync2.defaultIsEqual), __awaiter(this, void 0, void 0, function() { + var _a, _b, el, e_2_1, e_2, _c; + return __generator$1(this, function(_d) { + switch (_d.label) { + case 0: + _d.trys.push([0, 5, 6, 7]), _a = __values(this.heapArray), _b = _a.next(), _d.label = 1; + case 1: + return _b.done ? [3, 4] : (el = _b.value, [4, fn(el, o)]); + case 2: + if (_d.sent()) + return [2, !0]; + _d.label = 3; + case 3: + return _b = _a.next(), [3, 1]; + case 4: + return [3, 7]; + case 5: + return e_2_1 = _d.sent(), e_2 = { error: e_2_1 }, [3, 7]; + case 6: + try { + _b && !_b.done && (_c = _a.return) && _c.call(_a); + } finally { + if (e_2) throw e_2.error; + } + return [ + 7 + /*endfinally*/ + ]; + case 7: + return [2, !1]; + } + }); + }); + }, HeapAsync2.prototype.init = function(array) { + return __awaiter(this, void 0, void 0, function() { + var i; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + array && (this.heapArray = __spreadArray$1([], __read$1(array), !1)), i = Math.floor(this.heapArray.length), _a.label = 1; + case 1: + return i >= 0 ? [4, this._sortNodeDown(i)] : [3, 4]; + case 2: + _a.sent(), _a.label = 3; + case 3: + return --i, [3, 1]; + case 4: + return this._applyLimit(), [ + 2 + /*return*/ + ]; + } + }); + }); + }, HeapAsync2.prototype.isEmpty = function() { + return this.length === 0; + }, HeapAsync2.prototype.leafs = function() { + if (this.heapArray.length === 0) + return []; + var pi = HeapAsync2.getParentIndexOf(this.heapArray.length - 1); + return this.heapArray.slice(pi + 1); + }, Object.defineProperty(HeapAsync2.prototype, "length", { + /** + * Length of the heap. + * @return {Number} + */ + get: function() { + return this.heapArray.length; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(HeapAsync2.prototype, "limit", { + /** + * Get length limit of the heap. + * @return {Number} + */ + get: function() { + return this._limit; + }, + /** + * Set length limit of the heap. + * @return {Number} + */ + set: function(_l) { + this._limit = ~~_l, this._applyLimit(); + }, + enumerable: !1, + configurable: !0 + }), HeapAsync2.prototype.peek = function() { + return this.heapArray[0]; + }, HeapAsync2.prototype.pop = function() { + return __awaiter(this, void 0, void 0, function() { + var last; + return __generator$1(this, function(_a) { + return last = this.heapArray.pop(), this.length > 0 && last !== void 0 ? [2, this.replace(last)] : [2, last]; + }); + }); + }, HeapAsync2.prototype.push = function() { + for (var elements = [], _i = 0; _i < arguments.length; _i++) + elements[_i] = arguments[_i]; + return __awaiter(this, void 0, void 0, function() { + return __generator$1(this, function(_a) { + return elements.length < 1 ? [2, !1] : elements.length === 1 ? [2, this.add(elements[0])] : [2, this.addAll(elements)]; + }); + }); + }, HeapAsync2.prototype.pushpop = function(element) { + return __awaiter(this, void 0, void 0, function() { + var _a; + return __generator$1(this, function(_b) { + switch (_b.label) { + case 0: + return [4, this.compare(this.heapArray[0], element)]; + case 1: + return _b.sent() < 0 ? (_a = __read$1([this.heapArray[0], element], 2), element = _a[0], this.heapArray[0] = _a[1], [4, this._sortNodeDown(0)]) : [3, 3]; + case 2: + _b.sent(), _b.label = 3; + case 3: + return [2, element]; + } + }); + }); + }, HeapAsync2.prototype.remove = function(o, fn) { + return fn === void 0 && (fn = HeapAsync2.defaultIsEqual), __awaiter(this, void 0, void 0, function() { + var idx, i; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return this.length > 0 ? o !== void 0 ? [3, 2] : [4, this.pop()] : [3, 13]; + case 1: + return _a.sent(), [2, !0]; + case 2: + idx = -1, i = 0, _a.label = 3; + case 3: + return i < this.heapArray.length ? [4, fn(this.heapArray[i], o)] : [3, 6]; + case 4: + if (_a.sent()) + return idx = i, [3, 6]; + _a.label = 5; + case 5: + return ++i, [3, 3]; + case 6: + return idx >= 0 ? idx !== 0 ? [3, 8] : [4, this.pop()] : [3, 13]; + case 7: + return _a.sent(), [3, 12]; + case 8: + return idx !== this.length - 1 ? [3, 9] : (this.heapArray.pop(), [3, 12]); + case 9: + return this.heapArray.splice(idx, 1, this.heapArray.pop()), [4, this._sortNodeUp(idx)]; + case 10: + return _a.sent(), [4, this._sortNodeDown(idx)]; + case 11: + _a.sent(), _a.label = 12; + case 12: + return [2, !0]; + case 13: + return [2, !1]; + } + }); + }); + }, HeapAsync2.prototype.replace = function(element) { + return __awaiter(this, void 0, void 0, function() { + var peek; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return peek = this.heapArray[0], this.heapArray[0] = element, [4, this._sortNodeDown(0)]; + case 1: + return _a.sent(), [2, peek]; + } + }); + }); + }, HeapAsync2.prototype.size = function() { + return this.length; + }, HeapAsync2.prototype.top = function(n2) { + return n2 === void 0 && (n2 = 1), __awaiter(this, void 0, void 0, function() { + return __generator$1(this, function(_a) { + return this.heapArray.length === 0 || n2 <= 0 ? [2, []] : this.heapArray.length === 1 || n2 === 1 ? [2, [this.heapArray[0]]] : n2 >= this.heapArray.length ? [2, __spreadArray$1([], __read$1(this.heapArray), !1)] : [2, this._topN_push(~~n2)]; + }); + }); + }, HeapAsync2.prototype.toArray = function() { + return __spreadArray$1([], __read$1(this.heapArray), !1); + }, HeapAsync2.prototype.toString = function() { + return this.heapArray.toString(); + }, HeapAsync2.prototype.get = function(i) { + return this.heapArray[i]; + }, HeapAsync2.prototype.getChildrenOf = function(idx) { + var _this = this; + return HeapAsync2.getChildrenIndexOf(idx).map(function(i) { + return _this.heapArray[i]; + }).filter(function(e) { + return e !== void 0; + }); + }, HeapAsync2.prototype.getParentOf = function(idx) { + var pi = HeapAsync2.getParentIndexOf(idx); + return this.heapArray[pi]; + }, HeapAsync2.prototype[Symbol.iterator] = function() { + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return this.length ? [4, this.pop()] : [3, 2]; + case 1: + return _a.sent(), [3, 0]; + case 2: + return [ + 2 + /*return*/ + ]; + } + }); + }, HeapAsync2.prototype.iterator = function() { + return this; + }, HeapAsync2.prototype._applyLimit = function() { + if (this._limit && this._limit < this.heapArray.length) + for (var rm = this.heapArray.length - this._limit; rm; ) + this.heapArray.pop(), --rm; + }, HeapAsync2.prototype._bottomN_push = function(n2) { + return __awaiter(this, void 0, void 0, function() { + var bottomHeap, startAt, parentStartAt, indices, i, arr, i; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return bottomHeap = new HeapAsync2(this.compare), bottomHeap.limit = n2, bottomHeap.heapArray = this.heapArray.slice(-n2), [4, bottomHeap.init()]; + case 1: + for (_a.sent(), startAt = this.heapArray.length - 1 - n2, parentStartAt = HeapAsync2.getParentIndexOf(startAt), indices = [], i = startAt; i > parentStartAt; --i) + indices.push(i); + arr = this.heapArray, _a.label = 2; + case 2: + return indices.length ? (i = indices.shift(), [4, this.compare(arr[i], bottomHeap.peek())]) : [3, 6]; + case 3: + return _a.sent() > 0 ? [4, bottomHeap.replace(arr[i])] : [3, 5]; + case 4: + _a.sent(), i % 2 && indices.push(HeapAsync2.getParentIndexOf(i)), _a.label = 5; + case 5: + return [3, 2]; + case 6: + return [2, bottomHeap.toArray()]; + } + }); + }); + }, HeapAsync2.prototype._moveNode = function(j, k) { + var _a; + _a = __read$1([this.heapArray[k], this.heapArray[j]], 2), this.heapArray[j] = _a[0], this.heapArray[k] = _a[1]; + }, HeapAsync2.prototype._sortNodeDown = function(i) { + return __awaiter(this, void 0, void 0, function() { + var moveIt, self2, getPotentialParent, childrenIdx, bestChildIndex, j, bestChild, _a, _this = this; + return __generator$1(this, function(_b) { + switch (_b.label) { + case 0: + moveIt = i < this.heapArray.length - 1, self2 = this.heapArray[i], getPotentialParent = function(best, j2) { + return __awaiter(_this, void 0, void 0, function() { + var _a2; + return __generator$1(this, function(_b2) { + switch (_b2.label) { + case 0: + return _a2 = this.heapArray.length > j2, _a2 ? [4, this.compare(this.heapArray[j2], this.heapArray[best])] : [3, 2]; + case 1: + _a2 = _b2.sent() < 0, _b2.label = 2; + case 2: + return _a2 && (best = j2), [2, best]; + } + }); + }); + }, _b.label = 1; + case 1: + if (!moveIt) return [3, 8]; + childrenIdx = HeapAsync2.getChildrenIndexOf(i), bestChildIndex = childrenIdx[0], j = 1, _b.label = 2; + case 2: + return j < childrenIdx.length ? [4, getPotentialParent(bestChildIndex, childrenIdx[j])] : [3, 5]; + case 3: + bestChildIndex = _b.sent(), _b.label = 4; + case 4: + return ++j, [3, 2]; + case 5: + return bestChild = this.heapArray[bestChildIndex], _a = typeof bestChild < "u", _a ? [4, this.compare(self2, bestChild)] : [3, 7]; + case 6: + _a = _b.sent() > 0, _b.label = 7; + case 7: + return _a ? (this._moveNode(i, bestChildIndex), i = bestChildIndex) : moveIt = !1, [3, 1]; + case 8: + return [ + 2 + /*return*/ + ]; + } + }); + }); + }, HeapAsync2.prototype._sortNodeUp = function(i) { + return __awaiter(this, void 0, void 0, function() { + var moveIt, pi, _a; + return __generator$1(this, function(_b) { + switch (_b.label) { + case 0: + moveIt = i > 0, _b.label = 1; + case 1: + return moveIt ? (pi = HeapAsync2.getParentIndexOf(i), _a = pi >= 0, _a ? [4, this.compare(this.heapArray[pi], this.heapArray[i])] : [3, 3]) : [3, 4]; + case 2: + _a = _b.sent() > 0, _b.label = 3; + case 3: + return _a ? (this._moveNode(i, pi), i = pi) : moveIt = !1, [3, 1]; + case 4: + return [ + 2 + /*return*/ + ]; + } + }); + }); + }, HeapAsync2.prototype._topN_push = function(n2) { + return __awaiter(this, void 0, void 0, function() { + var topHeap, indices, arr, i; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + topHeap = new HeapAsync2(this._invertedCompare), topHeap.limit = n2, indices = [0], arr = this.heapArray, _a.label = 1; + case 1: + return indices.length ? (i = indices.shift(), i < arr.length ? topHeap.length < n2 ? [4, topHeap.push(arr[i])] : [3, 3] : [3, 6]) : [3, 7]; + case 2: + return _a.sent(), indices.push.apply(indices, __spreadArray$1([], __read$1(HeapAsync2.getChildrenIndexOf(i)), !1)), [3, 6]; + case 3: + return [4, this.compare(arr[i], topHeap.peek())]; + case 4: + return _a.sent() < 0 ? [4, topHeap.replace(arr[i])] : [3, 6]; + case 5: + _a.sent(), indices.push.apply(indices, __spreadArray$1([], __read$1(HeapAsync2.getChildrenIndexOf(i)), !1)), _a.label = 6; + case 6: + return [3, 1]; + case 7: + return [2, topHeap.toArray()]; + } + }); + }); + }, HeapAsync2.prototype._topN_fill = function(n2) { + return __awaiter(this, void 0, void 0, function() { + var heapArray, topHeap, branch, indices, i, i; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return heapArray = this.heapArray, topHeap = new HeapAsync2(this._invertedCompare), topHeap.limit = n2, topHeap.heapArray = heapArray.slice(0, n2), [4, topHeap.init()]; + case 1: + for (_a.sent(), branch = HeapAsync2.getParentIndexOf(n2 - 1) + 1, indices = [], i = branch; i < n2; ++i) + indices.push.apply(indices, __spreadArray$1([], __read$1(HeapAsync2.getChildrenIndexOf(i).filter(function(l) { + return l < heapArray.length; + })), !1)); + (n2 - 1) % 2 && indices.push(n2), _a.label = 2; + case 2: + return indices.length ? (i = indices.shift(), i < heapArray.length ? [4, this.compare(heapArray[i], topHeap.peek())] : [3, 5]) : [3, 6]; + case 3: + return _a.sent() < 0 ? [4, topHeap.replace(heapArray[i])] : [3, 5]; + case 4: + _a.sent(), indices.push.apply(indices, __spreadArray$1([], __read$1(HeapAsync2.getChildrenIndexOf(i)), !1)), _a.label = 5; + case 5: + return [3, 2]; + case 6: + return [2, topHeap.toArray()]; + } + }); + }); + }, HeapAsync2.prototype._topN_heap = function(n2) { + return __awaiter(this, void 0, void 0, function() { + var topHeap, result, i, _a, _b; + return __generator$1(this, function(_c) { + switch (_c.label) { + case 0: + topHeap = this.clone(), result = [], i = 0, _c.label = 1; + case 1: + return i < n2 ? (_b = (_a = result).push, [4, topHeap.pop()]) : [3, 4]; + case 2: + _b.apply(_a, [_c.sent()]), _c.label = 3; + case 3: + return ++i, [3, 1]; + case 4: + return [2, result]; + } + }); + }); + }, HeapAsync2.prototype._topIdxOf = function(list) { + return __awaiter(this, void 0, void 0, function() { + var idx, top, i, comp; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + if (!list.length) + return [2, -1]; + idx = 0, top = list[idx], i = 1, _a.label = 1; + case 1: + return i < list.length ? [4, this.compare(list[i], top)] : [3, 4]; + case 2: + comp = _a.sent(), comp < 0 && (idx = i, top = list[i]), _a.label = 3; + case 3: + return ++i, [3, 1]; + case 4: + return [2, idx]; + } + }); + }); + }, HeapAsync2.prototype._topOf = function() { + for (var list = [], _i = 0; _i < arguments.length; _i++) + list[_i] = arguments[_i]; + return __awaiter(this, void 0, void 0, function() { + var heap; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return heap = new HeapAsync2(this.compare), [4, heap.init(list)]; + case 1: + return _a.sent(), [2, heap.peek()]; + } + }); + }); + }, HeapAsync2; + }() + ), __generator = function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), throw: verb(1), return: verb(2) }, typeof Symbol == "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n2) { + return function(v) { + return step([n2, v]); + }; + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + for (; g && (g = 0, op[0] && (_ = 0)), _; ) try { + if (f = 1, y && (t = op[0] & 2 ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + switch (y = 0, t && (op = [op[0] & 2, t.value]), op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + return _.label++, { value: op[1], done: !1 }; + case 5: + _.label++, y = op[1], op = [0]; + continue; + case 7: + op = _.ops.pop(), _.trys.pop(); + continue; + default: + if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1], t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2], _.ops.push(op); + break; + } + t[2] && _.ops.pop(), _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e], y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: !0 }; + } + }, __read = function(o, n2) { + var m = typeof Symbol == "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r2, ar = [], e; + try { + for (; (n2 === void 0 || n2-- > 0) && !(r2 = i.next()).done; ) ar.push(r2.value); + } catch (error) { + e = { error }; + } finally { + try { + r2 && !r2.done && (m = i.return) && m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }, __spreadArray = function(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) + (ar || !(i in from)) && (ar || (ar = Array.prototype.slice.call(from, 0, i)), ar[i] = from[i]); + return to.concat(ar || Array.prototype.slice.call(from)); + }, toInt = function(n2) { + return ~~n2; + }, Heap2 = ( + /** @class */ + function() { + function Heap3(compare) { + compare === void 0 && (compare = Heap3.minComparator); + var _this = this; + this.compare = compare, this.heapArray = [], this._limit = 0, this.offer = this.add, this.element = this.peek, this.poll = this.pop, this.removeAll = this.clear, this._invertedCompare = function(a, b) { + return -1 * _this.compare(a, b); + }; + } + return Heap3.getChildrenIndexOf = function(idx) { + return [idx * 2 + 1, idx * 2 + 2]; + }, Heap3.getParentIndexOf = function(idx) { + if (idx <= 0) + return -1; + var whichChildren = idx % 2 ? 1 : 2; + return Math.floor((idx - whichChildren) / 2); + }, Heap3.getSiblingIndexOf = function(idx) { + if (idx <= 0) + return -1; + var whichChildren = idx % 2 ? 1 : -1; + return idx + whichChildren; + }, Heap3.minComparator = function(a, b) { + return a > b ? 1 : a < b ? -1 : 0; + }, Heap3.maxComparator = function(a, b) { + return b > a ? 1 : b < a ? -1 : 0; + }, Heap3.minComparatorNumber = function(a, b) { + return a - b; + }, Heap3.maxComparatorNumber = function(a, b) { + return b - a; + }, Heap3.defaultIsEqual = function(a, b) { + return a === b; + }, Heap3.print = function(heap) { + function deep(i2) { + var pi = Heap3.getParentIndexOf(i2); + return Math.floor(Math.log2(pi + 1)); + } + function repeat(str, times) { + for (var out = ""; times > 0; --times) + out += str; + return out; + } + for (var node = 0, lines = [], maxLines = deep(heap.length - 1) + 2, maxLength = 0; node < heap.length; ) { + var i = deep(node) + 1; + node === 0 && (i = 0); + var nodeText = String(heap.get(node)); + nodeText.length > maxLength && (maxLength = nodeText.length), lines[i] = lines[i] || [], lines[i].push(nodeText), node += 1; + } + return lines.map(function(line, i2) { + var times = Math.pow(2, maxLines - i2) - 1; + return repeat(" ", Math.floor(times / 2) * maxLength) + line.map(function(el) { + var half = (maxLength - el.length) / 2; + return repeat(" ", Math.ceil(half)) + el + repeat(" ", Math.floor(half)); + }).join(repeat(" ", times * maxLength)); + }).join(` +`); + }, Heap3.heapify = function(arr, compare) { + var heap = new Heap3(compare); + return heap.heapArray = arr, heap.init(), heap; + }, Heap3.heappop = function(heapArr, compare) { + var heap = new Heap3(compare); + return heap.heapArray = heapArr, heap.pop(); + }, Heap3.heappush = function(heapArr, item, compare) { + var heap = new Heap3(compare); + heap.heapArray = heapArr, heap.push(item); + }, Heap3.heappushpop = function(heapArr, item, compare) { + var heap = new Heap3(compare); + return heap.heapArray = heapArr, heap.pushpop(item); + }, Heap3.heapreplace = function(heapArr, item, compare) { + var heap = new Heap3(compare); + return heap.heapArray = heapArr, heap.replace(item); + }, Heap3.heaptop = function(heapArr, n2, compare) { + n2 === void 0 && (n2 = 1); + var heap = new Heap3(compare); + return heap.heapArray = heapArr, heap.top(n2); + }, Heap3.heapbottom = function(heapArr, n2, compare) { + n2 === void 0 && (n2 = 1); + var heap = new Heap3(compare); + return heap.heapArray = heapArr, heap.bottom(n2); + }, Heap3.nlargest = function(n2, iterable, compare) { + var heap = new Heap3(compare); + return heap.heapArray = __spreadArray([], __read(iterable), !1), heap.init(), heap.top(n2); + }, Heap3.nsmallest = function(n2, iterable, compare) { + var heap = new Heap3(compare); + return heap.heapArray = __spreadArray([], __read(iterable), !1), heap.init(), heap.bottom(n2); + }, Heap3.prototype.add = function(element) { + return this._sortNodeUp(this.heapArray.push(element) - 1), this._applyLimit(), !0; + }, Heap3.prototype.addAll = function(elements) { + var _a, i = this.length; + (_a = this.heapArray).push.apply(_a, __spreadArray([], __read(elements), !1)); + for (var l = this.length; i < l; ++i) + this._sortNodeUp(i); + return this._applyLimit(), !0; + }, Heap3.prototype.bottom = function(n2) { + return n2 === void 0 && (n2 = 1), this.heapArray.length === 0 || n2 <= 0 ? [] : this.heapArray.length === 1 ? [this.heapArray[0]] : n2 >= this.heapArray.length ? __spreadArray([], __read(this.heapArray), !1) : this._bottomN_push(~~n2); + }, Heap3.prototype.check = function() { + var _this = this; + return this.heapArray.find(function(el, j) { + return !!_this.getChildrenOf(j).find(function(ch) { + return _this.compare(el, ch) > 0; + }); + }); + }, Heap3.prototype.clear = function() { + this.heapArray = []; + }, Heap3.prototype.clone = function() { + var cloned = new Heap3(this.comparator()); + return cloned.heapArray = this.toArray(), cloned._limit = this._limit, cloned; + }, Heap3.prototype.comparator = function() { + return this.compare; + }, Heap3.prototype.contains = function(o, callbackFn) { + return callbackFn === void 0 && (callbackFn = Heap3.defaultIsEqual), this.indexOf(o, callbackFn) !== -1; + }, Heap3.prototype.init = function(array) { + array && (this.heapArray = __spreadArray([], __read(array), !1)); + for (var i = Math.floor(this.heapArray.length); i >= 0; --i) + this._sortNodeDown(i); + this._applyLimit(); + }, Heap3.prototype.isEmpty = function() { + return this.length === 0; + }, Heap3.prototype.indexOf = function(element, callbackFn) { + if (callbackFn === void 0 && (callbackFn = Heap3.defaultIsEqual), this.heapArray.length === 0) + return -1; + for (var indexes = [], currentIndex = 0; currentIndex < this.heapArray.length; ) { + var currentElement = this.heapArray[currentIndex]; + if (callbackFn(currentElement, element)) + return currentIndex; + this.compare(currentElement, element) <= 0 && indexes.push.apply(indexes, __spreadArray([], __read(Heap3.getChildrenIndexOf(currentIndex)), !1)), currentIndex = indexes.shift() || this.heapArray.length; + } + return -1; + }, Heap3.prototype.indexOfEvery = function(element, callbackFn) { + if (callbackFn === void 0 && (callbackFn = Heap3.defaultIsEqual), this.heapArray.length === 0) + return []; + for (var indexes = [], foundIndexes = [], currentIndex = 0; currentIndex < this.heapArray.length; ) { + var currentElement = this.heapArray[currentIndex]; + callbackFn(currentElement, element) ? (foundIndexes.push(currentIndex), indexes.push.apply(indexes, __spreadArray([], __read(Heap3.getChildrenIndexOf(currentIndex)), !1))) : this.compare(currentElement, element) <= 0 && indexes.push.apply(indexes, __spreadArray([], __read(Heap3.getChildrenIndexOf(currentIndex)), !1)), currentIndex = indexes.shift() || this.heapArray.length; + } + return foundIndexes; + }, Heap3.prototype.leafs = function() { + if (this.heapArray.length === 0) + return []; + var pi = Heap3.getParentIndexOf(this.heapArray.length - 1); + return this.heapArray.slice(pi + 1); + }, Object.defineProperty(Heap3.prototype, "length", { + /** + * Length of the heap. Aliases: {@link size}. + * @return {Number} + * @see size + */ + get: function() { + return this.heapArray.length; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(Heap3.prototype, "limit", { + /** + * Get length limit of the heap. + * Use {@link setLimit} or {@link limit} to set the limit. + * @return {Number} + * @see setLimit + */ + get: function() { + return this._limit; + }, + /** + * Set length limit of the heap. Same as using {@link setLimit}. + * @description If the heap is longer than the limit, the needed amount of leafs are removed. + * @param {Number} _l Limit, defaults to 0 (no limit). Negative, Infinity, or NaN values set the limit to 0. + * @see setLimit + */ + set: function(_l) { + _l < 0 || isNaN(_l) ? this._limit = 0 : this._limit = ~~_l, this._applyLimit(); + }, + enumerable: !1, + configurable: !0 + }), Heap3.prototype.setLimit = function(_l) { + return this.limit = _l, _l < 0 || isNaN(_l) ? NaN : this._limit; + }, Heap3.prototype.peek = function() { + return this.heapArray[0]; + }, Heap3.prototype.pop = function() { + var last = this.heapArray.pop(); + return this.length > 0 && last !== void 0 ? this.replace(last) : last; + }, Heap3.prototype.push = function() { + for (var elements = [], _i = 0; _i < arguments.length; _i++) + elements[_i] = arguments[_i]; + return elements.length < 1 ? !1 : elements.length === 1 ? this.add(elements[0]) : this.addAll(elements); + }, Heap3.prototype.pushpop = function(element) { + var _a; + return this.compare(this.heapArray[0], element) < 0 && (_a = __read([this.heapArray[0], element], 2), element = _a[0], this.heapArray[0] = _a[1], this._sortNodeDown(0)), element; + }, Heap3.prototype.remove = function(o, callbackFn) { + if (callbackFn === void 0 && (callbackFn = Heap3.defaultIsEqual), this.length > 0) { + if (o === void 0) + return this.pop(), !0; + var idx = this.indexOf(o, callbackFn); + if (idx >= 0) + return idx === 0 ? this.pop() : idx === this.length - 1 ? this.heapArray.pop() : (this.heapArray.splice(idx, 1, this.heapArray.pop()), this._sortNodeUp(idx), this._sortNodeDown(idx)), !0; + } + return !1; + }, Heap3.prototype.replace = function(element) { + var peek = this.heapArray[0]; + return this.heapArray[0] = element, this._sortNodeDown(0), peek; + }, Heap3.prototype.size = function() { + return this.length; + }, Heap3.prototype.top = function(n2) { + return n2 === void 0 && (n2 = 1), this.heapArray.length === 0 || n2 <= 0 ? [] : this.heapArray.length === 1 || n2 === 1 ? [this.heapArray[0]] : n2 >= this.heapArray.length ? __spreadArray([], __read(this.heapArray), !1) : this._topN_push(~~n2); + }, Heap3.prototype.toArray = function() { + return __spreadArray([], __read(this.heapArray), !1); + }, Heap3.prototype.toString = function() { + return this.heapArray.toString(); + }, Heap3.prototype.get = function(i) { + return this.heapArray[i]; + }, Heap3.prototype.getChildrenOf = function(idx) { + var _this = this; + return Heap3.getChildrenIndexOf(idx).map(function(i) { + return _this.heapArray[i]; + }).filter(function(e) { + return e !== void 0; + }); + }, Heap3.prototype.getParentOf = function(idx) { + var pi = Heap3.getParentIndexOf(idx); + return this.heapArray[pi]; + }, Heap3.prototype[Symbol.iterator] = function() { + return __generator(this, function(_a) { + switch (_a.label) { + case 0: + return this.length ? [4, this.pop()] : [3, 2]; + case 1: + return _a.sent(), [3, 0]; + case 2: + return [ + 2 + /*return*/ + ]; + } + }); + }, Heap3.prototype.iterator = function() { + return this.toArray(); + }, Heap3.prototype._applyLimit = function() { + if (this._limit > 0 && this._limit < this.heapArray.length) + for (var rm = this.heapArray.length - this._limit; rm; ) + this.heapArray.pop(), --rm; + }, Heap3.prototype._bottomN_push = function(n2) { + var bottomHeap = new Heap3(this.compare); + bottomHeap.limit = n2, bottomHeap.heapArray = this.heapArray.slice(-n2), bottomHeap.init(); + for (var startAt = this.heapArray.length - 1 - n2, parentStartAt = Heap3.getParentIndexOf(startAt), indices = [], i = startAt; i > parentStartAt; --i) + indices.push(i); + for (var arr = this.heapArray; indices.length; ) { + var i = indices.shift(); + this.compare(arr[i], bottomHeap.peek()) > 0 && (bottomHeap.replace(arr[i]), i % 2 && indices.push(Heap3.getParentIndexOf(i))); + } + return bottomHeap.toArray(); + }, Heap3.prototype._moveNode = function(j, k) { + var _a; + _a = __read([this.heapArray[k], this.heapArray[j]], 2), this.heapArray[j] = _a[0], this.heapArray[k] = _a[1]; + }, Heap3.prototype._sortNodeDown = function(i) { + for (var _this = this, moveIt = i < this.heapArray.length - 1, self2 = this.heapArray[i], getPotentialParent = function(best, j) { + return _this.heapArray.length > j && _this.compare(_this.heapArray[j], _this.heapArray[best]) < 0 && (best = j), best; + }; moveIt; ) { + var childrenIdx = Heap3.getChildrenIndexOf(i), bestChildIndex = childrenIdx.reduce(getPotentialParent, childrenIdx[0]), bestChild = this.heapArray[bestChildIndex]; + typeof bestChild < "u" && this.compare(self2, bestChild) > 0 ? (this._moveNode(i, bestChildIndex), i = bestChildIndex) : moveIt = !1; + } + }, Heap3.prototype._sortNodeUp = function(i) { + for (var moveIt = i > 0; moveIt; ) { + var pi = Heap3.getParentIndexOf(i); + pi >= 0 && this.compare(this.heapArray[pi], this.heapArray[i]) > 0 ? (this._moveNode(i, pi), i = pi) : moveIt = !1; + } + }, Heap3.prototype._topN_push = function(n2) { + var topHeap = new Heap3(this._invertedCompare); + topHeap.limit = n2; + for (var indices = [0], arr = this.heapArray; indices.length; ) { + var i = indices.shift(); + i < arr.length && (topHeap.length < n2 ? (topHeap.push(arr[i]), indices.push.apply(indices, __spreadArray([], __read(Heap3.getChildrenIndexOf(i)), !1))) : this.compare(arr[i], topHeap.peek()) < 0 && (topHeap.replace(arr[i]), indices.push.apply(indices, __spreadArray([], __read(Heap3.getChildrenIndexOf(i)), !1)))); + } + return topHeap.toArray(); + }, Heap3.prototype._topN_fill = function(n2) { + var heapArray = this.heapArray, topHeap = new Heap3(this._invertedCompare); + topHeap.limit = n2, topHeap.heapArray = heapArray.slice(0, n2), topHeap.init(); + for (var branch = Heap3.getParentIndexOf(n2 - 1) + 1, indices = [], i = branch; i < n2; ++i) + indices.push.apply(indices, __spreadArray([], __read(Heap3.getChildrenIndexOf(i).filter(function(l) { + return l < heapArray.length; + })), !1)); + for ((n2 - 1) % 2 && indices.push(n2); indices.length; ) { + var i = indices.shift(); + i < heapArray.length && this.compare(heapArray[i], topHeap.peek()) < 0 && (topHeap.replace(heapArray[i]), indices.push.apply(indices, __spreadArray([], __read(Heap3.getChildrenIndexOf(i)), !1))); + } + return topHeap.toArray(); + }, Heap3.prototype._topN_heap = function(n2) { + for (var topHeap = this.clone(), result = [], i = 0; i < n2; ++i) + result.push(topHeap.pop()); + return result; + }, Heap3.prototype._topIdxOf = function(list) { + if (!list.length) + return -1; + for (var idx = 0, top = list[idx], i = 1; i < list.length; ++i) { + var comp = this.compare(list[i], top); + comp < 0 && (idx = i, top = list[i]); + } + return idx; + }, Heap3.prototype._topOf = function() { + for (var list = [], _i = 0; _i < arguments.length; _i++) + list[_i] = arguments[_i]; + var heap = new Heap3(this.compare); + return heap.init(list), heap.peek(); + }, Heap3; + }() + ); + exports2.Heap = Heap2, exports2.HeapAsync = HeapAsync, exports2.default = Heap2, exports2.toInt = toInt, Object.defineProperty(exports2, "__esModule", { value: !0 }); + }); + } +}); + +// ../workflows-shared/src/binding.ts +import { RpcTarget, WorkerEntrypoint } from "cloudflare:workers"; + +// ../workflows-shared/src/instance.ts +var INSTANCE_METADATA = "INSTANCE_METADATA"; +function instanceStatusName(status) { + switch (status) { + case 0 /* Queued */: + return "queued"; + case 1 /* Running */: + return "running"; + case 2 /* Paused */: + return "paused"; + case 3 /* Errored */: + return "errored"; + case 4 /* Terminated */: + return "terminated"; + case 5 /* Complete */: + return "complete"; + default: + return "unknown"; + } +} + +// ../workflows-shared/src/binding.ts +var WorkflowBinding = class extends WorkerEntrypoint { + async create({ + id = crypto.randomUUID(), + params = {} + } = {}) { + let stubId = this.env.ENGINE.idFromName(id), stub = this.env.ENGINE.get(stubId); + stub.init( + 0, + // accountId: number, + {}, + // workflow: DatabaseWorkflow, + {}, + // version: DatabaseVersion, + { id }, + // instance: DatabaseInstance, + { + timestamp: /* @__PURE__ */ new Date(), + payload: params, + instanceId: id + } + ); + let handle = new WorkflowHandle(id, stub); + return { + id, + pause: handle.pause.bind(handle), + resume: handle.resume.bind(handle), + terminate: handle.terminate.bind(handle), + restart: handle.restart.bind(handle), + status: handle.status.bind(handle) + }; + } + async get(id) { + let engineStubId = this.env.ENGINE.idFromName(id), engineStub = this.env.ENGINE.get(engineStubId), handle = new WorkflowHandle(id, engineStub); + try { + await handle.status(); + } catch { + throw new Error("instance.not_found"); + } + return { + id, + pause: handle.pause.bind(handle), + resume: handle.resume.bind(handle), + terminate: handle.terminate.bind(handle), + restart: handle.restart.bind(handle), + status: handle.status.bind(handle) + }; + } + async createBatch(_batch) { + throw new Error("createBatch is not yet implemented in local development."); + } +}, WorkflowHandle = class extends RpcTarget { + constructor(id, stub) { + super(); + this.id = id; + this.stub = stub; + } + async pause() { + throw new Error("Not implemented yet"); + } + async resume() { + throw new Error("Not implemented yet"); + } + async terminate() { + throw new Error("Not implemented yet"); + } + async restart() { + throw new Error("Not implemented yet"); + } + async status() { + let status = await this.stub.getStatus(0, this.id), { logs } = await this.stub.readLogs(), workflowSuccessEvent = logs.filter((log) => log.event === 2 /* WORKFLOW_SUCCESS */).at(0), stepOutputs = logs.filter( + (log) => log.event === 6 /* STEP_SUCCESS */ + ).map((log) => log.metadata.result), workflowOutput = workflowSuccessEvent !== void 0 ? workflowSuccessEvent.metadata.result : null; + return { + status: instanceStatusName(status), + __LOCAL_DEV_STEP_OUTPUTS: stepOutputs, + // @ts-expect-error types are wrong, will remove this expect-error once I fix them + output: workflowOutput + }; + } +}; + +// ../workflows-shared/src/engine.ts +import { DurableObject } from "cloudflare:workers"; + +// ../workflows-shared/src/context.ts +import { RpcTarget as RpcTarget2 } from "cloudflare:workers"; + +// ../../node_modules/.pnpm/itty-time@1.0.6/node_modules/itty-time/index.mjs +var n = { year: 315576e5, month: 2592e6, week: 6048e5, day: 864e5, hour: 36e5, minute: 6e4, second: 1e3, m: 1 }, r = (e) => { + if (+e) return +e; + let [, t, r2] = e.match(/^([^ ]+) +(\w\w*?)s?$/) || []; + return +t * (n[r2] || 1); +}; + +// ../workflows-shared/src/lib/cache.ts +async function computeHash(value) { + let msgUint8 = new TextEncoder().encode(value), hashBuffer = await crypto.subtle.digest("SHA-1", msgUint8); + return Array.from(new Uint8Array(hashBuffer)).map((b) => b.toString(16).padStart(2, "0")).join(""); +} + +// ../workflows-shared/src/lib/errors.ts +var WorkflowTimeoutError = class extends Error { + name = "WorkflowTimeoutError"; +}, WorkflowInternalError = class extends Error { + name = "WorkflowInternalError"; +}, WorkflowFatalError = class extends Error { + name = "WorkflowFatalError"; + toJSON() { + return { + name: this.name, + message: this.message + }; + } +}; + +// ../workflows-shared/src/lib/retries.ts +function calcRetryDuration(config, stepState) { + let { attemptedCount: attemptCount } = stepState, { retries } = config, delay = r(retries.delay); + switch (retries.backoff) { + case "exponential": + return delay * Math.pow(2, attemptCount - 1); + case "linear": + return delay * attemptCount; + case "constant": + default: + return delay; + } +} + +// ../workflows-shared/src/lib/validators.ts +var CONTROL_CHAR_REGEX = new RegExp("[\0-]"); +function validateStepName(string) { + return string.length > 256 ? !1 : !CONTROL_CHAR_REGEX.test(string); +} + +// ../workflows-shared/src/context.ts +var defaultConfig = { + retries: { + limit: 5, + delay: 1e3, + backoff: "constant" + }, + timeout: "15 minutes" +}, Context = class extends RpcTarget2 { + #engine; + #state; + #counters = /* @__PURE__ */ new Map(); + constructor(engine, state) { + super(), this.#engine = engine, this.#state = state; + } + #getCount(name) { + let val = this.#counters.get(name) ?? 0; + return val++, this.#counters.set(name, val), val; + } + async do(name, configOrCallback, callback) { + let closure, stepConfig; + if (callback ? (closure = callback, stepConfig = configOrCallback) : (closure = configOrCallback, stepConfig = {}), !validateStepName(name)) { + let error = new WorkflowFatalError( + `Step name "${name}" exceeds max length (${256} chars) or invalid characters found` + ); + throw error.isUserError = !0, error; + } + let config = { + ...defaultConfig, + ...stepConfig, + retries: { + ...defaultConfig.retries, + ...stepConfig.retries + } + }, hash = await computeHash(name), count = this.#getCount("run-" + name), cacheKey = `${hash}-${count}`, valueKey = `${cacheKey}-value`, configKey = `${cacheKey}-config`, errorKey = `${cacheKey}-error`, stepNameWithCounter = `${name}-${count}`, stepStateKey = `${cacheKey}-metadata`, maybeMap = await this.#state.storage.get([valueKey, configKey]), maybeResult = maybeMap.get(valueKey); + if (maybeResult) + return maybeResult.value; + let maybeError = maybeMap.get( + errorKey + ); + if (maybeError) + throw maybeError.isUserError = !0, maybeError; + maybeMap.has(configKey) ? config = maybeMap.get(configKey) : await this.#state.storage.put(configKey, config); + let attemptLogs = this.#engine.readLogsFromStep(cacheKey).filter( + (val) => [ + 11 /* ATTEMPT_SUCCESS */, + 12 /* ATTEMPT_FAILURE */, + 10 /* ATTEMPT_START */ + ].includes(val.event) + ); + if (attemptLogs.length > 0 && attemptLogs.at(-1)?.event === 10 /* ATTEMPT_START */) { + let stepState = await this.#state.storage.get( + stepStateKey + ) ?? { + attemptedCount: 1 + }, priorityQueueHash = `${cacheKey}-${stepState.attemptedCount}`, timeoutEntryPQ = this.#engine.priorityQueue.getFirst( + (a) => a.hash === priorityQueueHash && a.type === "timeout" + ); + timeoutEntryPQ !== void 0 && this.#engine.priorityQueue.remove(timeoutEntryPQ), this.#engine.writeLog( + 12 /* ATTEMPT_FAILURE */, + cacheKey, + stepNameWithCounter, + { + attempt: stepState.attemptedCount, + error: { + name: "WorkflowInternalError", + message: "Attempt failed due to internal workflows error" + } + } + ), await this.#state.storage.put(stepStateKey, stepState); + } + let doWrapper = async (doWrapperClosure) => { + let stepState = await this.#state.storage.get( + stepStateKey + ) ?? { + attemptedCount: 0 + }; + if (await this.#engine.timeoutHandler.acquire(this.#engine), stepState.attemptedCount == 0) + this.#engine.writeLog( + 5 /* STEP_START */, + cacheKey, + stepNameWithCounter, + { + config + } + ); + else { + let priorityQueueHash = `${cacheKey}-${stepState.attemptedCount}`, retryEntryPQ = this.#engine.priorityQueue.getFirst( + (a) => a.hash === priorityQueueHash && a.type === "retry" + ); + retryEntryPQ !== void 0 && (await this.#engine.timeoutHandler.release(this.#engine), await scheduler.wait(retryEntryPQ.targetTimestamp - Date.now()), await this.#engine.timeoutHandler.acquire(this.#engine), this.#engine.priorityQueue.remove({ + hash: priorityQueueHash, + type: "retry" + })); + } + let result, instanceMetadata = await this.#state.storage.get(INSTANCE_METADATA); + if (!instanceMetadata) + throw new Error("instanceMetadata is undefined"); + let { accountId, instance } = instanceMetadata; + try { + let timeoutPromise = async () => { + let priorityQueueHash2 = `${cacheKey}-${stepState.attemptedCount}`, timeout = r(config.timeout); + throw await this.#engine.priorityQueue.add({ + hash: priorityQueueHash2, + targetTimestamp: Date.now() + timeout, + type: "timeout" + }), await scheduler.wait(timeout), await this.#engine.priorityQueue.remove({ + hash: priorityQueueHash2, + type: "timeout" + }), new WorkflowTimeoutError( + `Execution timed out after ${timeout}ms` + ); + }; + this.#engine.writeLog( + 10 /* ATTEMPT_START */, + cacheKey, + stepNameWithCounter, + { + attempt: stepState.attemptedCount + 1 + } + ), stepState.attemptedCount++, await this.#state.storage.put(stepStateKey, stepState); + let priorityQueueHash = `${cacheKey}-${stepState.attemptedCount}`; + result = await Promise.race([doWrapperClosure(), timeoutPromise()]), await this.#engine.priorityQueue.remove({ + hash: priorityQueueHash, + type: "timeout" + }); + try { + await this.#state.storage.put(valueKey, { value: result }); + } catch (e) { + if (e instanceof Error && e.name === "DataCloneError") + this.#engine.writeLog( + 12 /* ATTEMPT_FAILURE */, + cacheKey, + stepNameWithCounter, + { + attempt: stepState.attemptedCount, + error: new WorkflowFatalError( + `Value returned from step "${name}" is not serialisable` + ) + } + ), this.#engine.writeLog( + 7 /* STEP_FAILURE */, + cacheKey, + stepNameWithCounter, + {} + ), this.#engine.writeLog(3 /* WORKFLOW_FAILURE */, null, null, { + error: new WorkflowFatalError( + `The execution of the Workflow instance was terminated, as the step "${name}" returned a value which is not serialisable` + ) + }), await this.#engine.setStatus( + accountId, + instance.id, + 3 /* Errored */ + ), await this.#engine.timeoutHandler.release(this.#engine), await this.#engine.abort("Value is not serialisable"); + else + throw new WorkflowInternalError( + `Storage failure for ${valueKey}: ${e} ` + ); + return; + } + this.#engine.writeLog( + 11 /* ATTEMPT_SUCCESS */, + cacheKey, + stepNameWithCounter, + { + attempt: stepState.attemptedCount + } + ); + } catch (e) { + let error = e; + if (this.#engine.priorityQueue.remove({ + hash: `${cacheKey}-${stepState.attemptedCount}`, + type: "timeout" + }), e instanceof Error && (error.name === "NonRetryableError" || error.message.startsWith("NonRetryableError:"))) + throw this.#engine.writeLog( + 12 /* ATTEMPT_FAILURE */, + cacheKey, + stepNameWithCounter, + { + attempt: stepState.attemptedCount, + error: new WorkflowFatalError( + `Step threw a NonRetryableError with message "${e.message}"` + ) + } + ), this.#engine.writeLog( + 7 /* STEP_FAILURE */, + cacheKey, + stepNameWithCounter, + {} + ), error; + if (this.#engine.writeLog( + 12 /* ATTEMPT_FAILURE */, + cacheKey, + stepNameWithCounter, + { + attempt: stepState.attemptedCount, + error: { + name: error.name, + message: error.message + // TODO (WOR-79): Stacks are all incorrect over RPC and need work + // stack: error.stack, + } + } + ), await this.#state.storage.put(stepStateKey, stepState), stepState.attemptedCount <= config.retries.limit) { + let durationMs = calcRetryDuration(config, stepState), priorityQueueHash = `${cacheKey}-${stepState.attemptedCount}`; + return await this.#engine.priorityQueue.add({ + hash: priorityQueueHash, + targetTimestamp: Date.now() + durationMs, + type: "retry" + }), await this.#engine.timeoutHandler.release(this.#engine), await scheduler.wait(durationMs), this.#engine.priorityQueue.remove({ + hash: priorityQueueHash, + type: "retry" + }), doWrapper(doWrapperClosure); + } else + throw await this.#engine.timeoutHandler.release(this.#engine), this.#engine.writeLog( + 7 /* STEP_FAILURE */, + cacheKey, + stepNameWithCounter, + {} + ), await this.#state.storage.put(errorKey, error), error; + } + return this.#engine.writeLog( + 6 /* STEP_SUCCESS */, + cacheKey, + stepNameWithCounter, + { + // TODO (WOR-86): Add limits, figure out serialization + result + } + ), await this.#engine.timeoutHandler.release(this.#engine), result; + }; + return doWrapper(closure); + } + async sleep(name, duration) { + typeof duration == "string" && (duration = r(duration)); + let hash = await computeHash(name + duration.toString()), count = this.#getCount("sleep-" + name + duration.toString()), cacheKey = `${hash}-${count}`, sleepNameWithCounter = `${name}-${count}`, sleepKey = `${cacheKey}-value`, sleepLogWrittenKey = `${cacheKey}-log-written`; + if (await this.#state.storage.get(sleepKey) != null) { + let entryPQ = this.#engine.priorityQueue.getFirst( + (a) => a.hash === cacheKey && a.type === "sleep" + ); + entryPQ !== void 0 && (await scheduler.wait(entryPQ.targetTimestamp - Date.now()), this.#engine.priorityQueue.remove({ hash: cacheKey, type: "sleep" })), await this.#state.storage.get(sleepLogWrittenKey) == null && (this.#engine.writeLog( + 9 /* SLEEP_COMPLETE */, + cacheKey, + sleepNameWithCounter, + {} + ), await this.#state.storage.put(sleepLogWrittenKey, !0)); + return; + } + if (this.#engine.writeLog( + 8 /* SLEEP_START */, + cacheKey, + sleepNameWithCounter, + { + durationMs: duration + } + ), !await this.#state.storage.get(INSTANCE_METADATA)) + throw new Error("instanceMetadata is undefined"); + await this.#state.storage.put(sleepKey, !0), await this.#engine.priorityQueue.add({ + hash: cacheKey, + targetTimestamp: Date.now() + duration, + type: "sleep" + }), await scheduler.wait(duration), this.#engine.writeLog( + 9 /* SLEEP_COMPLETE */, + cacheKey, + sleepNameWithCounter, + {} + ), await this.#state.storage.put(sleepLogWrittenKey, !0), this.#engine.priorityQueue.remove({ hash: cacheKey, type: "sleep" }); + } + async sleepUntil(name, timestamp) { + timestamp instanceof Date && (timestamp = timestamp.valueOf()); + let now = Date.now(); + if (timestamp < now) + throw new Error( + "You can't sleep until a time in the past, time-traveler" + ); + return this.sleep(name, timestamp - now); + } +}; + +// ../workflows-shared/src/lib/gracePeriodSemaphore.ts +var ENGINE_TIMEOUT = r("5 minutes"), latestGracePeriodTimestamp, GracePeriodSemaphore = class { + #counter = 0; + callback; + timeoutMs; + constructor(callback, timeoutMs) { + this.callback = callback, this.timeoutMs = timeoutMs; + } + // acquire takes engine to be the same as release + async acquire(_engine) { + this.#counter == 0 && (latestGracePeriodTimestamp = void 0), this.#counter += 1; + } + async release(engine) { + this.#counter = Math.max(this.#counter - 1, 0), this.#counter == 0 && this.callback(engine, this.timeoutMs); + } + isRunningStep() { + return this.#counter > 0; + } +}, startGracePeriod = async (engine, timeoutMs) => { + (async () => { + let thisTimestamp = (/* @__PURE__ */ new Date()).valueOf(); + if (!(latestGracePeriodTimestamp === void 0 || latestGracePeriodTimestamp < thisTimestamp)) + throw new Error( + "Can't start grace period since there is already an active one started on " + latestGracePeriodTimestamp + ); + latestGracePeriodTimestamp = thisTimestamp, await scheduler.wait(timeoutMs), !(thisTimestamp !== latestGracePeriodTimestamp || engine.timeoutHandler.isRunningStep()) && (await engine.priorityQueue?.handleNextAlarm(), await engine.abort("Grace period complete")); + })(); +}; + +// ../workflows-shared/src/lib/timePriorityQueue.ts +var import_heap_js = __toESM(require_heap_js_umd()), wakerPriorityEntryComparator = (a, b) => a.targetTimestamp - b.targetTimestamp; +var TimePriorityQueue = class { + #heap = new import_heap_js.default(wakerPriorityEntryComparator); + // #env: Env; + #ctx; + #instanceMetadata; + constructor(ctx, instanceMetadata) { + this.#ctx = ctx, this.#instanceMetadata = instanceMetadata, this.#heap.init(this.getEntries()); + } + popPastEntries() { + if (this.#heap.length === 0) + return; + let res = [], currentTimestamp = (/* @__PURE__ */ new Date()).valueOf(); + for (; ; ) { + let element = this.#heap.peek(); + if (element === void 0 || element.targetTimestamp > currentTimestamp) + break; + res.push(element), this.#heap.pop(); + } + return this.#ctx.storage.transactionSync(() => { + for (let entry of res) + this.removeEntryDB(entry); + }), res; + } + /** + * `add` is ran using a transaction so it's race condition free, if it's ran atomically + * @param entry + */ + async add(entry) { + await this.#ctx.storage.transaction(async () => { + this.#heap.add(entry), this.addEntryDB(entry); + }); + } + /** + * `remove` is ran using a transaction so it's race condition free, if it's ran atomically + * @param entry + */ + remove(entry) { + this.#ctx.storage.transactionSync(() => { + this.removeFirst((e) => e.hash === entry.hash && e.type === entry.type); + }); + } + popTypeAll(entryType) { + this.#ctx.storage.transactionSync(() => { + this.filter((e) => e.type !== entryType); + }); + } + // Idempotent, perhaps name should suggest so + async handleNextAlarm() { + this.#heap.peek(); + } + getFirst(callbackFn) { + return structuredClone(this.#heap.toArray().find(callbackFn)); + } + removeFirst(callbackFn) { + let elements = this.#heap.toArray(), index = elements.findIndex(callbackFn); + if (index === -1) + return; + let removedEntry = elements.splice(index, 1)[0]; + this.removeEntryDB(removedEntry), this.#heap = new import_heap_js.default(wakerPriorityEntryComparator), this.#heap.init(elements); + } + filter(callbackFn) { + let filteredElements = this.#heap.toArray().filter(callbackFn), removedElements = this.#heap.toArray().filter((a) => !callbackFn(a)); + this.#ctx.storage.transactionSync(() => { + for (let entry of removedElements) + this.removeEntryDB(entry); + }), this.#heap = new import_heap_js.default(wakerPriorityEntryComparator), this.#heap.init(filteredElements); + } + length() { + return this.#heap.length; + } + getEntries() { + let entries = [ + ...this.#ctx.storage.sql.exec("SELECT * FROM priority_queue ORDER BY id") + ], activeEntries = []; + return entries.forEach((val) => { + let entryType = toWakerPriorityType(val.entryType); + if (val.action == 0) { + let index = activeEntries.findIndex( + (activeVal) => val.hash == activeVal.hash && entryType == activeVal.type + ); + index !== -1 && activeEntries.splice(index, 1); + } else + activeEntries.findIndex( + (activeVal) => val.hash == activeVal.hash && entryType == activeVal.type + ) === -1 && activeEntries.push({ + hash: val.hash, + targetTimestamp: val.target_timestamp, + type: entryType + }); + }), activeEntries; + } + removeEntryDB(entry) { + this.#ctx.storage.sql.exec( + ` + INSERT INTO priority_queue (target_timestamp, action, entryType, hash) + VALUES (?, ?, ? ,?) + `, + entry.targetTimestamp, + 0 /* FALSE */, + fromWakerPriorityType(entry.type), + entry.hash + ); + } + addEntryDB(entry) { + this.#ctx.storage.sql.exec( + ` + INSERT INTO priority_queue (target_timestamp, action, entryType, hash) + VALUES (?, ?, ? ,?) + `, + entry.targetTimestamp, + 1 /* TRUE */, + fromWakerPriorityType(entry.type), + entry.hash + ); + } +}, toWakerPriorityType = (entryType) => { + switch (entryType) { + case 0 /* RETRY */: + return "retry"; + case 1 /* SLEEP */: + return "sleep"; + case 2 /* TIMEOUT */: + return "timeout"; + } +}, fromWakerPriorityType = (entryType) => { + switch (entryType) { + case "retry": + return 0 /* RETRY */; + case "sleep": + return 1 /* SLEEP */; + case "timeout": + return 2 /* TIMEOUT */; + default: + throw new Error(`WakerPriorityType "${entryType}" has not been handled`); + } +}; + +// ../workflows-shared/src/engine.ts +var ENGINE_STATUS_KEY = "ENGINE_STATUS", Engine = class extends DurableObject { + logs = []; + isRunning = !1; + accountId; + instanceId; + workflowName; + timeoutHandler; + priorityQueue; + constructor(state, env) { + super(state, env), this.ctx.blockConcurrencyWhile(async () => { + this.ctx.storage.transactionSync(() => { + try { + this.ctx.storage.sql.exec(` + CREATE TABLE IF NOT EXISTS priority_queue ( + id INTEGER PRIMARY KEY NOT NULL, + created_on TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + target_timestamp INTEGER NOT NULL, + action INTEGER NOT NULL, -- should only be 0 or 1 (1 for added, 0 for deleted), + entryType INTEGER NOT NULL, + hash TEXT NOT NULL, + CHECK (action IN (0, 1)), -- guararentee that action can only be 0 or 1 + UNIQUE (action, entryType, hash) + ); + CREATE TABLE IF NOT EXISTS states ( + id INTEGER PRIMARY KEY NOT NULL, + groupKey TEXT, + target TEXT, + metadata TEXT, + event INTEGER NOT NULL + ) + `); + } catch (e) { + throw console.error(e), e; + } + }); + }), this.timeoutHandler = new GracePeriodSemaphore( + startGracePeriod, + ENGINE_TIMEOUT + ); + } + writeLog(event, group, target = null, metadata) { + this.ctx.storage.sql.exec( + "INSERT INTO states (event, groupKey, target, metadata) VALUES (?, ?, ?, ?)", + event, + group, + target, + JSON.stringify(metadata) + ); + } + readLogsFromStep(_cacheKey) { + return []; + } + readLogs() { + return { + logs: [ + ...this.ctx.storage.sql.exec("SELECT event, groupKey, target, metadata FROM states") + ].map((log) => ({ + ...log, + metadata: JSON.parse(log.metadata), + group: log.groupKey + })) + }; + } + async getStatus(_accountId, _instanceId) { + if (this.accountId === void 0) + throw new Error("stub not initialized"); + let res = await this.ctx.storage.get(ENGINE_STATUS_KEY); + return res === void 0 ? 0 /* Queued */ : res; + } + async setStatus(accountId, instanceId, status) { + await this.ctx.storage.put(ENGINE_STATUS_KEY, status); + } + async abort(_reason) { + } + async userTriggeredTerminate() { + } + async init(accountId, workflow, version, instance, event) { + if (this.priorityQueue === void 0 && (this.priorityQueue = new TimePriorityQueue( + this.ctx, + // this.env, + { + accountId, + workflow, + version, + instance, + event + } + )), this.priorityQueue.popPastEntries(), await this.priorityQueue.handleNextAlarm(), this.isRunning) + return; + this.accountId = accountId, this.instanceId = instance.id, this.workflowName = workflow.name; + let status = await this.getStatus(accountId, instance.id); + if ([ + 3 /* Errored */, + // TODO (WOR-85): Remove this once upgrade story is done + 4 /* Terminated */, + 5 /* Complete */ + ].includes(status)) + return; + if (await this.ctx.storage.get(INSTANCE_METADATA) == null) { + let instanceMetadata = { + accountId, + workflow, + version, + instance, + event + }; + await this.ctx.storage.put(INSTANCE_METADATA, instanceMetadata), this.writeLog(0 /* WORKFLOW_QUEUED */, null, null, { + params: event.payload, + versionId: version.id, + trigger: { + source: 0 /* API */ + } + }), this.writeLog(1 /* WORKFLOW_START */, null, null, {}); + } + let stubStep = new Context(this, this.ctx), workflowRunningHandler = async () => { + await this.ctx.storage.transaction(async () => { + await this.setStatus(accountId, instance.id, 1 /* Running */); + }); + }; + this.isRunning = !0, workflowRunningHandler(); + try { + let result = await this.env.USER_WORKFLOW.run(event, stubStep); + this.writeLog(2 /* WORKFLOW_SUCCESS */, null, null, { + result + }), await this.ctx.storage.transaction(async () => { + await this.setStatus(accountId, instance.id, 5 /* Complete */); + }), this.isRunning = !1; + } catch (err) { + let error; + if (err instanceof Error) { + if (err.name === "NonRetryableError" || err.message.startsWith("NonRetryableError")) { + this.writeLog(3 /* WORKFLOW_FAILURE */, null, null, { + error: new WorkflowFatalError( + "The execution of the Workflow instance was terminated, as a step threw an NonRetryableError and it was not handled" + ) + }), await this.setStatus(accountId, instance.id, 3 /* Errored */), await this.abort("A step threw a NonRetryableError"), this.isRunning = !1; + return; + } + error = { + message: err.message, + name: err.name + }; + } else + error = { + name: "Error", + message: err + }; + this.writeLog(3 /* WORKFLOW_FAILURE */, null, null, { + error + }), await this.ctx.storage.transaction(async () => { + await this.setStatus(accountId, instance.id, 3 /* Errored */); + }), this.isRunning = !1; + } + return { + id: instance.id + }; + } +}; +export { + Engine, + WorkflowBinding +}; +//# sourceMappingURL=binding.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/workflows/binding.worker.js.map b/node_modules/miniflare/dist/src/workers/workflows/binding.worker.js.map new file mode 100644 index 0000000..224f2ac --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/workflows/binding.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../../../node_modules/.pnpm/heap-js@2.5.0/node_modules/heap-js/dist/heap-js.umd.js", "../../../../../workflows-shared/src/binding.ts", "../../../../../workflows-shared/src/instance.ts", "../../../../../workflows-shared/src/engine.ts", "../../../../../workflows-shared/src/context.ts", "../../../../../../node_modules/.pnpm/itty-time@1.0.6/node_modules/src/src/lib/units.ts", "../../../../../../node_modules/.pnpm/itty-time@1.0.6/node_modules/src/src/ms.ts", "../../../../../../node_modules/.pnpm/itty-time@1.0.6/node_modules/src/src/datePlus.ts", "../../../../../../node_modules/.pnpm/itty-time@1.0.6/node_modules/src/src/duration.ts", "../../../../../../node_modules/.pnpm/itty-time@1.0.6/node_modules/src/src/seconds.ts", "../../../../../workflows-shared/src/lib/cache.ts", "../../../../../workflows-shared/src/lib/errors.ts", "../../../../../workflows-shared/src/lib/retries.ts", "../../../../../workflows-shared/src/lib/validators.ts", "../../../../../workflows-shared/src/lib/gracePeriodSemaphore.ts", "../../../../../workflows-shared/src/lib/timePriorityQueue.ts"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,KAAC,SAAU,QAAQ,SAAS;AACxB,aAAO,WAAY,YAAY,OAAO,SAAW,MAAc,QAAQ,OAAO,IAC9E,OAAO,UAAW,cAAc,OAAO,MAAM,OAAO,CAAC,SAAS,GAAG,OAAO,KACvE,SAAS,OAAO,aAAe,MAAc,aAAa,UAAU,MAAM,QAAQ,OAAO,OAAO,CAAC,CAAC;AAAA,IACvG,GAAG,SAAO,SAAUA,UAAS;AAAE;AAE3B,UAAI,YAAkD,SAAU,SAAS,YAAY,GAAG,WAAW;AAC/F,iBAAS,MAAM,OAAO;AAAE,iBAAO,iBAAiB,IAAI,QAAQ,IAAI,EAAE,SAAU,SAAS;AAAE,oBAAQ,KAAK;AAAA,UAAG,CAAC;AAAA,QAAG;AAC3G,eAAO,KAAK,MAAM,IAAI,UAAU,SAAU,SAAS,QAAQ;AACvD,mBAAS,UAAU,OAAO;AAAE,gBAAI;AAAE,mBAAK,UAAU,KAAK,KAAK,CAAC;AAAA,YAAG,SAAS,GAAG;AAAE,qBAAO,CAAC;AAAA,YAAG;AAAA,UAAE;AAC1F,mBAAS,SAAS,OAAO;AAAE,gBAAI;AAAE,mBAAK,UAAU,MAAS,KAAK,CAAC;AAAA,YAAG,SAAS,GAAG;AAAE,qBAAO,CAAC;AAAA,YAAG;AAAA,UAAE;AAC7F,mBAAS,KAAK,QAAQ;AAAE,mBAAO,OAAO,QAAQ,OAAO,KAAK,IAAI,MAAM,OAAO,KAAK,EAAE,KAAK,WAAW,QAAQ;AAAA,UAAG;AAC7G,gBAAM,YAAY,UAAU,MAAM,SAAS,cAAc,CAAC,CAAC,GAAG,KAAK,CAAC;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;", + "names": ["exports", "n", "r", "HeapAsync", "i", "self", "j", "_a", "_b", "Heap", "RpcTarget", "units", "year", "day", "month", "week", "hour", "minute", "second", "m", "ms", "duration", "value", "unit", "match", "RpcTarget", "priorityQueueHash", "Heap"] +} diff --git a/node_modules/miniflare/package.json b/node_modules/miniflare/package.json new file mode 100644 index 0000000..9d6e07a --- /dev/null +++ b/node_modules/miniflare/package.json @@ -0,0 +1,109 @@ +{ + "name": "miniflare", + "version": "4.20250317.1", + "description": "Fun, full-featured, fully-local simulator for Cloudflare Workers", + "keywords": [ + "cloudflare", + "workers", + "worker", + "local", + "cloudworker" + ], + "homepage": "https://github.com/cloudflare/workers-sdk/tree/main/packages/miniflare#readme", + "bugs": { + "url": "https://github.com/cloudflare/workers-sdk/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/cloudflare/workers-sdk.git", + "directory": "packages/miniflare" + }, + "license": "MIT", + "author": "MrBBot ", + "main": "./dist/src/index.js", + "types": "./dist/src/index.d.ts", + "bin": { + "miniflare": "bootstrap.js" + }, + "files": [ + "dist/src", + "bootstrap.js" + ], + "dependencies": { + "@cspotcode/source-map-support": "0.8.1", + "acorn": "8.14.0", + "acorn-walk": "8.3.2", + "exit-hook": "2.2.1", + "glob-to-regexp": "0.4.1", + "stoppable": "1.1.0", + "undici": "^5.28.5", + "workerd": "1.20250317.0", + "ws": "8.18.0", + "youch": "3.2.3", + "zod": "3.22.3" + }, + "devDependencies": { + "@ava/typescript": "^4.1.0", + "@cloudflare/workers-types": "^4.20250317.0", + "@microsoft/api-extractor": "7.49.1", + "@types/debug": "^4.1.7", + "@types/estree": "^1.0.0", + "@types/glob-to-regexp": "^0.4.1", + "@types/http-cache-semantics": "^4.0.1", + "@types/mime": "^3.0.4", + "@types/node": "^18.19.75", + "@types/stoppable": "^1.1.1", + "@types/which": "^2.0.1", + "@types/ws": "^8.5.7", + "@typescript-eslint/eslint-plugin": "^6.9.0", + "@typescript-eslint/parser": "^6.9.0", + "ava": "^6.0.1", + "capnp-es": "^0.0.7", + "concurrently": "^8.2.2", + "devalue": "^4.3.0", + "devtools-protocol": "^0.0.1182435", + "esbuild": "0.24.2", + "eslint": "^8.57.1", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-es": "^4.1.0", + "eslint-plugin-prettier": "^5.0.1", + "expect-type": "^0.15.0", + "get-port": "^7.1.0", + "heap-js": "^2.5.0", + "http-cache-semantics": "^4.1.0", + "kleur": "^4.1.5", + "mime": "^3.0.0", + "pretty-bytes": "^6.0.0", + "rimraf": "^5.0.10", + "source-map": "^0.6.1", + "typescript": "^5.7.2", + "which": "^2.0.2", + "@cloudflare/kv-asset-handler": "0.4.0", + "@cloudflare/workers-shared": "0.16.0", + "@cloudflare/workflows-shared": "0.3.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "volta": { + "extends": "../../package.json" + }, + "publishConfig": { + "access": "public" + }, + "workers-sdk": { + "prerelease": true + }, + "scripts": { + "build": "node scripts/build.mjs && pnpm run types:build", + "capnp:workerd": "node scripts/build-capnp.mjs", + "check:lint": "eslint --max-warnings=0 \"{src,test}/**/*.ts\" \"scripts/**/*.{js,mjs}\" \"types/**/*.ts\"", + "check:type": "tsc", + "clean": "rimraf ./dist ./dist-types", + "dev": "concurrently -n esbuild,typechk,typewrk -c yellow,blue,blue.dim \"node scripts/build.mjs watch\" \"node scripts/types.mjs tsconfig.json watch\" \"node scripts/types.mjs src/workers/tsconfig.json watch\"", + "lint:fix": "pnpm run check:lint --fix", + "test": "node scripts/build.mjs && ava && rimraf ./.tmp", + "test:ci": "pnpm run test", + "types:build": "node scripts/types.mjs tsconfig.json && node scripts/types.mjs src/workers/tsconfig.json" + } +} \ No newline at end of file diff --git a/node_modules/ms/index.js b/node_modules/ms/index.js new file mode 100644 index 0000000..6a522b1 --- /dev/null +++ b/node_modules/ms/index.js @@ -0,0 +1,152 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + if (ms >= d) { + return Math.round(ms / d) + 'd'; + } + if (ms >= h) { + return Math.round(ms / h) + 'h'; + } + if (ms >= m) { + return Math.round(ms / m) + 'm'; + } + if (ms >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + return plural(ms, d, 'day') || + plural(ms, h, 'hour') || + plural(ms, m, 'minute') || + plural(ms, s, 'second') || + ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, n, name) { + if (ms < n) { + return; + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + ' ' + name; + } + return Math.ceil(ms / n) + ' ' + name + 's'; +} diff --git a/node_modules/ms/license.md b/node_modules/ms/license.md new file mode 100644 index 0000000..69b6125 --- /dev/null +++ b/node_modules/ms/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Zeit, Inc. + +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. diff --git a/node_modules/ms/package.json b/node_modules/ms/package.json new file mode 100644 index 0000000..6a31c81 --- /dev/null +++ b/node_modules/ms/package.json @@ -0,0 +1,37 @@ +{ + "name": "ms", + "version": "2.0.0", + "description": "Tiny milisecond conversion utility", + "repository": "zeit/ms", + "main": "./index", + "files": [ + "index.js" + ], + "scripts": { + "precommit": "lint-staged", + "lint": "eslint lib/* bin/*", + "test": "mocha tests.js" + }, + "eslintConfig": { + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + } + }, + "lint-staged": { + "*.js": [ + "npm run lint", + "prettier --single-quote --write", + "git add" + ] + }, + "license": "MIT", + "devDependencies": { + "eslint": "3.19.0", + "expect.js": "0.3.1", + "husky": "0.13.3", + "lint-staged": "3.4.1", + "mocha": "3.4.1" + } +} diff --git a/node_modules/ms/readme.md b/node_modules/ms/readme.md new file mode 100644 index 0000000..84a9974 --- /dev/null +++ b/node_modules/ms/readme.md @@ -0,0 +1,51 @@ +# ms + +[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) +[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) + +Use this package to easily convert various time formats to milliseconds. + +## Examples + +```js +ms('2 days') // 172800000 +ms('1d') // 86400000 +ms('10h') // 36000000 +ms('2.5 hrs') // 9000000 +ms('2h') // 7200000 +ms('1m') // 60000 +ms('5s') // 5000 +ms('1y') // 31557600000 +ms('100') // 100 +``` + +### Convert from milliseconds + +```js +ms(60000) // "1m" +ms(2 * 60000) // "2m" +ms(ms('10 hours')) // "10h" +``` + +### Time format written-out + +```js +ms(60000, { long: true }) // "1 minute" +ms(2 * 60000, { long: true }) // "2 minutes" +ms(ms('10 hours'), { long: true }) // "10 hours" +``` + +## Features + +- Works both in [node](https://nodejs.org) and in the browser. +- If a number is supplied to `ms`, a string with a unit is returned. +- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). +- If you pass a string with a number and a valid unit, the number of equivalent ms is returned. + +## Caught a bug? + +1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device +2. Link the package to the global module directory: `npm link` +3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! + +As always, you can run the tests using: `npm test` diff --git a/node_modules/mustache/CHANGELOG.md b/node_modules/mustache/CHANGELOG.md new file mode 100644 index 0000000..b1f72d0 --- /dev/null +++ b/node_modules/mustache/CHANGELOG.md @@ -0,0 +1,618 @@ +# Change Log + +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](http://semver.org/). + +## [4.2.0] / 28 March 2021 + +### Added + +* [#773]: Add package.json `exports` field, by [@manzt]. + +## [4.1.0] / 6 December 2020 + +### Added + +* [#764]: `render()` now recognizes a config object argument, by [@pineapplemachine]. + +### Fixed + +* [#764]: Ask custom `escape` functions to escape all types of values (including `number`s), by [@pineapplemachine]. + +## [4.0.1] / 15 March 2020 + +### Fixed + + * [#739]: Fix custom delimiters in nested partials, by [@aielo]. + +## [4.0.0] / 16 January 2020 + +Majority of using projects don't have to worry by this being a new major version. + +**TLDR;** if your project manipulates `Writer.prototype.parse | Writer.cache` directly or uses `.to_html()`, you probably have to change that code. + +This release allows the internal template cache to be customised, either by disabling it completely +or provide a custom strategy deciding how the cache should behave when mustache.js parses templates. + +```js +const mustache = require('mustache'); + +// disable caching +Mustache.templateCache = undefined; + +// or use a built-in Map in modern environments +Mustache.templateCache = new Map(); +``` + +Projects that wanted to customise the caching behaviour in earlier versions of mustache.js were forced to +override internal method responsible for parsing templates; `Writer.prototype.parse`. In short, that was unfortunate +because there is more than caching happening in that method. + +We've improved that now by introducing a first class API that only affects template caching. + +The default template cache behaves as before and is still compatible with older JavaScript environments. +For those who wants to provide a custom more sopisiticated caching strategy, one can do that with an object that adheres to the following requirements: + +```ts +{ + set(cacheKey: string, value: string): void + get(cacheKey: string): string | undefined + clear(): void +} +``` + +### Added + +* [#731]: Allow template caching to be customised, by [@AndrewLeedham]. + +### Removed + +* [#735]: Remove `.to_html()`, by [@phillipj]. + +## [3.2.1] / 30 December 2019 + +### Fixed + + * [#733]: Allow the CLI to use JavaScript views when the project has ES6 modules enabled, by [@eobrain]. + +## [3.2.0] / 18 December 2019 + +### Added + +* [#728]: Expose ECMAScript Module in addition to UMD (CommonJS, AMD & global scope), by [@phillipj] and [@zekth]. + +### Using mustache.js as an ES module + +To stay backwards compatible with already using projects, the default exposed module format is still UMD. +That means projects using mustache.js as an CommonJS, AMD or global scope module, from npm or directly from github.com +can keep on doing that for now. + +For those projects who would rather want to use mustache.js as an ES module, the `mustache/mustache.mjs` file has to +be `import`ed directly. + +Below are some usage scenarios for different runtimes. + +#### Modern browser with ES module support + +```html + + +``` + +#### [Node.js](https://nodejs.org) (>= v13.2.0 or using --experimental-modules flag) + +```js +// index.mjs +import mustache from 'mustache/mustache.mjs' + +console.log(mustache.render('Hello {{name}}!', { name: 'Santa' })) +// Hello Santa! +``` + +ES Module support for Node.js will be improved in the future when [Conditional Exports](https://nodejs.org/api/esm.html#esm_conditional_exports) +is enabled by default rather than being behind an experimental flag. + +More info in [Node.js ECMAScript Modules docs](https://nodejs.org/api/esm.html). + +#### [Deno](https://deno.land/) + +```js +// index.ts +import mustache from 'https://unpkg.com/mustache@3.2.0/mustache.mjs' + +console.log(mustache.render('Hello {{name}}!', { name: 'Santa' })) +// Hello Santa! +``` + +## [3.1.0] / 13 September 2019 + +### Added + + * [#717]: Added support .js files as views in command line tool, by [@JEStaubach]. + +### Fixed + + * [#716]: Bugfix for indentation of inline partials, by [@yotammadem]. + +## [3.0.3] / 27 August 2019 + +### Added + + * [#713]: Add test cases for custom functions in partials, by [@wol-soft]. + +### Fixed + + * [#714]: Bugfix for wrong function output in partials with indentation, by [@phillipj]. + +## [3.0.2] / 21 August 2019 + +### Fixed + + * [#705]: Fix indentation of partials, by [@kevindew] and [@yotammadem]. + +### Dev + + * [#701]: Fix test failure for Node 10 and above, by [@andersk]. + * [#704]: Lint all test files just like the source files, by [@phillipj]. + * Start experimenting & comparing GitHub Actions vs Travis CI, by [@phillipj]. + +## [3.0.1] / 11 November 2018 + + * [#679]: Fix partials not rendering tokens when using custom tags, by [@stackchain]. + +## [3.0.0] / 16 September 2018 + +We are very happy to announce a new major version of mustache.js. We want to be very careful not to break projects +out in the wild, and adhering to [Semantic Versioning](http://semver.org/) we have therefore cut this new major version. + +The changes introduced will likely not require any actions for most using projects. The things to look out for that +might cause unexpected rendering results are described in the migration guide below. + +A big shout out and thanks to [@raymond-lam] for this release! Without his contributions with code and issue triaging, +this release would never have happened. + +### Major + +* [#618]: Allow rendering properties of primitive types that are not objects, by [@raymond-lam]. +* [#643]: `Writer.prototype.parse` to cache by tags in addition to template string, by [@raymond-lam]. +* [#664]: Fix `Writer.prototype.parse` cache, by [@seminaoki]. + +### Minor + +* [#673]: Add `tags` parameter to `Mustache.render()`, by [@raymond-lam]. + +### Migrating from mustache.js v2.x to v3.x + +#### Rendering properties of primitive types + +We have ensured properties of primitive types can be rendered at all times. That means `Array.length`, `String.length` +and similar. A corner case where this could cause unexpected output follows: + +View: +``` +{ + stooges: [ + { name: "Moe" }, + { name: "Larry" }, + { name: "Curly" } + ] +} +``` + +Template: +``` +{{#stooges}} + {{name}}: {{name.length}} characters +{{/stooges}} +``` + +Output with v3.0: +``` + Moe: 3 characters + Larry: 5 characters + Curly: 5 characters +``` + +Output with v2.x: +``` + Moe: characters + Larry: characters + Curly: characters +``` + +#### Caching for templates with custom delimiters + +We have improved the templates cache to ensure custom delimiters are taken into consideration for the cache. +This improvement might cause unexpected rendering behaviour for using projects actively using the custom delimiters functionality. + +Previously it was possible to use `Mustache.parse()` as a means to set global custom delimiters. If custom +delimiters were provided as an argument, it would affect all following calls to `Mustache.render()`. +Consider the following: + +```js +const template = "[[item.title]] [[item.value]]"; +mustache.parse(template, ["[[", "]]"]); + +console.log( + mustache.render(template, { + item: { + title: "TEST", + value: 1 + } + }) +); + +>> TEST 1 +``` + +The above illustrates the fact that `Mustache.parse()` made mustache.js cache the template without considering +the custom delimiters provided. This is no longer true. + +We no longer encourage using `Mustache.parse()` for this purpose, but have rather added a fourth argument to +`Mustache.render()` letting you provide custom delimiters when rendering. + +If you still need the pre-parse the template and use custom delimiters at the same time, ensure to provide +the custom delimiters as argument to `Mustache.render()` as well. + +## [2.3.2] / 17 August 2018 + +This release is made to revert changes introduced in [2.3.1] that caused unexpected behaviour for several users. + +### Minor + + * [#670]: Rollback template cache causing unexpected behaviour, by [@raymond-lam]. + +## [2.3.1] / 7 August 2018 + +### Minor + + * [#643]: `Writer.prototype.parse` to cache by tags in addition to template string, by [@raymond-lam]. + * [#664]: Fix `Writer.prototype.parse` cache, by [@seminaoki]. + +### Dev + + * [#666]: Install release tools with npm rather than pre-commit hook & `Rakefile`, by [@phillipj]. + * [#667], [#668]: Stabilize browser test suite, by [@phillipj]. + +### Docs + + * [#644]: Document global Mustache.escape overriding capacity, by [@paultopia]. + * [#657]: Correct `Mustache.parse()` return type documentation, by [@bbrooks]. + +## [2.3.0] / 8 November 2016 + +### Minor + + * [#540]: Add optional `output` argument to mustache CLI, by [@wizawu]. + * [#597]: Add compatibility with amdclean, by [@mightyplow]. + +### Dev + + * [#553]: Assert `null` lookup when rendering an unescaped value, by [@dasilvacontin]. + * [#580], [#610]: Ignore eslint for greenkeeper updates, by [@phillipj]. + * [#560]: Fix CLI tests for Windows, by [@kookookchoozeus]. + * Run browser tests w/node v4, by [@phillipj]. + +### Docs + + * [#542]: Add API documentation to README, by [@tomekwi]. + * [#546]: Add missing syntax highlighting to README code blocks, by [@pra85]. + * [#569]: Update Ctemplate links in README, by [@mortonfox]. + * [#592]: Change "loadUser" to "loadUser()" in README, by [@Flaque]. + * [#593]: Adding doctype to HTML code example in README, by [@calvinf]. + +### Dependencies + + * eslint -> 2.2.0. Breaking changes fix by [@phillipj]. [#548] + * eslint -> 2.5.1. + * mocha -> 3.0.2. + * zuul -> 3.11.0. + +## [2.2.1] / 13 December 2015 + +### Fixes + + * Improve HTML escaping, by [@phillipj]. + * Fix inconsistency in defining global mustache object, by [@simast]. + * Fix switch-case indent error, by [@norfish]. + * Unpin chai and eslint versions, by [@dasilvacontin]. + * Update README.md with proper grammar, by [@EvanLovely]. + * Update mjackson username in README, by [@mjackson]. + * Remove syntax highlighting in README code sample, by [@imagentleman]. + * Fix typo in README, by [@Xcrucifier]. + * Fix link typo in README, by [@keirog]. + +## [2.2.0] / 15 October 2015 + +### Added + + * Add Partials support to CLI, by [@palkan]. + +### Changed + + * Move install instructions to README's top, by [@mateusortiz] + * Improved devhook install output, by [@ShashankaNataraj]. + * Clarifies and improves language in documentation, by [@jfmercer]. + * Linting CLI tool, by [@phillipj]. + * npm 2.x and node v4 on Travis, by [@phillipj]. + +### Fixes + + * Fix README spelling error to "aforementioned", by [@djchie]. + * Equal error message test in .render() for server and browser, by [@phillipj]. + +### Dependencies + + * chai -> 3.3.0 + * eslint -> 1.6.0 + +## [2.1.3] / 23 July 2015 + +### Added + + * Throw error when providing .render() with invalid template type, by [@phillipj]. + * Documents use of string literals containing double quotes, by [@jfmercer]. + +### Changed + + * Move mustache gif to githubusercontent, by [@Andersos]. + +### Fixed + + * Update UMD Shim to be resilient to HTMLElement global pollution, by [@mikesherov]. + +## [2.1.2] / 17 June 2015 + +### Added + + * Mustache global definition ([#466]) by [@yousefcisco]. + +## [2.1.1] / 11 June 2015 + +### Added + + * State that we use semver on the change log, by [@dasilvacontin]. + * Added version links to change log, by [@dasilvacontin]. + +### Fixed + + * Bugfix for using values from view's context prototype, by [@phillipj]. + * Improve test with undefined/null lookup hit using dot notation, by [@dasilvacontin]. + * Bugfix for null/undefined lookup hit when using dot notation, by [@phillipj]. + * Remove moot `version` property from bower.json, by [@kkirsche]. + * bower.json doesn't require a version bump via hook, by [@dasilvacontin]. + + +## [2.1.0] / 5 June 2015 + + * Added license attribute to package.json, by [@pgilad]. + * Minor changes to make mustache.js compatible with both WSH and ASP, by [@nagaozen]. + * Improve CLI view parsing error, by [@phillipj]. + * Bugfix for view context cache, by [@phillipj]. + +## [2.0.0] / 27 Mar 2015 + + * Fixed lookup not stopping upon finding `undefined` or `null` values, by [@dasilvacontin]. + * Refactored pre-commit hook, by [@dasilvacontin]. + +## [1.2.0] / 24 Mar 2015 + + * Added -v option to CLI, by [@phillipj]. + * Bugfix for rendering Number when it serves as the Context, by [@phillipj]. + * Specified files in package.json for a cleaner install, by [@phillipj]. + +## [1.1.0] / 18 Feb 2015 + + * Refactor Writer.renderTokens() for better readability, by [@phillipj]. + * Cleanup tests section in readme, by [@phillipj]. + * Added JSHint to tests/CI, by [@phillipj]. + * Added node v0.12 on travis, by [@phillipj]. + * Created command line tool, by [@phillipj]. + * Added *falsy* to Inverted Sections description in README, by [@kristijanmatic]. + +## [1.0.0] / 20 Dec 2014 + + * Inline tag compilation, by [@mjackson]. + * Fixed AMD registration, volo package.json entry, by [@jrburke]. + * Added spm support, by [@afc163]. + * Only access properties of objects on Context.lookup, by [@cmbuckley]. + +## [0.8.2] / 17 Mar 2014 + + * Supporting Bower through a bower.json file. + +## [0.8.1] / 3 Jan 2014 + + * Fix usage of partial templates. + +## [0.8.0] / 2 Dec 2013 + + * Remove compile* writer functions, use mustache.parse instead. Smaller API. + * Throw an error when rendering a template that contains higher-order sections and + the original template is not provided. + * Remove low-level Context.make function. + * Better code readability and inline documentation. + * Stop caching templates by name. + +## [0.7.3] / 5 Nov 2013 + + * Don't require the original template to be passed to the rendering function + when using compiled templates. This is still required when using higher-order + functions in order to be able to extract the portion of the template + that was contained by that section. Fixes [#262]. + * Performance improvements. + +## [0.7.2] / 27 Dec 2012 + + * Fixed a rendering bug ([#274]) when using nested higher-order sections. + * Better error reporting on failed parse. + * Converted tests to use mocha instead of vows. + +## [0.7.1] / 6 Dec 2012 + + * Handle empty templates gracefully. Fixes [#265], [#267], and [#270]. + * Cache partials by template, not by name. Fixes [#257]. + * Added Mustache.compileTokens to compile the output of Mustache.parse. Fixes + [#258]. + +## [0.7.0] / 10 Sep 2012 + + * Rename Renderer => Writer. + * Allow partials to be loaded dynamically using a callback (thanks + [@TiddoLangerak] for the suggestion). + * Fixed a bug with higher-order sections that prevented them from being + passed the raw text of the section from the original template. + * More concise token format. Tokens also include start/end indices in the + original template. + * High-level API is consistent with the Writer API. + * Allow partials to be passed to the pre-compiled function (thanks + [@fallenice]). + * Don't use eval (thanks [@cweider]). + +## [0.6.0] / 31 Aug 2012 + + * Use JavaScript's definition of falsy when determining whether to render an + inverted section or not. Issue [#186]. + * Use Mustache.escape to escape values inside {{}}. This function may be + reassigned to alter the default escaping behavior. Issue [#244]. + * Fixed a bug that clashed with QUnit (thanks [@kannix]). + * Added volo support (thanks [@guybedford]). + +[4.1.0]: https://github.com/janl/mustache.js/compare/v4.0.1...v4.1.0 +[4.0.1]: https://github.com/janl/mustache.js/compare/v4.0.0...v4.0.1 +[4.0.0]: https://github.com/janl/mustache.js/compare/v3.2.1...v4.0.0 +[3.2.1]: https://github.com/janl/mustache.js/compare/v3.2.0...v3.2.1 +[3.2.0]: https://github.com/janl/mustache.js/compare/v3.1.0...v3.2.0 +[3.1.0]: https://github.com/janl/mustache.js/compare/v3.0.3...v3.1.0 +[3.0.3]: https://github.com/janl/mustache.js/compare/v3.0.2...v3.0.3 +[3.0.2]: https://github.com/janl/mustache.js/compare/v3.0.1...v3.0.2 +[3.0.1]: https://github.com/janl/mustache.js/compare/v3.0.0...v3.0.1 +[3.0.0]: https://github.com/janl/mustache.js/compare/v2.3.2...v3.0.0 +[2.3.2]: https://github.com/janl/mustache.js/compare/v2.3.1...v2.3.2 +[2.3.1]: https://github.com/janl/mustache.js/compare/v2.3.0...v2.3.1 +[2.3.0]: https://github.com/janl/mustache.js/compare/v2.2.1...v2.3.0 +[2.2.1]: https://github.com/janl/mustache.js/compare/v2.2.0...v2.2.1 +[2.2.0]: https://github.com/janl/mustache.js/compare/v2.1.3...v2.2.0 +[2.1.3]: https://github.com/janl/mustache.js/compare/v2.1.2...v2.1.3 +[2.1.2]: https://github.com/janl/mustache.js/compare/v2.1.1...v2.1.2 +[2.1.1]: https://github.com/janl/mustache.js/compare/v2.1.0...v2.1.1 +[2.1.0]: https://github.com/janl/mustache.js/compare/v2.0.0...v2.1.0 +[2.0.0]: https://github.com/janl/mustache.js/compare/v1.2.0...v2.0.0 +[1.2.0]: https://github.com/janl/mustache.js/compare/v1.1.0...v1.2.0 +[1.1.0]: https://github.com/janl/mustache.js/compare/v1.0.0...v1.1.0 +[1.0.0]: https://github.com/janl/mustache.js/compare/0.8.2...v1.0.0 +[0.8.2]: https://github.com/janl/mustache.js/compare/0.8.1...0.8.2 +[0.8.1]: https://github.com/janl/mustache.js/compare/0.8.0...0.8.1 +[0.8.0]: https://github.com/janl/mustache.js/compare/0.7.3...0.8.0 +[0.7.3]: https://github.com/janl/mustache.js/compare/0.7.2...0.7.3 +[0.7.2]: https://github.com/janl/mustache.js/compare/0.7.1...0.7.2 +[0.7.1]: https://github.com/janl/mustache.js/compare/0.7.0...0.7.1 +[0.7.0]: https://github.com/janl/mustache.js/compare/0.6.0...0.7.0 +[0.6.0]: https://github.com/janl/mustache.js/compare/0.5.2...0.6.0 + +[#186]: https://github.com/janl/mustache.js/issues/186 +[#244]: https://github.com/janl/mustache.js/issues/244 +[#257]: https://github.com/janl/mustache.js/issues/257 +[#258]: https://github.com/janl/mustache.js/issues/258 +[#262]: https://github.com/janl/mustache.js/issues/262 +[#265]: https://github.com/janl/mustache.js/issues/265 +[#267]: https://github.com/janl/mustache.js/issues/267 +[#270]: https://github.com/janl/mustache.js/issues/270 +[#274]: https://github.com/janl/mustache.js/issues/274 +[#466]: https://github.com/janl/mustache.js/issues/466 +[#540]: https://github.com/janl/mustache.js/issues/540 +[#542]: https://github.com/janl/mustache.js/issues/542 +[#546]: https://github.com/janl/mustache.js/issues/546 +[#548]: https://github.com/janl/mustache.js/issues/548 +[#553]: https://github.com/janl/mustache.js/issues/553 +[#560]: https://github.com/janl/mustache.js/issues/560 +[#569]: https://github.com/janl/mustache.js/issues/569 +[#580]: https://github.com/janl/mustache.js/issues/580 +[#592]: https://github.com/janl/mustache.js/issues/592 +[#593]: https://github.com/janl/mustache.js/issues/593 +[#597]: https://github.com/janl/mustache.js/issues/597 +[#610]: https://github.com/janl/mustache.js/issues/610 +[#643]: https://github.com/janl/mustache.js/issues/643 +[#644]: https://github.com/janl/mustache.js/issues/644 +[#657]: https://github.com/janl/mustache.js/issues/657 +[#664]: https://github.com/janl/mustache.js/issues/664 +[#666]: https://github.com/janl/mustache.js/issues/666 +[#667]: https://github.com/janl/mustache.js/issues/667 +[#668]: https://github.com/janl/mustache.js/issues/668 +[#670]: https://github.com/janl/mustache.js/issues/670 +[#618]: https://github.com/janl/mustache.js/issues/618 +[#673]: https://github.com/janl/mustache.js/issues/673 +[#679]: https://github.com/janl/mustache.js/issues/679 +[#701]: https://github.com/janl/mustache.js/issues/701 +[#704]: https://github.com/janl/mustache.js/issues/704 +[#705]: https://github.com/janl/mustache.js/issues/705 +[#713]: https://github.com/janl/mustache.js/issues/713 +[#714]: https://github.com/janl/mustache.js/issues/714 +[#716]: https://github.com/janl/mustache.js/issues/716 +[#717]: https://github.com/janl/mustache.js/issues/717 +[#728]: https://github.com/janl/mustache.js/issues/728 +[#733]: https://github.com/janl/mustache.js/issues/733 +[#731]: https://github.com/janl/mustache.js/issues/731 +[#735]: https://github.com/janl/mustache.js/issues/735 +[#739]: https://github.com/janl/mustache.js/issues/739 +[#764]: https://github.com/janl/mustache.js/issues/764 +[#773]: https://github.com/janl/mustache.js/issues/773 + +[@afc163]: https://github.com/afc163 +[@aielo]: https://github.com/aielo +[@andersk]: https://github.com/andersk +[@Andersos]: https://github.com/Andersos +[@AndrewLeedham]: https://github.com/AndrewLeedham +[@bbrooks]: https://github.com/bbrooks +[@calvinf]: https://github.com/calvinf +[@cmbuckley]: https://github.com/cmbuckley +[@cweider]: https://github.com/cweider +[@dasilvacontin]: https://github.com/dasilvacontin +[@djchie]: https://github.com/djchie +[@eobrain]: https://github.com/eobrain +[@EvanLovely]: https://github.com/EvanLovely +[@fallenice]: https://github.com/fallenice +[@Flaque]: https://github.com/Flaque +[@guybedford]: https://github.com/guybedford +[@imagentleman]: https://github.com/imagentleman +[@JEStaubach]: https://github.com/JEStaubach +[@jfmercer]: https://github.com/jfmercer +[@jrburke]: https://github.com/jrburke +[@kannix]: https://github.com/kannix +[@keirog]: https://github.com/keirog +[@kkirsche]: https://github.com/kkirsche +[@kookookchoozeus]: https://github.com/kookookchoozeus +[@kristijanmatic]: https://github.com/kristijanmatic +[@kevindew]: https://github.com/kevindew +[@manzt]: https://github.com/manzt +[@mateusortiz]: https://github.com/mateusortiz +[@mightyplow]: https://github.com/mightyplow +[@mikesherov]: https://github.com/mikesherov +[@mjackson]: https://github.com/mjackson +[@mortonfox]: https://github.com/mortonfox +[@nagaozen]: https://github.com/nagaozen +[@norfish]: https://github.com/norfish +[@palkan]: https://github.com/palkan +[@paultopia]: https://github.com/paultopia +[@pgilad]: https://github.com/pgilad +[@phillipj]: https://github.com/phillipj +[@pineapplemachine]: https://github.com/pineapplemachine +[@pra85]: https://github.com/pra85 +[@raymond-lam]: https://github.com/raymond-lam +[@seminaoki]: https://github.com/seminaoki +[@ShashankaNataraj]: https://github.com/ShashankaNataraj +[@simast]: https://github.com/simast +[@stackchain]: https://github.com/stackchain +[@TiddoLangerak]: https://github.com/TiddoLangerak +[@tomekwi]: https://github.com/tomekwi +[@wizawu]: https://github.com/wizawu +[@wol-soft]: https://github.com/wol-soft +[@Xcrucifier]: https://github.com/Xcrucifier +[@yotammadem]: https://github.com/yotammadem +[@yousefcisco]: https://github.com/yousefcisco +[@zekth]: https://github.com/zekth diff --git a/node_modules/mustache/LICENSE b/node_modules/mustache/LICENSE new file mode 100644 index 0000000..4df7d1a --- /dev/null +++ b/node_modules/mustache/LICENSE @@ -0,0 +1,11 @@ +The MIT License + +Copyright (c) 2009 Chris Wanstrath (Ruby) +Copyright (c) 2010-2014 Jan Lehnardt (JavaScript) +Copyright (c) 2010-2015 The mustache.js community + +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. diff --git a/node_modules/mustache/README.md b/node_modules/mustache/README.md new file mode 100644 index 0000000..127dfe1 --- /dev/null +++ b/node_modules/mustache/README.md @@ -0,0 +1,621 @@ +# mustache.js - Logic-less {{mustache}} templates with JavaScript + +> What could be more logical awesome than no logic at all? + +[![Build Status](https://travis-ci.org/janl/mustache.js.svg?branch=master)](https://travis-ci.org/janl/mustache.js) + +[mustache.js](http://github.com/janl/mustache.js) is a zero-dependency implementation of the [mustache](http://mustache.github.com/) template system in JavaScript. + +[Mustache](http://mustache.github.com/) is a logic-less template syntax. It can be used for HTML, config files, source code - anything. It works by expanding tags in a template using values provided in a hash or object. + +We call it "logic-less" because there are no if statements, else clauses, or for loops. Instead there are only tags. Some tags are replaced with a value, some nothing, and others a series of values. + +For a language-agnostic overview of mustache's template syntax, see the `mustache(5)` [manpage](http://mustache.github.com/mustache.5.html). + +## Where to use mustache.js? + +You can use mustache.js to render mustache templates anywhere you can use JavaScript. This includes web browsers, server-side environments such as [Node.js](http://nodejs.org/), and [CouchDB](http://couchdb.apache.org/) views. + +mustache.js ships with support for the [CommonJS](http://www.commonjs.org/) module API, the [Asynchronous Module Definition](https://github.com/amdjs/amdjs-api/wiki/AMD) API (AMD) and [ECMAScript modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules). + +In addition to being a package to be used programmatically, you can use it as a [command line tool](#command-line-tool). + +And this will be your templates after you use Mustache: + +!['stache](https://cloud.githubusercontent.com/assets/288977/8779228/a3cf700e-2f02-11e5-869a-300312fb7a00.gif) + +## Install + +You can get Mustache via [npm](http://npmjs.com). + +```bash +$ npm install mustache --save +``` + +## Usage + +Below is a quick example how to use mustache.js: + +```js +var view = { + title: "Joe", + calc: function () { + return 2 + 4; + } +}; + +var output = Mustache.render("{{title}} spends {{calc}}", view); +``` + +In this example, the `Mustache.render` function takes two parameters: 1) the [mustache](http://mustache.github.com/) template and 2) a `view` object that contains the data and code needed to render the template. + +## Templates + +A [mustache](http://mustache.github.com/) template is a string that contains any number of mustache tags. Tags are indicated by the double mustaches that surround them. `{{person}}` is a tag, as is `{{#person}}`. In both examples we refer to `person` as the tag's key. There are several types of tags available in mustache.js, described below. + +There are several techniques that can be used to load templates and hand them to mustache.js, here are two of them: + +#### Include Templates + +If you need a template for a dynamic part in a static website, you can consider including the template in the static HTML file to avoid loading templates separately. Here's a small example: + +```js +// file: render.js + +function renderHello() { + var template = document.getElementById('template').innerHTML; + var rendered = Mustache.render(template, { name: 'Luke' }); + document.getElementById('target').innerHTML = rendered; +} +``` + +```html + + +

Loading...
+ + + + + + +``` + +#### Load External Templates + +If your templates reside in individual files, you can load them asynchronously and render them when they arrive. Another example using [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch): + +```js +function renderHello() { + fetch('template.mustache') + .then((response) => response.text()) + .then((template) => { + var rendered = Mustache.render(template, { name: 'Luke' }); + document.getElementById('target').innerHTML = rendered; + }); +} +``` + +### Variables + +The most basic tag type is a simple variable. A `{{name}}` tag renders the value of the `name` key in the current context. If there is no such key, nothing is rendered. + +All variables are HTML-escaped by default. If you want to render unescaped HTML, use the triple mustache: `{{{name}}}`. You can also use `&` to unescape a variable. + +If you'd like to change HTML-escaping behavior globally (for example, to template non-HTML formats), you can override Mustache's escape function. For example, to disable all escaping: `Mustache.escape = function(text) {return text;};`. + +If you want `{{name}}` _not_ to be interpreted as a mustache tag, but rather to appear exactly as `{{name}}` in the output, you must change and then restore the default delimiter. See the [Custom Delimiters](#custom-delimiters) section for more information. + +View: + +```json +{ + "name": "Chris", + "company": "GitHub" +} +``` + +Template: + +``` +* {{name}} +* {{age}} +* {{company}} +* {{{company}}} +* {{&company}} +{{=<% %>=}} +* {{company}} +<%={{ }}=%> +``` + +Output: + +```html +* Chris +* +* <b>GitHub</b> +* GitHub +* GitHub +* {{company}} +``` + +JavaScript's dot notation may be used to access keys that are properties of objects in a view. + +View: + +```json +{ + "name": { + "first": "Michael", + "last": "Jackson" + }, + "age": "RIP" +} +``` + +Template: + +```html +* {{name.first}} {{name.last}} +* {{age}} +``` + +Output: + +```html +* Michael Jackson +* RIP +``` + +### Sections + +Sections render blocks of text zero or more times, depending on the value of the key in the current context. + +A section begins with a pound and ends with a slash. That is, `{{#person}}` begins a `person` section, while `{{/person}}` ends it. The text between the two tags is referred to as that section's "block". + +The behavior of the section is determined by the value of the key. + +#### False Values or Empty Lists + +If the `person` key does not exist, or exists and has a value of `null`, `undefined`, `false`, `0`, or `NaN`, or is an empty string or an empty list, the block will not be rendered. + +View: + +```json +{ + "person": false +} +``` + +Template: + +```html +Shown. +{{#person}} +Never shown! +{{/person}} +``` + +Output: + +```html +Shown. +``` + +#### Non-Empty Lists + +If the `person` key exists and is not `null`, `undefined`, or `false`, and is not an empty list the block will be rendered one or more times. + +When the value is a list, the block is rendered once for each item in the list. The context of the block is set to the current item in the list for each iteration. In this way we can loop over collections. + +View: + +```json +{ + "stooges": [ + { "name": "Moe" }, + { "name": "Larry" }, + { "name": "Curly" } + ] +} +``` + +Template: + +```html +{{#stooges}} +{{name}} +{{/stooges}} +``` + +Output: + +```html +Moe +Larry +Curly +``` + +When looping over an array of strings, a `.` can be used to refer to the current item in the list. + +View: + +```json +{ + "musketeers": ["Athos", "Aramis", "Porthos", "D'Artagnan"] +} +``` + +Template: + +```html +{{#musketeers}} +* {{.}} +{{/musketeers}} +``` + +Output: + +```html +* Athos +* Aramis +* Porthos +* D'Artagnan +``` + +If the value of a section variable is a function, it will be called in the context of the current item in the list on each iteration. + +View: + +```js +{ + "beatles": [ + { "firstName": "John", "lastName": "Lennon" }, + { "firstName": "Paul", "lastName": "McCartney" }, + { "firstName": "George", "lastName": "Harrison" }, + { "firstName": "Ringo", "lastName": "Starr" } + ], + "name": function () { + return this.firstName + " " + this.lastName; + } +} +``` + +Template: + +```html +{{#beatles}} +* {{name}} +{{/beatles}} +``` + +Output: + +```html +* John Lennon +* Paul McCartney +* George Harrison +* Ringo Starr +``` + +#### Functions + +If the value of a section key is a function, it is called with the section's literal block of text, un-rendered, as its first argument. The second argument is a special rendering function that uses the current view as its view argument. It is called in the context of the current view object. + +View: + +```js +{ + "name": "Tater", + "bold": function () { + return function (text, render) { + return "" + render(text) + ""; + } + } +} +``` + +Template: + +```html +{{#bold}}Hi {{name}}.{{/bold}} +``` + +Output: + +```html +Hi Tater. +``` + +### Inverted Sections + +An inverted section opens with `{{^section}}` instead of `{{#section}}`. The block of an inverted section is rendered only if the value of that section's tag is `null`, `undefined`, `false`, *falsy* or an empty list. + +View: + +```json +{ + "repos": [] +} +``` + +Template: + +```html +{{#repos}}{{name}}{{/repos}} +{{^repos}}No repos :({{/repos}} +``` + +Output: + +```html +No repos :( +``` + +### Comments + +Comments begin with a bang and are ignored. The following template: + +```html +

Today{{! ignore me }}.

+``` + +Will render as follows: + +```html +

Today.

+``` + +Comments may contain newlines. + +### Partials + +Partials begin with a greater than sign, like {{> box}}. + +Partials are rendered at runtime (as opposed to compile time), so recursive partials are possible. Just avoid infinite loops. + +They also inherit the calling context. Whereas in ERB you may have this: + +```html+erb +<%= partial :next_more, :start => start, :size => size %> +``` + +Mustache requires only this: + +```html +{{> next_more}} +``` + +Why? Because the `next_more.mustache` file will inherit the `size` and `start` variables from the calling context. In this way you may want to think of partials as includes, imports, template expansion, nested templates, or subtemplates, even though those aren't literally the case here. + + +For example, this template and partial: + + base.mustache: +

Names

+ {{#names}} + {{> user}} + {{/names}} + + user.mustache: + {{name}} + +Can be thought of as a single, expanded template: + +```html +

Names

+{{#names}} + {{name}} +{{/names}} +``` + +In mustache.js an object of partials may be passed as the third argument to `Mustache.render`. The object should be keyed by the name of the partial, and its value should be the partial text. + +```js +Mustache.render(template, view, { + user: userTemplate +}); +``` + +### Custom Delimiters + +Custom delimiters can be used in place of `{{` and `}}` by setting the new values in JavaScript or in templates. + +#### Setting in JavaScript + +The `Mustache.tags` property holds an array consisting of the opening and closing tag values. Set custom values by passing a new array of tags to `render()`, which gets honored over the default values, or by overriding the `Mustache.tags` property itself: + +```js +var customTags = [ '<%', '%>' ]; +``` + +##### Pass Value into Render Method +```js +Mustache.render(template, view, {}, customTags); +``` + +##### Override Tags Property +```js +Mustache.tags = customTags; +// Subsequent parse() and render() calls will use customTags +``` + +#### Setting in Templates + +Set Delimiter tags start with an equals sign and change the tag delimiters from `{{` and `}}` to custom strings. + +Consider the following contrived example: + +```html+erb +* {{ default_tags }} +{{=<% %>=}} +* <% erb_style_tags %> +<%={{ }}=%> +* {{ default_tags_again }} +``` + +Here we have a list with three items. The first item uses the default tag style, the second uses ERB style as defined by the Set Delimiter tag, and the third returns to the default style after yet another Set Delimiter declaration. + +According to [ctemplates](https://htmlpreview.github.io/?https://raw.githubusercontent.com/OlafvdSpek/ctemplate/master/doc/howto.html), this "is useful for languages like TeX, where double-braces may occur in the text and are awkward to use for markup." + +Custom delimiters may not contain whitespace or the equals sign. + +## Pre-parsing and Caching Templates + +By default, when mustache.js first parses a template it keeps the full parsed token tree in a cache. The next time it sees that same template it skips the parsing step and renders the template much more quickly. If you'd like, you can do this ahead of time using `mustache.parse`. + +```js +Mustache.parse(template); + +// Then, sometime later. +Mustache.render(template, view); +``` + +## Command line tool + +mustache.js is shipped with a Node.js based command line tool. It might be installed as a global tool on your computer to render a mustache template of some kind + +```bash +$ npm install -g mustache + +$ mustache dataView.json myTemplate.mustache > output.html +``` + +also supports stdin. + +```bash +$ cat dataView.json | mustache - myTemplate.mustache > output.html +``` + +or as a package.json `devDependency` in a build process maybe? + +```bash +$ npm install mustache --save-dev +``` + +```json +{ + "scripts": { + "build": "mustache dataView.json myTemplate.mustache > public/output.html" + } +} +``` +```bash +$ npm run build +``` + +The command line tool is basically a wrapper around `Mustache.render` so you get all the features. + +If your templates use partials you should pass paths to partials using `-p` flag: + +```bash +$ mustache -p path/to/partial1.mustache -p path/to/partial2.mustache dataView.json myTemplate.mustache +``` + +## Plugins for JavaScript Libraries + +mustache.js may be built specifically for several different client libraries, including the following: + + - [jQuery](http://jquery.com/) + - [MooTools](http://mootools.net/) + - [Dojo](http://www.dojotoolkit.org/) + - [YUI](http://developer.yahoo.com/yui/) + - [qooxdoo](http://qooxdoo.org/) + +These may be built using [Rake](http://rake.rubyforge.org/) and one of the following commands: +```bash +$ rake jquery +$ rake mootools +$ rake dojo +$ rake yui3 +$ rake qooxdoo +``` + +## TypeScript + +Since the source code of this package is written in JavaScript, we follow the [TypeScript publishing docs](https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) preferred approach +by having type definitions available via [@types/mustache](https://www.npmjs.com/package/@types/mustache). + +## Testing + +In order to run the tests you'll need to install [Node.js](http://nodejs.org/). + +You also need to install the sub module containing [Mustache specifications](http://github.com/mustache/spec) in the project root. +```bash +$ git submodule init +$ git submodule update +``` +Install dependencies. +```bash +$ npm install +``` +Then run the tests. +```bash +$ npm test +``` +The test suite consists of both unit and integration tests. If a template isn't rendering correctly for you, you can make a test for it by doing the following: + + 1. Create a template file named `mytest.mustache` in the `test/_files` + directory. Replace `mytest` with the name of your test. + 2. Create a corresponding view file named `mytest.js` in the same directory. + This file should contain a JavaScript object literal enclosed in + parentheses. See any of the other view files for an example. + 3. Create a file with the expected output in `mytest.txt` in the same + directory. + +Then, you can run the test with: +```bash +$ TEST=mytest npm run test-render +``` + +### Browser tests + +Browser tests are not included in `npm test` as they run for too long, although they are ran automatically on Travis when merged into master. Run browser tests locally in any browser: +```bash +$ npm run test-browser-local +``` +then point your browser to `http://localhost:8080/__zuul` + +## Who uses mustache.js? + +An updated list of mustache.js users is kept [on the Github wiki](https://github.com/janl/mustache.js/wiki/Beard-Competition). Add yourself or your company if you use mustache.js! + +## Contributing + +mustache.js is a mature project, but it continues to actively invite maintainers. You can help out a high-profile project that is used in a lot of places on the web. No big commitment required, if all you do is review a single [Pull Request](https://github.com/janl/mustache.js/pulls), you are a maintainer. And a hero. + +### Your First Contribution + +- review a [Pull Request](https://github.com/janl/mustache.js/pulls) +- fix an [Issue](https://github.com/janl/mustache.js/issues) +- update the [documentation](https://github.com/janl/mustache.js#usage) +- make a website +- write a tutorial + +## Thanks + +mustache.js wouldn't kick ass if it weren't for these fine souls: + + * Chris Wanstrath / defunkt + * Alexander Lang / langalex + * Sebastian Cohnen / tisba + * J Chris Anderson / jchris + * Tom Robinson / tlrobinson + * Aaron Quint / quirkey + * Douglas Crockford + * Nikita Vasilyev / NV + * Elise Wood / glytch + * Damien Mathieu / dmathieu + * Jakub Kuźma / qoobaa + * Will Leinweber / will + * dpree + * Jason Smith / jhs + * Aaron Gibralter / agibralter + * Ross Boucher / boucher + * Matt Sanford / mzsanford + * Ben Cherry / bcherry + * Michael Jackson / mjackson + * Phillip Johnsen / phillipj + * David da Silva Contín / dasilvacontin diff --git a/node_modules/mustache/bin/mustache b/node_modules/mustache/bin/mustache new file mode 100755 index 0000000..6db073f --- /dev/null +++ b/node_modules/mustache/bin/mustache @@ -0,0 +1,150 @@ +#!/usr/bin/env node + +var fs = require('fs'), + path = require('path'); + +var Mustache = require('..'); +var pkg = require('../package'); +var partials = {}; + +var partialsPaths = []; +var partialArgIndex = -1; + +while ((partialArgIndex = process.argv.indexOf('-p')) > -1) { + partialsPaths.push(process.argv.splice(partialArgIndex, 2)[1]); +} + +var viewArg = process.argv[2]; +var templateArg = process.argv[3]; +var outputArg = process.argv[4]; + +if (hasVersionArg()) { + return console.log(pkg.version); +} + +if (!templateArg || !viewArg) { + console.error('Syntax: mustache