Open-source document signature platform. Not affiliated with DocuSign.
TypeScript
Initial commit
Richard Reis4841bb3df162
diff --git a/.env.example b/.env.examplenew file mode 100644index 0000000..65a67cf--- /dev/null+++ b/.env.example@@ -0,0 +1,23 @@+# Supabase+DATABASE_URL=replace-with-supabase-database-url++# Public application URL used for absolute links, auth callbacks, and emails.+APP_URL=replace-with-app-url++# Better Auth+BETTER_AUTH_SECRET=replace-with-better-auth-secret+BETTER_AUTH_URL=replace-with-better-auth-url++# Shared secret for the internal retention job route.+RETENTION_JOB_SECRET=replace-with-internal-retention-job-secret++# Resend+RESEND_API_KEY=replace-with-resend-api-key+RESEND_FROM_EMAIL=replace-with-resend-from-email+SUPPORT_EMAIL=replace-with-support-email++# Cloudflare R2+R2_ACCOUNT_ID=replace-with-r2-account-id+R2_ACCESS_KEY_ID=replace-with-r2-access-key-id+R2_SECRET_ACCESS_KEY=replace-with-r2-secret-access-key+R2_BUCKET_NAME=replace-with-r2-bucket-namediff --git a/.gitignore b/.gitignorenew file mode 100644index 0000000..aa2cd72--- /dev/null+++ b/.gitignore@@ -0,0 +1,22 @@+# OS+.DS_Store++# Dependencies+node_modules/++# Next.js+.next/+dist/++# Environment+.env+.env.*+!.env.example++# TypeScript+*.tsbuildinfo+next-env.d.ts++# Supabase local artifacts+supabase/.branches/+supabase/.temp/diff --git a/.prettierignore b/.prettierignorenew file mode 100644index 0000000..ec4e6c8--- /dev/null+++ b/.prettierignore@@ -0,0 +1,3 @@+.next+node_modules+tsconfig.tsbuildinfodiff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.mdnew file mode 100644index 0000000..a3997d6--- /dev/null+++ b/CODE_OF_CONDUCT.md@@ -0,0 +1,34 @@+# Code of Conduct++## Our pledge++We are committed to making participation in this project a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.++## Our standards++Examples of behavior that contributes to a positive environment:++- Being respectful and constructive in discussions.+- Accepting feedback gracefully.+- Focusing on what is best for the project and its users.++Examples of unacceptable behavior:++- Harassment, insults, or derogatory comments.+- Personal or political attacks.+- Publishing others' private information without permission.+- Any conduct that would be inappropriate in a professional setting.++## Enforcement++Project maintainers may remove, edit, or reject comments, commits, issues, and pull requests that violate this Code of Conduct. Contributors who do not follow these standards may be temporarily or permanently banned from participating.++To report Code of Conduct issues, contact **[email protected]**. Reports will be reviewed and handled as confidentially as practical.++## Scope++This Code of Conduct applies to all project spaces, including issues, pull requests, discussions, and any other communication channel associated with this repository.++## Attribution++This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1.diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdnew file mode 100644index 0000000..41c9fa5--- /dev/null+++ b/CONTRIBUTING.md@@ -0,0 +1,47 @@+# Contributing++Issues and pull requests are welcome.++## Getting started++1. Fork the repository and clone your fork.+2. Install dependencies: `npm install`+3. Copy the environment file: `cp .env.example .env`+4. Start the dev server: `npm run dev`++See the [README](./README.md) for full setup details.++## Development workflow++Before submitting a pull request, make sure everything passes:++```bash+npm run typecheck+npm run lint+npm run format:check+```++If your change touches auth, email, storage, or production-only configuration, verify the related env-backed flow against the setup notes in [README.md](./README.md).++If your change touches Better Auth tables or plugins, run `npm run auth:generate` and update the committed migration as needed.++## Project style++- Small, focused components.+- Explicit server-side logic over implicit magic.+- Schema-validated inputs using Zod.+- Keep dependencies minimal. Don't add a library for something a few lines of code can handle.++## Pull requests++- Keep PRs focused on a single change.+- Include a clear description of what the PR does and why.+- If the PR fixes an issue, reference it in the description.++## Reporting bugs++Open a GitHub issue with steps to reproduce, expected behavior, and actual behavior. Include your Node.js version and OS if relevant.++## Security vulnerabilities++Do **not** open a public issue for security vulnerabilities. See [SECURITY.md](./SECURITY.md) for how to report them.diff --git a/LICENSE b/LICENSEnew file mode 100644index 0000000..ad6d22c--- /dev/null+++ b/LICENSE@@ -0,0 +1,21 @@+MIT License++Copyright (c) 2026 Digg++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/LICENSES/Apache-2.0.txt b/LICENSES/Apache-2.0.txtnew file mode 100644index 0000000..d645695--- /dev/null+++ b/LICENSES/Apache-2.0.txt@@ -0,0 +1,202 @@++ 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/README.md b/README.mdnew file mode 100644index 0000000..8a5003c--- /dev/null+++ b/README.md@@ -0,0 +1,236 @@+# SignuDoc++SignuDoc is a focused e-signature app for U.S. small businesses.++Upload a PDF, add signers in order, place fields, send secure signing links, and keep the final signed PDF plus an audit certificate in one place.++The open source project is designed to be self-hostable, and the hosted version is available at [signudoc.app](https://signudoc.app).++## Important notes++- SignuDoc is designed for U.S. small businesses and ordinary business agreements such as NDAs, SOWs, and vendor contracts.+- SignuDoc is not a law firm and does not provide legal advice. It does not determine whether a particular document is legally suitable for electronic signing.+- If you self-host SignuDoc, you are responsible for replacing the legal pages (`/terms`, `/privacy`, `/contact`, `/accessibility`) with your own content, setting your own support contact details, and making sure your deployment meets any applicable compliance, retention, or consent requirements.++## What it does++- Upload PDF documents+- Add up to 10 signers in routing order+- Place signature, initials, date, text, and checkbox fields+- Send secure signing links by email+- Let recipients sign without creating an account+- Track draft, sent, completed, declined, and voided envelopes+- Generate a final signed PDF and audit certificate+- Send manual reminders to the current signer+- Run with Supabase Postgres for local and hosted deployments++## Built with++- Next.js App Router+- React + TypeScript+- Better Auth+- Supabase Postgres (`pg`)+- Cloudflare R2 object storage+- Resend for transactional email+- `pdf-lib` and `pdfjs-dist`+- Tailwind CSS 4 + shadcn/ui++## Getting started++### 1. Install dependencies++```bash+npm install+```++SignuDoc currently targets Node.js 20.9+ and is built on Next.js 16.++### 2. Create your environment file++```bash+cp .env.example .env+```++Then fill in the values in `.env`.++The app now requires explicit values for every env-backed dependency. Leaving placeholders in place is treated as unconfigured, and the related feature will fail when used.++For production deployments:++- `APP_URL` and `BETTER_AUTH_URL` must be absolute HTTPS URLs.+- `APP_URL` and `BETTER_AUTH_URL` must not point at localhost.+- `BETTER_AUTH_SECRET` must be a strong secret. The app enforces a minimum length of 32 characters in production.++At a minimum, you should review these groups:++- **App/Auth**: `APP_URL`, `BETTER_AUTH_SECRET`, `BETTER_AUTH_URL`+- **Database**: `DATABASE_URL`+- **Storage**: `R2_ACCOUNT_ID`, `R2_ACCESS_KEY_ID`, `R2_SECRET_ACCESS_KEY`, `R2_BUCKET_NAME`+- **Email**: `RESEND_API_KEY`, `RESEND_FROM_EMAIL`, `SUPPORT_EMAIL`+- **Internal jobs**: `RETENTION_JOB_SECRET`++See `.env.example` for the full list.++### 3. Apply the database schema++This repo already includes the committed `supabase/` directory and migrations.++For a hosted Supabase project, link the repo to your project and push the schema:++```bash+npx supabase link --project-ref <your-project-ref>+npm run db:push+```++If you prefer local Supabase development, Docker is required:++```bash+npm run db:start+```++### 4. Start the dev server++```bash+npm run dev+```++Open [http://localhost:3000](http://localhost:3000).++## Development notes++### Storage++Documents, signed PDFs, audit certificates, and drawn signature images are stored in Cloudflare R2 using its S3-compatible API.++### Database++SignuDoc uses Supabase Postgres as its only database. The checked-in `supabase/config.toml` is Postgres-only for local development; Supabase Auth, Storage, Realtime, Edge Runtime, and Inbucket are disabled because SignuDoc uses Better Auth, Cloudflare R2, and Resend.++This repo already includes the committed `supabase/` directory and migrations.++For a hosted Supabase project:++```bash+npx supabase link --project-ref <your-project-ref>+npm run db:push+```++Then point `DATABASE_URL` at the Supabase connection string from the dashboard. Because SignuDoc uses a persistent `pg.Pool` in a long-lived Next.js server, use a **Direct connection** string by default. If your network requires IPv4, use the **Session pooler** instead. Avoid the Transaction pooler, which is designed for serverless/edge workloads.++If you want a local Supabase stack instead, Docker is required and the local DB URL is typically:++```bash+postgresql://postgres:postgres@localhost:54322/postgres+```++### Email delivery++SignuDoc sends transactional email through Resend only.++- `RESEND_FROM_EMAIL` must use a verified Resend sending domain or subdomain.+- `SUPPORT_EMAIL` is used as the default reply-to address for outbound mail **and** as the public support contact displayed on the Terms, Privacy, and Accessibility pages. If it is missing, those pages will fail to render.+- There is no local email outbox fallback. If email env values are missing or still placeholder-like, email flows fail when used.++### Upload constraints++Document import currently enforces these limits:++- PDF files only+- 20 MB maximum upload size+- password-protected or encrypted PDFs are rejected+- pure XFA or unsupported PDF variants are rejected++## Common scripts++```bash+npm run dev+npm run build+npm run start+npm run db:start+npm run db:stop+npm run db:reset+npm run db:push+npm run auth:generate+npm run lint+npm run typecheck+npm run format+npm run format:check+```++## How the workflow fits together++1. Upload a PDF and create a draft envelope.+2. Add signers in the order they should receive it.+3. Place fields on the document.+4. Review and send.+5. The first signer receives a secure link.+6. Each signer completes their turn in order.+7. SignuDoc finalizes the signed PDF and audit certificate when the last signer finishes.++## Self-hosting++SignuDoc is set up for regular Next.js deployments and also uses Next.js standalone output.++A simple production flow looks like this:++```bash+npm run build+npm run start+```++If you want to deploy the standalone build directly, copy `public` and `.next/static` into `.next/standalone`, then run the generated server:++```bash+npm run build+cp -r public .next/standalone/+cp -r .next/static .next/standalone/.next/+node .next/standalone/server.js+```++Self-hosted operators are responsible for:++- replacing the bundled legal pages with deployment-specific terms, privacy, contact, and accessibility content;+- setting the correct public support address and email-delivery configuration;+- configuring retention, consent, and compliance requirements for their own deployment; and+- scheduling the internal retention job if they want automatic stale-draft cleanup and queued account purges.++## Retention job++The app includes an internal retention endpoint for scheduled cleanup.++It removes stale draft artifacts and processes queued account-closure purges.++Trigger it with a `POST` request to:++```text+/api/internal/retention+```++using:++```text+Authorization: Bearer <RETENTION_JOB_SECRET>+```++This is a good candidate for a cron job in production.++## Project structure++```text+src/app Next.js routes, layouts, and API handlers+src/components UI shells and reusable components+src/lib Auth, database, services, schemas, and domain logic+public/pdfjs PDF.js worker and standard font assets+```++## License++SignuDoc is licensed under the MIT License. See [LICENSE](./LICENSE).++This repository also redistributes third-party assets, including bundled fonts and PDF.js runtime assets, under their own licenses. See [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md) for details.++## Contributing++Issues and pull requests are welcome.++If you plan to contribute, keep the project style simple: small components, explicit server-side logic, and schema-validated inputs.diff --git a/SECURITY.md b/SECURITY.mdnew file mode 100644index 0000000..a8019fd--- /dev/null+++ b/SECURITY.md@@ -0,0 +1,39 @@+# Security Policy++## Reporting a vulnerability++If you find a security vulnerability in SignuDoc, please report it privately. **Do not open a public GitHub issue.**++Email your report to **[email protected]** with:++- A description of the vulnerability.+- Steps to reproduce or a proof of concept.+- The potential impact as you understand it.++If GitHub private vulnerability reporting is enabled for this repository, you may use that as well.++We will acknowledge your report within 7 days and aim to provide a fix or mitigation plan within 30 days, depending on severity and complexity.++## Scope++This policy covers the SignuDoc application code in this repository, including:++- Authentication and session handling+- Signing token and download token generation and verification+- Document storage and access controls+- API route authorization and rate limiting+- Email delivery logic++## Out of scope++- Vulnerabilities in third-party dependencies (report those to the upstream project, though we appreciate a heads-up)+- Issues in your own self-hosted deployment configuration (infrastructure, DNS, TLS, etc.)+- Social engineering attacks++## Supported versions++Security fixes are applied to the latest release only.++## Recognition++We appreciate responsible disclosure. If you report a valid vulnerability, we are happy to credit you in the fix commit or release notes unless you prefer to remain anonymous.diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.mdnew file mode 100644index 0000000..9241d7b--- /dev/null+++ b/THIRD_PARTY_NOTICES.md@@ -0,0 +1,40 @@+# Third-Party Notices++SignuDoc includes bundled third-party assets that remain under their own+licenses. The project license applies to SignuDoc's code, but it does not+replace the licenses for redistributed third-party files.++## Bundled third-party assets++### 1. Great Vibes font++- **Bundled path:** `src/assets/fonts/GreatVibes-Regular.ttf`+- **Used by:** `src/lib/services/pdf-finalize.ts`+- **License:** SIL Open Font License 1.1+- **Full license text:** `src/assets/fonts/LICENSE-OFL.txt`++### 2. Mozilla PDF.js legacy worker asset++- **Bundled path:** `public/pdfjs/5.5.207/legacy/build/pdf.worker.min.mjs`+- **Source project:** Mozilla PDF.js+- **License:** Apache License 2.0+- **Full license text:** `LICENSES/Apache-2.0.txt`++### 3. PDF.js standard fonts - PDFium-derived Foxit font files++- **Bundled path:** `public/pdfjs/5.5.207/standard_fonts/Foxit*.pfb`+- **Source project:** Mozilla PDF.js standard font assets+- **License text already bundled at:** `public/pdfjs/5.5.207/standard_fonts/LICENSE_FOXIT`+- **Notes:** The bundled notice identifies these files under the PDFium Authors copyright and license terms distributed with PDF.js.++### 4. PDF.js standard fonts - Liberation Sans++- **Bundled path:** `public/pdfjs/5.5.207/standard_fonts/LiberationSans-*.ttf`+- **Source project:** Mozilla PDF.js standard font assets+- **License:** SIL Open Font License 1.1+- **License text already bundled at:** `public/pdfjs/5.5.207/standard_fonts/LICENSE_LIBERATION`++## Notes++- Include this file and the referenced license texts in release archives and other redistributions of the repository contents.+- If additional third-party assets are vendored into the repository later, add them here alongside their license texts.diff --git a/components.json b/components.jsonnew file mode 100644index 0000000..4763439--- /dev/null+++ b/components.json@@ -0,0 +1,21 @@+{+ "$schema": "https://ui.shadcn.com/schema.json",+ "style": "radix-nova",+ "rsc": true,+ "tsx": true,+ "tailwind": {+ "config": "",+ "css": "src/app/globals.css",+ "baseColor": "neutral",+ "cssVariables": true,+ "prefix": ""+ },+ "aliases": {+ "components": "@/components",+ "utils": "@/lib/cn",+ "ui": "@/components/ui",+ "lib": "@/lib",+ "hooks": "@/lib/hooks"+ },+ "iconLibrary": "lucide"+}diff --git a/eslint.config.mjs b/eslint.config.mjsnew file mode 100644index 0000000..c3b7300--- /dev/null+++ b/eslint.config.mjs@@ -0,0 +1,18 @@+import { defineConfig, globalIgnores } from "eslint/config";+import nextVitals from "eslint-config-next/core-web-vitals";+import nextTs from "eslint-config-next/typescript";++const eslintConfig = defineConfig([+ ...nextVitals,+ ...nextTs,+ globalIgnores([+ ".next/**",+ "coverage/**",+ "next-env.d.ts",+ "out/**",+ "build/**",+ "public/pdfjs/**",+ ]),+]);++export default eslintConfig;diff --git a/next.config.ts b/next.config.tsnew file mode 100644index 0000000..d3296a6--- /dev/null+++ b/next.config.ts@@ -0,0 +1,10 @@+import type { NextConfig } from "next";++const nextConfig: NextConfig = {+ output: "standalone",+ images: {+ unoptimized: true,+ },+};++export default nextConfig;diff --git a/package-lock.json b/package-lock.jsonnew file mode 100644index 0000000..0545cc5--- /dev/null+++ b/package-lock.json@@ -0,0 +1,14347 @@+{+ "name": "signudoc",+ "version": "0.1.0",+ "lockfileVersion": 3,+ "requires": true,+ "packages": {+ "": {+ "name": "signudoc",+ "version": "0.1.0",+ "license": "MIT",+ "dependencies": {+ "@aws-sdk/client-s3": "^3.1012.0",+ "@aws-sdk/s3-request-presigner": "^3.1012.0",+ "@pdf-lib/fontkit": "^1.1.1",+ "better-auth": "^1.5.5",+ "class-variance-authority": "^0.7.1",+ "clsx": "^2.1.1",+ "lucide-react": "^0.577.0",+ "next": "16.1.7",+ "pdf-lib": "^1.17.1",+ "pdfjs-dist": "^5.5.207",+ "pg": "^8.20.0",+ "radix-ui": "^1.4.3",+ "react": "19.2.3",+ "react-dom": "19.2.3",+ "resend": "^6.9.4",+ "shadcn": "^4.1.0",+ "tailwind-merge": "^3.5.0",+ "tw-animate-css": "^1.4.0",+ "zod": "^4.3.6"+ },+ "devDependencies": {+ "@tailwindcss/postcss": "^4",+ "@types/node": "^20",+ "@types/pg": "^8.20.0",+ "@types/react": "^19",+ "@types/react-dom": "^19",+ "eslint": "^9",+ "eslint-config-next": "16.1.7",+ "prettier": "^3.8.1",+ "supabase": "^2.84.1",+ "tailwindcss": "^4",+ "typescript": "^5"+ }+ },+ "node_modules/@alloc/quick-lru": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",+ "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@aws-crypto/crc32": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-5.2.0.tgz",+ "integrity": "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-crypto/util": "^5.2.0",+ "@aws-sdk/types": "^3.222.0",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=16.0.0"+ }+ },+ "node_modules/@aws-crypto/crc32c": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/@aws-crypto/crc32c/-/crc32c-5.2.0.tgz",+ "integrity": "sha512-+iWb8qaHLYKrNvGRbiYRHSdKRWhto5XlZUEBwDjYNf+ly5SVYG6zEoYIdxvf5R3zyeP16w4PLBn3rH1xc74Rag==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-crypto/util": "^5.2.0",+ "@aws-sdk/types": "^3.222.0",+ "tslib": "^2.6.2"+ }+ },+ "node_modules/@aws-crypto/sha1-browser": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/@aws-crypto/sha1-browser/-/sha1-browser-5.2.0.tgz",+ "integrity": "sha512-OH6lveCFfcDjX4dbAvCFSYUjJZjDr/3XJ3xHtjn3Oj5b9RjojQo8npoLeA/bNwkOkrSQ0wgrHzXk4tDRxGKJeg==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-crypto/supports-web-crypto": "^5.2.0",+ "@aws-crypto/util": "^5.2.0",+ "@aws-sdk/types": "^3.222.0",+ "@aws-sdk/util-locate-window": "^3.0.0",+ "@smithy/util-utf8": "^2.0.0",+ "tslib": "^2.6.2"+ }+ },+ "node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/is-array-buffer": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz",+ "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==",+ "license": "Apache-2.0",+ "dependencies": {+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-buffer-from": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz",+ "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/is-array-buffer": "^2.2.0",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/@aws-crypto/sha1-browser/node_modules/@smithy/util-utf8": {+ "version": "2.3.0",+ "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz",+ "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/util-buffer-from": "^2.2.0",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/@aws-crypto/sha256-browser": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz",+ "integrity": "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-crypto/sha256-js": "^5.2.0",+ "@aws-crypto/supports-web-crypto": "^5.2.0",+ "@aws-crypto/util": "^5.2.0",+ "@aws-sdk/types": "^3.222.0",+ "@aws-sdk/util-locate-window": "^3.0.0",+ "@smithy/util-utf8": "^2.0.0",+ "tslib": "^2.6.2"+ }+ },+ "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz",+ "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==",+ "license": "Apache-2.0",+ "dependencies": {+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz",+ "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/is-array-buffer": "^2.2.0",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8": {+ "version": "2.3.0",+ "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz",+ "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/util-buffer-from": "^2.2.0",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/@aws-crypto/sha256-js": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz",+ "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-crypto/util": "^5.2.0",+ "@aws-sdk/types": "^3.222.0",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=16.0.0"+ }+ },+ "node_modules/@aws-crypto/supports-web-crypto": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz",+ "integrity": "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==",+ "license": "Apache-2.0",+ "dependencies": {+ "tslib": "^2.6.2"+ }+ },+ "node_modules/@aws-crypto/util": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz",+ "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/types": "^3.222.0",+ "@smithy/util-utf8": "^2.0.0",+ "tslib": "^2.6.2"+ }+ },+ "node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz",+ "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==",+ "license": "Apache-2.0",+ "dependencies": {+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz",+ "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/is-array-buffer": "^2.2.0",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": {+ "version": "2.3.0",+ "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz",+ "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/util-buffer-from": "^2.2.0",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/@aws-sdk/client-s3": {+ "version": "3.1012.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.1012.0.tgz",+ "integrity": "sha512-YB44c/NVLwyLw2x8hYSIdMFRwFJyZRuaq1HCTS2RiUWmHucSGxohuKwQdQn/XWh+NILugB+RnXrBkSqTlR3ypw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-crypto/sha1-browser": "5.2.0",+ "@aws-crypto/sha256-browser": "5.2.0",+ "@aws-crypto/sha256-js": "5.2.0",+ "@aws-sdk/core": "^3.973.21",+ "@aws-sdk/credential-provider-node": "^3.972.22",+ "@aws-sdk/middleware-bucket-endpoint": "^3.972.8",+ "@aws-sdk/middleware-expect-continue": "^3.972.8",+ "@aws-sdk/middleware-flexible-checksums": "^3.974.1",+ "@aws-sdk/middleware-host-header": "^3.972.8",+ "@aws-sdk/middleware-location-constraint": "^3.972.8",+ "@aws-sdk/middleware-logger": "^3.972.8",+ "@aws-sdk/middleware-recursion-detection": "^3.972.8",+ "@aws-sdk/middleware-sdk-s3": "^3.972.21",+ "@aws-sdk/middleware-ssec": "^3.972.8",+ "@aws-sdk/middleware-user-agent": "^3.972.22",+ "@aws-sdk/region-config-resolver": "^3.972.8",+ "@aws-sdk/signature-v4-multi-region": "^3.996.9",+ "@aws-sdk/types": "^3.973.6",+ "@aws-sdk/util-endpoints": "^3.996.5",+ "@aws-sdk/util-user-agent-browser": "^3.972.8",+ "@aws-sdk/util-user-agent-node": "^3.973.8",+ "@smithy/config-resolver": "^4.4.11",+ "@smithy/core": "^3.23.12",+ "@smithy/eventstream-serde-browser": "^4.2.12",+ "@smithy/eventstream-serde-config-resolver": "^4.3.12",+ "@smithy/eventstream-serde-node": "^4.2.12",+ "@smithy/fetch-http-handler": "^5.3.15",+ "@smithy/hash-blob-browser": "^4.2.13",+ "@smithy/hash-node": "^4.2.12",+ "@smithy/hash-stream-node": "^4.2.12",+ "@smithy/invalid-dependency": "^4.2.12",+ "@smithy/md5-js": "^4.2.12",+ "@smithy/middleware-content-length": "^4.2.12",+ "@smithy/middleware-endpoint": "^4.4.26",+ "@smithy/middleware-retry": "^4.4.43",+ "@smithy/middleware-serde": "^4.2.15",+ "@smithy/middleware-stack": "^4.2.12",+ "@smithy/node-config-provider": "^4.3.12",+ "@smithy/node-http-handler": "^4.5.0",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/smithy-client": "^4.12.6",+ "@smithy/types": "^4.13.1",+ "@smithy/url-parser": "^4.2.12",+ "@smithy/util-base64": "^4.3.2",+ "@smithy/util-body-length-browser": "^4.2.2",+ "@smithy/util-body-length-node": "^4.2.3",+ "@smithy/util-defaults-mode-browser": "^4.3.42",+ "@smithy/util-defaults-mode-node": "^4.2.45",+ "@smithy/util-endpoints": "^3.3.3",+ "@smithy/util-middleware": "^4.2.12",+ "@smithy/util-retry": "^4.2.12",+ "@smithy/util-stream": "^4.5.20",+ "@smithy/util-utf8": "^4.2.2",+ "@smithy/util-waiter": "^4.2.13",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/core": {+ "version": "3.973.21",+ "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.973.21.tgz",+ "integrity": "sha512-OTUcDX9Yfz/FLKbHjiMaP9D4Hs44lYJzN7zBcrK2nDmBt0Wr8D6nYt12QoBkZsW0nVMFsTIGaZCrsU9zCcIMXQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/types": "^3.973.6",+ "@aws-sdk/xml-builder": "^3.972.12",+ "@smithy/core": "^3.23.12",+ "@smithy/node-config-provider": "^4.3.12",+ "@smithy/property-provider": "^4.2.12",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/signature-v4": "^5.3.12",+ "@smithy/smithy-client": "^4.12.6",+ "@smithy/types": "^4.13.1",+ "@smithy/util-base64": "^4.3.2",+ "@smithy/util-middleware": "^4.2.12",+ "@smithy/util-utf8": "^4.2.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/crc64-nvme": {+ "version": "3.972.5",+ "resolved": "https://registry.npmjs.org/@aws-sdk/crc64-nvme/-/crc64-nvme-3.972.5.tgz",+ "integrity": "sha512-2VbTstbjKdT+yKi8m7b3a9CiVac+pL/IY2PHJwsaGkkHmuuqkJZIErPck1h6P3T9ghQMLSdMPyW6Qp7Di5swFg==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/credential-provider-env": {+ "version": "3.972.19",+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.972.19.tgz",+ "integrity": "sha512-33NpkQtmnsjLr9QdZvL3w8bjy+WoBJ+jY8JwuzxIq38rDNi1kwpBWW7Yjh+8bMlksd+ZAWW0fH4S/6OeoAdU5A==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/core": "^3.973.21",+ "@aws-sdk/types": "^3.973.6",+ "@smithy/property-provider": "^4.2.12",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/credential-provider-http": {+ "version": "3.972.21",+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.972.21.tgz",+ "integrity": "sha512-xFke7yjbON4unNOG0TApQwz+o1LH5VhVLgWlUuiLRWNDyBfeHIFje2ck8qHybvJ8Fkm5m3SsN+pvHtVo6PGWlQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/core": "^3.973.21",+ "@aws-sdk/types": "^3.973.6",+ "@smithy/fetch-http-handler": "^5.3.15",+ "@smithy/node-http-handler": "^4.5.0",+ "@smithy/property-provider": "^4.2.12",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/smithy-client": "^4.12.6",+ "@smithy/types": "^4.13.1",+ "@smithy/util-stream": "^4.5.20",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/credential-provider-ini": {+ "version": "3.972.21",+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.972.21.tgz",+ "integrity": "sha512-fmJN7KhB7CoG65w9fC2LVOd2wZbR2d1yJIpZNe2J5CeDPu7nUHSmavuJAeGEoE3OL5UIBVPNhmK/fV/NQrs3Hw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/core": "^3.973.21",+ "@aws-sdk/credential-provider-env": "^3.972.19",+ "@aws-sdk/credential-provider-http": "^3.972.21",+ "@aws-sdk/credential-provider-login": "^3.972.21",+ "@aws-sdk/credential-provider-process": "^3.972.19",+ "@aws-sdk/credential-provider-sso": "^3.972.21",+ "@aws-sdk/credential-provider-web-identity": "^3.972.21",+ "@aws-sdk/nested-clients": "^3.996.11",+ "@aws-sdk/types": "^3.973.6",+ "@smithy/credential-provider-imds": "^4.2.12",+ "@smithy/property-provider": "^4.2.12",+ "@smithy/shared-ini-file-loader": "^4.4.7",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/credential-provider-login": {+ "version": "3.972.21",+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.972.21.tgz",+ "integrity": "sha512-ENU+YCiuQocQjfIf9bPxZ+ZY0wIBkl3SMH22optBQwy8UFpSfonHynXzGT27xQxer4cYTNOpwDqbfo57BusbpQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/core": "^3.973.21",+ "@aws-sdk/nested-clients": "^3.996.11",+ "@aws-sdk/types": "^3.973.6",+ "@smithy/property-provider": "^4.2.12",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/shared-ini-file-loader": "^4.4.7",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/credential-provider-node": {+ "version": "3.972.22",+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.972.22.tgz",+ "integrity": "sha512-VE6i8nkmrRyhKut7nnfCWRbdDf+CfyRr8ixSwdaPDguYlgvkAO2pHu9oK11XzbSuatB0io1ozI/vpYhelXn8Pg==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/credential-provider-env": "^3.972.19",+ "@aws-sdk/credential-provider-http": "^3.972.21",+ "@aws-sdk/credential-provider-ini": "^3.972.21",+ "@aws-sdk/credential-provider-process": "^3.972.19",+ "@aws-sdk/credential-provider-sso": "^3.972.21",+ "@aws-sdk/credential-provider-web-identity": "^3.972.21",+ "@aws-sdk/types": "^3.973.6",+ "@smithy/credential-provider-imds": "^4.2.12",+ "@smithy/property-provider": "^4.2.12",+ "@smithy/shared-ini-file-loader": "^4.4.7",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/credential-provider-process": {+ "version": "3.972.19",+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.972.19.tgz",+ "integrity": "sha512-hjj5bFo4kf5/WzAMjDEFByVOMbq5gZiagIpJexf7Kp9nIDaGzhCphMsx03NCA8s9zUJzHlD1lXazd7MS+e03Lg==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/core": "^3.973.21",+ "@aws-sdk/types": "^3.973.6",+ "@smithy/property-provider": "^4.2.12",+ "@smithy/shared-ini-file-loader": "^4.4.7",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/credential-provider-sso": {+ "version": "3.972.21",+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.972.21.tgz",+ "integrity": "sha512-9jWRCuMZpZKlqCZ46bvievqdfswsyB2yPAr9rOiN+FxaGgf8jrR5iYDqJgscvk1jrbAxiK4cIjHv3XjIAWAhzQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/core": "^3.973.21",+ "@aws-sdk/nested-clients": "^3.996.11",+ "@aws-sdk/token-providers": "3.1012.0",+ "@aws-sdk/types": "^3.973.6",+ "@smithy/property-provider": "^4.2.12",+ "@smithy/shared-ini-file-loader": "^4.4.7",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/credential-provider-web-identity": {+ "version": "3.972.21",+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.972.21.tgz",+ "integrity": "sha512-ShWQO/cQVZ+j3zUDK7Kj+m7grPzQCVA2iaZdJ+hJTGvVH5lR32Ip/rgZZ+zBdH6D6wczP9Upa4NMXoqJdGpK1g==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/core": "^3.973.21",+ "@aws-sdk/nested-clients": "^3.996.11",+ "@aws-sdk/types": "^3.973.6",+ "@smithy/property-provider": "^4.2.12",+ "@smithy/shared-ini-file-loader": "^4.4.7",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/middleware-bucket-endpoint": {+ "version": "3.972.8",+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.972.8.tgz",+ "integrity": "sha512-WR525Rr2QJSETa9a050isktyWi/4yIGcmY3BQ1kpHqb0LqUglQHCS8R27dTJxxWNZvQ0RVGtEZjTCbZJpyF3Aw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/types": "^3.973.6",+ "@aws-sdk/util-arn-parser": "^3.972.3",+ "@smithy/node-config-provider": "^4.3.12",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/types": "^4.13.1",+ "@smithy/util-config-provider": "^4.2.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/middleware-expect-continue": {+ "version": "3.972.8",+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.972.8.tgz",+ "integrity": "sha512-5DTBTiotEES1e2jOHAq//zyzCjeMB78lEHd35u15qnrid4Nxm7diqIf9fQQ3Ov0ChH1V3Vvt13thOnrACmfGVQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/types": "^3.973.6",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/middleware-flexible-checksums": {+ "version": "3.974.1",+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.974.1.tgz",+ "integrity": "sha512-1MQ8czTjW8b8SpM+ZoQ0k5yD4rd19G9ALPlGgbFdRS7bwlm9ArxXWu2M22mUgSjsGJwzDkpV8e9tjUnre6adAw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-crypto/crc32": "5.2.0",+ "@aws-crypto/crc32c": "5.2.0",+ "@aws-crypto/util": "5.2.0",+ "@aws-sdk/core": "^3.973.21",+ "@aws-sdk/crc64-nvme": "^3.972.5",+ "@aws-sdk/types": "^3.973.6",+ "@smithy/is-array-buffer": "^4.2.2",+ "@smithy/node-config-provider": "^4.3.12",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/types": "^4.13.1",+ "@smithy/util-middleware": "^4.2.12",+ "@smithy/util-stream": "^4.5.20",+ "@smithy/util-utf8": "^4.2.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/middleware-host-header": {+ "version": "3.972.8",+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.972.8.tgz",+ "integrity": "sha512-wAr2REfKsqoKQ+OkNqvOShnBoh+nkPurDKW7uAeVSu6kUECnWlSJiPvnoqxGlfousEY/v9LfS9sNc46hjSYDIQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/types": "^3.973.6",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/middleware-location-constraint": {+ "version": "3.972.8",+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.972.8.tgz",+ "integrity": "sha512-KaUoFuoFPziIa98DSQsTPeke1gvGXlc5ZGMhy+b+nLxZ4A7jmJgLzjEF95l8aOQN2T/qlPP3MrAyELm8ExXucw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/types": "^3.973.6",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/middleware-logger": {+ "version": "3.972.8",+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.972.8.tgz",+ "integrity": "sha512-CWl5UCM57WUFaFi5kB7IBY1UmOeLvNZAZ2/OZ5l20ldiJ3TiIz1pC65gYj8X0BCPWkeR1E32mpsCk1L1I4n+lA==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/types": "^3.973.6",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/middleware-recursion-detection": {+ "version": "3.972.8",+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.972.8.tgz",+ "integrity": "sha512-BnnvYs2ZEpdlmZ2PNlV2ZyQ8j8AEkMTjN79y/YA475ER1ByFYrkVR85qmhni8oeTaJcDqbx364wDpitDAA/wCA==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/types": "^3.973.6",+ "@aws/lambda-invoke-store": "^0.2.2",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/middleware-sdk-s3": {+ "version": "3.972.21",+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.972.21.tgz",+ "integrity": "sha512-SXkHy8OET88y4NaSui3gMfoTpg4jHvcbAVXYJuP74vsgsJKCv/vzWM+0hVJ1W+EBOghd+qFIud80ZiuPt2RXRw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/core": "^3.973.21",+ "@aws-sdk/types": "^3.973.6",+ "@aws-sdk/util-arn-parser": "^3.972.3",+ "@smithy/core": "^3.23.12",+ "@smithy/node-config-provider": "^4.3.12",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/signature-v4": "^5.3.12",+ "@smithy/smithy-client": "^4.12.6",+ "@smithy/types": "^4.13.1",+ "@smithy/util-config-provider": "^4.2.2",+ "@smithy/util-middleware": "^4.2.12",+ "@smithy/util-stream": "^4.5.20",+ "@smithy/util-utf8": "^4.2.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/middleware-ssec": {+ "version": "3.972.8",+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.972.8.tgz",+ "integrity": "sha512-wqlK0yO/TxEC2UsY9wIlqeeutF6jjLe0f96Pbm40XscTo57nImUk9lBcw0dPgsm0sppFtAkSlDrfpK+pC30Wqw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/types": "^3.973.6",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/middleware-user-agent": {+ "version": "3.972.22",+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.972.22.tgz",+ "integrity": "sha512-pZPNGWZVQvgUIO/P9PXZNz7ciq9mLYb/wQEurg3phKTa3DiBIunIRcgA0eBNwmog6S3oy0KR1bv4EJ4ld9A5sQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/core": "^3.973.21",+ "@aws-sdk/types": "^3.973.6",+ "@aws-sdk/util-endpoints": "^3.996.5",+ "@smithy/core": "^3.23.12",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/types": "^4.13.1",+ "@smithy/util-retry": "^4.2.12",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/nested-clients": {+ "version": "3.996.11",+ "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.996.11.tgz",+ "integrity": "sha512-i7SwoSR4JB/79JoGDUACnFUQOZwXGLWNX35lIb1Pq72nUGlVV+RFZp+BLa8S+mog2pbXU9+6Kc5YwGiMi5bKhQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-crypto/sha256-browser": "5.2.0",+ "@aws-crypto/sha256-js": "5.2.0",+ "@aws-sdk/core": "^3.973.21",+ "@aws-sdk/middleware-host-header": "^3.972.8",+ "@aws-sdk/middleware-logger": "^3.972.8",+ "@aws-sdk/middleware-recursion-detection": "^3.972.8",+ "@aws-sdk/middleware-user-agent": "^3.972.22",+ "@aws-sdk/region-config-resolver": "^3.972.8",+ "@aws-sdk/types": "^3.973.6",+ "@aws-sdk/util-endpoints": "^3.996.5",+ "@aws-sdk/util-user-agent-browser": "^3.972.8",+ "@aws-sdk/util-user-agent-node": "^3.973.8",+ "@smithy/config-resolver": "^4.4.11",+ "@smithy/core": "^3.23.12",+ "@smithy/fetch-http-handler": "^5.3.15",+ "@smithy/hash-node": "^4.2.12",+ "@smithy/invalid-dependency": "^4.2.12",+ "@smithy/middleware-content-length": "^4.2.12",+ "@smithy/middleware-endpoint": "^4.4.26",+ "@smithy/middleware-retry": "^4.4.43",+ "@smithy/middleware-serde": "^4.2.15",+ "@smithy/middleware-stack": "^4.2.12",+ "@smithy/node-config-provider": "^4.3.12",+ "@smithy/node-http-handler": "^4.5.0",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/smithy-client": "^4.12.6",+ "@smithy/types": "^4.13.1",+ "@smithy/url-parser": "^4.2.12",+ "@smithy/util-base64": "^4.3.2",+ "@smithy/util-body-length-browser": "^4.2.2",+ "@smithy/util-body-length-node": "^4.2.3",+ "@smithy/util-defaults-mode-browser": "^4.3.42",+ "@smithy/util-defaults-mode-node": "^4.2.45",+ "@smithy/util-endpoints": "^3.3.3",+ "@smithy/util-middleware": "^4.2.12",+ "@smithy/util-retry": "^4.2.12",+ "@smithy/util-utf8": "^4.2.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/region-config-resolver": {+ "version": "3.972.8",+ "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.972.8.tgz",+ "integrity": "sha512-1eD4uhTDeambO/PNIDVG19A6+v4NdD7xzwLHDutHsUqz0B+i661MwQB2eYO4/crcCvCiQG4SRm1k81k54FEIvw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/types": "^3.973.6",+ "@smithy/config-resolver": "^4.4.11",+ "@smithy/node-config-provider": "^4.3.12",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/s3-request-presigner": {+ "version": "3.1012.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/s3-request-presigner/-/s3-request-presigner-3.1012.0.tgz",+ "integrity": "sha512-27F6bCLi4lu7iPXCZoWBcf4w6I/oJLtVaaj+S4+6LZidlCH240qAybfVpgcAWVO/ymSknAY/3/Qt2IQaRVC9Fg==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/signature-v4-multi-region": "^3.996.9",+ "@aws-sdk/types": "^3.973.6",+ "@aws-sdk/util-format-url": "^3.972.8",+ "@smithy/middleware-endpoint": "^4.4.26",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/smithy-client": "^4.12.6",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/signature-v4-multi-region": {+ "version": "3.996.9",+ "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.996.9.tgz",+ "integrity": "sha512-2aAUwudVQ3uNkCfkBLQwNVD2jkfb299NSeDueXsT2NcNdFrWtHRkiQzX3wk47UFYbm87BkdxrsAJcQO7PdQOhA==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/middleware-sdk-s3": "^3.972.21",+ "@aws-sdk/types": "^3.973.6",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/signature-v4": "^5.3.12",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/token-providers": {+ "version": "3.1012.0",+ "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1012.0.tgz",+ "integrity": "sha512-vzKwy020zjuiF4WTJzejx5nYcXJnRhHpb6i3lyZHIwfFwXG1yX4bzBVNMWYWF+bz1i2Pp2VhJbPyzpqj4VuJXQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/core": "^3.973.21",+ "@aws-sdk/nested-clients": "^3.996.11",+ "@aws-sdk/types": "^3.973.6",+ "@smithy/property-provider": "^4.2.12",+ "@smithy/shared-ini-file-loader": "^4.4.7",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/types": {+ "version": "3.973.6",+ "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.973.6.tgz",+ "integrity": "sha512-Atfcy4E++beKtwJHiDln2Nby8W/mam64opFPTiHEqgsthqeydFS1pY+OUlN1ouNOmf8ArPU/6cDS65anOP3KQw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/util-arn-parser": {+ "version": "3.972.3",+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.972.3.tgz",+ "integrity": "sha512-HzSD8PMFrvgi2Kserxuff5VitNq2sgf3w9qxmskKDiDTThWfVteJxuCS9JXiPIPtmCrp+7N9asfIaVhBFORllA==",+ "license": "Apache-2.0",+ "dependencies": {+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/util-endpoints": {+ "version": "3.996.5",+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.996.5.tgz",+ "integrity": "sha512-Uh93L5sXFNbyR5sEPMzUU8tJ++Ku97EY4udmC01nB8Zu+xfBPwpIwJ6F7snqQeq8h2pf+8SGN5/NoytfKgYPIw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/types": "^3.973.6",+ "@smithy/types": "^4.13.1",+ "@smithy/url-parser": "^4.2.12",+ "@smithy/util-endpoints": "^3.3.3",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/util-format-url": {+ "version": "3.972.8",+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-format-url/-/util-format-url-3.972.8.tgz",+ "integrity": "sha512-J6DS9oocrgxM8xlUTTmQOuwRF6rnAGEujAN9SAzllcrQmwn5iJ58ogxy3SEhD0Q7JZvlA5jvIXBkpQRqEqlE9A==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/types": "^3.973.6",+ "@smithy/querystring-builder": "^4.2.12",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/util-locate-window": {+ "version": "3.965.5",+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.965.5.tgz",+ "integrity": "sha512-WhlJNNINQB+9qtLtZJcpQdgZw3SCDCpXdUJP7cToGwHbCWCnRckGlc6Bx/OhWwIYFNAn+FIydY8SZ0QmVu3xTQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws-sdk/util-user-agent-browser": {+ "version": "3.972.8",+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.972.8.tgz",+ "integrity": "sha512-B3KGXJviV2u6Cdw2SDY2aDhoJkVfY/Q/Trwk2CMSkikE1Oi6gRzxhvhIfiRpHfmIsAhV4EA54TVEX8K6CbHbkA==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/types": "^3.973.6",+ "@smithy/types": "^4.13.1",+ "bowser": "^2.11.0",+ "tslib": "^2.6.2"+ }+ },+ "node_modules/@aws-sdk/util-user-agent-node": {+ "version": "3.973.8",+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.973.8.tgz",+ "integrity": "sha512-Kvb96TafGPLYo4Z2GRCzQTne77epXgiZEo0DDXwavzkWmgDV/1XD1tMA766gzRcHHFUraWsE+4T8DKtPTZUxgQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-sdk/middleware-user-agent": "^3.972.22",+ "@aws-sdk/types": "^3.973.6",+ "@smithy/node-config-provider": "^4.3.12",+ "@smithy/types": "^4.13.1",+ "@smithy/util-config-provider": "^4.2.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ },+ "peerDependencies": {+ "aws-crt": ">=1.0.0"+ },+ "peerDependenciesMeta": {+ "aws-crt": {+ "optional": true+ }+ }+ },+ "node_modules/@aws-sdk/xml-builder": {+ "version": "3.972.12",+ "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.972.12.tgz",+ "integrity": "sha512-xjyucfn+F+kMf25c+LIUnvX3oyLSlj9T0Vncs5WMQI6G36JdnSwC8g0qf8RajfmSClXr660EpTz7FFKluZ4BqQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/types": "^4.13.1",+ "fast-xml-parser": "5.5.6",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@aws/lambda-invoke-store": {+ "version": "0.2.4",+ "resolved": "https://registry.npmjs.org/@aws/lambda-invoke-store/-/lambda-invoke-store-0.2.4.tgz",+ "integrity": "sha512-iY8yvjE0y651BixKNPgmv1WrQc+GZ142sb0z4gYnChDDY2YqI4P/jsSopBWrKfAt7LOJAkOXt7rC/hms+WclQQ==",+ "license": "Apache-2.0",+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@babel/code-frame": {+ "version": "7.29.0",+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz",+ "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==",+ "license": "MIT",+ "dependencies": {+ "@babel/helper-validator-identifier": "^7.28.5",+ "js-tokens": "^4.0.0",+ "picocolors": "^1.1.1"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/compat-data": {+ "version": "7.29.0",+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz",+ "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==",+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/core": {+ "version": "7.29.0",+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz",+ "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==",+ "license": "MIT",+ "dependencies": {+ "@babel/code-frame": "^7.29.0",+ "@babel/generator": "^7.29.0",+ "@babel/helper-compilation-targets": "^7.28.6",+ "@babel/helper-module-transforms": "^7.28.6",+ "@babel/helpers": "^7.28.6",+ "@babel/parser": "^7.29.0",+ "@babel/template": "^7.28.6",+ "@babel/traverse": "^7.29.0",+ "@babel/types": "^7.29.0",+ "@jridgewell/remapping": "^2.3.5",+ "convert-source-map": "^2.0.0",+ "debug": "^4.1.0",+ "gensync": "^1.0.0-beta.2",+ "json5": "^2.2.3",+ "semver": "^6.3.1"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/babel"+ }+ },+ "node_modules/@babel/generator": {+ "version": "7.29.1",+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz",+ "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==",+ "license": "MIT",+ "dependencies": {+ "@babel/parser": "^7.29.0",+ "@babel/types": "^7.29.0",+ "@jridgewell/gen-mapping": "^0.3.12",+ "@jridgewell/trace-mapping": "^0.3.28",+ "jsesc": "^3.0.2"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-annotate-as-pure": {+ "version": "7.27.3",+ "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz",+ "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==",+ "license": "MIT",+ "dependencies": {+ "@babel/types": "^7.27.3"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-compilation-targets": {+ "version": "7.28.6",+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz",+ "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==",+ "license": "MIT",+ "dependencies": {+ "@babel/compat-data": "^7.28.6",+ "@babel/helper-validator-option": "^7.27.1",+ "browserslist": "^4.24.0",+ "lru-cache": "^5.1.1",+ "semver": "^6.3.1"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-create-class-features-plugin": {+ "version": "7.28.6",+ "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.6.tgz",+ "integrity": "sha512-dTOdvsjnG3xNT9Y0AUg1wAl38y+4Rl4sf9caSQZOXdNqVn+H+HbbJ4IyyHaIqNR6SW9oJpA/RuRjsjCw2IdIow==",+ "license": "MIT",+ "dependencies": {+ "@babel/helper-annotate-as-pure": "^7.27.3",+ "@babel/helper-member-expression-to-functions": "^7.28.5",+ "@babel/helper-optimise-call-expression": "^7.27.1",+ "@babel/helper-replace-supers": "^7.28.6",+ "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1",+ "@babel/traverse": "^7.28.6",+ "semver": "^6.3.1"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0"+ }+ },+ "node_modules/@babel/helper-globals": {+ "version": "7.28.0",+ "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz",+ "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==",+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-member-expression-to-functions": {+ "version": "7.28.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.28.5.tgz",+ "integrity": "sha512-cwM7SBRZcPCLgl8a7cY0soT1SptSzAlMH39vwiRpOQkJlh53r5hdHwLSCZpQdVLT39sZt+CRpNwYG4Y2v77atg==",+ "license": "MIT",+ "dependencies": {+ "@babel/traverse": "^7.28.5",+ "@babel/types": "^7.28.5"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-module-imports": {+ "version": "7.28.6",+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz",+ "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==",+ "license": "MIT",+ "dependencies": {+ "@babel/traverse": "^7.28.6",+ "@babel/types": "^7.28.6"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-module-transforms": {+ "version": "7.28.6",+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz",+ "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==",+ "license": "MIT",+ "dependencies": {+ "@babel/helper-module-imports": "^7.28.6",+ "@babel/helper-validator-identifier": "^7.28.5",+ "@babel/traverse": "^7.28.6"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0"+ }+ },+ "node_modules/@babel/helper-optimise-call-expression": {+ "version": "7.27.1",+ "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.27.1.tgz",+ "integrity": "sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw==",+ "license": "MIT",+ "dependencies": {+ "@babel/types": "^7.27.1"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-plugin-utils": {+ "version": "7.28.6",+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz",+ "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==",+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-replace-supers": {+ "version": "7.28.6",+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.28.6.tgz",+ "integrity": "sha512-mq8e+laIk94/yFec3DxSjCRD2Z0TAjhVbEJY3UQrlwVo15Lmt7C2wAUbK4bjnTs4APkwsYLTahXRraQXhb1WCg==",+ "license": "MIT",+ "dependencies": {+ "@babel/helper-member-expression-to-functions": "^7.28.5",+ "@babel/helper-optimise-call-expression": "^7.27.1",+ "@babel/traverse": "^7.28.6"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0"+ }+ },+ "node_modules/@babel/helper-skip-transparent-expression-wrappers": {+ "version": "7.27.1",+ "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.27.1.tgz",+ "integrity": "sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg==",+ "license": "MIT",+ "dependencies": {+ "@babel/traverse": "^7.27.1",+ "@babel/types": "^7.27.1"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-string-parser": {+ "version": "7.27.1",+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",+ "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-validator-identifier": {+ "version": "7.28.5",+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz",+ "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==",+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-validator-option": {+ "version": "7.27.1",+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz",+ "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==",+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helpers": {+ "version": "7.29.2",+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz",+ "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==",+ "license": "MIT",+ "dependencies": {+ "@babel/template": "^7.28.6",+ "@babel/types": "^7.29.0"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/parser": {+ "version": "7.29.2",+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz",+ "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==",+ "license": "MIT",+ "dependencies": {+ "@babel/types": "^7.29.0"+ },+ "bin": {+ "parser": "bin/babel-parser.js"+ },+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/@babel/plugin-syntax-jsx": {+ "version": "7.28.6",+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz",+ "integrity": "sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w==",+ "license": "MIT",+ "dependencies": {+ "@babel/helper-plugin-utils": "^7.28.6"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/plugin-syntax-typescript": {+ "version": "7.28.6",+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz",+ "integrity": "sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A==",+ "license": "MIT",+ "dependencies": {+ "@babel/helper-plugin-utils": "^7.28.6"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/plugin-transform-modules-commonjs": {+ "version": "7.28.6",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.28.6.tgz",+ "integrity": "sha512-jppVbf8IV9iWWwWTQIxJMAJCWBuuKx71475wHwYytrRGQ2CWiDvYlADQno3tcYpS/T2UUWFQp3nVtYfK/YBQrA==",+ "license": "MIT",+ "dependencies": {+ "@babel/helper-module-transforms": "^7.28.6",+ "@babel/helper-plugin-utils": "^7.28.6"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/plugin-transform-typescript": {+ "version": "7.28.6",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.28.6.tgz",+ "integrity": "sha512-0YWL2RFxOqEm9Efk5PvreamxPME8OyY0wM5wh5lHjF+VtVhdneCWGzZeSqzOfiobVqQaNCd2z0tQvnI9DaPWPw==",+ "license": "MIT",+ "dependencies": {+ "@babel/helper-annotate-as-pure": "^7.27.3",+ "@babel/helper-create-class-features-plugin": "^7.28.6",+ "@babel/helper-plugin-utils": "^7.28.6",+ "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1",+ "@babel/plugin-syntax-typescript": "^7.28.6"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/preset-typescript": {+ "version": "7.28.5",+ "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.28.5.tgz",+ "integrity": "sha512-+bQy5WOI2V6LJZpPVxY+yp66XdZ2yifu0Mc1aP5CQKgjn4QM5IN2i5fAZ4xKop47pr8rpVhiAeu+nDQa12C8+g==",+ "license": "MIT",+ "dependencies": {+ "@babel/helper-plugin-utils": "^7.27.1",+ "@babel/helper-validator-option": "^7.27.1",+ "@babel/plugin-syntax-jsx": "^7.27.1",+ "@babel/plugin-transform-modules-commonjs": "^7.27.1",+ "@babel/plugin-transform-typescript": "^7.28.5"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/template": {+ "version": "7.28.6",+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz",+ "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==",+ "license": "MIT",+ "dependencies": {+ "@babel/code-frame": "^7.28.6",+ "@babel/parser": "^7.28.6",+ "@babel/types": "^7.28.6"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/traverse": {+ "version": "7.29.0",+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz",+ "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==",+ "license": "MIT",+ "dependencies": {+ "@babel/code-frame": "^7.29.0",+ "@babel/generator": "^7.29.0",+ "@babel/helper-globals": "^7.28.0",+ "@babel/parser": "^7.29.0",+ "@babel/template": "^7.28.6",+ "@babel/types": "^7.29.0",+ "debug": "^4.3.1"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/types": {+ "version": "7.29.0",+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz",+ "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==",+ "license": "MIT",+ "dependencies": {+ "@babel/helper-string-parser": "^7.27.1",+ "@babel/helper-validator-identifier": "^7.28.5"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@better-auth/core": {+ "version": "1.5.5",+ "resolved": "https://registry.npmjs.org/@better-auth/core/-/core-1.5.5.tgz",+ "integrity": "sha512-1oR/2jAp821Dcf67kQYHUoyNcdc1TcShfw4QMK0YTVntuRES5mUOyvEJql5T6eIuLfaqaN4LOF78l0FtF66HXA==",+ "license": "MIT",+ "dependencies": {+ "@standard-schema/spec": "^1.1.0",+ "zod": "^4.3.6"+ },+ "peerDependencies": {+ "@better-auth/utils": "0.3.1",+ "@better-fetch/fetch": "1.1.21",+ "@cloudflare/workers-types": ">=4",+ "better-call": "1.3.2",+ "jose": "^6.1.0",+ "kysely": "^0.28.5",+ "nanostores": "^1.0.1"+ },+ "peerDependenciesMeta": {+ "@cloudflare/workers-types": {+ "optional": true+ }+ }+ },+ "node_modules/@better-auth/drizzle-adapter": {+ "version": "1.5.5",+ "resolved": "https://registry.npmjs.org/@better-auth/drizzle-adapter/-/drizzle-adapter-1.5.5.tgz",+ "integrity": "sha512-HAi9xAP40oDt48QZeYBFTcmg3vt1Jik90GwoRIfangd7VGbxesIIDBJSnvwMbZ52GBIc6+V4FRw9lasNiNrPfw==",+ "license": "MIT",+ "peerDependencies": {+ "@better-auth/core": "1.5.5",+ "@better-auth/utils": "^0.3.0",+ "drizzle-orm": ">=0.41.0"+ },+ "peerDependenciesMeta": {+ "drizzle-orm": {+ "optional": true+ }+ }+ },+ "node_modules/@better-auth/kysely-adapter": {+ "version": "1.5.5",+ "resolved": "https://registry.npmjs.org/@better-auth/kysely-adapter/-/kysely-adapter-1.5.5.tgz",+ "integrity": "sha512-LmHffIVnqbfsxcxckMOoE8MwibWrbVFch+kwPKJ5OFDFv6lin75ufN7ZZ7twH0IMPLT/FcgzaRjP8jRrXRef9g==",+ "license": "MIT",+ "peerDependencies": {+ "@better-auth/core": "1.5.5",+ "@better-auth/utils": "^0.3.0",+ "kysely": "^0.27.0 || ^0.28.0"+ }+ },+ "node_modules/@better-auth/memory-adapter": {+ "version": "1.5.5",+ "resolved": "https://registry.npmjs.org/@better-auth/memory-adapter/-/memory-adapter-1.5.5.tgz",+ "integrity": "sha512-4X0j1/2L+nsgmObjmy9xEGUFWUv38Qjthp558fwS3DAp6ueWWyCaxaD6VJZ7m5qPNMrsBStO5WGP8CmJTEWm7g==",+ "license": "MIT",+ "peerDependencies": {+ "@better-auth/core": "1.5.5",+ "@better-auth/utils": "^0.3.0"+ }+ },+ "node_modules/@better-auth/mongo-adapter": {+ "version": "1.5.5",+ "resolved": "https://registry.npmjs.org/@better-auth/mongo-adapter/-/mongo-adapter-1.5.5.tgz",+ "integrity": "sha512-P1J9ljL5X5k740I8Rx1esPWNgWYPdJR5hf2CY7BwDSrQFPUHuzeCg0YhtEEP55niNateTXhBqGAcy0fVOeamZg==",+ "license": "MIT",+ "peerDependencies": {+ "@better-auth/core": "1.5.5",+ "@better-auth/utils": "^0.3.0",+ "mongodb": "^6.0.0 || ^7.0.0"+ }+ },+ "node_modules/@better-auth/prisma-adapter": {+ "version": "1.5.5",+ "resolved": "https://registry.npmjs.org/@better-auth/prisma-adapter/-/prisma-adapter-1.5.5.tgz",+ "integrity": "sha512-CliDd78CXHzzwQIXhCdwGr5Ml53i6JdCHWV7PYwTIJz9EAm6qb2RVBdpP3nqEfNjINGM22A6gfleCgCdZkTIZg==",+ "license": "MIT",+ "peerDependencies": {+ "@better-auth/core": "1.5.5",+ "@better-auth/utils": "^0.3.0",+ "@prisma/client": "^5.0.0 || ^6.0.0 || ^7.0.0",+ "prisma": "^5.0.0 || ^6.0.0 || ^7.0.0"+ },+ "peerDependenciesMeta": {+ "@prisma/client": {+ "optional": true+ },+ "prisma": {+ "optional": true+ }+ }+ },+ "node_modules/@better-auth/telemetry": {+ "version": "1.5.5",+ "resolved": "https://registry.npmjs.org/@better-auth/telemetry/-/telemetry-1.5.5.tgz",+ "integrity": "sha512-1+lklxArn4IMHuU503RcPdXrSG2tlXt4jnGG3omolmspQ7tktg/Y9XO/yAkYDurtvMn1xJ8X1Ov01Ji/r5s9BQ==",+ "license": "MIT",+ "dependencies": {+ "@better-auth/utils": "0.3.1",+ "@better-fetch/fetch": "1.1.21"+ },+ "peerDependencies": {+ "@better-auth/core": "1.5.5"+ }+ },+ "node_modules/@better-auth/utils": {+ "version": "0.3.1",+ "resolved": "https://registry.npmjs.org/@better-auth/utils/-/utils-0.3.1.tgz",+ "integrity": "sha512-+CGp4UmZSUrHHnpHhLPYu6cV+wSUSvVbZbNykxhUDocpVNTo9uFFxw/NqJlh1iC4wQ9HKKWGCKuZ5wUgS0v6Kg==",+ "license": "MIT"+ },+ "node_modules/@better-fetch/fetch": {+ "version": "1.1.21",+ "resolved": "https://registry.npmjs.org/@better-fetch/fetch/-/fetch-1.1.21.tgz",+ "integrity": "sha512-/ImESw0sskqlVR94jB+5+Pxjf+xBwDZF/N5+y2/q4EqD7IARUTSpPfIo8uf39SYpCxyOCtbyYpUrZ3F/k0zT4A=="+ },+ "node_modules/@dotenvx/dotenvx": {+ "version": "1.57.0",+ "resolved": "https://registry.npmjs.org/@dotenvx/dotenvx/-/dotenvx-1.57.0.tgz",+ "integrity": "sha512-WsTEcqfHzKmLFZh3jLGd7o4iCkrIupp+qFH2FJUJtQXUh2GcOnLXD00DcrhlO4H8QSmaKnW9lugOEbrdpu25kA==",+ "license": "BSD-3-Clause",+ "dependencies": {+ "commander": "^11.1.0",+ "dotenv": "^17.2.1",+ "eciesjs": "^0.4.10",+ "execa": "^5.1.1",+ "fdir": "^6.2.0",+ "ignore": "^5.3.0",+ "object-treeify": "1.1.33",+ "picomatch": "^4.0.2",+ "which": "^4.0.0"+ },+ "bin": {+ "dotenvx": "src/cli/dotenvx.js"+ },+ "funding": {+ "url": "https://dotenvx.com"+ }+ },+ "node_modules/@dotenvx/dotenvx/node_modules/commander": {+ "version": "11.1.0",+ "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz",+ "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==",+ "license": "MIT",+ "engines": {+ "node": ">=16"+ }+ },+ "node_modules/@dotenvx/dotenvx/node_modules/execa": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",+ "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",+ "license": "MIT",+ "dependencies": {+ "cross-spawn": "^7.0.3",+ "get-stream": "^6.0.0",+ "human-signals": "^2.1.0",+ "is-stream": "^2.0.0",+ "merge-stream": "^2.0.0",+ "npm-run-path": "^4.0.1",+ "onetime": "^5.1.2",+ "signal-exit": "^3.0.3",+ "strip-final-newline": "^2.0.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sindresorhus/execa?sponsor=1"+ }+ },+ "node_modules/@dotenvx/dotenvx/node_modules/fdir": {+ "version": "6.5.0",+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",+ "license": "MIT",+ "engines": {+ "node": ">=12.0.0"+ },+ "peerDependencies": {+ "picomatch": "^3 || ^4"+ },+ "peerDependenciesMeta": {+ "picomatch": {+ "optional": true+ }+ }+ },+ "node_modules/@dotenvx/dotenvx/node_modules/get-stream": {+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",+ "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@dotenvx/dotenvx/node_modules/human-signals": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",+ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",+ "license": "Apache-2.0",+ "engines": {+ "node": ">=10.17.0"+ }+ },+ "node_modules/@dotenvx/dotenvx/node_modules/is-stream": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",+ "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",+ "license": "MIT",+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@dotenvx/dotenvx/node_modules/isexe": {+ "version": "3.1.5",+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.5.tgz",+ "integrity": "sha512-6B3tLtFqtQS4ekarvLVMZ+X+VlvQekbe4taUkf/rhVO3d/h0M2rfARm/pXLcPEsjjMsFgrFgSrhQIxcSVrBz8w==",+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@dotenvx/dotenvx/node_modules/npm-run-path": {+ "version": "4.0.1",+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",+ "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",+ "license": "MIT",+ "dependencies": {+ "path-key": "^3.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/@dotenvx/dotenvx/node_modules/onetime": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",+ "license": "MIT",+ "dependencies": {+ "mimic-fn": "^2.1.0"+ },+ "engines": {+ "node": ">=6"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@dotenvx/dotenvx/node_modules/picomatch": {+ "version": "4.0.3",+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",+ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/jonschlinkert"+ }+ },+ "node_modules/@dotenvx/dotenvx/node_modules/signal-exit": {+ "version": "3.0.7",+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",+ "license": "ISC"+ },+ "node_modules/@dotenvx/dotenvx/node_modules/strip-final-newline": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",+ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/@dotenvx/dotenvx/node_modules/which": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz",+ "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==",+ "license": "ISC",+ "dependencies": {+ "isexe": "^3.1.1"+ },+ "bin": {+ "node-which": "bin/which.js"+ },+ "engines": {+ "node": "^16.13.0 || >=18.0.0"+ }+ },+ "node_modules/@emnapi/core": {+ "version": "1.9.0",+ "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.9.0.tgz",+ "integrity": "sha512-0DQ98G9ZQZOxfUcQn1waV2yS8aWdZ6kJMbYCJB3oUBecjWYO1fqJ+a1DRfPF3O5JEkwqwP1A9QEN/9mYm2Yd0w==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "@emnapi/wasi-threads": "1.2.0",+ "tslib": "^2.4.0"+ }+ },+ "node_modules/@emnapi/runtime": {+ "version": "1.9.0",+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.0.tgz",+ "integrity": "sha512-QN75eB0IH2ywSpRpNddCRfQIhmJYBCJ1x5Lb3IscKAL8bMnVAKnRg8dCoXbHzVLLH7P38N2Z3mtulB7W0J0FKw==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "tslib": "^2.4.0"+ }+ },+ "node_modules/@emnapi/wasi-threads": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.0.tgz",+ "integrity": "sha512-N10dEJNSsUx41Z6pZsXU8FjPjpBEplgH24sfkmITrBED1/U2Esum9F3lfLrMjKHHjmi557zQn7kR9R+XWXu5Rg==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "tslib": "^2.4.0"+ }+ },+ "node_modules/@eslint-community/eslint-utils": {+ "version": "4.9.1",+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz",+ "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "eslint-visitor-keys": "^3.4.3"+ },+ "engines": {+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ },+ "peerDependencies": {+ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"+ }+ },+ "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": {+ "version": "3.4.3",+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",+ "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ }+ },+ "node_modules/@eslint-community/regexpp": {+ "version": "4.12.2",+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz",+ "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "^12.0.0 || ^14.0.0 || >=16.0.0"+ }+ },+ "node_modules/@eslint/config-array": {+ "version": "0.21.2",+ "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.2.tgz",+ "integrity": "sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "@eslint/object-schema": "^2.1.7",+ "debug": "^4.3.1",+ "minimatch": "^3.1.5"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ }+ },+ "node_modules/@eslint/config-helpers": {+ "version": "0.4.2",+ "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz",+ "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "@eslint/core": "^0.17.0"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ }+ },+ "node_modules/@eslint/core": {+ "version": "0.17.0",+ "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz",+ "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "@types/json-schema": "^7.0.15"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ }+ },+ "node_modules/@eslint/eslintrc": {+ "version": "3.3.5",+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.5.tgz",+ "integrity": "sha512-4IlJx0X0qftVsN5E+/vGujTRIFtwuLbNsVUe7TO6zYPDR1O6nFwvwhIKEKSrl6dZchmYBITazxKoUYOjdtjlRg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ajv": "^6.14.0",+ "debug": "^4.3.2",+ "espree": "^10.0.1",+ "globals": "^14.0.0",+ "ignore": "^5.2.0",+ "import-fresh": "^3.2.1",+ "js-yaml": "^4.1.1",+ "minimatch": "^3.1.5",+ "strip-json-comments": "^3.1.1"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ }+ },+ "node_modules/@eslint/js": {+ "version": "9.39.4",+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.4.tgz",+ "integrity": "sha512-nE7DEIchvtiFTwBw4Lfbu59PG+kCofhjsKaCWzxTpt4lfRjRMqG6uMBzKXuEcyXhOHoUp9riAm7/aWYGhXZ9cw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "url": "https://eslint.org/donate"+ }+ },+ "node_modules/@eslint/object-schema": {+ "version": "2.1.7",+ "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz",+ "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ }+ },+ "node_modules/@eslint/plugin-kit": {+ "version": "0.4.1",+ "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz",+ "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "@eslint/core": "^0.17.0",+ "levn": "^0.4.1"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ }+ },+ "node_modules/@floating-ui/core": {+ "version": "1.7.5",+ "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.5.tgz",+ "integrity": "sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ==",+ "license": "MIT",+ "dependencies": {+ "@floating-ui/utils": "^0.2.11"+ }+ },+ "node_modules/@floating-ui/dom": {+ "version": "1.7.6",+ "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.6.tgz",+ "integrity": "sha512-9gZSAI5XM36880PPMm//9dfiEngYoC6Am2izES1FF406YFsjvyBMmeJ2g4SAju3xWwtuynNRFL2s9hgxpLI5SQ==",+ "license": "MIT",+ "dependencies": {+ "@floating-ui/core": "^1.7.5",+ "@floating-ui/utils": "^0.2.11"+ }+ },+ "node_modules/@floating-ui/react-dom": {+ "version": "2.1.8",+ "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.8.tgz",+ "integrity": "sha512-cC52bHwM/n/CxS87FH0yWdngEZrjdtLW/qVruo68qg+prK7ZQ4YGdut2GyDVpoGeAYe/h899rVeOVm6Oi40k2A==",+ "license": "MIT",+ "dependencies": {+ "@floating-ui/dom": "^1.7.6"+ },+ "peerDependencies": {+ "react": ">=16.8.0",+ "react-dom": ">=16.8.0"+ }+ },+ "node_modules/@floating-ui/utils": {+ "version": "0.2.11",+ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.11.tgz",+ "integrity": "sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg==",+ "license": "MIT"+ },+ "node_modules/@hono/node-server": {+ "version": "1.19.11",+ "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.11.tgz",+ "integrity": "sha512-dr8/3zEaB+p0D2n/IUrlPF1HZm586qgJNXK1a9fhg/PzdtkK7Ksd5l312tJX2yBuALqDYBlG20QEbayqPyxn+g==",+ "license": "MIT",+ "engines": {+ "node": ">=18.14.1"+ },+ "peerDependencies": {+ "hono": "^4"+ }+ },+ "node_modules/@humanfs/core": {+ "version": "0.19.1",+ "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",+ "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">=18.18.0"+ }+ },+ "node_modules/@humanfs/node": {+ "version": "0.16.7",+ "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz",+ "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "@humanfs/core": "^0.19.1",+ "@humanwhocodes/retry": "^0.4.0"+ },+ "engines": {+ "node": ">=18.18.0"+ }+ },+ "node_modules/@humanwhocodes/module-importer": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">=12.22"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/nzakas"+ }+ },+ "node_modules/@humanwhocodes/retry": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz",+ "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">=18.18"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/nzakas"+ }+ },+ "node_modules/@img/colour": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz",+ "integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==",+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@img/sharp-darwin-arm64": {+ "version": "0.34.5",+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz",+ "integrity": "sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==",+ "cpu": [+ "arm64"+ ],+ "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.2.4"+ }+ },+ "node_modules/@img/sharp-darwin-x64": {+ "version": "0.34.5",+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.5.tgz",+ "integrity": "sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==",+ "cpu": [+ "x64"+ ],+ "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-x64": "1.2.4"+ }+ },+ "node_modules/@img/sharp-libvips-darwin-arm64": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz",+ "integrity": "sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==",+ "cpu": [+ "arm64"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "darwin"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-darwin-x64": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.4.tgz",+ "integrity": "sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==",+ "cpu": [+ "x64"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "darwin"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-linux-arm": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.4.tgz",+ "integrity": "sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==",+ "cpu": [+ "arm"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "linux"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-linux-arm64": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.4.tgz",+ "integrity": "sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==",+ "cpu": [+ "arm64"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "linux"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-linux-ppc64": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.2.4.tgz",+ "integrity": "sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==",+ "cpu": [+ "ppc64"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "linux"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-linux-riscv64": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.2.4.tgz",+ "integrity": "sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==",+ "cpu": [+ "riscv64"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "linux"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-linux-s390x": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.4.tgz",+ "integrity": "sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==",+ "cpu": [+ "s390x"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "linux"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-linux-x64": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.4.tgz",+ "integrity": "sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==",+ "cpu": [+ "x64"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "linux"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-linuxmusl-arm64": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.4.tgz",+ "integrity": "sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==",+ "cpu": [+ "arm64"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "linux"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-linuxmusl-x64": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.4.tgz",+ "integrity": "sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==",+ "cpu": [+ "x64"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "linux"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-linux-arm": {+ "version": "0.34.5",+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.5.tgz",+ "integrity": "sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==",+ "cpu": [+ "arm"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-libvips-linux-arm": "1.2.4"+ }+ },+ "node_modules/@img/sharp-linux-arm64": {+ "version": "0.34.5",+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.5.tgz",+ "integrity": "sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==",+ "cpu": [+ "arm64"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-libvips-linux-arm64": "1.2.4"+ }+ },+ "node_modules/@img/sharp-linux-ppc64": {+ "version": "0.34.5",+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.34.5.tgz",+ "integrity": "sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==",+ "cpu": [+ "ppc64"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-libvips-linux-ppc64": "1.2.4"+ }+ },+ "node_modules/@img/sharp-linux-riscv64": {+ "version": "0.34.5",+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.34.5.tgz",+ "integrity": "sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==",+ "cpu": [+ "riscv64"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-libvips-linux-riscv64": "1.2.4"+ }+ },+ "node_modules/@img/sharp-linux-s390x": {+ "version": "0.34.5",+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.5.tgz",+ "integrity": "sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==",+ "cpu": [+ "s390x"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-libvips-linux-s390x": "1.2.4"+ }+ },+ "node_modules/@img/sharp-linux-x64": {+ "version": "0.34.5",+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.5.tgz",+ "integrity": "sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==",+ "cpu": [+ "x64"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-libvips-linux-x64": "1.2.4"+ }+ },+ "node_modules/@img/sharp-linuxmusl-arm64": {+ "version": "0.34.5",+ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.5.tgz",+ "integrity": "sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==",+ "cpu": [+ "arm64"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-libvips-linuxmusl-arm64": "1.2.4"+ }+ },+ "node_modules/@img/sharp-linuxmusl-x64": {+ "version": "0.34.5",+ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.5.tgz",+ "integrity": "sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==",+ "cpu": [+ "x64"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-libvips-linuxmusl-x64": "1.2.4"+ }+ },+ "node_modules/@img/sharp-wasm32": {+ "version": "0.34.5",+ "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.5.tgz",+ "integrity": "sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==",+ "cpu": [+ "wasm32"+ ],+ "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",+ "optional": true,+ "dependencies": {+ "@emnapi/runtime": "^1.7.0"+ },+ "engines": {+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-win32-arm64": {+ "version": "0.34.5",+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.5.tgz",+ "integrity": "sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==",+ "cpu": [+ "arm64"+ ],+ "license": "Apache-2.0 AND LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-win32-ia32": {+ "version": "0.34.5",+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.5.tgz",+ "integrity": "sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==",+ "cpu": [+ "ia32"+ ],+ "license": "Apache-2.0 AND LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-win32-x64": {+ "version": "0.34.5",+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.5.tgz",+ "integrity": "sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==",+ "cpu": [+ "x64"+ ],+ "license": "Apache-2.0 AND LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@inquirer/ansi": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-1.0.2.tgz",+ "integrity": "sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@inquirer/confirm": {+ "version": "5.1.21",+ "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.21.tgz",+ "integrity": "sha512-KR8edRkIsUayMXV+o3Gv+q4jlhENF9nMYUZs9PA2HzrXeHI8M5uDag70U7RJn9yyiMZSbtF5/UexBtAVtZGSbQ==",+ "license": "MIT",+ "dependencies": {+ "@inquirer/core": "^10.3.2",+ "@inquirer/type": "^3.0.10"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "@types/node": ">=18"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }+ }+ },+ "node_modules/@inquirer/core": {+ "version": "10.3.2",+ "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.3.2.tgz",+ "integrity": "sha512-43RTuEbfP8MbKzedNqBrlhhNKVwoK//vUFNW3Q3vZ88BLcrs4kYpGg+B2mm5p2K/HfygoCxuKwJJiv8PbGmE0A==",+ "license": "MIT",+ "dependencies": {+ "@inquirer/ansi": "^1.0.2",+ "@inquirer/figures": "^1.0.15",+ "@inquirer/type": "^3.0.10",+ "cli-width": "^4.1.0",+ "mute-stream": "^2.0.0",+ "signal-exit": "^4.1.0",+ "wrap-ansi": "^6.2.0",+ "yoctocolors-cjs": "^2.1.3"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "@types/node": ">=18"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }+ }+ },+ "node_modules/@inquirer/figures": {+ "version": "1.0.15",+ "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.15.tgz",+ "integrity": "sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@inquirer/type": {+ "version": "3.0.10",+ "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.10.tgz",+ "integrity": "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "@types/node": ">=18"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }+ }+ },+ "node_modules/@isaacs/fs-minipass": {+ "version": "4.0.1",+ "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz",+ "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "minipass": "^7.0.4"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@jridgewell/gen-mapping": {+ "version": "0.3.13",+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",+ "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",+ "license": "MIT",+ "dependencies": {+ "@jridgewell/sourcemap-codec": "^1.5.0",+ "@jridgewell/trace-mapping": "^0.3.24"+ }+ },+ "node_modules/@jridgewell/remapping": {+ "version": "2.3.5",+ "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz",+ "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",+ "license": "MIT",+ "dependencies": {+ "@jridgewell/gen-mapping": "^0.3.5",+ "@jridgewell/trace-mapping": "^0.3.24"+ }+ },+ "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==",+ "license": "MIT",+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/@jridgewell/sourcemap-codec": {+ "version": "1.5.5",+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",+ "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",+ "license": "MIT"+ },+ "node_modules/@jridgewell/trace-mapping": {+ "version": "0.3.31",+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",+ "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",+ "license": "MIT",+ "dependencies": {+ "@jridgewell/resolve-uri": "^3.1.0",+ "@jridgewell/sourcemap-codec": "^1.4.14"+ }+ },+ "node_modules/@modelcontextprotocol/sdk": {+ "version": "1.27.1",+ "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.27.1.tgz",+ "integrity": "sha512-sr6GbP+4edBwFndLbM60gf07z0FQ79gaExpnsjMGePXqFcSSb7t6iscpjk9DhFhwd+mTEQrzNafGP8/iGGFYaA==",+ "license": "MIT",+ "dependencies": {+ "@hono/node-server": "^1.19.9",+ "ajv": "^8.17.1",+ "ajv-formats": "^3.0.1",+ "content-type": "^1.0.5",+ "cors": "^2.8.5",+ "cross-spawn": "^7.0.5",+ "eventsource": "^3.0.2",+ "eventsource-parser": "^3.0.0",+ "express": "^5.2.1",+ "express-rate-limit": "^8.2.1",+ "hono": "^4.11.4",+ "jose": "^6.1.3",+ "json-schema-typed": "^8.0.2",+ "pkce-challenge": "^5.0.0",+ "raw-body": "^3.0.0",+ "zod": "^3.25 || ^4.0",+ "zod-to-json-schema": "^3.25.1"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "@cfworker/json-schema": "^4.1.1",+ "zod": "^3.25 || ^4.0"+ },+ "peerDependenciesMeta": {+ "@cfworker/json-schema": {+ "optional": true+ },+ "zod": {+ "optional": false+ }+ }+ },+ "node_modules/@modelcontextprotocol/sdk/node_modules/ajv": {+ "version": "8.18.0",+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz",+ "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==",+ "license": "MIT",+ "dependencies": {+ "fast-deep-equal": "^3.1.3",+ "fast-uri": "^3.0.1",+ "json-schema-traverse": "^1.0.0",+ "require-from-string": "^2.0.2"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/epoberezkin"+ }+ },+ "node_modules/@modelcontextprotocol/sdk/node_modules/json-schema-traverse": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",+ "license": "MIT"+ },+ "node_modules/@mongodb-js/saslprep": {+ "version": "1.4.6",+ "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.4.6.tgz",+ "integrity": "sha512-y+x3H1xBZd38n10NZF/rEBlvDOOMQ6LKUTHqr8R9VkJ+mmQOYtJFxIlkkK8fZrtOiL6VixbOBWMbZGBdal3Z1g==",+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "sparse-bitfield": "^3.0.3"+ }+ },+ "node_modules/@mswjs/interceptors": {+ "version": "0.41.3",+ "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.41.3.tgz",+ "integrity": "sha512-cXu86tF4VQVfwz8W1SPbhoRyHJkti6mjH/XJIxp40jhO4j2k1m4KYrEykxqWPkFF3vrK4rgQppBh//AwyGSXPA==",+ "license": "MIT",+ "dependencies": {+ "@open-draft/deferred-promise": "^2.2.0",+ "@open-draft/logger": "^0.3.0",+ "@open-draft/until": "^2.0.0",+ "is-node-process": "^1.2.0",+ "outvariant": "^1.4.3",+ "strict-event-emitter": "^0.5.1"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@napi-rs/canvas": {+ "version": "0.1.97",+ "resolved": "https://registry.npmjs.org/@napi-rs/canvas/-/canvas-0.1.97.tgz",+ "integrity": "sha512-8cFniXvrIEnVwuNSRCW9wirRZbHvrD3JVujdS2P5n5xiJZNZMOZcfOvJ1pb66c7jXMKHHglJEDVJGbm8XWFcXQ==",+ "license": "MIT",+ "optional": true,+ "workspaces": [+ "e2e/*"+ ],+ "engines": {+ "node": ">= 10"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/Brooooooklyn"+ },+ "optionalDependencies": {+ "@napi-rs/canvas-android-arm64": "0.1.97",+ "@napi-rs/canvas-darwin-arm64": "0.1.97",+ "@napi-rs/canvas-darwin-x64": "0.1.97",+ "@napi-rs/canvas-linux-arm-gnueabihf": "0.1.97",+ "@napi-rs/canvas-linux-arm64-gnu": "0.1.97",+ "@napi-rs/canvas-linux-arm64-musl": "0.1.97",+ "@napi-rs/canvas-linux-riscv64-gnu": "0.1.97",+ "@napi-rs/canvas-linux-x64-gnu": "0.1.97",+ "@napi-rs/canvas-linux-x64-musl": "0.1.97",+ "@napi-rs/canvas-win32-arm64-msvc": "0.1.97",+ "@napi-rs/canvas-win32-x64-msvc": "0.1.97"+ }+ },+ "node_modules/@napi-rs/canvas-android-arm64": {+ "version": "0.1.97",+ "resolved": "https://registry.npmjs.org/@napi-rs/canvas-android-arm64/-/canvas-android-arm64-0.1.97.tgz",+ "integrity": "sha512-V1c/WVw+NzH8vk7ZK/O8/nyBSCQimU8sfMsB/9qeSvdkGKNU7+mxy/bIF0gTgeBFmHpj30S4E9WHMSrxXGQuVQ==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">= 10"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/Brooooooklyn"+ }+ },+ "node_modules/@napi-rs/canvas-darwin-arm64": {+ "version": "0.1.97",+ "resolved": "https://registry.npmjs.org/@napi-rs/canvas-darwin-arm64/-/canvas-darwin-arm64-0.1.97.tgz",+ "integrity": "sha512-ok+SCEF4YejcxuJ9Rm+WWunHHpf2HmiPxfz6z1a/NFQECGXtsY7A4B8XocK1LmT1D7P174MzwPF9Wy3AUAwEPw==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 10"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/Brooooooklyn"+ }+ },+ "node_modules/@napi-rs/canvas-darwin-x64": {+ "version": "0.1.97",+ "resolved": "https://registry.npmjs.org/@napi-rs/canvas-darwin-x64/-/canvas-darwin-x64-0.1.97.tgz",+ "integrity": "sha512-PUP6e6/UGlclUvAQNnuXCcnkpdUou6VYZfQOQxExLp86epOylmiwLkqXIvpFmjoTEDmPmXrI+coL/9EFU1gKPA==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 10"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/Brooooooklyn"+ }+ },+ "node_modules/@napi-rs/canvas-linux-arm-gnueabihf": {+ "version": "0.1.97",+ "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-arm-gnueabihf/-/canvas-linux-arm-gnueabihf-0.1.97.tgz",+ "integrity": "sha512-XyXH2L/cic8eTNtbrXCcvqHtMX/nEOxN18+7rMrAM2XtLYC/EB5s0wnO1FsLMWmK+04ZSLN9FBGipo7kpIkcOw==",+ "cpu": [+ "arm"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/Brooooooklyn"+ }+ },+ "node_modules/@napi-rs/canvas-linux-arm64-gnu": {+ "version": "0.1.97",+ "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-arm64-gnu/-/canvas-linux-arm64-gnu-0.1.97.tgz",+ "integrity": "sha512-Kuq/M3djq0K8ktgz6nPlK7Ne5d4uWeDxPpyKWOjWDK2RIOhHVtLtyLiJw2fuldw7Vn4mhw05EZXCEr4Q76rs9w==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/Brooooooklyn"+ }+ },+ "node_modules/@napi-rs/canvas-linux-arm64-musl": {+ "version": "0.1.97",+ "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-arm64-musl/-/canvas-linux-arm64-musl-0.1.97.tgz",+ "integrity": "sha512-kKmSkQVnWeqg7qdsiXvYxKhAFuHz3tkBjW/zyQv5YKUPhotpaVhpBGv5LqCngzyuRV85SXoe+OFj+Tv0a0QXkQ==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/Brooooooklyn"+ }+ },+ "node_modules/@napi-rs/canvas-linux-riscv64-gnu": {+ "version": "0.1.97",+ "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-riscv64-gnu/-/canvas-linux-riscv64-gnu-0.1.97.tgz",+ "integrity": "sha512-Jc7I3A51jnEOIAXeLsN/M/+Z28LUeakcsXs07FLq9prXc0eYOtVwsDEv913Gr+06IRo34gJJVgT0TXvmz+N2VA==",+ "cpu": [+ "riscv64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/Brooooooklyn"+ }+ },+ "node_modules/@napi-rs/canvas-linux-x64-gnu": {+ "version": "0.1.97",+ "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-x64-gnu/-/canvas-linux-x64-gnu-0.1.97.tgz",+ "integrity": "sha512-iDUBe7AilfuBSRbSa8/IGX38Mf+iCSBqoVKLSQ5XaY2JLOaqz1TVyPFEyIck7wT6mRQhQt5sN6ogfjIDfi74tg==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/Brooooooklyn"+ }+ },+ "node_modules/@napi-rs/canvas-linux-x64-musl": {+ "version": "0.1.97",+ "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-x64-musl/-/canvas-linux-x64-musl-0.1.97.tgz",+ "integrity": "sha512-AKLFd/v0Z5fvgqBDqhvqtAdx+fHMJ5t9JcUNKq4FIZ5WH+iegGm8HPdj00NFlCSnm83Fp3Ln8I2f7uq1aIiWaA==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/Brooooooklyn"+ }+ },+ "node_modules/@napi-rs/canvas-win32-arm64-msvc": {+ "version": "0.1.97",+ "resolved": "https://registry.npmjs.org/@napi-rs/canvas-win32-arm64-msvc/-/canvas-win32-arm64-msvc-0.1.97.tgz",+ "integrity": "sha512-u883Yr6A6fO7Vpsy9YE4FVCIxzzo5sO+7pIUjjoDLjS3vQaNMkVzx5bdIpEL+ob+gU88WDK4VcxYMZ6nmnoX9A==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 10"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/Brooooooklyn"+ }+ },+ "node_modules/@napi-rs/canvas-win32-x64-msvc": {+ "version": "0.1.97",+ "resolved": "https://registry.npmjs.org/@napi-rs/canvas-win32-x64-msvc/-/canvas-win32-x64-msvc-0.1.97.tgz",+ "integrity": "sha512-sWtD2EE3fV0IzN+iiQUqr/Q1SwqWhs2O1FKItFlxtdDkikpEj5g7DKQpY3x55H/MAOnL8iomnlk3mcEeGiUMoQ==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 10"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/Brooooooklyn"+ }+ },+ "node_modules/@napi-rs/wasm-runtime": {+ "version": "0.2.12",+ "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz",+ "integrity": "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "@emnapi/core": "^1.4.3",+ "@emnapi/runtime": "^1.4.3",+ "@tybys/wasm-util": "^0.10.0"+ }+ },+ "node_modules/@next/env": {+ "version": "16.1.7",+ "resolved": "https://registry.npmjs.org/@next/env/-/env-16.1.7.tgz",+ "integrity": "sha512-rJJbIdJB/RQr2F1nylZr/PJzamvNNhfr3brdKP6s/GW850jbtR70QlSfFselvIBbcPUOlQwBakexjFzqLzF6pg==",+ "license": "MIT"+ },+ "node_modules/@next/eslint-plugin-next": {+ "version": "16.1.7",+ "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-16.1.7.tgz",+ "integrity": "sha512-v/bRGOJlfRCO+NDKt0bZlIIWjhMKU8xbgEQBo+rV9C8S6czZvs96LZ/v24/GvpEnovZlL4QDpku/RzWHVbmPpA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "fast-glob": "3.3.1"+ }+ },+ "node_modules/@next/swc-darwin-arm64": {+ "version": "16.1.7",+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.1.7.tgz",+ "integrity": "sha512-b2wWIE8sABdyafc4IM8r5Y/dS6kD80JRtOGrUiKTsACFQfWWgUQ2NwoUX1yjFMXVsAwcQeNpnucF2ZrujsBBPg==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-darwin-x64": {+ "version": "16.1.7",+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.1.7.tgz",+ "integrity": "sha512-zcnVaaZulS1WL0Ss38R5Q6D2gz7MtBu8GZLPfK+73D/hp4GFMrC2sudLky1QibfV7h6RJBJs/gOFvYP0X7UVlQ==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-linux-arm64-gnu": {+ "version": "16.1.7",+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.1.7.tgz",+ "integrity": "sha512-2ant89Lux/Q3VyC8vNVg7uBaFVP9SwoK2jJOOR0L8TQnX8CAYnh4uctAScy2Hwj2dgjVHqHLORQZJ2wH6VxhSQ==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-linux-arm64-musl": {+ "version": "16.1.7",+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.1.7.tgz",+ "integrity": "sha512-uufcze7LYv0FQg9GnNeZ3/whYfo+1Q3HnQpm16o6Uyi0OVzLlk2ZWoY7j07KADZFY8qwDbsmFnMQP3p3+Ftprw==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-linux-x64-gnu": {+ "version": "16.1.7",+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.1.7.tgz",+ "integrity": "sha512-KWVf2gxYvHtvuT+c4MBOGxuse5TD7DsMFYSxVxRBnOzok/xryNeQSjXgxSv9QpIVlaGzEn/pIuI6Koosx8CGWA==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-linux-x64-musl": {+ "version": "16.1.7",+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.1.7.tgz",+ "integrity": "sha512-HguhaGwsGr1YAGs68uRKc4aGWxLET+NevJskOcCAwXbwj0fYX0RgZW2gsOCzr9S11CSQPIkxmoSbuVaBp4Z3dA==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-win32-arm64-msvc": {+ "version": "16.1.7",+ "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.1.7.tgz",+ "integrity": "sha512-S0n3KrDJokKTeFyM/vGGGR8+pCmXYrjNTk2ZozOL1C/JFdfUIL9O1ATaJOl5r2POe56iRChbsszrjMAdWSv7kQ==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-win32-x64-msvc": {+ "version": "16.1.7",+ "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.1.7.tgz",+ "integrity": "sha512-mwgtg8CNZGYm06LeEd+bNnOUfwOyNem/rOiP14Lsz+AnUY92Zq/LXwtebtUiaeVkhbroRCQ0c8GlR4UT1U+0yg==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@noble/ciphers": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-2.1.1.tgz",+ "integrity": "sha512-bysYuiVfhxNJuldNXlFEitTVdNnYUc+XNJZd7Qm2a5j1vZHgY+fazadNFWFaMK/2vye0JVlxV3gHmC0WDfAOQw==",+ "license": "MIT",+ "engines": {+ "node": ">= 20.19.0"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },+ "node_modules/@noble/curves": {+ "version": "1.9.7",+ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz",+ "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==",+ "license": "MIT",+ "dependencies": {+ "@noble/hashes": "1.8.0"+ },+ "engines": {+ "node": "^14.21.3 || >=16"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },+ "node_modules/@noble/curves/node_modules/@noble/hashes": {+ "version": "1.8.0",+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz",+ "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==",+ "license": "MIT",+ "engines": {+ "node": "^14.21.3 || >=16"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },+ "node_modules/@noble/hashes": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.0.1.tgz",+ "integrity": "sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==",+ "license": "MIT",+ "engines": {+ "node": ">= 20.19.0"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },+ "node_modules/@nodelib/fs.scandir": {+ "version": "2.1.5",+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",+ "license": "MIT",+ "dependencies": {+ "@nodelib/fs.stat": "2.0.5",+ "run-parallel": "^1.1.9"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/@nodelib/fs.stat": {+ "version": "2.0.5",+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",+ "license": "MIT",+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/@nodelib/fs.walk": {+ "version": "1.2.8",+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",+ "license": "MIT",+ "dependencies": {+ "@nodelib/fs.scandir": "2.1.5",+ "fastq": "^1.6.0"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/@nolyfill/is-core-module": {+ "version": "1.0.39",+ "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz",+ "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12.4.0"+ }+ },+ "node_modules/@open-draft/deferred-promise": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz",+ "integrity": "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==",+ "license": "MIT"+ },+ "node_modules/@open-draft/logger": {+ "version": "0.3.0",+ "resolved": "https://registry.npmjs.org/@open-draft/logger/-/logger-0.3.0.tgz",+ "integrity": "sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==",+ "license": "MIT",+ "dependencies": {+ "is-node-process": "^1.2.0",+ "outvariant": "^1.4.0"+ }+ },+ "node_modules/@open-draft/until": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/@open-draft/until/-/until-2.1.0.tgz",+ "integrity": "sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==",+ "license": "MIT"+ },+ "node_modules/@pdf-lib/fontkit": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/@pdf-lib/fontkit/-/fontkit-1.1.1.tgz",+ "integrity": "sha512-KjMd7grNapIWS/Dm0gvfHEilSyAmeLvrEGVcqLGi0VYebuqqzTbgF29efCx7tvx+IEbG3zQciRSWl3GkUSvjZg==",+ "license": "MIT",+ "dependencies": {+ "pako": "^1.0.6"+ }+ },+ "node_modules/@pdf-lib/standard-fonts": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/@pdf-lib/standard-fonts/-/standard-fonts-1.0.0.tgz",+ "integrity": "sha512-hU30BK9IUN/su0Mn9VdlVKsWBS6GyhVfqjwl1FjZN4TxP6cCw0jP2w7V3Hf5uX7M0AZJ16vey9yE0ny7Sa59ZA==",+ "license": "MIT",+ "dependencies": {+ "pako": "^1.0.6"+ }+ },+ "node_modules/@pdf-lib/upng": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/@pdf-lib/upng/-/upng-1.0.1.tgz",+ "integrity": "sha512-dQK2FUMQtowVP00mtIksrlZhdFXQZPC+taih1q4CvPZ5vqdxR/LKBaFg0oAfzd1GlHZXXSPdQfzQnt+ViGvEIQ==",+ "license": "MIT",+ "dependencies": {+ "pako": "^1.0.10"+ }+ },+ "node_modules/@radix-ui/number": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.1.1.tgz",+ "integrity": "sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g==",+ "license": "MIT"+ },+ "node_modules/@radix-ui/primitive": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.3.tgz",+ "integrity": "sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==",+ "license": "MIT"+ },+ "node_modules/@radix-ui/react-accessible-icon": {+ "version": "1.1.7",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-accessible-icon/-/react-accessible-icon-1.1.7.tgz",+ "integrity": "sha512-XM+E4WXl0OqUJFovy6GjmxxFyx9opfCAIUku4dlKRd5YEPqt4kALOkQOp0Of6reHuUkJuiPBEc5k0o4z4lTC8A==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-visually-hidden": "1.2.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-accordion": {+ "version": "1.2.12",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.2.12.tgz",+ "integrity": "sha512-T4nygeh9YE9dLRPhAHSeOZi7HBXo+0kYIPJXayZfvWOWA0+n3dESrZbjfDPUABkUNym6Hd+f2IR113To8D2GPA==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-collapsible": "1.1.12",+ "@radix-ui/react-collection": "1.1.7",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-direction": "1.1.1",+ "@radix-ui/react-id": "1.1.1",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-controllable-state": "1.2.2"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-alert-dialog": {+ "version": "1.1.15",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-alert-dialog/-/react-alert-dialog-1.1.15.tgz",+ "integrity": "sha512-oTVLkEw5GpdRe29BqJ0LSDFWI3qu0vR1M0mUkOQWDIUnY/QIkLpgDMWuKxP94c2NAC2LGcgVhG1ImF3jkZ5wXw==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-dialog": "1.1.15",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-slot": "1.2.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-arrow": {+ "version": "1.1.7",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.7.tgz",+ "integrity": "sha512-F+M1tLhO+mlQaOWspE8Wstg+z6PwxwRd8oQ8IXceWz92kfAmalTRf0EjrouQeo7QssEPfCn05B4Ihs1K9WQ/7w==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-primitive": "2.1.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-aspect-ratio": {+ "version": "1.1.7",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-aspect-ratio/-/react-aspect-ratio-1.1.7.tgz",+ "integrity": "sha512-Yq6lvO9HQyPwev1onK1daHCHqXVLzPhSVjmsNjCa2Zcxy2f7uJD2itDtxknv6FzAKCwD1qQkeVDmX/cev13n/g==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-primitive": "2.1.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-avatar": {+ "version": "1.1.10",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-avatar/-/react-avatar-1.1.10.tgz",+ "integrity": "sha512-V8piFfWapM5OmNCXTzVQY+E1rDa53zY+MQ4Y7356v4fFz6vqCyUtIz2rUD44ZEdwg78/jKmMJHj07+C/Z/rcog==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-callback-ref": "1.1.1",+ "@radix-ui/react-use-is-hydrated": "0.1.0",+ "@radix-ui/react-use-layout-effect": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-checkbox": {+ "version": "1.3.3",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.3.3.tgz",+ "integrity": "sha512-wBbpv+NQftHDdG86Qc0pIyXk5IR3tM8Vd0nWLKDcX8nNn4nXFOFwsKuqw2okA/1D/mpaAkmuyndrPJTYDNZtFw==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-presence": "1.1.5",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-controllable-state": "1.2.2",+ "@radix-ui/react-use-previous": "1.1.1",+ "@radix-ui/react-use-size": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-collapsible": {+ "version": "1.1.12",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.1.12.tgz",+ "integrity": "sha512-Uu+mSh4agx2ib1uIGPP4/CKNULyajb3p92LsVXmH2EHVMTfZWpll88XJ0j4W0z3f8NK1eYl1+Mf/szHPmcHzyA==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-id": "1.1.1",+ "@radix-ui/react-presence": "1.1.5",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-controllable-state": "1.2.2",+ "@radix-ui/react-use-layout-effect": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-collection": {+ "version": "1.1.7",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.7.tgz",+ "integrity": "sha512-Fh9rGN0MoI4ZFUNyfFVNU4y9LUz93u9/0K+yLgA2bwRojxM8JU1DyvvMBabnZPBgMWREAJvU2jjVzq+LrFUglw==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-slot": "1.2.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-compose-refs": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz",+ "integrity": "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==",+ "license": "MIT",+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-context": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.2.tgz",+ "integrity": "sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==",+ "license": "MIT",+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-context-menu": {+ "version": "2.2.16",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-context-menu/-/react-context-menu-2.2.16.tgz",+ "integrity": "sha512-O8morBEW+HsVG28gYDZPTrT9UUovQUlJue5YO836tiTJhuIWBm/zQHc7j388sHWtdH/xUZurK9olD2+pcqx5ww==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-menu": "2.1.16",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-callback-ref": "1.1.1",+ "@radix-ui/react-use-controllable-state": "1.2.2"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-dialog": {+ "version": "1.1.15",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.15.tgz",+ "integrity": "sha512-TCglVRtzlffRNxRMEyR36DGBLJpeusFcgMVD9PZEzAKnUs1lKCgX5u9BmC2Yg+LL9MgZDugFFs1Vl+Jp4t/PGw==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-dismissable-layer": "1.1.11",+ "@radix-ui/react-focus-guards": "1.1.3",+ "@radix-ui/react-focus-scope": "1.1.7",+ "@radix-ui/react-id": "1.1.1",+ "@radix-ui/react-portal": "1.1.9",+ "@radix-ui/react-presence": "1.1.5",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-slot": "1.2.3",+ "@radix-ui/react-use-controllable-state": "1.2.2",+ "aria-hidden": "^1.2.4",+ "react-remove-scroll": "^2.6.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-direction": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.1.tgz",+ "integrity": "sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw==",+ "license": "MIT",+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-dismissable-layer": {+ "version": "1.1.11",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.11.tgz",+ "integrity": "sha512-Nqcp+t5cTB8BinFkZgXiMJniQH0PsUt2k51FUhbdfeKvc4ACcG2uQniY/8+h1Yv6Kza4Q7lD7PQV0z0oicE0Mg==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-callback-ref": "1.1.1",+ "@radix-ui/react-use-escape-keydown": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-dropdown-menu": {+ "version": "2.1.16",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.16.tgz",+ "integrity": "sha512-1PLGQEynI/3OX/ftV54COn+3Sud/Mn8vALg2rWnBLnRaGtJDduNW/22XjlGgPdpcIbiQxjKtb7BkcjP00nqfJw==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-id": "1.1.1",+ "@radix-ui/react-menu": "2.1.16",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-controllable-state": "1.2.2"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-focus-guards": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.3.tgz",+ "integrity": "sha512-0rFg/Rj2Q62NCm62jZw0QX7a3sz6QCQU0LpZdNrJX8byRGaGVTqbrW9jAoIAHyMQqsNpeZ81YgSizOt5WXq0Pw==",+ "license": "MIT",+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-focus-scope": {+ "version": "1.1.7",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.7.tgz",+ "integrity": "sha512-t2ODlkXBQyn7jkl6TNaw/MtVEVvIGelJDCG41Okq/KwUsJBwQ4XVZsHAVUkK4mBv3ewiAS3PGuUWuY2BoK4ZUw==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-callback-ref": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-form": {+ "version": "0.1.8",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-form/-/react-form-0.1.8.tgz",+ "integrity": "sha512-QM70k4Zwjttifr5a4sZFts9fn8FzHYvQ5PiB19O2HsYibaHSVt9fH9rzB0XZo/YcM+b7t/p7lYCT/F5eOeF5yQ==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-id": "1.1.1",+ "@radix-ui/react-label": "2.1.7",+ "@radix-ui/react-primitive": "2.1.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-hover-card": {+ "version": "1.1.15",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-hover-card/-/react-hover-card-1.1.15.tgz",+ "integrity": "sha512-qgTkjNT1CfKMoP0rcasmlH2r1DAiYicWsDsufxl940sT2wHNEWWv6FMWIQXWhVdmC1d/HYfbhQx60KYyAtKxjg==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-dismissable-layer": "1.1.11",+ "@radix-ui/react-popper": "1.2.8",+ "@radix-ui/react-portal": "1.1.9",+ "@radix-ui/react-presence": "1.1.5",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-controllable-state": "1.2.2"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-id": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.1.tgz",+ "integrity": "sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-use-layout-effect": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-label": {+ "version": "2.1.7",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-label/-/react-label-2.1.7.tgz",+ "integrity": "sha512-YT1GqPSL8kJn20djelMX7/cTRp/Y9w5IZHvfxQTVHrOqa2yMl7i/UfMqKRU5V7mEyKTrUVgJXhNQPVCG8PBLoQ==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-primitive": "2.1.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-menu": {+ "version": "2.1.16",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.1.16.tgz",+ "integrity": "sha512-72F2T+PLlphrqLcAotYPp0uJMr5SjP5SL01wfEspJbru5Zs5vQaSHb4VB3ZMJPimgHHCHG7gMOeOB9H3Hdmtxg==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-collection": "1.1.7",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-direction": "1.1.1",+ "@radix-ui/react-dismissable-layer": "1.1.11",+ "@radix-ui/react-focus-guards": "1.1.3",+ "@radix-ui/react-focus-scope": "1.1.7",+ "@radix-ui/react-id": "1.1.1",+ "@radix-ui/react-popper": "1.2.8",+ "@radix-ui/react-portal": "1.1.9",+ "@radix-ui/react-presence": "1.1.5",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-roving-focus": "1.1.11",+ "@radix-ui/react-slot": "1.2.3",+ "@radix-ui/react-use-callback-ref": "1.1.1",+ "aria-hidden": "^1.2.4",+ "react-remove-scroll": "^2.6.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-menubar": {+ "version": "1.1.16",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-menubar/-/react-menubar-1.1.16.tgz",+ "integrity": "sha512-EB1FktTz5xRRi2Er974AUQZWg2yVBb1yjip38/lgwtCVRd3a+maUoGHN/xs9Yv8SY8QwbSEb+YrxGadVWbEutA==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-collection": "1.1.7",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-direction": "1.1.1",+ "@radix-ui/react-id": "1.1.1",+ "@radix-ui/react-menu": "2.1.16",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-roving-focus": "1.1.11",+ "@radix-ui/react-use-controllable-state": "1.2.2"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-navigation-menu": {+ "version": "1.2.14",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-navigation-menu/-/react-navigation-menu-1.2.14.tgz",+ "integrity": "sha512-YB9mTFQvCOAQMHU+C/jVl96WmuWeltyUEpRJJky51huhds5W2FQr1J8D/16sQlf0ozxkPK8uF3niQMdUwZPv5w==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-collection": "1.1.7",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-direction": "1.1.1",+ "@radix-ui/react-dismissable-layer": "1.1.11",+ "@radix-ui/react-id": "1.1.1",+ "@radix-ui/react-presence": "1.1.5",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-callback-ref": "1.1.1",+ "@radix-ui/react-use-controllable-state": "1.2.2",+ "@radix-ui/react-use-layout-effect": "1.1.1",+ "@radix-ui/react-use-previous": "1.1.1",+ "@radix-ui/react-visually-hidden": "1.2.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-one-time-password-field": {+ "version": "0.1.8",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-one-time-password-field/-/react-one-time-password-field-0.1.8.tgz",+ "integrity": "sha512-ycS4rbwURavDPVjCb5iS3aG4lURFDILi6sKI/WITUMZ13gMmn/xGjpLoqBAalhJaDk8I3UbCM5GzKHrnzwHbvg==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/number": "1.1.1",+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-collection": "1.1.7",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-direction": "1.1.1",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-roving-focus": "1.1.11",+ "@radix-ui/react-use-controllable-state": "1.2.2",+ "@radix-ui/react-use-effect-event": "0.0.2",+ "@radix-ui/react-use-is-hydrated": "0.1.0",+ "@radix-ui/react-use-layout-effect": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-password-toggle-field": {+ "version": "0.1.3",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-password-toggle-field/-/react-password-toggle-field-0.1.3.tgz",+ "integrity": "sha512-/UuCrDBWravcaMix4TdT+qlNdVwOM1Nck9kWx/vafXsdfj1ChfhOdfi3cy9SGBpWgTXwYCuboT/oYpJy3clqfw==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-id": "1.1.1",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-controllable-state": "1.2.2",+ "@radix-ui/react-use-effect-event": "0.0.2",+ "@radix-ui/react-use-is-hydrated": "0.1.0"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-popover": {+ "version": "1.1.15",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.1.15.tgz",+ "integrity": "sha512-kr0X2+6Yy/vJzLYJUPCZEc8SfQcf+1COFoAqauJm74umQhta9M7lNJHP7QQS3vkvcGLQUbWpMzwrXYwrYztHKA==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-dismissable-layer": "1.1.11",+ "@radix-ui/react-focus-guards": "1.1.3",+ "@radix-ui/react-focus-scope": "1.1.7",+ "@radix-ui/react-id": "1.1.1",+ "@radix-ui/react-popper": "1.2.8",+ "@radix-ui/react-portal": "1.1.9",+ "@radix-ui/react-presence": "1.1.5",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-slot": "1.2.3",+ "@radix-ui/react-use-controllable-state": "1.2.2",+ "aria-hidden": "^1.2.4",+ "react-remove-scroll": "^2.6.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-popper": {+ "version": "1.2.8",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.8.tgz",+ "integrity": "sha512-0NJQ4LFFUuWkE7Oxf0htBKS6zLkkjBH+hM1uk7Ng705ReR8m/uelduy1DBo0PyBXPKVnBA6YBlU94MBGXrSBCw==",+ "license": "MIT",+ "dependencies": {+ "@floating-ui/react-dom": "^2.0.0",+ "@radix-ui/react-arrow": "1.1.7",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-callback-ref": "1.1.1",+ "@radix-ui/react-use-layout-effect": "1.1.1",+ "@radix-ui/react-use-rect": "1.1.1",+ "@radix-ui/react-use-size": "1.1.1",+ "@radix-ui/rect": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-portal": {+ "version": "1.1.9",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.9.tgz",+ "integrity": "sha512-bpIxvq03if6UNwXZ+HTK71JLh4APvnXntDc6XOX8UVq4XQOVl7lwok0AvIl+b8zgCw3fSaVTZMpAPPagXbKmHQ==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-layout-effect": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-presence": {+ "version": "1.1.5",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.5.tgz",+ "integrity": "sha512-/jfEwNDdQVBCNvjkGit4h6pMOzq8bHkopq458dPt2lMjx+eBQUohZNG9A7DtO/O5ukSbxuaNGXMjHicgwy6rQQ==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-use-layout-effect": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-primitive": {+ "version": "2.1.3",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.3.tgz",+ "integrity": "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-slot": "1.2.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-progress": {+ "version": "1.1.7",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-progress/-/react-progress-1.1.7.tgz",+ "integrity": "sha512-vPdg/tF6YC/ynuBIJlk1mm7Le0VgW6ub6J2UWnTQ7/D23KXcPI1qy+0vBkgKgd38RCMJavBXpB83HPNFMTb0Fg==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-primitive": "2.1.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-radio-group": {+ "version": "1.3.8",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-radio-group/-/react-radio-group-1.3.8.tgz",+ "integrity": "sha512-VBKYIYImA5zsxACdisNQ3BjCBfmbGH3kQlnFVqlWU4tXwjy7cGX8ta80BcrO+WJXIn5iBylEH3K6ZTlee//lgQ==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-direction": "1.1.1",+ "@radix-ui/react-presence": "1.1.5",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-roving-focus": "1.1.11",+ "@radix-ui/react-use-controllable-state": "1.2.2",+ "@radix-ui/react-use-previous": "1.1.1",+ "@radix-ui/react-use-size": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-roving-focus": {+ "version": "1.1.11",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.11.tgz",+ "integrity": "sha512-7A6S9jSgm/S+7MdtNDSb+IU859vQqJ/QAtcYQcfFC6W8RS4IxIZDldLR0xqCFZ6DCyrQLjLPsxtTNch5jVA4lA==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-collection": "1.1.7",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-direction": "1.1.1",+ "@radix-ui/react-id": "1.1.1",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-callback-ref": "1.1.1",+ "@radix-ui/react-use-controllable-state": "1.2.2"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-scroll-area": {+ "version": "1.2.10",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-scroll-area/-/react-scroll-area-1.2.10.tgz",+ "integrity": "sha512-tAXIa1g3sM5CGpVT0uIbUx/U3Gs5N8T52IICuCtObaos1S8fzsrPXG5WObkQN3S6NVl6wKgPhAIiBGbWnvc97A==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/number": "1.1.1",+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-direction": "1.1.1",+ "@radix-ui/react-presence": "1.1.5",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-callback-ref": "1.1.1",+ "@radix-ui/react-use-layout-effect": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-select": {+ "version": "2.2.6",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.2.6.tgz",+ "integrity": "sha512-I30RydO+bnn2PQztvo25tswPH+wFBjehVGtmagkU78yMdwTwVf12wnAOF+AeP8S2N8xD+5UPbGhkUfPyvT+mwQ==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/number": "1.1.1",+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-collection": "1.1.7",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-direction": "1.1.1",+ "@radix-ui/react-dismissable-layer": "1.1.11",+ "@radix-ui/react-focus-guards": "1.1.3",+ "@radix-ui/react-focus-scope": "1.1.7",+ "@radix-ui/react-id": "1.1.1",+ "@radix-ui/react-popper": "1.2.8",+ "@radix-ui/react-portal": "1.1.9",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-slot": "1.2.3",+ "@radix-ui/react-use-callback-ref": "1.1.1",+ "@radix-ui/react-use-controllable-state": "1.2.2",+ "@radix-ui/react-use-layout-effect": "1.1.1",+ "@radix-ui/react-use-previous": "1.1.1",+ "@radix-ui/react-visually-hidden": "1.2.3",+ "aria-hidden": "^1.2.4",+ "react-remove-scroll": "^2.6.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-separator": {+ "version": "1.1.7",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.1.7.tgz",+ "integrity": "sha512-0HEb8R9E8A+jZjvmFCy/J4xhbXy3TV+9XSnGJ3KvTtjlIUy/YQ/p6UYZvi7YbeoeXdyU9+Y3scizK6hkY37baA==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-primitive": "2.1.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-slider": {+ "version": "1.3.6",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slider/-/react-slider-1.3.6.tgz",+ "integrity": "sha512-JPYb1GuM1bxfjMRlNLE+BcmBC8onfCi60Blk7OBqi2MLTFdS+8401U4uFjnwkOr49BLmXxLC6JHkvAsx5OJvHw==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/number": "1.1.1",+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-collection": "1.1.7",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-direction": "1.1.1",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-controllable-state": "1.2.2",+ "@radix-ui/react-use-layout-effect": "1.1.1",+ "@radix-ui/react-use-previous": "1.1.1",+ "@radix-ui/react-use-size": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-slot": {+ "version": "1.2.3",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz",+ "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-compose-refs": "1.1.2"+ },+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-switch": {+ "version": "1.2.6",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-switch/-/react-switch-1.2.6.tgz",+ "integrity": "sha512-bByzr1+ep1zk4VubeEVViV592vu2lHE2BZY5OnzehZqOOgogN80+mNtCqPkhn2gklJqOpxWgPoYTSnhBCqpOXQ==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-controllable-state": "1.2.2",+ "@radix-ui/react-use-previous": "1.1.1",+ "@radix-ui/react-use-size": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-tabs": {+ "version": "1.1.13",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.1.13.tgz",+ "integrity": "sha512-7xdcatg7/U+7+Udyoj2zodtI9H/IIopqo+YOIcZOq1nJwXWBZ9p8xiu5llXlekDbZkca79a/fozEYQXIA4sW6A==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-direction": "1.1.1",+ "@radix-ui/react-id": "1.1.1",+ "@radix-ui/react-presence": "1.1.5",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-roving-focus": "1.1.11",+ "@radix-ui/react-use-controllable-state": "1.2.2"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-toast": {+ "version": "1.2.15",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-toast/-/react-toast-1.2.15.tgz",+ "integrity": "sha512-3OSz3TacUWy4WtOXV38DggwxoqJK4+eDkNMl5Z/MJZaoUPaP4/9lf81xXMe1I2ReTAptverZUpbPY4wWwWyL5g==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-collection": "1.1.7",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-dismissable-layer": "1.1.11",+ "@radix-ui/react-portal": "1.1.9",+ "@radix-ui/react-presence": "1.1.5",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-callback-ref": "1.1.1",+ "@radix-ui/react-use-controllable-state": "1.2.2",+ "@radix-ui/react-use-layout-effect": "1.1.1",+ "@radix-ui/react-visually-hidden": "1.2.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-toggle": {+ "version": "1.1.10",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle/-/react-toggle-1.1.10.tgz",+ "integrity": "sha512-lS1odchhFTeZv3xwHH31YPObmJn8gOg7Lq12inrr0+BH/l3Tsq32VfjqH1oh80ARM3mlkfMic15n0kg4sD1poQ==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-use-controllable-state": "1.2.2"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-toggle-group": {+ "version": "1.1.11",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle-group/-/react-toggle-group-1.1.11.tgz",+ "integrity": "sha512-5umnS0T8JQzQT6HbPyO7Hh9dgd82NmS36DQr+X/YJ9ctFNCiiQd6IJAYYZ33LUwm8M+taCz5t2ui29fHZc4Y6Q==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-direction": "1.1.1",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-roving-focus": "1.1.11",+ "@radix-ui/react-toggle": "1.1.10",+ "@radix-ui/react-use-controllable-state": "1.2.2"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-toolbar": {+ "version": "1.1.11",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-toolbar/-/react-toolbar-1.1.11.tgz",+ "integrity": "sha512-4ol06/1bLoFu1nwUqzdD4Y5RZ9oDdKeiHIsntug54Hcr1pgaHiPqHFEaXI1IFP/EsOfROQZ8Mig9VTIRza6Tjg==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-direction": "1.1.1",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-roving-focus": "1.1.11",+ "@radix-ui/react-separator": "1.1.7",+ "@radix-ui/react-toggle-group": "1.1.11"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-tooltip": {+ "version": "1.2.8",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.2.8.tgz",+ "integrity": "sha512-tY7sVt1yL9ozIxvmbtN5qtmH2krXcBCfjEiCgKGLqunJHvgvZG2Pcl2oQ3kbcZARb1BGEHdkLzcYGO8ynVlieg==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-dismissable-layer": "1.1.11",+ "@radix-ui/react-id": "1.1.1",+ "@radix-ui/react-popper": "1.2.8",+ "@radix-ui/react-portal": "1.1.9",+ "@radix-ui/react-presence": "1.1.5",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-slot": "1.2.3",+ "@radix-ui/react-use-controllable-state": "1.2.2",+ "@radix-ui/react-visually-hidden": "1.2.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-use-callback-ref": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.1.tgz",+ "integrity": "sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==",+ "license": "MIT",+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-use-controllable-state": {+ "version": "1.2.2",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.2.tgz",+ "integrity": "sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-use-effect-event": "0.0.2",+ "@radix-ui/react-use-layout-effect": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-use-effect-event": {+ "version": "0.0.2",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.2.tgz",+ "integrity": "sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-use-layout-effect": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-use-escape-keydown": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.1.tgz",+ "integrity": "sha512-Il0+boE7w/XebUHyBjroE+DbByORGR9KKmITzbR7MyQ4akpORYP/ZmbhAr0DG7RmmBqoOnZdy2QlvajJ2QA59g==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-use-callback-ref": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-use-is-hydrated": {+ "version": "0.1.0",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-is-hydrated/-/react-use-is-hydrated-0.1.0.tgz",+ "integrity": "sha512-U+UORVEq+cTnRIaostJv9AGdV3G6Y+zbVd+12e18jQ5A3c0xL03IhnHuiU4UV69wolOQp5GfR58NW/EgdQhwOA==",+ "license": "MIT",+ "dependencies": {+ "use-sync-external-store": "^1.5.0"+ },+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-use-layout-effect": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz",+ "integrity": "sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==",+ "license": "MIT",+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-use-previous": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.1.tgz",+ "integrity": "sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ==",+ "license": "MIT",+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-use-rect": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.1.tgz",+ "integrity": "sha512-QTYuDesS0VtuHNNvMh+CjlKJ4LJickCMUAqjlE3+j8w+RlRpwyX3apEQKGFzbZGdo7XNG1tXa+bQqIE7HIXT2w==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/rect": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-use-size": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.1.tgz",+ "integrity": "sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-use-layout-effect": "1.1.1"+ },+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/react-visually-hidden": {+ "version": "1.2.3",+ "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.2.3.tgz",+ "integrity": "sha512-pzJq12tEaaIhqjbzpCuv/OypJY/BPavOofm+dbab+MHLajy277+1lLm6JFcGgF5eskJ6mquGirhXY2GD/8u8Ug==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/react-primitive": "2.1.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "node_modules/@radix-ui/rect": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.1.tgz",+ "integrity": "sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==",+ "license": "MIT"+ },+ "node_modules/@rtsao/scc": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz",+ "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@sec-ant/readable-stream": {+ "version": "0.4.1",+ "resolved": "https://registry.npmjs.org/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz",+ "integrity": "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==",+ "license": "MIT"+ },+ "node_modules/@sindresorhus/merge-streams": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz",+ "integrity": "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@smithy/abort-controller": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.2.12.tgz",+ "integrity": "sha512-xolrFw6b+2iYGl6EcOL7IJY71vvyZ0DJ3mcKtpykqPe2uscwtzDZJa1uVQXyP7w9Dd+kGwYnPbMsJrGISKiY/Q==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/chunked-blob-reader": {+ "version": "5.2.2",+ "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-5.2.2.tgz",+ "integrity": "sha512-St+kVicSyayWQca+I1rGitaOEH6uKgE8IUWoYnnEX26SWdWQcL6LvMSD19Lg+vYHKdT9B2Zuu7rd3i6Wnyb/iw==",+ "license": "Apache-2.0",+ "dependencies": {+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/chunked-blob-reader-native": {+ "version": "4.2.3",+ "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-4.2.3.tgz",+ "integrity": "sha512-jA5k5Udn7Y5717L86h4EIv06wIr3xn8GM1qHRi/Nf31annXcXHJjBKvgztnbn2TxH3xWrPBfgwHsOwZf0UmQWw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/util-base64": "^4.3.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/config-resolver": {+ "version": "4.4.11",+ "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.4.11.tgz",+ "integrity": "sha512-YxFiiG4YDAtX7WMN7RuhHZLeTmRRAOyCbr+zB8e3AQzHPnUhS8zXjB1+cniPVQI3xbWsQPM0X2aaIkO/ME0ymw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/node-config-provider": "^4.3.12",+ "@smithy/types": "^4.13.1",+ "@smithy/util-config-provider": "^4.2.2",+ "@smithy/util-endpoints": "^3.3.3",+ "@smithy/util-middleware": "^4.2.12",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/core": {+ "version": "3.23.12",+ "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.23.12.tgz",+ "integrity": "sha512-o9VycsYNtgC+Dy3I0yrwCqv9CWicDnke0L7EVOrZtJpjb2t0EjaEofmMrYc0T1Kn3yk32zm6cspxF9u9Bj7e5w==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/types": "^4.13.1",+ "@smithy/url-parser": "^4.2.12",+ "@smithy/util-base64": "^4.3.2",+ "@smithy/util-body-length-browser": "^4.2.2",+ "@smithy/util-middleware": "^4.2.12",+ "@smithy/util-stream": "^4.5.20",+ "@smithy/util-utf8": "^4.2.2",+ "@smithy/uuid": "^1.1.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/credential-provider-imds": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.2.12.tgz",+ "integrity": "sha512-cr2lR792vNZcYMriSIj+Um3x9KWrjcu98kn234xA6reOAFMmbRpQMOv8KPgEmLLtx3eldU6c5wALKFqNOhugmg==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/node-config-provider": "^4.3.12",+ "@smithy/property-provider": "^4.2.12",+ "@smithy/types": "^4.13.1",+ "@smithy/url-parser": "^4.2.12",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/eventstream-codec": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-4.2.12.tgz",+ "integrity": "sha512-FE3bZdEl62ojmy8x4FHqxq2+BuOHlcxiH5vaZ6aqHJr3AIZzwF5jfx8dEiU/X0a8RboyNDjmXjlbr8AdEyLgiA==",+ "license": "Apache-2.0",+ "dependencies": {+ "@aws-crypto/crc32": "5.2.0",+ "@smithy/types": "^4.13.1",+ "@smithy/util-hex-encoding": "^4.2.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/eventstream-serde-browser": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-4.2.12.tgz",+ "integrity": "sha512-XUSuMxlTxV5pp4VpqZf6Sa3vT/Q75FVkLSpSSE3KkWBvAQWeuWt1msTv8fJfgA4/jcJhrbrbMzN1AC/hvPmm5A==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/eventstream-serde-universal": "^4.2.12",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/eventstream-serde-config-resolver": {+ "version": "4.3.12",+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-4.3.12.tgz",+ "integrity": "sha512-7epsAZ3QvfHkngz6RXQYseyZYHlmWXSTPOfPmXkiS+zA6TBNo1awUaMFL9vxyXlGdoELmCZyZe1nQE+imbmV+Q==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/eventstream-serde-node": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-4.2.12.tgz",+ "integrity": "sha512-D1pFuExo31854eAvg89KMn9Oab/wEeJR6Buy32B49A9Ogdtx5fwZPqBHUlDzaCDpycTFk2+fSQgX689Qsk7UGA==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/eventstream-serde-universal": "^4.2.12",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/eventstream-serde-universal": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-4.2.12.tgz",+ "integrity": "sha512-+yNuTiyBACxOJUTvbsNsSOfH9G9oKbaJE1lNL3YHpGcuucl6rPZMi3nrpehpVOVR2E07YqFFmtwpImtpzlouHQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/eventstream-codec": "^4.2.12",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/fetch-http-handler": {+ "version": "5.3.15",+ "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.3.15.tgz",+ "integrity": "sha512-T4jFU5N/yiIfrtrsb9uOQn7RdELdM/7HbyLNr6uO/mpkj1ctiVs7CihVr51w4LyQlXWDpXFn4BElf1WmQvZu/A==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/querystring-builder": "^4.2.12",+ "@smithy/types": "^4.13.1",+ "@smithy/util-base64": "^4.3.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/hash-blob-browser": {+ "version": "4.2.13",+ "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-4.2.13.tgz",+ "integrity": "sha512-YrF4zWKh+ghLuquldj6e/RzE3xZYL8wIPfkt0MqCRphVICjyyjH8OwKD7LLlKpVEbk4FLizFfC1+gwK6XQdR3g==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/chunked-blob-reader": "^5.2.2",+ "@smithy/chunked-blob-reader-native": "^4.2.3",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/hash-node": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.2.12.tgz",+ "integrity": "sha512-QhBYbGrbxTkZ43QoTPrK72DoYviDeg6YKDrHTMJbbC+A0sml3kSjzFtXP7BtbyJnXojLfTQldGdUR0RGD8dA3w==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/types": "^4.13.1",+ "@smithy/util-buffer-from": "^4.2.2",+ "@smithy/util-utf8": "^4.2.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/hash-stream-node": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-4.2.12.tgz",+ "integrity": "sha512-O3YbmGExeafuM/kP7Y8r6+1y0hIh3/zn6GROx0uNlB54K9oihAL75Qtc+jFfLNliTi6pxOAYZrRKD9A7iA6UFw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/types": "^4.13.1",+ "@smithy/util-utf8": "^4.2.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/invalid-dependency": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.2.12.tgz",+ "integrity": "sha512-/4F1zb7Z8LOu1PalTdESFHR0RbPwHd3FcaG1sI3UEIriQTWakysgJr65lc1jj6QY5ye7aFsisajotH6UhWfm/g==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/is-array-buffer": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.2.2.tgz",+ "integrity": "sha512-n6rQ4N8Jj4YTQO3YFrlgZuwKodf4zUFs7EJIWH86pSCWBaAtAGBFfCM7Wx6D2bBJ2xqFNxGBSrUWswT3M0VJow==",+ "license": "Apache-2.0",+ "dependencies": {+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/md5-js": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-4.2.12.tgz",+ "integrity": "sha512-W/oIpHCpWU2+iAkfZYyGWE+qkpuf3vEXHLxQQDx9FPNZTTdnul0dZ2d/gUFrtQ5je1G2kp4cjG0/24YueG2LbQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/types": "^4.13.1",+ "@smithy/util-utf8": "^4.2.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/middleware-content-length": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.2.12.tgz",+ "integrity": "sha512-YE58Yz+cvFInWI/wOTrB+DbvUVz/pLn5mC5MvOV4fdRUc6qGwygyngcucRQjAhiCEbmfLOXX0gntSIcgMvAjmA==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/middleware-endpoint": {+ "version": "4.4.26",+ "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.4.26.tgz",+ "integrity": "sha512-8Qfikvd2GVKSm8S6IbjfwFlRY9VlMrj0Dp4vTwAuhqbX7NhJKE5DQc2bnfJIcY0B+2YKMDBWfvexbSZeejDgeg==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/core": "^3.23.12",+ "@smithy/middleware-serde": "^4.2.15",+ "@smithy/node-config-provider": "^4.3.12",+ "@smithy/shared-ini-file-loader": "^4.4.7",+ "@smithy/types": "^4.13.1",+ "@smithy/url-parser": "^4.2.12",+ "@smithy/util-middleware": "^4.2.12",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/middleware-retry": {+ "version": "4.4.43",+ "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.4.43.tgz",+ "integrity": "sha512-ZwsifBdyuNHrFGmbc7bAfP2b54+kt9J2rhFd18ilQGAB+GDiP4SrawqyExbB7v455QVR7Psyhb2kjULvBPIhvA==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/node-config-provider": "^4.3.12",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/service-error-classification": "^4.2.12",+ "@smithy/smithy-client": "^4.12.6",+ "@smithy/types": "^4.13.1",+ "@smithy/util-middleware": "^4.2.12",+ "@smithy/util-retry": "^4.2.12",+ "@smithy/uuid": "^1.1.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/middleware-serde": {+ "version": "4.2.15",+ "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.2.15.tgz",+ "integrity": "sha512-ExYhcltZSli0pgAKOpQQe1DLFBLryeZ22605y/YS+mQpdNWekum9Ujb/jMKfJKgjtz1AZldtwA/wCYuKJgjjlg==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/core": "^3.23.12",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/middleware-stack": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.2.12.tgz",+ "integrity": "sha512-kruC5gRHwsCOuyCd4ouQxYjgRAym2uDlCvQ5acuMtRrcdfg7mFBg6blaxcJ09STpt3ziEkis6bhg1uwrWU7txw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/node-config-provider": {+ "version": "4.3.12",+ "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.12.tgz",+ "integrity": "sha512-tr2oKX2xMcO+rBOjobSwVAkV05SIfUKz8iI53rzxEmgW3GOOPOv0UioSDk+J8OpRQnpnhsO3Af6IEBabQBVmiw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/property-provider": "^4.2.12",+ "@smithy/shared-ini-file-loader": "^4.4.7",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/node-http-handler": {+ "version": "4.5.0",+ "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.5.0.tgz",+ "integrity": "sha512-Rnq9vQWiR1+/I6NZZMNzJHV6pZYyEHt2ZnuV3MG8z2NNenC4i/8Kzttz7CjZiHSmsN5frhXhg17z3Zqjjhmz1A==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/abort-controller": "^4.2.12",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/querystring-builder": "^4.2.12",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/property-provider": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.12.tgz",+ "integrity": "sha512-jqve46eYU1v7pZ5BM+fmkbq3DerkSluPr5EhvOcHxygxzD05ByDRppRwRPPpFrsFo5yDtCYLKu+kreHKVrvc7A==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/protocol-http": {+ "version": "5.3.12",+ "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.12.tgz",+ "integrity": "sha512-fit0GZK9I1xoRlR4jXmbLhoN0OdEpa96ul8M65XdmXnxXkuMxM0Y8HDT0Fh0Xb4I85MBvBClOzgSrV1X2s1Hxw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/querystring-builder": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.2.12.tgz",+ "integrity": "sha512-6wTZjGABQufekycfDGMEB84BgtdOE/rCVTov+EDXQ8NHKTUNIp/j27IliwP7tjIU9LR+sSzyGBOXjeEtVgzCHg==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/types": "^4.13.1",+ "@smithy/util-uri-escape": "^4.2.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/querystring-parser": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.2.12.tgz",+ "integrity": "sha512-P2OdvrgiAKpkPNKlKUtWbNZKB1XjPxM086NeVhK+W+wI46pIKdWBe5QyXvhUm3MEcyS/rkLvY8rZzyUdmyDZBw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/service-error-classification": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.2.12.tgz",+ "integrity": "sha512-LlP29oSQN0Tw0b6D0Xo6BIikBswuIiGYbRACy5ujw/JgWSzTdYj46U83ssf6Ux0GyNJVivs2uReU8pt7Eu9okQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/types": "^4.13.1"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/shared-ini-file-loader": {+ "version": "4.4.7",+ "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.4.7.tgz",+ "integrity": "sha512-HrOKWsUb+otTeo1HxVWeEb99t5ER1XrBi/xka2Wv6NVmTbuCUC1dvlrksdvxFtODLBjsC+PHK+fuy2x/7Ynyiw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/signature-v4": {+ "version": "5.3.12",+ "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.3.12.tgz",+ "integrity": "sha512-B/FBwO3MVOL00DaRSXfXfa/TRXRheagt/q5A2NM13u7q+sHS59EOVGQNfG7DkmVtdQm5m3vOosoKAXSqn/OEgw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/is-array-buffer": "^4.2.2",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/types": "^4.13.1",+ "@smithy/util-hex-encoding": "^4.2.2",+ "@smithy/util-middleware": "^4.2.12",+ "@smithy/util-uri-escape": "^4.2.2",+ "@smithy/util-utf8": "^4.2.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/smithy-client": {+ "version": "4.12.6",+ "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.12.6.tgz",+ "integrity": "sha512-aib3f0jiMsJ6+cvDnXipBsGDL7ztknYSVqJs1FdN9P+u9tr/VzOR7iygSh6EUOdaBeMCMSh3N0VdyYsG4o91DQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/core": "^3.23.12",+ "@smithy/middleware-endpoint": "^4.4.26",+ "@smithy/middleware-stack": "^4.2.12",+ "@smithy/protocol-http": "^5.3.12",+ "@smithy/types": "^4.13.1",+ "@smithy/util-stream": "^4.5.20",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/types": {+ "version": "4.13.1",+ "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.13.1.tgz",+ "integrity": "sha512-787F3yzE2UiJIQ+wYW1CVg2odHjmaWLGksnKQHUrK/lYZSEcy1msuLVvxaR/sI2/aDe9U+TBuLsXnr3vod1g0g==",+ "license": "Apache-2.0",+ "dependencies": {+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/url-parser": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.2.12.tgz",+ "integrity": "sha512-wOPKPEpso+doCZGIlr+e1lVI6+9VAKfL4kZWFgzVgGWY2hZxshNKod4l2LXS3PRC9otH/JRSjtEHqQ/7eLciRA==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/querystring-parser": "^4.2.12",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/util-base64": {+ "version": "4.3.2",+ "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.3.2.tgz",+ "integrity": "sha512-XRH6b0H/5A3SgblmMa5ErXQ2XKhfbQB+Fm/oyLZ2O2kCUrwgg55bU0RekmzAhuwOjA9qdN5VU2BprOvGGUkOOQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/util-buffer-from": "^4.2.2",+ "@smithy/util-utf8": "^4.2.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/util-body-length-browser": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.2.2.tgz",+ "integrity": "sha512-JKCrLNOup3OOgmzeaKQwi4ZCTWlYR5H4Gm1r2uTMVBXoemo1UEghk5vtMi1xSu2ymgKVGW631e2fp9/R610ZjQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/util-body-length-node": {+ "version": "4.2.3",+ "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-4.2.3.tgz",+ "integrity": "sha512-ZkJGvqBzMHVHE7r/hcuCxlTY8pQr1kMtdsVPs7ex4mMU+EAbcXppfo5NmyxMYi2XU49eqaz56j2gsk4dHHPG/g==",+ "license": "Apache-2.0",+ "dependencies": {+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/util-buffer-from": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.2.2.tgz",+ "integrity": "sha512-FDXD7cvUoFWwN6vtQfEta540Y/YBe5JneK3SoZg9bThSoOAC/eGeYEua6RkBgKjGa/sz6Y+DuBZj3+YEY21y4Q==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/is-array-buffer": "^4.2.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/util-config-provider": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-4.2.2.tgz",+ "integrity": "sha512-dWU03V3XUprJwaUIFVv4iOnS1FC9HnMHDfUrlNDSh4315v0cWyaIErP8KiqGVbf5z+JupoVpNM7ZB3jFiTejvQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/util-defaults-mode-browser": {+ "version": "4.3.42",+ "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.3.42.tgz",+ "integrity": "sha512-0vjwmcvkWAUtikXnWIUOyV6IFHTEeQUYh3JUZcDgcszF+hD/StAsQ3rCZNZEPHgI9kVNcbnyc8P2CBHnwgmcwg==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/property-provider": "^4.2.12",+ "@smithy/smithy-client": "^4.12.6",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/util-defaults-mode-node": {+ "version": "4.2.45",+ "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.2.45.tgz",+ "integrity": "sha512-q5dOqqfTgUcLe38TAGiFn9srToKj2YCHJ34QGOLzM+xYLLA+qRZv7N+33kl1MERVusue36ZHnlNaNEvY/PzSrw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/config-resolver": "^4.4.11",+ "@smithy/credential-provider-imds": "^4.2.12",+ "@smithy/node-config-provider": "^4.3.12",+ "@smithy/property-provider": "^4.2.12",+ "@smithy/smithy-client": "^4.12.6",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/util-endpoints": {+ "version": "3.3.3",+ "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.3.3.tgz",+ "integrity": "sha512-VACQVe50j0HZPjpwWcjyT51KUQ4AnsvEaQ2lKHOSL4mNLD0G9BjEniQ+yCt1qqfKfiAHRAts26ud7hBjamrwig==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/node-config-provider": "^4.3.12",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/util-hex-encoding": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.2.2.tgz",+ "integrity": "sha512-Qcz3W5vuHK4sLQdyT93k/rfrUwdJ8/HZ+nMUOyGdpeGA1Wxt65zYwi3oEl9kOM+RswvYq90fzkNDahPS8K0OIg==",+ "license": "Apache-2.0",+ "dependencies": {+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/util-middleware": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.12.tgz",+ "integrity": "sha512-Er805uFUOvgc0l8nv0e0su0VFISoxhJ/AwOn3gL2NWNY2LUEldP5WtVcRYSQBcjg0y9NfG8JYrCJaYDpupBHJQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/util-retry": {+ "version": "4.2.12",+ "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.2.12.tgz",+ "integrity": "sha512-1zopLDUEOwumjcHdJ1mwBHddubYF8GMQvstVCLC54Y46rqoHwlIU+8ZzUeaBcD+WCJHyDGSeZ2ml9YSe9aqcoQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/service-error-classification": "^4.2.12",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/util-stream": {+ "version": "4.5.20",+ "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.5.20.tgz",+ "integrity": "sha512-4yXLm5n/B5SRBR2p8cZ90Sbv4zL4NKsgxdzCzp/83cXw2KxLEumt5p+GAVyRNZgQOSrzXn9ARpO0lUe8XSlSDw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/fetch-http-handler": "^5.3.15",+ "@smithy/node-http-handler": "^4.5.0",+ "@smithy/types": "^4.13.1",+ "@smithy/util-base64": "^4.3.2",+ "@smithy/util-buffer-from": "^4.2.2",+ "@smithy/util-hex-encoding": "^4.2.2",+ "@smithy/util-utf8": "^4.2.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/util-uri-escape": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.2.2.tgz",+ "integrity": "sha512-2kAStBlvq+lTXHyAZYfJRb/DfS3rsinLiwb+69SstC9Vb0s9vNWkRwpnj918Pfi85mzi42sOqdV72OLxWAISnw==",+ "license": "Apache-2.0",+ "dependencies": {+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/util-utf8": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.2.2.tgz",+ "integrity": "sha512-75MeYpjdWRe8M5E3AW0O4Cx3UadweS+cwdXjwYGBW5h/gxxnbeZ877sLPX/ZJA9GVTlL/qG0dXP29JWFCD1Ayw==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/util-buffer-from": "^4.2.2",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/util-waiter": {+ "version": "4.2.13",+ "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-4.2.13.tgz",+ "integrity": "sha512-2zdZ9DTHngRtcYxJK1GUDxruNr53kv5W2Lupe0LMU+Imr6ohQg8M2T14MNkj1Y0wS3FFwpgpGQyvuaMF7CiTmQ==",+ "license": "Apache-2.0",+ "dependencies": {+ "@smithy/abort-controller": "^4.2.12",+ "@smithy/types": "^4.13.1",+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@smithy/uuid": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/@smithy/uuid/-/uuid-1.1.2.tgz",+ "integrity": "sha512-O/IEdcCUKkubz60tFbGA7ceITTAJsty+lBjNoorP4Z6XRqaFb/OjQjZODophEcuq68nKm6/0r+6/lLQ+XVpk8g==",+ "license": "Apache-2.0",+ "dependencies": {+ "tslib": "^2.6.2"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@stablelib/base64": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/@stablelib/base64/-/base64-1.0.1.tgz",+ "integrity": "sha512-1bnPQqSxSuc3Ii6MhBysoWCg58j97aUjuCSZrGSmDxNqtytIi0k8utUenAwTZN4V5mXXYGsVUI9zeBqy+jBOSQ==",+ "license": "MIT"+ },+ "node_modules/@standard-schema/spec": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz",+ "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==",+ "license": "MIT"+ },+ "node_modules/@swc/helpers": {+ "version": "0.5.15",+ "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz",+ "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==",+ "license": "Apache-2.0",+ "dependencies": {+ "tslib": "^2.8.0"+ }+ },+ "node_modules/@tailwindcss/node": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.2.2.tgz",+ "integrity": "sha512-pXS+wJ2gZpVXqFaUEjojq7jzMpTGf8rU6ipJz5ovJV6PUGmlJ+jvIwGrzdHdQ80Sg+wmQxUFuoW1UAAwHNEdFA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/remapping": "^2.3.5",+ "enhanced-resolve": "^5.19.0",+ "jiti": "^2.6.1",+ "lightningcss": "1.32.0",+ "magic-string": "^0.30.21",+ "source-map-js": "^1.2.1",+ "tailwindcss": "4.2.2"+ }+ },+ "node_modules/@tailwindcss/oxide": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.2.2.tgz",+ "integrity": "sha512-qEUA07+E5kehxYp9BVMpq9E8vnJuBHfJEC0vPC5e7iL/hw7HR61aDKoVoKzrG+QKp56vhNZe4qwkRmMC0zDLvg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 20"+ },+ "optionalDependencies": {+ "@tailwindcss/oxide-android-arm64": "4.2.2",+ "@tailwindcss/oxide-darwin-arm64": "4.2.2",+ "@tailwindcss/oxide-darwin-x64": "4.2.2",+ "@tailwindcss/oxide-freebsd-x64": "4.2.2",+ "@tailwindcss/oxide-linux-arm-gnueabihf": "4.2.2",+ "@tailwindcss/oxide-linux-arm64-gnu": "4.2.2",+ "@tailwindcss/oxide-linux-arm64-musl": "4.2.2",+ "@tailwindcss/oxide-linux-x64-gnu": "4.2.2",+ "@tailwindcss/oxide-linux-x64-musl": "4.2.2",+ "@tailwindcss/oxide-wasm32-wasi": "4.2.2",+ "@tailwindcss/oxide-win32-arm64-msvc": "4.2.2",+ "@tailwindcss/oxide-win32-x64-msvc": "4.2.2"+ }+ },+ "node_modules/@tailwindcss/oxide-android-arm64": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.2.2.tgz",+ "integrity": "sha512-dXGR1n+P3B6748jZO/SvHZq7qBOqqzQ+yFrXpoOWWALWndF9MoSKAT3Q0fYgAzYzGhxNYOoysRvYlpixRBBoDg==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-darwin-arm64": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.2.2.tgz",+ "integrity": "sha512-iq9Qjr6knfMpZHj55/37ouZeykwbDqF21gPFtfnhCCKGDcPI/21FKC9XdMO/XyBM7qKORx6UIhGgg6jLl7BZlg==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-darwin-x64": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.2.2.tgz",+ "integrity": "sha512-BlR+2c3nzc8f2G639LpL89YY4bdcIdUmiOOkv2GQv4/4M0vJlpXEa0JXNHhCHU7VWOKWT/CjqHdTP8aUuDJkuw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-freebsd-x64": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.2.2.tgz",+ "integrity": "sha512-YUqUgrGMSu2CDO82hzlQ5qSb5xmx3RUrke/QgnoEx7KvmRJHQuZHZmZTLSuuHwFf0DJPybFMXMYf+WJdxHy/nQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.2.2.tgz",+ "integrity": "sha512-FPdhvsW6g06T9BWT0qTwiVZYE2WIFo2dY5aCSpjG/S/u1tby+wXoslXS0kl3/KXnULlLr1E3NPRRw0g7t2kgaQ==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-linux-arm64-gnu": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.2.2.tgz",+ "integrity": "sha512-4og1V+ftEPXGttOO7eCmW7VICmzzJWgMx+QXAJRAhjrSjumCwWqMfkDrNu1LXEQzNAwz28NCUpucgQPrR4S2yw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-linux-arm64-musl": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.2.2.tgz",+ "integrity": "sha512-oCfG/mS+/+XRlwNjnsNLVwnMWYH7tn/kYPsNPh+JSOMlnt93mYNCKHYzylRhI51X+TbR+ufNhhKKzm6QkqX8ag==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-linux-x64-gnu": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.2.2.tgz",+ "integrity": "sha512-rTAGAkDgqbXHNp/xW0iugLVmX62wOp2PoE39BTCGKjv3Iocf6AFbRP/wZT/kuCxC9QBh9Pu8XPkv/zCZB2mcMg==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-linux-x64-musl": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.2.2.tgz",+ "integrity": "sha512-XW3t3qwbIwiSyRCggeO2zxe3KWaEbM0/kW9e8+0XpBgyKU4ATYzcVSMKteZJ1iukJ3HgHBjbg9P5YPRCVUxlnQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-wasm32-wasi": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.2.2.tgz",+ "integrity": "sha512-eKSztKsmEsn1O5lJ4ZAfyn41NfG7vzCg496YiGtMDV86jz1q/irhms5O0VrY6ZwTUkFy/EKG3RfWgxSI3VbZ8Q==",+ "bundleDependencies": [+ "@napi-rs/wasm-runtime",+ "@emnapi/core",+ "@emnapi/runtime",+ "@tybys/wasm-util",+ "@emnapi/wasi-threads",+ "tslib"+ ],+ "cpu": [+ "wasm32"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "@emnapi/core": "^1.8.1",+ "@emnapi/runtime": "^1.8.1",+ "@emnapi/wasi-threads": "^1.1.0",+ "@napi-rs/wasm-runtime": "^1.1.1",+ "@tybys/wasm-util": "^0.10.1",+ "tslib": "^2.8.1"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/@tailwindcss/oxide-win32-arm64-msvc": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.2.2.tgz",+ "integrity": "sha512-qPmaQM4iKu5mxpsrWZMOZRgZv1tOZpUm+zdhhQP0VhJfyGGO3aUKdbh3gDZc/dPLQwW4eSqWGrrcWNBZWUWaXQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-win32-x64-msvc": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.2.2.tgz",+ "integrity": "sha512-1T/37VvI7WyH66b+vqHj/cLwnCxt7Qt3WFu5Q8hk65aOvlwAhs7rAp1VkulBJw/N4tMirXjVnylTR72uI0HGcA==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/postcss": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.2.2.tgz",+ "integrity": "sha512-n4goKQbW8RVXIbNKRB/45LzyUqN451deQK0nzIeauVEqjlI49slUlgKYJM2QyUzap/PcpnS7kzSUmPb1sCRvYQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@alloc/quick-lru": "^5.2.0",+ "@tailwindcss/node": "4.2.2",+ "@tailwindcss/oxide": "4.2.2",+ "postcss": "^8.5.6",+ "tailwindcss": "4.2.2"+ }+ },+ "node_modules/@ts-morph/common": {+ "version": "0.27.0",+ "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.27.0.tgz",+ "integrity": "sha512-Wf29UqxWDpc+i61k3oIOzcUfQt79PIT9y/MWfAGlrkjg6lBC1hwDECLXPVJAhWjiGbfBCxZd65F/LIZF3+jeJQ==",+ "license": "MIT",+ "dependencies": {+ "fast-glob": "^3.3.3",+ "minimatch": "^10.0.1",+ "path-browserify": "^1.0.1"+ }+ },+ "node_modules/@ts-morph/common/node_modules/balanced-match": {+ "version": "4.0.4",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",+ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",+ "license": "MIT",+ "engines": {+ "node": "18 || 20 || >=22"+ }+ },+ "node_modules/@ts-morph/common/node_modules/brace-expansion": {+ "version": "5.0.4",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz",+ "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==",+ "license": "MIT",+ "dependencies": {+ "balanced-match": "^4.0.2"+ },+ "engines": {+ "node": "18 || 20 || >=22"+ }+ },+ "node_modules/@ts-morph/common/node_modules/fast-glob": {+ "version": "3.3.3",+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",+ "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",+ "license": "MIT",+ "dependencies": {+ "@nodelib/fs.stat": "^2.0.2",+ "@nodelib/fs.walk": "^1.2.3",+ "glob-parent": "^5.1.2",+ "merge2": "^1.3.0",+ "micromatch": "^4.0.8"+ },+ "engines": {+ "node": ">=8.6.0"+ }+ },+ "node_modules/@ts-morph/common/node_modules/glob-parent": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",+ "license": "ISC",+ "dependencies": {+ "is-glob": "^4.0.1"+ },+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/@ts-morph/common/node_modules/minimatch": {+ "version": "10.2.4",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz",+ "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==",+ "license": "BlueOak-1.0.0",+ "dependencies": {+ "brace-expansion": "^5.0.2"+ },+ "engines": {+ "node": "18 || 20 || >=22"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/@tybys/wasm-util": {+ "version": "0.10.1",+ "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz",+ "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "tslib": "^2.4.0"+ }+ },+ "node_modules/@types/estree": {+ "version": "1.0.8",+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",+ "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@types/json-schema": {+ "version": "7.0.15",+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",+ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@types/json5": {+ "version": "0.0.29",+ "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",+ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@types/node": {+ "version": "20.19.37",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.37.tgz",+ "integrity": "sha512-8kzdPJ3FsNsVIurqBs7oodNnCEVbni9yUEkaHbgptDACOPW04jimGagZ51E6+lXUwJjgnBw+hyko/lkFWCldqw==",+ "devOptional": true,+ "license": "MIT",+ "dependencies": {+ "undici-types": "~6.21.0"+ }+ },+ "node_modules/@types/pg": {+ "version": "8.20.0",+ "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.20.0.tgz",+ "integrity": "sha512-bEPFOaMAHTEP1EzpvHTbmwR8UsFyHSKsRisLIHVMXnpNefSbGA1bD6CVy+qKjGSqmZqNqBDV2azOBo8TgkcVow==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/node": "*",+ "pg-protocol": "*",+ "pg-types": "^2.2.0"+ }+ },+ "node_modules/@types/react": {+ "version": "19.2.14",+ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz",+ "integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==",+ "devOptional": true,+ "license": "MIT",+ "dependencies": {+ "csstype": "^3.2.2"+ }+ },+ "node_modules/@types/react-dom": {+ "version": "19.2.3",+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz",+ "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==",+ "devOptional": true,+ "license": "MIT",+ "peerDependencies": {+ "@types/react": "^19.2.0"+ }+ },+ "node_modules/@types/statuses": {+ "version": "2.0.6",+ "resolved": "https://registry.npmjs.org/@types/statuses/-/statuses-2.0.6.tgz",+ "integrity": "sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA==",+ "license": "MIT"+ },+ "node_modules/@types/validate-npm-package-name": {+ "version": "4.0.2",+ "resolved": "https://registry.npmjs.org/@types/validate-npm-package-name/-/validate-npm-package-name-4.0.2.tgz",+ "integrity": "sha512-lrpDziQipxCEeK5kWxvljWYhUvOiB2A9izZd9B2AFarYAkqZshb4lPbRs7zKEic6eGtH8V/2qJW+dPp9OtF6bw==",+ "license": "MIT"+ },+ "node_modules/@types/webidl-conversions": {+ "version": "7.0.3",+ "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz",+ "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==",+ "license": "MIT",+ "peer": true+ },+ "node_modules/@types/whatwg-url": {+ "version": "13.0.0",+ "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-13.0.0.tgz",+ "integrity": "sha512-N8WXpbE6Wgri7KUSvrmQcqrMllKZ9uxkYWMt+mCSGwNc0Hsw9VQTW7ApqI4XNrx6/SaM2QQJCzMPDEXE058s+Q==",+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "@types/webidl-conversions": "*"+ }+ },+ "node_modules/@typescript-eslint/eslint-plugin": {+ "version": "8.57.1",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.57.1.tgz",+ "integrity": "sha512-Gn3aqnvNl4NGc6x3/Bqk1AOn0thyTU9bqDRhiRnUWezgvr2OnhYCWCgC8zXXRVqBsIL1pSDt7T9nJUe0oM0kDQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@eslint-community/regexpp": "^4.12.2",+ "@typescript-eslint/scope-manager": "8.57.1",+ "@typescript-eslint/type-utils": "8.57.1",+ "@typescript-eslint/utils": "8.57.1",+ "@typescript-eslint/visitor-keys": "8.57.1",+ "ignore": "^7.0.5",+ "natural-compare": "^1.4.0",+ "ts-api-utils": "^2.4.0"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ },+ "peerDependencies": {+ "@typescript-eslint/parser": "^8.57.1",+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",+ "typescript": ">=4.8.4 <6.0.0"+ }+ },+ "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {+ "version": "7.0.5",+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz",+ "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 4"+ }+ },+ "node_modules/@typescript-eslint/parser": {+ "version": "8.57.1",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.57.1.tgz",+ "integrity": "sha512-k4eNDan0EIMTT/dUKc/g+rsJ6wcHYhNPdY19VoX/EOtaAG8DLtKCykhrUnuHPYvinn5jhAPgD2Qw9hXBwrahsw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@typescript-eslint/scope-manager": "8.57.1",+ "@typescript-eslint/types": "8.57.1",+ "@typescript-eslint/typescript-estree": "8.57.1",+ "@typescript-eslint/visitor-keys": "8.57.1",+ "debug": "^4.4.3"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ },+ "peerDependencies": {+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",+ "typescript": ">=4.8.4 <6.0.0"+ }+ },+ "node_modules/@typescript-eslint/project-service": {+ "version": "8.57.1",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.57.1.tgz",+ "integrity": "sha512-vx1F37BRO1OftsYlmG9xay1TqnjNVlqALymwWVuYTdo18XuKxtBpCj1QlzNIEHlvlB27osvXFWptYiEWsVdYsg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@typescript-eslint/tsconfig-utils": "^8.57.1",+ "@typescript-eslint/types": "^8.57.1",+ "debug": "^4.4.3"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ },+ "peerDependencies": {+ "typescript": ">=4.8.4 <6.0.0"+ }+ },+ "node_modules/@typescript-eslint/scope-manager": {+ "version": "8.57.1",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.57.1.tgz",+ "integrity": "sha512-hs/QcpCwlwT2L5S+3fT6gp0PabyGk4Q0Rv2doJXA0435/OpnSR3VRgvrp8Xdoc3UAYSg9cyUjTeFXZEPg/3OKg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@typescript-eslint/types": "8.57.1",+ "@typescript-eslint/visitor-keys": "8.57.1"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ }+ },+ "node_modules/@typescript-eslint/tsconfig-utils": {+ "version": "8.57.1",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.57.1.tgz",+ "integrity": "sha512-0lgOZB8cl19fHO4eI46YUx2EceQqhgkPSuCGLlGi79L2jwYY1cxeYc1Nae8Aw1xjgW3PKVDLlr3YJ6Bxx8HkWg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ },+ "peerDependencies": {+ "typescript": ">=4.8.4 <6.0.0"+ }+ },+ "node_modules/@typescript-eslint/type-utils": {+ "version": "8.57.1",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.57.1.tgz",+ "integrity": "sha512-+Bwwm0ScukFdyoJsh2u6pp4S9ktegF98pYUU0hkphOOqdMB+1sNQhIz8y5E9+4pOioZijrkfNO/HUJVAFFfPKA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@typescript-eslint/types": "8.57.1",+ "@typescript-eslint/typescript-estree": "8.57.1",+ "@typescript-eslint/utils": "8.57.1",+ "debug": "^4.4.3",+ "ts-api-utils": "^2.4.0"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ },+ "peerDependencies": {+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",+ "typescript": ">=4.8.4 <6.0.0"+ }+ },+ "node_modules/@typescript-eslint/types": {+ "version": "8.57.1",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.57.1.tgz",+ "integrity": "sha512-S29BOBPJSFUiblEl6RzPPjJt6w25A6XsBqRVDt53tA/tlL8q7ceQNZHTjPeONt/3S7KRI4quk+yP9jK2WjBiPQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ }+ },+ "node_modules/@typescript-eslint/typescript-estree": {+ "version": "8.57.1",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.57.1.tgz",+ "integrity": "sha512-ybe2hS9G6pXpqGtPli9Gx9quNV0TWLOmh58ADlmZe9DguLq0tiAKVjirSbtM1szG6+QH6rVXyU6GTLQbWnMY+g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@typescript-eslint/project-service": "8.57.1",+ "@typescript-eslint/tsconfig-utils": "8.57.1",+ "@typescript-eslint/types": "8.57.1",+ "@typescript-eslint/visitor-keys": "8.57.1",+ "debug": "^4.4.3",+ "minimatch": "^10.2.2",+ "semver": "^7.7.3",+ "tinyglobby": "^0.2.15",+ "ts-api-utils": "^2.4.0"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ },+ "peerDependencies": {+ "typescript": ">=4.8.4 <6.0.0"+ }+ },+ "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": {+ "version": "4.0.4",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",+ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "18 || 20 || >=22"+ }+ },+ "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {+ "version": "5.0.4",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz",+ "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "balanced-match": "^4.0.2"+ },+ "engines": {+ "node": "18 || 20 || >=22"+ }+ },+ "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {+ "version": "10.2.4",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz",+ "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "dependencies": {+ "brace-expansion": "^5.0.2"+ },+ "engines": {+ "node": "18 || 20 || >=22"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": {+ "version": "7.7.4",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",+ "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/@typescript-eslint/utils": {+ "version": "8.57.1",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.57.1.tgz",+ "integrity": "sha512-XUNSJ/lEVFttPMMoDVA2r2bwrl8/oPx8cURtczkSEswY5T3AeLmCy+EKWQNdL4u0MmAHOjcWrqJp2cdvgjn8dQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@eslint-community/eslint-utils": "^4.9.1",+ "@typescript-eslint/scope-manager": "8.57.1",+ "@typescript-eslint/types": "8.57.1",+ "@typescript-eslint/typescript-estree": "8.57.1"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ },+ "peerDependencies": {+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",+ "typescript": ">=4.8.4 <6.0.0"+ }+ },+ "node_modules/@typescript-eslint/visitor-keys": {+ "version": "8.57.1",+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.57.1.tgz",+ "integrity": "sha512-YWnmJkXbofiz9KbnbbwuA2rpGkFPLbAIetcCNO6mJ8gdhdZ/v7WDXsoGFAJuM6ikUFKTlSQnjWnVO4ux+UzS6A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@typescript-eslint/types": "8.57.1",+ "eslint-visitor-keys": "^5.0.0"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ }+ },+ "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz",+ "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": "^20.19.0 || ^22.13.0 || >=24"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ }+ },+ "node_modules/@unrs/resolver-binding-android-arm-eabi": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz",+ "integrity": "sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ]+ },+ "node_modules/@unrs/resolver-binding-android-arm64": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.11.1.tgz",+ "integrity": "sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ]+ },+ "node_modules/@unrs/resolver-binding-darwin-arm64": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.11.1.tgz",+ "integrity": "sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ]+ },+ "node_modules/@unrs/resolver-binding-darwin-x64": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.11.1.tgz",+ "integrity": "sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ]+ },+ "node_modules/@unrs/resolver-binding-freebsd-x64": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.11.1.tgz",+ "integrity": "sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ]+ },+ "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.11.1.tgz",+ "integrity": "sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.11.1.tgz",+ "integrity": "sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@unrs/resolver-binding-linux-arm64-gnu": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.11.1.tgz",+ "integrity": "sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@unrs/resolver-binding-linux-arm64-musl": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.11.1.tgz",+ "integrity": "sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.11.1.tgz",+ "integrity": "sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.11.1.tgz",+ "integrity": "sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==",+ "cpu": [+ "riscv64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@unrs/resolver-binding-linux-riscv64-musl": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.11.1.tgz",+ "integrity": "sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==",+ "cpu": [+ "riscv64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@unrs/resolver-binding-linux-s390x-gnu": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.11.1.tgz",+ "integrity": "sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==",+ "cpu": [+ "s390x"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@unrs/resolver-binding-linux-x64-gnu": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.11.1.tgz",+ "integrity": "sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@unrs/resolver-binding-linux-x64-musl": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.11.1.tgz",+ "integrity": "sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@unrs/resolver-binding-wasm32-wasi": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.11.1.tgz",+ "integrity": "sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==",+ "cpu": [+ "wasm32"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "@napi-rs/wasm-runtime": "^0.2.11"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/@unrs/resolver-binding-win32-arm64-msvc": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz",+ "integrity": "sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/@unrs/resolver-binding-win32-ia32-msvc": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.11.1.tgz",+ "integrity": "sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==",+ "cpu": [+ "ia32"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/@unrs/resolver-binding-win32-x64-msvc": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz",+ "integrity": "sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/accepts": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",+ "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",+ "license": "MIT",+ "dependencies": {+ "mime-types": "^3.0.0",+ "negotiator": "^1.0.0"+ },+ "engines": {+ "node": ">= 0.6"+ }+ },+ "node_modules/acorn": {+ "version": "8.16.0",+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz",+ "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",+ "dev": true,+ "license": "MIT",+ "bin": {+ "acorn": "bin/acorn"+ },+ "engines": {+ "node": ">=0.4.0"+ }+ },+ "node_modules/acorn-jsx": {+ "version": "5.3.2",+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",+ "dev": true,+ "license": "MIT",+ "peerDependencies": {+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"+ }+ },+ "node_modules/agent-base": {+ "version": "7.1.4",+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",+ "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==",+ "license": "MIT",+ "engines": {+ "node": ">= 14"+ }+ },+ "node_modules/ajv": {+ "version": "6.14.0",+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz",+ "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "fast-deep-equal": "^3.1.1",+ "fast-json-stable-stringify": "^2.0.0",+ "json-schema-traverse": "^0.4.1",+ "uri-js": "^4.2.2"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/epoberezkin"+ }+ },+ "node_modules/ajv-formats": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz",+ "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==",+ "license": "MIT",+ "dependencies": {+ "ajv": "^8.0.0"+ },+ "peerDependencies": {+ "ajv": "^8.0.0"+ },+ "peerDependenciesMeta": {+ "ajv": {+ "optional": true+ }+ }+ },+ "node_modules/ajv-formats/node_modules/ajv": {+ "version": "8.18.0",+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz",+ "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==",+ "license": "MIT",+ "dependencies": {+ "fast-deep-equal": "^3.1.3",+ "fast-uri": "^3.0.1",+ "json-schema-traverse": "^1.0.0",+ "require-from-string": "^2.0.2"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/epoberezkin"+ }+ },+ "node_modules/ajv-formats/node_modules/json-schema-traverse": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",+ "license": "MIT"+ },+ "node_modules/ansi-regex": {+ "version": "6.2.2",+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",+ "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==",+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"+ }+ },+ "node_modules/ansi-styles": {+ "version": "4.3.0",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",+ "license": "MIT",+ "dependencies": {+ "color-convert": "^2.0.1"+ },+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"+ }+ },+ "node_modules/argparse": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",+ "license": "Python-2.0"+ },+ "node_modules/aria-hidden": {+ "version": "1.2.6",+ "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.6.tgz",+ "integrity": "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA==",+ "license": "MIT",+ "dependencies": {+ "tslib": "^2.0.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/aria-query": {+ "version": "5.3.2",+ "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz",+ "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/array-buffer-byte-length": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz",+ "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.3",+ "is-array-buffer": "^3.0.5"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/array-includes": {+ "version": "3.1.9",+ "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz",+ "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.8",+ "call-bound": "^1.0.4",+ "define-properties": "^1.2.1",+ "es-abstract": "^1.24.0",+ "es-object-atoms": "^1.1.1",+ "get-intrinsic": "^1.3.0",+ "is-string": "^1.1.1",+ "math-intrinsics": "^1.1.0"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/array.prototype.findlast": {+ "version": "1.2.5",+ "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz",+ "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.7",+ "define-properties": "^1.2.1",+ "es-abstract": "^1.23.2",+ "es-errors": "^1.3.0",+ "es-object-atoms": "^1.0.0",+ "es-shim-unscopables": "^1.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/array.prototype.findlastindex": {+ "version": "1.2.6",+ "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz",+ "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.8",+ "call-bound": "^1.0.4",+ "define-properties": "^1.2.1",+ "es-abstract": "^1.23.9",+ "es-errors": "^1.3.0",+ "es-object-atoms": "^1.1.1",+ "es-shim-unscopables": "^1.1.0"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/array.prototype.flat": {+ "version": "1.3.3",+ "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz",+ "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.8",+ "define-properties": "^1.2.1",+ "es-abstract": "^1.23.5",+ "es-shim-unscopables": "^1.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/array.prototype.flatmap": {+ "version": "1.3.3",+ "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz",+ "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.8",+ "define-properties": "^1.2.1",+ "es-abstract": "^1.23.5",+ "es-shim-unscopables": "^1.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/array.prototype.tosorted": {+ "version": "1.1.4",+ "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz",+ "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.7",+ "define-properties": "^1.2.1",+ "es-abstract": "^1.23.3",+ "es-errors": "^1.3.0",+ "es-shim-unscopables": "^1.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/arraybuffer.prototype.slice": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz",+ "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "array-buffer-byte-length": "^1.0.1",+ "call-bind": "^1.0.8",+ "define-properties": "^1.2.1",+ "es-abstract": "^1.23.5",+ "es-errors": "^1.3.0",+ "get-intrinsic": "^1.2.6",+ "is-array-buffer": "^3.0.4"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/ast-types": {+ "version": "0.16.1",+ "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.16.1.tgz",+ "integrity": "sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==",+ "license": "MIT",+ "dependencies": {+ "tslib": "^2.0.1"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/ast-types-flow": {+ "version": "0.0.8",+ "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz",+ "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/async-function": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz",+ "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/available-typed-arrays": {+ "version": "1.0.7",+ "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz",+ "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "possible-typed-array-names": "^1.0.0"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/axe-core": {+ "version": "4.11.1",+ "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.11.1.tgz",+ "integrity": "sha512-BASOg+YwO2C+346x3LZOeoovTIoTrRqEsqMa6fmfAV0P+U9mFr9NsyOEpiYvFjbc64NMrSswhV50WdXzdb/Z5A==",+ "dev": true,+ "license": "MPL-2.0",+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/axobject-query": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz",+ "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/balanced-match": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/baseline-browser-mapping": {+ "version": "2.10.8",+ "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.8.tgz",+ "integrity": "sha512-PCLz/LXGBsNTErbtB6i5u4eLpHeMfi93aUv5duMmj6caNu6IphS4q6UevDnL36sZQv9lrP11dbPKGMaXPwMKfQ==",+ "license": "Apache-2.0",+ "bin": {+ "baseline-browser-mapping": "dist/cli.cjs"+ },+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/better-auth": {+ "version": "1.5.5",+ "resolved": "https://registry.npmjs.org/better-auth/-/better-auth-1.5.5.tgz",+ "integrity": "sha512-GpVPaV1eqr3mOovKfghJXXk6QvlcVeFbS3z+n+FPDid5rK/2PchnDtiaVCzWyXA9jH2KkirOfl+JhAUvnja0Eg==",+ "license": "MIT",+ "dependencies": {+ "@better-auth/core": "1.5.5",+ "@better-auth/drizzle-adapter": "1.5.5",+ "@better-auth/kysely-adapter": "1.5.5",+ "@better-auth/memory-adapter": "1.5.5",+ "@better-auth/mongo-adapter": "1.5.5",+ "@better-auth/prisma-adapter": "1.5.5",+ "@better-auth/telemetry": "1.5.5",+ "@better-auth/utils": "0.3.1",+ "@better-fetch/fetch": "1.1.21",+ "@noble/ciphers": "^2.1.1",+ "@noble/hashes": "^2.0.1",+ "better-call": "1.3.2",+ "defu": "^6.1.4",+ "jose": "^6.1.3",+ "kysely": "^0.28.11",+ "nanostores": "^1.1.1",+ "zod": "^4.3.6"+ },+ "peerDependencies": {+ "@lynx-js/react": "*",+ "@prisma/client": "^5.0.0 || ^6.0.0 || ^7.0.0",+ "@sveltejs/kit": "^2.0.0",+ "@tanstack/react-start": "^1.0.0",+ "@tanstack/solid-start": "^1.0.0",+ "better-sqlite3": "^12.0.0",+ "drizzle-kit": ">=0.31.4",+ "drizzle-orm": ">=0.41.0",+ "mongodb": "^6.0.0 || ^7.0.0",+ "mysql2": "^3.0.0",+ "next": "^14.0.0 || ^15.0.0 || ^16.0.0",+ "pg": "^8.0.0",+ "prisma": "^5.0.0 || ^6.0.0 || ^7.0.0",+ "react": "^18.0.0 || ^19.0.0",+ "react-dom": "^18.0.0 || ^19.0.0",+ "solid-js": "^1.0.0",+ "svelte": "^4.0.0 || ^5.0.0",+ "vitest": "^2.0.0 || ^3.0.0 || ^4.0.0",+ "vue": "^3.0.0"+ },+ "peerDependenciesMeta": {+ "@lynx-js/react": {+ "optional": true+ },+ "@prisma/client": {+ "optional": true+ },+ "@sveltejs/kit": {+ "optional": true+ },+ "@tanstack/react-start": {+ "optional": true+ },+ "@tanstack/solid-start": {+ "optional": true+ },+ "better-sqlite3": {+ "optional": true+ },+ "drizzle-kit": {+ "optional": true+ },+ "drizzle-orm": {+ "optional": true+ },+ "mongodb": {+ "optional": true+ },+ "mysql2": {+ "optional": true+ },+ "next": {+ "optional": true+ },+ "pg": {+ "optional": true+ },+ "prisma": {+ "optional": true+ },+ "react": {+ "optional": true+ },+ "react-dom": {+ "optional": true+ },+ "solid-js": {+ "optional": true+ },+ "svelte": {+ "optional": true+ },+ "vitest": {+ "optional": true+ },+ "vue": {+ "optional": true+ }+ }+ },+ "node_modules/better-call": {+ "version": "1.3.2",+ "resolved": "https://registry.npmjs.org/better-call/-/better-call-1.3.2.tgz",+ "integrity": "sha512-4cZIfrerDsNTn3cm+MhLbUePN0gdwkhSXEuG7r/zuQ8c/H7iU0/jSK5TD3FW7U0MgKHce/8jGpPYNO4Ve+4NBw==",+ "license": "MIT",+ "dependencies": {+ "@better-auth/utils": "^0.3.1",+ "@better-fetch/fetch": "^1.1.21",+ "rou3": "^0.7.12",+ "set-cookie-parser": "^3.0.1"+ },+ "peerDependencies": {+ "zod": "^4.0.0"+ },+ "peerDependenciesMeta": {+ "zod": {+ "optional": true+ }+ }+ },+ "node_modules/bin-links": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-6.0.0.tgz",+ "integrity": "sha512-X4CiKlcV2GjnCMwnKAfbVWpHa++65th9TuzAEYtZoATiOE2DQKhSp4CJlyLoTqdhBKlXjpXjCTYPNNFS33Fi6w==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "cmd-shim": "^8.0.0",+ "npm-normalize-package-bin": "^5.0.0",+ "proc-log": "^6.0.0",+ "read-cmd-shim": "^6.0.0",+ "write-file-atomic": "^7.0.0"+ },+ "engines": {+ "node": "^20.17.0 || >=22.9.0"+ }+ },+ "node_modules/body-parser": {+ "version": "2.2.2",+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz",+ "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==",+ "license": "MIT",+ "dependencies": {+ "bytes": "^3.1.2",+ "content-type": "^1.0.5",+ "debug": "^4.4.3",+ "http-errors": "^2.0.0",+ "iconv-lite": "^0.7.0",+ "on-finished": "^2.4.1",+ "qs": "^6.14.1",+ "raw-body": "^3.0.1",+ "type-is": "^2.0.1"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "node_modules/bowser": {+ "version": "2.14.1",+ "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.14.1.tgz",+ "integrity": "sha512-tzPjzCxygAKWFOJP011oxFHs57HzIhOEracIgAePE4pqB3LikALKnSzUyU4MGs9/iCEUuHlAJTjTc5M+u7YEGg==",+ "license": "MIT"+ },+ "node_modules/brace-expansion": {+ "version": "1.1.12",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "balanced-match": "^1.0.0",+ "concat-map": "0.0.1"+ }+ },+ "node_modules/braces": {+ "version": "3.0.3",+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",+ "license": "MIT",+ "dependencies": {+ "fill-range": "^7.1.1"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/browserslist": {+ "version": "4.28.1",+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz",+ "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==",+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/browserslist"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/browserslist"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "baseline-browser-mapping": "^2.9.0",+ "caniuse-lite": "^1.0.30001759",+ "electron-to-chromium": "^1.5.263",+ "node-releases": "^2.0.27",+ "update-browserslist-db": "^1.2.0"+ },+ "bin": {+ "browserslist": "cli.js"+ },+ "engines": {+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"+ }+ },+ "node_modules/bson": {+ "version": "7.2.0",+ "resolved": "https://registry.npmjs.org/bson/-/bson-7.2.0.tgz",+ "integrity": "sha512-YCEo7KjMlbNlyHhz7zAZNDpIpQbd+wOEHJYezv0nMYTn4x31eIUM2yomNNubclAt63dObUzKHWsBLJ9QcZNSnQ==",+ "license": "Apache-2.0",+ "peer": true,+ "engines": {+ "node": ">=20.19.0"+ }+ },+ "node_modules/bundle-name": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz",+ "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==",+ "license": "MIT",+ "dependencies": {+ "run-applescript": "^7.0.0"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "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": {+ "version": "1.0.8",+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz",+ "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind-apply-helpers": "^1.0.0",+ "es-define-property": "^1.0.0",+ "get-intrinsic": "^1.2.4",+ "set-function-length": "^1.2.2"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "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/callsites": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/caniuse-lite": {+ "version": "1.0.30001780",+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001780.tgz",+ "integrity": "sha512-llngX0E7nQci5BPJDqoZSbuZ5Bcs9F5db7EtgfwBerX9XGtkkiO4NwfDDIRzHTTwcYC8vC7bmeUEPGrKlR/TkQ==",+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/browserslist"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "CC-BY-4.0"+ },+ "node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },+ "node_modules/class-variance-authority": {+ "version": "0.7.1",+ "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.1.tgz",+ "integrity": "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==",+ "license": "Apache-2.0",+ "dependencies": {+ "clsx": "^2.1.1"+ },+ "funding": {+ "url": "https://polar.sh/cva"+ }+ },+ "node_modules/cli-cursor": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz",+ "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==",+ "license": "MIT",+ "dependencies": {+ "restore-cursor": "^5.0.0"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/cli-spinners": {+ "version": "2.9.2",+ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz",+ "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==",+ "license": "MIT",+ "engines": {+ "node": ">=6"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/cli-width": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz",+ "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==",+ "license": "ISC",+ "engines": {+ "node": ">= 12"+ }+ },+ "node_modules/client-only": {+ "version": "0.0.1",+ "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",+ "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==",+ "license": "MIT"+ },+ "node_modules/cliui": {+ "version": "8.0.1",+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",+ "license": "ISC",+ "dependencies": {+ "string-width": "^4.2.0",+ "strip-ansi": "^6.0.1",+ "wrap-ansi": "^7.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/cliui/node_modules/ansi-regex": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/cliui/node_modules/emoji-regex": {+ "version": "8.0.0",+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",+ "license": "MIT"+ },+ "node_modules/cliui/node_modules/string-width": {+ "version": "4.2.3",+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",+ "license": "MIT",+ "dependencies": {+ "emoji-regex": "^8.0.0",+ "is-fullwidth-code-point": "^3.0.0",+ "strip-ansi": "^6.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/cliui/node_modules/strip-ansi": {+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",+ "license": "MIT",+ "dependencies": {+ "ansi-regex": "^5.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/cliui/node_modules/wrap-ansi": {+ "version": "7.0.0",+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",+ "license": "MIT",+ "dependencies": {+ "ansi-styles": "^4.0.0",+ "string-width": "^4.1.0",+ "strip-ansi": "^6.0.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"+ }+ },+ "node_modules/clsx": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",+ "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/cmd-shim": {+ "version": "8.0.0",+ "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-8.0.0.tgz",+ "integrity": "sha512-Jk/BK6NCapZ58BKUxlSI+ouKRbjH1NLZCgJkYoab+vEHUY3f6OzpNBN9u7HFSv9J6TRDGs4PLOHezoKGaFRSCA==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": "^20.17.0 || >=22.9.0"+ }+ },+ "node_modules/code-block-writer": {+ "version": "13.0.3",+ "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.3.tgz",+ "integrity": "sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==",+ "license": "MIT"+ },+ "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==",+ "license": "MIT",+ "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==",+ "license": "MIT"+ },+ "node_modules/commander": {+ "version": "14.0.3",+ "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz",+ "integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==",+ "license": "MIT",+ "engines": {+ "node": ">=20"+ }+ },+ "node_modules/concat-map": {+ "version": "0.0.1",+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/content-disposition": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz",+ "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "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/convert-source-map": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",+ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",+ "license": "MIT"+ },+ "node_modules/cookie": {+ "version": "0.7.2",+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",+ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",+ "license": "MIT",+ "engines": {+ "node": ">= 0.6"+ }+ },+ "node_modules/cookie-signature": {+ "version": "1.2.2",+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",+ "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",+ "license": "MIT",+ "engines": {+ "node": ">=6.6.0"+ }+ },+ "node_modules/cors": {+ "version": "2.8.6",+ "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz",+ "integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==",+ "license": "MIT",+ "dependencies": {+ "object-assign": "^4",+ "vary": "^1"+ },+ "engines": {+ "node": ">= 0.10"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "node_modules/cosmiconfig": {+ "version": "9.0.1",+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.1.tgz",+ "integrity": "sha512-hr4ihw+DBqcvrsEDioRO31Z17x71pUYoNe/4h6Z0wB72p7MU7/9gH8Q3s12NFhHPfYBBOV3qyfUxmr/Yn3shnQ==",+ "license": "MIT",+ "dependencies": {+ "env-paths": "^2.2.1",+ "import-fresh": "^3.3.0",+ "js-yaml": "^4.1.0",+ "parse-json": "^5.2.0"+ },+ "engines": {+ "node": ">=14"+ },+ "funding": {+ "url": "https://github.com/sponsors/d-fischer"+ },+ "peerDependencies": {+ "typescript": ">=4.9.5"+ },+ "peerDependenciesMeta": {+ "typescript": {+ "optional": true+ }+ }+ },+ "node_modules/cross-spawn": {+ "version": "7.0.6",+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",+ "license": "MIT",+ "dependencies": {+ "path-key": "^3.1.0",+ "shebang-command": "^2.0.0",+ "which": "^2.0.1"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/cssesc": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",+ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",+ "license": "MIT",+ "bin": {+ "cssesc": "bin/cssesc"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/csstype": {+ "version": "3.2.3",+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",+ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",+ "devOptional": true,+ "license": "MIT"+ },+ "node_modules/damerau-levenshtein": {+ "version": "1.0.8",+ "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz",+ "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==",+ "dev": true,+ "license": "BSD-2-Clause"+ },+ "node_modules/data-uri-to-buffer": {+ "version": "4.0.1",+ "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",+ "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",+ "license": "MIT",+ "engines": {+ "node": ">= 12"+ }+ },+ "node_modules/data-view-buffer": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz",+ "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.3",+ "es-errors": "^1.3.0",+ "is-data-view": "^1.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/data-view-byte-length": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz",+ "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.3",+ "es-errors": "^1.3.0",+ "is-data-view": "^1.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/inspect-js"+ }+ },+ "node_modules/data-view-byte-offset": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz",+ "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.2",+ "es-errors": "^1.3.0",+ "is-data-view": "^1.0.1"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/debug": {+ "version": "4.4.3",+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",+ "license": "MIT",+ "dependencies": {+ "ms": "^2.1.3"+ },+ "engines": {+ "node": ">=6.0"+ },+ "peerDependenciesMeta": {+ "supports-color": {+ "optional": true+ }+ }+ },+ "node_modules/dedent": {+ "version": "1.7.2",+ "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz",+ "integrity": "sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==",+ "license": "MIT",+ "peerDependencies": {+ "babel-plugin-macros": "^3.1.0"+ },+ "peerDependenciesMeta": {+ "babel-plugin-macros": {+ "optional": true+ }+ }+ },+ "node_modules/deep-is": {+ "version": "0.1.4",+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",+ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/deepmerge": {+ "version": "4.3.1",+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",+ "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/default-browser": {+ "version": "5.5.0",+ "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.0.tgz",+ "integrity": "sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw==",+ "license": "MIT",+ "dependencies": {+ "bundle-name": "^4.1.0",+ "default-browser-id": "^5.0.0"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/default-browser-id": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz",+ "integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/define-data-property": {+ "version": "1.1.4",+ "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",+ "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "es-define-property": "^1.0.0",+ "es-errors": "^1.3.0",+ "gopd": "^1.0.1"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/define-lazy-prop": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz",+ "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==",+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/define-properties": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",+ "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "define-data-property": "^1.0.1",+ "has-property-descriptors": "^1.0.0",+ "object-keys": "^1.1.1"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/defu": {+ "version": "6.1.4",+ "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz",+ "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==",+ "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/detect-libc": {+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",+ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",+ "devOptional": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/detect-node-es": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz",+ "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==",+ "license": "MIT"+ },+ "node_modules/diff": {+ "version": "8.0.3",+ "resolved": "https://registry.npmjs.org/diff/-/diff-8.0.3.tgz",+ "integrity": "sha512-qejHi7bcSD4hQAZE0tNAawRK1ZtafHDmMTMkrrIGgSLl7hTnQHmKCeB45xAcbfTqK2zowkM3j3bHt/4b/ARbYQ==",+ "license": "BSD-3-Clause",+ "engines": {+ "node": ">=0.3.1"+ }+ },+ "node_modules/doctrine": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",+ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "esutils": "^2.0.2"+ },+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/dotenv": {+ "version": "17.3.1",+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.3.1.tgz",+ "integrity": "sha512-IO8C/dzEb6O3F9/twg6ZLXz164a2fhTnEWb95H23Dm4OuN+92NmEAlTrupP9VW6Jm3sO26tQlqyvyi4CsnY9GA==",+ "license": "BSD-2-Clause",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://dotenvx.com"+ }+ },+ "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/eciesjs": {+ "version": "0.4.18",+ "resolved": "https://registry.npmjs.org/eciesjs/-/eciesjs-0.4.18.tgz",+ "integrity": "sha512-wG99Zcfcys9fZux7Cft8BAX/YrOJLJSZ3jyYPfhZHqN2E+Ffx+QXBDsv3gubEgPtV6dTzJMSQUwk1H98/t/0wQ==",+ "license": "MIT",+ "dependencies": {+ "@ecies/ciphers": "^0.2.5",+ "@noble/ciphers": "^1.3.0",+ "@noble/curves": "^1.9.7",+ "@noble/hashes": "^1.8.0"+ },+ "engines": {+ "bun": ">=1",+ "deno": ">=2",+ "node": ">=16"+ }+ },+ "node_modules/eciesjs/node_modules/@ecies/ciphers": {+ "version": "0.2.5",+ "resolved": "https://registry.npmjs.org/@ecies/ciphers/-/ciphers-0.2.5.tgz",+ "integrity": "sha512-GalEZH4JgOMHYYcYmVqnFirFsjZHeoGMDt9IxEnM9F7GRUUyUksJ7Ou53L83WHJq3RWKD3AcBpo0iQh0oMpf8A==",+ "license": "MIT",+ "engines": {+ "bun": ">=1",+ "deno": ">=2",+ "node": ">=16"+ },+ "peerDependencies": {+ "@noble/ciphers": "^1.0.0"+ }+ },+ "node_modules/eciesjs/node_modules/@noble/ciphers": {+ "version": "1.3.0",+ "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.3.0.tgz",+ "integrity": "sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==",+ "license": "MIT",+ "engines": {+ "node": "^14.21.3 || >=16"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },+ "node_modules/eciesjs/node_modules/@noble/hashes": {+ "version": "1.8.0",+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz",+ "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==",+ "license": "MIT",+ "engines": {+ "node": "^14.21.3 || >=16"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },+ "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/electron-to-chromium": {+ "version": "1.5.321",+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.321.tgz",+ "integrity": "sha512-L2C7Q279W2D/J4PLZLk7sebOILDSWos7bMsMNN06rK482umHUrh/3lM8G7IlHFOYip2oAg5nha1rCMxr/rs6ZQ==",+ "license": "ISC"+ },+ "node_modules/emoji-regex": {+ "version": "9.2.2",+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",+ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",+ "dev": true,+ "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/enhanced-resolve": {+ "version": "5.20.1",+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.20.1.tgz",+ "integrity": "sha512-Qohcme7V1inbAfvjItgw0EaxVX5q2rdVEZHRBrEQdRZTssLDGsL8Lwrznl8oQ/6kuTJONLaDcGjkNP247XEhcA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "graceful-fs": "^4.2.4",+ "tapable": "^2.3.0"+ },+ "engines": {+ "node": ">=10.13.0"+ }+ },+ "node_modules/env-paths": {+ "version": "2.2.1",+ "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",+ "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/error-ex": {+ "version": "1.3.4",+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz",+ "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==",+ "license": "MIT",+ "dependencies": {+ "is-arrayish": "^0.2.1"+ }+ },+ "node_modules/es-abstract": {+ "version": "1.24.1",+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.1.tgz",+ "integrity": "sha512-zHXBLhP+QehSSbsS9Pt23Gg964240DPd6QCf8WpkqEXxQ7fhdZzYsocOr5u7apWonsS5EjZDmTF+/slGMyasvw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "array-buffer-byte-length": "^1.0.2",+ "arraybuffer.prototype.slice": "^1.0.4",+ "available-typed-arrays": "^1.0.7",+ "call-bind": "^1.0.8",+ "call-bound": "^1.0.4",+ "data-view-buffer": "^1.0.2",+ "data-view-byte-length": "^1.0.2",+ "data-view-byte-offset": "^1.0.1",+ "es-define-property": "^1.0.1",+ "es-errors": "^1.3.0",+ "es-object-atoms": "^1.1.1",+ "es-set-tostringtag": "^2.1.0",+ "es-to-primitive": "^1.3.0",+ "function.prototype.name": "^1.1.8",+ "get-intrinsic": "^1.3.0",+ "get-proto": "^1.0.1",+ "get-symbol-description": "^1.1.0",+ "globalthis": "^1.0.4",+ "gopd": "^1.2.0",+ "has-property-descriptors": "^1.0.2",+ "has-proto": "^1.2.0",+ "has-symbols": "^1.1.0",+ "hasown": "^2.0.2",+ "internal-slot": "^1.1.0",+ "is-array-buffer": "^3.0.5",+ "is-callable": "^1.2.7",+ "is-data-view": "^1.0.2",+ "is-negative-zero": "^2.0.3",+ "is-regex": "^1.2.1",+ "is-set": "^2.0.3",+ "is-shared-array-buffer": "^1.0.4",+ "is-string": "^1.1.1",+ "is-typed-array": "^1.1.15",+ "is-weakref": "^1.1.1",+ "math-intrinsics": "^1.1.0",+ "object-inspect": "^1.13.4",+ "object-keys": "^1.1.1",+ "object.assign": "^4.1.7",+ "own-keys": "^1.0.1",+ "regexp.prototype.flags": "^1.5.4",+ "safe-array-concat": "^1.1.3",+ "safe-push-apply": "^1.0.0",+ "safe-regex-test": "^1.1.0",+ "set-proto": "^1.0.0",+ "stop-iteration-iterator": "^1.1.0",+ "string.prototype.trim": "^1.2.10",+ "string.prototype.trimend": "^1.0.9",+ "string.prototype.trimstart": "^1.0.8",+ "typed-array-buffer": "^1.0.3",+ "typed-array-byte-length": "^1.0.3",+ "typed-array-byte-offset": "^1.0.4",+ "typed-array-length": "^1.0.7",+ "unbox-primitive": "^1.1.0",+ "which-typed-array": "^1.1.19"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "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-iterator-helpers": {+ "version": "1.3.1",+ "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.3.1.tgz",+ "integrity": "sha512-zWwRvqWiuBPr0muUG/78cW3aHROFCNIQ3zpmYDpwdbnt2m+xlNyRWpHBpa2lJjSBit7BQ+RXA1iwbSmu5yJ/EQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.8",+ "call-bound": "^1.0.4",+ "define-properties": "^1.2.1",+ "es-abstract": "^1.24.1",+ "es-errors": "^1.3.0",+ "es-set-tostringtag": "^2.1.0",+ "function-bind": "^1.1.2",+ "get-intrinsic": "^1.3.0",+ "globalthis": "^1.0.4",+ "gopd": "^1.2.0",+ "has-property-descriptors": "^1.0.2",+ "has-proto": "^1.2.0",+ "has-symbols": "^1.1.0",+ "internal-slot": "^1.1.0",+ "iterator.prototype": "^1.1.5",+ "math-intrinsics": "^1.1.0",+ "safe-array-concat": "^1.1.3"+ },+ "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/es-set-tostringtag": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",+ "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "es-errors": "^1.3.0",+ "get-intrinsic": "^1.2.6",+ "has-tostringtag": "^1.0.2",+ "hasown": "^2.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/es-shim-unscopables": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz",+ "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "hasown": "^2.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/es-to-primitive": {+ "version": "1.3.0",+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz",+ "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "is-callable": "^1.2.7",+ "is-date-object": "^1.0.5",+ "is-symbol": "^1.0.4"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/escalade": {+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "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/escape-string-regexp": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/eslint": {+ "version": "9.39.4",+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.4.tgz",+ "integrity": "sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@eslint-community/eslint-utils": "^4.8.0",+ "@eslint-community/regexpp": "^4.12.1",+ "@eslint/config-array": "^0.21.2",+ "@eslint/config-helpers": "^0.4.2",+ "@eslint/core": "^0.17.0",+ "@eslint/eslintrc": "^3.3.5",+ "@eslint/js": "9.39.4",+ "@eslint/plugin-kit": "^0.4.1",+ "@humanfs/node": "^0.16.6",+ "@humanwhocodes/module-importer": "^1.0.1",+ "@humanwhocodes/retry": "^0.4.2",+ "@types/estree": "^1.0.6",+ "ajv": "^6.14.0",+ "chalk": "^4.0.0",+ "cross-spawn": "^7.0.6",+ "debug": "^4.3.2",+ "escape-string-regexp": "^4.0.0",+ "eslint-scope": "^8.4.0",+ "eslint-visitor-keys": "^4.2.1",+ "espree": "^10.4.0",+ "esquery": "^1.5.0",+ "esutils": "^2.0.2",+ "fast-deep-equal": "^3.1.3",+ "file-entry-cache": "^8.0.0",+ "find-up": "^5.0.0",+ "glob-parent": "^6.0.2",+ "ignore": "^5.2.0",+ "imurmurhash": "^0.1.4",+ "is-glob": "^4.0.0",+ "json-stable-stringify-without-jsonify": "^1.0.1",+ "lodash.merge": "^4.6.2",+ "minimatch": "^3.1.5",+ "natural-compare": "^1.4.0",+ "optionator": "^0.9.3"+ },+ "bin": {+ "eslint": "bin/eslint.js"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "url": "https://eslint.org/donate"+ },+ "peerDependencies": {+ "jiti": "*"+ },+ "peerDependenciesMeta": {+ "jiti": {+ "optional": true+ }+ }+ },+ "node_modules/eslint-config-next": {+ "version": "16.1.7",+ "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-16.1.7.tgz",+ "integrity": "sha512-FTq1i/QDltzq+zf9aB/cKWAiZ77baG0V7h8dRQh3thVx7I4dwr6ZXQrWKAaTB7x5VwVXlzoUTyMLIVQPLj2gJg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@next/eslint-plugin-next": "16.1.7",+ "eslint-import-resolver-node": "^0.3.6",+ "eslint-import-resolver-typescript": "^3.5.2",+ "eslint-plugin-import": "^2.32.0",+ "eslint-plugin-jsx-a11y": "^6.10.0",+ "eslint-plugin-react": "^7.37.0",+ "eslint-plugin-react-hooks": "^7.0.0",+ "globals": "16.4.0",+ "typescript-eslint": "^8.46.0"+ },+ "peerDependencies": {+ "eslint": ">=9.0.0",+ "typescript": ">=3.3.1"+ },+ "peerDependenciesMeta": {+ "typescript": {+ "optional": true+ }+ }+ },+ "node_modules/eslint-config-next/node_modules/globals": {+ "version": "16.4.0",+ "resolved": "https://registry.npmjs.org/globals/-/globals-16.4.0.tgz",+ "integrity": "sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/eslint-import-resolver-node": {+ "version": "0.3.9",+ "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz",+ "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "debug": "^3.2.7",+ "is-core-module": "^2.13.0",+ "resolve": "^1.22.4"+ }+ },+ "node_modules/eslint-import-resolver-node/node_modules/debug": {+ "version": "3.2.7",+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ms": "^2.1.1"+ }+ },+ "node_modules/eslint-import-resolver-typescript": {+ "version": "3.10.1",+ "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.10.1.tgz",+ "integrity": "sha512-A1rHYb06zjMGAxdLSkN2fXPBwuSaQ0iO5M/hdyS0Ajj1VBaRp0sPD3dn1FhME3c/JluGFbwSxyCfqdSbtQLAHQ==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "@nolyfill/is-core-module": "1.0.39",+ "debug": "^4.4.0",+ "get-tsconfig": "^4.10.0",+ "is-bun-module": "^2.0.0",+ "stable-hash": "^0.0.5",+ "tinyglobby": "^0.2.13",+ "unrs-resolver": "^1.6.2"+ },+ "engines": {+ "node": "^14.18.0 || >=16.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/eslint-import-resolver-typescript"+ },+ "peerDependencies": {+ "eslint": "*",+ "eslint-plugin-import": "*",+ "eslint-plugin-import-x": "*"+ },+ "peerDependenciesMeta": {+ "eslint-plugin-import": {+ "optional": true+ },+ "eslint-plugin-import-x": {+ "optional": true+ }+ }+ },+ "node_modules/eslint-module-utils": {+ "version": "2.12.1",+ "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz",+ "integrity": "sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "debug": "^3.2.7"+ },+ "engines": {+ "node": ">=4"+ },+ "peerDependenciesMeta": {+ "eslint": {+ "optional": true+ }+ }+ },+ "node_modules/eslint-module-utils/node_modules/debug": {+ "version": "3.2.7",+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ms": "^2.1.1"+ }+ },+ "node_modules/eslint-plugin-import": {+ "version": "2.32.0",+ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz",+ "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@rtsao/scc": "^1.1.0",+ "array-includes": "^3.1.9",+ "array.prototype.findlastindex": "^1.2.6",+ "array.prototype.flat": "^1.3.3",+ "array.prototype.flatmap": "^1.3.3",+ "debug": "^3.2.7",+ "doctrine": "^2.1.0",+ "eslint-import-resolver-node": "^0.3.9",+ "eslint-module-utils": "^2.12.1",+ "hasown": "^2.0.2",+ "is-core-module": "^2.16.1",+ "is-glob": "^4.0.3",+ "minimatch": "^3.1.2",+ "object.fromentries": "^2.0.8",+ "object.groupby": "^1.0.3",+ "object.values": "^1.2.1",+ "semver": "^6.3.1",+ "string.prototype.trimend": "^1.0.9",+ "tsconfig-paths": "^3.15.0"+ },+ "engines": {+ "node": ">=4"+ },+ "peerDependencies": {+ "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9"+ }+ },+ "node_modules/eslint-plugin-import/node_modules/debug": {+ "version": "3.2.7",+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ms": "^2.1.1"+ }+ },+ "node_modules/eslint-plugin-jsx-a11y": {+ "version": "6.10.2",+ "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz",+ "integrity": "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "aria-query": "^5.3.2",+ "array-includes": "^3.1.8",+ "array.prototype.flatmap": "^1.3.2",+ "ast-types-flow": "^0.0.8",+ "axe-core": "^4.10.0",+ "axobject-query": "^4.1.0",+ "damerau-levenshtein": "^1.0.8",+ "emoji-regex": "^9.2.2",+ "hasown": "^2.0.2",+ "jsx-ast-utils": "^3.3.5",+ "language-tags": "^1.0.9",+ "minimatch": "^3.1.2",+ "object.fromentries": "^2.0.8",+ "safe-regex-test": "^1.0.3",+ "string.prototype.includes": "^2.0.1"+ },+ "engines": {+ "node": ">=4.0"+ },+ "peerDependencies": {+ "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9"+ }+ },+ "node_modules/eslint-plugin-react": {+ "version": "7.37.5",+ "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz",+ "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "array-includes": "^3.1.8",+ "array.prototype.findlast": "^1.2.5",+ "array.prototype.flatmap": "^1.3.3",+ "array.prototype.tosorted": "^1.1.4",+ "doctrine": "^2.1.0",+ "es-iterator-helpers": "^1.2.1",+ "estraverse": "^5.3.0",+ "hasown": "^2.0.2",+ "jsx-ast-utils": "^2.4.1 || ^3.0.0",+ "minimatch": "^3.1.2",+ "object.entries": "^1.1.9",+ "object.fromentries": "^2.0.8",+ "object.values": "^1.2.1",+ "prop-types": "^15.8.1",+ "resolve": "^2.0.0-next.5",+ "semver": "^6.3.1",+ "string.prototype.matchall": "^4.0.12",+ "string.prototype.repeat": "^1.0.0"+ },+ "engines": {+ "node": ">=4"+ },+ "peerDependencies": {+ "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7"+ }+ },+ "node_modules/eslint-plugin-react-hooks": {+ "version": "7.0.1",+ "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-7.0.1.tgz",+ "integrity": "sha512-O0d0m04evaNzEPoSW+59Mezf8Qt0InfgGIBJnpC0h3NH/WjUAR7BIKUfysC6todmtiZ/A0oUVS8Gce0WhBrHsA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/core": "^7.24.4",+ "@babel/parser": "^7.24.4",+ "hermes-parser": "^0.25.1",+ "zod": "^3.25.0 || ^4.0.0",+ "zod-validation-error": "^3.5.0 || ^4.0.0"+ },+ "engines": {+ "node": ">=18"+ },+ "peerDependencies": {+ "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0"+ }+ },+ "node_modules/eslint-plugin-react/node_modules/resolve": {+ "version": "2.0.0-next.6",+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.6.tgz",+ "integrity": "sha512-3JmVl5hMGtJ3kMmB3zi3DL25KfkCEyy3Tw7Gmw7z5w8M9WlwoPFnIvwChzu1+cF3iaK3sp18hhPz8ANeimdJfA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "es-errors": "^1.3.0",+ "is-core-module": "^2.16.1",+ "node-exports-info": "^1.6.0",+ "object-keys": "^1.1.1",+ "path-parse": "^1.0.7",+ "supports-preserve-symlinks-flag": "^1.0.0"+ },+ "bin": {+ "resolve": "bin/resolve"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/eslint-scope": {+ "version": "8.4.0",+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz",+ "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==",+ "dev": true,+ "license": "BSD-2-Clause",+ "dependencies": {+ "esrecurse": "^4.3.0",+ "estraverse": "^5.2.0"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ }+ },+ "node_modules/eslint-visitor-keys": {+ "version": "4.2.1",+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",+ "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ }+ },+ "node_modules/espree": {+ "version": "10.4.0",+ "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz",+ "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==",+ "dev": true,+ "license": "BSD-2-Clause",+ "dependencies": {+ "acorn": "^8.15.0",+ "acorn-jsx": "^5.3.2",+ "eslint-visitor-keys": "^4.2.1"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ }+ },+ "node_modules/esprima": {+ "version": "4.0.1",+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",+ "license": "BSD-2-Clause",+ "bin": {+ "esparse": "bin/esparse.js",+ "esvalidate": "bin/esvalidate.js"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/esquery": {+ "version": "1.7.0",+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz",+ "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==",+ "dev": true,+ "license": "BSD-3-Clause",+ "dependencies": {+ "estraverse": "^5.1.0"+ },+ "engines": {+ "node": ">=0.10"+ }+ },+ "node_modules/esrecurse": {+ "version": "4.3.0",+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",+ "dev": true,+ "license": "BSD-2-Clause",+ "dependencies": {+ "estraverse": "^5.2.0"+ },+ "engines": {+ "node": ">=4.0"+ }+ },+ "node_modules/estraverse": {+ "version": "5.3.0",+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",+ "dev": true,+ "license": "BSD-2-Clause",+ "engines": {+ "node": ">=4.0"+ }+ },+ "node_modules/esutils": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",+ "dev": true,+ "license": "BSD-2-Clause",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "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/eventsource": {+ "version": "3.0.7",+ "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz",+ "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==",+ "license": "MIT",+ "dependencies": {+ "eventsource-parser": "^3.0.1"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/eventsource-parser": {+ "version": "3.0.6",+ "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.6.tgz",+ "integrity": "sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==",+ "license": "MIT",+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/execa": {+ "version": "9.6.1",+ "resolved": "https://registry.npmjs.org/execa/-/execa-9.6.1.tgz",+ "integrity": "sha512-9Be3ZoN4LmYR90tUoVu2te2BsbzHfhJyfEiAVfz7N5/zv+jduIfLrV2xdQXOHbaD6KgpGdO9PRPM1Y4Q9QkPkA==",+ "license": "MIT",+ "dependencies": {+ "@sindresorhus/merge-streams": "^4.0.0",+ "cross-spawn": "^7.0.6",+ "figures": "^6.1.0",+ "get-stream": "^9.0.0",+ "human-signals": "^8.0.1",+ "is-plain-obj": "^4.1.0",+ "is-stream": "^4.0.1",+ "npm-run-path": "^6.0.0",+ "pretty-ms": "^9.2.0",+ "signal-exit": "^4.1.0",+ "strip-final-newline": "^4.0.0",+ "yoctocolors": "^2.1.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.5.0"+ },+ "funding": {+ "url": "https://github.com/sindresorhus/execa?sponsor=1"+ }+ },+ "node_modules/express": {+ "version": "5.2.1",+ "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",+ "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",+ "license": "MIT",+ "dependencies": {+ "accepts": "^2.0.0",+ "body-parser": "^2.2.1",+ "content-disposition": "^1.0.0",+ "content-type": "^1.0.5",+ "cookie": "^0.7.1",+ "cookie-signature": "^1.2.1",+ "debug": "^4.4.0",+ "depd": "^2.0.0",+ "encodeurl": "^2.0.0",+ "escape-html": "^1.0.3",+ "etag": "^1.8.1",+ "finalhandler": "^2.1.0",+ "fresh": "^2.0.0",+ "http-errors": "^2.0.0",+ "merge-descriptors": "^2.0.0",+ "mime-types": "^3.0.0",+ "on-finished": "^2.4.1",+ "once": "^1.4.0",+ "parseurl": "^1.3.3",+ "proxy-addr": "^2.0.7",+ "qs": "^6.14.0",+ "range-parser": "^1.2.1",+ "router": "^2.2.0",+ "send": "^1.1.0",+ "serve-static": "^2.2.0",+ "statuses": "^2.0.1",+ "type-is": "^2.0.1",+ "vary": "^1.1.2"+ },+ "engines": {+ "node": ">= 18"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "node_modules/express-rate-limit": {+ "version": "8.3.1",+ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.3.1.tgz",+ "integrity": "sha512-D1dKN+cmyPWuvB+G2SREQDzPY1agpBIcTa9sJxOPMCNeH3gwzhqJRDWCXW3gg0y//+LQ/8j52JbMROWyrKdMdw==",+ "license": "MIT",+ "dependencies": {+ "ip-address": "10.1.0"+ },+ "engines": {+ "node": ">= 16"+ },+ "funding": {+ "url": "https://github.com/sponsors/express-rate-limit"+ },+ "peerDependencies": {+ "express": ">= 4.11"+ }+ },+ "node_modules/fast-deep-equal": {+ "version": "3.1.3",+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",+ "license": "MIT"+ },+ "node_modules/fast-glob": {+ "version": "3.3.1",+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",+ "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@nodelib/fs.stat": "^2.0.2",+ "@nodelib/fs.walk": "^1.2.3",+ "glob-parent": "^5.1.2",+ "merge2": "^1.3.0",+ "micromatch": "^4.0.4"+ },+ "engines": {+ "node": ">=8.6.0"+ }+ },+ "node_modules/fast-glob/node_modules/glob-parent": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "is-glob": "^4.0.1"+ },+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/fast-json-stable-stringify": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/fast-levenshtein": {+ "version": "2.0.6",+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",+ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/fast-sha256": {+ "version": "1.3.0",+ "resolved": "https://registry.npmjs.org/fast-sha256/-/fast-sha256-1.3.0.tgz",+ "integrity": "sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ==",+ "license": "Unlicense"+ },+ "node_modules/fast-uri": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz",+ "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/fastify"+ },+ {+ "type": "opencollective",+ "url": "https://opencollective.com/fastify"+ }+ ],+ "license": "BSD-3-Clause"+ },+ "node_modules/fast-xml-builder": {+ "version": "1.1.4",+ "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.1.4.tgz",+ "integrity": "sha512-f2jhpN4Eccy0/Uz9csxh3Nu6q4ErKxf0XIsasomfOihuSUa3/xw6w8dnOtCDgEItQFJG8KyXPzQXzcODDrrbOg==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/NaturalIntelligence"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "path-expression-matcher": "^1.1.3"+ }+ },+ "node_modules/fast-xml-parser": {+ "version": "5.5.6",+ "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.5.6.tgz",+ "integrity": "sha512-3+fdZyBRVg29n4rXP0joHthhcHdPUHaIC16cuyyd1iLsuaO6Vea36MPrxgAzbZna8lhvZeRL8Bc9GP56/J9xEw==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/NaturalIntelligence"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "fast-xml-builder": "^1.1.4",+ "path-expression-matcher": "^1.1.3",+ "strnum": "^2.1.2"+ },+ "bin": {+ "fxparser": "src/cli/cli.js"+ }+ },+ "node_modules/fastq": {+ "version": "1.20.1",+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz",+ "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==",+ "license": "ISC",+ "dependencies": {+ "reusify": "^1.0.4"+ }+ },+ "node_modules/fetch-blob": {+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",+ "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/jimmywarting"+ },+ {+ "type": "paypal",+ "url": "https://paypal.me/jimmywarting"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "node-domexception": "^1.0.0",+ "web-streams-polyfill": "^3.0.3"+ },+ "engines": {+ "node": "^12.20 || >= 14.13"+ }+ },+ "node_modules/figures": {+ "version": "6.1.0",+ "resolved": "https://registry.npmjs.org/figures/-/figures-6.1.0.tgz",+ "integrity": "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==",+ "license": "MIT",+ "dependencies": {+ "is-unicode-supported": "^2.0.0"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/file-entry-cache": {+ "version": "8.0.0",+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz",+ "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "flat-cache": "^4.0.0"+ },+ "engines": {+ "node": ">=16.0.0"+ }+ },+ "node_modules/fill-range": {+ "version": "7.1.1",+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",+ "license": "MIT",+ "dependencies": {+ "to-regex-range": "^5.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/finalhandler": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz",+ "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",+ "license": "MIT",+ "dependencies": {+ "debug": "^4.4.0",+ "encodeurl": "^2.0.0",+ "escape-html": "^1.0.3",+ "on-finished": "^2.4.1",+ "parseurl": "^1.3.3",+ "statuses": "^2.0.1"+ },+ "engines": {+ "node": ">= 18.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "node_modules/find-up": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "locate-path": "^6.0.0",+ "path-exists": "^4.0.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/flat-cache": {+ "version": "4.0.1",+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz",+ "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "flatted": "^3.2.9",+ "keyv": "^4.5.4"+ },+ "engines": {+ "node": ">=16"+ }+ },+ "node_modules/flatted": {+ "version": "3.4.2",+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz",+ "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/for-each": {+ "version": "0.3.5",+ "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz",+ "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "is-callable": "^1.2.7"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/formdata-polyfill": {+ "version": "4.0.10",+ "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",+ "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",+ "license": "MIT",+ "dependencies": {+ "fetch-blob": "^3.1.2"+ },+ "engines": {+ "node": ">=12.20.0"+ }+ },+ "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": "2.0.0",+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",+ "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",+ "license": "MIT",+ "engines": {+ "node": ">= 0.8"+ }+ },+ "node_modules/fs-extra": {+ "version": "11.3.4",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.4.tgz",+ "integrity": "sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA==",+ "license": "MIT",+ "dependencies": {+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"+ },+ "engines": {+ "node": ">=14.14"+ }+ },+ "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/function.prototype.name": {+ "version": "1.1.8",+ "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz",+ "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.8",+ "call-bound": "^1.0.3",+ "define-properties": "^1.2.1",+ "functions-have-names": "^1.2.3",+ "hasown": "^2.0.2",+ "is-callable": "^1.2.7"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/functions-have-names": {+ "version": "1.2.3",+ "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz",+ "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",+ "dev": true,+ "license": "MIT",+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/fuzzysort": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/fuzzysort/-/fuzzysort-3.1.0.tgz",+ "integrity": "sha512-sR9BNCjBg6LNgwvxlBd0sBABvQitkLzoVY9MYYROQVX/FvfJ4Mai9LsGhDgd8qYdds0bY77VzYd5iuB+v5rwQQ==",+ "license": "MIT"+ },+ "node_modules/generator-function": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz",+ "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/gensync": {+ "version": "1.0.0-beta.2",+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/get-caller-file": {+ "version": "2.0.5",+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",+ "license": "ISC",+ "engines": {+ "node": "6.* || 8.* || >= 10.*"+ }+ },+ "node_modules/get-east-asian-width": {+ "version": "1.5.0",+ "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.5.0.tgz",+ "integrity": "sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "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-nonce": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz",+ "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==",+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/get-own-enumerable-keys": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/get-own-enumerable-keys/-/get-own-enumerable-keys-1.0.0.tgz",+ "integrity": "sha512-PKsK2FSrQCyxcGHsGrLDcK0lx+0Ke+6e8KFFozA9/fIQLhQzPaRvJFdcz7+Axg3jUH/Mq+NI4xa5u/UT2tQskA==",+ "license": "MIT",+ "engines": {+ "node": ">=14.16"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "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-stream": {+ "version": "9.0.1",+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz",+ "integrity": "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==",+ "license": "MIT",+ "dependencies": {+ "@sec-ant/readable-stream": "^0.4.1",+ "is-stream": "^4.0.1"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/get-symbol-description": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz",+ "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.3",+ "es-errors": "^1.3.0",+ "get-intrinsic": "^1.2.6"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/get-tsconfig": {+ "version": "4.13.6",+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.6.tgz",+ "integrity": "sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "resolve-pkg-maps": "^1.0.0"+ },+ "funding": {+ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"+ }+ },+ "node_modules/glob-parent": {+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",+ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "is-glob": "^4.0.3"+ },+ "engines": {+ "node": ">=10.13.0"+ }+ },+ "node_modules/globals": {+ "version": "14.0.0",+ "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz",+ "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/globalthis": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",+ "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "define-properties": "^1.2.1",+ "gopd": "^1.0.1"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "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/graceful-fs": {+ "version": "4.2.11",+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",+ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",+ "license": "ISC"+ },+ "node_modules/graphql": {+ "version": "16.13.1",+ "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.13.1.tgz",+ "integrity": "sha512-gGgrVCoDKlIZ8fIqXBBb0pPKqDgki0Z/FSKNiQzSGj2uEYHr1tq5wmBegGwJx6QB5S5cM0khSBpi/JFHMCvsmQ==",+ "license": "MIT",+ "engines": {+ "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0"+ }+ },+ "node_modules/has-bigints": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz",+ "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/has-flag": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/has-property-descriptors": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",+ "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "es-define-property": "^1.0.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/has-proto": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz",+ "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "dunder-proto": "^1.0.0"+ },+ "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/has-tostringtag": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",+ "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "has-symbols": "^1.0.3"+ },+ "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/headers-polyfill": {+ "version": "4.0.3",+ "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-4.0.3.tgz",+ "integrity": "sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==",+ "license": "MIT"+ },+ "node_modules/hermes-estree": {+ "version": "0.25.1",+ "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz",+ "integrity": "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/hermes-parser": {+ "version": "0.25.1",+ "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.25.1.tgz",+ "integrity": "sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "hermes-estree": "0.25.1"+ }+ },+ "node_modules/hono": {+ "version": "4.12.8",+ "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.8.tgz",+ "integrity": "sha512-VJCEvtrezO1IAR+kqEYnxUOoStaQPGrCmX3j4wDTNOcD1uRPFpGlwQUIW8niPuvHXaTUxeOUl5MMDGrl+tmO9A==",+ "license": "MIT",+ "engines": {+ "node": ">=16.9.0"+ }+ },+ "node_modules/http-errors": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",+ "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",+ "license": "MIT",+ "dependencies": {+ "depd": "~2.0.0",+ "inherits": "~2.0.4",+ "setprototypeof": "~1.2.0",+ "statuses": "~2.0.2",+ "toidentifier": "~1.0.1"+ },+ "engines": {+ "node": ">= 0.8"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "node_modules/https-proxy-agent": {+ "version": "7.0.6",+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",+ "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",+ "license": "MIT",+ "dependencies": {+ "agent-base": "^7.1.2",+ "debug": "4"+ },+ "engines": {+ "node": ">= 14"+ }+ },+ "node_modules/human-signals": {+ "version": "8.0.1",+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-8.0.1.tgz",+ "integrity": "sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ==",+ "license": "Apache-2.0",+ "engines": {+ "node": ">=18.18.0"+ }+ },+ "node_modules/iconv-lite": {+ "version": "0.7.2",+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz",+ "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==",+ "license": "MIT",+ "dependencies": {+ "safer-buffer": ">= 2.1.2 < 3.0.0"+ },+ "engines": {+ "node": ">=0.10.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "node_modules/ignore": {+ "version": "5.3.2",+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",+ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",+ "license": "MIT",+ "engines": {+ "node": ">= 4"+ }+ },+ "node_modules/import-fresh": {+ "version": "3.3.1",+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz",+ "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==",+ "license": "MIT",+ "dependencies": {+ "parent-module": "^1.0.0",+ "resolve-from": "^4.0.0"+ },+ "engines": {+ "node": ">=6"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/imurmurhash": {+ "version": "0.1.4",+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.8.19"+ }+ },+ "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/internal-slot": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz",+ "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "es-errors": "^1.3.0",+ "hasown": "^2.0.2",+ "side-channel": "^1.1.0"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/ip-address": {+ "version": "10.1.0",+ "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz",+ "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==",+ "license": "MIT",+ "engines": {+ "node": ">= 12"+ }+ },+ "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-array-buffer": {+ "version": "3.0.5",+ "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz",+ "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.8",+ "call-bound": "^1.0.3",+ "get-intrinsic": "^1.2.6"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-arrayish": {+ "version": "0.2.1",+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",+ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",+ "license": "MIT"+ },+ "node_modules/is-async-function": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz",+ "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "async-function": "^1.0.0",+ "call-bound": "^1.0.3",+ "get-proto": "^1.0.1",+ "has-tostringtag": "^1.0.2",+ "safe-regex-test": "^1.1.0"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-bigint": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz",+ "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "has-bigints": "^1.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-boolean-object": {+ "version": "1.2.2",+ "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz",+ "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.3",+ "has-tostringtag": "^1.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-bun-module": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-2.0.0.tgz",+ "integrity": "sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "semver": "^7.7.1"+ }+ },+ "node_modules/is-bun-module/node_modules/semver": {+ "version": "7.7.4",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",+ "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/is-callable": {+ "version": "1.2.7",+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",+ "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-core-module": {+ "version": "2.16.1",+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",+ "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "hasown": "^2.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-data-view": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz",+ "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.2",+ "get-intrinsic": "^1.2.6",+ "is-typed-array": "^1.1.13"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-date-object": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz",+ "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.2",+ "has-tostringtag": "^1.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-docker": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz",+ "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==",+ "license": "MIT",+ "bin": {+ "is-docker": "cli.js"+ },+ "engines": {+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/is-extglob": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/is-finalizationregistry": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz",+ "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.3"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-fullwidth-code-point": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/is-generator-function": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz",+ "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.4",+ "generator-function": "^2.0.0",+ "get-proto": "^1.0.1",+ "has-tostringtag": "^1.0.2",+ "safe-regex-test": "^1.1.0"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-glob": {+ "version": "4.0.3",+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",+ "license": "MIT",+ "dependencies": {+ "is-extglob": "^2.1.1"+ },+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/is-in-ssh": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/is-in-ssh/-/is-in-ssh-1.0.0.tgz",+ "integrity": "sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw==",+ "license": "MIT",+ "engines": {+ "node": ">=20"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/is-inside-container": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz",+ "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==",+ "license": "MIT",+ "dependencies": {+ "is-docker": "^3.0.0"+ },+ "bin": {+ "is-inside-container": "cli.js"+ },+ "engines": {+ "node": ">=14.16"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/is-interactive": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz",+ "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==",+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/is-map": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz",+ "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-negative-zero": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz",+ "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-node-process": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/is-node-process/-/is-node-process-1.2.0.tgz",+ "integrity": "sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==",+ "license": "MIT"+ },+ "node_modules/is-number": {+ "version": "7.0.0",+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",+ "license": "MIT",+ "engines": {+ "node": ">=0.12.0"+ }+ },+ "node_modules/is-number-object": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz",+ "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.3",+ "has-tostringtag": "^1.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-obj": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-3.0.0.tgz",+ "integrity": "sha512-IlsXEHOjtKhpN8r/tRFj2nDyTmHvcfNeu/nrRIcXE17ROeatXchkojffa1SpdqW4cr/Fj6QkEf/Gn4zf6KKvEQ==",+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/is-plain-obj": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz",+ "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==",+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/is-promise": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",+ "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",+ "license": "MIT"+ },+ "node_modules/is-regex": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz",+ "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.2",+ "gopd": "^1.2.0",+ "has-tostringtag": "^1.0.2",+ "hasown": "^2.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-regexp": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-3.1.0.tgz",+ "integrity": "sha512-rbku49cWloU5bSMI+zaRaXdQHXnthP6DZ/vLnfdSKyL4zUzuWnomtOEiZZOd+ioQ+avFo/qau3KPTc7Fjy1uPA==",+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/is-set": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz",+ "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-shared-array-buffer": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz",+ "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.3"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-stream": {+ "version": "4.0.1",+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz",+ "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/is-string": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz",+ "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.3",+ "has-tostringtag": "^1.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-symbol": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz",+ "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.2",+ "has-symbols": "^1.1.0",+ "safe-regex-test": "^1.1.0"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-typed-array": {+ "version": "1.1.15",+ "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz",+ "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "which-typed-array": "^1.1.16"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-unicode-supported": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz",+ "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/is-weakmap": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz",+ "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-weakref": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz",+ "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.3"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-weakset": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz",+ "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.3",+ "get-intrinsic": "^1.2.6"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-wsl": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.1.tgz",+ "integrity": "sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==",+ "license": "MIT",+ "dependencies": {+ "is-inside-container": "^1.0.0"+ },+ "engines": {+ "node": ">=16"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/isarray": {+ "version": "2.0.5",+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",+ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/isexe": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",+ "license": "ISC"+ },+ "node_modules/iterator.prototype": {+ "version": "1.1.5",+ "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz",+ "integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "define-data-property": "^1.1.4",+ "es-object-atoms": "^1.0.0",+ "get-intrinsic": "^1.2.6",+ "get-proto": "^1.0.0",+ "has-symbols": "^1.1.0",+ "set-function-name": "^2.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/jiti": {+ "version": "2.6.1",+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz",+ "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==",+ "dev": true,+ "license": "MIT",+ "bin": {+ "jiti": "lib/jiti-cli.mjs"+ }+ },+ "node_modules/jose": {+ "version": "6.2.2",+ "resolved": "https://registry.npmjs.org/jose/-/jose-6.2.2.tgz",+ "integrity": "sha512-d7kPDd34KO/YnzaDOlikGpOurfF0ByC2sEV4cANCtdqLlTfBlw2p14O/5d/zv40gJPbIQxfES3nSx1/oYNyuZQ==",+ "license": "MIT",+ "funding": {+ "url": "https://github.com/sponsors/panva"+ }+ },+ "node_modules/js-tokens": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",+ "license": "MIT"+ },+ "node_modules/js-yaml": {+ "version": "4.1.1",+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",+ "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",+ "license": "MIT",+ "dependencies": {+ "argparse": "^2.0.1"+ },+ "bin": {+ "js-yaml": "bin/js-yaml.js"+ }+ },+ "node_modules/jsesc": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",+ "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",+ "license": "MIT",+ "bin": {+ "jsesc": "bin/jsesc"+ },+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/json-buffer": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/json-parse-even-better-errors": {+ "version": "2.3.1",+ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",+ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",+ "license": "MIT"+ },+ "node_modules/json-schema-traverse": {+ "version": "0.4.1",+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/json-schema-typed": {+ "version": "8.0.2",+ "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-8.0.2.tgz",+ "integrity": "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==",+ "license": "BSD-2-Clause"+ },+ "node_modules/json-stable-stringify-without-jsonify": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",+ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/json5": {+ "version": "2.2.3",+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",+ "license": "MIT",+ "bin": {+ "json5": "lib/cli.js"+ },+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/jsonfile": {+ "version": "6.2.0",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz",+ "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==",+ "license": "MIT",+ "dependencies": {+ "universalify": "^2.0.0"+ },+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"+ }+ },+ "node_modules/jsx-ast-utils": {+ "version": "3.3.5",+ "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz",+ "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "array-includes": "^3.1.6",+ "array.prototype.flat": "^1.3.1",+ "object.assign": "^4.1.4",+ "object.values": "^1.1.6"+ },+ "engines": {+ "node": ">=4.0"+ }+ },+ "node_modules/keyv": {+ "version": "4.5.4",+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",+ "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "json-buffer": "3.0.1"+ }+ },+ "node_modules/kleur": {+ "version": "4.1.5",+ "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",+ "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/kysely": {+ "version": "0.28.12",+ "resolved": "https://registry.npmjs.org/kysely/-/kysely-0.28.12.tgz",+ "integrity": "sha512-kWiueDWXhbCchgiotwXkwdxZE/6h56IHAeFWg4euUfW0YsmO9sxbAxzx1KLLv2lox15EfuuxHQvgJ1qIfZuHGw==",+ "license": "MIT",+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/language-subtag-registry": {+ "version": "0.3.23",+ "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz",+ "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==",+ "dev": true,+ "license": "CC0-1.0"+ },+ "node_modules/language-tags": {+ "version": "1.0.9",+ "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz",+ "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "language-subtag-registry": "^0.3.20"+ },+ "engines": {+ "node": ">=0.10"+ }+ },+ "node_modules/levn": {+ "version": "0.4.1",+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",+ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "prelude-ls": "^1.2.1",+ "type-check": "~0.4.0"+ },+ "engines": {+ "node": ">= 0.8.0"+ }+ },+ "node_modules/lightningcss": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz",+ "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==",+ "dev": true,+ "license": "MPL-2.0",+ "dependencies": {+ "detect-libc": "^2.0.3"+ },+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ },+ "optionalDependencies": {+ "lightningcss-android-arm64": "1.32.0",+ "lightningcss-darwin-arm64": "1.32.0",+ "lightningcss-darwin-x64": "1.32.0",+ "lightningcss-freebsd-x64": "1.32.0",+ "lightningcss-linux-arm-gnueabihf": "1.32.0",+ "lightningcss-linux-arm64-gnu": "1.32.0",+ "lightningcss-linux-arm64-musl": "1.32.0",+ "lightningcss-linux-x64-gnu": "1.32.0",+ "lightningcss-linux-x64-musl": "1.32.0",+ "lightningcss-win32-arm64-msvc": "1.32.0",+ "lightningcss-win32-x64-msvc": "1.32.0"+ }+ },+ "node_modules/lightningcss-android-arm64": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz",+ "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-darwin-arm64": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz",+ "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-darwin-x64": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz",+ "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-freebsd-x64": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz",+ "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "freebsd"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-linux-arm-gnueabihf": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz",+ "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-linux-arm64-gnu": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz",+ "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-linux-arm64-musl": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz",+ "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-linux-x64-gnu": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz",+ "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-linux-x64-musl": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz",+ "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-win32-arm64-msvc": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz",+ "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-win32-x64-msvc": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz",+ "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lines-and-columns": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",+ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",+ "license": "MIT"+ },+ "node_modules/locate-path": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "p-locate": "^5.0.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/lodash.merge": {+ "version": "4.6.2",+ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",+ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/log-symbols": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz",+ "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==",+ "license": "MIT",+ "dependencies": {+ "chalk": "^5.3.0",+ "is-unicode-supported": "^1.3.0"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/log-symbols/node_modules/chalk": {+ "version": "5.6.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz",+ "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==",+ "license": "MIT",+ "engines": {+ "node": "^12.17.0 || ^14.13 || >=16.0.0"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },+ "node_modules/log-symbols/node_modules/is-unicode-supported": {+ "version": "1.3.0",+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz",+ "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==",+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/loose-envify": {+ "version": "1.4.0",+ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",+ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "js-tokens": "^3.0.0 || ^4.0.0"+ },+ "bin": {+ "loose-envify": "cli.js"+ }+ },+ "node_modules/lru-cache": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",+ "license": "ISC",+ "dependencies": {+ "yallist": "^3.0.2"+ }+ },+ "node_modules/lucide-react": {+ "version": "0.577.0",+ "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.577.0.tgz",+ "integrity": "sha512-4LjoFv2eEPwYDPg/CUdBJQSDfPyzXCRrVW1X7jrx/trgxnxkHFjnVZINbzvzxjN70dxychOfg+FTYwBiS3pQ5A==",+ "license": "ISC",+ "peerDependencies": {+ "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0"+ }+ },+ "node_modules/magic-string": {+ "version": "0.30.21",+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",+ "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/sourcemap-codec": "^1.5.5"+ }+ },+ "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": "1.1.0",+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",+ "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",+ "license": "MIT",+ "engines": {+ "node": ">= 0.8"+ }+ },+ "node_modules/memory-pager": {+ "version": "1.5.0",+ "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",+ "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",+ "license": "MIT",+ "peer": true+ },+ "node_modules/merge-descriptors": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",+ "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/merge-stream": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",+ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",+ "license": "MIT"+ },+ "node_modules/merge2": {+ "version": "1.4.1",+ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",+ "license": "MIT",+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/micromatch": {+ "version": "4.0.8",+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",+ "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",+ "license": "MIT",+ "dependencies": {+ "braces": "^3.0.3",+ "picomatch": "^2.3.1"+ },+ "engines": {+ "node": ">=8.6"+ }+ },+ "node_modules/mime-db": {+ "version": "1.54.0",+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",+ "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",+ "license": "MIT",+ "engines": {+ "node": ">= 0.6"+ }+ },+ "node_modules/mime-types": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",+ "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",+ "license": "MIT",+ "dependencies": {+ "mime-db": "^1.54.0"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "node_modules/mimic-fn": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/mimic-function": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz",+ "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/minimatch": {+ "version": "3.1.5",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",+ "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "brace-expansion": "^1.1.7"+ },+ "engines": {+ "node": "*"+ }+ },+ "node_modules/minimist": {+ "version": "1.2.8",+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",+ "license": "MIT",+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/minipass": {+ "version": "7.1.3",+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",+ "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": ">=16 || 14 >=14.17"+ }+ },+ "node_modules/minizlib": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz",+ "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "minipass": "^7.1.2"+ },+ "engines": {+ "node": ">= 18"+ }+ },+ "node_modules/mongodb": {+ "version": "7.1.0",+ "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-7.1.0.tgz",+ "integrity": "sha512-kMfnKunbolQYwCIyrkxNJFB4Ypy91pYqua5NargS/f8ODNSJxT03ZU3n1JqL4mCzbSih8tvmMEMLpKTT7x5gCg==",+ "license": "Apache-2.0",+ "peer": true,+ "dependencies": {+ "@mongodb-js/saslprep": "^1.3.0",+ "bson": "^7.1.1",+ "mongodb-connection-string-url": "^7.0.0"+ },+ "engines": {+ "node": ">=20.19.0"+ },+ "peerDependencies": {+ "@aws-sdk/credential-providers": "^3.806.0",+ "@mongodb-js/zstd": "^7.0.0",+ "gcp-metadata": "^7.0.1",+ "kerberos": "^7.0.0",+ "mongodb-client-encryption": ">=7.0.0 <7.1.0",+ "snappy": "^7.3.2",+ "socks": "^2.8.6"+ },+ "peerDependenciesMeta": {+ "@aws-sdk/credential-providers": {+ "optional": true+ },+ "@mongodb-js/zstd": {+ "optional": true+ },+ "gcp-metadata": {+ "optional": true+ },+ "kerberos": {+ "optional": true+ },+ "mongodb-client-encryption": {+ "optional": true+ },+ "snappy": {+ "optional": true+ },+ "socks": {+ "optional": true+ }+ }+ },+ "node_modules/mongodb-connection-string-url": {+ "version": "7.0.1",+ "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-7.0.1.tgz",+ "integrity": "sha512-h0AZ9A7IDVwwHyMxmdMXKy+9oNlF0zFoahHiX3vQ8e3KFcSP3VmsmfvtRSuLPxmyv2vjIDxqty8smTgie/SNRQ==",+ "license": "Apache-2.0",+ "peer": true,+ "dependencies": {+ "@types/whatwg-url": "^13.0.0",+ "whatwg-url": "^14.1.0"+ },+ "engines": {+ "node": ">=20.19.0"+ }+ },+ "node_modules/mongodb-connection-string-url/node_modules/tr46": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.1.tgz",+ "integrity": "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==",+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "punycode": "^2.3.1"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/mongodb-connection-string-url/node_modules/webidl-conversions": {+ "version": "7.0.0",+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",+ "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",+ "license": "BSD-2-Clause",+ "peer": true,+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/mongodb-connection-string-url/node_modules/whatwg-url": {+ "version": "14.2.0",+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz",+ "integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==",+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "tr46": "^5.1.0",+ "webidl-conversions": "^7.0.0"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "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/msw": {+ "version": "2.12.14",+ "resolved": "https://registry.npmjs.org/msw/-/msw-2.12.14.tgz",+ "integrity": "sha512-4KXa4nVBIBjbDbd7vfQNuQ25eFxug0aropCQFoI0JdOBuJWamkT1yLVIWReFI8SiTRc+H1hKzaNk+cLk2N9rtQ==",+ "hasInstallScript": true,+ "license": "MIT",+ "dependencies": {+ "@inquirer/confirm": "^5.0.0",+ "@mswjs/interceptors": "^0.41.2",+ "@open-draft/deferred-promise": "^2.2.0",+ "@types/statuses": "^2.0.6",+ "cookie": "^1.0.2",+ "graphql": "^16.12.0",+ "headers-polyfill": "^4.0.2",+ "is-node-process": "^1.2.0",+ "outvariant": "^1.4.3",+ "path-to-regexp": "^6.3.0",+ "picocolors": "^1.1.1",+ "rettime": "^0.10.1",+ "statuses": "^2.0.2",+ "strict-event-emitter": "^0.5.1",+ "tough-cookie": "^6.0.0",+ "type-fest": "^5.2.0",+ "until-async": "^3.0.2",+ "yargs": "^17.7.2"+ },+ "bin": {+ "msw": "cli/index.js"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/mswjs"+ },+ "peerDependencies": {+ "typescript": ">= 4.8.x"+ },+ "peerDependenciesMeta": {+ "typescript": {+ "optional": true+ }+ }+ },+ "node_modules/msw/node_modules/cookie": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz",+ "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "node_modules/mute-stream": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz",+ "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==",+ "license": "ISC",+ "engines": {+ "node": "^18.17.0 || >=20.5.0"+ }+ },+ "node_modules/nanoid": {+ "version": "3.3.11",+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",+ "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "bin": {+ "nanoid": "bin/nanoid.cjs"+ },+ "engines": {+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"+ }+ },+ "node_modules/nanostores": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/nanostores/-/nanostores-1.2.0.tgz",+ "integrity": "sha512-F0wCzbsH80G7XXo0Jd9/AVQC7ouWY6idUCTnMwW5t/Rv9W8qmO6endavDwg7TNp5GbugwSukFMVZqzPSrSMndg==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "engines": {+ "node": "^20.0.0 || >=22.0.0"+ }+ },+ "node_modules/napi-postinstall": {+ "version": "0.3.4",+ "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz",+ "integrity": "sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==",+ "dev": true,+ "license": "MIT",+ "bin": {+ "napi-postinstall": "lib/cli.js"+ },+ "engines": {+ "node": "^12.20.0 || ^14.18.0 || >=16.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/napi-postinstall"+ }+ },+ "node_modules/natural-compare": {+ "version": "1.4.0",+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",+ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/negotiator": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",+ "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",+ "license": "MIT",+ "engines": {+ "node": ">= 0.6"+ }+ },+ "node_modules/next": {+ "version": "16.1.7",+ "resolved": "https://registry.npmjs.org/next/-/next-16.1.7.tgz",+ "integrity": "sha512-WM0L7WrSvKwoLegLYr6V+mz+RIofqQgVAfHhMp9a88ms0cFX8iX9ew+snpWlSBwpkURJOUdvCEt3uLl3NNzvWg==",+ "license": "MIT",+ "dependencies": {+ "@next/env": "16.1.7",+ "@swc/helpers": "0.5.15",+ "baseline-browser-mapping": "^2.9.19",+ "caniuse-lite": "^1.0.30001579",+ "postcss": "8.4.31",+ "styled-jsx": "5.1.6"+ },+ "bin": {+ "next": "dist/bin/next"+ },+ "engines": {+ "node": ">=20.9.0"+ },+ "optionalDependencies": {+ "@next/swc-darwin-arm64": "16.1.7",+ "@next/swc-darwin-x64": "16.1.7",+ "@next/swc-linux-arm64-gnu": "16.1.7",+ "@next/swc-linux-arm64-musl": "16.1.7",+ "@next/swc-linux-x64-gnu": "16.1.7",+ "@next/swc-linux-x64-musl": "16.1.7",+ "@next/swc-win32-arm64-msvc": "16.1.7",+ "@next/swc-win32-x64-msvc": "16.1.7",+ "sharp": "^0.34.4"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.1.0",+ "@playwright/test": "^1.51.1",+ "babel-plugin-react-compiler": "*",+ "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0",+ "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0",+ "sass": "^1.3.0"+ },+ "peerDependenciesMeta": {+ "@opentelemetry/api": {+ "optional": true+ },+ "@playwright/test": {+ "optional": true+ },+ "babel-plugin-react-compiler": {+ "optional": true+ },+ "sass": {+ "optional": true+ }+ }+ },+ "node_modules/next/node_modules/postcss": {+ "version": "8.4.31",+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",+ "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/postcss/"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/postcss"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "nanoid": "^3.3.6",+ "picocolors": "^1.0.0",+ "source-map-js": "^1.0.2"+ },+ "engines": {+ "node": "^10 || ^12 || >=14"+ }+ },+ "node_modules/node-domexception": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",+ "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",+ "deprecated": "Use your platform's native DOMException instead",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/jimmywarting"+ },+ {+ "type": "github",+ "url": "https://paypal.me/jimmywarting"+ }+ ],+ "license": "MIT",+ "engines": {+ "node": ">=10.5.0"+ }+ },+ "node_modules/node-exports-info": {+ "version": "1.6.0",+ "resolved": "https://registry.npmjs.org/node-exports-info/-/node-exports-info-1.6.0.tgz",+ "integrity": "sha512-pyFS63ptit/P5WqUkt+UUfe+4oevH+bFeIiPPdfb0pFeYEu/1ELnJu5l+5EcTKYL5M7zaAa7S8ddywgXypqKCw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "array.prototype.flatmap": "^1.3.3",+ "es-errors": "^1.3.0",+ "object.entries": "^1.1.9",+ "semver": "^6.3.1"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/node-fetch": {+ "version": "3.3.2",+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",+ "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",+ "license": "MIT",+ "dependencies": {+ "data-uri-to-buffer": "^4.0.0",+ "fetch-blob": "^3.1.4",+ "formdata-polyfill": "^4.0.10"+ },+ "engines": {+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/node-fetch"+ }+ },+ "node_modules/node-readable-to-web-readable-stream": {+ "version": "0.4.2",+ "resolved": "https://registry.npmjs.org/node-readable-to-web-readable-stream/-/node-readable-to-web-readable-stream-0.4.2.tgz",+ "integrity": "sha512-/cMZNI34v//jUTrI+UIo4ieHAB5EZRY/+7OmXZgBxaWBMcW2tGdceIw06RFxWxrKZ5Jp3sI2i5TsRo+CBhtVLQ==",+ "license": "MIT",+ "optional": true+ },+ "node_modules/node-releases": {+ "version": "2.0.36",+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.36.tgz",+ "integrity": "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==",+ "license": "MIT"+ },+ "node_modules/npm-normalize-package-bin": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-5.0.0.tgz",+ "integrity": "sha512-CJi3OS4JLsNMmr2u07OJlhcrPxCeOeP/4xq67aWNai6TNWWbTrlNDgl8NcFKVlcBKp18GPj+EzbNIgrBfZhsag==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": "^20.17.0 || >=22.9.0"+ }+ },+ "node_modules/npm-run-path": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-6.0.0.tgz",+ "integrity": "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==",+ "license": "MIT",+ "dependencies": {+ "path-key": "^4.0.0",+ "unicorn-magic": "^0.3.0"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/npm-run-path/node_modules/path-key": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",+ "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/object-assign": {+ "version": "4.1.1",+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "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/object-keys": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/object-treeify": {+ "version": "1.1.33",+ "resolved": "https://registry.npmjs.org/object-treeify/-/object-treeify-1.1.33.tgz",+ "integrity": "sha512-EFVjAYfzWqWsBMRHPMAXLCDIJnpMhdWAqR7xG6M6a2cs6PMFpl/+Z20w9zDW4vkxOFfddegBKq9Rehd0bxWE7A==",+ "license": "MIT",+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/object.assign": {+ "version": "4.1.7",+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz",+ "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.8",+ "call-bound": "^1.0.3",+ "define-properties": "^1.2.1",+ "es-object-atoms": "^1.0.0",+ "has-symbols": "^1.1.0",+ "object-keys": "^1.1.1"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/object.entries": {+ "version": "1.1.9",+ "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz",+ "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.8",+ "call-bound": "^1.0.4",+ "define-properties": "^1.2.1",+ "es-object-atoms": "^1.1.1"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/object.fromentries": {+ "version": "2.0.8",+ "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz",+ "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.7",+ "define-properties": "^1.2.1",+ "es-abstract": "^1.23.2",+ "es-object-atoms": "^1.0.0"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/object.groupby": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz",+ "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.7",+ "define-properties": "^1.2.1",+ "es-abstract": "^1.23.2"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/object.values": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz",+ "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.8",+ "call-bound": "^1.0.3",+ "define-properties": "^1.2.1",+ "es-object-atoms": "^1.0.0"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "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/once": {+ "version": "1.4.0",+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",+ "license": "ISC",+ "dependencies": {+ "wrappy": "1"+ }+ },+ "node_modules/onetime": {+ "version": "7.0.0",+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz",+ "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==",+ "license": "MIT",+ "dependencies": {+ "mimic-function": "^5.0.0"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/open": {+ "version": "11.0.0",+ "resolved": "https://registry.npmjs.org/open/-/open-11.0.0.tgz",+ "integrity": "sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw==",+ "license": "MIT",+ "dependencies": {+ "default-browser": "^5.4.0",+ "define-lazy-prop": "^3.0.0",+ "is-in-ssh": "^1.0.0",+ "is-inside-container": "^1.0.0",+ "powershell-utils": "^0.1.0",+ "wsl-utils": "^0.3.0"+ },+ "engines": {+ "node": ">=20"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/optionator": {+ "version": "0.9.4",+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",+ "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "deep-is": "^0.1.3",+ "fast-levenshtein": "^2.0.6",+ "levn": "^0.4.1",+ "prelude-ls": "^1.2.1",+ "type-check": "^0.4.0",+ "word-wrap": "^1.2.5"+ },+ "engines": {+ "node": ">= 0.8.0"+ }+ },+ "node_modules/ora": {+ "version": "8.2.0",+ "resolved": "https://registry.npmjs.org/ora/-/ora-8.2.0.tgz",+ "integrity": "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==",+ "license": "MIT",+ "dependencies": {+ "chalk": "^5.3.0",+ "cli-cursor": "^5.0.0",+ "cli-spinners": "^2.9.2",+ "is-interactive": "^2.0.0",+ "is-unicode-supported": "^2.0.0",+ "log-symbols": "^6.0.0",+ "stdin-discarder": "^0.2.2",+ "string-width": "^7.2.0",+ "strip-ansi": "^7.1.0"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/ora/node_modules/chalk": {+ "version": "5.6.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz",+ "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==",+ "license": "MIT",+ "engines": {+ "node": "^12.17.0 || ^14.13 || >=16.0.0"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },+ "node_modules/outvariant": {+ "version": "1.4.3",+ "resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.4.3.tgz",+ "integrity": "sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==",+ "license": "MIT"+ },+ "node_modules/own-keys": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz",+ "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "get-intrinsic": "^1.2.6",+ "object-keys": "^1.1.1",+ "safe-push-apply": "^1.0.0"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/p-limit": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "yocto-queue": "^0.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/p-locate": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "p-limit": "^3.0.2"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/pako": {+ "version": "1.0.11",+ "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",+ "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",+ "license": "(MIT AND Zlib)"+ },+ "node_modules/parent-module": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",+ "license": "MIT",+ "dependencies": {+ "callsites": "^3.0.0"+ },+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/parse-json": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",+ "license": "MIT",+ "dependencies": {+ "@babel/code-frame": "^7.0.0",+ "error-ex": "^1.3.1",+ "json-parse-even-better-errors": "^2.3.0",+ "lines-and-columns": "^1.1.6"+ },+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/parse-ms": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-4.0.0.tgz",+ "integrity": "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "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-browserify": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",+ "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==",+ "license": "MIT"+ },+ "node_modules/path-exists": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/path-expression-matcher": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.1.3.tgz",+ "integrity": "sha512-qdVgY8KXmVdJZRSS1JdEPOKPdTiEK/pi0RkcT2sw1RhXxohdujUlJFPuS1TSkevZ9vzd3ZlL7ULl1MHGTApKzQ==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/NaturalIntelligence"+ }+ ],+ "license": "MIT",+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/path-key": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/path-parse": {+ "version": "1.0.7",+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",+ "dev": true,+ "license": "MIT"+ },+ "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==",+ "license": "MIT"+ },+ "node_modules/pdf-lib": {+ "version": "1.17.1",+ "resolved": "https://registry.npmjs.org/pdf-lib/-/pdf-lib-1.17.1.tgz",+ "integrity": "sha512-V/mpyJAoTsN4cnP31vc0wfNA1+p20evqqnap0KLoRUN0Yk/p3wN52DOEsL4oBFcLdb76hlpKPtzJIgo67j/XLw==",+ "license": "MIT",+ "dependencies": {+ "@pdf-lib/standard-fonts": "^1.0.0",+ "@pdf-lib/upng": "^1.0.1",+ "pako": "^1.0.11",+ "tslib": "^1.11.1"+ }+ },+ "node_modules/pdf-lib/node_modules/tslib": {+ "version": "1.14.1",+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",+ "license": "0BSD"+ },+ "node_modules/pdfjs-dist": {+ "version": "5.5.207",+ "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-5.5.207.tgz",+ "integrity": "sha512-WMqqw06w1vUt9ZfT0gOFhMf3wHsWhaCrxGrckGs5Cci6ybDW87IvPaOd2pnBwT6BJuP/CzXDZxjFgmSULLdsdw==",+ "license": "Apache-2.0",+ "engines": {+ "node": ">=20.19.0 || >=22.13.0 || >=24"+ },+ "optionalDependencies": {+ "@napi-rs/canvas": "^0.1.95",+ "node-readable-to-web-readable-stream": "^0.4.2"+ }+ },+ "node_modules/pg": {+ "version": "8.20.0",+ "resolved": "https://registry.npmjs.org/pg/-/pg-8.20.0.tgz",+ "integrity": "sha512-ldhMxz2r8fl/6QkXnBD3CR9/xg694oT6DZQ2s6c/RI28OjtSOpxnPrUCGOBJ46RCUxcWdx3p6kw/xnDHjKvaRA==",+ "license": "MIT",+ "dependencies": {+ "pg-connection-string": "^2.12.0",+ "pg-pool": "^3.13.0",+ "pg-protocol": "^1.13.0",+ "pg-types": "2.2.0",+ "pgpass": "1.0.5"+ },+ "engines": {+ "node": ">= 16.0.0"+ },+ "optionalDependencies": {+ "pg-cloudflare": "^1.3.0"+ },+ "peerDependencies": {+ "pg-native": ">=3.0.1"+ },+ "peerDependenciesMeta": {+ "pg-native": {+ "optional": true+ }+ }+ },+ "node_modules/pg-cloudflare": {+ "version": "1.3.0",+ "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.3.0.tgz",+ "integrity": "sha512-6lswVVSztmHiRtD6I8hw4qP/nDm1EJbKMRhf3HCYaqud7frGysPv7FYJ5noZQdhQtN2xJnimfMtvQq21pdbzyQ==",+ "license": "MIT",+ "optional": true+ },+ "node_modules/pg-connection-string": {+ "version": "2.12.0",+ "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.12.0.tgz",+ "integrity": "sha512-U7qg+bpswf3Cs5xLzRqbXbQl85ng0mfSV/J0nnA31MCLgvEaAo7CIhmeyrmJpOr7o+zm0rXK+hNnT5l9RHkCkQ==",+ "license": "MIT"+ },+ "node_modules/pg-int8": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz",+ "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==",+ "license": "ISC",+ "engines": {+ "node": ">=4.0.0"+ }+ },+ "node_modules/pg-pool": {+ "version": "3.13.0",+ "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.13.0.tgz",+ "integrity": "sha512-gB+R+Xud1gLFuRD/QgOIgGOBE2KCQPaPwkzBBGC9oG69pHTkhQeIuejVIk3/cnDyX39av2AxomQiyPT13WKHQA==",+ "license": "MIT",+ "peerDependencies": {+ "pg": ">=8.0"+ }+ },+ "node_modules/pg-protocol": {+ "version": "1.13.0",+ "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.13.0.tgz",+ "integrity": "sha512-zzdvXfS6v89r6v7OcFCHfHlyG/wvry1ALxZo4LqgUoy7W9xhBDMaqOuMiF3qEV45VqsN6rdlcehHrfDtlCPc8w==",+ "license": "MIT"+ },+ "node_modules/pg-types": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz",+ "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==",+ "license": "MIT",+ "dependencies": {+ "pg-int8": "1.0.1",+ "postgres-array": "~2.0.0",+ "postgres-bytea": "~1.0.0",+ "postgres-date": "~1.0.4",+ "postgres-interval": "^1.1.0"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/pgpass": {+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz",+ "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==",+ "license": "MIT",+ "dependencies": {+ "split2": "^4.1.0"+ }+ },+ "node_modules/picocolors": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",+ "license": "ISC"+ },+ "node_modules/picomatch": {+ "version": "2.3.1",+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",+ "license": "MIT",+ "engines": {+ "node": ">=8.6"+ },+ "funding": {+ "url": "https://github.com/sponsors/jonschlinkert"+ }+ },+ "node_modules/pkce-challenge": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.1.tgz",+ "integrity": "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==",+ "license": "MIT",+ "engines": {+ "node": ">=16.20.0"+ }+ },+ "node_modules/possible-typed-array-names": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz",+ "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/postal-mime": {+ "version": "2.7.3",+ "resolved": "https://registry.npmjs.org/postal-mime/-/postal-mime-2.7.3.tgz",+ "integrity": "sha512-MjhXadAJaWgYzevi46+3kLak8y6gbg0ku14O1gO/LNOuay8dO+1PtcSGvAdgDR0DoIsSaiIA8y/Ddw6MnrO0Tw==",+ "license": "MIT-0"+ },+ "node_modules/postcss": {+ "version": "8.5.8",+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz",+ "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==",+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/postcss/"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/postcss"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "nanoid": "^3.3.11",+ "picocolors": "^1.1.1",+ "source-map-js": "^1.2.1"+ },+ "engines": {+ "node": "^10 || ^12 || >=14"+ }+ },+ "node_modules/postcss-selector-parser": {+ "version": "7.1.1",+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz",+ "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==",+ "license": "MIT",+ "dependencies": {+ "cssesc": "^3.0.0",+ "util-deprecate": "^1.0.2"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/postgres-array": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz",+ "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==",+ "license": "MIT",+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/postgres-bytea": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.1.tgz",+ "integrity": "sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==",+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/postgres-date": {+ "version": "1.0.7",+ "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz",+ "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==",+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/postgres-interval": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz",+ "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==",+ "license": "MIT",+ "dependencies": {+ "xtend": "^4.0.0"+ },+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/powershell-utils": {+ "version": "0.1.0",+ "resolved": "https://registry.npmjs.org/powershell-utils/-/powershell-utils-0.1.0.tgz",+ "integrity": "sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A==",+ "license": "MIT",+ "engines": {+ "node": ">=20"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/prelude-ls": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",+ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.8.0"+ }+ },+ "node_modules/prettier": {+ "version": "3.8.1",+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.1.tgz",+ "integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==",+ "dev": true,+ "license": "MIT",+ "bin": {+ "prettier": "bin/prettier.cjs"+ },+ "engines": {+ "node": ">=14"+ },+ "funding": {+ "url": "https://github.com/prettier/prettier?sponsor=1"+ }+ },+ "node_modules/pretty-ms": {+ "version": "9.3.0",+ "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.3.0.tgz",+ "integrity": "sha512-gjVS5hOP+M3wMm5nmNOucbIrqudzs9v/57bWRHQWLYklXqoXKrVfYW2W9+glfGsqtPgpiz5WwyEEB+ksXIx3gQ==",+ "license": "MIT",+ "dependencies": {+ "parse-ms": "^4.0.0"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/proc-log": {+ "version": "6.1.0",+ "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-6.1.0.tgz",+ "integrity": "sha512-iG+GYldRf2BQ0UDUAd6JQ/RwzaQy6mXmsk/IzlYyal4A4SNFw54MeH4/tLkF4I5WoWG9SQwuqWzS99jaFQHBuQ==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": "^20.17.0 || >=22.9.0"+ }+ },+ "node_modules/prompts": {+ "version": "2.4.2",+ "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz",+ "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==",+ "license": "MIT",+ "dependencies": {+ "kleur": "^3.0.3",+ "sisteransi": "^1.0.5"+ },+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/prompts/node_modules/kleur": {+ "version": "3.0.3",+ "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",+ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==",+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/prop-types": {+ "version": "15.8.1",+ "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",+ "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "loose-envify": "^1.4.0",+ "object-assign": "^4.1.1",+ "react-is": "^16.13.1"+ }+ },+ "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/punycode": {+ "version": "2.3.1",+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/qs": {+ "version": "6.15.0",+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.0.tgz",+ "integrity": "sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ==",+ "license": "BSD-3-Clause",+ "dependencies": {+ "side-channel": "^1.1.0"+ },+ "engines": {+ "node": ">=0.6"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/queue-microtask": {+ "version": "1.2.3",+ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",+ "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/radix-ui": {+ "version": "1.4.3",+ "resolved": "https://registry.npmjs.org/radix-ui/-/radix-ui-1.4.3.tgz",+ "integrity": "sha512-aWizCQiyeAenIdUbqEpXgRA1ya65P13NKn/W8rWkcN0OPkRDxdBVLWnIEDsS2RpwCK2nobI7oMUSmexzTDyAmA==",+ "license": "MIT",+ "dependencies": {+ "@radix-ui/primitive": "1.1.3",+ "@radix-ui/react-accessible-icon": "1.1.7",+ "@radix-ui/react-accordion": "1.2.12",+ "@radix-ui/react-alert-dialog": "1.1.15",+ "@radix-ui/react-arrow": "1.1.7",+ "@radix-ui/react-aspect-ratio": "1.1.7",+ "@radix-ui/react-avatar": "1.1.10",+ "@radix-ui/react-checkbox": "1.3.3",+ "@radix-ui/react-collapsible": "1.1.12",+ "@radix-ui/react-collection": "1.1.7",+ "@radix-ui/react-compose-refs": "1.1.2",+ "@radix-ui/react-context": "1.1.2",+ "@radix-ui/react-context-menu": "2.2.16",+ "@radix-ui/react-dialog": "1.1.15",+ "@radix-ui/react-direction": "1.1.1",+ "@radix-ui/react-dismissable-layer": "1.1.11",+ "@radix-ui/react-dropdown-menu": "2.1.16",+ "@radix-ui/react-focus-guards": "1.1.3",+ "@radix-ui/react-focus-scope": "1.1.7",+ "@radix-ui/react-form": "0.1.8",+ "@radix-ui/react-hover-card": "1.1.15",+ "@radix-ui/react-label": "2.1.7",+ "@radix-ui/react-menu": "2.1.16",+ "@radix-ui/react-menubar": "1.1.16",+ "@radix-ui/react-navigation-menu": "1.2.14",+ "@radix-ui/react-one-time-password-field": "0.1.8",+ "@radix-ui/react-password-toggle-field": "0.1.3",+ "@radix-ui/react-popover": "1.1.15",+ "@radix-ui/react-popper": "1.2.8",+ "@radix-ui/react-portal": "1.1.9",+ "@radix-ui/react-presence": "1.1.5",+ "@radix-ui/react-primitive": "2.1.3",+ "@radix-ui/react-progress": "1.1.7",+ "@radix-ui/react-radio-group": "1.3.8",+ "@radix-ui/react-roving-focus": "1.1.11",+ "@radix-ui/react-scroll-area": "1.2.10",+ "@radix-ui/react-select": "2.2.6",+ "@radix-ui/react-separator": "1.1.7",+ "@radix-ui/react-slider": "1.3.6",+ "@radix-ui/react-slot": "1.2.3",+ "@radix-ui/react-switch": "1.2.6",+ "@radix-ui/react-tabs": "1.1.13",+ "@radix-ui/react-toast": "1.2.15",+ "@radix-ui/react-toggle": "1.1.10",+ "@radix-ui/react-toggle-group": "1.1.11",+ "@radix-ui/react-toolbar": "1.1.11",+ "@radix-ui/react-tooltip": "1.2.8",+ "@radix-ui/react-use-callback-ref": "1.1.1",+ "@radix-ui/react-use-controllable-state": "1.2.2",+ "@radix-ui/react-use-effect-event": "0.0.2",+ "@radix-ui/react-use-escape-keydown": "1.1.1",+ "@radix-ui/react-use-is-hydrated": "0.1.0",+ "@radix-ui/react-use-layout-effect": "1.1.1",+ "@radix-ui/react-use-size": "1.1.1",+ "@radix-ui/react-visually-hidden": "1.2.3"+ },+ "peerDependencies": {+ "@types/react": "*",+ "@types/react-dom": "*",+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "@types/react-dom": {+ "optional": true+ }+ }+ },+ "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": "3.0.2",+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz",+ "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",+ "license": "MIT",+ "dependencies": {+ "bytes": "~3.1.2",+ "http-errors": "~2.0.1",+ "iconv-lite": "~0.7.0",+ "unpipe": "~1.0.0"+ },+ "engines": {+ "node": ">= 0.10"+ }+ },+ "node_modules/react": {+ "version": "19.2.3",+ "resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz",+ "integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==",+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/react-dom": {+ "version": "19.2.3",+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz",+ "integrity": "sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==",+ "license": "MIT",+ "dependencies": {+ "scheduler": "^0.27.0"+ },+ "peerDependencies": {+ "react": "^19.2.3"+ }+ },+ "node_modules/react-is": {+ "version": "16.13.1",+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/react-remove-scroll": {+ "version": "2.7.2",+ "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.7.2.tgz",+ "integrity": "sha512-Iqb9NjCCTt6Hf+vOdNIZGdTiH1QSqr27H/Ek9sv/a97gfueI/5h1s3yRi1nngzMUaOOToin5dI1dXKdXiF+u0Q==",+ "license": "MIT",+ "dependencies": {+ "react-remove-scroll-bar": "^2.3.7",+ "react-style-singleton": "^2.2.3",+ "tslib": "^2.1.0",+ "use-callback-ref": "^1.3.3",+ "use-sidecar": "^1.1.3"+ },+ "engines": {+ "node": ">=10"+ },+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/react-remove-scroll-bar": {+ "version": "2.3.8",+ "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.8.tgz",+ "integrity": "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==",+ "license": "MIT",+ "dependencies": {+ "react-style-singleton": "^2.2.2",+ "tslib": "^2.0.0"+ },+ "engines": {+ "node": ">=10"+ },+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/react-style-singleton": {+ "version": "2.2.3",+ "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.3.tgz",+ "integrity": "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==",+ "license": "MIT",+ "dependencies": {+ "get-nonce": "^1.0.0",+ "tslib": "^2.0.0"+ },+ "engines": {+ "node": ">=10"+ },+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/read-cmd-shim": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-6.0.0.tgz",+ "integrity": "sha512-1zM5HuOfagXCBWMN83fuFI/x+T/UhZ7k+KIzhrHXcQoeX5+7gmaDYjELQHmmzIodumBHeByBJT4QYS7ufAgs7A==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": "^20.17.0 || >=22.9.0"+ }+ },+ "node_modules/recast": {+ "version": "0.23.11",+ "resolved": "https://registry.npmjs.org/recast/-/recast-0.23.11.tgz",+ "integrity": "sha512-YTUo+Flmw4ZXiWfQKGcwwc11KnoRAYgzAE2E7mXKCjSviTKShtxBsN6YUUBB2gtaBzKzeKunxhUwNHQuRryhWA==",+ "license": "MIT",+ "dependencies": {+ "ast-types": "^0.16.1",+ "esprima": "~4.0.0",+ "source-map": "~0.6.1",+ "tiny-invariant": "^1.3.3",+ "tslib": "^2.0.1"+ },+ "engines": {+ "node": ">= 4"+ }+ },+ "node_modules/reflect.getprototypeof": {+ "version": "1.0.10",+ "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz",+ "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.8",+ "define-properties": "^1.2.1",+ "es-abstract": "^1.23.9",+ "es-errors": "^1.3.0",+ "es-object-atoms": "^1.0.0",+ "get-intrinsic": "^1.2.7",+ "get-proto": "^1.0.1",+ "which-builtin-type": "^1.2.1"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/regexp.prototype.flags": {+ "version": "1.5.4",+ "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz",+ "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.8",+ "define-properties": "^1.2.1",+ "es-errors": "^1.3.0",+ "get-proto": "^1.0.1",+ "gopd": "^1.2.0",+ "set-function-name": "^2.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/require-directory": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/require-from-string": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/resend": {+ "version": "6.9.4",+ "resolved": "https://registry.npmjs.org/resend/-/resend-6.9.4.tgz",+ "integrity": "sha512-/M3dsJzu5OgozqVsA4Psd/1L7EdePgOIIxClas453GOQYFG3VHc2ZyCHZFlvqsc9aZCCd2BJRRqZgWC8D9c7/g==",+ "license": "MIT",+ "dependencies": {+ "postal-mime": "2.7.3",+ "svix": "1.86.0"+ },+ "engines": {+ "node": ">=20"+ },+ "peerDependencies": {+ "@react-email/render": "*"+ },+ "peerDependenciesMeta": {+ "@react-email/render": {+ "optional": true+ }+ }+ },+ "node_modules/resolve": {+ "version": "1.22.11",+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz",+ "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "is-core-module": "^2.16.1",+ "path-parse": "^1.0.7",+ "supports-preserve-symlinks-flag": "^1.0.0"+ },+ "bin": {+ "resolve": "bin/resolve"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/resolve-from": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",+ "license": "MIT",+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/resolve-pkg-maps": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",+ "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",+ "dev": true,+ "license": "MIT",+ "funding": {+ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"+ }+ },+ "node_modules/restore-cursor": {+ "version": "5.1.0",+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz",+ "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==",+ "license": "MIT",+ "dependencies": {+ "onetime": "^7.0.0",+ "signal-exit": "^4.1.0"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/rettime": {+ "version": "0.10.1",+ "resolved": "https://registry.npmjs.org/rettime/-/rettime-0.10.1.tgz",+ "integrity": "sha512-uyDrIlUEH37cinabq0AX4QbgV4HbFZ/gqoiunWQ1UqBtRvTTytwhNYjE++pO/MjPTZL5KQCf2bEoJ/BJNVQ5Kw==",+ "license": "MIT"+ },+ "node_modules/reusify": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",+ "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",+ "license": "MIT",+ "engines": {+ "iojs": ">=1.0.0",+ "node": ">=0.10.0"+ }+ },+ "node_modules/rou3": {+ "version": "0.7.12",+ "resolved": "https://registry.npmjs.org/rou3/-/rou3-0.7.12.tgz",+ "integrity": "sha512-iFE4hLDuloSWcD7mjdCDhx2bKcIsYbtOTpfH5MHHLSKMOUyjqQXTeZVa289uuwEGEKFoE/BAPbhaU4B774nceg==",+ "license": "MIT"+ },+ "node_modules/router": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz",+ "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",+ "license": "MIT",+ "dependencies": {+ "debug": "^4.4.0",+ "depd": "^2.0.0",+ "is-promise": "^4.0.0",+ "parseurl": "^1.3.3",+ "path-to-regexp": "^8.0.0"+ },+ "engines": {+ "node": ">= 18"+ }+ },+ "node_modules/router/node_modules/path-to-regexp": {+ "version": "8.3.0",+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz",+ "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==",+ "license": "MIT",+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "node_modules/run-applescript": {+ "version": "7.1.0",+ "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz",+ "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/run-parallel": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",+ "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",+ "dependencies": {+ "queue-microtask": "^1.2.2"+ }+ },+ "node_modules/safe-array-concat": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz",+ "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.8",+ "call-bound": "^1.0.2",+ "get-intrinsic": "^1.2.6",+ "has-symbols": "^1.1.0",+ "isarray": "^2.0.5"+ },+ "engines": {+ "node": ">=0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/safe-push-apply": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz",+ "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "es-errors": "^1.3.0",+ "isarray": "^2.0.5"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/safe-regex-test": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz",+ "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.2",+ "es-errors": "^1.3.0",+ "is-regex": "^1.2.1"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "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/scheduler": {+ "version": "0.27.0",+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz",+ "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==",+ "license": "MIT"+ },+ "node_modules/semver": {+ "version": "6.3.1",+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ }+ },+ "node_modules/send": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz",+ "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==",+ "license": "MIT",+ "dependencies": {+ "debug": "^4.4.3",+ "encodeurl": "^2.0.0",+ "escape-html": "^1.0.3",+ "etag": "^1.8.1",+ "fresh": "^2.0.0",+ "http-errors": "^2.0.1",+ "mime-types": "^3.0.2",+ "ms": "^2.1.3",+ "on-finished": "^2.4.1",+ "range-parser": "^1.2.1",+ "statuses": "^2.0.2"+ },+ "engines": {+ "node": ">= 18"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "node_modules/serve-static": {+ "version": "2.2.1",+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz",+ "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==",+ "license": "MIT",+ "dependencies": {+ "encodeurl": "^2.0.0",+ "escape-html": "^1.0.3",+ "parseurl": "^1.3.3",+ "send": "^1.2.0"+ },+ "engines": {+ "node": ">= 18"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "node_modules/set-cookie-parser": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-3.0.1.tgz",+ "integrity": "sha512-n7Z7dXZhJbwuAHhNzkTti6Aw9QDDjZtm3JTpTGATIdNzdQz5GuFs22w90BcvF4INfnrL5xrX3oGsuqO5Dx3A1Q==",+ "license": "MIT"+ },+ "node_modules/set-function-length": {+ "version": "1.2.2",+ "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",+ "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "define-data-property": "^1.1.4",+ "es-errors": "^1.3.0",+ "function-bind": "^1.1.2",+ "get-intrinsic": "^1.2.4",+ "gopd": "^1.0.1",+ "has-property-descriptors": "^1.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/set-function-name": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz",+ "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "define-data-property": "^1.1.4",+ "es-errors": "^1.3.0",+ "functions-have-names": "^1.2.3",+ "has-property-descriptors": "^1.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/set-proto": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz",+ "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "dunder-proto": "^1.0.1",+ "es-errors": "^1.3.0",+ "es-object-atoms": "^1.0.0"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "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/shadcn": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/shadcn/-/shadcn-4.1.0.tgz",+ "integrity": "sha512-3zETJ+0Ezj69FS6RL0HOkLKKAR5yXisXx1iISJdfLQfrUqj/VIQlanQi1Ukk+9OE+XHZVj4FQNTBSfbr2CyCYg==",+ "license": "MIT",+ "dependencies": {+ "@babel/core": "^7.28.0",+ "@babel/parser": "^7.28.0",+ "@babel/plugin-transform-typescript": "^7.28.0",+ "@babel/preset-typescript": "^7.27.1",+ "@dotenvx/dotenvx": "^1.48.4",+ "@modelcontextprotocol/sdk": "^1.26.0",+ "@types/validate-npm-package-name": "^4.0.2",+ "browserslist": "^4.26.2",+ "commander": "^14.0.0",+ "cosmiconfig": "^9.0.0",+ "dedent": "^1.6.0",+ "deepmerge": "^4.3.1",+ "diff": "^8.0.2",+ "execa": "^9.6.0",+ "fast-glob": "^3.3.3",+ "fs-extra": "^11.3.1",+ "fuzzysort": "^3.1.0",+ "https-proxy-agent": "^7.0.6",+ "kleur": "^4.1.5",+ "msw": "^2.10.4",+ "node-fetch": "^3.3.2",+ "open": "^11.0.0",+ "ora": "^8.2.0",+ "postcss": "^8.5.6",+ "postcss-selector-parser": "^7.1.0",+ "prompts": "^2.4.2",+ "recast": "^0.23.11",+ "stringify-object": "^5.0.0",+ "tailwind-merge": "^3.0.1",+ "ts-morph": "^26.0.0",+ "tsconfig-paths": "^4.2.0",+ "validate-npm-package-name": "^7.0.1",+ "zod": "^3.24.1",+ "zod-to-json-schema": "^3.24.6"+ },+ "bin": {+ "shadcn": "dist/index.js"+ }+ },+ "node_modules/shadcn/node_modules/fast-glob": {+ "version": "3.3.3",+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",+ "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",+ "license": "MIT",+ "dependencies": {+ "@nodelib/fs.stat": "^2.0.2",+ "@nodelib/fs.walk": "^1.2.3",+ "glob-parent": "^5.1.2",+ "merge2": "^1.3.0",+ "micromatch": "^4.0.8"+ },+ "engines": {+ "node": ">=8.6.0"+ }+ },+ "node_modules/shadcn/node_modules/glob-parent": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",+ "license": "ISC",+ "dependencies": {+ "is-glob": "^4.0.1"+ },+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/shadcn/node_modules/tsconfig-paths": {+ "version": "4.2.0",+ "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz",+ "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==",+ "license": "MIT",+ "dependencies": {+ "json5": "^2.2.2",+ "minimist": "^1.2.6",+ "strip-bom": "^3.0.0"+ },+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/shadcn/node_modules/zod": {+ "version": "3.25.76",+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",+ "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",+ "license": "MIT",+ "funding": {+ "url": "https://github.com/sponsors/colinhacks"+ }+ },+ "node_modules/sharp": {+ "version": "0.34.5",+ "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.5.tgz",+ "integrity": "sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==",+ "hasInstallScript": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@img/colour": "^1.0.0",+ "detect-libc": "^2.1.2",+ "semver": "^7.7.3"+ },+ "engines": {+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-darwin-arm64": "0.34.5",+ "@img/sharp-darwin-x64": "0.34.5",+ "@img/sharp-libvips-darwin-arm64": "1.2.4",+ "@img/sharp-libvips-darwin-x64": "1.2.4",+ "@img/sharp-libvips-linux-arm": "1.2.4",+ "@img/sharp-libvips-linux-arm64": "1.2.4",+ "@img/sharp-libvips-linux-ppc64": "1.2.4",+ "@img/sharp-libvips-linux-riscv64": "1.2.4",+ "@img/sharp-libvips-linux-s390x": "1.2.4",+ "@img/sharp-libvips-linux-x64": "1.2.4",+ "@img/sharp-libvips-linuxmusl-arm64": "1.2.4",+ "@img/sharp-libvips-linuxmusl-x64": "1.2.4",+ "@img/sharp-linux-arm": "0.34.5",+ "@img/sharp-linux-arm64": "0.34.5",+ "@img/sharp-linux-ppc64": "0.34.5",+ "@img/sharp-linux-riscv64": "0.34.5",+ "@img/sharp-linux-s390x": "0.34.5",+ "@img/sharp-linux-x64": "0.34.5",+ "@img/sharp-linuxmusl-arm64": "0.34.5",+ "@img/sharp-linuxmusl-x64": "0.34.5",+ "@img/sharp-wasm32": "0.34.5",+ "@img/sharp-win32-arm64": "0.34.5",+ "@img/sharp-win32-ia32": "0.34.5",+ "@img/sharp-win32-x64": "0.34.5"+ }+ },+ "node_modules/sharp/node_modules/semver": {+ "version": "7.7.4",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",+ "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",+ "license": "ISC",+ "optional": true,+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/shebang-command": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",+ "license": "MIT",+ "dependencies": {+ "shebang-regex": "^3.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/shebang-regex": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "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/signal-exit": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",+ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",+ "license": "ISC",+ "engines": {+ "node": ">=14"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/sisteransi": {+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",+ "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==",+ "license": "MIT"+ },+ "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==",+ "license": "BSD-3-Clause",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/source-map-js": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",+ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",+ "license": "BSD-3-Clause",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/sparse-bitfield": {+ "version": "3.0.3",+ "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",+ "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==",+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "memory-pager": "^1.0.2"+ }+ },+ "node_modules/split2": {+ "version": "4.2.0",+ "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz",+ "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==",+ "license": "ISC",+ "engines": {+ "node": ">= 10.x"+ }+ },+ "node_modules/stable-hash": {+ "version": "0.0.5",+ "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz",+ "integrity": "sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/standardwebhooks": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/standardwebhooks/-/standardwebhooks-1.0.0.tgz",+ "integrity": "sha512-BbHGOQK9olHPMvQNHWul6MYlrRTAOKn03rOe4A8O3CLWhNf4YHBqq2HJKKC+sfqpxiBY52pNeesD6jIiLDz8jg==",+ "license": "MIT",+ "dependencies": {+ "@stablelib/base64": "^1.0.0",+ "fast-sha256": "^1.3.0"+ }+ },+ "node_modules/statuses": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",+ "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",+ "license": "MIT",+ "engines": {+ "node": ">= 0.8"+ }+ },+ "node_modules/stdin-discarder": {+ "version": "0.2.2",+ "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz",+ "integrity": "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/stop-iteration-iterator": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz",+ "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "es-errors": "^1.3.0",+ "internal-slot": "^1.1.0"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/strict-event-emitter": {+ "version": "0.5.1",+ "resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz",+ "integrity": "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==",+ "license": "MIT"+ },+ "node_modules/string-width": {+ "version": "7.2.0",+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",+ "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",+ "license": "MIT",+ "dependencies": {+ "emoji-regex": "^10.3.0",+ "get-east-asian-width": "^1.0.0",+ "strip-ansi": "^7.1.0"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/string-width/node_modules/emoji-regex": {+ "version": "10.6.0",+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz",+ "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==",+ "license": "MIT"+ },+ "node_modules/string.prototype.includes": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz",+ "integrity": "sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.7",+ "define-properties": "^1.2.1",+ "es-abstract": "^1.23.3"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/string.prototype.matchall": {+ "version": "4.0.12",+ "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz",+ "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.8",+ "call-bound": "^1.0.3",+ "define-properties": "^1.2.1",+ "es-abstract": "^1.23.6",+ "es-errors": "^1.3.0",+ "es-object-atoms": "^1.0.0",+ "get-intrinsic": "^1.2.6",+ "gopd": "^1.2.0",+ "has-symbols": "^1.1.0",+ "internal-slot": "^1.1.0",+ "regexp.prototype.flags": "^1.5.3",+ "set-function-name": "^2.0.2",+ "side-channel": "^1.1.0"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/string.prototype.repeat": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz",+ "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "define-properties": "^1.1.3",+ "es-abstract": "^1.17.5"+ }+ },+ "node_modules/string.prototype.trim": {+ "version": "1.2.10",+ "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz",+ "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.8",+ "call-bound": "^1.0.2",+ "define-data-property": "^1.1.4",+ "define-properties": "^1.2.1",+ "es-abstract": "^1.23.5",+ "es-object-atoms": "^1.0.0",+ "has-property-descriptors": "^1.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/string.prototype.trimend": {+ "version": "1.0.9",+ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz",+ "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.8",+ "call-bound": "^1.0.2",+ "define-properties": "^1.2.1",+ "es-object-atoms": "^1.0.0"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/string.prototype.trimstart": {+ "version": "1.0.8",+ "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz",+ "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.7",+ "define-properties": "^1.2.1",+ "es-object-atoms": "^1.0.0"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/stringify-object": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-5.0.0.tgz",+ "integrity": "sha512-zaJYxz2FtcMb4f+g60KsRNFOpVMUyuJgA51Zi5Z1DOTC3S59+OQiVOzE9GZt0x72uBGWKsQIuBKeF9iusmKFsg==",+ "license": "BSD-2-Clause",+ "dependencies": {+ "get-own-enumerable-keys": "^1.0.0",+ "is-obj": "^3.0.0",+ "is-regexp": "^3.1.0"+ },+ "engines": {+ "node": ">=14.16"+ },+ "funding": {+ "url": "https://github.com/yeoman/stringify-object?sponsor=1"+ }+ },+ "node_modules/strip-ansi": {+ "version": "7.2.0",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz",+ "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==",+ "license": "MIT",+ "dependencies": {+ "ansi-regex": "^6.2.2"+ },+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"+ }+ },+ "node_modules/strip-bom": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",+ "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",+ "license": "MIT",+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/strip-final-newline": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz",+ "integrity": "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/strip-json-comments": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",+ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/strnum": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.0.tgz",+ "integrity": "sha512-Y7Bj8XyJxnPAORMZj/xltsfo55uOiyHcU2tnAVzHUnSJR/KsEX+9RoDeXEnsXtl/CX4fAcrt64gZ13aGaWPeBg==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/NaturalIntelligence"+ }+ ],+ "license": "MIT"+ },+ "node_modules/styled-jsx": {+ "version": "5.1.6",+ "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.6.tgz",+ "integrity": "sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==",+ "license": "MIT",+ "dependencies": {+ "client-only": "0.0.1"+ },+ "engines": {+ "node": ">= 12.0.0"+ },+ "peerDependencies": {+ "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0"+ },+ "peerDependenciesMeta": {+ "@babel/core": {+ "optional": true+ },+ "babel-plugin-macros": {+ "optional": true+ }+ }+ },+ "node_modules/supabase": {+ "version": "2.84.1",+ "resolved": "https://registry.npmjs.org/supabase/-/supabase-2.84.1.tgz",+ "integrity": "sha512-tp+6z1qyRZwYuCwxj1DchWvBkQB/9l6Dy6WaNnW4kmVSjpZhohlwT8JhnyrMvsfi/XCOvnot6ips33f+qE08rA==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "dependencies": {+ "bin-links": "^6.0.0",+ "https-proxy-agent": "^8.0.0",+ "node-fetch": "^3.3.2",+ "tar": "7.5.13"+ },+ "bin": {+ "supabase": "bin/supabase"+ },+ "engines": {+ "npm": ">=8"+ }+ },+ "node_modules/supabase/node_modules/agent-base": {+ "version": "8.0.0",+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-8.0.0.tgz",+ "integrity": "sha512-QT8i0hCz6C/KQ+KTAbSNwCHDGdmUJl2tp2ZpNlGSWCfhUNVbYG2WLE3MdZGBAgXPV4GAvjGMxo+C1hroyxmZEg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 14"+ }+ },+ "node_modules/supabase/node_modules/https-proxy-agent": {+ "version": "8.0.0",+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-8.0.0.tgz",+ "integrity": "sha512-YYeW+iCnAS3xhvj2dvVoWgsbca3RfQy/IlaNHHOtDmU0jMqPI9euIq3Y9BJETdxk16h9NHHCKqp/KB9nIMStCQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "agent-base": "8.0.0",+ "debug": "^4.3.4"+ },+ "engines": {+ "node": ">= 14"+ }+ },+ "node_modules/supports-color": {+ "version": "7.2.0",+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "has-flag": "^4.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/supports-preserve-symlinks-flag": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/svix": {+ "version": "1.86.0",+ "resolved": "https://registry.npmjs.org/svix/-/svix-1.86.0.tgz",+ "integrity": "sha512-/HTvXwjLJe1l/MsLXAO1ddCYxElJk4eNR4DzOjDOEmGrPN/3BtBE8perGwMAaJ2sT5T172VkBYzmHcjUfM1JRQ==",+ "license": "MIT",+ "dependencies": {+ "standardwebhooks": "1.0.0",+ "uuid": "^10.0.0"+ }+ },+ "node_modules/tagged-tag": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/tagged-tag/-/tagged-tag-1.0.0.tgz",+ "integrity": "sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==",+ "license": "MIT",+ "engines": {+ "node": ">=20"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/tailwind-merge": {+ "version": "3.5.0",+ "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.5.0.tgz",+ "integrity": "sha512-I8K9wewnVDkL1NTGoqWmVEIlUcB9gFriAEkXkfCjX5ib8ezGxtR3xD7iZIxrfArjEsH7F1CHD4RFUtxefdqV/A==",+ "license": "MIT",+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/dcastil"+ }+ },+ "node_modules/tailwindcss": {+ "version": "4.2.2",+ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.2.2.tgz",+ "integrity": "sha512-KWBIxs1Xb6NoLdMVqhbhgwZf2PGBpPEiwOqgI4pFIYbNTfBXiKYyWoTsXgBQ9WFg/OlhnvHaY+AEpW7wSmFo2Q==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/tapable": {+ "version": "2.3.0",+ "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz",+ "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/webpack"+ }+ },+ "node_modules/tar": {+ "version": "7.5.13",+ "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.13.tgz",+ "integrity": "sha512-tOG/7GyXpFevhXVh8jOPJrmtRpOTsYqUIkVdVooZYJS/z8WhfQUX8RJILmeuJNinGAMSu1veBr4asSHFt5/hng==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "dependencies": {+ "@isaacs/fs-minipass": "^4.0.0",+ "chownr": "^3.0.0",+ "minipass": "^7.1.2",+ "minizlib": "^3.1.0",+ "yallist": "^5.0.0"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/tar/node_modules/chownr": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz",+ "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/tar/node_modules/yallist": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz",+ "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/tiny-invariant": {+ "version": "1.3.3",+ "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz",+ "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==",+ "license": "MIT"+ },+ "node_modules/tinyglobby": {+ "version": "0.2.15",+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",+ "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "fdir": "^6.5.0",+ "picomatch": "^4.0.3"+ },+ "engines": {+ "node": ">=12.0.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/SuperchupuDev"+ }+ },+ "node_modules/tinyglobby/node_modules/fdir": {+ "version": "6.5.0",+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12.0.0"+ },+ "peerDependencies": {+ "picomatch": "^3 || ^4"+ },+ "peerDependenciesMeta": {+ "picomatch": {+ "optional": true+ }+ }+ },+ "node_modules/tinyglobby/node_modules/picomatch": {+ "version": "4.0.3",+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",+ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/jonschlinkert"+ }+ },+ "node_modules/tldts": {+ "version": "7.0.27",+ "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.0.27.tgz",+ "integrity": "sha512-I4FZcVFcqCRuT0ph6dCDpPuO4Xgzvh+spkcTr1gK7peIvxWauoloVO0vuy1FQnijT63ss6AsHB6+OIM4aXHbPg==",+ "license": "MIT",+ "dependencies": {+ "tldts-core": "^7.0.27"+ },+ "bin": {+ "tldts": "bin/cli.js"+ }+ },+ "node_modules/tldts-core": {+ "version": "7.0.27",+ "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.0.27.tgz",+ "integrity": "sha512-YQ7uPjgWUibIK6DW5lrKujGwUKhLevU4hcGbP5O6TcIUb+oTjJYJVWPS4nZsIHrEEEG6myk/oqAJUEQmpZrHsg==",+ "license": "MIT"+ },+ "node_modules/to-regex-range": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",+ "license": "MIT",+ "dependencies": {+ "is-number": "^7.0.0"+ },+ "engines": {+ "node": ">=8.0"+ }+ },+ "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/tough-cookie": {+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.1.tgz",+ "integrity": "sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==",+ "license": "BSD-3-Clause",+ "dependencies": {+ "tldts": "^7.0.5"+ },+ "engines": {+ "node": ">=16"+ }+ },+ "node_modules/ts-api-utils": {+ "version": "2.4.0",+ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz",+ "integrity": "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18.12"+ },+ "peerDependencies": {+ "typescript": ">=4.8.4"+ }+ },+ "node_modules/ts-morph": {+ "version": "26.0.0",+ "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-26.0.0.tgz",+ "integrity": "sha512-ztMO++owQnz8c/gIENcM9XfCEzgoGphTv+nKpYNM1bgsdOVC/jRZuEBf6N+mLLDNg68Kl+GgUZfOySaRiG1/Ug==",+ "license": "MIT",+ "dependencies": {+ "@ts-morph/common": "~0.27.0",+ "code-block-writer": "^13.0.3"+ }+ },+ "node_modules/tsconfig-paths": {+ "version": "3.15.0",+ "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",+ "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/json5": "^0.0.29",+ "json5": "^1.0.2",+ "minimist": "^1.2.6",+ "strip-bom": "^3.0.0"+ }+ },+ "node_modules/tsconfig-paths/node_modules/json5": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",+ "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "minimist": "^1.2.0"+ },+ "bin": {+ "json5": "lib/cli.js"+ }+ },+ "node_modules/tslib": {+ "version": "2.8.1",+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",+ "license": "0BSD"+ },+ "node_modules/tw-animate-css": {+ "version": "1.4.0",+ "resolved": "https://registry.npmjs.org/tw-animate-css/-/tw-animate-css-1.4.0.tgz",+ "integrity": "sha512-7bziOlRqH0hJx80h/3mbicLW7o8qLsH5+RaLR2t+OHM3D0JlWGODQKQ4cxbK7WlvmUxpcj6Kgu6EKqjrGFe3QQ==",+ "license": "MIT",+ "funding": {+ "url": "https://github.com/sponsors/Wombosvideo"+ }+ },+ "node_modules/type-check": {+ "version": "0.4.0",+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",+ "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "prelude-ls": "^1.2.1"+ },+ "engines": {+ "node": ">= 0.8.0"+ }+ },+ "node_modules/type-fest": {+ "version": "5.5.0",+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-5.5.0.tgz",+ "integrity": "sha512-PlBfpQwiUvGViBNX84Yxwjsdhd1TUlXr6zjX7eoirtCPIr08NAmxwa+fcYBTeRQxHo9YC9wwF3m9i700sHma8g==",+ "license": "(MIT OR CC0-1.0)",+ "dependencies": {+ "tagged-tag": "^1.0.0"+ },+ "engines": {+ "node": ">=20"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/type-is": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",+ "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",+ "license": "MIT",+ "dependencies": {+ "content-type": "^1.0.5",+ "media-typer": "^1.1.0",+ "mime-types": "^3.0.0"+ },+ "engines": {+ "node": ">= 0.6"+ }+ },+ "node_modules/typed-array-buffer": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz",+ "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.3",+ "es-errors": "^1.3.0",+ "is-typed-array": "^1.1.14"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/typed-array-byte-length": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz",+ "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.8",+ "for-each": "^0.3.3",+ "gopd": "^1.2.0",+ "has-proto": "^1.2.0",+ "is-typed-array": "^1.1.14"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/typed-array-byte-offset": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz",+ "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "available-typed-arrays": "^1.0.7",+ "call-bind": "^1.0.8",+ "for-each": "^0.3.3",+ "gopd": "^1.2.0",+ "has-proto": "^1.2.0",+ "is-typed-array": "^1.1.15",+ "reflect.getprototypeof": "^1.0.9"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/typed-array-length": {+ "version": "1.0.7",+ "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz",+ "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind": "^1.0.7",+ "for-each": "^0.3.3",+ "gopd": "^1.0.1",+ "is-typed-array": "^1.1.13",+ "possible-typed-array-names": "^1.0.0",+ "reflect.getprototypeof": "^1.0.6"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/typescript": {+ "version": "5.9.3",+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",+ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",+ "devOptional": true,+ "license": "Apache-2.0",+ "bin": {+ "tsc": "bin/tsc",+ "tsserver": "bin/tsserver"+ },+ "engines": {+ "node": ">=14.17"+ }+ },+ "node_modules/typescript-eslint": {+ "version": "8.57.1",+ "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.57.1.tgz",+ "integrity": "sha512-fLvZWf+cAGw3tqMCYzGIU6yR8K+Y9NT2z23RwOjlNFF2HwSB3KhdEFI5lSBv8tNmFkkBShSjsCjzx1vahZfISA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@typescript-eslint/eslint-plugin": "8.57.1",+ "@typescript-eslint/parser": "8.57.1",+ "@typescript-eslint/typescript-estree": "8.57.1",+ "@typescript-eslint/utils": "8.57.1"+ },+ "engines": {+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/typescript-eslint"+ },+ "peerDependencies": {+ "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",+ "typescript": ">=4.8.4 <6.0.0"+ }+ },+ "node_modules/unbox-primitive": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz",+ "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.3",+ "has-bigints": "^1.0.2",+ "has-symbols": "^1.1.0",+ "which-boxed-primitive": "^1.1.1"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/undici-types": {+ "version": "6.21.0",+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",+ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",+ "devOptional": true,+ "license": "MIT"+ },+ "node_modules/unicorn-magic": {+ "version": "0.3.0",+ "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz",+ "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/universalify": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",+ "license": "MIT",+ "engines": {+ "node": ">= 10.0.0"+ }+ },+ "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/unrs-resolver": {+ "version": "1.11.1",+ "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.11.1.tgz",+ "integrity": "sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "dependencies": {+ "napi-postinstall": "^0.3.0"+ },+ "funding": {+ "url": "https://opencollective.com/unrs-resolver"+ },+ "optionalDependencies": {+ "@unrs/resolver-binding-android-arm-eabi": "1.11.1",+ "@unrs/resolver-binding-android-arm64": "1.11.1",+ "@unrs/resolver-binding-darwin-arm64": "1.11.1",+ "@unrs/resolver-binding-darwin-x64": "1.11.1",+ "@unrs/resolver-binding-freebsd-x64": "1.11.1",+ "@unrs/resolver-binding-linux-arm-gnueabihf": "1.11.1",+ "@unrs/resolver-binding-linux-arm-musleabihf": "1.11.1",+ "@unrs/resolver-binding-linux-arm64-gnu": "1.11.1",+ "@unrs/resolver-binding-linux-arm64-musl": "1.11.1",+ "@unrs/resolver-binding-linux-ppc64-gnu": "1.11.1",+ "@unrs/resolver-binding-linux-riscv64-gnu": "1.11.1",+ "@unrs/resolver-binding-linux-riscv64-musl": "1.11.1",+ "@unrs/resolver-binding-linux-s390x-gnu": "1.11.1",+ "@unrs/resolver-binding-linux-x64-gnu": "1.11.1",+ "@unrs/resolver-binding-linux-x64-musl": "1.11.1",+ "@unrs/resolver-binding-wasm32-wasi": "1.11.1",+ "@unrs/resolver-binding-win32-arm64-msvc": "1.11.1",+ "@unrs/resolver-binding-win32-ia32-msvc": "1.11.1",+ "@unrs/resolver-binding-win32-x64-msvc": "1.11.1"+ }+ },+ "node_modules/until-async": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/until-async/-/until-async-3.0.2.tgz",+ "integrity": "sha512-IiSk4HlzAMqTUseHHe3VhIGyuFmN90zMTpD3Z3y8jeQbzLIq500MVM7Jq2vUAnTKAFPJrqwkzr6PoTcPhGcOiw==",+ "license": "MIT",+ "funding": {+ "url": "https://github.com/sponsors/kettanaito"+ }+ },+ "node_modules/update-browserslist-db": {+ "version": "1.2.3",+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz",+ "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==",+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/browserslist"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/browserslist"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "escalade": "^3.2.0",+ "picocolors": "^1.1.1"+ },+ "bin": {+ "update-browserslist-db": "cli.js"+ },+ "peerDependencies": {+ "browserslist": ">= 4.21.0"+ }+ },+ "node_modules/uri-js": {+ "version": "4.4.1",+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",+ "dev": true,+ "license": "BSD-2-Clause",+ "dependencies": {+ "punycode": "^2.1.0"+ }+ },+ "node_modules/use-callback-ref": {+ "version": "1.3.3",+ "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.3.tgz",+ "integrity": "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==",+ "license": "MIT",+ "dependencies": {+ "tslib": "^2.0.0"+ },+ "engines": {+ "node": ">=10"+ },+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/use-sidecar": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.3.tgz",+ "integrity": "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==",+ "license": "MIT",+ "dependencies": {+ "detect-node-es": "^1.1.0",+ "tslib": "^2.0.0"+ },+ "engines": {+ "node": ">=10"+ },+ "peerDependencies": {+ "@types/react": "*",+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ }+ }+ },+ "node_modules/use-sync-external-store": {+ "version": "1.6.0",+ "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz",+ "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==",+ "license": "MIT",+ "peerDependencies": {+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"+ }+ },+ "node_modules/util-deprecate": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",+ "license": "MIT"+ },+ "node_modules/uuid": {+ "version": "10.0.0",+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",+ "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",+ "funding": [+ "https://github.com/sponsors/broofa",+ "https://github.com/sponsors/ctavan"+ ],+ "license": "MIT",+ "bin": {+ "uuid": "dist/bin/uuid"+ }+ },+ "node_modules/validate-npm-package-name": {+ "version": "7.0.2",+ "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-7.0.2.tgz",+ "integrity": "sha512-hVDIBwsRruT73PbK7uP5ebUt+ezEtCmzZz3F59BSr2F6OVFnJ/6h8liuvdLrQ88Xmnk6/+xGGuq+pG9WwTuy3A==",+ "license": "ISC",+ "engines": {+ "node": "^20.17.0 || >=22.9.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/web-streams-polyfill": {+ "version": "3.3.3",+ "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",+ "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==",+ "license": "MIT",+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/which": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",+ "license": "ISC",+ "dependencies": {+ "isexe": "^2.0.0"+ },+ "bin": {+ "node-which": "bin/node-which"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/which-boxed-primitive": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz",+ "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "is-bigint": "^1.1.0",+ "is-boolean-object": "^1.2.1",+ "is-number-object": "^1.1.1",+ "is-string": "^1.1.1",+ "is-symbol": "^1.1.1"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/which-builtin-type": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz",+ "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bound": "^1.0.2",+ "function.prototype.name": "^1.1.6",+ "has-tostringtag": "^1.0.2",+ "is-async-function": "^2.0.0",+ "is-date-object": "^1.1.0",+ "is-finalizationregistry": "^1.1.0",+ "is-generator-function": "^1.0.10",+ "is-regex": "^1.2.1",+ "is-weakref": "^1.0.2",+ "isarray": "^2.0.5",+ "which-boxed-primitive": "^1.1.0",+ "which-collection": "^1.0.2",+ "which-typed-array": "^1.1.16"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/which-collection": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz",+ "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "is-map": "^2.0.3",+ "is-set": "^2.0.3",+ "is-weakmap": "^2.0.2",+ "is-weakset": "^2.0.3"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/which-typed-array": {+ "version": "1.1.20",+ "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.20.tgz",+ "integrity": "sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "available-typed-arrays": "^1.0.7",+ "call-bind": "^1.0.8",+ "call-bound": "^1.0.4",+ "for-each": "^0.3.5",+ "get-proto": "^1.0.1",+ "gopd": "^1.2.0",+ "has-tostringtag": "^1.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/word-wrap": {+ "version": "1.2.5",+ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",+ "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/wrap-ansi": {+ "version": "6.2.0",+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",+ "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",+ "license": "MIT",+ "dependencies": {+ "ansi-styles": "^4.0.0",+ "string-width": "^4.1.0",+ "strip-ansi": "^6.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/wrap-ansi/node_modules/ansi-regex": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/wrap-ansi/node_modules/emoji-regex": {+ "version": "8.0.0",+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",+ "license": "MIT"+ },+ "node_modules/wrap-ansi/node_modules/string-width": {+ "version": "4.2.3",+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",+ "license": "MIT",+ "dependencies": {+ "emoji-regex": "^8.0.0",+ "is-fullwidth-code-point": "^3.0.0",+ "strip-ansi": "^6.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/wrap-ansi/node_modules/strip-ansi": {+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",+ "license": "MIT",+ "dependencies": {+ "ansi-regex": "^5.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/wrappy": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",+ "license": "ISC"+ },+ "node_modules/write-file-atomic": {+ "version": "7.0.1",+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-7.0.1.tgz",+ "integrity": "sha512-OTIk8iR8/aCRWBqvxrzxR0hgxWpnYBblY1S5hDWBQfk/VFmJwzmJgQFN3WsoUKHISv2eAwe+PpbUzyL1CKTLXg==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "signal-exit": "^4.0.1"+ },+ "engines": {+ "node": "^20.17.0 || >=22.9.0"+ }+ },+ "node_modules/wsl-utils": {+ "version": "0.3.1",+ "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.3.1.tgz",+ "integrity": "sha512-g/eziiSUNBSsdDJtCLB8bdYEUMj4jR7AGeUo96p/3dTafgjHhpF4RiCFPiRILwjQoDXx5MqkBr4fwWtR3Ky4Wg==",+ "license": "MIT",+ "dependencies": {+ "is-wsl": "^3.1.0",+ "powershell-utils": "^0.1.0"+ },+ "engines": {+ "node": ">=20"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/xtend": {+ "version": "4.0.2",+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",+ "license": "MIT",+ "engines": {+ "node": ">=0.4"+ }+ },+ "node_modules/y18n": {+ "version": "5.0.8",+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",+ "license": "ISC",+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/yallist": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",+ "license": "ISC"+ },+ "node_modules/yargs": {+ "version": "17.7.2",+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",+ "license": "MIT",+ "dependencies": {+ "cliui": "^8.0.1",+ "escalade": "^3.1.1",+ "get-caller-file": "^2.0.5",+ "require-directory": "^2.1.1",+ "string-width": "^4.2.3",+ "y18n": "^5.0.5",+ "yargs-parser": "^21.1.1"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/yargs-parser": {+ "version": "21.1.1",+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",+ "license": "ISC",+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/yargs/node_modules/ansi-regex": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/yargs/node_modules/emoji-regex": {+ "version": "8.0.0",+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",+ "license": "MIT"+ },+ "node_modules/yargs/node_modules/string-width": {+ "version": "4.2.3",+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",+ "license": "MIT",+ "dependencies": {+ "emoji-regex": "^8.0.0",+ "is-fullwidth-code-point": "^3.0.0",+ "strip-ansi": "^6.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/yargs/node_modules/strip-ansi": {+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",+ "license": "MIT",+ "dependencies": {+ "ansi-regex": "^5.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/yocto-queue": {+ "version": "0.1.0",+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/yoctocolors": {+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.2.tgz",+ "integrity": "sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/yoctocolors-cjs": {+ "version": "2.1.3",+ "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz",+ "integrity": "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/zod": {+ "version": "4.3.6",+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz",+ "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==",+ "license": "MIT",+ "funding": {+ "url": "https://github.com/sponsors/colinhacks"+ }+ },+ "node_modules/zod-to-json-schema": {+ "version": "3.25.1",+ "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.1.tgz",+ "integrity": "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==",+ "license": "ISC",+ "peerDependencies": {+ "zod": "^3.25 || ^4"+ }+ },+ "node_modules/zod-validation-error": {+ "version": "4.0.2",+ "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-4.0.2.tgz",+ "integrity": "sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18.0.0"+ },+ "peerDependencies": {+ "zod": "^3.25.0 || ^4.0.0"+ }+ }+ }+}diff --git a/package.json b/package.jsonnew file mode 100644index 0000000..24999fe--- /dev/null+++ b/package.json@@ -0,0 +1,54 @@+{+ "name": "signudoc",+ "version": "0.1.0",+ "license": "MIT",+ "private": true,+ "scripts": {+ "dev": "next dev",+ "build": "next build",+ "start": "next start",+ "db:start": "supabase start",+ "db:stop": "supabase stop",+ "db:reset": "supabase db reset",+ "db:push": "supabase db push",+ "auth:generate": "auth generate --config ./src/lib/auth/better-auth.config.ts",+ "typecheck": "next typegen && tsc --noEmit --incremental false",+ "lint": "eslint .",+ "format": "prettier --write .",+ "format:check": "prettier --check ."+ },+ "dependencies": {+ "@aws-sdk/client-s3": "^3.1012.0",+ "@aws-sdk/s3-request-presigner": "^3.1012.0",+ "@pdf-lib/fontkit": "^1.1.1",+ "better-auth": "^1.5.5",+ "class-variance-authority": "^0.7.1",+ "clsx": "^2.1.1",+ "lucide-react": "^0.577.0",+ "next": "16.1.7",+ "pdf-lib": "^1.17.1",+ "pdfjs-dist": "^5.5.207",+ "pg": "^8.20.0",+ "radix-ui": "^1.4.3",+ "react": "19.2.3",+ "react-dom": "19.2.3",+ "resend": "^6.9.4",+ "shadcn": "^4.1.0",+ "tailwind-merge": "^3.5.0",+ "tw-animate-css": "^1.4.0",+ "zod": "^4.3.6"+ },+ "devDependencies": {+ "@tailwindcss/postcss": "^4",+ "@types/node": "^20",+ "@types/pg": "^8.20.0",+ "@types/react": "^19",+ "@types/react-dom": "^19",+ "eslint": "^9",+ "eslint-config-next": "16.1.7",+ "prettier": "^3.8.1",+ "supabase": "^2.84.1",+ "tailwindcss": "^4",+ "typescript": "^5"+ }+}diff --git a/postcss.config.mjs b/postcss.config.mjsnew file mode 100644index 0000000..61e3684--- /dev/null+++ b/postcss.config.mjs@@ -0,0 +1,7 @@+const config = {+ plugins: {+ "@tailwindcss/postcss": {},+ },+};++export default config;diff --git a/prettier.config.mjs b/prettier.config.mjsnew file mode 100644index 0000000..ffa910a--- /dev/null+++ b/prettier.config.mjs@@ -0,0 +1,5 @@+const prettierConfig = {+ trailingComma: "all",+};++export default prettierConfig;diff --git a/proxy.ts b/proxy.tsnew file mode 100644index 0000000..06178e0--- /dev/null+++ b/proxy.ts@@ -0,0 +1,107 @@+import type { NextRequest } from "next/server";+import { NextResponse } from "next/server";++const DEFAULT_PERMISSIONS_POLICY = [+ "accelerometer=()",+ "camera=()",+ "geolocation=()",+ "gyroscope=()",+ "microphone=()",+ "payment=()",+ "publickey-credentials-get=()",+ "serial=()",+ "usb=()",+].join(", ");++function isProductionEnvironment() {+ return process.env.NODE_ENV === "production";+}++function buildContentSecurityPolicy() {+ const scriptSrc = [+ "'self'",+ "'unsafe-inline'",+ ...(isProductionEnvironment() ? [] : ["'unsafe-eval'"]),+ ].join(" ");+ const r2ConnectSource = "https://*.r2.cloudflarestorage.com";++ return [+ "default-src 'self'",+ "base-uri 'self'",+ "frame-ancestors 'none'",+ "form-action 'self'",+ "object-src 'none'",+ "img-src 'self' data: blob:",+ "font-src 'self' data:",+ `connect-src 'self' ${r2ConnectSource}`,+ "worker-src 'self' blob:",+ "style-src 'self' 'unsafe-inline'",+ `script-src ${scriptSrc}`,+ ].join("; ");+}++function applySecurityHeaders(response: NextResponse, pathname: string) {+ response.headers.set("Content-Security-Policy", buildContentSecurityPolicy());+ response.headers.set("Permissions-Policy", DEFAULT_PERMISSIONS_POLICY);+ response.headers.set("Referrer-Policy", "strict-origin-when-cross-origin");+ response.headers.set("X-Content-Type-Options", "nosniff");+ response.headers.set("X-Frame-Options", "DENY");++ if (isProductionEnvironment()) {+ response.headers.set(+ "Strict-Transport-Security",+ "max-age=31536000; includeSubDomains",+ );+ }++ if (+ !pathname.startsWith("/sign/") &&+ !pathname.startsWith("/api/signing/") &&+ !pathname.startsWith("/api/download/")+ ) {+ return response;+ }++ response.headers.set("Referrer-Policy", "no-referrer");+ response.headers.set("X-Robots-Tag", "noindex, nofollow");++ if (!response.headers.has("Cache-Control")) {+ response.headers.set("Cache-Control", "private, no-store");+ }++ return response;+}++export function proxy(request: NextRequest) {+ const pathname = request.nextUrl.pathname;+ const forwardedProto = request.headers+ .get("x-forwarded-proto")+ ?.split(",")[0]+ ?.trim();+ const requestProtocol =+ forwardedProto ?? request.nextUrl.protocol.replace(":", "");+ const isLocalHostname =+ request.nextUrl.hostname === "localhost" ||+ request.nextUrl.hostname === "127.0.0.1" ||+ request.nextUrl.hostname === "::1";++ if (+ isProductionEnvironment() &&+ !isLocalHostname &&+ requestProtocol !== "https"+ ) {+ const httpsUrl = request.nextUrl.clone();++ httpsUrl.protocol = "https:";++ return applySecurityHeaders(NextResponse.redirect(httpsUrl), pathname);+ }++ return applySecurityHeaders(NextResponse.next(), pathname);+}++export const config = {+ matcher: [+ "/((?!_next/static|_next/image|favicon.ico|robots.txt|sitemap.xml).*)",+ ],+};diff --git a/public/pdfjs/5.5.207/legacy/build/pdf.worker.min.mjs b/public/pdfjs/5.5.207/legacy/build/pdf.worker.min.mjsnew file mode 100644index 0000000..d4250fb--- /dev/null+++ b/public/pdfjs/5.5.207/legacy/build/pdf.worker.min.mjs@@ -0,0 +1,28 @@+/**+ * @licstart The following is the entire license notice for the+ * JavaScript code in this page+ *+ * Copyright 2024 Mozilla Foundation+ *+ * 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.+ *+ * @licend The above is the entire license notice for the+ * JavaScript code in this page+ */+/**+ * pdfjsVersion = 5.5.207+ * pdfjsBuild = 527964698+ */var e={9306(e,t,n){var a=n(4901),r=n(6823),s=TypeError;e.exports=function(e){if(a(e))return e;throw new s(r(e)+" is not a function")}},6194(e,t,n){var a=n(2248).has;e.exports=function(e){a(e);return e}},3506(e,t,n){var a=n(3925),r=String,s=TypeError;e.exports=function(e){if(a(e))return e;throw new s("Can't set "+r(e)+" as a prototype")}},7080(e,t,n){var a=n(4402).has;e.exports=function(e){a(e);return e}},3463(e){var t=TypeError;e.exports=function(e){if("string"==typeof e)return e;throw new t("Argument is not a string")}},4328(e,t,n){var a=n(4995),r=new a.WeakMap,s=a.set,i=a.remove;e.exports=function(e){s(r,e,1);i(r,e);return e}},6557(e,t,n){var a=n(4995).has;e.exports=function(e){a(e);return e}},679(e,t,n){var a=n(1625),r=TypeError;e.exports=function(e,t){if(a(t,e))return e;throw new r("Incorrect invocation")}},3972(e,t,n){var a=n(34),r=String,s=TypeError;e.exports=function(e){if(void 0===e||a(e))return e;throw new s(r(e)+" is not an object or undefined")}},8551(e,t,n){var a=n(34),r=String,s=TypeError;e.exports=function(e){if(a(e))return e;throw new s(r(e)+" is not an object")}},4154(e,t,n){var a=n(6955),r=TypeError;e.exports=function(e){if("Uint8Array"===a(e))return e;throw new r("Argument is not an Uint8Array")}},7811(e){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7394(e,t,n){var a=n(4576),r=n(6706),s=n(2195),i=a.ArrayBuffer,o=a.TypeError;e.exports=i&&r(i.prototype,"byteLength","get")||function(e){if("ArrayBuffer"!==s(e))throw new o("ArrayBuffer expected");return e.byteLength}},3238(e,t,n){var a=n(4576),r=n(7811),s=n(7394),i=a.DataView;e.exports=function(e){if(!r||0!==s(e))return!1;try{new i(e);return!1}catch(e){return!0}}},5169(e,t,n){var a=n(3238),r=TypeError;e.exports=function(e){if(a(e))throw new r("ArrayBuffer is detached");return e}},5636(e,t,n){var a=n(4576),r=n(9504),s=n(6706),i=n(7696),o=n(5169),l=n(7394),f=n(4483),c=n(1548),h=a.structuredClone,u=a.ArrayBuffer,m=a.DataView,p=Math.min,d=u.prototype,g=m.prototype,b=r(d.slice),w=s(d,"resizable","get"),j=s(d,"maxByteLength","get"),k=r(g.getInt8),y=r(g.setInt8);e.exports=(c||f)&&function(e,t,n){var a,r=l(e),s=void 0===t?r:i(t),d=!w||!w(e);o(e);if(c){e=h(e,{transfer:[e]});if(r===s&&(n||d))return e}if(r>=s&&(!n||d))a=b(e,0,s);else{var g=n&&!d&&j?{maxByteLength:j(e)}:void 0;a=new u(s,g);for(var q=new m(e),v=new m(a),S=p(s,r),x=0;x<S;x++)y(v,x,k(q,x))}c||f(e);return a}},4644(e,t,n){var a,r,s,i=n(7811),o=n(3724),l=n(4576),f=n(4901),c=n(34),h=n(9297),u=n(6955),m=n(6823),p=n(6699),d=n(6840),g=n(2106),b=n(1625),w=n(2787),j=n(2967),k=n(8227),y=n(3392),q=n(1181),v=q.enforce,S=q.get,x=l.Int8Array,C=x&&x.prototype,T=l.Uint8ClampedArray,O=T&&T.prototype,R=x&&w(x),H=C&&w(C),D=Object.prototype,M=l.TypeError,E=k("toStringTag"),N=y("TYPED_ARRAY_TAG"),z="TypedArrayConstructor",_=i&&!!j&&"Opera"!==u(l.opera),L=!1,U={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},X={BigInt64Array:8,BigUint64Array:8},getTypedArrayConstructor=function(e){var t=w(e);if(c(t)){var n=S(t);return n&&h(n,z)?n[z]:getTypedArrayConstructor(t)}},isTypedArray=function(e){if(!c(e))return!1;var t=u(e);return h(U,t)||h(X,t)};for(a in U)(s=(r=l[a])&&r.prototype)?v(s)[z]=r:_=!1;for(a in X)(s=(r=l[a])&&r.prototype)&&(v(s)[z]=r);if(!_||!f(R)||R===Function.prototype){R=function TypedArray(){throw new M("Incorrect invocation")};if(_)for(a in U)l[a]&&j(l[a],R)}if(!_||!H||H===D){H=R.prototype;if(_)for(a in U)l[a]&&j(l[a].prototype,H)}_&&w(O)!==H&&j(O,H);if(o&&!h(H,E)){L=!0;g(H,E,{configurable:!0,get:function(){return c(this)?this[N]:void 0}});for(a in U)l[a]&&p(l[a],N,a)}e.exports={NATIVE_ARRAY_BUFFER_VIEWS:_,TYPED_ARRAY_TAG:L&&N,aTypedArray:function(e){if(isTypedArray(e))return e;throw new M("Target is not a typed array")},aTypedArrayConstructor:function(e){if(f(e)&&(!j||b(R,e)))return e;throw new M(m(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,a){if(o){if(n)for(var r in U){var s=l[r];if(s&&h(s.prototype,e))try{delete s.prototype[e]}catch(n){try{s.prototype[e]=t}catch(e){}}}H[e]&&!n||d(H,e,n?t:_&&C[e]||t,a)}},exportTypedArrayStaticMethod:function(e,t,n){var a,r;if(o){if(j){if(n)for(a in U)if((r=l[a])&&h(r,e))try{delete r[e]}catch(e){}if(R[e]&&!n)return;try{return d(R,e,n?t:_&&R[e]||t)}catch(e){}}for(a in U)!(r=l[a])||r[e]&&!n||d(r,e,t)}},getTypedArrayConstructor,isView:function isView(e){if(!c(e))return!1;var t=u(e);return"DataView"===t||h(U,t)||h(X,t)},isTypedArray,TypedArray:R,TypedArrayPrototype:H}},5370(e,t,n){var a=n(6198);e.exports=function(e,t,n){for(var r=0,s=arguments.length>2?n:a(t),i=new e(s);s>r;)i[r]=t[r++];return i}},9617(e,t,n){var a=n(5397),r=n(5610),s=n(6198),createMethod=function(e){return function(t,n,i){var o=a(t),l=s(o);if(0===l)return!e&&-1;var f,c=r(i,l);if(e&&n!=n){for(;l>c;)if((f=o[c++])!=f)return!0}else for(;l>c;c++)if((e||c in o)&&o[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},4527(e,t,n){var a=n(3724),r=n(4376),s=TypeError,i=Object.getOwnPropertyDescriptor,o=a&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=o?function(e,t){if(r(e)&&!i(e,"length").writable)throw new s("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},7680(e,t,n){var a=n(9504);e.exports=a([].slice)},2804(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=t+"+/",a=t+"-_",inverse=function(e){for(var t={},n=0;n<64;n++)t[e.charAt(n)]=n;return t};e.exports={i2c:n,c2i:inverse(n),i2cUrl:a,c2iUrl:inverse(a)}},6319(e,t,n){var a=n(8551),r=n(9539);e.exports=function(e,t,n,s){try{return s?t(a(n)[0],n[1]):t(n)}catch(t){r(e,"throw",t)}}},2195(e,t,n){var a=n(9504),r=a({}.toString),s=a("".slice);e.exports=function(e){return s(r(e),8,-1)}},6955(e,t,n){var a=n(2140),r=n(4901),s=n(2195),i=n(8227)("toStringTag"),o=Object,l="Arguments"===s(function(){return arguments}());e.exports=a?s:function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=o(e),i))?n:l?s(t):"Object"===(a=s(t))&&r(t.callee)?"Arguments":a}},7740(e,t,n){var a=n(9297),r=n(5031),s=n(7347),i=n(4913);e.exports=function(e,t,n){for(var o=r(t),l=i.f,f=s.f,c=0;c<o.length;c++){var h=o[c];a(e,h)||n&&a(n,h)||l(e,h,f(t,h))}}},2211(e,t,n){var a=n(9039);e.exports=!a(function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype})},2529(e){e.exports=function(e,t){return{value:e,done:t}}},6699(e,t,n){var a=n(3724),r=n(4913),s=n(6980);e.exports=a?function(e,t,n){return r.f(e,t,s(1,n))}:function(e,t,n){e[t]=n;return e}},6980(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},4659(e,t,n){var a=n(3724),r=n(4913),s=n(6980);e.exports=function(e,t,n){a?r.f(e,t,s(0,n)):e[t]=n}},2106(e,t,n){var a=n(283),r=n(4913);e.exports=function(e,t,n){n.get&&a(n.get,t,{getter:!0});n.set&&a(n.set,t,{setter:!0});return r.f(e,t,n)}},6840(e,t,n){var a=n(4901),r=n(4913),s=n(283),i=n(9433);e.exports=function(e,t,n,o){o||(o={});var l=o.enumerable,f=void 0!==o.name?o.name:t;a(n)&&s(n,f,o);if(o.global)l?e[t]=n:i(t,n);else{try{o.unsafe?e[t]&&(l=!0):delete e[t]}catch(e){}l?e[t]=n:r.f(e,t,{value:n,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e}},6279(e,t,n){var a=n(6840);e.exports=function(e,t,n){for(var r in t)a(e,r,t[r],n);return e}},9433(e,t,n){var a=n(4576),r=Object.defineProperty;e.exports=function(e,t){try{r(a,e,{value:t,configurable:!0,writable:!0})}catch(n){a[e]=t}return t}},3724(e,t,n){var a=n(9039);e.exports=!a(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},4483(e,t,n){var a,r,s,i,o=n(4576),l=n(9429),f=n(1548),c=o.structuredClone,h=o.ArrayBuffer,u=o.MessageChannel,m=!1;if(f)m=function(e){c(e,{transfer:[e]})};else if(h)try{u||(a=l("worker_threads"))&&(u=a.MessageChannel);if(u){r=new u;s=new h(2);i=function(e){r.port1.postMessage(null,[e])};if(2===s.byteLength){i(s);0===s.byteLength&&(m=i)}}}catch(e){}e.exports=m},4055(e,t,n){var a=n(4576),r=n(34),s=a.document,i=r(s)&&r(s.createElement);e.exports=function(e){return i?s.createElement(e):{}}},6837(e){var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},8727(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6193(e,t,n){var a=n(4215);e.exports="NODE"===a},2839(e,t,n){var a=n(4576).navigator,r=a&&a.userAgent;e.exports=r?String(r):""},9519(e,t,n){var a,r,s=n(4576),i=n(2839),o=s.process,l=s.Deno,f=o&&o.versions||l&&l.version,c=f&&f.v8;c&&(r=(a=c.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1]));!r&&i&&(!(a=i.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=i.match(/Chrome\/(\d+)/))&&(r=+a[1]);e.exports=r},4215(e,t,n){var a=n(4576),r=n(2839),s=n(2195),userAgentStartsWith=function(e){return r.slice(0,e.length)===e};e.exports=userAgentStartsWith("Bun/")?"BUN":userAgentStartsWith("Cloudflare-Workers")?"CLOUDFLARE":userAgentStartsWith("Deno/")?"DENO":userAgentStartsWith("Node.js/")?"NODE":a.Bun&&"string"==typeof Bun.version?"BUN":a.Deno&&"object"==typeof Deno.version?"DENO":"process"===s(a.process)?"NODE":a.window&&a.document?"BROWSER":"REST"},6518(e,t,n){var a=n(4576),r=n(7347).f,s=n(6699),i=n(6840),o=n(9433),l=n(7740),f=n(2796);e.exports=function(e,t){var n,c,h,u,m,p=e.target,d=e.global,g=e.stat;if(n=d?a:g?a[p]||o(p,{}):a[p]&&a[p].prototype)for(c in t){u=t[c];h=e.dontCallGetSet?(m=r(n,c))&&m.value:n[c];if(!f(d?c:p+(g?".":"#")+c,e.forced)&&void 0!==h){if(typeof u==typeof h)continue;l(u,h)}(e.sham||h&&h.sham)&&s(u,"sham",!0);i(n,c,u,e)}}},9039(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},8745(e,t,n){var a=n(616),r=Function.prototype,s=r.apply,i=r.call;e.exports="object"==typeof Reflect&&Reflect.apply||(a?i.bind(s):function(){return i.apply(s,arguments)})},6080(e,t,n){var a=n(7476),r=n(9306),s=n(616),i=a(a.bind);e.exports=function(e,t){r(e);return void 0===t?e:s?i(e,t):function(){return e.apply(t,arguments)}}},616(e,t,n){var a=n(9039);e.exports=!a(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},9565(e,t,n){var a=n(616),r=Function.prototype.call;e.exports=a?r.bind(r):function(){return r.apply(r,arguments)}},350(e,t,n){var a=n(3724),r=n(9297),s=Function.prototype,i=a&&Object.getOwnPropertyDescriptor,o=r(s,"name"),l=o&&"something"===function something(){}.name,f=o&&(!a||a&&i(s,"name").configurable);e.exports={EXISTS:o,PROPER:l,CONFIGURABLE:f}},6706(e,t,n){var a=n(9504),r=n(9306);e.exports=function(e,t,n){try{return a(r(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},7476(e,t,n){var a=n(2195),r=n(9504);e.exports=function(e){if("Function"===a(e))return r(e)}},9504(e,t,n){var a=n(616),r=Function.prototype,s=r.call,i=a&&r.bind.bind(s,s);e.exports=a?i:function(e){return function(){return s.apply(e,arguments)}}},944(e){var t=TypeError;e.exports=function(e){var n=e&&e.alphabet;if(void 0===n||"base64"===n||"base64url"===n)return n||"base64";throw new t("Incorrect `alphabet` option")}},9429(e,t,n){var a=n(4576),r=n(6193);e.exports=function(e){if(r){try{return a.process.getBuiltinModule(e)}catch(e){}try{return Function('return require("'+e+'")')()}catch(e){}}}},7751(e,t,n){var a=n(4576),r=n(4901);e.exports=function(e,t){return arguments.length<2?(n=a[e],r(n)?n:void 0):a[e]&&a[e][t];var n}},1767(e){e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},8646(e,t,n){var a=n(9565),r=n(8551),s=n(1767),i=n(851);e.exports=function(e,t){t&&"string"==typeof e||r(e);var n=i(e);return s(r(void 0!==n?a(n,e):e))}},851(e,t,n){var a=n(6955),r=n(5966),s=n(4117),i=n(6269),o=n(8227)("iterator");e.exports=function(e){if(!s(e))return r(e,o)||r(e,"@@iterator")||i[a(e)]}},81(e,t,n){var a=n(9565),r=n(9306),s=n(8551),i=n(6823),o=n(851),l=TypeError;e.exports=function(e,t){var n=arguments.length<2?o(e):t;if(r(n))return s(a(n,e));throw new l(i(e)+" is not iterable")}},5966(e,t,n){var a=n(9306),r=n(4117);e.exports=function(e,t){var n=e[t];return r(n)?void 0:a(n)}},3789(e,t,n){var a=n(9306),r=n(8551),s=n(9565),i=n(1291),o=n(1767),l="Invalid size",f=RangeError,c=TypeError,h=Math.max,SetRecord=function(e,t){this.set=e;this.size=h(t,0);this.has=a(e.has);this.keys=a(e.keys)};SetRecord.prototype={getIterator:function(){return o(r(s(this.keys,this.set)))},includes:function(e){return s(this.has,this.set,e)}};e.exports=function(e){r(e);var t=+e.size;if(t!=t)throw new c(l);var n=i(t);if(n<0)throw new f(l);return new SetRecord(e,n)}},4576(e){var check=function(e){return e&&e.Math===Math&&e};e.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||check("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297(e,t,n){var a=n(9504),r=n(8981),s=a({}.hasOwnProperty);e.exports=Object.hasOwn||function hasOwn(e,t){return s(r(e),t)}},421(e){e.exports={}},397(e,t,n){var a=n(7751);e.exports=a("document","documentElement")},5917(e,t,n){var a=n(3724),r=n(9039),s=n(4055);e.exports=!a&&!r(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},7055(e,t,n){var a=n(9504),r=n(9039),s=n(2195),i=Object,o=a("".split);e.exports=r(function(){return!i("z").propertyIsEnumerable(0)})?function(e){return"String"===s(e)?o(e,""):i(e)}:i},3706(e,t,n){var a=n(9504),r=n(4901),s=n(7629),i=a(Function.toString);r(s.inspectSource)||(s.inspectSource=function(e){return i(e)});e.exports=s.inspectSource},1181(e,t,n){var a,r,s,i=n(8622),o=n(4576),l=n(34),f=n(6699),c=n(9297),h=n(7629),u=n(6119),m=n(421),p="Object already initialized",d=o.TypeError,g=o.WeakMap;if(i||h.state){var b=h.state||(h.state=new g);b.get=b.get;b.has=b.has;b.set=b.set;a=function(e,t){if(b.has(e))throw new d(p);t.facade=e;b.set(e,t);return t};r=function(e){return b.get(e)||{}};s=function(e){return b.has(e)}}else{var w=u("state");m[w]=!0;a=function(e,t){if(c(e,w))throw new d(p);t.facade=e;f(e,w,t);return t};r=function(e){return c(e,w)?e[w]:{}};s=function(e){return c(e,w)}}e.exports={set:a,get:r,has:s,enforce:function(e){return s(e)?r(e):a(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=r(t)).type!==e)throw new d("Incompatible receiver, "+e+" required");return n}}}},4209(e,t,n){var a=n(8227),r=n(6269),s=a("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[s]===e)}},4376(e,t,n){var a=n(2195);e.exports=Array.isArray||function isArray(e){return"Array"===a(e)}},1108(e,t,n){var a=n(6955);e.exports=function(e){var t=a(e);return"BigInt64Array"===t||"BigUint64Array"===t}},4901(e){var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},2796(e,t,n){var a=n(9039),r=n(4901),s=/#|\.prototype\./,isForced=function(e,t){var n=o[i(e)];return n===f||n!==l&&(r(t)?a(t):!!t)},i=isForced.normalize=function(e){return String(e).replace(s,".").toLowerCase()},o=isForced.data={},l=isForced.NATIVE="N",f=isForced.POLYFILL="P";e.exports=isForced},4117(e){e.exports=function(e){return null==e}},34(e,t,n){var a=n(4901);e.exports=function(e){return"object"==typeof e?null!==e:a(e)}},3925(e,t,n){var a=n(34);e.exports=function(e){return a(e)||null===e}},6395(e){e.exports=!1},5810(e,t,n){var a=n(34),r=n(1181).get;e.exports=function isRawJSON(e){if(!a(e))return!1;var t=r(e);return!!t&&"RawJSON"===t.type}},757(e,t,n){var a=n(7751),r=n(4901),s=n(1625),i=n(7040),o=Object;e.exports=i?function(e){return"symbol"==typeof e}:function(e){var t=a("Symbol");return r(t)&&s(t.prototype,o(e))}},507(e,t,n){var a=n(9565);e.exports=function(e,t,n){for(var r,s,i=n?e:e.iterator,o=e.next;!(r=a(o,i)).done;)if(void 0!==(s=t(r.value)))return s}},2652(e,t,n){var a=n(6080),r=n(9565),s=n(8551),i=n(6823),o=n(4209),l=n(6198),f=n(1625),c=n(81),h=n(851),u=n(9539),m=TypeError,Result=function(e,t){this.stopped=e;this.result=t},p=Result.prototype;e.exports=function(e,t,n){var d,g,b,w,j,k,y,q=n&&n.that,v=!(!n||!n.AS_ENTRIES),S=!(!n||!n.IS_RECORD),x=!(!n||!n.IS_ITERATOR),C=!(!n||!n.INTERRUPTED),T=a(t,q),stop=function(e){d&&u(d,"normal");return new Result(!0,e)},callFn=function(e){if(v){s(e);return C?T(e[0],e[1],stop):T(e[0],e[1])}return C?T(e,stop):T(e)};if(S)d=e.iterator;else if(x)d=e;else{if(!(g=h(e)))throw new m(i(e)+" is not iterable");if(o(g)){for(b=0,w=l(e);w>b;b++)if((j=callFn(e[b]))&&f(p,j))return j;return new Result(!1)}d=c(e,g)}k=S?e.next:d.next;for(;!(y=r(k,d)).done;){try{j=callFn(y.value)}catch(e){u(d,"throw",e)}if("object"==typeof j&&j&&f(p,j))return j}return new Result(!1)}},1385(e,t,n){var a=n(9539);e.exports=function(e,t,n){for(var r=e.length-1;r>=0;r--)if(void 0!==e[r])try{n=a(e[r].iterator,t,n)}catch(e){t="throw";n=e}if("throw"===t)throw n;return n}},9539(e,t,n){var a=n(9565),r=n(8551),s=n(5966);e.exports=function(e,t,n){var i,o;r(e);try{if(!(i=s(e,"return"))){if("throw"===t)throw n;return n}i=a(i,e)}catch(e){o=!0;i=e}if("throw"===t)throw n;if(o)throw i;r(i);return n}},9462(e,t,n){var a=n(9565),r=n(2360),s=n(6699),i=n(6279),o=n(8227),l=n(1181),f=n(5966),c=n(7657).IteratorPrototype,h=n(2529),u=n(9539),m=n(1385),p=o("toStringTag"),d="IteratorHelper",g="WrapForValidIterator",b="normal",w="throw",j=l.set,createIteratorProxyPrototype=function(e){var t=l.getterFor(e?g:d);return i(r(c),{next:function next(){var n=t(this);if(e)return n.nextHandler();if(n.done)return h(void 0,!0);try{var a=n.nextHandler();return n.returnHandlerResult?a:h(a,n.done)}catch(e){n.done=!0;throw e}},return:function(){var n=t(this),r=n.iterator;n.done=!0;if(e){var s=f(r,"return");return s?a(s,r):h(void 0,!0)}if(n.inner)try{u(n.inner.iterator,b)}catch(e){return u(r,w,e)}if(n.openIters)try{m(n.openIters,b)}catch(e){return u(r,w,e)}r&&u(r,b);return h(void 0,!0)}})},k=createIteratorProxyPrototype(!0),y=createIteratorProxyPrototype(!1);s(y,p,"Iterator Helper");e.exports=function(e,t,n){var a=function Iterator(a,r){if(r){r.iterator=a.iterator;r.next=a.next}else r=a;r.type=t?g:d;r.returnHandlerResult=!!n;r.nextHandler=e;r.counter=0;r.done=!1;j(this,r)};a.prototype=t?k:y;return a}},684(e){e.exports=function(e,t){var n="function"==typeof Iterator&&Iterator.prototype[e];if(n)try{n.call({next:null},t).next()}catch(e){return!0}}},4549(e,t,n){var a=n(4576);e.exports=function(e,t){var n=a.Iterator,r=n&&n.prototype,s=r&&r[e],i=!1;if(s)try{s.call({next:function(){return{done:!0}},return:function(){i=!0}},-1)}catch(e){e instanceof t||(i=!1)}if(!i)return s}},7657(e,t,n){var a,r,s,i=n(9039),o=n(4901),l=n(34),f=n(2360),c=n(2787),h=n(6840),u=n(8227),m=n(6395),p=u("iterator"),d=!1;[].keys&&("next"in(s=[].keys())?(r=c(c(s)))!==Object.prototype&&(a=r):d=!0);!l(a)||i(function(){var e={};return a[p].call(e)!==e})?a={}:m&&(a=f(a));o(a[p])||h(a,p,function(){return this});e.exports={IteratorPrototype:a,BUGGY_SAFARI_ITERATORS:d}},6269(e){e.exports={}},6198(e,t,n){var a=n(8014);e.exports=function(e){return a(e.length)}},283(e,t,n){var a=n(9504),r=n(9039),s=n(4901),i=n(9297),o=n(3724),l=n(350).CONFIGURABLE,f=n(3706),c=n(1181),h=c.enforce,u=c.get,m=String,p=Object.defineProperty,d=a("".slice),g=a("".replace),b=a([].join),w=o&&!r(function(){return 8!==p(function(){},"length",{value:8}).length}),j=String(String).split("String"),k=e.exports=function(e,t,n){"Symbol("===d(m(t),0,7)&&(t="["+g(m(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]");n&&n.getter&&(t="get "+t);n&&n.setter&&(t="set "+t);(!i(e,"name")||l&&e.name!==t)&&(o?p(e,"name",{value:t,configurable:!0}):e.name=t);w&&n&&i(n,"arity")&&e.length!==n.arity&&p(e,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?o&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var a=h(e);i(a,"source")||(a.source=b(j,"string"==typeof t?t:""));return e};Function.prototype.toString=k(function toString(){return s(this)&&u(this).source||f(this)},"toString")},2248(e,t,n){var a=n(9504),r=Map.prototype;e.exports={Map,set:a(r.set),get:a(r.get),has:a(r.has),remove:a(r.delete),proto:r}},741(e){var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function trunc(e){var a=+e;return(a>0?n:t)(a)}},7819(e,t,n){var a=n(9039);e.exports=!a(function(){var e="9007199254740993",t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e})},6043(e,t,n){var a=n(9306),r=TypeError,PromiseCapability=function(e){var t,n;this.promise=new e(function(e,a){if(void 0!==t||void 0!==n)throw new r("Bad Promise constructor");t=e;n=a});this.resolve=a(t);this.reject=a(n)};e.exports.f=function(e){return new PromiseCapability(e)}},2360(e,t,n){var a,r=n(8551),s=n(6801),i=n(8727),o=n(421),l=n(397),f=n(4055),c=n(6119),h="prototype",u="script",m=c("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return"<"+u+">"+e+"</"+u+">"},NullProtoObjectViaActiveX=function(e){e.write(scriptTag(""));e.close();var t=e.parentWindow.Object;e=null;return t},NullProtoObject=function(){try{a=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"!=typeof document?document.domain&&a?NullProtoObjectViaActiveX(a):function(){var e,t=f("iframe"),n="java"+u+":";t.style.display="none";l.appendChild(t);t.src=String(n);(e=t.contentWindow.document).open();e.write(scriptTag("document.F=Object"));e.close();return e.F}():NullProtoObjectViaActiveX(a);for(var e=i.length;e--;)delete NullProtoObject[h][i[e]];return NullProtoObject()};o[m]=!0;e.exports=Object.create||function create(e,t){var n;if(null!==e){EmptyConstructor[h]=r(e);n=new EmptyConstructor;EmptyConstructor[h]=null;n[m]=e}else n=NullProtoObject();return void 0===t?n:s.f(n,t)}},6801(e,t,n){var a=n(3724),r=n(8686),s=n(4913),i=n(8551),o=n(5397),l=n(1072);t.f=a&&!r?Object.defineProperties:function defineProperties(e,t){i(e);for(var n,a=o(t),r=l(t),f=r.length,c=0;f>c;)s.f(e,n=r[c++],a[n]);return e}},4913(e,t,n){var a=n(3724),r=n(5917),s=n(8686),i=n(8551),o=n(6969),l=TypeError,f=Object.defineProperty,c=Object.getOwnPropertyDescriptor,h="enumerable",u="configurable",m="writable";t.f=a?s?function defineProperty(e,t,n){i(e);t=o(t);i(n);if("function"==typeof e&&"prototype"===t&&"value"in n&&m in n&&!n[m]){var a=c(e,t);if(a&&a[m]){e[t]=n.value;n={configurable:u in n?n[u]:a[u],enumerable:h in n?n[h]:a[h],writable:!1}}}return f(e,t,n)}:f:function defineProperty(e,t,n){i(e);t=o(t);i(n);if(r)try{return f(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new l("Accessors not supported");"value"in n&&(e[t]=n.value);return e}},7347(e,t,n){var a=n(3724),r=n(9565),s=n(8773),i=n(6980),o=n(5397),l=n(6969),f=n(9297),c=n(5917),h=Object.getOwnPropertyDescriptor;t.f=a?h:function getOwnPropertyDescriptor(e,t){e=o(e);t=l(t);if(c)try{return h(e,t)}catch(e){}if(f(e,t))return i(!r(s.f,e,t),e[t])}},8480(e,t,n){var a=n(1828),r=n(8727).concat("length","prototype");t.f=Object.getOwnPropertyNames||function getOwnPropertyNames(e){return a(e,r)}},3717(e,t){t.f=Object.getOwnPropertySymbols},2787(e,t,n){var a=n(9297),r=n(4901),s=n(8981),i=n(6119),o=n(2211),l=i("IE_PROTO"),f=Object,c=f.prototype;e.exports=o?f.getPrototypeOf:function(e){var t=s(e);if(a(t,l))return t[l];var n=t.constructor;return r(n)&&t instanceof n?n.prototype:t instanceof f?c:null}},1625(e,t,n){var a=n(9504);e.exports=a({}.isPrototypeOf)},1828(e,t,n){var a=n(9504),r=n(9297),s=n(5397),i=n(9617).indexOf,o=n(421),l=a([].push);e.exports=function(e,t){var n,a=s(e),f=0,c=[];for(n in a)!r(o,n)&&r(a,n)&&l(c,n);for(;t.length>f;)r(a,n=t[f++])&&(~i(c,n)||l(c,n));return c}},1072(e,t,n){var a=n(1828),r=n(8727);e.exports=Object.keys||function keys(e){return a(e,r)}},8773(e,t){var n={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,r=a&&!n.call({1:2},1);t.f=r?function propertyIsEnumerable(e){var t=a(this,e);return!!t&&t.enumerable}:n},2967(e,t,n){var a=n(6706),r=n(34),s=n(7750),i=n(3506);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=a(Object.prototype,"__proto__","set"))(n,[]);t=n instanceof Array}catch(e){}return function setPrototypeOf(n,a){s(n);i(a);if(!r(n))return n;t?e(n,a):n.__proto__=a;return n}}():void 0)},4270(e,t,n){var a=n(9565),r=n(4901),s=n(34),i=TypeError;e.exports=function(e,t){var n,o;if("string"===t&&r(n=e.toString)&&!s(o=a(n,e)))return o;if(r(n=e.valueOf)&&!s(o=a(n,e)))return o;if("string"!==t&&r(n=e.toString)&&!s(o=a(n,e)))return o;throw new i("Can't convert object to primitive value")}},5031(e,t,n){var a=n(7751),r=n(9504),s=n(8480),i=n(3717),o=n(8551),l=r([].concat);e.exports=a("Reflect","ownKeys")||function ownKeys(e){var t=s.f(o(e)),n=i.f;return n?l(t,n(e)):t}},8235(e,t,n){var a=n(9504),r=n(9297),s=SyntaxError,i=parseInt,o=String.fromCharCode,l=a("".charAt),f=a("".slice),c=a(/./.exec),h={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},u=/^[\da-f]{4}$/i,m=/^[\u0000-\u001F]$/;e.exports=function(e,t){for(var n=!0,a="";t<e.length;){var p=l(e,t);if("\\"===p){var d=f(e,t,t+2);if(r(h,d)){a+=h[d];t+=2}else{if("\\u"!==d)throw new s('Unknown escape sequence: "'+d+'"');var g=f(e,t+=2,t+4);if(!c(u,g))throw new s("Bad Unicode escape at: "+t);a+=o(i(g,16));t+=4}}else{if('"'===p){n=!1;t++;break}if(c(m,p))throw new s("Bad control character in string literal at: "+t);a+=p;t++}}if(n)throw new s("Unterminated string at: "+t);return{value:a,end:t}}},1103(e){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},7750(e,t,n){var a=n(4117),r=TypeError;e.exports=function(e){if(a(e))throw new r("Can't call method on "+e);return e}},9286(e,t,n){var a=n(4402),r=n(8469),s=a.Set,i=a.add;e.exports=function(e){var t=new s;r(e,function(e){i(t,e)});return t}},3440(e,t,n){var a=n(7080),r=n(4402),s=n(9286),i=n(5170),o=n(3789),l=n(8469),f=n(507),c=r.has,h=r.remove;e.exports=function difference(e){var t=a(this),n=o(e),r=s(t);i(t)<=n.size?l(t,function(e){n.includes(e)&&h(r,e)}):f(n.getIterator(),function(e){c(r,e)&&h(r,e)});return r}},4402(e,t,n){var a=n(9504),r=Set.prototype;e.exports={Set,add:a(r.add),has:a(r.has),remove:a(r.delete),proto:r}},8750(e,t,n){var a=n(7080),r=n(4402),s=n(5170),i=n(3789),o=n(8469),l=n(507),f=r.Set,c=r.add,h=r.has;e.exports=function intersection(e){var t=a(this),n=i(e),r=new f;s(t)>n.size?l(n.getIterator(),function(e){h(t,e)&&c(r,e)}):o(t,function(e){n.includes(e)&&c(r,e)});return r}},4449(e,t,n){var a=n(7080),r=n(4402).has,s=n(5170),i=n(3789),o=n(8469),l=n(507),f=n(9539);e.exports=function isDisjointFrom(e){var t=a(this),n=i(e);if(s(t)<=n.size)return!1!==o(t,function(e){if(n.includes(e))return!1},!0);var c=n.getIterator();return!1!==l(c,function(e){if(r(t,e))return f(c,"normal",!1)})}},3838(e,t,n){var a=n(7080),r=n(5170),s=n(8469),i=n(3789);e.exports=function isSubsetOf(e){var t=a(this),n=i(e);return!(r(t)>n.size)&&!1!==s(t,function(e){if(!n.includes(e))return!1},!0)}},8527(e,t,n){var a=n(7080),r=n(4402).has,s=n(5170),i=n(3789),o=n(507),l=n(9539);e.exports=function isSupersetOf(e){var t=a(this),n=i(e);if(s(t)<n.size)return!1;var f=n.getIterator();return!1!==o(f,function(e){if(!r(t,e))return l(f,"normal",!1)})}},8469(e,t,n){var a=n(9504),r=n(507),s=n(4402),i=s.Set,o=s.proto,l=a(o.forEach),f=a(o.keys),c=f(new i).next;e.exports=function(e,t,n){return n?r({iterator:f(e),next:c},t):l(e,t)}},4916(e,t,n){var a=n(7751),createSetLike=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},createSetLikeWithInfinitySize=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};e.exports=function(e,t){var n=a("Set");try{(new n)[e](createSetLike(0));try{(new n)[e](createSetLike(-1));return!1}catch(a){if(!t)return!0;try{(new n)[e](createSetLikeWithInfinitySize(-1/0));return!1}catch(a){return t(new n([1,2])[e](createSetLikeWithInfinitySize(1/0)))}}}catch(e){return!1}}},9835(e){e.exports=function(e){try{var t=new Set,n={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){t.clear();t.add(4);return function(){return{done:!0}}}})}},a=t[e](n);return 1===a.size&&4===a.values().next().value}catch(e){return!1}}},5170(e,t,n){var a=n(6706),r=n(4402);e.exports=a(r.proto,"size","get")||function(e){return e.size}},3650(e,t,n){var a=n(7080),r=n(4402),s=n(9286),i=n(3789),o=n(507),l=r.add,f=r.has,c=r.remove;e.exports=function symmetricDifference(e){var t=a(this),n=i(e).getIterator(),r=s(t);o(n,function(e){f(t,e)?c(r,e):l(r,e)});return r}},4204(e,t,n){var a=n(7080),r=n(4402).add,s=n(9286),i=n(3789),o=n(507);e.exports=function union(e){var t=a(this),n=i(e).getIterator(),l=s(t);o(n,function(e){r(l,e)});return l}},6119(e,t,n){var a=n(5745),r=n(3392),s=a("keys");e.exports=function(e){return s[e]||(s[e]=r(e))}},7629(e,t,n){var a=n(6395),r=n(4576),s=n(9433),i="__core-js_shared__",o=e.exports=r[i]||s(i,{});(o.versions||(o.versions=[])).push({version:"3.48.0",mode:a?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5745(e,t,n){var a=n(7629);e.exports=function(e,t){return a[e]||(a[e]=t||{})}},1548(e,t,n){var a=n(4576),r=n(9039),s=n(9519),i=n(4215),o=a.structuredClone;e.exports=!!o&&!r(function(){if("DENO"===i&&s>92||"NODE"===i&&s>94||"BROWSER"===i&&s>97)return!1;var e=new ArrayBuffer(8),t=o(e,{transfer:[e]});return 0!==e.byteLength||8!==t.byteLength})},4495(e,t,n){var a=n(9519),r=n(9039),s=n(4576).String;e.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&a&&a<41})},5610(e,t,n){var a=n(1291),r=Math.max,s=Math.min;e.exports=function(e,t){var n=a(e);return n<0?r(n+t,0):s(n,t)}},5854(e,t,n){var a=n(2777),r=TypeError;e.exports=function(e){var t=a(e,"number");if("number"==typeof t)throw new r("Can't convert number to bigint");return BigInt(t)}},7696(e,t,n){var a=n(1291),r=n(8014),s=RangeError;e.exports=function(e){if(void 0===e)return 0;var t=a(e),n=r(t);if(t!==n)throw new s("Wrong length or index");return n}},5397(e,t,n){var a=n(7055),r=n(7750);e.exports=function(e){return a(r(e))}},1291(e,t,n){var a=n(741);e.exports=function(e){var t=+e;return t!=t||0===t?0:a(t)}},8014(e,t,n){var a=n(1291),r=Math.min;e.exports=function(e){var t=a(e);return t>0?r(t,9007199254740991):0}},8981(e,t,n){var a=n(7750),r=Object;e.exports=function(e){return r(a(e))}},2777(e,t,n){var a=n(9565),r=n(34),s=n(757),i=n(5966),o=n(4270),l=n(8227),f=TypeError,c=l("toPrimitive");e.exports=function(e,t){if(!r(e)||s(e))return e;var n,l=i(e,c);if(l){void 0===t&&(t="default");n=a(l,e,t);if(!r(n)||s(n))return n;throw new f("Can't convert object to primitive value")}void 0===t&&(t="number");return o(e,t)}},6969(e,t,n){var a=n(2777),r=n(757);e.exports=function(e){var t=a(e,"string");return r(t)?t:t+""}},2140(e,t,n){var a={};a[n(8227)("toStringTag")]="z";e.exports="[object z]"===String(a)},655(e,t,n){var a=n(6955),r=String;e.exports=function(e){if("Symbol"===a(e))throw new TypeError("Cannot convert a Symbol value to a string");return r(e)}},6823(e){var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},3392(e,t,n){var a=n(9504),r=0,s=Math.random(),i=a(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++r+s,36)}},9143(e,t,n){var a=n(4576),r=n(9504),s=n(3972),i=n(3463),o=n(9297),l=n(2804),f=n(944),c=n(5169),h=l.c2i,u=l.c2iUrl,m=a.SyntaxError,p=a.TypeError,d=r("".charAt),skipAsciiWhitespace=function(e,t){for(var n=e.length;t<n;t++){var a=d(e,t);if(" "!==a&&"\t"!==a&&"\n"!==a&&"\f"!==a&&"\r"!==a)break}return t},decodeBase64Chunk=function(e,t,n){var a=e.length;a<4&&(e+=2===a?"AA":"A");var r=(t[d(e,0)]<<18)+(t[d(e,1)]<<12)+(t[d(e,2)]<<6)+t[d(e,3)],s=[r>>16&255,r>>8&255,255&r];if(2===a){if(n&&0!==s[1])throw new m("Extra bits");return[s[0]]}if(3===a){if(n&&0!==s[2])throw new m("Extra bits");return[s[0],s[1]]}return s},writeBytes=function(e,t,n){for(var a=t.length,r=0;r<a;r++)e[n+r]=t[r];return n+a};e.exports=function(e,t,n,a){i(e);s(t);var r="base64"===f(t)?h:u,l=t?t.lastChunkHandling:void 0;void 0===l&&(l="loose");if("loose"!==l&&"strict"!==l&&"stop-before-partial"!==l)throw new p("Incorrect `lastChunkHandling` option");n&&c(n.buffer);var g=e.length,b=n||[],w=0,j=0,k="",y=0;if(a)for(;;){if((y=skipAsciiWhitespace(e,y))===g){if(k.length>0){if("stop-before-partial"===l)break;if("loose"!==l)throw new m("Missing padding");if(1===k.length)throw new m("Malformed padding: exactly one additional character");w=writeBytes(b,decodeBase64Chunk(k,r,!1),w)}j=g;break}var q=d(e,y);++y;if("="===q){if(k.length<2)throw new m("Padding is too early");y=skipAsciiWhitespace(e,y);if(2===k.length){if(y===g){if("stop-before-partial"===l)break;throw new m("Malformed padding: only one =")}if("="===d(e,y)){++y;y=skipAsciiWhitespace(e,y)}}if(y<g)throw new m("Unexpected character after padding");w=writeBytes(b,decodeBase64Chunk(k,r,"strict"===l),w);j=g;break}if(!o(r,q))throw new m("Unexpected character");var v=a-w;if(1===v&&2===k.length||2===v&&3===k.length)break;if(4===(k+=q).length){w=writeBytes(b,decodeBase64Chunk(k,r,!1),w);k="";j=y;if(w===a)break}}return{bytes:b,read:j,written:w}}},2303(e,t,n){var a=n(4576),r=n(9504),s=a.Uint8Array,i=a.SyntaxError,o=a.parseInt,l=Math.min,f=/[^\da-f]/i,c=r(f.exec),h=r("".slice);e.exports=function(e,t){var n=e.length;if(n%2!=0)throw new i("String should be an even number of characters");for(var a=t?l(t.length,n/2):n/2,r=t||new s(a),u=0,m=0;m<a;){var p=h(e,u,u+=2);if(c(f,p))throw new i("String should only contain hex characters");r[m++]=o(p,16)}return{bytes:r,read:u}}},7416(e,t,n){var a=n(9039),r=n(8227),s=n(3724),i=n(6395),o=r("iterator");e.exports=!a(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),a="";e.pathname="c%20d";t.forEach(function(e,n){t.delete("b");a+=n+e});n.delete("a",2);n.delete("b",void 0);return i&&(!e.toJSON||!n.has("a",1)||n.has("a",2)||!n.has("a",void 0)||n.has("b"))||!t.size&&(i||!s)||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[o]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==a||"x"!==new URL("https://x",void 0).host})},7040(e,t,n){var a=n(4495);e.exports=a&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686(e,t,n){var a=n(3724),r=n(9039);e.exports=a&&r(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},2812(e){var t=TypeError;e.exports=function(e,n){if(e<n)throw new t("Not enough arguments");return e}},8622(e,t,n){var a=n(4576),r=n(4901),s=a.WeakMap;e.exports=r(s)&&/native code/.test(String(s))},4995(e,t,n){var a=n(9504),r=WeakMap.prototype;e.exports={WeakMap,set:a(r.set),get:a(r.get),has:a(r.has),remove:a(r.delete)}},8227(e,t,n){var a=n(4576),r=n(5745),s=n(9297),i=n(3392),o=n(4495),l=n(7040),f=a.Symbol,c=r("wks"),h=l?f.for||f:f&&f.withoutSetter||i;e.exports=function(e){s(c,e)||(c[e]=o&&s(f,e)?f[e]:h("Symbol."+e));return c[e]}},6573(e,t,n){var a=n(3724),r=n(2106),s=n(3238),i=ArrayBuffer.prototype;a&&!("detached"in i)&&r(i,"detached",{configurable:!0,get:function detached(){return s(this)}})},7936(e,t,n){var a=n(6518),r=n(5636);r&&a({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function transferToFixedLength(){return r(this,arguments.length?arguments[0]:void 0,!1)}})},8100(e,t,n){var a=n(6518),r=n(5636);r&&a({target:"ArrayBuffer",proto:!0},{transfer:function transfer(){return r(this,arguments.length?arguments[0]:void 0,!0)}})},4114(e,t,n){var a=n(6518),r=n(8981),s=n(6198),i=n(4527),o=n(6837);a({target:"Array",proto:!0,arity:1,forced:n(9039)(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function push(e){var t=r(this),n=s(t),a=arguments.length;o(n+a);for(var l=0;l<a;l++){t[n]=arguments[l];n++}i(t,n);return n}})},8111(e,t,n){var a=n(6518),r=n(4576),s=n(679),i=n(8551),o=n(4901),l=n(2787),f=n(2106),c=n(4659),h=n(9039),u=n(9297),m=n(8227),p=n(7657).IteratorPrototype,d=n(3724),g=n(6395),b="constructor",w="Iterator",j=m("toStringTag"),k=TypeError,y=r[w],q=g||!o(y)||y.prototype!==p||!h(function(){y({})}),v=function Iterator(){s(this,p);if(l(this)===p)throw new k("Abstract class Iterator not directly constructable")},defineIteratorPrototypeAccessor=function(e,t){d?f(p,e,{configurable:!0,get:function(){return t},set:function(t){i(this);if(this===p)throw new k("You can't redefine this property");u(this,e)?this[e]=t:c(this,e,t)}}):p[e]=t};u(p,j)||defineIteratorPrototypeAccessor(j,w);!q&&u(p,b)&&p[b]!==Object||defineIteratorPrototypeAccessor(b,v);v.prototype=p;a({global:!0,constructor:!0,forced:q},{Iterator:v})},1148(e,t,n){var a=n(6518),r=n(9565),s=n(2652),i=n(9306),o=n(8551),l=n(1767),f=n(9539),c=n(4549)("every",TypeError);a({target:"Iterator",proto:!0,real:!0,forced:c},{every:function every(e){o(this);try{i(e)}catch(e){f(this,"throw",e)}if(c)return r(c,this,e);var t=l(this),n=0;return!s(t,function(t,a){if(!e(t,n++))return a()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},2489(e,t,n){var a=n(6518),r=n(9565),s=n(9306),i=n(8551),o=n(1767),l=n(9462),f=n(6319),c=n(6395),h=n(9539),u=n(684),m=n(4549),p=!c&&!u("filter",function(){}),d=!c&&!p&&m("filter",TypeError),g=c||p||d,b=l(function(){for(var e,t,n=this.iterator,a=this.predicate,s=this.next;;){e=i(r(s,n));if(this.done=!!e.done)return;t=e.value;if(f(n,a,[t,this.counter++],!0))return t}});a({target:"Iterator",proto:!0,real:!0,forced:g},{filter:function filter(e){i(this);try{s(e)}catch(e){h(this,"throw",e)}return d?r(d,this,e):new b(o(this),{predicate:e})}})},116(e,t,n){var a=n(6518),r=n(9565),s=n(2652),i=n(9306),o=n(8551),l=n(1767),f=n(9539),c=n(4549)("find",TypeError);a({target:"Iterator",proto:!0,real:!0,forced:c},{find:function find(e){o(this);try{i(e)}catch(e){f(this,"throw",e)}if(c)return r(c,this,e);var t=l(this),n=0;return s(t,function(t,a){if(e(t,n++))return a(t)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})},531(e,t,n){var a=n(6518),r=n(9565),s=n(9306),i=n(8551),o=n(1767),l=n(8646),f=n(9462),c=n(9539),h=n(6395),u=n(684),m=n(4549);var p=!h&&!u("flatMap",function(){}),d=!h&&!p&&m("flatMap",TypeError),g=h||p||d||function throwsOnIteratorWithoutReturn(){try{var e=Iterator.prototype.flatMap.call(new Map([[4,5]]).entries(),function(e){return e});e.next();e.return()}catch(e){return!0}}(),b=f(function(){for(var e,t,n=this.iterator,a=this.mapper;;){if(t=this.inner)try{if(!(e=i(r(t.next,t.iterator))).done)return e.value;this.inner=null}catch(e){c(n,"throw",e)}e=i(r(this.next,n));if(this.done=!!e.done)return;try{this.inner=l(a(e.value,this.counter++),!1)}catch(e){c(n,"throw",e)}}});a({target:"Iterator",proto:!0,real:!0,forced:g},{flatMap:function flatMap(e){i(this);try{s(e)}catch(e){c(this,"throw",e)}return d?r(d,this,e):new b(o(this),{mapper:e,inner:null})}})},7588(e,t,n){var a=n(6518),r=n(9565),s=n(2652),i=n(9306),o=n(8551),l=n(1767),f=n(9539),c=n(4549)("forEach",TypeError);a({target:"Iterator",proto:!0,real:!0,forced:c},{forEach:function forEach(e){o(this);try{i(e)}catch(e){f(this,"throw",e)}if(c)return r(c,this,e);var t=l(this),n=0;s(t,function(t){e(t,n++)},{IS_RECORD:!0})}})},1701(e,t,n){var a=n(6518),r=n(9565),s=n(9306),i=n(8551),o=n(1767),l=n(9462),f=n(6319),c=n(9539),h=n(684),u=n(4549),m=n(6395),p=!m&&!h("map",function(){}),d=!m&&!p&&u("map",TypeError),g=m||p||d,b=l(function(){var e=this.iterator,t=i(r(this.next,e));if(!(this.done=!!t.done))return f(e,this.mapper,[t.value,this.counter++],!0)});a({target:"Iterator",proto:!0,real:!0,forced:g},{map:function map(e){i(this);try{s(e)}catch(e){c(this,"throw",e)}return d?r(d,this,e):new b(o(this),{mapper:e})}})},8237(e,t,n){var a=n(6518),r=n(2652),s=n(9306),i=n(8551),o=n(1767),l=n(9539),f=n(4549),c=n(8745),h=n(9039),u=TypeError,m=h(function(){[].keys().reduce(function(){},void 0)}),p=!m&&f("reduce",u);a({target:"Iterator",proto:!0,real:!0,forced:m||p},{reduce:function reduce(e){i(this);try{s(e)}catch(e){l(this,"throw",e)}var t=arguments.length<2,n=t?void 0:arguments[1];if(p)return c(p,this,t?[e]:[e,n]);var a=o(this),f=0;r(a,function(a){if(t){t=!1;n=a}else n=e(n,a,f);f++},{IS_RECORD:!0});if(t)throw new u("Reduce of empty iterator with no initial value");return n}})},3579(e,t,n){var a=n(6518),r=n(9565),s=n(2652),i=n(9306),o=n(8551),l=n(1767),f=n(9539),c=n(4549)("some",TypeError);a({target:"Iterator",proto:!0,real:!0,forced:c},{some:function some(e){o(this);try{i(e)}catch(e){f(this,"throw",e)}if(c)return r(c,this,e);var t=l(this),n=0;return s(t,function(t,a){if(e(t,n++))return a()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},1806(e,t,n){var a=n(6518),r=n(8551),s=n(4659),i=n(2652),o=n(1767);a({target:"Iterator",proto:!0,real:!0},{toArray:function toArray(){var e=[],t=0;i(o(r(this)),function(n){s(e,t++,n)},{IS_RECORD:!0});return e}})},3110(e,t,n){var a=n(6518),r=n(7751),s=n(8745),i=n(9565),o=n(9504),l=n(9039),f=n(4376),c=n(4901),h=n(5810),u=n(757),m=n(2195),p=n(655),d=n(7680),g=n(8235),b=n(3392),w=n(4495),j=n(7819),k=String,y=r("JSON","stringify"),q=o(/./.exec),v=o("".charAt),S=o("".charCodeAt),x=o("".replace),C=o("".slice),T=o([].push),O=o(1.1.toString),R=/[\uD800-\uDFFF]/g,H=/^[\uD800-\uDBFF]$/,D=/^[\uDC00-\uDFFF]$/,M=b(),E=M.length,N=!w||l(function(){var e=r("Symbol")("stringify detection");return"[null]"!==y([e])||"{}"!==y({a:e})||"{}"!==y(Object(e))}),z=l(function(){return'"\\udf06\\ud834"'!==y("\udf06\ud834")||'"\\udead"'!==y("\udead")}),_=N?function(e,t){var n=d(arguments),a=getReplacerFunction(t);if(c(a)||void 0!==e&&!u(e)){n[1]=function(e,t){c(a)&&(t=i(a,this,k(e),t));if(!u(t))return t};return s(y,null,n)}}:y,fixIllFormedJSON=function(e,t,n){var a=v(n,t-1),r=v(n,t+1);return q(H,e)&&!q(D,r)||q(D,e)&&!q(H,a)?"\\u"+O(S(e,0),16):e},getReplacerFunction=function(e){if(c(e))return e;if(f(e)){for(var t=e.length,n=[],a=0;a<t;a++){var r=e[a];"string"==typeof r?T(n,r):"number"!=typeof r&&"Number"!==m(r)&&"String"!==m(r)||T(n,p(r))}var s=n.length,i=!0;return function(e,t){if(i){i=!1;return t}if(f(this))return t;for(var a=0;a<s;a++)if(n[a]===e)return t}}};y&&a({target:"JSON",stat:!0,arity:3,forced:N||z||!j},{stringify:function stringify(e,t,n){var a=getReplacerFunction(t),r=[],s=_(e,function(e,t){var n=c(a)?i(a,this,k(e),t):t;return!j&&h(n)?M+(T(r,n.rawJSON)-1):n},n);if("string"!=typeof s)return s;z&&(s=x(s,R,fixIllFormedJSON));if(j)return s;for(var o="",l=s.length,f=0;f<l;f++){var u=v(s,f);if('"'===u){var m=g(s,++f).end-1,p=C(s,f,m);o+=C(p,0,E)===M?r[C(p,E)]:'"'+p+'"';f=m}else o+=u}return o}})},2731(e,t,n){var a=n(6518),r=n(9306),s=n(6194),i=n(2248),o=n(6395),l=i.get,f=i.has,c=i.set;a({target:"Map",proto:!0,real:!0,forced:o},{getOrInsertComputed:function getOrInsertComputed(e,t){s(this);r(t);if(f(this,e))return l(this,e);0===e&&1/e==-1/0&&(e=0);var n=t(e);c(this,e,n);return n}})},5367(e,t,n){var a=n(6518),r=n(6194),s=n(2248),i=n(6395),o=s.get,l=s.has,f=s.set;a({target:"Map",proto:!0,real:!0,forced:i},{getOrInsert:function getOrInsert(e,t){if(l(r(this),e))return o(this,e);f(this,e,t);return t}})},3068(e,t,n){var a=n(6518),r=n(9504),s=n(2652),i=RangeError,o=TypeError,l=1/0,f=Math.abs,c=Math.pow,h=r([].push),u=c(2,1023),m=c(2,53)-1,p=Number.MAX_VALUE,d=c(2,971),g={},b={},w={},j={},k={},twosum=function(e,t){var n=e+t;return{hi:n,lo:t-(n-e)}};a({target:"Math",stat:!0},{sumPrecise:function sumPrecise(e){var t=[],n=0,a=j;s(e,function(e){if(++n>=m)throw new i("Maximum allowed index exceeded");if("number"!=typeof e)throw new o("Value is not a number");if(a!==g)if(e!=e)a=g;else if(e===l)a=a===b?g:w;else if(e===-1/0)a=a===w?g:b;else if(!(0===e&&1/e!==l||a!==j&&a!==k)){a=k;h(t,e)}});switch(a){case g:return NaN;case b:return-1/0;case w:return l;case j:return-0}for(var r,c,y,q,v,S,x=[],C=0,T=0;T<t.length;T++){r=t[T];for(var O=0,R=0;R<x.length;R++){c=x[R];if(f(r)<f(c)){S=r;r=c;c=S}q=(y=twosum(r,c)).hi;v=y.lo;if(f(q)===l){var H=q===l?1:-1;C+=H;if(f(r=r-H*u-H*u)<f(c)){S=r;r=c;c=S}q=(y=twosum(r,c)).hi;v=y.lo}0!==v&&(x[O++]=v);r=q}x.length=O;0!==r&&h(x,r)}var D=x.length-1;q=0;v=0;if(0!==C){var M=D>=0?x[D]:0;D--;if(f(C)>1||C>0&&M>0||C<0&&M<0)return C>0?l:-1/0;q=(y=twosum(C*u,M/2)).hi;v=y.lo;v*=2;if(f(2*q)===l)return q>0?q===u&&v===-d/2&&D>=0&&x[D]<0?p:l:q===-u&&v===d/2&&D>=0&&x[D]>0?-p:-1/0;if(0!==v){x[++D]=v;v=0}q*=2}for(;D>=0;){q=(y=twosum(q,x[D--])).hi;if(0!==(v=y.lo))break}D>=0&&(v<0&&x[D]<0||v>0&&x[D]>0)&&(c=2*v)===(r=q+c)-q&&(q=r);return q}})},1689(e,t,n){var a=n(6518),r=n(4576),s=n(8745),i=n(7680),o=n(6043),l=n(9306),f=n(1103),c=r.Promise,h=!1;a({target:"Promise",stat:!0,forced:!c||!c.try||f(function(){c.try(function(e){h=8===e},8)}).error||!h},{try:function(e){var t=arguments.length>1?i(arguments,1):[],n=o.f(this),a=f(function(){return s(l(e),void 0,t)});(a.error?n.reject:n.resolve)(a.value);return n.promise}})},4628(e,t,n){var a=n(6518),r=n(6043);a({target:"Promise",stat:!0},{withResolvers:function withResolvers(){var e=r.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}})},7642(e,t,n){var a=n(6518),r=n(3440),s=n(9039);a({target:"Set",proto:!0,real:!0,forced:!n(4916)("difference",function(e){return 0===e.size})||s(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var n=e++>1;t.has(1)&&t.clear();return{done:n,value:2}}}}},t=new Set([1,2,3,4]);return 3!==t.difference(e).size})},{difference:r})},8004(e,t,n){var a=n(6518),r=n(9039),s=n(8750);a({target:"Set",proto:!0,real:!0,forced:!n(4916)("intersection",function(e){return 2===e.size&&e.has(1)&&e.has(2)})||r(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:s})},3853(e,t,n){var a=n(6518),r=n(4449);a({target:"Set",proto:!0,real:!0,forced:!n(4916)("isDisjointFrom",function(e){return!e})},{isDisjointFrom:r})},5876(e,t,n){var a=n(6518),r=n(3838);a({target:"Set",proto:!0,real:!0,forced:!n(4916)("isSubsetOf",function(e){return e})},{isSubsetOf:r})},2475(e,t,n){var a=n(6518),r=n(8527);a({target:"Set",proto:!0,real:!0,forced:!n(4916)("isSupersetOf",function(e){return!e})},{isSupersetOf:r})},5024(e,t,n){var a=n(6518),r=n(3650),s=n(9835);a({target:"Set",proto:!0,real:!0,forced:!n(4916)("symmetricDifference")||!s("symmetricDifference")},{symmetricDifference:r})},1698(e,t,n){var a=n(6518),r=n(4204),s=n(9835);a({target:"Set",proto:!0,real:!0,forced:!n(4916)("union")||!s("union")},{union:r})},9577(e,t,n){var a=n(4644),r=n(1108),s=n(6198),i=n(1291),o=n(5854),l=a.aTypedArray,f=a.getTypedArrayConstructor,c=a.exportTypedArrayMethod,h=RangeError,u=function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}(),m=u&&function(){try{new Int8Array(1).with(-.5,1)}catch(e){return!0}}();c("with",{with:function(e,t){var n=l(this),a=s(n),c=i(e),u=c<0?a+c:c,m=r(n)?o(t):+t;if(u>=a||u<0)throw new h("Incorrect index");for(var p=new(f(n))(a),d=0;d<a;d++)p[d]=d===u?m:n[d];return p}}.with,!u||m)},5213(e,t,n){var a=n(6518),r=n(4576),s=n(5370),i=n(9143),o=r.Uint8Array,l=!o||!o.fromBase64||!function(){try{o.fromBase64("a");return}catch(e){}try{o.fromBase64("",null)}catch(e){return!0}}();o&&a({target:"Uint8Array",stat:!0,forced:l},{fromBase64:function fromBase64(e){var t=i(e,arguments.length>1?arguments[1]:void 0,null,9007199254740991);return s(o,t.bytes)}})},6632(e,t,n){var a=n(6518),r=n(4576),s=n(9143),i=n(4154),o=r.Uint8Array,l=!o||!o.prototype.setFromBase64||!function(){var e=new o([255,255,255,255,255]);try{e.setFromBase64("",null);return}catch(e){}try{e.setFromBase64("a");return}catch(e){}try{e.setFromBase64("MjYyZg===")}catch(t){return 50===e[0]&&54===e[1]&&50===e[2]&&255===e[3]&&255===e[4]}}();o&&a({target:"Uint8Array",proto:!0,forced:l},{setFromBase64:function setFromBase64(e){i(this);var t=s(e,arguments.length>1?arguments[1]:void 0,this,this.length);return{read:t.read,written:t.written}}})},4226(e,t,n){var a=n(6518),r=n(4576),s=n(3463),i=n(4154),o=n(5169),l=n(2303);r.Uint8Array&&a({target:"Uint8Array",proto:!0,forced:function throwsOnLengthTrackingView(){try{var e=new ArrayBuffer(16,{maxByteLength:1024});new Uint8Array(e).setFromHex("cafed00d")}catch(e){return!0}}()},{setFromHex:function setFromHex(e){i(this);s(e);o(this.buffer);var t=l(e,this).read;return{read:t,written:t/2}}})},9486(e,t,n){var a=n(6518),r=n(4576),s=n(9504),i=n(3972),o=n(4154),l=n(5169),f=n(2804),c=n(944),h=f.i2c,u=f.i2cUrl,m=s("".charAt),p=r.Uint8Array,d=!p||!p.prototype.toBase64||!function(){try{(new p).toBase64(null)}catch(e){return!0}}();p&&a({target:"Uint8Array",proto:!0,forced:d},{toBase64:function toBase64(){var e=o(this),t=arguments.length?i(arguments[0]):void 0,n="base64"===c(t)?h:u,a=!!t&&!!t.omitPadding;l(this.buffer);for(var r,s="",f=0,p=e.length,at=function(e){return m(n,r>>6*e&63)};f+2<p;f+=3){r=(e[f]<<16)+(e[f+1]<<8)+e[f+2];s+=at(3)+at(2)+at(1)+at(0)}if(f+2===p){r=(e[f]<<16)+(e[f+1]<<8);s+=at(3)+at(2)+at(1)+(a?"":"=")}else if(f+1===p){r=e[f]<<16;s+=at(3)+at(2)+(a?"":"==")}return s}})},456(e,t,n){var a=n(6518),r=n(4576),s=n(9504),i=n(4154),o=n(5169),l=s(1.1.toString),f=r.Uint8Array,c=!f||!f.prototype.toHex||!function(){try{return"ffffffffffffffff"===new f([255,255,255,255,255,255,255,255]).toHex()}catch(e){return!1}}();f&&a({target:"Uint8Array",proto:!0,forced:c},{toHex:function toHex(){i(this);o(this.buffer);for(var e="",t=0,n=this.length;t<n;t++){var a=l(this[t],16);e+=1===a.length?"0"+a:a}return e}})},9452(e,t,n){var a=n(6518),r=n(9306),s=n(6557),i=n(4328),o=n(4995),l=n(6395),f=o.get,c=o.has,h=o.set;a({target:"WeakMap",proto:!0,real:!0,forced:l||!function(){try{WeakMap.prototype.getOrInsertComputed&&(new WeakMap).getOrInsertComputed(1,function(){throw 1})}catch(e){return e instanceof TypeError}}()},{getOrInsertComputed:function getOrInsertComputed(e,t){s(this);i(e);r(t);if(c(this,e))return f(this,e);var n=t(e);h(this,e,n);return n}})},8454(e,t,n){var a=n(6518),r=n(6557),s=n(4995),i=n(6395),o=s.get,l=s.has,f=s.set;a({target:"WeakMap",proto:!0,real:!0,forced:i},{getOrInsert:function getOrInsert(e,t){if(l(r(this),e))return o(this,e);f(this,e,t);return t}})},3611(e,t,n){var a=n(6518),r=n(4576),s=n(2106),i=n(3724),o=TypeError,l=Object.defineProperty,f=r.self!==r;try{if(i){var c=Object.getOwnPropertyDescriptor(r,"self");!f&&c&&c.get&&c.enumerable||s(r,"self",{get:function self(){return r},set:function self(e){if(this!==r)throw new o("Illegal invocation");l(r,"self",{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else a({global:!0,simple:!0,forced:f},{self:r})}catch(e){}},4603(e,t,n){var a=n(6840),r=n(9504),s=n(655),i=n(2812),o=URLSearchParams,l=o.prototype,f=r(l.append),c=r(l.delete),h=r(l.forEach),u=r([].push),m=new o("a=1&a=2&b=3");m.delete("a",1);m.delete("b",void 0);m+""!="a=2"&&a(l,"delete",function(e){var t=arguments.length,n=t<2?void 0:arguments[1];if(t&&void 0===n)return c(this,e);var a=[];h(this,function(e,t){u(a,{key:t,value:e})});i(t,1);for(var r,o=s(e),l=s(n),m=0,p=0,d=!1,g=a.length;m<g;){r=a[m++];if(d||r.key===o){d=!0;c(this,r.key)}else p++}for(;p<g;)(r=a[p++]).key===o&&r.value===l||f(this,r.key,r.value)},{enumerable:!0,unsafe:!0})},7566(e,t,n){var a=n(6840),r=n(9504),s=n(655),i=n(2812),o=URLSearchParams,l=o.prototype,f=r(l.getAll),c=r(l.has),h=new o("a=1");!h.has("a",2)&&h.has("a",void 0)||a(l,"has",function has(e){var t=arguments.length,n=t<2?void 0:arguments[1];if(t&&void 0===n)return c(this,e);var a=f(this,e);i(t,1);for(var r=s(n),o=0;o<a.length;)if(a[o++]===r)return!0;return!1},{enumerable:!0,unsafe:!0})},8721(e,t,n){var a=n(3724),r=n(9504),s=n(2106),i=URLSearchParams.prototype,o=r(i.forEach);a&&!("size"in i)&&s(i,"size",{get:function size(){var e=0;o(this,function(){e++});return e},configurable:!0,enumerable:!0})},5781(e,t,n){var a=n(6518),r=n(7751),s=n(2812),i=n(655),o=n(7416),l=r("URL");a({target:"URL",stat:!0,forced:!o},{parse:function parse(e){var t=s(arguments.length,1),n=i(e),a=t<2||void 0===arguments[1]?void 0:i(arguments[1]);try{return new l(n,a)}catch(e){return null}}})}},t={};function __webpack_require__(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};e[n].call(r.exports,r,r.exports,__webpack_require__);return r.exports}__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})};__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);__webpack_require__(4114),__webpack_require__(6573),__webpack_require__(8100),__webpack_require__(7936),__webpack_require__(8111),__webpack_require__(2489),__webpack_require__(1701),__webpack_require__(3579),__webpack_require__(5367),__webpack_require__(2731),__webpack_require__(4628),__webpack_require__(7642),__webpack_require__(8004),__webpack_require__(3853),__webpack_require__(5876),__webpack_require__(2475),__webpack_require__(5024),__webpack_require__(1698),__webpack_require__(9577),__webpack_require__(6632),__webpack_require__(4226),__webpack_require__(9486),__webpack_require__(456),__webpack_require__(3611),__webpack_require__(8237),__webpack_require__(3068),__webpack_require__(5781);const n=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type),a=[.001,0,0,.001,0,0],r=1.35,s=.35,i=.25925925925925924,o=1,l=2,f=4,c=8,h=16,u=64,m=128,p=256,d="pdfjs_internal_editor_",g=3,b=9,w=13,j=15,k=101,y={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},q=1,v=2,S=3,x=0,C=4,T=1,O=2,R=3,H={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},D="Group",M="R",E=1,N=2,z=4,_=16,L=32,U=128,X=512,W=1,K=2,V=4096,G=8192,$=32768,Y=65536,J=131072,Q=1048576,Z=2097152,ee=8388608,te=16777216,ne=1,ae=2,re=3,se=4,ie=5,oe={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},le={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},fe={O:"PageOpen",C:"PageClose"},ce=1,he=5,ue=1,me=2,pe=3,de=4,ge=5,be=6,we=7,je=8,ke=9,ye=10,qe=11,ve=12,Se=13,xe=14,Ae=15,Ce=16,Ie=17,Fe=18,Te=19,Oe=20,Re=21,Be=22,He=23,De=24,Me=25,Pe=26,Ee=27,Ne=28,ze=29,_e=30,Le=31,Ue=32,Xe=33,We=34,Ke=35,Ve=36,Ge=37,$e=38,Ye=39,Je=40,Qe=41,Ze=42,et=43,tt=44,nt=45,rt=46,st=47,it=48,ot=49,lt=50,ft=51,ct=52,ht=53,ut=54,mt=55,pt=56,dt=57,gt=58,bt=59,wt=60,jt=61,kt=62,yt=63,qt=64,vt=65,St=66,xt=67,At=68,Ct=69,It=70,Ft=71,Tt=72,Ot=73,Rt=74,Bt=75,Ht=76,Dt=77,Mt=80,Pt=81,Et=83,Nt=84,zt=85,_t=86,Lt=87,Ut=88,Xt=89,Wt=90,Kt=91,Vt=92,Gt=93,$t=94,Yt=0,Jt=1,Qt=2,Zt=3,en=4,tn=1,nn=2;let an=ce;function getVerbosityLevel(){return an}function info(e){an>=he&&console.info(`Info: ${e}`)}function warn(e){an>=ce&&console.warn(`Warning: ${e}`)}function unreachable(e){throw new Error(e)}function assert(e,t){e||unreachable(t)}function createValidAbsoluteUrl(e,t=null,n=null){if(!e)return null;if(n&&"string"==typeof e){if(n.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\./g);t?.length>=2&&(e=`http://${e}`)}if(n.tryConvertEncoding)try{e=stringToUTF8String(e)}catch{}}const a=t?URL.parse(e,t):URL.parse(e);return function _isValidProtocol(e){switch(e?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(a)?a:null}function shadow(e,t,n,a=!1){Object.defineProperty(e,t,{value:n,enumerable:!a,configurable:!0,writable:!1});return n}const rn=function BaseExceptionClosure(){function BaseException(e,t){this.message=e;this.name=t}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();class PasswordException extends rn{constructor(e,t){super(e,"PasswordException");this.code=t}}class UnknownErrorException extends rn{constructor(e,t){super(e,"UnknownErrorException");this.details=t}}class InvalidPDFException extends rn{constructor(e){super(e,"InvalidPDFException")}}class ResponseException extends rn{constructor(e,t,n){super(e,"ResponseException");this.status=t;this.missing=n}}class FormatError extends rn{constructor(e){super(e,"FormatError")}}class AbortException extends rn{constructor(e){super(e,"AbortException")}}function bytesToString(e){"object"==typeof e&&void 0!==e?.length||unreachable("Invalid argument for bytesToString");const t=e.length,n=8192;if(t<n)return String.fromCharCode.apply(null,e);const a=[];for(let r=0;r<t;r+=n){const s=Math.min(r+n,t),i=e.subarray(r,s);a.push(String.fromCharCode.apply(null,i))}return a.join("")}function stringToBytes(e){"string"!=typeof e&&unreachable("Invalid argument for stringToBytes");const t=e.length,n=new Uint8Array(t);for(let a=0;a<t;++a)n[a]=255&e.charCodeAt(a);return n}function string32(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function objectSize(e){return Object.keys(e).length}class FeatureTest{static get isLittleEndian(){return shadow(this,"isLittleEndian",function isLittleEndian(){const e=new Uint8Array(4);e[0]=1;return 1===new Uint32Array(e.buffer,0,1)[0]}())}static get isEvalSupported(){return shadow(this,"isEvalSupported",function isEvalSupported(){try{new Function("");return!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return shadow(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get isImageDecoderSupported(){return shadow(this,"isImageDecoderSupported","undefined"!=typeof ImageDecoder)}static get isFloat16ArraySupported(){return shadow(this,"isFloat16ArraySupported","undefined"!=typeof Float16Array)}static get isSanitizerSupported(){return shadow(this,"isSanitizerSupported","undefined"!=typeof Sanitizer)}static get platform(){const{platform:e,userAgent:t}=navigator;return shadow(this,"platform",{isAndroid:t.includes("Android"),isLinux:e.includes("Linux"),isMac:e.includes("Mac"),isWindows:e.includes("Win"),isFirefox:t.includes("Firefox")})}static get isCSSRoundSupported(){return shadow(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}}const sn=Array.from(Array(256).keys(),e=>e.toString(16).padStart(2,"0"));class Util{static makeHexColor(e,t,n){return`#${sn[e]}${sn[t]}${sn[n]}`}static domMatrixToTransform(e){return[e.a,e.b,e.c,e.d,e.e,e.f]}static scaleMinMax(e,t){let n;if(e[0]){if(e[0]<0){n=t[0];t[0]=t[2];t[2]=n}t[0]*=e[0];t[2]*=e[0];if(e[3]<0){n=t[1];t[1]=t[3];t[3]=n}t[1]*=e[3];t[3]*=e[3]}else{n=t[0];t[0]=t[1];t[1]=n;n=t[2];t[2]=t[3];t[3]=n;if(e[1]<0){n=t[1];t[1]=t[3];t[3]=n}t[1]*=e[1];t[3]*=e[1];if(e[2]<0){n=t[0];t[0]=t[2];t[2]=n}t[0]*=e[2];t[2]*=e[2]}t[0]+=e[4];t[1]+=e[5];t[2]+=e[4];t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static multiplyByDOMMatrix(e,t){return[e[0]*t.a+e[2]*t.b,e[1]*t.a+e[3]*t.b,e[0]*t.c+e[2]*t.d,e[1]*t.c+e[3]*t.d,e[0]*t.e+e[2]*t.f+e[4],e[1]*t.e+e[3]*t.f+e[5]]}static applyTransform(e,t,n=0){const a=e[n],r=e[n+1];e[n]=a*t[0]+r*t[2]+t[4];e[n+1]=a*t[1]+r*t[3]+t[5]}static applyTransformToBezier(e,t,n=0){const a=t[0],r=t[1],s=t[2],i=t[3],o=t[4],l=t[5];for(let t=0;t<6;t+=2){const f=e[n+t],c=e[n+t+1];e[n+t]=f*a+c*s+o;e[n+t+1]=f*r+c*i+l}}static applyInverseTransform(e,t){const n=e[0],a=e[1],r=t[0]*t[3]-t[1]*t[2];e[0]=(n*t[3]-a*t[2]+t[2]*t[5]-t[4]*t[3])/r;e[1]=(-n*t[1]+a*t[0]+t[4]*t[1]-t[5]*t[0])/r}static axialAlignedBoundingBox(e,t,n){const a=t[0],r=t[1],s=t[2],i=t[3],o=t[4],l=t[5],f=e[0],c=e[1],h=e[2],u=e[3];let m=a*f+o,p=m,d=a*h+o,g=d,b=i*c+l,w=b,j=i*u+l,k=j;if(0!==r||0!==s){const e=r*f,t=r*h,n=s*c,a=s*u;m+=n;g+=n;d+=a;p+=a;b+=e;k+=e;j+=t;w+=t}n[0]=Math.min(n[0],m,d,p,g);n[1]=Math.min(n[1],b,j,w,k);n[2]=Math.max(n[2],m,d,p,g);n[3]=Math.max(n[3],b,j,w,k)}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e,t){const n=e[0],a=e[1],r=e[2],s=e[3],i=n**2+a**2,o=n*r+a*s,l=r**2+s**2,f=(i+l)/2,c=Math.sqrt(f**2-(i*l-o**2));t[0]=Math.sqrt(f+c||1);t[1]=Math.sqrt(f-c||1)}static normalizeRect(e){const t=e.slice(0);if(e[0]>e[2]){t[0]=e[2];t[2]=e[0]}if(e[1]>e[3]){t[1]=e[3];t[3]=e[1]}return t}static intersect(e,t){const n=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),a=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(n>a)return null;const r=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),s=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return r>s?null:[n,r,a,s]}static pointBoundingBox(e,t,n){n[0]=Math.min(n[0],e);n[1]=Math.min(n[1],t);n[2]=Math.max(n[2],e);n[3]=Math.max(n[3],t)}static rectBoundingBox(e,t,n,a,r){r[0]=Math.min(r[0],e,n);r[1]=Math.min(r[1],t,a);r[2]=Math.max(r[2],e,n);r[3]=Math.max(r[3],t,a)}static#e(e,t,n,a,r,s,i,o,l,f){if(l<=0||l>=1)return;const c=1-l,h=l*l,u=h*l,m=c*(c*(c*e+3*l*t)+3*h*n)+u*a,p=c*(c*(c*r+3*l*s)+3*h*i)+u*o;f[0]=Math.min(f[0],m);f[1]=Math.min(f[1],p);f[2]=Math.max(f[2],m);f[3]=Math.max(f[3],p)}static#t(e,t,n,a,r,s,i,o,l,f,c,h){if(Math.abs(l)<1e-12){Math.abs(f)>=1e-12&&this.#e(e,t,n,a,r,s,i,o,-c/f,h);return}const u=f**2-4*c*l;if(u<0)return;const m=Math.sqrt(u),p=2*l;this.#e(e,t,n,a,r,s,i,o,(-f+m)/p,h);this.#e(e,t,n,a,r,s,i,o,(-f-m)/p,h)}static bezierBoundingBox(e,t,n,a,r,s,i,o,l){l[0]=Math.min(l[0],e,i);l[1]=Math.min(l[1],t,o);l[2]=Math.max(l[2],e,i);l[3]=Math.max(l[3],t,o);this.#t(e,n,r,i,t,a,s,o,3*(3*(n-r)-e+i),6*(e-2*n+r),3*(n-e),l);this.#t(e,n,r,i,t,a,s,o,3*(3*(a-s)-t+o),6*(t-2*a+s),3*(a-t),l)}}const on=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,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,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,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function stringToPDFString(e,t=!1){if(e[0]>="ï"){let n;if("þ"===e[0]&&"ÿ"===e[1]){n="utf-16be";e.length%2==1&&(e=e.slice(0,-1))}else if("ÿ"===e[0]&&"þ"===e[1]){n="utf-16le";e.length%2==1&&(e=e.slice(0,-1))}else"ï"===e[0]&&"»"===e[1]&&"¿"===e[2]&&(n="utf-8");if(n)try{const a=new TextDecoder(n,{fatal:!0}),r=stringToBytes(e),s=a.decode(r);return t||!s.includes("")?s:s.replaceAll(/\x1b[^\x1b]*(?:\x1b|$)/g,"")}catch(e){warn(`stringToPDFString: "${e}".`)}}const n=[];for(let a=0,r=e.length;a<r;a++){const s=e.charCodeAt(a);if(!t&&27===s){for(;++a<r&&27!==e.charCodeAt(a););continue}const i=on[s];n.push(i?String.fromCharCode(i):e.charAt(a))}return n.join("")}function stringToUTF8String(e){return decodeURIComponent(escape(e))}function utf8StringToString(e){return unescape(encodeURIComponent(e))}function isArrayEqual(e,t){if(e.length!==t.length)return!1;for(let n=0,a=e.length;n<a;n++)if(e[n]!==t[n])return!1;return!0}function getModificationDate(e=new Date){e instanceof Date||(e=new Date(e));return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")}let ln=null,fn=null;const makeArr=()=>[],makeMap=()=>new Map,makeObj=()=>Object.create(null);function MathClamp(e,t,n){return Math.min(Math.max(e,t),n)}"function"!=typeof Response.prototype.bytes&&(Response.prototype.bytes=async function(){return new Uint8Array(await this.arrayBuffer())});"function"!=typeof AbortSignal.any&&(AbortSignal.any=function(e){const t=new AbortController,{signal:n}=t;for(const a of e)if(a.aborted){t.abort(a.reason);return n}for(const a of e)a.addEventListener("abort",()=>{t.abort(a.reason)},{signal:n});return n});__webpack_require__(1148);const cn=Symbol("CIRCULAR_REF"),hn=Symbol("EOF");let un=Object.create(null),mn=Object.create(null),pn=Object.create(null);class Name{constructor(e){this.name=e}static get(e){return mn[e]||=new Name(e)}}class Cmd{constructor(e){this.cmd=e}static get(e){return un[e]||=new Cmd(e)}}const dn=function nonSerializableClosure(){return dn};class Dict{constructor(e=null){this._map=new Map;this.xref=e;this.objId=null;this.suppressEncryption=!1;this.__nonSerializable__=dn}assignXref(e){this.xref=e}get size(){return this._map.size}get(e,t,n){let a=this._map.get(e);if(void 0===a&&void 0!==t){a=this._map.get(t);void 0===a&&void 0!==n&&(a=this._map.get(n))}return a instanceof Ref&&this.xref?this.xref.fetch(a,this.suppressEncryption):a}async getAsync(e,t,n){let a=this._map.get(e);if(void 0===a&&void 0!==t){a=this._map.get(t);void 0===a&&void 0!==n&&(a=this._map.get(n))}return a instanceof Ref&&this.xref?this.xref.fetchAsync(a,this.suppressEncryption):a}getArray(e,t,n){let a=this._map.get(e);if(void 0===a&&void 0!==t){a=this._map.get(t);void 0===a&&void 0!==n&&(a=this._map.get(n))}a instanceof Ref&&this.xref&&(a=this.xref.fetch(a,this.suppressEncryption));if(Array.isArray(a)){a=a.slice();for(let e=0,t=a.length;e<t;e++)a[e]instanceof Ref&&this.xref&&(a[e]=this.xref.fetch(a[e],this.suppressEncryption))}return a}getRaw(e){return this._map.get(e)}getKeys(){return[...this._map.keys()]}getRawValues(){return[...this._map.values()]}getRawEntries(){return this._map.entries()}set(e,t){this._map.set(e,t)}setIfNotExists(e,t){this.has(e)||this.set(e,t)}setIfNumber(e,t){"number"==typeof t&&this.set(e,t)}setIfArray(e,t){(Array.isArray(t)||ArrayBuffer.isView(t))&&this.set(e,t)}setIfDefined(e,t){null!=t&&this.set(e,t)}setIfName(e,t){"string"==typeof t?this.set(e,Name.get(t)):t instanceof Name&&this.set(e,t)}setIfDict(e,t){t instanceof Dict&&this.set(e,t)}has(e){return this._map.has(e)}*[Symbol.iterator](){for(const[e,t]of this._map)yield[e,t instanceof Ref&&this.xref?this.xref.fetch(t,this.suppressEncryption):t]}static get empty(){const e=new Dict(null);e.set=(e,t)=>{unreachable("Should not call `set` on the empty dictionary.")};return shadow(this,"empty",e)}static merge({xref:e,dictArray:t,mergeSubDicts:n=!1}){const a=new Dict(e),r=new Map;for(const e of t)if(e instanceof Dict)for(const[t,a]of e._map){let e=r.get(t);if(void 0===e){e=[];r.set(t,e)}else if(!(n&&a instanceof Dict))continue;e.push(a)}for(const[t,n]of r){if(1===n.length||!(n[0]instanceof Dict)){a._map.set(t,n[0]);continue}const r=new Dict(e);for(const e of n)for(const[t,n]of e._map)r._map.has(t)||r._map.set(t,n);r.size>0&&a._map.set(t,r)}r.clear();return a.size>0?a:Dict.empty}clone(){const e=new Dict(this.xref);for(const t of this.getKeys())e.set(t,this.getRaw(t));return e}delete(e){this._map.delete(e)}}class Ref{constructor(e,t){this.num=e;this.gen=t}toString(){return 0===this.gen?`${this.num}R`:`${this.num}R${this.gen}`}static fromString(e){const t=pn[e];if(t)return t;const n=/^(\d+)R(\d*)$/.exec(e);return n&&"0"!==n[1]?pn[e]=new Ref(parseInt(n[1]),n[2]?parseInt(n[2]):0):null}static get(e,t){const n=0===t?`${e}R`:`${e}R${t}`;return pn[n]||=new Ref(e,t)}}class RefSet{constructor(e=null){this._set=new Set(e?._set)}has(e){return this._set.has(e.toString())}put(e){this._set.add(e.toString())}remove(e){this._set.delete(e.toString())}[Symbol.iterator](){return this._set.values()}clear(){this._set.clear()}}class RefSetCache{_map=new Map;get size(){return this._map.size}get(e){return this._map.get(e.toString())}has(e){return this._map.has(e.toString())}put(e,t){this._map.set(e.toString(),t)}putAlias(e,t){this._map.set(e.toString(),this.get(t))}[Symbol.iterator](){return this._map.values()}clear(){this._map.clear()}*values(){yield*this._map.values()}*items(){for(const[e,t]of this._map)yield[Ref.fromString(e),t]}*keys(){for(const e of this._map.keys())yield Ref.fromString(e)}}function isName(e,t){return e instanceof Name&&(void 0===t||e.name===t)}function isCmd(e,t){return e instanceof Cmd&&(void 0===t||e.cmd===t)}function isDict(e,t){return e instanceof Dict&&(void 0===t||isName(e.get("Type"),t))}function isRefsEqual(e,t){return e.num===t.num&&e.gen===t.gen}class BaseStream{get length(){unreachable("Abstract getter `length` accessed")}get isEmpty(){unreachable("Abstract getter `isEmpty` accessed")}get isDataLoaded(){return shadow(this,"isDataLoaded",!0)}getByte(){unreachable("Abstract method `getByte` called")}getBytes(e){unreachable("Abstract method `getBytes` called")}async getImageData(e,t){return this.getBytes(e,t)}async asyncGetBytes(){unreachable("Abstract method `asyncGetBytes` called")}get isAsync(){return!1}get isAsyncDecoder(){return!1}get isImageStream(){return!1}get canAsyncDecodeImageFromBuffer(){return!1}async getTransferableImage(){return null}peekByte(){const e=this.getByte();-1!==e&&this.pos--;return e}peekBytes(e){const t=this.getBytes(e);this.pos-=t.length;return t}getUint16(){const e=this.getByte(),t=this.getByte();return-1===e||-1===t?-1:(e<<8)+t}getInt32(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}getByteRange(e,t){unreachable("Abstract method `getByteRange` called")}getString(e){return bytesToString(this.getBytes(e))}skip(e){this.pos+=e||1}reset(){unreachable("Abstract method `reset` called")}moveStart(){unreachable("Abstract method `moveStart` called")}makeSubStream(e,t,n=null){unreachable("Abstract method `makeSubStream` called")}getBaseStreams(){return null}getOriginalStream(){return this.stream?.getOriginalStream()||this}}const gn=/^[1-9]\.\d$/,bn=2**31-1,wn=[1,0,0,1,0,0],jn=["ColorSpace","ExtGState","Font","Pattern","Properties","Shading","XObject"],kn=["ExtGState","Font","Properties","XObject"];function getLookupTableFactory(e){let t;return function(){if(e){t=Object.create(null);e(t);e=null}return t}}class MissingDataException extends rn{constructor(e,t){super(`Missing data [${e}, ${t})`,"MissingDataException");this.begin=e;this.end=t}}class ParserEOFException extends rn{constructor(e){super(e,"ParserEOFException")}}class XRefEntryException extends rn{constructor(e){super(e,"XRefEntryException")}}class XRefParseException extends rn{constructor(e){super(e,"XRefParseException")}}function arrayBuffersToBytes(e){const t=e.length;if(0===t)return new Uint8Array(0);if(1===t)return new Uint8Array(e[0]);let n=0;for(let a=0;a<t;a++)n+=e[a].byteLength;const a=new Uint8Array(n);let r=0;for(let n=0;n<t;n++){const t=new Uint8Array(e[n]);a.set(t,r);r+=t.byteLength}return a}async function fetchBinaryData(e){const t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch file "${e}" with "${t.statusText}".`);return t.bytes()}function getInheritableProperty({dict:e,key:t,getArray:n=!1,stopWhenFound:a=!0}){let r;const s=new RefSet;for(;e instanceof Dict&&(!e.objId||!s.has(e.objId));){e.objId&&s.put(e.objId);const i=n?e.getArray(t):e.get(t);if(void 0!==i){if(a)return i;(r||=[]).push(i)}e=e.get("Parent")}return r}const yn=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"];function toRomanNumerals(e,t=!1){assert(Number.isInteger(e)&&e>0,"The number should be a positive integer.");const n="M".repeat(e/1e3|0)+yn[e%1e3/100|0]+yn[10+(e%100/10|0)]+yn[20+e%10];return t?n.toLowerCase():n}function log2(e){return e>0?Math.ceil(Math.log2(e)):0}function readInt8(e,t){return e[t]<<24>>24}function readInt16(e,t){return(e[t]<<24|e[t+1]<<16)>>16}function readUint16(e,t){return e[t]<<8|e[t+1]}function readUint32(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function isWhiteSpace(e){return 32===e||9===e||13===e||10===e}function isNumberArray(e,t){return Array.isArray(e)?(null===t||e.length===t)&&e.every(e=>"number"==typeof e):ArrayBuffer.isView(e)&&!(e instanceof BigInt64Array||e instanceof BigUint64Array)&&(null===t||e.length===t)}function lookupMatrix(e,t){return isNumberArray(e,6)?e:t}function lookupRect(e,t){return isNumberArray(e,4)?e:t}function lookupNormalRect(e,t){return isNumberArray(e,4)?Util.normalizeRect(e):t}function parseXFAPath(e){const t=/(.+)\[(\d+)\]$/;return e.split(".").map(e=>{const n=e.match(t);return n?{name:n[1],pos:parseInt(n[2],10)}:{name:e,pos:0}})}function escapePDFName(e){const t=[];let n=0;for(let a=0,r=e.length;a<r;a++){const r=e.charCodeAt(a);if(r<33||r>126||35===r||40===r||41===r||60===r||62===r||91===r||93===r||123===r||125===r||47===r||37===r){n<a&&t.push(e.substring(n,a));t.push(`#${r.toString(16)}`);n=a+1}}if(0===t.length)return e;n<e.length&&t.push(e.substring(n,e.length));return t.join("")}function escapeString(e){return e.replaceAll(/([()\\\n\r])/g,e=>"\n"===e?"\\n":"\r"===e?"\\r":`\\${e}`)}function _collectJS(e,t,n,a){if(!e)return;let r=null;if(e instanceof Ref){if(a.has(e))return;r=e;a.put(r);e=t.fetch(e)}if(Array.isArray(e))for(const r of e)_collectJS(r,t,n,a);else if(e instanceof Dict){if(isName(e.get("S"),"JavaScript")){const t=e.get("JS");let a;t instanceof BaseStream?a=t.getString():"string"==typeof t&&(a=t);a&&=stringToPDFString(a,!0).replaceAll("\0","");a&&n.push(a.trim())}_collectJS(e.getRaw("Next"),t,n,a)}r&&a.remove(r)}function collectActions(e,t,n){const a=Object.create(null),r=getInheritableProperty({dict:t,key:"AA",stopWhenFound:!1});if(r)for(let t=r.length-1;t>=0;t--){const s=r[t];if(s instanceof Dict)for(const t of s.getKeys()){const r=n[t];if(!r)continue;const i=[];_collectJS(s.getRaw(t),e,i,new RefSet);i.length>0&&(a[r]=i)}}if(t.has("A")){const n=[];_collectJS(t.get("A"),e,n,new RefSet);n.length>0&&(a.Action=n)}return objectSize(a)>0?a:null}const qn={60:"<",62:">",38:"&",34:""",39:"'"};function*codePointIter(e){for(let t=0,n=e.length;t<n;t++){const n=e.codePointAt(t);n>55295&&(n<57344||n>65533)&&t++;yield n}}function encodeToXmlString(e){const t=[];let n=0;for(let a=0,r=e.length;a<r;a++){const r=e.codePointAt(a);if(32<=r&&r<=126){const s=qn[r];if(s){n<a&&t.push(e.substring(n,a));t.push(s);n=a+1}}else{n<a&&t.push(e.substring(n,a));t.push(`&#x${r.toString(16).toUpperCase()};`);r>55295&&(r<57344||r>65533)&&a++;n=a+1}}if(0===t.length)return e;n<e.length&&t.push(e.substring(n,e.length));return t.join("")}function validateFontName(e,t=!1){const n=/^("|').*("|')$/.exec(e);if(n&&n[1]===n[2]){if(new RegExp(`[^\\\\]${n[1]}`).test(e.slice(1,-1))){t&&warn(`FontFamily contains unescaped ${n[1]}: ${e}.`);return!1}}else for(const n of e.split(/[ \t]+/))if(/^(\d|(-(\d|-)))/.test(n)||!/^[\w-\\]+$/.test(n)){t&&warn(`FontFamily contains invalid <custom-ident>: ${e}.`);return!1}return!0}function validateCSSFont(e){const t=new Set(["100","200","300","400","500","600","700","800","900","1000","normal","bold","bolder","lighter"]),{fontFamily:n,fontWeight:a,italicAngle:r}=e;if(!validateFontName(n,!0))return!1;const s=a?a.toString():"";e.fontWeight=t.has(s)?s:"400";const i=parseFloat(r);e.italicAngle=isNaN(i)||i<-90||i>90?"14":r.toString();return!0}function recoverJsURL(e){const t=new RegExp("^\\s*("+["app.launchURL","window.open","xfa.host.gotoURL"].join("|").replaceAll(".","\\.")+")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))","i").exec(e);return t?.[2]?{url:t[2],newWindow:"app.launchURL"===t[1]&&"true"===t[3]}:null}function numberToString(e){if(Number.isInteger(e))return e.toString();const t=Math.round(100*e);return t%100==0?(t/100).toString():t%10==0?e.toFixed(1):e.toFixed(2)}function getNewAnnotationsMap(e){if(!e)return null;const t=new Map;for(const[n,a]of e)n.startsWith(d)&&t.getOrInsertComputed(a.pageIndex,makeArr).push(a);return t.size>0?t:null}function stringToAsciiOrUTF16BE(e){return null==e||function isAscii(e){if("string"!=typeof e)return!1;return!e||/^[\x00-\x7F]*$/.test(e)}(e)?e:stringToUTF16String(e,!0)}function stringToUTF16HexString(e){const t=[];for(let n=0,a=e.length;n<a;n++){const a=e.charCodeAt(n);t.push(sn[a>>8&255],sn[255&a])}return t.join("")}function stringToUTF16String(e,t=!1){const n=[];t&&n.push("þÿ");for(let t=0,a=e.length;t<a;t++){const a=e.charCodeAt(t);n.push(String.fromCharCode(a>>8&255),String.fromCharCode(255&a))}return n.join("")}function getRotationMatrix(e,t,n){switch(e){case 90:return[0,1,-1,0,t,0];case 180:return[-1,0,0,-1,t,n];case 270:return[0,-1,1,0,0,n];default:throw new Error("Invalid rotation")}}function getSizeInBytes(e){return Math.ceil(Math.ceil(Math.log2(1+e))/8)}__webpack_require__(4603),__webpack_require__(7566),__webpack_require__(8721);class QCMS{static#n=null;static _memory=null;static _mustAddAlpha=!1;static _destBuffer=null;static _destOffset=0;static _destLength=0;static _cssColor="";static _makeHexColor=null;static get _memoryArray(){const e=this.#n;return e?.byteLength?e:this.#n=new Uint8Array(this._memory.buffer)}}let vn;const Sn="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&Sn.decode();let xn=null;function getUint8ArrayMemory0(){null!==xn&&0!==xn.byteLength||(xn=new Uint8Array(vn.memory.buffer));return xn}let An=0;function passArray8ToWasm0(e,t){const n=t(1*e.length,1)>>>0;getUint8ArrayMemory0().set(e,n/1);An=e.length;return n}const Cn=Object.freeze({RGB8:0,0:"RGB8",RGBA8:1,1:"RGBA8",BGRA8:2,2:"BGRA8",Gray8:3,3:"Gray8",GrayA8:4,4:"GrayA8",CMYK:5,5:"CMYK"}),In=Object.freeze({Perceptual:0,0:"Perceptual",RelativeColorimetric:1,1:"RelativeColorimetric",Saturation:2,2:"Saturation",AbsoluteColorimetric:3,3:"AbsoluteColorimetric"});function __wbg_get_imports(){const e={wbg:{}};e.wbg.__wbg_copyresult_b08ee7d273f295dd=function(e,t){!function copy_result(e,t){const{_mustAddAlpha:n,_destBuffer:a,_destOffset:r,_destLength:s,_memoryArray:i}=QCMS;if(t!==s)if(n)for(let n=e,s=e+t,o=r;n<s;n+=3,o+=4){a[o]=i[n];a[o+1]=i[n+1];a[o+2]=i[n+2];a[o+3]=255}else for(let n=e,s=e+t,o=r;n<s;n+=3,o+=4){a[o]=i[n];a[o+1]=i[n+1];a[o+2]=i[n+2]}else a.set(i.subarray(e,e+t),r)}(e>>>0,t>>>0)};e.wbg.__wbg_copyrgb_d60ce17bb05d9b67=function(e){!function copy_rgb(e){const{_destBuffer:t,_destOffset:n,_memoryArray:a}=QCMS;t[n]=a[e];t[n+1]=a[e+1];t[n+2]=a[e+2]}(e>>>0)};e.wbg.__wbg_makecssRGB_893bf0cd9fdb302d=function(e){!function make_cssRGB(e){const{_memoryArray:t}=QCMS;QCMS._cssColor=QCMS._makeHexColor(t[e],t[e+1],t[e+2])}(e>>>0)};e.wbg.__wbindgen_init_externref_table=function(){const e=vn.__wbindgen_export_0,t=e.grow(4);e.set(0,void 0);e.set(t+0,void 0);e.set(t+1,null);e.set(t+2,!0);e.set(t+3,!1)};e.wbg.__wbindgen_throw=function(e,t){throw new Error(function getStringFromWasm0(e,t){e>>>=0;return Sn.decode(getUint8ArrayMemory0().subarray(e,e+t))}(e,t))};return e}function __wbg_finalize_init(e,t){vn=e.exports;__wbg_init.__wbindgen_wasm_module=t;xn=null;vn.__wbindgen_start();return vn}async function __wbg_init(e){if(void 0!==vn)return vn;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module_or_path:e}=e):console.warn("using deprecated parameters for the initialization function; pass a single object instead"));const t=__wbg_get_imports();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:n,module:a}=await async function __wbg_load(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}(await e,t);return __wbg_finalize_init(n,a)}function isDefaultDecodeHelper(e,t){if(!Array.isArray(e))return!0;const n=e.length;if(n<t){warn("Decode map length is too short.");return!0}if(n>t){info("Truncating too long decode map.");e.length=t}return!1}class ColorSpace{static#a=new Uint8ClampedArray(3);constructor(e,t){this.name=e;this.numComps=t}getRgb(e,t,n=new Uint8ClampedArray(3)){this.getRgbItem(e,t,n,0);return n}getRgbHex(e,t){const n=this.getRgb(e,t,ColorSpace.#a);return Util.makeHexColor(n[0],n[1],n[2])}getRgbItem(e,t,n,a){unreachable("Should not call ColorSpace.getRgbItem")}getRgbBuffer(e,t,n,a,r,s,i){unreachable("Should not call ColorSpace.getRgbBuffer")}getOutputLength(e,t){unreachable("Should not call ColorSpace.getOutputLength")}isPassthrough(e){return!1}isDefaultDecode(e,t){return ColorSpace.isDefaultDecode(e,this.numComps)}fillRgb(e,t,n,a,r,s,i,o,l){const f=t*n;let c=null;const h=1<<i,u=n!==r||t!==a;if(this.isPassthrough(i))c=o;else if(1===this.numComps&&f>h&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){const t=i<=8?new Uint8Array(h):new Uint16Array(h);for(let e=0;e<h;e++)t[e]=e;const n=new Uint8ClampedArray(3*h);this.getRgbBuffer(t,0,h,n,0,i,0);if(u){c=new Uint8Array(3*f);let e=0;for(let t=0;t<f;++t){const a=3*o[t];c[e++]=n[a];c[e++]=n[a+1];c[e++]=n[a+2]}}else{let t=0;for(let a=0;a<f;++a){const r=3*o[a];e[t++]=n[r];e[t++]=n[r+1];e[t++]=n[r+2];t+=l}}}else if(u){c=new Uint8ClampedArray(3*f);this.getRgbBuffer(o,0,f,c,0,i,0)}else this.getRgbBuffer(o,0,a*s,e,0,i,l);if(c)if(u)!function resizeRgbImage(e,t,n,a,r,s,i){i=1!==i?0:i;const o=n/r,l=a/s;let f,c=0;const h=new Uint16Array(r),u=3*n;for(let e=0;e<r;e++)h[e]=3*Math.floor(e*o);for(let n=0;n<s;n++){const a=Math.floor(n*l)*u;for(let n=0;n<r;n++){f=a+h[n];t[c++]=e[f++];t[c++]=e[f++];t[c++]=e[f++];c+=i}}}(c,e,t,n,a,r,l);else{let t=0,n=0;for(let r=0,i=a*s;r<i;r++){e[t++]=c[n++];e[t++]=c[n++];e[t++]=c[n++];t+=l}}}get usesZeroToOneRange(){return shadow(this,"usesZeroToOneRange",!0)}static isDefaultDecode(e,t){if(isDefaultDecodeHelper(e,2*t))return!0;for(let t=0,n=e.length;t<n;t+=2)if(0!==e[t]||1!==e[t+1])return!1;return!0}}class AlternateCS extends ColorSpace{constructor(e,t,n){super("Alternate",e);this.base=t;this.tintFn=n;this.tmpBuf=new Float32Array(t.numComps)}getRgbItem(e,t,n,a){const r=this.tmpBuf;this.tintFn(e,t,r,0);this.base.getRgbItem(r,0,n,a)}getRgbBuffer(e,t,n,a,r,s,i){const o=this.tintFn,l=this.base,f=1/((1<<s)-1),c=l.numComps,h=l.usesZeroToOneRange,u=(l.isPassthrough(8)||!h)&&0===i;let m=u?r:0;const p=u?a:new Uint8ClampedArray(c*n),d=this.numComps,g=new Float32Array(d),b=new Float32Array(c);let w,j;for(w=0;w<n;w++){for(j=0;j<d;j++)g[j]=e[t++]*f;o(g,0,b,0);if(h)for(j=0;j<c;j++)p[m++]=255*b[j];else{l.getRgbItem(b,0,p,m);m+=c}}u||l.getRgbBuffer(p,0,n,a,r,8,i)}getOutputLength(e,t){return this.base.getOutputLength(e*this.base.numComps/this.numComps,t)}}class PatternCS extends ColorSpace{constructor(e){super("Pattern",null);this.base=e}isDefaultDecode(e,t){unreachable("Should not call PatternCS.isDefaultDecode")}}class IndexedCS extends ColorSpace{constructor(e,t,n){super("Indexed",1);this.base=e;this.highVal=t;const a=e.numComps*(t+1);this.lookup=new Uint8Array(a);if(n instanceof BaseStream){const e=n.getBytes(a);this.lookup.set(e)}else{if("string"!=typeof n)throw new FormatError(`IndexedCS - unrecognized lookup table: ${n}`);for(let e=0;e<a;++e)this.lookup[e]=255&n.charCodeAt(e)}}getRgbItem(e,t,n,a){const{base:r,highVal:s,lookup:i}=this,o=MathClamp(Math.round(e[t]),0,s)*r.numComps;r.getRgbBuffer(i,o,1,n,a,8,0)}getRgbBuffer(e,t,n,a,r,s,i){const{base:o,highVal:l,lookup:f}=this,{numComps:c}=o,h=o.getOutputLength(c,i);for(let s=0;s<n;++s){const n=MathClamp(Math.round(e[t++]),0,l)*c;o.getRgbBuffer(f,n,1,a,r,8,i);r+=h}}getOutputLength(e,t){return this.base.getOutputLength(e*this.base.numComps,t)}isDefaultDecode(e,t){if(isDefaultDecodeHelper(e,2))return!0;if(!Number.isInteger(t)||t<1){warn("Bits per component is not correct");return!0}return 0===e[0]&&e[1]===(1<<t)-1}}class DeviceGrayCS extends ColorSpace{constructor(){super("DeviceGray",1)}getRgbItem(e,t,n,a){const r=255*e[t];n[a]=n[a+1]=n[a+2]=r}getRgbBuffer(e,t,n,a,r,s,i){const o=255/((1<<s)-1);let l=t,f=r;for(let t=0;t<n;++t){const t=o*e[l++];a[f++]=t;a[f++]=t;a[f++]=t;f+=i}}getOutputLength(e,t){return e*(3+t)}}class DeviceRgbCS extends ColorSpace{constructor(){super("DeviceRGB",3)}getRgbItem(e,t,n,a){n[a]=255*e[t];n[a+1]=255*e[t+1];n[a+2]=255*e[t+2]}getRgbBuffer(e,t,n,a,r,s,i){if(8===s&&0===i){a.set(e.subarray(t,t+3*n),r);return}const o=255/((1<<s)-1);let l=t,f=r;for(let t=0;t<n;++t){a[f++]=o*e[l++];a[f++]=o*e[l++];a[f++]=o*e[l++];f+=i}}getOutputLength(e,t){return e*(3+t)/3|0}isPassthrough(e){return 8===e}}class DeviceRgbaCS extends ColorSpace{constructor(){super("DeviceRGBA",4)}getOutputLength(e,t){return 4*e}isPassthrough(e){return 8===e}fillRgb(e,t,n,a,r,s,i,o,l){n!==r||t!==a?function resizeRgbaImage(e,t,n,a,r,s,i){const o=n/r,l=a/s;let f=0;const c=new Uint16Array(r);if(1===i){for(let e=0;e<r;e++)c[e]=Math.floor(e*o);const a=new Uint32Array(e.buffer),i=new Uint32Array(t.buffer),h=FeatureTest.isLittleEndian?16777215:4294967040;for(let e=0;e<s;e++){const t=a.subarray(Math.floor(e*l)*n);for(let e=0;e<r;e++)i[f++]|=t[c[e]]&h}}else{const a=4,i=n*a;for(let e=0;e<r;e++)c[e]=Math.floor(e*o)*a;for(let n=0;n<s;n++){const a=e.subarray(Math.floor(n*l)*i);for(let e=0;e<r;e++){const n=c[e];t[f++]=a[n];t[f++]=a[n+1];t[f++]=a[n+2]}}}}(o,e,t,n,a,r,l):function copyRgbaImage(e,t,n){if(1===n){const n=new Uint32Array(e.buffer),a=new Uint32Array(t.buffer),r=FeatureTest.isLittleEndian?16777215:4294967040;for(let e=0,t=n.length;e<t;e++)a[e]|=n[e]&r}else{let n=0;for(let a=0,r=e.length;a<r;a+=4){t[n++]=e[a];t[n++]=e[a+1];t[n++]=e[a+2]}}}(o,e,l)}}class DeviceCmykCS extends ColorSpace{constructor(){super("DeviceCMYK",4)}#r(e,t,n,a,r){const s=e[t]*n,i=e[t+1]*n,o=e[t+2]*n,l=e[t+3]*n;a[r]=255+s*(-4.387332384609988*s+54.48615194189176*i+18.82290502165302*o+212.25662451639585*l-285.2331026137004)+i*(1.7149763477362134*i-5.6096736904047315*o+-17.873870861415444*l-5.497006427196366)+o*(-2.5217340131683033*o-21.248923337353073*l+17.5119270841813)+l*(-21.86122147463605*l-189.48180835922747);a[r+1]=255+s*(8.841041422036149*s+60.118027045597366*i+6.871425592049007*o+31.159100130055922*l-79.2970844816548)+i*(-15.310361306967817*i+17.575251261109482*o+131.35250912493976*l-190.9453302588951)+o*(4.444339102852739*o+9.8632861493405*l-24.86741582555878)+l*(-20.737325471181034*l-187.80453709719578);a[r+2]=255+s*(.8842522430003296*s+8.078677503112928*i+30.89978309703729*o-.23883238689178934*l-14.183576799673286)+i*(10.49593273432072*i+63.02378494754052*o+50.606957656360734*l-112.23884253719248)+o*(.03296041114873217*o+115.60384449646641*l-193.58209356861505)+l*(-22.33816807309886*l-180.12613974708367)}getRgbItem(e,t,n,a){this.#r(e,t,1,n,a)}getRgbBuffer(e,t,n,a,r,s,i){const o=1/((1<<s)-1);for(let s=0;s<n;s++){this.#r(e,t,o,a,r);t+=4;r+=3+i}}getOutputLength(e,t){return e/4*(3+t)|0}}class CalGrayCS extends ColorSpace{constructor(e,t,n){super("CalGray",1);if(!e)throw new FormatError("WhitePoint missing - required for color space CalGray");[this.XW,this.YW,this.ZW]=e;[this.XB,this.YB,this.ZB]=t||[0,0,0];this.G=n||1;if(this.XW<0||this.ZW<0||1!==this.YW)throw new FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`);if(this.XB<0||this.YB<0||this.ZB<0){info(`Invalid BlackPoint for ${this.name}, falling back to default.`);this.XB=this.YB=this.ZB=0}0===this.XB&&0===this.YB&&0===this.ZB||warn(`${this.name}, BlackPoint: XB: ${this.XB}, YB: ${this.YB}, ZB: ${this.ZB}, only default values are supported.`);if(this.G<1){info(`Invalid Gamma: ${this.G} for ${this.name}, falling back to default.`);this.G=1}}#r(e,t,n,a,r){const s=(e[t]*r)**this.G,i=this.YW*s,o=Math.max(295.8*i**.3333333333333333-40.8,0);n[a]=o;n[a+1]=o;n[a+2]=o}getRgbItem(e,t,n,a){this.#r(e,t,n,a,1)}getRgbBuffer(e,t,n,a,r,s,i){const o=1/((1<<s)-1);for(let s=0;s<n;++s){this.#r(e,t,a,r,o);t+=1;r+=3+i}}getOutputLength(e,t){return e*(3+t)}}class CalRGBCS extends ColorSpace{static#s=new Float32Array([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296]);static#i=new Float32Array([.9869929,-.1470543,.1599627,.4323053,.5183603,.0492912,-.0085287,.0400428,.9684867]);static#o=new Float32Array([3.2404542,-1.5371385,-.4985314,-.969266,1.8760108,.041556,.0556434,-.2040259,1.0572252]);static#l=new Float32Array([1,1,1]);static#f=new Float32Array(3);static#c=new Float32Array(3);static#h=new Float32Array(3);static#u=(24/116)**3/8;constructor(e,t,n,a){super("CalRGB",3);if(!e)throw new FormatError("WhitePoint missing - required for color space CalRGB");const[r,s,i]=this.whitePoint=e,[o,l,f]=this.blackPoint=t||new Float32Array(3);[this.GR,this.GG,this.GB]=n||new Float32Array([1,1,1]);[this.MXA,this.MYA,this.MZA,this.MXB,this.MYB,this.MZB,this.MXC,this.MYC,this.MZC]=a||new Float32Array([1,0,0,0,1,0,0,0,1]);if(r<0||i<0||1!==s)throw new FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`);if(o<0||l<0||f<0){info(`Invalid BlackPoint for ${this.name} [${o}, ${l}, ${f}], falling back to default.`);this.blackPoint=new Float32Array(3)}if(this.GR<0||this.GG<0||this.GB<0){info(`Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for ${this.name}, falling back to default.`);this.GR=this.GG=this.GB=1}}#m(e,t,n){n[0]=e[0]*t[0]+e[1]*t[1]+e[2]*t[2];n[1]=e[3]*t[0]+e[4]*t[1]+e[5]*t[2];n[2]=e[6]*t[0]+e[7]*t[1]+e[8]*t[2]}#p(e,t,n){n[0]=1*t[0]/e[0];n[1]=1*t[1]/e[1];n[2]=1*t[2]/e[2]}#d(e,t,n){n[0]=.95047*t[0]/e[0];n[1]=1*t[1]/e[1];n[2]=1.08883*t[2]/e[2]}#g(e){return e<=.0031308?MathClamp(12.92*e,0,1):e>=.99554525?1:MathClamp(1.055*e**(1/2.4)-.055,0,1)}#b(e){return e<0?-this.#b(-e):e>8?((e+16)/116)**3:e*CalRGBCS.#u}#w(e,t,n){if(0===e[0]&&0===e[1]&&0===e[2]){n[0]=t[0];n[1]=t[1];n[2]=t[2];return}const a=this.#b(0),r=(1-a)/(1-this.#b(e[0])),s=1-r,i=(1-a)/(1-this.#b(e[1])),o=1-i,l=(1-a)/(1-this.#b(e[2])),f=1-l;n[0]=t[0]*r+s;n[1]=t[1]*i+o;n[2]=t[2]*l+f}#j(e,t,n){if(1===e[0]&&1===e[2]){n[0]=t[0];n[1]=t[1];n[2]=t[2];return}const a=n;this.#m(CalRGBCS.#s,t,a);const r=CalRGBCS.#f;this.#p(e,a,r);this.#m(CalRGBCS.#i,r,n)}#k(e,t,n){const a=n;this.#m(CalRGBCS.#s,t,a);const r=CalRGBCS.#f;this.#d(e,a,r);this.#m(CalRGBCS.#i,r,n)}#r(e,t,n,a,r){const s=MathClamp(e[t]*r,0,1),i=MathClamp(e[t+1]*r,0,1),o=MathClamp(e[t+2]*r,0,1),l=1===s?1:s**this.GR,f=1===i?1:i**this.GG,c=1===o?1:o**this.GB,h=this.MXA*l+this.MXB*f+this.MXC*c,u=this.MYA*l+this.MYB*f+this.MYC*c,m=this.MZA*l+this.MZB*f+this.MZC*c,p=CalRGBCS.#c;p[0]=h;p[1]=u;p[2]=m;const d=CalRGBCS.#h;this.#j(this.whitePoint,p,d);const g=CalRGBCS.#c;this.#w(this.blackPoint,d,g);const b=CalRGBCS.#h;this.#k(CalRGBCS.#l,g,b);const w=CalRGBCS.#c;this.#m(CalRGBCS.#o,b,w);n[a]=255*this.#g(w[0]);n[a+1]=255*this.#g(w[1]);n[a+2]=255*this.#g(w[2])}getRgbItem(e,t,n,a){this.#r(e,t,n,a,1)}getRgbBuffer(e,t,n,a,r,s,i){const o=1/((1<<s)-1);for(let s=0;s<n;++s){this.#r(e,t,a,r,o);t+=3;r+=3+i}}getOutputLength(e,t){return e*(3+t)/3|0}}class LabCS extends ColorSpace{constructor(e,t,n){super("Lab",3);if(!e)throw new FormatError("WhitePoint missing - required for color space Lab");[this.XW,this.YW,this.ZW]=e;[this.amin,this.amax,this.bmin,this.bmax]=n||[-100,100,-100,100];[this.XB,this.YB,this.ZB]=t||[0,0,0];if(this.XW<0||this.ZW<0||1!==this.YW)throw new FormatError("Invalid WhitePoint components, no fallback available");if(this.XB<0||this.YB<0||this.ZB<0){info("Invalid BlackPoint, falling back to default");this.XB=this.YB=this.ZB=0}if(this.amin>this.amax||this.bmin>this.bmax){info("Invalid Range, falling back to defaults");this.amin=-100;this.amax=100;this.bmin=-100;this.bmax=100}}#y(e){return e>=6/29?e**3:108/841*(e-4/29)}#q(e,t,n,a){return n+e*(a-n)/t}#r(e,t,n,a,r){let s=e[t],i=e[t+1],o=e[t+2];if(!1!==n){s=this.#q(s,n,0,100);i=this.#q(i,n,this.amin,this.amax);o=this.#q(o,n,this.bmin,this.bmax)}i>this.amax?i=this.amax:i<this.amin&&(i=this.amin);o>this.bmax?o=this.bmax:o<this.bmin&&(o=this.bmin);const l=(s+16)/116,f=l+i/500,c=l-o/200,h=this.XW*this.#y(f),u=this.YW*this.#y(l),m=this.ZW*this.#y(c);let p,d,g;if(this.ZW<1){p=3.1339*h+-1.617*u+-.4906*m;d=-.9785*h+1.916*u+.0333*m;g=.072*h+-.229*u+1.4057*m}else{p=3.2406*h+-1.5372*u+-.4986*m;d=-.9689*h+1.8758*u+.0415*m;g=.0557*h+-.204*u+1.057*m}a[r]=255*Math.sqrt(p);a[r+1]=255*Math.sqrt(d);a[r+2]=255*Math.sqrt(g)}getRgbItem(e,t,n,a){this.#r(e,t,!1,n,a)}getRgbBuffer(e,t,n,a,r,s,i){const o=(1<<s)-1;for(let s=0;s<n;s++){this.#r(e,t,o,a,r);t+=3;r+=3+i}}getOutputLength(e,t){return e*(3+t)/3|0}isDefaultDecode(e,t){return!0}get usesZeroToOneRange(){return shadow(this,"usesZeroToOneRange",!1)}}function fetchSync(e){const t=new XMLHttpRequest;t.open("GET",e,!1);t.responseType="arraybuffer";t.send(null);return t.response}class IccColorSpace extends ColorSpace{#v;#S;static#x=!0;static#A=null;static#C=null;constructor(e,t,n){if(!IccColorSpace.isUsable)throw new Error("No ICC color space support");super(t,n);let a;switch(n){case 1:a=Cn.Gray8;this.#S=(e,t,n)=>function qcms_convert_one(e,t,n){vn.qcms_convert_one(e,t,n)}(this.#v,255*e[t],n);break;case 3:a=Cn.RGB8;this.#S=(e,t,n)=>function qcms_convert_three(e,t,n,a,r){vn.qcms_convert_three(e,t,n,a,r)}(this.#v,255*e[t],255*e[t+1],255*e[t+2],n);break;case 4:a=Cn.CMYK;this.#S=(e,t,n)=>function qcms_convert_four(e,t,n,a,r,s){vn.qcms_convert_four(e,t,n,a,r,s)}(this.#v,255*e[t],255*e[t+1],255*e[t+2],255*e[t+3],n);break;default:throw new Error(`Unsupported number of components: ${n}`)}this.#v=function qcms_transformer_from_memory(e,t,n){const a=passArray8ToWasm0(e,vn.__wbindgen_malloc),r=An;return vn.qcms_transformer_from_memory(a,r,t,n)>>>0}(e,a,In.Perceptual);if(!this.#v)throw new Error("Failed to create ICC color space");IccColorSpace.#C||=new FinalizationRegistry(e=>{!function qcms_drop_transformer(e){vn.qcms_drop_transformer(e)}(e)});IccColorSpace.#C.register(this,this.#v)}getRgbHex(e,t){this.#S(e,t,!0);return QCMS._cssColor}getRgbItem(e,t,n,a){QCMS._destBuffer=n;QCMS._destOffset=a;QCMS._destLength=3;this.#S(e,t,!1);QCMS._destBuffer=null}getRgbBuffer(e,t,n,a,r,s,i){e=e.subarray(t,t+n*this.numComps);if(8!==s){const t=255/((1<<s)-1);for(let n=0,a=e.length;n<a;n++)e[n]*=t}QCMS._mustAddAlpha=i&&a.buffer===e.buffer;QCMS._destBuffer=a;QCMS._destOffset=r;QCMS._destLength=n*(3+i);!function qcms_convert_array(e,t){const n=passArray8ToWasm0(t,vn.__wbindgen_malloc),a=An;vn.qcms_convert_array(e,n,a)}(this.#v,e);QCMS._mustAddAlpha=!1;QCMS._destBuffer=null}getOutputLength(e,t){return e/this.numComps*(3+t)|0}static setOptions({useWasm:e,useWorkerFetch:t,wasmUrl:n}){if(t){this.#x=e;this.#A=n}else this.#x=!1}static get isUsable(){let e=!1;if(this.#x)if(this.#A)try{this._module=function initSync(e){if(void 0!==vn)return vn;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module:e}=e):console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const t=__wbg_get_imports();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));return __wbg_finalize_init(new WebAssembly.Instance(e,t),e)}({module:fetchSync(`${this.#A}qcms_bg.wasm`)});e=!!this._module;QCMS._memory=this._module.memory;QCMS._makeHexColor=Util.makeHexColor}catch(e){warn(`ICCBased color space: "${e}".`)}else warn("No ICC color space support due to missing `wasmUrl` API option");return shadow(this,"isUsable",e)}}class CmykICCBasedCS extends IccColorSpace{static#I;constructor(){super(new Uint8Array(fetchSync(`${CmykICCBasedCS.#I}CGATS001Compat-v2-micro.icc`)),"DeviceCMYK",4)}static setOptions({iccUrl:e}){this.#I=e}static get isUsable(){let e=!1;IccColorSpace.isUsable&&(this.#I?e=!0:warn("No CMYK ICC profile support due to missing `iccUrl` API option"));return shadow(this,"isUsable",e)}}class Stream extends BaseStream{constructor(e,t,n,a){super();this.bytes=e instanceof Uint8Array?e:new Uint8Array(e);this.start=t||0;this.pos=this.start;this.end=t+n||this.bytes.length;this.dict=a}get length(){return this.end-this.start}get isEmpty(){return 0===this.length}getByte(){return this.pos>=this.end?-1:this.bytes[this.pos++]}getBytes(e){const t=this.bytes,n=this.pos,a=this.end;if(!e){this.pos=a;return t.subarray(n,a)}let r=n+e;r>a&&(r=a);this.pos=r;return t.subarray(n,r)}getByteRange(e,t){e<0&&(e=0);t>this.end&&(t=this.end);return this.bytes.subarray(e,t)}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream(e,t,n=null){return new Stream(this.bytes.buffer,e,t,n)}clone(){return new Stream(this.bytes.buffer,this.start,this.end-this.start,this.dict.clone())}}class StringStream extends Stream{constructor(e){super(stringToBytes(e))}}class NullStream extends Stream{constructor(){super(new Uint8Array(0))}}class ChunkedStream extends Stream{progressiveDataLength=0;_lastSuccessfulEnsureByteChunk=-1;_loadedChunks=new Set;constructor(e,t,n){super(new Uint8Array(e),0,e,null);this.chunkSize=t;this.numChunks=Math.ceil(e/t);this.manager=n}getMissingChunks(){const e=[];for(let t=0,n=this.numChunks;t<n;++t)this._loadedChunks.has(t)||e.push(t);return e}get numChunksLoaded(){return this._loadedChunks.size}get isDataLoaded(){return this.numChunksLoaded===this.numChunks}onReceiveData(e,t){const n=this.chunkSize;if(e%n!==0)throw new Error(`Bad begin offset: ${e}`);const a=e+t.byteLength;if(a%n!==0&&a!==this.bytes.length)throw new Error(`Bad end offset: ${a}`);this.bytes.set(new Uint8Array(t),e);const r=Math.floor(e/n),s=Math.floor((a-1)/n)+1;for(let e=r;e<s;++e)this._loadedChunks.add(e)}onReceiveProgressiveData(e){let t=this.progressiveDataLength;const n=Math.floor(t/this.chunkSize);this.bytes.set(new Uint8Array(e),t);t+=e.byteLength;this.progressiveDataLength=t;const a=t>=this.end?this.numChunks:Math.floor(t/this.chunkSize);for(let e=n;e<a;++e)this._loadedChunks.add(e)}ensureByte(e){if(e<this.progressiveDataLength)return;const t=Math.floor(e/this.chunkSize);if(!(t>this.numChunks)&&t!==this._lastSuccessfulEnsureByteChunk){if(!this._loadedChunks.has(t))throw new MissingDataException(e,e+1);this._lastSuccessfulEnsureByteChunk=t}}ensureRange(e,t){if(e>=t)return;if(t<=this.progressiveDataLength)return;const n=Math.floor(e/this.chunkSize);if(n>this.numChunks)return;const a=Math.min(Math.floor((t-1)/this.chunkSize)+1,this.numChunks);for(let r=n;r<a;++r)if(!this._loadedChunks.has(r))throw new MissingDataException(e,t)}nextEmptyChunk(e){const t=this.numChunks;for(let n=0;n<t;++n){const a=(e+n)%t;if(!this._loadedChunks.has(a))return a}return null}hasChunk(e){return this._loadedChunks.has(e)}getByte(){const e=this.pos;if(e>=this.end)return-1;e>=this.progressiveDataLength&&this.ensureByte(e);return this.bytes[this.pos++]}getBytes(e){const t=this.bytes,n=this.pos,a=this.end;if(!e){a>this.progressiveDataLength&&this.ensureRange(n,a);return t.subarray(n,a)}let r=n+e;r>a&&(r=a);r>this.progressiveDataLength&&this.ensureRange(n,r);this.pos=r;return t.subarray(n,r)}getByteRange(e,t){e<0&&(e=0);t>this.end&&(t=this.end);t>this.progressiveDataLength&&this.ensureRange(e,t);return this.bytes.subarray(e,t)}makeSubStream(e,t,n=null){t?e+t>this.progressiveDataLength&&this.ensureRange(e,e+t):e>=this.progressiveDataLength&&this.ensureByte(e);function ChunkedStreamSubstream(){}ChunkedStreamSubstream.prototype=Object.create(this);ChunkedStreamSubstream.prototype.getMissingChunks=function(){const e=this.chunkSize,t=Math.floor(this.start/e),n=Math.floor((this.end-1)/e)+1,a=[];for(let e=t;e<n;++e)this._loadedChunks.has(e)||a.push(e);return a};Object.defineProperty(ChunkedStreamSubstream.prototype,"isDataLoaded",{get(){return this.numChunksLoaded===this.numChunks||0===this.getMissingChunks().length},configurable:!0});const a=new ChunkedStreamSubstream;a.pos=a.start=e;a.end=e+t||this.end;a.dict=n;return a}getBaseStreams(){return[this]}}class ChunkedStreamManager{aborted=!1;currRequestId=0;_chunksNeededByRequest=new Map;_loadedStreamCapability=Promise.withResolvers();_promisesByRequest=new Map;_requestsByChunk=new Map;constructor(e,t){this.length=t.length;this.chunkSize=t.rangeChunkSize;this.stream=new ChunkedStream(this.length,this.chunkSize,this);this.pdfStream=e;this.disableAutoFetch=t.disableAutoFetch;this.msgHandler=t.msgHandler}async sendRequest(e,t){const n=this.pdfStream.getRangeReader(e,t);let a=[];for(;;){const{value:e,done:t}=await n.read();if(this.aborted){a=null;return}if(t)break;a.push(e)}if(0===a.length&&this.disableAutoFetch)return;const r=arrayBuffersToBytes(a);a=null;this.onReceiveData({chunk:r.buffer,begin:e})}requestAllChunks(e=!1){if(!e){const e=this.stream.getMissingChunks();this._requestChunks(e)}return this._loadedStreamCapability.promise}_requestChunks(e){const t=this.currRequestId++,n=new Set;this._chunksNeededByRequest.set(t,n);for(const t of e)this.stream.hasChunk(t)||n.add(t);if(0===n.size)return Promise.resolve();const a=Promise.withResolvers();this._promisesByRequest.set(t,a);const r=[];for(const e of n){let n=this._requestsByChunk.get(e);if(!n){n=[];this._requestsByChunk.set(e,n);r.push(e)}n.push(t)}if(r.length>0){const e=this.groupChunks(r);for(const t of e){const e=t.beginChunk*this.chunkSize,n=Math.min(t.endChunk*this.chunkSize,this.length);this.sendRequest(e,n).catch(a.reject)}}return a.promise.catch(e=>{if(!this.aborted)throw e})}getStream(){return this.stream}requestRange(e,t){t=Math.min(t,this.length);const n=this.getBeginChunk(e),a=this.getEndChunk(t),r=[];for(let e=n;e<a;++e)r.push(e);return this._requestChunks(r)}requestRanges(e=[]){const t=[];for(const n of e){const e=this.getBeginChunk(n.begin),a=this.getEndChunk(n.end);for(let n=e;n<a;++n)t.includes(n)||t.push(n)}t.sort((e,t)=>e-t);return this._requestChunks(t)}groupChunks(e){const t=[];let n=-1,a=-1;for(let r=0,s=e.length;r<s;++r){const s=e[r];n<0&&(n=s);if(a>=0&&a+1!==s){t.push({beginChunk:n,endChunk:a+1});n=s}r+1===e.length&&t.push({beginChunk:n,endChunk:s+1});a=s}return t}onReceiveData(e){const{chunkSize:t,length:n,stream:a}=this,r=e.chunk,s=void 0===e.begin,i=s?a.progressiveDataLength:e.begin,o=i+r.byteLength,l=Math.floor(i/t),f=o<n?Math.floor(o/t):Math.ceil(o/t);s?a.onReceiveProgressiveData(r):a.onReceiveData(i,r);a.isDataLoaded&&this._loadedStreamCapability.resolve(a);const c=[];for(let e=l;e<f;++e){const t=this._requestsByChunk.get(e);if(t){this._requestsByChunk.delete(e);for(const n of t){const t=this._chunksNeededByRequest.get(n);t.has(e)&&t.delete(e);t.size>0||c.push(n)}}}if(!this.disableAutoFetch&&0===this._requestsByChunk.size){let e;if(1===a.numChunksLoaded){const t=a.numChunks-1;a.hasChunk(t)||(e=t)}else e=a.nextEmptyChunk(f);Number.isInteger(e)&&this._requestChunks([e])}for(const e of c){const t=this._promisesByRequest.get(e);this._promisesByRequest.delete(e);t.resolve()}this.msgHandler.send("DocProgress",{loaded:MathClamp(a.numChunksLoaded*t,a.progressiveDataLength,n),total:n})}onError(e){this._loadedStreamCapability.reject(e)}getBeginChunk(e){return Math.floor(e/this.chunkSize)}getEndChunk(e){return Math.floor((e-1)/this.chunkSize)+1}abort(e){this.aborted=!0;this.pdfStream?.cancelAllRequests(e);for(const t of this._promisesByRequest.values())t.reject(e)}}function convertToRGBA(e){switch(e.kind){case T:return convertBlackAndWhiteToRGBA(e);case O:return function convertRGBToRGBA({src:e,srcPos:t=0,dest:n,destPos:a=0,width:r,height:s}){let i=0;const o=r*s*3,l=o>>2,f=new Uint32Array(e.buffer,t,l),c=FeatureTest.isLittleEndian?4278190080:255;if(FeatureTest.isLittleEndian){for(;i<l-2;i+=3,a+=4){const e=f[i],t=f[i+1],r=f[i+2];n[a]=e|c;n[a+1]=e>>>24|t<<8|c;n[a+2]=t>>>16|r<<16|c;n[a+3]=r>>>8|c}for(let r=4*i,s=t+o;r<s;r+=3)n[a++]=e[r]|e[r+1]<<8|e[r+2]<<16|c}else{for(;i<l-2;i+=3,a+=4){const e=f[i],t=f[i+1],r=f[i+2];n[a]=e|c;n[a+1]=e<<24|t>>>8|c;n[a+2]=t<<16|r>>>16|c;n[a+3]=r<<8|c}for(let r=4*i,s=t+o;r<s;r+=3)n[a++]=e[r]<<24|e[r+1]<<16|e[r+2]<<8|c}return{srcPos:t+o,destPos:a}}(e)}return null}function convertBlackAndWhiteToRGBA({src:e,srcPos:t=0,dest:n,width:a,height:r,nonBlackColor:s=4294967295,inverseDecode:i=!1}){const o=FeatureTest.isLittleEndian?4278190080:255,[l,f]=i?[s,o]:[o,s],c=a>>3,h=7&a,u=l^f,m=e.length;n=new Uint32Array(n.buffer);let p=0;for(let a=0;a<r;++a){for(const a=t+c;t<a;++t,p+=8){const a=e[t];n[p]=l^-(a>>7&1)&u;n[p+1]=l^-(a>>6&1)&u;n[p+2]=l^-(a>>5&1)&u;n[p+3]=l^-(a>>4&1)&u;n[p+4]=l^-(a>>3&1)&u;n[p+5]=l^-(a>>2&1)&u;n[p+6]=l^-(a>>1&1)&u;n[p+7]=l^-(1&a)&u}if(0===h)continue;const a=t<m?e[t++]:255;for(let e=0;e<h;++e,++p)n[p]=l^-(a>>7-e&1)&u}return{srcPos:t,destPos:p}}class ImageResizer{static#F=2048;static#T=FeatureTest.isImageDecoderSupported;constructor(e,t){this._imgData=e;this._isMask=t}static get canUseImageDecoder(){return shadow(this,"canUseImageDecoder",this.#T?ImageDecoder.isTypeSupported("image/bmp"):Promise.resolve(!1))}static needsToBeResized(e,t){if(e<=this.#F&&t<=this.#F)return!1;const{MAX_DIM:n}=this;if(e>n||t>n)return!0;const a=e*t;if(this._hasMaxArea)return a>this.MAX_AREA;if(a<this.#F**2)return!1;if(this._areGoodDims(e,t)){this.#F=Math.max(this.#F,Math.floor(Math.sqrt(e*t)));return!1}this.#F=this._guessMax(this.#F,n,128,0);return a>(this.MAX_AREA=this.#F**2)}static getReducePowerForJPX(e,t,n){const a=e*t,r=2**30/(4*n);if(!this.needsToBeResized(e,t))return a>r?Math.ceil(Math.log2(a/r)):0;const{MAX_DIM:s,MAX_AREA:i}=this,o=Math.max(e/s,t/s,Math.sqrt(a/Math.min(r,i)));return Math.ceil(Math.log2(o))}static get MAX_DIM(){return shadow(this,"MAX_DIM",this._guessMax(2048,32768,0,1))}static get MAX_AREA(){this._hasMaxArea=!0;return shadow(this,"MAX_AREA",this._guessMax(this.#F,this.MAX_DIM,128,0)**2)}static set MAX_AREA(e){if(e>=0){this._hasMaxArea=!0;shadow(this,"MAX_AREA",e)}}static setOptions({canvasMaxAreaInBytes:e=-1,isImageDecoderSupported:t=!1}){this._hasMaxArea||(this.MAX_AREA=e>>2);this.#T=t}static _areGoodDims(e,t){try{const n=new OffscreenCanvas(e,t),a=n.getContext("2d");a.fillRect(0,0,1,1);const r=a.getImageData(0,0,1,1).data[3];n.width=n.height=1;return 0!==r}catch{return!1}}static _guessMax(e,t,n,a){for(;e+n+1<t;){const n=Math.floor((e+t)/2),r=a||n;this._areGoodDims(n,r)?e=n:t=n}return e}static async createImage(e,t=!1){return new ImageResizer(e,t)._createImage()}async _createImage(){const{_imgData:e}=this,{width:t,height:n}=e;if(t*n*4>bn){const e=this.#O();if(e)return e}const a=this._encodeBMP();let r,s;if(await ImageResizer.canUseImageDecoder){r=new ImageDecoder({data:a,type:"image/bmp",preferAnimation:!1,transfer:[a.buffer]});s=r.decode().catch(e=>{warn(`BMP image decoding failed: ${e}`);return createImageBitmap(new Blob([this._encodeBMP().buffer],{type:"image/bmp"}))}).finally(()=>{r.close()})}else s=createImageBitmap(new Blob([a.buffer],{type:"image/bmp"}));const{MAX_AREA:i,MAX_DIM:o}=ImageResizer,l=Math.max(t/o,n/o,Math.sqrt(t*n/i)),f=Math.max(l,2),c=Math.round(10*(l+1.25))/10/f,h=Math.floor(Math.log2(c)),u=new Array(h+2).fill(2);u[0]=f;u.splice(-1,1,c/(1<<h));let m=t,p=n;const d=await s;let g=d.image||d;for(const e of u){const t=m,n=p;m=Math.floor(m/e)-1;p=Math.floor(p/e)-1;const a=new OffscreenCanvas(m,p);a.getContext("2d").drawImage(g,0,0,t,n,0,0,m,p);g.close();g=a.transferToImageBitmap()}e.data=null;e.bitmap=g;e.width=m;e.height=p;return e}#O(){const{_imgData:e}=this,{data:t,width:n,height:a,kind:r}=e,s=n*a*4,i=Math.ceil(Math.log2(s/bn)),o=n>>i,l=a>>i;let f,c=a;try{f=new Uint8Array(s)}catch{let e=Math.floor(Math.log2(s+1));for(;;)try{f=new Uint8Array(2**e-1);break}catch{e-=1}c=Math.floor((2**e-1)/(4*n));const t=n*c*4;t<f.length&&(f=new Uint8Array(t))}const h=new Uint32Array(f.buffer),u=new Uint32Array(o*l);let m=0,p=0;const d=Math.ceil(a/c),g=a%c===0?a:a%c;for(let e=0;e<d;e++){const a=e<d-1?c:g;({srcPos:m}=convertToRGBA({kind:r,src:t,dest:h,width:n,height:a,inverseDecode:this._isMask,srcPos:m}));for(let e=0,t=a>>i;e<t;e++){const t=h.subarray((e<<i)*n);for(let e=0;e<o;e++)u[p++]=t[e<<i]}}if(ImageResizer.needsToBeResized(o,l)){e.data=u;e.width=o;e.height=l;e.kind=R;return null}const b=new OffscreenCanvas(o,l);b.getContext("2d",{willReadFrequently:!0}).putImageData(new ImageData(new Uint8ClampedArray(u.buffer),o,l),0,0);e.data=null;e.bitmap=b.transferToImageBitmap();e.width=o;e.height=l;return e}_encodeBMP(){const{width:e,height:t,kind:n}=this._imgData;let a,r=this._imgData.data,s=new Uint8Array(0),i=s,o=0;switch(n){case T:{a=1;s=new Uint8Array(this._isMask?[255,255,255,255,0,0,0,0]:[0,0,0,0,255,255,255,255]);const n=e+7>>3,i=n+3&-4;if(n!==i){const e=new Uint8Array(i*t);let a=0;for(let s=0,o=t*n;s<o;s+=n,a+=i)e.set(r.subarray(s,s+n),a);r=e}break}case O:a=24;if(3&e){const n=3*e,a=n+3&-4,s=a-n,i=new Uint8Array(a*t);let o=0;for(let e=0,a=t*n;e<a;e+=n){const t=r.subarray(e,e+n);for(let e=0;e<n;e+=3){i[o++]=t[e+2];i[o++]=t[e+1];i[o++]=t[e]}o+=s}r=i}else for(let e=0,t=r.length;e<t;e+=3){const t=r[e];r[e]=r[e+2];r[e+2]=t}break;case R:a=32;o=3;i=new Uint8Array(68);const n=new DataView(i.buffer);if(FeatureTest.isLittleEndian){n.setUint32(0,255,!0);n.setUint32(4,65280,!0);n.setUint32(8,16711680,!0);n.setUint32(12,4278190080,!0)}else{n.setUint32(0,4278190080,!0);n.setUint32(4,16711680,!0);n.setUint32(8,65280,!0);n.setUint32(12,255,!0)}break;default:throw new Error("invalid format")}let l=0;const f=40+i.length,c=14+f+s.length+r.length,h=new Uint8Array(c),u=new DataView(h.buffer);u.setUint16(l,19778,!0);l+=2;u.setUint32(l,c,!0);l+=4;u.setUint32(l,0,!0);l+=4;u.setUint32(l,14+f+s.length,!0);l+=4;u.setUint32(l,f,!0);l+=4;u.setInt32(l,e,!0);l+=4;u.setInt32(l,-t,!0);l+=4;u.setUint16(l,1,!0);l+=2;u.setUint16(l,a,!0);l+=2;u.setUint32(l,o,!0);l+=4;u.setUint32(l,0,!0);l+=4;u.setInt32(l,0,!0);l+=4;u.setInt32(l,0,!0);l+=4;u.setUint32(l,s.length/4,!0);l+=4;u.setUint32(l,0,!0);l+=4;h.set(i,l);l+=i.length;h.set(s,l);l+=s.length;h.set(r,l);return h}}const Fn=async function JBig2(e={}){var t=e,quit_=(e,t)=>{throw t},n=import.meta.url;try{new URL(".",n).href}catch{}0;console.log.bind(console);var a,r,s,i,o,l=console.error.bind(console),f=!1,c=!1;function updateMemoryViews(){var e=u.buffer;i=new Int8Array(e);new Int16Array(e);o=new Uint8Array(e);new Uint16Array(e);new Int32Array(e);new Uint32Array(e);new Float32Array(e);new Float64Array(e);new BigInt64Array(e);new BigUint64Array(e)}class ExitStatus{name="ExitStatus";constructor(e){this.message=`Program terminated with exit(${e})`;this.status=e}}var h,u,callRuntimeCallbacks=e=>{for(;e.length>0;)e.shift()(t)},m=[],addOnPostRun=e=>m.push(e),p=[],addOnPreRun=e=>p.push(e),d=!0,g=0,b={},handleException=e=>{if(e instanceof ExitStatus||"unwind"==e)return a;quit_(0,e)},keepRuntimeAlive=()=>d||g>0,_proc_exit=e=>{a=e;if(!keepRuntimeAlive()){t.onExit?.(e);f=!0}quit_(0,new ExitStatus(e))},_exit=(e,t)=>{a=e;_proc_exit(e)},callUserCallback=e=>{if(!f)try{return e()}catch(e){handleException(e)}finally{(()=>{if(!keepRuntimeAlive())try{_exit(a)}catch(e){handleException(e)}})()}},alignMemory=(e,t)=>Math.ceil(e/t)*t,growMemory=e=>{var t=(e-u.buffer.byteLength+65535)/65536|0;try{u.grow(t);updateMemoryViews();return 1}catch(e){}};t.noExitRuntime&&(d=t.noExitRuntime);t.print&&t.print;t.printErr&&(l=t.printErr);t.wasmBinary&&t.wasmBinary;t.arguments&&t.arguments;t.thisProgram&&t.thisProgram;if(t.preInit){"function"==typeof t.preInit&&(t.preInit=[t.preInit]);for(;t.preInit.length>0;)t.preInit.shift()()}t.writeArrayToMemory=(e,t)=>{i.set(e,t)};var w,j={e:()=>function abort(e){t.onAbort?.(e);l(e="Aborted("+e+")");f=!0;e+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(e);s?.(n);throw n}(""),b:()=>{d=!1;g=0},c:(e,t)=>{if(b[e]){clearTimeout(b[e].id);delete b[e]}if(!t)return 0;var n=setTimeout(()=>{delete b[e];callUserCallback(()=>h(e,performance.now()))},t);b[e]={id:n,timeout_ms:t};return 0},g:function _createImageData(e){t.imageData=new Uint8Array(e)},d:e=>{var t=o.length,n=2147483648;if((e>>>=0)>n)return!1;for(var a=1;a<=4;a*=2){var r=t*(1+.2/a);r=Math.min(r,e+100663296);var s=Math.min(n,alignMemory(Math.max(e,r),65536));if(growMemory(s))return!0}return!1},a:_proc_exit,h:function _setImageData(e,n,a,r){if(a===n){t.imageData=new Uint8ClampedArray(o.subarray(e,e+a*r));return}const s=n*r,i=t.imageData=new Uint8ClampedArray(s);for(let t=e,r=0;r<s;t+=a,r+=n)i.set(o.subarray(t,t+n),r)},f:function _setLineData(e,n,a){t.imageData.set(o.subarray(e,e+n),a)}};w=await async function createWasm(){function receiveInstance(e,n){!function assignWasmExports(e){t._malloc=e.k;t._free=e.l;t._jbig2_decode=e.m;t._ccitt_decode=e.n;h=e.o;u=e.i;e.__indirect_function_table}(w=e.exports);updateMemoryViews();return w}var e=function getWasmImports(){return{a:j}}();return new Promise((n,a)=>{t.instantiateWasm(e,(e,t)=>{n(receiveInstance(e))})})}();!function run(){!function preRun(){if(t.preRun){"function"==typeof t.preRun&&(t.preRun=[t.preRun]);for(;t.preRun.length;)addOnPreRun(t.preRun.shift())}callRuntimeCallbacks(p)}();function doRun(){t.calledRun=!0;if(!f){!function initRuntime(){c=!0;w.j()}();r?.(t);t.onRuntimeInitialized?.();!function postRun(){if(t.postRun){"function"==typeof t.postRun&&(t.postRun=[t.postRun]);for(;t.postRun.length;)addOnPostRun(t.postRun.shift())}callRuntimeCallbacks(m)}()}}if(t.setStatus){t.setStatus("Running...");setTimeout(()=>{setTimeout(()=>t.setStatus(""),1);doRun()},1)}else doRun()}();return c?t:new Promise((e,t)=>{r=e;s=t})};class JBig2Error extends rn{constructor(e){super(e,"Jbig2Error")}}class JBig2CCITTFaxWasmImage{static#R=null;static#B=null;static#H=null;static#x=!0;static#D=!0;static#A=null;static setOptions({handler:e,useWasm:t,useWorkerFetch:n,wasmUrl:a}){this.#x=t;this.#D=n;this.#A=a;n||(this.#B=e)}static async#M(e,t,n){const a="jbig2.wasm";try{this.#R||(this.#D?this.#R=await fetchBinaryData(`${this.#A}${a}`):this.#R=await this.#B.sendWithPromise("FetchBinaryData",{type:"wasmFactory",filename:a}));return n((await WebAssembly.instantiate(this.#R,t)).instance)}catch(t){warn(`JBig2Image#instantiateWasm: ${t}`);return e(null)}finally{this.#B=null}}static async decode(e,t,n,a,r){if(!this.#H){const{promise:e,resolve:t}=Promise.withResolvers(),n=[e];this.#x?n.push(Fn({warn,instantiateWasm:this.#M.bind(this,t)})):t(null);this.#H=Promise.race(n)}const s=await this.#H;if(!s)throw new JBig2Error("JBig2 failed to initialize");let i,o;try{const l=e.length;i=s._malloc(l);s.writeArrayToMemory(e,i);if(r)s._ccitt_decode(i,l,t,n,r.K,r.EndOfLine?1:0,r.EncodedByteAlign?1:0,r.BlackIs1?1:0,r.Columns,r.Rows);else{const e=a?a.length:0;if(e>0){o=s._malloc(e);s.writeArrayToMemory(a,o)}s._jbig2_decode(i,l,t,n,o,e)}if(!s.imageData)throw new JBig2Error("Unknown error");const{imageData:f}=s;s.imageData=null;return f}finally{i&&s._free(i);o&&s._free(o)}}static cleanup(){this.#H=null}}const Tn=new Uint8Array(0);class DecodeStream extends BaseStream{constructor(e){super();this._rawMinBufferLength=e||0;this.pos=0;this.bufferLength=0;this.eof=!1;this.buffer=Tn;this.minBufferLength=512;if(e)for(;this.minBufferLength<e;)this.minBufferLength*=2}get isEmpty(){for(;!this.eof&&0===this.bufferLength;)this.readBlock();return 0===this.bufferLength}ensureBuffer(e){const t=this.buffer;if(e<=t.byteLength)return t;let n=this.minBufferLength;for(;n<e;)n*=2;const a=new Uint8Array(n);a.set(t);return this.buffer=a}getByte(){const e=this.pos;for(;this.bufferLength<=e;){if(this.eof)return-1;this.readBlock()}return this.buffer[this.pos++]}getBytes(e,t=null){const n=this.pos;let a;if(e){this.ensureBuffer(n+e);a=n+e;for(;!this.eof&&this.bufferLength<a;)this.readBlock(t);const r=this.bufferLength;a>r&&(a=r)}else{for(;!this.eof;)this.readBlock(t);a=this.bufferLength}this.pos=a;return this.buffer.subarray(n,a)}async getImageData(e,t){if(!this.canAsyncDecodeImageFromBuffer)return this.isAsyncDecoder?this.decodeImage(null,e,t):this.getBytes(e,t);const n=await this.stream.asyncGetBytes();return this.decodeImage(n,e,t)}async asyncGetBytesFromDecompressionStream(e){this.stream.reset();const t=this.stream.isAsync?await this.stream.asyncGetBytes():this.stream.getBytes();try{const{readable:n,writable:a}=new DecompressionStream(e),r=a.getWriter();await r.ready;r.write(t).then(async()=>{await r.ready;await r.close()}).catch(()=>{});const s=[];let i=0;for await(const e of n){s.push(e);i+=e.byteLength}const o=new Uint8Array(i);let l=0;for(const e of s){o.set(e,l);l+=e.byteLength}return{decompressed:o,compressed:t}}catch{return{decompressed:null,compressed:t}}}reset(){this.pos=0}makeSubStream(e,t,n=null){if(void 0===t)for(;!this.eof;)this.readBlock();else{const n=e+t;for(;this.bufferLength<=n&&!this.eof;)this.readBlock()}return new Stream(this.buffer,e,t,n)}getBaseStreams(){return this.stream?this.stream.getBaseStreams():null}clone(){for(;!this.eof;)this.readBlock();return new Stream(this.buffer,this.start,this.end-this.start,this.dict.clone())}}class StreamsSequenceStream extends DecodeStream{constructor(e,t=null){e=e.filter(e=>e instanceof BaseStream&&!e.isImageStream);let n=0;for(const t of e)n+=t instanceof DecodeStream?t._rawMinBufferLength:t.length;super(n);this.streams=e;this._onError=t}readBlock(){const e=this.streams;if(0===e.length){this.eof=!0;return}const t=e.shift();let n;try{n=t.getBytes()}catch(e){if(this._onError){this._onError(e,t.dict?.objId);return}throw e}const a=this.bufferLength,r=a+n.length;this.ensureBuffer(r).set(n,a);this.bufferLength=r}getBaseStreams(){const e=[];for(const t of this.streams){const n=t.getBaseStreams();n&&e.push(...n)}return e.length>0?e:null}}class ColorSpaceUtils{static parse({cs:e,xref:t,resources:n=null,pdfFunctionFactory:a,globalColorSpaceCache:r,localColorSpaceCache:s,asyncIfNotCached:i=!1}){const o={xref:t,resources:n,pdfFunctionFactory:a,globalColorSpaceCache:r,localColorSpaceCache:s};let l,f,c;if(e instanceof Ref){f=e;const n=r.getByRef(f)||s.getByRef(f);if(n)return n;e=t.fetch(e)}if(e instanceof Name){l=e.name;const t=s.getByName(l);if(t)return t}try{c=this.#P(e,o)}catch(e){if(i&&!(e instanceof MissingDataException))return Promise.reject(e);throw e}if(l||f){s.set(l,f,c);f&&r.set(null,f,c)}return i?Promise.resolve(c):c}static#E(e,t){const{globalColorSpaceCache:n}=t;let a;if(e instanceof Ref){a=e;const t=n.getByRef(a);if(t)return t}const r=this.#P(e,t);a&&n.set(null,a,r);return r}static#P(e,t){const{xref:n,resources:a,pdfFunctionFactory:r,globalColorSpaceCache:s}=t;if((e=n.fetchIfRef(e))instanceof Name)switch(e.name){case"G":case"DeviceGray":return this.gray;case"RGB":case"DeviceRGB":return this.rgb;case"DeviceRGBA":return this.rgba;case"CMYK":case"DeviceCMYK":return this.cmyk;case"Pattern":return new PatternCS(null);default:if(a instanceof Dict){const n=a.get("ColorSpace");if(n instanceof Dict){const a=n.get(e.name);if(a){if(a instanceof Name)return this.#P(a,t);e=a;break}}}warn(`Unrecognized ColorSpace: ${e.name}`);return this.gray}if(Array.isArray(e)){const a=n.fetchIfRef(e[0]).name;let i,o,l,f,c,h;switch(a){case"G":case"DeviceGray":return this.gray;case"RGB":case"DeviceRGB":return this.rgb;case"CMYK":case"DeviceCMYK":return this.cmyk;case"CalGray":i=n.fetchIfRef(e[1]);f=i.getArray("WhitePoint");c=i.getArray("BlackPoint");h=i.get("Gamma");return new CalGrayCS(f,c,h);case"CalRGB":i=n.fetchIfRef(e[1]);f=i.getArray("WhitePoint");c=i.getArray("BlackPoint");h=i.getArray("Gamma");const u=i.getArray("Matrix");return new CalRGBCS(f,c,h,u);case"ICCBased":const m=e[1]instanceof Ref;if(m){const t=s.getByRef(e[1]);if(t)return t}const p=n.fetchIfRef(e[1]),d=p.dict;o=d.get("N");if(IccColorSpace.isUsable)try{const t=new IccColorSpace(p.getBytes(),"ICCBased",o);m&&s.set(null,e[1],t);return t}catch(t){if(t instanceof MissingDataException)throw t;warn(`ICCBased color space (${e[1]}): "${t}".`)}const g=d.getRaw("Alternate");if(g){const e=this.#E(g,t);if(e.numComps===o)return e;warn("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===o)return this.gray;if(3===o)return this.rgb;if(4===o)return this.cmyk;break;case"Pattern":l=e[1]||null;l&&(l=this.#E(l,t));return new PatternCS(l);case"I":case"Indexed":l=this.#E(e[1],t);const b=MathClamp(n.fetchIfRef(e[2]),0,255),w=n.fetchIfRef(e[3]);return new IndexedCS(l,b,w);case"Separation":case"DeviceN":const j=n.fetchIfRef(e[1]);o=Array.isArray(j)?j.length:1;l=this.#E(e[2],t);const k=r.create(e[3]);return new AlternateCS(o,l,k);case"Lab":i=n.fetchIfRef(e[1]);f=i.getArray("WhitePoint");c=i.getArray("BlackPoint");const y=i.getArray("Range");return new LabCS(f,c,y);default:warn(`Unimplemented ColorSpace object: ${a}`);return this.gray}}warn(`Unrecognized ColorSpace object: ${e}`);return this.gray}static get gray(){return shadow(this,"gray",new DeviceGrayCS)}static get rgb(){return shadow(this,"rgb",new DeviceRgbCS)}static get rgba(){return shadow(this,"rgba",new DeviceRgbaCS)}static get cmyk(){if(CmykICCBasedCS.isUsable)try{return shadow(this,"cmyk",new CmykICCBasedCS)}catch{warn("CMYK fallback: DeviceCMYK")}return shadow(this,"cmyk",new DeviceCmykCS)}}class JpegError extends rn{constructor(e){super(e,"JpegError")}}class DNLMarkerError extends rn{constructor(e,t){super(e,"DNLMarkerError");this.scanLines=t}}class EOIMarkerError extends rn{constructor(e){super(e,"EOIMarkerError")}}const On=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),Rn=4017,Bn=799,Hn=3406,Dn=2276,Mn=1567,Pn=3784,En=5793,Nn=2896;function buildHuffmanTable(e,t){let n,a,r=0,s=16;for(;s>0&&!e[s-1];)s--;const i=[{children:[],index:0}];let o,l=i[0];for(n=0;n<s;n++){for(a=0;a<e[n];a++){l=i.pop();l.children[l.index]=t[r];for(;l.index>0;)l=i.pop();l.index++;i.push(l);for(;i.length<=n;){i.push(o={children:[],index:0});l.children[l.index]=o.children;l=o}r++}if(n+1<s){i.push(o={children:[],index:0});l.children[l.index]=o.children;l=o}}return i[0].children}function getBlockBufferOffset(e,t,n){return 64*((e.blocksPerLine+1)*t+n)}function decodeScan(e,t,n,a,r,s,i,o,l,f=!1){const c=n.mcusPerLine,h=n.progressive,u=t;let m=0,p=0;function readBit(){if(p>0){p--;return m>>p&1}m=e[t++];if(255===m){const a=e[t++];if(a){if(220===a&&f){const a=readUint16(e,t+=2);t+=2;if(a>0&&a!==n.scanLines)throw new DNLMarkerError("Found DNL marker (0xFFDC) while parsing scan data",a)}else if(217===a){if(f){const e=w*(8===n.precision?8:0);if(e>0&&Math.round(n.scanLines/e)>=5)throw new DNLMarkerError("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",e)}throw new EOIMarkerError("Found EOI marker (0xFFD9) while parsing scan data")}throw new JpegError(`unexpected marker ${(m<<8|a).toString(16)}`)}}p=7;return m>>>7}function decodeHuffman(e){let t=e;for(;;){t=t[readBit()];switch(typeof t){case"number":return t;case"object":continue}throw new JpegError("invalid huffman sequence")}}function receive(e){let t=0;for(;e>0;){t=t<<1|readBit();e--}return t}function receiveAndExtend(e){if(1===e)return 1===readBit()?1:-1;const t=receive(e);return t>=1<<e-1?t:t+(-1<<e)+1}let d=0;let g,b=0;let w=0;function decodeMcu(e,t,n,a,r){const s=n%c;w=(n/c|0)*e.v+a;const i=s*e.h+r;t(e,getBlockBufferOffset(e,w,i))}function decodeBlock(e,t,n){w=n/e.blocksPerLine|0;const a=n%e.blocksPerLine;t(e,getBlockBufferOffset(e,w,a))}const j=a.length;let k,y,q,v,S,x;x=h?0===s?0===o?function decodeDCFirst(e,t){const n=decodeHuffman(e.huffmanTableDC),a=0===n?0:receiveAndExtend(n)<<l;e.blockData[t]=e.pred+=a}:function decodeDCSuccessive(e,t){e.blockData[t]|=readBit()<<l}:0===o?function decodeACFirst(e,t){if(d>0){d--;return}let n=s;const a=i;for(;n<=a;){const a=decodeHuffman(e.huffmanTableAC),r=15&a,s=a>>4;if(0===r){if(s<15){d=receive(s)+(1<<s)-1;break}n+=16;continue}n+=s;const i=On[n];e.blockData[t+i]=receiveAndExtend(r)*(1<<l);n++}}:function decodeACSuccessive(e,t){let n=s;const a=i;let r,o,f=0;for(;n<=a;){const a=t+On[n],s=e.blockData[a]<0?-1:1;switch(b){case 0:o=decodeHuffman(e.huffmanTableAC);r=15&o;f=o>>4;if(0===r)if(f<15){d=receive(f)+(1<<f);b=4}else{f=16;b=1}else{if(1!==r)throw new JpegError("invalid ACn encoding");g=receiveAndExtend(r);b=f?2:3}continue;case 1:case 2:if(e.blockData[a])e.blockData[a]+=s*(readBit()<<l);else{f--;0===f&&(b=2===b?3:0)}break;case 3:if(e.blockData[a])e.blockData[a]+=s*(readBit()<<l);else{e.blockData[a]=g<<l;b=0}break;case 4:e.blockData[a]&&(e.blockData[a]+=s*(readBit()<<l))}n++}if(4===b){d--;0===d&&(b=0)}}:function decodeBaseline(e,t){const n=decodeHuffman(e.huffmanTableDC),a=0===n?0:receiveAndExtend(n);e.blockData[t]=e.pred+=a;let r=1;for(;r<64;){const n=decodeHuffman(e.huffmanTableAC),a=15&n,s=n>>4;if(0===a){if(s<15)break;r+=16;continue}r+=s;const i=On[r];e.blockData[t+i]=receiveAndExtend(a);r++}};let C,T=0;const O=1===j?a[0].blocksPerLine*a[0].blocksPerColumn:c*n.mcusPerColumn;let R,H;for(;T<=O;){const n=r?Math.min(O-T,r):O;if(n>0){for(y=0;y<j;y++)a[y].pred=0;d=0;if(1===j){k=a[0];for(S=0;S<n;S++){decodeBlock(k,x,T);T++}}else for(S=0;S<n;S++){for(y=0;y<j;y++){k=a[y];R=k.h;H=k.v;for(q=0;q<H;q++)for(v=0;v<R;v++)decodeMcu(k,x,T,q,v)}T++}}p=0;C=findNextFileMarker(e,t);if(!C)break;if(C.invalid){warn(`decodeScan - ${n>0?"unexpected":"excessive"} MCU data, current marker is: ${C.invalid}`);t=C.offset}if(!(C.marker>=65488&&C.marker<=65495))break;t+=2}return t-u}function quantizeAndInverse(e,t,n){const a=e.quantizationTable,r=e.blockData;let s,i,o,l,f,c,h,u,m,p,d,g,b,w,j,k,y;if(!a)throw new JpegError("missing required Quantization Table.");for(let e=0;e<64;e+=8){m=r[t+e];p=r[t+e+1];d=r[t+e+2];g=r[t+e+3];b=r[t+e+4];w=r[t+e+5];j=r[t+e+6];k=r[t+e+7];m*=a[e];if(0!==(p|d|g|b|w|j|k)){p*=a[e+1];d*=a[e+2];g*=a[e+3];b*=a[e+4];w*=a[e+5];j*=a[e+6];k*=a[e+7];s=En*m+128>>8;i=En*b+128>>8;o=d;l=j;f=Nn*(p-k)+128>>8;u=Nn*(p+k)+128>>8;c=g<<4;h=w<<4;s=s+i+1>>1;i=s-i;y=o*Pn+l*Mn+128>>8;o=o*Mn-l*Pn+128>>8;l=y;f=f+h+1>>1;h=f-h;u=u+c+1>>1;c=u-c;s=s+l+1>>1;l=s-l;i=i+o+1>>1;o=i-o;y=f*Dn+u*Hn+2048>>12;f=f*Hn-u*Dn+2048>>12;u=y;y=c*Bn+h*Rn+2048>>12;c=c*Rn-h*Bn+2048>>12;h=y;n[e]=s+u;n[e+7]=s-u;n[e+1]=i+h;n[e+6]=i-h;n[e+2]=o+c;n[e+5]=o-c;n[e+3]=l+f;n[e+4]=l-f}else{y=En*m+512>>10;n[e]=y;n[e+1]=y;n[e+2]=y;n[e+3]=y;n[e+4]=y;n[e+5]=y;n[e+6]=y;n[e+7]=y}}for(let e=0;e<8;++e){m=n[e];p=n[e+8];d=n[e+16];g=n[e+24];b=n[e+32];w=n[e+40];j=n[e+48];k=n[e+56];if(0!==(p|d|g|b|w|j|k)){s=En*m+2048>>12;i=En*b+2048>>12;o=d;l=j;f=Nn*(p-k)+2048>>12;u=Nn*(p+k)+2048>>12;c=g;h=w;s=4112+(s+i+1>>1);i=s-i;y=o*Pn+l*Mn+2048>>12;o=o*Mn-l*Pn+2048>>12;l=y;f=f+h+1>>1;h=f-h;u=u+c+1>>1;c=u-c;s=s+l+1>>1;l=s-l;i=i+o+1>>1;o=i-o;y=f*Dn+u*Hn+2048>>12;f=f*Hn-u*Dn+2048>>12;u=y;y=c*Bn+h*Rn+2048>>12;c=c*Rn-h*Bn+2048>>12;h=y;m=s+u;k=s-u;p=i+h;j=i-h;d=o+c;w=o-c;g=l+f;b=l-f;m<16?m=0:m>=4080?m=255:m>>=4;p<16?p=0:p>=4080?p=255:p>>=4;d<16?d=0:d>=4080?d=255:d>>=4;g<16?g=0:g>=4080?g=255:g>>=4;b<16?b=0:b>=4080?b=255:b>>=4;w<16?w=0:w>=4080?w=255:w>>=4;j<16?j=0:j>=4080?j=255:j>>=4;k<16?k=0:k>=4080?k=255:k>>=4;r[t+e]=m;r[t+e+8]=p;r[t+e+16]=d;r[t+e+24]=g;r[t+e+32]=b;r[t+e+40]=w;r[t+e+48]=j;r[t+e+56]=k}else{y=En*m+8192>>14;y=y<-2040?0:y>=2024?255:y+2056>>4;r[t+e]=y;r[t+e+8]=y;r[t+e+16]=y;r[t+e+24]=y;r[t+e+32]=y;r[t+e+40]=y;r[t+e+48]=y;r[t+e+56]=y}}}function buildComponentData(e,t){const n=t.blocksPerLine,a=t.blocksPerColumn,r=new Int16Array(64);for(let e=0;e<a;e++)for(let a=0;a<n;a++){quantizeAndInverse(t,getBlockBufferOffset(t,e,a),r)}return t.blockData}function findNextFileMarker(e,t,n=t){const a=e.length-1;let r=n<t?n:t;if(t>=a)return null;const s=readUint16(e,t);if(s>=65472&&s<=65534)return{invalid:null,marker:s,offset:t};let i=readUint16(e,r);for(;!(i>=65472&&i<=65534);){if(++r>=a)return null;i=readUint16(e,r)}return{invalid:s.toString(16),marker:i,offset:r}}function prepareComponents(e){const t=Math.ceil(e.samplesPerLine/8/e.maxH),n=Math.ceil(e.scanLines/8/e.maxV);for(const a of e.components){const r=Math.ceil(Math.ceil(e.samplesPerLine/8)*a.h/e.maxH),s=Math.ceil(Math.ceil(e.scanLines/8)*a.v/e.maxV),i=t*a.h,o=64*(n*a.v)*(i+1);a.blockData=new Int16Array(o);a.blocksPerLine=r;a.blocksPerColumn=s}e.mcusPerLine=t;e.mcusPerColumn=n}function readDataBlock(e,t){const n=readUint16(e,t);let a=(t+=2)+n-2;const r=findNextFileMarker(e,a,t);if(r?.invalid){warn("readDataBlock - incorrect length, current marker is: "+r.invalid);a=r.offset}const s=e.subarray(t,a);return{appData:s,oldOffset:t,newOffset:t+s.length}}function skipData(e,t){const n=readUint16(e,t),a=(t+=2)+n-2,r=findNextFileMarker(e,a,t);return r?.invalid?r.offset:a}class JpegImage{constructor({decodeTransform:e=null,colorTransform:t=-1}={}){this._decodeTransform=e;this._colorTransform=t}static canUseImageDecoder(e,t=-1){let n=null,a=0,r=null,s=readUint16(e,a);a+=2;if(65496!==s)throw new JpegError("SOI not found");s=readUint16(e,a);a+=2;e:for(;65497!==s;){switch(s){case 65505:const{appData:t,oldOffset:i,newOffset:o}=readDataBlock(e,a);a=o;if(69===t[0]&&120===t[1]&&105===t[2]&&102===t[3]&&0===t[4]&&0===t[5]){if(n)throw new JpegError("Duplicate EXIF-blocks found.");n={exifStart:i+6,exifEnd:o}}s=readUint16(e,a);a+=2;continue;case 65472:case 65473:case 65474:r=e[a+7];break e;case 65535:255!==e[a]&&a--}a=skipData(e,a);s=readUint16(e,a);a+=2}return 4===r||3===r&&0===t?null:n||{}}parse(e,{dnlScanLines:t=null}={}){let n,a,r=0,s=null,i=null,o=0;const l=[],f=[],c=[];let h=readUint16(e,r);r+=2;if(65496!==h)throw new JpegError("SOI not found");h=readUint16(e,r);r+=2;e:for(;65497!==h;){let u,m,p;switch(h){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:const{appData:d,newOffset:g}=readDataBlock(e,r);r=g;65504===h&&74===d[0]&&70===d[1]&&73===d[2]&&70===d[3]&&0===d[4]&&(s={version:{major:d[5],minor:d[6]},densityUnits:d[7],xDensity:d[8]<<8|d[9],yDensity:d[10]<<8|d[11],thumbWidth:d[12],thumbHeight:d[13],thumbData:d.subarray(14,14+3*d[12]*d[13])});65518===h&&65===d[0]&&100===d[1]&&111===d[2]&&98===d[3]&&101===d[4]&&(i={version:d[5]<<8|d[6],flags0:d[7]<<8|d[8],flags1:d[9]<<8|d[10],transformCode:d[11]});break;case 65499:const b=readUint16(e,r);r+=2;const w=b+r-2;let j;for(;r<w;){const t=e[r++],n=new Uint16Array(64);if(t>>4){if(t>>4!=1)throw new JpegError("DQT - invalid table spec");for(m=0;m<64;m++){j=On[m];n[j]=readUint16(e,r);r+=2}}else for(m=0;m<64;m++){j=On[m];n[j]=e[r++]}l[15&t]=n}break;case 65472:case 65473:case 65474:if(n)throw new JpegError("Only single frame JPEGs supported");r+=2;n={};n.extended=65473===h;n.progressive=65474===h;n.precision=e[r++];const k=readUint16(e,r);r+=2;n.scanLines=t||k;n.samplesPerLine=readUint16(e,r);r+=2;n.components=[];n.componentIds={};const y=e[r++];let q=0,v=0;for(u=0;u<y;u++){const t=e[r],a=e[r+1]>>4,s=15&e[r+1];q<a&&(q=a);v<s&&(v=s);const i=e[r+2];p=n.components.push({h:a,v:s,quantizationId:i,quantizationTable:null});n.componentIds[t]=p-1;r+=3}n.maxH=q;n.maxV=v;prepareComponents(n);break;case 65476:const S=readUint16(e,r);r+=2;for(u=2;u<S;){const t=e[r++],n=new Uint8Array(16);let a=0;for(m=0;m<16;m++,r++)a+=n[m]=e[r];const s=new Uint8Array(a);for(m=0;m<a;m++,r++)s[m]=e[r];u+=17+a;(t>>4?f:c)[15&t]=buildHuffmanTable(n,s)}break;case 65501:r+=2;a=readUint16(e,r);r+=2;break;case 65498:const x=1===++o&&!t;r+=2;const C=e[r++],T=[];for(u=0;u<C;u++){const t=e[r++],a=n.componentIds[t],s=n.components[a];s.index=t;const i=e[r++];s.huffmanTableDC=c[i>>4];s.huffmanTableAC=f[15&i];T.push(s)}const O=e[r++],R=e[r++],H=e[r++];try{r+=decodeScan(e,r,n,T,a,O,R,H>>4,15&H,x)}catch(t){if(t instanceof DNLMarkerError){warn(`${t.message} -- attempting to re-parse the JPEG image.`);return this.parse(e,{dnlScanLines:t.scanLines})}if(t instanceof EOIMarkerError){warn(`${t.message} -- ignoring the rest of the image data.`);break e}throw t}break;case 65500:r+=4;break;case 65535:255!==e[r]&&r--;break;default:const D=findNextFileMarker(e,r-2,r-3);if(D?.invalid){warn("JpegImage.parse - unexpected data, current marker is: "+D.invalid);r=D.offset;break}if(!D||r>=e.length-1){warn("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break e}throw new JpegError("JpegImage.parse - unknown marker: "+h.toString(16))}h=readUint16(e,r);r+=2}if(!n)throw new JpegError("JpegImage.parse - no frame data found.");this.width=n.samplesPerLine;this.height=n.scanLines;this.jfif=s;this.adobe=i;this.components=[];for(const e of n.components){const t=l[e.quantizationId];t&&(e.quantizationTable=t);this.components.push({index:e.index,output:buildComponentData(0,e),scaleX:e.h/n.maxH,scaleY:e.v/n.maxV,blocksPerLine:e.blocksPerLine,blocksPerColumn:e.blocksPerColumn})}this.numComponents=this.components.length}_getLinearizedBlockData(e,t,n=!1){const a=this.width/e,r=this.height/t;let s,i,o,l,f,c,h,u,m,p,d,g=0;const b=this.components.length,w=e*t*b,j=new Uint8ClampedArray(w),k=new Uint32Array(e),y=4294967288;let q;for(h=0;h<b;h++){s=this.components[h];i=s.scaleX*a;o=s.scaleY*r;g=h;d=s.output;l=s.blocksPerLine+1<<3;if(i!==q){for(f=0;f<e;f++){u=0|f*i;k[f]=(u&y)<<3|7&u}q=i}for(c=0;c<t;c++){u=0|c*o;p=l*(u&y)|(7&u)<<3;for(f=0;f<e;f++){j[g]=d[p+k[f]];g+=b}}}let v=this._decodeTransform;n||4!==b||v||(v=new Int32Array([-256,255,-256,255,-256,255,-256,255]));if(v)for(h=0;h<w;)for(u=0,m=0;u<b;u++,h++,m+=2)j[h]=(j[h]*v[m]>>8)+v[m+1];return j}get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform&&(82!==this.components[0].index||71!==this.components[1].index||66!==this.components[2].index):1===this._colorTransform}_convertYccToRgb(e){let t,n,a;for(let r=0,s=e.length;r<s;r+=3){t=e[r];n=e[r+1];a=e[r+2];e[r]=t-179.456+1.402*a;e[r+1]=t+135.459-.344*n-.714*a;e[r+2]=t-226.816+1.772*n}return e}_convertYccToRgba(e,t){for(let n=0,a=0,r=e.length;n<r;n+=3,a+=4){const r=e[n],s=e[n+1],i=e[n+2];t[a]=r-179.456+1.402*i;t[a+1]=r+135.459-.344*s-.714*i;t[a+2]=r-226.816+1.772*s;t[a+3]=255}return t}_convertYcckToRgb(e){this._convertYcckToCmyk(e);return this._convertCmykToRgb(e)}_convertYcckToRgba(e){this._convertYcckToCmyk(e);return this._convertCmykToRgba(e)}_convertYcckToCmyk(e){let t,n,a;for(let r=0,s=e.length;r<s;r+=4){t=e[r];n=e[r+1];a=e[r+2];e[r]=434.456-t-1.402*a;e[r+1]=119.541-t+.344*n+.714*a;e[r+2]=481.816-t-1.772*n}return e}_convertCmykToRgb(e){const t=e.length/4;ColorSpaceUtils.cmyk.getRgbBuffer(e,0,t,e,0,8,0);return e.subarray(0,3*t)}_convertCmykToRgba(e){ColorSpaceUtils.cmyk.getRgbBuffer(e,0,e.length/4,e,0,8,1);if(ColorSpaceUtils.cmyk instanceof DeviceCmykCS)for(let t=3,n=e.length;t<n;t+=4)e[t]=255;return e}getData({width:e,height:t,forceRGBA:n=!1,forceRGB:a=!1,isSourcePDF:r=!1}){if(this.numComponents>4)throw new JpegError("Unsupported color mode");const s=this._getLinearizedBlockData(e,t,r);if(1===this.numComponents&&(n||a)){const e=s.length*(n?4:3),t=new Uint8ClampedArray(e);let a=0;if(n)!function grayToRGBA(e,t){if(FeatureTest.isLittleEndian)for(let n=0,a=e.length;n<a;n++)t[n]=65793*e[n]|4278190080;else for(let n=0,a=e.length;n<a;n++)t[n]=16843008*e[n]|255}(s,new Uint32Array(t.buffer));else for(const e of s){t[a++]=e;t[a++]=e;t[a++]=e}return t}if(3===this.numComponents&&this._isColorConversionNeeded){if(n){const e=new Uint8ClampedArray(s.length/3*4);return this._convertYccToRgba(s,e)}return this._convertYccToRgb(s)}if(4===this.numComponents){if(this._isColorConversionNeeded)return n?this._convertYcckToRgba(s):a?this._convertYcckToRgb(s):this._convertYcckToCmyk(s);if(n)return this._convertCmykToRgba(s);if(a)return this._convertCmykToRgb(s)}return s}}class JpegStream extends DecodeStream{static#T=FeatureTest.isImageDecoderSupported;constructor(e,t,n){super(t);this.stream=e;this.dict=e.dict;this.maybeLength=t;this.params=n}static get canUseImageDecoder(){return shadow(this,"canUseImageDecoder",this.#T?ImageDecoder.isTypeSupported("image/jpeg"):Promise.resolve(!1))}static setOptions({isImageDecoderSupported:e=!1}){this.#T=e}get bytes(){return shadow(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(){this.decodeImage()}get jpegOptions(){const e={decodeTransform:void 0,colorTransform:void 0},t=this.dict.getArray("D","Decode");if((this.forceRGBA||this.forceRGB)&&Array.isArray(t)){const n=this.dict.get("BPC","BitsPerComponent")||8,a=t.length,r=new Int32Array(a);let s=!1;const i=(1<<n)-1;for(let e=0;e<a;e+=2){r[e]=256*(t[e+1]-t[e])|0;r[e+1]=t[e]*i|0;256===r[e]&&0===r[e+1]||(s=!0)}s&&(e.decodeTransform=r)}if(this.params instanceof Dict){const t=this.params.get("ColorTransform");Number.isInteger(t)&&(e.colorTransform=t)}return shadow(this,"jpegOptions",e)}#N(e){for(let t=0,n=e.length-1;t<n;t++)if(255===e[t]&&216===e[t+1]){t>0&&(e=e.subarray(t));break}return e}decodeImage(e){if(this.eof)return this.buffer;e=this.#N(e||this.bytes);const t=new JpegImage(this.jpegOptions);t.parse(e);const n=t.getData({width:this.drawWidth,height:this.drawHeight,forceRGBA:this.forceRGBA,forceRGB:this.forceRGB,isSourcePDF:!0});this.buffer=n;this.bufferLength=n.length;this.eof=!0;return this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}async getTransferableImage(){if(!await JpegStream.canUseImageDecoder)return null;const e=this.jpegOptions;if(e.decodeTransform)return null;let t;try{const n=this.canAsyncDecodeImageFromBuffer&&await this.stream.asyncGetBytes()||this.bytes;if(!n)return null;let a=this.#N(n);const r=JpegImage.canUseImageDecoder(a,e.colorTransform);if(!r)return null;if(r.exifStart){a=a.slice();a.fill(0,r.exifStart,r.exifEnd)}t=new ImageDecoder({data:a,type:"image/jpeg",preferAnimation:!1});return(await t.decode()).image}catch(e){warn(`getTransferableImage - failed: "${e}".`);return null}finally{t?.close()}}get isImageStream(){return!0}}const zn=async function OpenJPEG(e={}){var t=e,n="./this.program",quit_=(e,t)=>{throw t},a=import.meta.url;try{new URL(".",a).href}catch{}0;var r,s,i,o,l,f,c,h,u=console.log.bind(console),m=console.error.bind(console),p=!1,d=!1;function updateMemoryViews(){var e=o.buffer;l=new Int8Array(e);new Int16Array(e);f=new Uint8Array(e);new Uint16Array(e);c=new Int32Array(e);h=new Uint32Array(e);new Float32Array(e);new Float64Array(e);new BigInt64Array(e);new BigUint64Array(e)}class ExitStatus{name="ExitStatus";constructor(e){this.message=`Program terminated with exit(${e})`;this.status=e}}var g,callRuntimeCallbacks=e=>{for(;e.length>0;)e.shift()(t)},b=[],addOnPostRun=e=>b.push(e),w=[],addOnPreRun=e=>w.push(e),j=!0,k=0,y={},handleException=e=>{if(e instanceof ExitStatus||"unwind"==e)return r;quit_(0,e)},keepRuntimeAlive=()=>j||k>0,_proc_exit=e=>{r=e;if(!keepRuntimeAlive()){t.onExit?.(e);p=!0}quit_(0,new ExitStatus(e))},_exit=(e,t)=>{r=e;_proc_exit(e)},callUserCallback=e=>{if(!p)try{e();(()=>{if(!keepRuntimeAlive())try{_exit(r)}catch(e){handleException(e)}})()}catch(e){handleException(e)}},alignMemory=(e,t)=>Math.ceil(e/t)*t,growMemory=e=>{var t=(e-o.buffer.byteLength+65535)/65536|0;try{o.grow(t);updateMemoryViews();return 1}catch(e){}},q={},getEnvStrings=()=>{if(!getEnvStrings.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.language||"C").replace("-","_")+".UTF-8",_:n||"./this.program"};for(var t in q)void 0===q[t]?delete e[t]:e[t]=q[t];var a=[];for(var t in e)a.push(`${t}=${e[t]}`);getEnvStrings.strings=a}return getEnvStrings.strings},stringToUTF8=(e,t,n)=>((e,t,n,a)=>{if(!(a>0))return 0;for(var r=n,s=n+a-1,i=0;i<e.length;++i){var o=e.codePointAt(i);if(o<=127){if(n>=s)break;t[n++]=o}else if(o<=2047){if(n+1>=s)break;t[n++]=192|o>>6;t[n++]=128|63&o}else if(o<=65535){if(n+2>=s)break;t[n++]=224|o>>12;t[n++]=128|o>>6&63;t[n++]=128|63&o}else{if(n+3>=s)break;t[n++]=240|o>>18;t[n++]=128|o>>12&63;t[n++]=128|o>>6&63;t[n++]=128|63&o;i++}}t[n]=0;return n-r})(e,f,t,n),lengthBytesUTF8=e=>{for(var t=0,n=0;n<e.length;++n){var a=e.charCodeAt(n);if(a<=127)t++;else if(a<=2047)t+=2;else if(a>=55296&&a<=57343){t+=4;++n}else t+=3}return t},v=[null,[],[]],S="undefined"!=typeof TextDecoder?new TextDecoder:void 0,UTF8ArrayToString=(e,t=0,n,a)=>{var r=((e,t,n,a)=>{var r=t+n;if(a)return r;for(;e[t]&&!(t>=r);)++t;return t})(e,t,n,a);if(r-t>16&&e.buffer&&S)return S.decode(e.subarray(t,r));for(var s="";t<r;){var i=e[t++];if(128&i){var o=63&e[t++];if(192!=(224&i)){var l=63&e[t++];if((i=224==(240&i)?(15&i)<<12|o<<6|l:(7&i)<<18|o<<12|l<<6|63&e[t++])<65536)s+=String.fromCharCode(i);else{var f=i-65536;s+=String.fromCharCode(55296|f>>10,56320|1023&f)}}else s+=String.fromCharCode((31&i)<<6|o)}else s+=String.fromCharCode(i)}return s},printChar=(e,t)=>{var n=v[e];if(0===t||10===t){(1===e?u:m)(UTF8ArrayToString(n));n.length=0}else n.push(t)},UTF8ToString=(e,t,n)=>e?UTF8ArrayToString(f,e,t,n):"";t.noExitRuntime&&(j=t.noExitRuntime);t.print&&(u=t.print);t.printErr&&(m=t.printErr);t.wasmBinary&&t.wasmBinary;t.arguments&&t.arguments;t.thisProgram&&(n=t.thisProgram);if(t.preInit){"function"==typeof t.preInit&&(t.preInit=[t.preInit]);for(;t.preInit.length>0;)t.preInit.shift()()}t.writeArrayToMemory=(e,t)=>{l.set(e,t)};var x,C={k:()=>function abort(e){t.onAbort?.(e);m(e="Aborted("+e+")");p=!0;e+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(e);i?.(n);throw n}(""),j:()=>{j=!1;k=0},l:(e,t)=>{if(y[e]){clearTimeout(y[e].id);delete y[e]}if(!t)return 0;var n=setTimeout(()=>{delete y[e];callUserCallback(()=>g(e,performance.now()))},t);y[e]={id:n,timeout_ms:t};return 0},f:function _copy_pixels_1(e,n){e>>=2;const a=t.imageData=new Uint8ClampedArray(n),r=c.subarray(e,e+n);a.set(r)},e:function _copy_pixels_3(e,n,a,r){e>>=2;n>>=2;a>>=2;const s=t.imageData=new Uint8ClampedArray(3*r),i=c.subarray(e,e+r),o=c.subarray(n,n+r),l=c.subarray(a,a+r);for(let e=0;e<r;e++){s[3*e]=i[e];s[3*e+1]=o[e];s[3*e+2]=l[e]}},d:function _copy_pixels_4(e,n,a,r,s){e>>=2;n>>=2;a>>=2;r>>=2;const i=t.imageData=new Uint8ClampedArray(4*s),o=c.subarray(e,e+s),l=c.subarray(n,n+s),f=c.subarray(a,a+s),h=c.subarray(r,r+s);for(let e=0;e<s;e++){i[4*e]=o[e];i[4*e+1]=l[e];i[4*e+2]=f[e];i[4*e+3]=h[e]}},m:e=>{var t=f.length,n=2147483648;if((e>>>=0)>n)return!1;for(var a=1;a<=4;a*=2){var r=t*(1+.2/a);r=Math.min(r,e+100663296);var s=Math.min(n,alignMemory(Math.max(e,r),65536));if(growMemory(s))return!0}return!1},o:(e,t)=>{var n=0,a=0;for(var r of getEnvStrings()){var s=t+n;h[e+a>>2]=s;n+=stringToUTF8(r,s,1/0)+1;a+=4}return 0},p:(e,t)=>{var n=getEnvStrings();h[e>>2]=n.length;var a=0;for(var r of n)a+=lengthBytesUTF8(r)+1;h[t>>2]=a;return 0},n:function _fd_seek(e,t,n,a){t=(r=t)<-9007199254740992||r>9007199254740992?NaN:Number(r);var r;return 70},b:(e,t,n,a)=>{for(var r=0,s=0;s<n;s++){var i=h[t>>2],o=h[t+4>>2];t+=8;for(var l=0;l<o;l++)printChar(e,f[i+l]);r+=o}h[a>>2]=r;return 0},q:function _gray_to_rgba(e,n){e>>=2;const a=t.imageData=new Uint8ClampedArray(4*n),r=c.subarray(e,e+n);for(let e=0;e<n;e++){a[4*e]=a[4*e+1]=a[4*e+2]=r[e];a[4*e+3]=255}},h:function _graya_to_rgba(e,n,a){e>>=2;n>>=2;const r=t.imageData=new Uint8ClampedArray(4*a),s=c.subarray(e,e+a),i=c.subarray(n,n+a);for(let e=0;e<a;e++){r[4*e]=r[4*e+1]=r[4*e+2]=s[e];r[4*e+3]=i[e]}},c:function _jsPrintWarning(e){const n=UTF8ToString(e);(t.warn||console.warn)(`OpenJPEG: ${n}`)},i:_proc_exit,g:function _rgb_to_rgba(e,n,a,r){e>>=2;n>>=2;a>>=2;const s=t.imageData=new Uint8ClampedArray(4*r),i=c.subarray(e,e+r),o=c.subarray(n,n+r),l=c.subarray(a,a+r);for(let e=0;e<r;e++){s[4*e]=i[e];s[4*e+1]=o[e];s[4*e+2]=l[e];s[4*e+3]=255}},a:function _storeErrorMessage(e){const n=UTF8ToString(e);t.errorMessages?t.errorMessages+="\n"+n:t.errorMessages=n}};x=await async function createWasm(){function receiveInstance(e,n){x=e.exports;o=x.r;updateMemoryViews();!function assignWasmExports(e){t._malloc=e.t;t._free=e.u;t._jp2_decode=e.v;g=e.w}(x);return x}var e=function getWasmImports(){return{a:C}}();return new Promise((n,a)=>{t.instantiateWasm(e,(e,t)=>{n(receiveInstance(e))})})}();!function run(){!function preRun(){if(t.preRun){"function"==typeof t.preRun&&(t.preRun=[t.preRun]);for(;t.preRun.length;)addOnPreRun(t.preRun.shift())}callRuntimeCallbacks(w)}();function doRun(){t.calledRun=!0;if(!p){!function initRuntime(){d=!0;x.s()}();s?.(t);t.onRuntimeInitialized?.();!function postRun(){if(t.postRun){"function"==typeof t.postRun&&(t.postRun=[t.postRun]);for(;t.postRun.length;)addOnPostRun(t.postRun.shift())}callRuntimeCallbacks(b)}()}}if(t.setStatus){t.setStatus("Running...");setTimeout(()=>{setTimeout(()=>t.setStatus(""),1);doRun()},1)}else doRun()}();return d?t:new Promise((e,t)=>{s=e;i=t})};class JpxError extends rn{constructor(e){super(e,"JpxError")}}class JpxImage{static#R=null;static#B=null;static#H=null;static#x=!0;static#D=!0;static#A=null;static setOptions({handler:e,useWasm:t,useWorkerFetch:n,wasmUrl:a}){this.#x=t;this.#D=n;this.#A=a;n||(this.#B=e)}static async#z(e){const t=`${this.#A}openjpeg_nowasm_fallback.js`;let n=null;try{n=(await import(+/*webpackIgnore: true*/+/*@vite-ignore*/+t)).default()}catch(e){warn(`JpxImage#getJsModule: ${e}`)}e(n)}static async#M(e,t,n){const a="openjpeg.wasm";try{this.#R||(this.#D?this.#R=await fetchBinaryData(`${this.#A}${a}`):this.#R=await this.#B.sendWithPromise("FetchBinaryData",{type:"wasmFactory",filename:a}));return n((await WebAssembly.instantiate(this.#R,t)).instance)}catch(t){warn(`JpxImage#instantiateWasm: ${t}`);this.#z(e);return null}finally{this.#B=null}}static async decode(e,{numComponents:t=4,isIndexedColormap:n=!1,smaskInData:a=!1,reducePower:r=0}={}){if(!this.#H){const{promise:e,resolve:t}=Promise.withResolvers(),n=[e];this.#x?n.push(zn({warn,instantiateWasm:this.#M.bind(this,t)})):this.#z(t);this.#H=Promise.race(n)}const s=await this.#H;if(!s)throw new JpxError("OpenJPEG failed to initialize");let i;try{const o=e.length;i=s._malloc(o);s.writeArrayToMemory(e,i);if(s._jp2_decode(i,o,t>0?t:0,!!n,!!a,r)){const{errorMessages:e}=s;if(e){delete s.errorMessages;throw new JpxError(e)}throw new JpxError("Unknown error")}const{imageData:l}=s;s.imageData=null;return l}finally{i&&s._free(i)}}static cleanup(){this.#H=null}static parseImageProperties(e){let t=e.getByte();for(;t>=0;){const n=t;t=e.getByte();if(65361===(n<<8|t)){e.skip(4);const t=e.getInt32()>>>0,n=e.getInt32()>>>0,a=e.getInt32()>>>0,r=e.getInt32()>>>0;e.skip(16);return{width:t-a,height:n-r,bitsPerComponent:8,componentsCount:e.getUint16()}}}throw new JpxError("No size marker found in JPX stream")}}function addState(e,t,n,a,r){let s=e;for(let e=0,n=t.length-1;e<n;e++){const n=t[e];s=s[n]||=[]}s[t.at(-1)]={checkFn:n,iterateFn:a,processFn:r}}const _n=[];addState(_n,[ye,ve,_t,qe],null,function iterateInlineImageGroup(e,t){const n=e.fnArray,a=(t-(e.iCurr-3))%4;switch(a){case 0:return n[t]===ye;case 1:return n[t]===ve;case 2:return n[t]===_t;case 3:return n[t]===qe}throw new Error(`iterateInlineImageGroup - invalid pos: ${a}`)},function foundInlineImageGroup(e,t){const n=e.fnArray,a=e.argsArray,r=e.iCurr,s=r-3,i=r-2,o=r-1,l=Math.min(Math.floor((t-s)/4),200);if(l<10)return t-(t-s)%4;let f=0;const c=[];let h=0,u=1,m=1;for(let e=0;e<l;e++){const t=a[i+(e<<2)],n=a[o+(e<<2)][0];if(u+n.width>1e3){f=Math.max(f,u);m+=h+2;u=0;h=0}c.push({transform:t,x:u,y:m,w:n.width,h:n.height});u+=n.width+2;h=Math.max(h,n.height)}const p=Math.max(f,u)+1,d=m+h+1,g=new Uint8Array(p*d*4),b=p<<2;for(let e=0;e<l;e++){const t=a[o+(e<<2)][0].data,n=c[e].w<<2;let r=0,s=c[e].x+c[e].y*p<<2;g.set(t.subarray(0,n),s-b);for(let a=0,i=c[e].h;a<i;a++){g.set(t.subarray(r,r+n),s);r+=n;s+=b}g.set(t.subarray(r-n,r),s);for(;s>=0;){t[s-4]=t[s];t[s-3]=t[s+1];t[s-2]=t[s+2];t[s-1]=t[s+3];t[s+n]=t[s+n-4];t[s+n+1]=t[s+n-3];t[s+n+2]=t[s+n-2];t[s+n+3]=t[s+n-1];s-=b}}const w={width:p,height:d};if(e.isOffscreenCanvasSupported){const e=new OffscreenCanvas(p,d);e.getContext("2d").putImageData(new ImageData(new Uint8ClampedArray(g.buffer),p,d),0,0);w.bitmap=e.transferToImageBitmap();w.data=null}else{w.kind=R;w.data=g}n.splice(s,4*l,Lt);a.splice(s,4*l,[w,c]);return s+1});addState(_n,[ye,ve,Et,qe],null,function iterateImageMaskGroup(e,t){const n=e.fnArray,a=(t-(e.iCurr-3))%4;switch(a){case 0:return n[t]===ye;case 1:return n[t]===ve;case 2:return n[t]===Et;case 3:return n[t]===qe}throw new Error(`iterateImageMaskGroup - invalid pos: ${a}`)},function foundImageMaskGroup(e,t){const n=e.fnArray,a=e.argsArray,r=e.iCurr,s=r-3,i=r-2,o=r-1;let l=Math.floor((t-s)/4);if(l<10)return t-(t-s)%4;let f,c,h=!1;const u=a[o][0],m=a[i][0],p=a[i][1],d=a[i][2],g=a[i][3];if(p===d){h=!0;f=i+4;let e=o+4;for(let t=1;t<l;t++,f+=4,e+=4){c=a[f];if(a[e][0]!==u||c[0]!==m||c[1]!==p||c[2]!==d||c[3]!==g){t<10?h=!1:l=t;break}}}if(h){l=Math.min(l,1e3);const e=new Float32Array(2*l);f=i;for(let t=0;t<l;t++,f+=4){c=a[f];e[t<<1]=c[4];e[1+(t<<1)]=c[5]}n.splice(s,4*l,Xt);a.splice(s,4*l,[u,m,p,d,g,e])}else{l=Math.min(l,100);const e=[];for(let t=0;t<l;t++){c=a[i+(t<<2)];const n=a[o+(t<<2)][0];e.push({data:n.data,width:n.width,height:n.height,interpolate:n.interpolate,count:n.count,transform:c})}n.splice(s,4*l,Nt);a.splice(s,4*l,[e])}return s+1});addState(_n,[ye,ve,zt,qe],function(e){const t=e.argsArray,n=e.iCurr-2;return 0===t[n][1]&&0===t[n][2]},function iterateImageGroup(e,t){const n=e.fnArray,a=e.argsArray,r=(t-(e.iCurr-3))%4;switch(r){case 0:return n[t]===ye;case 1:if(n[t]!==ve)return!1;const r=e.iCurr-2,s=a[r][0],i=a[r][3];return a[t][0]===s&&0===a[t][1]&&0===a[t][2]&&a[t][3]===i;case 2:if(n[t]!==zt)return!1;const o=a[e.iCurr-1][0];return a[t][0]===o;case 3:return n[t]===qe}throw new Error(`iterateImageGroup - invalid pos: ${r}`)},function(e,t){const n=e.fnArray,a=e.argsArray,r=e.iCurr,s=r-3,i=r-2,o=a[r-1][0],l=a[i][0],f=a[i][3],c=Math.min(Math.floor((t-s)/4),1e3);if(c<3)return t-(t-s)%4;const h=new Float32Array(2*c);let u=i;for(let e=0;e<c;e++,u+=4){const t=a[u];h[e<<1]=t[4];h[1+(e<<1)]=t[5]}const m=[o,l,f,h];n.splice(s,4*c,Ut);a.splice(s,4*c,m);return s+1});addState(_n,[Le,Ge,Ze,tt,Ue],null,function iterateShowTextGroup(e,t){const n=e.fnArray,a=e.argsArray,r=(t-(e.iCurr-4))%5;switch(r){case 0:return n[t]===Le;case 1:return n[t]===Ge;case 2:return n[t]===Ze;case 3:if(n[t]!==tt)return!1;const r=e.iCurr-3,s=a[r][0],i=a[r][1];return a[t][0]===s&&a[t][1]===i;case 4:return n[t]===Ue}throw new Error(`iterateShowTextGroup - invalid pos: ${r}`)},function(e,t){const n=e.fnArray,a=e.argsArray,r=e.iCurr,s=r-4,i=r-3,o=r-2,l=r-1,f=r,c=a[i][0],h=a[i][1];let u=Math.min(Math.floor((t-s)/5),1e3);if(u<3)return t-(t-s)%5;let m=s;if(s>=4&&n[s-4]===n[i]&&n[s-3]===n[o]&&n[s-2]===n[l]&&n[s-1]===n[f]&&a[s-4][0]===c&&a[s-4][1]===h){u++;m-=5}let p=m+4;for(let e=1;e<u;e++){n.splice(p,3);a.splice(p,3);p+=2}return p+1});addState(_n,[ye,ve,Kt,qe],e=>{const t=e.argsArray,n=t[e.iCurr-1][0];if(n!==Oe&&n!==Re&&n!==De&&n!==Me&&n!==Pe&&n!==Ee)return!0;const a=t[e.iCurr-2];return 1===a[0]&&0===a[1]&&0===a[2]&&1===a[3]},()=>!1,(e,t)=>{const{fnArray:n,argsArray:a}=e,r=e.iCurr,s=r-3,i=r-2,o=a[r-1],l=a[i],[,[f],c]=o;if(c){Util.scaleMinMax(l,c);for(let e=0,t=f.length;e<t;)switch(f[e++]){case Yt:case Jt:Util.applyTransform(f,l,e);e+=2;break;case Qt:Util.applyTransformToBezier(f,l,e);e+=6}}n.splice(s,4,Kt);a.splice(s,4,o);return s+1});class NullOptimizer{constructor(e){this.queue=e}_optimize(){}push(e,t){this.queue.fnArray.push(e);this.queue.argsArray.push(t);this._optimize()}flush(){}reset(){}}class QueueOptimizer extends NullOptimizer{constructor(e){super(e);this.state=null;this.context={iCurr:0,fnArray:e.fnArray,argsArray:e.argsArray,isOffscreenCanvasSupported:OperatorList.isOffscreenCanvasSupported};this.match=null;this.lastProcessed=0}_optimize(){const e=this.queue.fnArray;let t=this.lastProcessed,n=e.length,a=this.state,r=this.match;if(!a&&!r&&t+1===n&&!_n[e[t]]){this.lastProcessed=n;return}const s=this.context;for(;t<n;){if(r){if((0,r.iterateFn)(s,t)){t++;continue}t=(0,r.processFn)(s,t+1);n=e.length;r=null;a=null;if(t>=n)break}a=(a||_n)[e[t]];if(a&&!Array.isArray(a)){s.iCurr=t;t++;if(!a.checkFn||(0,a.checkFn)(s)){r=a;a=null}else a=null}else t++}this.state=a;this.match=r;this.lastProcessed=t}flush(){for(;this.match;){const e=this.queue.fnArray.length;this.lastProcessed=(0,this.match.processFn)(this.context,e);this.match=null;this.state=null;this._optimize()}}reset(){this.state=null;this.match=null;this.lastProcessed=0}}class OperatorList{static CHUNK_SIZE=1e3;static CHUNK_SIZE_ABOUT=this.CHUNK_SIZE-5;static isOffscreenCanvasSupported=!1;constructor(e=0,t){this._streamSink=t;this.fnArray=[];this.argsArray=[];this.optimizer=!t||e&p?new NullOptimizer(this):new QueueOptimizer(this);this.dependencies=new Set;this._totalLength=0;this.weight=0;this._resolved=t?null:Promise.resolve()}static setOptions({isOffscreenCanvasSupported:e}){this.isOffscreenCanvasSupported=e}get length(){return this.argsArray.length}get ready(){return this._resolved||this._streamSink.ready}get totalLength(){return this._totalLength+this.length}addOp(e,t){this.optimizer.push(e,t);this.weight++;this._streamSink&&(this.weight>=OperatorList.CHUNK_SIZE||this.weight>=OperatorList.CHUNK_SIZE_ABOUT&&(e===qe||e===Ue))&&this.flush()}addImageOps(e,t,n,a=!1){if(a){this.addOp(ye);this.addOp(ke,[[["SMask",!1]]])}void 0!==n&&this.addOp(It,["OC",n]);this.addOp(e,t);void 0!==n&&this.addOp(Ft,[]);a&&this.addOp(qe)}addDependency(e){if(!this.dependencies.has(e)){this.dependencies.add(e);this.addOp(ue,[e])}}addDependencies(e){for(const t of e)this.addDependency(t)}addOpList(e){if(e instanceof OperatorList){for(const t of e.dependencies)this.dependencies.add(t);for(let t=0,n=e.length;t<n;t++)this.addOp(e.fnArray[t],e.argsArray[t])}else warn('addOpList - ignoring invalid "opList" parameter.')}getIR(){return{fnArray:this.fnArray,argsArray:this.argsArray,length:this.length}}get _transfers(){const e=[],{fnArray:t,argsArray:n,length:a}=this;for(let r=0;r<a;r++)switch(t[r]){case _t:case Lt:case Et:{const{bitmap:t,data:a}=n[r][0];(t||a?.buffer)&&e.push(t||a.buffer);break}case Kt:{const[,[t],a]=n[r];t&&e.push(t.buffer,a.buffer);break}case Rt:const[t,a]=n[r];t&&e.push(t.buffer);a&&e.push(a.buffer);break;case Ze:e.push(n[r][0].buffer)}return e}flush(e=!1,t=null){this.optimizer.flush();const n=this.length;this._totalLength+=n;this._streamSink.enqueue({fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:e,separateAnnots:t,length:n},1,this._transfers);this.dependencies.clear();this.fnArray.length=0;this.argsArray.length=0;this.weight=0;this.optimizer.reset()}}__webpack_require__(116),__webpack_require__(7588);function hexToInt(e,t){let n=0;for(let a=0;a<=t;a++)n=n<<8|e[a];return n>>>0}function hexToStr(e,t){return 1===t?String.fromCharCode(e[0],e[1]):3===t?String.fromCharCode(e[0],e[1],e[2],e[3]):String.fromCharCode(...e.subarray(0,t+1))}function addHex(e,t,n){let a=0;for(let r=n;r>=0;r--){a+=e[r]+t[r];e[r]=255&a;a>>=8}}function incHex(e,t){let n=1;for(let a=t;a>=0&&n>0;a--){n+=e[a];e[a]=255&n;n>>=8}}const Ln=16;class BinaryCMapStream{constructor(e){this.buffer=e;this.pos=0;this.end=e.length;this.tmpBuf=new Uint8Array(19)}readByte(){return this.pos>=this.end?-1:this.buffer[this.pos++]}readNumber(){let e,t=0;do{const n=this.readByte();if(n<0)throw new FormatError("unexpected EOF in bcmap");e=!(128&n);t=t<<7|127&n}while(!e);return t}readSigned(){const e=this.readNumber();return 1&e?~(e>>>1):e>>>1}readHex(e,t){e.set(this.buffer.subarray(this.pos,this.pos+t+1));this.pos+=t+1}readHexNumber(e,t){let n;const a=this.tmpBuf;let r=0;do{const e=this.readByte();if(e<0)throw new FormatError("unexpected EOF in bcmap");n=!(128&e);a[r++]=127&e}while(!n);let s=t,i=0,o=0;for(;s>=0;){for(;o<8&&a.length>0;){i|=a[--r]<<o;o+=7}e[s]=255&i;s--;i>>=8;o-=8}}readHexSigned(e,t){this.readHexNumber(e,t);const n=1&e[t]?255:0;let a=0;for(let r=0;r<=t;r++){a=(1&a)<<8|e[r];e[r]=a>>1^n}}readString(){const e=this.readNumber(),t=new Array(e);for(let n=0;n<e;n++)t[n]=this.readNumber();return String.fromCharCode(...t)}}class BinaryCMapReader{async process(e,t,n){const a=new BinaryCMapStream(e),r=a.readByte();t.vertical=!!(1&r);let s=null;const i=new Uint8Array(Ln),o=new Uint8Array(Ln),l=new Uint8Array(Ln),f=new Uint8Array(Ln),c=new Uint8Array(Ln);let h,u;for(;(u=a.readByte())>=0;){const e=u>>5;if(7===e){switch(31&u){case 0:a.readString();break;case 1:s=a.readString()}continue}const n=!!(16&u),r=15&u;if(r+1>Ln)throw new Error("BinaryCMapReader.process: Invalid dataSize.");const m=1,p=a.readNumber();switch(e){case 0:a.readHex(i,r);a.readHexNumber(o,r);addHex(o,i,r);t.addCodespaceRange(r+1,hexToInt(i,r),hexToInt(o,r));for(let e=1;e<p;e++){incHex(o,r);a.readHexNumber(i,r);addHex(i,o,r);a.readHexNumber(o,r);addHex(o,i,r);t.addCodespaceRange(r+1,hexToInt(i,r),hexToInt(o,r))}break;case 1:a.readHex(i,r);a.readHexNumber(o,r);addHex(o,i,r);a.readNumber();for(let e=1;e<p;e++){incHex(o,r);a.readHexNumber(i,r);addHex(i,o,r);a.readHexNumber(o,r);addHex(o,i,r);a.readNumber()}break;case 2:a.readHex(l,r);h=a.readNumber();t.mapOne(hexToInt(l,r),h);for(let e=1;e<p;e++){incHex(l,r);if(!n){a.readHexNumber(c,r);addHex(l,c,r)}h=a.readSigned()+(h+1);t.mapOne(hexToInt(l,r),h)}break;case 3:a.readHex(i,r);a.readHexNumber(o,r);addHex(o,i,r);h=a.readNumber();t.mapCidRange(hexToInt(i,r),hexToInt(o,r),h);for(let e=1;e<p;e++){incHex(o,r);if(n)i.set(o);else{a.readHexNumber(i,r);addHex(i,o,r)}a.readHexNumber(o,r);addHex(o,i,r);h=a.readNumber();t.mapCidRange(hexToInt(i,r),hexToInt(o,r),h)}break;case 4:a.readHex(l,m);a.readHex(f,r);t.mapOne(hexToInt(l,m),hexToStr(f,r));for(let e=1;e<p;e++){incHex(l,m);if(!n){a.readHexNumber(c,m);addHex(l,c,m)}incHex(f,r);a.readHexSigned(c,r);addHex(f,c,r);t.mapOne(hexToInt(l,m),hexToStr(f,r))}break;case 5:a.readHex(i,m);a.readHexNumber(o,m);addHex(o,i,m);a.readHex(f,r);t.mapBfRange(hexToInt(i,m),hexToInt(o,m),hexToStr(f,r));for(let e=1;e<p;e++){incHex(o,m);if(n)i.set(o);else{a.readHexNumber(i,m);addHex(i,o,m)}a.readHexNumber(o,m);addHex(o,i,m);a.readHex(f,r);t.mapBfRange(hexToInt(i,m),hexToInt(o,m),hexToStr(f,r))}break;default:throw new Error(`BinaryCMapReader.process - unknown type: ${e}`)}}return s?n(s):t}}class Ascii85Stream extends DecodeStream{constructor(e,t){t&&(t*=.8);super(t);this.stream=e;this.dict=e.dict;this.input=new Uint8Array(5)}readBlock(){const e=this.stream;let t=e.getByte();for(;isWhiteSpace(t);)t=e.getByte();if(-1===t||126===t){this.eof=!0;return}const n=this.bufferLength;let a,r;if(122===t){a=this.ensureBuffer(n+4);for(r=0;r<4;++r)a[n+r]=0;this.bufferLength+=4}else{const s=this.input;s[0]=t;for(r=1;r<5;++r){t=e.getByte();for(;isWhiteSpace(t);)t=e.getByte();s[r]=t;if(-1===t||126===t)break}a=this.ensureBuffer(n+r-1);this.bufferLength+=r-1;if(r<5){for(;r<5;++r)s[r]=117;this.eof=!0}let i=0;for(r=0;r<5;++r)i=85*i+(s[r]-33);for(r=3;r>=0;--r){a[n+r]=255&i;i>>=8}}}}class AsciiHexStream extends DecodeStream{constructor(e,t){t&&(t*=.5);super(t);this.stream=e;this.dict=e.dict;this.firstDigit=-1}readBlock(){const e=this.stream.getBytes(8e3);if(!e.length){this.eof=!0;return}const t=e.length+1>>1,n=this.ensureBuffer(this.bufferLength+t);let a=this.bufferLength,r=this.firstDigit;for(const t of e){let e;if(t>=48&&t<=57)e=15&t;else{if(!(t>=65&&t<=70||t>=97&&t<=102)){if(62===t){this.eof=!0;break}continue}e=9+(15&t)}if(r<0)r=e;else{n[a++]=r<<4|e;r=-1}}if(r>=0&&this.eof){n[a++]=r<<4;r=-1}this.firstDigit=r;this.bufferLength=a}}let Un=(()=>{const e=Int32Array.from([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]),t=Int32Array.from([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),n=Int32Array.from([0,3,2,1,0,0,0,0,0,0,3,3,3,3,3,3]),a=Int32Array.from([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),r=Int32Array.from([131072,131076,131075,196610,131072,131076,131075,262145,131072,131076,131075,196610,131072,131076,131075,262149]),s=Int32Array.from([1,5,9,13,17,25,33,41,49,65,81,97,113,145,177,209,241,305,369,497,753,1265,2289,4337,8433,16625]),i=Int32Array.from([2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,7,8,9,10,11,12,13,24]),o=Int16Array.from([0,0,0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,7,8,9,10,12,14,24]),l=Int16Array.from([0,0,0,0,0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,7,8,9,10,24]),f=new Int16Array(2816);!function unpackCommandLookupTable(e){const t=new Int32Array(24),n=new Int32Array(24);n[0]=2;for(let e=0;e<23;++e){t[e+1]=t[e]+(1<<o[e]);n[e+1]=n[e]+(1<<l[e])}for(let a=0;a<704;++a){let r=a>>6,s=-4;if(r>=2){r-=2;s=0}const i=(170064>>2*r&3)<<3|a>>3&7,f=(156228>>2*r&3)<<3|7&a,c=n[f],h=s+Math.min(c,5)-2,u=4*a;e[u]=o[i]|l[f]<<8;e[u+1]=t[i];e[u+2]=n[f];e[u+3]=h}}(f);function log2floor(e){let t=-1,n=16,a=e;for(;n>0;){let e=a>>n;if(0!==e){t+=n;a=e}n>>=1}return t+a}function calculateDistanceAlphabetSize(e,t,n){return 16+t+2*(n<<e)}function calculateDistanceAlphabetLimit(e,t,n,a){if(t<a+(2<<n))return makeError(e,-23);const r=4+(t-a>>n),s=log2floor(r)-1;return((s-1<<1|r>>s&1)-1<<n)+(1<<n)+a+16}function initState(e){if(0!==e.runningState)return makeError(e,-26);e.blockTrees=new Int32Array(3091);e.blockTrees[0]=7;e.distRbIdx=3;let t=calculateDistanceAlphabetLimit(e,2147483644,3,120);if(t<0)return t;const n=t;e.distExtraBits=new Int8Array(n);e.distOffset=new Int32Array(n);t=function initBitReader(e){e.byteBuffer=new Int8Array(4160);e.accumulator32=0;e.shortBuffer=new Int16Array(2080);e.bitOffset=32;e.halfOffset=2048;e.endOfStreamReached=0;return prepare(e)}(e);if(t<0)return t;e.runningState=1;return 0}function decodeVarLenUnsignedByte(e){if(e.bitOffset>=16){e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16}if(0!==readFewBits(e,1)){const t=readFewBits(e,3);return 0===t?1:readFewBits(e,t)+(1<<t)}return 0}function readSymbol(e,t,n){let a=e[t];const r=n.accumulator32>>>n.bitOffset;a+=255&r;const s=e[a]>>16,i=65535&e[a];if(s<=8){n.bitOffset+=s;return i}a+=i;a+=(r&(1<<s)-1)>>>8;n.bitOffset+=8+(e[a]>>16);return 65535&e[a]}function readBlockLength(e,t,n){if(n.bitOffset>=16){n.accumulator32=n.shortBuffer[n.halfOffset++]<<16|n.accumulator32>>>16;n.bitOffset-=16}const a=readSymbol(e,t,n),r=i[a];if(n.bitOffset>=16){n.accumulator32=n.shortBuffer[n.halfOffset++]<<16|n.accumulator32>>>16;n.bitOffset-=16}return s[a]+(r<=16?readFewBits(n,r):readManyBits(n,r))}function moveToFront(e,t){let n=t;const a=e[n];for(;n>0;){e[n]=e[n-1];n--}e[0]=a}function readSimpleHuffmanCode(e,t,n,a,r){const s=new Int32Array(t),i=new Int32Array(4),o=1+log2floor(e-1),l=readFewBits(r,2)+1;for(let e=0;e<l;++e){if(r.bitOffset>=16){r.accumulator32=r.shortBuffer[r.halfOffset++]<<16|r.accumulator32>>>16;r.bitOffset-=16}const n=readFewBits(r,o);if(n>=t)return makeError(r,-15);i[e]=n}const f=function checkDupes(e,t,n){for(let a=0;a<n-1;++a)for(let r=a+1;r<n;++r)if(t[a]===t[r])return makeError(e,-7);return 0}(r,i,l);if(f<0)return f;let c=l;4===l&&(c+=readFewBits(r,1));switch(c){case 1:s[i[0]]=1;break;case 2:s[i[0]]=1;s[i[1]]=1;break;case 3:s[i[0]]=1;s[i[1]]=2;s[i[2]]=2;break;case 4:s[i[0]]=2;s[i[1]]=2;s[i[2]]=2;s[i[3]]=2;break;case 5:s[i[0]]=1;s[i[1]]=2;s[i[2]]=3;s[i[3]]=3}return buildHuffmanTable(n,a,8,s,t)}function readComplexHuffmanCode(e,n,a,s,i){const o=new Int32Array(e),l=new Int32Array(18);let f=32,c=0;for(let e=n;e<18;++e){const n=t[e];if(i.bitOffset>=16){i.accumulator32=i.shortBuffer[i.halfOffset++]<<16|i.accumulator32>>>16;i.bitOffset-=16}const a=i.accumulator32>>>i.bitOffset&15;i.bitOffset+=r[a]>>16;const s=65535&r[a];l[n]=s;if(0!==s){f-=32>>s;c++;if(f<=0)break}}if(0!==f&&1!==c)return makeError(i,-4);const h=function readHuffmanCodeLengths(e,t,n,a){let r=0,s=8,i=0,o=0,l=32768;const f=new Int32Array(33);buildHuffmanTable(f,f.length-1,5,e,18);for(;r<t&&l>0;){if(a.halfOffset>2030){const e=readMoreInput(a);if(e<0)return e}if(a.bitOffset>=16){a.accumulator32=a.shortBuffer[a.halfOffset++]<<16|a.accumulator32>>>16;a.bitOffset-=16}const e=a.accumulator32>>>a.bitOffset&31;a.bitOffset+=f[e]>>16;const c=65535&f[e];if(c<16){i=0;n[r++]=c;if(0!==c){s=c;l-=32768>>c}}else{const e=c-14;let f=0;16===c&&(f=s);if(o!==f){i=0;o=f}const h=i;if(i>0){i-=2;i<<=e}if(a.bitOffset>=16){a.accumulator32=a.shortBuffer[a.halfOffset++]<<16|a.accumulator32>>>16;a.bitOffset-=16}i+=readFewBits(a,e)+3;const u=i-h;if(r+u>t)return makeError(a,-2);for(let e=0;e<u;++e)n[r++]=o;0!==o&&(l-=u<<15-o)}}if(0!==l)return makeError(a,-18);n.fill(0,r,t);return 0}(l,e,o,i);return h<0?h:buildHuffmanTable(a,s,8,o,e)}function readHuffmanCode(e,t,n,a,r){if(r.halfOffset>2030){const e=readMoreInput(r);if(e<0)return e}if(r.bitOffset>=16){r.accumulator32=r.shortBuffer[r.halfOffset++]<<16|r.accumulator32>>>16;r.bitOffset-=16}const s=readFewBits(r,2);return 1===s?readSimpleHuffmanCode(e,t,n,a,r):readComplexHuffmanCode(t,s,n,a,r)}function decodeContextMap(t,n,a){let r;if(a.halfOffset>2030){r=readMoreInput(a);if(r<0)return r}const s=decodeVarLenUnsignedByte(a)+1;if(1===s){n.fill(0,0,t);return s}if(a.bitOffset>=16){a.accumulator32=a.shortBuffer[a.halfOffset++]<<16|a.accumulator32>>>16;a.bitOffset-=16}let i=0;0!==readFewBits(a,1)&&(i=readFewBits(a,4)+1);const o=s+i,l=e[o+31>>5],f=new Int32Array(l+1),c=f.length-1;r=readHuffmanCode(o,o,f,c,a);if(r<0)return r;let h=0;for(;h<t;){if(a.halfOffset>2030){r=readMoreInput(a);if(r<0)return r}if(a.bitOffset>=16){a.accumulator32=a.shortBuffer[a.halfOffset++]<<16|a.accumulator32>>>16;a.bitOffset-=16}const e=readSymbol(f,c,a);if(0===e){n[h]=0;h++}else if(e<=i){if(a.bitOffset>=16){a.accumulator32=a.shortBuffer[a.halfOffset++]<<16|a.accumulator32>>>16;a.bitOffset-=16}let r=(1<<e)+readFewBits(a,e);for(;0!==r;){if(h>=t)return makeError(a,-3);n[h]=0;h++;r--}}else{n[h]=e-i;h++}}if(a.bitOffset>=16){a.accumulator32=a.shortBuffer[a.halfOffset++]<<16|a.accumulator32>>>16;a.bitOffset-=16}1===readFewBits(a,1)&&function inverseMoveToFrontTransform(e,t){const n=new Int32Array(256);for(let e=0;e<256;++e)n[e]=e;for(let a=0;a<t;++a){const t=255&e[a];e[a]=n[t];0!==t&&moveToFront(n,t)}}(n,t);return s}function decodeBlockTypeAndLength(e,t,n){const a=e.rings,r=4+2*t;if(e.bitOffset>=16){e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16}let s=readSymbol(e.blockTrees,2*t,e);const i=readBlockLength(e.blockTrees,2*t+1,e);1===s?s=a[r+1]+1:0===s?s=a[r]:s-=2;s>=n&&(s-=n);a[r]=a[r+1];a[r+1]=s;return i}function decodeLiteralBlockSwitch(e){e.literalBlockLength=decodeBlockTypeAndLength(e,0,e.numLiteralBlockTypes);const t=e.rings[5];e.contextMapSlice=t<<6;e.literalTreeIdx=255&e.contextMap[e.contextMapSlice];const n=e.contextModes[t];e.contextLookupOffset1=n<<9;e.contextLookupOffset2=e.contextLookupOffset1+256}function decodeCommandBlockSwitch(e){e.commandBlockLength=decodeBlockTypeAndLength(e,1,e.numCommandBlockTypes);e.commandTreeIdx=e.rings[7]}function decodeDistanceBlockSwitch(e){e.distanceBlockLength=decodeBlockTypeAndLength(e,2,e.numDistanceBlockTypes);e.distContextMapSlice=e.rings[9]<<2}function readNextMetablockHeader(e){if(0!==e.inputEnd){e.nextRunningState=10;e.runningState=12;return 0}e.literalTreeGroup=new Int32Array(0);e.commandTreeGroup=new Int32Array(0);e.distanceTreeGroup=new Int32Array(0);let t;if(e.halfOffset>2030){t=readMoreInput(e);if(t<0)return t}t=function decodeMetaBlockLength(e){if(e.bitOffset>=16){e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16}e.inputEnd=readFewBits(e,1);e.metaBlockLength=0;e.isUncompressed=0;e.isMetadata=0;if(0!==e.inputEnd&&0!==readFewBits(e,1))return 0;const t=readFewBits(e,2)+4;if(7===t){e.isMetadata=1;if(0!==readFewBits(e,1))return makeError(e,-6);const t=readFewBits(e,2);if(0===t)return 0;for(let n=0;n<t;++n){if(e.bitOffset>=16){e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16}const a=readFewBits(e,8);if(0===a&&n+1===t&&t>1)return makeError(e,-8);e.metaBlockLength+=a<<8*n}}else for(let n=0;n<t;++n){if(e.bitOffset>=16){e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16}const a=readFewBits(e,4);if(0===a&&n+1===t&&t>4)return makeError(e,-8);e.metaBlockLength+=a<<4*n}e.metaBlockLength++;0===e.inputEnd&&(e.isUncompressed=readFewBits(e,1));return 0}(e);if(t<0)return t;if(0===e.metaBlockLength&&0===e.isMetadata)return 0;if(0!==e.isUncompressed||0!==e.isMetadata){t=jumpToByteBoundary(e);if(t<0)return t;0===e.isMetadata?e.runningState=6:e.runningState=5}else e.runningState=3;if(0!==e.isMetadata)return 0;e.expectedTotalSize+=e.metaBlockLength;e.expectedTotalSize>1<<30&&(e.expectedTotalSize=1<<30);e.ringBufferSize<e.maxRingBufferSize&&function maybeReallocateRingBuffer(e){let t=e.maxRingBufferSize;if(t>e.expectedTotalSize){const n=e.expectedTotalSize;for(;t>>1>n;)t>>=1;0===e.inputEnd&&t<16384&&e.maxRingBufferSize>=16384&&(t=16384)}if(t<=e.ringBufferSize)return;const n=new Int8Array(t+37),a=e.ringBuffer;0!==a.length&&n.set(a.subarray(0,e.ringBufferSize),0);e.ringBuffer=n;e.ringBufferSize=t}(e);return 0}function readMetablockPartition(e,t,n){let a=e.blockTrees[2*t];if(n<=1){e.blockTrees[2*t+1]=a;e.blockTrees[2*t+2]=a;return 1<<28}const r=n+2;let s=readHuffmanCode(r,r,e.blockTrees,2*t,e);if(s<0)return s;a+=s;e.blockTrees[2*t+1]=a;s=readHuffmanCode(26,26,e.blockTrees,2*t+1,e);if(s<0)return s;a+=s;e.blockTrees[2*t+2]=a;return readBlockLength(e.blockTrees,2*t+1,e)}function readMetablockHuffmanCodesAndContextMaps(e){e.numLiteralBlockTypes=decodeVarLenUnsignedByte(e)+1;let t=readMetablockPartition(e,0,e.numLiteralBlockTypes);if(t<0)return t;e.literalBlockLength=t;e.numCommandBlockTypes=decodeVarLenUnsignedByte(e)+1;t=readMetablockPartition(e,1,e.numCommandBlockTypes);if(t<0)return t;e.commandBlockLength=t;e.numDistanceBlockTypes=decodeVarLenUnsignedByte(e)+1;t=readMetablockPartition(e,2,e.numDistanceBlockTypes);if(t<0)return t;e.distanceBlockLength=t;if(e.halfOffset>2030){t=readMoreInput(e);if(t<0)return t}if(e.bitOffset>=16){e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16}e.distancePostfixBits=readFewBits(e,2);e.numDirectDistanceCodes=readFewBits(e,4)<<e.distancePostfixBits;e.contextModes=new Int8Array(e.numLiteralBlockTypes);let n=0;for(;n<e.numLiteralBlockTypes;){const a=Math.min(n+96,e.numLiteralBlockTypes);for(;n<a;){if(e.bitOffset>=16){e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16}e.contextModes[n]=readFewBits(e,2);n++}if(e.halfOffset>2030){t=readMoreInput(e);if(t<0)return t}}const a=e.numLiteralBlockTypes<<6;e.contextMap=new Int8Array(a);t=decodeContextMap(a,e.contextMap,e);if(t<0)return t;const r=t;e.trivialLiteralContext=1;for(let t=0;t<a;++t)if(e.contextMap[t]!==t>>6){e.trivialLiteralContext=0;break}e.distContextMap=new Int8Array(e.numDistanceBlockTypes<<2);t=decodeContextMap(e.numDistanceBlockTypes<<2,e.distContextMap,e);if(t<0)return t;const s=t;e.literalTreeGroup=new Int32Array(huffmanTreeGroupAllocSize(256,r));t=decodeHuffmanTreeGroup(256,256,r,e,e.literalTreeGroup);if(t<0)return t;e.commandTreeGroup=new Int32Array(huffmanTreeGroupAllocSize(704,e.numCommandBlockTypes));t=decodeHuffmanTreeGroup(704,704,e.numCommandBlockTypes,e,e.commandTreeGroup);if(t<0)return t;let i=calculateDistanceAlphabetSize(e.distancePostfixBits,e.numDirectDistanceCodes,24),o=i;if(1===e.isLargeWindow){i=calculateDistanceAlphabetSize(e.distancePostfixBits,e.numDirectDistanceCodes,62);t=calculateDistanceAlphabetLimit(e,2147483644,e.distancePostfixBits,e.numDirectDistanceCodes);if(t<0)return t;o=t}e.distanceTreeGroup=new Int32Array(huffmanTreeGroupAllocSize(o,s));t=decodeHuffmanTreeGroup(i,o,s,e,e.distanceTreeGroup);if(t<0)return t;!function calculateDistanceLut(e,t){const n=e.distExtraBits,a=e.distOffset,r=e.distancePostfixBits,s=e.numDirectDistanceCodes,i=1<<r;let o=1,l=0,f=16;for(let e=0;e<s;++e){n[f]=0;a[f]=e+1;++f}for(;f<t;){const e=s+((2+l<<o)-4<<r)+1;for(let t=0;t<i;++t){n[f]=o;a[f]=e+t;++f}o+=l;l^=1}}(e,o);e.contextMapSlice=0;e.distContextMapSlice=0;e.contextLookupOffset1=512*e.contextModes[0];e.contextLookupOffset2=e.contextLookupOffset1+256;e.literalTreeIdx=0;e.commandTreeIdx=0;e.rings[4]=1;e.rings[5]=0;e.rings[6]=1;e.rings[7]=0;e.rings[8]=1;e.rings[9]=0;return 0}function copyUncompressedData(e){const t=e.ringBuffer;let n;if(e.metaBlockLength<=0){n=reload(e);if(n<0)return n;e.runningState=2;return 0}const a=Math.min(e.ringBufferSize-e.pos,e.metaBlockLength);n=function copyRawBytes(e,t,n,a){let r=n,s=a;if(7&e.bitOffset)return makeError(e,-30);for(;32!==e.bitOffset&&0!==s;){t[r++]=e.accumulator32>>>e.bitOffset;e.bitOffset+=8;s--}if(0===s)return 0;const i=Math.min(halfAvailable(e),s>>1);if(i>0){const n=e.halfOffset<<1,a=i<<1;t.set(e.byteBuffer.subarray(n,n+a),r);r+=a;s-=a;e.halfOffset+=i}if(0===s)return 0;if(halfAvailable(e)>0){if(e.bitOffset>=16){e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16}for(;0!==s;){t[r++]=e.accumulator32>>>e.bitOffset;e.bitOffset+=8;s--}return checkHealth(e,0)}for(;s>0;){const n=readInput(e,t,r,s);if(n<-1)return n;if(n<=0)return makeError(e,-16);r+=n;s-=n}return 0}(e,t,e.pos,a);if(n<0)return n;e.metaBlockLength-=a;e.pos+=a;if(e.pos===e.ringBufferSize){e.nextRunningState=6;e.runningState=12;return 0}n=reload(e);if(n<0)return n;e.runningState=2;return 0}function writeRingBuffer(e){const t=Math.min(e.outputLength-e.outputUsed,e.ringBufferBytesReady-e.ringBufferBytesWritten);if(0!==t){e.output.set(e.ringBuffer.subarray(e.ringBufferBytesWritten,e.ringBufferBytesWritten+t),e.outputOffset+e.outputUsed);e.outputUsed+=t;e.ringBufferBytesWritten+=t}return e.outputUsed<e.outputLength?0:2}function huffmanTreeGroupAllocSize(t,n){return n+n*e[t+31>>5]}function decodeHuffmanTreeGroup(e,t,n,a,r){let s=n;for(let i=0;i<n;++i){r[i]=s;const n=readHuffmanCode(e,t,r,i,a);if(n<0)return n;s+=n}return 0}function calculateFence(e){let t=e.ringBufferSize;0!==e.isEager&&(t=Math.min(t,e.ringBufferBytesWritten+e.outputLength-e.outputUsed));return t}function doUseDictionary(e,t){if(e.distance>2147483644)return makeError(e,-9);const n=e.distance-e.maxDistance-1-e.cdTotalSize;if(n<0){const t=function initializeCompoundDictionaryCopy(e,t,n){-1===e.cdBlockBits&&function initializeCompoundDictionary(e){e.cdBlockMap=new Int8Array(256);let t=8;for(;e.cdTotalSize-1>>t;)t++;t-=8;e.cdBlockBits=t;let n=0,a=0;for(;n<e.cdTotalSize;){for(;e.cdChunkOffsets[a+1]<n;)a++;e.cdBlockMap[n>>t]=a;n+=1<<t}}(e);let a=e.cdBlockMap[t>>e.cdBlockBits];for(;t>=e.cdChunkOffsets[a+1];)a++;if(e.cdTotalSize>t+n)return makeError(e,-9);e.distRbIdx=e.distRbIdx+1&3;e.rings[e.distRbIdx]=e.distance;e.metaBlockLength-=n;e.cdBrIndex=a;e.cdBrOffset=t-e.cdChunkOffsets[a];e.cdBrLength=n;e.cdBrCopied=0;return 0}(e,-n-1,e.copyLength);if(t<0)return t;e.runningState=14}else{const a=u,r=e.copyLength;if(r>31)return makeError(e,-9);const s=p[r];if(0===s)return makeError(e,-9);let i=m[r];const o=n>>s;i+=(n&(1<<s)-1)*r;const l=c;if(o>=l.numTransforms)return makeError(e,-9);const f=function transformDictionaryWord(e,t,n,a,r,s,i){let o=t;const l=s.triplets,f=s.prefixSuffixStorage,c=s.prefixSuffixHeads,h=3*i,u=l[h],m=l[h+1],p=l[h+2];let d=c[u];const g=c[u+1];let b=c[p];const w=c[p+1];let j=m-11,k=m;(j<1||j>9)&&(j=0);(k<1||k>9)&&(k=0);for(;d!==g;)e[o++]=f[d++];let y=r;j>y&&(j=y);let q=a+j;y-=j;y-=k;let v=y;for(;v>0;){e[o++]=n[q++];v--}if(10===m||11===m){let t=o-y;10===m&&(y=1);for(;y>0;){const n=255&e[t];if(n<192){n>=97&&n<=122&&(e[t]=32^e[t]);t+=1;y-=1}else if(n<224){e[t+1]=32^e[t+1];t+=2;y-=2}else{e[t+2]=5^e[t+2];t+=3;y-=3}}}else if(21===m||22===m){let t=o-y;const n=s.params[i];let a=16777216-(32768&n)+(32767&n);for(;y>0;){let n=1;const r=255&e[t];if(r<128){a+=r;e[t]=127&a}else if(r<192);else if(r<224)if(y>=2){const s=e[t+1];a+=63&s|(31&r)<<6;e[t]=192|a>>6&31;e[t+1]=192&s|63&a;n=2}else n=y;else if(r<240)if(y>=3){const s=e[t+1],i=e[t+2];a+=63&i|(63&s)<<6|(15&r)<<12;e[t]=224|a>>12&15;e[t+1]=192&s|a>>6&63;e[t+2]=192&i|63&a;n=3}else n=y;else if(r<248)if(y>=4){const s=e[t+1],i=e[t+2],o=e[t+3];a+=63&o|(63&i)<<6|(63&s)<<12|(7&r)<<18;e[t]=240|a>>18&7;e[t+1]=192&s|a>>12&63;e[t+2]=192&i|a>>6&63;e[t+3]=192&o|63&a;n=4}else n=y;t+=n;y-=n;21===m&&(y=0)}}for(;b!==w;)e[o++]=f[b++];return o-t}(e.ringBuffer,e.pos,a,i,r,l,o);e.pos+=f;e.metaBlockLength-=f;if(e.pos>=t){e.nextRunningState=4;e.runningState=12;return 0}e.runningState=4}return 0}function copyFromCompoundDictionary(e,t){let n=e.pos;const a=n;for(;e.cdBrLength!==e.cdBrCopied;){const a=t-n,r=e.cdChunkOffsets[e.cdBrIndex+1]-e.cdChunkOffsets[e.cdBrIndex]-e.cdBrOffset;let s=e.cdBrLength-e.cdBrCopied;s>r&&(s=r);s>a&&(s=a);e.ringBuffer.set(e.cdChunks[e.cdBrIndex].subarray(e.cdBrOffset,e.cdBrOffset+s),n);n+=s;e.cdBrOffset+=s;e.cdBrCopied+=s;if(s===r){e.cdBrIndex++;e.cdBrOffset=0}if(n>=t)break}return n-a}function decompress(e){let t;if(0===e.runningState)return makeError(e,-25);if(e.runningState<0)return makeError(e,-28);if(11===e.runningState)return makeError(e,-22);if(1===e.runningState){const t=function decodeWindowBits(e){const t=e.isLargeWindow;e.isLargeWindow=0;if(e.bitOffset>=16){e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16}if(0===readFewBits(e,1))return 16;let n=readFewBits(e,3);if(0!==n)return 17+n;n=readFewBits(e,3);if(0!==n){if(1===n){if(0===t)return-1;e.isLargeWindow=1;if(1===readFewBits(e,1))return-1;n=readFewBits(e,6);return n<10||n>30?-1:n}return 8+n}return 17}(e);if(-1===t)return makeError(e,-11);e.maxRingBufferSize=1<<t;e.maxBackwardDistance=e.maxRingBufferSize-16;e.runningState=2}let r=calculateFence(e),s=e.ringBufferSize-1,i=e.ringBuffer;for(;10!==e.runningState;)switch(e.runningState){case 2:if(e.metaBlockLength<0)return makeError(e,-10);t=readNextMetablockHeader(e);if(t<0)return t;r=calculateFence(e);s=e.ringBufferSize-1;i=e.ringBuffer;continue;case 3:t=readMetablockHuffmanCodesAndContextMaps(e);if(t<0)return t;e.runningState=4;continue;case 4:if(e.metaBlockLength<=0){e.runningState=2;continue}if(e.halfOffset>2030){t=readMoreInput(e);if(t<0)return t}0===e.commandBlockLength&&decodeCommandBlockSwitch(e);e.commandBlockLength--;if(e.bitOffset>=16){e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16}const o=readSymbol(e.commandTreeGroup,e.commandTreeIdx,e)<<2,l=f[o],c=f[o+1],u=f[o+2];e.distanceCode=f[o+3];if(e.bitOffset>=16){e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16}const m=255&l;e.insertLength=c+(m<=16?readFewBits(e,m):readManyBits(e,m));if(e.bitOffset>=16){e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16}const p=l>>8;e.copyLength=u+(p<=16?readFewBits(e,p):readManyBits(e,p));e.j=0;e.runningState=7;continue;case 7:if(0!==e.trivialLiteralContext)for(;e.j<e.insertLength;){if(e.halfOffset>2030){t=readMoreInput(e);if(t<0)return t}0===e.literalBlockLength&&decodeLiteralBlockSwitch(e);e.literalBlockLength--;if(e.bitOffset>=16){e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16}i[e.pos]=readSymbol(e.literalTreeGroup,e.literalTreeIdx,e);e.pos++;e.j++;if(e.pos>=r){e.nextRunningState=7;e.runningState=12;break}}else{let n=255&i[e.pos-1&s],a=255&i[e.pos-2&s];for(;e.j<e.insertLength;){if(e.halfOffset>2030){t=readMoreInput(e);if(t<0)return t}0===e.literalBlockLength&&decodeLiteralBlockSwitch(e);const s=h[e.contextLookupOffset1+n]|h[e.contextLookupOffset2+a],o=255&e.contextMap[e.contextMapSlice+s];e.literalBlockLength--;a=n;if(e.bitOffset>=16){e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16}n=readSymbol(e.literalTreeGroup,o,e);i[e.pos]=n;e.pos++;e.j++;if(e.pos>=r){e.nextRunningState=7;e.runningState=12;break}}}if(7!==e.runningState)continue;e.metaBlockLength-=e.insertLength;if(e.metaBlockLength<=0){e.runningState=4;continue}let d=e.distanceCode;if(d<0)e.distance=e.rings[e.distRbIdx];else{if(e.halfOffset>2030){t=readMoreInput(e);if(t<0)return t}0===e.distanceBlockLength&&decodeDistanceBlockSwitch(e);e.distanceBlockLength--;if(e.bitOffset>=16){e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16}const r=255&e.distContextMap[e.distContextMapSlice+d];d=readSymbol(e.distanceTreeGroup,r,e);if(d<16){const t=e.distRbIdx+n[d]&3;e.distance=e.rings[t]+a[d];if(e.distance<0)return makeError(e,-12)}else{const t=e.distExtraBits[d];let n;if(e.bitOffset+t<=32)n=readFewBits(e,t);else{if(e.bitOffset>=16){e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16}n=t<=16?readFewBits(e,t):readManyBits(e,t)}e.distance=e.distOffset[d]+(n<<e.distancePostfixBits)}}e.maxDistance!==e.maxBackwardDistance&&e.pos<e.maxBackwardDistance?e.maxDistance=e.pos:e.maxDistance=e.maxBackwardDistance;if(e.distance>e.maxDistance){e.runningState=9;continue}if(d>0){e.distRbIdx=e.distRbIdx+1&3;e.rings[e.distRbIdx]=e.distance}if(e.copyLength>e.metaBlockLength)return makeError(e,-9);e.j=0;e.runningState=8;continue;case 8:let g=e.pos-e.distance&s,b=e.pos;const w=e.copyLength-e.j,j=g+w,k=b+w;if(j<s&&k<s){if(w<12||j>b&&k>g){const e=w+3>>2;for(let t=0;t<e;++t){i[b++]=i[g++];i[b++]=i[g++];i[b++]=i[g++];i[b++]=i[g++]}}else i.copyWithin(b,g,j);e.j+=w;e.metaBlockLength-=w;e.pos+=w}else for(;e.j<e.copyLength;){i[e.pos]=i[e.pos-e.distance&s];e.metaBlockLength--;e.pos++;e.j++;if(e.pos>=r){e.nextRunningState=8;e.runningState=12;break}}8===e.runningState&&(e.runningState=4);continue;case 9:t=doUseDictionary(e,r);if(t<0)return t;continue;case 14:e.pos+=copyFromCompoundDictionary(e,r);if(e.pos>=r){e.nextRunningState=14;e.runningState=12;return 2}e.runningState=4;continue;case 5:for(;e.metaBlockLength>0;){if(e.halfOffset>2030){t=readMoreInput(e);if(t<0)return t}if(e.bitOffset>=16){e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16}readFewBits(e,8);e.metaBlockLength--}e.runningState=2;continue;case 6:t=copyUncompressedData(e);if(t<0)return t;continue;case 12:e.ringBufferBytesReady=Math.min(e.pos,e.ringBufferSize);e.runningState=13;continue;case 13:t=writeRingBuffer(e);if(0!==t)return t;e.pos>=e.maxBackwardDistance&&(e.maxDistance=e.maxBackwardDistance);if(e.pos>=e.ringBufferSize){e.pos>e.ringBufferSize&&i.copyWithin(0,e.ringBufferSize,e.pos);e.pos=e.pos&s;e.ringBufferBytesWritten=0}e.runningState=e.nextRunningState;continue;default:return makeError(e,-28)}if(10!==e.runningState)return makeError(e,-29);if(e.metaBlockLength<0)return makeError(e,-10);t=jumpToByteBoundary(e);if(0!==t)return t;t=checkHealth(e,1);return 0!==t?t:1}const c=new function Transforms(e,t,n){this.numTransforms=0;this.triplets=new Int32Array(0);this.prefixSuffixStorage=new Int8Array(0);this.prefixSuffixHeads=new Int32Array(0);this.params=new Int16Array(0);this.numTransforms=e;this.triplets=new Int32Array(3*e);this.params=new Int16Array(e);this.prefixSuffixStorage=new Int8Array(t);this.prefixSuffixHeads=new Int32Array(n+1)}(121,167,50);!function unpackTransforms(e,t,n,a,r){const s=toUtf8Runes(a),i=s.length;let o=1,l=0;for(let n=0;n<i;++n){const a=s[n];35===a?t[o++]=l:e[l++]=a}for(let e=0;e<363;++e)n[e]=r.charCodeAt(e)-32}(c.prefixSuffixStorage,c.prefixSuffixHeads,c.triplets,'# #s #, #e #.# the #.com/#Â # of # and # in # to #"#">#\n#]# for # a # that #. # with #\'# from # by #. The # on # as # is #ing #\n\t#:#ed #(# at #ly #="# of the #. This #,# not #er #al #=\'#ful #ive #less #est #ize #ous #'," !! ! , *! &! \" ! ) * * - ! # ! #!*! + ,$ ! - % . / # 0 1 . \" 2 3!* 4% ! # / 5 6 7 8 0 1 & $ 9 + : ; < ' != > ?! 4 @ 4 2 & A *# ( B C& ) % ) !*# *-% A +! *. D! %' & E *6 F G% ! *A *% H! D I!+! J!+ K +- *4! A L!*4 M N +6 O!*% +.! K *G P +%( ! G *D +D Q +# *K!*G!+D!+# +G +A +4!+% +K!+4!*D!+K!*K");function getNextKey(e,t){let n=1<<t-1;for(;0!==(e&n);)n>>=1;return(e&n-1)+n}function replicateValue(e,t,n,a,r){let s=a;for(;s>0;){s-=n;e[t+s]=r}}function nextTableBitSize(e,t,n){let a=t,r=1<<a-n;for(;a<15;){r-=e[a];if(r<=0)break;a++;r<<=1}return a-n}function buildHuffmanTable(e,t,n,a,r){const s=e[t],i=new Int32Array(r),o=new Int32Array(16),l=new Int32Array(16);for(let e=0;e<r;++e)o[a[e]]++;l[1]=0;for(let e=1;e<15;++e)l[e+1]=l[e]+o[e];for(let e=0;e<r;++e)0!==a[e]&&(i[l[a[e]]++]=e);let f=n,c=1<<f,h=c;if(1===l[15]){for(let t=0;t<h;++t)e[s+t]=i[0];return h}let u=0,m=0,p=1;for(let t=1;t<=n;++t){p<<=1;for(;o[t]>0;){replicateValue(e,s+u,p,c,t<<16|i[m++]);u=getNextKey(u,t);o[t]--}}const d=h-1;let g=-1,b=s;p=1;for(let t=n+1;t<=15;++t){p<<=1;for(;o[t]>0;){if((u&d)!==g){b+=c;f=nextTableBitSize(o,t,n);c=1<<f;h+=c;g=u&d;e[s+g]=f+n<<16|b-s-g}replicateValue(e,b+(u>>n),p,c,t-n<<16|i[m++]);u=getNextKey(u,t);o[t]--}}return h}function readMoreInput(e){if(0!==e.endOfStreamReached)return halfAvailable(e)>=-2?0:makeError(e,-16);const t=e.halfOffset<<1;let n=4096-t;e.byteBuffer.copyWithin(0,t,4096);e.halfOffset=0;for(;n<4096;){const t=4096-n,a=readInput(e,e.byteBuffer,n,t);if(a<-1)return a;if(a<=0){e.endOfStreamReached=1;e.tailBytes=n;n+=1;break}n+=a}!function bytesToNibbles(e,t){const n=e.byteBuffer,a=t>>1,r=e.shortBuffer;for(let e=0;e<a;++e)r[e]=255&n[2*e]|(255&n[2*e+1])<<8}(e,n);return 0}function checkHealth(e,t){if(0===e.endOfStreamReached)return 0;const n=(e.halfOffset<<1)+(e.bitOffset+7>>3)-4;return n>e.tailBytes?makeError(e,-13):0!==t&&n!==e.tailBytes?makeError(e,-17):0}function readFewBits(e,t){const n=e.accumulator32>>>e.bitOffset&(1<<t)-1;e.bitOffset+=t;return n}function readManyBits(e,t){const n=readFewBits(e,16);e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16;return n|readFewBits(e,t-16)<<16}function prepare(e){if(e.halfOffset>2030){const t=readMoreInput(e);if(0!==t)return t}let t=checkHealth(e,0);if(0!==t)return t;e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16;e.accumulator32=e.shortBuffer[e.halfOffset++]<<16|e.accumulator32>>>16;e.bitOffset-=16;return 0}function reload(e){return 32===e.bitOffset?prepare(e):0}function jumpToByteBoundary(e){const t=32-e.bitOffset&7;if(0!==t){if(0!==readFewBits(e,t))return makeError(e,-5)}return 0}function halfAvailable(e){let t=2048;0!==e.endOfStreamReached&&(t=e.tailBytes+1>>1);return t-e.halfOffset}const h=new Int32Array(2048);!function unpackLookupTable(e,t,n){for(let t=0;t<256;++t){e[t]=63&t;e[512+t]=t>>2;e[1792+t]=2+(t>>6)}for(let n=0;n<128;++n)e[1024+n]=4*(t.charCodeAt(n)-32);for(let t=0;t<64;++t){e[1152+t]=1&t;e[1216+t]=2+(1&t)}let a=1280;for(let t=0;t<19;++t){const r=3&t,s=n.charCodeAt(t)-32;for(let t=0;t<s;++t)e[a++]=r}for(let t=0;t<16;++t){e[1792+t]=1;e[2032+t]=6}e[1792]=0;e[2047]=7;for(let t=0;t<256;++t)e[1536+t]=e[1792+t]<<3}(h," !! ! \"#$##%#$&'##(#)#++++++++++((&*'##,---,---,-----,-----,-----&#'###.///.///./////./////./////&#'# ","A/* ': & : $ @");function State(){this.ringBuffer=new Int8Array(0);this.contextModes=new Int8Array(0);this.contextMap=new Int8Array(0);this.distContextMap=new Int8Array(0);this.distExtraBits=new Int8Array(0);this.output=new Int8Array(0);this.byteBuffer=new Int8Array(0);this.shortBuffer=new Int16Array(0);this.intBuffer=new Int32Array(0);this.rings=new Int32Array(0);this.blockTrees=new Int32Array(0);this.literalTreeGroup=new Int32Array(0);this.commandTreeGroup=new Int32Array(0);this.distanceTreeGroup=new Int32Array(0);this.distOffset=new Int32Array(0);this.accumulator64=0;this.runningState=0;this.nextRunningState=0;this.accumulator32=0;this.bitOffset=0;this.halfOffset=0;this.tailBytes=0;this.endOfStreamReached=0;this.metaBlockLength=0;this.inputEnd=0;this.isUncompressed=0;this.isMetadata=0;this.literalBlockLength=0;this.numLiteralBlockTypes=0;this.commandBlockLength=0;this.numCommandBlockTypes=0;this.distanceBlockLength=0;this.numDistanceBlockTypes=0;this.pos=0;this.maxDistance=0;this.distRbIdx=0;this.trivialLiteralContext=0;this.literalTreeIdx=0;this.commandTreeIdx=0;this.j=0;this.insertLength=0;this.contextMapSlice=0;this.distContextMapSlice=0;this.contextLookupOffset1=0;this.contextLookupOffset2=0;this.distanceCode=0;this.numDirectDistanceCodes=0;this.distancePostfixBits=0;this.distance=0;this.copyLength=0;this.maxBackwardDistance=0;this.maxRingBufferSize=0;this.ringBufferSize=0;this.expectedTotalSize=0;this.outputOffset=0;this.outputLength=0;this.outputUsed=0;this.ringBufferBytesWritten=0;this.ringBufferBytesReady=0;this.isEager=0;this.isLargeWindow=0;this.cdNumChunks=0;this.cdTotalSize=0;this.cdBrIndex=0;this.cdBrOffset=0;this.cdBrLength=0;this.cdBrCopied=0;this.cdChunks=new Array(0);this.cdChunkOffsets=new Int32Array(0);this.cdBlockBits=0;this.cdBlockMap=new Int8Array(0);this.input=new InputStream(new Int8Array(0));this.ringBuffer=new Int8Array(0);this.rings=new Int32Array(10);this.rings[0]=16;this.rings[1]=15;this.rings[2]=11;this.rings[3]=4}let u=new Int8Array(0);const m=new Int32Array(32),p=new Int32Array(32);const d=new Int8Array(122784),g=new Int32Array(25);!function unpackDictionaryData(e,t,n,a,r,s){const i=function toUsAsciiBytes(e){const t=e.length,n=new Int8Array(t);for(let a=0;a<t;++a)n[a]=e.charCodeAt(a);return n}(t+n),o=toUtf8Runes(a);let l=0;const f=o.length>>1;for(let e=0;e<f;++e){const t=o[2*e]-36,n=o[2*e+1]-36;for(let e=0;e<t;++e){i[l]=3^i[l];l++}for(let e=0;e<n;++e){i[l]=236^i[l];l++}}for(let e=0;e<s.length;++e)r[e]=s.charCodeAt(e)-65;e.set(i)}(d,'wjnfgltmojefofewab`h`lgfgbwbpkltlmozpjwf`jwzlsfmivpwojhfeqfftlqhwf{wzfbqlufqalgzolufelqnallhsobzojufojmfkfosklnfpjgfnlqftlqgolmdwkfnujftejmgsbdfgbzpevookfbgwfqnfb`kbqfbeqlnwqvfnbqhbaofvslmkjdkgbwfobmgmftpfufmmf{w`bpfalwkslpwvpfgnbgfkbmgkfqftkbwmbnfOjmhaoldpjyfabpfkfognbhfnbjmvpfq$*#(klogfmgptjwkMftpqfbgtfqfpjdmwbhfkbufdbnfpffm`boosbwktfoosovpnfmvejonsbqwiljmwkjpojpwdllgmffgtbzptfpwilapnjmgboploldlqj`kvpfpobpwwfbnbqnzellghjmdtjoofbpwtbqgafpwejqfSbdfhmltbtbz-smdnlufwkbmolbgdjufpfoemlwfnv`keffgnbmzql`hj`lmlm`follhkjgfgjfgKlnfqvofklpwbib{jmel`ovaobtpofppkboeplnfpv`kylmf233&lmfp`bqfWjnfqb`faovfelvqtffheb`fklsfdbufkbqgolpwtkfmsbqhhfswsbpppkjsqllnKWNOsobmWzsfglmfpbufhffseobdojmhplogejufwllhqbwfwltmivnswkvpgbqh`bqgejofefbqpwbzhjoowkbweboobvwlfufq-`lnwbohpklsulwfgffsnlgfqfpwwvqmalqmabmgefooqlpfvqo+phjmqlof`lnfb`wpbdfpnffwdlog-isdjwfnubqzefowwkfmpfmggqlsUjft`lsz2-3!?,b=pwlsfopfojfpwlvqsb`h-djesbpw`pp<dqbznfbm%dw8qjgfpklwobwfpbjgqlbgubq#effoilkmqj`hslqwebpw$VB.gfbg?,a=sllqajoowzsfV-P-tllgnvpw1s{8JmelqbmhtjgftbmwtbooofbgX3^8sbvotbufpvqf\'+$ tbjwnbppbqnpdlfpdbjmobmdsbjg"..#ol`hvmjwqllwtbohejqntjef{no!plmdwfpw13s{hjmgqltpwlloelmwnbjopbefpwbqnbsp`lqfqbjmeoltabazpsbmpbzp7s{85s{8bqwpellwqfbotjhjkfbwpwfswqjslqd,obhftfbhwlogElqn`bpwebmpabmhufqzqvmpivozwbph2s{8dlbodqftpoltfgdfjg>!pfwp6s{8-ip<73s{je#+pllmpfbwmlmfwvafyfqlpfmwqffgeb`wjmwldjewkbqn2;s{`bnfkjooalogyllnuljgfbpzqjmdejoosfbhjmjw`lpw0s{8ib`hwbdpajwpqloofgjwhmftmfbq?"..dqltIPLMgvwzMbnfpbofzlv#olwpsbjmibyy`logfzfpejpkttt-qjphwbapsqfu23s{qjpf16s{Aovfgjmd033/abooelqgfbqmtjogal{-ebjqob`hufqpsbjqivmfwf`kje+"sj`hfujo\'+! tbqnolqgglfpsvoo/333jgfbgqbtkvdfpslwevmgavqmkqfe`foohfzpwj`hklvqolppevfo21s{pvjwgfboQPP!bdfgdqfzDFW!fbpfbjnpdjqobjgp;s{8mbuzdqjgwjsp :::tbqpobgz`bqp*8#~sks<kfoowbootklnyk9\t),\t#233kboo-\t\tB4s{8svpk`kbw3s{8`qft),?,kbpk46s{eobwqbqf#%%#wfoo`bnslmwlobjgnjppphjswfmwejmfnbofdfwpsolw733/\t\t`lloeffw-sks?aq=fqj`nlpwdvjgafoogfp`kbjqnbwkbwln,jnd% ;1ov`h`fmw3338wjmzdlmfkwnopfoogqvdEQFFmlgfmj`h<jg>olpfmvooubpwtjmgQPP#tfbqqfozaffmpbnfgvhfmbpb`bsftjpkdvoeW109kjwppolwdbwfhj`haovqwkfz26s{$$*8*8!=npjftjmpajqgplqwafwbpffhW2;9lqgpwqffnboo53s{ebqnlupalzpX3^-$*8!SLPWafbqhjgp*8~~nbqzwfmg+VH*rvbgyk9\n.pjy....sqls$*8ojewW2:9uj`fbmgzgfaw=QPPsllomf`haoltW259gllqfuboW249ofwpebjolqbosloomlub`lopdfmf#lxplewqlnfwjooqlpp?k0=slvqebgfsjmh?wq=njmj*"+njmfyk9abqpkfbq33*8njoh#..=jqlmeqfggjphtfmwpljosvwp,ip,klozW119JPAMW139bgbnpffp?k1=iplm$/#$`lmwW129#QPPollsbpjbnllm?,s=plvoOJMFelqw`bqwW279?k2=;3s{"..?:s{8W379njhf975Ymj`fjm`kZlqhqj`fyk9\b$**8svqfnbdfsbqbwlmfalmg904Y\\le\\$^*8333/yk9\vwbmhzbqgaltoavpk965YIbub03s{\t~\t&@0&907YifeeF[SJ`bpkujpbdloepmltyk9rvfq-`pppj`hnfbwnjm-ajmggfookjqfsj`pqfmw905YKWWS.132elwltloeFMG#{al{967YALGZgj`h8\t~\tf{jw906Yubqpafbw$~*8gjfw:::8bmmf~~?,Xj^-Obmdhn.^tjqfwlzpbggppfbobof{8\t\n~f`klmjmf-lqd336*wlmziftppbmgofdpqlle333*#133tjmfdfbqgldpallwdbqz`vwpwzofwfnswjlm-{no`l`hdbmd\'+$-63s{Sk-Gnjp`bobmolbmgfphnjofqzbmvmj{gjp`*8~\tgvpw`ojs*-\t\t43s{.133GUGp4^=?wbsfgfnlj((*tbdffvqlskjolswpklofEBRpbpjm.15WobapsfwpVQO#avoh`llh8~\tKFBGX3^*baaqivbm+2:;ofpkwtjm?,j=plmzdvzpev`hsjsf.\t"331*mgltX2^8X^8\tOld#pbow\t\n\nabmdwqjnabwk*x\t33s{\t~*8hl9\0effpbg=p9,,#X^8wloosovd+*x\tx\t#-ip$133sgvboalbw-ISD*8\t~rvlw*8\t\t$*8\t\t~1327132613251324132;132:13131312131113101317131613151314131;131:130313021301130013071306130513041320132113221323133:133;133413351336133713301331133213332:::2::;2::42::52::62::72::02::12::22::32:;:2:;;2:;42:;52:;62:;72:;02:;12:;22:;32:4:2:4;2:442:452:462:472:402:412:422:432:5:2:5;2:542:552:562:572:502:512:522:532:6:2:6;2:642:652:662:672:602:612:622:632333231720:73333::::`lnln/Mpfpwffpwbsfqlwlglkb`f`bgbb/]lajfmg/Abbp/Aujgb`bpllwqlelqlplollwqb`vbogjilpjgldqbmwjslwfnbgfafbodlrv/Efpwlmbgbwqfpsl`l`bpbabilwlgbpjmlbdvbsvfpvmlpbmwfgj`fovjpfoobnbzlylmbbnlqsjpllaqb`oj`foolgjlpklqb`bpj<[<\\<Q<\\<R<P=l<\\=l=o=n<\\<Q<Y<S<R<R=n<T<[<Q<R<X<R=n<R<Z<Y<R<Q<T=i<q<\\<Y<Y<]=g<P=g<~=g=m<R<^=g<^<R<q<R<R<]<s<R<W<T<Q<T<L<H<q<Y<p=g=n=g<r<Q<T<P<X<\\<{<\\<x<\\<q=o<r<]=n<Y<t<[<Y<U<Q=o<P<P<N=g=o<Z5m5f4O5j5i4K5i4U5o5h4O5d4]4C5f4K5m5e5k5d5h5i5h5o4K5d5h5k4D4_4K5h4I5j5k5f4O5f5n4C5k5h4G5i4D5k5h5d5h5f4D5h4K5f4D5o4X5f4K5i4O5i5j4F4D5f5h5j4A4D5k5i5i4X5d4Xejqpwujgflojdkwtlqognfgjbtkjwf`olpfaob`hqjdkwpnbooallhpsob`fnvpj`ejfoglqgfqsljmwubovfofufowbaofalbqgklvpfdqlvstlqhpzfbqppwbwfwlgbztbwfqpwbqwpwzofgfbwksltfqsklmfmjdkwfqqlqjmsvwbalvwwfqnpwjwofwllopfufmwol`bowjnfpobqdftlqgpdbnfppklqwpsb`fel`vp`ofbqnlgfoaol`hdvjgfqbgjlpkbqftlnfmbdbjmnlmfzjnbdfmbnfpzlvmdojmfpobwfq`lolqdqffmeqlmw%bns8tbw`kelq`fsqj`fqvofpafdjmbewfqujpjwjppvfbqfbpafoltjmgf{wlwboklvqpobafosqjmwsqfppavjowojmhppsffgpwvgzwqbgfelvmgpfmpfvmgfqpkltmelqnpqbmdfbggfgpwjoonlufgwbhfmbalufeobpkej{fglewfmlwkfqujftp`kf`hofdboqjufqjwfnprvj`hpkbsfkvnbmf{jpwdljmdnlujfwkjqgabpj`sfb`fpwbdftjgwkoldjmjgfbptqlwfsbdfpvpfqpgqjufpwlqfaqfbhplvwkulj`fpjwfpnlmwktkfqfavjogtkj`kfbqwkelqvnwkqffpslqwsbqwz@oj`holtfqojufp`obppobzfqfmwqzpwlqzvpbdfplvmg`lvqwzlvq#ajqwkslsvswzsfpbssozJnbdfafjmdvssfqmlwfpfufqzpkltpnfbmpf{wqbnbw`kwqb`hhmltmfbqozafdbmpvsfqsbsfqmlqwkofbqmdjufmmbnfgfmgfgWfqnpsbqwpDqlvsaqbmgvpjmdtlnbmebopfqfbgzbvgjlwbhfptkjof-`ln,ojufg`bpfpgbjoz`kjogdqfbwivgdfwklpfvmjwpmfufqaqlbg`lbpw`lufqbssofejofp`z`ofp`fmfsobmp`oj`htqjwfrvffmsjf`ffnbjoeqbnflogfqsklwlojnjw`b`kf`jujop`boffmwfqwkfnfwkfqfwlv`kalvmgqlzbobphfgtklofpjm`fpwl`h#mbnfebjwkkfbqwfnswzleefqp`lsfltmfgnjdkwboavnwkjmhaollgbqqbznbilqwqvpw`bmlmvmjlm`lvmwubojgpwlmfPwzofOldjmkbsszl``vqofew9eqfpkrvjwfejonpdqbgfmffgpvqabmejdkwabpjpklufqbvwl8qlvwf-kwnonj{fgejmboZlvq#pojgfwlsj`aqltmbolmfgqbtmpsojwqfb`kQjdkwgbwfpnbq`krvlwfdllgpOjmhpglvawbpzm`wkvnaboolt`kjfezlvwkmlufo23s{8pfqufvmwjokbmgp@kf`hPsb`frvfqzibnfpfrvbowtj`f3/333Pwbqwsbmfoplmdpqlvmgfjdkwpkjewtlqwkslpwpofbgptffhpbuljgwkfpfnjofpsobmfpnbqwboskbsobmwnbqhpqbwfpsobzp`objnpbofpwf{wppwbqptqlmd?,k0=wkjmd-lqd,nvowjkfbqgSltfqpwbmgwlhfmplojg+wkjpaqjmdpkjsppwbeewqjfg`boopevoozeb`wpbdfmwWkjp#,,..=bgnjmfdzswFufmw26s{8Fnbjowqvf!`qlpppsfmwaoldpal{!=mlwfgofbuf`kjmbpjyfpdvfpw?,k7=qlalwkfbuzwqvf/pfufmdqbmg`qjnfpjdmpbtbqfgbm`fskbpf=?"..fm\\VP% 0:8133s{\\mbnfobwjmfmilzbib{-bwjlmpnjwkV-P-#klogpsfwfqjmgjbmbu!=`kbjmp`lqf`lnfpgljmdsqjlqPkbqf2::3pqlnbmojpwpibsbmeboopwqjboltmfqbdqff?,k1=bavpfbofqwlsfqb!.,,T`bqgpkjoopwfbnpSklwlwqvwk`ofbm-sks<pbjmwnfwboolvjpnfbmwsqlleaqjfeqlt!=dfmqfwqv`hollhpUbovfEqbnf-mfw,..=\t?wqz#x\tubq#nbhfp`lpwpsobjmbgvowrvfpwwqbjmobalqkfosp`bvpfnbdj`nlwlqwkfjq163s{ofbpwpwfsp@lvmw`lvogdobpppjgfpevmgpklwfobtbqgnlvwknlufpsbqjpdjufpgvw`kwf{bpeqvjwmvoo/X^8wls!=\t?"..SLPW!l`fbm?aq,=eollqpsfbhgfswk#pjyfabmhp`bw`k`kbqw13s{8bojdmgfboptlvog63s{8vqo>!sbqhpnlvpfNlpw#---?,bnlmdaqbjmalgz#mlmf8abpfg`bqqzgqbewqfefqsbdf\\klnf-nfwfqgfobzgqfbnsqlufiljmw?,wq=gqvdp?"..#bsqjojgfboboofmf{b`welqwk`lgfpoldj`Ujft#pffnpaobmhslqwp#+133pbufg\\ojmhdlbopdqbmwdqffhklnfpqjmdpqbwfg03s{8tklpfsbqpf+*8!#Aol`hojmv{ilmfpsj{fo$*8!=*8je+.ofewgbujgklqpfEl`vpqbjpfal{fpWqb`hfnfmw?,fn=abq!=-pq`>wltfqbow>!`baofkfmqz17s{8pfwvsjwbozpkbqsnjmlqwbpwftbmwpwkjp-qfpfwtkffodjqop,`pp,233&8`ovappwveeajaofulwfp#2333hlqfb~*8\tabmgprvfvf>#x~8;3s{8`hjmdx\t\n\nbkfbg`ol`hjqjpkojhf#qbwjlpwbwpElqn!zbkll*X3^8Balvwejmgp?,k2=gfavdwbphpVQO#>`foop~*+*821s{8sqjnfwfoopwvqmp3{533-isd!psbjmafb`kwb{fpnj`qlbmdfo..=?,djewppwfuf.ojmhalgz-~*8\t\nnlvmw#+2::EBR?,qldfqeqbmh@obpp1;s{8effgp?k2=?p`lwwwfpwp11s{8gqjmh*##oftjppkboo 30:8#elq#olufgtbpwf33s{8ib9npjnlm?elmwqfsoznffwpvmwfq`kfbswjdkwAqbmg*#">#gqfpp`ojspqllnplmhfznlajonbjm-Mbnf#sobwfevmmzwqffp`ln,!2-isdtnlgfsbqbnPWBQWofew#jggfm/#132*8\t~\telqn-ujqvp`kbjqwqbmptlqpwSbdfpjwjlmsbw`k?"..\tl.`b`ejqnpwlvqp/333#bpjbmj((*xbglaf$*X3^jg>23alwk8nfmv#-1-nj-smd!hfujm`lb`k@kjogaqv`f1-isdVQO*(-isdpvjwfpoj`fkbqqz213!#ptffwwq=\tmbnf>gjfdlsbdf#ptjpp..=\t\t eee8!=Old-`ln!wqfbwpkffw*#%%#27s{8poffsmwfmwejofgib9ojg>!`Mbnf!tlqpfpklwp.al{.gfowb\t%ow8afbqp97;Y?gbwb.qvqbo?,b=#psfmgabhfqpklsp>#!!8sks!=`wjlm20s{8aqjbmkfoolpjyf>l>&1E#iljmnbzaf?jnd#jnd!=/#eipjnd!#!*X3^NWlsAWzsf!mftozGbmph`yf`kwqbjohmltp?,k6=ebr!=yk.`m23*8\t.2!*8wzsf>aovfpwqvozgbujp-ip$8=\t?"pwffo#zlv#k1=\telqn#ifpvp233&#nfmv-\t\n\ttbofpqjphpvnfmwggjmda.ojhwfb`kdje!#ufdbpgbmphffpwjpkrjspvlnjplaqfgfpgffmwqfwlglpsvfgfb/]lpfpw/Mwjfmfkbpwblwqlpsbqwfglmgfmvfulkb`fqelqnbnjpnlnfilqnvmglbrv/Ag/Abpp/_olbzvgbef`kbwlgbpwbmwlnfmlpgbwlplwqbppjwjlnv`klbklqbovdbqnbzlqfpwlpklqbpwfmfqbmwfpelwlpfpwbpsb/Apmvfubpbovgelqlpnfgjlrvjfmnfpfpslgfq`kjofpfq/Muf`fpgf`jqilp/Efpwbqufmwbdqvslkf`klfoolpwfmdlbnjdl`lpbpmjufodfmwfnjpnbbjqfpivojlwfnbpkb`jbebulqivmjlojaqfsvmwlavfmlbvwlqbaqjoavfmbwf{wlnbqylpbafqojpwbovfdl`/_nlfmfqlivfdlsfq/Vkbafqfpwlzmvm`bnvifqubolqevfqbojaqldvpwbjdvboulwlp`bplpdv/Absvfglplnlpbujplvpwfggfafmml`kfavp`bebowbfvqlppfqjfgj`kl`vqpl`obuf`bpbpof/_msobylobqdllaqbpujpwbbslzlivmwlwqbwbujpwl`qfbq`bnslkfnlp`jm`l`bqdlsjplplqgfmkb`fm/Mqfbgjp`lsfgql`fq`bsvfgbsbsfonfmlq/Vwjo`obqlilqdf`boofslmfqwbqgfmbgjfnbq`bpjdvffoobppjdol`l`kfnlwlpnbgqf`obpfqfpwlmj/]lrvfgbsbpbqabm`lkjilpujbifsbaol/Epwfujfmfqfjmlgfibqelmgl`bmbomlqwfofwqb`bvpbwlnbqnbmlpovmfpbvwlpujoobufmglsfpbqwjslpwfmdbnbq`loofubsbgqfvmjglubnlpylmbpbnalpabmgbnbqjbbavplnv`kbpvajqqjlibujujqdqbgl`kj`bboo/Ailufmgj`kbfpwbmwbofppbojqpvfolsfplpejmfpoobnbavp`l/Epwboofdbmfdqlsobybkvnlqsbdbqivmwbglaofjpobpalopbab/]lkbaobov`kb/mqfbgj`fmivdbqmlwbpuboofboo/M`bqdbglolqbabilfpw/Edvpwlnfmwfnbqjlejqnb`lpwlej`kbsobwbkldbqbqwfpofzfpbrvfonvpflabpfpsl`lpnjwbg`jfol`kj`lnjfgldbmbqpbmwlfwbsbgfafpsobzbqfgfppjfwf`lqwf`lqfbgvgbpgfpflujfilgfpfbbdvbp%rvlw8glnbjm`lnnlmpwbwvpfufmwpnbpwfqpzpwfnb`wjlmabmmfqqfnlufp`qloovsgbwfdolabonfgjvnejowfqmvnafq`kbmdfqfpvowsvaoj`p`qffm`kllpfmlqnbowqbufojppvfpplvq`fwbqdfwpsqjmdnlgvofnlajofptjw`ksklwlpalqgfqqfdjlmjwpfoepl`jbob`wjuf`lovnmqf`lqgelooltwjwof=fjwkfqofmdwkebnjozeqjfmgobzlvwbvwklq`qfbwfqfujftpvnnfqpfqufqsobzfgsobzfqf{sbmgsloj`zelqnbwglvaofsljmwppfqjfpsfqplmojujmdgfpjdmnlmwkpelq`fpvmjrvftfjdkwsflsoffmfqdzmbwvqfpfbq`kejdvqfkbujmd`vpwlnleepfwofwwfqtjmgltpvanjwqfmgfqdqlvspvsolbgkfbowknfwklgujgflpp`klloevwvqfpkbgltgfabwfubovfpLaif`wlwkfqpqjdkwpofbdvf`kqlnfpjnsofmlwj`fpkbqfgfmgjmdpfbplmqfslqwlmojmfprvbqfavwwlmjnbdfpfmbaofnlujmdobwfpwtjmwfqEqbm`fsfqjlgpwqlmdqfsfbwOlmglmgfwbjoelqnfggfnbmgpf`vqfsbppfgwlddofsob`fpgfuj`fpwbwj``jwjfppwqfbnzfooltbwwb`hpwqffweojdkwkjggfmjmel!=lsfmfgvpfevouboofz`bvpfpofbgfqpf`qfwpf`lmggbnbdfpslqwpf{`fswqbwjmdpjdmfgwkjmdpfeef`wejfogppwbwfpleej`fujpvbofgjwlqulovnfQfslqwnvpfvnnlujfpsbqfmwb``fppnlpwoznlwkfq!#jg>!nbqhfwdqlvmg`kbm`fpvqufzafelqfpznalonlnfmwpsff`knlwjlmjmpjgfnbwwfq@fmwfqlaif`wf{jpwpnjggofFvqlsfdqltwkofdb`znbmmfqfmlvdk`bqffqbmptfqlqjdjmslqwbo`ojfmwpfof`wqbmgln`olpfgwlsj`p`lnjmdebwkfqlswjlmpjnsozqbjpfgfp`bsf`klpfm`kvq`kgfejmfqfbplm`lqmfqlvwsvwnfnlqzjeqbnfsloj`fnlgfopMvnafqgvqjmdleefqppwzofphjoofgojpwfg`boofgpjoufqnbqdjmgfofwfafwwfqaqltpfojnjwpDolabopjmdoftjgdfw`fmwfqavgdfwmltqbs`qfgjw`objnpfmdjmfpbefwz`klj`fpsjqjw.pwzofpsqfbgnbhjmdmffgfgqvppjbsofbpff{wfmwP`qjswaqlhfmbooltp`kbqdfgjujgfeb`wlqnfnafq.abpfgwkflqz`lmejdbqlvmgtlqhfgkfosfg@kvq`kjnsb`wpklvogbotbzpoldl!#alwwlnojpw!=*xubq#sqfej{lqbmdfKfbgfq-svpk+`lvsofdbqgfmaqjgdfobvm`kQfujftwbhjmdujpjlmojwwofgbwjmdAvwwlmafbvwzwkfnfpelqdlwPfbq`kbm`klqbonlpwolbgfg@kbmdfqfwvqmpwqjmdqfolbgNlajofjm`lnfpvssozPlvq`flqgfqpujftfg%maps8`lvqpfBalvw#jpobmg?kwno#`llhjfmbnf>!bnbylmnlgfqmbguj`fjm?,b=9#Wkf#gjboldklvpfpAFDJM#Nf{j`lpwbqwp`fmwqfkfjdkwbggjmdJpobmgbppfwpFnsjqfP`kllofeelqwgjqf`wmfbqoznbmvboPfof`w-\t\tLmfiljmfgnfmv!=SkjojsbtbqgpkbmgofjnslqwLeej`fqfdbqgphjoopmbwjlmPslqwpgfdqfftffhoz#+f-d-afkjmggl`wlqolddfgvmjwfg?,a=?,afdjmpsobmwpbppjpwbqwjpwjppvfg033s{`bmbgbbdfm`zp`kfnfqfnbjmAqbyjopbnsofoldl!=afzlmg.p`bofb``fswpfqufgnbqjmfEllwfq`bnfqb?,k2=\t\\elqn!ofbufppwqfpp!#,=\t-dje!#lmolbgolbgfqL{elqgpjpwfqpvqujuojpwfmefnbofGfpjdmpjyf>!bssfbowf{w!=ofufopwkbmhpkjdkfqelq`fgbmjnbobmzlmfBeqj`bbdqffgqf`fmwSflsof?aq#,=tlmgfqsqj`fpwvqmfg#x~8nbjm!=jmojmfpvmgbztqbs!=ebjofg`fmpvpnjmvwfafb`lmrvlwfp263s{fpwbwfqfnlwffnbjo!ojmhfgqjdkw8pjdmboelqnbo2-kwnopjdmvssqjm`feolbw9-smd!#elqvn-B``fppsbsfqpplvmgpf{wfmgKfjdkwpojgfqVWE.;!%bns8#Afelqf-#TjwkpwvgjlltmfqpnbmbdfsqlejwiRvfqzbmmvbosbqbnpalvdkwebnlvpdlldofolmdfqj((*#xjpqbfopbzjmdgf`jgfklnf!=kfbgfqfmpvqfaqbm`ksjf`fpaol`h8pwbwfgwls!=?qb`jmdqfpjyf..%dw8sb`jwzpf{vboavqfbv-isd!#23/333lawbjmwjwofpbnlvmw/#Jm`-`lnfgznfmv!#ozqj`pwlgbz-jmgffg`lvmwz\\oldl-EbnjozollhfgNbqhfwopf#jeSobzfqwvqhfz*8ubq#elqfpwdjujmdfqqlqpGlnbjm~fopfxjmpfqwAold?,ellwfqoldjm-ebpwfqbdfmwp?algz#23s{#3sqbdnbeqjgbzivmjlqgloobqsob`fg`lufqpsovdjm6/333#sbdf!=alpwlm-wfpw+bubwbqwfpwfg\\`lvmwelqvnpp`kfnbjmgf{/ejoofgpkbqfpqfbgfqbofqw+bssfbqPvanjwojmf!=algz!=\t)#WkfWklvdkpffjmdifqpfzMftp?,ufqjezf{sfqwjmivqztjgwk>@llhjfPWBQW#b`qlpp\\jnbdfwkqfbgmbwjufsl`hfwal{!=\tPzpwfn#Gbujg`bm`fqwbaofpsqlufgBsqjo#qfboozgqjufqjwfn!=nlqf!=albqgp`lolqp`bnsvpejqpw##X^8nfgjb-dvjwbqejmjpktjgwk9pkltfgLwkfq#-sks!#bppvnfobzfqptjoplmpwlqfpqfojfeptfgfm@vpwlnfbpjoz#zlvq#Pwqjmd\t\tTkjowbzolq`ofbq9qfplqweqfm`kwklvdk!*#(#!?algz=avzjmdaqbmgpNfnafqmbnf!=lssjmdpf`wlq6s{8!=upsb`fslpwfqnbilq#`leeffnbqwjmnbwvqfkbssfm?,mbu=hbmpbpojmh!=Jnbdfp>ebopftkjof#kpsb`f3%bns8#\t\tJm##sltfqSlophj.`lolqilqgbmAlwwlnPwbqw#.`lvmw1-kwnomftp!=32-isdLmojmf.qjdkwnjoofqpfmjlqJPAM#33/333#dvjgfpubovf*f`wjlmqfsbjq-{no!##qjdkwp-kwno.aol`hqfdF{s9klufqtjwkjmujqdjmsklmfp?,wq=vpjmd#\t\nubq#=$*8\t\n?,wg=\t?,wq=\tabkbpbaqbpjodbofdlnbdzbqslophjpqsphj4]4C5d\bTA\nzk\vBl\bQ\vUmGx\bSM\nmC\bTA\twQ\nd}\bW@\bTl\bTF\ti@\tcT\vBM\v|jBV\tqw\tcC\bWI\npa\tfM\n{Z{X\bTF\bVV\bVK\tmkF\t[]\bPm\bTv\nsI\vpg\t[I\bQpmx\v_W\n^M\npe\vQ}\vGu\nel\npeChBV\bTA\tSo\nzk\vGL\vxD\nd[JzMY\bQpli\nfl\npC{BNt\vwT\ti_\bTgQQ\n|p\vXN\bQS\vxDQC\bWZ\tpD\vVS\bTWNtYh\nzuKjN}\twr\tHa\n_D\tj`\vQ}\vWp\nxZ{c\tji\tBU\nbDa|\tTn\tpV\nZd\nmC\vEV{X\tc}\tTo\bWl\bUd\tIQ\tcg\vxs\nXW\twR\vek\tc}\t]y\tJn\nrp\neg\npV\nz\\{W\npl\nz\\\nzU\tPc\t`{\bV@\nc|\bRw\ti_\bVb\nwX\tHvSu\bTF\v_W\vWs\vsIm\nTT\ndc\tUS\t}f\tiZ\bWz\tc}MD\tBe\tiD\v@@\bTl\bPv\t}tSwM`\vnU\tkW\ved\nqo\vxY\tA|\bTz\vy`BRBM\tiaXU\nyun^\tfL\tiI\nXW\tfD\bWz\bW@\tyj\tm\tav\tBN\vb\\\tpD\bTf\nY[\tJn\bQy\t[^\vWc\vyuDlCJ\vWj\vHR\t`V\vuW\tQy\np@\vGuplJm\bW[\nLP\nxC\n`m\twQuiR\nbI\twQ\tBZ\tWVBR\npg\tcgtiCW\n_y\tRg\bQa\vQB\vWc\nYble\ngESu\nL[\tQ\tea\tdj\v]W\nb~M`\twL\bTV\bVH\nt\npl\t|bs_\bU|\bTaoQlvSkM`\bTv\vK}\nfl\tcCoQBR\tHk\t|d\bQp\tHK\tBZ\vHR\bPv\vLx\vEZ\bT\bTv\tiDoDMU\vwBSuk`St\ntC\tPl\tKg\noi\tjY\vxYh}\nzk\bWZ\tm\ve`\tTB\tfE\nzk\t`zYh\nV|\tHK\tAJ\tAJ\bUL\tp\\\tql\nYcKd\nfyYh\t[I\vDgJm\n]n\nlb\bUd\n{Z\tlu\tfsoQ\bTWJm\vwB\teaYhBC\tsb\tTn\nzU\n_y\vxY\tQ]\ngwmt\tO\\\ntb\bWW\bQy\tmI\tV[\ny\\\naB\vRb\twQ\n]QQJ\bWg\vWa\bQj\ntC\bVH\nYm\vxs\bVK\nel\bWI\vxYCq\ntR\vHV\bTl\bVw\tay\bQa\bVV\t}t\tdj\nr|\tp\\\twR\n{i\nTT\t[I\ti[\tAJ\vxs\v_W\td{\vQ}\tcg\tTz\tA|\tCj\vLmN}m\nbK\tdZ\tp\\\t`V\tsV\np@\tiD\twQ\vQ}\bTfkaJm\v@@\bV`\tzp\n@NSw\tiI\tcg\noiSu\bVwloCy\tc}\vb\\\tsUBA\bWI\bTf\nxS\tVp\nd|\bTV\vbC\tNoJu\nTC\t|`\n{Z\tD]\bU|\tc}lm\bTl\tBv\tPl\tc}\bQp\tm\nLk\tkj\n@NSbKO\tj_\tp\\\nzU\bTl\bTg\bWI\tcfXO\bWW\ndzli\tBN\nd[\bWOMD\vKC\tdj\tI_\bVV\ny\\\vLmxl\txB\tkV\vb\\\vJW\vVS\tVx\vxD\td{MD\bTa\t|`\vPzR}\vWsBM\nsICN\bTaJm\npe\ti_\npV\nrh\tRd\tHv\n~A\nxR\vWh\vWk\nxS\vAz\vwX\nbIoQ\tfw\nqI\nV|\nunz\vpg\td\\\voA{D\ti_xB\bT\t`Vqr\tTTg]CA\vuR\tVJ\tT`\npw\vRb\tI_\nCxRo\vsICjKh\tBv\tWVBBoD{D\nhcKm\v^R\tQE\n{I\np@\nc|Gt\tc}Dl\nzUqN\tsVk}\tHh\v|j\nqou|\tQ]\vekZM`St\npe\tdj\bVG\veE\tm\vWc|I\n[W\tfL\bT\tBZSu\vKaCqNtY[\nqI\bTv\tfM\ti@\t}fB\\\tQy\vBl\bWgXDkc\vx[\bVV\tQ]\ta\tPy\vxD\nfI\t}foD\tdj\tSGls\t~DCN\n{Z\t\\v\n_D\nhc\vx_C[\tAJ\nLM\tVxCI\tbj\tc^\tcF\ntCSx\twrXA\bU\\\t|a\vK\\\bTV\bVj\nd|\tfsCX\ntb\bRw\tVx\tAE\tA|\bTNt\vDg\tVc\bTld@\npo\tM\tcF\npe\tiZ\tBo\bSq\nfHl`\bTx\bWf\tHE\vF{\tcO\tfD\nlm\vfZ\nlm\veU\tdGBH\bTV\tSiMW\nwX\nz\\\t\\cCX\nd}\tl}\bQp\bTV\tF~\bQ\t`i\ng@nO\bUd\bTl\nL[\twQ\tji\ntC\t|J\nLU\naB\vxYKj\tAJuN\ti[\npeSk\vDg\vx]\bVb\bVV\nea\tkV\nqI\bTaSk\nAO\tpD\ntb\nts\nyi\bVg\ti_\v_W\nLkNt\tyj\tfMR\tiI\bTl\vwX\tsV\vMl\nyu\tAJ\bVjKO\tWV\vA}\vW\nrp\tiD\v|olv\vsIBM\td~\tCU\bVbeV\npC\vwT\tj`\tc}\vxs\vps\vvh\tWV\vGg\vAe\vVK\v]W\trg\vWcF`\tBr\vb\\\tdZ\bQp\nqIkF\nLk\vAR\bWI\bTg\tbs\tdw\n{L\n_y\tiZ\bTA\tlg\bVV\bTl\tdk\n`k\ta{\ti_{Awj\twN\v@@\bTe\ti_\n_D\twL\nAH\viK\vek\n[]\tp_\tyj\bTv\tUS\t[r\n{I\npsGt\vVK\nplS}\vWP\t|dMD\vHV\bTR}M`\bTV\bVHlvCh\bW[Ke\tR{\v^R\tab\tBZ\tVA\tB`\nd|\nhsKe\tBeOi\tR{\td\\nB\bWZ\tdZ\tVJOs\tmuQ\vhZQ@QQ\nfI\bW[B\\li\nzU\nMdM`\nxS\bVV\n\\}\vxD\tm\bTpIS\nc|\tkVi~\tV{\vhZ\t|b\bWt\n@R\voA\vnU\bWI\tea\tB`\tiD\tc}\tTzBR\vQBNj\tCP\t[I\bTv\t`WuN\vpg\vpg\vWc\tiT\tbs\twL\tU_\tc\\\t|h\vKa\tNr\tfL\nq|\nzu\nz\\\tNr\bUg\t|bm`\bTv\nyd\nrp\bWf\tUXBV\nzk\nd}\twQ\t}fCe\ved\bTW\bSB\nxU\tcn\bTb\ne\ta\\\tSG\bU|\npV\nN\\Kn\vnU\tAt\tpD\v^R\vIrb[\tR{\tdE\vxD\vWK\vWA\bQL\bW@Su\bUd\nDM\tPcCADloQ\tHswiub\na\bQpOb\nLP\bTlY[\vK}\tAJ\bQn^\vsA\bSM\nqM\bWZ\n^W\vz{S|\tfD\bVK\bTv\bPvBB\tCPdF\tid\vxsmx\vws\tcC\ntC\tycM`\vW\nrh\bQp\vxD\\o\nsI_k\nzukF\tfDXsXO\tjp\bTvBS{B\tBr\nzQ\nbI\tc{BDBVnO\bTF\tcaJd\tfL\tPV\tI_\nlK`o\twX\npa\tgu\bP}{^\bWf\n{I\tBN\npaKl\vpg\tcn\tfL\vvhCq\bTl\vnU\bSqCm\twR\bUJ\npe\nyd\nYgCy\vKW\tfD\neaoQ\tj_\tBvnM\vID\bTa\nzApl\n]n\bTa\tR{\tfr\n_y\bUg{Xkk\vxD|Ixl\nfyCe\vwB\nLk\vd]\noi\n}h\tQ]\npe\bVwHkOQ\nzk\tAJ\npV\bPv\ny\\\tA{Oi\bSBXA\veE\tjp\nq}\tiDqN\v^R\tm\tiZ\tBr\bVg\noi\n\\X\tU_\nc|\vHV\bTf\tTn\\N\\N\nuBlv\nyu\tTd\bTf\bPL\v]W\tdG\nA`\nw^\ngI\npe\tdw\nz\\ia\bWZ\tcFJm\n{Z\bWO_kDfRR\td\\\bVV\vxsBNtilm\tTd\t]y\vHV\tSo\v|jXX\tA|\vZ^\vGu\bTWM`kF\vhZ\vVK\tdG\vBl\tay\nxUqEnO\bVw\nqICX\ne\tPl\bWO\vLm\tdLuHCm\tdTfn\vwBka\vnU\n@M\nyT\tHv\t\\}Kh\td~Yhk}\neR\td\\\bWI\t|b\tHK\tiD\bTWMY\npl\bQ_\twr\vAx\tHE\bTg\bSqvp\vb\\\bWO\nOl\nsI\nfy\vID\t\\c\n{Z\n^~\npe\nAO\tTT\vxvk_\bWO\v|j\vwB\tQy\ti@\tPl\tHa\tdZk}ra\tUT\vJc\ved\np@\tQN\nd|\tkj\tHkM`\noi\twr\td\\\nlq\no_\nlb\nL[\tacBBBHCm\npl\tIQ\bVK\vxs\n`e\viK\npaOi\tUS\bTp\tfD\nPGkkXA\nz\\\neg\vWh\twRqN\nqS\tcnlo\nxS\n^W\tBU\nt\tHE\tp\\\tfF\tfw\bVV\bW@\tak\vVKls\tVJ\bVV\veE\\o\nyX\nYmM`lL\nd|\nzk\tA{sE\twQXT\nt\tPl\t]y\vwT{pMD\vb\\\tQ]Kj\tJn\nAH\vRb\tBU\tHK\t\\c\nfIm\nqM\n@R\tSo\noiBT\tHv\n_yKh\tBZ\t]i\bUJ\tV{Sr\nbI\vGg\ta_\bTR\nfI\nfl\t[K\tIIS|\vuW\tiI\bWI\nqI\v|jBV\bVg\bWZkF\vx]\bTA\tab\tfr\ti@\tJd\tJd\vps\nAO\bTaxu\tiD\nzk\t|d\t|`\bW[\tlP\tdG\bVV\vw}\vqO\ti[\bQ\bTz\vVF\twNts\tdw\bTv\neS\ngi\tNryS\npe\bVV\bSq\n`m\tyj\tBZ\vWX\bSB\tc\\\nUR\t[J\tc_nM\bWQ\vAx\nMd\tBrui\vxY\bSM\vWc\v|j\vxs\t}Q\tBO\bPL\bWW\tfM\nAO\tPc\veUe^\bTg\nqI\tac\bPv\tcFoQ\tQ\vhZka\nz\\\tiK\tBU\n`k\tCPS|M`\n{I\tS{_O\tBZZiSk\tps\tp\\\nYu\n]s\nxC\bWt\nbD\tkV\vGuyS\nqA\t[r\neKM`\tdZlL\bUg\bTl\nbD\tUS\vb\\\tpV\nccS\\\tct\t`z\bPL\vWs\nA`\neg\bSquECR\vDg\t`W\vz{\vWcSkSk\tbW\bUg\tea\nxZ\tiI\tUX\tVJ\nqn\tS{\vRb\bTQ\nplGt\vuWuj\npF\nqI\tfL\t[I\tiaXO\nyu\vDg\ved\tq{VG\bQka\tVj\tkV\txB\nd|\np@\tQN\tPc\tps]j\tkV\toU\bTp\nzUnB\vB]\ta{\bV@\n]nm`\tcz\tR{m`\bQa\vwT\bSMMYqN\tdj~s\vQ}MY\vMB\tBv\twR\bRg\vQ}\tql\vKC\nrmxuCC\vwB\vvh\tBqXq\npV\ti_ObuE\nbd\nqo\v{i\nC~\tBL\veEuH\bVjEyGz\vzR\v{i\tcf\n{Z\n]nXA\vGu\vnU\thS\vGI\nCc\tHE\bTA\tHBBHCj\nCc\bTF\tHE\nXI\tA{\bQ\tc\\\vmO\vWX\nfH\np@MY\bTF\nlK\tBt\nzU\tTTKm\vwT\npV\ndt\vyI\tVx\tQ\tRg\tTd\nzU\bRS\nLM\twAnM\tTn\ndS\t]g\nLc\vwB\t}t\t[I\tCPkX\vFm\vhZm\ti[\np@\vQ}\vW\t|d\nMO\nMd\tf_\tfD\tcJ\tHz\vRb\tio\tPyY[\nxU\tct\v@@\tww\bPvBMFF\ntbv|\vKm\tBq\tBqKh`o\nZdXU\ti]\t|`\tStB\\\bQ\v_W\tTJ\nqI\t|a\tA{\vuPMD\tPl\nxR\tfL\vws\tc{\td\\\bV`\neg\tHKkc\nd|\bVV\ny\\kc\ti]\bVG\t`V\tss\tI_\tAE\tbs\tdu\nel\tpD\vW\nqslv\bSMZi\vVKia\vQB\tQ\n{Z\bPt\vKl\nlK\nhs\ndS\bVKmf\nd^\tkV\tcO\nc|\bVH\t\\]\bTv\bSq\tmI\vDg\tVJ\tcn\ny\\\bVg\bTv\nyX\bTF\t]]\bTp\noi\nhs\veU\nBf\tdjMr\n|p\t\\g\t]r\bVb{D\nd[XN\tfM\tO\\s_\tcf\tiZXN\vWc\tqv\n`m\tU^oD\nd|\vGg\tdE\vwflou}\nd|oQ\t`iOi\vxD\ndZ\nCxYw\nzk\ntb\ngw\tyj\tB`\nyX\vps\ntC\vpP\vqw\bPu\bPX\tDm\npwNj\tss\taG\vxs\bPt\noLGz\tOk\ti@\ti]eC\tIQ\tii\tdj\v@J\t|duh\bWZ\veU\vnU\bTa\tcCg]\nzkYh\bVK\nLU\np@\ntb\ntR\tCj\vNP\ti@\bP{\n\\}\n{c\nwX\tfL\bVG\tc{\t|`\tAJ\t|C\tfDln\t|d\tbs\nqI{B\vAx\np@\nzk\vRbOs\vWSe^\vD_\tBv\vWd\bVb\vxs\veE\bRw\n]n\n|p\vg|\tfwkc\bTIka\n\\TSp\tju\vps\npeu|\vGr\bVe\tCU]MXU\vxD\bTa\tIQ\vWq\tCU\tam\tdj\bSoSw\vnUCh\tQ]s_\bPt\tfS\bTa\t\\}\n@OYc\tUZ\bTx\npe\vnU\nzU\t|}\tiD\nz\\\bSM\vxDBR\nzQ\tQN]MYh\nLP\vFm\vLXvc\vqlka\tHK\bVb\ntC\nCy\bTv\nuVoQ\t`z\t[I\tB`\vRb\tyj\tsb\vWs\bTl\tkV\ved\nelL\vxN\tm\nJn\tjY\vxD\bVb\bSq\vyu\twL\vXL\bTA\tpg\tAt\tnDXX\twR\npl\nhwyS\nps\tcO\bW[\v|jXN\tsV\tp\\\tBe\nb~\nAJ\n]ek`qN\tdw\tWV\tHE\vEVJz\tid\tB`\tzhE]\tfD\bTgqN\bTa\tjaCv\bSM\nhc\bUet_\tieg]\twQ\nPn\bVB\tjw\bVg\vbE\tBZ\vRH\bP{\tjp\n\\}\ta_\tcC\t|a\vD]\tBZ\ti[\tfD\vxW\no_\td\\\n_D\ntb\t\\c\tAJ\nlKoQlo\vLx\vM@\bWZKn\vpg\nTi\nIv\n|r\v@}JzLmWhk}ln\vxD\n]sgc\vps\tBr\bTW\vBMtZ\nBYDW\tjf\vSWC}\nqo\tdE\tmv\tIQ\bPP\bUblvBC\nzQ\t[I\vgl\nig\bUsBT\vbC\bSq\tsU\tiW\nJn\tSY\tHK\trg\npV\vID\v|jKO\t`S\t|a`vbmglfmujbqnbgqjgavp`bqjmj`jlwjfnslslqrvf`vfmwbfpwbglsvfgfmivfdlp`lmwqbfpw/Mmmlnaqfwjfmfmsfqejonbmfqbbnjdlp`jvgbg`fmwqlbvmrvfsvfgfpgfmwqlsqjnfqsqf`jlpfd/Vmavfmlpuloufqsvmwlppfnbmbkba/Abbdlpwlmvfulpvmjglp`bqolpfrvjslmj/]lpnv`klpbodvmb`lqqfljnbdfmsbqwjqbqqjabnbq/Abklnaqffnsoflufqgbg`bnajlnv`kbpevfqlmsbpbglo/Amfbsbqf`fmvfubp`vqplpfpwbabrvjfqlojaqlp`vbmwlb``fplnjdvfoubqjlp`vbwqlwjfmfpdqvslppfq/Mmfvqlsbnfgjlpeqfmwfb`fq`bgfn/Mplefqwb`l`kfpnlgfoljwbojbofwqbpbod/Vm`lnsqb`vbofpf{jpwf`vfqslpjfmglsqfmpboofdbqujbifpgjmfqlnvq`jbslgq/Msvfpwlgjbqjlsvfaolrvjfqfnbmvfosqlsjl`qjpjp`jfqwlpfdvqlnvfqwfevfmwf`fqqbqdqbmgffef`wlsbqwfpnfgjgbsqlsjbleqf`fwjfqqbf.nbjoubqjbpelqnbpevwvqllaifwlpfdvjqqjfpdlmlqnbpnjpnlp/Vmj`l`bnjmlpjwjlpqby/_mgfajglsqvfabwlofglwfm/Abifp/Vpfpsfql`l`jmblqjdfmwjfmgb`jfmwl`/Mgjykbaobqpfq/Abobwjmbevfqybfpwjoldvfqqbfmwqbq/E{jwlo/_sfybdfmgbu/Agflfujwbqsbdjmbnfwqlpibujfqsbgqfpe/M`jo`bafyb/Mqfbppbojgbfmu/Alibs/_mbavplpajfmfpwf{wlpoofubqsvfgbmevfqwf`ln/Vm`obpfpkvnbmlwfmjglajoablvmjgbgfpw/Mpfgjwbq`qfbgl<X<W=c=k=n<R<V<\\<V<T<W<T=a=n<R<^=m<Y<Y<_<R<S=l<T=n<\\<V<Y=e<Y=o<Z<Y<v<\\<V<]<Y<[<]=g<W<R<Q<T<~=m<Y<S<R<X<A=n<R=n<R<P=k<Y<P<Q<Y=n<W<Y=n=l<\\<[<R<Q<\\<_<X<Y<P<Q<Y<x<W=c<s=l<T<Q<\\=m<Q<T=i=n<Y<P<V=n<R<_<R<X<^<R=n=n<\\<P<M<D<|<P<\\=c<K=n<R<^<\\=m<^<\\<P<Y<P=o<N<\\<V<X<^<\\<Q<\\<P=a=n<T=a=n=o<~<\\<P=n<Y=i<S=l<R=n=o=n<Q<\\<X<X<Q=c<~<R=n=n=l<T<Q<Y<U<~<\\=m<Q<T<P=m<\\<P=n<R=n=l=o<]<r<Q<T<P<T=l<Q<Y<Y<r<r<r<W<T=j=a=n<\\<r<Q<\\<Q<Y<P<X<R<P<P<R<U<X<^<Y<R<Q<R=m=o<X\fHy\fIk\fHU\fId\fHy\fIl\fHT\fIk\fHy\fHR\fHy\fIg\fHx\fH\\\fHF\fH\\\fHD\fIk\fHc\fHy\fHy\fHS\fHA\fIl\fHk\fHT\fHy\fH\\\fHH\fIg\fHU\fIg\fHj\fHF\fHU\fIl\fHC\fHU\fHC\fHR\fHH\fHy\fHI\fHRibdqbm\fHj\fHp\fHp\fIg\fHi\fH@\fHJ\fIg\fH{\fHd\fHp\fHR\fH{\fHc\fHU\fHB\fHk\fHD\fHY\fHU\fHC\fIk\fHI\fIk\fHI\fIl\fHt\fH\\\fHp\fH@\fHJ\fIl\fHy\fHd\fHp\fIl\fHY\fIk\fHD\fHd\fHD\fHc\fHU\fH\\\fHe\fHT\fHB\fIk\fHy\fHB\fHY\fIg\fH^\fIk\fHT\fH@\fHB\fHd\fHJ\fIk\fH\fH\\\fHj\fHB\fH@\fHT\fHA\fH\\\fH@\fHD\fHv\fH^\fHB\fHD\fHj\fH{\fHT\fIl\fH^\fIl4U5h5e4I5h5e5k4\\4K4N4B4]4U4C4C4K5h5e5k4\\5k4Y5d4]4V5f4]5o4K5j5d5h4K4D5f5j4U4]4Z4\\5h5o5k5j4K5f5d5i5n4K5h4U5h5f4K5j4K5h5o5j4A4F5e5n4D5h5d4A4E4K4B4]5m5n4[4U4D4C4]5o5j4I4\\4K5o5i4K4K4A4C4I5h4K5m5f5k4D4U4Z5o5f5m4D4A4G5d5i5j5d5k5d4O5j4K4@4C4K5h5k4K4_5h5i4U5j4C5h5f4_4U4D4]4Y5h5e5i5j4\\4D5k4K4O5j5k5i4G5h5o5j4F4K5h4K4A5f4G5i4Y4]4X4]4A4A5d5h5d5m5f4K4\\4K5h5o5h5i4]4E4K5j4F4K5h5m4O4D5d4B4K4Y4O5j4F4K5j5k4K5h5f4U4Z5d5d5n4C4K4D5j4B5f4]4D5j4F5h5o5i4X4K4M5d5k5f4K4D5d5n4Y4Y5d5i4K4]5n5i4O4A4C5j4A5j4U4C5i4]4O5f4K4A4E5o4F4D4C5d5j5f4@4D5i5j5k4F4A4F4@5k4E4_5j4E5f4F5i5o4]4E4V4^4E5j5m4_4D5f4F5h5h5k5h5j4K4F5h5o5n5h4D5h5i4K4U5j5k4O5d5h4X5f4M5j5d4]4O5i4K5m5f5o4D5o5h4\\4K4F4]4F4D4D4O5j5k5i4_4K5j5o4D5f4U5m5n4C4A4_5j5h5k5i4X4U4]4O5k5h4X5k4]5n4[4]4[5h4Dsqlejofpfquj`fgfebvowkjnpfoegfwbjop`lmwfmwpvsslqwpwbqwfgnfppbdfpv``fppebpkjlm?wjwof=`lvmwqzb``lvmw`qfbwfgpwlqjfpqfpvowpqvmmjmdsql`fpptqjwjmdlaif`wpujpjaoftfo`lnfbqwj`ofvmhmltmmfwtlqh`lnsbmzgzmbnj`aqltpfqsqjub`zsqlaofnPfquj`fqfpsf`wgjpsobzqfrvfpwqfpfquftfapjwfkjpwlqzeqjfmgplswjlmptlqhjmdufqpjlmnjoojlm`kbmmfotjmglt-bggqfppujpjwfgtfbwkfq`lqqf`wsqlgv`wfgjqf`welqtbqgzlv#`bmqfnlufgpvaif`w`lmwqlobq`kjuf`vqqfmwqfbgjmdojaqbqzojnjwfgnbmbdfqevqwkfqpvnnbqznb`kjmfnjmvwfpsqjubwf`lmwf{wsqldqbnpl`jfwzmvnafqptqjwwfmfmbaofgwqjddfqplvq`fpolbgjmdfofnfmwsbqwmfqejmboozsfqef`wnfbmjmdpzpwfnphffsjmd`vowvqf%rvlw8/ilvqmbosqlif`wpvqeb`fp%rvlw8f{sjqfpqfujftpabobm`fFmdojpk@lmwfmwwkqlvdkSofbpf#lsjmjlm`lmwb`wbufqbdfsqjnbqzujoobdfPsbmjpkdboofqzgf`ojmfnffwjmdnjppjlmslsvobqrvbojwznfbpvqfdfmfqbopsf`jfppfppjlmpf`wjlmtqjwfqp`lvmwfqjmjwjboqfslqwpejdvqfpnfnafqpklogjmdgjpsvwffbqojfqf{sqfppgjdjwbosj`wvqfBmlwkfqnbqqjfgwqbeej`ofbgjmd`kbmdfg`fmwqbouj`wlqzjnbdfp,qfbplmppwvgjfpefbwvqfojpwjmdnvpw#afp`kllopUfqpjlmvpvboozfsjplgfsobzjmddqltjmdlaujlvplufqobzsqfpfmwb`wjlmp?,vo=\ttqbssfqboqfbgz`fqwbjmqfbojwzpwlqbdfbmlwkfqgfphwlsleefqfgsbwwfqmvmvpvboGjdjwbo`bsjwboTfapjwfebjovqf`lmmf`wqfgv`fgBmgqljggf`bgfpqfdvobq#%bns8#bmjnbopqfofbpfBvwlnbwdfwwjmdnfwklgpmlwkjmdSlsvobq`bswjlmofwwfqp`bswvqfp`jfm`foj`fmpf`kbmdfpFmdobmg>2%bns8Kjpwlqz#>#mft#@fmwqbovsgbwfgPsf`jboMfwtlqhqfrvjqf`lnnfmwtbqmjmd@loofdfwlloabqqfnbjmpaf`bvpffof`wfgGfvwp`kejmbm`ftlqhfqprvj`hozafwtffmf{b`wozpfwwjmdgjpfbpfPl`jfwztfbslmpf{kjajw%ow8"..@lmwqlo`obppfp`lufqfglvwojmfbwwb`hpgfuj`fp+tjmgltsvqslpfwjwof>!Nlajof#hjoojmdpkltjmdJwbojbmgqlssfgkfbujozfeef`wp.2$^*8\t`lmejqn@vqqfmwbgubm`fpkbqjmdlsfmjmdgqbtjmdajoojlmlqgfqfgDfqnbmzqfobwfg?,elqn=jm`ovgftkfwkfqgfejmfgP`jfm`f`bwboldBqwj`ofavwwlmpobqdfpwvmjelqnilvqmfzpjgfabq@kj`bdlklojgbzDfmfqbosbppbdf/%rvlw8bmjnbwfeffojmdbqqjufgsbppjmdmbwvqboqlvdkoz-\t\tWkf#avw#mlwgfmpjwzAqjwbjm@kjmfpfob`h#lewqjavwfJqfobmg!#gbwb.eb`wlqpqf`fjufwkbw#jpOjaqbqzkvpabmgjm#eb`wbeebjqp@kbqofpqbgj`boaqlvdkwejmgjmdobmgjmd9obmd>!qfwvqm#ofbgfqpsobmmfgsqfnjvnsb`hbdfBnfqj`bFgjwjlm^%rvlw8Nfppbdfmffg#wlubovf>!`lnsof{ollhjmdpwbwjlmafojfufpnboofq.nlajofqf`lqgptbmw#wlhjmg#leEjqfel{zlv#bqfpjnjobqpwvgjfgnb{jnvnkfbgjmdqbsjgoz`ojnbwfhjmdglnfnfqdfgbnlvmwpelvmgfgsjlmffqelqnvobgzmbpwzklt#wl#Pvsslqwqfufmvff`lmlnzQfpvowpaqlwkfqplogjfqobqdfoz`boojmd-%rvlw8B``lvmwFgtbqg#pfdnfmwQlafqw#feelqwpSb`jej`ofbqmfgvs#tjwkkfjdkw9tf#kbufBmdfofpmbwjlmp\\pfbq`kbssojfgb`rvjqfnbppjufdqbmwfg9#ebopfwqfbwfgajddfpwafmfejwgqjujmdPwvgjfpnjmjnvnsfqkbspnlqmjmdpfoojmdjp#vpfgqfufqpfubqjbmw#qlof>!njppjmdb`kjfufsqlnlwfpwvgfmwplnflmff{wqfnfqfpwlqfalwwln9fuloufgboo#wkfpjwfnbsfmdojpktbz#wl##Bvdvpwpznalop@lnsbmznbwwfqpnvpj`bobdbjmpwpfqujmd~*+*8\tsbznfmwwqlvaof`lm`fsw`lnsbqfsbqfmwpsobzfqpqfdjlmpnlmjwlq#$$Wkf#tjmmjmdf{solqfbgbswfgDboofqzsqlgv`fbajojwzfmkbm`f`bqffqp*-#Wkf#`loof`wPfbq`k#bm`jfmwf{jpwfgellwfq#kbmgofqsqjmwfg`lmplofFbpwfqmf{slqwptjmgltp@kbmmfojoofdbomfvwqbopvddfpw\\kfbgfqpjdmjmd-kwno!=pfwwofgtfpwfqm`bvpjmd.tfahjw`objnfgIvpwj`f`kbswfquj`wjnpWklnbp#nlyjoobsqlnjpfsbqwjfpfgjwjlmlvwpjgf9ebopf/kvmgqfgLoznsj`\\avwwlmbvwklqpqfb`kfg`kqlmj`gfnbmgppf`lmgpsqlwf`wbglswfgsqfsbqfmfjwkfqdqfbwozdqfbwfqlufqboojnsqluf`lnnbmgpsf`jbopfbq`k-tlqpkjsevmgjmdwklvdkwkjdkfpwjmpwfbgvwjojwzrvbqwfq@vowvqfwfpwjmd`ofbqozf{slpfgAqltpfqojafqbo~#`bw`kSqlif`wf{bnsofkjgf+*8EolqjgbbmptfqpbooltfgFnsfqlqgfefmpfpfqjlvpeqffglnPfufqbo.avwwlmEvqwkfqlvw#le#">#mvoowqbjmfgGfmnbqhuljg+3*,boo-ipsqfufmwQfrvfpwPwfskfm\t\tTkfm#lapfquf?,k1=\tNlgfqm#sqlujgf!#bow>!alqgfqp-\t\tElq#\t\tNbmz#bqwjpwpsltfqfgsfqelqnej`wjlmwzsf#lenfgj`bowj`hfwplsslpfg@lvm`jotjwmfppivpwj`fDflqdf#Afodjvn---?,b=wtjwwfqmlwbaoztbjwjmdtbqebqf#Lwkfq#qbmhjmdskqbpfpnfmwjlmpvqujufp`klobq?,s=\t#@lvmwqzjdmlqfgolpp#leivpw#bpDflqdjbpwqbmdf?kfbg=?pwlssfg2$^*8\tjpobmgpmlwbaofalqgfq9ojpw#le`bqqjfg233/333?,k0=\t#pfufqboaf`lnfppfof`w#tfggjmd33-kwnonlmbq`klee#wkfwfb`kfqkjdkoz#ajloldzojef#lelq#fufmqjpf#le%qbrvl8sovplmfkvmwjmd+wklvdkGlvdobpiljmjmd`jq`ofpElq#wkfBm`jfmwUjfwmbnufkj`ofpv`k#bp`qzpwboubovf#>Tjmgltpfmilzfgb#pnboobppvnfg?b#jg>!elqfjdm#Boo#qjklt#wkfGjpsobzqfwjqfgkltfufqkjggfm8abwwofppffhjmd`bajmfwtbp#mlwollh#bw`lmgv`wdfw#wkfIbmvbqzkbssfmpwvqmjmdb9klufqLmojmf#Eqfm`k#ob`hjmdwzsj`bof{wqb`wfmfnjfpfufm#jedfmfqbwgf`jgfgbqf#mlw,pfbq`kafojfep.jnbdf9ol`bwfgpwbwj`-oldjm!=`lmufqwujlofmwfmwfqfgejqpw!=`jq`vjwEjmobmg`kfnjpwpkf#tbp23s{8!=bp#pv`kgjujgfg?,psbm=tjoo#afojmf#leb#dqfbwnzpwfqz,jmgf{-eboojmdgvf#wl#qbjotbz`loofdfnlmpwfqgfp`fmwjw#tjwkmv`ofbqIftjpk#sqlwfpwAqjwjpkeoltfqpsqfgj`wqfelqnpavwwlm#tkl#tbpof`wvqfjmpwbmwpvj`jgfdfmfqj`sfqjlgpnbqhfwpPl`jbo#ejpkjmd`lnajmfdqbskj`tjmmfqp?aq#,=?az#wkf#MbwvqboSqjub`z`llhjfplvw`lnfqfploufPtfgjpkaqjfeozSfqpjbmpl#nv`k@fmwvqzgfsj`wp`lovnmpklvpjmdp`qjswpmf{w#wlafbqjmdnbssjmdqfujpfgiRvfqz+.tjgwk9wjwof!=wllowjsPf`wjlmgfpjdmpWvqhjpkzlvmdfq-nbw`k+~*+*8\t\tavqmjmdlsfqbwfgfdqffpplvq`f>Qj`kbqg`olpfozsobpwj`fmwqjfp?,wq=\t`lolq9 vo#jg>!slppfppqloojmdskzpj`pebjojmdf{f`vwf`lmwfpwojmh#wlGfebvow?aq#,=\t9#wqvf/`kbqwfqwlvqjpn`obppj`sql`ffgf{sobjm?,k2=\tlmojmf-<{no#ufkfosjmdgjbnlmgvpf#wkfbjqojmffmg#..=*-bwwq+qfbgfqpklpwjmd eeeeeeqfbojyfUjm`fmwpjdmbop#pq`>!,Sqlgv`wgfpsjwfgjufqpfwfoojmdSvaoj`#kfog#jmIlpfsk#wkfbwqfbeef`wp?pwzof=b#obqdfglfpm$wobwfq/#Fofnfmwebuj`lm`qfbwlqKvmdbqzBjqslqwpff#wkfpl#wkbwNj`kbfoPzpwfnpSqldqbnp/#bmg##tjgwk>f%rvlw8wqbgjmdofew!=\tsfqplmpDlogfm#Beebjqpdqbnnbqelqnjmdgfpwqlzjgfb#le`bpf#lelogfpw#wkjp#jp-pq`#>#`bqwllmqfdjpwq@lnnlmpNvpojnpTkbw#jpjm#nbmznbqhjmdqfufbopJmgffg/frvbooz,pklt\\blvwgllqfp`bsf+Bvpwqjbdfmfwj`pzpwfn/Jm#wkf#pjwwjmdKf#boplJpobmgpB`bgfnz\t\n\n?"..Gbmjfo#ajmgjmdaol`h!=jnslpfgvwjojyfBaqbkbn+f{`fswxtjgwk9svwwjmd*-kwno+#X^8\tGBWBX#)hjw`kfmnlvmwfgb`wvbo#gjbof`wnbjmoz#\\aobmh$jmpwboof{sfqwpje+wzsfJw#bopl%`lsz8#!=Wfqnpalqm#jmLswjlmpfbpwfqmwbohjmd`lm`fqmdbjmfg#lmdljmdivpwjez`qjwj`peb`wlqzjwp#ltmbppbvowjmujwfgobpwjmdkjp#ltmkqfe>!,!#qfo>!gfufols`lm`fqwgjbdqbngloobqp`ovpwfqsks<jg>bo`lklo*8~*+*8vpjmd#b=?psbm=ufppfopqfujuboBggqfppbnbwfvqbmgqljgboofdfgjoomfpptbohjmd`fmwfqprvbojeznbw`kfpvmjejfgf{wjm`wGfefmpfgjfg#jm\t\n?"..#`vpwlnpojmhjmdOjwwof#Allh#lefufmjmdnjm-ip<bqf#wkfhlmwbhwwlgbz$p-kwno!#wbqdfw>tfbqjmdBoo#Qjd8\t~*+*8qbjpjmd#Bopl/#`qv`jbobalvw!=gf`obqf..=\t?p`ejqfel{bp#nv`kbssojfpjmgf{/#p/#avw#wzsf#>#\t\t?"..wltbqgpQf`lqgpSqjubwfElqfjdmSqfnjfq`klj`fpUjqwvboqfwvqmp@lnnfmwSltfqfgjmojmf8slufqwz`kbnafqOjujmd#ulovnfpBmwklmzoldjm!#QfobwfgF`lmlnzqfb`kfp`vwwjmddqbujwzojef#[email protected]?,wg=\t#qfwvqmpwbgjvntjgdfwpubqzjmdwqbufopkfog#aztkl#bqftlqh#jmeb`vowzbmdvobqtkl#kbgbjqslqwwltm#le\t\tPlnf#$`oj`h$`kbqdfphfztlqgjw#tjoo`jwz#le+wkjp*8Bmgqft#vmjrvf#`kf`hfglq#nlqf033s{8#qfwvqm8qpjlm>!sovdjmptjwkjm#kfqpfoePwbwjlmEfgfqboufmwvqfsvaojpkpfmw#wlwfmpjlmb`wqfpp`lnf#wlejmdfqpGvhf#lesflsof/f{soljwtkbw#jpkbqnlmzb#nbilq!9!kwwsjm#kjp#nfmv!=\tnlmwkozleej`fq`lvm`jodbjmjmdfufm#jmPvnnbqzgbwf#leolzbowzejwmfppbmg#tbpfnsfqlqpvsqfnfPf`lmg#kfbqjmdQvppjbmolmdfpwBoafqwbobwfqbopfw#le#pnboo!=-bssfmggl#tjwkefgfqboabmh#leafmfbwkGfpsjwf@bsjwbodqlvmgp*/#bmg#sfq`fmwjw#eqln`olpjmd`lmwbjmJmpwfbgejewffmbp#tfoo-zbkll-qfpslmgejdkwfqlap`vqfqfeof`wlqdbmj`>#Nbwk-fgjwjmdlmojmf#sbggjmdb#tkloflmfqqlqzfbq#lefmg#le#abqqjfqtkfm#jwkfbgfq#klnf#leqfpvnfgqfmbnfgpwqlmd=kfbwjmdqfwbjmp`olvgeqtbz#le#Nbq`k#2hmltjmdjm#sbqwAfwtffmofpplmp`olpfpwujqwvboojmhp!=`qlppfgFMG#..=ebnlvp#btbqgfgOj`fmpfKfbowk#ebjqoz#tfbowkznjmjnboBeqj`bm`lnsfwfobafo!=pjmdjmdebqnfqpAqbpjo*gjp`vppqfsob`fDqfdlqzelmw#`lsvqpvfgbssfbqpnbhf#vsqlvmgfgalwk#leaol`hfgpbt#wkfleej`fp`lolvqpje+gl`vtkfm#kffmelq`fsvpk+evBvdvpw#VWE.;!=Ebmwbpzjm#nlpwjmivqfgVpvboozebqnjmd`olpvqflaif`w#gfefm`fvpf#le#Nfgj`bo?algz=\tfujgfmwaf#vpfghfz@lgfpj{wffmJpobnj` 333333fmwjqf#tjgfoz#b`wjuf#+wzsflelmf#`bm`lolq#>psfbhfqf{wfmgpSkzpj`pwfqqbjm?walgz=evmfqboujftjmdnjggof#`qj`hfwsqlskfwpkjewfggl`wlqpQvppfoo#wbqdfw`lnsb`wbodfaqbpl`jbo.avoh#lenbm#bmg?,wg=\t#kf#ofew*-ubo+*ebopf*8oldj`boabmhjmdklnf#wlmbnjmd#Bqjylmb`qfgjwp*8\t~*8\telvmgfqjm#wvqm@loojmpafelqf#Avw#wkf`kbqdfgWjwof!=@bswbjmpsfoofgdlggfppWbd#..=Bggjmd9avw#tbpQf`fmw#sbwjfmwab`h#jm>ebopf%Ojm`lomtf#hmlt@lvmwfqIvgbjpnp`qjsw#bowfqfg$^*8\t##kbp#wkfvm`ofbqFufmw$/alwk#jmmlw#boo\t\t?"..#sob`jmdkbqg#wl#`fmwfqplqw#le`ojfmwppwqffwpAfqmbqgbppfqwpwfmg#wlebmwbpzgltm#jmkbqalvqEqffglniftfoqz,balvw--pfbq`kofdfmgpjp#nbgfnlgfqm#lmoz#lmlmoz#wljnbdf!#ojmfbq#sbjmwfqbmg#mlwqbqfoz#b`qlmzngfojufqpklqwfq33%bns8bp#nbmztjgwk>!,)#?"X@wjwof#>le#wkf#oltfpw#sj`hfg#fp`bsfgvpfp#lesflsofp#Svaoj`Nbwwkftwb`wj`pgbnbdfgtbz#elqobtp#lefbpz#wl#tjmgltpwqlmd##pjnsof~`bw`k+pfufmwkjmelal{tfmw#wlsbjmwfg`jwjyfmJ#glm$wqfwqfbw-#Plnf#tt-!*8\talnajmdnbjowl9nbgf#jm-#Nbmz#`bqqjfpx~8tjtlqh#lepzmlmzngfefbwpebulqfglswj`bosbdfWqbvmofpp#pfmgjmdofew!=?`lnP`lqBoo#wkfiRvfqz-wlvqjpw@obppj`ebopf!#Tjokfonpvavqapdfmvjmfajpklsp-psojw+dolabo#elooltpalgz#lemlnjmbo@lmwb`wpf`vobqofew#wl`kjfeoz.kjggfm.abmmfq?,oj=\t\t-#Tkfm#jm#alwkgjpnjppF{solqfbotbzp#ujb#wkfpsb/]lotfoebqfqvojmd#bqqbmdf`bswbjmkjp#plmqvof#lekf#wllhjwpfoe/>3%bns8+`boofgpbnsofpwl#nbhf`ln,sbdNbqwjm#Hfmmfgzb``fswpevoo#lekbmgofgAfpjgfp,,..=?,baof#wlwbqdfwpfppfm`fkjn#wl#jwp#az#`lnnlm-njmfqbowl#wbhftbzp#wlp-lqd,obgujpfgsfmbowzpjnsof9je#wkfzOfwwfqpb#pklqwKfqafqwpwqjhfp#dqlvsp-ofmdwkeojdkwplufqobspoltoz#ofppfq#pl`jbo#?,s=\t\n\njw#jmwlqbmhfg#qbwf#levo=\t##bwwfnswsbjq#lenbhf#jwHlmwbhwBmwlmjlkbujmd#qbwjmdp#b`wjufpwqfbnpwqbssfg!*-`pp+klpwjofofbg#wlojwwof#dqlvsp/Sj`wvqf..=\t\t#qltp>!#laif`wjmufqpf?ellwfq@vpwlnU=?_,p`qploujmd@kbnafqpobufqztlvmgfgtkfqfbp">#$vmgelq#boosbqwoz#.qjdkw9Bqbajbmab`hfg#`fmwvqzvmjw#lenlajof.Fvqlsf/jp#klnfqjph#legfpjqfg@ojmwlm`lpw#lebdf#le#af`lnf#mlmf#les%rvlw8Njggof#fbg$*X3@qjwj`ppwvgjlp=%`lsz8dqlvs!=bppfnaonbhjmd#sqfppfgtjgdfw-sp9!#<#qfavjowaz#plnfElqnfq#fgjwlqpgfobzfg@bmlmj`kbg#wkfsvpkjmd`obpp>!avw#bqfsbqwjboAbazolmalwwln#`bqqjfq@lnnbmgjwp#vpfBp#tjwk`lvqpfpb#wkjqggfmlwfpbopl#jmKlvpwlm13s{8!=b``vpfgglvaof#dlbo#leEbnlvp#*-ajmg+sqjfpwp#Lmojmfjm#Ivozpw#(#!d`lmpvowgf`jnbokfosevoqfujufgjp#ufqzq$($jswolpjmd#efnbofpjp#boplpwqjmdpgbzp#lebqqjuboevwvqf#?laif`welq`jmdPwqjmd+!#,=\t\n\nkfqf#jpfm`lgfg-##Wkf#aboollmglmf#az,`lnnlmad`lolqobt#le#Jmgjbmbbuljgfgavw#wkf1s{#0s{irvfqz-bewfq#bsloj`z-nfm#bmgellwfq.>#wqvf8elq#vpfp`qffm-Jmgjbm#jnbdf#>ebnjoz/kwws9,,#%maps8gqjufqpfwfqmbopbnf#bpmlwj`fgujftfqp~*+*8\t#jp#nlqfpfbplmpelqnfq#wkf#mftjp#ivpw`lmpfmw#Pfbq`ktbp#wkftkz#wkfpkjssfgaq=?aq=tjgwk9#kfjdkw>nbgf#le`vjpjmfjp#wkbwb#ufqz#Bgnjqbo#ej{fg8mlqnbo#NjppjlmSqfpp/#lmwbqjl`kbqpfwwqz#wl#jmubgfg>!wqvf!psb`jmdjp#nlpwb#nlqf#wlwboozeboo#le~*8\t##jnnfmpfwjnf#jmpfw#lvwpbwjpezwl#ejmggltm#wlolw#le#Sobzfqpjm#Ivmfrvbmwvnmlw#wkfwjnf#wlgjpwbmwEjmmjpkpq`#>#+pjmdof#kfos#leDfqnbm#obt#bmgobafofgelqfpwp`llhjmdpsb`f!=kfbgfq.tfoo#bpPwbmofzaqjgdfp,dolabo@qlbwjb#Balvw#X3^8\t##jw/#bmgdqlvsfgafjmd#b*xwkqltkf#nbgfojdkwfqfwkj`boEEEEEE!alwwln!ojhf#b#fnsolzpojuf#jmbp#pffmsqjmwfqnlpw#leva.ojmhqfif`wpbmg#vpfjnbdf!=pv``ffgeffgjmdMv`ofbqjmelqnbwl#kfosTlnfm$pMfjwkfqNf{j`bmsqlwfjm?wbaof#az#nbmzkfbowkzobtpvjwgfujpfg-svpk+xpfoofqppjnsoz#Wkqlvdk-`llhjf#Jnbdf+logfq!=vp-ip!=#Pjm`f#vmjufqpobqdfq#lsfm#wl"..#fmgojfp#jm$^*8\t##nbqhfwtkl#jp#+!GLN@lnbmbdfglmf#elqwzsfle#Hjmdglnsqlejwpsqlslpfwl#pklt`fmwfq8nbgf#jwgqfppfgtfqf#jmnj{wvqfsqf`jpfbqjpjmdpq`#>#$nbhf#b#pf`vqfgAbswjpwulwjmd#\t\n\nubq#Nbq`k#1dqft#vs@ojnbwf-qfnlufphjoofgtbz#wkf?,kfbg=eb`f#leb`wjmd#qjdkw!=wl#tlqhqfgv`fpkbp#kbgfqf`wfgpklt+*8b`wjlm>allh#lebm#bqfb>>#!kww?kfbgfq\t?kwno=`lmelqneb`jmd#`llhjf-qfoz#lmklpwfg#-`vpwlnkf#tfmwavw#elqpsqfbg#Ebnjoz#b#nfbmplvw#wkfelqvnp-ellwbdf!=Nlajo@ofnfmwp!#jg>!bp#kjdkjmwfmpf..=?"..efnbof#jp#pffmjnsojfgpfw#wkfb#pwbwfbmg#kjpebpwfpwafpjgfpavwwlm\\alvmgfg!=?jnd#Jmelal{fufmwp/b#zlvmdbmg#bqfMbwjuf#`kfbsfqWjnflvwbmg#kbpfmdjmfptlm#wkf+nlpwozqjdkw9#ejmg#b#.alwwlnSqjm`f#bqfb#lenlqf#lepfbq`k\\mbwvqf/ofdboozsfqjlg/obmg#lelq#tjwkjmgv`fgsqlujmdnjppjofol`boozBdbjmpwwkf#tbzh%rvlw8s{8!=\tsvpkfg#babmglmmvnfqbo@fqwbjmJm#wkjpnlqf#jmlq#plnfmbnf#jpbmg/#jm`qltmfgJPAM#3.`qfbwfpL`wlafqnbz#mlw`fmwfq#obwf#jmGfefm`ffmb`wfgtjpk#wlaqlbgoz`llojmdlmolbg>jw-#Wkfqf`lufqNfnafqpkfjdkw#bppvnfp?kwno=\tsflsof-jm#lmf#>tjmgltellwfq\\b#dllg#qfhobnblwkfqp/wl#wkjp\\`llhjfsbmfo!=Olmglm/gfejmfp`qvpkfgabswjpn`lbpwbopwbwvp#wjwof!#nluf#wlolpw#jmafwwfq#jnsojfpqjuboqzpfqufqp#PzpwfnSfqkbspfp#bmg#`lmwfmgeoltjmdobpwfg#qjpf#jmDfmfpjpujft#leqjpjmd#pffn#wlavw#jm#ab`hjmdkf#tjoodjufm#bdjujmd#`jwjfp-eolt#le#Obwfq#boo#avwKjdktbzlmoz#azpjdm#lekf#glfpgjeefqpabwwfqz%bns8obpjmdofpwkqfbwpjmwfdfqwbhf#lmqfevpfg`boofg#>VP%bnsPff#wkfmbwjufpaz#wkjppzpwfn-kfbg#le9klufq/ofpajbmpvqmbnfbmg#boo`lnnlm,kfbgfq\\\\sbqbnpKbqubqg,sj{fo-qfnlubopl#olmdqlof#leiljmwozphzp`qbVmj`lgfaq#,=\tBwobmwbmv`ofvp@lvmwz/svqfoz#`lvmw!=fbpjoz#avjog#blm`oj`hb#djufmsljmwfqk%rvlw8fufmwp#fopf#x\tgjwjlmpmlt#wkf/#tjwk#nbm#tkllqd,Tfalmf#bmg`buboqzKf#gjfgpfbwwof33/333#xtjmgltkbuf#wlje+tjmgbmg#jwpplofoz#n%rvlw8qfmftfgGfwqljwbnlmdpwfjwkfq#wkfn#jmPfmbwlqVp?,b=?Hjmd#leEqbm`jp.sqlgv`kf#vpfgbqw#bmgkjn#bmgvpfg#azp`lqjmdbw#klnfwl#kbufqfobwfpjajojwzeb`wjlmAveebolojmh!=?tkbw#kfeqff#wl@jwz#le`lnf#jmpf`wlqp`lvmwfglmf#gbzmfqulvpprvbqf#~8je+dljm#tkbwjnd!#bojp#lmozpfbq`k,wvfpgbzollpfozPlolnlmpf{vbo#.#?b#kqnfgjvn!GL#MLW#Eqbm`f/tjwk#b#tbq#bmgpf`lmg#wbhf#b#=\t\t\tnbqhfw-kjdktbzglmf#jm`wjujwz!obpw!=laojdfgqjpf#wl!vmgfejnbgf#wl#Fbqoz#sqbjpfgjm#jwp#elq#kjpbwkofwfIvsjwfqZbkll"#wfqnfg#pl#nbmzqfbooz#p-#Wkf#b#tlnbm<ubovf>gjqf`w#qjdkw!#aj`z`ofb`jmd>!gbz#bmgpwbwjmdQbwkfq/kjdkfq#Leej`f#bqf#mltwjnfp/#tkfm#b#sbz#elqlm#wkjp.ojmh!=8alqgfqbqlvmg#bmmvbo#wkf#Mftsvw#wkf-`ln!#wbhjm#wlb#aqjfe+jm#wkfdqlvsp-8#tjgwkfmyznfppjnsof#jm#obwfxqfwvqmwkfqbszb#sljmwabmmjmdjmhp!=\t+*8!#qfb#sob`f_v330@bbalvw#bwq=\t\n\n``lvmw#djufp#b?P@QJSWQbjotbzwkfnfp,wlloal{AzJg+!{kvnbmp/tbw`kfpjm#plnf#je#+tj`lnjmd#elqnbwp#Vmgfq#avw#kbpkbmgfg#nbgf#azwkbm#jmefbq#legfmlwfg,jeqbnfofew#jmulowbdfjm#fb`kb%rvlw8abpf#leJm#nbmzvmgfqdlqfdjnfpb`wjlm#?,s=\t?vpwlnUb8%dw8?,jnslqwplq#wkbwnlpwoz#%bns8qf#pjyf>!?,b=?,kb#`obppsbppjufKlpw#>#TkfwkfqefqwjofUbqjlvp>X^8+ev`bnfqbp,=?,wg=b`wp#bpJm#plnf=\t\t?"lqdbmjp#?aq#,=Afjijmd`bwbo/Lgfvwp`kfvqlsfvfvphbqbdbfjodfpufmphbfpsb/]bnfmpbifvpvbqjlwqbabiln/E{j`ls/Mdjmbpjfnsqfpjpwfnbl`wvaqfgvqbmwfb/]bgjqfnsqfpbnlnfmwlmvfpwqlsqjnfqbwqbu/Epdqb`jbpmvfpwqbsql`fplfpwbglp`bojgbgsfqplmbm/Vnfqlb`vfqgln/Vpj`bnjfnaqllefqwbpbodvmlpsb/Apfpfifnsolgfqf`klbgfn/Mpsqjubglbdqfdbqfmob`fpslpjaofklwfofppfujoobsqjnfql/Vowjnlfufmwlpbq`kjul`vowvqbnvifqfpfmwqbgbbmvm`jlfnabqdlnfq`bgldqbmgfpfpwvgjlnfilqfpefaqfqlgjpf/]lwvqjpnl`/_gjdlslqwbgbfpsb`jlebnjojbbmwlmjlsfqnjwfdvbqgbqbodvmbpsqf`jlpbodvjfmpfmwjglujpjwbpw/Awvol`lml`fqpfdvmgl`lmpfileqbm`jbnjmvwlppfdvmgbwfmfnlpfef`wlpn/Mobdbpfpj/_mqfujpwbdqbmbgb`lnsqbqjmdqfpldbq`/Abb``j/_mf`vbglqrvjfmfpjm`ovplgfafq/Mnbwfqjbklnaqfpnvfpwqbslgq/Abnb/]bmb/Vowjnbfpwbnlplej`jbowbnajfmmjmd/Vmpbovglpslgfnlpnfilqbqslpjwjlmavpjmfppklnfsbdfpf`vqjwzobmdvbdfpwbmgbqg`bnsbjdmefbwvqfp`bwfdlqzf{wfqmbo`kjogqfmqfpfqufgqfpfbq`kf{`kbmdfebulqjwfwfnsobwfnjojwbqzjmgvpwqzpfquj`fpnbwfqjbosqlgv`wpy.jmgf{9`lnnfmwpplewtbqf`lnsofwf`bofmgbqsobwelqnbqwj`ofpqfrvjqfgnlufnfmwrvfpwjlmavjogjmdslojwj`pslppjaofqfojdjlmskzpj`boeffgab`hqfdjpwfqsj`wvqfpgjpbaofgsqlwl`lobvgjfm`fpfwwjmdpb`wjujwzfofnfmwpofbqmjmdbmzwkjmdbapwqb`wsqldqfpplufqujftnbdbyjmff`lmlnj`wqbjmjmdsqfppvqfubqjlvp#?pwqlmd=sqlsfqwzpklssjmdwldfwkfqbgubm`fgafkbujlqgltmolbgefbwvqfgellwaboopfof`wfgObmdvbdfgjpwbm`fqfnfnafqwqb`hjmdsbpptlqgnlgjejfgpwvgfmwpgjqf`wozejdkwjmdmlqwkfqmgbwbabpfefpwjuboaqfbhjmdol`bwjlmjmwfqmfwgqlsgltmsqb`wj`ffujgfm`fevm`wjlmnbqqjbdfqfpslmpfsqlaofnpmfdbwjufsqldqbnpbmbozpjpqfofbpfgabmmfq!=svq`kbpfsloj`jfpqfdjlmbo`qfbwjufbqdvnfmwallhnbqhqfefqqfq`kfnj`bogjujpjlm`booab`hpfsbqbwfsqlif`wp`lmeoj`wkbqgtbqfjmwfqfpwgfojufqznlvmwbjmlawbjmfg>#ebopf8elq+ubq#b``fswfg`bsb`jwz`lnsvwfqjgfmwjwzbjq`qbewfnsolzfgsqlslpfgglnfpwj`jm`ovgfpsqlujgfgklpsjwboufqwj`bo`loobspfbssqlb`ksbqwmfqpoldl!=?bgbvdkwfqbvwklq!#`vowvqboebnjojfp,jnbdfp,bppfnaozsltfqevowfb`kjmdejmjpkfggjpwqj`w`qjwj`bo`dj.ajm,svqslpfpqfrvjqfpfof`wjlmaf`lnjmdsqlujgfpb`bgfnj`f{fq`jpfb`wvbooznfgj`jmf`lmpwbmwb``jgfmwNbdbyjmfgl`vnfmwpwbqwjmdalwwln!=lapfqufg9#%rvlw8f{wfmgfgsqfujlvpPlewtbqf`vpwlnfqgf`jpjlmpwqfmdwkgfwbjofgpojdkwozsobmmjmdwf{wbqfb`vqqfm`zfufqzlmfpwqbjdkwwqbmpefqslpjwjufsqlgv`fgkfqjwbdfpkjssjmdbaplovwfqf`fjufgqfofubmwavwwlm!#ujlofm`fbmztkfqfafmfejwpobvm`kfgqf`fmwozboojbm`felooltfgnvowjsofavoofwjmjm`ovgfgl``vqqfgjmwfqmbo\'+wkjp*-qfsvaoj`=?wq=?wg`lmdqfppqf`lqgfgvowjnbwfplovwjlm?vo#jg>!gjp`lufqKlnf?,b=tfapjwfpmfwtlqhpbowklvdkfmwjqfoznfnlqjbonfppbdfp`lmwjmvfb`wjuf!=plnftkbwuj`wlqjbTfpwfqm##wjwof>!Ol`bwjlm`lmwqb`wujpjwlqpGltmolbgtjwklvw#qjdkw!=\tnfbpvqfptjgwk#>#ubqjbaofjmuloufgujqdjmjbmlqnboozkbssfmfgb``lvmwppwbmgjmdmbwjlmboQfdjpwfqsqfsbqfg`lmwqlopb``vqbwfajqwkgbzpwqbwfdzleej`jbodqbskj`p`qjnjmboslppjaoz`lmpvnfqSfqplmbopsfbhjmdubojgbwfb`kjfufg-isd!#,=nb`kjmfp?,k1=\t##hfztlqgpeqjfmgozaqlwkfqp`lnajmfglqjdjmbo`lnslpfgf{sf`wfgbgfrvbwfsbhjpwbmeloolt!#ubovbaof?,obafo=qfobwjufaqjmdjmdjm`qfbpfdlufqmlqsovdjmp,Ojpw#le#Kfbgfq!=!#mbnf>!#+%rvlw8dqbgvbwf?,kfbg=\t`lnnfq`fnbobzpjbgjqf`wlqnbjmwbjm8kfjdkw9p`kfgvof`kbmdjmdab`h#wl#`bwkloj`sbwwfqmp`lolq9# dqfbwfpwpvssojfpqfojbaof?,vo=\t\n\n?pfof`w#`jwjyfmp`olwkjmdtbw`kjmd?oj#jg>!psf`jej``bqqzjmdpfmwfm`f?`fmwfq=`lmwqbpwwkjmhjmd`bw`k+f*plvwkfqmNj`kbfo#nfq`kbmw`bqlvpfosbggjmd9jmwfqjlq-psojw+!ojybwjlmL`wlafq#*xqfwvqmjnsqlufg..%dw8\t\t`lufqbdf`kbjqnbm-smd!#,=pvaif`wpQj`kbqg#tkbwfufqsqlabaozqf`lufqzabpfabooivgdnfmw`lmmf`w--`pp!#,=#tfapjwfqfslqwfggfebvow!,=?,b=\tfof`wqj`p`lwobmg`qfbwjlmrvbmwjwz-#JPAM#3gjg#mlw#jmpwbm`f.pfbq`k.!#obmd>!psfbhfqp@lnsvwfq`lmwbjmpbq`kjufpnjmjpwfqqfb`wjlmgjp`lvmwJwbojbml`qjwfqjbpwqlmdoz9#$kwws9$p`qjsw$`lufqjmdleefqjmdbssfbqfgAqjwjpk#jgfmwjezEb`fallhmvnfqlvpufkj`ofp`lm`fqmpBnfqj`bmkbmgojmdgju#jg>!Tjoojbn#sqlujgfq\\`lmwfmwb``vqb`zpf`wjlm#bmgfqplmeof{jaof@bwfdlqzobtqfm`f?p`qjsw=obzlvw>!bssqlufg#nb{jnvnkfbgfq!=?,wbaof=Pfquj`fpkbnjowlm`vqqfmw#`bmbgjbm`kbmmfop,wkfnfp,,bqwj`oflswjlmboslqwvdboubovf>!!jmwfqubotjqfofppfmwjwofgbdfm`jfpPfbq`k!#nfbpvqfgwklvpbmgpsfmgjmd%kfoojs8mft#Gbwf!#pjyf>!sbdfMbnfnjggof!#!#,=?,b=kjggfm!=pfrvfm`fsfqplmbolufqeoltlsjmjlmpjoojmljpojmhp!=\t\n?wjwof=ufqpjlmppbwvqgbzwfqnjmbojwfnsqlsfmdjmffqpf`wjlmpgfpjdmfqsqlslpbo>!ebopf!Fpsb/]loqfofbpfppvanjw!#fq%rvlw8bggjwjlmpznswlnplqjfmwfgqfplvq`fqjdkw!=?sofbpvqfpwbwjlmpkjpwlqz-ofbujmd##alqgfq>`lmwfmwp`fmwfq!=-\t\tPlnf#gjqf`wfgpvjwbaofavodbqjb-pklt+*8gfpjdmfgDfmfqbo#`lm`fswpF{bnsofptjoojbnpLqjdjmbo!=?psbm=pfbq`k!=lsfqbwlqqfrvfpwpb#%rvlw8booltjmdGl`vnfmwqfujpjlm-#\t\tWkf#zlvqpfoe@lmwb`w#nj`kjdbmFmdojpk#`lovnajbsqjlqjwzsqjmwjmdgqjmhjmdeb`jojwzqfwvqmfg@lmwfmw#leej`fqpQvppjbm#dfmfqbwf.;;6:.2!jmgj`bwfebnjojbq#rvbojwznbqdjm93#`lmwfmwujftslqw`lmwb`wp.wjwof!=slqwbaof-ofmdwk#fojdjaofjmuloufpbwobmwj`lmolbg>!gfebvow-pvssojfgsbznfmwpdolppbqz\t\tBewfq#dvjgbm`f?,wg=?wgfm`lgjmdnjggof!=`bnf#wl#gjpsobzpp`lwwjpkilmbwkbmnbilqjwztjgdfwp-`ojmj`bowkbjobmgwfb`kfqp?kfbg=\t\nbeef`wfgpvsslqwpsljmwfq8wlPwqjmd?,pnboo=lhobklnbtjoo#af#jmufpwlq3!#bow>!klojgbzpQfplvq`foj`fmpfg#+tkj`k#-#Bewfq#`lmpjgfqujpjwjmdf{solqfqsqjnbqz#pfbq`k!#bmgqljg!rvj`hoz#nffwjmdpfpwjnbwf8qfwvqm#8`lolq9 #kfjdkw>bssqlubo/#%rvlw8#`kf`hfg-njm-ip!nbdmfwj`=?,b=?,kelqf`bpw-#Tkjof#wkvqpgbzgufqwjpf%fb`vwf8kbp@obppfubovbwflqgfqjmdf{jpwjmdsbwjfmwp#Lmojmf#`lolqbglLswjlmp!`bnsafoo?"..#fmg?,psbm=??aq#,=\t\\slsvspp`jfm`fp/%rvlw8#rvbojwz#Tjmgltp#bppjdmfgkfjdkw9#?a#`obppof%rvlw8#ubovf>!#@lnsbmzf{bnsofp?jeqbnf#afojfufpsqfpfmwpnbqpkboosbqw#le#sqlsfqoz*-\t\tWkf#wb{lmlnznv`k#le#?,psbm=\t!#gbwb.pqwvdv/Fpp`qlooWl#sqlif`w?kfbg=\tbwwlqmfzfnskbpjppslmplqpebm`zal{tlqog$p#tjogojef`kf`hfg>pfppjlmpsqldqbnns{8elmw.#Sqlif`wilvqmbopafojfufgub`bwjlmwklnsplmojdkwjmdbmg#wkf#psf`jbo#alqgfq>3`kf`hjmd?,walgz=?avwwlm#@lnsofwf`ofbqej{\t?kfbg=\tbqwj`of#?pf`wjlmejmgjmdpqlof#jm#slsvobq##L`wlafqtfapjwf#f{slpvqfvpfg#wl##`kbmdfplsfqbwfg`oj`hjmdfmwfqjmd`lnnbmgpjmelqnfg#mvnafqp##?,gju=`qfbwjmdlmPvanjwnbqzobmg`loofdfpbmbozwj`ojpwjmdp`lmwb`w-olddfgJmbgujplqzpjaojmdp`lmwfmw!p%rvlw8*p-#Wkjp#sb`hbdfp`kf`hal{pvddfpwpsqfdmbmwwlnlqqltpsb`jmd>j`lm-smdibsbmfpf`lgfabpfavwwlm!=dbnaojmdpv`k#bp#/#tkjof#?,psbm=#njpplvqjpslqwjmdwls92s{#-?,psbm=wfmpjlmptjgwk>!1obyzolbgmlufnafqvpfg#jm#kfjdkw>!`qjsw!=\t%maps8?,?wq=?wg#kfjdkw91,sqlgv`w`lvmwqz#jm`ovgf#ellwfq!#%ow8"..#wjwof!=?,irvfqz-?,elqn=\t+\vBl\bQ*+\vUmGx*kqubwphjjwbojbmlqln/Nm(ow/Pqh/Kf4K4]4C5dwbnaj/Emmlwj`jbpnfmpbifpsfqplmbpgfqf`klpmb`jlmbopfquj`jl`lmwb`wlvpvbqjlpsqldqbnbdlajfqmlfnsqfpbpbmvm`jlpubofm`jb`lolnajbgfpsv/Epgfslqwfpsqlzf`wlsqlgv`wls/Vaoj`lmlplwqlpkjpwlqjbsqfpfmwfnjoolmfpnfgjbmwfsqfdvmwbbmwfqjlqqf`vqplpsqlaofnbpbmwjbdlmvfpwqlplsjmj/_mjnsqjnjqnjfmwqbpbn/Eqj`bufmgfglqpl`jfgbgqfpsf`wlqfbojybqqfdjpwqlsbobaqbpjmwfq/Epfmwlm`fpfpsf`jbonjfnaqlpqfbojgbg`/_qglabybqbdlybs/Mdjmbppl`jbofpaolrvfbqdfpwj/_mborvjofqpjpwfnbp`jfm`jbp`lnsofwlufqpj/_m`lnsofwbfpwvgjlps/Vaoj`blaifwjulboj`bmwfavp`bglq`bmwjgbgfmwqbgbpb``jlmfpbq`kjulppvsfqjlqnbzlq/Abbofnbmjbevm`j/_m/Vowjnlpkb`jfmglbrvfoolpfgj`j/_mefqmbmglbnajfmwfeb`fallhmvfpwqbp`ojfmwfpsql`fplpabpwbmwfsqfpfmwbqfslqwbq`lmdqfplsvaoj`bq`lnfq`jl`lmwqbwli/_ufmfpgjpwqjwlw/E`mj`b`lmivmwlfmfqd/Abwqbabibqbpwvqjbpqf`jfmwfvwjojybqalofw/Ampboubglq`lqqf`wbwqbabilpsqjnfqlpmfdl`jlpojafqwbggfwboofpsbmwboobsq/_{jnlbonfq/Abbmjnbofprvj/Emfp`lqby/_mpf``j/_mavp`bmglls`jlmfpf{wfqjlq`lm`fswlwlgbu/Abdbofq/Abfp`qjajqnfgj`jmboj`fm`jb`lmpvowbbpsf`wlp`q/Awj`bg/_obqfpivpwj`jbgfafq/Mmsfq/Alglmf`fpjwbnbmwfmfqsfrvf/]lqf`jajgbwqjavmbowfmfqjef`bm`j/_m`bmbqjbpgfp`bqdbgjufqplpnboolq`bqfrvjfqfw/E`mj`lgfafq/Abujujfmgbejmbmybpbgfobmwfevm`jlmb`lmpfilpgje/A`jo`jvgbgfpbmwjdvbpbubmybgbw/Eqnjmlvmjgbgfpp/Mm`kfy`bnsb/]bplewlmj`qfujpwbp`lmwjfmfpf`wlqfpnlnfmwlpeb`vowbg`q/Egjwlgjufqpbppvsvfpwleb`wlqfppfdvmglpsfrvf/]b<_<R<X<\\<Y=m<W<T<Y=m=n=`<]=g<W<R<]=g=n=`=a=n<R<P<y=m<W<T=n<R<_<R<P<Y<Q=c<^=m<Y=i=a=n<R<U<X<\\<Z<Y<]=g<W<T<_<R<X=o<X<Y<Q=`=a=n<R=n<]=g<W<\\=m<Y<]=c<R<X<T<Q=m<Y<]<Y<Q<\\<X<R=m<\\<U=n=h<R=n<R<Q<Y<_<R=m<^<R<T=m<^<R<U<T<_=l=g=n<R<Z<Y<^=m<Y<P=m<^<R=b<W<T=d=`=a=n<T=i<S<R<V<\\<X<Q<Y<U<X<R<P<\\<P<T=l<\\<W<T<]<R=n<Y<P=o=i<R=n=c<X<^=o=i=m<Y=n<T<W=b<X<T<X<Y<W<R<P<T=l<Y=n<Y<]=c=m<^<R<Y<^<T<X<Y=k<Y<_<R=a=n<T<P=m=k<Y=n=n<Y<P=g=j<Y<Q=g=m=n<\\<W<^<Y<X=`=n<Y<P<Y<^<R<X=g=n<Y<]<Y<^=g=d<Y<Q<\\<P<T=n<T<S<\\=n<R<P=o<S=l<\\<^<W<T=j<\\<R<X<Q<\\<_<R<X=g<[<Q<\\=b<P<R<_=o<X=l=o<_<^=m<Y<U<T<X<Y=n<V<T<Q<R<R<X<Q<R<X<Y<W<\\<X<Y<W<Y=m=l<R<V<T=b<Q=c<^<Y=m=`<y=m=n=`=l<\\<[<\\<Q<\\=d<T4K5h5h5k4K5h4F5f4@5i5f4U4B4K4Y4E4K5h4\\5f4U5h5f5k4@4C5f4C4K5h4N5j4K5h4]4C4F4A5o5i4Y5m4A4E5o4K5j4F4K5h5h5f5f5o5d5j4X4D5o4E5m5f5k4K4D5j4K4F4A5d4K4M4O5o4G4]4B5h4K5h4K5h4A4D4C5h5f5h4C4]5d4_4K4Z4V4[4F5o5d5j5k5j4K5o4_4K4A4E5j4K4C5f4K5h4[4D4U5h5f5o4X5o4]4K5f5i5o5j5i5j5k4K4X4]5o4E4]4J5f4_5j4X5f4[5i4K4\\4K4K5h5m5j4X4D4K4D4F4U4D4]4]4A5i4E5o4K5m4E5f5n5d5h5i4]5o4^5o5h5i4E4O4A5i4C5n5h4D5f5f4U5j5f4Y5d4]4E4[4]5f5n4X4K4]5o4@5d4K5h4O4B4]5e5i4U5j4K4K4D4A4G4U4]5d4Z4D4X5o5h5i4_4@5h4D5j4K5j4B4K5h4C5o4F4K4D5o5h5f4E4D4C5d5j4O5f4Z4K5f5d4@4C5m4]5f5n5o4F4D4F4O5m4Z5h5i4[4D4B4K5o4G4]4D4K4]5o4K5m4Z5h4K4A5h5e5j5m4_5k4O5f4K5i4]4C5d4C4O5j5k4K4C5f5j4K4K5h4K5j5i4U4]4Z4F4U5h5i4C4K4B5h5i5i5o5j\0\0\v\n\t\b\r\f\f\r\b\t\n\v\0\v\v\v\v\0qfplvq`fp`lvmwqjfprvfpwjlmpfrvjsnfmw`lnnvmjwzbubjobaofkjdkojdkwGWG,{kwnonbqhfwjmdhmltofgdfplnfwkjmd`lmwbjmfqgjqf`wjlmpvap`qjafbgufqwjpf`kbqb`wfq!#ubovf>!?,pfof`w=Bvpwqbojb!#`obpp>!pjwvbwjlmbvwklqjwzelooltjmdsqjnbqjozlsfqbwjlm`kboofmdfgfufolsfgbmlmznlvpevm`wjlm#evm`wjlmp`lnsbmjfppwqv`wvqfbdqffnfmw!#wjwof>!slwfmwjbofgv`bwjlmbqdvnfmwppf`lmgbqz`lszqjdkwobmdvbdfpf{`ovpjuf`lmgjwjlm?,elqn=\tpwbwfnfmwbwwfmwjlmAjldqbskz~#fopf#x\tplovwjlmptkfm#wkf#Bmbozwj`pwfnsobwfpgbmdfqlvppbwfoojwfgl`vnfmwpsvaojpkfqjnslqwbmwsqlwlwzsfjmeovfm`f%qbrvl8?,feef`wjufdfmfqboozwqbmpelqnafbvwjevowqbmpslqwlqdbmjyfgsvaojpkfgsqlnjmfmwvmwjo#wkfwkvnambjoMbwjlmbo#-el`vp+*8lufq#wkf#njdqbwjlmbmmlvm`fgellwfq!=\tf{`fswjlmofpp#wkbmf{sfmpjufelqnbwjlmeqbnftlqhwfqqjwlqzmgj`bwjlm`vqqfmwoz`obppMbnf`qjwj`jpnwqbgjwjlmfopftkfqfBof{bmgfqbssljmwfgnbwfqjbopaqlbg`bpwnfmwjlmfgbeejojbwf?,lswjlm=wqfbwnfmwgjeefqfmw,gfebvow-Sqfpjgfmwlm`oj`h>!ajldqbskzlwkfqtjpfsfqnbmfmwEqbm/KbjpKlooztllgf{sbmpjlmpwbmgbqgp?,pwzof=\tqfgv`wjlmGf`fnafq#sqfefqqfg@bnaqjgdflsslmfmwpAvpjmfpp#`lmevpjlm=\t?wjwof=sqfpfmwfgf{sobjmfgglfp#mlw#tlqogtjgfjmwfqeb`fslpjwjlmpmftpsbsfq?,wbaof=\tnlvmwbjmpojhf#wkf#fppfmwjboejmbm`jbopfof`wjlmb`wjlm>!,babmglmfgFgv`bwjlmsbqpfJmw+pwbajojwzvmbaof#wl?,wjwof=\tqfobwjlmpMlwf#wkbwfeej`jfmwsfqelqnfgwtl#zfbqpPjm`f#wkfwkfqfelqftqbssfq!=bowfqmbwfjm`qfbpfgAbwwof#lesfq`fjufgwqzjmd#wlmf`fppbqzslqwqbzfgfof`wjlmpFojybafwk?,jeqbnf=gjp`lufqzjmpvqbm`fp-ofmdwk8ofdfmgbqzDfldqbskz`bmgjgbwf`lqslqbwfplnfwjnfppfquj`fp-jmkfqjwfg?,pwqlmd=@lnnvmjwzqfojdjlvpol`bwjlmp@lnnjwwffavjogjmdpwkf#tlqogml#olmdfqafdjmmjmdqfefqfm`f`bmmlw#afeqfrvfm`zwzsj`boozjmwl#wkf#qfobwjuf8qf`lqgjmdsqfpjgfmwjmjwjboozwf`kmjrvfwkf#lwkfqjw#`bm#aff{jpwfm`fvmgfqojmfwkjp#wjnfwfofsklmfjwfnp`lsfsqb`wj`fpbgubmwbdf*8qfwvqm#Elq#lwkfqsqlujgjmdgfnl`qb`zalwk#wkf#f{wfmpjufpveefqjmdpvsslqwfg`lnsvwfqp#evm`wjlmsqb`wj`bopbjg#wkbwjw#nbz#afFmdojpk?,eqln#wkf#p`kfgvofggltmolbgp?,obafo=\tpvpsf`wfgnbqdjm9#3psjqjwvbo?,kfbg=\t\tnj`qlplewdqbgvboozgjp`vppfgkf#af`bnff{f`vwjufirvfqz-ipklvpfklog`lmejqnfgsvq`kbpfgojwfqboozgfpwqlzfgvs#wl#wkfubqjbwjlmqfnbjmjmdjw#jp#mlw`fmwvqjfpIbsbmfpf#bnlmd#wkf`lnsofwfgbodlqjwknjmwfqfpwpqfafoojlmvmgfejmfgfm`lvqbdfqfpjybaofjmuloujmdpfmpjwjufvmjufqpbosqlujpjlm+bowklvdkefbwvqjmd`lmgv`wfg*/#tkj`k#`lmwjmvfg.kfbgfq!=Efaqvbqz#mvnfqlvp#lufqeolt9`lnslmfmweqbdnfmwpf{`foofmw`lopsbm>!wf`kmj`bomfbq#wkf#Bgubm`fg#plvq`f#lef{sqfppfgKlmd#Hlmd#Eb`fallhnvowjsof#nf`kbmjpnfofubwjlmleefmpjuf?,elqn=\t\npslmplqfggl`vnfmw-lq#%rvlw8wkfqf#bqfwklpf#tklnlufnfmwpsql`fppfpgjeej`vowpvanjwwfgqf`lnnfmg`lmujm`fgsqlnlwjmd!#tjgwk>!-qfsob`f+`obppj`bo`lbojwjlmkjp#ejqpwgf`jpjlmpbppjpwbmwjmgj`bwfgfulovwjlm.tqbssfq!fmlvdk#wlbolmd#wkfgfojufqfg..=\t?"..Bnfqj`bm#sqlwf`wfgMlufnafq#?,pwzof=?evqmjwvqfJmwfqmfw##lmaovq>!pvpsfmgfgqf`jsjfmwabpfg#lm#Nlqflufq/balojpkfg`loof`wfgtfqf#nbgffnlwjlmbofnfqdfm`zmbqqbwjufbgul`bwfps{8alqgfq`lnnjwwfggjq>!owq!fnsolzffpqfpfbq`k-#pfof`wfgpv``fpplq`vpwlnfqpgjpsobzfgPfswfnafqbgg@obpp+Eb`fallh#pvddfpwfgbmg#obwfqlsfqbwjmdfobalqbwfPlnfwjnfpJmpwjwvwf`fqwbjmozjmpwboofgelooltfqpIfqvpbofnwkfz#kbuf`lnsvwjmddfmfqbwfgsqlujm`fpdvbqbmwffbqajwqbqzqf`ldmjyftbmwfg#wls{8tjgwk9wkflqz#leafkbujlvqTkjof#wkffpwjnbwfgafdbm#wl#jw#af`bnfnbdmjwvgfnvpw#kbufnlqf#wkbmGjqf`wlqzf{wfmpjlmpf`qfwbqzmbwvqboozl``vqqjmdubqjbaofpdjufm#wkfsobwelqn-?,obafo=?ebjofg#wl`lnslvmgphjmgp#le#pl`jfwjfpbolmdpjgf#..%dw8\t\tplvwktfpwwkf#qjdkwqbgjbwjlmnbz#kbuf#vmfp`bsf+pslhfm#jm!#kqfe>!,sqldqbnnflmoz#wkf#`lnf#eqlngjqf`wlqzavqjfg#jmb#pjnjobqwkfz#tfqf?,elmw=?,Mlqtfdjbmpsf`jejfgsqlgv`jmdsbppfmdfq+mft#Gbwfwfnslqbqzej`wjlmboBewfq#wkffrvbwjlmpgltmolbg-qfdvobqozgfufolsfqbaluf#wkfojmhfg#wlskfmlnfmbsfqjlg#lewllowjs!=pvapwbm`fbvwlnbwj`bpsf`w#leBnlmd#wkf`lmmf`wfgfpwjnbwfpBjq#Elq`fpzpwfn#lelaif`wjufjnnfgjbwfnbhjmd#jwsbjmwjmdp`lmrvfqfgbqf#pwjoosql`fgvqfdqltwk#lekfbgfg#azFvqlsfbm#gjujpjlmpnlof`vofpeqbm`kjpfjmwfmwjlmbwwqb`wfg`kjogkllgbopl#vpfggfgj`bwfgpjmdbslqfgfdqff#leebwkfq#le`lmeoj`wp?,b=?,s=\t`bnf#eqlntfqf#vpfgmlwf#wkbwqf`fjujmdF{f`vwjuffufm#nlqfb``fpp#wl`lnnbmgfqSlojwj`bonvpj`jbmpgfoj`jlvpsqjplmfqpbgufmw#leVWE.;!#,=?"X@GBWBX!=@lmwb`wPlvwkfqm#ad`lolq>!pfqjfp#le-#Jw#tbp#jm#Fvqlsfsfqnjwwfgubojgbwf-bssfbqjmdleej`jboppfqjlvpoz.obmdvbdfjmjwjbwfgf{wfmgjmdolmd.wfqnjmeobwjlmpv`k#wkbwdfw@llhjfnbqhfg#az?,avwwlm=jnsofnfmwavw#jw#jpjm`qfbpfpgltm#wkf#qfrvjqjmdgfsfmgfmw..=\t?"..#jmwfqujftTjwk#wkf#`lsjfp#le`lmpfmpvptbp#avjowUfmfyvfob+elqnfqozwkf#pwbwfsfqplmmfopwqbwfdj`ebulvq#lejmufmwjlmTjhjsfgjb`lmwjmfmwujqwvbooztkj`k#tbpsqjm`jsof@lnsofwf#jgfmwj`bopklt#wkbwsqjnjwjufbtbz#eqlnnlof`vobqsqf`jpfozgjpploufgVmgfq#wkfufqpjlm>!=%maps8?,Jw#jp#wkf#Wkjp#jp#tjoo#kbuflqdbmjpnpplnf#wjnfEqjfgqj`ktbp#ejqpwwkf#lmoz#eb`w#wkbwelqn#jg>!sqf`fgjmdWf`kmj`boskzpj`jpwl``vqp#jmmbujdbwlqpf`wjlm!=psbm#jg>!plvdkw#wlafolt#wkfpvqujujmd~?,pwzof=kjp#gfbwkbp#jm#wkf`bvpfg#azsbqwjboozf{jpwjmd#vpjmd#wkftbp#djufmb#ojpw#leofufop#lemlwjlm#leLeej`jbo#gjpnjppfgp`jfmwjpwqfpfnaofpgvsoj`bwff{solpjufqf`lufqfgboo#lwkfqdboofqjfpxsbggjmd9sflsof#leqfdjlm#lebggqfppfpbppl`jbwfjnd#bow>!jm#nlgfqmpklvog#afnfwklg#leqfslqwjmdwjnfpwbnsmffgfg#wlwkf#Dqfbwqfdbqgjmdpffnfg#wlujftfg#bpjnsb`w#lmjgfb#wkbwwkf#Tlqogkfjdkw#lef{sbmgjmdWkfpf#bqf`vqqfmw!=`bqfevooznbjmwbjmp`kbqdf#le@obppj`bobggqfppfgsqfgj`wfgltmfqpkjs?gju#jg>!qjdkw!=\tqfpjgfm`fofbuf#wkf`lmwfmw!=bqf#lewfm##~*+*8\tsqlabaoz#Sqlefpplq.avwwlm!#qfpslmgfgpbzp#wkbwkbg#wl#afsob`fg#jmKvmdbqjbmpwbwvp#lepfqufp#bpVmjufqpbof{f`vwjlmbddqfdbwfelq#tkj`kjmef`wjlmbdqffg#wlkltfufq/#slsvobq!=sob`fg#lm`lmpwqv`wfof`wlqbopznalo#lejm`ovgjmdqfwvqm#wlbq`kjwf`w@kqjpwjbmsqfujlvp#ojujmd#jmfbpjfq#wlsqlefpplq\t%ow8"..#feef`w#lebmbozwj`ptbp#wbhfmtkfqf#wkfwllh#lufqafojfe#jmBeqjhbbmpbp#ebq#bpsqfufmwfgtlqh#tjwkb#psf`jbo?ejfogpfw@kqjpwnbpQfwqjfufg\t\tJm#wkf#ab`h#jmwlmlqwkfbpwnbdbyjmfp=?pwqlmd=`lnnjwwffdlufqmjmddqlvsp#lepwlqfg#jmfpwbaojpkb#dfmfqbojwp#ejqpwwkfjq#ltmslsvobwfgbm#laif`w@bqjaafbmboolt#wkfgjpwqj`wptjp`lmpjmol`bwjlm-8#tjgwk9#jmkbajwfgPl`jbojpwIbmvbqz#2?,ellwfq=pjnjobqoz`klj`f#lewkf#pbnf#psf`jej`#avpjmfpp#Wkf#ejqpw-ofmdwk8#gfpjqf#wlgfbo#tjwkpjm`f#wkfvpfqBdfmw`lm`fjufgjmgf{-sksbp#%rvlw8fmdbdf#jmqf`fmwoz/eft#zfbqptfqf#bopl\t?kfbg=\t?fgjwfg#azbqf#hmltm`jwjfp#jmb``fpphfz`lmgfnmfgbopl#kbufpfquj`fp/ebnjoz#leP`kllo#le`lmufqwfgmbwvqf#le#obmdvbdfnjmjpwfqp?,laif`w=wkfqf#jp#b#slsvobqpfrvfm`fpbgul`bwfgWkfz#tfqfbmz#lwkfqol`bwjlm>fmwfq#wkfnv`k#nlqfqfeof`wfgtbp#mbnfglqjdjmbo#b#wzsj`botkfm#wkfzfmdjmffqp`lvog#mlwqfpjgfmwptfgmfpgbzwkf#wkjqg#sqlgv`wpIbmvbqz#1tkbw#wkfzb#`fqwbjmqfb`wjlmpsql`fpplqbewfq#kjpwkf#obpw#`lmwbjmfg!=?,gju=\t?,b=?,wg=gfsfmg#lmpfbq`k!=\tsjf`fp#le`lnsfwjmdQfefqfm`fwfmmfppfftkj`k#kbp#ufqpjlm>?,psbm=#??,kfbgfq=djufp#wkfkjpwlqjbmubovf>!!=sbggjmd93ujft#wkbwwldfwkfq/wkf#nlpw#tbp#elvmgpvapfw#lebwwb`h#lm`kjogqfm/sljmwp#lesfqplmbo#slpjwjlm9boofdfgoz@ofufobmgtbp#obwfqbmg#bewfqbqf#djufmtbp#pwjoop`qloojmdgfpjdm#lenbhfp#wkfnv`k#ofppBnfqj`bmp-\t\tBewfq#/#avw#wkfNvpfvn#leolvjpjbmb+eqln#wkfnjmmfplwbsbqwj`ofpb#sql`fppGlnjmj`bmulovnf#leqfwvqmjmdgfefmpjuf33s{qjdknbgf#eqlnnlvpflufq!#pwzof>!pwbwfp#le+tkj`k#jp`lmwjmvfpEqbm`jp`lavjogjmd#tjwklvw#btjwk#plnftkl#tlvogb#elqn#leb#sbqw#leafelqf#jwhmltm#bp##Pfquj`fpol`bwjlm#bmg#lewfmnfbpvqjmdbmg#jw#jpsbsfqab`hubovfp#le\t?wjwof=>#tjmglt-gfwfqnjmffq%rvlw8#sobzfg#azbmg#fbqoz?,`fmwfq=eqln#wkjpwkf#wkqffsltfq#bmgle#%rvlw8jmmfqKWNO?b#kqfe>!z9jmojmf8@kvq`k#lewkf#fufmwufqz#kjdkleej`jbo#.kfjdkw9#`lmwfmw>!,`dj.ajm,wl#`qfbwfbeqjhbbmpfpsfqbmwleqbm/Kbjpobwujf)Mvojfwvuj)_(`f)Mwjmb(af)Mwjmb\fUh\fT{\fTN\n{I\np@Fr\vBl\bQ\tA{\vUmGx\tA{ypYA\0zX\bTV\bWl\bUdBM\vB{\npV\v@xB\\\np@DbGz\tal\npa\tfM\tuD\bV~mx\vQ}\ndS\tp\\\bVK\bS]\bU|oD\tkV\ved\vHR\nb~M`\nJpoD|Q\nLPSw\bTl\nAI\nxC\bWt\tBqF`Cm\vLm\tKx\t}t\bPv\ny\\\naB\tV\nZdXUli\tfr\ti@\tBHBDBV\t`V\n[]\tp_\tTn\n~A\nxR\tuD\t`{\bV@\tTn\tHK\tAJ\vxsZf\nqIZf\vBM\v|j\t}t\bSM\nmC\vQ}pfquj`jlpbqw/A`volbqdfmwjmbabq`folmb`vborvjfqsvaoj`bglsqlgv`wlpslo/Awj`bqfpsvfpwbtjhjsfgjbpjdvjfmwfa/Vprvfgb`lnvmjgbgpfdvqjgbgsqjm`jsbosqfdvmwbp`lmwfmjglqfpslmgfqufmfyvfobsqlaofnbpgj`jfnaqfqfob`j/_mmlujfnaqfpjnjobqfpsqlzf`wlpsqldqbnbpjmpwjwvwlb`wjujgbgfm`vfmwqbf`lmln/Abjn/Mdfmfp`lmwb`wbqgfp`bqdbqmf`fpbqjlbwfm`j/_mwfo/Eelml`lnjpj/_m`bm`jlmfp`bsb`jgbgfm`lmwqbqbm/Mojpjpebulqjwlpw/Eqnjmlpsqlujm`jbfwjrvfwbpfofnfmwlpevm`jlmfpqfpvowbgl`bq/M`wfqsqlsjfgbgsqjm`jsjlmf`fpjgbgnvmj`jsbo`qfb`j/_mgfp`bqdbpsqfpfm`jb`lnfq`jbolsjmjlmfpfifq`j`jlfgjwlqjbopbobnbm`bdlmy/Mofygl`vnfmwlsfo/A`vobqf`jfmwfpdfmfqbofpwbqqbdlmbsq/M`wj`bmlufgbgfpsqlsvfpwbsb`jfmwfpw/E`mj`bplaifwjulp`lmwb`wlp\fHB\fIk\fHn\fH^\fHS\fHc\fHU\fId\fHn\fH{\fHC\fHR\fHT\fHR\fHI\fHc\fHY\fHn\fH\\\fHU\fIk\fHy\fIg\fHd\fHy\fIm\fHw\fH\\\fHU\fHR\fH@\fHR\fHJ\fHy\fHU\fHR\fHT\fHA\fIl\fHU\fIm\fHc\fH\\\fHU\fIl\fHB\fId\fHn\fHJ\fHS\fHD\fH@\fHR\fHHgjsolgl`p\fHT\fHB\fHC\fH\\\fIn\fHF\fHD\fHR\fHB\fHF\fHH\fHR\fHG\fHS\fH\\\fHx\fHT\fHH\fHH\fH\\\fHU\fH^\fIg\fH{\fHU\fIm\fHj\fH@\fHR\fH\\\fHJ\fIk\fHZ\fHU\fIm\fHd\fHz\fIk\fH^\fHC\fHJ\fHS\fHy\fHR\fHB\fHY\fIk\fH@\fHH\fIl\fHD\fH@\fIl\fHv\fHB\fI`\fHH\fHT\fHR\fH^\fH^\fIk\fHz\fHp\fIe\fH@\fHB\fHJ\fHJ\fHH\fHI\fHR\fHD\fHU\fIl\fHZ\fHU\fH\\\fHi\fH^\fH{\fHy\fHA\fIl\fHD\fH{\fH\\\fHF\fHR\fHT\fH\\\fHR\fHH\fHy\fHS\fHc\fHe\fHT\fIk\fH{\fHC\fIl\fHU\fIn\fHm\fHj\fH{\fIk\fHs\fIl\fHB\fHz\fIg\fHp\fHy\fHR\fH\\\fHi\fHA\fIl\fH{\fHC\fIk\fHH\fIm\fHB\fHY\fIg\fHs\fHJ\fIk\fHn\fHi\fH{\fH\\\fH|\fHT\fIk\fHB\fIk\fH^\fH^\fH{\fHR\fHU\fHR\fH^\fHf\fHF\fH\\\fHv\fHR\fH\\\fH|\fHT\fHR\fHJ\fIk\fH\\\fHp\fHS\fHT\fHJ\fHS\fH^\fH@\fHn\fHJ\fH@\fHD\fHR\fHU\fIn\fHn\fH^\fHR\fHz\fHp\fIl\fHH\fH@\fHs\fHD\fHB\fHS\fH^\fHk\fHT\fIk\fHj\fHD\fIk\fHD\fHC\fHR\fHy\fIm\fH^\fH^\fIe\fH{\fHA\fHR\fH{\fH\\\fIk\fH^\fHp\fH{\fHU\fH\\\fHR\fHB\fH^\fH{\fIk\fHF\fIk\fHp\fHU\fHR\fHI\fHk\fHT\fIl\fHT\fHU\fIl\fHy\fH^\fHR\fHL\fIl\fHy\fHU\fHR\fHm\fHJ\fIn\fH\\\fHH\fHU\fHH\fHT\fHR\fHH\fHC\fHR\fHJ\fHj\fHC\fHR\fHF\fHR\fHy\fHy\fI`\fHD\fHZ\fHR\fHB\fHJ\fIk\fHz\fHC\fHU\fIl\fH\\\fHR\fHC\fHz\fIm\fHJ\fH^\fH{\fIl`bwfdlqjfpf{sfqjfm`f?,wjwof=\t@lszqjdkw#ibubp`qjsw`lmgjwjlmpfufqzwkjmd?s#`obpp>!wf`kmloldzab`hdqlvmg?b#`obpp>!nbmbdfnfmw%`lsz8#132ibubP`qjsw`kbqb`wfqpaqfbg`qvnawkfnpfoufpklqjylmwbodlufqmnfmw@bojelqmjbb`wjujwjfpgjp`lufqfgMbujdbwjlmwqbmpjwjlm`lmmf`wjlmmbujdbwjlmbssfbqbm`f?,wjwof=?n`kf`hal{!#wf`kmjrvfpsqlwf`wjlmbssbqfmwozbp#tfoo#bpvmw$/#$VB.qfplovwjlmlsfqbwjlmpwfofujpjlmwqbmpobwfgTbpkjmdwlmmbujdbwlq-#>#tjmglt-jnsqfppjlm%ow8aq%dw8ojwfqbwvqfslsvobwjlmad`lolq>! fpsf`jbooz#`lmwfmw>!sqlgv`wjlmmftpofwwfqsqlsfqwjfpgfejmjwjlmofbgfqpkjsWf`kmloldzSbqojbnfmw`lnsbqjplmvo#`obpp>!-jmgf{Le+!`lm`ovpjlmgjp`vppjlm`lnslmfmwpajloldj`boQfulovwjlm\\`lmwbjmfqvmgfqpwllgmlp`qjsw=?sfqnjppjlmfb`k#lwkfqbwnlpskfqf#lmel`vp>!?elqn#jg>!sql`fppjmdwkjp-ubovfdfmfqbwjlm@lmefqfm`fpvapfrvfmwtfoo.hmltmubqjbwjlmpqfsvwbwjlmskfmlnfmlmgjp`jsojmfoldl-smd!#+gl`vnfmw/alvmgbqjfpf{sqfppjlmpfwwofnfmwAb`hdqlvmglvw#le#wkffmwfqsqjpf+!kwwsp9!#vmfp`bsf+!sbpptlqg!#gfnl`qbwj`?b#kqfe>!,tqbssfq!=\tnfnafqpkjsojmdvjpwj`s{8sbggjmdskjolplskzbppjpwbm`fvmjufqpjwzeb`jojwjfpqf`ldmjyfgsqfefqfm`fje#+wzsflenbjmwbjmfgul`bavobqzkzslwkfpjp-pvanjw+*8%bns8maps8bmmlwbwjlmafkjmg#wkfElvmgbwjlmsvaojpkfq!bppvnswjlmjmwqlgv`fg`lqqvswjlmp`jfmwjpwpf{soj`jwozjmpwfbg#legjnfmpjlmp#lm@oj`h>!`lmpjgfqfggfsbqwnfmwl``vsbwjlmpllm#bewfqjmufpwnfmwsqlmlvm`fgjgfmwjejfgf{sfqjnfmwNbmbdfnfmwdfldqbskj`!#kfjdkw>!ojmh#qfo>!-qfsob`f+,gfsqfppjlm`lmefqfm`fsvmjpknfmwfojnjmbwfgqfpjpwbm`fbgbswbwjlmlsslpjwjlmtfoo#hmltmpvssofnfmwgfwfqnjmfgk2#`obpp>!3s{8nbqdjmnf`kbmj`bopwbwjpwj`p`fofaqbwfgDlufqmnfmw\t\tGvqjmd#wgfufolsfqpbqwjej`jbofrvjubofmwlqjdjmbwfg@lnnjppjlmbwwb`knfmw?psbm#jg>!wkfqf#tfqfMfgfqobmgpafzlmg#wkfqfdjpwfqfgilvqmbojpweqfrvfmwozboo#le#wkfobmd>!fm!#?,pwzof=\tbaplovwf8#pvsslqwjmdf{wqfnfoz#nbjmpwqfbn?,pwqlmd=#slsvobqjwzfnsolznfmw?,wbaof=\t#`lopsbm>!?,elqn=\t##`lmufqpjlmbalvw#wkf#?,s=?,gju=jmwfdqbwfg!#obmd>!fmSlqwvdvfpfpvapwjwvwfjmgjujgvbojnslppjaofnvowjnfgjbbonlpw#boos{#plojg# bsbqw#eqlnpvaif`w#wljm#Fmdojpk`qjwj`jyfgf{`fsw#elqdvjgfojmfplqjdjmboozqfnbqhbaofwkf#pf`lmgk1#`obpp>!?b#wjwof>!+jm`ovgjmdsbqbnfwfqpsqlkjajwfg>#!kwws9,,gj`wjlmbqzsfq`fswjlmqfulovwjlmelvmgbwjlms{8kfjdkw9pv``fppevopvsslqwfqpnjoofmmjvnkjp#ebwkfqwkf#%rvlw8ml.qfsfbw8`lnnfq`jbojmgvpwqjbofm`lvqbdfgbnlvmw#le#vmleej`jbofeej`jfm`zQfefqfm`fp`llqgjmbwfgjp`objnfqf{sfgjwjlmgfufolsjmd`bo`vobwfgpjnsojejfgofdjwjnbwfpvapwqjmd+3!#`obpp>!`lnsofwfozjoovpwqbwfejuf#zfbqpjmpwqvnfmwSvaojpkjmd2!#`obpp>!spz`kloldz`lmejgfm`fmvnafq#le#bapfm`f#leel`vpfg#lmiljmfg#wkfpwqv`wvqfpsqfujlvpoz=?,jeqbnf=lm`f#bdbjmavw#qbwkfqjnnjdqbmwple#`lvqpf/b#dqlvs#leOjwfqbwvqfVmojhf#wkf?,b=%maps8\tevm`wjlm#jw#tbp#wkf@lmufmwjlmbvwlnlajofSqlwfpwbmwbddqfppjufbewfq#wkf#Pjnjobqoz/!#,=?,gju=`loof`wjlm\tevm`wjlmujpjajojwzwkf#vpf#leulovmwffqpbwwqb`wjlmvmgfq#wkf#wkqfbwfmfg)?"X@GBWBXjnslqwbm`fjm#dfmfqbowkf#obwwfq?,elqn=\t?,-jmgf{Le+$j#>#38#j#?gjeefqfm`fgfulwfg#wlwqbgjwjlmppfbq`k#elqvowjnbwfozwlvqmbnfmwbwwqjavwfppl.`boofg#~\t?,pwzof=fubovbwjlmfnskbpjyfgb``fppjaof?,pf`wjlm=pv``fppjlmbolmd#tjwkNfbmtkjof/jmgvpwqjfp?,b=?aq#,=kbp#af`lnfbpsf`wp#leWfofujpjlmpveej`jfmwabphfwabooalwk#pjgfp`lmwjmvjmdbm#bqwj`of?jnd#bow>!bgufmwvqfpkjp#nlwkfqnbm`kfpwfqsqjm`jsofpsbqwj`vobq`lnnfmwbqzfeef`wp#legf`jgfg#wl!=?pwqlmd=svaojpkfqpIlvqmbo#legjeej`vowzeb`jojwbwfb``fswbaofpwzof-`pp!\nevm`wjlm#jmmlubwjlm=@lszqjdkwpjwvbwjlmptlvog#kbufavpjmfppfpGj`wjlmbqzpwbwfnfmwplewfm#vpfgsfqpjpwfmwjm#Ibmvbqz`lnsqjpjmd?,wjwof=\t\ngjsolnbwj``lmwbjmjmdsfqelqnjmdf{wfmpjlmpnbz#mlw#af`lm`fsw#le#lm`oj`h>!Jw#jp#boplejmbm`jbo#nbhjmd#wkfOv{fnalvqdbggjwjlmbobqf#`boofgfmdbdfg#jm!p`qjsw!*8avw#jw#tbpfof`wqlmj`lmpvanjw>!\t?"..#Fmg#fof`wqj`boleej`jboozpvddfpwjlmwls#le#wkfvmojhf#wkfBvpwqbojbmLqjdjmboozqfefqfm`fp\t?,kfbg=\tqf`ldmjpfgjmjwjbojyfojnjwfg#wlBof{bmgqjbqfwjqfnfmwBgufmwvqfpelvq#zfbqp\t\t%ow8"..#jm`qfbpjmdgf`lqbwjlmk0#`obpp>!lqjdjmp#lelaojdbwjlmqfdvobwjlm`obppjejfg+evm`wjlm+bgubmwbdfpafjmd#wkf#kjpwlqjbmp?abpf#kqfeqfsfbwfgoztjoojmd#wl`lnsbqbaofgfpjdmbwfgmlnjmbwjlmevm`wjlmbojmpjgf#wkfqfufobwjlmfmg#le#wkfp#elq#wkf#bvwklqjyfgqfevpfg#wlwbhf#sob`fbvwlmlnlvp`lnsqlnjpfslojwj`bo#qfpwbvqbmwwtl#le#wkfEfaqvbqz#1rvbojwz#leptelaif`w-vmgfqpwbmgmfbqoz#bootqjwwfm#azjmwfqujftp!#tjgwk>!2tjwkgqbtboeolbw9ofewjp#vpvbooz`bmgjgbwfpmftpsbsfqpnzpwfqjlvpGfsbqwnfmwafpw#hmltmsbqojbnfmwpvssqfppfg`lmufmjfmwqfnfnafqfggjeefqfmw#pzpwfnbwj`kbp#ofg#wlsqlsbdbmgb`lmwqloofgjmeovfm`fp`fqfnlmjbosql`objnfgSqlwf`wjlmoj#`obpp>!P`jfmwjej``obpp>!ml.wqbgfnbqhpnlqf#wkbm#tjgfpsqfbgOjafqbwjlmwllh#sob`fgbz#le#wkfbp#olmd#bpjnsqjplmfgBggjwjlmbo\t?kfbg=\t?nObalqbwlqzMlufnafq#1f{`fswjlmpJmgvpwqjboubqjfwz#leeolbw9#ofeGvqjmd#wkfbppfppnfmwkbuf#affm#gfbop#tjwkPwbwjpwj`pl``vqqfm`f,vo=?,gju=`ofbqej{!=wkf#svaoj`nbmz#zfbqptkj`k#tfqflufq#wjnf/pzmlmznlvp`lmwfmw!=\tsqfpvnbaozkjp#ebnjozvpfqBdfmw-vmf{sf`wfgjm`ovgjmd#`kboofmdfgb#njmlqjwzvmgfejmfg!afolmdp#wlwbhfm#eqlnjm#L`wlafqslpjwjlm9#pbjg#wl#afqfojdjlvp#Efgfqbwjlm#qltpsbm>!lmoz#b#eftnfbmw#wkbwofg#wl#wkf..=\t?gju#?ejfogpfw=Bq`kajpkls#`obpp>!mlafjmd#vpfgbssqlb`kfpsqjujofdfpmlp`qjsw=\tqfpvowp#jmnbz#af#wkfFbpwfq#fddnf`kbmjpnpqfbplmbaofSlsvobwjlm@loof`wjlmpfof`wfg!=mlp`qjsw=,jmgf{-sksbqqjubo#le.ippgh$**8nbmbdfg#wljm`lnsofwf`bpvbowjfp`lnsofwjlm@kqjpwjbmpPfswfnafq#bqjwknfwj`sql`fgvqfpnjdkw#kbufSqlgv`wjlmjw#bssfbqpSkjolplskzeqjfmgpkjsofbgjmd#wldjujmd#wkfwltbqg#wkfdvbqbmwffggl`vnfmwfg`lolq9 333ujgfl#dbnf`lnnjppjlmqfeof`wjmd`kbmdf#wkfbppl`jbwfgpbmp.pfqjelmhfzsqfpp8#sbggjmd9Kf#tbp#wkfvmgfqozjmdwzsj`booz#/#bmg#wkf#pq`Fofnfmwpv``fppjufpjm`f#wkf#pklvog#af#mfwtlqhjmdb``lvmwjmdvpf#le#wkfoltfq#wkbmpkltp#wkbw?,psbm=\t\n\n`lnsobjmwp`lmwjmvlvprvbmwjwjfpbpwqlmlnfqkf#gjg#mlwgvf#wl#jwpbssojfg#wlbm#bufqbdffeelqwp#wlwkf#evwvqfbwwfnsw#wlWkfqfelqf/`bsbajojwzQfsvaoj`bmtbp#elqnfgFof`wqlmj`hjolnfwfqp`kboofmdfpsvaojpkjmdwkf#elqnfqjmgjdfmlvpgjqf`wjlmppvapjgjbqz`lmpsjqb`zgfwbjop#lebmg#jm#wkfbeelqgbaofpvapwbm`fpqfbplm#elq`lmufmwjlmjwfnwzsf>!baplovwfozpvsslpfgozqfnbjmfg#bbwwqb`wjufwqbufoojmdpfsbqbwfozel`vpfp#lmfofnfmwbqzbssoj`baofelvmg#wkbwpwzofpkffwnbmvp`qjswpwbmgp#elq#ml.qfsfbw+plnfwjnfp@lnnfq`jbojm#Bnfqj`bvmgfqwbhfmrvbqwfq#lebm#f{bnsofsfqplmboozjmgf{-sks<?,avwwlm=\tsfq`fmwbdfafpw.hmltm`qfbwjmd#b!#gjq>!owqOjfvwfmbmw\t?gju#jg>!wkfz#tlvogbajojwz#lenbgf#vs#lemlwfg#wkbw`ofbq#wkbwbqdvf#wkbwwl#bmlwkfq`kjogqfm$psvqslpf#leelqnvobwfgabpfg#vslmwkf#qfdjlmpvaif`w#lesbppfmdfqpslppfppjlm-\t\tJm#wkf#Afelqf#wkfbewfqtbqgp`vqqfmwoz#b`qlpp#wkfp`jfmwjej``lnnvmjwz-`bsjwbojpnjm#Dfqnbmzqjdkw.tjmdwkf#pzpwfnPl`jfwz#leslojwj`jbmgjqf`wjlm9tfmw#lm#wlqfnlubo#le#Mft#Zlqh#bsbqwnfmwpjmgj`bwjlmgvqjmd#wkfvmofpp#wkfkjpwlqj`bokbg#affm#bgfejmjwjufjmdqfgjfmwbwwfmgbm`f@fmwfq#elqsqlnjmfm`fqfbgzPwbwfpwqbwfdjfpavw#jm#wkfbp#sbqw#le`lmpwjwvwf`objn#wkbwobalqbwlqz`lnsbwjaofebjovqf#le/#pv`k#bp#afdbm#tjwkvpjmd#wkf#wl#sqlujgfefbwvqf#leeqln#tkj`k,!#`obpp>!dfloldj`bopfufqbo#legfojafqbwfjnslqwbmw#klogp#wkbwjmd%rvlw8#ubojdm>wlswkf#Dfqnbmlvwpjgf#lemfdlwjbwfgkjp#`bqffqpfsbqbwjlmjg>!pfbq`ktbp#`boofgwkf#elvqwkqf`qfbwjlmlwkfq#wkbmsqfufmwjlmtkjof#wkf#fgv`bwjlm/`lmmf`wjmdb``vqbwfoztfqf#avjowtbp#hjoofgbdqffnfmwpnv`k#nlqf#Gvf#wl#wkftjgwk9#233plnf#lwkfqHjmdgln#lewkf#fmwjqfebnlvp#elqwl#`lmmf`wlaif`wjufpwkf#Eqfm`ksflsof#bmgefbwvqfg!=jp#pbjg#wlpwqv`wvqboqfefqfmgvnnlpw#lewfmb#pfsbqbwf.=\t?gju#jg#Leej`jbo#tlqogtjgf-bqjb.obafowkf#sobmfwbmg#jw#tbpg!#ubovf>!ollhjmd#bwafmfej`jbobqf#jm#wkfnlmjwlqjmdqfslqwfgozwkf#nlgfqmtlqhjmd#lmbooltfg#wltkfqf#wkf#jmmlubwjuf?,b=?,gju=plvmgwqb`hpfbq`kElqnwfmg#wl#afjmsvw#jg>!lsfmjmd#leqfpwqj`wfgbglswfg#azbggqfppjmdwkfloldjbmnfwklgp#leubqjbmw#le@kqjpwjbm#ufqz#obqdfbvwlnlwjufaz#ebq#wkfqbmdf#eqlnsvqpvjw#leeloolt#wkfaqlvdkw#wljm#Fmdobmgbdqff#wkbwb``vpfg#le`lnfp#eqlnsqfufmwjmdgju#pwzof>kjp#lq#kfqwqfnfmglvpeqffgln#le`lm`fqmjmd3#2fn#2fn8Abphfwaboo,pwzof-`ppbm#fbqojfqfufm#bewfq,!#wjwof>!-`ln,jmgf{wbhjmd#wkfsjwwpavqdk`lmwfmw!=?p`qjsw=+ewvqmfg#lvwkbujmd#wkf?,psbm=\t#l``bpjlmboaf`bvpf#jwpwbqwfg#wlskzpj`booz=?,gju=\t##`qfbwfg#az@vqqfmwoz/#ad`lolq>!wbajmgf{>!gjpbpwqlvpBmbozwj`p#bopl#kbp#b=?gju#jg>!?,pwzof=\t?`boofg#elqpjmdfq#bmg-pq`#>#!,,ujlobwjlmpwkjp#sljmw`lmpwbmwozjp#ol`bwfgqf`lqgjmdpg#eqln#wkfmfgfqobmgpslqwvdv/Fp;N;};D;u;F5m4K4]4_7`gfpbqqlool`lnfmwbqjlfgv`b`j/_mpfswjfnaqfqfdjpwqbglgjqf``j/_mvaj`b`j/_msvaoj`jgbgqfpsvfpwbpqfpvowbglpjnslqwbmwfqfpfqubglpbqw/A`volpgjefqfmwfppjdvjfmwfpqfs/Vaoj`bpjwvb`j/_mnjmjpwfqjlsqjub`jgbggjqf`wlqjlelqnb`j/_mslaob`j/_msqfpjgfmwf`lmw','fmjglpb``fplqjlpwf`kmlqbwjsfqplmbofp`bwfdlq/Abfpsf`jbofpgjpslmjaofb`wvbojgbgqfefqfm`jbuboobglojgajaojlwf`bqfob`jlmfp`bofmgbqjlslo/Awj`bpbmwfqjlqfpgl`vnfmwlpmbwvqbofybnbwfqjbofpgjefqfm`jbf`lm/_nj`bwqbmpslqwfqlgq/Advfysbqwj`jsbqfm`vfmwqbmgjp`vpj/_mfpwqv`wvqbevmgb`j/_meqf`vfmwfpsfqnbmfmwfwlwbonfmwf<P<R<Z<Q<R<]=o<X<Y=n<P<R<Z<Y=n<^=l<Y<P=c=n<\\<V<Z<Y=k=n<R<]=g<]<R<W<Y<Y<R=k<Y<Q=`=a=n<R<_<R<V<R<_<X<\\<S<R=m<W<Y<^=m<Y<_<R=m<\\<U=n<Y=k<Y=l<Y<[<P<R<_=o=n=m<\\<U=n<\\<Z<T<[<Q<T<P<Y<Z<X=o<]=o<X=o=n<s<R<T=m<V<[<X<Y=m=`<^<T<X<Y<R=m<^=c<[<T<Q=o<Z<Q<R=m<^<R<Y<U<W=b<X<Y<U<S<R=l<Q<R<P<Q<R<_<R<X<Y=n<Y<U=m<^<R<T=i<S=l<\\<^<\\=n<\\<V<R<U<P<Y=m=n<R<T<P<Y<Y=n<Z<T<[<Q=`<R<X<Q<R<U<W=o=k=d<Y<S<Y=l<Y<X=k<\\=m=n<T=k<\\=m=n=`=l<\\<]<R=n<Q<R<^=g=i<S=l<\\<^<R=m<R<]<R<U<S<R=n<R<P<P<Y<Q<Y<Y=k<T=m<W<Y<Q<R<^=g<Y=o=m<W=o<_<R<V<R<W<R<Q<\\<[<\\<X=n<\\<V<R<Y=n<R<_<X<\\<S<R=k=n<T<s<R=m<W<Y=n<\\<V<T<Y<Q<R<^=g<U=m=n<R<T=n=n<\\<V<T=i=m=l<\\<[=o<M<\\<Q<V=n=h<R=l=o<P<v<R<_<X<\\<V<Q<T<_<T=m<W<R<^<\\<Q<\\=d<Y<U<Q<\\<U=n<T=m<^<R<T<P=m<^=c<[=`<W=b<]<R<U=k<\\=m=n<R=m=l<Y<X<T<v=l<R<P<Y<H<R=l=o<P=l=g<Q<V<Y=m=n<\\<W<T<S<R<T=m<V=n=g=m=c=k<P<Y=m=c=j=j<Y<Q=n=l=n=l=o<X<\\=m<\\<P=g=i=l=g<Q<V<\\<q<R<^=g<U=k<\\=m<R<^<P<Y=m=n<\\=h<T<W=`<P<P<\\=l=n<\\=m=n=l<\\<Q<P<Y=m=n<Y=n<Y<V=m=n<Q<\\=d<T=i<P<T<Q=o=n<T<P<Y<Q<T<T<P<Y=b=n<Q<R<P<Y=l<_<R=l<R<X=m<\\<P<R<P=a=n<R<P=o<V<R<Q=j<Y=m<^<R<Y<P<V<\\<V<R<U<|=l=i<T<^5i5j4F4C5e4I4]4_4K5h4]4_4K5h4E4K5h4U4K5i5o4F4D5k4K4D4]4K5i4@4K5h5f5d5i4K5h4Y5d4]4@4C5f4C4E4K5h4U4Z5d4I4Z4K5m4E4K5h5n4_5i4K5h4U4K4D4F4A5i5f5h5i5h5m4K4F5i5h4F5n5e4F4U4C5f5h4K5h4X4U4]4O4B4D4K4]4F4[5d5f4]4U5h5f5o5i4I4]5m4K5n4[5h4D4K4F4K5h5h4V4E4F4]4F5f4D4K5h5j4K4_4K5h4X5f4B5i5j4F4C5f4K5h4U4]4D4K5h5n4Y4Y4K5m5h4K5i4U5h5f5k4K4F4A4C5f4G4K5h5h5k5i4K5h4U5i5h5i5o4F4D4E5f5i5o5j5o4K5h4[5m5h5m5f4C5f5d4I4C4K4]4E4F4K4]5f4B4K5h4Y4A4E4F4_4@5f5h4K5h5d5n4F4U5j4C5i4K5i4C5f5j4E4F4Y5i5f5i4O4]4X5f5m4K5h4\\5f5j4U4]4D5f4E4D5d4K4D4E4O5h4U4K4D4K5h4_5m4]5i4X4K5o5h4F4U4K5h5e4K5h4O5d5h4K5h4_5j4E4@4K5i4U4E4K5h4Y4A5m4K5h4C5f5j5o5h5i4K4F4K5h4B4K4Y4K5h5i5h5m4O4U4Z4K4M5o4F4K4D4E4K5h4B5f4]4]4_4K4J5h4K5h5n5h4D4K5h4O4C4D5i5n4K4[4U5i4]4K4_5h5i5j4[5n4E4K5h5o4F4D4K5h4]4@5h4K4X4F4]5o4K5h5n4C5i5f4U4[5f5opAzWbdMbnf+-isd!#bow>!2s{#plojg# -dje!#bow>!wqbmpsbqfmwjmelqnbwjlmbssoj`bwjlm!#lm`oj`h>!fpwbaojpkfgbgufqwjpjmd-smd!#bow>!fmujqlmnfmwsfqelqnbm`fbssqlsqjbwf%bns8ngbpk8jnnfgjbwfoz?,pwqlmd=?,qbwkfq#wkbmwfnsfqbwvqfgfufolsnfmw`lnsfwjwjlmsob`fklogfqujpjajojwz9`lszqjdkw!=3!#kfjdkw>!fufm#wklvdkqfsob`fnfmwgfpwjmbwjlm@lqslqbwjlm?vo#`obpp>!Bppl`jbwjlmjmgjujgvbopsfqpsf`wjufpfwWjnflvw+vqo+kwws9,,nbwkfnbwj`pnbqdjm.wls9fufmwvbooz#gfp`qjswjlm*#ml.qfsfbw`loof`wjlmp-ISDwkvnasbqwj`jsbwf,kfbg=?algzeolbw9ofew8?oj#`obpp>!kvmgqfgp#le\t\tKltfufq/#`lnslpjwjlm`ofbq9alwk8`llsfqbwjlmtjwkjm#wkf#obafo#elq>!alqgfq.wls9Mft#Yfbobmgqf`lnnfmgfgsklwldqbskzjmwfqfpwjmd%ow8pvs%dw8`lmwqlufqpzMfwkfqobmgpbowfqmbwjufnb{ofmdwk>!ptjwyfqobmgGfufolsnfmwfppfmwjbooz\t\tBowklvdk#?,wf{wbqfb=wkvmgfqajqgqfsqfpfmwfg%bns8mgbpk8psf`vobwjlm`lnnvmjwjfpofdjpobwjlmfof`wqlmj`p\t\n?gju#jg>!joovpwqbwfgfmdjmffqjmdwfqqjwlqjfpbvwklqjwjfpgjpwqjavwfg5!#kfjdkw>!pbmp.pfqje8`bsbaof#le#gjpbssfbqfgjmwfqb`wjufollhjmd#elqjw#tlvog#afBedkbmjpwbmtbp#`qfbwfgNbwk-eollq+pvqqlvmgjmd`bm#bopl#aflapfqubwjlmnbjmwfmbm`ffm`lvmwfqfg?k1#`obpp>!nlqf#qf`fmwjw#kbp#affmjmubpjlm#le*-dfwWjnf+*evmgbnfmwboGfpsjwf#wkf!=?gju#jg>!jmpsjqbwjlmf{bnjmbwjlmsqfsbqbwjlmf{sobmbwjlm?jmsvw#jg>!?,b=?,psbm=ufqpjlmp#lejmpwqvnfmwpafelqf#wkf##>#$kwws9,,Gfp`qjswjlmqfobwjufoz#-pvapwqjmd+fb`k#le#wkff{sfqjnfmwpjmeovfmwjbojmwfdqbwjlmnbmz#sflsofgvf#wl#wkf#`lnajmbwjlmgl#mlw#kbufNjggof#Fbpw?mlp`qjsw=?`lszqjdkw!#sfqkbsp#wkfjmpwjwvwjlmjm#Gf`fnafqbqqbmdfnfmwnlpw#ebnlvpsfqplmbojwz`qfbwjlm#leojnjwbwjlmpf{`ovpjufozplufqfjdmwz.`lmwfmw!=\t?wg#`obpp>!vmgfqdqlvmgsbqboofo#wlgl`wqjmf#lel``vsjfg#azwfqnjmloldzQfmbjppbm`fb#mvnafq#lepvsslqw#elqf{solqbwjlmqf`ldmjwjlmsqfgf`fpplq?jnd#pq`>!,?k2#`obpp>!svaoj`bwjlmnbz#bopl#afpsf`jbojyfg?,ejfogpfw=sqldqfppjufnjoojlmp#lepwbwfp#wkbwfmelq`fnfmwbqlvmg#wkf#lmf#bmlwkfq-sbqfmwMlgfbdqj`vowvqfBowfqmbwjufqfpfbq`kfqpwltbqgp#wkfNlpw#le#wkfnbmz#lwkfq#+fpsf`jbooz?wg#tjgwk>!8tjgwk9233&jmgfsfmgfmw?k0#`obpp>!#lm`kbmdf>!*-bgg@obpp+jmwfqb`wjlmLmf#le#wkf#gbvdkwfq#leb``fpplqjfpaqbm`kfp#le\t?gju#jg>!wkf#obqdfpwgf`obqbwjlmqfdvobwjlmpJmelqnbwjlmwqbmpobwjlmgl`vnfmwbqzjm#lqgfq#wl!=\t?kfbg=\t?!#kfjdkw>!2b`qlpp#wkf#lqjfmwbwjlm*8?,p`qjsw=jnsofnfmwfg`bm#af#pffmwkfqf#tbp#bgfnlmpwqbwf`lmwbjmfq!=`lmmf`wjlmpwkf#Aqjwjpktbp#tqjwwfm"jnslqwbmw8s{8#nbqdjm.elooltfg#azbajojwz#wl#`lnsoj`bwfggvqjmd#wkf#jnnjdqbwjlmbopl#`boofg?k7#`obpp>!gjpwjm`wjlmqfsob`fg#azdlufqmnfmwpol`bwjlm#lejm#Mlufnafqtkfwkfq#wkf?,s=\t?,gju=b`rvjpjwjlm`boofg#wkf#sfqpf`vwjlmgfpjdmbwjlmxelmw.pjyf9bssfbqfg#jmjmufpwjdbwff{sfqjfm`fgnlpw#ojhfoztjgfoz#vpfggjp`vppjlmpsqfpfm`f#le#+gl`vnfmw-f{wfmpjufozJw#kbp#affmjw#glfp#mlw`lmwqbqz#wljmkbajwbmwpjnsqlufnfmwp`klobqpkjs`lmpvnswjlmjmpwqv`wjlmelq#f{bnsoflmf#lq#nlqfs{8#sbggjmdwkf#`vqqfmwb#pfqjfp#lebqf#vpvboozqlof#jm#wkfsqfujlvpoz#gfqjubwjufpfujgfm`f#lef{sfqjfm`fp`lolqp`kfnfpwbwfg#wkbw`fqwjej`bwf?,b=?,gju=\t#pfof`wfg>!kjdk#p`klloqfpslmpf#wl`lnelqwbaofbglswjlm#lewkqff#zfbqpwkf#`lvmwqzjm#Efaqvbqzpl#wkbw#wkfsflsof#tkl#sqlujgfg#az?sbqbn#mbnfbeef`wfg#azjm#wfqnp#lebssljmwnfmwJPL.;;6:.2!tbp#alqm#jmkjpwlqj`bo#qfdbqgfg#bpnfbpvqfnfmwjp#abpfg#lm#bmg#lwkfq#9#evm`wjlm+pjdmjej`bmw`fofaqbwjlmwqbmpnjwwfg,ip,irvfqz-jp#hmltm#bpwkflqfwj`bo#wbajmgf{>!jw#`lvog#af?mlp`qjsw=\tkbujmd#affm\t?kfbg=\t?#%rvlw8Wkf#`lnsjobwjlmkf#kbg#affmsqlgv`fg#azskjolplskfq`lmpwqv`wfgjmwfmgfg#wlbnlmd#lwkfq`lnsbqfg#wlwl#pbz#wkbwFmdjmffqjmdb#gjeefqfmwqfefqqfg#wlgjeefqfm`fpafojfe#wkbwsklwldqbskpjgfmwjezjmdKjpwlqz#le#Qfsvaoj`#lemf`fppbqjozsqlabajojwzwf`kmj`boozofbujmd#wkfpsf`wb`vobqeqb`wjlm#lefof`wqj`jwzkfbg#le#wkfqfpwbvqbmwpsbqwmfqpkjsfnskbpjp#lmnlpw#qf`fmwpkbqf#tjwk#pbzjmd#wkbwejoofg#tjwkgfpjdmfg#wljw#jp#lewfm!=?,jeqbnf=bp#elooltp9nfqdfg#tjwkwkqlvdk#wkf`lnnfq`jbo#sljmwfg#lvwlsslqwvmjwzujft#le#wkfqfrvjqfnfmwgjujpjlm#lesqldqbnnjmdkf#qf`fjufgpfwJmwfqubo!=?,psbm=?,jm#Mft#Zlqhbggjwjlmbo#`lnsqfppjlm\t\t?gju#jg>!jm`lqslqbwf8?,p`qjsw=?bwwb`kFufmwaf`bnf#wkf#!#wbqdfw>!\\`bqqjfg#lvwPlnf#le#wkfp`jfm`f#bmgwkf#wjnf#le@lmwbjmfq!=nbjmwbjmjmd@kqjpwlskfqNv`k#le#wkftqjwjmdp#le!#kfjdkw>!1pjyf#le#wkfufqpjlm#le#nj{wvqf#le#afwtffm#wkfF{bnsofp#lefgv`bwjlmbo`lnsfwjwjuf#lmpvanjw>!gjqf`wlq#legjpwjm`wjuf,GWG#[KWNO#qfobwjmd#wlwfmgfm`z#wlsqlujm`f#letkj`k#tlvoggfpsjwf#wkfp`jfmwjej`#ofdjpobwvqf-jmmfqKWNO#boofdbwjlmpBdqj`vowvqftbp#vpfg#jmbssqlb`k#wljmwfoojdfmwzfbqp#obwfq/pbmp.pfqjegfwfqnjmjmdSfqelqnbm`fbssfbqbm`fp/#tkj`k#jp#elvmgbwjlmpbaaqfujbwfgkjdkfq#wkbmp#eqln#wkf#jmgjujgvbo#`lnslpfg#lepvsslpfg#wl`objnp#wkbwbwwqjavwjlmelmw.pjyf92fofnfmwp#leKjpwlqj`bo#kjp#aqlwkfqbw#wkf#wjnfbmmjufqpbqzdlufqmfg#azqfobwfg#wl#vowjnbwfoz#jmmlubwjlmpjw#jp#pwjoo`bm#lmoz#afgfejmjwjlmpwlDNWPwqjmdB#mvnafq#lejnd#`obpp>!Fufmwvbooz/tbp#`kbmdfgl``vqqfg#jmmfjdkalqjmdgjpwjmdvjpktkfm#kf#tbpjmwqlgv`jmdwfqqfpwqjboNbmz#le#wkfbqdvfp#wkbwbm#Bnfqj`bm`lmrvfpw#letjgfpsqfbg#tfqf#hjoofgp`qffm#bmg#Jm#lqgfq#wlf{sf`wfg#wlgfp`fmgbmwpbqf#ol`bwfgofdjpobwjufdfmfqbwjlmp#ab`hdqlvmgnlpw#sflsofzfbqp#bewfqwkfqf#jp#mlwkf#kjdkfpweqfrvfmwoz#wkfz#gl#mlwbqdvfg#wkbwpkltfg#wkbwsqfglnjmbmwwkfloldj`boaz#wkf#wjnf`lmpjgfqjmdpklqw.ojufg?,psbm=?,b=`bm#af#vpfgufqz#ojwwoflmf#le#wkf#kbg#boqfbgzjmwfqsqfwfg`lnnvmj`bwfefbwvqfp#ledlufqmnfmw/?,mlp`qjsw=fmwfqfg#wkf!#kfjdkw>!0Jmgfsfmgfmwslsvobwjlmpobqdf.p`bof-#Bowklvdk#vpfg#jm#wkfgfpwqv`wjlmslppjajojwzpwbqwjmd#jmwtl#lq#nlqff{sqfppjlmppvalqgjmbwfobqdfq#wkbmkjpwlqz#bmg?,lswjlm=\t@lmwjmfmwbofojnjmbwjmdtjoo#mlw#afsqb`wj`f#lejm#eqlmw#lepjwf#le#wkffmpvqf#wkbwwl#`qfbwf#bnjppjppjssjslwfmwjboozlvwpwbmgjmdafwwfq#wkbmtkbw#jp#mltpjwvbwfg#jmnfwb#mbnf>!WqbgjwjlmbopvddfpwjlmpWqbmpobwjlmwkf#elqn#lebwnlpskfqj`jgfloldj`bofmwfqsqjpfp`bo`vobwjmdfbpw#le#wkfqfnmbmwp#lesovdjmpsbdf,jmgf{-sks<qfnbjmfg#jmwqbmpelqnfgKf#tbp#bopltbp#boqfbgzpwbwjpwj`bojm#ebulq#leNjmjpwqz#lenlufnfmw#leelqnvobwjlmjp#qfrvjqfg?ojmh#qfo>!Wkjp#jp#wkf#?b#kqfe>!,slsvobqjyfgjmuloufg#jmbqf#vpfg#wlbmg#pfufqbonbgf#az#wkfpffnp#wl#afojhfoz#wkbwSbofpwjmjbmmbnfg#bewfqjw#kbg#affmnlpw#`lnnlmwl#qfefq#wlavw#wkjp#jp`lmpf`vwjufwfnslqbqjozJm#dfmfqbo/`lmufmwjlmpwbhfp#sob`fpvagjujpjlmwfqqjwlqjbolsfqbwjlmbosfqnbmfmwoztbp#obqdfozlvwaqfbh#lejm#wkf#sbpwelooltjmd#b#{nomp9ld>!=?b#`obpp>!`obpp>!wf{w@lmufqpjlm#nbz#af#vpfgnbmveb`wvqfbewfq#afjmd`ofbqej{!=\trvfpwjlm#letbp#fof`wfgwl#af`lnf#baf`bvpf#le#plnf#sflsofjmpsjqfg#azpv``fppevo#b#wjnf#tkfmnlqf#`lnnlmbnlmdpw#wkfbm#leej`jbotjgwk9233&8wf`kmloldz/tbp#bglswfgwl#hffs#wkfpfwwofnfmwpojuf#ajqwkpjmgf{-kwno!@lmmf`wj`vwbppjdmfg#wl%bns8wjnfp8b``lvmw#elqbojdm>qjdkwwkf#`lnsbmzbotbzp#affmqfwvqmfg#wljmuloufnfmwAf`bvpf#wkfwkjp#sfqjlg!#mbnf>!r!#`lmejmfg#wlb#qfpvow#leubovf>!!#,=jp#b`wvboozFmujqlmnfmw\t?,kfbg=\t@lmufqpfoz/=\t?gju#jg>!3!#tjgwk>!2jp#sqlabaozkbuf#af`lnf`lmwqloojmdwkf#sqlaofn`jwjyfmp#leslojwj`jbmpqfb`kfg#wkfbp#fbqoz#bp9mlmf8#lufq?wbaof#`fooubojgjwz#legjqf`woz#wllmnlvpfgltmtkfqf#jw#jptkfm#jw#tbpnfnafqp#le#qfobwjlm#wlb``lnnlgbwfbolmd#tjwk#Jm#wkf#obwfwkf#Fmdojpkgfoj`jlvp!=wkjp#jp#mlwwkf#sqfpfmwje#wkfz#bqfbmg#ejmboozb#nbwwfq#le\t\n?,gju=\t\t?,p`qjsw=ebpwfq#wkbmnbilqjwz#lebewfq#tkj`k`lnsbqbwjufwl#nbjmwbjmjnsqluf#wkfbtbqgfg#wkffq!#`obpp>!eqbnfalqgfqqfpwlqbwjlmjm#wkf#pbnfbmbozpjp#lewkfjq#ejqpwGvqjmd#wkf#`lmwjmfmwbopfrvfm`f#leevm`wjlm+*xelmw.pjyf9#tlqh#lm#wkf?,p`qjsw=\t?afdjmp#tjwkibubp`qjsw9`lmpwjwvfmwtbp#elvmgfgfrvjojaqjvnbppvnf#wkbwjp#djufm#azmffgp#wl#af`llqgjmbwfpwkf#ubqjlvpbqf#sbqw#lelmoz#jm#wkfpf`wjlmp#lejp#b#`lnnlmwkflqjfp#legjp`lufqjfpbppl`jbwjlmfgdf#le#wkfpwqfmdwk#leslpjwjlm#jmsqfpfmw.gbzvmjufqpboozwl#elqn#wkfavw#jmpwfbg`lqslqbwjlmbwwb`kfg#wljp#`lnnlmozqfbplmp#elq#%rvlw8wkf#`bm#af#nbgftbp#baof#wltkj`k#nfbmpavw#gjg#mlwlmNlvpfLufqbp#slppjaoflsfqbwfg#az`lnjmd#eqlnwkf#sqjnbqzbggjwjlm#leelq#pfufqbowqbmpefqqfgb#sfqjlg#lebqf#baof#wlkltfufq/#jwpklvog#kbufnv`k#obqdfq\t\n?,p`qjsw=bglswfg#wkfsqlsfqwz#legjqf`wfg#azfeef`wjufoztbp#aqlvdkw`kjogqfm#leSqldqbnnjmdolmdfq#wkbmnbmvp`qjswptbq#bdbjmpwaz#nfbmp#lebmg#nlpw#lepjnjobq#wl#sqlsqjfwbqzlqjdjmbwjmdsqfpwjdjlvpdqbnnbwj`bof{sfqjfm`f-wl#nbhf#wkfJw#tbp#bopljp#elvmg#jm`lnsfwjwlqpjm#wkf#V-P-qfsob`f#wkfaqlvdkw#wkf`bo`vobwjlmeboo#le#wkfwkf#dfmfqbosqb`wj`boozjm#klmlq#leqfofbpfg#jmqfpjgfmwjbobmg#plnf#lehjmd#le#wkfqfb`wjlm#wl2pw#Fbqo#le`vowvqf#bmgsqjm`jsbooz?,wjwof=\t##wkfz#`bm#afab`h#wl#wkfplnf#le#kjpf{slpvqf#wlbqf#pjnjobqelqn#le#wkfbggEbulqjwf`jwjyfmpkjssbqw#jm#wkfsflsof#tjwkjm#sqb`wj`fwl#`lmwjmvf%bns8njmvp8bssqlufg#az#wkf#ejqpw#booltfg#wkfbmg#elq#wkfevm`wjlmjmdsobzjmd#wkfplovwjlm#wlkfjdkw>!3!#jm#kjp#allhnlqf#wkbm#belooltp#wkf`qfbwfg#wkfsqfpfm`f#jm%maps8?,wg=mbwjlmbojpwwkf#jgfb#leb#`kbqb`wfqtfqf#elq`fg#`obpp>!awmgbzp#le#wkfefbwvqfg#jmpkltjmd#wkfjmwfqfpw#jmjm#sob`f#lewvqm#le#wkfwkf#kfbg#leOlqg#le#wkfslojwj`boozkbp#jwp#ltmFgv`bwjlmbobssqlubo#leplnf#le#wkffb`k#lwkfq/afkbujlq#lebmg#af`bvpfbmg#bmlwkfqbssfbqfg#lmqf`lqgfg#jmaob`h%rvlw8nbz#jm`ovgfwkf#tlqog$p`bm#ofbg#wlqfefqp#wl#balqgfq>!3!#dlufqmnfmw#tjmmjmd#wkfqfpvowfg#jm#tkjof#wkf#Tbpkjmdwlm/wkf#pvaif`w`jwz#jm#wkf=?,gju=\t\n\nqfeof`w#wkfwl#`lnsofwfaf`bnf#nlqfqbgjlb`wjufqfif`wfg#aztjwklvw#bmzkjp#ebwkfq/tkj`k#`lvog`lsz#le#wkfwl#jmgj`bwfb#slojwj`bob``lvmwp#le`lmpwjwvwfptlqhfg#tjwkfq?,b=?,oj=le#kjp#ojefb``lnsbmjfg`ojfmwTjgwksqfufmw#wkfOfdjpobwjufgjeefqfmwozwldfwkfq#jmkbp#pfufqboelq#bmlwkfqwf{w#le#wkfelvmgfg#wkff#tjwk#wkf#jp#vpfg#elq`kbmdfg#wkfvpvbooz#wkfsob`f#tkfqftkfqfbp#wkf=#?b#kqfe>!!=?b#kqfe>!wkfnpfoufp/bowklvdk#kfwkbw#`bm#afwqbgjwjlmboqlof#le#wkfbp#b#qfpvowqfnluf@kjoggfpjdmfg#aztfpw#le#wkfPlnf#sflsofsqlgv`wjlm/pjgf#le#wkfmftpofwwfqpvpfg#az#wkfgltm#wl#wkfb``fswfg#azojuf#jm#wkfbwwfnswp#wllvwpjgf#wkfeqfrvfm`jfpKltfufq/#jmsqldqbnnfqpbw#ofbpw#jmbssql{jnbwfbowklvdk#jwtbp#sbqw#lebmg#ubqjlvpDlufqmlq#lewkf#bqwj`ofwvqmfg#jmwl=?b#kqfe>!,wkf#f`lmlnzjp#wkf#nlpwnlpw#tjgfoztlvog#obwfqbmg#sfqkbspqjpf#wl#wkfl``vqp#tkfmvmgfq#tkj`k`lmgjwjlmp-wkf#tfpwfqmwkflqz#wkbwjp#sqlgv`fgwkf#`jwz#lejm#tkj`k#kfpffm#jm#wkfwkf#`fmwqboavjogjmd#lenbmz#le#kjpbqfb#le#wkfjp#wkf#lmoznlpw#le#wkfnbmz#le#wkfwkf#TfpwfqmWkfqf#jp#mlf{wfmgfg#wlPwbwjpwj`bo`lopsbm>1#pklqw#pwlqzslppjaof#wlwlsloldj`bo`qjwj`bo#leqfslqwfg#wlb#@kqjpwjbmgf`jpjlm#wljp#frvbo#wlsqlaofnp#leWkjp#`bm#afnfq`kbmgjpfelq#nlpw#leml#fujgfm`ffgjwjlmp#lefofnfmwp#jm%rvlw8-#Wkf`ln,jnbdfp,tkj`k#nbhfpwkf#sql`fppqfnbjmp#wkfojwfqbwvqf/jp#b#nfnafqwkf#slsvobqwkf#bm`jfmwsqlaofnp#jmwjnf#le#wkfgfefbwfg#azalgz#le#wkfb#eft#zfbqpnv`k#le#wkfwkf#tlqh#le@bojelqmjb/pfqufg#bp#bdlufqmnfmw-`lm`fswp#lenlufnfmw#jm\n\n?gju#jg>!jw!#ubovf>!obmdvbdf#lebp#wkfz#bqfsqlgv`fg#jmjp#wkbw#wkff{sobjm#wkfgju=?,gju=\tKltfufq#wkfofbg#wl#wkf\n?b#kqfe>!,tbp#dqbmwfgsflsof#kbuf`lmwjmvbooztbp#pffm#bpbmg#qfobwfgwkf#qlof#lesqlslpfg#azle#wkf#afpwfb`k#lwkfq-@lmpwbmwjmfsflsof#eqlngjbof`wp#lewl#qfujpjlmtbp#qfmbnfgb#plvq`f#lewkf#jmjwjboobvm`kfg#jmsqlujgf#wkfwl#wkf#tfpwtkfqf#wkfqfbmg#pjnjobqafwtffm#wtljp#bopl#wkfFmdojpk#bmg`lmgjwjlmp/wkbw#jw#tbpfmwjwofg#wlwkfnpfoufp-rvbmwjwz#leqbmpsbqfm`zwkf#pbnf#bpwl#iljm#wkf`lvmwqz#bmgwkjp#jp#wkfWkjp#ofg#wlb#pwbwfnfmw`lmwqbpw#wlobpwJmgf{Lewkqlvdk#kjpjp#gfpjdmfgwkf#wfqn#jpjp#sqlujgfgsqlwf`w#wkfmd?,b=?,oj=Wkf#`vqqfmwwkf#pjwf#lepvapwbmwjbof{sfqjfm`f/jm#wkf#Tfpwwkfz#pklvogpolufm(ajmb`lnfmwbqjlpvmjufqpjgbg`lmgj`jlmfpb`wjujgbgfpf{sfqjfm`jbwf`mlold/Absqlgv``j/_msvmwvb`j/_mbsoj`b`j/_m`lmwqbpf/]b`bwfdlq/Abpqfdjpwqbqpfsqlefpjlmbowqbwbnjfmwlqfd/Apwqbwfpf`qfwbq/Absqjm`jsbofpsqlwf``j/_mjnslqwbmwfpjnslqwbm`jbslpjajojgbgjmwfqfpbmwf`qf`jnjfmwlmf`fpjgbgfppvp`qjajqpfbpl`jb`j/_mgjpslmjaofpfubovb`j/_mfpwvgjbmwfpqfpslmpbaofqfplov`j/_mdvbgbobibqbqfdjpwqbglplslqwvmjgbg`lnfq`jbofpelwldqbe/Abbvwlqjgbgfpjmdfmjfq/Abwfofujpj/_m`lnsfwfm`jblsfqb`jlmfpfpwbaof`jglpjnsofnfmwfb`wvbonfmwfmbufdb`j/_m`lmelqnjgbgojmf.kfjdkw9elmw.ebnjoz9!#9#!kwws9,,bssoj`bwjlmpojmh!#kqfe>!psf`jej`booz,,?"X@GBWBX\tLqdbmjybwjlmgjpwqjavwjlm3s{8#kfjdkw9qfobwjlmpkjsgfuj`f.tjgwk?gju#`obpp>!?obafo#elq>!qfdjpwqbwjlm?,mlp`qjsw=\t,jmgf{-kwno!tjmglt-lsfm+#"jnslqwbmw8bssoj`bwjlm,jmgfsfmgfm`f,,ttt-dlldoflqdbmjybwjlmbvwl`lnsofwfqfrvjqfnfmwp`lmpfqubwjuf?elqn#mbnf>!jmwfoof`wvbonbqdjm.ofew92;wk#`fmwvqzbm#jnslqwbmwjmpwjwvwjlmpbaaqfujbwjlm?jnd#`obpp>!lqdbmjpbwjlm`jujojybwjlm2:wk#`fmwvqzbq`kjwf`wvqfjm`lqslqbwfg13wk#`fmwvqz.`lmwbjmfq!=nlpw#mlwbaoz,=?,b=?,gju=mlwjej`bwjlm$vmgfejmfg$*Evqwkfqnlqf/afojfuf#wkbwjmmfqKWNO#>#sqjlq#wl#wkfgqbnbwj`boozqfefqqjmd#wlmfdlwjbwjlmpkfbgrvbqwfqpPlvwk#Beqj`bvmpv``fppevoSfmmpzoubmjbBp#b#qfpvow/?kwno#obmd>!%ow8,pvs%dw8gfbojmd#tjwkskjobgfoskjbkjpwlqj`booz*8?,p`qjsw=\tsbggjmd.wls9f{sfqjnfmwbodfwBwwqjavwfjmpwqv`wjlmpwf`kmloldjfpsbqw#le#wkf#>evm`wjlm+*xpvap`qjswjlmo-gwg!=\t?kwdfldqbskj`bo@lmpwjwvwjlm$/#evm`wjlm+pvsslqwfg#azbdqj`vowvqbo`lmpwqv`wjlmsvaoj`bwjlmpelmw.pjyf9#2b#ubqjfwz#le?gju#pwzof>!Fm`z`olsfgjbjeqbnf#pq`>!gfnlmpwqbwfgb``lnsojpkfgvmjufqpjwjfpGfnldqbskj`p*8?,p`qjsw=?gfgj`bwfg#wlhmltofgdf#lepbwjpeb`wjlmsbqwj`vobqoz?,gju=?,gju=Fmdojpk#+VP*bssfmg@kjog+wqbmpnjppjlmp-#Kltfufq/#jmwfoojdfm`f!#wbajmgf{>!eolbw9qjdkw8@lnnlmtfbowkqbmdjmd#eqlnjm#tkj`k#wkfbw#ofbpw#lmfqfsqlgv`wjlmfm`z`olsfgjb8elmw.pjyf92ivqjpgj`wjlmbw#wkbw#wjnf!=?b#`obpp>!Jm#bggjwjlm/gfp`qjswjlm(`lmufqpbwjlm`lmwb`w#tjwkjp#dfmfqboozq!#`lmwfmw>!qfsqfpfmwjmd%ow8nbwk%dw8sqfpfmwbwjlml``bpjlmbooz?jnd#tjgwk>!mbujdbwjlm!=`lnsfmpbwjlm`kbnsjlmpkjsnfgjb>!boo!#ujlobwjlm#leqfefqfm`f#wlqfwvqm#wqvf8Pwqj`w,,FM!#wqbmpb`wjlmpjmwfqufmwjlmufqjej`bwjlmJmelqnbwjlm#gjeej`vowjfp@kbnsjlmpkjs`bsbajojwjfp?"Xfmgje^..=~\t?,p`qjsw=\t@kqjpwjbmjwzelq#f{bnsof/Sqlefppjlmboqfpwqj`wjlmppvddfpw#wkbwtbp#qfofbpfg+pv`k#bp#wkfqfnluf@obpp+vmfnsolznfmwwkf#Bnfqj`bmpwqv`wvqf#le,jmgf{-kwno#svaojpkfg#jmpsbm#`obpp>!!=?b#kqfe>!,jmwqlgv`wjlmafolmdjmd#wl`objnfg#wkbw`lmpfrvfm`fp?nfwb#mbnf>!Dvjgf#wl#wkflufqtkfonjmdbdbjmpw#wkf#`lm`fmwqbwfg/\t-mlmwlv`k#lapfqubwjlmp?,b=\t?,gju=\te#+gl`vnfmw-alqgfq9#2s{#xelmw.pjyf92wqfbwnfmw#le3!#kfjdkw>!2nlgjej`bwjlmJmgfsfmgfm`fgjujgfg#jmwldqfbwfq#wkbmb`kjfufnfmwpfpwbaojpkjmdIbubP`qjsw!#mfufqwkfofpppjdmjej`bm`fAqlbg`bpwjmd=%maps8?,wg=`lmwbjmfq!=\tpv`k#bp#wkf#jmeovfm`f#leb#sbqwj`vobqpq`>$kwws9,,mbujdbwjlm!#kboe#le#wkf#pvapwbmwjbo#%maps8?,gju=bgubmwbdf#legjp`lufqz#leevmgbnfmwbo#nfwqlslojwbmwkf#lsslpjwf!#{no9obmd>!gfojafqbwfozbojdm>`fmwfqfulovwjlm#lesqfpfqubwjlmjnsqlufnfmwpafdjmmjmd#jmIfpvp#@kqjpwSvaoj`bwjlmpgjpbdqffnfmwwf{w.bojdm9q/#evm`wjlm+*pjnjobqjwjfpalgz=?,kwno=jp#`vqqfmwozboskbafwj`bojp#plnfwjnfpwzsf>!jnbdf,nbmz#le#wkf#eolt9kjggfm8bubjobaof#jmgfp`qjaf#wkff{jpwfm`f#leboo#lufq#wkfwkf#Jmwfqmfw\n?vo#`obpp>!jmpwboobwjlmmfjdkalqkllgbqnfg#elq`fpqfgv`jmd#wkf`lmwjmvfp#wlMlmfwkfofpp/wfnsfqbwvqfp\t\n\n?b#kqfe>!`olpf#wl#wkff{bnsofp#le#jp#balvw#wkf+pff#afolt*-!#jg>!pfbq`ksqlefppjlmbojp#bubjobaofwkf#leej`jbo\n\n?,p`qjsw=\t\t\n\n?gju#jg>!b``fofqbwjlmwkqlvdk#wkf#Kboo#le#Ebnfgfp`qjswjlmpwqbmpobwjlmpjmwfqefqfm`f#wzsf>$wf{w,qf`fmw#zfbqpjm#wkf#tlqogufqz#slsvobqxab`hdqlvmg9wqbgjwjlmbo#plnf#le#wkf#`lmmf`wfg#wlf{soljwbwjlmfnfqdfm`f#le`lmpwjwvwjlmB#Kjpwlqz#lepjdmjej`bmw#nbmveb`wvqfgf{sf`wbwjlmp=?mlp`qjsw=?`bm#af#elvmgaf`bvpf#wkf#kbp#mlw#affmmfjdkalvqjmdtjwklvw#wkf#bggfg#wl#wkf\n?oj#`obpp>!jmpwqvnfmwboPlujfw#Vmjlmb`hmltofgdfgtkj`k#`bm#afmbnf#elq#wkfbwwfmwjlm#wlbwwfnswp#wl#gfufolsnfmwpJm#eb`w/#wkf?oj#`obpp>!bjnsoj`bwjlmppvjwbaof#elqnv`k#le#wkf#`lolmjybwjlmsqfpjgfmwjbo`bm`foAvaaof#Jmelqnbwjlmnlpw#le#wkf#jp#gfp`qjafgqfpw#le#wkf#nlqf#lq#ofppjm#PfswfnafqJmwfoojdfm`fpq`>!kwws9,,s{8#kfjdkw9#bubjobaof#wlnbmveb`wvqfqkvnbm#qjdkwpojmh#kqfe>!,bubjobajojwzsqlslqwjlmbolvwpjgf#wkf#bpwqlmlnj`bokvnbm#afjmdpmbnf#le#wkf#bqf#elvmg#jmbqf#abpfg#lmpnboofq#wkbmb#sfqplm#tklf{sbmpjlm#lebqdvjmd#wkbwmlt#hmltm#bpJm#wkf#fbqozjmwfqnfgjbwfgfqjufg#eqlnP`bmgjmbujbm?,b=?,gju=\t`lmpjgfq#wkfbm#fpwjnbwfgwkf#Mbwjlmbo?gju#jg>!sbdqfpvowjmd#jm`lnnjppjlmfgbmboldlvp#wlbqf#qfrvjqfg,vo=\t?,gju=\ttbp#abpfg#lmbmg#af`bnf#b%maps8%maps8w!#ubovf>!!#tbp#`bswvqfgml#nlqf#wkbmqfpsf`wjufoz`lmwjmvf#wl#=\t?kfbg=\t?tfqf#`qfbwfgnlqf#dfmfqbojmelqnbwjlm#vpfg#elq#wkfjmgfsfmgfmw#wkf#Jnsfqjbo`lnslmfmw#lewl#wkf#mlqwkjm`ovgf#wkf#@lmpwqv`wjlmpjgf#le#wkf#tlvog#mlw#afelq#jmpwbm`fjmufmwjlm#lenlqf#`lnsof{`loof`wjufozab`hdqlvmg9#wf{w.bojdm9#jwp#lqjdjmbojmwl#b``lvmwwkjp#sql`fppbm#f{wfmpjufkltfufq/#wkfwkfz#bqf#mlwqfif`wfg#wkf`qjwj`jpn#legvqjmd#tkj`ksqlabaoz#wkfwkjp#bqwj`of+evm`wjlm+*xJw#pklvog#afbm#bdqffnfmwb``jgfmwboozgjeefqp#eqlnBq`kjwf`wvqfafwwfq#hmltmbqqbmdfnfmwpjmeovfm`f#lmbwwfmgfg#wkfjgfmwj`bo#wlplvwk#le#wkfsbpp#wkqlvdk{no!#wjwof>!tfjdkw9alog8`qfbwjmd#wkfgjpsobz9mlmfqfsob`fg#wkf?jnd#pq`>!,jkwwsp9,,ttt-Tlqog#Tbq#JJwfpwjnlmjbopelvmg#jm#wkfqfrvjqfg#wl#bmg#wkbw#wkfafwtffm#wkf#tbp#gfpjdmfg`lmpjpwp#le#`lmpjgfqbaozsvaojpkfg#azwkf#obmdvbdf@lmpfqubwjlm`lmpjpwfg#leqfefq#wl#wkfab`h#wl#wkf#`pp!#nfgjb>!Sflsof#eqln#bubjobaof#lmsqlufg#wl#afpvddfpwjlmp!tbp#hmltm#bpubqjfwjfp#leojhfoz#wl#af`lnsqjpfg#lepvsslqw#wkf#kbmgp#le#wkf`lvsofg#tjwk`lmmf`w#bmg#alqgfq9mlmf8sfqelqnbm`fpafelqf#afjmdobwfq#af`bnf`bo`vobwjlmplewfm#`boofgqfpjgfmwp#lenfbmjmd#wkbw=?oj#`obpp>!fujgfm`f#elqf{sobmbwjlmpfmujqlmnfmwp!=?,b=?,gju=tkj`k#booltpJmwqlgv`wjlmgfufolsfg#azb#tjgf#qbmdflm#afkboe#leubojdm>!wls!sqjm`jsof#lebw#wkf#wjnf/?,mlp`qjsw=pbjg#wl#kbufjm#wkf#ejqpwtkjof#lwkfqpkzslwkfwj`boskjolplskfqpsltfq#le#wkf`lmwbjmfg#jmsfqelqnfg#azjmbajojwz#wltfqf#tqjwwfmpsbm#pwzof>!jmsvw#mbnf>!wkf#rvfpwjlmjmwfmgfg#elqqfif`wjlm#lejnsojfp#wkbwjmufmwfg#wkfwkf#pwbmgbqgtbp#sqlabaozojmh#afwtffmsqlefpplq#lejmwfqb`wjlmp`kbmdjmd#wkfJmgjbm#L`fbm#`obpp>!obpwtlqhjmd#tjwk$kwws9,,ttt-zfbqp#afelqfWkjp#tbp#wkfqf`qfbwjlmbofmwfqjmd#wkfnfbpvqfnfmwpbm#f{wqfnfozubovf#le#wkfpwbqw#le#wkf\t?,p`qjsw=\t\tbm#feelqw#wljm`qfbpf#wkfwl#wkf#plvwkpsb`jmd>!3!=pveej`jfmwozwkf#Fvqlsfbm`lmufqwfg#wl`ofbqWjnflvwgjg#mlw#kbuf`lmpfrvfmwozelq#wkf#mf{wf{wfmpjlm#lef`lmlnj`#bmgbowklvdk#wkfbqf#sqlgv`fgbmg#tjwk#wkfjmpveej`jfmwdjufm#az#wkfpwbwjmd#wkbwf{sfmgjwvqfp?,psbm=?,b=\twklvdkw#wkbwlm#wkf#abpjp`foosbggjmd>jnbdf#le#wkfqfwvqmjmd#wljmelqnbwjlm/pfsbqbwfg#azbppbppjmbwfgp!#`lmwfmw>!bvwklqjwz#lemlqwktfpwfqm?,gju=\t?gju#!=?,gju=\t##`lmpvowbwjlm`lnnvmjwz#lewkf#mbwjlmbojw#pklvog#afsbqwj`jsbmwp#bojdm>!ofewwkf#dqfbwfpwpfof`wjlm#lepvsfqmbwvqbogfsfmgfmw#lmjp#nfmwjlmfgbooltjmd#wkftbp#jmufmwfgb``lnsbmzjmdkjp#sfqplmbobubjobaof#bwpwvgz#le#wkflm#wkf#lwkfqf{f`vwjlm#leKvnbm#Qjdkwpwfqnp#le#wkfbppl`jbwjlmpqfpfbq`k#bmgpv``ffgfg#azgfefbwfg#wkfbmg#eqln#wkfavw#wkfz#bqf`lnnbmgfq#lepwbwf#le#wkfzfbqp#le#bdfwkf#pwvgz#le?vo#`obpp>!psob`f#jm#wkftkfqf#kf#tbp?oj#`obpp>!ewkfqf#bqf#mltkj`k#af`bnfkf#svaojpkfgf{sqfppfg#jmwl#tkj`k#wkf`lnnjppjlmfqelmw.tfjdkw9wfqqjwlqz#lef{wfmpjlmp!=Qlnbm#Fnsjqffrvbo#wl#wkfJm#`lmwqbpw/kltfufq/#bmgjp#wzsj`boozbmg#kjp#tjef+bopl#`boofg=?vo#`obpp>!feef`wjufoz#fuloufg#jmwlpffn#wl#kbuftkj`k#jp#wkfwkfqf#tbp#mlbm#f{`foofmwboo#le#wkfpfgfp`qjafg#azJm#sqb`wj`f/aqlbg`bpwjmd`kbqdfg#tjwkqfeof`wfg#jmpvaif`wfg#wlnjojwbqz#bmgwl#wkf#sljmwf`lmlnj`boozpfwWbqdfwjmdbqf#b`wvboozuj`wlqz#lufq+*8?,p`qjsw=`lmwjmvlvpozqfrvjqfg#elqfulovwjlmbqzbm#feef`wjufmlqwk#le#wkf/#tkj`k#tbp#eqlmw#le#wkflq#lwkfqtjpfplnf#elqn#lekbg#mlw#affmdfmfqbwfg#azjmelqnbwjlm-sfqnjwwfg#wljm`ovgfp#wkfgfufolsnfmw/fmwfqfg#jmwlwkf#sqfujlvp`lmpjpwfmwozbqf#hmltm#bpwkf#ejfog#lewkjp#wzsf#ledjufm#wl#wkfwkf#wjwof#le`lmwbjmp#wkfjmpwbm`fp#lejm#wkf#mlqwkgvf#wl#wkfjqbqf#gfpjdmfg`lqslqbwjlmptbp#wkbw#wkflmf#le#wkfpfnlqf#slsvobqpv``ffgfg#jmpvsslqw#eqlnjm#gjeefqfmwglnjmbwfg#azgfpjdmfg#elqltmfqpkjs#lebmg#slppjaozpwbmgbqgjyfgqfpslmpfWf{wtbp#jmwfmgfgqf`fjufg#wkfbppvnfg#wkbwbqfbp#le#wkfsqjnbqjoz#jmwkf#abpjp#lejm#wkf#pfmpfb``lvmwp#elqgfpwqlzfg#azbw#ofbpw#wtltbp#gf`obqfg`lvog#mlw#afPf`qfwbqz#lebssfbq#wl#afnbqdjm.wls92,]_p(_p(\',df*xwkqlt#f~8wkf#pwbqw#lewtl#pfsbqbwfobmdvbdf#bmgtkl#kbg#affmlsfqbwjlm#legfbwk#le#wkfqfbo#mvnafqp\n?ojmh#qfo>!sqlujgfg#wkfwkf#pwlqz#le`lnsfwjwjlmpfmdojpk#+VH*fmdojpk#+VP*<p<R<Q<_<R<W<M=l<S=m<V<T=m=l<S=m<V<T=m=l<S=m<V<R5h4U4]4D5f4E\nAOGx\bTA\nzk\vBl\bQ\bTA\nzk\vUm\bQ\bTA\nzk\npeu|\ti@\tcT\bVV\n\\}\nxS\tVptSk`\t[X\t[X\vHR\bPv\bTW\bUe\na\bQp\v_W\vWs\nxS\vAz\n_yKhjmelqnb`j/_mkfqqbnjfmwbpfof`wq/_mj`lgfp`qjs`j/_m`obpjej`bglp`lml`jnjfmwlsvaoj`b`j/_mqfob`jlmbgbpjmelqn/Mwj`bqfob`jlmbglpgfsbqwbnfmwlwqbabibglqfpgjqf`wbnfmwfbzvmwbnjfmwlnfq`bglOjaqf`lmw/M`wfmlpkbajwb`jlmfp`vnsojnjfmwlqfpwbvqbmwfpgjpslpj`j/_m`lmpf`vfm`jbfof`wq/_mj`bbsoj`b`jlmfpgfp`lmf`wbgljmpwbob`j/_mqfbojyb`j/_mvwjojyb`j/_mfm`j`olsfgjbfmefqnfgbgfpjmpwqvnfmwlpf{sfqjfm`jbpjmpwjwv`j/_msbqwj`vobqfppva`bwfdlqjb=n<R<W=`<V<R<L<R=m=m<T<T=l<\\<]<R=n=g<]<R<W=`=d<Y<S=l<R=m=n<R<P<R<Z<Y=n<Y<X=l=o<_<T=i=m<W=o=k<\\<Y=m<Y<U=k<\\=m<^=m<Y<_<X<\\<L<R=m=m<T=c<p<R=m<V<^<Y<X=l=o<_<T<Y<_<R=l<R<X<\\<^<R<S=l<R=m<X<\\<Q<Q=g=i<X<R<W<Z<Q=g<T<P<Y<Q<Q<R<p<R=m<V<^=g=l=o<]<W<Y<U<p<R=m<V<^<\\=m=n=l<\\<Q=g<Q<T=k<Y<_<R=l<\\<]<R=n<Y<X<R<W<Z<Y<Q=o=m<W=o<_<T=n<Y<S<Y=l=`<r<X<Q<\\<V<R<S<R=n<R<P=o=l<\\<]<R=n=o<\\<S=l<Y<W=c<^<R<R<]=e<Y<R<X<Q<R<_<R=m<^<R<Y<_<R=m=n<\\=n=`<T<X=l=o<_<R<U=h<R=l=o<P<Y=i<R=l<R=d<R<S=l<R=n<T<^=m=m=g<W<V<\\<V<\\<Z<X=g<U<^<W<\\=m=n<T<_=l=o<S<S=g<^<P<Y=m=n<Y=l<\\<]<R=n<\\=m<V<\\<[<\\<W<S<Y=l<^=g<U<X<Y<W<\\=n=`<X<Y<Q=`<_<T<S<Y=l<T<R<X<]<T<[<Q<Y=m<R=m<Q<R<^<Y<P<R<P<Y<Q=n<V=o<S<T=n=`<X<R<W<Z<Q<\\=l<\\<P<V<\\=i<Q<\\=k<\\<W<R<L<\\<]<R=n<\\<N<R<W=`<V<R=m<R<^=m<Y<P<^=n<R=l<R<U<Q<\\=k<\\<W<\\=m<S<T=m<R<V=m<W=o<Z<]=g=m<T=m=n<Y<P<S<Y=k<\\=n<T<Q<R<^<R<_<R<S<R<P<R=e<T=m<\\<U=n<R<^<S<R=k<Y<P=o<S<R<P<R=e=`<X<R<W<Z<Q<R=m=m=g<W<V<T<]=g=m=n=l<R<X<\\<Q<Q=g<Y<P<Q<R<_<T<Y<S=l<R<Y<V=n<M<Y<U=k<\\=m<P<R<X<Y<W<T=n<\\<V<R<_<R<R<Q<W<\\<U<Q<_<R=l<R<X<Y<^<Y=l=m<T=c=m=n=l<\\<Q<Y=h<T<W=`<P=g=o=l<R<^<Q=c=l<\\<[<Q=g=i<T=m<V<\\=n=`<Q<Y<X<Y<W=b=c<Q<^<\\=l=c<P<Y<Q=`=d<Y<P<Q<R<_<T=i<X<\\<Q<Q<R<U<[<Q<\\=k<T=n<Q<Y<W=`<[=c=h<R=l=o<P<\\<N<Y<S<Y=l=`<P<Y=m=c=j<\\<[<\\=e<T=n=g<w=o=k=d<T<Y\fHD\fHU\fIl\fHn\fHy\fH\\\fHD\fIk\fHi\fHF\fHD\fIk\fHy\fHS\fHC\fHR\fHy\fH\\\fIk\fHn\fHi\fHD\fIa\fHC\fHy\fIa\fHC\fHR\fH{\fHR\fHk\fHM\fH@\fHR\fH\\\fIk\fHy\fHS\fHT\fIl\fHJ\fHS\fHC\fHR\fHF\fHU\fH^\fIk\fHT\fHS\fHn\fHU\fHA\fHR\fH\\\fHH\fHi\fHF\fHD\fIl\fHY\fHR\fH^\fIk\fHT\fIk\fHY\fHR\fHy\fH\\\fHH\fIk\fHB\fIk\fH\\\fIk\fHU\fIg\fHD\fIk\fHT\fHy\fHH\fIk\fH@\fHU\fIm\fHH\fHT\fHR\fHk\fHs\fHU\fIg\fH{\fHR\fHp\fHR\fHD\fIk\fHB\fHS\fHD\fHs\fHy\fH\\\fHH\fHR\fHy\fH\\\fHD\fHR\fHe\fHD\fHy\fIk\fHC\fHU\fHR\fHm\fHT\fH@\fHT\fIk\fHA\fHR\fH[\fHR\fHj\fHF\fHy\fIk\fH^\fHS\fHC\fIk\fHZ\fIm\fH\\\fIn\fHk\fHT\fHy\fIk\fHt\fHn\fHs\fIk\fHB\fIk\fH\\\fIl\fHT\fHy\fHH\fHR\fHB\fIk\fH\\\fHR\fH^\fIk\fHy\fH\\\fHi\fHK\fHS\fHy\fHi\fHF\fHD\fHR\fHT\fHB\fHR\fHp\fHB\fIm\fHq\fIk\fHy\fHR\fH\\\fHO\fHU\fIg\fHH\fHR\fHy\fHM\fHP\fIl\fHC\fHU\fHR\fHn\fHU\fIg\fHs\fH^\fHZ\fH@\fIa\fHJ\fH^\fHS\fHC\fHR\fHp\fIl\fHY\fHD\fHp\fHR\fHH\fHR\fHy\fId\fHT\fIk\fHj\fHF\fHy\fHR\fHY\fHR\fH^\fIl\fHJ\fIk\fHD\fIk\fHF\fIn\fH\\\fIl\fHF\fHR\fHD\fIl\fHe\fHT\fHy\fIk\fHU\fIg\fH{\fIl\fH@\fId\fHL\fHy\fHj\fHF\fHy\fIl\fHY\fH\\\fIa\fH[\fH{\fHR\fHn\fHY\fHj\fHF\fHy\fIg\fHp\fHS\fH^\fHR\fHp\fHR\fHD\fHR\fHT\fHU\fHB\fHH\fHU\fHB\fIk\fHn\fHe\fHD\fHy\fIl\fHC\fHR\fHU\fIn\fHJ\fH\\\fIa\fHp\fHT\fIn\fHv\fIl\fHF\fHT\fHn\fHJ\fHT\fHY\fHR\fH^\fHU\fIg\fHD\fHR\fHU\fIg\fHH\fIl\fHp\fId\fHT\fIk\fHY\fHR\fHF\fHT\fHp\fHD\fHH\fHR\fHD\fIk\fHH\fHR\fHp\fHR\fH\\\fIl\fHt\fHR\fHC\fH^\fHp\fHS\fH^\fIk\fHD\fIl\fHv\fIk\fHp\fHR\fHn\fHv\fHF\fHH\fIa\fH\\\fH{\fIn\fH{\fH^\fHp\fHR\fHH\fIk\fH@\fHR\fHU\fH\\\fHj\fHF\fHD\fIk\fHY\fHR\fHU\fHD\fHk\fHT\fHy\fHR\fHT\fIm\fH@\fHU\fH\\\fHU\fHD\fIk\fHk\fHT\fHT\fIk\fHT\fHU\fHS\fHH\fH@\fHM\fHP\fIk\fHt\fHs\fHD\fHR\fHH\fH^\fHR\fHZ\fHF\fHR\fHn\fHv\fHZ\fIa\fH\\\fIl\fH@\fHM\fHP\fIl\fHU\fIg\fHH\fIk\fHT\fHR\fHd\fHs\fHZ\fHR\fHC\fHJ\fHT\fHy\fHH\fIl\fHp\fHR\fHH\fIl\fHY\fHR\fH^\fHR\fHU\fHp\fHR\fH\\\fHF\fHs\fHD\fHR\fH\\\fHz\fHD\fIk\fHT\fHM\fHP\fHy\fHB\fHS\fH^\fHR\fHe\fHT\fHy\fIl\fHy\fIk\fHY\fH^\fH^\fH{\fHH\fHR\fHz\fHR\fHD\fHR\fHi\fH\\\fIa\fHI\fHp\fHU\fHR\fHn\fHJ\fIk\fHz\fHR\fHF\fHU\fH^\fIl\fHD\fHS\fHC\fHB\fH@\fHS\fHD\fHR\fH@\fId\fHn\fHy\fHy\fHU\fIl\fHn\fHy\fHU\fHD\fHR\fHJ\fIk\fHH\fHR\fHU\fHB\fH^\fIk\fHy\fHR\fHG\fIl\fHp\fH@\fHy\fHS\fHH\fIm\fH\\\fHH\fHB\fHR\fHn\fH{\fHY\fHU\fIl\fHn\fH\\\fIg\fHp\fHP\fHB\fHS\fH^\fIl\fHj\fH\\\fIg\fHF\fHT\fIk\fHD\fHR\fHC\fHR\fHJ\fHY\fH^\fIk\fHD\fIk\fHz\fHR\fHH\fHR\fHy\fH\\\fIl\fH@\fHe\fHD\fHy\fHR\fHp\fHY\fHR\fH@\fHF\fIn\fH\\\fHR\fH@\fHM\fHP\fHR\fHT\fI`\fHJ\fHR\fHZ\fIk\fHC\fH\\\fHy\fHS\fHC\fIk\fHy\fHU\fHR\fHn\fHi\fHy\fHT\fH\\\fH@\fHD\fHR\fHc\fHY\fHU\fHR\fHn\fHT\fIa\fHI\fH^\fHB\fHS\fH^\fIk\fH^\fIk\fHz\fHy\fHY\fHS\fH[\fHC\fHy\fIa\fH\\\fHn\fHT\fHB\fIn\fHU\fHI\fHR\fHD\fHR4F4_4F4[5f4U5i4X4K4]5o4E4D5d4K4_4[4E4K5h4Y5m4A4E5i5d4K4Z5f4U4K5h4B4K4Y4E4K5h5i4^5f4C4K5h4U4K5i4E4K5h5o4K4F4D4K5h4]4C5d4C4D4]5j4K5i4@4K5h4C5d5h4E4K5h4U4K5h5i4K5h5i5d5n4U4K5h4U4]4D5f4K5h4_4]5f4U4K5h4@5d4K5h4K5h4\\5k4K4D4K5h4A5f4K4E4K5h4A5n5d5n4K5h5o4]5f5i4K5h4U4]4K5n5i4A5m5d4T4E4K5h4G4K5j5f5i4X4K5k4C4E4K5h5i4]4O4E4K5h5n4]4N5j4K5h4X4D4K4D4K5h4A5d4K4]4K5h4@4C5f4C4K5h4O4_4]4E4K5h4U5h5d5i5i4@5i5d4U4E4K5h4]4A5i5j4K5h5j5n4K4[5m5h4_4[5f5j4K5h5o5d5f4F4K5h4C5j5f4K4D4]5o4K4F5k4K5h4]5f4K4Z4F4A5f4K4F5f4D4F5d5n5f4F4K5h4O5d5h5e4K5h4D4]5f4C4K5h5o5h4K5i4K5h4]4K4D4[4K5h4X4B4Y5f4_5f4K4]4K4F4K5h4G4K5h4G4K5h4Y5h4K4E4K5h4A4C5f4G4K5h4^5d4K4]4K5h4B5h5f4@4K5h4@5i5f4U4K5h4U4K5i5k4K5h4@5i4K5h4K5h4_4K4U4E5i4X4K5k4C5k4K5h4]4J5f4_4K5h4C4B5d5h4K5h5m5j5f4E4K5h5o4F4K4D4K5h4C5d4]5f4K5h4C4]5d4_4K4_4F4V4]5n4F4Y4K5i5f5i4K5h4D5j4K4F4K5h4U4T5f5ifmwfqwbjmnfmwvmgfqpwbmgjmd#>#evm`wjlm+*-isd!#tjgwk>!`lmejdvqbwjlm-smd!#tjgwk>!?algz#`obpp>!Nbwk-qbmgln+*`lmwfnslqbqz#Vmjwfg#Pwbwfp`jq`vnpwbm`fp-bssfmg@kjog+lqdbmjybwjlmp?psbm#`obpp>!!=?jnd#pq`>!,gjpwjmdvjpkfgwklvpbmgp#le#`lnnvmj`bwjlm`ofbq!=?,gju=jmufpwjdbwjlmebuj`lm-j`l!#nbqdjm.qjdkw9abpfg#lm#wkf#Nbppb`kvpfwwpwbaof#alqgfq>jmwfqmbwjlmbobopl#hmltm#bpsqlmvm`jbwjlmab`hdqlvmg9 esbggjmd.ofew9Elq#f{bnsof/#njp`foobmflvp%ow8,nbwk%dw8spz`kloldj`bojm#sbqwj`vobqfbq`k!#wzsf>!elqn#nfwklg>!bp#lsslpfg#wlPvsqfnf#@lvqwl``bpjlmbooz#Bggjwjlmbooz/Mlqwk#Bnfqj`bs{8ab`hdqlvmglsslqwvmjwjfpFmwfqwbjmnfmw-wlOltfq@bpf+nbmveb`wvqjmdsqlefppjlmbo#`lnajmfg#tjwkElq#jmpwbm`f/`lmpjpwjmd#le!#nb{ofmdwk>!qfwvqm#ebopf8`lmp`jlvpmfppNfgjwfqqbmfbmf{wqblqgjmbqzbppbppjmbwjlmpvapfrvfmwoz#avwwlm#wzsf>!wkf#mvnafq#lewkf#lqjdjmbo#`lnsqfkfmpjufqfefqp#wl#wkf?,vo=\t?,gju=\tskjolplskj`bool`bwjlm-kqfetbp#svaojpkfgPbm#Eqbm`jp`l+evm`wjlm+*x\t?gju#jg>!nbjmplskjpwj`bwfgnbwkfnbwj`bo#,kfbg=\t?algzpvddfpwp#wkbwgl`vnfmwbwjlm`lm`fmwqbwjlmqfobwjlmpkjspnbz#kbuf#affm+elq#f{bnsof/Wkjp#bqwj`of#jm#plnf#`bpfpsbqwp#le#wkf#gfejmjwjlm#leDqfbw#Aqjwbjm#`foosbggjmd>frvjubofmw#wlsob`fklogfq>!8#elmw.pjyf9#ivpwjej`bwjlmafojfufg#wkbwpveefqfg#eqlnbwwfnswfg#wl#ofbgfq#le#wkf`qjsw!#pq`>!,+evm`wjlm+*#xbqf#bubjobaof\t\n?ojmh#qfo>!#pq`>$kwws9,,jmwfqfpwfg#jm`lmufmwjlmbo#!#bow>!!#,=?,bqf#dfmfqboozkbp#bopl#affmnlpw#slsvobq#`lqqfpslmgjmd`qfgjwfg#tjwkwzof>!alqgfq9?,b=?,psbm=?,-dje!#tjgwk>!?jeqbnf#pq`>!wbaof#`obpp>!jmojmf.aol`h8b``lqgjmd#wl#wldfwkfq#tjwkbssql{jnbwfozsbqojbnfmwbqznlqf#bmg#nlqfgjpsobz9mlmf8wqbgjwjlmboozsqfglnjmbmwoz%maps8%maps8%maps8?,psbm=#`foopsb`jmd>?jmsvw#mbnf>!lq!#`lmwfmw>!`lmwqlufqpjbosqlsfqwz>!ld9,{.pkl`htbuf.gfnlmpwqbwjlmpvqqlvmgfg#azMfufqwkfofpp/tbp#wkf#ejqpw`lmpjgfqbaof#Bowklvdk#wkf#`loobalqbwjlmpklvog#mlw#afsqlslqwjlm#le?psbm#pwzof>!hmltm#bp#wkf#pklqwoz#bewfqelq#jmpwbm`f/gfp`qjafg#bp#,kfbg=\t?algz#pwbqwjmd#tjwkjm`qfbpjmdoz#wkf#eb`w#wkbwgjp`vppjlm#lenjggof#le#wkfbm#jmgjujgvbogjeej`vow#wl#sljmw#le#ujftklnlpf{vbojwzb``fswbm`f#le?,psbm=?,gju=nbmveb`wvqfqplqjdjm#le#wkf`lnnlmoz#vpfgjnslqwbm`f#legfmlnjmbwjlmpab`hdqlvmg9# ofmdwk#le#wkfgfwfqnjmbwjlmb#pjdmjej`bmw!#alqgfq>!3!=qfulovwjlmbqzsqjm`jsofp#lejp#`lmpjgfqfgtbp#gfufolsfgJmgl.Fvqlsfbmuvomfqbaof#wlsqlslmfmwp#lebqf#plnfwjnfp`olpfq#wl#wkfMft#Zlqh#@jwz#mbnf>!pfbq`kbwwqjavwfg#wl`lvqpf#le#wkfnbwkfnbwj`jbmaz#wkf#fmg#lebw#wkf#fmg#le!#alqgfq>!3!#wf`kmloldj`bo-qfnluf@obpp+aqbm`k#le#wkffujgfm`f#wkbw"Xfmgje^..=\tJmpwjwvwf#le#jmwl#b#pjmdofqfpsf`wjufoz-bmg#wkfqfelqfsqlsfqwjfp#lejp#ol`bwfg#jmplnf#le#tkj`kWkfqf#jp#bopl`lmwjmvfg#wl#bssfbqbm`f#le#%bns8mgbpk8#gfp`qjafp#wkf`lmpjgfqbwjlmbvwklq#le#wkfjmgfsfmgfmwozfrvjssfg#tjwkglfp#mlw#kbuf?,b=?b#kqfe>!`lmevpfg#tjwk?ojmh#kqfe>!,bw#wkf#bdf#lebssfbq#jm#wkfWkfpf#jm`ovgfqfdbqgofpp#le`lvog#af#vpfg#pwzof>%rvlw8pfufqbo#wjnfpqfsqfpfmw#wkfalgz=\t?,kwno=wklvdkw#wl#afslsvobwjlm#leslppjajojwjfpsfq`fmwbdf#leb``fpp#wl#wkfbm#bwwfnsw#wlsqlgv`wjlm#leirvfqz,irvfqzwtl#gjeefqfmwafolmd#wl#wkffpwbaojpknfmwqfsob`jmd#wkfgfp`qjswjlm!#gfwfqnjmf#wkfbubjobaof#elqB``lqgjmd#wl#tjgf#qbmdf#le\n?gju#`obpp>!nlqf#`lnnlmozlqdbmjpbwjlmpevm`wjlmbojwztbp#`lnsofwfg#%bns8ngbpk8#sbqwj`jsbwjlmwkf#`kbqb`wfqbm#bggjwjlmbobssfbqp#wl#afeb`w#wkbw#wkfbm#f{bnsof#lepjdmjej`bmwozlmnlvpflufq>!af`bvpf#wkfz#bpzm`#>#wqvf8sqlaofnp#tjwkpffnp#wl#kbufwkf#qfpvow#le#pq`>!kwws9,,ebnjojbq#tjwkslppfppjlm#leevm`wjlm#+*#xwllh#sob`f#jmbmg#plnfwjnfppvapwbmwjbooz?psbm=?,psbm=jp#lewfm#vpfgjm#bm#bwwfnswdqfbw#gfbo#leFmujqlmnfmwbopv``fppevooz#ujqwvbooz#boo13wk#`fmwvqz/sqlefppjlmbopmf`fppbqz#wl#gfwfqnjmfg#az`lnsbwjajojwzaf`bvpf#jw#jpGj`wjlmbqz#lenlgjej`bwjlmpWkf#elooltjmdnbz#qfefq#wl9@lmpfrvfmwoz/Jmwfqmbwjlmbobowklvdk#plnfwkbw#tlvog#aftlqog$p#ejqpw`obppjejfg#bpalwwln#le#wkf+sbqwj`vobqozbojdm>!ofew!#nlpw#`lnnlmozabpjp#elq#wkfelvmgbwjlm#le`lmwqjavwjlmpslsvobqjwz#le`fmwfq#le#wkfwl#qfgv`f#wkfivqjpgj`wjlmpbssql{jnbwjlm#lmnlvpflvw>!Mft#Wfpwbnfmw`loof`wjlm#le?,psbm=?,b=?,jm#wkf#Vmjwfgejon#gjqf`wlq.pwqj`w-gwg!=kbp#affm#vpfgqfwvqm#wl#wkfbowklvdk#wkjp`kbmdf#jm#wkfpfufqbo#lwkfqavw#wkfqf#bqfvmsqf`fgfmwfgjp#pjnjobq#wlfpsf`jbooz#jmtfjdkw9#alog8jp#`boofg#wkf`lnsvwbwjlmbojmgj`bwf#wkbwqfpwqj`wfg#wl\n?nfwb#mbnf>!bqf#wzsj`booz`lmeoj`w#tjwkKltfufq/#wkf#Bm#f{bnsof#le`lnsbqfg#tjwkrvbmwjwjfp#leqbwkfq#wkbm#b`lmpwfoobwjlmmf`fppbqz#elqqfslqwfg#wkbwpsf`jej`bwjlmslojwj`bo#bmg%maps8%maps8?qfefqfm`fp#wlwkf#pbnf#zfbqDlufqmnfmw#ledfmfqbwjlm#lekbuf#mlw#affmpfufqbo#zfbqp`lnnjwnfmw#wl\n\n?vo#`obpp>!ujpvbojybwjlm2:wk#`fmwvqz/sqb`wjwjlmfqpwkbw#kf#tlvogbmg#`lmwjmvfgl``vsbwjlm#lejp#gfejmfg#bp`fmwqf#le#wkfwkf#bnlvmw#le=?gju#pwzof>!frvjubofmw#legjeefqfmwjbwfaqlvdkw#balvwnbqdjm.ofew9#bvwlnbwj`boozwklvdkw#le#bpPlnf#le#wkfpf\t?gju#`obpp>!jmsvw#`obpp>!qfsob`fg#tjwkjp#lmf#le#wkffgv`bwjlm#bmgjmeovfm`fg#azqfsvwbwjlm#bp\t?nfwb#mbnf>!b``lnnlgbwjlm?,gju=\t?,gju=obqdf#sbqw#leJmpwjwvwf#elqwkf#pl.`boofg#bdbjmpw#wkf#Jm#wkjp#`bpf/tbp#bssljmwfg`objnfg#wl#afKltfufq/#wkjpGfsbqwnfmw#lewkf#qfnbjmjmdfeef`w#lm#wkfsbqwj`vobqoz#gfbo#tjwk#wkf\t?gju#pwzof>!bonlpw#botbzpbqf#`vqqfmwozf{sqfppjlm#leskjolplskz#leelq#nlqf#wkbm`jujojybwjlmplm#wkf#jpobmgpfof`wfgJmgf{`bm#qfpvow#jm!#ubovf>!!#,=wkf#pwqv`wvqf#,=?,b=?,gju=Nbmz#le#wkfpf`bvpfg#az#wkfle#wkf#Vmjwfgpsbm#`obpp>!n`bm#af#wqb`fgjp#qfobwfg#wlaf`bnf#lmf#lejp#eqfrvfmwozojujmd#jm#wkfwkflqfwj`boozElooltjmd#wkfQfulovwjlmbqzdlufqmnfmw#jmjp#gfwfqnjmfgwkf#slojwj`bojmwqlgv`fg#jmpveej`jfmw#wlgfp`qjswjlm!=pklqw#pwlqjfppfsbqbwjlm#lebp#wl#tkfwkfqhmltm#elq#jwptbp#jmjwjboozgjpsobz9aol`hjp#bm#f{bnsofwkf#sqjm`jsbo`lmpjpwp#le#bqf`ldmjyfg#bp,algz=?,kwno=b#pvapwbmwjboqf`lmpwqv`wfgkfbg#le#pwbwfqfpjpwbm`f#wlvmgfqdqbgvbwfWkfqf#bqf#wtldqbujwbwjlmbobqf#gfp`qjafgjmwfmwjlmboozpfqufg#bp#wkf`obpp>!kfbgfqlsslpjwjlm#wlevmgbnfmwboozglnjmbwfg#wkfbmg#wkf#lwkfqboojbm`f#tjwktbp#elq`fg#wlqfpsf`wjufoz/bmg#slojwj`bojm#pvsslqw#lesflsof#jm#wkf13wk#`fmwvqz-bmg#svaojpkfgolbg@kbqwafbwwl#vmgfqpwbmgnfnafq#pwbwfpfmujqlmnfmwboejqpw#kboe#le`lvmwqjfp#bmgbq`kjwf`wvqboaf#`lmpjgfqfg`kbqb`wfqjyfg`ofbqJmwfqubobvwklqjwbwjufEfgfqbwjlm#letbp#pv``ffgfgbmg#wkfqf#bqfb#`lmpfrvfm`fwkf#Sqfpjgfmwbopl#jm`ovgfgeqff#plewtbqfpv``fppjlm#legfufolsfg#wkftbp#gfpwqlzfgbtbz#eqln#wkf8\t?,p`qjsw=\t?bowklvdk#wkfzelooltfg#az#bnlqf#sltfqevoqfpvowfg#jm#bVmjufqpjwz#leKltfufq/#nbmzwkf#sqfpjgfmwKltfufq/#plnfjp#wklvdkw#wlvmwjo#wkf#fmgtbp#bmmlvm`fgbqf#jnslqwbmwbopl#jm`ovgfp=?jmsvw#wzsf>wkf#`fmwfq#le#GL#MLW#BOWFQvpfg#wl#qfefqwkfnfp,<plqw>wkbw#kbg#affmwkf#abpjp#elqkbp#gfufolsfgjm#wkf#pvnnfq`lnsbqbwjufozgfp`qjafg#wkfpv`k#bp#wklpfwkf#qfpvowjmdjp#jnslppjaofubqjlvp#lwkfqPlvwk#Beqj`bmkbuf#wkf#pbnffeef`wjufmfppjm#tkj`k#`bpf8#wf{w.bojdm9pwqv`wvqf#bmg8#ab`hdqlvmg9qfdbqgjmd#wkfpvsslqwfg#wkfjp#bopl#hmltmpwzof>!nbqdjmjm`ovgjmd#wkfabkbpb#Nfobzvmlqph#alhn/Iomlqph#mzmlqphpolufm)M(ajmbjmwfqmb`jlmbo`bojej`b`j/_m`lnvmj`b`j/_m`lmpwqv``j/_m!=?gju#`obpp>!gjpbnajdvbwjlmGlnbjmMbnf$/#$bgnjmjpwqbwjlmpjnvowbmflvpozwqbmpslqwbwjlmJmwfqmbwjlmbo#nbqdjm.alwwln9qfpslmpjajojwz?"Xfmgje^..=\t?,=?nfwb#mbnf>!jnsofnfmwbwjlmjmeqbpwqv`wvqfqfsqfpfmwbwjlmalqgfq.alwwln9?,kfbg=\t?algz=>kwws&0B&1E&1E?elqn#nfwklg>!nfwklg>!slpw!#,ebuj`lm-j`l!#~*8\t?,p`qjsw=\t-pfwBwwqjavwf+Bgnjmjpwqbwjlm>#mft#Bqqbz+*8?"Xfmgje^..=\tgjpsobz9aol`h8Vmelqwvmbwfoz/!=%maps8?,gju=,ebuj`lm-j`l!=>$pwzofpkffw$#jgfmwjej`bwjlm/#elq#f{bnsof/?oj=?b#kqfe>!,bm#bowfqmbwjufbp#b#qfpvow#lesw!=?,p`qjsw=\twzsf>!pvanjw!#\t+evm`wjlm+*#xqf`lnnfmgbwjlmelqn#b`wjlm>!,wqbmpelqnbwjlmqf`lmpwqv`wjlm-pwzof-gjpsobz#B``lqgjmd#wl#kjggfm!#mbnf>!bolmd#tjwk#wkfgl`vnfmw-algz-bssql{jnbwfoz#@lnnvmj`bwjlmpslpw!#b`wjlm>!nfbmjmd#%rvlw8..?"Xfmgje^..=Sqjnf#Njmjpwfq`kbqb`wfqjpwj`?,b=#?b#`obpp>wkf#kjpwlqz#le#lmnlvpflufq>!wkf#dlufqmnfmwkqfe>!kwwsp9,,tbp#lqjdjmbooztbp#jmwqlgv`fg`obppjej`bwjlmqfsqfpfmwbwjufbqf#`lmpjgfqfg?"Xfmgje^..=\t\tgfsfmgp#lm#wkfVmjufqpjwz#le#jm#`lmwqbpw#wl#sob`fklogfq>!jm#wkf#`bpf#lejmwfqmbwjlmbo#`lmpwjwvwjlmbopwzof>!alqgfq.9#evm`wjlm+*#xAf`bvpf#le#wkf.pwqj`w-gwg!=\t?wbaof#`obpp>!b``lnsbmjfg#azb``lvmw#le#wkf?p`qjsw#pq`>!,mbwvqf#le#wkf#wkf#sflsof#jm#jm#bggjwjlm#wlp*8#ip-jg#>#jg!#tjgwk>!233&!qfdbqgjmd#wkf#Qlnbm#@bwkloj`bm#jmgfsfmgfmwelooltjmd#wkf#-dje!#tjgwk>!2wkf#elooltjmd#gjp`qjnjmbwjlmbq`kbfloldj`bosqjnf#njmjpwfq-ip!=?,p`qjsw=`lnajmbwjlm#le#nbqdjmtjgwk>!`qfbwfFofnfmw+t-bwwb`kFufmw+?,b=?,wg=?,wq=pq`>!kwwsp9,,bJm#sbqwj`vobq/#bojdm>!ofew!#@yf`k#Qfsvaoj`Vmjwfg#Hjmdgln`lqqfpslmgfm`f`lm`ovgfg#wkbw-kwno!#wjwof>!+evm`wjlm#+*#x`lnfp#eqln#wkfbssoj`bwjlm#le?psbm#`obpp>!pafojfufg#wl#affnfmw+$p`qjsw$?,b=\t?,oj=\t?ojufqz#gjeefqfmw=?psbm#`obpp>!lswjlm#ubovf>!+bopl#hmltm#bp\n?oj=?b#kqfe>!=?jmsvw#mbnf>!pfsbqbwfg#eqlnqfefqqfg#wl#bp#ubojdm>!wls!=elvmgfq#le#wkfbwwfnswjmd#wl#`bqalm#gjl{jgf\t\t?gju#`obpp>!`obpp>!pfbq`k.,algz=\t?,kwno=lsslqwvmjwz#wl`lnnvmj`bwjlmp?,kfbg=\t?algz#pwzof>!tjgwk9Wj\rVSmd#Uj\rWkw`kbmdfp#jm#wkfalqgfq.`lolq9 3!#alqgfq>!3!#?,psbm=?,gju=?tbp#gjp`lufqfg!#wzsf>!wf{w!#*8\t?,p`qjsw=\t\tGfsbqwnfmw#le#f``ofpjbpwj`bowkfqf#kbp#affmqfpvowjmd#eqln?,algz=?,kwno=kbp#mfufq#affmwkf#ejqpw#wjnfjm#qfpslmpf#wlbvwlnbwj`booz#?,gju=\t\t?gju#jtbp#`lmpjgfqfgsfq`fmw#le#wkf!#,=?,b=?,gju=`loof`wjlm#le#gfp`fmgfg#eqlnpf`wjlm#le#wkfb``fsw.`kbqpfwwl#af#`lmevpfgnfnafq#le#wkf#sbggjmd.qjdkw9wqbmpobwjlm#lejmwfqsqfwbwjlm#kqfe>$kwws9,,tkfwkfq#lq#mlwWkfqf#bqf#boplwkfqf#bqf#nbmzb#pnboo#mvnafqlwkfq#sbqwp#lejnslppjaof#wl##`obpp>!avwwlmol`bwfg#jm#wkf-#Kltfufq/#wkfbmg#fufmwvboozBw#wkf#fmg#le#af`bvpf#le#jwpqfsqfpfmwp#wkf?elqn#b`wjlm>!#nfwklg>!slpw!jw#jp#slppjaofnlqf#ojhfoz#wlbm#jm`qfbpf#jmkbuf#bopl#affm`lqqfpslmgp#wlbmmlvm`fg#wkbwbojdm>!qjdkw!=nbmz#`lvmwqjfpelq#nbmz#zfbqpfbqojfpw#hmltmaf`bvpf#jw#tbpsw!=?,p`qjsw=#ubojdm>!wls!#jmkbajwbmwp#leelooltjmd#zfbq\t?gju#`obpp>!njoojlm#sflsof`lmwqlufqpjbo#`lm`fqmjmd#wkfbqdvf#wkbw#wkfdlufqmnfmw#bmgb#qfefqfm`f#wlwqbmpefqqfg#wlgfp`qjajmd#wkf#pwzof>!`lolq9bowklvdk#wkfqfafpw#hmltm#elqpvanjw!#mbnf>!nvowjsoj`bwjlmnlqf#wkbm#lmf#qf`ldmjwjlm#le@lvm`jo#le#wkffgjwjlm#le#wkf##?nfwb#mbnf>!Fmwfqwbjmnfmw#btbz#eqln#wkf#8nbqdjm.qjdkw9bw#wkf#wjnf#lejmufpwjdbwjlmp`lmmf`wfg#tjwkbmg#nbmz#lwkfqbowklvdk#jw#jpafdjmmjmd#tjwk#?psbm#`obpp>!gfp`fmgbmwp#le?psbm#`obpp>!j#bojdm>!qjdkw!?,kfbg=\t?algz#bpsf`wp#le#wkfkbp#pjm`f#affmFvqlsfbm#Vmjlmqfnjmjp`fmw#lenlqf#gjeej`vowUj`f#Sqfpjgfmw`lnslpjwjlm#lesbppfg#wkqlvdknlqf#jnslqwbmwelmw.pjyf922s{f{sobmbwjlm#lewkf#`lm`fsw#letqjwwfm#jm#wkf\n?psbm#`obpp>!jp#lmf#le#wkf#qfpfnaobm`f#wllm#wkf#dqlvmgptkj`k#`lmwbjmpjm`ovgjmd#wkf#gfejmfg#az#wkfsvaoj`bwjlm#lenfbmp#wkbw#wkflvwpjgf#le#wkfpvsslqw#le#wkf?jmsvw#`obpp>!?psbm#`obpp>!w+Nbwk-qbmgln+*nlpw#sqlnjmfmwgfp`qjswjlm#le@lmpwbmwjmlsoftfqf#svaojpkfg?gju#`obpp>!pfbssfbqp#jm#wkf2!#kfjdkw>!2!#nlpw#jnslqwbmwtkj`k#jm`ovgfptkj`k#kbg#affmgfpwqv`wjlm#lewkf#slsvobwjlm\t\n?gju#`obpp>!slppjajojwz#leplnfwjnfp#vpfgbssfbq#wl#kbufpv``fpp#le#wkfjmwfmgfg#wl#afsqfpfmw#jm#wkfpwzof>!`ofbq9a\t?,p`qjsw=\t?tbp#elvmgfg#jmjmwfqujft#tjwk\\jg!#`lmwfmw>!`bsjwbo#le#wkf\t?ojmh#qfo>!pqfofbpf#le#wkfsljmw#lvw#wkbw{NOKwwsQfrvfpwbmg#pvapfrvfmwpf`lmg#obqdfpwufqz#jnslqwbmwpsf`jej`bwjlmppvqeb`f#le#wkfbssojfg#wl#wkfelqfjdm#sloj`z\\pfwGlnbjmMbnffpwbaojpkfg#jmjp#afojfufg#wlJm#bggjwjlm#wlnfbmjmd#le#wkfjp#mbnfg#bewfqwl#sqlwf`w#wkfjp#qfsqfpfmwfgGf`obqbwjlm#lenlqf#feej`jfmw@obppjej`bwjlmlwkfq#elqnp#lekf#qfwvqmfg#wl?psbm#`obpp>!`sfqelqnbm`f#le+evm`wjlm+*#xje#bmg#lmoz#jeqfdjlmp#le#wkfofbgjmd#wl#wkfqfobwjlmp#tjwkVmjwfg#Mbwjlmppwzof>!kfjdkw9lwkfq#wkbm#wkfzsf!#`lmwfmw>!Bppl`jbwjlm#le\t?,kfbg=\t?algzol`bwfg#lm#wkfjp#qfefqqfg#wl+jm`ovgjmd#wkf`lm`fmwqbwjlmpwkf#jmgjujgvbobnlmd#wkf#nlpwwkbm#bmz#lwkfq,=\t?ojmh#qfo>!#qfwvqm#ebopf8wkf#svqslpf#lewkf#bajojwz#wl8`lolq9 eee~\t-\t?psbm#`obpp>!wkf#pvaif`w#legfejmjwjlmp#le=\t?ojmh#qfo>!`objn#wkbw#wkfkbuf#gfufolsfg?wbaof#tjgwk>!`fofaqbwjlm#leElooltjmd#wkf#wl#gjpwjmdvjpk?psbm#`obpp>!awbhfp#sob`f#jmvmgfq#wkf#mbnfmlwfg#wkbw#wkf=?"Xfmgje^..=\tpwzof>!nbqdjm.jmpwfbg#le#wkfjmwqlgv`fg#wkfwkf#sql`fpp#lejm`qfbpjmd#wkfgjeefqfm`fp#jmfpwjnbwfg#wkbwfpsf`jbooz#wkf,gju=?gju#jg>!tbp#fufmwvboozwkqlvdklvw#kjpwkf#gjeefqfm`fplnfwkjmd#wkbwpsbm=?,psbm=?,pjdmjej`bmwoz#=?,p`qjsw=\t\tfmujqlmnfmwbo#wl#sqfufmw#wkfkbuf#affm#vpfgfpsf`jbooz#elqvmgfqpwbmg#wkfjp#fppfmwjbooztfqf#wkf#ejqpwjp#wkf#obqdfpwkbuf#affm#nbgf!#pq`>!kwws9,,jmwfqsqfwfg#bppf`lmg#kboe#le`qloojmd>!ml!#jp#`lnslpfg#leJJ/#Kloz#Qlnbmjp#f{sf`wfg#wlkbuf#wkfjq#ltmgfejmfg#bp#wkfwqbgjwjlmbooz#kbuf#gjeefqfmwbqf#lewfm#vpfgwl#fmpvqf#wkbwbdqffnfmw#tjwk`lmwbjmjmd#wkfbqf#eqfrvfmwozjmelqnbwjlm#lmf{bnsof#jp#wkfqfpvowjmd#jm#b?,b=?,oj=?,vo=#`obpp>!ellwfqbmg#fpsf`jboozwzsf>!avwwlm!#?,psbm=?,psbm=tkj`k#jm`ovgfg=\t?nfwb#mbnf>!`lmpjgfqfg#wkf`bqqjfg#lvw#azKltfufq/#jw#jpaf`bnf#sbqw#lejm#qfobwjlm#wlslsvobq#jm#wkfwkf#`bsjwbo#letbp#leej`jbooztkj`k#kbp#affmwkf#Kjpwlqz#lebowfqmbwjuf#wlgjeefqfmw#eqlnwl#pvsslqw#wkfpvddfpwfg#wkbwjm#wkf#sql`fpp##?gju#`obpp>!wkf#elvmgbwjlmaf`bvpf#le#kjp`lm`fqmfg#tjwkwkf#vmjufqpjwzlsslpfg#wl#wkfwkf#`lmwf{w#le?psbm#`obpp>!swf{w!#mbnf>!r!\n\n?gju#`obpp>!wkf#p`jfmwjej`qfsqfpfmwfg#aznbwkfnbwj`jbmpfof`wfg#az#wkfwkbw#kbuf#affm=?gju#`obpp>!`gju#jg>!kfbgfqjm#sbqwj`vobq/`lmufqwfg#jmwl*8\t?,p`qjsw=\t?skjolplskj`bo#pqsphlkqubwphjwj\rVSmd#Uj\rWkw<L=o=m=m<V<T<U=l=o=m=m<V<T<Ujmufpwjdb`j/_msbqwj`jsb`j/_m<V<R=n<R=l=g<Y<R<]<W<\\=m=n<T<V<R=n<R=l=g<U=k<Y<W<R<^<Y<V=m<T=m=n<Y<P=g<q<R<^<R=m=n<T<V<R=n<R=l=g=i<R<]<W<\\=m=n=`<^=l<Y<P<Y<Q<T<V<R=n<R=l<\\=c=m<Y<_<R<X<Q=c=m<V<\\=k<\\=n=`<Q<R<^<R=m=n<T<O<V=l<\\<T<Q=g<^<R<S=l<R=m=g<V<R=n<R=l<R<U=m<X<Y<W<\\=n=`<S<R<P<R=e=`=b=m=l<Y<X=m=n<^<R<]=l<\\<[<R<P=m=n<R=l<R<Q=g=o=k<\\=m=n<T<Y=n<Y=k<Y<Q<T<Y<<W<\\<^<Q<\\=c<T=m=n<R=l<T<T=m<T=m=n<Y<P<\\=l<Y=d<Y<Q<T=c<M<V<\\=k<\\=n=`<S<R=a=n<R<P=o=m<W<Y<X=o<Y=n=m<V<\\<[<\\=n=`=n<R<^<\\=l<R<^<V<R<Q<Y=k<Q<R=l<Y=d<Y<Q<T<Y<V<R=n<R=l<R<Y<R=l<_<\\<Q<R<^<V<R=n<R=l<R<P<L<Y<V<W<\\<P<\\4K5h5i5j4F4C5e5i5j4F4C5f4K4F4K5h5i5d4Z5d4U4K5h4D4]4K5i4@4K5h5i5d4K5n4U4K5h4]4_4K4J5h5i4X4K4]5o4K4F4K5h4O4U4Z4K4M4K5h4]5f4K4Z4E4K5h4F4Y5i5f5i4K5h4K4U4Z4K4M4K5h5j4F4K4J4@4K5h4O5h4U4K4D4K5h4F4_4@5f5h4K5h4O5n4_4K5i4K5h4Z4V4[4K4F4K5h5m5f4C5f5d4K5h4F4]4A5f4D4K5h4@4C5f4C4E4K5h4F4U5h5f5i4K5h4O4B4D4K4]4K5h4K5m5h4K5i4K5h4O5m5h4K5i4K5h4F4K4]5f4B4K5h4F5n5j5f4E4K5h4K5h4U4K4D4K5h4B5d4K4[4]4K5h5i4@4F5i4U4K5h4C5f5o5d4]4K5h4_5f4K4A4E4U4D4C4K5h5h5k4K5h4F4]4D5f4E4K5h4]5d4K4D4[4K5h4O4C4D5f4E4K5h4K4B4D4K4]4K5h5i4F4A4C4E4K5h4K4V4K5j5f`vqplq9sljmwfq8?,wjwof=\t?nfwb#!#kqfe>!kwws9,,!=?psbm#`obpp>!nfnafqp#le#wkf#tjmglt-ol`bwjlmufqwj`bo.bojdm9,b=##?b#kqfe>!?"gl`wzsf#kwno=nfgjb>!p`qffm!#?lswjlm#ubovf>!ebuj`lm-j`l!#,=\t\n\n?gju#`obpp>!`kbqb`wfqjpwj`p!#nfwklg>!dfw!#,algz=\t?,kwno=\tpklqw`vw#j`lm!#gl`vnfmw-tqjwf+sbggjmd.alwwln9qfsqfpfmwbwjufppvanjw!#ubovf>!bojdm>!`fmwfq!#wkqlvdklvw#wkf#p`jfm`f#ej`wjlm\t##?gju#`obpp>!pvanjw!#`obpp>!lmf#le#wkf#nlpw#ubojdm>!wls!=?tbp#fpwbaojpkfg*8\t?,p`qjsw=\tqfwvqm#ebopf8!=*-pwzof-gjpsobzaf`bvpf#le#wkf#gl`vnfmw-`llhjf?elqn#b`wjlm>!,~algzxnbqdjm938Fm`z`olsfgjb#leufqpjlm#le#wkf#-`qfbwfFofnfmw+mbnf!#`lmwfmw>!?,gju=\t?,gju=\t\tbgnjmjpwqbwjuf#?,algz=\t?,kwno=kjpwlqz#le#wkf#!=?jmsvw#wzsf>!slqwjlm#le#wkf#bp#sbqw#le#wkf#%maps8?b#kqfe>!lwkfq#`lvmwqjfp!=\t?gju#`obpp>!?,psbm=?,psbm=?Jm#lwkfq#tlqgp/gjpsobz9#aol`h8`lmwqlo#le#wkf#jmwqlgv`wjlm#le,=\t?nfwb#mbnf>!bp#tfoo#bp#wkf#jm#qf`fmw#zfbqp\t\n?gju#`obpp>!?,gju=\t\n?,gju=\tjmpsjqfg#az#wkfwkf#fmg#le#wkf#`lnsbwjaof#tjwkaf`bnf#hmltm#bp#pwzof>!nbqdjm9-ip!=?,p`qjsw=?#Jmwfqmbwjlmbo#wkfqf#kbuf#affmDfqnbm#obmdvbdf#pwzof>!`lolq9 @lnnvmjpw#Sbqwz`lmpjpwfmw#tjwkalqgfq>!3!#`foo#nbqdjmkfjdkw>!wkf#nbilqjwz#le!#bojdm>!`fmwfqqfobwfg#wl#wkf#nbmz#gjeefqfmw#Lqwklgl{#@kvq`kpjnjobq#wl#wkf#,=\t?ojmh#qfo>!ptbp#lmf#le#wkf#vmwjo#kjp#gfbwk~*+*8\t?,p`qjsw=lwkfq#obmdvbdfp`lnsbqfg#wl#wkfslqwjlmp#le#wkfwkf#Mfwkfqobmgpwkf#nlpw#`lnnlmab`hdqlvmg9vqo+bqdvfg#wkbw#wkfp`qloojmd>!ml!#jm`ovgfg#jm#wkfMlqwk#Bnfqj`bm#wkf#mbnf#le#wkfjmwfqsqfwbwjlmpwkf#wqbgjwjlmbogfufolsnfmw#le#eqfrvfmwoz#vpfgb#`loof`wjlm#leufqz#pjnjobq#wlpvqqlvmgjmd#wkff{bnsof#le#wkjpbojdm>!`fmwfq!=tlvog#kbuf#affmjnbdf\\`bswjlm#>bwwb`kfg#wl#wkfpvddfpwjmd#wkbwjm#wkf#elqn#le#jmuloufg#jm#wkfjp#gfqjufg#eqlnmbnfg#bewfq#wkfJmwqlgv`wjlm#wlqfpwqj`wjlmp#lm#pwzof>!tjgwk9#`bm#af#vpfg#wl#wkf#`qfbwjlm#lenlpw#jnslqwbmw#jmelqnbwjlm#bmgqfpvowfg#jm#wkf`loobspf#le#wkfWkjp#nfbmp#wkbwfofnfmwp#le#wkftbp#qfsob`fg#azbmbozpjp#le#wkfjmpsjqbwjlm#elqqfdbqgfg#bp#wkfnlpw#pv``fppevohmltm#bp#%rvlw8b#`lnsqfkfmpjufKjpwlqz#le#wkf#tfqf#`lmpjgfqfgqfwvqmfg#wl#wkfbqf#qfefqqfg#wlVmplvq`fg#jnbdf=\t\n?gju#`obpp>!`lmpjpwp#le#wkfpwlsSqlsbdbwjlmjmwfqfpw#jm#wkfbubjobajojwz#lebssfbqp#wl#kbuffof`wqlnbdmfwj`fmbaofPfquj`fp+evm`wjlm#le#wkfJw#jp#jnslqwbmw?,p`qjsw=?,gju=evm`wjlm+*xubq#qfobwjuf#wl#wkfbp#b#qfpvow#le#wkf#slpjwjlm#leElq#f{bnsof/#jm#nfwklg>!slpw!#tbp#elooltfg#az%bns8ngbpk8#wkfwkf#bssoj`bwjlmip!=?,p`qjsw=\tvo=?,gju=?,gju=bewfq#wkf#gfbwktjwk#qfpsf`w#wlpwzof>!sbggjmd9jp#sbqwj`vobqozgjpsobz9jmojmf8#wzsf>!pvanjw!#jp#gjujgfg#jmwl\bTA\nzk#+\vBl\bQ*qfpslmpbajojgbgbgnjmjpwqb`j/_mjmwfqmb`jlmbofp`lqqfpslmgjfmwf\fHe\fHF\fHC\fIg\fH{\fHF\fIn\fH\\\fIa\fHY\fHU\fHB\fHR\fH\\\fIk\fH^\fIg\fH{\fIg\fHn\fHv\fIm\fHD\fHR\fHY\fH^\fIk\fHy\fHS\fHD\fHT\fH\\\fHy\fHR\fH\\\fHF\fIm\fH^\fHS\fHT\fHz\fIg\fHp\fIk\fHn\fHv\fHR\fHU\fHS\fHc\fHA\fIk\fHp\fIk\fHn\fHZ\fHR\fHB\fHS\fH^\fHU\fHB\fHR\fH\\\fIl\fHp\fHR\fH{\fH\\\fHO\fH@\fHD\fHR\fHD\fIk\fHy\fIm\fHB\fHR\fH\\\fH@\fIa\fH^\fIe\fH{\fHB\fHR\fH^\fHS\fHy\fHB\fHU\fHS\fH^\fHR\fHF\fIo\fH[\fIa\fHL\fH@\fHN\fHP\fHH\fIk\fHA\fHR\fHp\fHF\fHR\fHy\fIa\fH^\fHS\fHy\fHs\fIa\fH\\\fIk\fHD\fHz\fHS\fH^\fHR\fHG\fHJ\fI`\fH\\\fHR\fHD\fHB\fHR\fHB\fH^\fIk\fHB\fHH\fHJ\fHR\fHD\fH@\fHR\fHp\fHR\fH\\\fHY\fHS\fHy\fHR\fHT\fHy\fIa\fHC\fIg\fHn\fHv\fHR\fHU\fHH\fIk\fHF\fHU\fIm\fHm\fHv\fH@\fHH\fHR\fHC\fHR\fHT\fHn\fHY\fHR\fHJ\fHJ\fIk\fHz\fHD\fIk\fHF\fHS\fHw\fH^\fIk\fHY\fHS\fHZ\fIk\fH[\fH\\\fHR\fHp\fIa\fHC\fHe\fHH\fIa\fHH\fH\\\fHB\fIm\fHn\fH@\fHd\fHJ\fIg\fHD\fIg\fHn\fHe\fHF\fHy\fH\\\fHO\fHF\fHN\fHP\fIk\fHn\fHT\fIa\fHI\fHS\fHH\fHG\fHS\fH^\fIa\fHB\fHB\fIm\fHz\fIa\fHC\fHi\fHv\fIa\fHw\fHR\fHw\fIn\fHs\fHH\fIl\fHT\fHn\fH{\fIl\fHH\fHp\fHR\fHc\fH{\fHR\fHY\fHS\fHA\fHR\fH{\fHt\fHO\fIa\fHs\fIk\fHJ\fIn\fHT\fH\\\fIk\fHJ\fHS\fHD\fIg\fHn\fHU\fHH\fIa\fHC\fHR\fHT\fIk\fHy\fIa\fHT\fH{\fHR\fHn\fHK\fIl\fHY\fHS\fHZ\fIa\fHY\fH\\\fHR\fHH\fIk\fHn\fHJ\fId\fHs\fIa\fHT\fHD\fHy\fIa\fHZ\fHR\fHT\fHR\fHB\fHD\fIk\fHi\fHJ\fHR\fH^\fHH\fH@\fHS\fHp\fH^\fIl\fHF\fIm\fH\\\fIn\fH[\fHU\fHS\fHn\fHJ\fIl\fHB\fHS\fHH\fIa\fH\\\fHy\fHY\fHS\fHH\fHR\fH\\\fIm\fHF\fHC\fIk\fHT\fIa\fHI\fHR\fHD\fHy\fH\\\fIg\fHM\fHP\fHB\fIm\fHy\fIa\fHH\fHC\fIg\fHp\fHD\fHR\fHy\fIo\fHF\fHC\fHR\fHF\fIg\fHT\fIa\fHs\fHt\fH\\\fIk\fH^\fIn\fHy\fHR\fH\\\fIa\fHC\fHY\fHS\fHv\fHR\fH\\\fHT\fIn\fHv\fHD\fHR\fHB\fIn\fH^\fIa\fHC\fHJ\fIk\fHz\fIk\fHn\fHU\fHB\fIk\fHZ\fHR\fHT\fIa\fHy\fIn\fH^\fHB\fId\fHn\fHD\fIk\fHH\fId\fHC\fHR\fH\\\fHp\fHS\fHT\fHy\fIkqpp({no!#wjwof>!.wzsf!#`lmwfmw>!wjwof!#`lmwfmw>!bw#wkf#pbnf#wjnf-ip!=?,p`qjsw=\t?!#nfwklg>!slpw!#?,psbm=?,b=?,oj=ufqwj`bo.bojdm9w,irvfqz-njm-ip!=-`oj`h+evm`wjlm+#pwzof>!sbggjmd.~*+*8\t?,p`qjsw=\t?,psbm=?b#kqfe>!?b#kqfe>!kwws9,,*8#qfwvqm#ebopf8wf{w.gf`lqbwjlm9#p`qloojmd>!ml!#alqgfq.`loobspf9bppl`jbwfg#tjwk#Abkbpb#JmglmfpjbFmdojpk#obmdvbdf?wf{w#{no9psb`f>-dje!#alqgfq>!3!?,algz=\t?,kwno=\tlufqeolt9kjggfm8jnd#pq`>!kwws9,,bggFufmwOjpwfmfqqfpslmpjaof#elq#p-ip!=?,p`qjsw=\t,ebuj`lm-j`l!#,=lsfqbwjmd#pzpwfn!#pwzof>!tjgwk92wbqdfw>!\\aobmh!=Pwbwf#Vmjufqpjwzwf{w.bojdm9ofew8\tgl`vnfmw-tqjwf+/#jm`ovgjmd#wkf#bqlvmg#wkf#tlqog*8\t?,p`qjsw=\t?!#pwzof>!kfjdkw98lufqeolt9kjggfmnlqf#jmelqnbwjlmbm#jmwfqmbwjlmbob#nfnafq#le#wkf#lmf#le#wkf#ejqpw`bm#af#elvmg#jm#?,gju=\t\n\n?,gju=\tgjpsobz9#mlmf8!=!#,=\t?ojmh#qfo>!\t##+evm`wjlm+*#xwkf#26wk#`fmwvqz-sqfufmwGfebvow+obqdf#mvnafq#le#Azybmwjmf#Fnsjqf-isdwkvnaofewubpw#nbilqjwz#lenbilqjwz#le#wkf##bojdm>!`fmwfq!=Vmjufqpjwz#Sqfppglnjmbwfg#az#wkfPf`lmg#Tlqog#Tbqgjpwqjavwjlm#le#pwzof>!slpjwjlm9wkf#qfpw#le#wkf#`kbqb`wfqjyfg#az#qfo>!mleloolt!=gfqjufp#eqln#wkfqbwkfq#wkbm#wkf#b#`lnajmbwjlm#lepwzof>!tjgwk9233Fmdojpk.psfbhjmd`lnsvwfq#p`jfm`falqgfq>!3!#bow>!wkf#f{jpwfm`f#leGfnl`qbwj`#Sbqwz!#pwzof>!nbqdjm.Elq#wkjp#qfbplm/-ip!=?,p`qjsw=\t\npAzWbdMbnf+p*X3^ip!=?,p`qjsw=\t?-ip!=?,p`qjsw=\tojmh#qfo>!j`lm!#$#bow>$$#`obpp>$elqnbwjlm#le#wkfufqpjlmp#le#wkf#?,b=?,gju=?,gju=,sbdf=\t##?sbdf=\t?gju#`obpp>!`lmwaf`bnf#wkf#ejqpwabkbpb#Jmglmfpjbfmdojpk#+pjnsof*"y"W"W"["Q"U"V"@=i=l<^<\\=n=m<V<T<V<R<P<S<\\<Q<T<T=c<^<W=c<Y=n=m=c<x<R<]<\\<^<T=n=`=k<Y<W<R<^<Y<V<\\=l<\\<[<^<T=n<T=c<t<Q=n<Y=l<Q<Y=n<r=n<^<Y=n<T=n=`<Q<\\<S=l<T<P<Y=l<T<Q=n<Y=l<Q<Y=n<V<R=n<R=l<R<_<R=m=n=l<\\<Q<T=j=g<V<\\=k<Y=m=n<^<Y=o=m<W<R<^<T=c=i<S=l<R<]<W<Y<P=g<S<R<W=o=k<T=n=`=c<^<W=c=b=n=m=c<Q<\\<T<]<R<W<Y<Y<V<R<P<S<\\<Q<T=c<^<Q<T<P<\\<Q<T<Y=m=l<Y<X=m=n<^<\\4K5h5i5d4K4Z5f4U4K5h4]4J5f4_5f4E4K5h4K5j4F5n4K5h5i4X4K4]5o4K4F5o4K5h4_5f4K4]4K4F4K5h5i5o4F5d4D4E4K5h4_4U5d4C5f4E4K4A4Y4K4J5f4K4F4K5h4U4K5h5i5f4E4K5h4Y5d4F5f4K4F4K5h4K5j4F4]5j4F4K5h4F4Y4K5i5f5i4K5h4I4_5h4K5i5f4K5h5i4X4K4]5o4E4K5h5i4]4J5f4K4Fqlalwp!#`lmwfmw>!?gju#jg>!ellwfq!=wkf#Vmjwfg#Pwbwfp?jnd#pq`>!kwws9,,-isdqjdkwwkvna-ip!=?,p`qjsw=\t?ol`bwjlm-sqlwl`loeqbnfalqgfq>!3!#p!#,=\t?nfwb#mbnf>!?,b=?,gju=?,gju=?elmw.tfjdkw9alog8%rvlw8#bmg#%rvlw8gfsfmgjmd#lm#wkf#nbqdjm938sbggjmd9!#qfo>!mleloolt!#Sqfpjgfmw#le#wkf#wtfmwjfwk#`fmwvqzfujpjlm=\t##?,sbdfJmwfqmfw#F{solqfqb-bpzm`#>#wqvf8\tjmelqnbwjlm#balvw?gju#jg>!kfbgfq!=!#b`wjlm>!kwws9,,?b#kqfe>!kwwsp9,,?gju#jg>!`lmwfmw!?,gju=\t?,gju=\t?gfqjufg#eqln#wkf#?jnd#pq`>$kwws9,,b``lqgjmd#wl#wkf#\t?,algz=\t?,kwno=\tpwzof>!elmw.pjyf9p`qjsw#obmdvbdf>!Bqjbo/#Kfoufwj`b/?,b=?psbm#`obpp>!?,p`qjsw=?p`qjsw#slojwj`bo#sbqwjfpwg=?,wq=?,wbaof=?kqfe>!kwws9,,ttt-jmwfqsqfwbwjlm#leqfo>!pwzofpkffw!#gl`vnfmw-tqjwf+$?`kbqpfw>!vwe.;!=\tafdjmmjmd#le#wkf#qfufbofg#wkbw#wkfwfofujpjlm#pfqjfp!#qfo>!mleloolt!=#wbqdfw>!\\aobmh!=`objnjmd#wkbw#wkfkwws&0B&1E&1Ettt-nbmjefpwbwjlmp#leSqjnf#Njmjpwfq#lejmeovfm`fg#az#wkf`obpp>!`ofbqej{!=,gju=\t?,gju=\t\twkqff.gjnfmpjlmbo@kvq`k#le#Fmdobmgle#Mlqwk#@bqlojmbprvbqf#hjolnfwqfp-bggFufmwOjpwfmfqgjpwjm`w#eqln#wkf`lnnlmoz#hmltm#bpSklmfwj`#Boskbafwgf`obqfg#wkbw#wkf`lmwqloofg#az#wkfAfmibnjm#Eqbmhojmqlof.sobzjmd#dbnfwkf#Vmjufqpjwz#lejm#Tfpwfqm#Fvqlsfsfqplmbo#`lnsvwfqSqlif`w#Dvwfmafqdqfdbqgofpp#le#wkfkbp#affm#sqlslpfgwldfwkfq#tjwk#wkf=?,oj=?oj#`obpp>!jm#plnf#`lvmwqjfpnjm-ip!=?,p`qjsw=le#wkf#slsvobwjlmleej`jbo#obmdvbdf?jnd#pq`>!jnbdfp,jgfmwjejfg#az#wkfmbwvqbo#qfplvq`fp`obppjej`bwjlm#le`bm#af#`lmpjgfqfgrvbmwvn#nf`kbmj`pMfufqwkfofpp/#wkfnjoojlm#zfbqp#bdl?,algz=\t?,kwno="y"W"W"["Q"U"V"@\twbhf#bgubmwbdf#lebmg/#b``lqgjmd#wlbwwqjavwfg#wl#wkfNj`qlplew#Tjmgltpwkf#ejqpw#`fmwvqzvmgfq#wkf#`lmwqlogju#`obpp>!kfbgfqpklqwoz#bewfq#wkfmlwbaof#f{`fswjlmwfmp#le#wklvpbmgppfufqbo#gjeefqfmwbqlvmg#wkf#tlqog-qfb`kjmd#njojwbqzjplobwfg#eqln#wkflsslpjwjlm#wl#wkfwkf#Log#WfpwbnfmwBeqj`bm#Bnfqj`bmpjmpfqwfg#jmwl#wkfpfsbqbwf#eqln#wkfnfwqlslojwbm#bqfbnbhfp#jw#slppjaofb`hmltofgdfg#wkbwbqdvbaoz#wkf#nlpwwzsf>!wf{w,`pp!=\twkf#JmwfqmbwjlmboB``lqgjmd#wl#wkf#sf>!wf{w,`pp!#,=\t`ljm`jgf#tjwk#wkfwtl.wkjqgp#le#wkfGvqjmd#wkjp#wjnf/gvqjmd#wkf#sfqjlgbmmlvm`fg#wkbw#kfwkf#jmwfqmbwjlmbobmg#nlqf#qf`fmwozafojfufg#wkbw#wkf`lmp`jlvpmfpp#bmgelqnfqoz#hmltm#bppvqqlvmgfg#az#wkfejqpw#bssfbqfg#jml``bpjlmbooz#vpfgslpjwjlm9baplovwf8!#wbqdfw>!\\aobmh!#slpjwjlm9qfobwjuf8wf{w.bojdm9`fmwfq8ib{,ojap,irvfqz,2-ab`hdqlvmg.`lolq9 wzsf>!bssoj`bwjlm,bmdvbdf!#`lmwfmw>!?nfwb#kwws.frvju>!Sqjub`z#Sloj`z?,b=f+!&0@p`qjsw#pq`>$!#wbqdfw>!\\aobmh!=Lm#wkf#lwkfq#kbmg/-isdwkvnaqjdkw1?,gju=?gju#`obpp>!?gju#pwzof>!eolbw9mjmfwffmwk#`fmwvqz?,algz=\t?,kwno=\t?jnd#pq`>!kwws9,,p8wf{w.bojdm9`fmwfqelmw.tfjdkw9#alog8#B``lqgjmd#wl#wkf#gjeefqfm`f#afwtffm!#eqbnfalqgfq>!3!#!#pwzof>!slpjwjlm9ojmh#kqfe>!kwws9,,kwno7,ollpf-gwg!=\tgvqjmd#wkjp#sfqjlg?,wg=?,wq=?,wbaof=`olpfoz#qfobwfg#wlelq#wkf#ejqpw#wjnf8elmw.tfjdkw9alog8jmsvw#wzsf>!wf{w!#?psbm#pwzof>!elmw.lmqfbgzpwbwf`kbmdf\n?gju#`obpp>!`ofbqgl`vnfmw-ol`bwjlm-#Elq#f{bnsof/#wkf#b#tjgf#ubqjfwz#le#?"GL@WZSF#kwno=\t?%maps8%maps8%maps8!=?b#kqfe>!kwws9,,pwzof>!eolbw9ofew8`lm`fqmfg#tjwk#wkf>kwws&0B&1E&1Ettt-jm#slsvobq#`vowvqfwzsf>!wf{w,`pp!#,=jw#jp#slppjaof#wl#Kbqubqg#Vmjufqpjwzwzofpkffw!#kqfe>!,wkf#nbjm#`kbqb`wfqL{elqg#Vmjufqpjwz##mbnf>!hfztlqgp!#`pwzof>!wf{w.bojdm9wkf#Vmjwfg#Hjmdglnefgfqbo#dlufqmnfmw?gju#pwzof>!nbqdjm#gfsfmgjmd#lm#wkf#gfp`qjswjlm#le#wkf?gju#`obpp>!kfbgfq-njm-ip!=?,p`qjsw=gfpwqv`wjlm#le#wkfpojdkwoz#gjeefqfmwjm#b``lqgbm`f#tjwkwfof`lnnvmj`bwjlmpjmgj`bwfp#wkbw#wkfpklqwoz#wkfqfbewfqfpsf`jbooz#jm#wkf#Fvqlsfbm#`lvmwqjfpKltfufq/#wkfqf#bqfpq`>!kwws9,,pwbwj`pvddfpwfg#wkbw#wkf!#pq`>!kwws9,,ttt-b#obqdf#mvnafq#le#Wfof`lnnvmj`bwjlmp!#qfo>!mleloolt!#wKloz#Qlnbm#Fnsfqlqbonlpw#f{`ovpjufoz!#alqgfq>!3!#bow>!Pf`qfwbqz#le#Pwbwf`vonjmbwjmd#jm#wkf@JB#Tlqog#Eb`wallhwkf#nlpw#jnslqwbmwbmmjufqpbqz#le#wkfpwzof>!ab`hdqlvmg.?oj=?fn=?b#kqfe>!,wkf#Bwobmwj`#L`fbmpwqj`woz#psfbhjmd/pklqwoz#afelqf#wkfgjeefqfmw#wzsfp#lewkf#Lwwlnbm#Fnsjqf=?jnd#pq`>!kwws9,,Bm#Jmwqlgv`wjlm#wl`lmpfrvfm`f#le#wkfgfsbqwvqf#eqln#wkf@lmefgfqbwf#Pwbwfpjmgjdfmlvp#sflsofpSql`ffgjmdp#le#wkfjmelqnbwjlm#lm#wkfwkflqjfp#kbuf#affmjmuloufnfmw#jm#wkfgjujgfg#jmwl#wkqffbgib`fmw#`lvmwqjfpjp#qfpslmpjaof#elqgjpplovwjlm#le#wkf`loobalqbwjlm#tjwktjgfoz#qfdbqgfg#bpkjp#`lmwfnslqbqjfpelvmgjmd#nfnafq#leGlnjmj`bm#Qfsvaoj`dfmfqbooz#b``fswfgwkf#slppjajojwz#lebqf#bopl#bubjobaofvmgfq#`lmpwqv`wjlmqfpwlqbwjlm#le#wkfwkf#dfmfqbo#svaoj`jp#bonlpw#fmwjqfozsbppfp#wkqlvdk#wkfkbp#affm#pvddfpwfg`lnsvwfq#bmg#ujgflDfqnbmj`#obmdvbdfp#b``lqgjmd#wl#wkf#gjeefqfmw#eqln#wkfpklqwoz#bewfqtbqgpkqfe>!kwwsp9,,ttt-qf`fmw#gfufolsnfmwAlbqg#le#Gjqf`wlqp?gju#`obpp>!pfbq`k#?b#kqfe>!kwws9,,Jm#sbqwj`vobq/#wkfNvowjsof#ellwmlwfplq#lwkfq#pvapwbm`fwklvpbmgp#le#zfbqpwqbmpobwjlm#le#wkf?,gju=\t?,gju=\t\t?b#kqfe>!jmgf{-skstbp#fpwbaojpkfg#jmnjm-ip!=?,p`qjsw=\tsbqwj`jsbwf#jm#wkfb#pwqlmd#jmeovfm`fpwzof>!nbqdjm.wls9qfsqfpfmwfg#az#wkfdqbgvbwfg#eqln#wkfWqbgjwjlmbooz/#wkfFofnfmw+!p`qjsw!*8Kltfufq/#pjm`f#wkf,gju=\t?,gju=\t?gju#ofew8#nbqdjm.ofew9sqlwf`wjlm#bdbjmpw38#ufqwj`bo.bojdm9Vmelqwvmbwfoz/#wkfwzsf>!jnbdf,{.j`lm,gju=\t?gju#`obpp>!#`obpp>!`ofbqej{!=?gju#`obpp>!ellwfq\n\n?,gju=\t\n\n?,gju=\twkf#nlwjlm#sj`wvqf<}=f<W<_<\\=l=m<V<T<]=f<W<_<\\=l=m<V<T<H<Y<X<Y=l<\\=j<T<T<Q<Y=m<V<R<W=`<V<R=m<R<R<]=e<Y<Q<T<Y=m<R<R<]=e<Y<Q<T=c<S=l<R<_=l<\\<P<P=g<r=n<S=l<\\<^<T=n=`<]<Y=m<S<W<\\=n<Q<R<P<\\=n<Y=l<T<\\<W=g<S<R<[<^<R<W=c<Y=n<S<R=m<W<Y<X<Q<T<Y=l<\\<[<W<T=k<Q=g=i<S=l<R<X=o<V=j<T<T<S=l<R<_=l<\\<P<P<\\<S<R<W<Q<R=m=n=`=b<Q<\\=i<R<X<T=n=m=c<T<[<]=l<\\<Q<Q<R<Y<Q<\\=m<Y<W<Y<Q<T=c<T<[<P<Y<Q<Y<Q<T=c<V<\\=n<Y<_<R=l<T<T<|<W<Y<V=m<\\<Q<X=l\fHJ\fIa\fHY\fHR\fH\\\fHR\fHB\fId\fHD\fIm\fHi\fH^\fHF\fIa\fH\\\fHJ\fHR\fHD\fHA\fHR\fH\\\fHH\fIl\fHC\fHi\fHD\fIm\fHJ\fIk\fHZ\fHU\fHS\fHD\fIa\fHJ\fIl\fHk\fHn\fHM\fHS\fHC\fHR\fHJ\fHS\fH^\fIa\fH^\fIl\fHi\fHK\fHS\fHy\fHR\fH\\\fHY\fIl\fHM\fHS\fHC\fIg\fHv\fHS\fHs\fIa\fHL\fIk\fHT\fHB\fHR\fHv\fHR\fH\\\fHp\fHn\fHy\fIa\fHZ\fHD\fHJ\fIm\fHD\fHS\fHC\fHR\fHF\fIa\fH\\\fHC\fIg\fH{\fHi\fHD\fIm\fHT\fHR\fH\\\fH}\fHD\fH^\fHR\fHk\fHD\fHF\fHR\fH\\\fIa\fHs\fIl\fHZ\fH\\\fIa\fHH\fIg\fHn\fH^\fIg\fHy\fHT\fHA\fHR\fHG\fHP\fIa\fH^\fId\fHZ\fHZ\fH\\\fIa\fHH\fIk\fHn\fHF\fIa\fH\\\fHJ\fIk\fHZ\fHF\fIa\fH^\fIk\fHC\fH\\\fHy\fIk\fHn\fHJ\fIa\fH\\\fHT\fIa\fHI\fHS\fHH\fHS\fHe\fHH\fIa\fHF\fHR\fHJ\fHe\fHD\fIa\fHU\fIk\fHn\fHv\fHS\fHs\fIa\fHL\fHR\fHC\fHR\fHH\fIa\fH\\\fHR\fHp\fIa\fHC\fHR\fHJ\fHR\fHF\fIm\fH\\\fHR\fHD\fIk\fHp\fIg\fHM\fHP\fIk\fHn\fHi\fHD\fIm\fHY\fHR\fHJ\fHZ\fIa\fH\\\fIk\fHO\fIl\fHZ\fHS\fHy\fIa\fH[\fHR\fHT\fH\\\fHy\fHR\fH\\\fIl\fHT\fHn\fH{\fIa\fH\\\fHU\fHF\fH\\\fHS\fHO\fHR\fHB\fH@\fIa\fH\\\fHR\fHn\fHM\fH@\fHv\fIa\fHv\fIg\fHn\fHe\fHF\fH^\fH@\fIa\fHK\fHB\fHn\fHH\fIa\fH\\\fIl\fHT\fHn\fHF\fH\\\fIa\fHy\fHe\fHB\fIa\fHB\fIl\fHJ\fHB\fHR\fHK\fIa\fHC\fHB\fHT\fHU\fHR\fHC\fHH\fHR\fHZ\fH@\fIa\fHJ\fIg\fHn\fHB\fIl\fHM\fHS\fHC\fHR\fHj\fHd\fHF\fIl\fHc\fH^\fHB\fIg\fH@\fHR\fHk\fH^\fHT\fHn\fHz\fIa\fHC\fHR\fHj\fHF\fH\\\fIk\fHZ\fHD\fHi\fHD\fIm\fH@\fHn\fHK\fH@\fHR\fHp\fHP\fHR\fH\\\fHD\fHY\fIl\fHD\fHH\fHB\fHF\fIa\fH\\\fHB\fIm\fHz\fHF\fIa\fH\\\fHZ\fIa\fHD\fHF\fH\\\fHS\fHY\fHR\fH\\\fHD\fIm\fHy\fHT\fHR\fHD\fHT\fHB\fH\\\fIa\fHI\fHD\fHj\fHC\fIg\fHp\fHS\fHH\fHT\fIg\fHB\fHY\fHR\fH\\4K5h5i4X4K4]5o4K4F4K5h5i5j4F4C5f4K4F4K5h5o5i4D5f5d4F4]4K5h5i4X4K5k4C4K4F4U4C4C4K5h4^5d4K4]4U4C4C4K5h4]4C5d4C4K5h4I4_5h4K5i5f4E4K5h5m5d4F5d4X5d4D4K5h5i4_4K4D5n4K4F4K5h5i4U5h5d5i4K4F4K5h5i4_5h4_5h4K4F4K5h4@4]4K5m5f5o4_4K5h4K4_5h4K5i5f4E4K5h4K4F4Y4K5h4K4Fhfztlqgp!#`lmwfmw>!t0-lqd,2:::,{kwno!=?b#wbqdfw>!\\aobmh!#wf{w,kwno8#`kbqpfw>!#wbqdfw>!\\aobmh!=?wbaof#`foosbggjmd>!bvwl`lnsofwf>!lee!#wf{w.bojdm9#`fmwfq8wl#obpw#ufqpjlm#az#ab`hdqlvmg.`lolq9# !#kqfe>!kwws9,,ttt-,gju=?,gju=?gju#jg>?b#kqfe>! !#`obpp>!!=?jnd#pq`>!kwws9,,`qjsw!#pq`>!kwws9,,\t?p`qjsw#obmdvbdf>!,,FM!#!kwws9,,ttt-tfm`lgfVQJ@lnslmfmw+!#kqfe>!ibubp`qjsw9?gju#`obpp>!`lmwfmwgl`vnfmw-tqjwf+$?p`slpjwjlm9#baplovwf8p`qjsw#pq`>!kwws9,,#pwzof>!nbqdjm.wls9-njm-ip!=?,p`qjsw=\t?,gju=\t?gju#`obpp>!t0-lqd,2:::,{kwno!#\t\t?,algz=\t?,kwno=gjpwjm`wjlm#afwtffm,!#wbqdfw>!\\aobmh!=?ojmh#kqfe>!kwws9,,fm`lgjmd>!vwe.;!<=\tt-bggFufmwOjpwfmfq<b`wjlm>!kwws9,,ttt-j`lm!#kqfe>!kwws9,,#pwzof>!ab`hdqlvmg9wzsf>!wf{w,`pp!#,=\tnfwb#sqlsfqwz>!ld9w?jmsvw#wzsf>!wf{w!##pwzof>!wf{w.bojdm9wkf#gfufolsnfmw#le#wzofpkffw!#wzsf>!wfkwno8#`kbqpfw>vwe.;jp#`lmpjgfqfg#wl#afwbaof#tjgwk>!233&!#Jm#bggjwjlm#wl#wkf#`lmwqjavwfg#wl#wkf#gjeefqfm`fp#afwtffmgfufolsnfmw#le#wkf#Jw#jp#jnslqwbmw#wl#?,p`qjsw=\t\t?p`qjsw##pwzof>!elmw.pjyf92=?,psbm=?psbm#jg>daOjaqbqz#le#@lmdqfpp?jnd#pq`>!kwws9,,jnFmdojpk#wqbmpobwjlmB`bgfnz#le#P`jfm`fpgju#pwzof>!gjpsobz9`lmpwqv`wjlm#le#wkf-dfwFofnfmwAzJg+jg*jm#`lmivm`wjlm#tjwkFofnfmw+$p`qjsw$*8#?nfwb#sqlsfqwz>!ld9<}=f<W<_<\\=l=m<V<T\t#wzsf>!wf{w!#mbnf>!=Sqjub`z#Sloj`z?,b=bgnjmjpwfqfg#az#wkffmbaofPjmdofQfrvfpwpwzof>%rvlw8nbqdjm9?,gju=?,gju=?,gju=?=?jnd#pq`>!kwws9,,j#pwzof>%rvlw8eolbw9qfefqqfg#wl#bp#wkf#wlwbo#slsvobwjlm#lejm#Tbpkjmdwlm/#G-@-#pwzof>!ab`hdqlvmg.bnlmd#lwkfq#wkjmdp/lqdbmjybwjlm#le#wkfsbqwj`jsbwfg#jm#wkfwkf#jmwqlgv`wjlm#lejgfmwjejfg#tjwk#wkfej`wjlmbo#`kbqb`wfq#L{elqg#Vmjufqpjwz#njpvmgfqpwbmgjmd#leWkfqf#bqf/#kltfufq/pwzofpkffw!#kqfe>!,@lovnajb#Vmjufqpjwzf{sbmgfg#wl#jm`ovgfvpvbooz#qfefqqfg#wljmgj`bwjmd#wkbw#wkfkbuf#pvddfpwfg#wkbwbeejojbwfg#tjwk#wkf`lqqfobwjlm#afwtffmmvnafq#le#gjeefqfmw=?,wg=?,wq=?,wbaof=Qfsvaoj`#le#Jqfobmg\t?,p`qjsw=\t?p`qjsw#vmgfq#wkf#jmeovfm`f`lmwqjavwjlm#wl#wkfLeej`jbo#tfapjwf#lekfbgrvbqwfqp#le#wkf`fmwfqfg#bqlvmg#wkfjnsoj`bwjlmp#le#wkfkbuf#affm#gfufolsfgEfgfqbo#Qfsvaoj`#leaf`bnf#jm`qfbpjmdoz`lmwjmvbwjlm#le#wkfMlwf/#kltfufq/#wkbwpjnjobq#wl#wkbw#le#`bsbajojwjfp#le#wkfb``lqgbm`f#tjwk#wkfsbqwj`jsbmwp#jm#wkfevqwkfq#gfufolsnfmwvmgfq#wkf#gjqf`wjlmjp#lewfm#`lmpjgfqfgkjp#zlvmdfq#aqlwkfq?,wg=?,wq=?,wbaof=?b#kwws.frvju>![.VB.skzpj`bo#sqlsfqwjfple#Aqjwjpk#@lovnajbkbp#affm#`qjwj`jyfg+tjwk#wkf#f{`fswjlmrvfpwjlmp#balvw#wkfsbppjmd#wkqlvdk#wkf3!#`foosbggjmd>!3!#wklvpbmgp#le#sflsofqfgjqf`wp#kfqf-#Elqkbuf#`kjogqfm#vmgfq&0F&0@,p`qjsw&0F!**8?b#kqfe>!kwws9,,ttt-?oj=?b#kqfe>!kwws9,,pjwf\\mbnf!#`lmwfmw>!wf{w.gf`lqbwjlm9mlmfpwzof>!gjpsobz9#mlmf?nfwb#kwws.frvju>![.mft#Gbwf+*-dfwWjnf+*#wzsf>!jnbdf,{.j`lm!?,psbm=?psbm#`obpp>!obmdvbdf>!ibubp`qjswtjmglt-ol`bwjlm-kqfe?b#kqfe>!ibubp`qjsw9..=\t?p`qjsw#wzsf>!w?b#kqfe>$kwws9,,ttt-klqw`vw#j`lm!#kqfe>!?,gju=\t?gju#`obpp>!?p`qjsw#pq`>!kwws9,,!#qfo>!pwzofpkffw!#w?,gju=\t?p`qjsw#wzsf>,b=#?b#kqfe>!kwws9,,#booltWqbmpsbqfm`z>![.VB.@lnsbwjaof!#`lmqfobwjlmpkjs#afwtffm\t?,p`qjsw=\t?p`qjsw#?,b=?,oj=?,vo=?,gju=bppl`jbwfg#tjwk#wkf#sqldqbnnjmd#obmdvbdf?,b=?b#kqfe>!kwws9,,?,b=?,oj=?oj#`obpp>!elqn#b`wjlm>!kwws9,,?gju#pwzof>!gjpsobz9wzsf>!wf{w!#mbnf>!r!?wbaof#tjgwk>!233&!#ab`hdqlvmg.slpjwjlm9!#alqgfq>!3!#tjgwk>!qfo>!pklqw`vw#j`lm!#k5=?vo=?oj=?b#kqfe>!##?nfwb#kwws.frvju>!`pp!#nfgjb>!p`qffm!#qfpslmpjaof#elq#wkf#!#wzsf>!bssoj`bwjlm,!#pwzof>!ab`hdqlvmg.kwno8#`kbqpfw>vwe.;!#booltwqbmpsbqfm`z>!pwzofpkffw!#wzsf>!wf\t?nfwb#kwws.frvju>!=?,psbm=?psbm#`obpp>!3!#`foopsb`jmd>!3!=8\t?,p`qjsw=\t?p`qjsw#plnfwjnfp#`boofg#wkfglfp#mlw#mf`fppbqjozElq#nlqf#jmelqnbwjlmbw#wkf#afdjmmjmd#le#?"GL@WZSF#kwno=?kwnosbqwj`vobqoz#jm#wkf#wzsf>!kjggfm!#mbnf>!ibubp`qjsw9uljg+3*8!feef`wjufmfpp#le#wkf#bvwl`lnsofwf>!lee!#dfmfqbooz#`lmpjgfqfg=?jmsvw#wzsf>!wf{w!#!=?,p`qjsw=\t?p`qjswwkqlvdklvw#wkf#tlqog`lnnlm#njp`lm`fswjlmbppl`jbwjlm#tjwk#wkf?,gju=\t?,gju=\t?gju#`gvqjmd#kjp#ojefwjnf/`lqqfpslmgjmd#wl#wkfwzsf>!jnbdf,{.j`lm!#bm#jm`qfbpjmd#mvnafqgjsolnbwj`#qfobwjlmpbqf#lewfm#`lmpjgfqfgnfwb#`kbqpfw>!vwe.;!#?jmsvw#wzsf>!wf{w!#f{bnsofp#jm`ovgf#wkf!=?jnd#pq`>!kwws9,,jsbqwj`jsbwjlm#jm#wkfwkf#fpwbaojpknfmw#le\t?,gju=\t?gju#`obpp>!%bns8maps8%bns8maps8wl#gfwfqnjmf#tkfwkfqrvjwf#gjeefqfmw#eqlnnbqhfg#wkf#afdjmmjmdgjpwbm`f#afwtffm#wkf`lmwqjavwjlmp#wl#wkf`lmeoj`w#afwtffm#wkftjgfoz#`lmpjgfqfg#wltbp#lmf#le#wkf#ejqpwtjwk#ubqzjmd#gfdqffpkbuf#psf`vobwfg#wkbw+gl`vnfmw-dfwFofnfmwsbqwj`jsbwjmd#jm#wkflqjdjmbooz#gfufolsfgfwb#`kbqpfw>!vwe.;!=#wzsf>!wf{w,`pp!#,=\tjmwfq`kbmdfbaoz#tjwknlqf#`olpfoz#qfobwfgpl`jbo#bmg#slojwj`bowkbw#tlvog#lwkfqtjpfsfqsfmgj`vobq#wl#wkfpwzof#wzsf>!wf{w,`ppwzsf>!pvanjw!#mbnf>!ebnjojfp#qfpjgjmd#jmgfufolsjmd#`lvmwqjfp`lnsvwfq#sqldqbnnjmdf`lmlnj`#gfufolsnfmwgfwfqnjmbwjlm#le#wkfelq#nlqf#jmelqnbwjlmlm#pfufqbo#l``bpjlmpslqwvdv/Fp#+Fvqlsfv*<O<V=l<\\={<Q=m=`<V<\\=o<V=l<\\={<Q=m=`<V<\\<L<R=m=m<T<U=m<V<R<U<P<\\=n<Y=l<T<\\<W<R<^<T<Q=h<R=l<P<\\=j<T<T=o<S=l<\\<^<W<Y<Q<T=c<Q<Y<R<]=i<R<X<T<P<R<T<Q=h<R=l<P<\\=j<T=c<t<Q=h<R=l<P<\\=j<T=c<L<Y=m<S=o<]<W<T<V<T<V<R<W<T=k<Y=m=n<^<R<T<Q=h<R=l<P<\\=j<T=b=n<Y=l=l<T=n<R=l<T<T<X<R=m=n<\\=n<R=k<Q<R4K5h5i4F5d4K4@4C5d5j4K5h4K4X4F4]4K5o4K4F4K5h4K5n4F4]4K4A4K4Fkwno8#`kbqpfw>VWE.;!#pfwWjnflvw+evm`wjlm+*gjpsobz9jmojmf.aol`h8?jmsvw#wzsf>!pvanjw!#wzsf#>#$wf{w,ibubp`qj?jnd#pq`>!kwws9,,ttt-!#!kwws9,,ttt-t0-lqd,pklqw`vw#j`lm!#kqfe>!!#bvwl`lnsofwf>!lee!#?,b=?,gju=?gju#`obpp>?,b=?,oj=\t?oj#`obpp>!`pp!#wzsf>!wf{w,`pp!#?elqn#b`wjlm>!kwws9,,{w,`pp!#kqfe>!kwws9,,ojmh#qfo>!bowfqmbwf!#\t?p`qjsw#wzsf>!wf{w,#lm`oj`h>!ibubp`qjsw9+mft#Gbwf*-dfwWjnf+*~kfjdkw>!2!#tjgwk>!2!#Sflsof$p#Qfsvaoj`#le##?b#kqfe>!kwws9,,ttt-wf{w.gf`lqbwjlm9vmgfqwkf#afdjmmjmd#le#wkf#?,gju=\t?,gju=\t?,gju=\tfpwbaojpknfmw#le#wkf#?,gju=?,gju=?,gju=?,g ujftslqwxnjm.kfjdkw9\t?p`qjsw#pq`>!kwws9,,lswjlm=?lswjlm#ubovf>lewfm#qfefqqfg#wl#bp#,lswjlm=\t?lswjlm#ubov?"GL@WZSF#kwno=\t?"..XJmwfqmbwjlmbo#Bjqslqw=\t?b#kqfe>!kwws9,,ttt?,b=?b#kqfe>!kwws9,,t\fTL\fT^\fTE\fT^\fUh\fT{\fTN\roI\ro|\roL\ro{\roO\rov\rot\nAOGx\bTA\nzk#+\vUmGx*\fHD\fHS\fH\\\fIa\fHJ\fIk\fHZ\fHM\fHR\fHe\fHD\fH^\fIg\fHM\fHy\fIa\fH[\fIk\fHH\fIa\fH\\\fHp\fHR\fHD\fHy\fHR\fH\\\fIl\fHT\fHn\fH@\fHn\fHK\fHS\fHH\fHT\fIa\fHI\fHR\fHF\fHD\fHR\fHT\fIa\fHY\fIl\fHy\fHR\fH\\\fHT\fHn\fHT\fIa\fHy\fH\\\fHO\fHT\fHR\fHB\fH{\fIa\fH\\\fIl\fHv\fHS\fHs\fIa\fHL\fIg\fHn\fHY\fHS\fHp\fIa\fHr\fHR\fHD\fHi\fHB\fIk\fH\\\fHS\fHy\fHR\fHY\fHS\fHA\fHS\fHD\fIa\fHD\fH{\fHR\fHM\fHS\fHC\fHR\fHm\fHy\fIa\fHC\fIg\fHn\fHy\fHS\fHT\fIm\fH\\\fHy\fIa\fH[\fHR\fHF\fHU\fIm\fHm\fHv\fHH\fIl\fHF\fIa\fH\\\fH@\fHn\fHK\fHD\fHs\fHS\fHF\fIa\fHF\fHO\fIl\fHy\fIa\fH\\\fHS\fHy\fIk\fHs\fHF\fIa\fH\\\fHR\fH\\\fHn\fHA\fHF\fIa\fH\\\fHR\fHF\fIa\fHH\fHB\fHR\fH^\fHS\fHy\fIg\fHn\fH\\\fHG\fHP\fIa\fHH\fHR\fH\\\fHD\fHS\fH\\\fIa\fHB\fHR\fHO\fH^\fHS\fHB\fHS\fHs\fIk\fHMgfp`qjswjlm!#`lmwfmw>!gl`vnfmw-ol`bwjlm-sqlw-dfwFofnfmwpAzWbdMbnf+?"GL@WZSF#kwno=\t?kwno#?nfwb#`kbqpfw>!vwe.;!=9vqo!#`lmwfmw>!kwws9,,-`pp!#qfo>!pwzofpkffw!pwzof#wzsf>!wf{w,`pp!=wzsf>!wf{w,`pp!#kqfe>!t0-lqd,2:::,{kwno!#{nowzsf>!wf{w,ibubp`qjsw!#nfwklg>!dfw!#b`wjlm>!ojmh#qfo>!pwzofpkffw!##>#gl`vnfmw-dfwFofnfmwwzsf>!jnbdf,{.j`lm!#,=`foosbggjmd>!3!#`foops-`pp!#wzsf>!wf{w,`pp!#?,b=?,oj=?oj=?b#kqfe>!!#tjgwk>!2!#kfjdkw>!2!!=?b#kqfe>!kwws9,,ttt-pwzof>!gjpsobz9mlmf8!=bowfqmbwf!#wzsf>!bssoj.,,T0@,,GWG#[KWNO#2-3#foopsb`jmd>!3!#`foosbg#wzsf>!kjggfm!#ubovf>!,b=%maps8?psbm#qlof>!p\t?jmsvw#wzsf>!kjggfm!#obmdvbdf>!IbubP`qjsw!##gl`vnfmw-dfwFofnfmwpAd>!3!#`foopsb`jmd>!3!#zsf>!wf{w,`pp!#nfgjb>!wzsf>$wf{w,ibubp`qjsw$tjwk#wkf#f{`fswjlm#le#zsf>!wf{w,`pp!#qfo>!pw#kfjdkw>!2!#tjgwk>!2!#>$(fm`lgfVQJ@lnslmfmw+?ojmh#qfo>!bowfqmbwf!#\talgz/#wq/#jmsvw/#wf{wnfwb#mbnf>!qlalwp!#`lmnfwklg>!slpw!#b`wjlm>!=\t?b#kqfe>!kwws9,,ttt-`pp!#qfo>!pwzofpkffw!#?,gju=?,gju=?gju#`obppobmdvbdf>!ibubp`qjsw!=bqjb.kjggfm>!wqvf!=.[?qjsw!#wzsf>!wf{w,ibubpo>38~*+*8\t+evm`wjlm+*xab`hdqlvmg.jnbdf9#vqo+,b=?,oj=?oj=?b#kqfe>!k\n\n?oj=?b#kqfe>!kwws9,,bwlq!#bqjb.kjggfm>!wqv=#?b#kqfe>!kwws9,,ttt-obmdvbdf>!ibubp`qjsw!#,lswjlm=\t?lswjlm#ubovf,gju=?,gju=?gju#`obpp>qbwlq!#bqjb.kjggfm>!wqf>+mft#Gbwf*-dfwWjnf+*slqwvdv/Fp#+gl#Aqbpjo*<R=l<_<\\<Q<T<[<\\=j<T<T<^<R<[<P<R<Z<Q<R=m=n=`<R<]=l<\\<[<R<^<\\<Q<T=c=l<Y<_<T=m=n=l<\\=j<T<T<^<R<[<P<R<Z<Q<R=m=n<T<R<]=c<[<\\=n<Y<W=`<Q<\\?"GL@WZSF#kwno#SVAOJ@#!mw.Wzsf!#`lmwfmw>!wf{w,?nfwb#kwws.frvju>!@lmwfqbmpjwjlmbo,,FM!#!kwws9?kwno#{nomp>!kwws9,,ttt.,,T0@,,GWG#[KWNO#2-3#WGWG,{kwno2.wqbmpjwjlmbo,,ttt-t0-lqd,WQ,{kwno2,sf#>#$wf{w,ibubp`qjsw$8?nfwb#mbnf>!gfp`qjswjlmsbqfmwMlgf-jmpfqwAfelqf?jmsvw#wzsf>!kjggfm!#mbip!#wzsf>!wf{w,ibubp`qj+gl`vnfmw*-qfbgz+evm`wjp`qjsw#wzsf>!wf{w,ibubpjnbdf!#`lmwfmw>!kwws9,,VB.@lnsbwjaof!#`lmwfmw>wno8#`kbqpfw>vwe.;!#,=\tojmh#qfo>!pklqw`vw#j`lm?ojmh#qfo>!pwzofpkffw!#?,p`qjsw=\t?p`qjsw#wzsf>>#gl`vnfmw-`qfbwfFofnfm?b#wbqdfw>!\\aobmh!#kqfe>#gl`vnfmw-dfwFofnfmwpAjmsvw#wzsf>!wf{w!#mbnf>b-wzsf#>#$wf{w,ibubp`qjmsvw#wzsf>!kjggfm!#mbnfkwno8#`kbqpfw>vwe.;!#,=gwg!=\t?kwno#{nomp>!kwws.,,T0@,,GWG#KWNO#7-32#WfmwpAzWbdMbnf+$p`qjsw$*jmsvw#wzsf>!kjggfm!#mbn?p`qjsw#wzsf>!wf{w,ibubp!#pwzof>!gjpsobz9mlmf8!=gl`vnfmw-dfwFofnfmwAzJg+>gl`vnfmw-`qfbwfFofnfmw+$#wzsf>$wf{w,ibubp`qjsw$jmsvw#wzsf>!wf{w!#mbnf>!g-dfwFofnfmwpAzWbdMbnf+pmj`bo!#kqfe>!kwws9,,ttt-@,,GWG#KWNO#7-32#Wqbmpjw?pwzof#wzsf>!wf{w,`pp!=\t\t?pwzof#wzsf>!wf{w,`pp!=jlmbo-gwg!=\t?kwno#{nomp>kwws.frvju>[email protected]>!3!#`foopsb`jmd>!3!kwno8#`kbqpfw>vwe.;!#,=\t#pwzof>!gjpsobz9mlmf8!=??oj=?b#kqfe>!kwws9,,ttt-#wzsf>$wf{w,ibubp`qjsw$=<X<Y=c=n<Y<W=`<Q<R=m=n<T=m<R<R=n<^<Y=n=m=n<^<T<T<S=l<R<T<[<^<R<X=m=n<^<\\<]<Y<[<R<S<\\=m<Q<R=m=n<T\fHF\fIm\fHT\fIa\fHH\fHS\fHy\fHR\fHy\fHR\fHn\fH{\fIa\fH\\\fIk\fHT\fHe\fHD\fIa\fHU\fIg\fHn\fHD\fIk\fHY\fHS\fHK\fHR\fHD\fHT\fHA\fHR\fHG\fHS\fHy\fIa\fHT\fHS\fHn\fH{\fHT\fIm\fH\\\fHy\fIa\fH[\fHS\fHH\fHy\fIe\fHF\fIl\fH\\\fHR\fHk\fHs\fHY\fHS\fHp\fIa\fHr\fHR\fHF\fHD\fHy\fHR\fH\\\fIa\fH\\\fHY\fHR\fHd\fHT\fHy\fIa\fH\\\fHS\fHC\fHH\fHR',"۷%ƌ'T% 'W%×%O%g%¦&Ɠ%ǥ&>&*&'&^&Ÿా&ƭ&ƒ&)&^&%&'&&P&1&±&3&]&m&u&E&t&C&Ï&V&V&/&>&6&ྲྀo&p&@&E&M&P&x&@&F&e&Ì&7&:&(&D&0&C&)&.&F&-&1&(&L&F&1ɞ*Ϫ⇳&፲&K&;&)&E&H&P&0&?&9&V&&-&v&a&,&E&)&?&=&'&'&B&മ&ԃ&̖*&*8&%&%&&&%,)&&>&&7&]&F&2&>&J&6&n&2&%&?&&2&6&J&g&-&0&,&*&J&*&O&)&6&(&<&B&N&.&P&@&2&.&W&M&%Լ(,(<&,&Ϛ&ᣇ&-&,(%&(&%&(Ļ0&X&D&&j&'&J&(&.&B&3&Z&R&h&3&E&E&<Æ-͠ỳ&%8?&@&,&Z&@&0&J&,&^&x&_&6&C&6&Cܬ⨥&f&-&-&-&-&,&J&2&8&z&8&C&Y&8&-&d&ṸÌ-&7&1&F&7&t&W&7&I&.&.&^&=ྜ᧓&8(>&/&/&ݻ')'ၥ')'%@/&0&%оী*&*@&CԽהɴ4ܚӑ6&/Ÿ̃Z&*%ɆϿ&Ĵ&1¨ҴŴ",g,"AAAAKKLLKKKKKJJIHHIHHGGFF");!function setData(e,t){const n=m,a=p;for(let e=0;e<t.length;++e)a[e]=t[e];let r=0;for(let e=0;e<t.length;++e){n[e]=r;const t=a[e];0!==t&&(r+=e<<(31&t))}for(let e=t.length;e<32;++e)n[e]=r;u=e}(d,g);function InputStream(e){this.data=new Int8Array(0);this.offset=0;this.data=e}function readInput(e,t,n,a){if(null===e.input)return-1;const r=e.input,s=Math.min(r.offset+a,r.data.length),i=s-r.offset;t.set(r.data.subarray(r.offset,s),n);r.offset+=i;return i}function toUtf8Runes(e){const t=e.length,n=new Int32Array(t);for(let a=0;a<t;++a)n[a]=e.charCodeAt(a);return n}function makeError(e,t){if(t>=0)return t;e.runningState>=0&&(e.runningState=t);throw new Error("Brotli error code: "+t)}return function decode(e,t){let n=new State;n.input=new InputStream(e);initState(n);if(t){let e=t.customDictionary;e&&function attachDictionaryChunk(e,t){if(1!==e.runningState)return makeError(e,-24);if(0===e.cdNumChunks){e.cdChunks=new Array(16);e.cdChunkOffsets=new Int32Array(16);e.cdBlockBits=-1}if(15===e.cdNumChunks)return makeError(e,-27);e.cdChunks[e.cdNumChunks]=t;e.cdNumChunks++;e.cdTotalSize+=t.length;e.cdChunkOffsets[e.cdNumChunks]=e.cdTotalSize;return 0}(n,e)}let a=0,r=[];for(;;){let e=new Int8Array(16384);r.push(e);n.output=e;n.outputOffset=0;n.outputLength=16384;n.outputUsed=0;decompress(n);a+=n.outputUsed;if(n.outputUsed<16384)break}!function close(e){if(0===e.runningState)return makeError(e,-25);e.runningState>0&&(e.runningState=11);return 0}(n);!function closeInput(e){e.input=new InputStream(new Int8Array(0))}(n);let s=new Int8Array(a),i=0;for(let e=0;e<r.length;++e){let t=r[e],n=Math.min(a,i+16384)-i;n<16384?s.set(t.subarray(0,n),i):s.set(t,i);i+=n}return s}})();class BrotliStream extends DecodeStream{#_=!0;constructor(e,t){super(t);this.stream=e;this.dict=e.dict}readBlock(){const e=this.stream.getBytes(),t=Un(new Int8Array(e.buffer,e.byteOffset,e.length));this.buffer=new Uint8Array(t.buffer,t.byteOffset,t.length);this.bufferLength=this.buffer.length;this.eof=!0}async getImageData(e,t){const n=await this.asyncGetBytes();return n?n.length<=e?n:n.subarray(0,e):this.getBytes(e)}async asyncGetBytes(){const{decompressed:e,compressed:t}=await this.asyncGetBytesFromDecompressionStream("brotli");if(e)return e;this.#_=!1;this.stream=new Stream(t,0,t.length,this.stream.dict);this.reset();return null}get isAsync(){return this.#_}}const Xn=-1,Wn=[[-1,-1],[-1,-1],[7,8],[7,7],[6,6],[6,6],[6,5],[6,5],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2]],Kn=[[-1,-1],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],Vn=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],Gn=[[-1,-1],[-1,-1],[12,-2],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],$n=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],Yn=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];class CCITTFaxDecoder{constructor(e,t={K:0,EndOfLine:!1,EncodedByteAlign:!1,Columns:1728,Rows:0,EndOfBlock:!0,BlackIs1:!1}){if("function"!=typeof e?.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');this.source=e;this.eof=!1;({K:this.encoding,EndOfLine:this.eoline,EncodedByteAlign:this.byteAlign,Columns:this.columns,Rows:this.rows,EndOfBlock:this.eoblock,BlackIs1:this.black}=t);this.codingLine=new Uint32Array(this.columns+1);this.refLine=new Uint32Array(this.columns+2);this.codingLine[0]=this.columns;this.codingPos=0;this.row=0;this.nextLine2D=this.encoding<0;this.inputBits=0;this.inputBuf=0;this.outputBits=0;this.rowsDone=!1;let n;for(;0===(n=this._lookBits(12));)this._eatBits(1);1===n&&this._eatBits(12);if(this.encoding>0){this.nextLine2D=!this._lookBits(1);this._eatBits(1)}}readNextChar(){if(this.eof)return-1;const e=this.refLine,t=this.codingLine,n=this.columns;let a,r,s,i,o;if(0===this.outputBits){this.rowsDone&&(this.eof=!0);if(this.eof)return-1;this.err=!1;let s,o,l;if(this.nextLine2D){for(i=0;t[i]<n;++i)e[i]=t[i];e[i++]=n;e[i]=n;t[0]=0;this.codingPos=0;a=0;r=0;for(;t[this.codingPos]<n;){s=this._getTwoDimCode();switch(s){case 0:this._addPixels(e[a+1],r);e[a+1]<n&&(a+=2);break;case 1:s=o=0;if(r){do{s+=l=this._getBlackCode()}while(l>=64);do{o+=l=this._getWhiteCode()}while(l>=64)}else{do{s+=l=this._getWhiteCode()}while(l>=64);do{o+=l=this._getBlackCode()}while(l>=64)}this._addPixels(t[this.codingPos]+s,r);t[this.codingPos]<n&&this._addPixels(t[this.codingPos]+o,1^r);for(;e[a]<=t[this.codingPos]&&e[a]<n;)a+=2;break;case 7:this._addPixels(e[a]+3,r);r^=1;if(t[this.codingPos]<n){++a;for(;e[a]<=t[this.codingPos]&&e[a]<n;)a+=2}break;case 5:this._addPixels(e[a]+2,r);r^=1;if(t[this.codingPos]<n){++a;for(;e[a]<=t[this.codingPos]&&e[a]<n;)a+=2}break;case 3:this._addPixels(e[a]+1,r);r^=1;if(t[this.codingPos]<n){++a;for(;e[a]<=t[this.codingPos]&&e[a]<n;)a+=2}break;case 2:this._addPixels(e[a],r);r^=1;if(t[this.codingPos]<n){++a;for(;e[a]<=t[this.codingPos]&&e[a]<n;)a+=2}break;case 8:this._addPixelsNeg(e[a]-3,r);r^=1;if(t[this.codingPos]<n){a>0?--a:++a;for(;e[a]<=t[this.codingPos]&&e[a]<n;)a+=2}break;case 6:this._addPixelsNeg(e[a]-2,r);r^=1;if(t[this.codingPos]<n){a>0?--a:++a;for(;e[a]<=t[this.codingPos]&&e[a]<n;)a+=2}break;case 4:this._addPixelsNeg(e[a]-1,r);r^=1;if(t[this.codingPos]<n){a>0?--a:++a;for(;e[a]<=t[this.codingPos]&&e[a]<n;)a+=2}break;case Xn:this._addPixels(n,0);this.eof=!0;break;default:info("bad 2d code");this._addPixels(n,0);this.err=!0}}}else{t[0]=0;this.codingPos=0;r=0;for(;t[this.codingPos]<n;){s=0;if(r)do{s+=l=this._getBlackCode()}while(l>=64);else do{s+=l=this._getWhiteCode()}while(l>=64);this._addPixels(t[this.codingPos]+s,r);r^=1}}let f=!1;this.byteAlign&&(this.inputBits&=-8);if(this.eoblock||this.row!==this.rows-1){s=this._lookBits(12);if(this.eoline)for(;s!==Xn&&1!==s;){this._eatBits(1);s=this._lookBits(12)}else for(;0===s;){this._eatBits(1);s=this._lookBits(12)}if(1===s){this._eatBits(12);f=!0}else s===Xn&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone){this.nextLine2D=!this._lookBits(1);this._eatBits(1)}if(this.eoblock&&f&&this.byteAlign){s=this._lookBits(12);if(1===s){this._eatBits(12);if(this.encoding>0){this._lookBits(1);this._eatBits(1)}if(this.encoding>=0)for(i=0;i<4;++i){s=this._lookBits(12);1!==s&&info("bad rtc code: "+s);this._eatBits(12);if(this.encoding>0){this._lookBits(1);this._eatBits(1)}}this.eof=!0}}else if(this.err&&this.eoline){for(;;){s=this._lookBits(13);if(s===Xn){this.eof=!0;return-1}if(s>>1==1)break;this._eatBits(1)}this._eatBits(12);if(this.encoding>0){this._eatBits(1);this.nextLine2D=!(1&s)}}this.outputBits=t[0]>0?t[this.codingPos=0]:t[this.codingPos=1];this.row++}if(this.outputBits>=8){o=1&this.codingPos?0:255;this.outputBits-=8;if(0===this.outputBits&&t[this.codingPos]<n){this.codingPos++;this.outputBits=t[this.codingPos]-t[this.codingPos-1]}}else{s=8;o=0;do{if("number"!=typeof this.outputBits)throw new FormatError('Invalid /CCITTFaxDecode data, "outputBits" must be a number.');if(this.outputBits>s){o<<=s;1&this.codingPos||(o|=255>>8-s);this.outputBits-=s;s=0}else{o<<=this.outputBits;1&this.codingPos||(o|=255>>8-this.outputBits);s-=this.outputBits;this.outputBits=0;if(t[this.codingPos]<n){this.codingPos++;this.outputBits=t[this.codingPos]-t[this.codingPos-1]}else if(s>0){o<<=s;s=0}}}while(s)}this.black&&(o^=255);return o}_addPixels(e,t){const n=this.codingLine;let a=this.codingPos;if(e>n[a]){if(e>this.columns){info("row is wrong length");this.err=!0;e=this.columns}1&a^t&&++a;n[a]=e}this.codingPos=a}_addPixelsNeg(e,t){const n=this.codingLine;let a=this.codingPos;if(e>n[a]){if(e>this.columns){info("row is wrong length");this.err=!0;e=this.columns}1&a^t&&++a;n[a]=e}else if(e<n[a]){if(e<0){info("invalid code");this.err=!0;e=0}for(;a>0&&e<n[a-1];)--a;n[a]=e}this.codingPos=a}_findTableCode(e,t,n,a){const r=a||0;for(let a=e;a<=t;++a){let e=this._lookBits(a);if(e===Xn)return[!0,1,!1];a<t&&(e<<=t-a);if(!r||e>=r){const t=n[e-r];if(t[0]===a){this._eatBits(a);return[!0,t[1],!0]}}}return[!1,0,!1]}_getTwoDimCode(){let e,t=0;if(this.eoblock){t=this._lookBits(7);e=Wn[t];if(e?.[0]>0){this._eatBits(e[0]);return e[1]}}else{const e=this._findTableCode(1,7,Wn);if(e[0]&&e[2])return e[1]}info("Bad two dim code");return Xn}_getWhiteCode(){let e,t=0;if(this.eoblock){t=this._lookBits(12);if(t===Xn)return 1;e=t>>5?Vn[t>>3]:Kn[t];if(e[0]>0){this._eatBits(e[0]);return e[1]}}else{let e=this._findTableCode(1,9,Vn);if(e[0])return e[1];e=this._findTableCode(11,12,Kn);if(e[0])return e[1]}info("bad white code");this._eatBits(1);return 1}_getBlackCode(){let e,t;if(this.eoblock){e=this._lookBits(13);if(e===Xn)return 1;t=e>>7?!(e>>9)&&e>>7?$n[(e>>1)-64]:Yn[e>>7]:Gn[e];if(t[0]>0){this._eatBits(t[0]);return t[1]}}else{let e=this._findTableCode(2,6,Yn);if(e[0])return e[1];e=this._findTableCode(7,12,$n,64);if(e[0])return e[1];e=this._findTableCode(10,13,Gn);if(e[0])return e[1]}info("bad black code");this._eatBits(1);return 1}_lookBits(e){let t;for(;this.inputBits<e;){if(-1===(t=this.source.next()))return 0===this.inputBits?Xn:this.inputBuf<<e-this.inputBits&65535>>16-e;this.inputBuf=this.inputBuf<<8|t;this.inputBits+=8}return this.inputBuf>>this.inputBits-e&65535>>16-e}_eatBits(e){(this.inputBits-=e)<0&&(this.inputBits=0)}}class CCITTFaxStream extends DecodeStream{constructor(e,t,n){super(t);this.stream=e;this.maybeLength=t;this.dict=e.dict;n instanceof Dict||(n=Dict.empty);this.params={K:n.get("K")||0,EndOfLine:!!n.get("EndOfLine"),EncodedByteAlign:!!n.get("EncodedByteAlign"),Columns:n.get("Columns")||1728,Rows:n.get("Rows")||0,EndOfBlock:!!(n.get("EndOfBlock")??1),BlackIs1:!!n.get("BlackIs1")}}get bytes(){return shadow(this,"bytes",this.stream.getBytes(this.maybeLength))}readBlock(){this.decodeImageFallback()}get isImageStream(){return!0}get isAsyncDecoder(){return!0}async decodeImage(e,t,n){if(this.eof)return this.buffer;e||(e=this.stream.isAsync&&await this.stream.asyncGetBytes()||this.bytes);try{this.buffer=await JBig2CCITTFaxWasmImage.decode(e,this.dict.get("W","Width"),this.dict.get("H","Height"),null,this.params)}catch{warn("CCITTFaxStream: Falling back to JS CCITTFax decoder.");return this.decodeImageFallback(e,t)}this.bufferLength=this.buffer.length;this.eof=!0;return this.buffer}decodeImageFallback(e,t){if(this.eof)return this.buffer;const{params:n}=this;if(!e){this.stream.reset();e=this.bytes}let a=0;const r={next:()=>e[a++]??-1};t&&this.buffer.byteLength<t&&(this.buffer=new Uint8Array(t));this.ccittFaxDecoder=new CCITTFaxDecoder(r,n);let s=0;for(;!this.eof;){const e=this.ccittFaxDecoder.readNextChar();if(-1===e){this.eof=!0;break}t||this.ensureBuffer(s+1);this.buffer[s++]=e}this.bufferLength=this.buffer.length;return this.buffer.subarray(0,t||this.bufferLength)}}const Jn=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Qn=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),Zn=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),ea=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],ta=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];class FlateStream extends DecodeStream{#_=!0;constructor(e,t){super(t);this.stream=e;this.dict=e.dict;const n=e.getByte(),a=e.getByte();if(-1===n||-1===a)throw new FormatError(`Invalid header in flate stream: ${n}, ${a}`);if(8!=(15&n))throw new FormatError(`Unknown compression method in flate stream: ${n}, ${a}`);if(((n<<8)+a)%31!=0)throw new FormatError(`Bad FCHECK in flate stream: ${n}, ${a}`);if(32&a)throw new FormatError(`FDICT bit set in flate stream: ${n}, ${a}`);this.codeSize=0;this.codeBuf=0}async getImageData(e,t){const n=await this.asyncGetBytes();return n?n.length<=e?n:n.subarray(0,e):this.getBytes(e)}async asyncGetBytes(){const{decompressed:e,compressed:t}=await this.asyncGetBytesFromDecompressionStream("deflate");if(e)return e;this.#_=!1;this.stream=new Stream(t,2,t.length,this.stream.dict);this.reset();return null}get isAsync(){return this.#_}getBits(e){const t=this.stream;let n,a=this.codeSize,r=this.codeBuf;for(;a<e;){if(-1===(n=t.getByte()))throw new FormatError("Bad encoding in flate stream");r|=n<<a;a+=8}n=r&(1<<e)-1;this.codeBuf=r>>e;this.codeSize=a-=e;return n}getCode(e){const t=this.stream,n=e[0],a=e[1];let r,s=this.codeSize,i=this.codeBuf;for(;s<a&&-1!==(r=t.getByte());){i|=r<<s;s+=8}const o=n[i&(1<<a)-1],l=o>>16,f=65535&o;if(l<1||s<l)throw new FormatError("Bad encoding in flate stream");this.codeBuf=i>>l;this.codeSize=s-l;return f}generateHuffmanTable(e){const t=e.length;let n,a=0;for(n=0;n<t;++n)e[n]>a&&(a=e[n]);const r=1<<a,s=new Int32Array(r);for(let i=1,o=0,l=2;i<=a;++i,o<<=1,l<<=1)for(let a=0;a<t;++a)if(e[a]===i){let e=0,t=o;for(n=0;n<i;++n){e=e<<1|1&t;t>>=1}for(n=e;n<r;n+=l)s[n]=i<<16|a;++o}return[s,a]}#L(e){info(e);this.eof=!0}readBlock(){let e,t,n;const a=this.stream;try{t=this.getBits(3)}catch(e){this.#L(e.message);return}1&t&&(this.eof=!0);t>>=1;if(0===t){let t;if(-1===(t=a.getByte())){this.#L("Bad block header in flate stream");return}let n=t;if(-1===(t=a.getByte())){this.#L("Bad block header in flate stream");return}n|=t<<8;if(-1===(t=a.getByte())){this.#L("Bad block header in flate stream");return}let r=t;if(-1===(t=a.getByte())){this.#L("Bad block header in flate stream");return}r|=t<<8;if(r!==(65535&~n)&&(0!==n||0!==r))throw new FormatError("Bad uncompressed block length in flate stream");this.codeBuf=0;this.codeSize=0;const s=this.bufferLength,i=s+n;e=this.ensureBuffer(i);this.bufferLength=i;if(0===n)-1===a.peekByte()&&(this.eof=!0);else{const t=a.getBytes(n);e.set(t,s);t.length<n&&(this.eof=!0)}return}let r,s;if(1===t){r=ea;s=ta}else{if(2!==t)throw new FormatError("Unknown block type in flate stream");{const e=this.getBits(5)+257,t=this.getBits(5)+1,a=this.getBits(4)+4,i=new Uint8Array(Jn.length);let o;for(o=0;o<a;++o)i[Jn[o]]=this.getBits(3);const l=this.generateHuffmanTable(i);n=0;o=0;const f=e+t,c=new Uint8Array(f);let h,u,m;for(;o<f;){const e=this.getCode(l);if(16===e){h=2;u=3;m=n}else if(17===e){h=3;u=3;m=n=0}else{if(18!==e){c[o++]=n=e;continue}h=7;u=11;m=n=0}let t=this.getBits(h)+u;for(;t-- >0;)c[o++]=m}r=this.generateHuffmanTable(c.subarray(0,e));s=this.generateHuffmanTable(c.subarray(e,f))}}e=this.buffer;let i=e?e.length:0,o=this.bufferLength;for(;;){let t=this.getCode(r);if(t<256){if(o+1>=i){e=this.ensureBuffer(o+1);i=e.length}e[o++]=t;continue}if(256===t){this.bufferLength=o;return}t-=257;t=Qn[t];let a=t>>16;a>0&&(a=this.getBits(a));n=(65535&t)+a;t=this.getCode(s);t=Zn[t];a=t>>16;a>0&&(a=this.getBits(a));const l=(65535&t)+a;if(o+n>=i){e=this.ensureBuffer(o+n);i=e.length}for(let t=0;t<n;++t,++o)e[o]=e[o-l]}}}const na=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];class ArithmeticDecoder{constructor(e,t,n){this.data=e;this.bp=t;this.dataEnd=n;this.chigh=e[t];this.clow=0;this.byteIn();this.chigh=this.chigh<<7&65535|this.clow>>9&127;this.clow=this.clow<<7&65535;this.ct-=7;this.a=32768}byteIn(){const e=this.data;let t=this.bp;if(255===e[t])if(e[t+1]>143){this.clow+=65280;this.ct=8}else{t++;this.clow+=e[t]<<9;this.ct=7;this.bp=t}else{t++;this.clow+=t<this.dataEnd?e[t]<<8:65280;this.ct=8;this.bp=t}if(this.clow>65535){this.chigh+=this.clow>>16;this.clow&=65535}}readBit(e,t){let n=e[t]>>1,a=1&e[t];const r=na[n],s=r.qe;let i,o=this.a-s;if(this.chigh<s)if(o<s){o=s;i=a;n=r.nmps}else{o=s;i=1^a;1===r.switchFlag&&(a=i);n=r.nlps}else{this.chigh-=s;if(32768&o){this.a=o;return a}if(o<s){i=1^a;1===r.switchFlag&&(a=i);n=r.nlps}else{i=a;n=r.nmps}}do{0===this.ct&&this.byteIn();o<<=1;this.chigh=this.chigh<<1&65535|this.clow>>15&1;this.clow=this.clow<<1&65535;this.ct--}while(!(32768&o));this.a=o;e[t]=n<<1|a;return i}}class Jbig2Error extends rn{constructor(e){super(e,"Jbig2Error")}}class ContextCache{getContexts(e){return e in this?this[e]:this[e]=new Int8Array(65536)}}class DecodingContext{constructor(e,t,n){this.data=e;this.start=t;this.end=n}get decoder(){return shadow(this,"decoder",new ArithmeticDecoder(this.data,this.start,this.end))}get contextCache(){return shadow(this,"contextCache",new ContextCache)}}function decodeInteger(e,t,n){const a=e.getContexts(t);let r=1;function readBits(e){let t=0;for(let s=0;s<e;s++){const e=n.readBit(a,r);r=r<256?r<<1|e:511&(r<<1|e)|256;t=t<<1|e}return t>>>0}const s=readBits(1),i=readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(32)+4436:readBits(12)+340:readBits(8)+84:readBits(6)+20:readBits(4)+4:readBits(2);let o;0===s?o=i:i>0&&(o=-i);return o>=-2147483648&&o<=bn?o:null}function decodeIAID(e,t,n){const a=e.getContexts("IAID");let r=1;for(let e=0;e<n;e++){r=r<<1|t.readBit(a,r)}return n<31?r&(1<<n)-1:2147483647&r}const aa=["SymbolDictionary",null,null,null,"IntermediateTextRegion",null,"ImmediateTextRegion","ImmediateLosslessTextRegion",null,null,null,null,null,null,null,null,"PatternDictionary",null,null,null,"IntermediateHalftoneRegion",null,"ImmediateHalftoneRegion","ImmediateLosslessHalftoneRegion",null,null,null,null,null,null,null,null,null,null,null,null,"IntermediateGenericRegion",null,"ImmediateGenericRegion","ImmediateLosslessGenericRegion","IntermediateGenericRefinementRegion",null,"ImmediateGenericRefinementRegion","ImmediateLosslessGenericRefinementRegion",null,null,null,null,"PageInformation","EndOfPage","EndOfStripe","EndOfFile","Profiles","Tables",null,null,null,null,null,null,null,null,"Extension"],ra=[[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],sa=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],ia=[39717,1941,229,405],oa=[32,8];function decodeBitmap(e,t,n,a,r,s,i,o){if(e){return decodeMMRBitmap(new Reader(o.data,o.start,o.end),t,n,!1)}if(0===a&&!s&&!r&&4===i.length&&3===i[0].x&&-1===i[0].y&&-3===i[1].x&&-1===i[1].y&&2===i[2].x&&-2===i[2].y&&-2===i[3].x&&-2===i[3].y)return function decodeBitmapTemplate0(e,t,n){const a=n.decoder,r=n.contextCache.getContexts("GB"),s=[];let i,o,l,f,c,h,u;for(o=0;o<t;o++){c=s[o]=new Uint8Array(e);h=o<1?c:s[o-1];u=o<2?c:s[o-2];i=u[0]<<13|u[1]<<12|u[2]<<11|h[0]<<7|h[1]<<6|h[2]<<5|h[3]<<4;for(l=0;l<e;l++){c[l]=f=a.readBit(r,i);i=(31735&i)<<1|(l+3<e?u[l+3]<<11:0)|(l+4<e?h[l+4]<<4:0)|f}}return s}(t,n,o);const l=!!s,f=ra[a].concat(i);f.sort((e,t)=>e.y-t.y||e.x-t.x);const c=f.length,h=new Int8Array(c),u=new Int8Array(c),m=[];let p,d,g=0,b=0,w=0,j=0;for(d=0;d<c;d++){h[d]=f[d].x;u[d]=f[d].y;b=Math.min(b,f[d].x);w=Math.max(w,f[d].x);j=Math.min(j,f[d].y);d<c-1&&f[d].y===f[d+1].y&&f[d].x===f[d+1].x-1?g|=1<<c-1-d:m.push(d)}const k=m.length,y=new Int8Array(k),q=new Int8Array(k),v=new Uint16Array(k);for(p=0;p<k;p++){d=m[p];y[p]=f[d].x;q[p]=f[d].y;v[p]=1<<c-1-d}const S=-b,x=-j,C=t-w,T=ia[a];let O=new Uint8Array(t);const R=[],H=o.decoder,D=o.contextCache.getContexts("GB");let M,E,N,z,_,L=0,U=0;for(let e=0;e<n;e++){if(r){L^=H.readBit(D,T);if(L){R.push(O);continue}}O=new Uint8Array(O);R.push(O);for(M=0;M<t;M++){if(l&&s[e][M]){O[M]=0;continue}if(M>=S&&M<C&&e>=x){U=U<<1&g;for(d=0;d<k;d++){E=e+q[d];N=M+y[d];z=R[E][N];if(z){z=v[d];U|=z}}}else{U=0;_=c-1;for(d=0;d<c;d++,_--){N=M+h[d];if(N>=0&&N<t){E=e+u[d];if(E>=0){z=R[E][N];z&&(U|=z<<_)}}}}const n=H.readBit(D,U);O[M]=n}}return R}function decodeRefinement(e,t,n,a,r,s,i,o,l){let f=sa[n].coding;0===n&&(f=f.concat([o[0]]));const c=f.length,h=new Int32Array(c),u=new Int32Array(c);let m;for(m=0;m<c;m++){h[m]=f[m].x;u[m]=f[m].y}let p=sa[n].reference;0===n&&(p=p.concat([o[1]]));const d=p.length,g=new Int32Array(d),b=new Int32Array(d);for(m=0;m<d;m++){g[m]=p[m].x;b[m]=p[m].y}const w=a[0].length,j=a.length,k=oa[n],y=[],q=l.decoder,v=l.contextCache.getContexts("GR");let S=0;for(let n=0;n<t;n++){if(i){S^=q.readBit(v,k);if(S)throw new Jbig2Error("prediction is not supported")}const t=new Uint8Array(e);y.push(t);for(let i=0;i<e;i++){let o,l,f=0;for(m=0;m<c;m++){o=n+u[m];l=i+h[m];o<0||l<0||l>=e?f<<=1:f=f<<1|y[o][l]}for(m=0;m<d;m++){o=n+b[m]-s;l=i+g[m]-r;o<0||o>=j||l<0||l>=w?f<<=1:f=f<<1|a[o][l]}const p=q.readBit(v,f);t[i]=p}}return y}function decodeTextRegion(e,t,n,a,r,s,i,o,l,f,c,h,u,m,p,d,g,b,w){if(e&&t)throw new Jbig2Error("refinement with Huffman is not supported");const j=[];let k,y;for(k=0;k<a;k++){y=new Uint8Array(n);r&&y.fill(r);j.push(y)}const q=g.decoder,v=g.contextCache;let S=e?-m.tableDeltaT.decode(w):-decodeInteger(v,"IADT",q),x=0;k=0;for(;k<s;){S+=e?m.tableDeltaT.decode(w):decodeInteger(v,"IADT",q);x+=e?m.tableFirstS.decode(w):decodeInteger(v,"IAFS",q);let a=x;for(;;){let r=0;i>1&&(r=e?w.readBits(b):decodeInteger(v,"IAIT",q));const s=i*S+r,x=e?m.symbolIDTable.decode(w):decodeIAID(v,q,l),C=t&&(e?w.readBit():decodeInteger(v,"IARI",q));let T=o[x],O=T[0].length,R=T.length;if(C){const e=decodeInteger(v,"IARDW",q),t=decodeInteger(v,"IARDH",q);O+=e;R+=t;T=decodeRefinement(O,R,p,T,(e>>1)+decodeInteger(v,"IARDX",q),(t>>1)+decodeInteger(v,"IARDY",q),!1,d,g)}let H=0;f?1&h?H=R-1:a+=R-1:h>1?a+=O-1:H=O-1;const D=s-(1&h?0:R-1),M=a-(2&h?O-1:0);let E,N,z;if(f)for(E=0;E<R;E++){y=j[M+E];if(!y)continue;z=T[E];const e=Math.min(n-D,O);switch(u){case 0:for(N=0;N<e;N++)y[D+N]|=z[N];break;case 2:for(N=0;N<e;N++)y[D+N]^=z[N];break;default:throw new Jbig2Error(`operator ${u} is not supported`)}}else for(N=0;N<R;N++){y=j[D+N];if(y){z=T[N];switch(u){case 0:for(E=0;E<O;E++)y[M+E]|=z[E];break;case 2:for(E=0;E<O;E++)y[M+E]^=z[E];break;default:throw new Jbig2Error(`operator ${u} is not supported`)}}}k++;const _=e?m.tableDeltaS.decode(w):decodeInteger(v,"IADS",q);if(null===_)break;a+=H+_+c}}return j}function readSegmentHeader(e,t){const n={};n.number=readUint32(e,t);const a=e[t+4],r=63&a;if(!aa[r])throw new Jbig2Error("invalid segment type: "+r);n.type=r;n.typeName=aa[r];n.deferredNonRetain=!!(128&a);const s=!!(64&a),i=e[t+5];let o=i>>5&7;const l=[31&i];let f=t+6;if(7===o){o=536870911&readUint32(e,f-1);f+=3;let t=o+8>>3;l[0]=e[f++];for(;--t>0;)l.push(e[f++])}else if(5===o||6===o)throw new Jbig2Error("invalid referred-to flags");n.retainBits=l;let c=4;n.number<=256?c=1:n.number<=65536&&(c=2);const h=[];let u,m;for(u=0;u<o;u++){let t;t=1===c?e[f]:2===c?readUint16(e,f):readUint32(e,f);h.push(t);f+=c}n.referredTo=h;if(s){n.pageAssociation=readUint32(e,f);f+=4}else n.pageAssociation=e[f++];n.length=readUint32(e,f);f+=4;if(4294967295===n.length){if(38!==r)throw new Jbig2Error("invalid unknown segment length");{const t=readRegionSegmentInformation(e,f),a=!!(1&e[f+la]),r=6,s=new Uint8Array(r);if(!a){s[0]=255;s[1]=172}s[2]=t.height>>>24&255;s[3]=t.height>>16&255;s[4]=t.height>>8&255;s[5]=255&t.height;for(u=f,m=e.length;u<m;u++){let t=0;for(;t<r&&s[t]===e[u+t];)t++;if(t===r){n.length=u+r;break}}if(4294967295===n.length)throw new Jbig2Error("segment end was not found")}}n.headerEnd=f;return n}function readSegments(e,t,n,a){const r=[];let s=n;for(;s<a;){const n=readSegmentHeader(t,s);s=n.headerEnd;const a={header:n,data:t};if(!e.randomAccess){a.start=s;s+=n.length;a.end=s}r.push(a);if(51===n.type)break}if(e.randomAccess)for(let e=0,t=r.length;e<t;e++){r[e].start=s;s+=r[e].header.length;r[e].end=s}return r}function readRegionSegmentInformation(e,t){return{width:readUint32(e,t),height:readUint32(e,t+4),x:readUint32(e,t+8),y:readUint32(e,t+12),combinationOperator:7&e[t+16]}}const la=17;function processSegment(e,t){const n=e.header,a=e.data,r=e.end;let s,i,o,l,f=e.start;switch(n.type){case 0:const e={},t=readUint16(a,f);e.huffman=!!(1&t);e.refinement=!!(2&t);e.huffmanDHSelector=t>>2&3;e.huffmanDWSelector=t>>4&3;e.bitmapSizeSelector=t>>6&1;e.aggregationInstancesSelector=t>>7&1;e.bitmapCodingContextUsed=!!(256&t);e.bitmapCodingContextRetained=!!(512&t);e.template=t>>10&3;e.refinementTemplate=t>>12&1;f+=2;if(!e.huffman){l=0===e.template?4:1;i=[];for(o=0;o<l;o++){i.push({x:readInt8(a,f),y:readInt8(a,f+1)});f+=2}e.at=i}if(e.refinement&&!e.refinementTemplate){i=[];for(o=0;o<2;o++){i.push({x:readInt8(a,f),y:readInt8(a,f+1)});f+=2}e.refinementAt=i}e.numberOfExportedSymbols=readUint32(a,f);f+=4;e.numberOfNewSymbols=readUint32(a,f);f+=4;s=[e,n.number,n.referredTo,a,f,r];break;case 6:case 7:const c={};c.info=readRegionSegmentInformation(a,f);f+=la;const h=readUint16(a,f);f+=2;c.huffman=!!(1&h);c.refinement=!!(2&h);c.logStripSize=h>>2&3;c.stripSize=1<<c.logStripSize;c.referenceCorner=h>>4&3;c.transposed=!!(64&h);c.combinationOperator=h>>7&3;c.defaultPixelValue=h>>9&1;c.dsOffset=h<<17>>27;c.refinementTemplate=h>>15&1;if(c.huffman){const e=readUint16(a,f);f+=2;c.huffmanFS=3&e;c.huffmanDS=e>>2&3;c.huffmanDT=e>>4&3;c.huffmanRefinementDW=e>>6&3;c.huffmanRefinementDH=e>>8&3;c.huffmanRefinementDX=e>>10&3;c.huffmanRefinementDY=e>>12&3;c.huffmanRefinementSizeSelector=!!(16384&e)}if(c.refinement&&!c.refinementTemplate){i=[];for(o=0;o<2;o++){i.push({x:readInt8(a,f),y:readInt8(a,f+1)});f+=2}c.refinementAt=i}c.numberOfSymbolInstances=readUint32(a,f);f+=4;s=[c,n.referredTo,a,f,r];break;case 16:const u={},m=a[f++];u.mmr=!!(1&m);u.template=m>>1&3;u.patternWidth=a[f++];u.patternHeight=a[f++];u.maxPatternIndex=readUint32(a,f);f+=4;s=[u,n.number,a,f,r];break;case 22:case 23:const p={};p.info=readRegionSegmentInformation(a,f);f+=la;const d=a[f++];p.mmr=!!(1&d);p.template=d>>1&3;p.enableSkip=!!(8&d);p.combinationOperator=d>>4&7;p.defaultPixelValue=d>>7&1;p.gridWidth=readUint32(a,f);f+=4;p.gridHeight=readUint32(a,f);f+=4;p.gridOffsetX=4294967295&readUint32(a,f);f+=4;p.gridOffsetY=4294967295&readUint32(a,f);f+=4;p.gridVectorX=readUint16(a,f);f+=2;p.gridVectorY=readUint16(a,f);f+=2;s=[p,n.referredTo,a,f,r];break;case 38:case 39:const g={};g.info=readRegionSegmentInformation(a,f);f+=la;const b=a[f++];g.mmr=!!(1&b);g.template=b>>1&3;g.prediction=!!(8&b);if(!g.mmr){l=0===g.template?4:1;i=[];for(o=0;o<l;o++){i.push({x:readInt8(a,f),y:readInt8(a,f+1)});f+=2}g.at=i}s=[g,a,f,r];break;case 48:const w={width:readUint32(a,f),height:readUint32(a,f+4),resolutionX:readUint32(a,f+8),resolutionY:readUint32(a,f+12)};4294967295===w.height&&delete w.height;const j=a[f+16];readUint16(a,f+17);w.lossless=!!(1&j);w.refinement=!!(2&j);w.defaultPixelValue=j>>2&1;w.combinationOperator=j>>3&3;w.requiresBuffer=!!(32&j);w.combinationOperatorOverride=!!(64&j);s=[w];break;case 49:case 50:case 51:case 62:break;case 53:s=[n.number,a,f,r];break;default:throw new Jbig2Error(`segment type ${n.typeName}(${n.type}) is not implemented`)}const c="on"+n.typeName;c in t&&t[c].apply(t,s)}function processSegments(e,t){for(let n=0,a=e.length;n<a;n++)processSegment(e[n],t)}class SimpleSegmentVisitor{onPageInformation(e){this.currentPageInfo=e;const t=e.width+7>>3,n=new Uint8ClampedArray(t*e.height);e.defaultPixelValue&&n.fill(255);this.buffer=n}drawBitmap(e,t){const n=this.currentPageInfo,a=e.width,r=e.height,s=n.width+7>>3,i=n.combinationOperatorOverride?e.combinationOperator:n.combinationOperator,o=this.buffer,l=128>>(7&e.x);let f,c,h,u,m=e.y*s+(e.x>>3);switch(i){case 0:for(f=0;f<r;f++){h=l;u=m;for(c=0;c<a;c++){t[f][c]&&(o[u]|=h);h>>=1;if(!h){h=128;u++}}m+=s}break;case 2:for(f=0;f<r;f++){h=l;u=m;for(c=0;c<a;c++){t[f][c]&&(o[u]^=h);h>>=1;if(!h){h=128;u++}}m+=s}break;default:throw new Jbig2Error(`operator ${i} is not supported`)}}onImmediateGenericRegion(e,t,n,a){const r=e.info,s=new DecodingContext(t,n,a),i=decodeBitmap(e.mmr,r.width,r.height,e.template,e.prediction,null,e.at,s);this.drawBitmap(r,i)}onImmediateLosslessGenericRegion(){this.onImmediateGenericRegion(...arguments)}onSymbolDictionary(e,t,n,a,r,s){let i,o;if(e.huffman){i=function getSymbolDictionaryHuffmanTables(e,t,n){let a,r,s,i,o=0;switch(e.huffmanDHSelector){case 0:case 1:a=getStandardTable(e.huffmanDHSelector+4);break;case 3:a=getCustomHuffmanTable(o,t,n);o++;break;default:throw new Jbig2Error("invalid Huffman DH selector")}switch(e.huffmanDWSelector){case 0:case 1:r=getStandardTable(e.huffmanDWSelector+2);break;case 3:r=getCustomHuffmanTable(o,t,n);o++;break;default:throw new Jbig2Error("invalid Huffman DW selector")}if(e.bitmapSizeSelector){s=getCustomHuffmanTable(o,t,n);o++}else s=getStandardTable(1);i=e.aggregationInstancesSelector?getCustomHuffmanTable(o,t,n):getStandardTable(1);return{tableDeltaHeight:a,tableDeltaWidth:r,tableBitmapSize:s,tableAggregateInstances:i}}(e,n,this.customTables);o=new Reader(a,r,s)}let l=this.symbols;l||(this.symbols=l={});const f=[];for(const e of n){const t=l[e];t&&f.push(...t)}const c=new DecodingContext(a,r,s);l[t]=function decodeSymbolDictionary(e,t,n,a,r,s,i,o,l,f,c,h){if(e&&t)throw new Jbig2Error("symbol refinement with Huffman is not supported");const u=[];let m=0,p=log2(n.length+a);const d=c.decoder,g=c.contextCache;let b,w;if(e){b=getStandardTable(1);w=[];p=Math.max(p,1)}for(;u.length<a;){m+=e?s.tableDeltaHeight.decode(h):decodeInteger(g,"IADH",d);let a=0,r=0;const b=e?w.length:0;for(;;){const b=e?s.tableDeltaWidth.decode(h):decodeInteger(g,"IADW",d);if(null===b)break;a+=b;r+=a;let j;if(t){const r=decodeInteger(g,"IAAI",d);if(r>1)j=decodeTextRegion(e,t,a,m,0,r,1,n.concat(u),p,0,0,1,0,s,l,f,c,0,h);else{const e=decodeIAID(g,d,p),t=decodeInteger(g,"IARDX",d),r=decodeInteger(g,"IARDY",d);j=decodeRefinement(a,m,l,e<n.length?n[e]:u[e-n.length],t,r,!1,f,c)}u.push(j)}else if(e)w.push(a);else{j=decodeBitmap(!1,a,m,i,!1,null,o,c);u.push(j)}}if(e&&!t){const e=s.tableBitmapSize.decode(h);h.byteAlign();let t;if(0===e)t=readUncompressedBitmap(h,r,m);else{const n=h.end,a=h.position+e;h.end=a;t=decodeMMRBitmap(h,r,m,!1);h.end=n;h.position=a}const n=w.length;if(b===n-1)u.push(t);else{let e,a,r,s,i,o=0;for(e=b;e<n;e++){s=w[e];r=o+s;i=[];for(a=0;a<m;a++)i.push(t[a].subarray(o,r));u.push(i);o=r}}}}const j=[],k=[];let y,q,v=!1;const S=n.length+a;for(;k.length<S;){let t=e?b.decode(h):decodeInteger(g,"IAEX",d);for(;t--;)k.push(v);v=!v}for(y=0,q=n.length;y<q;y++)k[y]&&j.push(n[y]);for(let e=0;e<a;y++,e++)k[y]&&j.push(u[e]);return j}(e.huffman,e.refinement,f,e.numberOfNewSymbols,e.numberOfExportedSymbols,i,e.template,e.at,e.refinementTemplate,e.refinementAt,c,o)}onImmediateTextRegion(e,t,n,a,r){const s=e.info;let i,o;const l=this.symbols,f=[];for(const e of t){const t=l[e];t&&f.push(...t)}const c=log2(f.length);if(e.huffman){o=new Reader(n,a,r);i=function getTextRegionHuffmanTables(e,t,n,a,r){const s=[];for(let e=0;e<=34;e++){const t=r.readBits(4);s.push(new HuffmanLine([e,t,0,0]))}const i=new HuffmanTable(s,!1);s.length=0;for(let e=0;e<a;){const t=i.decode(r);if(t>=32){let n,a,i;switch(t){case 32:if(0===e)throw new Jbig2Error("no previous value in symbol ID table");a=r.readBits(2)+3;n=s[e-1].prefixLength;break;case 33:a=r.readBits(3)+3;n=0;break;case 34:a=r.readBits(7)+11;n=0;break;default:throw new Jbig2Error("invalid code length in symbol ID table")}for(i=0;i<a;i++){s.push(new HuffmanLine([e,n,0,0]));e++}}else{s.push(new HuffmanLine([e,t,0,0]));e++}}r.byteAlign();const o=new HuffmanTable(s,!1);let l,f,c,h=0;switch(e.huffmanFS){case 0:case 1:l=getStandardTable(e.huffmanFS+6);break;case 3:l=getCustomHuffmanTable(h,t,n);h++;break;default:throw new Jbig2Error("invalid Huffman FS selector")}switch(e.huffmanDS){case 0:case 1:case 2:f=getStandardTable(e.huffmanDS+8);break;case 3:f=getCustomHuffmanTable(h,t,n);h++;break;default:throw new Jbig2Error("invalid Huffman DS selector")}switch(e.huffmanDT){case 0:case 1:case 2:c=getStandardTable(e.huffmanDT+11);break;case 3:c=getCustomHuffmanTable(h,t,n);h++;break;default:throw new Jbig2Error("invalid Huffman DT selector")}if(e.refinement)throw new Jbig2Error("refinement with Huffman is not supported");return{symbolIDTable:o,tableFirstS:l,tableDeltaS:f,tableDeltaT:c}}(e,t,this.customTables,f.length,o)}const h=new DecodingContext(n,a,r),u=decodeTextRegion(e.huffman,e.refinement,s.width,s.height,e.defaultPixelValue,e.numberOfSymbolInstances,e.stripSize,f,c,e.transposed,e.dsOffset,e.referenceCorner,e.combinationOperator,i,e.refinementTemplate,e.refinementAt,h,e.logStripSize,o);this.drawBitmap(s,u)}onImmediateLosslessTextRegion(){this.onImmediateTextRegion(...arguments)}onPatternDictionary(e,t,n,a,r){let s=this.patterns;s||(this.patterns=s={});const i=new DecodingContext(n,a,r);s[t]=function decodePatternDictionary(e,t,n,a,r,s){const i=[];if(!e){i.push({x:-t,y:0});0===r&&i.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2})}const o=decodeBitmap(e,(a+1)*t,n,r,!1,null,i,s),l=[];for(let e=0;e<=a;e++){const a=[],r=t*e,s=r+t;for(let e=0;e<n;e++)a.push(o[e].subarray(r,s));l.push(a)}return l}(e.mmr,e.patternWidth,e.patternHeight,e.maxPatternIndex,e.template,i)}onImmediateHalftoneRegion(e,t,n,a,r){const s=this.patterns[t[0]],i=e.info,o=new DecodingContext(n,a,r),l=function decodeHalftoneRegion(e,t,n,a,r,s,i,o,l,f,c,h,u,m,p){if(i)throw new Jbig2Error("skip is not supported");if(0!==o)throw new Jbig2Error(`operator "${o}" is not supported in halftone region`);const d=[];let g,b,w;for(g=0;g<r;g++){w=new Uint8Array(a);s&&w.fill(s);d.push(w)}const j=t.length,k=t[0],y=k[0].length,q=k.length,v=log2(j),S=[];if(!e){S.push({x:n<=1?3:2,y:-1});0===n&&S.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2})}const x=[];let C,T,O,R,H,D,M,E,N,z,_;e&&(C=new Reader(p.data,p.start,p.end));for(g=v-1;g>=0;g--){T=e?decodeMMRBitmap(C,l,f,!0):decodeBitmap(!1,l,f,n,!1,null,S,p);x[g]=T}for(O=0;O<f;O++)for(R=0;R<l;R++){H=0;D=0;for(b=v-1;b>=0;b--){H^=x[b][O][R];D|=H<<b}M=t[D];E=c+O*m+R*u>>8;N=h+O*u-R*m>>8;if(E>=0&&E+y<=a&&N>=0&&N+q<=r)for(g=0;g<q;g++){_=d[N+g];z=M[g];for(b=0;b<y;b++)_[E+b]|=z[b]}else{let e,t;for(g=0;g<q;g++){t=N+g;if(!(t<0||t>=r)){_=d[t];z=M[g];for(b=0;b<y;b++){e=E+b;e>=0&&e<a&&(_[e]|=z[b])}}}}}return d}(e.mmr,s,e.template,i.width,i.height,e.defaultPixelValue,e.enableSkip,e.combinationOperator,e.gridWidth,e.gridHeight,e.gridOffsetX,e.gridOffsetY,e.gridVectorX,e.gridVectorY,o);this.drawBitmap(i,l)}onImmediateLosslessHalftoneRegion(){this.onImmediateHalftoneRegion(...arguments)}onTables(e,t,n,a){let r=this.customTables;r||(this.customTables=r={});r[e]=function decodeTablesSegment(e,t,n){const a=e[t],r=4294967295&readUint32(e,t+1),s=4294967295&readUint32(e,t+5),i=new Reader(e,t+9,n),o=1+(a>>1&7),l=1+(a>>4&7),f=[];let c,h,u=r;do{c=i.readBits(o);h=i.readBits(l);f.push(new HuffmanLine([u,c,h,0]));u+=1<<h}while(u<s);c=i.readBits(o);f.push(new HuffmanLine([r-1,c,32,0,"lower"]));c=i.readBits(o);f.push(new HuffmanLine([s,c,32,0]));if(1&a){c=i.readBits(o);f.push(new HuffmanLine([c,0]))}return new HuffmanTable(f,!1)}(t,n,a)}}class HuffmanLine{constructor(e){if(2===e.length){this.isOOB=!0;this.rangeLow=0;this.prefixLength=e[0];this.rangeLength=0;this.prefixCode=e[1];this.isLowerRange=!1}else{this.isOOB=!1;this.rangeLow=e[0];this.prefixLength=e[1];this.rangeLength=e[2];this.prefixCode=e[3];this.isLowerRange="lower"===e[4]}}}class HuffmanTreeNode{constructor(e){this.children=[];if(e){this.isLeaf=!0;this.rangeLength=e.rangeLength;this.rangeLow=e.rangeLow;this.isLowerRange=e.isLowerRange;this.isOOB=e.isOOB}else this.isLeaf=!1}buildTree(e,t){const n=e.prefixCode>>t&1;if(t<=0)this.children[n]=new HuffmanTreeNode(e);else{let a=this.children[n];a||(this.children[n]=a=new HuffmanTreeNode(null));a.buildTree(e,t-1)}}decodeNode(e){if(this.isLeaf){if(this.isOOB)return null;const t=e.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-t:t)}const t=this.children[e.readBit()];if(!t)throw new Jbig2Error("invalid Huffman data");return t.decodeNode(e)}}class HuffmanTable{constructor(e,t){t||this.assignPrefixCodes(e);this.rootNode=new HuffmanTreeNode(null);for(let t=0,n=e.length;t<n;t++){const n=e[t];n.prefixLength>0&&this.rootNode.buildTree(n,n.prefixLength-1)}}decode(e){return this.rootNode.decodeNode(e)}assignPrefixCodes(e){const t=e.length;let n=0;for(let a=0;a<t;a++)n=Math.max(n,e[a].prefixLength);const a=new Uint32Array(n+1);for(let n=0;n<t;n++)a[e[n].prefixLength]++;let r,s,i,o=1,l=0;a[0]=0;for(;o<=n;){l=l+a[o-1]<<1;r=l;s=0;for(;s<t;){i=e[s];if(i.prefixLength===o){i.prefixCode=r;r++}s++}o++}}}const fa={};function getStandardTable(e){let t,n=fa[e];if(n)return n;switch(e){case 1:t=[[0,1,4,0],[16,2,8,2],[272,3,16,6],[65808,3,32,7]];break;case 2:t=[[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[75,6,32,62],[6,63]];break;case 3:t=[[-256,8,8,254],[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[-257,8,32,255,"lower"],[75,7,32,126],[6,62]];break;case 4:t=[[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[76,5,32,31]];break;case 5:t=[[-255,7,8,126],[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[-256,7,32,127,"lower"],[76,6,32,62]];break;case 6:t=[[-2048,5,10,28],[-1024,4,9,8],[-512,4,8,9],[-256,4,7,10],[-128,5,6,29],[-64,5,5,30],[-32,4,5,11],[0,2,7,0],[128,3,7,2],[256,3,8,3],[512,4,9,12],[1024,4,10,13],[-2049,6,32,62,"lower"],[2048,6,32,63]];break;case 7:t=[[-1024,4,9,8],[-512,3,8,0],[-256,4,7,9],[-128,5,6,26],[-64,5,5,27],[-32,4,5,10],[0,4,5,11],[32,5,5,28],[64,5,6,29],[128,4,7,12],[256,3,8,1],[512,3,9,2],[1024,3,10,3],[-1025,5,32,30,"lower"],[2048,5,32,31]];break;case 8:t=[[-15,8,3,252],[-7,9,1,508],[-5,8,1,253],[-3,9,0,509],[-2,7,0,124],[-1,4,0,10],[0,2,1,0],[2,5,0,26],[3,6,0,58],[4,3,4,4],[20,6,1,59],[22,4,4,11],[38,4,5,12],[70,5,6,27],[134,5,7,28],[262,6,7,60],[390,7,8,125],[646,6,10,61],[-16,9,32,510,"lower"],[1670,9,32,511],[2,1]];break;case 9:t=[[-31,8,4,252],[-15,9,2,508],[-11,8,2,253],[-7,9,1,509],[-5,7,1,124],[-3,4,1,10],[-1,3,1,2],[1,3,1,3],[3,5,1,26],[5,6,1,58],[7,3,5,4],[39,6,2,59],[43,4,5,11],[75,4,6,12],[139,5,7,27],[267,5,8,28],[523,6,8,60],[779,7,9,125],[1291,6,11,61],[-32,9,32,510,"lower"],[3339,9,32,511],[2,0]];break;case 10:t=[[-21,7,4,122],[-5,8,0,252],[-4,7,0,123],[-3,5,0,24],[-2,2,2,0],[2,5,0,25],[3,6,0,54],[4,7,0,124],[5,8,0,253],[6,2,6,1],[70,5,5,26],[102,6,5,55],[134,6,6,56],[198,6,7,57],[326,6,8,58],[582,6,9,59],[1094,6,10,60],[2118,7,11,125],[-22,8,32,254,"lower"],[4166,8,32,255],[2,2]];break;case 11:t=[[1,1,0,0],[2,2,1,2],[4,4,0,12],[5,4,1,13],[7,5,1,28],[9,5,2,29],[13,6,2,60],[17,7,2,122],[21,7,3,123],[29,7,4,124],[45,7,5,125],[77,7,6,126],[141,7,32,127]];break;case 12:t=[[1,1,0,0],[2,2,0,2],[3,3,1,6],[5,5,0,28],[6,5,1,29],[8,6,1,60],[10,7,0,122],[11,7,1,123],[13,7,2,124],[17,7,3,125],[25,7,4,126],[41,8,5,254],[73,8,32,255]];break;case 13:t=[[1,1,0,0],[2,3,0,4],[3,4,0,12],[4,5,0,28],[5,4,1,13],[7,3,3,5],[15,6,1,58],[17,6,2,59],[21,6,3,60],[29,6,4,61],[45,6,5,62],[77,7,6,126],[141,7,32,127]];break;case 14:t=[[-2,3,0,4],[-1,3,0,5],[0,1,0,0],[1,3,0,6],[2,3,0,7]];break;case 15:t=[[-24,7,4,124],[-8,6,2,60],[-4,5,1,28],[-2,4,0,12],[-1,3,0,4],[0,1,0,0],[1,3,0,5],[2,4,0,13],[3,5,1,29],[5,6,2,61],[9,7,4,125],[-25,7,32,126,"lower"],[25,7,32,127]];break;default:throw new Jbig2Error(`standard table B.${e} does not exist`)}for(let e=0,n=t.length;e<n;e++)t[e]=new HuffmanLine(t[e]);n=new HuffmanTable(t,!0);fa[e]=n;return n}class Reader{constructor(e,t,n){this.data=e;this.start=t;this.end=n;this.position=t;this.shift=-1;this.currentByte=0}readBit(){if(this.shift<0){if(this.position>=this.end)throw new Jbig2Error("end of data while reading bit");this.currentByte=this.data[this.position++];this.shift=7}const e=this.currentByte>>this.shift&1;this.shift--;return e}readBits(e){let t,n=0;for(t=e-1;t>=0;t--)n|=this.readBit()<<t;return n}byteAlign(){this.shift=-1}next(){return this.position>=this.end?-1:this.data[this.position++]}}function getCustomHuffmanTable(e,t,n){let a=0;for(let r=0,s=t.length;r<s;r++){const s=n[t[r]];if(s){if(e===a)return s;a++}}throw new Jbig2Error("can't find custom Huffman table")}function readUncompressedBitmap(e,t,n){const a=[];for(let r=0;r<n;r++){const n=new Uint8Array(t);a.push(n);for(let a=0;a<t;a++)n[a]=e.readBit();e.byteAlign()}return a}function decodeMMRBitmap(e,t,n,a){const r=new CCITTFaxDecoder(e,{K:-1,Columns:t,Rows:n,BlackIs1:!0,EndOfBlock:a}),s=[];let i,o=!1;for(let e=0;e<n;e++){const e=new Uint8Array(t);s.push(e);let n=-1;for(let a=0;a<t;a++){if(n<0){i=r.readNextChar();if(-1===i){i=0;o=!0}n=7}e[a]=i>>n&1;n--}}if(a&&!o){const e=5;for(let t=0;t<e&&-1!==r.readNextChar();t++);}return s}class Jbig2Image{parseChunks(e){return function parseJbig2Chunks(e){const t=new SimpleSegmentVisitor;for(let n=0,a=e.length;n<a;n++){const a=e[n];processSegments(readSegments({},a.data,a.start,a.end),t)}return t.buffer}(e)}parse(e){throw new Error("Not implemented: Jbig2Image.parse")}}class Jbig2Stream extends DecodeStream{constructor(e,t,n){super(t);this.stream=e;this.dict=e.dict;this.maybeLength=t;this.params=n}get bytes(){return shadow(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(){this.decodeImageFallback()}get isAsyncDecoder(){return!0}get isImageStream(){return!0}async decodeImage(e,t,n){if(this.eof)return this.buffer;e||=this.bytes;try{let t=null;if(this.params instanceof Dict){const e=this.params.get("JBIG2Globals");e instanceof BaseStream&&(t=e.getBytes())}this.buffer=await JBig2CCITTFaxWasmImage.decode(e,this.dict.get("Width"),this.dict.get("Height"),t)}catch{warn("Jbig2Stream: Falling back to JS JBIG2 decoder.");return this.decodeImageFallback(e,t)}this.bufferLength=this.buffer.length;this.eof=!0;return this.buffer}decodeImageFallback(e,t){if(this.eof)return this.buffer;e||=this.bytes;const n=new Jbig2Image,a=[];if(this.params instanceof Dict){const e=this.params.get("JBIG2Globals");if(e instanceof BaseStream){const t=e.getBytes();a.push({data:t,start:0,end:t.length})}}a.push({data:e,start:0,end:e.length});const r=n.parseChunks(a),s=r.length;for(let e=0;e<s;e++)r[e]^=255;this.buffer=r;this.bufferLength=s;this.eof=!0;return this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}}class JpxStream extends DecodeStream{constructor(e,t,n){super(t);this.stream=e;this.dict=e.dict;this.maybeLength=t;this.params=n}get bytes(){return shadow(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(e){unreachable("JpxStream.readBlock")}get isAsyncDecoder(){return!0}async decodeImage(e,t,n){if(this.eof)return this.buffer;e||=this.bytes;this.buffer=await JpxImage.decode(e,n);this.bufferLength=this.buffer.length;this.eof=!0;return this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}get isImageStream(){return!0}}class LZWStream extends DecodeStream{constructor(e,t,n){super(t);this.stream=e;this.dict=e.dict;this.cachedData=0;this.bitsCached=0;const a=4096,r={earlyChange:n,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(a),dictionaryLengths:new Uint16Array(a),dictionaryPrevCodes:new Uint16Array(a),currentSequence:new Uint8Array(a),currentSequenceLength:0};for(let e=0;e<256;++e){r.dictionaryValues[e]=e;r.dictionaryLengths[e]=1}this.lzwState=r}readBits(e){let t=this.bitsCached,n=this.cachedData;for(;t<e;){const e=this.stream.getByte();if(-1===e){this.eof=!0;return null}n=n<<8|e;t+=8}this.bitsCached=t-=e;this.cachedData=n;return n>>>t&(1<<e)-1}readBlock(){let e,t,n,a=1024;const r=this.lzwState;if(!r)return;const s=r.earlyChange;let i=r.nextCode;const o=r.dictionaryValues,l=r.dictionaryLengths,f=r.dictionaryPrevCodes;let c=r.codeLength,h=r.prevCode;const u=r.currentSequence;let m=r.currentSequenceLength,p=0,d=this.bufferLength,g=this.ensureBuffer(this.bufferLength+a);for(e=0;e<512;e++){const e=this.readBits(c),r=m>0;if(e<256){u[0]=e;m=1}else{if(!(e>=258)){if(256===e){c=9;i=258;m=0;continue}this.eof=!0;delete this.lzwState;break}if(e<i){m=l[e];for(t=m-1,n=e;t>=0;t--){u[t]=o[n];n=f[n]}}else u[m++]=u[0]}if(r){f[i]=h;l[i]=l[h]+1;o[i]=u[0];i++;c=i+s&i+s-1?c:0|Math.min(Math.log(i+s)/.6931471805599453+1,12)}h=e;p+=m;if(a<p){do{a+=512}while(a<p);g=this.ensureBuffer(this.bufferLength+a)}for(t=0;t<m;t++)g[d++]=u[t]}r.nextCode=i;r.codeLength=c;r.prevCode=h;r.currentSequenceLength=m;this.bufferLength=d}}class PredictorStream extends DecodeStream{constructor(e,t,n){super(t);if(!(n instanceof Dict))return e;const a=this.predictor=n.get("Predictor")||1;if(a<=1)return e;if(2!==a&&(a<10||a>15))throw new FormatError(`Unsupported predictor: ${a}`);this.readBlock=2===a?this.readBlockTiff:this.readBlockPng;this.stream=e;this.dict=e.dict;const r=this.colors=n.get("Colors")||1,s=this.bits=n.get("BPC","BitsPerComponent")||8,i=this.columns=n.get("Columns")||1;this.pixBytes=r*s+7>>3;this.rowBytes=i*r*s+7>>3;return this}readBlockTiff(){const e=this.rowBytes,t=this.bufferLength,n=this.ensureBuffer(t+e),a=this.bits,r=this.colors,s=this.stream.getBytes(e);this.eof=!s.length;if(this.eof)return;let i,o=0,l=0,f=0,c=0,h=t;if(1===a&&1===r)for(i=0;i<e;++i){let e=s[i]^o;e^=e>>1;e^=e>>2;e^=e>>4;o=(1&e)<<7;n[h++]=e}else if(8===a){for(i=0;i<r;++i)n[h++]=s[i];for(;i<e;++i){n[h]=n[h-r]+s[i];h++}}else if(16===a){const t=2*r;for(i=0;i<t;++i)n[h++]=s[i];for(;i<e;i+=2){const e=((255&s[i])<<8)+(255&s[i+1])+((255&n[h-t])<<8)+(255&n[h-t+1]);n[h++]=e>>8&255;n[h++]=255&e}}else{const e=new Uint8Array(r+1),h=(1<<a)-1;let u=0,m=t;const p=this.columns;for(i=0;i<p;++i)for(let t=0;t<r;++t){if(f<a){o=o<<8|255&s[u++];f+=8}e[t]=e[t]+(o>>f-a)&h;f-=a;l=l<<a|e[t];c+=a;if(c>=8){n[m++]=l>>c-8&255;c-=8}}c>0&&(n[m++]=(l<<8-c)+(o&(1<<8-c)-1))}this.bufferLength+=e}readBlockPng(){const e=this.rowBytes,t=this.pixBytes,n=this.stream.getByte(),a=this.stream.getBytes(e);this.eof=!a.length;if(this.eof)return;const r=this.bufferLength,s=this.ensureBuffer(r+e);let i=s.subarray(r-e,r);0===i.length&&(i=new Uint8Array(e));let o,l,f,c=r;switch(n){case 0:for(o=0;o<e;++o)s[c++]=a[o];break;case 1:for(o=0;o<t;++o)s[c++]=a[o];for(;o<e;++o){s[c]=s[c-t]+a[o]&255;c++}break;case 2:for(o=0;o<e;++o)s[c++]=i[o]+a[o]&255;break;case 3:for(o=0;o<t;++o)s[c++]=(i[o]>>1)+a[o];for(;o<e;++o){s[c]=(i[o]+s[c-t]>>1)+a[o]&255;c++}break;case 4:for(o=0;o<t;++o){l=i[o];f=a[o];s[c++]=l+f}for(;o<e;++o){l=i[o];const e=i[o-t],n=s[c-t],r=n+l-e;let h=r-n;h<0&&(h=-h);let u=r-l;u<0&&(u=-u);let m=r-e;m<0&&(m=-m);f=a[o];s[c++]=h<=u&&h<=m?n+f:u<=m?l+f:e+f}break;default:throw new FormatError(`Unsupported predictor: ${n}`)}this.bufferLength+=e}}class RunLengthStream extends DecodeStream{constructor(e,t){super(t);this.stream=e;this.dict=e.dict}readBlock(){const e=this.stream.getBytes(2);if(!e||e.length<2||128===e[0]){this.eof=!0;return}let t,n=this.bufferLength,a=e[0];if(a<128){t=this.ensureBuffer(n+a+1);t[n++]=e[1];if(a>0){const e=this.stream.getBytes(a);t.set(e,n);n+=a}}else{a=257-a;t=this.ensureBuffer(n+a+1);t.fill(e[1],n,n+a);n+=a}this.bufferLength=n}}class Parser{constructor({lexer:e,xref:t,allowStreams:n=!1,recoveryMode:a=!1}){this.lexer=e;this.xref=t;this.allowStreams=n;this.recoveryMode=a;this.imageCache=Object.create(null);this._imageId=0;this.refill()}refill(){this.buf1=this.lexer.getObj();this.buf2=this.lexer.getObj()}shift(){if(this.buf2 instanceof Cmd&&"ID"===this.buf2.cmd){this.buf1=this.buf2;this.buf2=null}else{this.buf1=this.buf2;this.buf2=this.lexer.getObj()}}tryShift(){try{this.shift();return!0}catch(e){if(e instanceof MissingDataException)throw e;return!1}}getObj(e=null){const t=this.buf1;this.shift();if(t instanceof Cmd)switch(t.cmd){case"BI":return this.makeInlineImage(e);case"[":const n=[];for(;!isCmd(this.buf1,"]")&&this.buf1!==hn;)n.push(this.getObj(e));if(this.buf1===hn){if(this.recoveryMode)return n;throw new ParserEOFException("End of file inside array.")}this.shift();return n;case"<<":const a=new Dict(this.xref);for(;!isCmd(this.buf1,">>")&&this.buf1!==hn;){if(!(this.buf1 instanceof Name)){info("Malformed dictionary: key must be a name object");this.shift();continue}const t=this.buf1.name;this.shift();if(this.buf1===hn)break;a.set(t,this.getObj(e))}if(this.buf1===hn){if(this.recoveryMode)return a;throw new ParserEOFException("End of file inside dictionary.")}if(isCmd(this.buf2,"stream"))return this.allowStreams?this.makeStream(a,e):a;this.shift();return a;default:return t}if(Number.isInteger(t)){if(Number.isInteger(this.buf1)&&isCmd(this.buf2,"R")){const e=Ref.get(t,this.buf1);this.shift();this.shift();return e}return t}return"string"==typeof t&&e?e.decryptString(t):t}findDefaultInlineStreamEnd(e){const{knownCommands:t}=this.lexer,n=e.pos;let a,r,s=0;for(;-1!==(a=e.getByte());)if(0===s)s=69===a?1:0;else if(1===s)s=73===a?2:0;else if(32===a||10===a||13===a){r=e.pos;const n=e.peekBytes(15),i=n.length;if(0===i)break;for(let e=0;e<i;e++){a=n[e];if((0!==a||0===n[e+1])&&(10!==a&&13!==a&&(a<32||a>127))){s=0;break}}if(2!==s)continue;if(!t){warn("findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined.");continue}const o=new Lexer(new Stream(e.peekBytes(75)),t);o._hexStringWarn=()=>{};let l=0;for(;;){const e=o.getObj();if(e===hn){s=0;break}if(e instanceof Cmd){const n=t[e.cmd];if(!n){s=0;break}if(n.variableArgs?l<=n.numArgs:l===n.numArgs)break;l=0;continue}l++}if(2===s)break}else s=0;if(-1===a){warn("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker");if(r){warn('... trying to recover by using the last "EI" occurrence.');e.skip(-(e.pos-r))}}let i=4;e.skip(-i);a=e.peekByte();e.skip(i);isWhiteSpace(a)||i--;return e.pos-i-n}findDCTDecodeInlineStreamEnd(e){const t=e.pos;let n,a,r=!1;for(;-1!==(n=e.getByte());)if(255===n){switch(e.getByte()){case 0:break;case 255:e.skip(-1);break;case 217:r=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:a=e.getUint16();a>2?e.skip(a-2):e.skip(-2)}if(r)break}const s=e.pos-t;if(-1===n){warn("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead.");e.skip(-s);return this.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);return s}findASCII85DecodeInlineStreamEnd(e){const t=e.pos;let n;for(;-1!==(n=e.getByte());)if(126===n){const t=e.pos;n=e.peekByte();for(;isWhiteSpace(n);){e.skip();n=e.peekByte()}if(62===n){e.skip();break}if(e.pos>t){const t=e.peekBytes(2);if(69===t[0]&&73===t[1])break}}const a=e.pos-t;if(-1===n){warn("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead.");e.skip(-a);return this.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);return a}findASCIIHexDecodeInlineStreamEnd(e){const t=e.pos;let n;for(;-1!==(n=e.getByte())&&62!==n;);const a=e.pos-t;if(-1===n){warn("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead.");e.skip(-a);return this.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);return a}inlineStreamSkipEI(e){let t,n=0;for(;-1!==(t=e.getByte());)if(0===n)n=69===t?1:0;else if(1===n)n=73===t?2:0;else if(2===n)break}makeInlineImage(e){const t=this.lexer,n=t.stream,a=Object.create(null);let r;for(;!isCmd(this.buf1,"ID")&&this.buf1!==hn;){if(!(this.buf1 instanceof Name))throw new FormatError("Dictionary key must be a name object");const t=this.buf1.name;this.shift();if(this.buf1===hn)break;a[t]=this.getObj(e)}-1!==t.beginInlineImagePos&&(r=n.pos-t.beginInlineImagePos);const s=this.xref.fetchIfRef(a.F||a.Filter);let i;if(s instanceof Name)i=s.name;else if(Array.isArray(s)){const e=this.xref.fetchIfRef(s[0]);e instanceof Name&&(i=e.name)}const o=n.pos;let l,f;switch(i){case"DCT":case"DCTDecode":l=this.findDCTDecodeInlineStreamEnd(n);break;case"A85":case"ASCII85Decode":l=this.findASCII85DecodeInlineStreamEnd(n);break;case"AHx":case"ASCIIHexDecode":l=this.findASCIIHexDecodeInlineStreamEnd(n);break;default:l=this.findDefaultInlineStreamEnd(n)}if(l<1e3&&r>0){const e=n.pos;n.pos=t.beginInlineImagePos;f=function getInlineImageCacheKey(e){const t=[],n=e.length;let a=0;for(;a<n-1;)t.push(e[a++]<<8|e[a++]);a<n&&t.push(e[a]);return n+"_"+String.fromCharCode.apply(null,t)}(n.getBytes(r+l));n.pos=e;const a=this.imageCache[f];if(void 0!==a){this.buf2=Cmd.get("EI");this.shift();a.reset();return a}}const c=new Dict(this.xref);for(const e in a)c.set(e,a[e]);let h=n.makeSubStream(o,l,c);e&&(h=e.createStream(h,l));h=this.filter(h,c,l);h.dict=c;if(void 0!==f){h.cacheKey="inline_img_"+ ++this._imageId;this.imageCache[f]=h}this.buf2=Cmd.get("EI");this.shift();return h}#U(e){const{stream:t}=this.lexer;t.pos=e;const n=new Uint8Array([101,110,100]),a=n.length,r=[new Uint8Array([115,116,114,101,97,109]),new Uint8Array([115,116,101,97,109]),new Uint8Array([115,116,114,101,97])],s=9-a;for(;t.pos<t.end;){const i=t.peekBytes(2048),o=i.length-9;if(o<=0)break;let l=0;for(;l<o;){let o=0;for(;o<a&&i[l+o]===n[o];)o++;if(o>=a){let a=!1;for(const e of r){const t=e.length;let r=0;for(;r<t&&i[l+o+r]===e[r];)r++;if(r>=s){a=!0;break}if(r>=t){if(isWhiteSpace(i[l+o+r])){info(`Found "${bytesToString([...n,...e])}" when searching for endstream command.`);a=!0}break}}if(a){t.pos+=l;return t.pos-e}}l++}t.pos+=o}return-1}makeStream(e,t){const n=this.lexer;let a=n.stream;n.skipToNextLine();const r=a.pos-1;let s=e.get("Length");if(!Number.isInteger(s)){info(`Bad length "${s&&s.toString()}" in stream.`);s=0}a.pos=r+s;n.nextChar();if(this.tryShift()&&isCmd(this.buf2,"endstream"))this.shift();else{s=this.#U(r);if(s<0)throw new FormatError("Missing endstream command.");n.nextChar();this.shift();this.shift()}this.shift();a=a.makeSubStream(r,s,e);t&&(a=t.createStream(a,s));a=this.filter(a,e,s);a.dict=e;return a}filter(e,t,n){let a=t.get("F","Filter"),r=t.get("DP","DecodeParms");if(a instanceof Name){Array.isArray(r)&&warn("/DecodeParms should not be an Array, when /Filter is a Name.");return this.makeFilter(e,a.name,n,r)}let s=n;if(Array.isArray(a)){const t=a,n=r;for(let i=0,o=t.length;i<o;++i){a=this.xref.fetchIfRef(t[i]);if(!(a instanceof Name))throw new FormatError(`Bad filter name "${a}"`);r=null;Array.isArray(n)&&i in n&&(r=this.xref.fetchIfRef(n[i]));e=this.makeFilter(e,a.name,s,r);s=null}}return e}makeFilter(e,t,n,a){if(0===n){warn(`Empty "${t}" stream.`);return new NullStream}try{switch(t){case"Fl":case"FlateDecode":return a?new PredictorStream(new FlateStream(e,n),n,a):new FlateStream(e,n);case"LZW":case"LZWDecode":let t=1;if(a){a.has("EarlyChange")&&(t=a.get("EarlyChange"));return new PredictorStream(new LZWStream(e,n,t),n,a)}return new LZWStream(e,n,t);case"DCT":case"DCTDecode":return new JpegStream(e,n,a);case"JPX":case"JPXDecode":return new JpxStream(e,n,a);case"A85":case"ASCII85Decode":return new Ascii85Stream(e,n);case"AHx":case"ASCIIHexDecode":return new AsciiHexStream(e,n);case"CCF":case"CCITTFaxDecode":return new CCITTFaxStream(e,n,a);case"RL":case"RunLengthDecode":return new RunLengthStream(e,n);case"JBIG2Decode":return new Jbig2Stream(e,n,a);case"BrotliDecode":return new BrotliStream(e,n)}warn(`Filter "${t}" is not supported.`);return e}catch(e){if(e instanceof MissingDataException)throw e;warn(`Invalid stream: "${e}"`);return new NullStream}}}const ca=[1,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,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,2,0,2,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,2,0,2,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,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,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];function toHexDigit(e){return e>=48&&e<=57?15&e:e>=65&&e<=70||e>=97&&e<=102?9+(15&e):-1}class Lexer{constructor(e,t=null){this.stream=e;this.nextChar();this.strBuf=[];this.knownCommands=t;this._hexStringNumWarn=0;this.beginInlineImagePos=-1}nextChar(){return this.currentChar=this.stream.getByte()}peekChar(){return this.stream.peekByte()}getNumber(){let e=this.currentChar,t=0,n=1;if(45===e){n=-1;e=this.nextChar();45===e&&(e=this.nextChar())}else 43===e&&(e=this.nextChar());if(10===e||13===e)do{e=this.nextChar()}while(10===e||13===e);if(46===e){t=10;e=this.nextChar()}if(e<48||e>57){const t=`Invalid number: ${String.fromCharCode(e)} (charCode ${e})`;if(isWhiteSpace(e)||40===e||60===e||-1===e){info(`Lexer.getNumber - "${t}".`);return 0}throw new FormatError(t)}let a=e-48;for(;(e=this.nextChar())>=0;)if(e>=48&&e<=57){0!==t&&(t*=10);a=10*a+(e-48)}else if(46===e){if(0!==t)break;t=1}else{if(45!==e)break;warn("Badly formatted number: minus sign in the middle")}0!==t&&(a/=t);return n*a}getString(){let e=1,t=!1;const n=this.strBuf;n.length=0;let a=this.nextChar();for(;;){let r=!1;switch(0|a){case-1:warn("Unterminated string");t=!0;break;case 40:++e;n.push("(");break;case 41:if(0===--e){this.nextChar();t=!0}else n.push(")");break;case 92:a=this.nextChar();switch(a){case-1:warn("Unterminated string");t=!0;break;case 110:n.push("\n");break;case 114:n.push("\r");break;case 116:n.push("\t");break;case 98:n.push("\b");break;case 102:n.push("\f");break;case 92:case 40:case 41:n.push(String.fromCharCode(a));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:let e=15&a;a=this.nextChar();r=!0;if(a>=48&&a<=55){e=(e<<3)+(15&a);a=this.nextChar();if(a>=48&&a<=55){r=!1;e=(e<<3)+(15&a)}}n.push(String.fromCharCode(e));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:n.push(String.fromCharCode(a))}break;default:n.push(String.fromCharCode(a))}if(t)break;r||(a=this.nextChar())}return n.join("")}getName(){let e,t;const n=this.strBuf;n.length=0;for(;(e=this.nextChar())>=0&&!ca[e];)if(35===e){e=this.nextChar();if(ca[e]){warn("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number.");n.push("#");break}const a=toHexDigit(e);if(-1!==a){t=e;e=this.nextChar();const r=toHexDigit(e);if(-1===r){warn(`Lexer_getName: Illegal digit (${String.fromCharCode(e)}) in hexadecimal number.`);n.push("#",String.fromCharCode(t));if(ca[e])break;n.push(String.fromCharCode(e));continue}n.push(String.fromCharCode(a<<4|r))}else n.push("#",String.fromCharCode(e))}else n.push(String.fromCharCode(e));n.length>127&&warn(`Name token is longer than allowed by the spec: ${n.length}`);return Name.get(n.join(""))}_hexStringWarn(e){5!==this._hexStringNumWarn++?this._hexStringNumWarn>5||warn(`getHexString - ignoring invalid character: ${e}`):warn("getHexString - ignoring additional invalid characters.")}getHexString(){const e=this.strBuf;e.length=0;let t=this.currentChar,n=-1,a=-1;this._hexStringNumWarn=0;for(;;){if(t<0){warn("Unterminated hex string");break}if(62===t){this.nextChar();break}if(1!==ca[t]){a=toHexDigit(t);if(-1===a)this._hexStringWarn(t);else if(-1===n)n=a;else{e.push(String.fromCharCode(n<<4|a));n=-1}t=this.nextChar()}else t=this.nextChar()}-1!==n&&e.push(String.fromCharCode(n<<4));return e.join("")}getObj(){let e=!1,t=this.currentChar;for(;;){if(t<0)return hn;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(1!==ca[t])break;t=this.nextChar()}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:this.nextChar();return Cmd.get("[");case 93:this.nextChar();return Cmd.get("]");case 60:t=this.nextChar();if(60===t){this.nextChar();return Cmd.get("<<")}return this.getHexString();case 62:t=this.nextChar();if(62===t){this.nextChar();return Cmd.get(">>")}return Cmd.get(">");case 123:this.nextChar();return Cmd.get("{");case 125:this.nextChar();return Cmd.get("}");case 41:this.nextChar();throw new FormatError(`Illegal character: ${t}`)}let n=String.fromCharCode(t);if(t<32||t>127){const e=this.peekChar();if(e>=32&&e<=127){this.nextChar();return Cmd.get(n)}}const a=this.knownCommands;let r=void 0!==a?.[n];for(;(t=this.nextChar())>=0&&!ca[t];){const e=n+String.fromCharCode(t);if(r&&void 0===a[e])break;if(128===n.length)throw new FormatError(`Command token too long: ${n.length}`);n=e;r=void 0!==a?.[n]}if("true"===n)return!0;if("false"===n)return!1;if("null"===n)return null;"BI"===n&&(this.beginInlineImagePos=this.stream.pos);return Cmd.get(n)}skipToNextLine(){let e=this.currentChar;for(;e>=0;){if(13===e){e=this.nextChar();10===e&&this.nextChar();break}if(10===e){this.nextChar();break}e=this.nextChar()}}}class Linearization{static create(e){function getInt(e,t,n=!1){const a=e.get(t);if(Number.isInteger(a)&&(n?a>=0:a>0))return a;throw new Error(`The "${t}" parameter in the linearization dictionary is invalid.`)}const t=new Parser({lexer:new Lexer(e),xref:null}),n=t.getObj(),a=t.getObj(),r=t.getObj(),s=t.getObj();let i,o;if(!(Number.isInteger(n)&&Number.isInteger(a)&&isCmd(r,"obj")&&s instanceof Dict&&"number"==typeof(i=s.get("Linearized"))&&i>0))return null;if((o=getInt(s,"L"))!==e.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:o,hints:function getHints(e){const t=e.get("H");let n;if(Array.isArray(t)&&(2===(n=t.length)||4===n)){for(let e=0;e<n;e++){const n=t[e];if(!(Number.isInteger(n)&&n>0))throw new Error(`Hint (${e}) in the linearization dictionary is invalid.`)}return t}throw new Error("Hint array in the linearization dictionary is invalid.")}(s),objectNumberFirst:getInt(s,"O"),endFirst:getInt(s,"E"),numPages:getInt(s,"N"),mainXRefEntriesOffset:getInt(s,"T"),pageFirst:s.has("P")?getInt(s,"P",!0):0}}}const ha=["Adobe-GB1-UCS2","Adobe-CNS1-UCS2","Adobe-Japan1-UCS2","Adobe-Korea1-UCS2","78-EUC-H","78-EUC-V","78-H","78-RKSJ-H","78-RKSJ-V","78-V","78ms-RKSJ-H","78ms-RKSJ-V","83pv-RKSJ-H","90ms-RKSJ-H","90ms-RKSJ-V","90msp-RKSJ-H","90msp-RKSJ-V","90pv-RKSJ-H","90pv-RKSJ-V","Add-H","Add-RKSJ-H","Add-RKSJ-V","Add-V","Adobe-CNS1-0","Adobe-CNS1-1","Adobe-CNS1-2","Adobe-CNS1-3","Adobe-CNS1-4","Adobe-CNS1-5","Adobe-CNS1-6","Adobe-GB1-0","Adobe-GB1-1","Adobe-GB1-2","Adobe-GB1-3","Adobe-GB1-4","Adobe-GB1-5","Adobe-Japan1-0","Adobe-Japan1-1","Adobe-Japan1-2","Adobe-Japan1-3","Adobe-Japan1-4","Adobe-Japan1-5","Adobe-Japan1-6","Adobe-Korea1-0","Adobe-Korea1-1","Adobe-Korea1-2","B5-H","B5-V","B5pc-H","B5pc-V","CNS-EUC-H","CNS-EUC-V","CNS1-H","CNS1-V","CNS2-H","CNS2-V","ETHK-B5-H","ETHK-B5-V","ETen-B5-H","ETen-B5-V","ETenms-B5-H","ETenms-B5-V","EUC-H","EUC-V","Ext-H","Ext-RKSJ-H","Ext-RKSJ-V","Ext-V","GB-EUC-H","GB-EUC-V","GB-H","GB-V","GBK-EUC-H","GBK-EUC-V","GBK2K-H","GBK2K-V","GBKp-EUC-H","GBKp-EUC-V","GBT-EUC-H","GBT-EUC-V","GBT-H","GBT-V","GBTpc-EUC-H","GBTpc-EUC-V","GBpc-EUC-H","GBpc-EUC-V","H","HKdla-B5-H","HKdla-B5-V","HKdlb-B5-H","HKdlb-B5-V","HKgccs-B5-H","HKgccs-B5-V","HKm314-B5-H","HKm314-B5-V","HKm471-B5-H","HKm471-B5-V","HKscs-B5-H","HKscs-B5-V","Hankaku","Hiragana","KSC-EUC-H","KSC-EUC-V","KSC-H","KSC-Johab-H","KSC-Johab-V","KSC-V","KSCms-UHC-H","KSCms-UHC-HW-H","KSCms-UHC-HW-V","KSCms-UHC-V","KSCpc-EUC-H","KSCpc-EUC-V","Katakana","NWP-H","NWP-V","RKSJ-H","RKSJ-V","Roman","UniCNS-UCS2-H","UniCNS-UCS2-V","UniCNS-UTF16-H","UniCNS-UTF16-V","UniCNS-UTF32-H","UniCNS-UTF32-V","UniCNS-UTF8-H","UniCNS-UTF8-V","UniGB-UCS2-H","UniGB-UCS2-V","UniGB-UTF16-H","UniGB-UTF16-V","UniGB-UTF32-H","UniGB-UTF32-V","UniGB-UTF8-H","UniGB-UTF8-V","UniJIS-UCS2-H","UniJIS-UCS2-HW-H","UniJIS-UCS2-HW-V","UniJIS-UCS2-V","UniJIS-UTF16-H","UniJIS-UTF16-V","UniJIS-UTF32-H","UniJIS-UTF32-V","UniJIS-UTF8-H","UniJIS-UTF8-V","UniJIS2004-UTF16-H","UniJIS2004-UTF16-V","UniJIS2004-UTF32-H","UniJIS2004-UTF32-V","UniJIS2004-UTF8-H","UniJIS2004-UTF8-V","UniJISPro-UCS2-HW-V","UniJISPro-UCS2-V","UniJISPro-UTF8-V","UniJISX0213-UTF32-H","UniJISX0213-UTF32-V","UniJISX02132004-UTF32-H","UniJISX02132004-UTF32-V","UniKS-UCS2-H","UniKS-UCS2-V","UniKS-UTF16-H","UniKS-UTF16-V","UniKS-UTF32-H","UniKS-UTF32-V","UniKS-UTF8-H","UniKS-UTF8-V","V","WP-Symbol"],ua=2**24-1;class CMap{constructor(e=!1){this.codespaceRanges=[[],[],[],[]];this.numCodespaceRanges=0;this._map=[];this.name="";this.vertical=!1;this.useCMap=null;this.builtInCMap=e}addCodespaceRange(e,t,n){this.codespaceRanges[e-1].push(t,n);this.numCodespaceRanges++}mapCidRange(e,t,n){if(t-e>ua)throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");for(;e<=t;)this._map[e++]=n++}mapBfRange(e,t,n){if(t-e>ua)throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");const a=n.length-1;for(;e<=t;){this._map[e++]=n;const t=n.charCodeAt(a)+1;t>255?n=n.substring(0,a-1)+String.fromCharCode(n.charCodeAt(a-1)+1)+"\0":n=n.substring(0,a)+String.fromCharCode(t)}}mapBfRangeToArray(e,t,n){if(t-e>ua)throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.");const a=n.length;let r=0;for(;e<=t&&r<a;){this._map[e]=n[r++];++e}}mapOne(e,t){this._map[e]=t}lookup(e){return this._map[e]}contains(e){return void 0!==this._map[e]}forEach(e){const t=this._map,n=t.length;if(n<=65536)for(let a=0;a<n;a++)void 0!==t[a]&&e(a,t[a]);else for(const n in t)e(n,t[n])}charCodeOf(e){const t=this._map;if(t.length<=65536)return t.indexOf(e);for(const n in t)if(t[n]===e)return 0|n;return-1}getMap(){return this._map}readCharCode(e,t,n){let a=0;const r=this.codespaceRanges;for(let s=0,i=r.length;s<i;s++){a=(a<<8|e.charCodeAt(t+s))>>>0;const i=r[s];for(let e=0,t=i.length;e<t;){const t=i[e++],r=i[e++];if(a>=t&&a<=r){n.charcode=a;n.length=s+1;return}}}n.charcode=0;n.length=1}getCharCodeLength(e){const t=this.codespaceRanges;for(let n=0,a=t.length;n<a;n++){const a=t[n];for(let t=0,r=a.length;t<r;){const r=a[t++],s=a[t++];if(e>=r&&e<=s)return n+1}}return 1}get length(){return this._map.length}get isIdentityCMap(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(let e=0;e<65536;e++)if(this._map[e]!==e)return!1;return!0}}class IdentityCMap extends CMap{constructor(e,t){super();this.vertical=e;this.addCodespaceRange(t,0,65535)}mapCidRange(e,t,n){unreachable("should not call mapCidRange")}mapBfRange(e,t,n){unreachable("should not call mapBfRange")}mapBfRangeToArray(e,t,n){unreachable("should not call mapBfRangeToArray")}mapOne(e,t){unreachable("should not call mapCidOne")}lookup(e){return Number.isInteger(e)&&e<=65535?e:void 0}contains(e){return Number.isInteger(e)&&e<=65535}forEach(e){for(let t=0;t<=65535;t++)e(t,t)}charCodeOf(e){return Number.isInteger(e)&&e<=65535?e:-1}getMap(){const e=new Array(65536);for(let t=0;t<=65535;t++)e[t]=t;return e}get length(){return 65536}get isIdentityCMap(){unreachable("should not access .isIdentityCMap")}}function strToInt(e){let t=0;for(let n=0;n<e.length;n++)t=t<<8|e.charCodeAt(n);return t>>>0}function expectString(e){if("string"!=typeof e)throw new FormatError("Malformed CMap: expected string.")}function expectInt(e){if(!Number.isInteger(e))throw new FormatError("Malformed CMap: expected int.")}function parseBfChar(e,t){for(;;){let n=t.getObj();if(n===hn)break;if(isCmd(n,"endbfchar"))return;expectString(n);const a=strToInt(n);n=t.getObj();expectString(n);const r=n;e.mapOne(a,r)}}function parseBfRange(e,t){for(;;){let n=t.getObj();if(n===hn)break;if(isCmd(n,"endbfrange"))return;expectString(n);const a=strToInt(n);n=t.getObj();expectString(n);const r=strToInt(n);n=t.getObj();if(Number.isInteger(n)||"string"==typeof n){const t=Number.isInteger(n)?String.fromCharCode(n):n;e.mapBfRange(a,r,t)}else{if(!isCmd(n,"["))break;{n=t.getObj();const s=[];for(;!isCmd(n,"]")&&n!==hn;){s.push(n);n=t.getObj()}e.mapBfRangeToArray(a,r,s)}}}throw new FormatError("Invalid bf range.")}function parseCidChar(e,t){for(;;){let n=t.getObj();if(n===hn)break;if(isCmd(n,"endcidchar"))return;expectString(n);const a=strToInt(n);n=t.getObj();expectInt(n);const r=n;e.mapOne(a,r)}}function parseCidRange(e,t){for(;;){let n=t.getObj();if(n===hn)break;if(isCmd(n,"endcidrange"))return;expectString(n);const a=strToInt(n);n=t.getObj();expectString(n);const r=strToInt(n);n=t.getObj();expectInt(n);const s=n;e.mapCidRange(a,r,s)}}function parseCodespaceRange(e,t){for(;;){let n=t.getObj();if(n===hn)break;if(isCmd(n,"endcodespacerange"))return;if("string"!=typeof n)break;const a=strToInt(n);n=t.getObj();if("string"!=typeof n)break;const r=strToInt(n);e.addCodespaceRange(n.length,a,r)}throw new FormatError("Invalid codespace range.")}function parseWMode(e,t){const n=t.getObj();Number.isInteger(n)&&(e.vertical=!!n)}function parseCMapName(e,t){const n=t.getObj();n instanceof Name&&(e.name=n.name)}async function parseCMap(e,t,n,a){let r,s;e:for(;;)try{const n=t.getObj();if(n===hn)break;if(n instanceof Name){"WMode"===n.name?parseWMode(e,t):"CMapName"===n.name&&parseCMapName(e,t);r=n}else if(n instanceof Cmd)switch(n.cmd){case"endcmap":break e;case"usecmap":r instanceof Name&&(s=r.name);break;case"begincodespacerange":parseCodespaceRange(e,t);break;case"beginbfchar":parseBfChar(e,t);break;case"begincidchar":parseCidChar(e,t);break;case"beginbfrange":parseBfRange(e,t);break;case"begincidrange":parseCidRange(e,t)}}catch(e){if(e instanceof MissingDataException)throw e;warn("Invalid cMap data: "+e);continue}!a&&s&&(a=s);return a?extendCMap(e,n,a):e}async function extendCMap(e,t,n){e.useCMap=await createBuiltInCMap(n,t);if(0===e.numCodespaceRanges){const t=e.useCMap.codespaceRanges;for(let n=0;n<t.length;n++)e.codespaceRanges[n]=t[n].slice();e.numCodespaceRanges=e.useCMap.numCodespaceRanges}e.useCMap.forEach(function(t,n){e.contains(t)||e.mapOne(t,n)});return e}async function createBuiltInCMap(e,t){if("Identity-H"===e)return new IdentityCMap(!1,2);if("Identity-V"===e)return new IdentityCMap(!0,2);if(!ha.includes(e))throw new Error("Unknown CMap name: "+e);if(!t)throw new Error("Built-in CMap parameters are not provided.");const{cMapData:n,isCompressed:a}=await t(e),r=new CMap(!0);if(a)return(new BinaryCMapReader).process(n,r,e=>extendCMap(r,t,e));const s=new Lexer(new Stream(n));return parseCMap(r,s,t,null)}class CMapFactory{static async create({encoding:e,fetchBuiltInCMap:t,useCMap:n}){if(e instanceof Name)return createBuiltInCMap(e.name,t);if(e instanceof BaseStream){if(e.isAsync){const t=await e.asyncGetBytes();t&&(e=new Stream(t,0,t.length,e.dict))}const a=await parseCMap(new CMap,new Lexer(e),t,n);return a.isIdentityCMap?createBuiltInCMap(a.name,t):a}throw new Error("Encoding required.")}}const ma=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],pa=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","centoldstyle","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","","threequartersemdash","","questionsmall","","","","","Ethsmall","","","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","","","","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hypheninferior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","asuperior","centsuperior","","","","","Aacutesmall","Agravesmall","Acircumflexsmall","Adieresissmall","Atildesmall","Aringsmall","Ccedillasmall","Eacutesmall","Egravesmall","Ecircumflexsmall","Edieresissmall","Iacutesmall","Igravesmall","Icircumflexsmall","Idieresissmall","Ntildesmall","Oacutesmall","Ogravesmall","Ocircumflexsmall","Odieresissmall","Otildesmall","Uacutesmall","Ugravesmall","Ucircumflexsmall","Udieresissmall","","eightsuperior","fourinferior","threeinferior","sixinferior","eightinferior","seveninferior","Scaronsmall","","centinferior","twoinferior","","Dieresissmall","","Caronsmall","osuperior","fiveinferior","","commainferior","periodinferior","Yacutesmall","","dollarinferior","","","Thornsmall","","nineinferior","zeroinferior","Zcaronsmall","AEsmall","Oslashsmall","questiondownsmall","oneinferior","Lslashsmall","","","","","","","Cedillasmall","","","","","","OEsmall","figuredash","hyphensuperior","","","","","exclamdownsmall","","Ydieresissmall","","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","ninesuperior","zerosuperior","","esuperior","rsuperior","tsuperior","","","isuperior","ssuperior","dsuperior","","","","","","lsuperior","Ogoneksmall","Brevesmall","Macronsmall","bsuperior","nsuperior","msuperior","commasuperior","periodsuperior","Dotaccentsmall","Ringsmall","","","",""],da=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","space","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron"],ga=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls","","","",""],ba=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","bullet","Euro","bullet","quotesinglbase","florin","quotedblbase","ellipsis","dagger","daggerdbl","circumflex","perthousand","Scaron","guilsinglleft","OE","bullet","Zcaron","bullet","bullet","quoteleft","quoteright","quotedblleft","quotedblright","bullet","endash","emdash","tilde","trademark","scaron","guilsinglright","oe","bullet","zcaron","Ydieresis","space","exclamdown","cent","sterling","currency","yen","brokenbar","section","dieresis","copyright","ordfeminine","guillemotleft","logicalnot","hyphen","registered","macron","degree","plusminus","twosuperior","threesuperior","acute","mu","paragraph","periodcentered","cedilla","onesuperior","ordmasculine","guillemotright","onequarter","onehalf","threequarters","questiondown","Agrave","Aacute","Acircumflex","Atilde","Adieresis","Aring","AE","Ccedilla","Egrave","Eacute","Ecircumflex","Edieresis","Igrave","Iacute","Icircumflex","Idieresis","Eth","Ntilde","Ograve","Oacute","Ocircumflex","Otilde","Odieresis","multiply","Oslash","Ugrave","Uacute","Ucircumflex","Udieresis","Yacute","Thorn","germandbls","agrave","aacute","acircumflex","atilde","adieresis","aring","ae","ccedilla","egrave","eacute","ecircumflex","edieresis","igrave","iacute","icircumflex","idieresis","eth","ntilde","ograve","oacute","ocircumflex","otilde","odieresis","divide","oslash","ugrave","uacute","ucircumflex","udieresis","yacute","thorn","ydieresis"],wa=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","universal","numbersign","existential","percent","ampersand","suchthat","parenleft","parenright","asteriskmath","plus","comma","minus","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","congruent","Alpha","Beta","Chi","Delta","Epsilon","Phi","Gamma","Eta","Iota","theta1","Kappa","Lambda","Mu","Nu","Omicron","Pi","Theta","Rho","Sigma","Tau","Upsilon","sigma1","Omega","Xi","Psi","Zeta","bracketleft","therefore","bracketright","perpendicular","underscore","radicalex","alpha","beta","chi","delta","epsilon","phi","gamma","eta","iota","phi1","kappa","lambda","mu","nu","omicron","pi","theta","rho","sigma","tau","upsilon","omega1","omega","xi","psi","zeta","braceleft","bar","braceright","similar","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Euro","Upsilon1","minute","lessequal","fraction","infinity","florin","club","diamond","heart","spade","arrowboth","arrowleft","arrowup","arrowright","arrowdown","degree","plusminus","second","greaterequal","multiply","proportional","partialdiff","bullet","divide","notequal","equivalence","approxequal","ellipsis","arrowvertex","arrowhorizex","carriagereturn","aleph","Ifraktur","Rfraktur","weierstrass","circlemultiply","circleplus","emptyset","intersection","union","propersuperset","reflexsuperset","notsubset","propersubset","reflexsubset","element","notelement","angle","gradient","registerserif","copyrightserif","trademarkserif","product","radical","dotmath","logicalnot","logicaland","logicalor","arrowdblboth","arrowdblleft","arrowdblup","arrowdblright","arrowdbldown","lozenge","angleleft","registersans","copyrightsans","trademarksans","summation","parenlefttp","parenleftex","parenleftbt","bracketlefttp","bracketleftex","bracketleftbt","bracelefttp","braceleftmid","braceleftbt","braceex","","angleright","integral","integraltp","integralex","integralbt","parenrighttp","parenrightex","parenrightbt","bracketrighttp","bracketrightex","bracketrightbt","bracerighttp","bracerightmid","bracerightbt",""],ja=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","a1","a2","a202","a3","a4","a5","a119","a118","a117","a11","a12","a13","a14","a15","a16","a105","a17","a18","a19","a20","a21","a22","a23","a24","a25","a26","a27","a28","a6","a7","a8","a9","a10","a29","a30","a31","a32","a33","a34","a35","a36","a37","a38","a39","a40","a41","a42","a43","a44","a45","a46","a47","a48","a49","a50","a51","a52","a53","a54","a55","a56","a57","a58","a59","a60","a61","a62","a63","a64","a65","a66","a67","a68","a69","a70","a71","a72","a73","a74","a203","a75","a204","a76","a77","a78","a79","a81","a82","a83","a84","a97","a98","a99","a100","","a89","a90","a93","a94","a91","a92","a205","a85","a206","a86","a87","a88","a95","a96","","","","","","","","","","","","","","","","","","","","a101","a102","a103","a104","a106","a107","a108","a112","a111","a110","a109","a120","a121","a122","a123","a124","a125","a126","a127","a128","a129","a130","a131","a132","a133","a134","a135","a136","a137","a138","a139","a140","a141","a142","a143","a144","a145","a146","a147","a148","a149","a150","a151","a152","a153","a154","a155","a156","a157","a158","a159","a160","a161","a163","a164","a196","a165","a192","a166","a167","a168","a169","a170","a171","a172","a173","a162","a174","a175","a176","a177","a178","a179","a193","a180","a199","a181","a200","a182","","a201","a183","a184","a197","a185","a194","a198","a186","a195","a187","a188","a189","a190","a191",""];function getEncoding(e){switch(e){case"WinAnsiEncoding":return ba;case"StandardEncoding":return ga;case"MacRomanEncoding":return da;case"SymbolSetEncoding":return wa;case"ZapfDingbatsEncoding":return ja;case"ExpertEncoding":return ma;case"MacExpertEncoding":return pa;default:return null}}const ka=getLookupTableFactory(function(e){e.A=65;e.AE=198;e.AEacute=508;e.AEmacron=482;e.AEsmall=63462;e.Aacute=193;e.Aacutesmall=63457;e.Abreve=258;e.Abreveacute=7854;e.Abrevecyrillic=1232;e.Abrevedotbelow=7862;e.Abrevegrave=7856;e.Abrevehookabove=7858;e.Abrevetilde=7860;e.Acaron=461;e.Acircle=9398;e.Acircumflex=194;e.Acircumflexacute=7844;e.Acircumflexdotbelow=7852;e.Acircumflexgrave=7846;e.Acircumflexhookabove=7848;e.Acircumflexsmall=63458;e.Acircumflextilde=7850;e.Acute=63177;e.Acutesmall=63412;e.Acyrillic=1040;e.Adblgrave=512;e.Adieresis=196;e.Adieresiscyrillic=1234;e.Adieresismacron=478;e.Adieresissmall=63460;e.Adotbelow=7840;e.Adotmacron=480;e.Agrave=192;e.Agravesmall=63456;e.Ahookabove=7842;e.Aiecyrillic=1236;e.Ainvertedbreve=514;e.Alpha=913;e.Alphatonos=902;e.Amacron=256;e.Amonospace=65313;e.Aogonek=260;e.Aring=197;e.Aringacute=506;e.Aringbelow=7680;e.Aringsmall=63461;e.Asmall=63329;e.Atilde=195;e.Atildesmall=63459;e.Aybarmenian=1329;e.B=66;e.Bcircle=9399;e.Bdotaccent=7682;e.Bdotbelow=7684;e.Becyrillic=1041;e.Benarmenian=1330;e.Beta=914;e.Bhook=385;e.Blinebelow=7686;e.Bmonospace=65314;e.Brevesmall=63220;e.Bsmall=63330;e.Btopbar=386;e.C=67;e.Caarmenian=1342;e.Cacute=262;e.Caron=63178;e.Caronsmall=63221;e.Ccaron=268;e.Ccedilla=199;e.Ccedillaacute=7688;e.Ccedillasmall=63463;e.Ccircle=9400;e.Ccircumflex=264;e.Cdot=266;e.Cdotaccent=266;e.Cedillasmall=63416;e.Chaarmenian=1353;e.Cheabkhasiancyrillic=1212;e.Checyrillic=1063;e.Chedescenderabkhasiancyrillic=1214;e.Chedescendercyrillic=1206;e.Chedieresiscyrillic=1268;e.Cheharmenian=1347;e.Chekhakassiancyrillic=1227;e.Cheverticalstrokecyrillic=1208;e.Chi=935;e.Chook=391;e.Circumflexsmall=63222;e.Cmonospace=65315;e.Coarmenian=1361;e.Csmall=63331;e.D=68;e.DZ=497;e.DZcaron=452;e.Daarmenian=1332;e.Dafrican=393;e.Dcaron=270;e.Dcedilla=7696;e.Dcircle=9401;e.Dcircumflexbelow=7698;e.Dcroat=272;e.Ddotaccent=7690;e.Ddotbelow=7692;e.Decyrillic=1044;e.Deicoptic=1006;e.Delta=8710;e.Deltagreek=916;e.Dhook=394;e.Dieresis=63179;e.DieresisAcute=63180;e.DieresisGrave=63181;e.Dieresissmall=63400;e.Digammagreek=988;e.Djecyrillic=1026;e.Dlinebelow=7694;e.Dmonospace=65316;e.Dotaccentsmall=63223;e.Dslash=272;e.Dsmall=63332;e.Dtopbar=395;e.Dz=498;e.Dzcaron=453;e.Dzeabkhasiancyrillic=1248;e.Dzecyrillic=1029;e.Dzhecyrillic=1039;e.E=69;e.Eacute=201;e.Eacutesmall=63465;e.Ebreve=276;e.Ecaron=282;e.Ecedillabreve=7708;e.Echarmenian=1333;e.Ecircle=9402;e.Ecircumflex=202;e.Ecircumflexacute=7870;e.Ecircumflexbelow=7704;e.Ecircumflexdotbelow=7878;e.Ecircumflexgrave=7872;e.Ecircumflexhookabove=7874;e.Ecircumflexsmall=63466;e.Ecircumflextilde=7876;e.Ecyrillic=1028;e.Edblgrave=516;e.Edieresis=203;e.Edieresissmall=63467;e.Edot=278;e.Edotaccent=278;e.Edotbelow=7864;e.Efcyrillic=1060;e.Egrave=200;e.Egravesmall=63464;e.Eharmenian=1335;e.Ehookabove=7866;e.Eightroman=8551;e.Einvertedbreve=518;e.Eiotifiedcyrillic=1124;e.Elcyrillic=1051;e.Elevenroman=8554;e.Emacron=274;e.Emacronacute=7702;e.Emacrongrave=7700;e.Emcyrillic=1052;e.Emonospace=65317;e.Encyrillic=1053;e.Endescendercyrillic=1186;e.Eng=330;e.Enghecyrillic=1188;e.Enhookcyrillic=1223;e.Eogonek=280;e.Eopen=400;e.Epsilon=917;e.Epsilontonos=904;e.Ercyrillic=1056;e.Ereversed=398;e.Ereversedcyrillic=1069;e.Escyrillic=1057;e.Esdescendercyrillic=1194;e.Esh=425;e.Esmall=63333;e.Eta=919;e.Etarmenian=1336;e.Etatonos=905;e.Eth=208;e.Ethsmall=63472;e.Etilde=7868;e.Etildebelow=7706;e.Euro=8364;e.Ezh=439;e.Ezhcaron=494;e.Ezhreversed=440;e.F=70;e.Fcircle=9403;e.Fdotaccent=7710;e.Feharmenian=1366;e.Feicoptic=996;e.Fhook=401;e.Fitacyrillic=1138;e.Fiveroman=8548;e.Fmonospace=65318;e.Fourroman=8547;e.Fsmall=63334;e.G=71;e.GBsquare=13191;e.Gacute=500;e.Gamma=915;e.Gammaafrican=404;e.Gangiacoptic=1002;e.Gbreve=286;e.Gcaron=486;e.Gcedilla=290;e.Gcircle=9404;e.Gcircumflex=284;e.Gcommaaccent=290;e.Gdot=288;e.Gdotaccent=288;e.Gecyrillic=1043;e.Ghadarmenian=1346;e.Ghemiddlehookcyrillic=1172;e.Ghestrokecyrillic=1170;e.Gheupturncyrillic=1168;e.Ghook=403;e.Gimarmenian=1331;e.Gjecyrillic=1027;e.Gmacron=7712;e.Gmonospace=65319;e.Grave=63182;e.Gravesmall=63328;e.Gsmall=63335;e.Gsmallhook=667;e.Gstroke=484;e.H=72;e.H18533=9679;e.H18543=9642;e.H18551=9643;e.H22073=9633;e.HPsquare=13259;e.Haabkhasiancyrillic=1192;e.Hadescendercyrillic=1202;e.Hardsigncyrillic=1066;e.Hbar=294;e.Hbrevebelow=7722;e.Hcedilla=7720;e.Hcircle=9405;e.Hcircumflex=292;e.Hdieresis=7718;e.Hdotaccent=7714;e.Hdotbelow=7716;e.Hmonospace=65320;e.Hoarmenian=1344;e.Horicoptic=1e3;e.Hsmall=63336;e.Hungarumlaut=63183;e.Hungarumlautsmall=63224;e.Hzsquare=13200;e.I=73;e.IAcyrillic=1071;e.IJ=306;e.IUcyrillic=1070;e.Iacute=205;e.Iacutesmall=63469;e.Ibreve=300;e.Icaron=463;e.Icircle=9406;e.Icircumflex=206;e.Icircumflexsmall=63470;e.Icyrillic=1030;e.Idblgrave=520;e.Idieresis=207;e.Idieresisacute=7726;e.Idieresiscyrillic=1252;e.Idieresissmall=63471;e.Idot=304;e.Idotaccent=304;e.Idotbelow=7882;e.Iebrevecyrillic=1238;e.Iecyrillic=1045;e.Ifraktur=8465;e.Igrave=204;e.Igravesmall=63468;e.Ihookabove=7880;e.Iicyrillic=1048;e.Iinvertedbreve=522;e.Iishortcyrillic=1049;e.Imacron=298;e.Imacroncyrillic=1250;e.Imonospace=65321;e.Iniarmenian=1339;e.Iocyrillic=1025;e.Iogonek=302;e.Iota=921;e.Iotaafrican=406;e.Iotadieresis=938;e.Iotatonos=906;e.Ismall=63337;e.Istroke=407;e.Itilde=296;e.Itildebelow=7724;e.Izhitsacyrillic=1140;e.Izhitsadblgravecyrillic=1142;e.J=74;e.Jaarmenian=1345;e.Jcircle=9407;e.Jcircumflex=308;e.Jecyrillic=1032;e.Jheharmenian=1355;e.Jmonospace=65322;e.Jsmall=63338;e.K=75;e.KBsquare=13189;e.KKsquare=13261;e.Kabashkircyrillic=1184;e.Kacute=7728;e.Kacyrillic=1050;e.Kadescendercyrillic=1178;e.Kahookcyrillic=1219;e.Kappa=922;e.Kastrokecyrillic=1182;e.Kaverticalstrokecyrillic=1180;e.Kcaron=488;e.Kcedilla=310;e.Kcircle=9408;e.Kcommaaccent=310;e.Kdotbelow=7730;e.Keharmenian=1364;e.Kenarmenian=1343;e.Khacyrillic=1061;e.Kheicoptic=998;e.Khook=408;e.Kjecyrillic=1036;e.Klinebelow=7732;e.Kmonospace=65323;e.Koppacyrillic=1152;e.Koppagreek=990;e.Ksicyrillic=1134;e.Ksmall=63339;e.L=76;e.LJ=455;e.LL=63167;e.Lacute=313;e.Lambda=923;e.Lcaron=317;e.Lcedilla=315;e.Lcircle=9409;e.Lcircumflexbelow=7740;e.Lcommaaccent=315;e.Ldot=319;e.Ldotaccent=319;e.Ldotbelow=7734;e.Ldotbelowmacron=7736;e.Liwnarmenian=1340;e.Lj=456;e.Ljecyrillic=1033;e.Llinebelow=7738;e.Lmonospace=65324;e.Lslash=321;e.Lslashsmall=63225;e.Lsmall=63340;e.M=77;e.MBsquare=13190;e.Macron=63184;e.Macronsmall=63407;e.Macute=7742;e.Mcircle=9410;e.Mdotaccent=7744;e.Mdotbelow=7746;e.Menarmenian=1348;e.Mmonospace=65325;e.Msmall=63341;e.Mturned=412;e.Mu=924;e.N=78;e.NJ=458;e.Nacute=323;e.Ncaron=327;e.Ncedilla=325;e.Ncircle=9411;e.Ncircumflexbelow=7754;e.Ncommaaccent=325;e.Ndotaccent=7748;e.Ndotbelow=7750;e.Nhookleft=413;e.Nineroman=8552;e.Nj=459;e.Njecyrillic=1034;e.Nlinebelow=7752;e.Nmonospace=65326;e.Nowarmenian=1350;e.Nsmall=63342;e.Ntilde=209;e.Ntildesmall=63473;e.Nu=925;e.O=79;e.OE=338;e.OEsmall=63226;e.Oacute=211;e.Oacutesmall=63475;e.Obarredcyrillic=1256;e.Obarreddieresiscyrillic=1258;e.Obreve=334;e.Ocaron=465;e.Ocenteredtilde=415;e.Ocircle=9412;e.Ocircumflex=212;e.Ocircumflexacute=7888;e.Ocircumflexdotbelow=7896;e.Ocircumflexgrave=7890;e.Ocircumflexhookabove=7892;e.Ocircumflexsmall=63476;e.Ocircumflextilde=7894;e.Ocyrillic=1054;e.Odblacute=336;e.Odblgrave=524;e.Odieresis=214;e.Odieresiscyrillic=1254;e.Odieresissmall=63478;e.Odotbelow=7884;e.Ogoneksmall=63227;e.Ograve=210;e.Ogravesmall=63474;e.Oharmenian=1365;e.Ohm=8486;e.Ohookabove=7886;e.Ohorn=416;e.Ohornacute=7898;e.Ohorndotbelow=7906;e.Ohorngrave=7900;e.Ohornhookabove=7902;e.Ohorntilde=7904;e.Ohungarumlaut=336;e.Oi=418;e.Oinvertedbreve=526;e.Omacron=332;e.Omacronacute=7762;e.Omacrongrave=7760;e.Omega=8486;e.Omegacyrillic=1120;e.Omegagreek=937;e.Omegaroundcyrillic=1146;e.Omegatitlocyrillic=1148;e.Omegatonos=911;e.Omicron=927;e.Omicrontonos=908;e.Omonospace=65327;e.Oneroman=8544;e.Oogonek=490;e.Oogonekmacron=492;e.Oopen=390;e.Oslash=216;e.Oslashacute=510;e.Oslashsmall=63480;e.Osmall=63343;e.Ostrokeacute=510;e.Otcyrillic=1150;e.Otilde=213;e.Otildeacute=7756;e.Otildedieresis=7758;e.Otildesmall=63477;e.P=80;e.Pacute=7764;e.Pcircle=9413;e.Pdotaccent=7766;e.Pecyrillic=1055;e.Peharmenian=1354;e.Pemiddlehookcyrillic=1190;e.Phi=934;e.Phook=420;e.Pi=928;e.Piwrarmenian=1363;e.Pmonospace=65328;e.Psi=936;e.Psicyrillic=1136;e.Psmall=63344;e.Q=81;e.Qcircle=9414;e.Qmonospace=65329;e.Qsmall=63345;e.R=82;e.Raarmenian=1356;e.Racute=340;e.Rcaron=344;e.Rcedilla=342;e.Rcircle=9415;e.Rcommaaccent=342;e.Rdblgrave=528;e.Rdotaccent=7768;e.Rdotbelow=7770;e.Rdotbelowmacron=7772;e.Reharmenian=1360;e.Rfraktur=8476;e.Rho=929;e.Ringsmall=63228;e.Rinvertedbreve=530;e.Rlinebelow=7774;e.Rmonospace=65330;e.Rsmall=63346;e.Rsmallinverted=641;e.Rsmallinvertedsuperior=694;e.S=83;e.SF010000=9484;e.SF020000=9492;e.SF030000=9488;e.SF040000=9496;e.SF050000=9532;e.SF060000=9516;e.SF070000=9524;e.SF080000=9500;e.SF090000=9508;e.SF100000=9472;e.SF110000=9474;e.SF190000=9569;e.SF200000=9570;e.SF210000=9558;e.SF220000=9557;e.SF230000=9571;e.SF240000=9553;e.SF250000=9559;e.SF260000=9565;e.SF270000=9564;e.SF280000=9563;e.SF360000=9566;e.SF370000=9567;e.SF380000=9562;e.SF390000=9556;e.SF400000=9577;e.SF410000=9574;e.SF420000=9568;e.SF430000=9552;e.SF440000=9580;e.SF450000=9575;e.SF460000=9576;e.SF470000=9572;e.SF480000=9573;e.SF490000=9561;e.SF500000=9560;e.SF510000=9554;e.SF520000=9555;e.SF530000=9579;e.SF540000=9578;e.Sacute=346;e.Sacutedotaccent=7780;e.Sampigreek=992;e.Scaron=352;e.Scarondotaccent=7782;e.Scaronsmall=63229;e.Scedilla=350;e.Schwa=399;e.Schwacyrillic=1240;e.Schwadieresiscyrillic=1242;e.Scircle=9416;e.Scircumflex=348;e.Scommaaccent=536;e.Sdotaccent=7776;e.Sdotbelow=7778;e.Sdotbelowdotaccent=7784;e.Seharmenian=1357;e.Sevenroman=8550;e.Shaarmenian=1351;e.Shacyrillic=1064;e.Shchacyrillic=1065;e.Sheicoptic=994;e.Shhacyrillic=1210;e.Shimacoptic=1004;e.Sigma=931;e.Sixroman=8549;e.Smonospace=65331;e.Softsigncyrillic=1068;e.Ssmall=63347;e.Stigmagreek=986;e.T=84;e.Tau=932;e.Tbar=358;e.Tcaron=356;e.Tcedilla=354;e.Tcircle=9417;e.Tcircumflexbelow=7792;e.Tcommaaccent=354;e.Tdotaccent=7786;e.Tdotbelow=7788;e.Tecyrillic=1058;e.Tedescendercyrillic=1196;e.Tenroman=8553;e.Tetsecyrillic=1204;e.Theta=920;e.Thook=428;e.Thorn=222;e.Thornsmall=63486;e.Threeroman=8546;e.Tildesmall=63230;e.Tiwnarmenian=1359;e.Tlinebelow=7790;e.Tmonospace=65332;e.Toarmenian=1337;e.Tonefive=444;e.Tonesix=388;e.Tonetwo=423;e.Tretroflexhook=430;e.Tsecyrillic=1062;e.Tshecyrillic=1035;e.Tsmall=63348;e.Twelveroman=8555;e.Tworoman=8545;e.U=85;e.Uacute=218;e.Uacutesmall=63482;e.Ubreve=364;e.Ucaron=467;e.Ucircle=9418;e.Ucircumflex=219;e.Ucircumflexbelow=7798;e.Ucircumflexsmall=63483;e.Ucyrillic=1059;e.Udblacute=368;e.Udblgrave=532;e.Udieresis=220;e.Udieresisacute=471;e.Udieresisbelow=7794;e.Udieresiscaron=473;e.Udieresiscyrillic=1264;e.Udieresisgrave=475;e.Udieresismacron=469;e.Udieresissmall=63484;e.Udotbelow=7908;e.Ugrave=217;e.Ugravesmall=63481;e.Uhookabove=7910;e.Uhorn=431;e.Uhornacute=7912;e.Uhorndotbelow=7920;e.Uhorngrave=7914;e.Uhornhookabove=7916;e.Uhorntilde=7918;e.Uhungarumlaut=368;e.Uhungarumlautcyrillic=1266;e.Uinvertedbreve=534;e.Ukcyrillic=1144;e.Umacron=362;e.Umacroncyrillic=1262;e.Umacrondieresis=7802;e.Umonospace=65333;e.Uogonek=370;e.Upsilon=933;e.Upsilon1=978;e.Upsilonacutehooksymbolgreek=979;e.Upsilonafrican=433;e.Upsilondieresis=939;e.Upsilondieresishooksymbolgreek=980;e.Upsilonhooksymbol=978;e.Upsilontonos=910;e.Uring=366;e.Ushortcyrillic=1038;e.Usmall=63349;e.Ustraightcyrillic=1198;e.Ustraightstrokecyrillic=1200;e.Utilde=360;e.Utildeacute=7800;e.Utildebelow=7796;e.V=86;e.Vcircle=9419;e.Vdotbelow=7806;e.Vecyrillic=1042;e.Vewarmenian=1358;e.Vhook=434;e.Vmonospace=65334;e.Voarmenian=1352;e.Vsmall=63350;e.Vtilde=7804;e.W=87;e.Wacute=7810;e.Wcircle=9420;e.Wcircumflex=372;e.Wdieresis=7812;e.Wdotaccent=7814;e.Wdotbelow=7816;e.Wgrave=7808;e.Wmonospace=65335;e.Wsmall=63351;e.X=88;e.Xcircle=9421;e.Xdieresis=7820;e.Xdotaccent=7818;e.Xeharmenian=1341;e.Xi=926;e.Xmonospace=65336;e.Xsmall=63352;e.Y=89;e.Yacute=221;e.Yacutesmall=63485;e.Yatcyrillic=1122;e.Ycircle=9422;e.Ycircumflex=374;e.Ydieresis=376;e.Ydieresissmall=63487;e.Ydotaccent=7822;e.Ydotbelow=7924;e.Yericyrillic=1067;e.Yerudieresiscyrillic=1272;e.Ygrave=7922;e.Yhook=435;e.Yhookabove=7926;e.Yiarmenian=1349;e.Yicyrillic=1031;e.Yiwnarmenian=1362;e.Ymonospace=65337;e.Ysmall=63353;e.Ytilde=7928;e.Yusbigcyrillic=1130;e.Yusbigiotifiedcyrillic=1132;e.Yuslittlecyrillic=1126;e.Yuslittleiotifiedcyrillic=1128;e.Z=90;e.Zaarmenian=1334;e.Zacute=377;e.Zcaron=381;e.Zcaronsmall=63231;e.Zcircle=9423;e.Zcircumflex=7824;e.Zdot=379;e.Zdotaccent=379;e.Zdotbelow=7826;e.Zecyrillic=1047;e.Zedescendercyrillic=1176;e.Zedieresiscyrillic=1246;e.Zeta=918;e.Zhearmenian=1338;e.Zhebrevecyrillic=1217;e.Zhecyrillic=1046;e.Zhedescendercyrillic=1174;e.Zhedieresiscyrillic=1244;e.Zlinebelow=7828;e.Zmonospace=65338;e.Zsmall=63354;e.Zstroke=437;e.a=97;e.aabengali=2438;e.aacute=225;e.aadeva=2310;e.aagujarati=2694;e.aagurmukhi=2566;e.aamatragurmukhi=2622;e.aarusquare=13059;e.aavowelsignbengali=2494;e.aavowelsigndeva=2366;e.aavowelsigngujarati=2750;e.abbreviationmarkarmenian=1375;e.abbreviationsigndeva=2416;e.abengali=2437;e.abopomofo=12570;e.abreve=259;e.abreveacute=7855;e.abrevecyrillic=1233;e.abrevedotbelow=7863;e.abrevegrave=7857;e.abrevehookabove=7859;e.abrevetilde=7861;e.acaron=462;e.acircle=9424;e.acircumflex=226;e.acircumflexacute=7845;e.acircumflexdotbelow=7853;e.acircumflexgrave=7847;e.acircumflexhookabove=7849;e.acircumflextilde=7851;e.acute=180;e.acutebelowcmb=791;e.acutecmb=769;e.acutecomb=769;e.acutedeva=2388;e.acutelowmod=719;e.acutetonecmb=833;e.acyrillic=1072;e.adblgrave=513;e.addakgurmukhi=2673;e.adeva=2309;e.adieresis=228;e.adieresiscyrillic=1235;e.adieresismacron=479;e.adotbelow=7841;e.adotmacron=481;e.ae=230;e.aeacute=509;e.aekorean=12624;e.aemacron=483;e.afii00208=8213;e.afii08941=8356;e.afii10017=1040;e.afii10018=1041;e.afii10019=1042;e.afii10020=1043;e.afii10021=1044;e.afii10022=1045;e.afii10023=1025;e.afii10024=1046;e.afii10025=1047;e.afii10026=1048;e.afii10027=1049;e.afii10028=1050;e.afii10029=1051;e.afii10030=1052;e.afii10031=1053;e.afii10032=1054;e.afii10033=1055;e.afii10034=1056;e.afii10035=1057;e.afii10036=1058;e.afii10037=1059;e.afii10038=1060;e.afii10039=1061;e.afii10040=1062;e.afii10041=1063;e.afii10042=1064;e.afii10043=1065;e.afii10044=1066;e.afii10045=1067;e.afii10046=1068;e.afii10047=1069;e.afii10048=1070;e.afii10049=1071;e.afii10050=1168;e.afii10051=1026;e.afii10052=1027;e.afii10053=1028;e.afii10054=1029;e.afii10055=1030;e.afii10056=1031;e.afii10057=1032;e.afii10058=1033;e.afii10059=1034;e.afii10060=1035;e.afii10061=1036;e.afii10062=1038;e.afii10063=63172;e.afii10064=63173;e.afii10065=1072;e.afii10066=1073;e.afii10067=1074;e.afii10068=1075;e.afii10069=1076;e.afii10070=1077;e.afii10071=1105;e.afii10072=1078;e.afii10073=1079;e.afii10074=1080;e.afii10075=1081;e.afii10076=1082;e.afii10077=1083;e.afii10078=1084;e.afii10079=1085;e.afii10080=1086;e.afii10081=1087;e.afii10082=1088;e.afii10083=1089;e.afii10084=1090;e.afii10085=1091;e.afii10086=1092;e.afii10087=1093;e.afii10088=1094;e.afii10089=1095;e.afii10090=1096;e.afii10091=1097;e.afii10092=1098;e.afii10093=1099;e.afii10094=1100;e.afii10095=1101;e.afii10096=1102;e.afii10097=1103;e.afii10098=1169;e.afii10099=1106;e.afii10100=1107;e.afii10101=1108;e.afii10102=1109;e.afii10103=1110;e.afii10104=1111;e.afii10105=1112;e.afii10106=1113;e.afii10107=1114;e.afii10108=1115;e.afii10109=1116;e.afii10110=1118;e.afii10145=1039;e.afii10146=1122;e.afii10147=1138;e.afii10148=1140;e.afii10192=63174;e.afii10193=1119;e.afii10194=1123;e.afii10195=1139;e.afii10196=1141;e.afii10831=63175;e.afii10832=63176;e.afii10846=1241;e.afii299=8206;e.afii300=8207;e.afii301=8205;e.afii57381=1642;e.afii57388=1548;e.afii57392=1632;e.afii57393=1633;e.afii57394=1634;e.afii57395=1635;e.afii57396=1636;e.afii57397=1637;e.afii57398=1638;e.afii57399=1639;e.afii57400=1640;e.afii57401=1641;e.afii57403=1563;e.afii57407=1567;e.afii57409=1569;e.afii57410=1570;e.afii57411=1571;e.afii57412=1572;e.afii57413=1573;e.afii57414=1574;e.afii57415=1575;e.afii57416=1576;e.afii57417=1577;e.afii57418=1578;e.afii57419=1579;e.afii57420=1580;e.afii57421=1581;e.afii57422=1582;e.afii57423=1583;e.afii57424=1584;e.afii57425=1585;e.afii57426=1586;e.afii57427=1587;e.afii57428=1588;e.afii57429=1589;e.afii57430=1590;e.afii57431=1591;e.afii57432=1592;e.afii57433=1593;e.afii57434=1594;e.afii57440=1600;e.afii57441=1601;e.afii57442=1602;e.afii57443=1603;e.afii57444=1604;e.afii57445=1605;e.afii57446=1606;e.afii57448=1608;e.afii57449=1609;e.afii57450=1610;e.afii57451=1611;e.afii57452=1612;e.afii57453=1613;e.afii57454=1614;e.afii57455=1615;e.afii57456=1616;e.afii57457=1617;e.afii57458=1618;e.afii57470=1607;e.afii57505=1700;e.afii57506=1662;e.afii57507=1670;e.afii57508=1688;e.afii57509=1711;e.afii57511=1657;e.afii57512=1672;e.afii57513=1681;e.afii57514=1722;e.afii57519=1746;e.afii57534=1749;e.afii57636=8362;e.afii57645=1470;e.afii57658=1475;e.afii57664=1488;e.afii57665=1489;e.afii57666=1490;e.afii57667=1491;e.afii57668=1492;e.afii57669=1493;e.afii57670=1494;e.afii57671=1495;e.afii57672=1496;e.afii57673=1497;e.afii57674=1498;e.afii57675=1499;e.afii57676=1500;e.afii57677=1501;e.afii57678=1502;e.afii57679=1503;e.afii57680=1504;e.afii57681=1505;e.afii57682=1506;e.afii57683=1507;e.afii57684=1508;e.afii57685=1509;e.afii57686=1510;e.afii57687=1511;e.afii57688=1512;e.afii57689=1513;e.afii57690=1514;e.afii57694=64298;e.afii57695=64299;e.afii57700=64331;e.afii57705=64287;e.afii57716=1520;e.afii57717=1521;e.afii57718=1522;e.afii57723=64309;e.afii57793=1460;e.afii57794=1461;e.afii57795=1462;e.afii57796=1467;e.afii57797=1464;e.afii57798=1463;e.afii57799=1456;e.afii57800=1458;e.afii57801=1457;e.afii57802=1459;e.afii57803=1474;e.afii57804=1473;e.afii57806=1465;e.afii57807=1468;e.afii57839=1469;e.afii57841=1471;e.afii57842=1472;e.afii57929=700;e.afii61248=8453;e.afii61289=8467;e.afii61352=8470;e.afii61573=8236;e.afii61574=8237;e.afii61575=8238;e.afii61664=8204;e.afii63167=1645;e.afii64937=701;e.agrave=224;e.agujarati=2693;e.agurmukhi=2565;e.ahiragana=12354;e.ahookabove=7843;e.aibengali=2448;e.aibopomofo=12574;e.aideva=2320;e.aiecyrillic=1237;e.aigujarati=2704;e.aigurmukhi=2576;e.aimatragurmukhi=2632;e.ainarabic=1593;e.ainfinalarabic=65226;e.aininitialarabic=65227;e.ainmedialarabic=65228;e.ainvertedbreve=515;e.aivowelsignbengali=2504;e.aivowelsigndeva=2376;e.aivowelsigngujarati=2760;e.akatakana=12450;e.akatakanahalfwidth=65393;e.akorean=12623;e.alef=1488;e.alefarabic=1575;e.alefdageshhebrew=64304;e.aleffinalarabic=65166;e.alefhamzaabovearabic=1571;e.alefhamzaabovefinalarabic=65156;e.alefhamzabelowarabic=1573;e.alefhamzabelowfinalarabic=65160;e.alefhebrew=1488;e.aleflamedhebrew=64335;e.alefmaddaabovearabic=1570;e.alefmaddaabovefinalarabic=65154;e.alefmaksuraarabic=1609;e.alefmaksurafinalarabic=65264;e.alefmaksurainitialarabic=65267;e.alefmaksuramedialarabic=65268;e.alefpatahhebrew=64302;e.alefqamatshebrew=64303;e.aleph=8501;e.allequal=8780;e.alpha=945;e.alphatonos=940;e.amacron=257;e.amonospace=65345;e.ampersand=38;e.ampersandmonospace=65286;e.ampersandsmall=63270;e.amsquare=13250;e.anbopomofo=12578;e.angbopomofo=12580;e.angbracketleft=12296;e.angbracketright=12297;e.angkhankhuthai=3674;e.angle=8736;e.anglebracketleft=12296;e.anglebracketleftvertical=65087;e.anglebracketright=12297;e.anglebracketrightvertical=65088;e.angleleft=9001;e.angleright=9002;e.angstrom=8491;e.anoteleia=903;e.anudattadeva=2386;e.anusvarabengali=2434;e.anusvaradeva=2306;e.anusvaragujarati=2690;e.aogonek=261;e.apaatosquare=13056;e.aparen=9372;e.apostrophearmenian=1370;e.apostrophemod=700;e.apple=63743;e.approaches=8784;e.approxequal=8776;e.approxequalorimage=8786;e.approximatelyequal=8773;e.araeaekorean=12686;e.araeakorean=12685;e.arc=8978;e.arighthalfring=7834;e.aring=229;e.aringacute=507;e.aringbelow=7681;e.arrowboth=8596;e.arrowdashdown=8675;e.arrowdashleft=8672;e.arrowdashright=8674;e.arrowdashup=8673;e.arrowdblboth=8660;e.arrowdbldown=8659;e.arrowdblleft=8656;e.arrowdblright=8658;e.arrowdblup=8657;e.arrowdown=8595;e.arrowdownleft=8601;e.arrowdownright=8600;e.arrowdownwhite=8681;e.arrowheaddownmod=709;e.arrowheadleftmod=706;e.arrowheadrightmod=707;e.arrowheadupmod=708;e.arrowhorizex=63719;e.arrowleft=8592;e.arrowleftdbl=8656;e.arrowleftdblstroke=8653;e.arrowleftoverright=8646;e.arrowleftwhite=8678;e.arrowright=8594;e.arrowrightdblstroke=8655;e.arrowrightheavy=10142;e.arrowrightoverleft=8644;e.arrowrightwhite=8680;e.arrowtableft=8676;e.arrowtabright=8677;e.arrowup=8593;e.arrowupdn=8597;e.arrowupdnbse=8616;e.arrowupdownbase=8616;e.arrowupleft=8598;e.arrowupleftofdown=8645;e.arrowupright=8599;e.arrowupwhite=8679;e.arrowvertex=63718;e.asciicircum=94;e.asciicircummonospace=65342;e.asciitilde=126;e.asciitildemonospace=65374;e.ascript=593;e.ascriptturned=594;e.asmallhiragana=12353;e.asmallkatakana=12449;e.asmallkatakanahalfwidth=65383;e.asterisk=42;e.asteriskaltonearabic=1645;e.asteriskarabic=1645;e.asteriskmath=8727;e.asteriskmonospace=65290;e.asterisksmall=65121;e.asterism=8258;e.asuperior=63209;e.asymptoticallyequal=8771;e.at=64;e.atilde=227;e.atmonospace=65312;e.atsmall=65131;e.aturned=592;e.aubengali=2452;e.aubopomofo=12576;e.audeva=2324;e.augujarati=2708;e.augurmukhi=2580;e.aulengthmarkbengali=2519;e.aumatragurmukhi=2636;e.auvowelsignbengali=2508;e.auvowelsigndeva=2380;e.auvowelsigngujarati=2764;e.avagrahadeva=2365;e.aybarmenian=1377;e.ayin=1506;e.ayinaltonehebrew=64288;e.ayinhebrew=1506;e.b=98;e.babengali=2476;e.backslash=92;e.backslashmonospace=65340;e.badeva=2348;e.bagujarati=2732;e.bagurmukhi=2604;e.bahiragana=12400;e.bahtthai=3647;e.bakatakana=12496;e.bar=124;e.barmonospace=65372;e.bbopomofo=12549;e.bcircle=9425;e.bdotaccent=7683;e.bdotbelow=7685;e.beamedsixteenthnotes=9836;e.because=8757;e.becyrillic=1073;e.beharabic=1576;e.behfinalarabic=65168;e.behinitialarabic=65169;e.behiragana=12409;e.behmedialarabic=65170;e.behmeeminitialarabic=64671;e.behmeemisolatedarabic=64520;e.behnoonfinalarabic=64621;e.bekatakana=12505;e.benarmenian=1378;e.bet=1489;e.beta=946;e.betasymbolgreek=976;e.betdagesh=64305;e.betdageshhebrew=64305;e.bethebrew=1489;e.betrafehebrew=64332;e.bhabengali=2477;e.bhadeva=2349;e.bhagujarati=2733;e.bhagurmukhi=2605;e.bhook=595;e.bihiragana=12403;e.bikatakana=12499;e.bilabialclick=664;e.bindigurmukhi=2562;e.birusquare=13105;e.blackcircle=9679;e.blackdiamond=9670;e.blackdownpointingtriangle=9660;e.blackleftpointingpointer=9668;e.blackleftpointingtriangle=9664;e.blacklenticularbracketleft=12304;e.blacklenticularbracketleftvertical=65083;e.blacklenticularbracketright=12305;e.blacklenticularbracketrightvertical=65084;e.blacklowerlefttriangle=9699;e.blacklowerrighttriangle=9698;e.blackrectangle=9644;e.blackrightpointingpointer=9658;e.blackrightpointingtriangle=9654;e.blacksmallsquare=9642;e.blacksmilingface=9787;e.blacksquare=9632;e.blackstar=9733;e.blackupperlefttriangle=9700;e.blackupperrighttriangle=9701;e.blackuppointingsmalltriangle=9652;e.blackuppointingtriangle=9650;e.blank=9251;e.blinebelow=7687;e.block=9608;e.bmonospace=65346;e.bobaimaithai=3610;e.bohiragana=12412;e.bokatakana=12508;e.bparen=9373;e.bqsquare=13251;e.braceex=63732;e.braceleft=123;e.braceleftbt=63731;e.braceleftmid=63730;e.braceleftmonospace=65371;e.braceleftsmall=65115;e.bracelefttp=63729;e.braceleftvertical=65079;e.braceright=125;e.bracerightbt=63742;e.bracerightmid=63741;e.bracerightmonospace=65373;e.bracerightsmall=65116;e.bracerighttp=63740;e.bracerightvertical=65080;e.bracketleft=91;e.bracketleftbt=63728;e.bracketleftex=63727;e.bracketleftmonospace=65339;e.bracketlefttp=63726;e.bracketright=93;e.bracketrightbt=63739;e.bracketrightex=63738;e.bracketrightmonospace=65341;e.bracketrighttp=63737;e.breve=728;e.brevebelowcmb=814;e.brevecmb=774;e.breveinvertedbelowcmb=815;e.breveinvertedcmb=785;e.breveinverteddoublecmb=865;e.bridgebelowcmb=810;e.bridgeinvertedbelowcmb=826;e.brokenbar=166;e.bstroke=384;e.bsuperior=63210;e.btopbar=387;e.buhiragana=12406;e.bukatakana=12502;e.bullet=8226;e.bulletinverse=9688;e.bulletoperator=8729;e.bullseye=9678;e.c=99;e.caarmenian=1390;e.cabengali=2458;e.cacute=263;e.cadeva=2330;e.cagujarati=2714;e.cagurmukhi=2586;e.calsquare=13192;e.candrabindubengali=2433;e.candrabinducmb=784;e.candrabindudeva=2305;e.candrabindugujarati=2689;e.capslock=8682;e.careof=8453;e.caron=711;e.caronbelowcmb=812;e.caroncmb=780;e.carriagereturn=8629;e.cbopomofo=12568;e.ccaron=269;e.ccedilla=231;e.ccedillaacute=7689;e.ccircle=9426;e.ccircumflex=265;e.ccurl=597;e.cdot=267;e.cdotaccent=267;e.cdsquare=13253;e.cedilla=184;e.cedillacmb=807;e.cent=162;e.centigrade=8451;e.centinferior=63199;e.centmonospace=65504;e.centoldstyle=63394;e.centsuperior=63200;e.chaarmenian=1401;e.chabengali=2459;e.chadeva=2331;e.chagujarati=2715;e.chagurmukhi=2587;e.chbopomofo=12564;e.cheabkhasiancyrillic=1213;e.checkmark=10003;e.checyrillic=1095;e.chedescenderabkhasiancyrillic=1215;e.chedescendercyrillic=1207;e.chedieresiscyrillic=1269;e.cheharmenian=1395;e.chekhakassiancyrillic=1228;e.cheverticalstrokecyrillic=1209;e.chi=967;e.chieuchacirclekorean=12919;e.chieuchaparenkorean=12823;e.chieuchcirclekorean=12905;e.chieuchkorean=12618;e.chieuchparenkorean=12809;e.chochangthai=3594;e.chochanthai=3592;e.chochingthai=3593;e.chochoethai=3596;e.chook=392;e.cieucacirclekorean=12918;e.cieucaparenkorean=12822;e.cieuccirclekorean=12904;e.cieuckorean=12616;e.cieucparenkorean=12808;e.cieucuparenkorean=12828;e.circle=9675;e.circlecopyrt=169;e.circlemultiply=8855;e.circleot=8857;e.circleplus=8853;e.circlepostalmark=12342;e.circlewithlefthalfblack=9680;e.circlewithrighthalfblack=9681;e.circumflex=710;e.circumflexbelowcmb=813;e.circumflexcmb=770;e.clear=8999;e.clickalveolar=450;e.clickdental=448;e.clicklateral=449;e.clickretroflex=451;e.club=9827;e.clubsuitblack=9827;e.clubsuitwhite=9831;e.cmcubedsquare=13220;e.cmonospace=65347;e.cmsquaredsquare=13216;e.coarmenian=1409;e.colon=58;e.colonmonetary=8353;e.colonmonospace=65306;e.colonsign=8353;e.colonsmall=65109;e.colontriangularhalfmod=721;e.colontriangularmod=720;e.comma=44;e.commaabovecmb=787;e.commaaboverightcmb=789;e.commaaccent=63171;e.commaarabic=1548;e.commaarmenian=1373;e.commainferior=63201;e.commamonospace=65292;e.commareversedabovecmb=788;e.commareversedmod=701;e.commasmall=65104;e.commasuperior=63202;e.commaturnedabovecmb=786;e.commaturnedmod=699;e.compass=9788;e.congruent=8773;e.contourintegral=8750;e.control=8963;e.controlACK=6;e.controlBEL=7;e.controlBS=8;e.controlCAN=24;e.controlCR=13;e.controlDC1=17;e.controlDC2=18;e.controlDC3=19;e.controlDC4=20;e.controlDEL=127;e.controlDLE=16;e.controlEM=25;e.controlENQ=5;e.controlEOT=4;e.controlESC=27;e.controlETB=23;e.controlETX=3;e.controlFF=12;e.controlFS=28;e.controlGS=29;e.controlHT=9;e.controlLF=10;e.controlNAK=21;e.controlNULL=0;e.controlRS=30;e.controlSI=15;e.controlSO=14;e.controlSOT=2;e.controlSTX=1;e.controlSUB=26;e.controlSYN=22;e.controlUS=31;e.controlVT=11;e.copyright=169;e.copyrightsans=63721;e.copyrightserif=63193;e.cornerbracketleft=12300;e.cornerbracketlefthalfwidth=65378;e.cornerbracketleftvertical=65089;e.cornerbracketright=12301;e.cornerbracketrighthalfwidth=65379;e.cornerbracketrightvertical=65090;e.corporationsquare=13183;e.cosquare=13255;e.coverkgsquare=13254;e.cparen=9374;e.cruzeiro=8354;e.cstretched=663;e.curlyand=8911;e.curlyor=8910;e.currency=164;e.cyrBreve=63185;e.cyrFlex=63186;e.cyrbreve=63188;e.cyrflex=63189;e.d=100;e.daarmenian=1380;e.dabengali=2470;e.dadarabic=1590;e.dadeva=2342;e.dadfinalarabic=65214;e.dadinitialarabic=65215;e.dadmedialarabic=65216;e.dagesh=1468;e.dageshhebrew=1468;e.dagger=8224;e.daggerdbl=8225;e.dagujarati=2726;e.dagurmukhi=2598;e.dahiragana=12384;e.dakatakana=12480;e.dalarabic=1583;e.dalet=1491;e.daletdagesh=64307;e.daletdageshhebrew=64307;e.dalethebrew=1491;e.dalfinalarabic=65194;e.dammaarabic=1615;e.dammalowarabic=1615;e.dammatanaltonearabic=1612;e.dammatanarabic=1612;e.danda=2404;e.dargahebrew=1447;e.dargalefthebrew=1447;e.dasiapneumatacyrilliccmb=1157;e.dblGrave=63187;e.dblanglebracketleft=12298;e.dblanglebracketleftvertical=65085;e.dblanglebracketright=12299;e.dblanglebracketrightvertical=65086;e.dblarchinvertedbelowcmb=811;e.dblarrowleft=8660;e.dblarrowright=8658;e.dbldanda=2405;e.dblgrave=63190;e.dblgravecmb=783;e.dblintegral=8748;e.dbllowline=8215;e.dbllowlinecmb=819;e.dbloverlinecmb=831;e.dblprimemod=698;e.dblverticalbar=8214;e.dblverticallineabovecmb=782;e.dbopomofo=12553;e.dbsquare=13256;e.dcaron=271;e.dcedilla=7697;e.dcircle=9427;e.dcircumflexbelow=7699;e.dcroat=273;e.ddabengali=2465;e.ddadeva=2337;e.ddagujarati=2721;e.ddagurmukhi=2593;e.ddalarabic=1672;e.ddalfinalarabic=64393;e.dddhadeva=2396;e.ddhabengali=2466;e.ddhadeva=2338;e.ddhagujarati=2722;e.ddhagurmukhi=2594;e.ddotaccent=7691;e.ddotbelow=7693;e.decimalseparatorarabic=1643;e.decimalseparatorpersian=1643;e.decyrillic=1076;e.degree=176;e.dehihebrew=1453;e.dehiragana=12391;e.deicoptic=1007;e.dekatakana=12487;e.deleteleft=9003;e.deleteright=8998;e.delta=948;e.deltaturned=397;e.denominatorminusonenumeratorbengali=2552;e.dezh=676;e.dhabengali=2471;e.dhadeva=2343;e.dhagujarati=2727;e.dhagurmukhi=2599;e.dhook=599;e.dialytikatonos=901;e.dialytikatonoscmb=836;e.diamond=9830;e.diamondsuitwhite=9826;e.dieresis=168;e.dieresisacute=63191;e.dieresisbelowcmb=804;e.dieresiscmb=776;e.dieresisgrave=63192;e.dieresistonos=901;e.dihiragana=12386;e.dikatakana=12482;e.dittomark=12291;e.divide=247;e.divides=8739;e.divisionslash=8725;e.djecyrillic=1106;e.dkshade=9619;e.dlinebelow=7695;e.dlsquare=13207;e.dmacron=273;e.dmonospace=65348;e.dnblock=9604;e.dochadathai=3598;e.dodekthai=3604;e.dohiragana=12393;e.dokatakana=12489;e.dollar=36;e.dollarinferior=63203;e.dollarmonospace=65284;e.dollaroldstyle=63268;e.dollarsmall=65129;e.dollarsuperior=63204;e.dong=8363;e.dorusquare=13094;e.dotaccent=729;e.dotaccentcmb=775;e.dotbelowcmb=803;e.dotbelowcomb=803;e.dotkatakana=12539;e.dotlessi=305;e.dotlessj=63166;e.dotlessjstrokehook=644;e.dotmath=8901;e.dottedcircle=9676;e.doubleyodpatah=64287;e.doubleyodpatahhebrew=64287;e.downtackbelowcmb=798;e.downtackmod=725;e.dparen=9375;e.dsuperior=63211;e.dtail=598;e.dtopbar=396;e.duhiragana=12389;e.dukatakana=12485;e.dz=499;e.dzaltone=675;e.dzcaron=454;e.dzcurl=677;e.dzeabkhasiancyrillic=1249;e.dzecyrillic=1109;e.dzhecyrillic=1119;e.e=101;e.eacute=233;e.earth=9793;e.ebengali=2447;e.ebopomofo=12572;e.ebreve=277;e.ecandradeva=2317;e.ecandragujarati=2701;e.ecandravowelsigndeva=2373;e.ecandravowelsigngujarati=2757;e.ecaron=283;e.ecedillabreve=7709;e.echarmenian=1381;e.echyiwnarmenian=1415;e.ecircle=9428;e.ecircumflex=234;e.ecircumflexacute=7871;e.ecircumflexbelow=7705;e.ecircumflexdotbelow=7879;e.ecircumflexgrave=7873;e.ecircumflexhookabove=7875;e.ecircumflextilde=7877;e.ecyrillic=1108;e.edblgrave=517;e.edeva=2319;e.edieresis=235;e.edot=279;e.edotaccent=279;e.edotbelow=7865;e.eegurmukhi=2575;e.eematragurmukhi=2631;e.efcyrillic=1092;e.egrave=232;e.egujarati=2703;e.eharmenian=1383;e.ehbopomofo=12573;e.ehiragana=12360;e.ehookabove=7867;e.eibopomofo=12575;e.eight=56;e.eightarabic=1640;e.eightbengali=2542;e.eightcircle=9319;e.eightcircleinversesansserif=10129;e.eightdeva=2414;e.eighteencircle=9329;e.eighteenparen=9349;e.eighteenperiod=9369;e.eightgujarati=2798;e.eightgurmukhi=2670;e.eighthackarabic=1640;e.eighthangzhou=12328;e.eighthnotebeamed=9835;e.eightideographicparen=12839;e.eightinferior=8328;e.eightmonospace=65304;e.eightoldstyle=63288;e.eightparen=9339;e.eightperiod=9359;e.eightpersian=1784;e.eightroman=8567;e.eightsuperior=8312;e.eightthai=3672;e.einvertedbreve=519;e.eiotifiedcyrillic=1125;e.ekatakana=12456;e.ekatakanahalfwidth=65396;e.ekonkargurmukhi=2676;e.ekorean=12628;e.elcyrillic=1083;e.element=8712;e.elevencircle=9322;e.elevenparen=9342;e.elevenperiod=9362;e.elevenroman=8570;e.ellipsis=8230;e.ellipsisvertical=8942;e.emacron=275;e.emacronacute=7703;e.emacrongrave=7701;e.emcyrillic=1084;e.emdash=8212;e.emdashvertical=65073;e.emonospace=65349;e.emphasismarkarmenian=1371;e.emptyset=8709;e.enbopomofo=12579;e.encyrillic=1085;e.endash=8211;e.endashvertical=65074;e.endescendercyrillic=1187;e.eng=331;e.engbopomofo=12581;e.enghecyrillic=1189;e.enhookcyrillic=1224;e.enspace=8194;e.eogonek=281;e.eokorean=12627;e.eopen=603;e.eopenclosed=666;e.eopenreversed=604;e.eopenreversedclosed=606;e.eopenreversedhook=605;e.eparen=9376;e.epsilon=949;e.epsilontonos=941;e.equal=61;e.equalmonospace=65309;e.equalsmall=65126;e.equalsuperior=8316;e.equivalence=8801;e.erbopomofo=12582;e.ercyrillic=1088;e.ereversed=600;e.ereversedcyrillic=1101;e.escyrillic=1089;e.esdescendercyrillic=1195;e.esh=643;e.eshcurl=646;e.eshortdeva=2318;e.eshortvowelsigndeva=2374;e.eshreversedloop=426;e.eshsquatreversed=645;e.esmallhiragana=12359;e.esmallkatakana=12455;e.esmallkatakanahalfwidth=65386;e.estimated=8494;e.esuperior=63212;e.eta=951;e.etarmenian=1384;e.etatonos=942;e.eth=240;e.etilde=7869;e.etildebelow=7707;e.etnahtafoukhhebrew=1425;e.etnahtafoukhlefthebrew=1425;e.etnahtahebrew=1425;e.etnahtalefthebrew=1425;e.eturned=477;e.eukorean=12641;e.euro=8364;e.evowelsignbengali=2503;e.evowelsigndeva=2375;e.evowelsigngujarati=2759;e.exclam=33;e.exclamarmenian=1372;e.exclamdbl=8252;e.exclamdown=161;e.exclamdownsmall=63393;e.exclammonospace=65281;e.exclamsmall=63265;e.existential=8707;e.ezh=658;e.ezhcaron=495;e.ezhcurl=659;e.ezhreversed=441;e.ezhtail=442;e.f=102;e.fadeva=2398;e.fagurmukhi=2654;e.fahrenheit=8457;e.fathaarabic=1614;e.fathalowarabic=1614;e.fathatanarabic=1611;e.fbopomofo=12552;e.fcircle=9429;e.fdotaccent=7711;e.feharabic=1601;e.feharmenian=1414;e.fehfinalarabic=65234;e.fehinitialarabic=65235;e.fehmedialarabic=65236;e.feicoptic=997;e.female=9792;e.ff=64256;e.f_f=64256;e.ffi=64259;e.f_f_i=64259;e.ffl=64260;e.f_f_l=64260;e.fi=64257;e.f_i=64257;e.fifteencircle=9326;e.fifteenparen=9346;e.fifteenperiod=9366;e.figuredash=8210;e.filledbox=9632;e.filledrect=9644;e.finalkaf=1498;e.finalkafdagesh=64314;e.finalkafdageshhebrew=64314;e.finalkafhebrew=1498;e.finalmem=1501;e.finalmemhebrew=1501;e.finalnun=1503;e.finalnunhebrew=1503;e.finalpe=1507;e.finalpehebrew=1507;e.finaltsadi=1509;e.finaltsadihebrew=1509;e.firsttonechinese=713;e.fisheye=9673;e.fitacyrillic=1139;e.five=53;e.fivearabic=1637;e.fivebengali=2539;e.fivecircle=9316;e.fivecircleinversesansserif=10126;e.fivedeva=2411;e.fiveeighths=8541;e.fivegujarati=2795;e.fivegurmukhi=2667;e.fivehackarabic=1637;e.fivehangzhou=12325;e.fiveideographicparen=12836;e.fiveinferior=8325;e.fivemonospace=65301;e.fiveoldstyle=63285;e.fiveparen=9336;e.fiveperiod=9356;e.fivepersian=1781;e.fiveroman=8564;e.fivesuperior=8309;e.fivethai=3669;e.fl=64258;e.f_l=64258;e.florin=402;e.fmonospace=65350;e.fmsquare=13209;e.fofanthai=3615;e.fofathai=3613;e.fongmanthai=3663;e.forall=8704;e.four=52;e.fourarabic=1636;e.fourbengali=2538;e.fourcircle=9315;e.fourcircleinversesansserif=10125;e.fourdeva=2410;e.fourgujarati=2794;e.fourgurmukhi=2666;e.fourhackarabic=1636;e.fourhangzhou=12324;e.fourideographicparen=12835;e.fourinferior=8324;e.fourmonospace=65300;e.fournumeratorbengali=2551;e.fouroldstyle=63284;e.fourparen=9335;e.fourperiod=9355;e.fourpersian=1780;e.fourroman=8563;e.foursuperior=8308;e.fourteencircle=9325;e.fourteenparen=9345;e.fourteenperiod=9365;e.fourthai=3668;e.fourthtonechinese=715;e.fparen=9377;e.fraction=8260;e.franc=8355;e.g=103;e.gabengali=2455;e.gacute=501;e.gadeva=2327;e.gafarabic=1711;e.gaffinalarabic=64403;e.gafinitialarabic=64404;e.gafmedialarabic=64405;e.gagujarati=2711;e.gagurmukhi=2583;e.gahiragana=12364;e.gakatakana=12460;e.gamma=947;e.gammalatinsmall=611;e.gammasuperior=736;e.gangiacoptic=1003;e.gbopomofo=12557;e.gbreve=287;e.gcaron=487;e.gcedilla=291;e.gcircle=9430;e.gcircumflex=285;e.gcommaaccent=291;e.gdot=289;e.gdotaccent=289;e.gecyrillic=1075;e.gehiragana=12370;e.gekatakana=12466;e.geometricallyequal=8785;e.gereshaccenthebrew=1436;e.gereshhebrew=1523;e.gereshmuqdamhebrew=1437;e.germandbls=223;e.gershayimaccenthebrew=1438;e.gershayimhebrew=1524;e.getamark=12307;e.ghabengali=2456;e.ghadarmenian=1394;e.ghadeva=2328;e.ghagujarati=2712;e.ghagurmukhi=2584;e.ghainarabic=1594;e.ghainfinalarabic=65230;e.ghaininitialarabic=65231;e.ghainmedialarabic=65232;e.ghemiddlehookcyrillic=1173;e.ghestrokecyrillic=1171;e.gheupturncyrillic=1169;e.ghhadeva=2394;e.ghhagurmukhi=2650;e.ghook=608;e.ghzsquare=13203;e.gihiragana=12366;e.gikatakana=12462;e.gimarmenian=1379;e.gimel=1490;e.gimeldagesh=64306;e.gimeldageshhebrew=64306;e.gimelhebrew=1490;e.gjecyrillic=1107;e.glottalinvertedstroke=446;e.glottalstop=660;e.glottalstopinverted=662;e.glottalstopmod=704;e.glottalstopreversed=661;e.glottalstopreversedmod=705;e.glottalstopreversedsuperior=740;e.glottalstopstroke=673;e.glottalstopstrokereversed=674;e.gmacron=7713;e.gmonospace=65351;e.gohiragana=12372;e.gokatakana=12468;e.gparen=9378;e.gpasquare=13228;e.gradient=8711;e.grave=96;e.gravebelowcmb=790;e.gravecmb=768;e.gravecomb=768;e.gravedeva=2387;e.gravelowmod=718;e.gravemonospace=65344;e.gravetonecmb=832;e.greater=62;e.greaterequal=8805;e.greaterequalorless=8923;e.greatermonospace=65310;e.greaterorequivalent=8819;e.greaterorless=8823;e.greateroverequal=8807;e.greatersmall=65125;e.gscript=609;e.gstroke=485;e.guhiragana=12368;e.guillemotleft=171;e.guillemotright=187;e.guilsinglleft=8249;e.guilsinglright=8250;e.gukatakana=12464;e.guramusquare=13080;e.gysquare=13257;e.h=104;e.haabkhasiancyrillic=1193;e.haaltonearabic=1729;e.habengali=2489;e.hadescendercyrillic=1203;e.hadeva=2361;e.hagujarati=2745;e.hagurmukhi=2617;e.haharabic=1581;e.hahfinalarabic=65186;e.hahinitialarabic=65187;e.hahiragana=12399;e.hahmedialarabic=65188;e.haitusquare=13098;e.hakatakana=12495;e.hakatakanahalfwidth=65418;e.halantgurmukhi=2637;e.hamzaarabic=1569;e.hamzalowarabic=1569;e.hangulfiller=12644;e.hardsigncyrillic=1098;e.harpoonleftbarbup=8636;e.harpoonrightbarbup=8640;e.hasquare=13258;e.hatafpatah=1458;e.hatafpatah16=1458;e.hatafpatah23=1458;e.hatafpatah2f=1458;e.hatafpatahhebrew=1458;e.hatafpatahnarrowhebrew=1458;e.hatafpatahquarterhebrew=1458;e.hatafpatahwidehebrew=1458;e.hatafqamats=1459;e.hatafqamats1b=1459;e.hatafqamats28=1459;e.hatafqamats34=1459;e.hatafqamatshebrew=1459;e.hatafqamatsnarrowhebrew=1459;e.hatafqamatsquarterhebrew=1459;e.hatafqamatswidehebrew=1459;e.hatafsegol=1457;e.hatafsegol17=1457;e.hatafsegol24=1457;e.hatafsegol30=1457;e.hatafsegolhebrew=1457;e.hatafsegolnarrowhebrew=1457;e.hatafsegolquarterhebrew=1457;e.hatafsegolwidehebrew=1457;e.hbar=295;e.hbopomofo=12559;e.hbrevebelow=7723;e.hcedilla=7721;e.hcircle=9431;e.hcircumflex=293;e.hdieresis=7719;e.hdotaccent=7715;e.hdotbelow=7717;e.he=1492;e.heart=9829;e.heartsuitblack=9829;e.heartsuitwhite=9825;e.hedagesh=64308;e.hedageshhebrew=64308;e.hehaltonearabic=1729;e.heharabic=1607;e.hehebrew=1492;e.hehfinalaltonearabic=64423;e.hehfinalalttwoarabic=65258;e.hehfinalarabic=65258;e.hehhamzaabovefinalarabic=64421;e.hehhamzaaboveisolatedarabic=64420;e.hehinitialaltonearabic=64424;e.hehinitialarabic=65259;e.hehiragana=12408;e.hehmedialaltonearabic=64425;e.hehmedialarabic=65260;e.heiseierasquare=13179;e.hekatakana=12504;e.hekatakanahalfwidth=65421;e.hekutaarusquare=13110;e.henghook=615;e.herutusquare=13113;e.het=1495;e.hethebrew=1495;e.hhook=614;e.hhooksuperior=689;e.hieuhacirclekorean=12923;e.hieuhaparenkorean=12827;e.hieuhcirclekorean=12909;e.hieuhkorean=12622;e.hieuhparenkorean=12813;e.hihiragana=12402;e.hikatakana=12498;e.hikatakanahalfwidth=65419;e.hiriq=1460;e.hiriq14=1460;e.hiriq21=1460;e.hiriq2d=1460;e.hiriqhebrew=1460;e.hiriqnarrowhebrew=1460;e.hiriqquarterhebrew=1460;e.hiriqwidehebrew=1460;e.hlinebelow=7830;e.hmonospace=65352;e.hoarmenian=1392;e.hohipthai=3627;e.hohiragana=12411;e.hokatakana=12507;e.hokatakanahalfwidth=65422;e.holam=1465;e.holam19=1465;e.holam26=1465;e.holam32=1465;e.holamhebrew=1465;e.holamnarrowhebrew=1465;e.holamquarterhebrew=1465;e.holamwidehebrew=1465;e.honokhukthai=3630;e.hookabovecomb=777;e.hookcmb=777;e.hookpalatalizedbelowcmb=801;e.hookretroflexbelowcmb=802;e.hoonsquare=13122;e.horicoptic=1001;e.horizontalbar=8213;e.horncmb=795;e.hotsprings=9832;e.house=8962;e.hparen=9379;e.hsuperior=688;e.hturned=613;e.huhiragana=12405;e.huiitosquare=13107;e.hukatakana=12501;e.hukatakanahalfwidth=65420;e.hungarumlaut=733;e.hungarumlautcmb=779;e.hv=405;e.hyphen=45;e.hypheninferior=63205;e.hyphenmonospace=65293;e.hyphensmall=65123;e.hyphensuperior=63206;e.hyphentwo=8208;e.i=105;e.iacute=237;e.iacyrillic=1103;e.ibengali=2439;e.ibopomofo=12583;e.ibreve=301;e.icaron=464;e.icircle=9432;e.icircumflex=238;e.icyrillic=1110;e.idblgrave=521;e.ideographearthcircle=12943;e.ideographfirecircle=12939;e.ideographicallianceparen=12863;e.ideographiccallparen=12858;e.ideographiccentrecircle=12965;e.ideographicclose=12294;e.ideographiccomma=12289;e.ideographiccommaleft=65380;e.ideographiccongratulationparen=12855;e.ideographiccorrectcircle=12963;e.ideographicearthparen=12847;e.ideographicenterpriseparen=12861;e.ideographicexcellentcircle=12957;e.ideographicfestivalparen=12864;e.ideographicfinancialcircle=12950;e.ideographicfinancialparen=12854;e.ideographicfireparen=12843;e.ideographichaveparen=12850;e.ideographichighcircle=12964;e.ideographiciterationmark=12293;e.ideographiclaborcircle=12952;e.ideographiclaborparen=12856;e.ideographicleftcircle=12967;e.ideographiclowcircle=12966;e.ideographicmedicinecircle=12969;e.ideographicmetalparen=12846;e.ideographicmoonparen=12842;e.ideographicnameparen=12852;e.ideographicperiod=12290;e.ideographicprintcircle=12958;e.ideographicreachparen=12867;e.ideographicrepresentparen=12857;e.ideographicresourceparen=12862;e.ideographicrightcircle=12968;e.ideographicsecretcircle=12953;e.ideographicselfparen=12866;e.ideographicsocietyparen=12851;e.ideographicspace=12288;e.ideographicspecialparen=12853;e.ideographicstockparen=12849;e.ideographicstudyparen=12859;e.ideographicsunparen=12848;e.ideographicsuperviseparen=12860;e.ideographicwaterparen=12844;e.ideographicwoodparen=12845;e.ideographiczero=12295;e.ideographmetalcircle=12942;e.ideographmooncircle=12938;e.ideographnamecircle=12948;e.ideographsuncircle=12944;e.ideographwatercircle=12940;e.ideographwoodcircle=12941;e.ideva=2311;e.idieresis=239;e.idieresisacute=7727;e.idieresiscyrillic=1253;e.idotbelow=7883;e.iebrevecyrillic=1239;e.iecyrillic=1077;e.ieungacirclekorean=12917;e.ieungaparenkorean=12821;e.ieungcirclekorean=12903;e.ieungkorean=12615;e.ieungparenkorean=12807;e.igrave=236;e.igujarati=2695;e.igurmukhi=2567;e.ihiragana=12356;e.ihookabove=7881;e.iibengali=2440;e.iicyrillic=1080;e.iideva=2312;e.iigujarati=2696;e.iigurmukhi=2568;e.iimatragurmukhi=2624;e.iinvertedbreve=523;e.iishortcyrillic=1081;e.iivowelsignbengali=2496;e.iivowelsigndeva=2368;e.iivowelsigngujarati=2752;e.ij=307;e.ikatakana=12452;e.ikatakanahalfwidth=65394;e.ikorean=12643;e.ilde=732;e.iluyhebrew=1452;e.imacron=299;e.imacroncyrillic=1251;e.imageorapproximatelyequal=8787;e.imatragurmukhi=2623;e.imonospace=65353;e.increment=8710;e.infinity=8734;e.iniarmenian=1387;e.integral=8747;e.integralbottom=8993;e.integralbt=8993;e.integralex=63733;e.integraltop=8992;e.integraltp=8992;e.intersection=8745;e.intisquare=13061;e.invbullet=9688;e.invcircle=9689;e.invsmileface=9787;e.iocyrillic=1105;e.iogonek=303;e.iota=953;e.iotadieresis=970;e.iotadieresistonos=912;e.iotalatin=617;e.iotatonos=943;e.iparen=9380;e.irigurmukhi=2674;e.ismallhiragana=12355;e.ismallkatakana=12451;e.ismallkatakanahalfwidth=65384;e.issharbengali=2554;e.istroke=616;e.isuperior=63213;e.iterationhiragana=12445;e.iterationkatakana=12541;e.itilde=297;e.itildebelow=7725;e.iubopomofo=12585;e.iucyrillic=1102;e.ivowelsignbengali=2495;e.ivowelsigndeva=2367;e.ivowelsigngujarati=2751;e.izhitsacyrillic=1141;e.izhitsadblgravecyrillic=1143;e.j=106;e.jaarmenian=1393;e.jabengali=2460;e.jadeva=2332;e.jagujarati=2716;e.jagurmukhi=2588;e.jbopomofo=12560;e.jcaron=496;e.jcircle=9433;e.jcircumflex=309;e.jcrossedtail=669;e.jdotlessstroke=607;e.jecyrillic=1112;e.jeemarabic=1580;e.jeemfinalarabic=65182;e.jeeminitialarabic=65183;e.jeemmedialarabic=65184;e.jeharabic=1688;e.jehfinalarabic=64395;e.jhabengali=2461;e.jhadeva=2333;e.jhagujarati=2717;e.jhagurmukhi=2589;e.jheharmenian=1403;e.jis=12292;e.jmonospace=65354;e.jparen=9381;e.jsuperior=690;e.k=107;e.kabashkircyrillic=1185;e.kabengali=2453;e.kacute=7729;e.kacyrillic=1082;e.kadescendercyrillic=1179;e.kadeva=2325;e.kaf=1499;e.kafarabic=1603;e.kafdagesh=64315;e.kafdageshhebrew=64315;e.kaffinalarabic=65242;e.kafhebrew=1499;e.kafinitialarabic=65243;e.kafmedialarabic=65244;e.kafrafehebrew=64333;e.kagujarati=2709;e.kagurmukhi=2581;e.kahiragana=12363;e.kahookcyrillic=1220;e.kakatakana=12459;e.kakatakanahalfwidth=65398;e.kappa=954;e.kappasymbolgreek=1008;e.kapyeounmieumkorean=12657;e.kapyeounphieuphkorean=12676;e.kapyeounpieupkorean=12664;e.kapyeounssangpieupkorean=12665;e.karoriisquare=13069;e.kashidaautoarabic=1600;e.kashidaautonosidebearingarabic=1600;e.kasmallkatakana=12533;e.kasquare=13188;e.kasraarabic=1616;e.kasratanarabic=1613;e.kastrokecyrillic=1183;e.katahiraprolongmarkhalfwidth=65392;e.kaverticalstrokecyrillic=1181;e.kbopomofo=12558;e.kcalsquare=13193;e.kcaron=489;e.kcedilla=311;e.kcircle=9434;e.kcommaaccent=311;e.kdotbelow=7731;e.keharmenian=1412;e.kehiragana=12369;e.kekatakana=12465;e.kekatakanahalfwidth=65401;e.kenarmenian=1391;e.kesmallkatakana=12534;e.kgreenlandic=312;e.khabengali=2454;e.khacyrillic=1093;e.khadeva=2326;e.khagujarati=2710;e.khagurmukhi=2582;e.khaharabic=1582;e.khahfinalarabic=65190;e.khahinitialarabic=65191;e.khahmedialarabic=65192;e.kheicoptic=999;e.khhadeva=2393;e.khhagurmukhi=2649;e.khieukhacirclekorean=12920;e.khieukhaparenkorean=12824;e.khieukhcirclekorean=12906;e.khieukhkorean=12619;e.khieukhparenkorean=12810;e.khokhaithai=3586;e.khokhonthai=3589;e.khokhuatthai=3587;e.khokhwaithai=3588;e.khomutthai=3675;e.khook=409;e.khorakhangthai=3590;e.khzsquare=13201;e.kihiragana=12365;e.kikatakana=12461;e.kikatakanahalfwidth=65399;e.kiroguramusquare=13077;e.kiromeetorusquare=13078;e.kirosquare=13076;e.kiyeokacirclekorean=12910;e.kiyeokaparenkorean=12814;e.kiyeokcirclekorean=12896;e.kiyeokkorean=12593;e.kiyeokparenkorean=12800;e.kiyeoksioskorean=12595;e.kjecyrillic=1116;e.klinebelow=7733;e.klsquare=13208;e.kmcubedsquare=13222;e.kmonospace=65355;e.kmsquaredsquare=13218;e.kohiragana=12371;e.kohmsquare=13248;e.kokaithai=3585;e.kokatakana=12467;e.kokatakanahalfwidth=65402;e.kooposquare=13086;e.koppacyrillic=1153;e.koreanstandardsymbol=12927;e.koroniscmb=835;e.kparen=9382;e.kpasquare=13226;e.ksicyrillic=1135;e.ktsquare=13263;e.kturned=670;e.kuhiragana=12367;e.kukatakana=12463;e.kukatakanahalfwidth=65400;e.kvsquare=13240;e.kwsquare=13246;e.l=108;e.labengali=2482;e.lacute=314;e.ladeva=2354;e.lagujarati=2738;e.lagurmukhi=2610;e.lakkhangyaothai=3653;e.lamaleffinalarabic=65276;e.lamalefhamzaabovefinalarabic=65272;e.lamalefhamzaaboveisolatedarabic=65271;e.lamalefhamzabelowfinalarabic=65274;e.lamalefhamzabelowisolatedarabic=65273;e.lamalefisolatedarabic=65275;e.lamalefmaddaabovefinalarabic=65270;e.lamalefmaddaaboveisolatedarabic=65269;e.lamarabic=1604;e.lambda=955;e.lambdastroke=411;e.lamed=1500;e.lameddagesh=64316;e.lameddageshhebrew=64316;e.lamedhebrew=1500;e.lamfinalarabic=65246;e.lamhahinitialarabic=64714;e.laminitialarabic=65247;e.lamjeeminitialarabic=64713;e.lamkhahinitialarabic=64715;e.lamlamhehisolatedarabic=65010;e.lammedialarabic=65248;e.lammeemhahinitialarabic=64904;e.lammeeminitialarabic=64716;e.largecircle=9711;e.lbar=410;e.lbelt=620;e.lbopomofo=12556;e.lcaron=318;e.lcedilla=316;e.lcircle=9435;e.lcircumflexbelow=7741;e.lcommaaccent=316;e.ldot=320;e.ldotaccent=320;e.ldotbelow=7735;e.ldotbelowmacron=7737;e.leftangleabovecmb=794;e.lefttackbelowcmb=792;e.less=60;e.lessequal=8804;e.lessequalorgreater=8922;e.lessmonospace=65308;e.lessorequivalent=8818;e.lessorgreater=8822;e.lessoverequal=8806;e.lesssmall=65124;e.lezh=622;e.lfblock=9612;e.lhookretroflex=621;e.lira=8356;e.liwnarmenian=1388;e.lj=457;e.ljecyrillic=1113;e.ll=63168;e.lladeva=2355;e.llagujarati=2739;e.llinebelow=7739;e.llladeva=2356;e.llvocalicbengali=2529;e.llvocalicdeva=2401;e.llvocalicvowelsignbengali=2531;e.llvocalicvowelsigndeva=2403;e.lmiddletilde=619;e.lmonospace=65356;e.lmsquare=13264;e.lochulathai=3628;e.logicaland=8743;e.logicalnot=172;e.logicalnotreversed=8976;e.logicalor=8744;e.lolingthai=3621;e.longs=383;e.lowlinecenterline=65102;e.lowlinecmb=818;e.lowlinedashed=65101;e.lozenge=9674;e.lparen=9383;e.lslash=322;e.lsquare=8467;e.lsuperior=63214;e.ltshade=9617;e.luthai=3622;e.lvocalicbengali=2444;e.lvocalicdeva=2316;e.lvocalicvowelsignbengali=2530;e.lvocalicvowelsigndeva=2402;e.lxsquare=13267;e.m=109;e.mabengali=2478;e.macron=175;e.macronbelowcmb=817;e.macroncmb=772;e.macronlowmod=717;e.macronmonospace=65507;e.macute=7743;e.madeva=2350;e.magujarati=2734;e.magurmukhi=2606;e.mahapakhhebrew=1444;e.mahapakhlefthebrew=1444;e.mahiragana=12414;e.maichattawalowleftthai=63637;e.maichattawalowrightthai=63636;e.maichattawathai=3659;e.maichattawaupperleftthai=63635;e.maieklowleftthai=63628;e.maieklowrightthai=63627;e.maiekthai=3656;e.maiekupperleftthai=63626;e.maihanakatleftthai=63620;e.maihanakatthai=3633;e.maitaikhuleftthai=63625;e.maitaikhuthai=3655;e.maitholowleftthai=63631;e.maitholowrightthai=63630;e.maithothai=3657;e.maithoupperleftthai=63629;e.maitrilowleftthai=63634;e.maitrilowrightthai=63633;e.maitrithai=3658;e.maitriupperleftthai=63632;e.maiyamokthai=3654;e.makatakana=12510;e.makatakanahalfwidth=65423;e.male=9794;e.mansyonsquare=13127;e.maqafhebrew=1470;e.mars=9794;e.masoracirclehebrew=1455;e.masquare=13187;e.mbopomofo=12551;e.mbsquare=13268;e.mcircle=9436;e.mcubedsquare=13221;e.mdotaccent=7745;e.mdotbelow=7747;e.meemarabic=1605;e.meemfinalarabic=65250;e.meeminitialarabic=65251;e.meemmedialarabic=65252;e.meemmeeminitialarabic=64721;e.meemmeemisolatedarabic=64584;e.meetorusquare=13133;e.mehiragana=12417;e.meizierasquare=13182;e.mekatakana=12513;e.mekatakanahalfwidth=65426;e.mem=1502;e.memdagesh=64318;e.memdageshhebrew=64318;e.memhebrew=1502;e.menarmenian=1396;e.merkhahebrew=1445;e.merkhakefulahebrew=1446;e.merkhakefulalefthebrew=1446;e.merkhalefthebrew=1445;e.mhook=625;e.mhzsquare=13202;e.middledotkatakanahalfwidth=65381;e.middot=183;e.mieumacirclekorean=12914;e.mieumaparenkorean=12818;e.mieumcirclekorean=12900;e.mieumkorean=12609;e.mieumpansioskorean=12656;e.mieumparenkorean=12804;e.mieumpieupkorean=12654;e.mieumsioskorean=12655;e.mihiragana=12415;e.mikatakana=12511;e.mikatakanahalfwidth=65424;e.minus=8722;e.minusbelowcmb=800;e.minuscircle=8854;e.minusmod=727;e.minusplus=8723;e.minute=8242;e.miribaarusquare=13130;e.mirisquare=13129;e.mlonglegturned=624;e.mlsquare=13206;e.mmcubedsquare=13219;e.mmonospace=65357;e.mmsquaredsquare=13215;e.mohiragana=12418;e.mohmsquare=13249;e.mokatakana=12514;e.mokatakanahalfwidth=65427;e.molsquare=13270;e.momathai=3617;e.moverssquare=13223;e.moverssquaredsquare=13224;e.mparen=9384;e.mpasquare=13227;e.mssquare=13235;e.msuperior=63215;e.mturned=623;e.mu=181;e.mu1=181;e.muasquare=13186;e.muchgreater=8811;e.muchless=8810;e.mufsquare=13196;e.mugreek=956;e.mugsquare=13197;e.muhiragana=12416;e.mukatakana=12512;e.mukatakanahalfwidth=65425;e.mulsquare=13205;e.multiply=215;e.mumsquare=13211;e.munahhebrew=1443;e.munahlefthebrew=1443;e.musicalnote=9834;e.musicalnotedbl=9835;e.musicflatsign=9837;e.musicsharpsign=9839;e.mussquare=13234;e.muvsquare=13238;e.muwsquare=13244;e.mvmegasquare=13241;e.mvsquare=13239;e.mwmegasquare=13247;e.mwsquare=13245;e.n=110;e.nabengali=2472;e.nabla=8711;e.nacute=324;e.nadeva=2344;e.nagujarati=2728;e.nagurmukhi=2600;e.nahiragana=12394;e.nakatakana=12490;e.nakatakanahalfwidth=65413;e.napostrophe=329;e.nasquare=13185;e.nbopomofo=12555;e.nbspace=160;e.ncaron=328;e.ncedilla=326;e.ncircle=9437;e.ncircumflexbelow=7755;e.ncommaaccent=326;e.ndotaccent=7749;e.ndotbelow=7751;e.nehiragana=12397;e.nekatakana=12493;e.nekatakanahalfwidth=65416;e.newsheqelsign=8362;e.nfsquare=13195;e.ngabengali=2457;e.ngadeva=2329;e.ngagujarati=2713;e.ngagurmukhi=2585;e.ngonguthai=3591;e.nhiragana=12435;e.nhookleft=626;e.nhookretroflex=627;e.nieunacirclekorean=12911;e.nieunaparenkorean=12815;e.nieuncieuckorean=12597;e.nieuncirclekorean=12897;e.nieunhieuhkorean=12598;e.nieunkorean=12596;e.nieunpansioskorean=12648;e.nieunparenkorean=12801;e.nieunsioskorean=12647;e.nieuntikeutkorean=12646;e.nihiragana=12395;e.nikatakana=12491;e.nikatakanahalfwidth=65414;e.nikhahitleftthai=63641;e.nikhahitthai=3661;e.nine=57;e.ninearabic=1641;e.ninebengali=2543;e.ninecircle=9320;e.ninecircleinversesansserif=10130;e.ninedeva=2415;e.ninegujarati=2799;e.ninegurmukhi=2671;e.ninehackarabic=1641;e.ninehangzhou=12329;e.nineideographicparen=12840;e.nineinferior=8329;e.ninemonospace=65305;e.nineoldstyle=63289;e.nineparen=9340;e.nineperiod=9360;e.ninepersian=1785;e.nineroman=8568;e.ninesuperior=8313;e.nineteencircle=9330;e.nineteenparen=9350;e.nineteenperiod=9370;e.ninethai=3673;e.nj=460;e.njecyrillic=1114;e.nkatakana=12531;e.nkatakanahalfwidth=65437;e.nlegrightlong=414;e.nlinebelow=7753;e.nmonospace=65358;e.nmsquare=13210;e.nnabengali=2467;e.nnadeva=2339;e.nnagujarati=2723;e.nnagurmukhi=2595;e.nnnadeva=2345;e.nohiragana=12398;e.nokatakana=12494;e.nokatakanahalfwidth=65417;e.nonbreakingspace=160;e.nonenthai=3603;e.nonuthai=3609;e.noonarabic=1606;e.noonfinalarabic=65254;e.noonghunnaarabic=1722;e.noonghunnafinalarabic=64415;e.nooninitialarabic=65255;e.noonjeeminitialarabic=64722;e.noonjeemisolatedarabic=64587;e.noonmedialarabic=65256;e.noonmeeminitialarabic=64725;e.noonmeemisolatedarabic=64590;e.noonnoonfinalarabic=64653;e.notcontains=8716;e.notelement=8713;e.notelementof=8713;e.notequal=8800;e.notgreater=8815;e.notgreaternorequal=8817;e.notgreaternorless=8825;e.notidentical=8802;e.notless=8814;e.notlessnorequal=8816;e.notparallel=8742;e.notprecedes=8832;e.notsubset=8836;e.notsucceeds=8833;e.notsuperset=8837;e.nowarmenian=1398;e.nparen=9385;e.nssquare=13233;e.nsuperior=8319;e.ntilde=241;e.nu=957;e.nuhiragana=12396;e.nukatakana=12492;e.nukatakanahalfwidth=65415;e.nuktabengali=2492;e.nuktadeva=2364;e.nuktagujarati=2748;e.nuktagurmukhi=2620;e.numbersign=35;e.numbersignmonospace=65283;e.numbersignsmall=65119;e.numeralsigngreek=884;e.numeralsignlowergreek=885;e.numero=8470;e.nun=1504;e.nundagesh=64320;e.nundageshhebrew=64320;e.nunhebrew=1504;e.nvsquare=13237;e.nwsquare=13243;e.nyabengali=2462;e.nyadeva=2334;e.nyagujarati=2718;e.nyagurmukhi=2590;e.o=111;e.oacute=243;e.oangthai=3629;e.obarred=629;e.obarredcyrillic=1257;e.obarreddieresiscyrillic=1259;e.obengali=2451;e.obopomofo=12571;e.obreve=335;e.ocandradeva=2321;e.ocandragujarati=2705;e.ocandravowelsigndeva=2377;e.ocandravowelsigngujarati=2761;e.ocaron=466;e.ocircle=9438;e.ocircumflex=244;e.ocircumflexacute=7889;e.ocircumflexdotbelow=7897;e.ocircumflexgrave=7891;e.ocircumflexhookabove=7893;e.ocircumflextilde=7895;e.ocyrillic=1086;e.odblacute=337;e.odblgrave=525;e.odeva=2323;e.odieresis=246;e.odieresiscyrillic=1255;e.odotbelow=7885;e.oe=339;e.oekorean=12634;e.ogonek=731;e.ogonekcmb=808;e.ograve=242;e.ogujarati=2707;e.oharmenian=1413;e.ohiragana=12362;e.ohookabove=7887;e.ohorn=417;e.ohornacute=7899;e.ohorndotbelow=7907;e.ohorngrave=7901;e.ohornhookabove=7903;e.ohorntilde=7905;e.ohungarumlaut=337;e.oi=419;e.oinvertedbreve=527;e.okatakana=12458;e.okatakanahalfwidth=65397;e.okorean=12631;e.olehebrew=1451;e.omacron=333;e.omacronacute=7763;e.omacrongrave=7761;e.omdeva=2384;e.omega=969;e.omega1=982;e.omegacyrillic=1121;e.omegalatinclosed=631;e.omegaroundcyrillic=1147;e.omegatitlocyrillic=1149;e.omegatonos=974;e.omgujarati=2768;e.omicron=959;e.omicrontonos=972;e.omonospace=65359;e.one=49;e.onearabic=1633;e.onebengali=2535;e.onecircle=9312;e.onecircleinversesansserif=10122;e.onedeva=2407;e.onedotenleader=8228;e.oneeighth=8539;e.onefitted=63196;e.onegujarati=2791;e.onegurmukhi=2663;e.onehackarabic=1633;e.onehalf=189;e.onehangzhou=12321;e.oneideographicparen=12832;e.oneinferior=8321;e.onemonospace=65297;e.onenumeratorbengali=2548;e.oneoldstyle=63281;e.oneparen=9332;e.oneperiod=9352;e.onepersian=1777;e.onequarter=188;e.oneroman=8560;e.onesuperior=185;e.onethai=3665;e.onethird=8531;e.oogonek=491;e.oogonekmacron=493;e.oogurmukhi=2579;e.oomatragurmukhi=2635;e.oopen=596;e.oparen=9386;e.openbullet=9702;e.option=8997;e.ordfeminine=170;e.ordmasculine=186;e.orthogonal=8735;e.oshortdeva=2322;e.oshortvowelsigndeva=2378;e.oslash=248;e.oslashacute=511;e.osmallhiragana=12361;e.osmallkatakana=12457;e.osmallkatakanahalfwidth=65387;e.ostrokeacute=511;e.osuperior=63216;e.otcyrillic=1151;e.otilde=245;e.otildeacute=7757;e.otildedieresis=7759;e.oubopomofo=12577;e.overline=8254;e.overlinecenterline=65098;e.overlinecmb=773;e.overlinedashed=65097;e.overlinedblwavy=65100;e.overlinewavy=65099;e.overscore=175;e.ovowelsignbengali=2507;e.ovowelsigndeva=2379;e.ovowelsigngujarati=2763;e.p=112;e.paampssquare=13184;e.paasentosquare=13099;e.pabengali=2474;e.pacute=7765;e.padeva=2346;e.pagedown=8671;e.pageup=8670;e.pagujarati=2730;e.pagurmukhi=2602;e.pahiragana=12401;e.paiyannoithai=3631;e.pakatakana=12497;e.palatalizationcyrilliccmb=1156;e.palochkacyrillic=1216;e.pansioskorean=12671;e.paragraph=182;e.parallel=8741;e.parenleft=40;e.parenleftaltonearabic=64830;e.parenleftbt=63725;e.parenleftex=63724;e.parenleftinferior=8333;e.parenleftmonospace=65288;e.parenleftsmall=65113;e.parenleftsuperior=8317;e.parenlefttp=63723;e.parenleftvertical=65077;e.parenright=41;e.parenrightaltonearabic=64831;e.parenrightbt=63736;e.parenrightex=63735;e.parenrightinferior=8334;e.parenrightmonospace=65289;e.parenrightsmall=65114;e.parenrightsuperior=8318;e.parenrighttp=63734;e.parenrightvertical=65078;e.partialdiff=8706;e.paseqhebrew=1472;e.pashtahebrew=1433;e.pasquare=13225;e.patah=1463;e.patah11=1463;e.patah1d=1463;e.patah2a=1463;e.patahhebrew=1463;e.patahnarrowhebrew=1463;e.patahquarterhebrew=1463;e.patahwidehebrew=1463;e.pazerhebrew=1441;e.pbopomofo=12550;e.pcircle=9439;e.pdotaccent=7767;e.pe=1508;e.pecyrillic=1087;e.pedagesh=64324;e.pedageshhebrew=64324;e.peezisquare=13115;e.pefinaldageshhebrew=64323;e.peharabic=1662;e.peharmenian=1402;e.pehebrew=1508;e.pehfinalarabic=64343;e.pehinitialarabic=64344;e.pehiragana=12410;e.pehmedialarabic=64345;e.pekatakana=12506;e.pemiddlehookcyrillic=1191;e.perafehebrew=64334;e.percent=37;e.percentarabic=1642;e.percentmonospace=65285;e.percentsmall=65130;e.period=46;e.periodarmenian=1417;e.periodcentered=183;e.periodhalfwidth=65377;e.periodinferior=63207;e.periodmonospace=65294;e.periodsmall=65106;e.periodsuperior=63208;e.perispomenigreekcmb=834;e.perpendicular=8869;e.perthousand=8240;e.peseta=8359;e.pfsquare=13194;e.phabengali=2475;e.phadeva=2347;e.phagujarati=2731;e.phagurmukhi=2603;e.phi=966;e.phi1=981;e.phieuphacirclekorean=12922;e.phieuphaparenkorean=12826;e.phieuphcirclekorean=12908;e.phieuphkorean=12621;e.phieuphparenkorean=12812;e.philatin=632;e.phinthuthai=3642;e.phisymbolgreek=981;e.phook=421;e.phophanthai=3614;e.phophungthai=3612;e.phosamphaothai=3616;e.pi=960;e.pieupacirclekorean=12915;e.pieupaparenkorean=12819;e.pieupcieuckorean=12662;e.pieupcirclekorean=12901;e.pieupkiyeokkorean=12658;e.pieupkorean=12610;e.pieupparenkorean=12805;e.pieupsioskiyeokkorean=12660;e.pieupsioskorean=12612;e.pieupsiostikeutkorean=12661;e.pieupthieuthkorean=12663;e.pieuptikeutkorean=12659;e.pihiragana=12404;e.pikatakana=12500;e.pisymbolgreek=982;e.piwrarmenian=1411;e.planckover2pi=8463;e.planckover2pi1=8463;e.plus=43;e.plusbelowcmb=799;e.pluscircle=8853;e.plusminus=177;e.plusmod=726;e.plusmonospace=65291;e.plussmall=65122;e.plussuperior=8314;e.pmonospace=65360;e.pmsquare=13272;e.pohiragana=12413;e.pointingindexdownwhite=9759;e.pointingindexleftwhite=9756;e.pointingindexrightwhite=9758;e.pointingindexupwhite=9757;e.pokatakana=12509;e.poplathai=3611;e.postalmark=12306;e.postalmarkface=12320;e.pparen=9387;e.precedes=8826;e.prescription=8478;e.primemod=697;e.primereversed=8245;e.product=8719;e.projective=8965;e.prolongedkana=12540;e.propellor=8984;e.propersubset=8834;e.propersuperset=8835;e.proportion=8759;e.proportional=8733;e.psi=968;e.psicyrillic=1137;e.psilipneumatacyrilliccmb=1158;e.pssquare=13232;e.puhiragana=12407;e.pukatakana=12503;e.pvsquare=13236;e.pwsquare=13242;e.q=113;e.qadeva=2392;e.qadmahebrew=1448;e.qafarabic=1602;e.qaffinalarabic=65238;e.qafinitialarabic=65239;e.qafmedialarabic=65240;e.qamats=1464;e.qamats10=1464;e.qamats1a=1464;e.qamats1c=1464;e.qamats27=1464;e.qamats29=1464;e.qamats33=1464;e.qamatsde=1464;e.qamatshebrew=1464;e.qamatsnarrowhebrew=1464;e.qamatsqatanhebrew=1464;e.qamatsqatannarrowhebrew=1464;e.qamatsqatanquarterhebrew=1464;e.qamatsqatanwidehebrew=1464;e.qamatsquarterhebrew=1464;e.qamatswidehebrew=1464;e.qarneyparahebrew=1439;e.qbopomofo=12561;e.qcircle=9440;e.qhook=672;e.qmonospace=65361;e.qof=1511;e.qofdagesh=64327;e.qofdageshhebrew=64327;e.qofhebrew=1511;e.qparen=9388;e.quarternote=9833;e.qubuts=1467;e.qubuts18=1467;e.qubuts25=1467;e.qubuts31=1467;e.qubutshebrew=1467;e.qubutsnarrowhebrew=1467;e.qubutsquarterhebrew=1467;e.qubutswidehebrew=1467;e.question=63;e.questionarabic=1567;e.questionarmenian=1374;e.questiondown=191;e.questiondownsmall=63423;e.questiongreek=894;e.questionmonospace=65311;e.questionsmall=63295;e.quotedbl=34;e.quotedblbase=8222;e.quotedblleft=8220;e.quotedblmonospace=65282;e.quotedblprime=12318;e.quotedblprimereversed=12317;e.quotedblright=8221;e.quoteleft=8216;e.quoteleftreversed=8219;e.quotereversed=8219;e.quoteright=8217;e.quoterightn=329;e.quotesinglbase=8218;e.quotesingle=39;e.quotesinglemonospace=65287;e.r=114;e.raarmenian=1404;e.rabengali=2480;e.racute=341;e.radeva=2352;e.radical=8730;e.radicalex=63717;e.radoverssquare=13230;e.radoverssquaredsquare=13231;e.radsquare=13229;e.rafe=1471;e.rafehebrew=1471;e.ragujarati=2736;e.ragurmukhi=2608;e.rahiragana=12425;e.rakatakana=12521;e.rakatakanahalfwidth=65431;e.ralowerdiagonalbengali=2545;e.ramiddlediagonalbengali=2544;e.ramshorn=612;e.ratio=8758;e.rbopomofo=12566;e.rcaron=345;e.rcedilla=343;e.rcircle=9441;e.rcommaaccent=343;e.rdblgrave=529;e.rdotaccent=7769;e.rdotbelow=7771;e.rdotbelowmacron=7773;e.referencemark=8251;e.reflexsubset=8838;e.reflexsuperset=8839;e.registered=174;e.registersans=63720;e.registerserif=63194;e.reharabic=1585;e.reharmenian=1408;e.rehfinalarabic=65198;e.rehiragana=12428;e.rekatakana=12524;e.rekatakanahalfwidth=65434;e.resh=1512;e.reshdageshhebrew=64328;e.reshhebrew=1512;e.reversedtilde=8765;e.reviahebrew=1431;e.reviamugrashhebrew=1431;e.revlogicalnot=8976;e.rfishhook=638;e.rfishhookreversed=639;e.rhabengali=2525;e.rhadeva=2397;e.rho=961;e.rhook=637;e.rhookturned=635;e.rhookturnedsuperior=693;e.rhosymbolgreek=1009;e.rhotichookmod=734;e.rieulacirclekorean=12913;e.rieulaparenkorean=12817;e.rieulcirclekorean=12899;e.rieulhieuhkorean=12608;e.rieulkiyeokkorean=12602;e.rieulkiyeoksioskorean=12649;e.rieulkorean=12601;e.rieulmieumkorean=12603;e.rieulpansioskorean=12652;e.rieulparenkorean=12803;e.rieulphieuphkorean=12607;e.rieulpieupkorean=12604;e.rieulpieupsioskorean=12651;e.rieulsioskorean=12605;e.rieulthieuthkorean=12606;e.rieultikeutkorean=12650;e.rieulyeorinhieuhkorean=12653;e.rightangle=8735;e.righttackbelowcmb=793;e.righttriangle=8895;e.rihiragana=12426;e.rikatakana=12522;e.rikatakanahalfwidth=65432;e.ring=730;e.ringbelowcmb=805;e.ringcmb=778;e.ringhalfleft=703;e.ringhalfleftarmenian=1369;e.ringhalfleftbelowcmb=796;e.ringhalfleftcentered=723;e.ringhalfright=702;e.ringhalfrightbelowcmb=825;e.ringhalfrightcentered=722;e.rinvertedbreve=531;e.rittorusquare=13137;e.rlinebelow=7775;e.rlongleg=636;e.rlonglegturned=634;e.rmonospace=65362;e.rohiragana=12429;e.rokatakana=12525;e.rokatakanahalfwidth=65435;e.roruathai=3619;e.rparen=9389;e.rrabengali=2524;e.rradeva=2353;e.rragurmukhi=2652;e.rreharabic=1681;e.rrehfinalarabic=64397;e.rrvocalicbengali=2528;e.rrvocalicdeva=2400;e.rrvocalicgujarati=2784;e.rrvocalicvowelsignbengali=2500;e.rrvocalicvowelsigndeva=2372;e.rrvocalicvowelsigngujarati=2756;e.rsuperior=63217;e.rtblock=9616;e.rturned=633;e.rturnedsuperior=692;e.ruhiragana=12427;e.rukatakana=12523;e.rukatakanahalfwidth=65433;e.rupeemarkbengali=2546;e.rupeesignbengali=2547;e.rupiah=63197;e.ruthai=3620;e.rvocalicbengali=2443;e.rvocalicdeva=2315;e.rvocalicgujarati=2699;e.rvocalicvowelsignbengali=2499;e.rvocalicvowelsigndeva=2371;e.rvocalicvowelsigngujarati=2755;e.s=115;e.sabengali=2488;e.sacute=347;e.sacutedotaccent=7781;e.sadarabic=1589;e.sadeva=2360;e.sadfinalarabic=65210;e.sadinitialarabic=65211;e.sadmedialarabic=65212;e.sagujarati=2744;e.sagurmukhi=2616;e.sahiragana=12373;e.sakatakana=12469;e.sakatakanahalfwidth=65403;e.sallallahoualayhewasallamarabic=65018;e.samekh=1505;e.samekhdagesh=64321;e.samekhdageshhebrew=64321;e.samekhhebrew=1505;e.saraaathai=3634;e.saraaethai=3649;e.saraaimaimalaithai=3652;e.saraaimaimuanthai=3651;e.saraamthai=3635;e.saraathai=3632;e.saraethai=3648;e.saraiileftthai=63622;e.saraiithai=3637;e.saraileftthai=63621;e.saraithai=3636;e.saraothai=3650;e.saraueeleftthai=63624;e.saraueethai=3639;e.saraueleftthai=63623;e.sarauethai=3638;e.sarauthai=3640;e.sarauuthai=3641;e.sbopomofo=12569;e.scaron=353;e.scarondotaccent=7783;e.scedilla=351;e.schwa=601;e.schwacyrillic=1241;e.schwadieresiscyrillic=1243;e.schwahook=602;e.scircle=9442;e.scircumflex=349;e.scommaaccent=537;e.sdotaccent=7777;e.sdotbelow=7779;e.sdotbelowdotaccent=7785;e.seagullbelowcmb=828;e.second=8243;e.secondtonechinese=714;e.section=167;e.seenarabic=1587;e.seenfinalarabic=65202;e.seeninitialarabic=65203;e.seenmedialarabic=65204;e.segol=1462;e.segol13=1462;e.segol1f=1462;e.segol2c=1462;e.segolhebrew=1462;e.segolnarrowhebrew=1462;e.segolquarterhebrew=1462;e.segoltahebrew=1426;e.segolwidehebrew=1462;e.seharmenian=1405;e.sehiragana=12379;e.sekatakana=12475;e.sekatakanahalfwidth=65406;e.semicolon=59;e.semicolonarabic=1563;e.semicolonmonospace=65307;e.semicolonsmall=65108;e.semivoicedmarkkana=12444;e.semivoicedmarkkanahalfwidth=65439;e.sentisquare=13090;e.sentosquare=13091;e.seven=55;e.sevenarabic=1639;e.sevenbengali=2541;e.sevencircle=9318;e.sevencircleinversesansserif=10128;e.sevendeva=2413;e.seveneighths=8542;e.sevengujarati=2797;e.sevengurmukhi=2669;e.sevenhackarabic=1639;e.sevenhangzhou=12327;e.sevenideographicparen=12838;e.seveninferior=8327;e.sevenmonospace=65303;e.sevenoldstyle=63287;e.sevenparen=9338;e.sevenperiod=9358;e.sevenpersian=1783;e.sevenroman=8566;e.sevensuperior=8311;e.seventeencircle=9328;e.seventeenparen=9348;e.seventeenperiod=9368;e.seventhai=3671;e.sfthyphen=173;e.shaarmenian=1399;e.shabengali=2486;e.shacyrillic=1096;e.shaddaarabic=1617;e.shaddadammaarabic=64609;e.shaddadammatanarabic=64606;e.shaddafathaarabic=64608;e.shaddakasraarabic=64610;e.shaddakasratanarabic=64607;e.shade=9618;e.shadedark=9619;e.shadelight=9617;e.shademedium=9618;e.shadeva=2358;e.shagujarati=2742;e.shagurmukhi=2614;e.shalshelethebrew=1427;e.shbopomofo=12565;e.shchacyrillic=1097;e.sheenarabic=1588;e.sheenfinalarabic=65206;e.sheeninitialarabic=65207;e.sheenmedialarabic=65208;e.sheicoptic=995;e.sheqel=8362;e.sheqelhebrew=8362;e.sheva=1456;e.sheva115=1456;e.sheva15=1456;e.sheva22=1456;e.sheva2e=1456;e.shevahebrew=1456;e.shevanarrowhebrew=1456;e.shevaquarterhebrew=1456;e.shevawidehebrew=1456;e.shhacyrillic=1211;e.shimacoptic=1005;e.shin=1513;e.shindagesh=64329;e.shindageshhebrew=64329;e.shindageshshindot=64300;e.shindageshshindothebrew=64300;e.shindageshsindot=64301;e.shindageshsindothebrew=64301;e.shindothebrew=1473;e.shinhebrew=1513;e.shinshindot=64298;e.shinshindothebrew=64298;e.shinsindot=64299;e.shinsindothebrew=64299;e.shook=642;e.sigma=963;e.sigma1=962;e.sigmafinal=962;e.sigmalunatesymbolgreek=1010;e.sihiragana=12375;e.sikatakana=12471;e.sikatakanahalfwidth=65404;e.siluqhebrew=1469;e.siluqlefthebrew=1469;e.similar=8764;e.sindothebrew=1474;e.siosacirclekorean=12916;e.siosaparenkorean=12820;e.sioscieuckorean=12670;e.sioscirclekorean=12902;e.sioskiyeokkorean=12666;e.sioskorean=12613;e.siosnieunkorean=12667;e.siosparenkorean=12806;e.siospieupkorean=12669;e.siostikeutkorean=12668;e.six=54;e.sixarabic=1638;e.sixbengali=2540;e.sixcircle=9317;e.sixcircleinversesansserif=10127;e.sixdeva=2412;e.sixgujarati=2796;e.sixgurmukhi=2668;e.sixhackarabic=1638;e.sixhangzhou=12326;e.sixideographicparen=12837;e.sixinferior=8326;e.sixmonospace=65302;e.sixoldstyle=63286;e.sixparen=9337;e.sixperiod=9357;e.sixpersian=1782;e.sixroman=8565;e.sixsuperior=8310;e.sixteencircle=9327;e.sixteencurrencydenominatorbengali=2553;e.sixteenparen=9347;e.sixteenperiod=9367;e.sixthai=3670;e.slash=47;e.slashmonospace=65295;e.slong=383;e.slongdotaccent=7835;e.smileface=9786;e.smonospace=65363;e.sofpasuqhebrew=1475;e.softhyphen=173;e.softsigncyrillic=1100;e.sohiragana=12381;e.sokatakana=12477;e.sokatakanahalfwidth=65407;e.soliduslongoverlaycmb=824;e.solidusshortoverlaycmb=823;e.sorusithai=3625;e.sosalathai=3624;e.sosothai=3595;e.sosuathai=3626;e.space=32;e.spacehackarabic=32;e.spade=9824;e.spadesuitblack=9824;e.spadesuitwhite=9828;e.sparen=9390;e.squarebelowcmb=827;e.squarecc=13252;e.squarecm=13213;e.squarediagonalcrosshatchfill=9641;e.squarehorizontalfill=9636;e.squarekg=13199;e.squarekm=13214;e.squarekmcapital=13262;e.squareln=13265;e.squarelog=13266;e.squaremg=13198;e.squaremil=13269;e.squaremm=13212;e.squaremsquared=13217;e.squareorthogonalcrosshatchfill=9638;e.squareupperlefttolowerrightfill=9639;e.squareupperrighttolowerleftfill=9640;e.squareverticalfill=9637;e.squarewhitewithsmallblack=9635;e.srsquare=13275;e.ssabengali=2487;e.ssadeva=2359;e.ssagujarati=2743;e.ssangcieuckorean=12617;e.ssanghieuhkorean=12677;e.ssangieungkorean=12672;e.ssangkiyeokkorean=12594;e.ssangnieunkorean=12645;e.ssangpieupkorean=12611;e.ssangsioskorean=12614;e.ssangtikeutkorean=12600;e.ssuperior=63218;e.sterling=163;e.sterlingmonospace=65505;e.strokelongoverlaycmb=822;e.strokeshortoverlaycmb=821;e.subset=8834;e.subsetnotequal=8842;e.subsetorequal=8838;e.succeeds=8827;e.suchthat=8715;e.suhiragana=12377;e.sukatakana=12473;e.sukatakanahalfwidth=65405;e.sukunarabic=1618;e.summation=8721;e.sun=9788;e.superset=8835;e.supersetnotequal=8843;e.supersetorequal=8839;e.svsquare=13276;e.syouwaerasquare=13180;e.t=116;e.tabengali=2468;e.tackdown=8868;e.tackleft=8867;e.tadeva=2340;e.tagujarati=2724;e.tagurmukhi=2596;e.taharabic=1591;e.tahfinalarabic=65218;e.tahinitialarabic=65219;e.tahiragana=12383;e.tahmedialarabic=65220;e.taisyouerasquare=13181;e.takatakana=12479;e.takatakanahalfwidth=65408;e.tatweelarabic=1600;e.tau=964;e.tav=1514;e.tavdages=64330;e.tavdagesh=64330;e.tavdageshhebrew=64330;e.tavhebrew=1514;e.tbar=359;e.tbopomofo=12554;e.tcaron=357;e.tccurl=680;e.tcedilla=355;e.tcheharabic=1670;e.tchehfinalarabic=64379;e.tchehinitialarabic=64380;e.tchehmedialarabic=64381;e.tcircle=9443;e.tcircumflexbelow=7793;e.tcommaaccent=355;e.tdieresis=7831;e.tdotaccent=7787;e.tdotbelow=7789;e.tecyrillic=1090;e.tedescendercyrillic=1197;e.teharabic=1578;e.tehfinalarabic=65174;e.tehhahinitialarabic=64674;e.tehhahisolatedarabic=64524;e.tehinitialarabic=65175;e.tehiragana=12390;e.tehjeeminitialarabic=64673;e.tehjeemisolatedarabic=64523;e.tehmarbutaarabic=1577;e.tehmarbutafinalarabic=65172;e.tehmedialarabic=65176;e.tehmeeminitialarabic=64676;e.tehmeemisolatedarabic=64526;e.tehnoonfinalarabic=64627;e.tekatakana=12486;e.tekatakanahalfwidth=65411;e.telephone=8481;e.telephoneblack=9742;e.telishagedolahebrew=1440;e.telishaqetanahebrew=1449;e.tencircle=9321;e.tenideographicparen=12841;e.tenparen=9341;e.tenperiod=9361;e.tenroman=8569;e.tesh=679;e.tet=1496;e.tetdagesh=64312;e.tetdageshhebrew=64312;e.tethebrew=1496;e.tetsecyrillic=1205;e.tevirhebrew=1435;e.tevirlefthebrew=1435;e.thabengali=2469;e.thadeva=2341;e.thagujarati=2725;e.thagurmukhi=2597;e.thalarabic=1584;e.thalfinalarabic=65196;e.thanthakhatlowleftthai=63640;e.thanthakhatlowrightthai=63639;e.thanthakhatthai=3660;e.thanthakhatupperleftthai=63638;e.theharabic=1579;e.thehfinalarabic=65178;e.thehinitialarabic=65179;e.thehmedialarabic=65180;e.thereexists=8707;e.therefore=8756;e.theta=952;e.theta1=977;e.thetasymbolgreek=977;e.thieuthacirclekorean=12921;e.thieuthaparenkorean=12825;e.thieuthcirclekorean=12907;e.thieuthkorean=12620;e.thieuthparenkorean=12811;e.thirteencircle=9324;e.thirteenparen=9344;e.thirteenperiod=9364;e.thonangmonthothai=3601;e.thook=429;e.thophuthaothai=3602;e.thorn=254;e.thothahanthai=3607;e.thothanthai=3600;e.thothongthai=3608;e.thothungthai=3606;e.thousandcyrillic=1154;e.thousandsseparatorarabic=1644;e.thousandsseparatorpersian=1644;e.three=51;e.threearabic=1635;e.threebengali=2537;e.threecircle=9314;e.threecircleinversesansserif=10124;e.threedeva=2409;e.threeeighths=8540;e.threegujarati=2793;e.threegurmukhi=2665;e.threehackarabic=1635;e.threehangzhou=12323;e.threeideographicparen=12834;e.threeinferior=8323;e.threemonospace=65299;e.threenumeratorbengali=2550;e.threeoldstyle=63283;e.threeparen=9334;e.threeperiod=9354;e.threepersian=1779;e.threequarters=190;e.threequartersemdash=63198;e.threeroman=8562;e.threesuperior=179;e.threethai=3667;e.thzsquare=13204;e.tihiragana=12385;e.tikatakana=12481;e.tikatakanahalfwidth=65409;e.tikeutacirclekorean=12912;e.tikeutaparenkorean=12816;e.tikeutcirclekorean=12898;e.tikeutkorean=12599;e.tikeutparenkorean=12802;e.tilde=732;e.tildebelowcmb=816;e.tildecmb=771;e.tildecomb=771;e.tildedoublecmb=864;e.tildeoperator=8764;e.tildeoverlaycmb=820;e.tildeverticalcmb=830;e.timescircle=8855;e.tipehahebrew=1430;e.tipehalefthebrew=1430;e.tippigurmukhi=2672;e.titlocyrilliccmb=1155;e.tiwnarmenian=1407;e.tlinebelow=7791;e.tmonospace=65364;e.toarmenian=1385;e.tohiragana=12392;e.tokatakana=12488;e.tokatakanahalfwidth=65412;e.tonebarextrahighmod=741;e.tonebarextralowmod=745;e.tonebarhighmod=742;e.tonebarlowmod=744;e.tonebarmidmod=743;e.tonefive=445;e.tonesix=389;e.tonetwo=424;e.tonos=900;e.tonsquare=13095;e.topatakthai=3599;e.tortoiseshellbracketleft=12308;e.tortoiseshellbracketleftsmall=65117;e.tortoiseshellbracketleftvertical=65081;e.tortoiseshellbracketright=12309;e.tortoiseshellbracketrightsmall=65118;e.tortoiseshellbracketrightvertical=65082;e.totaothai=3605;e.tpalatalhook=427;e.tparen=9391;e.trademark=8482;e.trademarksans=63722;e.trademarkserif=63195;e.tretroflexhook=648;e.triagdn=9660;e.triaglf=9668;e.triagrt=9658;e.triagup=9650;e.ts=678;e.tsadi=1510;e.tsadidagesh=64326;e.tsadidageshhebrew=64326;e.tsadihebrew=1510;e.tsecyrillic=1094;e.tsere=1461;e.tsere12=1461;e.tsere1e=1461;e.tsere2b=1461;e.tserehebrew=1461;e.tserenarrowhebrew=1461;e.tserequarterhebrew=1461;e.tserewidehebrew=1461;e.tshecyrillic=1115;e.tsuperior=63219;e.ttabengali=2463;e.ttadeva=2335;e.ttagujarati=2719;e.ttagurmukhi=2591;e.tteharabic=1657;e.ttehfinalarabic=64359;e.ttehinitialarabic=64360;e.ttehmedialarabic=64361;e.tthabengali=2464;e.tthadeva=2336;e.tthagujarati=2720;e.tthagurmukhi=2592;e.tturned=647;e.tuhiragana=12388;e.tukatakana=12484;e.tukatakanahalfwidth=65410;e.tusmallhiragana=12387;e.tusmallkatakana=12483;e.tusmallkatakanahalfwidth=65391;e.twelvecircle=9323;e.twelveparen=9343;e.twelveperiod=9363;e.twelveroman=8571;e.twentycircle=9331;e.twentyhangzhou=21316;e.twentyparen=9351;e.twentyperiod=9371;e.two=50;e.twoarabic=1634;e.twobengali=2536;e.twocircle=9313;e.twocircleinversesansserif=10123;e.twodeva=2408;e.twodotenleader=8229;e.twodotleader=8229;e.twodotleadervertical=65072;e.twogujarati=2792;e.twogurmukhi=2664;e.twohackarabic=1634;e.twohangzhou=12322;e.twoideographicparen=12833;e.twoinferior=8322;e.twomonospace=65298;e.twonumeratorbengali=2549;e.twooldstyle=63282;e.twoparen=9333;e.twoperiod=9353;e.twopersian=1778;e.tworoman=8561;e.twostroke=443;e.twosuperior=178;e.twothai=3666;e.twothirds=8532;e.u=117;e.uacute=250;e.ubar=649;e.ubengali=2441;e.ubopomofo=12584;e.ubreve=365;e.ucaron=468;e.ucircle=9444;e.ucircumflex=251;e.ucircumflexbelow=7799;e.ucyrillic=1091;e.udattadeva=2385;e.udblacute=369;e.udblgrave=533;e.udeva=2313;e.udieresis=252;e.udieresisacute=472;e.udieresisbelow=7795;e.udieresiscaron=474;e.udieresiscyrillic=1265;e.udieresisgrave=476;e.udieresismacron=470;e.udotbelow=7909;e.ugrave=249;e.ugujarati=2697;e.ugurmukhi=2569;e.uhiragana=12358;e.uhookabove=7911;e.uhorn=432;e.uhornacute=7913;e.uhorndotbelow=7921;e.uhorngrave=7915;e.uhornhookabove=7917;e.uhorntilde=7919;e.uhungarumlaut=369;e.uhungarumlautcyrillic=1267;e.uinvertedbreve=535;e.ukatakana=12454;e.ukatakanahalfwidth=65395;e.ukcyrillic=1145;e.ukorean=12636;e.umacron=363;e.umacroncyrillic=1263;e.umacrondieresis=7803;e.umatragurmukhi=2625;e.umonospace=65365;e.underscore=95;e.underscoredbl=8215;e.underscoremonospace=65343;e.underscorevertical=65075;e.underscorewavy=65103;e.union=8746;e.universal=8704;e.uogonek=371;e.uparen=9392;e.upblock=9600;e.upperdothebrew=1476;e.upsilon=965;e.upsilondieresis=971;e.upsilondieresistonos=944;e.upsilonlatin=650;e.upsilontonos=973;e.uptackbelowcmb=797;e.uptackmod=724;e.uragurmukhi=2675;e.uring=367;e.ushortcyrillic=1118;e.usmallhiragana=12357;e.usmallkatakana=12453;e.usmallkatakanahalfwidth=65385;e.ustraightcyrillic=1199;e.ustraightstrokecyrillic=1201;e.utilde=361;e.utildeacute=7801;e.utildebelow=7797;e.uubengali=2442;e.uudeva=2314;e.uugujarati=2698;e.uugurmukhi=2570;e.uumatragurmukhi=2626;e.uuvowelsignbengali=2498;e.uuvowelsigndeva=2370;e.uuvowelsigngujarati=2754;e.uvowelsignbengali=2497;e.uvowelsigndeva=2369;e.uvowelsigngujarati=2753;e.v=118;e.vadeva=2357;e.vagujarati=2741;e.vagurmukhi=2613;e.vakatakana=12535;e.vav=1493;e.vavdagesh=64309;e.vavdagesh65=64309;e.vavdageshhebrew=64309;e.vavhebrew=1493;e.vavholam=64331;e.vavholamhebrew=64331;e.vavvavhebrew=1520;e.vavyodhebrew=1521;e.vcircle=9445;e.vdotbelow=7807;e.vecyrillic=1074;e.veharabic=1700;e.vehfinalarabic=64363;e.vehinitialarabic=64364;e.vehmedialarabic=64365;e.vekatakana=12537;e.venus=9792;e.verticalbar=124;e.verticallineabovecmb=781;e.verticallinebelowcmb=809;e.verticallinelowmod=716;e.verticallinemod=712;e.vewarmenian=1406;e.vhook=651;e.vikatakana=12536;e.viramabengali=2509;e.viramadeva=2381;e.viramagujarati=2765;e.visargabengali=2435;e.visargadeva=2307;e.visargagujarati=2691;e.vmonospace=65366;e.voarmenian=1400;e.voicediterationhiragana=12446;e.voicediterationkatakana=12542;e.voicedmarkkana=12443;e.voicedmarkkanahalfwidth=65438;e.vokatakana=12538;e.vparen=9393;e.vtilde=7805;e.vturned=652;e.vuhiragana=12436;e.vukatakana=12532;e.w=119;e.wacute=7811;e.waekorean=12633;e.wahiragana=12431;e.wakatakana=12527;e.wakatakanahalfwidth=65436;e.wakorean=12632;e.wasmallhiragana=12430;e.wasmallkatakana=12526;e.wattosquare=13143;e.wavedash=12316;e.wavyunderscorevertical=65076;e.wawarabic=1608;e.wawfinalarabic=65262;e.wawhamzaabovearabic=1572;e.wawhamzaabovefinalarabic=65158;e.wbsquare=13277;e.wcircle=9446;e.wcircumflex=373;e.wdieresis=7813;e.wdotaccent=7815;e.wdotbelow=7817;e.wehiragana=12433;e.weierstrass=8472;e.wekatakana=12529;e.wekorean=12638;e.weokorean=12637;e.wgrave=7809;e.whitebullet=9702;e.whitecircle=9675;e.whitecircleinverse=9689;e.whitecornerbracketleft=12302;e.whitecornerbracketleftvertical=65091;e.whitecornerbracketright=12303;e.whitecornerbracketrightvertical=65092;e.whitediamond=9671;e.whitediamondcontainingblacksmalldiamond=9672;e.whitedownpointingsmalltriangle=9663;e.whitedownpointingtriangle=9661;e.whiteleftpointingsmalltriangle=9667;e.whiteleftpointingtriangle=9665;e.whitelenticularbracketleft=12310;e.whitelenticularbracketright=12311;e.whiterightpointingsmalltriangle=9657;e.whiterightpointingtriangle=9655;e.whitesmallsquare=9643;e.whitesmilingface=9786;e.whitesquare=9633;e.whitestar=9734;e.whitetelephone=9743;e.whitetortoiseshellbracketleft=12312;e.whitetortoiseshellbracketright=12313;e.whiteuppointingsmalltriangle=9653;e.whiteuppointingtriangle=9651;e.wihiragana=12432;e.wikatakana=12528;e.wikorean=12639;e.wmonospace=65367;e.wohiragana=12434;e.wokatakana=12530;e.wokatakanahalfwidth=65382;e.won=8361;e.wonmonospace=65510;e.wowaenthai=3623;e.wparen=9394;e.wring=7832;e.wsuperior=695;e.wturned=653;e.wynn=447;e.x=120;e.xabovecmb=829;e.xbopomofo=12562;e.xcircle=9447;e.xdieresis=7821;e.xdotaccent=7819;e.xeharmenian=1389;e.xi=958;e.xmonospace=65368;e.xparen=9395;e.xsuperior=739;e.y=121;e.yaadosquare=13134;e.yabengali=2479;e.yacute=253;e.yadeva=2351;e.yaekorean=12626;e.yagujarati=2735;e.yagurmukhi=2607;e.yahiragana=12420;e.yakatakana=12516;e.yakatakanahalfwidth=65428;e.yakorean=12625;e.yamakkanthai=3662;e.yasmallhiragana=12419;e.yasmallkatakana=12515;e.yasmallkatakanahalfwidth=65388;e.yatcyrillic=1123;e.ycircle=9448;e.ycircumflex=375;e.ydieresis=255;e.ydotaccent=7823;e.ydotbelow=7925;e.yeharabic=1610;e.yehbarreearabic=1746;e.yehbarreefinalarabic=64431;e.yehfinalarabic=65266;e.yehhamzaabovearabic=1574;e.yehhamzaabovefinalarabic=65162;e.yehhamzaaboveinitialarabic=65163;e.yehhamzaabovemedialarabic=65164;e.yehinitialarabic=65267;e.yehmedialarabic=65268;e.yehmeeminitialarabic=64733;e.yehmeemisolatedarabic=64600;e.yehnoonfinalarabic=64660;e.yehthreedotsbelowarabic=1745;e.yekorean=12630;e.yen=165;e.yenmonospace=65509;e.yeokorean=12629;e.yeorinhieuhkorean=12678;e.yerahbenyomohebrew=1450;e.yerahbenyomolefthebrew=1450;e.yericyrillic=1099;e.yerudieresiscyrillic=1273;e.yesieungkorean=12673;e.yesieungpansioskorean=12675;e.yesieungsioskorean=12674;e.yetivhebrew=1434;e.ygrave=7923;e.yhook=436;e.yhookabove=7927;e.yiarmenian=1397;e.yicyrillic=1111;e.yikorean=12642;e.yinyang=9775;e.yiwnarmenian=1410;e.ymonospace=65369;e.yod=1497;e.yoddagesh=64313;e.yoddageshhebrew=64313;e.yodhebrew=1497;e.yodyodhebrew=1522;e.yodyodpatahhebrew=64287;e.yohiragana=12424;e.yoikorean=12681;e.yokatakana=12520;e.yokatakanahalfwidth=65430;e.yokorean=12635;e.yosmallhiragana=12423;e.yosmallkatakana=12519;e.yosmallkatakanahalfwidth=65390;e.yotgreek=1011;e.yoyaekorean=12680;e.yoyakorean=12679;e.yoyakthai=3618;e.yoyingthai=3597;e.yparen=9396;e.ypogegrammeni=890;e.ypogegrammenigreekcmb=837;e.yr=422;e.yring=7833;e.ysuperior=696;e.ytilde=7929;e.yturned=654;e.yuhiragana=12422;e.yuikorean=12684;e.yukatakana=12518;e.yukatakanahalfwidth=65429;e.yukorean=12640;e.yusbigcyrillic=1131;e.yusbigiotifiedcyrillic=1133;e.yuslittlecyrillic=1127;e.yuslittleiotifiedcyrillic=1129;e.yusmallhiragana=12421;e.yusmallkatakana=12517;e.yusmallkatakanahalfwidth=65389;e.yuyekorean=12683;e.yuyeokorean=12682;e.yyabengali=2527;e.yyadeva=2399;e.z=122;e.zaarmenian=1382;e.zacute=378;e.zadeva=2395;e.zagurmukhi=2651;e.zaharabic=1592;e.zahfinalarabic=65222;e.zahinitialarabic=65223;e.zahiragana=12374;e.zahmedialarabic=65224;e.zainarabic=1586;e.zainfinalarabic=65200;e.zakatakana=12470;e.zaqefgadolhebrew=1429;e.zaqefqatanhebrew=1428;e.zarqahebrew=1432;e.zayin=1494;e.zayindagesh=64310;e.zayindageshhebrew=64310;e.zayinhebrew=1494;e.zbopomofo=12567;e.zcaron=382;e.zcircle=9449;e.zcircumflex=7825;e.zcurl=657;e.zdot=380;e.zdotaccent=380;e.zdotbelow=7827;e.zecyrillic=1079;e.zedescendercyrillic=1177;e.zedieresiscyrillic=1247;e.zehiragana=12380;e.zekatakana=12476;e.zero=48;e.zeroarabic=1632;e.zerobengali=2534;e.zerodeva=2406;e.zerogujarati=2790;e.zerogurmukhi=2662;e.zerohackarabic=1632;e.zeroinferior=8320;e.zeromonospace=65296;e.zerooldstyle=63280;e.zeropersian=1776;e.zerosuperior=8304;e.zerothai=3664;e.zerowidthjoiner=65279;e.zerowidthnonjoiner=8204;e.zerowidthspace=8203;e.zeta=950;e.zhbopomofo=12563;e.zhearmenian=1386;e.zhebrevecyrillic=1218;e.zhecyrillic=1078;e.zhedescendercyrillic=1175;e.zhedieresiscyrillic=1245;e.zihiragana=12376;e.zikatakana=12472;e.zinorhebrew=1454;e.zlinebelow=7829;e.zmonospace=65370;e.zohiragana=12382;e.zokatakana=12478;e.zparen=9397;e.zretroflexhook=656;e.zstroke=438;e.zuhiragana=12378;e.zukatakana=12474;e[".notdef"]=0;e.angbracketleftbig=9001;e.angbracketleftBig=9001;e.angbracketleftbigg=9001;e.angbracketleftBigg=9001;e.angbracketrightBig=9002;e.angbracketrightbig=9002;e.angbracketrightBigg=9002;e.angbracketrightbigg=9002;e.arrowhookleft=8618;e.arrowhookright=8617;e.arrowlefttophalf=8636;e.arrowleftbothalf=8637;e.arrownortheast=8599;e.arrownorthwest=8598;e.arrowrighttophalf=8640;e.arrowrightbothalf=8641;e.arrowsoutheast=8600;e.arrowsouthwest=8601;e.backslashbig=8726;e.backslashBig=8726;e.backslashBigg=8726;e.backslashbigg=8726;e.bardbl=8214;e.bracehtipdownleft=65079;e.bracehtipdownright=65079;e.bracehtipupleft=65080;e.bracehtipupright=65080;e.braceleftBig=123;e.braceleftbig=123;e.braceleftbigg=123;e.braceleftBigg=123;e.bracerightBig=125;e.bracerightbig=125;e.bracerightbigg=125;e.bracerightBigg=125;e.bracketleftbig=91;e.bracketleftBig=91;e.bracketleftbigg=91;e.bracketleftBigg=91;e.bracketrightBig=93;e.bracketrightbig=93;e.bracketrightbigg=93;e.bracketrightBigg=93;e.ceilingleftbig=8968;e.ceilingleftBig=8968;e.ceilingleftBigg=8968;e.ceilingleftbigg=8968;e.ceilingrightbig=8969;e.ceilingrightBig=8969;e.ceilingrightbigg=8969;e.ceilingrightBigg=8969;e.circledotdisplay=8857;e.circledottext=8857;e.circlemultiplydisplay=8855;e.circlemultiplytext=8855;e.circleplusdisplay=8853;e.circleplustext=8853;e.contintegraldisplay=8750;e.contintegraltext=8750;e.coproductdisplay=8720;e.coproducttext=8720;e.floorleftBig=8970;e.floorleftbig=8970;e.floorleftbigg=8970;e.floorleftBigg=8970;e.floorrightbig=8971;e.floorrightBig=8971;e.floorrightBigg=8971;e.floorrightbigg=8971;e.hatwide=770;e.hatwider=770;e.hatwidest=770;e.intercal=7488;e.integraldisplay=8747;e.integraltext=8747;e.intersectiondisplay=8898;e.intersectiontext=8898;e.logicalanddisplay=8743;e.logicalandtext=8743;e.logicalordisplay=8744;e.logicalortext=8744;e.parenleftBig=40;e.parenleftbig=40;e.parenleftBigg=40;e.parenleftbigg=40;e.parenrightBig=41;e.parenrightbig=41;e.parenrightBigg=41;e.parenrightbigg=41;e.prime=8242;e.productdisplay=8719;e.producttext=8719;e.radicalbig=8730;e.radicalBig=8730;e.radicalBigg=8730;e.radicalbigg=8730;e.radicalbt=8730;e.radicaltp=8730;e.radicalvertex=8730;e.slashbig=47;e.slashBig=47;e.slashBigg=47;e.slashbigg=47;e.summationdisplay=8721;e.summationtext=8721;e.tildewide=732;e.tildewider=732;e.tildewidest=732;e.uniondisplay=8899;e.unionmultidisplay=8846;e.unionmultitext=8846;e.unionsqdisplay=8852;e.unionsqtext=8852;e.uniontext=8899;e.vextenddouble=8741;e.vextendsingle=8739}),ya=getLookupTableFactory(function(e){e.space=32;e.a1=9985;e.a2=9986;e.a202=9987;e.a3=9988;e.a4=9742;e.a5=9990;e.a119=9991;e.a118=9992;e.a117=9993;e.a11=9755;e.a12=9758;e.a13=9996;e.a14=9997;e.a15=9998;e.a16=9999;e.a105=1e4;e.a17=10001;e.a18=10002;e.a19=10003;e.a20=10004;e.a21=10005;e.a22=10006;e.a23=10007;e.a24=10008;e.a25=10009;e.a26=10010;e.a27=10011;e.a28=10012;e.a6=10013;e.a7=10014;e.a8=10015;e.a9=10016;e.a10=10017;e.a29=10018;e.a30=10019;e.a31=10020;e.a32=10021;e.a33=10022;e.a34=10023;e.a35=9733;e.a36=10025;e.a37=10026;e.a38=10027;e.a39=10028;e.a40=10029;e.a41=10030;e.a42=10031;e.a43=10032;e.a44=10033;e.a45=10034;e.a46=10035;e.a47=10036;e.a48=10037;e.a49=10038;e.a50=10039;e.a51=10040;e.a52=10041;e.a53=10042;e.a54=10043;e.a55=10044;e.a56=10045;e.a57=10046;e.a58=10047;e.a59=10048;e.a60=10049;e.a61=10050;e.a62=10051;e.a63=10052;e.a64=10053;e.a65=10054;e.a66=10055;e.a67=10056;e.a68=10057;e.a69=10058;e.a70=10059;e.a71=9679;e.a72=10061;e.a73=9632;e.a74=10063;e.a203=10064;e.a75=10065;e.a204=10066;e.a76=9650;e.a77=9660;e.a78=9670;e.a79=10070;e.a81=9687;e.a82=10072;e.a83=10073;e.a84=10074;e.a97=10075;e.a98=10076;e.a99=10077;e.a100=10078;e.a101=10081;e.a102=10082;e.a103=10083;e.a104=10084;e.a106=10085;e.a107=10086;e.a108=10087;e.a112=9827;e.a111=9830;e.a110=9829;e.a109=9824;e.a120=9312;e.a121=9313;e.a122=9314;e.a123=9315;e.a124=9316;e.a125=9317;e.a126=9318;e.a127=9319;e.a128=9320;e.a129=9321;e.a130=10102;e.a131=10103;e.a132=10104;e.a133=10105;e.a134=10106;e.a135=10107;e.a136=10108;e.a137=10109;e.a138=10110;e.a139=10111;e.a140=10112;e.a141=10113;e.a142=10114;e.a143=10115;e.a144=10116;e.a145=10117;e.a146=10118;e.a147=10119;e.a148=10120;e.a149=10121;e.a150=10122;e.a151=10123;e.a152=10124;e.a153=10125;e.a154=10126;e.a155=10127;e.a156=10128;e.a157=10129;e.a158=10130;e.a159=10131;e.a160=10132;e.a161=8594;e.a163=8596;e.a164=8597;e.a196=10136;e.a165=10137;e.a192=10138;e.a166=10139;e.a167=10140;e.a168=10141;e.a169=10142;e.a170=10143;e.a171=10144;e.a172=10145;e.a173=10146;e.a162=10147;e.a174=10148;e.a175=10149;e.a176=10150;e.a177=10151;e.a178=10152;e.a179=10153;e.a193=10154;e.a180=10155;e.a199=10156;e.a181=10157;e.a200=10158;e.a182=10159;e.a201=10161;e.a183=10162;e.a184=10163;e.a197=10164;e.a185=10165;e.a194=10166;e.a198=10167;e.a186=10168;e.a195=10169;e.a187=10170;e.a188=10171;e.a189=10172;e.a190=10173;e.a191=10174;e.a89=10088;e.a90=10089;e.a93=10090;e.a94=10091;e.a91=10092;e.a92=10093;e.a205=10094;e.a85=10095;e.a206=10096;e.a86=10097;e.a87=10098;e.a88=10099;e.a95=10100;e.a96=10101;e[".notdef"]=0}),qa=getLookupTableFactory(function(e){e[63721]=169;e[63193]=169;e[63720]=174;e[63194]=174;e[63722]=8482;e[63195]=8482;e[63729]=9127;e[63730]=9128;e[63731]=9129;e[63740]=9131;e[63741]=9132;e[63742]=9133;e[63726]=9121;e[63727]=9122;e[63728]=9123;e[63737]=9124;e[63738]=9125;e[63739]=9126;e[63723]=9115;e[63724]=9116;e[63725]=9117;e[63734]=9118;e[63735]=9119;e[63736]=9120});function getUnicodeForGlyph(e,t){let n=t[e];if(void 0!==n)return n;if(!e)return-1;if("u"===e[0]){const t=e.length;let a;if(7===t&&"n"===e[1]&&"i"===e[2])a=e.substring(3);else{if(!(t>=5&&t<=7))return-1;a=e.substring(1)}if(a===a.toUpperCase()){n=parseInt(a,16);if(n>=0)return n}}return-1}const va=[[0,127],[128,255],[256,383],[384,591],[592,687,7424,7551,7552,7615],[688,767,42752,42783],[768,879,7616,7679],[880,1023],[11392,11519],[1024,1279,1280,1327,11744,11775,42560,42655],[1328,1423],[1424,1535],[42240,42559],[1536,1791,1872,1919],[1984,2047],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3584,3711],[3712,3839],[4256,4351,11520,11567],[6912,7039],[4352,4607],[7680,7935,11360,11391,42784,43007],[7936,8191],[8192,8303,11776,11903],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703,10224,10239,10496,10623,11008,11263],[8704,8959,10752,11007,10176,10223,10624,10751],[8960,9215],[9216,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[12288,12351],[12352,12447],[12448,12543,12784,12799],[12544,12591,12704,12735],[12592,12687],[43072,43135],[12800,13055],[13056,13311],[44032,55215],[55296,57343],[67840,67871],[19968,40959,11904,12031,12032,12255,12272,12287,13312,19903,131072,173791,12688,12703],[57344,63743],[12736,12783,63744,64255,194560,195103],[64256,64335],[64336,65023],[65056,65071],[65040,65055],[65104,65135],[65136,65279],[65280,65519],[65520,65535],[3840,4095],[1792,1871],[1920,1983],[3456,3583],[4096,4255],[4608,4991,4992,5023,11648,11743],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[10240,10495],[40960,42127],[5888,5919,5920,5951,5952,5983,5984,6015],[66304,66351],[66352,66383],[66560,66639],[118784,119039,119040,119295,119296,119375],[119808,120831],[1044480,1048573],[65024,65039,917760,917999],[917504,917631],[6400,6479],[6480,6527],[6528,6623],[6656,6687],[11264,11359],[11568,11647],[19904,19967],[43008,43055],[65536,65663,65664,65791,65792,65855],[65856,65935],[66432,66463],[66464,66527],[66640,66687],[66688,66735],[67584,67647],[68096,68191],[119552,119647],[73728,74751,74752,74879],[119648,119679],[7040,7103],[7168,7247],[7248,7295],[43136,43231],[43264,43311],[43312,43359],[43520,43615],[65936,65999],[66e3,66047],[66208,66271,66176,66207,67872,67903],[127024,127135,126976,127023]];function getUnicodeRangeFor(e,t=-1){if(-1!==t){const n=va[t];for(let a=0,r=n.length;a<r;a+=2)if(e>=n[a]&&e<=n[a+1])return t}for(let t=0,n=va.length;t<n;t++){const n=va[t];for(let a=0,r=n.length;a<r;a+=2)if(e>=n[a]&&e<=n[a+1])return t}return-1}const Sa=new RegExp("^(\\s)|(\\p{Mn})|(\\p{Cf})$","u"),xa=new Map;const Aa=!0,Ca=1,Ia=2,Fa=4,Ta=32,Oa=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function recoverGlyphName(e,t){if(void 0!==t[e])return e;const n=getUnicodeForGlyph(e,t);if(-1!==n)for(const e in t)if(t[e]===n)return e;info("Unable to recover a standard glyph name for: "+e);return e}function type1FontGlyphMapping(e,t,n){const a=Object.create(null);let r,s,i;const o=!!(e.flags&Fa);if(e.isInternalFont){i=t;for(s=0;s<i.length;s++){r=n.indexOf(i[s]);a[s]=r>=0?r:0}}else if(e.baseEncodingName){i=getEncoding(e.baseEncodingName);for(s=0;s<i.length;s++){r=n.indexOf(i[s]);a[s]=r>=0?r:0}}else if(o)for(s in t)a[s]=t[s];else{i=ga;for(s=0;s<i.length;s++){r=n.indexOf(i[s]);a[s]=r>=0?r:0}}const l=e.differences;let f;if(l)for(s in l){const e=l[s];r=n.indexOf(e);if(-1===r){f||(f=ka());const t=recoverGlyphName(e,f);t!==e&&(r=n.indexOf(t))}a[s]=r>=0?r:0}return a}function normalizeFontName(e){return e.replaceAll(/[,_]/g,"-").replaceAll(/\s/g,"")}const Ra=getLookupTableFactory(e=>{e[8211]=65074;e[8212]=65073;e[8229]=65072;e[8230]=65049;e[12289]=65041;e[12290]=65042;e[12296]=65087;e[12297]=65088;e[12298]=65085;e[12299]=65086;e[12300]=65089;e[12301]=65090;e[12302]=65091;e[12303]=65092;e[12304]=65083;e[12305]=65084;e[12308]=65081;e[12309]=65082;e[12310]=65047;e[12311]=65048;e[65103]=65076;e[65281]=65045;e[65288]=65077;e[65289]=65078;e[65292]=65040;e[65306]=65043;e[65307]=65044;e[65311]=65046;e[65339]=65095;e[65341]=65096;e[65343]=65075;e[65371]=65079;e[65373]=65080});__webpack_require__(1806);const Ba=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],Ha=[".notdef","space","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],Da=[".notdef","space","dollaroldstyle","dollarsuperior","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","hyphensuperior","colonmonetary","onefitted","rupiah","centoldstyle","figuredash","hypheninferior","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior"],Ma=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],Pa=391,Ea=[null,{id:"hstem",min:2,stackClearing:!0,stem:!0},null,{id:"vstem",min:2,stackClearing:!0,stem:!0},{id:"vmoveto",min:1,stackClearing:!0},{id:"rlineto",min:2,resetStack:!0},{id:"hlineto",min:1,resetStack:!0},{id:"vlineto",min:1,resetStack:!0},{id:"rrcurveto",min:6,resetStack:!0},null,{id:"callsubr",min:1},{id:"return",min:0},null,null,{id:"endchar",min:0,stackClearing:!0},null,null,null,{id:"hstemhm",min:2,stackClearing:!0,stem:!0},{id:"hintmask",min:0,stackClearing:!0},{id:"cntrmask",min:0,stackClearing:!0},{id:"rmoveto",min:2,stackClearing:!0},{id:"hmoveto",min:1,stackClearing:!0},{id:"vstemhm",min:2,stackClearing:!0,stem:!0},{id:"rcurveline",min:8,resetStack:!0},{id:"rlinecurve",min:8,resetStack:!0},{id:"vvcurveto",min:4,resetStack:!0},{id:"hhcurveto",min:4,resetStack:!0},null,{id:"callgsubr",min:1},{id:"vhcurveto",min:4,resetStack:!0},{id:"hvcurveto",min:4,resetStack:!0}],Na=[null,null,null,{id:"and",min:2,stackDelta:-1},{id:"or",min:2,stackDelta:-1},{id:"not",min:1,stackDelta:0},null,null,null,{id:"abs",min:1,stackDelta:0},{id:"add",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]+e[t-1]}},{id:"sub",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]-e[t-1]}},{id:"div",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]/e[t-1]}},null,{id:"neg",min:1,stackDelta:0,stackFn(e,t){e[t-1]=-e[t-1]}},{id:"eq",min:2,stackDelta:-1},null,null,{id:"drop",min:1,stackDelta:-1},null,{id:"put",min:2,stackDelta:-2},{id:"get",min:1,stackDelta:0},{id:"ifelse",min:4,stackDelta:-3},{id:"random",min:0,stackDelta:1},{id:"mul",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]*e[t-1]}},null,{id:"sqrt",min:1,stackDelta:0},{id:"dup",min:1,stackDelta:1},{id:"exch",min:2,stackDelta:0},{id:"index",min:2,stackDelta:0},{id:"roll",min:3,stackDelta:-2},null,null,null,{id:"hflex",min:7,resetStack:!0},{id:"flex",min:13,resetStack:!0},{id:"hflex1",min:9,resetStack:!0},{id:"flex1",min:11,resetStack:!0}];class CFFParser{constructor(e,t,n){this.bytes=e.getBytes();this.properties=t;this.seacAnalysisEnabled=!!n}parse(){const e=this.properties,t=new CFF;this.cff=t;const n=this.parseHeader(),a=this.parseIndex(n.endPos),r=this.parseIndex(a.endPos),s=this.parseIndex(r.endPos),i=this.parseIndex(s.endPos),o=this.parseDict(r.obj.get(0)),l=this.createDict(CFFTopDict,o,t.strings);t.header=n.obj;t.names=this.parseNameIndex(a.obj);t.strings=this.parseStringIndex(s.obj);t.topDict=l;t.globalSubrIndex=i.obj;this.parsePrivateDict(t.topDict);t.isCIDFont=l.hasName("ROS");const f=l.getByName("CharStrings"),c=this.parseIndex(f).obj;t.charStringCount=c.count;const h=l.getByName("FontMatrix");h&&(e.fontMatrix=h);const u=l.getByName("FontBBox");if(u){e.ascent=Math.max(u[3],u[1]);e.descent=Math.min(u[1],u[3]);e.ascentScaled=!0}let m,p;if(t.isCIDFont){const e=this.parseIndex(l.getByName("FDArray")).obj;for(let n=0,a=e.count;n<a;++n){const a=e.get(n),r=this.createDict(CFFTopDict,this.parseDict(a),t.strings);this.parsePrivateDict(r);t.fdArray.push(r)}p=null;m=this.parseCharsets(l.getByName("charset"),c.count,t.strings,!0);t.fdSelect=this.parseFDSelect(l.getByName("FDSelect"),c.count)}else{m=this.parseCharsets(l.getByName("charset"),c.count,t.strings,!1);p=this.parseEncoding(l.getByName("Encoding"),e,t.strings,m.charset)}t.charset=m;t.encoding=p;const d=this.parseCharStrings({charStrings:c,localSubrIndex:l.privateDict.subrsIndex,globalSubrIndex:i.obj,fdSelect:t.fdSelect,fdArray:t.fdArray,privateDict:l.privateDict});t.charStrings=d.charStrings;t.seacs=d.seacs;t.widths=d.widths;return t}parseHeader(){let e=this.bytes;const t=e.length;let n=0;for(;n<t&&1!==e[n];)++n;if(n>=t)throw new FormatError("Invalid CFF header");if(0!==n){info("cff data is shifted");e=e.subarray(n);this.bytes=e}const a=e[0],r=e[1],s=e[2],i=e[3];return{obj:new CFFHeader(a,r,s,i),endPos:s}}parseDict(e){let t=0;function parseOperand(){let n=e[t++];if(30===n)return function parseFloatOperand(){let n="";const a=15,r=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],s=e.length;for(;t<s;){const s=e[t++],i=s>>4,o=15&s;if(i===a)break;n+=r[i];if(o===a)break;n+=r[o]}return parseFloat(n)}();if(28===n){n=readInt16(e,t);t+=2;return n}if(29===n){n=e[t++];n=n<<8|e[t++];n=n<<8|e[t++];n=n<<8|e[t++];return n}if(n>=32&&n<=246)return n-139;if(n>=247&&n<=250)return 256*(n-247)+e[t++]+108;if(n>=251&&n<=254)return-256*(n-251)-e[t++]-108;warn('CFFParser_parseDict: "'+n+'" is a reserved command.');return NaN}let n=[];const a=[];t=0;const r=e.length;for(;t<r;){let r=e[t];if(r<=21){12===r&&(r=r<<8|e[++t]);a.push([r,n]);n=[];++t}else n.push(parseOperand())}return a}parseIndex(e){const t=new CFFIndex,n=this.bytes,a=n[e++]<<8|n[e++],r=[];let s,i,o=e;if(0!==a){const t=n[e++],l=e+(a+1)*t-1;for(s=0,i=a+1;s<i;++s){let a=0;for(let r=0;r<t;++r){a<<=8;a+=n[e++]}r.push(l+a)}o=r[a]}for(s=0,i=r.length-1;s<i;++s){const e=r[s],a=r[s+1];t.add(n.subarray(e,a))}return{obj:t,endPos:o}}parseNameIndex(e){const t=[];for(let n=0,a=e.count;n<a;++n){const a=e.get(n);t.push(bytesToString(a))}return t}parseStringIndex(e){const t=new CFFStrings;for(let n=0,a=e.count;n<a;++n){const a=e.get(n);t.add(bytesToString(a))}return t}createDict(e,t,n){const a=new e(n);for(const[e,n]of t)a.setByKey(e,n);return a}parseCharString(e,t,n,a){if(!t||e.callDepth>10)return!1;let r=e.stackSize;const s=e.stack;let i=t.length;for(let o=0;o<i;){const l=t[o++];let f=null;if(12===l){const e=t[o++];if(0===e){t[o-2]=139;t[o-1]=22;r=0}else f=Na[e]}else if(28===l){s[r]=readInt16(t,o);o+=2;r++}else if(14===l){if(r>=4){r-=4;if(this.seacAnalysisEnabled){e.seac=s.slice(r,r+4);return!1}}f=Ea[l]}else if(l>=32&&l<=246){s[r]=l-139;r++}else if(l>=247&&l<=254){s[r]=l<251?(l-247<<8)+t[o]+108:-(l-251<<8)-t[o]-108;o++;r++}else if(255===l){s[r]=(t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3])/65536;o+=4;r++}else if(19===l||20===l){e.hints+=r>>1;if(0===e.hints){t.copyWithin(o-1,o,-1);o-=1;i-=1;continue}o+=e.hints+7>>3;r%=2;f=Ea[l]}else{if(10===l||29===l){const t=10===l?n:a;if(!t){f=Ea[l];warn("Missing subrsIndex for "+f.id);return!1}let i=32768;t.count<1240?i=107:t.count<33900&&(i=1131);const o=s[--r]+i;if(o<0||o>=t.count||isNaN(o)){f=Ea[l];warn("Out of bounds subrIndex for "+f.id);return!1}e.stackSize=r;e.callDepth++;if(!this.parseCharString(e,t.get(o),n,a))return!1;e.callDepth--;r=e.stackSize;continue}if(11===l){e.stackSize=r;return!0}if(0===l&&o===t.length){t[o-1]=14;f=Ea[14]}else{if(9===l){t.copyWithin(o-1,o,-1);o-=1;i-=1;continue}f=Ea[l]}}if(f){if(f.stem){e.hints+=r>>1;if(3===l||23===l)e.hasVStems=!0;else if(e.hasVStems&&(1===l||18===l)){warn("CFF stem hints are in wrong order");t[o-1]=1===l?3:23}}if(r<f.min){warn("Not enough parameters for "+f.id+"; actual: "+r+", expected: "+f.min);if(0===r){t[o-1]=14;return!0}return!1}if(e.firstStackClearing&&f.stackClearing){e.firstStackClearing=!1;r-=f.min;r>=2&&f.stem?r%=2:r>1&&warn("Found too many parameters for stack-clearing command");r>0&&(e.width=s[r-1])}if("stackDelta"in f){"stackFn"in f&&f.stackFn(s,r);r+=f.stackDelta}else(f.stackClearing||f.resetStack)&&(r=0)}}i<t.length&&t.fill(14,i);e.stackSize=r;return!0}parseCharStrings({charStrings:e,localSubrIndex:t,globalSubrIndex:n,fdSelect:a,fdArray:r,privateDict:s}){const i=[],o=[],l=e.count;for(let f=0;f<l;f++){const l=e.get(f),c={callDepth:0,stackSize:0,stack:[],hints:0,firstStackClearing:!0,seac:null,width:null,hasVStems:!1};let h=!0,u=null,m=s;if(a&&r.length){const e=a.getFDIndex(f);if(-1===e){warn("Glyph index is not in fd select.");h=!1}if(e>=r.length){warn("Invalid fd index for glyph index.");h=!1}if(h){m=r[e].privateDict;u=m.subrsIndex}}else t&&(u=t);h&&(h=this.parseCharString(c,l,u,n));if(null!==c.width){const e=m.getByName("nominalWidthX");o[f]=e+c.width}else{const e=m.getByName("defaultWidthX");o[f]=e}null!==c.seac&&(i[f]=c.seac);h||e.set(f,new Uint8Array([14]))}return{charStrings:e,seacs:i,widths:o}}emptyPrivateDictionary(e){const t=this.createDict(CFFPrivateDict,[],e.strings);e.setByKey(18,[0,0]);e.privateDict=t}parsePrivateDict(e){if(!e.hasName("Private")){this.emptyPrivateDictionary(e);return}const t=e.getByName("Private");if(!Array.isArray(t)||2!==t.length){e.removeByName("Private");return}const n=t[0],a=t[1];if(0===n||a>=this.bytes.length){this.emptyPrivateDictionary(e);return}const r=a+n,s=this.bytes.subarray(a,r),i=this.parseDict(s),o=this.createDict(CFFPrivateDict,i,e.strings);e.privateDict=o;0===o.getByName("ExpansionFactor")&&o.setByName("ExpansionFactor",.06);if(!o.getByName("Subrs"))return;const l=o.getByName("Subrs"),f=a+l;if(0===l||f>=this.bytes.length){this.emptyPrivateDictionary(e);return}const c=this.parseIndex(f);o.subrsIndex=c.obj}parseCharsets(e,t,n,a){if(0===e)return new CFFCharset(!0,La.ISO_ADOBE,Ba);if(1===e)return new CFFCharset(!0,La.EXPERT,Ha);if(2===e)return new CFFCharset(!0,La.EXPERT_SUBSET,Da);const r=this.bytes,s=e,i=r[e++],o=[a?0:".notdef"];let l,f,c;t-=1;switch(i){case 0:for(c=0;c<t;c++){l=r[e++]<<8|r[e++];o.push(a?l:n.get(l))}break;case 1:for(;o.length<=t;){l=r[e++]<<8|r[e++];f=r[e++];for(c=0;c<=f;c++)o.push(a?l++:n.get(l++))}break;case 2:for(;o.length<=t;){l=r[e++]<<8|r[e++];f=r[e++]<<8|r[e++];for(c=0;c<=f;c++)o.push(a?l++:n.get(l++))}break;default:throw new FormatError("Unknown charset format")}const h=e,u=r.subarray(s,h);return new CFFCharset(!1,i,o,u)}parseEncoding(e,t,n,a){const r=Object.create(null),s=this.bytes;let i,o,l,f=!1,c=null;if(0===e||1===e){f=!0;i=e;const t=e?ma:ga;for(o=0,l=a.length;o<l;o++){const e=t.indexOf(a[o]);-1!==e&&(r[e]=o)}}else{const t=e;i=s[e++];switch(127&i){case 0:const t=s[e++];for(o=1;o<=t;o++)r[s[e++]]=o;break;case 1:const n=s[e++];let a=1;for(o=0;o<n;o++){const t=s[e++],n=s[e++];for(let e=t;e<=t+n;e++)r[e]=a++}break;default:throw new FormatError(`Unknown encoding format: ${i} in CFF`)}const l=e;if(128&i){s[t]&=127;!function readSupplement(){const t=s[e++];for(o=0;o<t;o++){const t=s[e++],i=(s[e++]<<8)+(255&s[e++]);r[t]=a.indexOf(n.get(i))}}()}c=s.subarray(t,l)}i&=127;return new CFFEncoding(f,i,r,c)}parseFDSelect(e,t){const n=this.bytes,a=n[e++],r=[];let s;switch(a){case 0:for(s=0;s<t;++s){const t=n[e++];r.push(t)}break;case 3:const i=n[e++]<<8|n[e++];for(s=0;s<i;++s){let t=n[e++]<<8|n[e++];if(0===s&&0!==t){warn("parseFDSelect: The first range must have a first GID of 0 -- trying to recover.");t=0}const a=n[e++],i=n[e]<<8|n[e+1];for(let e=t;e<i;++e)r.push(a)}e+=2;break;default:throw new FormatError(`parseFDSelect: Unknown format "${a}".`)}if(r.length!==t)throw new FormatError("parseFDSelect: Invalid font data.");return new CFFFDSelect(a,r)}}class CFF{header=null;names=[];topDict=null;strings=new CFFStrings;globalSubrIndex=null;encoding=null;charset=null;charStrings=null;fdArray=[];fdSelect=null;isCIDFont=!1;charStringCount=0;duplicateFirstGlyph(){if(this.charStrings.count>=65535){warn("Not enough space in charstrings to duplicate first glyph.");return}const e=this.charStrings.get(0);this.charStrings.add(e);this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}hasGlyphId(e){if(e<0||e>=this.charStrings.count)return!1;return this.charStrings.get(e).length>0}}class CFFHeader{constructor(e,t,n,a){this.major=e;this.minor=t;this.hdrSize=n;this.offSize=a}}class CFFStrings{strings=[];get(e){return e>=0&&e<=390?Ma[e]:e-Pa<=this.strings.length?this.strings[e-Pa]:Ma[0]}getSID(e){let t=Ma.indexOf(e);if(-1!==t)return t;t=this.strings.indexOf(e);return-1!==t?t+Pa:-1}add(e){this.strings.push(e)}get count(){return this.strings.length}}class CFFIndex{objects=[];length=0;add(e){this.length+=e.length;this.objects.push(e)}set(e,t){this.length+=t.length-this.objects[e].length;this.objects[e]=t}get(e){return this.objects[e]}get count(){return this.objects.length}}class CFFDict{constructor(e,t){this.keyToNameMap=e.keyToNameMap;this.nameToKeyMap=e.nameToKeyMap;this.defaults=e.defaults;this.types=e.types;this.opcodes=e.opcodes;this.order=e.order;this.strings=t;this.values=Object.create(null)}setByKey(e,t){if(!(e in this.keyToNameMap))return!1;if(0===t.length)return!0;for(const n of t)if(isNaN(n)){warn(`Invalid CFFDict value: "${t}" for key "${e}".`);return!0}const n=this.types[e];"num"!==n&&"sid"!==n&&"offset"!==n||(t=t[0]);this.values[e]=t;return!0}setByName(e,t){if(!(e in this.nameToKeyMap))throw new FormatError(`Invalid dictionary name "${e}"`);this.values[this.nameToKeyMap[e]]=t}hasName(e){return this.nameToKeyMap[e]in this.values}getByName(e){if(!(e in this.nameToKeyMap))throw new FormatError(`Invalid dictionary name ${e}"`);const t=this.nameToKeyMap[e];return t in this.values?this.values[t]:this.defaults[t]}removeByName(e){delete this.values[this.nameToKeyMap[e]]}static createTables(e){const t={keyToNameMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]};for(const n of e){const e=Array.isArray(n[0])?(n[0][0]<<8)+n[0][1]:n[0];t.keyToNameMap[e]=n[1];t.nameToKeyMap[n[1]]=e;t.types[e]=n[2];t.defaults[e]=n[3];t.opcodes[e]=Array.isArray(n[0])?n[0]:[n[0]];t.order.push(e)}return t}}const za=[[[12,30],"ROS",["sid","sid","num"],null],[[12,20],"SyntheticBase","num",null],[0,"version","sid",null],[1,"Notice","sid",null],[[12,0],"Copyright","sid",null],[2,"FullName","sid",null],[3,"FamilyName","sid",null],[4,"Weight","sid",null],[[12,1],"isFixedPitch","num",0],[[12,2],"ItalicAngle","num",0],[[12,3],"UnderlinePosition","num",-100],[[12,4],"UnderlineThickness","num",50],[[12,5],"PaintType","num",0],[[12,6],"CharstringType","num",2],[[12,7],"FontMatrix",["num","num","num","num","num","num"],[.001,0,0,.001,0,0]],[13,"UniqueID","num",null],[5,"FontBBox",["num","num","num","num"],[0,0,0,0]],[[12,8],"StrokeWidth","num",0],[14,"XUID","array",null],[15,"charset","offset",0],[16,"Encoding","offset",0],[17,"CharStrings","offset",0],[18,"Private",["offset","offset"],null],[[12,21],"PostScript","sid",null],[[12,22],"BaseFontName","sid",null],[[12,23],"BaseFontBlend","delta",null],[[12,31],"CIDFontVersion","num",0],[[12,32],"CIDFontRevision","num",0],[[12,33],"CIDFontType","num",0],[[12,34],"CIDCount","num",8720],[[12,35],"UIDBase","num",null],[[12,37],"FDSelect","offset",null],[[12,36],"FDArray","offset",null],[[12,38],"FontName","sid",null]];class CFFTopDict extends CFFDict{static get tables(){return shadow(this,"tables",this.createTables(za))}constructor(e){super(CFFTopDict.tables,e);this.privateDict=null}}const _a=[[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","num",.039625],[[12,10],"BlueShift","num",7],[[12,11],"BlueFuzz","num",1],[10,"StdHW","num",null],[11,"StdVW","num",null],[[12,12],"StemSnapH","delta",null],[[12,13],"StemSnapV","delta",null],[[12,14],"ForceBold","num",0],[[12,17],"LanguageGroup","num",0],[[12,18],"ExpansionFactor","num",.06],[[12,19],"initialRandomSeed","num",0],[20,"defaultWidthX","num",0],[21,"nominalWidthX","num",0],[19,"Subrs","offset",null]];class CFFPrivateDict extends CFFDict{static get tables(){return shadow(this,"tables",this.createTables(_a))}constructor(e){super(CFFPrivateDict.tables,e);this.subrsIndex=null}}const La={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2};class CFFCharset{constructor(e,t,n,a){this.predefined=e;this.format=t;this.charset=n;this.raw=a}}class CFFEncoding{constructor(e,t,n,a){this.predefined=e;this.format=t;this.encoding=n;this.raw=a}}class CFFFDSelect{constructor(e,t){this.format=e;this.fdSelect=t}getFDIndex(e){return e<0||e>=this.fdSelect.length?-1:this.fdSelect[e]}}class CFFOffsetTracker{offsets=Object.create(null);isTracking(e){return e in this.offsets}track(e,t){if(e in this.offsets)throw new FormatError(`Already tracking location of ${e}`);this.offsets[e]=t}offset(e){for(const t in this.offsets)this.offsets[t]+=e}setEntryLocation(e,t,n){if(!(e in this.offsets))throw new FormatError(`Not tracking location of ${e}`);const a=n.data,r=this.offsets[e];for(let e=0,n=t.length;e<n;++e){const n=5*e+r,s=n+1,i=n+2,o=n+3,l=n+4;if(29!==a[n]||0!==a[s]||0!==a[i]||0!==a[o]||0!==a[l])throw new FormatError("writing to an offset that is not empty");const f=t[e];a[n]=29;a[s]=f>>24&255;a[i]=f>>16&255;a[o]=f>>8&255;a[l]=255&f}}}class CFFCompiler{constructor(e){this.cff=e}compile(){const e=this.cff,t={data:[],length:0,add(e){try{this.data.push(...e)}catch{this.data=this.data.concat(e)}this.length=this.data.length}},n=this.compileHeader(e.header);t.add(n);const a=this.compileNameIndex(e.names);t.add(a);if(e.isCIDFont&&e.topDict.hasName("FontMatrix")){const t=e.topDict.getByName("FontMatrix");e.topDict.removeByName("FontMatrix");for(const n of e.fdArray){let e=t.slice(0);n.hasName("FontMatrix")&&(e=Util.transform(e,n.getByName("FontMatrix")));n.setByName("FontMatrix",e)}}const r=e.topDict.getByName("XUID");r?.length>16&&e.topDict.removeByName("XUID");e.topDict.setByName("charset",0);let s=this.compileTopDicts([e.topDict],t.length,e.isCIDFont);t.add(s.output);const i=s.trackers[0],o=this.compileStringIndex(e.strings.strings);t.add(o);const l=this.compileIndex(e.globalSubrIndex);t.add(l);if(e.encoding&&e.topDict.hasName("Encoding"))if(e.encoding.predefined)i.setEntryLocation("Encoding",[e.encoding.format],t);else{const n=this.compileEncoding(e.encoding);i.setEntryLocation("Encoding",[t.length],t);t.add(n)}const f=this.compileCharset(e.charset,e.charStrings.count,e.strings,e.isCIDFont);i.setEntryLocation("charset",[t.length],t);t.add(f);const c=this.compileCharStrings(e.charStrings);i.setEntryLocation("CharStrings",[t.length],t);t.add(c);if(e.isCIDFont){i.setEntryLocation("FDSelect",[t.length],t);const n=this.compileFDSelect(e.fdSelect);t.add(n);s=this.compileTopDicts(e.fdArray,t.length,!0);i.setEntryLocation("FDArray",[t.length],t);t.add(s.output);const a=s.trackers;this.compilePrivateDicts(e.fdArray,a,t)}this.compilePrivateDicts([e.topDict],[i],t);t.add([0]);return t.data}encodeNumber(e){return Number.isInteger(e)?this.encodeInteger(e):this.encodeFloat(e)}static get EncodeFloatRegExp(){return shadow(this,"EncodeFloatRegExp",/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/)}encodeFloat(e){let t=e.toString();const n=CFFCompiler.EncodeFloatRegExp.exec(t);if(n){const a=parseFloat("1e"+((n[2]?+n[2]:0)+n[1].length));t=(Math.round(e*a)/a).toString()}let a,r,s="";for(a=0,r=t.length;a<r;++a){const e=t[a];s+="e"===e?"-"===t[++a]?"c":"b":"."===e?"a":"-"===e?"e":e}s+=1&s.length?"f":"ff";const i=[30];for(a=0,r=s.length;a<r;a+=2)i.push(parseInt(s.substring(a,a+2),16));return i}encodeInteger(e){let t;t=e>=-107&&e<=107?[e+139]:e>=108&&e<=1131?[247+((e-=108)>>8),255&e]:e>=-1131&&e<=-108?[251+((e=-e-108)>>8),255&e]:e>=-32768&&e<=32767?[28,e>>8&255,255&e]:[29,e>>24&255,e>>16&255,e>>8&255,255&e];return t}compileHeader(e){return[e.major,e.minor,4,e.offSize]}compileNameIndex(e){const t=new CFFIndex;for(const n of e){const e=Math.min(n.length,127);let a=new Array(e);for(let t=0;t<e;t++){let e=n[t];(e<"!"||e>"~"||"["===e||"]"===e||"("===e||")"===e||"{"===e||"}"===e||"<"===e||">"===e||"/"===e||"%"===e)&&(e="_");a[t]=e}a=a.join("");""===a&&(a="Bad_Font_Name");t.add(stringToBytes(a))}return this.compileIndex(t)}compileTopDicts(e,t,n){const a=[];let r=new CFFIndex;for(const s of e){if(n){s.removeByName("CIDFontVersion");s.removeByName("CIDFontRevision");s.removeByName("CIDFontType");s.removeByName("CIDCount");s.removeByName("UIDBase")}const e=new CFFOffsetTracker,i=this.compileDict(s,e);a.push(e);r.add(i);e.offset(t)}r=this.compileIndex(r,a);return{trackers:a,output:r}}compilePrivateDicts(e,t,n){for(let a=0,r=e.length;a<r;++a){const r=e[a],s=r.privateDict;if(!s||!r.hasName("Private"))throw new FormatError("There must be a private dictionary.");const i=new CFFOffsetTracker,o=this.compileDict(s,i);let l=n.length;i.offset(l);o.length||(l=0);t[a].setEntryLocation("Private",[o.length,l],n);n.add(o);if(s.subrsIndex&&s.hasName("Subrs")){const e=this.compileIndex(s.subrsIndex);i.setEntryLocation("Subrs",[o.length],n);n.add(e)}}}compileDict(e,t){const n=[];for(const a of e.order){if(!(a in e.values))continue;let r=e.values[a],s=e.types[a];Array.isArray(s)||(s=[s]);Array.isArray(r)||(r=[r]);if(0!==r.length){for(let i=0,o=s.length;i<o;++i){const o=s[i],l=r[i];switch(o){case"num":case"sid":n.push(...this.encodeNumber(l));break;case"offset":const s=e.keyToNameMap[a];t.isTracking(s)||t.track(s,n.length);n.push(29,0,0,0,0);break;case"array":case"delta":n.push(...this.encodeNumber(l));for(let e=1,t=r.length;e<t;++e)n.push(...this.encodeNumber(r[e]));break;default:throw new FormatError(`Unknown data type of ${o}`)}}n.push(...e.opcodes[a])}}return n}compileStringIndex(e){const t=new CFFIndex;for(const n of e)t.add(stringToBytes(n));return this.compileIndex(t)}compileCharStrings(e){const t=new CFFIndex;for(let n=0;n<e.count;n++){const a=e.get(n);0!==a.length?t.add(a):t.add(new Uint8Array([139,14]))}return this.compileIndex(t)}compileCharset(e,t,n,a){let r;const s=t-1;if(a){const e=s-1;r=new Uint8Array([2,0,1,e>>8&255,255&e])}else{r=new Uint8Array(1+2*s);r[0]=0;let t=0;const a=e.charset.length;let i=!1;for(let s=1;s<r.length;s+=2){let o=0;if(t<a){const a=e.charset[t++];o=n.getSID(a);if(-1===o){o=0;if(!i){i=!0;warn(`Couldn't find ${a} in CFF strings`)}}}r[s]=o>>8&255;r[s+1]=255&o}}return this.compileTypedArray(r)}compileEncoding(e){return this.compileTypedArray(e.raw)}compileFDSelect(e){const t=e.format;let n,a;switch(t){case 0:n=new Uint8Array(1+e.fdSelect.length);n[0]=t;for(a=0;a<e.fdSelect.length;a++)n[a+1]=e.fdSelect[a];break;case 3:const r=0;let s=e.fdSelect[0];const i=[t,0,0,r>>8&255,255&r,s];for(a=1;a<e.fdSelect.length;a++){const t=e.fdSelect[a];if(t!==s){i.push(a>>8&255,255&a,t);s=t}}const o=(i.length-3)/3;i[1]=o>>8&255;i[2]=255&o;i.push(a>>8&255,255&a);n=new Uint8Array(i)}return this.compileTypedArray(n)}compileTypedArray(e){return Array.from(e)}compileIndex(e,t=[]){const n=e.objects,a=n.length;if(0===a)return[0,0];const r=[a>>8&255,255&a];let s,i,o=1;for(s=0;s<a;++s)o+=n[s].length;i=o<256?1:o<65536?2:o<16777216?3:4;r.push(i);let l=1;for(s=0;s<a+1;s++){1===i?r.push(255&l):2===i?r.push(l>>8&255,255&l):3===i?r.push(l>>16&255,l>>8&255,255&l):r.push(l>>>24&255,l>>16&255,l>>8&255,255&l);n[s]&&(l+=n[s].length)}for(s=0;s<a;s++){t[s]&&t[s].offset(r.length);r.push(...n[s])}return r}}const Ua=getLookupTableFactory(function(e){e["Times-Roman"]="Times-Roman";e.Helvetica="Helvetica";e.Courier="Courier";e.Symbol="Symbol";e["Times-Bold"]="Times-Bold";e["Helvetica-Bold"]="Helvetica-Bold";e["Courier-Bold"]="Courier-Bold";e.ZapfDingbats="ZapfDingbats";e["Times-Italic"]="Times-Italic";e["Helvetica-Oblique"]="Helvetica-Oblique";e["Courier-Oblique"]="Courier-Oblique";e["Times-BoldItalic"]="Times-BoldItalic";e["Helvetica-BoldOblique"]="Helvetica-BoldOblique";e["Courier-BoldOblique"]="Courier-BoldOblique";e.ArialNarrow="Helvetica";e["ArialNarrow-Bold"]="Helvetica-Bold";e["ArialNarrow-BoldItalic"]="Helvetica-BoldOblique";e["ArialNarrow-Italic"]="Helvetica-Oblique";e.ArialBlack="Helvetica";e["ArialBlack-Bold"]="Helvetica-Bold";e["ArialBlack-BoldItalic"]="Helvetica-BoldOblique";e["ArialBlack-Italic"]="Helvetica-Oblique";e["Arial-Black"]="Helvetica";e["Arial-Black-Bold"]="Helvetica-Bold";e["Arial-Black-BoldItalic"]="Helvetica-BoldOblique";e["Arial-Black-Italic"]="Helvetica-Oblique";e.Arial="Helvetica";e["Arial-Bold"]="Helvetica-Bold";e["Arial-BoldItalic"]="Helvetica-BoldOblique";e["Arial-Italic"]="Helvetica-Oblique";e.ArialMT="Helvetica";e["Arial-BoldItalicMT"]="Helvetica-BoldOblique";e["Arial-BoldMT"]="Helvetica-Bold";e["Arial-ItalicMT"]="Helvetica-Oblique";e["Arial-BoldItalicMT-BoldItalic"]="Helvetica-BoldOblique";e["Arial-BoldMT-Bold"]="Helvetica-Bold";e["Arial-ItalicMT-Italic"]="Helvetica-Oblique";e.ArialUnicodeMS="Helvetica";e["ArialUnicodeMS-Bold"]="Helvetica-Bold";e["ArialUnicodeMS-BoldItalic"]="Helvetica-BoldOblique";e["ArialUnicodeMS-Italic"]="Helvetica-Oblique";e["Courier-BoldItalic"]="Courier-BoldOblique";e["Courier-Italic"]="Courier-Oblique";e.CourierNew="Courier";e["CourierNew-Bold"]="Courier-Bold";e["CourierNew-BoldItalic"]="Courier-BoldOblique";e["CourierNew-Italic"]="Courier-Oblique";e["CourierNewPS-BoldItalicMT"]="Courier-BoldOblique";e["CourierNewPS-BoldMT"]="Courier-Bold";e["CourierNewPS-ItalicMT"]="Courier-Oblique";e.CourierNewPSMT="Courier";e["Helvetica-BoldItalic"]="Helvetica-BoldOblique";e["Helvetica-Italic"]="Helvetica-Oblique";e["HelveticaLTStd-Bold"]="Helvetica-Bold";e["Symbol-Bold"]="Symbol";e["Symbol-BoldItalic"]="Symbol";e["Symbol-Italic"]="Symbol";e.TimesNewRoman="Times-Roman";e["TimesNewRoman-Bold"]="Times-Bold";e["TimesNewRoman-BoldItalic"]="Times-BoldItalic";e["TimesNewRoman-Italic"]="Times-Italic";e.TimesNewRomanPS="Times-Roman";e["TimesNewRomanPS-Bold"]="Times-Bold";e["TimesNewRomanPS-BoldItalic"]="Times-BoldItalic";e["TimesNewRomanPS-BoldItalicMT"]="Times-BoldItalic";e["TimesNewRomanPS-BoldMT"]="Times-Bold";e["TimesNewRomanPS-Italic"]="Times-Italic";e["TimesNewRomanPS-ItalicMT"]="Times-Italic";e.TimesNewRomanPSMT="Times-Roman";e["TimesNewRomanPSMT-Bold"]="Times-Bold";e["TimesNewRomanPSMT-BoldItalic"]="Times-BoldItalic";e["TimesNewRomanPSMT-Italic"]="Times-Italic"}),Xa=getLookupTableFactory(function(e){e.Courier="FoxitFixed.pfb";e["Courier-Bold"]="FoxitFixedBold.pfb";e["Courier-BoldOblique"]="FoxitFixedBoldItalic.pfb";e["Courier-Oblique"]="FoxitFixedItalic.pfb";e.Helvetica="LiberationSans-Regular.ttf";e["Helvetica-Bold"]="LiberationSans-Bold.ttf";e["Helvetica-BoldOblique"]="LiberationSans-BoldItalic.ttf";e["Helvetica-Oblique"]="LiberationSans-Italic.ttf";e["Times-Roman"]="FoxitSerif.pfb";e["Times-Bold"]="FoxitSerifBold.pfb";e["Times-BoldItalic"]="FoxitSerifBoldItalic.pfb";e["Times-Italic"]="FoxitSerifItalic.pfb";e.Symbol="FoxitSymbol.pfb";e.ZapfDingbats="FoxitDingbats.pfb";e["LiberationSans-Regular"]="LiberationSans-Regular.ttf";e["LiberationSans-Bold"]="LiberationSans-Bold.ttf";e["LiberationSans-Italic"]="LiberationSans-Italic.ttf";e["LiberationSans-BoldItalic"]="LiberationSans-BoldItalic.ttf"}),Wa=getLookupTableFactory(function(e){e.Calibri="Helvetica";e["Calibri-Bold"]="Helvetica-Bold";e["Calibri-BoldItalic"]="Helvetica-BoldOblique";e["Calibri-Italic"]="Helvetica-Oblique";e.CenturyGothic="Helvetica";e["CenturyGothic-Bold"]="Helvetica-Bold";e["CenturyGothic-BoldItalic"]="Helvetica-BoldOblique";e["CenturyGothic-Italic"]="Helvetica-Oblique";e.ComicSansMS="Comic Sans MS";e["ComicSansMS-Bold"]="Comic Sans MS-Bold";e["ComicSansMS-BoldItalic"]="Comic Sans MS-BoldItalic";e["ComicSansMS-Italic"]="Comic Sans MS-Italic";e.GillSansMT="Helvetica";e["GillSansMT-Bold"]="Helvetica-Bold";e["GillSansMT-BoldItalic"]="Helvetica-BoldOblique";e["GillSansMT-Italic"]="Helvetica-Oblique";e.Impact="Helvetica";e["ItcSymbol-Bold"]="Helvetica-Bold";e["ItcSymbol-BoldItalic"]="Helvetica-BoldOblique";e["ItcSymbol-Book"]="Helvetica";e["ItcSymbol-BookItalic"]="Helvetica-Oblique";e["ItcSymbol-Medium"]="Helvetica";e["ItcSymbol-MediumItalic"]="Helvetica-Oblique";e.LucidaConsole="Courier";e["LucidaConsole-Bold"]="Courier-Bold";e["LucidaConsole-BoldItalic"]="Courier-BoldOblique";e["LucidaConsole-Italic"]="Courier-Oblique";e["LucidaSans-Demi"]="Helvetica-Bold";e["MS-Gothic"]="MS Gothic";e["MS-Gothic-Bold"]="MS Gothic-Bold";e["MS-Gothic-BoldItalic"]="MS Gothic-BoldItalic";e["MS-Gothic-Italic"]="MS Gothic-Italic";e["MS-Mincho"]="MS Mincho";e["MS-Mincho-Bold"]="MS Mincho-Bold";e["MS-Mincho-BoldItalic"]="MS Mincho-BoldItalic";e["MS-Mincho-Italic"]="MS Mincho-Italic";e["MS-PGothic"]="MS PGothic";e["MS-PGothic-Bold"]="MS PGothic-Bold";e["MS-PGothic-BoldItalic"]="MS PGothic-BoldItalic";e["MS-PGothic-Italic"]="MS PGothic-Italic";e["MS-PMincho"]="MS PMincho";e["MS-PMincho-Bold"]="MS PMincho-Bold";e["MS-PMincho-BoldItalic"]="MS PMincho-BoldItalic";e["MS-PMincho-Italic"]="MS PMincho-Italic";e.NuptialScript="Times-Italic";e.SegoeUISymbol="Helvetica"}),Ka=getLookupTableFactory(function(e){e["Adobe Jenson"]=!0;e["Adobe Text"]=!0;e.Albertus=!0;e.Aldus=!0;e.Alexandria=!0;e.Algerian=!0;e["American Typewriter"]=!0;e.Antiqua=!0;e.Apex=!0;e.Arno=!0;e.Aster=!0;e.Aurora=!0;e.Baskerville=!0;e.Bell=!0;e.Bembo=!0;e["Bembo Schoolbook"]=!0;e.Benguiat=!0;e["Berkeley Old Style"]=!0;e["Bernhard Modern"]=!0;e["Berthold City"]=!0;e.Bodoni=!0;e["Bauer Bodoni"]=!0;e["Book Antiqua"]=!0;e.Bookman=!0;e["Bordeaux Roman"]=!0;e["Californian FB"]=!0;e.Calisto=!0;e.Calvert=!0;e.Capitals=!0;e.Cambria=!0;e.Cartier=!0;e.Caslon=!0;e.Catull=!0;e.Centaur=!0;e["Century Old Style"]=!0;e["Century Schoolbook"]=!0;e.Chaparral=!0;e["Charis SIL"]=!0;e.Cheltenham=!0;e["Cholla Slab"]=!0;e.Clarendon=!0;e.Clearface=!0;e.Cochin=!0;e.Colonna=!0;e["Computer Modern"]=!0;e["Concrete Roman"]=!0;e.Constantia=!0;e["Cooper Black"]=!0;e.Corona=!0;e.Ecotype=!0;e.Egyptienne=!0;e.Elephant=!0;e.Excelsior=!0;e.Fairfield=!0;e["FF Scala"]=!0;e.Folkard=!0;e.Footlight=!0;e.FreeSerif=!0;e["Friz Quadrata"]=!0;e.Garamond=!0;e.Gentium=!0;e.Georgia=!0;e.Gloucester=!0;e["Goudy Old Style"]=!0;e["Goudy Schoolbook"]=!0;e["Goudy Pro Font"]=!0;e.Granjon=!0;e["Guardian Egyptian"]=!0;e.Heather=!0;e.Hercules=!0;e["High Tower Text"]=!0;e.Hiroshige=!0;e["Hoefler Text"]=!0;e["Humana Serif"]=!0;e.Imprint=!0;e["Ionic No. 5"]=!0;e.Janson=!0;e.Joanna=!0;e.Korinna=!0;e.Lexicon=!0;e.LiberationSerif=!0;e["Liberation Serif"]=!0;e["Linux Libertine"]=!0;e.Literaturnaya=!0;e.Lucida=!0;e["Lucida Bright"]=!0;e.Melior=!0;e.Memphis=!0;e.Miller=!0;e.Minion=!0;e.Modern=!0;e["Mona Lisa"]=!0;e["Mrs Eaves"]=!0;e["MS Serif"]=!0;e["Museo Slab"]=!0;e["New York"]=!0;e["Nimbus Roman"]=!0;e["NPS Rawlinson Roadway"]=!0;e.NuptialScript=!0;e.Palatino=!0;e.Perpetua=!0;e.Plantin=!0;e["Plantin Schoolbook"]=!0;e.Playbill=!0;e["Poor Richard"]=!0;e["Rawlinson Roadway"]=!0;e.Renault=!0;e.Requiem=!0;e.Rockwell=!0;e.Roman=!0;e["Rotis Serif"]=!0;e.Sabon=!0;e.Scala=!0;e.Seagull=!0;e.Sistina=!0;e.Souvenir=!0;e.STIX=!0;e["Stone Informal"]=!0;e["Stone Serif"]=!0;e.Sylfaen=!0;e.Times=!0;e.Trajan=!0;e["Trinité"]=!0;e["Trump Mediaeval"]=!0;e.Utopia=!0;e["Vale Type"]=!0;e["Bitstream Vera"]=!0;e["Vera Serif"]=!0;e.Versailles=!0;e.Wanted=!0;e.Weiss=!0;e["Wide Latin"]=!0;e.Windsor=!0;e.XITS=!0}),Va=getLookupTableFactory(function(e){e.Dingbats=!0;e.Symbol=!0;e.ZapfDingbats=!0;e.Wingdings=!0;e["Wingdings-Bold"]=!0;e["Wingdings-Regular"]=!0}),Ga=getLookupTableFactory(function(e){e[2]=10;e[3]=32;e[4]=33;e[5]=34;e[6]=35;e[7]=36;e[8]=37;e[9]=38;e[10]=39;e[11]=40;e[12]=41;e[13]=42;e[14]=43;e[15]=44;e[16]=45;e[17]=46;e[18]=47;e[19]=48;e[20]=49;e[21]=50;e[22]=51;e[23]=52;e[24]=53;e[25]=54;e[26]=55;e[27]=56;e[28]=57;e[29]=58;e[30]=894;e[31]=60;e[32]=61;e[33]=62;e[34]=63;e[35]=64;e[36]=65;e[37]=66;e[38]=67;e[39]=68;e[40]=69;e[41]=70;e[42]=71;e[43]=72;e[44]=73;e[45]=74;e[46]=75;e[47]=76;e[48]=77;e[49]=78;e[50]=79;e[51]=80;e[52]=81;e[53]=82;e[54]=83;e[55]=84;e[56]=85;e[57]=86;e[58]=87;e[59]=88;e[60]=89;e[61]=90;e[62]=91;e[63]=92;e[64]=93;e[65]=94;e[66]=95;e[67]=96;e[68]=97;e[69]=98;e[70]=99;e[71]=100;e[72]=101;e[73]=102;e[74]=103;e[75]=104;e[76]=105;e[77]=106;e[78]=107;e[79]=108;e[80]=109;e[81]=110;e[82]=111;e[83]=112;e[84]=113;e[85]=114;e[86]=115;e[87]=116;e[88]=117;e[89]=118;e[90]=119;e[91]=120;e[92]=121;e[93]=122;e[94]=123;e[95]=124;e[96]=125;e[97]=126;e[98]=196;e[99]=197;e[100]=199;e[101]=201;e[102]=209;e[103]=214;e[104]=220;e[105]=225;e[106]=224;e[107]=226;e[108]=228;e[109]=227;e[110]=229;e[111]=231;e[112]=233;e[113]=232;e[114]=234;e[115]=235;e[116]=237;e[117]=236;e[118]=238;e[119]=239;e[120]=241;e[121]=243;e[122]=242;e[123]=244;e[124]=246;e[125]=245;e[126]=250;e[127]=249;e[128]=251;e[129]=252;e[130]=8224;e[131]=176;e[132]=162;e[133]=163;e[134]=167;e[135]=8226;e[136]=182;e[137]=223;e[138]=174;e[139]=169;e[140]=8482;e[141]=180;e[142]=168;e[143]=8800;e[144]=198;e[145]=216;e[146]=8734;e[147]=177;e[148]=8804;e[149]=8805;e[150]=165;e[151]=181;e[152]=8706;e[153]=8721;e[154]=8719;e[156]=8747;e[157]=170;e[158]=186;e[159]=8486;e[160]=230;e[161]=248;e[162]=191;e[163]=161;e[164]=172;e[165]=8730;e[166]=402;e[167]=8776;e[168]=8710;e[169]=171;e[170]=187;e[171]=8230;e[179]=8220;e[180]=8221;e[181]=8216;e[182]=8217;e[200]=193;e[203]=205;e[207]=211;e[210]=218;e[223]=711;e[224]=321;e[225]=322;e[226]=352;e[227]=353;e[228]=381;e[229]=382;e[233]=221;e[234]=253;e[252]=263;e[253]=268;e[254]=269;e[258]=258;e[260]=260;e[261]=261;e[265]=280;e[266]=281;e[267]=282;e[268]=283;e[269]=313;e[275]=323;e[276]=324;e[278]=328;e[283]=344;e[284]=345;e[285]=346;e[286]=347;e[292]=367;e[295]=377;e[296]=378;e[298]=380;e[305]=963;e[306]=964;e[307]=966;e[308]=8215;e[309]=8252;e[310]=8319;e[311]=8359;e[312]=8592;e[313]=8593;e[337]=9552;e[493]=1039;e[494]=1040;e[570]=1040;e[571]=1041;e[572]=1042;e[573]=1043;e[574]=1044;e[575]=1045;e[576]=1046;e[577]=1047;e[578]=1048;e[579]=1049;e[580]=1050;e[581]=1051;e[582]=1052;e[583]=1053;e[584]=1054;e[585]=1055;e[586]=1056;e[587]=1057;e[588]=1058;e[589]=1059;e[590]=1060;e[591]=1061;e[592]=1062;e[593]=1063;e[594]=1064;e[595]=1065;e[596]=1066;e[597]=1067;e[598]=1068;e[599]=1069;e[600]=1070;e[601]=1071;e[602]=1072;e[603]=1073;e[604]=1074;e[605]=1075;e[606]=1076;e[607]=1077;e[608]=1078;e[609]=1079;e[610]=1080;e[611]=1081;e[612]=1082;e[613]=1083;e[614]=1084;e[615]=1085;e[616]=1086;e[617]=1087;e[618]=1088;e[619]=1089;e[620]=1090;e[621]=1091;e[622]=1092;e[623]=1093;e[624]=1094;e[625]=1095;e[626]=1096;e[627]=1097;e[628]=1098;e[629]=1099;e[630]=1100;e[631]=1101;e[632]=1102;e[633]=1103;e[672]=1488;e[673]=1489;e[674]=1490;e[675]=1491;e[676]=1492;e[677]=1493;e[678]=1494;e[679]=1495;e[680]=1496;e[681]=1497;e[682]=1498;e[683]=1499;e[684]=1500;e[685]=1501;e[686]=1502;e[687]=1503;e[688]=1504;e[689]=1505;e[690]=1506;e[691]=1507;e[692]=1508;e[693]=1509;e[694]=1510;e[695]=1511;e[696]=1512;e[697]=1513;e[698]=1514;e[705]=1524;e[706]=8362;e[710]=64288;e[711]=64298;e[759]=1617;e[761]=1776;e[763]=1778;e[775]=1652;e[777]=1764;e[778]=1780;e[779]=1781;e[780]=1782;e[782]=771;e[783]=64726;e[786]=8363;e[788]=8532;e[790]=768;e[791]=769;e[792]=768;e[795]=803;e[797]=64336;e[798]=64337;e[799]=64342;e[800]=64343;e[801]=64344;e[802]=64345;e[803]=64362;e[804]=64363;e[805]=64364;e[2424]=7821;e[2425]=7822;e[2426]=7823;e[2427]=7824;e[2428]=7825;e[2429]=7826;e[2430]=7827;e[2433]=7682;e[2678]=8045;e[2679]=8046;e[2830]=1552;e[2838]=686;e[2840]=751;e[2842]=753;e[2843]=754;e[2844]=755;e[2846]=757;e[2856]=767;e[2857]=848;e[2858]=849;e[2862]=853;e[2863]=854;e[2864]=855;e[2865]=861;e[2866]=862;e[2906]=7460;e[2908]=7462;e[2909]=7463;e[2910]=7464;e[2912]=7466;e[2913]=7467;e[2914]=7468;e[2916]=7470;e[2917]=7471;e[2918]=7472;e[2920]=7474;e[2921]=7475;e[2922]=7476;e[2924]=7478;e[2925]=7479;e[2926]=7480;e[2928]=7482;e[2929]=7483;e[2930]=7484;e[2932]=7486;e[2933]=7487;e[2934]=7488;e[2936]=7490;e[2937]=7491;e[2938]=7492;e[2940]=7494;e[2941]=7495;e[2942]=7496;e[2944]=7498;e[2946]=7500;e[2948]=7502;e[2950]=7504;e[2951]=7505;e[2952]=7506;e[2954]=7508;e[2955]=7509;e[2956]=7510;e[2958]=7512;e[2959]=7513;e[2960]=7514;e[2962]=7516;e[2963]=7517;e[2964]=7518;e[2966]=7520;e[2967]=7521;e[2968]=7522;e[2970]=7524;e[2971]=7525;e[2972]=7526;e[2974]=7528;e[2975]=7529;e[2976]=7530;e[2978]=1537;e[2979]=1538;e[2980]=1539;e[2982]=1549;e[2983]=1551;e[2984]=1552;e[2986]=1554;e[2987]=1555;e[2988]=1556;e[2990]=1623;e[2991]=1624;e[2995]=1775;e[2999]=1791;e[3002]=64290;e[3003]=64291;e[3004]=64292;e[3006]=64294;e[3007]=64295;e[3008]=64296;e[3011]=1900;e[3014]=8223;e[3015]=8244;e[3017]=7532;e[3018]=7533;e[3019]=7534;e[3075]=7590;e[3076]=7591;e[3079]=7594;e[3080]=7595;e[3083]=7598;e[3084]=7599;e[3087]=7602;e[3088]=7603;e[3091]=7606;e[3092]=7607;e[3095]=7610;e[3096]=7611;e[3099]=7614;e[3100]=7615;e[3103]=7618;e[3104]=7619;e[3107]=8337;e[3108]=8338;e[3116]=1884;e[3119]=1885;e[3120]=1885;e[3123]=1886;e[3124]=1886;e[3127]=1887;e[3128]=1887;e[3131]=1888;e[3132]=1888;e[3135]=1889;e[3136]=1889;e[3139]=1890;e[3140]=1890;e[3143]=1891;e[3144]=1891;e[3147]=1892;e[3148]=1892;e[3153]=580;e[3154]=581;e[3157]=584;e[3158]=585;e[3161]=588;e[3162]=589;e[3165]=891;e[3166]=892;e[3169]=1274;e[3170]=1275;e[3173]=1278;e[3174]=1279;e[3181]=7622;e[3182]=7623;e[3282]=11799;e[3316]=578;e[3379]=42785;e[3393]=1159;e[3416]=8377}),$a=getLookupTableFactory(function(e){e[227]=322;e[264]=261;e[291]=346}),Ya=getLookupTableFactory(function(e){e[1]=32;e[4]=65;e[5]=192;e[6]=193;e[9]=196;e[17]=66;e[18]=67;e[21]=268;e[24]=68;e[28]=69;e[29]=200;e[30]=201;e[32]=282;e[38]=70;e[39]=71;e[44]=72;e[47]=73;e[48]=204;e[49]=205;e[58]=74;e[60]=75;e[62]=76;e[68]=77;e[69]=78;e[75]=79;e[76]=210;e[80]=214;e[87]=80;e[89]=81;e[90]=82;e[92]=344;e[94]=83;e[97]=352;e[100]=84;e[104]=85;e[109]=220;e[115]=86;e[116]=87;e[121]=88;e[122]=89;e[124]=221;e[127]=90;e[129]=381;e[258]=97;e[259]=224;e[260]=225;e[263]=228;e[268]=261;e[271]=98;e[272]=99;e[273]=263;e[275]=269;e[282]=100;e[286]=101;e[287]=232;e[288]=233;e[290]=283;e[295]=281;e[296]=102;e[336]=103;e[346]=104;e[349]=105;e[350]=236;e[351]=237;e[361]=106;e[364]=107;e[367]=108;e[371]=322;e[373]=109;e[374]=110;e[381]=111;e[382]=242;e[383]=243;e[386]=246;e[393]=112;e[395]=113;e[396]=114;e[398]=345;e[400]=115;e[401]=347;e[403]=353;e[410]=116;e[437]=117;e[442]=252;e[448]=118;e[449]=119;e[454]=120;e[455]=121;e[457]=253;e[460]=122;e[462]=382;e[463]=380;e[853]=44;e[855]=58;e[856]=46;e[876]=47;e[878]=45;e[882]=45;e[894]=40;e[895]=41;e[896]=91;e[897]=93;e[923]=64;e[940]=163;e[1004]=48;e[1005]=49;e[1006]=50;e[1007]=51;e[1008]=52;e[1009]=53;e[1010]=54;e[1011]=55;e[1012]=56;e[1013]=57;e[1081]=37;e[1085]=43;e[1086]=45});function getStandardFontName(e){const t=normalizeFontName(e);return Ua()[t]}function isKnownFontName(e){const t=normalizeFontName(e);return!!(Ua()[t]||Wa()[t]||Ka()[t]||Va()[t])}class ToUnicodeMap{constructor(e=[]){this._map=e}get length(){return this._map.length}forEach(e){for(const t in this._map)e(t,this._map[t].codePointAt(0))}has(e){return void 0!==this._map[e]}get(e){return this._map[e]}charCodeOf(e){const t=this._map;if(t.length<=65536)return t.indexOf(e);for(const n in t)if(t[n]===e)return 0|n;return-1}amend(e){for(const t in e)this._map[t]=e[t]}}class IdentityToUnicodeMap{constructor(e,t){this.firstChar=e;this.lastChar=t}get length(){return this.lastChar+1-this.firstChar}forEach(e){for(let t=this.firstChar,n=this.lastChar;t<=n;t++)e(t,t)}has(e){return this.firstChar<=e&&e<=this.lastChar}get(e){if(this.firstChar<=e&&e<=this.lastChar)return String.fromCharCode(e)}charCodeOf(e){return Number.isInteger(e)&&e>=this.firstChar&&e<=this.lastChar?e:-1}amend(e){unreachable("Should not call amend()")}}class CFFFont{constructor(e,t){this.properties=t;const n=new CFFParser(e,t,Aa);this.cff=n.parse();this.cff.duplicateFirstGlyph();const a=new CFFCompiler(this.cff);this.seacs=this.cff.seacs;try{this.data=a.compile()}catch{warn("Failed to compile font "+t.loadedName);this.data=e}this._createBuiltInEncoding()}get numGlyphs(){return this.cff.charStrings.count}getCharset(){return this.cff.charset.charset}getGlyphMapping(){const e=this.cff,t=this.properties,{cidToGidMap:n,cMap:a}=t,r=e.charset.charset;let s,i;if(t.composite){let t,o;if(n?.length>0){t=Object.create(null);for(let e=0,a=n.length;e<a;e++){const a=n[e];void 0!==a&&(t[a]=e)}}s=Object.create(null);if(e.isCIDFont)for(i=0;i<r.length;i++){const e=r[i];o=a.charCodeOf(e);void 0!==t?.[o]&&(o=t[o]);s[o]=i}else for(i=0;i<e.charStrings.count;i++){o=a.charCodeOf(i);s[o]=i}return s}let o=e.encoding?e.encoding.encoding:null;t.isInternalFont&&(o=t.defaultEncoding);s=type1FontGlyphMapping(t,o,r);return s}hasGlyphId(e){return this.cff.hasGlyphId(e)}_createBuiltInEncoding(){const{charset:e,encoding:t}=this.cff;if(!e||!t)return;const n=e.charset,a=t.encoding,r=[];for(const e in a){const t=a[e];if(t>=0){const a=n[t];a&&(r[e]=a)}}r.length>0&&(this.properties.builtInEncoding=r)}}function getFloat214(e,t){return readInt16(e,t)/16384}function getSubroutineBias(e){const t=e.length;let n=32768;t<1240?n=107:t<33900&&(n=1131);return n}function parseCmap(e,t,n){const a=1===readUint16(e,t+2)?readUint32(e,t+8):readUint32(e,t+16),r=readUint16(e,t+a);let s,i,o;if(4===r){readUint16(e,t+a+2);const n=readUint16(e,t+a+6)>>1;i=t+a+14;s=[];for(o=0;o<n;o++,i+=2)s[o]={end:readUint16(e,i)};i+=2;for(o=0;o<n;o++,i+=2)s[o].start=readUint16(e,i);for(o=0;o<n;o++,i+=2)s[o].idDelta=readUint16(e,i);for(o=0;o<n;o++,i+=2){let t=readUint16(e,i);if(0!==t){s[o].ids=[];for(let n=0,a=s[o].end-s[o].start+1;n<a;n++){s[o].ids[n]=readUint16(e,i+t);t+=2}}}return s}if(12===r){const n=readUint32(e,t+a+12);i=t+a+16;s=[];for(o=0;o<n;o++){t=readUint32(e,i);s.push({start:t,end:readUint32(e,i+4),idDelta:readUint32(e,i+8)-t});i+=12}return s}throw new FormatError(`unsupported cmap: ${r}`)}function parseCff(e,t,n,a){const r=new CFFParser(new Stream(e,t,n-t),{},a).parse();return{glyphs:r.charStrings.objects,subrs:r.topDict.privateDict?.subrsIndex?.objects,gsubrs:r.globalSubrIndex?.objects,isCFFCIDFont:r.isCIDFont,fdSelect:r.fdSelect,fdArray:r.fdArray}}function lookupCmap(e,t){const n=t.codePointAt(0);let a=0,r=0,s=e.length-1;for(;r<s;){const t=r+s+1>>1;n<e[t].start?s=t-1:r=t}e[r].start<=n&&n<=e[r].end&&(a=e[r].idDelta+(e[r].ids?e[r].ids[n-e[r].start]:n)&65535);return{charCode:n,glyphId:a}}function compileGlyf(e,t,n){function moveTo(e,n){i&&t.add(Jt,i);i=[e,n];t.add(Yt,[e,n])}function lineTo(e,n){t.add(Jt,[e,n])}function quadraticCurveTo(e,n,a,r){t.add(Zt,[e,n,a,r])}let a=0;const r=readInt16(e,a);let s,i=null,o=0,l=0;a+=10;if(r<0)do{s=readUint16(e,a);const r=readUint16(e,a+2);a+=4;let i,f;if(1&s){if(2&s){i=readInt16(e,a);f=readInt16(e,a+2)}else{i=readUint16(e,a);f=readUint16(e,a+2)}a+=4}else if(2&s){i=readInt8(e,a++);f=readInt8(e,a++)}else{i=e[a++];f=e[a++]}if(2&s){o=i;l=f}else{o=0;l=0}let c=1,h=1,u=0,m=0;if(8&s){c=h=getFloat214(e,a);a+=2}else if(64&s){c=getFloat214(e,a);h=getFloat214(e,a+2);a+=4}else if(128&s){c=getFloat214(e,a);u=getFloat214(e,a+2);m=getFloat214(e,a+4);h=getFloat214(e,a+6);a+=8}const p=n.glyphs[r];if(p){t.save();t.transform([c,u,m,h,o,l]);compileGlyf(p,t,n);t.restore()}}while(32&s);else{const t=[];let n,i;for(n=0;n<r;n++){t.push(readUint16(e,a));a+=2}a+=2+readUint16(e,a);const f=t.at(-1)+1,c=[];for(;c.length<f;){s=e[a++];let t=1;8&s&&(t+=e[a++]);for(;t-- >0;)c.push({flags:s})}for(n=0;n<f;n++){switch(18&c[n].flags){case 0:o+=readInt16(e,a);a+=2;break;case 2:o-=e[a++];break;case 18:o+=e[a++]}c[n].x=o}for(n=0;n<f;n++){switch(36&c[n].flags){case 0:l+=readInt16(e,a);a+=2;break;case 4:l-=e[a++];break;case 36:l+=e[a++]}c[n].y=l}let h=0;for(a=0;a<r;a++){const e=t[a],r=c.slice(h,e+1);if(1&r[0].flags)r.push(r[0]);else if(1&r.at(-1).flags)r.unshift(r.at(-1));else{const e={flags:1,x:(r[0].x+r.at(-1).x)/2,y:(r[0].y+r.at(-1).y)/2};r.unshift(e);r.push(e)}moveTo(r[0].x,r[0].y);for(n=1,i=r.length;n<i;n++)if(1&r[n].flags)lineTo(r[n].x,r[n].y);else if(1&r[n+1].flags){quadraticCurveTo(r[n].x,r[n].y,r[n+1].x,r[n+1].y);n++}else quadraticCurveTo(r[n].x,r[n].y,(r[n].x+r[n+1].x)/2,(r[n].y+r[n+1].y)/2);h=e+1}}}function compileCharString(e,t,n,a){function moveTo(e,n){l&&t.add(Jt,l);l=[e,n];t.add(Yt,[e,n])}function lineTo(e,n){t.add(Jt,[e,n])}function bezierCurveTo(e,n,a,r,s,i){t.add(Qt,[e,n,a,r,s,i])}const r=[];let s=0,i=0,o=0,l=null;!function parse(e){let l=0;for(;l<e.length;){let f,c,h,u,m,p,d,g,b,w=!1,j=e[l++];switch(j){case 1:case 3:case 18:case 23:o+=r.length>>1;w=!0;break;case 4:i+=r.pop();moveTo(s,i);w=!0;break;case 5:for(;r.length>0;){s+=r.shift();i+=r.shift();lineTo(s,i)}break;case 6:for(;r.length>0;){s+=r.shift();lineTo(s,i);if(0===r.length)break;i+=r.shift();lineTo(s,i)}break;case 7:for(;r.length>0;){i+=r.shift();lineTo(s,i);if(0===r.length)break;s+=r.shift();lineTo(s,i)}break;case 8:for(;r.length>0;){f=s+r.shift();h=i+r.shift();c=f+r.shift();u=h+r.shift();s=c+r.shift();i=u+r.shift();bezierCurveTo(f,h,c,u,s,i)}break;case 10:g=r.pop();b=null;if(n.isCFFCIDFont){const e=n.fdSelect.getFDIndex(a);if(e>=0&&e<n.fdArray.length){const t=n.fdArray[e];let a;t.privateDict?.subrsIndex&&(a=t.privateDict.subrsIndex.objects);if(a){g+=getSubroutineBias(a);b=a[g]}}else warn("Invalid fd index for glyph index.")}else b=n.subrs[g+n.subrsBias];b&&parse(b);break;case 11:return;case 12:j=e[l++];switch(j){case 34:f=s+r.shift();c=f+r.shift();m=i+r.shift();s=c+r.shift();bezierCurveTo(f,i,c,m,s,m);f=s+r.shift();c=f+r.shift();s=c+r.shift();bezierCurveTo(f,m,c,i,s,i);break;case 35:f=s+r.shift();h=i+r.shift();c=f+r.shift();u=h+r.shift();s=c+r.shift();i=u+r.shift();bezierCurveTo(f,h,c,u,s,i);f=s+r.shift();h=i+r.shift();c=f+r.shift();u=h+r.shift();s=c+r.shift();i=u+r.shift();bezierCurveTo(f,h,c,u,s,i);r.pop();break;case 36:f=s+r.shift();m=i+r.shift();c=f+r.shift();p=m+r.shift();s=c+r.shift();bezierCurveTo(f,m,c,p,s,p);f=s+r.shift();c=f+r.shift();d=p+r.shift();s=c+r.shift();bezierCurveTo(f,p,c,d,s,i);break;case 37:const e=s,t=i;f=s+r.shift();h=i+r.shift();c=f+r.shift();u=h+r.shift();s=c+r.shift();i=u+r.shift();bezierCurveTo(f,h,c,u,s,i);f=s+r.shift();h=i+r.shift();c=f+r.shift();u=h+r.shift();s=c;i=u;Math.abs(s-e)>Math.abs(i-t)?s+=r.shift():i+=r.shift();bezierCurveTo(f,h,c,u,s,i);break;default:throw new FormatError(`unknown operator: 12 ${j}`)}break;case 14:if(r.length>=4){const e=r.pop(),a=r.pop();i=r.pop();s=r.pop();t.save();t.translate(s,i);let o=lookupCmap(n.cmap,String.fromCharCode(n.glyphNameMap[ga[e]]));compileCharString(n.glyphs[o.glyphId],t,n,o.glyphId);t.restore();o=lookupCmap(n.cmap,String.fromCharCode(n.glyphNameMap[ga[a]]));compileCharString(n.glyphs[o.glyphId],t,n,o.glyphId)}return;case 19:case 20:o+=r.length>>1;l+=o+7>>3;w=!0;break;case 21:i+=r.pop();s+=r.pop();moveTo(s,i);w=!0;break;case 22:s+=r.pop();moveTo(s,i);w=!0;break;case 24:for(;r.length>2;){f=s+r.shift();h=i+r.shift();c=f+r.shift();u=h+r.shift();s=c+r.shift();i=u+r.shift();bezierCurveTo(f,h,c,u,s,i)}s+=r.shift();i+=r.shift();lineTo(s,i);break;case 25:for(;r.length>6;){s+=r.shift();i+=r.shift();lineTo(s,i)}f=s+r.shift();h=i+r.shift();c=f+r.shift();u=h+r.shift();s=c+r.shift();i=u+r.shift();bezierCurveTo(f,h,c,u,s,i);break;case 26:r.length%2&&(s+=r.shift());for(;r.length>0;){f=s;h=i+r.shift();c=f+r.shift();u=h+r.shift();s=c;i=u+r.shift();bezierCurveTo(f,h,c,u,s,i)}break;case 27:r.length%2&&(i+=r.shift());for(;r.length>0;){f=s+r.shift();h=i;c=f+r.shift();u=h+r.shift();s=c+r.shift();i=u;bezierCurveTo(f,h,c,u,s,i)}break;case 28:r.push(readInt16(e,l));l+=2;break;case 29:g=r.pop()+n.gsubrsBias;b=n.gsubrs[g];b&&parse(b);break;case 30:for(;r.length>0;){f=s;h=i+r.shift();c=f+r.shift();u=h+r.shift();s=c+r.shift();i=u+(1===r.length?r.shift():0);bezierCurveTo(f,h,c,u,s,i);if(0===r.length)break;f=s+r.shift();h=i;c=f+r.shift();u=h+r.shift();i=u+r.shift();s=c+(1===r.length?r.shift():0);bezierCurveTo(f,h,c,u,s,i)}break;case 31:for(;r.length>0;){f=s+r.shift();h=i;c=f+r.shift();u=h+r.shift();i=u+r.shift();s=c+(1===r.length?r.shift():0);bezierCurveTo(f,h,c,u,s,i);if(0===r.length)break;f=s;h=i+r.shift();c=f+r.shift();u=h+r.shift();s=c+r.shift();i=u+(1===r.length?r.shift():0);bezierCurveTo(f,h,c,u,s,i)}break;default:if(j<32)throw new FormatError(`unknown operator: ${j}`);if(j<247)r.push(j-139);else if(j<251)r.push(256*(j-247)+e[l++]+108);else if(j<255)r.push(256*-(j-251)-e[l++]-108);else{r.push((e[l]<<24|e[l+1]<<16|e[l+2]<<8|e[l+3])/65536);l+=4}}w&&(r.length=0)}}(e)}class Commands{cmds=[];transformStack=[];currentTransform=[1,0,0,1,0,0];add(e,t){if(t){const{currentTransform:n}=this;for(let e=0,a=t.length;e<a;e+=2)Util.applyTransform(t,n,e);this.cmds.push(e,...t)}else this.cmds.push(e)}transform(e){this.currentTransform=Util.transform(this.currentTransform,e)}translate(e,t){this.transform([1,0,0,1,e,t])}save(){this.transformStack.push(this.currentTransform.slice())}restore(){this.currentTransform=this.transformStack.pop()||[1,0,0,1,0,0]}getPath(){return new(FeatureTest.isFloat16ArraySupported?Float16Array:Float32Array)(this.cmds)}}class CompiledFont{constructor(e){this.fontMatrix=e;this.compiledGlyphs=Object.create(null);this.compiledCharCodeToGlyphId=Object.create(null)}getPathJs(e){const{charCode:t,glyphId:n}=lookupCmap(this.cmap,e);let a,r=this.compiledGlyphs[n];if(void 0===r){try{r=this.compileGlyph(this.glyphs[n],n)}catch(e){r="";a=e}this.compiledGlyphs[n]=r}this.compiledCharCodeToGlyphId[t]??=n;if(a)throw a;return r}compileGlyph(e,t){if(!e?.length||14===e[0])return"";let n=this.fontMatrix;if(this.isCFFCIDFont){const e=this.fdSelect.getFDIndex(t);if(e>=0&&e<this.fdArray.length){n=this.fdArray[e].getByName("FontMatrix")||a}else warn("Invalid fd index for glyph index.")}assert(isNumberArray(n,6),"Expected a valid fontMatrix.");const r=new Commands;r.transform(n.slice());this.compileGlyphImpl(e,r,t);r.add(en);return r.getPath()}compileGlyphImpl(){unreachable("Children classes should implement this.")}hasBuiltPath(e){const{charCode:t,glyphId:n}=lookupCmap(this.cmap,e);return void 0!==this.compiledGlyphs[n]&&void 0!==this.compiledCharCodeToGlyphId[t]}}class TrueTypeCompiled extends CompiledFont{constructor(e,t,n){super(n||[488e-6,0,0,488e-6,0,0]);this.glyphs=e;this.cmap=t}compileGlyphImpl(e,t){compileGlyf(e,t,this)}}class Type2Compiled extends CompiledFont{constructor(e,t,n){super(n||[.001,0,0,.001,0,0]);this.glyphs=e.glyphs;this.gsubrs=e.gsubrs||[];this.subrs=e.subrs||[];this.cmap=t;this.glyphNameMap=ka();this.gsubrsBias=getSubroutineBias(this.gsubrs);this.subrsBias=getSubroutineBias(this.subrs);this.isCFFCIDFont=e.isCFFCIDFont;this.fdSelect=e.fdSelect;this.fdArray=e.fdArray}compileGlyphImpl(e,t,n){compileCharString(e,t,this,n)}}class FontRendererFactory{static create(e,t){const n=new Uint8Array(e.data);let a,r,s,i,o,l;const f=readUint16(n,4);for(let e=0,c=12;e<f;e++,c+=16){const e=bytesToString(n.subarray(c,c+4)),f=readUint32(n,c+8),h=readUint32(n,c+12);switch(e){case"cmap":a=parseCmap(n,f);break;case"glyf":r=n.subarray(f,f+h);break;case"loca":s=n.subarray(f,f+h);break;case"head":l=readUint16(n,f+18);o=readUint16(n,f+50);break;case"CFF ":i=parseCff(n,f,f+h,t)}}if(r){const t=l?[1/l,0,0,1/l,0,0]:e.fontMatrix;return new TrueTypeCompiled(function parseGlyfTable(e,t,n){let a,r;if(n){a=4;r=readUint32}else{a=2;r=(e,t)=>2*readUint16(e,t)}const s=[];let i=r(t,0);for(let n=a;n<t.length;n+=a){const a=r(t,n);s.push(e.subarray(i,a));i=a}return s}(r,s,o),a,t)}return new Type2Compiled(i,a,e.fontMatrix)}}const Ja=getLookupTableFactory(function(e){e.Courier=600;e["Courier-Bold"]=600;e["Courier-BoldOblique"]=600;e["Courier-Oblique"]=600;e.Helvetica=getLookupTableFactory(function(e){e.space=278;e.exclam=278;e.quotedbl=355;e.numbersign=556;e.dollar=556;e.percent=889;e.ampersand=667;e.quoteright=222;e.parenleft=333;e.parenright=333;e.asterisk=389;e.plus=584;e.comma=278;e.hyphen=333;e.period=278;e.slash=278;e.zero=556;e.one=556;e.two=556;e.three=556;e.four=556;e.five=556;e.six=556;e.seven=556;e.eight=556;e.nine=556;e.colon=278;e.semicolon=278;e.less=584;e.equal=584;e.greater=584;e.question=556;e.at=1015;e.A=667;e.B=667;e.C=722;e.D=722;e.E=667;e.F=611;e.G=778;e.H=722;e.I=278;e.J=500;e.K=667;e.L=556;e.M=833;e.N=722;e.O=778;e.P=667;e.Q=778;e.R=722;e.S=667;e.T=611;e.U=722;e.V=667;e.W=944;e.X=667;e.Y=667;e.Z=611;e.bracketleft=278;e.backslash=278;e.bracketright=278;e.asciicircum=469;e.underscore=556;e.quoteleft=222;e.a=556;e.b=556;e.c=500;e.d=556;e.e=556;e.f=278;e.g=556;e.h=556;e.i=222;e.j=222;e.k=500;e.l=222;e.m=833;e.n=556;e.o=556;e.p=556;e.q=556;e.r=333;e.s=500;e.t=278;e.u=556;e.v=500;e.w=722;e.x=500;e.y=500;e.z=500;e.braceleft=334;e.bar=260;e.braceright=334;e.asciitilde=584;e.exclamdown=333;e.cent=556;e.sterling=556;e.fraction=167;e.yen=556;e.florin=556;e.section=556;e.currency=556;e.quotesingle=191;e.quotedblleft=333;e.guillemotleft=556;e.guilsinglleft=333;e.guilsinglright=333;e.fi=500;e.fl=500;e.endash=556;e.dagger=556;e.daggerdbl=556;e.periodcentered=278;e.paragraph=537;e.bullet=350;e.quotesinglbase=222;e.quotedblbase=333;e.quotedblright=333;e.guillemotright=556;e.ellipsis=1e3;e.perthousand=1e3;e.questiondown=611;e.grave=333;e.acute=333;e.circumflex=333;e.tilde=333;e.macron=333;e.breve=333;e.dotaccent=333;e.dieresis=333;e.ring=333;e.cedilla=333;e.hungarumlaut=333;e.ogonek=333;e.caron=333;e.emdash=1e3;e.AE=1e3;e.ordfeminine=370;e.Lslash=556;e.Oslash=778;e.OE=1e3;e.ordmasculine=365;e.ae=889;e.dotlessi=278;e.lslash=222;e.oslash=611;e.oe=944;e.germandbls=611;e.Idieresis=278;e.eacute=556;e.abreve=556;e.uhungarumlaut=556;e.ecaron=556;e.Ydieresis=667;e.divide=584;e.Yacute=667;e.Acircumflex=667;e.aacute=556;e.Ucircumflex=722;e.yacute=500;e.scommaaccent=500;e.ecircumflex=556;e.Uring=722;e.Udieresis=722;e.aogonek=556;e.Uacute=722;e.uogonek=556;e.Edieresis=667;e.Dcroat=722;e.commaaccent=250;e.copyright=737;e.Emacron=667;e.ccaron=500;e.aring=556;e.Ncommaaccent=722;e.lacute=222;e.agrave=556;e.Tcommaaccent=611;e.Cacute=722;e.atilde=556;e.Edotaccent=667;e.scaron=500;e.scedilla=500;e.iacute=278;e.lozenge=471;e.Rcaron=722;e.Gcommaaccent=778;e.ucircumflex=556;e.acircumflex=556;e.Amacron=667;e.rcaron=333;e.ccedilla=500;e.Zdotaccent=611;e.Thorn=667;e.Omacron=778;e.Racute=722;e.Sacute=667;e.dcaron=643;e.Umacron=722;e.uring=556;e.threesuperior=333;e.Ograve=778;e.Agrave=667;e.Abreve=667;e.multiply=584;e.uacute=556;e.Tcaron=611;e.partialdiff=476;e.ydieresis=500;e.Nacute=722;e.icircumflex=278;e.Ecircumflex=667;e.adieresis=556;e.edieresis=556;e.cacute=500;e.nacute=556;e.umacron=556;e.Ncaron=722;e.Iacute=278;e.plusminus=584;e.brokenbar=260;e.registered=737;e.Gbreve=778;e.Idotaccent=278;e.summation=600;e.Egrave=667;e.racute=333;e.omacron=556;e.Zacute=611;e.Zcaron=611;e.greaterequal=549;e.Eth=722;e.Ccedilla=722;e.lcommaaccent=222;e.tcaron=317;e.eogonek=556;e.Uogonek=722;e.Aacute=667;e.Adieresis=667;e.egrave=556;e.zacute=500;e.iogonek=222;e.Oacute=778;e.oacute=556;e.amacron=556;e.sacute=500;e.idieresis=278;e.Ocircumflex=778;e.Ugrave=722;e.Delta=612;e.thorn=556;e.twosuperior=333;e.Odieresis=778;e.mu=556;e.igrave=278;e.ohungarumlaut=556;e.Eogonek=667;e.dcroat=556;e.threequarters=834;e.Scedilla=667;e.lcaron=299;e.Kcommaaccent=667;e.Lacute=556;e.trademark=1e3;e.edotaccent=556;e.Igrave=278;e.Imacron=278;e.Lcaron=556;e.onehalf=834;e.lessequal=549;e.ocircumflex=556;e.ntilde=556;e.Uhungarumlaut=722;e.Eacute=667;e.emacron=556;e.gbreve=556;e.onequarter=834;e.Scaron=667;e.Scommaaccent=667;e.Ohungarumlaut=778;e.degree=400;e.ograve=556;e.Ccaron=722;e.ugrave=556;e.radical=453;e.Dcaron=722;e.rcommaaccent=333;e.Ntilde=722;e.otilde=556;e.Rcommaaccent=722;e.Lcommaaccent=556;e.Atilde=667;e.Aogonek=667;e.Aring=667;e.Otilde=778;e.zdotaccent=500;e.Ecaron=667;e.Iogonek=278;e.kcommaaccent=500;e.minus=584;e.Icircumflex=278;e.ncaron=556;e.tcommaaccent=278;e.logicalnot=584;e.odieresis=556;e.udieresis=556;e.notequal=549;e.gcommaaccent=556;e.eth=556;e.zcaron=500;e.ncommaaccent=556;e.onesuperior=333;e.imacron=278;e.Euro=556});e["Helvetica-Bold"]=getLookupTableFactory(function(e){e.space=278;e.exclam=333;e.quotedbl=474;e.numbersign=556;e.dollar=556;e.percent=889;e.ampersand=722;e.quoteright=278;e.parenleft=333;e.parenright=333;e.asterisk=389;e.plus=584;e.comma=278;e.hyphen=333;e.period=278;e.slash=278;e.zero=556;e.one=556;e.two=556;e.three=556;e.four=556;e.five=556;e.six=556;e.seven=556;e.eight=556;e.nine=556;e.colon=333;e.semicolon=333;e.less=584;e.equal=584;e.greater=584;e.question=611;e.at=975;e.A=722;e.B=722;e.C=722;e.D=722;e.E=667;e.F=611;e.G=778;e.H=722;e.I=278;e.J=556;e.K=722;e.L=611;e.M=833;e.N=722;e.O=778;e.P=667;e.Q=778;e.R=722;e.S=667;e.T=611;e.U=722;e.V=667;e.W=944;e.X=667;e.Y=667;e.Z=611;e.bracketleft=333;e.backslash=278;e.bracketright=333;e.asciicircum=584;e.underscore=556;e.quoteleft=278;e.a=556;e.b=611;e.c=556;e.d=611;e.e=556;e.f=333;e.g=611;e.h=611;e.i=278;e.j=278;e.k=556;e.l=278;e.m=889;e.n=611;e.o=611;e.p=611;e.q=611;e.r=389;e.s=556;e.t=333;e.u=611;e.v=556;e.w=778;e.x=556;e.y=556;e.z=500;e.braceleft=389;e.bar=280;e.braceright=389;e.asciitilde=584;e.exclamdown=333;e.cent=556;e.sterling=556;e.fraction=167;e.yen=556;e.florin=556;e.section=556;e.currency=556;e.quotesingle=238;e.quotedblleft=500;e.guillemotleft=556;e.guilsinglleft=333;e.guilsinglright=333;e.fi=611;e.fl=611;e.endash=556;e.dagger=556;e.daggerdbl=556;e.periodcentered=278;e.paragraph=556;e.bullet=350;e.quotesinglbase=278;e.quotedblbase=500;e.quotedblright=500;e.guillemotright=556;e.ellipsis=1e3;e.perthousand=1e3;e.questiondown=611;e.grave=333;e.acute=333;e.circumflex=333;e.tilde=333;e.macron=333;e.breve=333;e.dotaccent=333;e.dieresis=333;e.ring=333;e.cedilla=333;e.hungarumlaut=333;e.ogonek=333;e.caron=333;e.emdash=1e3;e.AE=1e3;e.ordfeminine=370;e.Lslash=611;e.Oslash=778;e.OE=1e3;e.ordmasculine=365;e.ae=889;e.dotlessi=278;e.lslash=278;e.oslash=611;e.oe=944;e.germandbls=611;e.Idieresis=278;e.eacute=556;e.abreve=556;e.uhungarumlaut=611;e.ecaron=556;e.Ydieresis=667;e.divide=584;e.Yacute=667;e.Acircumflex=722;e.aacute=556;e.Ucircumflex=722;e.yacute=556;e.scommaaccent=556;e.ecircumflex=556;e.Uring=722;e.Udieresis=722;e.aogonek=556;e.Uacute=722;e.uogonek=611;e.Edieresis=667;e.Dcroat=722;e.commaaccent=250;e.copyright=737;e.Emacron=667;e.ccaron=556;e.aring=556;e.Ncommaaccent=722;e.lacute=278;e.agrave=556;e.Tcommaaccent=611;e.Cacute=722;e.atilde=556;e.Edotaccent=667;e.scaron=556;e.scedilla=556;e.iacute=278;e.lozenge=494;e.Rcaron=722;e.Gcommaaccent=778;e.ucircumflex=611;e.acircumflex=556;e.Amacron=722;e.rcaron=389;e.ccedilla=556;e.Zdotaccent=611;e.Thorn=667;e.Omacron=778;e.Racute=722;e.Sacute=667;e.dcaron=743;e.Umacron=722;e.uring=611;e.threesuperior=333;e.Ograve=778;e.Agrave=722;e.Abreve=722;e.multiply=584;e.uacute=611;e.Tcaron=611;e.partialdiff=494;e.ydieresis=556;e.Nacute=722;e.icircumflex=278;e.Ecircumflex=667;e.adieresis=556;e.edieresis=556;e.cacute=556;e.nacute=611;e.umacron=611;e.Ncaron=722;e.Iacute=278;e.plusminus=584;e.brokenbar=280;e.registered=737;e.Gbreve=778;e.Idotaccent=278;e.summation=600;e.Egrave=667;e.racute=389;e.omacron=611;e.Zacute=611;e.Zcaron=611;e.greaterequal=549;e.Eth=722;e.Ccedilla=722;e.lcommaaccent=278;e.tcaron=389;e.eogonek=556;e.Uogonek=722;e.Aacute=722;e.Adieresis=722;e.egrave=556;e.zacute=500;e.iogonek=278;e.Oacute=778;e.oacute=611;e.amacron=556;e.sacute=556;e.idieresis=278;e.Ocircumflex=778;e.Ugrave=722;e.Delta=612;e.thorn=611;e.twosuperior=333;e.Odieresis=778;e.mu=611;e.igrave=278;e.ohungarumlaut=611;e.Eogonek=667;e.dcroat=611;e.threequarters=834;e.Scedilla=667;e.lcaron=400;e.Kcommaaccent=722;e.Lacute=611;e.trademark=1e3;e.edotaccent=556;e.Igrave=278;e.Imacron=278;e.Lcaron=611;e.onehalf=834;e.lessequal=549;e.ocircumflex=611;e.ntilde=611;e.Uhungarumlaut=722;e.Eacute=667;e.emacron=556;e.gbreve=611;e.onequarter=834;e.Scaron=667;e.Scommaaccent=667;e.Ohungarumlaut=778;e.degree=400;e.ograve=611;e.Ccaron=722;e.ugrave=611;e.radical=549;e.Dcaron=722;e.rcommaaccent=389;e.Ntilde=722;e.otilde=611;e.Rcommaaccent=722;e.Lcommaaccent=611;e.Atilde=722;e.Aogonek=722;e.Aring=722;e.Otilde=778;e.zdotaccent=500;e.Ecaron=667;e.Iogonek=278;e.kcommaaccent=556;e.minus=584;e.Icircumflex=278;e.ncaron=611;e.tcommaaccent=333;e.logicalnot=584;e.odieresis=611;e.udieresis=611;e.notequal=549;e.gcommaaccent=611;e.eth=611;e.zcaron=500;e.ncommaaccent=611;e.onesuperior=333;e.imacron=278;e.Euro=556});e["Helvetica-BoldOblique"]=getLookupTableFactory(function(e){e.space=278;e.exclam=333;e.quotedbl=474;e.numbersign=556;e.dollar=556;e.percent=889;e.ampersand=722;e.quoteright=278;e.parenleft=333;e.parenright=333;e.asterisk=389;e.plus=584;e.comma=278;e.hyphen=333;e.period=278;e.slash=278;e.zero=556;e.one=556;e.two=556;e.three=556;e.four=556;e.five=556;e.six=556;e.seven=556;e.eight=556;e.nine=556;e.colon=333;e.semicolon=333;e.less=584;e.equal=584;e.greater=584;e.question=611;e.at=975;e.A=722;e.B=722;e.C=722;e.D=722;e.E=667;e.F=611;e.G=778;e.H=722;e.I=278;e.J=556;e.K=722;e.L=611;e.M=833;e.N=722;e.O=778;e.P=667;e.Q=778;e.R=722;e.S=667;e.T=611;e.U=722;e.V=667;e.W=944;e.X=667;e.Y=667;e.Z=611;e.bracketleft=333;e.backslash=278;e.bracketright=333;e.asciicircum=584;e.underscore=556;e.quoteleft=278;e.a=556;e.b=611;e.c=556;e.d=611;e.e=556;e.f=333;e.g=611;e.h=611;e.i=278;e.j=278;e.k=556;e.l=278;e.m=889;e.n=611;e.o=611;e.p=611;e.q=611;e.r=389;e.s=556;e.t=333;e.u=611;e.v=556;e.w=778;e.x=556;e.y=556;e.z=500;e.braceleft=389;e.bar=280;e.braceright=389;e.asciitilde=584;e.exclamdown=333;e.cent=556;e.sterling=556;e.fraction=167;e.yen=556;e.florin=556;e.section=556;e.currency=556;e.quotesingle=238;e.quotedblleft=500;e.guillemotleft=556;e.guilsinglleft=333;e.guilsinglright=333;e.fi=611;e.fl=611;e.endash=556;e.dagger=556;e.daggerdbl=556;e.periodcentered=278;e.paragraph=556;e.bullet=350;e.quotesinglbase=278;e.quotedblbase=500;e.quotedblright=500;e.guillemotright=556;e.ellipsis=1e3;e.perthousand=1e3;e.questiondown=611;e.grave=333;e.acute=333;e.circumflex=333;e.tilde=333;e.macron=333;e.breve=333;e.dotaccent=333;e.dieresis=333;e.ring=333;e.cedilla=333;e.hungarumlaut=333;e.ogonek=333;e.caron=333;e.emdash=1e3;e.AE=1e3;e.ordfeminine=370;e.Lslash=611;e.Oslash=778;e.OE=1e3;e.ordmasculine=365;e.ae=889;e.dotlessi=278;e.lslash=278;e.oslash=611;e.oe=944;e.germandbls=611;e.Idieresis=278;e.eacute=556;e.abreve=556;e.uhungarumlaut=611;e.ecaron=556;e.Ydieresis=667;e.divide=584;e.Yacute=667;e.Acircumflex=722;e.aacute=556;e.Ucircumflex=722;e.yacute=556;e.scommaaccent=556;e.ecircumflex=556;e.Uring=722;e.Udieresis=722;e.aogonek=556;e.Uacute=722;e.uogonek=611;e.Edieresis=667;e.Dcroat=722;e.commaaccent=250;e.copyright=737;e.Emacron=667;e.ccaron=556;e.aring=556;e.Ncommaaccent=722;e.lacute=278;e.agrave=556;e.Tcommaaccent=611;e.Cacute=722;e.atilde=556;e.Edotaccent=667;e.scaron=556;e.scedilla=556;e.iacute=278;e.lozenge=494;e.Rcaron=722;e.Gcommaaccent=778;e.ucircumflex=611;e.acircumflex=556;e.Amacron=722;e.rcaron=389;e.ccedilla=556;e.Zdotaccent=611;e.Thorn=667;e.Omacron=778;e.Racute=722;e.Sacute=667;e.dcaron=743;e.Umacron=722;e.uring=611;e.threesuperior=333;e.Ograve=778;e.Agrave=722;e.Abreve=722;e.multiply=584;e.uacute=611;e.Tcaron=611;e.partialdiff=494;e.ydieresis=556;e.Nacute=722;e.icircumflex=278;e.Ecircumflex=667;e.adieresis=556;e.edieresis=556;e.cacute=556;e.nacute=611;e.umacron=611;e.Ncaron=722;e.Iacute=278;e.plusminus=584;e.brokenbar=280;e.registered=737;e.Gbreve=778;e.Idotaccent=278;e.summation=600;e.Egrave=667;e.racute=389;e.omacron=611;e.Zacute=611;e.Zcaron=611;e.greaterequal=549;e.Eth=722;e.Ccedilla=722;e.lcommaaccent=278;e.tcaron=389;e.eogonek=556;e.Uogonek=722;e.Aacute=722;e.Adieresis=722;e.egrave=556;e.zacute=500;e.iogonek=278;e.Oacute=778;e.oacute=611;e.amacron=556;e.sacute=556;e.idieresis=278;e.Ocircumflex=778;e.Ugrave=722;e.Delta=612;e.thorn=611;e.twosuperior=333;e.Odieresis=778;e.mu=611;e.igrave=278;e.ohungarumlaut=611;e.Eogonek=667;e.dcroat=611;e.threequarters=834;e.Scedilla=667;e.lcaron=400;e.Kcommaaccent=722;e.Lacute=611;e.trademark=1e3;e.edotaccent=556;e.Igrave=278;e.Imacron=278;e.Lcaron=611;e.onehalf=834;e.lessequal=549;e.ocircumflex=611;e.ntilde=611;e.Uhungarumlaut=722;e.Eacute=667;e.emacron=556;e.gbreve=611;e.onequarter=834;e.Scaron=667;e.Scommaaccent=667;e.Ohungarumlaut=778;e.degree=400;e.ograve=611;e.Ccaron=722;e.ugrave=611;e.radical=549;e.Dcaron=722;e.rcommaaccent=389;e.Ntilde=722;e.otilde=611;e.Rcommaaccent=722;e.Lcommaaccent=611;e.Atilde=722;e.Aogonek=722;e.Aring=722;e.Otilde=778;e.zdotaccent=500;e.Ecaron=667;e.Iogonek=278;e.kcommaaccent=556;e.minus=584;e.Icircumflex=278;e.ncaron=611;e.tcommaaccent=333;e.logicalnot=584;e.odieresis=611;e.udieresis=611;e.notequal=549;e.gcommaaccent=611;e.eth=611;e.zcaron=500;e.ncommaaccent=611;e.onesuperior=333;e.imacron=278;e.Euro=556});e["Helvetica-Oblique"]=getLookupTableFactory(function(e){e.space=278;e.exclam=278;e.quotedbl=355;e.numbersign=556;e.dollar=556;e.percent=889;e.ampersand=667;e.quoteright=222;e.parenleft=333;e.parenright=333;e.asterisk=389;e.plus=584;e.comma=278;e.hyphen=333;e.period=278;e.slash=278;e.zero=556;e.one=556;e.two=556;e.three=556;e.four=556;e.five=556;e.six=556;e.seven=556;e.eight=556;e.nine=556;e.colon=278;e.semicolon=278;e.less=584;e.equal=584;e.greater=584;e.question=556;e.at=1015;e.A=667;e.B=667;e.C=722;e.D=722;e.E=667;e.F=611;e.G=778;e.H=722;e.I=278;e.J=500;e.K=667;e.L=556;e.M=833;e.N=722;e.O=778;e.P=667;e.Q=778;e.R=722;e.S=667;e.T=611;e.U=722;e.V=667;e.W=944;e.X=667;e.Y=667;e.Z=611;e.bracketleft=278;e.backslash=278;e.bracketright=278;e.asciicircum=469;e.underscore=556;e.quoteleft=222;e.a=556;e.b=556;e.c=500;e.d=556;e.e=556;e.f=278;e.g=556;e.h=556;e.i=222;e.j=222;e.k=500;e.l=222;e.m=833;e.n=556;e.o=556;e.p=556;e.q=556;e.r=333;e.s=500;e.t=278;e.u=556;e.v=500;e.w=722;e.x=500;e.y=500;e.z=500;e.braceleft=334;e.bar=260;e.braceright=334;e.asciitilde=584;e.exclamdown=333;e.cent=556;e.sterling=556;e.fraction=167;e.yen=556;e.florin=556;e.section=556;e.currency=556;e.quotesingle=191;e.quotedblleft=333;e.guillemotleft=556;e.guilsinglleft=333;e.guilsinglright=333;e.fi=500;e.fl=500;e.endash=556;e.dagger=556;e.daggerdbl=556;e.periodcentered=278;e.paragraph=537;e.bullet=350;e.quotesinglbase=222;e.quotedblbase=333;e.quotedblright=333;e.guillemotright=556;e.ellipsis=1e3;e.perthousand=1e3;e.questiondown=611;e.grave=333;e.acute=333;e.circumflex=333;e.tilde=333;e.macron=333;e.breve=333;e.dotaccent=333;e.dieresis=333;e.ring=333;e.cedilla=333;e.hungarumlaut=333;e.ogonek=333;e.caron=333;e.emdash=1e3;e.AE=1e3;e.ordfeminine=370;e.Lslash=556;e.Oslash=778;e.OE=1e3;e.ordmasculine=365;e.ae=889;e.dotlessi=278;e.lslash=222;e.oslash=611;e.oe=944;e.germandbls=611;e.Idieresis=278;e.eacute=556;e.abreve=556;e.uhungarumlaut=556;e.ecaron=556;e.Ydieresis=667;e.divide=584;e.Yacute=667;e.Acircumflex=667;e.aacute=556;e.Ucircumflex=722;e.yacute=500;e.scommaaccent=500;e.ecircumflex=556;e.Uring=722;e.Udieresis=722;e.aogonek=556;e.Uacute=722;e.uogonek=556;e.Edieresis=667;e.Dcroat=722;e.commaaccent=250;e.copyright=737;e.Emacron=667;e.ccaron=500;e.aring=556;e.Ncommaaccent=722;e.lacute=222;e.agrave=556;e.Tcommaaccent=611;e.Cacute=722;e.atilde=556;e.Edotaccent=667;e.scaron=500;e.scedilla=500;e.iacute=278;e.lozenge=471;e.Rcaron=722;e.Gcommaaccent=778;e.ucircumflex=556;e.acircumflex=556;e.Amacron=667;e.rcaron=333;e.ccedilla=500;e.Zdotaccent=611;e.Thorn=667;e.Omacron=778;e.Racute=722;e.Sacute=667;e.dcaron=643;e.Umacron=722;e.uring=556;e.threesuperior=333;e.Ograve=778;e.Agrave=667;e.Abreve=667;e.multiply=584;e.uacute=556;e.Tcaron=611;e.partialdiff=476;e.ydieresis=500;e.Nacute=722;e.icircumflex=278;e.Ecircumflex=667;e.adieresis=556;e.edieresis=556;e.cacute=500;e.nacute=556;e.umacron=556;e.Ncaron=722;e.Iacute=278;e.plusminus=584;e.brokenbar=260;e.registered=737;e.Gbreve=778;e.Idotaccent=278;e.summation=600;e.Egrave=667;e.racute=333;e.omacron=556;e.Zacute=611;e.Zcaron=611;e.greaterequal=549;e.Eth=722;e.Ccedilla=722;e.lcommaaccent=222;e.tcaron=317;e.eogonek=556;e.Uogonek=722;e.Aacute=667;e.Adieresis=667;e.egrave=556;e.zacute=500;e.iogonek=222;e.Oacute=778;e.oacute=556;e.amacron=556;e.sacute=500;e.idieresis=278;e.Ocircumflex=778;e.Ugrave=722;e.Delta=612;e.thorn=556;e.twosuperior=333;e.Odieresis=778;e.mu=556;e.igrave=278;e.ohungarumlaut=556;e.Eogonek=667;e.dcroat=556;e.threequarters=834;e.Scedilla=667;e.lcaron=299;e.Kcommaaccent=667;e.Lacute=556;e.trademark=1e3;e.edotaccent=556;e.Igrave=278;e.Imacron=278;e.Lcaron=556;e.onehalf=834;e.lessequal=549;e.ocircumflex=556;e.ntilde=556;e.Uhungarumlaut=722;e.Eacute=667;e.emacron=556;e.gbreve=556;e.onequarter=834;e.Scaron=667;e.Scommaaccent=667;e.Ohungarumlaut=778;e.degree=400;e.ograve=556;e.Ccaron=722;e.ugrave=556;e.radical=453;e.Dcaron=722;e.rcommaaccent=333;e.Ntilde=722;e.otilde=556;e.Rcommaaccent=722;e.Lcommaaccent=556;e.Atilde=667;e.Aogonek=667;e.Aring=667;e.Otilde=778;e.zdotaccent=500;e.Ecaron=667;e.Iogonek=278;e.kcommaaccent=500;e.minus=584;e.Icircumflex=278;e.ncaron=556;e.tcommaaccent=278;e.logicalnot=584;e.odieresis=556;e.udieresis=556;e.notequal=549;e.gcommaaccent=556;e.eth=556;e.zcaron=500;e.ncommaaccent=556;e.onesuperior=333;e.imacron=278;e.Euro=556});e.Symbol=getLookupTableFactory(function(e){e.space=250;e.exclam=333;e.universal=713;e.numbersign=500;e.existential=549;e.percent=833;e.ampersand=778;e.suchthat=439;e.parenleft=333;e.parenright=333;e.asteriskmath=500;e.plus=549;e.comma=250;e.minus=549;e.period=250;e.slash=278;e.zero=500;e.one=500;e.two=500;e.three=500;e.four=500;e.five=500;e.six=500;e.seven=500;e.eight=500;e.nine=500;e.colon=278;e.semicolon=278;e.less=549;e.equal=549;e.greater=549;e.question=444;e.congruent=549;e.Alpha=722;e.Beta=667;e.Chi=722;e.Delta=612;e.Epsilon=611;e.Phi=763;e.Gamma=603;e.Eta=722;e.Iota=333;e.theta1=631;e.Kappa=722;e.Lambda=686;e.Mu=889;e.Nu=722;e.Omicron=722;e.Pi=768;e.Theta=741;e.Rho=556;e.Sigma=592;e.Tau=611;e.Upsilon=690;e.sigma1=439;e.Omega=768;e.Xi=645;e.Psi=795;e.Zeta=611;e.bracketleft=333;e.therefore=863;e.bracketright=333;e.perpendicular=658;e.underscore=500;e.radicalex=500;e.alpha=631;e.beta=549;e.chi=549;e.delta=494;e.epsilon=439;e.phi=521;e.gamma=411;e.eta=603;e.iota=329;e.phi1=603;e.kappa=549;e.lambda=549;e.mu=576;e.nu=521;e.omicron=549;e.pi=549;e.theta=521;e.rho=549;e.sigma=603;e.tau=439;e.upsilon=576;e.omega1=713;e.omega=686;e.xi=493;e.psi=686;e.zeta=494;e.braceleft=480;e.bar=200;e.braceright=480;e.similar=549;e.Euro=750;e.Upsilon1=620;e.minute=247;e.lessequal=549;e.fraction=167;e.infinity=713;e.florin=500;e.club=753;e.diamond=753;e.heart=753;e.spade=753;e.arrowboth=1042;e.arrowleft=987;e.arrowup=603;e.arrowright=987;e.arrowdown=603;e.degree=400;e.plusminus=549;e.second=411;e.greaterequal=549;e.multiply=549;e.proportional=713;e.partialdiff=494;e.bullet=460;e.divide=549;e.notequal=549;e.equivalence=549;e.approxequal=549;e.ellipsis=1e3;e.arrowvertex=603;e.arrowhorizex=1e3;e.carriagereturn=658;e.aleph=823;e.Ifraktur=686;e.Rfraktur=795;e.weierstrass=987;e.circlemultiply=768;e.circleplus=768;e.emptyset=823;e.intersection=768;e.union=768;e.propersuperset=713;e.reflexsuperset=713;e.notsubset=713;e.propersubset=713;e.reflexsubset=713;e.element=713;e.notelement=713;e.angle=768;e.gradient=713;e.registerserif=790;e.copyrightserif=790;e.trademarkserif=890;e.product=823;e.radical=549;e.dotmath=250;e.logicalnot=713;e.logicaland=603;e.logicalor=603;e.arrowdblboth=1042;e.arrowdblleft=987;e.arrowdblup=603;e.arrowdblright=987;e.arrowdbldown=603;e.lozenge=494;e.angleleft=329;e.registersans=790;e.copyrightsans=790;e.trademarksans=786;e.summation=713;e.parenlefttp=384;e.parenleftex=384;e.parenleftbt=384;e.bracketlefttp=384;e.bracketleftex=384;e.bracketleftbt=384;e.bracelefttp=494;e.braceleftmid=494;e.braceleftbt=494;e.braceex=494;e.angleright=329;e.integral=274;e.integraltp=686;e.integralex=686;e.integralbt=686;e.parenrighttp=384;e.parenrightex=384;e.parenrightbt=384;e.bracketrighttp=384;e.bracketrightex=384;e.bracketrightbt=384;e.bracerighttp=494;e.bracerightmid=494;e.bracerightbt=494;e.apple=790});e["Times-Roman"]=getLookupTableFactory(function(e){e.space=250;e.exclam=333;e.quotedbl=408;e.numbersign=500;e.dollar=500;e.percent=833;e.ampersand=778;e.quoteright=333;e.parenleft=333;e.parenright=333;e.asterisk=500;e.plus=564;e.comma=250;e.hyphen=333;e.period=250;e.slash=278;e.zero=500;e.one=500;e.two=500;e.three=500;e.four=500;e.five=500;e.six=500;e.seven=500;e.eight=500;e.nine=500;e.colon=278;e.semicolon=278;e.less=564;e.equal=564;e.greater=564;e.question=444;e.at=921;e.A=722;e.B=667;e.C=667;e.D=722;e.E=611;e.F=556;e.G=722;e.H=722;e.I=333;e.J=389;e.K=722;e.L=611;e.M=889;e.N=722;e.O=722;e.P=556;e.Q=722;e.R=667;e.S=556;e.T=611;e.U=722;e.V=722;e.W=944;e.X=722;e.Y=722;e.Z=611;e.bracketleft=333;e.backslash=278;e.bracketright=333;e.asciicircum=469;e.underscore=500;e.quoteleft=333;e.a=444;e.b=500;e.c=444;e.d=500;e.e=444;e.f=333;e.g=500;e.h=500;e.i=278;e.j=278;e.k=500;e.l=278;e.m=778;e.n=500;e.o=500;e.p=500;e.q=500;e.r=333;e.s=389;e.t=278;e.u=500;e.v=500;e.w=722;e.x=500;e.y=500;e.z=444;e.braceleft=480;e.bar=200;e.braceright=480;e.asciitilde=541;e.exclamdown=333;e.cent=500;e.sterling=500;e.fraction=167;e.yen=500;e.florin=500;e.section=500;e.currency=500;e.quotesingle=180;e.quotedblleft=444;e.guillemotleft=500;e.guilsinglleft=333;e.guilsinglright=333;e.fi=556;e.fl=556;e.endash=500;e.dagger=500;e.daggerdbl=500;e.periodcentered=250;e.paragraph=453;e.bullet=350;e.quotesinglbase=333;e.quotedblbase=444;e.quotedblright=444;e.guillemotright=500;e.ellipsis=1e3;e.perthousand=1e3;e.questiondown=444;e.grave=333;e.acute=333;e.circumflex=333;e.tilde=333;e.macron=333;e.breve=333;e.dotaccent=333;e.dieresis=333;e.ring=333;e.cedilla=333;e.hungarumlaut=333;e.ogonek=333;e.caron=333;e.emdash=1e3;e.AE=889;e.ordfeminine=276;e.Lslash=611;e.Oslash=722;e.OE=889;e.ordmasculine=310;e.ae=667;e.dotlessi=278;e.lslash=278;e.oslash=500;e.oe=722;e.germandbls=500;e.Idieresis=333;e.eacute=444;e.abreve=444;e.uhungarumlaut=500;e.ecaron=444;e.Ydieresis=722;e.divide=564;e.Yacute=722;e.Acircumflex=722;e.aacute=444;e.Ucircumflex=722;e.yacute=500;e.scommaaccent=389;e.ecircumflex=444;e.Uring=722;e.Udieresis=722;e.aogonek=444;e.Uacute=722;e.uogonek=500;e.Edieresis=611;e.Dcroat=722;e.commaaccent=250;e.copyright=760;e.Emacron=611;e.ccaron=444;e.aring=444;e.Ncommaaccent=722;e.lacute=278;e.agrave=444;e.Tcommaaccent=611;e.Cacute=667;e.atilde=444;e.Edotaccent=611;e.scaron=389;e.scedilla=389;e.iacute=278;e.lozenge=471;e.Rcaron=667;e.Gcommaaccent=722;e.ucircumflex=500;e.acircumflex=444;e.Amacron=722;e.rcaron=333;e.ccedilla=444;e.Zdotaccent=611;e.Thorn=556;e.Omacron=722;e.Racute=667;e.Sacute=556;e.dcaron=588;e.Umacron=722;e.uring=500;e.threesuperior=300;e.Ograve=722;e.Agrave=722;e.Abreve=722;e.multiply=564;e.uacute=500;e.Tcaron=611;e.partialdiff=476;e.ydieresis=500;e.Nacute=722;e.icircumflex=278;e.Ecircumflex=611;e.adieresis=444;e.edieresis=444;e.cacute=444;e.nacute=500;e.umacron=500;e.Ncaron=722;e.Iacute=333;e.plusminus=564;e.brokenbar=200;e.registered=760;e.Gbreve=722;e.Idotaccent=333;e.summation=600;e.Egrave=611;e.racute=333;e.omacron=500;e.Zacute=611;e.Zcaron=611;e.greaterequal=549;e.Eth=722;e.Ccedilla=667;e.lcommaaccent=278;e.tcaron=326;e.eogonek=444;e.Uogonek=722;e.Aacute=722;e.Adieresis=722;e.egrave=444;e.zacute=444;e.iogonek=278;e.Oacute=722;e.oacute=500;e.amacron=444;e.sacute=389;e.idieresis=278;e.Ocircumflex=722;e.Ugrave=722;e.Delta=612;e.thorn=500;e.twosuperior=300;e.Odieresis=722;e.mu=500;e.igrave=278;e.ohungarumlaut=500;e.Eogonek=611;e.dcroat=500;e.threequarters=750;e.Scedilla=556;e.lcaron=344;e.Kcommaaccent=722;e.Lacute=611;e.trademark=980;e.edotaccent=444;e.Igrave=333;e.Imacron=333;e.Lcaron=611;e.onehalf=750;e.lessequal=549;e.ocircumflex=500;e.ntilde=500;e.Uhungarumlaut=722;e.Eacute=611;e.emacron=444;e.gbreve=500;e.onequarter=750;e.Scaron=556;e.Scommaaccent=556;e.Ohungarumlaut=722;e.degree=400;e.ograve=500;e.Ccaron=667;e.ugrave=500;e.radical=453;e.Dcaron=722;e.rcommaaccent=333;e.Ntilde=722;e.otilde=500;e.Rcommaaccent=667;e.Lcommaaccent=611;e.Atilde=722;e.Aogonek=722;e.Aring=722;e.Otilde=722;e.zdotaccent=444;e.Ecaron=611;e.Iogonek=333;e.kcommaaccent=500;e.minus=564;e.Icircumflex=333;e.ncaron=500;e.tcommaaccent=278;e.logicalnot=564;e.odieresis=500;e.udieresis=500;e.notequal=549;e.gcommaaccent=500;e.eth=500;e.zcaron=444;e.ncommaaccent=500;e.onesuperior=300;e.imacron=278;e.Euro=500});e["Times-Bold"]=getLookupTableFactory(function(e){e.space=250;e.exclam=333;e.quotedbl=555;e.numbersign=500;e.dollar=500;e.percent=1e3;e.ampersand=833;e.quoteright=333;e.parenleft=333;e.parenright=333;e.asterisk=500;e.plus=570;e.comma=250;e.hyphen=333;e.period=250;e.slash=278;e.zero=500;e.one=500;e.two=500;e.three=500;e.four=500;e.five=500;e.six=500;e.seven=500;e.eight=500;e.nine=500;e.colon=333;e.semicolon=333;e.less=570;e.equal=570;e.greater=570;e.question=500;e.at=930;e.A=722;e.B=667;e.C=722;e.D=722;e.E=667;e.F=611;e.G=778;e.H=778;e.I=389;e.J=500;e.K=778;e.L=667;e.M=944;e.N=722;e.O=778;e.P=611;e.Q=778;e.R=722;e.S=556;e.T=667;e.U=722;e.V=722;e.W=1e3;e.X=722;e.Y=722;e.Z=667;e.bracketleft=333;e.backslash=278;e.bracketright=333;e.asciicircum=581;e.underscore=500;e.quoteleft=333;e.a=500;e.b=556;e.c=444;e.d=556;e.e=444;e.f=333;e.g=500;e.h=556;e.i=278;e.j=333;e.k=556;e.l=278;e.m=833;e.n=556;e.o=500;e.p=556;e.q=556;e.r=444;e.s=389;e.t=333;e.u=556;e.v=500;e.w=722;e.x=500;e.y=500;e.z=444;e.braceleft=394;e.bar=220;e.braceright=394;e.asciitilde=520;e.exclamdown=333;e.cent=500;e.sterling=500;e.fraction=167;e.yen=500;e.florin=500;e.section=500;e.currency=500;e.quotesingle=278;e.quotedblleft=500;e.guillemotleft=500;e.guilsinglleft=333;e.guilsinglright=333;e.fi=556;e.fl=556;e.endash=500;e.dagger=500;e.daggerdbl=500;e.periodcentered=250;e.paragraph=540;e.bullet=350;e.quotesinglbase=333;e.quotedblbase=500;e.quotedblright=500;e.guillemotright=500;e.ellipsis=1e3;e.perthousand=1e3;e.questiondown=500;e.grave=333;e.acute=333;e.circumflex=333;e.tilde=333;e.macron=333;e.breve=333;e.dotaccent=333;e.dieresis=333;e.ring=333;e.cedilla=333;e.hungarumlaut=333;e.ogonek=333;e.caron=333;e.emdash=1e3;e.AE=1e3;e.ordfeminine=300;e.Lslash=667;e.Oslash=778;e.OE=1e3;e.ordmasculine=330;e.ae=722;e.dotlessi=278;e.lslash=278;e.oslash=500;e.oe=722;e.germandbls=556;e.Idieresis=389;e.eacute=444;e.abreve=500;e.uhungarumlaut=556;e.ecaron=444;e.Ydieresis=722;e.divide=570;e.Yacute=722;e.Acircumflex=722;e.aacute=500;e.Ucircumflex=722;e.yacute=500;e.scommaaccent=389;e.ecircumflex=444;e.Uring=722;e.Udieresis=722;e.aogonek=500;e.Uacute=722;e.uogonek=556;e.Edieresis=667;e.Dcroat=722;e.commaaccent=250;e.copyright=747;e.Emacron=667;e.ccaron=444;e.aring=500;e.Ncommaaccent=722;e.lacute=278;e.agrave=500;e.Tcommaaccent=667;e.Cacute=722;e.atilde=500;e.Edotaccent=667;e.scaron=389;e.scedilla=389;e.iacute=278;e.lozenge=494;e.Rcaron=722;e.Gcommaaccent=778;e.ucircumflex=556;e.acircumflex=500;e.Amacron=722;e.rcaron=444;e.ccedilla=444;e.Zdotaccent=667;e.Thorn=611;e.Omacron=778;e.Racute=722;e.Sacute=556;e.dcaron=672;e.Umacron=722;e.uring=556;e.threesuperior=300;e.Ograve=778;e.Agrave=722;e.Abreve=722;e.multiply=570;e.uacute=556;e.Tcaron=667;e.partialdiff=494;e.ydieresis=500;e.Nacute=722;e.icircumflex=278;e.Ecircumflex=667;e.adieresis=500;e.edieresis=444;e.cacute=444;e.nacute=556;e.umacron=556;e.Ncaron=722;e.Iacute=389;e.plusminus=570;e.brokenbar=220;e.registered=747;e.Gbreve=778;e.Idotaccent=389;e.summation=600;e.Egrave=667;e.racute=444;e.omacron=500;e.Zacute=667;e.Zcaron=667;e.greaterequal=549;e.Eth=722;e.Ccedilla=722;e.lcommaaccent=278;e.tcaron=416;e.eogonek=444;e.Uogonek=722;e.Aacute=722;e.Adieresis=722;e.egrave=444;e.zacute=444;e.iogonek=278;e.Oacute=778;e.oacute=500;e.amacron=500;e.sacute=389;e.idieresis=278;e.Ocircumflex=778;e.Ugrave=722;e.Delta=612;e.thorn=556;e.twosuperior=300;e.Odieresis=778;e.mu=556;e.igrave=278;e.ohungarumlaut=500;e.Eogonek=667;e.dcroat=556;e.threequarters=750;e.Scedilla=556;e.lcaron=394;e.Kcommaaccent=778;e.Lacute=667;e.trademark=1e3;e.edotaccent=444;e.Igrave=389;e.Imacron=389;e.Lcaron=667;e.onehalf=750;e.lessequal=549;e.ocircumflex=500;e.ntilde=556;e.Uhungarumlaut=722;e.Eacute=667;e.emacron=444;e.gbreve=500;e.onequarter=750;e.Scaron=556;e.Scommaaccent=556;e.Ohungarumlaut=778;e.degree=400;e.ograve=500;e.Ccaron=722;e.ugrave=556;e.radical=549;e.Dcaron=722;e.rcommaaccent=444;e.Ntilde=722;e.otilde=500;e.Rcommaaccent=722;e.Lcommaaccent=667;e.Atilde=722;e.Aogonek=722;e.Aring=722;e.Otilde=778;e.zdotaccent=444;e.Ecaron=667;e.Iogonek=389;e.kcommaaccent=556;e.minus=570;e.Icircumflex=389;e.ncaron=556;e.tcommaaccent=333;e.logicalnot=570;e.odieresis=500;e.udieresis=556;e.notequal=549;e.gcommaaccent=500;e.eth=500;e.zcaron=444;e.ncommaaccent=556;e.onesuperior=300;e.imacron=278;e.Euro=500});e["Times-BoldItalic"]=getLookupTableFactory(function(e){e.space=250;e.exclam=389;e.quotedbl=555;e.numbersign=500;e.dollar=500;e.percent=833;e.ampersand=778;e.quoteright=333;e.parenleft=333;e.parenright=333;e.asterisk=500;e.plus=570;e.comma=250;e.hyphen=333;e.period=250;e.slash=278;e.zero=500;e.one=500;e.two=500;e.three=500;e.four=500;e.five=500;e.six=500;e.seven=500;e.eight=500;e.nine=500;e.colon=333;e.semicolon=333;e.less=570;e.equal=570;e.greater=570;e.question=500;e.at=832;e.A=667;e.B=667;e.C=667;e.D=722;e.E=667;e.F=667;e.G=722;e.H=778;e.I=389;e.J=500;e.K=667;e.L=611;e.M=889;e.N=722;e.O=722;e.P=611;e.Q=722;e.R=667;e.S=556;e.T=611;e.U=722;e.V=667;e.W=889;e.X=667;e.Y=611;e.Z=611;e.bracketleft=333;e.backslash=278;e.bracketright=333;e.asciicircum=570;e.underscore=500;e.quoteleft=333;e.a=500;e.b=500;e.c=444;e.d=500;e.e=444;e.f=333;e.g=500;e.h=556;e.i=278;e.j=278;e.k=500;e.l=278;e.m=778;e.n=556;e.o=500;e.p=500;e.q=500;e.r=389;e.s=389;e.t=278;e.u=556;e.v=444;e.w=667;e.x=500;e.y=444;e.z=389;e.braceleft=348;e.bar=220;e.braceright=348;e.asciitilde=570;e.exclamdown=389;e.cent=500;e.sterling=500;e.fraction=167;e.yen=500;e.florin=500;e.section=500;e.currency=500;e.quotesingle=278;e.quotedblleft=500;e.guillemotleft=500;e.guilsinglleft=333;e.guilsinglright=333;e.fi=556;e.fl=556;e.endash=500;e.dagger=500;e.daggerdbl=500;e.periodcentered=250;e.paragraph=500;e.bullet=350;e.quotesinglbase=333;e.quotedblbase=500;e.quotedblright=500;e.guillemotright=500;e.ellipsis=1e3;e.perthousand=1e3;e.questiondown=500;e.grave=333;e.acute=333;e.circumflex=333;e.tilde=333;e.macron=333;e.breve=333;e.dotaccent=333;e.dieresis=333;e.ring=333;e.cedilla=333;e.hungarumlaut=333;e.ogonek=333;e.caron=333;e.emdash=1e3;e.AE=944;e.ordfeminine=266;e.Lslash=611;e.Oslash=722;e.OE=944;e.ordmasculine=300;e.ae=722;e.dotlessi=278;e.lslash=278;e.oslash=500;e.oe=722;e.germandbls=500;e.Idieresis=389;e.eacute=444;e.abreve=500;e.uhungarumlaut=556;e.ecaron=444;e.Ydieresis=611;e.divide=570;e.Yacute=611;e.Acircumflex=667;e.aacute=500;e.Ucircumflex=722;e.yacute=444;e.scommaaccent=389;e.ecircumflex=444;e.Uring=722;e.Udieresis=722;e.aogonek=500;e.Uacute=722;e.uogonek=556;e.Edieresis=667;e.Dcroat=722;e.commaaccent=250;e.copyright=747;e.Emacron=667;e.ccaron=444;e.aring=500;e.Ncommaaccent=722;e.lacute=278;e.agrave=500;e.Tcommaaccent=611;e.Cacute=667;e.atilde=500;e.Edotaccent=667;e.scaron=389;e.scedilla=389;e.iacute=278;e.lozenge=494;e.Rcaron=667;e.Gcommaaccent=722;e.ucircumflex=556;e.acircumflex=500;e.Amacron=667;e.rcaron=389;e.ccedilla=444;e.Zdotaccent=611;e.Thorn=611;e.Omacron=722;e.Racute=667;e.Sacute=556;e.dcaron=608;e.Umacron=722;e.uring=556;e.threesuperior=300;e.Ograve=722;e.Agrave=667;e.Abreve=667;e.multiply=570;e.uacute=556;e.Tcaron=611;e.partialdiff=494;e.ydieresis=444;e.Nacute=722;e.icircumflex=278;e.Ecircumflex=667;e.adieresis=500;e.edieresis=444;e.cacute=444;e.nacute=556;e.umacron=556;e.Ncaron=722;e.Iacute=389;e.plusminus=570;e.brokenbar=220;e.registered=747;e.Gbreve=722;e.Idotaccent=389;e.summation=600;e.Egrave=667;e.racute=389;e.omacron=500;e.Zacute=611;e.Zcaron=611;e.greaterequal=549;e.Eth=722;e.Ccedilla=667;e.lcommaaccent=278;e.tcaron=366;e.eogonek=444;e.Uogonek=722;e.Aacute=667;e.Adieresis=667;e.egrave=444;e.zacute=389;e.iogonek=278;e.Oacute=722;e.oacute=500;e.amacron=500;e.sacute=389;e.idieresis=278;e.Ocircumflex=722;e.Ugrave=722;e.Delta=612;e.thorn=500;e.twosuperior=300;e.Odieresis=722;e.mu=576;e.igrave=278;e.ohungarumlaut=500;e.Eogonek=667;e.dcroat=500;e.threequarters=750;e.Scedilla=556;e.lcaron=382;e.Kcommaaccent=667;e.Lacute=611;e.trademark=1e3;e.edotaccent=444;e.Igrave=389;e.Imacron=389;e.Lcaron=611;e.onehalf=750;e.lessequal=549;e.ocircumflex=500;e.ntilde=556;e.Uhungarumlaut=722;e.Eacute=667;e.emacron=444;e.gbreve=500;e.onequarter=750;e.Scaron=556;e.Scommaaccent=556;e.Ohungarumlaut=722;e.degree=400;e.ograve=500;e.Ccaron=667;e.ugrave=556;e.radical=549;e.Dcaron=722;e.rcommaaccent=389;e.Ntilde=722;e.otilde=500;e.Rcommaaccent=667;e.Lcommaaccent=611;e.Atilde=667;e.Aogonek=667;e.Aring=667;e.Otilde=722;e.zdotaccent=389;e.Ecaron=667;e.Iogonek=389;e.kcommaaccent=500;e.minus=606;e.Icircumflex=389;e.ncaron=556;e.tcommaaccent=278;e.logicalnot=606;e.odieresis=500;e.udieresis=556;e.notequal=549;e.gcommaaccent=500;e.eth=500;e.zcaron=389;e.ncommaaccent=556;e.onesuperior=300;e.imacron=278;e.Euro=500});e["Times-Italic"]=getLookupTableFactory(function(e){e.space=250;e.exclam=333;e.quotedbl=420;e.numbersign=500;e.dollar=500;e.percent=833;e.ampersand=778;e.quoteright=333;e.parenleft=333;e.parenright=333;e.asterisk=500;e.plus=675;e.comma=250;e.hyphen=333;e.period=250;e.slash=278;e.zero=500;e.one=500;e.two=500;e.three=500;e.four=500;e.five=500;e.six=500;e.seven=500;e.eight=500;e.nine=500;e.colon=333;e.semicolon=333;e.less=675;e.equal=675;e.greater=675;e.question=500;e.at=920;e.A=611;e.B=611;e.C=667;e.D=722;e.E=611;e.F=611;e.G=722;e.H=722;e.I=333;e.J=444;e.K=667;e.L=556;e.M=833;e.N=667;e.O=722;e.P=611;e.Q=722;e.R=611;e.S=500;e.T=556;e.U=722;e.V=611;e.W=833;e.X=611;e.Y=556;e.Z=556;e.bracketleft=389;e.backslash=278;e.bracketright=389;e.asciicircum=422;e.underscore=500;e.quoteleft=333;e.a=500;e.b=500;e.c=444;e.d=500;e.e=444;e.f=278;e.g=500;e.h=500;e.i=278;e.j=278;e.k=444;e.l=278;e.m=722;e.n=500;e.o=500;e.p=500;e.q=500;e.r=389;e.s=389;e.t=278;e.u=500;e.v=444;e.w=667;e.x=444;e.y=444;e.z=389;e.braceleft=400;e.bar=275;e.braceright=400;e.asciitilde=541;e.exclamdown=389;e.cent=500;e.sterling=500;e.fraction=167;e.yen=500;e.florin=500;e.section=500;e.currency=500;e.quotesingle=214;e.quotedblleft=556;e.guillemotleft=500;e.guilsinglleft=333;e.guilsinglright=333;e.fi=500;e.fl=500;e.endash=500;e.dagger=500;e.daggerdbl=500;e.periodcentered=250;e.paragraph=523;e.bullet=350;e.quotesinglbase=333;e.quotedblbase=556;e.quotedblright=556;e.guillemotright=500;e.ellipsis=889;e.perthousand=1e3;e.questiondown=500;e.grave=333;e.acute=333;e.circumflex=333;e.tilde=333;e.macron=333;e.breve=333;e.dotaccent=333;e.dieresis=333;e.ring=333;e.cedilla=333;e.hungarumlaut=333;e.ogonek=333;e.caron=333;e.emdash=889;e.AE=889;e.ordfeminine=276;e.Lslash=556;e.Oslash=722;e.OE=944;e.ordmasculine=310;e.ae=667;e.dotlessi=278;e.lslash=278;e.oslash=500;e.oe=667;e.germandbls=500;e.Idieresis=333;e.eacute=444;e.abreve=500;e.uhungarumlaut=500;e.ecaron=444;e.Ydieresis=556;e.divide=675;e.Yacute=556;e.Acircumflex=611;e.aacute=500;e.Ucircumflex=722;e.yacute=444;e.scommaaccent=389;e.ecircumflex=444;e.Uring=722;e.Udieresis=722;e.aogonek=500;e.Uacute=722;e.uogonek=500;e.Edieresis=611;e.Dcroat=722;e.commaaccent=250;e.copyright=760;e.Emacron=611;e.ccaron=444;e.aring=500;e.Ncommaaccent=667;e.lacute=278;e.agrave=500;e.Tcommaaccent=556;e.Cacute=667;e.atilde=500;e.Edotaccent=611;e.scaron=389;e.scedilla=389;e.iacute=278;e.lozenge=471;e.Rcaron=611;e.Gcommaaccent=722;e.ucircumflex=500;e.acircumflex=500;e.Amacron=611;e.rcaron=389;e.ccedilla=444;e.Zdotaccent=556;e.Thorn=611;e.Omacron=722;e.Racute=611;e.Sacute=500;e.dcaron=544;e.Umacron=722;e.uring=500;e.threesuperior=300;e.Ograve=722;e.Agrave=611;e.Abreve=611;e.multiply=675;e.uacute=500;e.Tcaron=556;e.partialdiff=476;e.ydieresis=444;e.Nacute=667;e.icircumflex=278;e.Ecircumflex=611;e.adieresis=500;e.edieresis=444;e.cacute=444;e.nacute=500;e.umacron=500;e.Ncaron=667;e.Iacute=333;e.plusminus=675;e.brokenbar=275;e.registered=760;e.Gbreve=722;e.Idotaccent=333;e.summation=600;e.Egrave=611;e.racute=389;e.omacron=500;e.Zacute=556;e.Zcaron=556;e.greaterequal=549;e.Eth=722;e.Ccedilla=667;e.lcommaaccent=278;e.tcaron=300;e.eogonek=444;e.Uogonek=722;e.Aacute=611;e.Adieresis=611;e.egrave=444;e.zacute=389;e.iogonek=278;e.Oacute=722;e.oacute=500;e.amacron=500;e.sacute=389;e.idieresis=278;e.Ocircumflex=722;e.Ugrave=722;e.Delta=612;e.thorn=500;e.twosuperior=300;e.Odieresis=722;e.mu=500;e.igrave=278;e.ohungarumlaut=500;e.Eogonek=611;e.dcroat=500;e.threequarters=750;e.Scedilla=500;e.lcaron=300;e.Kcommaaccent=667;e.Lacute=556;e.trademark=980;e.edotaccent=444;e.Igrave=333;e.Imacron=333;e.Lcaron=611;e.onehalf=750;e.lessequal=549;e.ocircumflex=500;e.ntilde=500;e.Uhungarumlaut=722;e.Eacute=611;e.emacron=444;e.gbreve=500;e.onequarter=750;e.Scaron=500;e.Scommaaccent=500;e.Ohungarumlaut=722;e.degree=400;e.ograve=500;e.Ccaron=667;e.ugrave=500;e.radical=453;e.Dcaron=722;e.rcommaaccent=389;e.Ntilde=667;e.otilde=500;e.Rcommaaccent=611;e.Lcommaaccent=556;e.Atilde=611;e.Aogonek=611;e.Aring=611;e.Otilde=722;e.zdotaccent=389;e.Ecaron=611;e.Iogonek=333;e.kcommaaccent=444;e.minus=675;e.Icircumflex=333;e.ncaron=500;e.tcommaaccent=278;e.logicalnot=675;e.odieresis=500;e.udieresis=500;e.notequal=549;e.gcommaaccent=500;e.eth=500;e.zcaron=389;e.ncommaaccent=500;e.onesuperior=300;e.imacron=278;e.Euro=500});e.ZapfDingbats=getLookupTableFactory(function(e){e.space=278;e.a1=974;e.a2=961;e.a202=974;e.a3=980;e.a4=719;e.a5=789;e.a119=790;e.a118=791;e.a117=690;e.a11=960;e.a12=939;e.a13=549;e.a14=855;e.a15=911;e.a16=933;e.a105=911;e.a17=945;e.a18=974;e.a19=755;e.a20=846;e.a21=762;e.a22=761;e.a23=571;e.a24=677;e.a25=763;e.a26=760;e.a27=759;e.a28=754;e.a6=494;e.a7=552;e.a8=537;e.a9=577;e.a10=692;e.a29=786;e.a30=788;e.a31=788;e.a32=790;e.a33=793;e.a34=794;e.a35=816;e.a36=823;e.a37=789;e.a38=841;e.a39=823;e.a40=833;e.a41=816;e.a42=831;e.a43=923;e.a44=744;e.a45=723;e.a46=749;e.a47=790;e.a48=792;e.a49=695;e.a50=776;e.a51=768;e.a52=792;e.a53=759;e.a54=707;e.a55=708;e.a56=682;e.a57=701;e.a58=826;e.a59=815;e.a60=789;e.a61=789;e.a62=707;e.a63=687;e.a64=696;e.a65=689;e.a66=786;e.a67=787;e.a68=713;e.a69=791;e.a70=785;e.a71=791;e.a72=873;e.a73=761;e.a74=762;e.a203=762;e.a75=759;e.a204=759;e.a76=892;e.a77=892;e.a78=788;e.a79=784;e.a81=438;e.a82=138;e.a83=277;e.a84=415;e.a97=392;e.a98=392;e.a99=668;e.a100=668;e.a89=390;e.a90=390;e.a93=317;e.a94=317;e.a91=276;e.a92=276;e.a205=509;e.a85=509;e.a206=410;e.a86=410;e.a87=234;e.a88=234;e.a95=334;e.a96=334;e.a101=732;e.a102=544;e.a103=544;e.a104=910;e.a106=667;e.a107=760;e.a108=760;e.a112=776;e.a111=595;e.a110=694;e.a109=626;e.a120=788;e.a121=788;e.a122=788;e.a123=788;e.a124=788;e.a125=788;e.a126=788;e.a127=788;e.a128=788;e.a129=788;e.a130=788;e.a131=788;e.a132=788;e.a133=788;e.a134=788;e.a135=788;e.a136=788;e.a137=788;e.a138=788;e.a139=788;e.a140=788;e.a141=788;e.a142=788;e.a143=788;e.a144=788;e.a145=788;e.a146=788;e.a147=788;e.a148=788;e.a149=788;e.a150=788;e.a151=788;e.a152=788;e.a153=788;e.a154=788;e.a155=788;e.a156=788;e.a157=788;e.a158=788;e.a159=788;e.a160=894;e.a161=838;e.a163=1016;e.a164=458;e.a196=748;e.a165=924;e.a192=748;e.a166=918;e.a167=927;e.a168=928;e.a169=928;e.a170=834;e.a171=873;e.a172=828;e.a173=924;e.a162=924;e.a174=917;e.a175=930;e.a176=931;e.a177=463;e.a178=883;e.a179=836;e.a193=836;e.a180=867;e.a199=867;e.a181=696;e.a200=696;e.a182=874;e.a201=874;e.a183=760;e.a184=946;e.a197=771;e.a185=865;e.a194=771;e.a198=888;e.a186=967;e.a195=888;e.a187=831;e.a188=873;e.a189=927;e.a190=970;e.a191=918})}),Qa=getLookupTableFactory(function(e){e.Courier={ascent:629,descent:-157,capHeight:562,xHeight:-426};e["Courier-Bold"]={ascent:629,descent:-157,capHeight:562,xHeight:439};e["Courier-Oblique"]={ascent:629,descent:-157,capHeight:562,xHeight:426};e["Courier-BoldOblique"]={ascent:629,descent:-157,capHeight:562,xHeight:426};e.Helvetica={ascent:718,descent:-207,capHeight:718,xHeight:523};e["Helvetica-Bold"]={ascent:718,descent:-207,capHeight:718,xHeight:532};e["Helvetica-Oblique"]={ascent:718,descent:-207,capHeight:718,xHeight:523};e["Helvetica-BoldOblique"]={ascent:718,descent:-207,capHeight:718,xHeight:532};e["Times-Roman"]={ascent:683,descent:-217,capHeight:662,xHeight:450};e["Times-Bold"]={ascent:683,descent:-217,capHeight:676,xHeight:461};e["Times-Italic"]={ascent:683,descent:-217,capHeight:653,xHeight:441};e["Times-BoldItalic"]={ascent:683,descent:-217,capHeight:669,xHeight:462};e.Symbol={ascent:Math.NaN,descent:Math.NaN,capHeight:Math.NaN,xHeight:Math.NaN};e.ZapfDingbats={ascent:Math.NaN,descent:Math.NaN,capHeight:Math.NaN,xHeight:Math.NaN}});class GlyfTable{constructor({glyfTable:e,isGlyphLocationsLong:t,locaTable:n,numGlyphs:a}){this.glyphs=[];const r=new DataView(n.buffer,n.byteOffset,n.byteLength),s=new DataView(e.buffer,e.byteOffset,e.byteLength),i=t?4:2;let o=t?r.getUint32(0):2*r.getUint16(0),l=0;for(let e=0;e<a;e++){l+=i;const e=t?r.getUint32(l):2*r.getUint16(l);if(e===o){this.glyphs.push(new Glyph({}));continue}const n=Glyph.parse(o,s);this.glyphs.push(n);o=e}}getSize(){return Math.sumPrecise(this.glyphs.map(e=>e.getSize()+3&-4))}write(){const e=this.getSize(),t=new DataView(new ArrayBuffer(e)),n=e>131070,a=n?4:2,r=new DataView(new ArrayBuffer((this.glyphs.length+1)*a));n?r.setUint32(0,0):r.setUint16(0,0);let s=0,i=0;for(const e of this.glyphs){s+=e.write(s,t);s=s+3&-4;i+=a;n?r.setUint32(i,s):r.setUint16(i,s>>1)}return{isLocationLong:n,loca:new Uint8Array(r.buffer),glyf:new Uint8Array(t.buffer)}}scale(e){for(let t=0,n=this.glyphs.length;t<n;t++)this.glyphs[t].scale(e[t])}}class Glyph{constructor({header:e=null,simple:t=null,composites:n=null}){this.header=e;this.simple=t;this.composites=n}static parse(e,t){const[n,a]=GlyphHeader.parse(e,t);e+=n;if(a.numberOfContours<0){const n=[];for(;;){const[a,r]=CompositeGlyph.parse(e,t);e+=a;n.push(r);if(!(32&r.flags))break}return new Glyph({header:a,composites:n})}const r=SimpleGlyph.parse(e,t,a.numberOfContours);return new Glyph({header:a,simple:r})}getSize(){if(!this.header)return 0;const e=this.simple?this.simple.getSize():Math.sumPrecise(this.composites.map(e=>e.getSize()));return this.header.getSize()+e}write(e,t){if(!this.header)return 0;const n=e;e+=this.header.write(e,t);if(this.simple)e+=this.simple.write(e,t);else for(const n of this.composites)e+=n.write(e,t);return e-n}scale(e){if(!this.header)return;const t=(this.header.xMin+this.header.xMax)/2;this.header.scale(t,e);if(this.simple)this.simple.scale(t,e);else for(const n of this.composites)n.scale(t,e)}}class GlyphHeader{constructor({numberOfContours:e,xMin:t,yMin:n,xMax:a,yMax:r}){this.numberOfContours=e;this.xMin=t;this.yMin=n;this.xMax=a;this.yMax=r}static parse(e,t){return[10,new GlyphHeader({numberOfContours:t.getInt16(e),xMin:t.getInt16(e+2),yMin:t.getInt16(e+4),xMax:t.getInt16(e+6),yMax:t.getInt16(e+8)})]}getSize(){return 10}write(e,t){t.setInt16(e,this.numberOfContours);t.setInt16(e+2,this.xMin);t.setInt16(e+4,this.yMin);t.setInt16(e+6,this.xMax);t.setInt16(e+8,this.yMax);return 10}scale(e,t){this.xMin=Math.round(e+(this.xMin-e)*t);this.xMax=Math.round(e+(this.xMax-e)*t)}}class Contour{constructor({flags:e,xCoordinates:t,yCoordinates:n}){this.xCoordinates=t;this.yCoordinates=n;this.flags=e}}class SimpleGlyph{constructor({contours:e,instructions:t}){this.contours=e;this.instructions=t}static parse(e,t,n){const a=[];for(let r=0;r<n;r++){const n=t.getUint16(e);e+=2;a.push(n)}const r=a[n-1]+1,s=t.getUint16(e);e+=2;const i=new Uint8Array(t).slice(e,e+s);e+=s;const o=[];for(let n=0;n<r;e++,n++){let a=t.getUint8(e);o.push(a);if(8&a){const r=t.getUint8(++e);a^=8;for(let e=0;e<r;e++)o.push(a);n+=r}}const l=[];let f=[],c=[],h=[];const u=[];let m=0,p=0;for(let n=0;n<r;n++){const r=o[n];if(2&r){const n=t.getUint8(e++);p+=16&r?n:-n;f.push(p)}else if(16&r)f.push(p);else{p+=t.getInt16(e);e+=2;f.push(p)}if(a[m]===n){m++;l.push(f);f=[]}}p=0;m=0;for(let n=0;n<r;n++){const r=o[n];if(4&r){const n=t.getUint8(e++);p+=32&r?n:-n;c.push(p)}else if(32&r)c.push(p);else{p+=t.getInt16(e);e+=2;c.push(p)}h.push(1&r|64&r);if(a[m]===n){f=l[m];m++;u.push(new Contour({flags:h,xCoordinates:f,yCoordinates:c}));c=[];h=[]}}return new SimpleGlyph({contours:u,instructions:i})}getSize(){let e=2*this.contours.length+2+this.instructions.length,t=0,n=0;for(const a of this.contours){e+=a.flags.length;for(let r=0,s=a.xCoordinates.length;r<s;r++){const s=a.xCoordinates[r],i=a.yCoordinates[r];let o=Math.abs(s-t);o>255?e+=2:o>0&&(e+=1);t=s;o=Math.abs(i-n);o>255?e+=2:o>0&&(e+=1);n=i}}return e}write(e,t){const n=e,a=[],r=[],s=[];let i=0,o=0;for(const n of this.contours){for(let e=0,t=n.xCoordinates.length;e<t;e++){let t=n.flags[e];const l=n.xCoordinates[e];let f=l-i;if(0===f){t|=16;a.push(0)}else{const e=Math.abs(f);if(e<=255){t|=f>=0?18:2;a.push(e)}else a.push(f)}i=l;const c=n.yCoordinates[e];f=c-o;if(0===f){t|=32;r.push(0)}else{const e=Math.abs(f);if(e<=255){t|=f>=0?36:4;r.push(e)}else r.push(f)}o=c;s.push(t)}t.setUint16(e,a.length-1);e+=2}t.setUint16(e,this.instructions.length);e+=2;if(this.instructions.length){new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e);e+=this.instructions.length}for(const n of s)t.setUint8(e++,n);for(let n=0,r=a.length;n<r;n++){const r=a[n],i=s[n];if(2&i)t.setUint8(e++,r);else if(!(16&i)){t.setInt16(e,r);e+=2}}for(let n=0,a=r.length;n<a;n++){const a=r[n],i=s[n];if(4&i)t.setUint8(e++,a);else if(!(32&i)){t.setInt16(e,a);e+=2}}return e-n}scale(e,t){for(const n of this.contours)if(0!==n.xCoordinates.length)for(let a=0,r=n.xCoordinates.length;a<r;a++)n.xCoordinates[a]=Math.round(e+(n.xCoordinates[a]-e)*t)}}class CompositeGlyph{constructor({flags:e,glyphIndex:t,argument1:n,argument2:a,transf:r,instructions:s}){this.flags=e;this.glyphIndex=t;this.argument1=n;this.argument2=a;this.transf=r;this.instructions=s}static parse(e,t){const n=e,a=[];let r=t.getUint16(e);const s=t.getUint16(e+2);e+=4;let i,o;if(1&r){if(2&r){i=t.getInt16(e);o=t.getInt16(e+2)}else{i=t.getUint16(e);o=t.getUint16(e+2)}e+=4;r^=1}else{if(2&r){i=t.getInt8(e);o=t.getInt8(e+1)}else{i=t.getUint8(e);o=t.getUint8(e+1)}e+=2}if(8&r){a.push(t.getUint16(e));e+=2}else if(64&r){a.push(t.getUint16(e),t.getUint16(e+2));e+=4}else if(128&r){a.push(t.getUint16(e),t.getUint16(e+2),t.getUint16(e+4),t.getUint16(e+6));e+=8}let l=null;if(256&r){const n=t.getUint16(e);e+=2;l=new Uint8Array(t).slice(e,e+n);e+=n}return[e-n,new CompositeGlyph({flags:r,glyphIndex:s,argument1:i,argument2:o,transf:a,instructions:l})]}getSize(){let e=4+2*this.transf.length;256&this.flags&&(e+=2+this.instructions.length);e+=2;2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(e+=2):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(e+=2);return e}write(e,t){const n=e;2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(this.flags|=1):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(this.flags|=1);t.setUint16(e,this.flags);t.setUint16(e+2,this.glyphIndex);e+=4;if(1&this.flags){if(2&this.flags){t.setInt16(e,this.argument1);t.setInt16(e+2,this.argument2)}else{t.setUint16(e,this.argument1);t.setUint16(e+2,this.argument2)}e+=4}else{t.setUint8(e,this.argument1);t.setUint8(e+1,this.argument2);e+=2}if(256&this.flags){t.setUint16(e,this.instructions.length);e+=2;if(this.instructions.length){new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e);e+=this.instructions.length}}return e-n}scale(e,t){}}function writeInt16(e,t,n){e[t]=n>>8&255;e[t+1]=255&n}function writeInt32(e,t,n){e[t]=n>>24&255;e[t+1]=n>>16&255;e[t+2]=n>>8&255;e[t+3]=255&n}function writeData(e,t,n){if(n instanceof Uint8Array)e.set(n,t);else if("string"==typeof n)for(let a=0,r=n.length;a<r;a++)e[t++]=255&n.charCodeAt(a);else for(const a of n)e[t++]=255&a}class OpenTypeFileBuilder{constructor(e){this.sfnt=e;this.tables=Object.create(null)}static getSearchParams(e,t){let n=1,a=0;for(;(n^e)>n;){n<<=1;a++}const r=n*t;return{range:r,entry:a,rangeShift:t*e-r}}toArray(){let e=this.sfnt;const t=this.tables,n=Object.keys(t);n.sort();const a=n.length;let r,s,i,o,l,f=12+16*a;const c=[f];for(r=0;r<a;r++){o=t[n[r]];f+=(o.length+3&-4)>>>0;c.push(f)}const h=new Uint8Array(f);for(r=0;r<a;r++){o=t[n[r]];writeData(h,c[r],o)}"true"===e&&(e=string32(65536));h[0]=255&e.charCodeAt(0);h[1]=255&e.charCodeAt(1);h[2]=255&e.charCodeAt(2);h[3]=255&e.charCodeAt(3);writeInt16(h,4,a);const u=OpenTypeFileBuilder.getSearchParams(a,16);writeInt16(h,6,u.range);writeInt16(h,8,u.entry);writeInt16(h,10,u.rangeShift);f=12;for(r=0;r<a;r++){l=n[r];h[f]=255&l.charCodeAt(0);h[f+1]=255&l.charCodeAt(1);h[f+2]=255&l.charCodeAt(2);h[f+3]=255&l.charCodeAt(3);let e=0;for(s=c[r],i=c[r+1];s<i;s+=4){e=e+readUint32(h,s)>>>0}writeInt32(h,f+4,e);writeInt32(h,f+8,c[r]);writeInt32(h,f+12,t[l].length);f+=16}return h}addTable(e,t){if(e in this.tables)throw new Error("Table "+e+" already exists");this.tables[e]=t}}const Za=[4],er=[5],tr=[6],nr=[7],ar=[8],rr=[12,35],sr=[14],ir=[21],or=[22],lr=[30],fr=[31];class Type1CharString{width=0;lsb=0;flexing=!1;output=[];stack=[];convert(e,t,n){const a=e.length;let r,s,i,o=!1;for(let l=0;l<a;l++){let a=e[l];if(a<32){12===a&&(a=(a<<8)+e[++l]);switch(a){case 1:case 3:case 9:case 3072:case 3073:case 3074:case 3105:this.stack=[];break;case 4:if(this.flexing){if(this.stack.length<1){o=!0;break}const e=this.stack.pop();this.stack.push(0,e);break}o=this.executeCommand(1,Za);break;case 5:o=this.executeCommand(2,er);break;case 6:o=this.executeCommand(1,tr);break;case 7:o=this.executeCommand(1,nr);break;case 8:o=this.executeCommand(6,ar);break;case 10:if(this.stack.length<1){o=!0;break}i=this.stack.pop();if(!t[i]){o=!0;break}o=this.convert(t[i],t,n);break;case 11:return o;case 13:if(this.stack.length<2){o=!0;break}r=this.stack.pop();s=this.stack.pop();this.lsb=s;this.width=r;this.stack.push(r,s);o=this.executeCommand(2,or);break;case 14:this.output.push(sr[0]);break;case 21:if(this.flexing)break;o=this.executeCommand(2,ir);break;case 22:if(this.flexing){this.stack.push(0);break}o=this.executeCommand(1,or);break;case 30:o=this.executeCommand(4,lr);break;case 31:o=this.executeCommand(4,fr);break;case 3078:if(n){const e=this.stack.at(-5);this.seac=this.stack.splice(-4,4);this.seac[0]+=this.lsb-e;o=this.executeCommand(0,sr)}else o=this.executeCommand(4,sr);break;case 3079:if(this.stack.length<4){o=!0;break}this.stack.pop();r=this.stack.pop();const e=this.stack.pop();s=this.stack.pop();this.lsb=s;this.width=r;this.stack.push(r,s,e);o=this.executeCommand(3,ir);break;case 3084:if(this.stack.length<2){o=!0;break}const l=this.stack.pop(),f=this.stack.pop();this.stack.push(f/l);break;case 3088:if(this.stack.length<2){o=!0;break}i=this.stack.pop();const c=this.stack.pop();if(0===i&&3===c){const e=this.stack.splice(-17,17);this.stack.push(e[2]+e[0],e[3]+e[1],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14]);o=this.executeCommand(13,rr,!0);this.flexing=!1;this.stack.push(e[15],e[16])}else 1===i&&0===c&&(this.flexing=!0);break;case 3089:break;default:warn('Unknown type 1 charstring command of "'+a+'"')}if(o)break}else{a<=246?a-=139:a=a<=250?256*(a-247)+e[++l]+108:a<=254?-256*(a-251)-e[++l]-108:(255&e[++l])<<24|(255&e[++l])<<16|(255&e[++l])<<8|255&e[++l];this.stack.push(a)}}return o}executeCommand(e,t,n){const a=this.stack.length;if(e>a)return!0;const r=a-e;for(let e=r;e<a;e++){let t=this.stack[e];if(Number.isInteger(t))this.output.push(28,t>>8&255,255&t);else{t=65536*t|0;this.output.push(255,t>>24&255,t>>16&255,t>>8&255,255&t)}}this.output.push(...t);n?this.stack.splice(r,e):this.stack.length=0;return!1}}function isHexDigit(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function decrypt(e,t,n){if(n>=e.length)return new Uint8Array(0);let a,r,s=0|t;for(a=0;a<n;a++)s=52845*(e[a]+s)+22719&65535;const i=e.length-n,o=new Uint8Array(i);for(a=n,r=0;r<i;a++,r++){const t=e[a];o[r]=t^s>>8;s=52845*(t+s)+22719&65535}return o}function isSpecial(e){return 47===e||91===e||93===e||123===e||125===e||40===e||41===e}class Type1Parser{constructor(e,t,n){if(t){const t=e.getBytes(),n=!((isHexDigit(t[0])||isWhiteSpace(t[0]))&&isHexDigit(t[1])&&isHexDigit(t[2])&&isHexDigit(t[3])&&isHexDigit(t[4])&&isHexDigit(t[5])&&isHexDigit(t[6])&&isHexDigit(t[7]));e=new Stream(n?decrypt(t,55665,4):function decryptAscii(e,t,n){let a=0|t;const r=e.length,s=new Uint8Array(r>>>1);let i,o;for(i=0,o=0;i<r;i++){const t=e[i];if(!isHexDigit(t))continue;i++;let n;for(;i<r&&!isHexDigit(n=e[i]);)i++;if(i<r){const e=parseInt(String.fromCharCode(t,n),16);s[o++]=e^a>>8;a=52845*(e+a)+22719&65535}}return s.slice(n,o)}(t,55665,4))}this.seacAnalysisEnabled=!!n;this.stream=e;this.nextChar()}readNumberArray(){this.getToken();const e=[];for(;;){const t=this.getToken();if(null===t||"]"===t||"}"===t)break;e.push(parseFloat(t||0))}return e}readNumber(){const e=this.getToken();return parseFloat(e||0)}readInt(){const e=this.getToken();return 0|parseInt(e||0,10)}readBoolean(){return"true"===this.getToken()?1:0}nextChar(){return this.currentChar=this.stream.getByte()}prevChar(){this.stream.skip(-2);return this.currentChar=this.stream.getByte()}getToken(){let e=!1,t=this.currentChar;for(;;){if(-1===t)return null;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!isWhiteSpace(t))break;t=this.nextChar()}if(isSpecial(t)){this.nextChar();return String.fromCharCode(t)}let n="";do{n+=String.fromCharCode(t);t=this.nextChar()}while(t>=0&&!isWhiteSpace(t)&&!isSpecial(t));return n}readCharStrings(e,t){return-1===t?e:decrypt(e,4330,t)}extractFontProgram(e){const t=this.stream,n=[],a=[],r=Object.create(null);r.lenIV=4;const s={subrs:[],charstrings:[],properties:{privateData:r}};let i,o,l,f;for(;null!==(i=this.getToken());)if("/"===i){i=this.getToken();switch(i){case"CharStrings":this.getToken();this.getToken();this.getToken();this.getToken();for(;;){i=this.getToken();if(null===i||"end"===i)break;if("/"!==i)continue;const e=this.getToken();o=this.readInt();this.getToken();l=o>0?t.getBytes(o):new Uint8Array(0);f=s.properties.privateData.lenIV;const n=this.readCharStrings(l,f);this.nextChar();i=this.getToken();"noaccess"===i?this.getToken():"/"===i&&this.prevChar();a.push({glyph:e,encoded:n})}break;case"Subrs":this.readInt();this.getToken();for(;"dup"===this.getToken();){const e=this.readInt();o=this.readInt();this.getToken();l=o>0?t.getBytes(o):new Uint8Array(0);f=s.properties.privateData.lenIV;const a=this.readCharStrings(l,f);this.nextChar();i=this.getToken();"noaccess"===i&&this.getToken();n[e]=a}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":const e=this.readNumberArray();e.length>0&&e.length,0;break;case"StemSnapH":case"StemSnapV":s.properties.privateData[i]=this.readNumberArray();break;case"StdHW":case"StdVW":s.properties.privateData[i]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":s.properties.privateData[i]=this.readNumber();break;case"ExpansionFactor":s.properties.privateData[i]=this.readNumber()||.06;break;case"ForceBold":s.properties.privateData[i]=this.readBoolean()}}for(const{encoded:t,glyph:r}of a){const a=new Type1CharString,i=a.convert(t,n,this.seacAnalysisEnabled);let o=a.output;i&&(o=[14]);const l={glyphName:r,charstring:o,width:a.width,lsb:a.lsb,seac:a.seac};".notdef"===r?s.charstrings.unshift(l):s.charstrings.push(l);if(e.builtInEncoding){const t=e.builtInEncoding.indexOf(r);t>-1&&void 0===e.widths[t]&&t>=e.firstChar&&t<=e.lastChar&&(e.widths[t]=a.width)}}return s}extractFontHeader(e){let t;for(;null!==(t=this.getToken());)if("/"===t){t=this.getToken();switch(t){case"FontMatrix":const n=this.readNumberArray();e.fontMatrix=n;break;case"Encoding":const a=this.getToken();let r;if(/^\d+$/.test(a)){r=[];const e=0|parseInt(a,10);this.getToken();for(let n=0;n<e;n++){t=this.getToken();for(;"dup"!==t&&"def"!==t;){t=this.getToken();if(null===t)return}if("def"===t)break;const e=this.readInt();this.getToken();const n=this.getToken();r[e]=n;this.getToken()}}else r=getEncoding(a);e.builtInEncoding=r;break;case"FontBBox":const s=this.readNumberArray();e.ascent=Math.max(s[3],s[1]);e.descent=Math.min(s[1],s[3]);e.ascentScaled=!0}}}}function findBlock(e,t,n){const a=e.length,r=t.length,s=a-r;let i=n,o=!1;for(;i<s;){let n=0;for(;n<r&&e[i+n]===t[n];)n++;if(n>=r){i+=n;for(;i<a&&isWhiteSpace(e[i]);)i++;o=!0;break}i++}return{found:o,length:i}}class Type1Font{constructor(e,t,n){let a=n.length1,r=n.length2,s=t.peekBytes(6);const i=128===s[0]&&1===s[1];if(i){t.skip(6);a=s[5]<<24|s[4]<<16|s[3]<<8|s[2]}const o=function getHeaderBlock(e,t){const n=[101,101,120,101,99],a=e.pos;let r,s,i,o;try{r=e.getBytes(t);s=r.length}catch{}if(s===t){i=findBlock(r,n,t-2*n.length);if(i.found&&i.length===t)return{stream:new Stream(r),length:t}}warn('Invalid "Length1" property in Type1 font -- trying to recover.');e.pos=a;for(;;){i=findBlock(e.peekBytes(2048),n,0);if(0===i.length)break;e.pos+=i.length;if(i.found){o=e.pos-a;break}}e.pos=a;if(o)return{stream:new Stream(e.getBytes(o)),length:o};warn('Unable to recover "Length1" property in Type1 font -- using as is.');return{stream:new Stream(e.getBytes(t)),length:t}}(t,a);new Type1Parser(o.stream,!1,Aa).extractFontHeader(n);if(i){s=t.getBytes(6);r=s[5]<<24|s[4]<<16|s[3]<<8|s[2]}const l=function getEexecBlock(e,t){const n=e.getBytes();if(0===n.length)throw new FormatError("getEexecBlock - no font program found.");return{stream:new Stream(n),length:n.length}}(t),f=new Type1Parser(l.stream,!0,Aa).extractFontProgram(n);for(const e in f.properties)n[e]=f.properties[e];const c=f.charstrings,h=this.getType2Charstrings(c),u=this.getType2Subrs(f.subrs);this.charstrings=c;this.data=this.wrap(e,h,this.charstrings,u,n);this.seacs=this.getSeacs(f.charstrings)}get numGlyphs(){return this.charstrings.length+1}getCharset(){const e=[".notdef"];for(const{glyphName:t}of this.charstrings)e.push(t);return e}getGlyphMapping(e){const t=this.charstrings;if(e.composite){const n=Object.create(null);for(let a=0,r=t.length;a<r;a++){n[e.cMap.charCodeOf(a)]=a+1}return n}const n=[".notdef"];let a,r;for(r=0;r<t.length;r++)n.push(t[r].glyphName);const s=e.builtInEncoding;if(s){a=Object.create(null);for(const e in s){r=n.indexOf(s[e]);r>=0&&(a[e]=r)}}return type1FontGlyphMapping(e,a,n)}hasGlyphId(e){if(e<0||e>=this.numGlyphs)return!1;if(0===e)return!0;return this.charstrings[e-1].charstring.length>0}getSeacs(e){const t=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];a.seac&&(t[n+1]=a.seac)}return t}getType2Charstrings(e){const t=[];for(const n of e)t.push(n.charstring);return t}getType2Subrs(e){let t=0;const n=e.length;t=n<1133?107:n<33769?1131:32768;const a=[];let r;for(r=0;r<t;r++)a.push([11]);for(r=0;r<n;r++)a.push(e[r]);return a}wrap(e,t,n,a,r){const s=new CFF;s.header=new CFFHeader(1,0,4,4);s.names=[e];const i=new CFFTopDict;i.setByName("version",391);i.setByName("Notice",392);i.setByName("FullName",393);i.setByName("FamilyName",394);i.setByName("Weight",395);i.setByName("Encoding",null);i.setByName("FontMatrix",r.fontMatrix);i.setByName("FontBBox",r.bbox);i.setByName("charset",null);i.setByName("CharStrings",null);i.setByName("Private",null);s.topDict=i;const o=new CFFStrings;o.add("Version 0.11");o.add("See original notice");o.add(e);o.add(e);o.add("Medium");s.strings=o;s.globalSubrIndex=new CFFIndex;const l=t.length,f=[".notdef"];let c,h;for(c=0;c<l;c++){const e=n[c].glyphName;-1===Ma.indexOf(e)&&o.add(e);f.push(e)}s.charset=new CFFCharset(!1,0,f);const u=new CFFIndex;u.add([139,14]);for(c=0;c<l;c++)u.add(t[c]);s.charStrings=u;const m=new CFFPrivateDict;m.setByName("Subrs",null);const p=["BlueValues","OtherBlues","FamilyBlues","FamilyOtherBlues","StemSnapH","StemSnapV","BlueShift","BlueFuzz","BlueScale","LanguageGroup","ExpansionFactor","ForceBold","StdHW","StdVW"];for(c=0,h=p.length;c<h;c++){const e=p[c];if(!(e in r.privateData))continue;const t=r.privateData[e];if(Array.isArray(t))for(let e=t.length-1;e>0;e--)t[e]-=t[e-1];m.setByName(e,t)}s.topDict.privateDict=m;const d=new CFFIndex;for(c=0,h=a.length;c<h;c++)d.add(a[c]);m.subrsIndex=d;return new CFFCompiler(s).compile()}}const cr=[[57344,63743],[1048576,1114109]],hr=1e3,ur=["ascent","bbox","black","bold","charProcOperatorList","cssFontInfo","data","defaultVMetrics","defaultWidth","descent","disableFontFace","fallbackName","fontExtraProperties","fontMatrix","isInvalidPDFjsFont","isType3Font","italic","loadedName","mimetype","missingFile","name","remeasure","systemFontInfo","vertical"],mr=["cMap","composite","defaultEncoding","differences","isMonospace","isSerifFont","isSymbolicFont","seacMap","subtype","toFontChar","toUnicode","type","vmetrics","widths"];function adjustWidths(e){if(!e.fontMatrix)return;if(e.fontMatrix[0]===a[0])return;const t=.001/e.fontMatrix[0],n=e.widths;for(const e in n)n[e]*=t;e.defaultWidth*=t}function amendFallbackToUnicode(e){if(!e.fallbackToUnicode)return;if(e.toUnicode instanceof IdentityToUnicodeMap)return;const t=[];for(const n in e.fallbackToUnicode)e.toUnicode.has(n)||(t[n]=e.fallbackToUnicode[n]);t.length>0&&e.toUnicode.amend(t)}class fonts_Glyph{constructor(e,t,n,a,r,s,i,o,l){this.originalCharCode=e;this.fontChar=t;this.unicode=n;this.accent=a;this.width=r;this.vmetric=s;this.operatorListId=i;this.isSpace=o;this.isInFont=l}get category(){return shadow(this,"category",function getCharUnicodeCategory(e){const t=xa.get(e);if(t)return t;const n=e.match(Sa),a={isWhitespace:!!n?.[1],isZeroWidthDiacritic:!!n?.[2],isInvisibleFormatMark:!!n?.[3]};xa.set(e,a);return a}(this.unicode),!0)}}function int16(e,t){return(e<<8)+t}function writeSignedInt16(e,t,n){e[t+1]=n;e[t]=n>>>8}function signedInt16(e,t){const n=(e<<8)+t;return 32768&n?n-65536:n}function string16(e){return String.fromCharCode(e>>8&255,255&e)}function safeString16(e){e>32767?e=32767:e<-32768&&(e=-32768);return String.fromCharCode(e>>8&255,255&e)}function isTrueTypeCollectionFile(e){return"ttcf"===bytesToString(e.peekBytes(4))}function getFontFileType(e,{type:t,subtype:n,composite:a}){let r,s;if(function isTrueTypeFile(e){const t=e.peekBytes(4);return 65536===readUint32(t,0)||"true"===bytesToString(t)}(e)||isTrueTypeCollectionFile(e))r=a?"CIDFontType2":"TrueType";else if(function isOpenTypeFile(e){return"OTTO"===bytesToString(e.peekBytes(4))}(e))r=a?"CIDFontType2":"OpenType";else if(function isType1File(e){const t=e.peekBytes(2);return 37===t[0]&&33===t[1]||128===t[0]&&1===t[1]}(e))r=a?"CIDFontType0":"MMType1"===t?"MMType1":"Type1";else if(function isCFFFile(e){const t=e.peekBytes(4);return t[0]>=1&&t[3]>=1&&t[3]<=4}(e))if(a){r="CIDFontType0";s="CIDFontType0C"}else{r="MMType1"===t?"MMType1":"Type1";s="Type1C"}else{warn("getFontFileType: Unable to detect correct font file Type/Subtype.");r=t;s=n}return[r,s]}function applyStandardFontGlyphMap(e,t){for(const n in t)e[+n]=t[n]}function buildToFontChar(e,t,n){const a=[];let r;for(let n=0,s=e.length;n<s;n++){r=getUnicodeForGlyph(e[n],t);-1!==r&&(a[n]=r)}for(const e in n){r=getUnicodeForGlyph(n[e],t);-1!==r&&(a[+e]=r)}return a}function isMacNameRecord(e){return 1===e.platform&&0===e.encoding&&0===e.language}function isWinNameRecord(e){return 3===e.platform&&1===e.encoding&&1033===e.language}function convertCidString(e,t,n=!1){switch(t.length){case 1:return t.charCodeAt(0);case 2:return t.charCodeAt(0)<<8|t.charCodeAt(1)}const a=`Unsupported CID string (charCode ${e}): "${t}".`;if(n)throw new FormatError(a);warn(a);return t}function adjustMapping(e,t,n,a){const r=Object.create(null),s=new Map,i=[],o=new Set;let l=0;let f=cr[l][0],c=cr[l][1];const isInPrivateArea=e=>cr[0][0]<=e&&e<=cr[0][1]||cr[1][0]<=e&&e<=cr[1][1];let h=null;for(const u in e){let m=e[u];if(!t(m))continue;if(f>c){l++;if(l>=cr.length){warn("Ran out of space in font private use area.");break}f=cr[l][0];c=cr[l][1]}const p=f++;0===m&&(m=n);let d=a.get(u);if("string"==typeof d)if(1===d.length)d=d.codePointAt(0);else{if(!h){h=new Map;for(let e=64256;e<=64335;e++){const t=String.fromCharCode(e).normalize("NFKD");t.length>1&&h.set(t,e)}}d=h.get(d)||d.codePointAt(0)}if(d&&!isInPrivateArea(d)&&!o.has(m)){s.set(d,m);o.add(m)}r[p]=m;i[u]=p}return{toFontChar:i,charCodeToGlyphId:r,toUnicodeExtraMap:s,nextAvailableFontCharCode:f}}function createCmapTable(e,t,n){const a=function getRanges(e,t,n){const a=[];for(const t in e)e[t]>=n||a.push({fontCharCode:0|t,glyphId:e[t]});if(t)for(const[e,r]of t)r>=n||a.push({fontCharCode:e,glyphId:r});0===a.length&&a.push({fontCharCode:0,glyphId:0});a.sort((e,t)=>e.fontCharCode-t.fontCharCode);const r=[],s=a.length;for(let e=0;e<s;){const t=a[e].fontCharCode,n=[a[e].glyphId];++e;let i=t;for(;e<s&&i+1===a[e].fontCharCode;){n.push(a[e].glyphId);++i;++e;if(65535===i)break}r.push([t,i,n])}return r}(e,t,n),r=a.at(-1)[1]>65535?2:1;let s,i,o,l,f="\0\0"+string16(r)+"\0\0"+string32(4+8*r);for(s=a.length-1;s>=0&&!(a[s][0]<=65535);--s);const c=s+1;a[s][0]<65535&&65535===a[s][1]&&(a[s][1]=65534);const h=a[s][1]<65535?1:0,u=c+h,m=OpenTypeFileBuilder.getSearchParams(u,2);let p,d,g,b,w="",j="",k="",y="",q="",v=0;for(s=0,i=c;s<i;s++){p=a[s];d=p[0];g=p[1];w+=string16(d);j+=string16(g);b=p[2];let e=!0;for(o=1,l=b.length;o<l;++o)if(b[o]!==b[o-1]+1){e=!1;break}if(e){k+=string16(b[0]-d&65535);y+=string16(0)}else{const e=2*(u-s)+2*v;v+=g-d+1;k+=string16(0);y+=string16(e);for(o=0,l=b.length;o<l;++o)q+=string16(b[o])}}if(h>0){j+="ÿÿ";w+="ÿÿ";k+="\0";y+="\0\0"}const S="\0\0"+string16(2*u)+string16(m.range)+string16(m.entry)+string16(m.rangeShift)+j+"\0\0"+w+k+y+q;let x="",C="";if(r>1){f+="\0\0\n"+string32(4+8*r+4+S.length);x="";for(s=0,i=a.length;s<i;s++){p=a[s];d=p[0];b=p[2];let e=b[0];for(o=1,l=b.length;o<l;++o)if(b[o]!==b[o-1]+1){g=p[0]+o-1;x+=string32(d)+string32(g)+string32(e);d=g+1;e=b[o]}x+=string32(d)+string32(p[1])+string32(e)}C="\0\f\0\0"+string32(x.length+16)+"\0\0\0\0"+string32(x.length/12)}return f+"\0"+string16(S.length+4)+S+C+x}function createOS2Table(e,t,n){n||={unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0};let a=0,r=0,s=0,i=0,o=null,l=0,f=-1;if(t){for(let e in t){e|=0;(o>e||!o)&&(o=e);l<e&&(l=e);f=getUnicodeRangeFor(e,f);if(f<32)a|=1<<f;else if(f<64)r|=1<<f-32;else if(f<96)s|=1<<f-64;else{if(!(f<123))throw new FormatError("Unicode ranges Bits > 123 are reserved for internal usage");i|=1<<f-96}}l>65535&&(l=65535)}else{o=0;l=255}const c=e.bbox||[0,0,0,0],h=n.unitsPerEm||(e.fontMatrix?1/Math.max(...e.fontMatrix.slice(0,4).map(Math.abs)):1e3),u=e.ascentScaled?1:h/hr,m=n.ascent||Math.round(u*(e.ascent||c[3]));let p=n.descent||Math.round(u*(e.descent||c[1]));p>0&&e.descent>0&&c[1]<0&&(p=-p);const d=n.yMax||m,g=-n.yMin||-p;return"\0$ô\0\0\0»\0\0\0»\0\0ß\x001\0\0\0\0"+String.fromCharCode(e.fixedPitch?9:0)+"\0\0\0\0\0\0"+string32(a)+string32(r)+string32(s)+string32(i)+"*21*"+string16(e.italicAngle?1:0)+string16(o||e.firstChar)+string16(l||e.lastChar)+string16(m)+string16(p)+"\0d"+string16(d)+string16(g)+"\0\0\0\0\0\0\0\0"+string16(e.xHeight)+string16(e.capHeight)+string16(0)+string16(o||e.firstChar)+"\0"}function createPostTable(e){return"\0\0\0"+string32(Math.floor(65536*e.italicAngle))+"\0\0\0\0"+string32(e.fixedPitch?1:0)+"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}function createPostscriptName(e){return e.replaceAll(/[^\x21-\x7E]|[[\](){}<>/%]/g,"").slice(0,63)}function createNameTable(e,t){t||(t=[[],[]]);const n=[t[0][0]||"Original licence",t[0][1]||e,t[0][2]||"Unknown",t[0][3]||"uniqueID",t[0][4]||e,t[0][5]||"Version 0.11",t[0][6]||createPostscriptName(e),t[0][7]||"Unknown",t[0][8]||"Unknown",t[0][9]||"Unknown"],a=[];let r,s,i,o,l;for(r=0,s=n.length;r<s;r++){l=t[1][r]||n[r];const e=[];for(i=0,o=l.length;i<o;i++)e.push(string16(l.charCodeAt(i)));a.push(e.join(""))}const f=[n,a],c=["\0","\0"],h=["\0\0","\0"],u=["\0\0","\t"],m=n.length*c.length;let p="\0\0"+string16(m)+string16(12*m+6),d=0;for(r=0,s=c.length;r<s;r++){const e=f[r];for(i=0,o=e.length;i<o;i++){l=e[i];p+=c[r]+h[r]+u[r]+string16(i)+string16(l.length)+string16(d);d+=l.length}}p+=n.join("")+a.join("");return p}class Font{constructor(e,t,n,a){this.name=e;this.psName=null;this.mimetype=null;this.disableFontFace=a.disableFontFace;this.fontExtraProperties=a.fontExtraProperties;this.loadedName=n.loadedName;this.isType3Font=n.isType3Font;this.missingFile=!1;this.cssFontInfo=n.cssFontInfo;this._charsCache=Object.create(null);this._glyphCache=Object.create(null);let r=!!(n.flags&Ia);if(!r&&!n.isSimulatedFlags){const t=Ua(),n=Wa(),a=Ka();for(const s of e.split("+")){let e=normalizeFontName(s);e=t[e]||n[e]||e;e=e.split("-",1)[0];if(a[e]){r=!0;break}}}this.isSerifFont=r;this.isSymbolicFont=!!(n.flags&Fa);this.isMonospace=!!(n.flags&Ca);let{type:s,subtype:i}=n;this.type=s;this.subtype=i;this.systemFontInfo=n.systemFontInfo;const o=e.match(/^InvalidPDFjsFont_(.*)_\d+$/);this.isInvalidPDFjsFont=!!o;this.isInvalidPDFjsFont?this.fallbackName=o[1]:this.isMonospace?this.fallbackName="monospace":this.isSerifFont?this.fallbackName="serif":this.fallbackName="sans-serif";if(this.systemFontInfo?.guessFallback){this.systemFontInfo.guessFallback=!1;this.systemFontInfo.css+=`,${this.fallbackName}`}this.differences=n.differences;this.widths=n.widths;this.defaultWidth=n.defaultWidth;this.composite=n.composite;this.cMap=n.cMap;this.capHeight=n.capHeight/hr;this.ascent=n.ascent/hr;this.descent=n.descent/hr;this.lineHeight=this.ascent-this.descent;this.fontMatrix=n.fontMatrix;this.bbox=n.bbox;this.defaultEncoding=n.defaultEncoding;this.toUnicode=n.toUnicode;this.toFontChar=[];if("Type3"===n.type){for(let e=0;e<256;e++)this.toFontChar[e]=this.differences[e]||n.defaultEncoding[e];return}this.cidEncoding=n.cidEncoding||"";this.vertical=!!n.vertical;if(this.vertical){this.vmetrics=n.vmetrics;this.defaultVMetrics=n.defaultVMetrics}if(!t||t.isEmpty){t&&warn('Font file is empty in "'+e+'" ('+this.loadedName+")");this.fallbackToSystemFont(n);return}[s,i]=getFontFileType(t,n);s===this.type&&i===this.subtype||info(`Inconsistent font file Type/SubType, expected: ${this.type}/${this.subtype} but found: ${s}/${i}.`);let l;try{switch(s){case"MMType1":info("MMType1 font ("+e+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";const a="Type1C"===i||"CIDFontType0C"===i?new CFFFont(t,n):new Type1Font(e,t,n);adjustWidths(n);l=this.convert(e,a,n);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype";l=this.checkAndRepair(e,t,n);adjustWidths(n);this.isOpenType&&(s="OpenType");break;default:throw new FormatError(`Font ${s} is not supported`)}}catch(e){warn(e);this.fallbackToSystemFont(n);return}amendFallbackToUnicode(n);this.data=l;this.type=s;this.subtype=i;this.fontMatrix=n.fontMatrix;this.widths=n.widths;this.defaultWidth=n.defaultWidth;this.toUnicode=n.toUnicode;this.seacMap=n.seacMap}get renderer(){return shadow(this,"renderer",FontRendererFactory.create(this,Aa))}exportData(){const e=Object.create(null);for(const t of ur){const n=this[t];void 0!==n&&(e[t]=n)}if(!this.fontExtraProperties)return{data:e};const t=Object.create(null);for(const e of mr){const n=this[e];void 0!==n&&(t[e]=n)}return{data:e,extra:t}}fallbackToSystemFont(e){this.missingFile=!0;const{name:t,type:n}=this;let a=normalizeFontName(t);const r=Ua(),s=Wa(),i=!!r[a],o=!(!s[a]||!r[s[a]]);a=r[a]||s[a]||a;const l=Qa()[a];if(l){isNaN(this.ascent)&&(this.ascent=l.ascent/hr);isNaN(this.descent)&&(this.descent=l.descent/hr);isNaN(this.capHeight)&&(this.capHeight=l.capHeight/hr)}this.bold=/bold/gi.test(a);this.italic=/oblique|italic/gi.test(a);this.black=/Black/g.test(t);const f=/Narrow/g.test(t);this.remeasure=(!i||f)&&Object.keys(this.widths).length>0;if((i||o)&&"CIDFontType2"===n&&this.cidEncoding.startsWith("Identity-")){const n=e.cidToGidMap,a=[];applyStandardFontGlyphMap(a,Ga());/Arial-?Black/i.test(t)?applyStandardFontGlyphMap(a,$a()):/Calibri/i.test(t)&&applyStandardFontGlyphMap(a,Ya());if(n){for(const e in a){const t=a[e];void 0!==n[t]&&(a[+e]=n[t])}n.length!==this.toUnicode.length&&e.hasIncludedToUnicodeMap&&this.toUnicode instanceof IdentityToUnicodeMap&&this.toUnicode.forEach(function(e,t){const r=a[e];void 0===n[r]&&(a[+e]=t)})}this.toUnicode instanceof IdentityToUnicodeMap||this.toUnicode.forEach(function(e,t){a[+e]=t});this.toFontChar=a;this.toUnicode=new ToUnicodeMap(a)}else if(/Symbol/i.test(a))this.toFontChar=buildToFontChar(wa,ka(),this.differences);else if(/Dingbats/i.test(a))this.toFontChar=buildToFontChar(ja,ya(),this.differences);else if(i||o){const e=buildToFontChar(this.defaultEncoding,ka(),this.differences);"CIDFontType2"!==n||this.cidEncoding.startsWith("Identity-")||this.toUnicode instanceof IdentityToUnicodeMap||this.toUnicode.forEach(function(t,n){e[+t]=n});this.toFontChar=e}else{const e=ka(),n=[];this.toUnicode.forEach((t,a)=>{if(!this.composite){const n=getUnicodeForGlyph(this.differences[t]||this.defaultEncoding[t],e);-1!==n&&(a=n)}n[+t]=a});this.composite&&this.toUnicode instanceof IdentityToUnicodeMap&&/Tahoma|Verdana/i.test(t)&&applyStandardFontGlyphMap(n,Ga());this.toFontChar=n}amendFallbackToUnicode(e);this.loadedName=a.split("-",1)[0]}checkAndRepair(e,t,n){const a=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "];function readTables(e,t){const n=Object.create(null);n["OS/2"]=null;n.cmap=null;n.head=null;n.hhea=null;n.hmtx=null;n.maxp=null;n.name=null;n.post=null;for(let r=0;r<t;r++){const t=readTableEntry(e);a.includes(t.tag)&&(0!==t.length&&(n[t.tag]=t))}return n}function readTableEntry(e){const t=e.getString(4),n=e.getInt32()>>>0,a=e.getInt32()>>>0,r=e.getInt32()>>>0,s=e.pos;e.pos=e.start||0;e.skip(a);const i=e.getBytes(r);e.pos=s;if("head"===t){i[8]=i[9]=i[10]=i[11]=0;i[17]|=32}return{tag:t,checksum:n,length:r,offset:a,data:i}}function readOpenTypeHeader(e){return{version:e.getString(4),numTables:e.getUint16(),searchRange:e.getUint16(),entrySelector:e.getUint16(),rangeShift:e.getUint16()}}function sanitizeGlyph(e,t,n,a,r,s){const i={length:0,sizeOfInstructions:0};if(t<0||t>=e.length||n>e.length||n-t<=12)return i;const o=e.subarray(t,n),l=signedInt16(o[2],o[3]),f=signedInt16(o[4],o[5]),c=signedInt16(o[6],o[7]),h=signedInt16(o[8],o[9]);if(l>c){writeSignedInt16(o,2,c);writeSignedInt16(o,6,l)}if(f>h){writeSignedInt16(o,4,h);writeSignedInt16(o,8,f)}const u=signedInt16(o[0],o[1]);if(u<0){if(u<-1)return i;a.set(o,r);i.length=o.length;return i}let m,p=10,d=0;for(m=0;m<u;m++){d=(o[p]<<8|o[p+1])+1;p+=2}const g=p,b=o[p]<<8|o[p+1];i.sizeOfInstructions=b;p+=2+b;const w=p;let j=0;for(m=0;m<d;m++){const e=o[p++];192&e&&(o[p-1]=63&e);let t=2;2&e?t=1:16&e&&(t=0);let n=2;4&e?n=1:32&e&&(n=0);const a=t+n;j+=a;if(8&e){const e=o[p++];0===e&&(o[p-1]^=8);m+=e;j+=e*a}}if(0===j)return i;let k=p+j;if(k>o.length)return i;if(!s&&b>0){a.set(o.subarray(0,g),r);a.set([0,0],r+g);a.set(o.subarray(w,k),r+g+2);k-=b;o.length-k>3&&(k=k+3&-4);i.length=k;return i}if(o.length-k>3){k=k+3&-4;a.set(o.subarray(0,k),r);i.length=k;return i}a.set(o,r);i.length=o.length;return i}function readNameTable(e){const n=(t.start||0)+e.offset;t.pos=n;const a=[[],[]],r=[],s=e.length,i=n+s;if(0!==t.getUint16()||s<6)return[a,r];const o=t.getUint16(),l=t.getUint16();let f,c;for(f=0;f<o&&t.pos+12<=i;f++){const e={platform:t.getUint16(),encoding:t.getUint16(),language:t.getUint16(),name:t.getUint16(),length:t.getUint16(),offset:t.getUint16()};(isMacNameRecord(e)||isWinNameRecord(e))&&r.push(e)}for(f=0,c=r.length;f<c;f++){const e=r[f];if(e.length<=0)continue;const s=n+l+e.offset;if(s+e.length>i)continue;t.pos=s;const o=e.name;if(e.encoding){let n="";for(let a=0,r=e.length;a<r;a+=2)n+=String.fromCharCode(t.getUint16());a[1][o]=n}else a[0][o]=t.getString(e.length)}return[a,r]}const r=[0,0,0,0,0,0,0,0,-2,-2,-2,-2,0,0,-2,-5,-1,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,-1,-1,1,-1,-999,0,1,0,-1,-2,0,-1,-2,-1,-1,0,-1,-1,0,0,-999,-999,-1,-1,-1,-1,-2,-999,-2,-2,-999,0,-2,-2,0,0,-2,0,-2,0,0,0,-2,-1,-1,1,1,0,0,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,0,-999,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,-2,-999,-999,-999,-999,-999,-1,-1,-2,-2,0,0,0,0,-1,-1,-999,-2,-2,0,0,-1,-2,-2,0,0,0,-1,-1,-1,-2];function sanitizeTTProgram(e,t){let n,a,s,i,o,l=e.data,f=0,c=0,h=0;const u=[],m=[],p=[];let d=t.tooComplexToFollowFunctions,g=!1,b=0,w=0;for(let e=l.length;f<e;){const e=l[f++];if(64===e){a=l[f++];if(g||w)f+=a;else for(n=0;n<a;n++)u.push(l[f++])}else if(65===e){a=l[f++];if(g||w)f+=2*a;else for(n=0;n<a;n++){s=l[f++];u.push(s<<8|l[f++])}}else if(176==(248&e)){a=e-176+1;if(g||w)f+=a;else for(n=0;n<a;n++)u.push(l[f++])}else if(184==(248&e)){a=e-184+1;if(g||w)f+=2*a;else for(n=0;n<a;n++){s=l[f++];u.push(signedInt16(s,l[f++]))}}else if(43!==e||d)if(44!==e||d){if(45===e)if(g){g=!1;c=f}else{o=m.pop();if(!o){warn("TT: ENDF bad stack");t.hintsValid=!1;return}i=p.pop();l=o.data;f=o.i;t.functionsStackDeltas[i]=u.length-o.stackTop}else if(137===e){if(g||w){warn("TT: nested IDEFs not allowed");d=!0}g=!0;h=f}else if(88===e)++b;else if(27===e)w=b;else if(89===e){w===b&&(w=0);--b}else if(28===e&&!g&&!w){const e=u.at(-1);e>0&&(f+=e-1)}}else{if(g||w){warn("TT: nested FDEFs not allowed");d=!0}g=!0;h=f;i=u.pop();t.functionsDefined[i]={data:l,i:f}}else if(!g&&!w){i=u.at(-1);if(isNaN(i))info("TT: CALL empty stack (or invalid entry).");else{t.functionsUsed[i]=!0;if(i in t.functionsStackDeltas){const e=u.length+t.functionsStackDeltas[i];if(e<0){warn("TT: CALL invalid functions stack delta.");t.hintsValid=!1;return}u.length=e}else if(i in t.functionsDefined&&!p.includes(i)){m.push({data:l,i:f,stackTop:u.length-1});p.push(i);o=t.functionsDefined[i];if(!o){warn("TT: CALL non-existent function");t.hintsValid=!1;return}l=o.data;f=o.i}}}if(!g&&!w){let t=0;e<=142?t=r[e]:e>=192&&e<=223?t=-1:e>=224&&(t=-2);if(e>=113&&e<=117){a=u.pop();isNaN(a)||(t=2*-a)}for(;t<0&&u.length>0;){u.pop();t++}for(;t>0;){u.push(NaN);t--}}}t.tooComplexToFollowFunctions=d;const j=[l];f>l.length&&j.push(new Uint8Array(f-l.length));if(h>c){warn("TT: complementing a missing function tail");j.push(new Uint8Array([34,45]))}!function foldTTTable(e,t){if(t.length>1){let n,a,r=0;for(n=0,a=t.length;n<a;n++)r+=t[n].length;r=r+3&-4;const s=new Uint8Array(r);let i=0;for(n=0,a=t.length;n<a;n++){s.set(t[n],i);i+=t[n].length}e.data=s;e.length=r}}(e,j)}let s,i;if(isTrueTypeCollectionFile(t=new Stream(new Uint8Array(t.getBytes())))){const e=function readTrueTypeCollectionData(e,t){const{numFonts:n,offsetTable:a}=function readTrueTypeCollectionHeader(e){const t=e.getString(4);assert("ttcf"===t,"Must be a TrueType Collection font.");const n=e.getUint16(),a=e.getUint16(),r=e.getInt32()>>>0,s=[];for(let t=0;t<r;t++)s.push(e.getInt32()>>>0);const i={ttcTag:t,majorVersion:n,minorVersion:a,numFonts:r,offsetTable:s};switch(n){case 1:return i;case 2:i.dsigTag=e.getInt32()>>>0;i.dsigLength=e.getInt32()>>>0;i.dsigOffset=e.getInt32()>>>0;return i}throw new FormatError(`Invalid TrueType Collection majorVersion: ${n}.`)}(e),r=t.split("+");let s;for(let i=0;i<n;i++){e.pos=(e.start||0)+a[i];const n=readOpenTypeHeader(e),o=readTables(e,n.numTables);if(!o.name)throw new FormatError('TrueType Collection font must contain a "name" table.');const[l]=readNameTable(o.name);for(let e=0,a=l.length;e<a;e++)for(let a=0,i=l[e].length;a<i;a++){const i=l[e][a]?.replaceAll(/\s/g,"");if(i){if(i===t)return{header:n,tables:o};if(!(r.length<2))for(const e of r)i===e&&(s={name:e,header:n,tables:o})}}}if(s){warn(`TrueType Collection does not contain "${t}" font, falling back to "${s.name}" font instead.`);return{header:s.header,tables:s.tables}}throw new FormatError(`TrueType Collection does not contain "${t}" font.`)}(t,this.name);s=e.header;i=e.tables}else{s=readOpenTypeHeader(t);i=readTables(t,s.numTables)}const o=!i["CFF "];if(o){if(!i.loca)throw new FormatError('Required "loca" table is not found');if(!i.glyf){warn('Required "glyf" table is not found -- trying to recover.');i.glyf={tag:"glyf",data:new Uint8Array(0)}}this.isOpenType=!1}else{if("OTTO"===s.version&&!n.composite||!i.head||!i.hhea||!i.maxp||!i.post)return this.convert(e,new CFFFont(new Stream(i["CFF "].data),n),n);delete i.glyf;delete i.loca;delete i.fpgm;delete i.prep;delete i["cvt "];this.isOpenType=!0}if(!i.maxp)throw new FormatError('Required "maxp" table is not found');let l;if(!o)try{const e=new CFFParser(new Stream(i["CFF "].data),n,Aa).parse();e.duplicateFirstGlyph();const t=new CFFCompiler(e);i["CFF "].data=t.compile();l=e.charStringCount}catch{warn("Failed to compile font "+n.loadedName)}t.pos=(t.start||0)+i.maxp.offset;let f=t.getInt32();const c=l??t.getUint16();if(20480===f&&6!==i.maxp.length){i.maxp.data=i.maxp.data.subarray(0,6);i.maxp.length=6}if(65536!==f&&20480!==f){if(6===i.maxp.length)f=20480;else{if(!(i.maxp.length>=32))throw new FormatError('"maxp" table has a wrong version number');f=65536}!function writeUint32(e,t,n){e[t+3]=255&n;e[t+2]=n>>>8;e[t+1]=n>>>16;e[t]=n>>>24}(i.maxp.data,0,f)}let h=int16(i.head.data[50],i.head.data[51]);if(i.loca){const e=h?4*(c+1):2*(c+1);if(i.loca.length!==e){warn("Incorrect 'loca' table length -- attempting to fix it.");const n=Object.values(i).filter(Boolean).sort((e,t)=>e.offset-t.offset),a=n.indexOf(i.loca),r=n[a+1]||null;if(r&&i.loca.offset+e<r.offset){const n=t.pos;t.pos=t.start||0;t.skip(i.loca.offset);i.loca.data=t.getBytes(e);i.loca.length=e;t.pos=n}}}if(n.scaleFactors?.length===c&&o){const{scaleFactors:e}=n,t=new GlyfTable({glyfTable:i.glyf.data,isGlyphLocationsLong:h,locaTable:i.loca.data,numGlyphs:c});t.scale(e);const{glyf:a,loca:r,isLocationLong:s}=t.write();i.glyf.data=a;i.loca.data=r;if(s!==!!h){i.head.data[50]=0;h=i.head.data[51]=s?1:0}const o=i.hmtx.data;for(let t=0;t<c;t++){const n=4*t,a=Math.round(e[t]*int16(o[n],o[n+1]));o[n]=a>>8&255;o[n+1]=255&a;writeSignedInt16(o,n+2,Math.round(e[t]*signedInt16(o[n+2],o[n+3])))}}let u=c+1,m=!0;if(u>65535){m=!1;u=c;warn("Not enough space in glyfs to duplicate first glyph.")}let p=0,d=0;if(f>=65536&&i.maxp.length>=32){t.pos+=8;if(t.getUint16()>2){i.maxp.data[14]=0;i.maxp.data[15]=2}t.pos+=4;p=t.getUint16();t.pos+=4;d=t.getUint16()}i.maxp.data[4]=u>>8;i.maxp.data[5]=255&u;const g=function sanitizeTTPrograms(e,t,n,a){const r={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};e&&sanitizeTTProgram(e,r);t&&sanitizeTTProgram(t,r);e&&function checkInvalidFunctions(e,t){if(!e.tooComplexToFollowFunctions)if(e.functionsDefined.length>t){warn("TT: more functions defined than expected");e.hintsValid=!1}else for(let n=0,a=e.functionsUsed.length;n<a;n++){if(n>t){warn("TT: invalid function id: "+n);e.hintsValid=!1;return}if(e.functionsUsed[n]&&!e.functionsDefined[n]){warn("TT: undefined function: "+n);e.hintsValid=!1;return}}}(r,a);if(n&&1&n.length){const e=new Uint8Array(n.length+1);e.set(n.data);n.data=e}return r.hintsValid}(i.fpgm,i.prep,i["cvt "],p);if(!g){delete i.fpgm;delete i.prep;delete i["cvt "]}!function sanitizeMetrics(e,t,n,a,r,s){if(!t){n&&(n.data=null);return}e.pos=(e.start||0)+t.offset;e.pos+=4;e.pos+=2;e.pos+=2;e.pos+=2;e.pos+=2;e.pos+=2;e.pos+=2;e.pos+=2;e.pos+=2;e.pos+=2;const i=e.getUint16();e.pos+=8;e.pos+=2;let o=e.getUint16();if(0!==i){if(!(2&int16(a.data[44],a.data[45]))){t.data[22]=0;t.data[23]=0}}if(o>r){info(`The numOfMetrics (${o}) should not be greater than the numGlyphs (${r}).`);o=r;t.data[34]=(65280&o)>>8;t.data[35]=255&o}const l=r-o-(n.length-4*o>>1);if(l>0){const e=new Uint8Array(n.length+2*l);e.set(n.data);if(s){e[n.length]=n.data[2];e[n.length+1]=n.data[3]}n.data=e}}(t,i.hhea,i.hmtx,i.head,u,m);if(!i.head)throw new FormatError('Required "head" table is not found');!function sanitizeHead(e,t,n){const a=e.data,r=function int32(e,t,n,a){return(e<<24)+(t<<16)+(n<<8)+a}(a[0],a[1],a[2],a[3]);if(r>>16!=1){info("Attempting to fix invalid version in head table: "+r);a[0]=0;a[1]=1;a[2]=0;a[3]=0}const s=int16(a[50],a[51]);if(s<0||s>1){info("Attempting to fix invalid indexToLocFormat in head table: "+s);const e=t+1;if(n===e<<1){a[50]=0;a[51]=0}else{if(n!==e<<2)throw new FormatError("Could not fix indexToLocFormat: "+s);a[50]=0;a[51]=1}}}(i.head,c,o?i.loca.length:0);let b=Object.create(null);if(o){const e=function sanitizeGlyphLocations(e,t,n,a,r,s,i){let o,l,f;if(a){o=4;l=function fontItemDecodeLong(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};f=function fontItemEncodeLong(e,t,n){e[t]=n>>>24&255;e[t+1]=n>>16&255;e[t+2]=n>>8&255;e[t+3]=255&n}}else{o=2;l=function fontItemDecode(e,t){return e[t]<<9|e[t+1]<<1};f=function fontItemEncode(e,t,n){e[t]=n>>9&255;e[t+1]=n>>1&255}}const c=s?n+1:n,h=o*(1+c),u=new Uint8Array(h);u.set(e.data.subarray(0,h));e.data=u;const m=t.data,p=m.length,d=new Uint8Array(p);let g,b;const w=[];for(g=0,b=0;g<n+1;g++,b+=o){let e=l(u,b);e>p&&(e=p);w.push({index:g,offset:e,endOffset:0})}w.sort((e,t)=>e.offset-t.offset);for(g=0;g<n;g++)w[g].endOffset=w[g+1].offset;w.sort((e,t)=>e.index-t.index);for(g=0;g<n;g++){const{offset:e,endOffset:t}=w[g];if(0!==e||0!==t)break;const n=w[g+1].offset;if(0!==n){w[g].endOffset=n;break}}const j=w.at(-2);0!==j.offset&&0===j.endOffset&&(j.endOffset=p);const k=Object.create(null);let y=0;f(u,0,y);for(g=0,b=o;g<n;g++,b+=o){const e=sanitizeGlyph(m,w[g].offset,w[g].endOffset,d,y,r),t=e.length;0===t&&(k[g]=!0);e.sizeOfInstructions>i&&(i=e.sizeOfInstructions);y+=t;f(u,b,y)}if(0===y){const e=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(g=0,b=o;g<c;g++,b+=o)f(u,b,e.length);t.data=e}else if(s){const n=l(u,o);if(d.length>n+y)t.data=d.subarray(0,n+y);else{t.data=new Uint8Array(n+y);t.data.set(d.subarray(0,y))}t.data.set(d.subarray(0,n),y);f(e.data,u.length-o,y+n)}else t.data=d.subarray(0,y);return{missingGlyphs:k,maxSizeOfInstructions:i}}(i.loca,i.glyf,c,h,g,m,d);b=e.missingGlyphs;if(f>=65536&&i.maxp.length>=32){i.maxp.data[26]=e.maxSizeOfInstructions>>8;i.maxp.data[27]=255&e.maxSizeOfInstructions}}if(!i.hhea)throw new FormatError('Required "hhea" table is not found');if(0===i.hhea.data[10]&&0===i.hhea.data[11]){i.hhea.data[10]=255;i.hhea.data[11]=255}const w={unitsPerEm:int16(i.head.data[18],i.head.data[19]),yMax:signedInt16(i.head.data[42],i.head.data[43]),yMin:signedInt16(i.head.data[38],i.head.data[39]),ascent:signedInt16(i.hhea.data[4],i.hhea.data[5]),descent:signedInt16(i.hhea.data[6],i.hhea.data[7]),lineGap:signedInt16(i.hhea.data[8],i.hhea.data[9])};this.ascent=w.ascent/w.unitsPerEm;this.descent=w.descent/w.unitsPerEm;this.lineGap=w.lineGap/w.unitsPerEm;if(this.cssFontInfo?.lineHeight){this.lineHeight=this.cssFontInfo.metrics.lineHeight;this.lineGap=this.cssFontInfo.metrics.lineGap}else this.lineHeight=this.ascent-this.descent+this.lineGap;i.post&&function readPostScriptTable(e,n,a){const r=(t.start||0)+e.offset;t.pos=r;const s=r+e.length,i=t.getInt32();t.skip(28);let o,l,f=!0;switch(i){case 65536:o=Oa;break;case 131072:const e=t.getUint16();if(e!==a){f=!1;break}const r=[];for(l=0;l<e;++l){const e=t.getUint16();if(e>=32768){f=!1;break}r.push(e)}if(!f)break;const c=[],h=[];for(;t.pos<s;){const e=t.getByte();h.length=e;for(l=0;l<e;++l)h[l]=String.fromCharCode(t.getByte());c.push(h.join(""))}o=[];for(l=0;l<e;++l){const e=r[l];e<258?o.push(Oa[e]):o.push(c[e-258])}break;case 196608:break;default:warn("Unknown/unsupported post table version "+i);f=!1;n.defaultEncoding&&(o=n.defaultEncoding)}n.glyphNames=o;return f}(i.post,n,c);i.post={tag:"post",data:createPostTable(n)};const j=Object.create(null);function hasGlyph(e){return!b[e]}if(n.composite){const e=n.cidToGidMap||[],t=0===e.length;n.cMap.forEach(function(n,a){"string"==typeof a&&(a=convertCidString(n,a,!0));if(a>65535)throw new FormatError("Max size of CID is 65,535");let r=-1;t?r=a:void 0!==e[a]&&(r=e[a]);r>=0&&r<c&&hasGlyph(r)&&(j[n]=r)})}else{const e=function readCmapTable(e,t,n,a){if(!e){warn("No cmap table available.");return{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1}}let r,s=(t.start||0)+e.offset;t.pos=s;t.skip(2);const i=t.getUint16();let o,l=!1;for(let e=0;e<i;e++){const r=t.getUint16(),s=t.getUint16(),f=t.getInt32()>>>0;let c=!1;if(o?.platformId!==r||o?.encodingId!==s){if(0!==r||0!==s&&1!==s&&3!==s)if(1===r&&0===s)c=!0;else if(3!==r||1!==s||!a&&o){if(n&&3===r&&0===s){c=!0;let n=!0;if(e<i-1){const e=t.peekBytes(2);int16(e[0],e[1])<r&&(n=!1)}n&&(l=!0)}}else{c=!0;n||(l=!0)}else c=!0;c&&(o={platformId:r,encodingId:s,offset:f});if(l)break}}o&&(t.pos=s+o.offset);if(!o||-1===t.peekByte()){warn("Could not find a preferred cmap table.");return{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1}}const f=t.getUint16();let c=!1;const h=[];let u,m;if(0===f){t.skip(4);for(u=0;u<256;u++){const e=t.getByte();e&&h.push({charCode:u,glyphId:e})}c=!0}else if(2===f){t.skip(4);const e=[];let n=0;for(let a=0;a<256;a++){const a=t.getUint16()>>3;e.push(a);n=Math.max(a,n)}const a=[];for(let e=0;e<=n;e++)a.push({firstCode:t.getUint16(),entryCount:t.getUint16(),idDelta:signedInt16(t.getByte(),t.getByte()),idRangePos:t.pos+t.getUint16()});for(let n=0;n<256;n++)if(0===e[n]){t.pos=a[0].idRangePos+2*n;m=t.getUint16();h.push({charCode:n,glyphId:m})}else{const r=a[e[n]];for(u=0;u<r.entryCount;u++){const e=(n<<8)+u+r.firstCode;t.pos=r.idRangePos+2*u;m=t.getUint16();0!==m&&(m=(m+r.idDelta)%65536);h.push({charCode:e,glyphId:m})}}}else if(4===f){t.skip(4);const e=t.getUint16()>>1;t.skip(6);const n=[];let a;for(a=0;a<e;a++)n.push({end:t.getUint16()});t.skip(2);for(a=0;a<e;a++)n[a].start=t.getUint16();for(a=0;a<e;a++)n[a].delta=t.getUint16();let i,o=0;for(a=0;a<e;a++){r=n[a];const s=t.getUint16();if(s){i=(s>>1)-(e-a);r.offsetIndex=i;o=Math.max(o,i+r.end-r.start+1)}else r.offsetIndex=-1}const l=[];for(u=0;u<o;u++)l.push(t.getUint16());for(a=0;a<e;a++){r=n[a];s=r.start;const e=r.end,t=r.delta;i=r.offsetIndex;for(u=s;u<=e;u++)if(65535!==u){m=i<0?u:l[i+u-s];m=m+t&65535;h.push({charCode:u,glyphId:m})}}}else if(6===f){t.skip(4);const e=t.getUint16(),n=t.getUint16();for(u=0;u<n;u++){m=t.getUint16();const n=e+u;h.push({charCode:n,glyphId:m})}}else{if(12!==f){warn("cmap table has unsupported format: "+f);return{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1}}{t.skip(10);const e=t.getInt32()>>>0;for(u=0;u<e;u++){const e=t.getInt32()>>>0,n=t.getInt32()>>>0;let a=t.getInt32()>>>0;for(let t=e;t<=n;t++)h.push({charCode:t,glyphId:a++})}}}h.sort((e,t)=>e.charCode-t.charCode);const p=[],d=new Set;for(const e of h){const{charCode:t}=e;if(!d.has(t)){d.add(t);p.push(e)}}return{platformId:o.platformId,encodingId:o.encodingId,mappings:p,hasShortCmap:c}}(i.cmap,t,this.isSymbolicFont,n.hasEncoding),a=e.platformId,r=e.encodingId,s=e.mappings;let o=[],l=!1;!n.hasEncoding||"MacRomanEncoding"!==n.baseEncodingName&&"WinAnsiEncoding"!==n.baseEncodingName||(o=getEncoding(n.baseEncodingName));if(n.hasEncoding&&!this.isSymbolicFont&&(3===a&&1===r||1===a&&0===r)){const e=ka();for(let t=0;t<256;t++){let i;i=void 0!==this.differences[t]?this.differences[t]:o.length&&""!==o[t]?o[t]:ga[t];if(!i)continue;const l=recoverGlyphName(i,e);let f;3===a&&1===r?f=e[l]:1===a&&0===r&&(f=da.indexOf(l));if(void 0===f){if(!n.glyphNames&&n.hasIncludedToUnicodeMap&&!(this.toUnicode instanceof IdentityToUnicodeMap)){const e=this.toUnicode.get(t);e&&(f=e.codePointAt(0))}if(void 0===f)continue}for(const e of s)if(e.charCode===f){j[t]=e.glyphId;break}}}else if(0===a){for(const e of s)j[e.charCode]=e.glyphId;l=!0}else if(3===a&&0===r)for(const e of s){let t=e.charCode;t>=61440&&t<=61695&&(t&=255);j[t]=e.glyphId}else for(const e of s)j[e.charCode]=e.glyphId;if(n.glyphNames&&(o.length||this.differences.length))for(let e=0;e<256;++e){if(!l&&void 0!==j[e])continue;const t=this.differences[e]||o[e];if(!t)continue;const a=n.glyphNames.indexOf(t);a>0&&hasGlyph(a)&&(j[e]=a)}}0===j.length&&(j[0]=0);let k=u-1;m||(k=0);if(!n.cssFontInfo){const e=adjustMapping(j,hasGlyph,k,this.toUnicode);this.toFontChar=e.toFontChar;i.cmap={tag:"cmap",data:createCmapTable(e.charCodeToGlyphId,e.toUnicodeExtraMap,u)};i["OS/2"]&&function validateOS2Table(e,t){t.pos=(t.start||0)+e.offset;const n=t.getUint16();t.skip(60);const a=t.getUint16();if(n<4&&768&a)return!1;if(t.getUint16()>t.getUint16())return!1;t.skip(6);if(0===t.getUint16())return!1;e.data[8]=e.data[9]=0;return!0}(i["OS/2"],t)||(i["OS/2"]={tag:"OS/2",data:createOS2Table(n,e.charCodeToGlyphId,w)})}if(i.name){const[t,a]=readNameTable(i.name);i.name.data=createNameTable(e,t);this.psName=t[0][6]||null;n.composite||function adjustTrueTypeToUnicode(e,t,n){if(e.isInternalFont)return;if(e.hasIncludedToUnicodeMap)return;if(e.hasEncoding)return;if(e.toUnicode instanceof IdentityToUnicodeMap)return;if(!t)return;if(0===n.length)return;if(e.defaultEncoding===ba)return;for(const e of n)if(!isWinNameRecord(e))return;const a=ba,r=[],s=ka();for(const e in a){const t=a[e];if(""===t)continue;const n=s[t];void 0!==n&&(r[e]=String.fromCharCode(n))}r.length>0&&e.toUnicode.amend(r)}(n,this.isSymbolicFont,a)}else i.name={tag:"name",data:createNameTable(this.name)};const y=new OpenTypeFileBuilder(s.version);for(const e in i)y.addTable(e,i[e].data);return y.toArray()}convert(e,t,n){n.fixedPitch=!1;n.builtInEncoding&&function adjustType1ToUnicode(e,t){if(e.isInternalFont)return;if(e.hasIncludedToUnicodeMap)return;if(t===e.defaultEncoding)return;if(e.toUnicode instanceof IdentityToUnicodeMap)return;const n=[],a=ka();for(const r in t){if(e.hasEncoding&&(e.baseEncodingName||void 0!==e.differences[r]))continue;const s=getUnicodeForGlyph(t[r],a);-1!==s&&(n[r]=String.fromCharCode(s))}n.length>0&&e.toUnicode.amend(n)}(n,n.builtInEncoding);let r=1;t instanceof CFFFont&&(r=t.numGlyphs-1);const s=t.getGlyphMapping(n);let i=null,o=s,l=null;if(!n.cssFontInfo){i=adjustMapping(s,t.hasGlyphId.bind(t),r,this.toUnicode);this.toFontChar=i.toFontChar;o=i.charCodeToGlyphId;l=i.toUnicodeExtraMap}const f=t.numGlyphs;function getCharCodes(e,t){let n=null;for(const a in e)t===e[a]&&(n||=[]).push(0|a);return n}function createCharCode(e,t){for(const n in e)if(t===e[n])return 0|n;i.charCodeToGlyphId[i.nextAvailableFontCharCode]=t;return i.nextAvailableFontCharCode++}const c=t.seacs;if(i&&c?.length){const e=n.fontMatrix||a,r=t.getCharset(),o=Object.create(null);for(let t in c){t|=0;const n=c[t],a=ga[n[2]],l=ga[n[3]],f=r.indexOf(a),h=r.indexOf(l);if(f<0||h<0)continue;const u={x:n[0]*e[0]+n[1]*e[2]+e[4],y:n[0]*e[1]+n[1]*e[3]+e[5]},m=getCharCodes(s,t);if(m)for(const e of m){const t=i.charCodeToGlyphId,n=createCharCode(t,f),a=createCharCode(t,h);o[e]={baseFontCharCode:n,accentFontCharCode:a,accentOffset:u}}}n.seacMap=o}const h=n.fontMatrix?1/Math.max(...n.fontMatrix.slice(0,4).map(Math.abs)):1e3,u=new OpenTypeFileBuilder("OTTO");u.addTable("CFF ",t.data);u.addTable("OS/2",createOS2Table(n,o));u.addTable("cmap",createCmapTable(o,l,f));u.addTable("head","\0\0\0\0\0\0\0\0\0\0_<õ\0\0"+safeString16(h)+"\0\0\0\0\v~'\0\0\0\0\v~'\0\0"+safeString16(n.descent)+"ÿ"+safeString16(n.ascent)+string16(n.italicAngle?2:0)+"\0\0\0\0\0\0\0");u.addTable("hhea","\0\0\0"+safeString16(n.ascent)+safeString16(n.descent)+"\0\0ÿÿ\0\0\0\0\0\0"+safeString16(n.capHeight)+safeString16(Math.tan(n.italicAngle)*n.xHeight)+"\0\0\0\0\0\0\0\0\0\0\0\0"+string16(f));u.addTable("hmtx",function fontFieldsHmtx(){const e=t.charstrings,n=t.cff?t.cff.widths:null;let a="\0\0\0\0";for(let t=1,r=f;t<r;t++){let r=0;if(e){const n=e[t-1];r="width"in n?n.width:0}else n&&(r=Math.ceil(n[t]||0));a+=string16(r)+string16(0)}return a}());u.addTable("maxp","\0\0P\0"+string16(f));u.addTable("name",createNameTable(e));u.addTable("post",createPostTable(n));return u.toArray()}get _spaceWidth(){const e=["space","minus","one","i","I"];let t;for(const n of e){if(n in this.widths){t=this.widths[n];break}const e=ka()[n];let a=0;if(this.composite&&this.cMap.contains(e)){a=this.cMap.lookup(e);"string"==typeof a&&(a=convertCidString(e,a))}!a&&this.toUnicode&&(a=this.toUnicode.charCodeOf(e));a<=0&&(a=e);t=this.widths[a];if(t)break}return shadow(this,"_spaceWidth",t||this.defaultWidth)}_charToGlyph(e,t=!1){let n,a,r,s=this._glyphCache[e];if(s?.isSpace===t)return s;let i=e;if(this.cMap?.contains(e)){i=this.cMap.lookup(e);"string"==typeof i&&(i=convertCidString(e,i))}a=this.widths[i];"number"!=typeof a&&(a=this.defaultWidth);const o=this.vmetrics?.[i];let l=this.toUnicode.get(e)||e;"number"==typeof l&&(l=String.fromCharCode(l));let f=void 0!==this.toFontChar[e];n=this.toFontChar[e]||e;if(this.missingFile){const t=this.differences[e]||this.defaultEncoding[e];if((".notdef"===t||""===t)&&"Type1"===this.type){n=32;if(""===t){a||=this._spaceWidth;l=String.fromCharCode(n)}}n=function mapSpecialUnicodeValues(e){return e>=65520&&e<=65535?0:e>=62976&&e<=63743?qa()[e]||e:173===e?45:e}(n)}this.isType3Font&&(r=n);let c=null;if(this.seacMap?.[e]){f=!0;const t=this.seacMap[e];n=t.baseFontCharCode;c={fontChar:String.fromCodePoint(t.accentFontCharCode),offset:t.accentOffset}}let h="";"number"==typeof n&&(n<=1114111?h=String.fromCodePoint(n):warn(`charToGlyph - invalid fontCharCode: ${n}`));if(this.missingFile&&this.vertical&&1===h.length){const e=Ra()[h.charCodeAt(0)];e&&(h=l=String.fromCharCode(e))}s=new fonts_Glyph(e,h,l,c,a,o,r,t,f);return this._glyphCache[e]=s}charsToGlyphs(e){let t=this._charsCache[e];if(t)return t;t=[];if(this.cMap){const n=Object.create(null),a=e.length;let r=0;for(;r<a;){this.cMap.readCharCode(e,r,n);const{charcode:a,length:s}=n;r+=s;const i=this._charToGlyph(a,1===s&&32===e.charCodeAt(r-1));t.push(i)}}else for(let n=0,a=e.length;n<a;++n){const a=e.charCodeAt(n),r=this._charToGlyph(a,32===a);t.push(r)}return this._charsCache[e]=t}getCharPositions(e){const t=[];if(this.cMap){const n=Object.create(null);let a=0;for(;a<e.length;){this.cMap.readCharCode(e,a,n);const r=n.length;t.push([a,a+r]);a+=r}}else for(let n=0,a=e.length;n<a;++n)t.push([n,n+1]);return t}get glyphCacheValues(){return Object.values(this._glyphCache)}encodeString(e){const t=[],n=[],hasCurrentBufErrors=()=>t.length%2==1,a=this.toUnicode instanceof IdentityToUnicodeMap?e=>this.toUnicode.charCodeOf(e):e=>this.toUnicode.charCodeOf(String.fromCodePoint(e));for(let r=0,s=e.length;r<s;r++){const s=e.codePointAt(r);s>55295&&(s<57344||s>65533)&&r++;if(this.toUnicode){const e=a(s);if(-1!==e){if(hasCurrentBufErrors()){t.push(n.join(""));n.length=0}for(let t=(this.cMap?this.cMap.getCharCodeLength(e):1)-1;t>=0;t--)n.push(String.fromCharCode(e>>8*t&255));continue}}if(!hasCurrentBufErrors()){t.push(n.join(""));n.length=0}n.push(String.fromCodePoint(s))}t.push(n.join(""));return t}}class ErrorFont{constructor(e){this.error=e;this.loadedName="g_font_error";this.missingFile=!0}charsToGlyphs(){return[]}encodeString(e){return[e]}exportData(){return{error:this.error}}}class CssFontInfo{#R;#X;#W;static strings=["fontFamily","fontWeight","italicAngle"];static write(e){const t=new TextEncoder,n={};let a=0;for(const r of CssFontInfo.strings){const s=t.encode(e[r]);n[r]=s;a+=4+s.length}const r=new ArrayBuffer(a),s=new Uint8Array(r),i=new DataView(r);let o=0;for(const e of CssFontInfo.strings){const t=n[e],a=t.length;i.setUint32(o,a);s.set(t,o+4);o+=4+a}assert(o===r.byteLength,"CssFontInfo.write: Buffer overflow");return r}constructor(e){this.#R=e;this.#X=new DataView(this.#R);this.#W=new TextDecoder}#K(e){assert(e<CssFontInfo.strings.length,"Invalid string index");let t=0;for(let n=0;n<e;n++)t+=this.#X.getUint32(t)+4;const n=this.#X.getUint32(t);return this.#W.decode(new Uint8Array(this.#R,t+4,n))}get fontFamily(){return this.#K(0)}get fontWeight(){return this.#K(1)}get italicAngle(){return this.#K(2)}}class SystemFontInfo{#R;#X;#W;static strings=["css","loadedName","baseFontName","src"];static write(e){const t=new TextEncoder,n={};let a=0;for(const r of SystemFontInfo.strings){const s=t.encode(e[r]);n[r]=s;a+=4+s.length}a+=4;let r,s,i=1+a;if(e.style){r=t.encode(e.style.style);s=t.encode(e.style.weight);i+=4+r.length+4+s.length}const o=new ArrayBuffer(i),l=new Uint8Array(o),f=new DataView(o);let c=0;f.setUint8(c++,e.guessFallback?1:0);f.setUint32(c,0);c+=4;a=0;for(const e of SystemFontInfo.strings){const t=n[e],r=t.length;a+=4+r;f.setUint32(c,r);l.set(t,c+4);c+=4+r}f.setUint32(c-a-4,a);if(e.style){f.setUint32(c,r.length);l.set(r,c+4);c+=4+r.length;f.setUint32(c,s.length);l.set(s,c+4);c+=4+s.length}assert(c<=o.byteLength,"SubstitionInfo.write: Buffer overflow");return o.transferToFixedLength(c)}constructor(e){this.#R=e;this.#X=new DataView(this.#R);this.#W=new TextDecoder}get guessFallback(){return 0!==this.#X.getUint8(0)}#K(e){assert(e<SystemFontInfo.strings.length,"Invalid string index");let t=5;for(let n=0;n<e;n++)t+=this.#X.getUint32(t)+4;const n=this.#X.getUint32(t);return this.#W.decode(new Uint8Array(this.#R,t+4,n))}get css(){return this.#K(0)}get loadedName(){return this.#K(1)}get baseFontName(){return this.#K(2)}get src(){return this.#K(3)}get style(){let e=1;e+=4+this.#X.getUint32(e);const t=this.#X.getUint32(e),n=this.#W.decode(new Uint8Array(this.#R,e+4,t));e+=4+t;const a=this.#X.getUint32(e);return{style:n,weight:this.#W.decode(new Uint8Array(this.#R,e+4,a))}}}class FontInfo{static bools=["black","bold","disableFontFace","fontExtraProperties","isInvalidPDFjsFont","isType3Font","italic","missingFile","remeasure","vertical"];static numbers=["ascent","defaultWidth","descent"];static strings=["fallbackName","loadedName","mimetype","name"];static#V=Math.ceil(2*this.bools.length/8);static#G=this.#V+8*this.numbers.length;static#$=this.#G+1+8;static#Y=this.#$+1+48;static#J=this.#Y+1+6;#R;#W;#X;constructor({data:e,extra:t}){this.#R=e;this.#W=new TextDecoder;this.#X=new DataView(this.#R);t&&Object.assign(this,t)}#Q(e){assert(e<FontInfo.bools.length,"Invalid boolean index");const t=Math.floor(e/4),n=2*e%8,a=this.#X.getUint8(t)>>n&3;return 0===a?void 0:2===a}get black(){return this.#Q(0)}get bold(){return this.#Q(1)}get disableFontFace(){return this.#Q(2)}get fontExtraProperties(){return this.#Q(3)}get isInvalidPDFjsFont(){return this.#Q(4)}get isType3Font(){return this.#Q(5)}get italic(){return this.#Q(6)}get missingFile(){return this.#Q(7)}get remeasure(){return this.#Q(8)}get vertical(){return this.#Q(9)}#Z(e){assert(e<FontInfo.numbers.length,"Invalid number index");return this.#X.getFloat64(FontInfo.#V+8*e)}get ascent(){return this.#Z(0)}get defaultWidth(){return this.#Z(1)}get descent(){return this.#Z(2)}get bbox(){let e=FontInfo.#G;if(0===this.#X.getUint8(e))return;e+=1;const t=[];for(let n=0;n<4;n++){t.push(this.#X.getInt16(e,!0));e+=2}return t}get fontMatrix(){let e=FontInfo.#$;if(0===this.#X.getUint8(e))return;e+=1;const t=[];for(let n=0;n<6;n++){t.push(this.#X.getFloat64(e,!0));e+=8}return t}get defaultVMetrics(){let e=FontInfo.#Y;if(0===this.#X.getUint8(e))return;e+=1;const t=[];for(let n=0;n<3;n++){t.push(this.#X.getInt16(e,!0));e+=2}return t}#K(e){assert(e<FontInfo.strings.length,"Invalid string index");let t=FontInfo.#J+4;for(let n=0;n<e;n++)t+=this.#X.getUint32(t)+4;const n=this.#X.getUint32(t),a=new Uint8Array(n);a.set(new Uint8Array(this.#R,t+4,n));return this.#W.decode(a)}get fallbackName(){return this.#K(0)}get loadedName(){return this.#K(1)}get mimetype(){return this.#K(2)}get name(){return this.#K(3)}get data(){let e=FontInfo.#J;e+=4+this.#X.getUint32(e);e+=4+this.#X.getUint32(e);e+=4+this.#X.getUint32(e);const t=this.#X.getUint32(e);if(0!==t)return new Uint8Array(this.#R,e+4,t)}clearData(){let e=FontInfo.#J;e+=4+this.#X.getUint32(e);e+=4+this.#X.getUint32(e);e+=4+this.#X.getUint32(e);const t=this.#X.getUint32(e);new Uint8Array(this.#R,e+4,t).fill(0);this.#X.setUint32(e,0)}get cssFontInfo(){let e=FontInfo.#J;e+=4+this.#X.getUint32(e);e+=4+this.#X.getUint32(e);const t=this.#X.getUint32(e);if(0===t)return null;const n=new Uint8Array(t);n.set(new Uint8Array(this.#R,e+4,t));return new CssFontInfo(n.buffer)}get systemFontInfo(){let e=FontInfo.#J;e+=4+this.#X.getUint32(e);const t=this.#X.getUint32(e);if(0===t)return null;const n=new Uint8Array(t);n.set(new Uint8Array(this.#R,e+4,t));return new SystemFontInfo(n.buffer)}static write(e){const t=e.systemFontInfo?SystemFontInfo.write(e.systemFontInfo):null,n=e.cssFontInfo?CssFontInfo.write(e.cssFontInfo):null,a=new TextEncoder,r={};let s=0;for(const t of FontInfo.strings){r[t]=a.encode(e[t]);s+=4+r[t].length}const i=FontInfo.#J+4+s+4+(t?t.byteLength:0)+4+(n?n.byteLength:0)+4+(e.data?e.data.length:0),o=new ArrayBuffer(i),l=new Uint8Array(o),f=new DataView(o);let c=0;const h=FontInfo.bools.length;let u=0,m=0;for(let t=0;t<h;t++){const n=e[FontInfo.bools[t]];u|=(void 0===n?0:n?2:1)<<m;m+=2;if(8===m||t===h-1){f.setUint8(c++,u);u=0;m=0}}assert(c===FontInfo.#V,"FontInfo.write: Boolean properties offset mismatch");for(const t of FontInfo.numbers){f.setFloat64(c,e[t]);c+=8}assert(c===FontInfo.#G,"FontInfo.write: Number properties offset mismatch");if(e.bbox){f.setUint8(c++,4);for(const t of e.bbox){f.setInt16(c,t,!0);c+=2}}else{f.setUint8(c++,0);c+=8}assert(c===FontInfo.#$,"FontInfo.write: BBox properties offset mismatch");if(e.fontMatrix){f.setUint8(c++,6);for(const t of e.fontMatrix){f.setFloat64(c,t,!0);c+=8}}else{f.setUint8(c++,0);c+=48}assert(c===FontInfo.#Y,"FontInfo.write: FontMatrix properties offset mismatch");if(e.defaultVMetrics){f.setUint8(c++,1);for(const t of e.defaultVMetrics){f.setInt16(c,t,!0);c+=2}}else{f.setUint8(c++,0);c+=6}assert(c===FontInfo.#J,"FontInfo.write: DefaultVMetrics properties offset mismatch");f.setUint32(FontInfo.#J,0);c+=4;for(const e of FontInfo.strings){const t=r[e],n=t.length;f.setUint32(c,n);l.set(t,c+4);c+=4+n}f.setUint32(FontInfo.#J,c-FontInfo.#J-4);if(t){const e=t.byteLength;f.setUint32(c,e);assert(c+4+e<=o.byteLength,"FontInfo.write: Buffer overflow at systemFontInfo");l.set(new Uint8Array(t),c+4);c+=4+e}else{f.setUint32(c,0);c+=4}if(n){const e=n.byteLength;f.setUint32(c,e);assert(c+4+e<=o.byteLength,"FontInfo.write: Buffer overflow at cssFontInfo");l.set(new Uint8Array(n),c+4);c+=4+e}else{f.setUint32(c,0);c+=4}if(void 0===e.data){f.setUint32(c,0);c+=4}else{f.setUint32(c,e.data.length);l.set(e.data,c+4);c+=4+e.data.length}assert(c<=o.byteLength,"FontInfo.write: Buffer overflow");return o.transferToFixedLength(c)}}class PatternInfo{static#ee=0;static#te=1;static#ne=2;static#ae=3;static#re=4;static#se=8;static#ie=12;static#oe=16;constructor(e){this.buffer=e;this.view=new DataView(e);this.data=new Uint8Array(e)}static write(e){let t,n=null,a=[],r=[],s=[],i=[],o=null,l=null;switch(e[0]){case"RadialAxial":t="axial"===e[1]?1:2;n=e[2];s=e[3];1===t?a.push(...e[4],...e[5]):a.push(e[4][0],e[4][1],e[6],e[5][0],e[5][1],e[7]);break;case"Mesh":t=3;o=e[1];a=e[2];r=e[3];i=e[4]||[];n=e[6];l=e[7];break;default:throw new Error(`Unsupported pattern type: ${e[0]}`)}const f=Math.floor(a.length/2),c=Math.floor(r.length/3),h=s.length,u=i.length;let m=0;for(const e of i){m+=1;m=4*Math.ceil(m/4);m+=4+4*e.coords.length;m+=4+4*e.colors.length;void 0!==e.verticesPerRow&&(m+=4)}const p=new ArrayBuffer(20+8*f+3*c+8*h+(n?16:0)+(l?3:0)+m),d=new DataView(p),g=new Uint8Array(p);d.setUint8(PatternInfo.#ee,t);d.setUint8(PatternInfo.#te,n?1:0);d.setUint8(PatternInfo.#ne,l?1:0);d.setUint8(PatternInfo.#ae,o);d.setUint32(PatternInfo.#re,f,!0);d.setUint32(PatternInfo.#se,c,!0);d.setUint32(PatternInfo.#ie,h,!0);d.setUint32(PatternInfo.#oe,u,!0);let b=20;new Float32Array(p,b,2*f).set(a);b+=8*f;g.set(r,b);b+=3*c;for(const[e,t]of s){d.setFloat32(b,e,!0);b+=4;d.setUint32(b,parseInt(t.slice(1),16),!0);b+=4}if(n)for(const e of n){d.setFloat32(b,e,!0);b+=4}if(l){g.set(l,b);b+=3}for(let e=0;e<i.length;e++){const t=i[e];d.setUint8(b,t.type);b+=1;b=4*Math.ceil(b/4);d.setUint32(b,t.coords.length,!0);b+=4;new Int32Array(p,b,t.coords.length).set(t.coords);b+=4*t.coords.length;d.setUint32(b,t.colors.length,!0);b+=4;new Int32Array(p,b,t.colors.length).set(t.colors);b+=4*t.colors.length;if(void 0!==t.verticesPerRow){d.setUint32(b,t.verticesPerRow,!0);b+=4}}return p}getIR(){const e=this.view,t=this.data[PatternInfo.#ee],n=!!this.data[PatternInfo.#te],a=!!this.data[PatternInfo.#ne],r=e.getUint32(PatternInfo.#re,!0),s=e.getUint32(PatternInfo.#se,!0),i=e.getUint32(PatternInfo.#ie,!0),o=e.getUint32(PatternInfo.#oe,!0);let l=20;const f=new Float32Array(this.buffer,l,2*r);l+=8*r;const c=new Uint8Array(this.buffer,l,3*s);l+=3*s;const h=[];for(let t=0;t<i;++t){const t=e.getFloat32(l,!0);l+=4;const n=e.getUint32(l,!0);l+=4;h.push([t,`#${n.toString(16).padStart(6,"0")}`])}let u=null;if(n){u=[];for(let t=0;t<4;++t){u.push(e.getFloat32(l,!0));l+=4}}let m=null;if(a){m=new Uint8Array(this.buffer,l,3);l+=3}const p=[];for(let t=0;t<o;++t){const t=e.getUint8(l);l+=1;l=4*Math.ceil(l/4);const n=e.getUint32(l,!0);l+=4;const a=new Int32Array(this.buffer,l,n);l+=4*n;const r=e.getUint32(l,!0);l+=4;const s=new Int32Array(this.buffer,l,r);l+=4*r;const i={type:t,coords:a,colors:s};if(t===v){i.verticesPerRow=e.getUint32(l,!0);l+=4}p.push(i)}if(1===t)return["RadialAxial","axial",u,h,Array.from(f.slice(0,2)),Array.from(f.slice(2,4)),null,null];if(2===t)return["RadialAxial","radial",u,h,[f[0],f[1]],[f[3],f[4]],f[2],f[5]];if(3===t){const e=this.data[PatternInfo.#ae];let t=null;if(f.length>0){let e=f[0],n=f[0],a=f[1],r=f[1];for(let t=0;t<f.length;t+=2){const s=f[t],i=f[t+1];e=e>s?s:e;a=a>i?i:a;n=n<s?s:n;r=r<i?i:r}t=[e,a,n,r]}return["Mesh",e,f,c,p,t,u,m]}throw new Error(`Unsupported pattern kind: ${t}`)}}class FontPathInfo{static write(e){let t,n;if(FeatureTest.isFloat16ArraySupported){n=new ArrayBuffer(2*e.length);t=new Float16Array(n)}else{n=new ArrayBuffer(4*e.length);t=new Float32Array(n)}t.set(e);return n}#R;constructor(e){this.#R=e}get path(){return FeatureTest.isFloat16ArraySupported?new Float16Array(this.#R):new Float32Array(this.#R)}}const pr=2,dr=3,gr=4,br=5,wr=6,jr=7;class Pattern{constructor(){unreachable("Cannot initialize Pattern.")}static parseShading(e,t,n,a,r,s){const i=e instanceof BaseStream?e.dict:e,o=i.get("ShadingType");try{switch(o){case pr:case dr:return new RadialAxialShading(i,t,n,a,r,s);case gr:case br:case wr:case jr:return new MeshShading(e,t,n,a,r,s);default:throw new FormatError("Unsupported ShadingType: "+o)}}catch(e){if(e instanceof MissingDataException)throw e;warn(e);return new DummyShading}}}class BaseShading{static SMALL_NUMBER=1e-6;getIR(){unreachable("Abstract method `getIR` called.")}}class RadialAxialShading extends BaseShading{constructor(e,t,n,a,r,s){super();this.shadingType=e.get("ShadingType");let i=0;this.shadingType===pr?i=4:this.shadingType===dr&&(i=6);this.coordsArr=e.getArray("Coords");if(!isNumberArray(this.coordsArr,i))throw new FormatError("RadialAxialShading: Invalid /Coords array.");const o=ColorSpaceUtils.parse({cs:e.getRaw("CS")||e.getRaw("ColorSpace"),xref:t,resources:n,pdfFunctionFactory:a,globalColorSpaceCache:r,localColorSpaceCache:s});this.bbox=lookupNormalRect(e.getArray("BBox"),null);let l=0,f=1;const c=e.getArray("Domain");isNumberArray(c,2)&&([l,f]=c);let h=!1,u=!1;const m=e.getArray("Extend");(function isBooleanArray(e,t){return Array.isArray(e)&&(null===t||e.length===t)&&e.every(e=>"boolean"==typeof e)})(m,2)&&([h,u]=m);if(!(this.shadingType!==dr||h&&u)){const[e,t,n,a,r,s]=this.coordsArr,i=Math.hypot(e-a,t-r);n<=s+i&&s<=n+i&&warn("Unsupported radial gradient.")}this.extendStart=h;this.extendEnd=u;const p=e.getRaw("Function"),d=a.create(p,!0),g=(f-l)/840,b=this.colorStops=[];if(l>=f||g<=0){info("Bad shading domain.");return}const w=new Float32Array(o.numComps),j=new Float32Array(1);let k=0;j[0]=l;d(j,0,w,0);const y=new Uint8ClampedArray(3);o.getRgb(w,0,y);let[q,v,S]=y;b.push([0,Util.makeHexColor(q,v,S)]);let x=1;j[0]=l+g;d(j,0,w,0);o.getRgb(w,0,y);let[C,T,O]=y,R=C-q+1,H=T-v+1,D=O-S+1,M=C-q-1,E=T-v-1,N=O-S-1;for(let e=2;e<840;e++){j[0]=l+e*g;d(j,0,w,0);o.getRgb(w,0,y);const[t,n,a]=y,r=e-k;R=Math.min(R,(t-q+1)/r);H=Math.min(H,(n-v+1)/r);D=Math.min(D,(a-S+1)/r);M=Math.max(M,(t-q-1)/r);E=Math.max(E,(n-v-1)/r);N=Math.max(N,(a-S-1)/r);if(!(M<=R&&E<=H&&N<=D)){const e=Util.makeHexColor(C,T,O);b.push([x/840,e]);R=t-C+1;H=n-T+1;D=a-O+1;M=t-C-1;E=n-T-1;N=a-O-1;k=x;q=C;v=T;S=O}x=e;C=t;T=n;O=a}b.push([1,Util.makeHexColor(C,T,O)]);let z="transparent";e.has("Background")&&(z=o.getRgbHex(e.get("Background"),0));if(!h){b.unshift([0,z]);b[1][0]+=BaseShading.SMALL_NUMBER}if(!u){b.at(-1)[0]-=BaseShading.SMALL_NUMBER;b.push([1,z])}this.colorStops=b}getIR(){const{coordsArr:e,shadingType:t}=this;let n,a,r,s,i;if(t===pr){a=[e[0],e[1]];r=[e[2],e[3]];s=null;i=null;n="axial"}else if(t===dr){a=[e[0],e[1]];r=[e[3],e[4]];s=e[2];i=e[5];n="radial"}else unreachable(`getPattern type unknown: ${t}`);return["RadialAxial",n,this.bbox,this.colorStops,a,r,s,i]}}class MeshStreamReader{constructor(e,t){this.stream=e;this.context=t;this.buffer=0;this.bufferLength=0;const n=t.numComps;this.tmpCompsBuf=new Float32Array(n);const a=t.colorSpace.numComps;this.tmpCsCompsBuf=t.colorFn?new Float32Array(a):this.tmpCompsBuf}get hasData(){if(this.stream.end)return this.stream.pos<this.stream.end;if(this.bufferLength>0)return!0;const e=this.stream.getByte();if(e<0)return!1;this.buffer=e;this.bufferLength=8;return!0}readBits(e){const{stream:t}=this;let{buffer:n,bufferLength:a}=this;if(32===e){if(0===a)return t.getInt32()>>>0;n=n<<24|t.getByte()<<16|t.getByte()<<8|t.getByte();const e=t.getByte();this.buffer=e&(1<<a)-1;return(n<<8-a|(255&e)>>a)>>>0}if(8===e&&0===a)return t.getByte();for(;a<e;){n=n<<8|t.getByte();a+=8}a-=e;this.bufferLength=a;this.buffer=n&(1<<a)-1;return n>>a}align(){this.buffer=0;this.bufferLength=0}readFlag(){return this.readBits(this.context.bitsPerFlag)}readCoordinate(){const{bitsPerCoordinate:e,decode:t}=this.context,n=this.readBits(e),a=this.readBits(e),r=e<32?1/((1<<e)-1):2.3283064365386963e-10;return[n*r*(t[1]-t[0])+t[0],a*r*(t[3]-t[2])+t[2]]}readComponents(){const{bitsPerComponent:e,colorFn:t,colorSpace:n,decode:a,numComps:r}=this.context,s=e<32?1/((1<<e)-1):2.3283064365386963e-10,i=this.tmpCompsBuf;for(let t=0,n=4;t<r;t++,n+=2){const r=this.readBits(e);i[t]=r*s*(a[n+1]-a[n])+a[n]}const o=this.tmpCsCompsBuf;t?.(i,0,o,0);return n.getRgb(o,0)}}let kr=Object.create(null);function getB(e){return kr[e]||=function buildB(e){const t=[];for(let n=0;n<=e;n++){const a=n/e,r=1-a;t.push(new Float32Array([r**3,3*a*r**2,3*a**2*r,a**3]))}return t}(e)}class MeshShading extends BaseShading{static MIN_SPLIT_PATCH_CHUNKS_AMOUNT=3;static MAX_SPLIT_PATCH_CHUNKS_AMOUNT=20;static TRIANGLE_DENSITY=20;constructor(e,t,n,a,r,s){super();if(!(e instanceof BaseStream))throw new FormatError("Mesh data is not a stream");const i=e.dict;this.shadingType=i.get("ShadingType");this.bbox=lookupNormalRect(i.getArray("BBox"),null);const o=ColorSpaceUtils.parse({cs:i.getRaw("CS")||i.getRaw("ColorSpace"),xref:t,resources:n,pdfFunctionFactory:a,globalColorSpaceCache:r,localColorSpaceCache:s});this.background=i.has("Background")?o.getRgb(i.get("Background"),0):null;const l=i.getRaw("Function"),f=l?a.create(l,!0):null;this.coords=[];this.colors=[];this.figures=[];const c={bitsPerCoordinate:i.get("BitsPerCoordinate"),bitsPerComponent:i.get("BitsPerComponent"),bitsPerFlag:i.get("BitsPerFlag"),decode:i.getArray("Decode"),colorFn:f,colorSpace:o,numComps:f?1:o.numComps},h=new MeshStreamReader(e,c);let u=!1;switch(this.shadingType){case gr:this._decodeType4Shading(h);break;case br:const e=0|i.get("VerticesPerRow");if(e<2)throw new FormatError("Invalid VerticesPerRow");this._decodeType5Shading(h,e);break;case wr:this._decodeType6Shading(h);u=!0;break;case jr:this._decodeType7Shading(h);u=!0;break;default:unreachable("Unsupported mesh type.")}if(u){this._updateBounds();for(let e=0,t=this.figures.length;e<t;e++)this._buildFigureFromPatch(e)}this._updateBounds();this._packData()}_decodeType4Shading(e){const t=this.coords,n=this.colors,a=[],r=[];let s=0;for(;e.hasData;){const i=e.readFlag(),o=e.readCoordinate(),l=e.readComponents();if(0===s){if(!(0<=i&&i<=2))throw new FormatError("Unknown type4 flag");switch(i){case 0:s=3;break;case 1:r.push(r.at(-2),r.at(-1));s=1;break;case 2:r.push(r.at(-3),r.at(-1));s=1}a.push(i)}r.push(t.length);t.push(o);n.push(l);s--;e.align()}this.figures.push({type:q,coords:new Int32Array(r),colors:new Int32Array(r)})}_decodeType5Shading(e,t){const n=this.coords,a=this.colors,r=[];for(;e.hasData;){const t=e.readCoordinate(),s=e.readComponents();r.push(n.length);n.push(t);a.push(s)}this.figures.push({type:v,coords:new Int32Array(r),colors:new Int32Array(r),verticesPerRow:t})}_decodeType6Shading(e){const t=this.coords,n=this.colors,a=new Int32Array(16),r=new Int32Array(4);for(;e.hasData;){const s=e.readFlag();if(!(0<=s&&s<=3))throw new FormatError("Unknown type6 flag");const i=t.length;for(let n=0,a=0!==s?8:12;n<a;n++)t.push(e.readCoordinate());const o=n.length;for(let t=0,a=0!==s?2:4;t<a;t++)n.push(e.readComponents());let l,f,c,h;switch(s){case 0:a[12]=i+3;a[13]=i+4;a[14]=i+5;a[15]=i+6;a[8]=i+2;a[11]=i+7;a[4]=i+1;a[7]=i+8;a[0]=i;a[1]=i+11;a[2]=i+10;a[3]=i+9;r[2]=o+1;r[3]=o+2;r[0]=o;r[1]=o+3;break;case 1:l=a[12];f=a[13];c=a[14];h=a[15];a[12]=h;a[13]=i+0;a[14]=i+1;a[15]=i+2;a[8]=c;a[11]=i+3;a[4]=f;a[7]=i+4;a[0]=l;a[1]=i+7;a[2]=i+6;a[3]=i+5;l=r[2];f=r[3];r[2]=f;r[3]=o;r[0]=l;r[1]=o+1;break;case 2:l=a[15];f=a[11];a[12]=a[3];a[13]=i+0;a[14]=i+1;a[15]=i+2;a[8]=a[7];a[11]=i+3;a[4]=f;a[7]=i+4;a[0]=l;a[1]=i+7;a[2]=i+6;a[3]=i+5;l=r[3];r[2]=r[1];r[3]=o;r[0]=l;r[1]=o+1;break;case 3:a[12]=a[0];a[13]=i+0;a[14]=i+1;a[15]=i+2;a[8]=a[1];a[11]=i+3;a[4]=a[2];a[7]=i+4;a[0]=a[3];a[1]=i+7;a[2]=i+6;a[3]=i+5;r[2]=r[0];r[3]=o;r[0]=r[1];r[1]=o+1}a[5]=t.length;t.push([(-4*t[a[0]][0]-t[a[15]][0]+6*(t[a[4]][0]+t[a[1]][0])-2*(t[a[12]][0]+t[a[3]][0])+3*(t[a[13]][0]+t[a[7]][0]))/9,(-4*t[a[0]][1]-t[a[15]][1]+6*(t[a[4]][1]+t[a[1]][1])-2*(t[a[12]][1]+t[a[3]][1])+3*(t[a[13]][1]+t[a[7]][1]))/9]);a[6]=t.length;t.push([(-4*t[a[3]][0]-t[a[12]][0]+6*(t[a[2]][0]+t[a[7]][0])-2*(t[a[0]][0]+t[a[15]][0])+3*(t[a[4]][0]+t[a[14]][0]))/9,(-4*t[a[3]][1]-t[a[12]][1]+6*(t[a[2]][1]+t[a[7]][1])-2*(t[a[0]][1]+t[a[15]][1])+3*(t[a[4]][1]+t[a[14]][1]))/9]);a[9]=t.length;t.push([(-4*t[a[12]][0]-t[a[3]][0]+6*(t[a[8]][0]+t[a[13]][0])-2*(t[a[0]][0]+t[a[15]][0])+3*(t[a[11]][0]+t[a[1]][0]))/9,(-4*t[a[12]][1]-t[a[3]][1]+6*(t[a[8]][1]+t[a[13]][1])-2*(t[a[0]][1]+t[a[15]][1])+3*(t[a[11]][1]+t[a[1]][1]))/9]);a[10]=t.length;t.push([(-4*t[a[15]][0]-t[a[0]][0]+6*(t[a[11]][0]+t[a[14]][0])-2*(t[a[12]][0]+t[a[3]][0])+3*(t[a[2]][0]+t[a[8]][0]))/9,(-4*t[a[15]][1]-t[a[0]][1]+6*(t[a[11]][1]+t[a[14]][1])-2*(t[a[12]][1]+t[a[3]][1])+3*(t[a[2]][1]+t[a[8]][1]))/9]);this.figures.push({type:S,coords:new Int32Array(a),colors:new Int32Array(r)})}}_decodeType7Shading(e){const t=this.coords,n=this.colors,a=new Int32Array(16),r=new Int32Array(4);for(;e.hasData;){const s=e.readFlag();if(!(0<=s&&s<=3))throw new FormatError("Unknown type7 flag");const i=t.length;for(let n=0,a=0!==s?12:16;n<a;n++)t.push(e.readCoordinate());const o=n.length;for(let t=0,a=0!==s?2:4;t<a;t++)n.push(e.readComponents());let l,f,c,h;switch(s){case 0:a[12]=i+3;a[13]=i+4;a[14]=i+5;a[15]=i+6;a[8]=i+2;a[9]=i+13;a[10]=i+14;a[11]=i+7;a[4]=i+1;a[5]=i+12;a[6]=i+15;a[7]=i+8;a[0]=i;a[1]=i+11;a[2]=i+10;a[3]=i+9;r[2]=o+1;r[3]=o+2;r[0]=o;r[1]=o+3;break;case 1:l=a[12];f=a[13];c=a[14];h=a[15];a[12]=h;a[13]=i+0;a[14]=i+1;a[15]=i+2;a[8]=c;a[9]=i+9;a[10]=i+10;a[11]=i+3;a[4]=f;a[5]=i+8;a[6]=i+11;a[7]=i+4;a[0]=l;a[1]=i+7;a[2]=i+6;a[3]=i+5;l=r[2];f=r[3];r[2]=f;r[3]=o;r[0]=l;r[1]=o+1;break;case 2:l=a[15];f=a[11];a[12]=a[3];a[13]=i+0;a[14]=i+1;a[15]=i+2;a[8]=a[7];a[9]=i+9;a[10]=i+10;a[11]=i+3;a[4]=f;a[5]=i+8;a[6]=i+11;a[7]=i+4;a[0]=l;a[1]=i+7;a[2]=i+6;a[3]=i+5;l=r[3];r[2]=r[1];r[3]=o;r[0]=l;r[1]=o+1;break;case 3:a[12]=a[0];a[13]=i+0;a[14]=i+1;a[15]=i+2;a[8]=a[1];a[9]=i+9;a[10]=i+10;a[11]=i+3;a[4]=a[2];a[5]=i+8;a[6]=i+11;a[7]=i+4;a[0]=a[3];a[1]=i+7;a[2]=i+6;a[3]=i+5;r[2]=r[0];r[3]=o;r[0]=r[1];r[1]=o+1}this.figures.push({type:S,coords:new Int32Array(a),colors:new Int32Array(r)})}}_buildFigureFromPatch(e){const t=this.figures[e];assert(t.type===S,"Unexpected patch mesh figure");const n=this.coords,a=this.colors,r=t.coords,s=t.colors,i=Math.min(n[r[0]][0],n[r[3]][0],n[r[12]][0],n[r[15]][0]),o=Math.min(n[r[0]][1],n[r[3]][1],n[r[12]][1],n[r[15]][1]),l=Math.max(n[r[0]][0],n[r[3]][0],n[r[12]][0],n[r[15]][0]),f=Math.max(n[r[0]][1],n[r[3]][1],n[r[12]][1],n[r[15]][1]);let c=Math.ceil((l-i)*MeshShading.TRIANGLE_DENSITY/(this.bounds[2]-this.bounds[0]));c=MathClamp(c,MeshShading.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,MeshShading.MAX_SPLIT_PATCH_CHUNKS_AMOUNT);let h=Math.ceil((f-o)*MeshShading.TRIANGLE_DENSITY/(this.bounds[3]-this.bounds[1]));h=MathClamp(h,MeshShading.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,MeshShading.MAX_SPLIT_PATCH_CHUNKS_AMOUNT);const u=c+1,m=new Int32Array((h+1)*u),p=new Int32Array((h+1)*u);let d=0;const g=new Uint8Array(3),b=new Uint8Array(3),w=a[s[0]],j=a[s[1]],k=a[s[2]],y=a[s[3]],q=getB(h),x=getB(c);for(let e=0;e<=h;e++){g[0]=(w[0]*(h-e)+k[0]*e)/h|0;g[1]=(w[1]*(h-e)+k[1]*e)/h|0;g[2]=(w[2]*(h-e)+k[2]*e)/h|0;b[0]=(j[0]*(h-e)+y[0]*e)/h|0;b[1]=(j[1]*(h-e)+y[1]*e)/h|0;b[2]=(j[2]*(h-e)+y[2]*e)/h|0;for(let t=0;t<=c;t++,d++){if(!(0!==e&&e!==h||0!==t&&t!==c))continue;let s=0,i=0,o=0;for(let a=0;a<=3;a++)for(let l=0;l<=3;l++,o++){const f=q[e][a]*x[t][l];s+=n[r[o]][0]*f;i+=n[r[o]][1]*f}m[d]=n.length;n.push([s,i]);p[d]=a.length;const l=new Uint8Array(3);l[0]=(g[0]*(c-t)+b[0]*t)/c|0;l[1]=(g[1]*(c-t)+b[1]*t)/c|0;l[2]=(g[2]*(c-t)+b[2]*t)/c|0;a.push(l)}}m[0]=r[0];p[0]=s[0];m[c]=r[3];p[c]=s[1];m[u*h]=r[12];p[u*h]=s[2];m[u*h+c]=r[15];p[u*h+c]=s[3];this.figures[e]={type:v,coords:m,colors:p,verticesPerRow:u}}_updateBounds(){let e=this.coords[0][0],t=this.coords[0][1],n=e,a=t;for(let r=1,s=this.coords.length;r<s;r++){const s=this.coords[r][0],i=this.coords[r][1];e=e>s?s:e;t=t>i?i:t;n=n<s?s:n;a=a<i?i:a}this.bounds=[e,t,n,a]}_packData(){let e,t,n,a;const r=this.coords,s=new Float32Array(2*r.length);for(e=0,n=0,t=r.length;e<t;e++){const t=r[e];s[n++]=t[0];s[n++]=t[1]}this.coords=s;const i=this.colors,o=new Uint8Array(3*i.length);for(e=0,n=0,t=i.length;e<t;e++){const t=i[e];o[n++]=t[0];o[n++]=t[1];o[n++]=t[2]}this.colors=o;const l=this.figures;for(e=0,t=l.length;e<t;e++){const t=l[e],r=t.coords,s=t.colors;for(n=0,a=r.length;n<a;n++){r[n]*=2;s[n]*=3}}}getIR(){const{bounds:e}=this;if(e[2]-e[0]===0||e[3]-e[1]===0)throw new FormatError(`Invalid MeshShading bounds: [${e}].`);return["Mesh",this.shadingType,this.coords,this.colors,this.figures,e,this.bbox,this.background]}}class DummyShading extends BaseShading{getIR(){return["Dummy"]}}function getTilingPatternIR(e,t,n){const a=lookupMatrix(t.getArray("Matrix"),wn),r=lookupNormalRect(t.getArray("BBox"),null);if(!r||r[2]-r[0]===0||r[3]-r[1]===0)throw new FormatError("Invalid getTilingPatternIR /BBox array.");const s=t.get("XStep");if("number"!=typeof s)throw new FormatError("Invalid getTilingPatternIR /XStep value.");const i=t.get("YStep");if("number"!=typeof i)throw new FormatError("Invalid getTilingPatternIR /YStep value.");const o=t.get("PaintType");if(!Number.isInteger(o))throw new FormatError("Invalid getTilingPatternIR /PaintType value.");const l=t.get("TilingType");if(!Number.isInteger(l))throw new FormatError("Invalid getTilingPatternIR /TilingType value.");return["TilingPattern",n,e,a,r,s,i,o,l]}const yr=[1.3877,1,1,1,.97801,.92482,.89552,.91133,.81988,.97566,.98152,.93548,.93548,1.2798,.85284,.92794,1,.96134,1.54657,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.82845,.82845,.85284,.85284,.85284,.75859,.92138,.83908,.7762,.73293,.87289,.73133,.7514,.81921,.87356,.95958,.59526,.75727,.69225,1.04924,.9121,.86943,.79795,.88198,.77958,.70864,.81055,.90399,.88653,.96017,.82577,.77892,.78257,.97507,1.54657,.97507,.85284,.89552,.90176,.88762,.8785,.75241,.8785,.90518,.95015,.77618,.8785,.88401,.91916,.86304,.88401,.91488,.8785,.8801,.8785,.8785,.91343,.7173,1.04106,.8785,.85075,.95794,.82616,.85162,.79492,.88331,1.69808,.88331,.85284,.97801,.89552,.91133,.89552,.91133,1.7801,.89552,1.24487,1.13254,1.12401,.96839,.85284,.68787,.70645,.85592,.90747,1.01466,1.0088,.90323,1,1.07463,1,.91056,.75806,1.19118,.96839,.78864,.82845,.84133,.75859,.83908,.83908,.83908,.83908,.83908,.83908,.77539,.73293,.73133,.73133,.73133,.73133,.95958,.95958,.95958,.95958,.88506,.9121,.86943,.86943,.86943,.86943,.86943,.85284,.87508,.90399,.90399,.90399,.90399,.77892,.79795,.90807,.88762,.88762,.88762,.88762,.88762,.88762,.8715,.75241,.90518,.90518,.90518,.90518,.88401,.88401,.88401,.88401,.8785,.8785,.8801,.8801,.8801,.8801,.8801,.90747,.89049,.8785,.8785,.8785,.8785,.85162,.8785,.85162,.83908,.88762,.83908,.88762,.83908,.88762,.73293,.75241,.73293,.75241,.73293,.75241,.73293,.75241,.87289,.83016,.88506,.93125,.73133,.90518,.73133,.90518,.73133,.90518,.73133,.90518,.73133,.90518,.81921,.77618,.81921,.77618,.81921,.77618,1,1,.87356,.8785,.91075,.89608,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.76229,.90167,.59526,.91916,1,1,.86304,.69225,.88401,1,1,.70424,.79468,.91926,.88175,.70823,.94903,.9121,.8785,1,1,.9121,.8785,.87802,.88656,.8785,.86943,.8801,.86943,.8801,.86943,.8801,.87402,.89291,.77958,.91343,1,1,.77958,.91343,.70864,.7173,.70864,.7173,.70864,.7173,.70864,.7173,1,1,.81055,.75841,.81055,1.06452,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.96017,.95794,.77892,.85162,.77892,.78257,.79492,.78257,.79492,.78257,.79492,.9297,.56892,.83908,.88762,.77539,.8715,.87508,.89049,1,1,.81055,1.04106,1.20528,1.20528,1,1.15543,.70674,.98387,.94721,1.33431,1.45894,.95161,1.06303,.83908,.80352,.57184,.6965,.56289,.82001,.56029,.81235,1.02988,.83908,.7762,.68156,.80367,.73133,.78257,.87356,.86943,.95958,.75727,.89019,1.04924,.9121,.7648,.86943,.87356,.79795,.78275,.81055,.77892,.9762,.82577,.99819,.84896,.95958,.77892,.96108,1.01407,.89049,1.02988,.94211,.96108,.8936,.84021,.87842,.96399,.79109,.89049,1.00813,1.02988,.86077,.87445,.92099,.84723,.86513,.8801,.75638,.85714,.78216,.79586,.87965,.94211,.97747,.78287,.97926,.84971,1.02988,.94211,.8801,.94211,.84971,.73133,1,1,1,1,1,1,1,1,1,1,1,1,.90264,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.90518,1,1,1,1,1,1,1,1,1,1,1,1,.90548,1,1,1,1,1,1,.96017,.95794,.96017,.95794,.96017,.95794,.77892,.85162,1,1,.89552,.90527,1,.90363,.92794,.92794,.92794,.92794,.87012,.87012,.87012,.89552,.89552,1.42259,.71143,1.06152,1,1,1.03372,1.03372,.97171,1.4956,2.2807,.93835,.83406,.91133,.84107,.91133,1,1,1,.72021,1,1.23108,.83489,.88525,.88525,.81499,.90527,1.81055,.90527,1.81055,1.31006,1.53711,.94434,1.08696,1,.95018,.77192,.85284,.90747,1.17534,.69825,.9716,1.37077,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.08004,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,.90727,.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],qr={lineHeight:1.2207,lineGap:.2207},vr=[1.3877,1,1,1,.97801,.92482,.89552,.91133,.81988,.97566,.98152,.93548,.93548,1.2798,.85284,.92794,1,.96134,1.56239,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.82845,.82845,.85284,.85284,.85284,.75859,.92138,.83908,.7762,.71805,.87289,.73133,.7514,.81921,.87356,.95958,.59526,.75727,.69225,1.04924,.90872,.85938,.79795,.87068,.77958,.69766,.81055,.90399,.88653,.96068,.82577,.77892,.78257,.97507,1.529,.97507,.85284,.89552,.90176,.94908,.86411,.74012,.86411,.88323,.95015,.86411,.86331,.88401,.91916,.86304,.88401,.9039,.86331,.86331,.86411,.86411,.90464,.70852,1.04106,.86331,.84372,.95794,.82616,.84548,.79492,.88331,1.69808,.88331,.85284,.97801,.89552,.91133,.89552,.91133,1.7801,.89552,1.24487,1.13254,1.19129,.96839,.85284,.68787,.70645,.85592,.90747,1.01466,1.0088,.90323,1,1.07463,1,.91056,.75806,1.19118,.96839,.78864,.82845,.84133,.75859,.83908,.83908,.83908,.83908,.83908,.83908,.77539,.71805,.73133,.73133,.73133,.73133,.95958,.95958,.95958,.95958,.88506,.90872,.85938,.85938,.85938,.85938,.85938,.85284,.87068,.90399,.90399,.90399,.90399,.77892,.79795,.90807,.94908,.94908,.94908,.94908,.94908,.94908,.85887,.74012,.88323,.88323,.88323,.88323,.88401,.88401,.88401,.88401,.8785,.86331,.86331,.86331,.86331,.86331,.86331,.90747,.89049,.86331,.86331,.86331,.86331,.84548,.86411,.84548,.83908,.94908,.83908,.94908,.83908,.94908,.71805,.74012,.71805,.74012,.71805,.74012,.71805,.74012,.87289,.79538,.88506,.92726,.73133,.88323,.73133,.88323,.73133,.88323,.73133,.88323,.73133,.88323,.81921,.86411,.81921,.86411,.81921,.86411,1,1,.87356,.86331,.91075,.8777,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.76467,.90167,.59526,.91916,1,1,.86304,.69225,.88401,1,1,.70424,.77312,.91926,.88175,.70823,.94903,.90872,.86331,1,1,.90872,.86331,.86906,.88116,.86331,.85938,.86331,.85938,.86331,.85938,.86331,.87402,.86549,.77958,.90464,1,1,.77958,.90464,.69766,.70852,.69766,.70852,.69766,.70852,.69766,.70852,1,1,.81055,.75841,.81055,1.06452,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.96068,.95794,.77892,.84548,.77892,.78257,.79492,.78257,.79492,.78257,.79492,.9297,.56892,.83908,.94908,.77539,.85887,.87068,.89049,1,1,.81055,1.04106,1.20528,1.20528,1,1.15543,.70088,.98387,.94721,1.33431,1.45894,.95161,1.48387,.83908,.80352,.57118,.6965,.56347,.79179,.55853,.80346,1.02988,.83908,.7762,.67174,.86036,.73133,.78257,.87356,.86441,.95958,.75727,.89019,1.04924,.90872,.74889,.85938,.87891,.79795,.7957,.81055,.77892,.97447,.82577,.97466,.87179,.95958,.77892,.94252,.95612,.8753,1.02988,.92733,.94252,.87411,.84021,.8728,.95612,.74081,.8753,1.02189,1.02988,.84814,.87445,.91822,.84723,.85668,.86331,.81344,.87581,.76422,.82046,.96057,.92733,.99375,.78022,.95452,.86015,1.02988,.92733,.86331,.92733,.86015,.73133,1,1,1,1,1,1,1,1,1,1,1,1,.90631,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.88323,1,1,1,1,1,1,1,1,1,1,1,1,.85174,1,1,1,1,1,1,.96068,.95794,.96068,.95794,.96068,.95794,.77892,.84548,1,1,.89552,.90527,1,.90363,.92794,.92794,.92794,.89807,.87012,.87012,.87012,.89552,.89552,1.42259,.71094,1.06152,1,1,1.03372,1.03372,.97171,1.4956,2.2807,.92972,.83406,.91133,.83326,.91133,1,1,1,.72021,1,1.23108,.83489,.88525,.88525,.81499,.90616,1.81055,.90527,1.81055,1.3107,1.53711,.94434,1.08696,1,.95018,.77192,.85284,.90747,1.17534,.69825,.9716,1.37077,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.08004,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,.90727,.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Sr={lineHeight:1.2207,lineGap:.2207},xr=[1.3877,1,1,1,1.17223,1.1293,.89552,.91133,.80395,1.02269,1.15601,.91056,.91056,1.2798,.85284,.89807,1,.90861,1.39543,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.96309,.96309,.85284,.85284,.85284,.83319,.88071,.8675,.81552,.72346,.85193,.73206,.7522,.81105,.86275,.90685,.6377,.77892,.75593,1.02638,.89249,.84118,.77452,.85374,.75186,.67789,.79776,.88844,.85066,.94309,.77818,.7306,.76659,1.10369,1.38313,1.10369,1.06139,.89552,.8739,.9245,.9245,.83203,.9245,.85865,1.09842,.9245,.9245,1.03297,1.07692,.90918,1.03297,.94959,.9245,.92274,.9245,.9245,1.02933,.77832,1.20562,.9245,.8916,.98986,.86621,.89453,.79004,.94152,1.77256,.94152,.85284,.97801,.89552,.91133,.89552,.91133,1.91729,.89552,1.17889,1.13254,1.16359,.92098,.85284,.68787,.71353,.84737,.90747,1.0088,1.0044,.87683,1,1.09091,1,.92229,.739,1.15642,.92098,.76288,.80504,.80972,.75859,.8675,.8675,.8675,.8675,.8675,.8675,.76318,.72346,.73206,.73206,.73206,.73206,.90685,.90685,.90685,.90685,.86477,.89249,.84118,.84118,.84118,.84118,.84118,.85284,.84557,.88844,.88844,.88844,.88844,.7306,.77452,.86331,.9245,.9245,.9245,.9245,.9245,.9245,.84843,.83203,.85865,.85865,.85865,.85865,.82601,.82601,.82601,.82601,.94469,.9245,.92274,.92274,.92274,.92274,.92274,.90747,.86651,.9245,.9245,.9245,.9245,.89453,.9245,.89453,.8675,.9245,.8675,.9245,.8675,.9245,.72346,.83203,.72346,.83203,.72346,.83203,.72346,.83203,.85193,.8875,.86477,.99034,.73206,.85865,.73206,.85865,.73206,.85865,.73206,.85865,.73206,.85865,.81105,.9245,.81105,.9245,.81105,.9245,1,1,.86275,.9245,.90872,.93591,.90685,.82601,.90685,.82601,.90685,.82601,.90685,1.03297,.90685,.82601,.77896,1.05611,.6377,1.07692,1,1,.90918,.75593,1.03297,1,1,.76032,.9375,.98156,.93407,.77261,1.11429,.89249,.9245,1,1,.89249,.9245,.92534,.86698,.9245,.84118,.92274,.84118,.92274,.84118,.92274,.8667,.86291,.75186,1.02933,1,1,.75186,1.02933,.67789,.77832,.67789,.77832,.67789,.77832,.67789,.77832,1,1,.79776,.97655,.79776,1.23023,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.94309,.98986,.7306,.89453,.7306,.76659,.79004,.76659,.79004,.76659,.79004,1.09231,.54873,.8675,.9245,.76318,.84843,.84557,.86651,1,1,.79776,1.20562,1.18622,1.18622,1,1.1437,.67009,.96334,.93695,1.35191,1.40909,.95161,1.48387,.8675,.90861,.6192,.7363,.64824,.82411,.56321,.85696,1.23516,.8675,.81552,.7286,.84134,.73206,.76659,.86275,.84369,.90685,.77892,.85871,1.02638,.89249,.75828,.84118,.85984,.77452,.76466,.79776,.7306,.90782,.77818,.903,.87291,.90685,.7306,.99058,1.03667,.94635,1.23516,.9849,.99058,.92393,.8916,.942,1.03667,.75026,.94635,1.0297,1.23516,.90918,.94048,.98217,.89746,.84153,.92274,.82507,.88832,.84438,.88178,1.03525,.9849,1.00225,.78086,.97248,.89404,1.23516,.9849,.92274,.9849,.89404,.73206,1,1,1,1,1,1,1,1,1,1,1,1,.89693,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.85865,1,1,1,1,1,1,1,1,1,1,1,1,.90933,1,1,1,1,1,1,.94309,.98986,.94309,.98986,.94309,.98986,.7306,.89453,1,1,.89552,.90527,1,.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,.89552,.89552,1.42259,.68994,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,.97858,.82616,.91133,.83437,.91133,1,1,1,.70508,1,1.23108,.79801,.84426,.84426,.774,.90572,1.81055,.90749,1.81055,1.28809,1.55469,.94434,1.07806,1,.97094,.7589,.85284,.90747,1.19658,.69825,.97622,1.33512,.90747,.90747,.85284,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.0336,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Ar={lineHeight:1.2207,lineGap:.2207},Cr=[1.3877,1,1,1,1.17223,1.1293,.89552,.91133,.80395,1.02269,1.15601,.91056,.91056,1.2798,.85284,.89807,1,.90861,1.39016,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.96309,.96309,.85284,.85284,.85284,.83319,.88071,.8675,.81552,.73834,.85193,.73206,.7522,.81105,.86275,.90685,.6377,.77892,.75593,1.02638,.89385,.85122,.77452,.86503,.75186,.68887,.79776,.88844,.85066,.94258,.77818,.7306,.76659,1.10369,1.39016,1.10369,1.06139,.89552,.8739,.86128,.94469,.8457,.94469,.89464,1.09842,.84636,.94469,1.03297,1.07692,.90918,1.03297,.95897,.94469,.9482,.94469,.94469,1.04692,.78223,1.20562,.94469,.90332,.98986,.86621,.90527,.79004,.94152,1.77256,.94152,.85284,.97801,.89552,.91133,.89552,.91133,1.91729,.89552,1.17889,1.13254,1.08707,.92098,.85284,.68787,.71353,.84737,.90747,1.0088,1.0044,.87683,1,1.09091,1,.92229,.739,1.15642,.92098,.76288,.80504,.80972,.75859,.8675,.8675,.8675,.8675,.8675,.8675,.76318,.73834,.73206,.73206,.73206,.73206,.90685,.90685,.90685,.90685,.86477,.89385,.85122,.85122,.85122,.85122,.85122,.85284,.85311,.88844,.88844,.88844,.88844,.7306,.77452,.86331,.86128,.86128,.86128,.86128,.86128,.86128,.8693,.8457,.89464,.89464,.89464,.89464,.82601,.82601,.82601,.82601,.94469,.94469,.9482,.9482,.9482,.9482,.9482,.90747,.86651,.94469,.94469,.94469,.94469,.90527,.94469,.90527,.8675,.86128,.8675,.86128,.8675,.86128,.73834,.8457,.73834,.8457,.73834,.8457,.73834,.8457,.85193,.92454,.86477,.9921,.73206,.89464,.73206,.89464,.73206,.89464,.73206,.89464,.73206,.89464,.81105,.84636,.81105,.84636,.81105,.84636,1,1,.86275,.94469,.90872,.95786,.90685,.82601,.90685,.82601,.90685,.82601,.90685,1.03297,.90685,.82601,.77741,1.05611,.6377,1.07692,1,1,.90918,.75593,1.03297,1,1,.76032,.90452,.98156,1.11842,.77261,1.11429,.89385,.94469,1,1,.89385,.94469,.95877,.86901,.94469,.85122,.9482,.85122,.9482,.85122,.9482,.8667,.90016,.75186,1.04692,1,1,.75186,1.04692,.68887,.78223,.68887,.78223,.68887,.78223,.68887,.78223,1,1,.79776,.92188,.79776,1.23023,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.94258,.98986,.7306,.90527,.7306,.76659,.79004,.76659,.79004,.76659,.79004,1.09231,.54873,.8675,.86128,.76318,.8693,.85311,.86651,1,1,.79776,1.20562,1.18622,1.18622,1,1.1437,.67742,.96334,.93695,1.35191,1.40909,.95161,1.48387,.86686,.90861,.62267,.74359,.65649,.85498,.56963,.88254,1.23516,.8675,.81552,.75443,.84503,.73206,.76659,.86275,.85122,.90685,.77892,.85746,1.02638,.89385,.75657,.85122,.86275,.77452,.74171,.79776,.7306,.95165,.77818,.89772,.88831,.90685,.7306,.98142,1.02191,.96576,1.23516,.99018,.98142,.9236,.89258,.94035,1.02191,.78848,.96576,.9561,1.23516,.90918,.92578,.95424,.89746,.83969,.9482,.80113,.89442,.85208,.86155,.98022,.99018,1.00452,.81209,.99247,.89181,1.23516,.99018,.9482,.99018,.89181,.73206,1,1,1,1,1,1,1,1,1,1,1,1,.88844,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.89464,1,1,1,1,1,1,1,1,1,1,1,1,.96766,1,1,1,1,1,1,.94258,.98986,.94258,.98986,.94258,.98986,.7306,.90527,1,1,.89552,.90527,1,.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,.89552,.89552,1.42259,.69043,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,.99331,.82616,.91133,.84286,.91133,1,1,1,.70508,1,1.23108,.79801,.84426,.84426,.774,.90527,1.81055,.90527,1.81055,1.28809,1.55469,.94434,1.07806,1,.97094,.7589,.85284,.90747,1.19658,.69825,.97622,1.33512,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.0336,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1.07185,.99413,.96334,1.08065,1,1,1,1,1,1,1,1,1,1,1],Ir={lineHeight:1.2207,lineGap:.2207},Fr=[.76116,1,1,1.0006,.99998,.99974,.99973,.99973,.99982,.99977,1.00087,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99998,1,1.00003,1.00003,1.00003,1.00026,.9999,.99977,.99977,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,.99973,.99977,1.00026,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,.99998,1.0006,.99998,1.00003,.99973,.99998,.99973,1.00026,.99973,1.00026,.99973,.99998,1.00026,1.00026,1.0006,1.0006,.99973,1.0006,.99982,1.00026,1.00026,1.00026,1.00026,.99959,.99973,.99998,1.00026,.99973,1.00022,.99973,.99973,1,.99959,1.00077,.99959,1.00003,.99998,.99973,.99973,.99973,.99973,1.00077,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.99973,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,.99977,.99977,.99977,.99977,.99977,.99977,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,.99973,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.06409,1.00026,1.00026,1.00026,1.00026,1.00026,.99973,1.00026,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,1.03374,.99977,1.00026,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,.99977,1.00026,.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.00042,.99973,.99973,1.0006,.99977,.99973,.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.03828,1.00026,.99999,1.00026,1.0006,.99977,1.00026,.99977,1.00026,.99977,1.00026,.9993,.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,.99977,.99959,.99977,.99959,.99977,.99959,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00026,.99998,1.00026,.8121,1.00026,.99998,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,1.00016,1.00022,1.00001,.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,.99973,.99977,.99973,1,.99982,1.00022,1.00026,1.00001,.99973,1.00026,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,1.00034,.99977,1,.99997,1.00026,1.00078,1.00036,.99973,1.00013,1.0006,.99977,.99977,.99988,.85148,1.00001,1.00026,.99977,1.00022,1.0006,.99977,1.00001,.99999,.99977,1.00069,1.00022,.99977,1.00001,.99984,1.00026,1.00001,1.00024,1.00001,.9999,1,1.0006,1.00001,1.00041,.99962,1.00026,1.0006,.99995,1.00041,.99942,.99973,.99927,1.00082,.99902,1.00026,1.00087,1.0006,1.00069,.99973,.99867,.99973,.9993,1.00026,1.00049,1.00056,1,.99988,.99935,.99995,.99954,1.00055,.99945,1.00032,1.0006,.99995,1.00026,.99995,1.00032,1.00001,1.00008,.99971,1.00019,.9994,1.00001,1.0006,1.00044,.99973,1.00023,1.00047,1,.99942,.99561,.99989,1.00035,.99977,1.00035,.99977,1.00019,.99944,1.00001,1.00021,.99926,1.00035,1.00035,.99942,1.00048,.99999,.99977,1.00022,1.00035,1.00001,.99977,1.00026,.99989,1.00057,1.00001,.99936,1.00052,1.00012,.99996,1.00043,1,1.00035,.9994,.99976,1.00035,.99973,1.00052,1.00041,1.00119,1.00037,.99973,1.00002,.99986,1.00041,1.00041,.99902,.9996,1.00034,.99999,1.00026,.99999,1.00026,.99973,1.00052,.99973,1,.99973,1.00041,1.00075,.9994,1.0003,.99999,1,1.00041,.99955,1,.99915,.99973,.99973,1.00026,1.00119,.99955,.99973,1.0006,.99911,1.0006,1.00026,.99972,1.00026,.99902,1.00041,.99973,.99999,1,1,1.00038,1.0005,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,.99973,1,1,.99973,1,1,.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,.99973,.99973,.99972,1,1,1.00106,.99999,.99998,.99998,.99999,.99998,1.66475,1,.99973,.99973,1.00023,.99973,.99971,1.00047,1.00023,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,.99561,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.99972,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1],Tr={lineHeight:1.2,lineGap:.2},Or=[.76116,1,1,1.0006,.99998,.99974,.99973,.99973,.99982,.99977,1.00087,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99998,1,1.00003,1.00003,1.00003,1.00026,.9999,.99977,.99977,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,.99973,.99977,1.00026,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,.99998,1.0006,.99998,1.00003,.99973,.99998,.99973,1.00026,.99973,1.00026,.99973,.99998,1.00026,1.00026,1.0006,1.0006,.99973,1.0006,.99982,1.00026,1.00026,1.00026,1.00026,.99959,.99973,.99998,1.00026,.99973,1.00022,.99973,.99973,1,.99959,1.00077,.99959,1.00003,.99998,.99973,.99973,.99973,.99973,1.00077,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.99973,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,.99977,.99977,.99977,.99977,.99977,.99977,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,.99973,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.06409,1.00026,1.00026,1.00026,1.00026,1.00026,.99973,1.00026,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,1.0044,.99977,1.00026,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,.99977,1.00026,.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99971,.99973,.99973,1.0006,.99977,.99973,.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.01011,1.00026,.99999,1.00026,1.0006,.99977,1.00026,.99977,1.00026,.99977,1.00026,.9993,.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,.99977,.99959,.99977,.99959,.99977,.99959,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00026,.99998,1.00026,.8121,1.00026,.99998,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,1.00016,1.00022,1.00001,.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,.99973,.99977,.99973,1,.99982,1.00022,1.00026,1.00001,.99973,1.00026,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99977,1,1,1.00026,.99969,.99972,.99981,.9998,1.0006,.99977,.99977,1.00022,.91155,1.00001,1.00026,.99977,1.00022,1.0006,.99977,1.00001,.99999,.99977,.99966,1.00022,1.00032,1.00001,.99944,1.00026,1.00001,.99968,1.00001,1.00047,1,1.0006,1.00001,.99981,1.00101,1.00026,1.0006,.99948,.99981,1.00064,.99973,.99942,1.00101,1.00061,1.00026,1.00069,1.0006,1.00014,.99973,1.01322,.99973,1.00065,1.00026,1.00012,.99923,1,1.00064,1.00076,.99948,1.00055,1.00063,1.00007,.99943,1.0006,.99948,1.00026,.99948,.99943,1.00001,1.00001,1.00029,1.00038,1.00035,1.00001,1.0006,1.0006,.99973,.99978,1.00001,1.00057,.99989,.99967,.99964,.99967,.99977,.99999,.99977,1.00038,.99977,1.00001,.99973,1.00066,.99967,.99967,1.00041,.99998,.99999,.99977,1.00022,.99967,1.00001,.99977,1.00026,.99964,1.00031,1.00001,.99999,.99999,1,1.00023,1,1,.99999,1.00035,1.00001,.99999,.99973,.99977,.99999,1.00058,.99973,.99973,.99955,.9995,1.00026,1.00026,1.00032,.99989,1.00034,.99999,1.00026,1.00026,1.00026,.99973,.45998,.99973,1.00026,.99973,1.00001,.99999,.99982,.99994,.99996,1,1.00042,1.00044,1.00029,1.00023,.99973,.99973,1.00026,.99949,1.00002,.99973,1.0006,1.0006,1.0006,.99975,1.00026,1.00026,1.00032,.98685,.99973,1.00026,1,1,.99966,1.00044,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,.99973,1,1,.99973,1,1,.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,.99973,.99973,.99972,1,1,1.00106,.99999,.99998,.99998,.99999,.99998,1.66475,1,.99973,.99973,1,.99973,.99971,.99978,1,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1.00098,1,1,1,1.00049,1,1,.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,.99561,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.99972,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1],Rr={lineHeight:1.35,lineGap:.2},Hr=[.76116,1,1,1.0006,1.0006,1.00006,.99973,.99973,.99982,1.00001,1.00043,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.0006,1,1.00003,1.00003,1.00003,.99973,.99987,1.00001,1.00001,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,1,1.00001,.99973,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,.99949,.99973,.99998,.99973,.99973,1,.99973,.99973,1.0006,.99973,.99973,.99924,.99924,1,.99924,.99999,.99973,.99973,.99973,.99973,.99998,1,1.0006,.99973,1,.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,.99998,.99973,.99973,.99973,.99973,1.0009,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.9998,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,1,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.06409,1.00026,.99973,.99973,.99973,.99973,1,.99973,1,1.00001,.99973,1.00001,.99973,1.00001,.99973,.99977,1,.99977,1,.99977,1,.99977,1,.99977,1.0288,.99977,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,.99977,.99973,.99977,.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99924,1.0006,1.0006,.99946,1.00034,1,.99924,1.00001,1,1,.99973,.99924,.99973,.99924,.99973,1.06311,.99973,1.00024,.99973,.99924,.99977,.99973,.99977,.99973,.99977,.99973,1.00041,.9998,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1,1.00016,.99977,.99998,.99977,.99998,.99977,.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,.89547,1.00026,1.0006,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,1.00016,.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,.99924,.99973,1.00001,.99973,1,.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,1.00001,1,1.00054,.99977,1.00084,1.00007,.99973,1.00013,.99924,1.00001,1.00001,.99945,.91221,1.00001,1.00026,.99977,1.00022,1.0006,1.00001,1.00001,.99999,.99977,.99933,1.00022,1.00054,1.00001,1.00065,1.00026,1.00001,1.0001,1.00001,1.00052,1,1.0006,1.00001,.99945,.99897,.99968,.99924,1.00036,.99945,.99949,1,1.0006,.99897,.99918,.99968,.99911,.99924,1,.99962,1.01487,1,1.0005,.99973,1.00012,1.00043,1,.99995,.99994,1.00036,.99947,1.00019,1.00063,1.00025,.99924,1.00036,.99973,1.00036,1.00025,1.00001,1.00001,1.00027,1.0001,1.00068,1.00001,1.0006,1.0006,1,1.00008,.99957,.99972,.9994,.99954,.99975,1.00051,1.00001,1.00019,1.00001,1.0001,.99986,1.00001,1.00001,1.00038,.99954,.99954,.9994,1.00066,.99999,.99977,1.00022,1.00054,1.00001,.99977,1.00026,.99975,1.0001,1.00001,.99993,.9995,.99955,1.00016,.99978,.99974,1.00019,1.00022,.99955,1.00053,.99973,1.00089,1.00005,.99967,1.00048,.99973,1.00002,1.00034,.99973,.99973,.99964,1.00006,1.00066,.99947,.99973,.98894,.99973,1,.44898,1,.99946,1,1.00039,1.00082,.99991,.99991,.99985,1.00022,1.00023,1.00061,1.00006,.99966,.99973,.99973,.99973,1.00019,1.0008,1,.99924,.99924,.99924,.99983,1.00044,.99973,.99964,.98332,1,.99973,1,1,.99962,.99895,1.00016,.99977,1.00016,.99977,1.00016,.99977,1.00001,1,1,1,.99973,1,1,.99955,.99924,.99924,.99924,.99924,.99998,.99998,.99998,.99973,.99973,.99972,1,1,1.00267,.99999,.99998,.99998,1,.99998,1.66475,1,.99973,.99973,1.00023,.99973,1.00423,.99925,.99999,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1.00049,1,1.00245,1,1,1,1,.96329,1,1.20985,1.39713,1.00003,.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,1.00003,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.95317,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1],Dr={lineHeight:1.35,lineGap:.2},Mr=[.76116,1,1,1.0006,1.0006,1.00006,.99973,.99973,.99982,1.00001,1.00043,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.0006,1,1.00003,1.00003,1.00003,.99973,.99987,1.00001,1.00001,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,1,1.00001,.99973,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,.99949,.99973,.99998,.99973,.99973,1,.99973,.99973,1.0006,.99973,.99973,.99924,.99924,1,.99924,.99999,.99973,.99973,.99973,.99973,.99998,1,1.0006,.99973,1,.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,.99998,.99973,.99973,.99973,.99973,1.0009,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.9998,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,1,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.06409,1.00026,.99973,.99973,.99973,.99973,1,.99973,1,1.00001,.99973,1.00001,.99973,1.00001,.99973,.99977,1,.99977,1,.99977,1,.99977,1,.99977,1.04596,.99977,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,.99977,.99973,.99977,.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99924,1.0006,1.0006,1.00019,1.00034,1,.99924,1.00001,1,1,.99973,.99924,.99973,.99924,.99973,1.02572,.99973,1.00005,.99973,.99924,.99977,.99973,.99977,.99973,.99977,.99973,.99999,.9998,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1,1.00016,.99977,.99998,.99977,.99998,.99977,.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,.84533,1.00026,1.0006,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,1.00016,.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,.99924,.99973,1.00001,.99973,1,.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99928,1,.99977,1.00013,1.00055,.99947,.99945,.99941,.99924,1.00001,1.00001,1.0004,.91621,1.00001,1.00026,.99977,1.00022,1.0006,1.00001,1.00005,.99999,.99977,1.00015,1.00022,.99977,1.00001,.99973,1.00026,1.00001,1.00019,1.00001,.99946,1,1.0006,1.00001,.99978,1.00045,.99973,.99924,1.00023,.99978,.99966,1,1.00065,1.00045,1.00019,.99973,.99973,.99924,1,1,.96499,1,1.00055,.99973,1.00008,1.00027,1,.9997,.99995,1.00023,.99933,1.00019,1.00015,1.00031,.99924,1.00023,.99973,1.00023,1.00031,1.00001,.99928,1.00029,1.00092,1.00035,1.00001,1.0006,1.0006,1,.99988,.99975,1,1.00082,.99561,.9996,1.00035,1.00001,.99962,1.00001,1.00092,.99964,1.00001,.99963,.99999,1.00035,1.00035,1.00082,.99962,.99999,.99977,1.00022,1.00035,1.00001,.99977,1.00026,.9996,.99967,1.00001,1.00034,1.00074,1.00054,1.00053,1.00063,.99971,.99962,1.00035,.99975,.99977,.99973,1.00043,.99953,1.0007,.99915,.99973,1.00008,.99892,1.00073,1.00073,1.00114,.99915,1.00073,.99955,.99973,1.00092,.99973,1,.99998,1,1.0003,1,1.00043,1.00001,.99969,1.0003,1,1.00035,1.00001,.9995,1,1.00092,.99973,.99973,.99973,1.0007,.9995,1,.99924,1.0006,.99924,.99972,1.00062,.99973,1.00114,1.00073,1,.99955,1,1,1.00047,.99968,1.00016,.99977,1.00016,.99977,1.00016,.99977,1.00001,1,1,1,.99973,1,1,.99955,.99924,.99924,.99924,.99924,.99998,.99998,.99998,.99973,.99973,.99972,1,1,1.00267,.99999,.99998,.99998,1,.99998,1.66475,1,.99973,.99973,1.00023,.99973,.99971,.99925,1.00023,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,.96329,1,1.20985,1.39713,1.00003,.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.95317,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Pr={lineHeight:1.2,lineGap:.2},Er=[365,0,333,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,556,556,280,556,333,737,370,556,584,737,552,400,549,333,333,333,576,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,549,611,611,611,611,611,556,611,556,722,556,722,556,722,556,722,556,722,556,722,556,722,556,722,719,722,611,667,556,667,556,667,556,667,556,667,556,778,611,778,611,778,611,778,611,722,611,722,611,278,278,278,278,278,278,278,278,278,278,785,556,556,278,722,556,556,611,278,611,278,611,385,611,479,611,278,722,611,722,611,722,611,708,723,611,778,611,778,611,778,611,1e3,944,722,389,722,389,722,389,667,556,667,556,667,556,667,556,611,333,611,479,611,333,722,611,722,611,722,611,722,611,722,611,722,611,944,778,667,556,667,611,500,611,500,611,500,278,556,722,556,1e3,889,778,611,667,556,611,333,333,333,333,333,333,333,333,333,333,333,465,722,333,853,906,474,825,927,838,278,722,722,601,719,667,611,722,778,278,722,667,833,722,644,778,722,667,600,611,667,821,667,809,802,278,667,615,451,611,278,582,615,610,556,606,475,460,611,541,278,558,556,612,556,445,611,766,619,520,684,446,582,715,576,753,845,278,582,611,582,845,667,669,885,567,711,667,278,276,556,1094,1062,875,610,722,622,719,722,719,722,567,712,667,904,626,719,719,610,702,833,722,778,719,667,722,611,622,854,667,730,703,1005,1019,870,979,719,711,1031,719,556,618,615,417,635,556,709,497,615,615,500,635,740,604,611,604,611,556,490,556,875,556,615,581,833,844,729,854,615,552,854,583,556,556,611,417,552,556,278,281,278,969,906,611,500,615,556,604,778,611,487,447,944,778,944,778,944,778,667,556,333,333,556,1e3,1e3,552,278,278,278,278,500,500,500,556,556,350,1e3,1e3,240,479,333,333,604,333,167,396,556,556,1094,556,885,489,1115,1e3,768,600,834,834,834,834,1e3,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,722,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,611,611,333,333,333,333,333,333,333,333,222,222,333,333,333,333,333,333,333,333],Nr=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],zr=[365,0,333,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,556,556,280,556,333,737,370,556,584,737,552,400,549,333,333,333,576,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,549,611,611,611,611,611,556,611,556,722,556,722,556,722,556,722,556,722,556,722,556,722,556,722,740,722,611,667,556,667,556,667,556,667,556,667,556,778,611,778,611,778,611,778,611,722,611,722,611,278,278,278,278,278,278,278,278,278,278,782,556,556,278,722,556,556,611,278,611,278,611,396,611,479,611,278,722,611,722,611,722,611,708,723,611,778,611,778,611,778,611,1e3,944,722,389,722,389,722,389,667,556,667,556,667,556,667,556,611,333,611,479,611,333,722,611,722,611,722,611,722,611,722,611,722,611,944,778,667,556,667,611,500,611,500,611,500,278,556,722,556,1e3,889,778,611,667,556,611,333,333,333,333,333,333,333,333,333,333,333,333,722,333,854,906,473,844,930,847,278,722,722,610,671,667,611,722,778,278,722,667,833,722,657,778,718,667,590,611,667,822,667,829,781,278,667,620,479,611,278,591,620,621,556,610,479,492,611,558,278,566,556,603,556,450,611,712,605,532,664,409,591,704,578,773,834,278,591,611,591,834,667,667,886,614,719,667,278,278,556,1094,1042,854,622,719,677,719,722,708,722,614,722,667,927,643,719,719,615,687,833,722,778,719,667,722,611,677,781,667,729,708,979,989,854,1e3,708,719,1042,729,556,619,604,534,618,556,736,510,611,611,507,622,740,604,611,611,611,556,889,556,885,556,646,583,889,935,707,854,594,552,865,589,556,556,611,469,563,556,278,278,278,969,906,611,507,619,556,611,778,611,575,467,944,778,944,778,944,778,667,556,333,333,556,1e3,1e3,552,278,278,278,278,500,500,500,556,556,350,1e3,1e3,240,479,333,333,604,333,167,396,556,556,1104,556,885,516,1146,1e3,768,600,834,834,834,834,999,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,722,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,611,611,333,333,333,333,333,333,333,333,222,222,333,333,333,333,333,333,333,333],_r=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],Lr=[365,0,333,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,556,556,260,556,333,737,370,556,584,737,552,400,549,333,333,333,576,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,549,611,556,556,556,556,500,556,500,667,556,667,556,667,556,722,500,722,500,722,500,722,500,722,625,722,556,667,556,667,556,667,556,667,556,667,556,778,556,778,556,778,556,778,556,722,556,722,556,278,278,278,278,278,278,278,222,278,278,733,444,500,222,667,500,500,556,222,556,222,556,281,556,400,556,222,722,556,722,556,722,556,615,723,556,778,556,778,556,778,556,1e3,944,722,333,722,333,722,333,667,500,667,500,667,500,667,500,611,278,611,354,611,278,722,556,722,556,722,556,722,556,722,556,722,556,944,722,667,500,667,611,500,611,500,611,500,222,556,667,556,1e3,889,778,611,667,500,611,278,333,333,333,333,333,333,333,333,333,333,333,667,278,789,846,389,794,865,775,222,667,667,570,671,667,611,722,778,278,667,667,833,722,648,778,725,667,600,611,667,837,667,831,761,278,667,570,439,555,222,550,570,571,500,556,439,463,555,542,222,500,492,548,500,447,556,670,573,486,603,374,550,652,546,728,779,222,550,556,550,779,667,667,843,544,708,667,278,278,500,1066,982,844,589,715,639,724,667,651,667,544,704,667,917,614,715,715,589,686,833,722,778,725,667,722,611,639,795,667,727,673,920,923,805,886,651,694,1022,682,556,562,522,493,553,556,688,465,556,556,472,564,686,550,556,556,556,500,833,500,835,500,572,518,830,851,621,736,526,492,752,534,556,556,556,378,496,500,222,222,222,910,828,556,472,565,500,556,778,556,492,339,944,722,944,722,944,722,667,500,333,333,556,1e3,1e3,552,222,222,222,222,333,333,333,556,556,350,1e3,1e3,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1083,1e3,768,600,834,834,834,834,1e3,500,998,500,1e3,500,500,494,612,823,713,584,549,713,979,719,274,549,549,584,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,500,500,333,333,333,333,333,333,333,333,222,222,294,294,324,324,316,328,398,285],Ur=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],Xr=[365,0,333,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,556,556,260,556,333,737,370,556,584,737,552,400,549,333,333,333,576,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,549,611,556,556,556,556,500,556,500,667,556,667,556,667,556,722,500,722,500,722,500,722,500,722,615,722,556,667,556,667,556,667,556,667,556,667,556,778,556,778,556,778,556,778,556,722,556,722,556,278,278,278,278,278,278,278,222,278,278,735,444,500,222,667,500,500,556,222,556,222,556,292,556,334,556,222,722,556,722,556,722,556,604,723,556,778,556,778,556,778,556,1e3,944,722,333,722,333,722,333,667,500,667,500,667,500,667,500,611,278,611,375,611,278,722,556,722,556,722,556,722,556,722,556,722,556,944,722,667,500,667,611,500,611,500,611,500,222,556,667,556,1e3,889,778,611,667,500,611,278,333,333,333,333,333,333,333,333,333,333,333,667,278,784,838,384,774,855,752,222,667,667,551,668,667,611,722,778,278,667,668,833,722,650,778,722,667,618,611,667,798,667,835,748,278,667,578,446,556,222,547,578,575,500,557,446,441,556,556,222,500,500,576,500,448,556,690,569,482,617,395,547,648,525,713,781,222,547,556,547,781,667,667,865,542,719,667,278,278,500,1057,1010,854,583,722,635,719,667,656,667,542,677,667,923,604,719,719,583,656,833,722,778,719,667,722,611,635,760,667,740,667,917,938,792,885,656,719,1010,722,556,573,531,365,583,556,669,458,559,559,438,583,688,552,556,542,556,500,458,500,823,500,573,521,802,823,625,719,521,510,750,542,556,556,556,365,510,500,222,278,222,906,812,556,438,559,500,552,778,556,489,411,944,722,944,722,944,722,667,500,333,333,556,1e3,1e3,552,222,222,222,222,333,333,333,556,556,350,1e3,1e3,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1073,1e3,768,600,834,834,834,834,1e3,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,719,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,500,500,333,333,333,333,333,333,333,333,222,222,294,294,324,324,316,328,398,285],Wr=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],Kr=[1.36898,1,1,.72706,.80479,.83734,.98894,.99793,.9897,.93884,.86209,.94292,.94292,1.16661,1.02058,.93582,.96694,.93582,1.19137,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.78076,.78076,1.02058,1.02058,1.02058,.72851,.78966,.90838,.83637,.82391,.96376,.80061,.86275,.8768,.95407,1.0258,.73901,.85022,.83655,1.0156,.95546,.92179,.87107,.92179,.82114,.8096,.89713,.94438,.95353,.94083,.91905,.90406,.9446,.94292,1.18777,.94292,1.02058,.89903,.90088,.94938,.97898,.81093,.97571,.94938,1.024,.9577,.95933,.98621,1.0474,.97455,.98981,.9672,.95933,.9446,.97898,.97407,.97646,.78036,1.10208,.95442,.95298,.97579,.9332,.94039,.938,.80687,1.01149,.80687,1.02058,.80479,.99793,.99793,.99793,.99793,1.01149,1.00872,.90088,.91882,1.0213,.8361,1.02058,.62295,.54324,.89022,1.08595,1,1,.90088,1,.97455,.93582,.90088,1,1.05686,.8361,.99642,.99642,.99642,.72851,.90838,.90838,.90838,.90838,.90838,.90838,.868,.82391,.80061,.80061,.80061,.80061,1.0258,1.0258,1.0258,1.0258,.97484,.95546,.92179,.92179,.92179,.92179,.92179,1.02058,.92179,.94438,.94438,.94438,.94438,.90406,.86958,.98225,.94938,.94938,.94938,.94938,.94938,.94938,.9031,.81093,.94938,.94938,.94938,.94938,.98621,.98621,.98621,.98621,.93969,.95933,.9446,.9446,.9446,.9446,.9446,1.08595,.9446,.95442,.95442,.95442,.95442,.94039,.97898,.94039,.90838,.94938,.90838,.94938,.90838,.94938,.82391,.81093,.82391,.81093,.82391,.81093,.82391,.81093,.96376,.84313,.97484,.97571,.80061,.94938,.80061,.94938,.80061,.94938,.80061,.94938,.80061,.94938,.8768,.9577,.8768,.9577,.8768,.9577,1,1,.95407,.95933,.97069,.95933,1.0258,.98621,1.0258,.98621,1.0258,.98621,1.0258,.98621,1.0258,.98621,.887,1.01591,.73901,1.0474,1,1,.97455,.83655,.98981,1,1,.83655,.73977,.83655,.73903,.84638,1.033,.95546,.95933,1,1,.95546,.95933,.8271,.95417,.95933,.92179,.9446,.92179,.9446,.92179,.9446,.936,.91964,.82114,.97646,1,1,.82114,.97646,.8096,.78036,.8096,.78036,1,1,.8096,.78036,1,1,.89713,.77452,.89713,1.10208,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94083,.97579,.90406,.94039,.90406,.9446,.938,.9446,.938,.9446,.938,1,.99793,.90838,.94938,.868,.9031,.92179,.9446,1,1,.89713,1.10208,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90989,.9358,.91945,.83181,.75261,.87992,.82976,.96034,.83689,.97268,1.0078,.90838,.83637,.8019,.90157,.80061,.9446,.95407,.92436,1.0258,.85022,.97153,1.0156,.95546,.89192,.92179,.92361,.87107,.96318,.89713,.93704,.95638,.91905,.91709,.92796,1.0258,.93704,.94836,1.0373,.95933,1.0078,.95871,.94836,.96174,.92601,.9498,.98607,.95776,.95933,1.05453,1.0078,.98275,.9314,.95617,.91701,1.05993,.9446,.78367,.9553,1,.86832,1.0128,.95871,.99394,.87548,.96361,.86774,1.0078,.95871,.9446,.95871,.86774,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.94083,.97579,.94083,.97579,.94083,.97579,.90406,.94039,.96694,1,.89903,1,1,1,.93582,.93582,.93582,1,.908,.908,.918,.94219,.94219,.96544,1,1.285,1,1,.81079,.81079,1,1,.74854,1,1,1,1,.99793,1,1,1,.65,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.17173,1,.80535,.76169,1.02058,1.0732,1.05486,1,1,1.30692,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.16161,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Vr={lineHeight:1.2,lineGap:.2},Gr=[1.36898,1,1,.66227,.80779,.81625,.97276,.97276,.97733,.92222,.83266,.94292,.94292,1.16148,1.02058,.93582,.96694,.93582,1.17337,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.78076,.78076,1.02058,1.02058,1.02058,.71541,.76813,.85576,.80591,.80729,.94299,.77512,.83655,.86523,.92222,.98621,.71743,.81698,.79726,.98558,.92222,.90637,.83809,.90637,.80729,.76463,.86275,.90699,.91605,.9154,.85308,.85458,.90531,.94292,1.21296,.94292,1.02058,.89903,1.18616,.99613,.91677,.78216,.91677,.90083,.98796,.9135,.92168,.95381,.98981,.95298,.95381,.93459,.92168,.91513,.92004,.91677,.95077,.748,1.04502,.91677,.92061,.94236,.89544,.89364,.9,.80687,.8578,.80687,1.02058,.80779,.97276,.97276,.97276,.97276,.8578,.99973,1.18616,.91339,1.08074,.82891,1.02058,.55509,.71526,.89022,1.08595,1,1,1.18616,1,.96736,.93582,1.18616,1,1.04864,.82711,.99043,.99043,.99043,.71541,.85576,.85576,.85576,.85576,.85576,.85576,.845,.80729,.77512,.77512,.77512,.77512,.98621,.98621,.98621,.98621,.95961,.92222,.90637,.90637,.90637,.90637,.90637,1.02058,.90251,.90699,.90699,.90699,.90699,.85458,.83659,.94951,.99613,.99613,.99613,.99613,.99613,.99613,.85811,.78216,.90083,.90083,.90083,.90083,.95381,.95381,.95381,.95381,.9135,.92168,.91513,.91513,.91513,.91513,.91513,1.08595,.91677,.91677,.91677,.91677,.91677,.89364,.92332,.89364,.85576,.99613,.85576,.99613,.85576,.99613,.80729,.78216,.80729,.78216,.80729,.78216,.80729,.78216,.94299,.76783,.95961,.91677,.77512,.90083,.77512,.90083,.77512,.90083,.77512,.90083,.77512,.90083,.86523,.9135,.86523,.9135,.86523,.9135,1,1,.92222,.92168,.92222,.92168,.98621,.95381,.98621,.95381,.98621,.95381,.98621,.95381,.98621,.95381,.86036,.97096,.71743,.98981,1,1,.95298,.79726,.95381,1,1,.79726,.6894,.79726,.74321,.81691,1.0006,.92222,.92168,1,1,.92222,.92168,.79464,.92098,.92168,.90637,.91513,.90637,.91513,.90637,.91513,.909,.87514,.80729,.95077,1,1,.80729,.95077,.76463,.748,.76463,.748,1,1,.76463,.748,1,1,.86275,.72651,.86275,1.04502,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.9154,.94236,.85458,.89364,.85458,.90531,.9,.90531,.9,.90531,.9,1,.97276,.85576,.99613,.845,.85811,.90251,.91677,1,1,.86275,1.04502,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.00899,1.30628,.85576,.80178,.66862,.7927,.69323,.88127,.72459,.89711,.95381,.85576,.80591,.7805,.94729,.77512,.90531,.92222,.90637,.98621,.81698,.92655,.98558,.92222,.85359,.90637,.90976,.83809,.94523,.86275,.83509,.93157,.85308,.83392,.92346,.98621,.83509,.92886,.91324,.92168,.95381,.90646,.92886,.90557,.86847,.90276,.91324,.86842,.92168,.99531,.95381,.9224,.85408,.92699,.86847,1.0051,.91513,.80487,.93481,1,.88159,1.05214,.90646,.97355,.81539,.89398,.85923,.95381,.90646,.91513,.90646,.85923,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.9154,.94236,.9154,.94236,.9154,.94236,.85458,.89364,.96694,1,.89903,1,1,1,.91782,.91782,.91782,1,.896,.896,.896,.9332,.9332,.95973,1,1.26,1,1,.80479,.80178,1,1,.85633,1,1,1,1,.97276,1,1,1,.698,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.14542,1,.79199,.78694,1.02058,1.03493,1.05486,1,1,1.23026,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.20006,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],$r={lineHeight:1.2,lineGap:.2},Yr=[1.36898,1,1,.65507,.84943,.85639,.88465,.88465,.86936,.88307,.86948,.85283,.85283,1.06383,1.02058,.75945,.9219,.75945,1.17337,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.75945,.75945,1.02058,1.02058,1.02058,.69046,.70926,.85158,.77812,.76852,.89591,.70466,.76125,.80094,.86822,.83864,.728,.77212,.79475,.93637,.87514,.8588,.76013,.8588,.72421,.69866,.77598,.85991,.80811,.87832,.78112,.77512,.8562,1.0222,1.18417,1.0222,1.27014,.89903,1.15012,.93859,.94399,.846,.94399,.81453,1.0186,.94219,.96017,1.03075,1.02175,.912,1.03075,.96998,.96017,.93859,.94399,.94399,.95493,.746,1.12658,.94578,.91,.979,.882,.882,.83,.85034,.83537,.85034,1.02058,.70869,.88465,.88465,.88465,.88465,.83537,.90083,1.15012,.9161,.94565,.73541,1.02058,.53609,.69353,.79519,1.08595,1,1,1.15012,1,.91974,.75945,1.15012,1,.9446,.73361,.9005,.9005,.9005,.62864,.85158,.85158,.85158,.85158,.85158,.85158,.773,.76852,.70466,.70466,.70466,.70466,.83864,.83864,.83864,.83864,.90561,.87514,.8588,.8588,.8588,.8588,.8588,1.02058,.85751,.85991,.85991,.85991,.85991,.77512,.76013,.88075,.93859,.93859,.93859,.93859,.93859,.93859,.8075,.846,.81453,.81453,.81453,.81453,.82424,.82424,.82424,.82424,.9278,.96017,.93859,.93859,.93859,.93859,.93859,1.08595,.8562,.94578,.94578,.94578,.94578,.882,.94578,.882,.85158,.93859,.85158,.93859,.85158,.93859,.76852,.846,.76852,.846,.76852,.846,.76852,.846,.89591,.8544,.90561,.94399,.70466,.81453,.70466,.81453,.70466,.81453,.70466,.81453,.70466,.81453,.80094,.94219,.80094,.94219,.80094,.94219,1,1,.86822,.96017,.86822,.96017,.83864,.82424,.83864,.82424,.83864,.82424,.83864,1.03075,.83864,.82424,.81402,1.02738,.728,1.02175,1,1,.912,.79475,1.03075,1,1,.79475,.83911,.79475,.66266,.80553,1.06676,.87514,.96017,1,1,.87514,.96017,.86865,.87396,.96017,.8588,.93859,.8588,.93859,.8588,.93859,.867,.84759,.72421,.95493,1,1,.72421,.95493,.69866,.746,.69866,.746,1,1,.69866,.746,1,1,.77598,.88417,.77598,1.12658,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.87832,.979,.77512,.882,.77512,.8562,.83,.8562,.83,.8562,.83,1,.88465,.85158,.93859,.773,.8075,.85751,.8562,1,1,.77598,1.12658,1.15012,1.15012,1.15012,1.15012,1.15012,1.15313,1.15012,1.15012,1.15012,1.08106,1.03901,.85158,.77025,.62264,.7646,.65351,.86026,.69461,.89947,1.03075,.85158,.77812,.76449,.88836,.70466,.8562,.86822,.8588,.83864,.77212,.85308,.93637,.87514,.82352,.8588,.85701,.76013,.89058,.77598,.8156,.82565,.78112,.77899,.89386,.83864,.8156,.9486,.92388,.96186,1.03075,.91123,.9486,.93298,.878,.93942,.92388,.84596,.96186,.95119,1.03075,.922,.88787,.95829,.88,.93559,.93859,.78815,.93758,1,.89217,1.03737,.91123,.93969,.77487,.85769,.86799,1.03075,.91123,.93859,.91123,.86799,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.87832,.979,.87832,.979,.87832,.979,.77512,.882,.9219,1,.89903,1,1,1,.87321,.87321,.87321,1,1.027,1.027,1.027,.86847,.86847,.79121,1,1.124,1,1,.73572,.73572,1,1,.85034,1,1,1,1,.88465,1,1,1,.669,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.04828,1,.74948,.75187,1.02058,.98391,1.02119,1,1,1.06233,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.05233,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Jr={lineHeight:1.2,lineGap:.2},Qr=[1.36898,1,1,.76305,.82784,.94935,.89364,.92241,.89073,.90706,.98472,.85283,.85283,1.0664,1.02058,.74505,.9219,.74505,1.23456,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.74505,.74505,1.02058,1.02058,1.02058,.73002,.72601,.91755,.8126,.80314,.92222,.73764,.79726,.83051,.90284,.86023,.74,.8126,.84869,.96518,.91115,.8858,.79761,.8858,.74498,.73914,.81363,.89591,.83659,.89633,.85608,.8111,.90531,1.0222,1.22736,1.0222,1.27014,.89903,.90088,.86667,1.0231,.896,1.01411,.90083,1.05099,1.00512,.99793,1.05326,1.09377,.938,1.06226,1.00119,.99793,.98714,1.0231,1.01231,.98196,.792,1.19137,.99074,.962,1.01915,.926,.942,.856,.85034,.92006,.85034,1.02058,.69067,.92241,.92241,.92241,.92241,.92006,.9332,.90088,.91882,.93484,.75339,1.02058,.56866,.54324,.79519,1.08595,1,1,.90088,1,.95325,.74505,.90088,1,.97198,.75339,.91009,.91009,.91009,.66466,.91755,.91755,.91755,.91755,.91755,.91755,.788,.80314,.73764,.73764,.73764,.73764,.86023,.86023,.86023,.86023,.92915,.91115,.8858,.8858,.8858,.8858,.8858,1.02058,.8858,.89591,.89591,.89591,.89591,.8111,.79611,.89713,.86667,.86667,.86667,.86667,.86667,.86667,.86936,.896,.90083,.90083,.90083,.90083,.84224,.84224,.84224,.84224,.97276,.99793,.98714,.98714,.98714,.98714,.98714,1.08595,.89876,.99074,.99074,.99074,.99074,.942,1.0231,.942,.91755,.86667,.91755,.86667,.91755,.86667,.80314,.896,.80314,.896,.80314,.896,.80314,.896,.92222,.93372,.92915,1.01411,.73764,.90083,.73764,.90083,.73764,.90083,.73764,.90083,.73764,.90083,.83051,1.00512,.83051,1.00512,.83051,1.00512,1,1,.90284,.99793,.90976,.99793,.86023,.84224,.86023,.84224,.86023,.84224,.86023,1.05326,.86023,.84224,.82873,1.07469,.74,1.09377,1,1,.938,.84869,1.06226,1,1,.84869,.83704,.84869,.81441,.85588,1.08927,.91115,.99793,1,1,.91115,.99793,.91887,.90991,.99793,.8858,.98714,.8858,.98714,.8858,.98714,.894,.91434,.74498,.98196,1,1,.74498,.98196,.73914,.792,.73914,.792,1,1,.73914,.792,1,1,.81363,.904,.81363,1.19137,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89633,1.01915,.8111,.942,.8111,.90531,.856,.90531,.856,.90531,.856,1,.92241,.91755,.86667,.788,.86936,.8858,.89876,1,1,.81363,1.19137,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90388,1.03901,.92138,.78105,.7154,.86169,.80513,.94007,.82528,.98612,1.06226,.91755,.8126,.81884,.92819,.73764,.90531,.90284,.8858,.86023,.8126,.91172,.96518,.91115,.83089,.8858,.87791,.79761,.89297,.81363,.88157,.89992,.85608,.81992,.94307,.86023,.88157,.95308,.98699,.99793,1.06226,.95817,.95308,.97358,.928,.98088,.98699,.92761,.99793,.96017,1.06226,.986,.944,.95978,.938,.96705,.98714,.80442,.98972,1,.89762,1.04552,.95817,.99007,.87064,.91879,.88888,1.06226,.95817,.98714,.95817,.88888,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.89633,1.01915,.89633,1.01915,.89633,1.01915,.8111,.942,.9219,1,.89903,1,1,1,.93173,.93173,.93173,1,1.06304,1.06304,1.06904,.89903,.89903,.80549,1,1.156,1,1,.76575,.76575,1,1,.72458,1,1,1,1,.92241,1,1,1,.619,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.07257,1,.74705,.71119,1.02058,1.024,1.02119,1,1,1.1536,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.05638,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Zr={lineHeight:1.2,lineGap:.2},es=[1.76738,1,1,.99297,.9824,1.04016,1.06497,1.03424,.97529,1.17647,1.23203,1.1085,1.1085,1.16939,1.2107,.9754,1.21408,.9754,1.59578,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,.81378,.81378,1.2107,1.2107,1.2107,.71703,.97847,.97363,.88776,.8641,1.02096,.79795,.85132,.914,1.06085,1.1406,.8007,.89858,.83693,1.14889,1.09398,.97489,.92094,.97489,.90399,.84041,.95923,1.00135,1,1.06467,.98243,.90996,.99361,1.1085,1.56942,1.1085,1.2107,.74627,.94282,.96752,1.01519,.86304,1.01359,.97278,1.15103,1.01359,.98561,1.02285,1.02285,1.00527,1.02285,1.0302,.99041,1.0008,1.01519,1.01359,1.02258,.79104,1.16862,.99041,.97454,1.02511,.99298,.96752,.95801,.94856,1.16579,.94856,1.2107,.9824,1.03424,1.03424,1,1.03424,1.16579,.8727,1.3871,1.18622,1.10818,1.04478,1.2107,1.18622,.75155,.94994,1.28826,1.21408,1.21408,.91056,1,.91572,.9754,.64663,1.18328,1.24866,1.04478,1.14169,1.15749,1.17389,.71703,.97363,.97363,.97363,.97363,.97363,.97363,.93506,.8641,.79795,.79795,.79795,.79795,1.1406,1.1406,1.1406,1.1406,1.02096,1.09398,.97426,.97426,.97426,.97426,.97426,1.2107,.97489,1.00135,1.00135,1.00135,1.00135,.90996,.92094,1.02798,.96752,.96752,.96752,.96752,.96752,.96752,.93136,.86304,.97278,.97278,.97278,.97278,1.02285,1.02285,1.02285,1.02285,.97122,.99041,1,1,1,1,1,1.28826,1.0008,.99041,.99041,.99041,.99041,.96752,1.01519,.96752,.97363,.96752,.97363,.96752,.97363,.96752,.8641,.86304,.8641,.86304,.8641,.86304,.8641,.86304,1.02096,1.03057,1.02096,1.03517,.79795,.97278,.79795,.97278,.79795,.97278,.79795,.97278,.79795,.97278,.914,1.01359,.914,1.01359,.914,1.01359,1,1,1.06085,.98561,1.06085,1.00879,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,.97138,1.08692,.8007,1.02285,1,1,1.00527,.83693,1.02285,1,1,.83693,.9455,.83693,.90418,.83693,1.13005,1.09398,.99041,1,1,1.09398,.99041,.96692,1.09251,.99041,.97489,1.0008,.97489,1.0008,.97489,1.0008,.93994,.97931,.90399,1.02258,1,1,.90399,1.02258,.84041,.79104,.84041,.79104,.84041,.79104,.84041,.79104,1,1,.95923,1.07034,.95923,1.16862,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.06467,1.02511,.90996,.96752,.90996,.99361,.95801,.99361,.95801,.99361,.95801,1.07733,1.03424,.97363,.96752,.93506,.93136,.97489,1.0008,1,1,.95923,1.16862,1.15103,1.15103,1.01173,1.03959,.75953,.81378,.79912,1.15103,1.21994,.95161,.87815,1.01149,.81525,.7676,.98167,1.01134,1.02546,.84097,1.03089,1.18102,.97363,.88776,.85134,.97826,.79795,.99361,1.06085,.97489,1.1406,.89858,1.0388,1.14889,1.09398,.86039,.97489,1.0595,.92094,.94793,.95923,.90996,.99346,.98243,1.02112,.95493,1.1406,.90996,1.03574,1.02597,1.0008,1.18102,1.06628,1.03574,1.0192,1.01932,1.00886,.97531,1.0106,1.0008,1.13189,1.18102,1.02277,.98683,1.0016,.99561,1.07237,1.0008,.90434,.99921,.93803,.8965,1.23085,1.06628,1.04983,.96268,1.0499,.98439,1.18102,1.06628,1.0008,1.06628,.98439,.79795,1,1,1,1,1,1,1,1,1,1,1,1,1.09466,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.97278,1,1,1,1,1,1,1,1,1,1,1,1,1.02065,1,1,1,1,1,1,1.06467,1.02511,1.06467,1.02511,1.06467,1.02511,.90996,.96752,1,1.21408,.89903,1,1,.75155,1.04394,1.04394,1.04394,1.04394,.98633,.98633,.98633,.73047,.73047,1.20642,.91211,1.25635,1.222,1.02956,1.03372,1.03372,.96039,1.24633,1,1.12454,.93503,1.03424,1.19687,1.03424,1,1,1,.771,1,1,1.15749,1.15749,1.15749,1.10948,.86279,.94434,.86279,.94434,.86182,1,1,1.16897,1,.96085,.90137,1.2107,1.18416,1.13973,.69825,.9716,2.10339,1.29004,1.29004,1.21172,1.29004,1.29004,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18874,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.09193,1.09193,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],ts={lineHeight:1.33008,lineGap:0},ns=[1.76738,1,1,.98946,1.03959,1.04016,1.02809,1.036,.97639,1.10953,1.23203,1.11144,1.11144,1.16939,1.21237,.9754,1.21261,.9754,1.59754,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,.81378,.81378,1.21237,1.21237,1.21237,.73541,.97847,.97363,.89723,.87897,1.0426,.79429,.85292,.91149,1.05815,1.1406,.79631,.90128,.83853,1.04396,1.10615,.97552,.94436,.97552,.88641,.80527,.96083,1.00135,1,1.06777,.9817,.91142,.99361,1.11144,1.57293,1.11144,1.21237,.74627,1.31818,1.06585,.97042,.83055,.97042,.93503,1.1261,.97042,.97922,1.14236,.94552,1.01054,1.14236,1.02471,.97922,.94165,.97042,.97042,1.0276,.78929,1.1261,.97922,.95874,1.02197,.98507,.96752,.97168,.95107,1.16579,.95107,1.21237,1.03959,1.036,1.036,1,1.036,1.16579,.87357,1.31818,1.18754,1.26781,1.05356,1.21237,1.18622,.79487,.94994,1.29004,1.24047,1.24047,1.31818,1,.91484,.9754,1.31818,1.1349,1.24866,1.05356,1.13934,1.15574,1.17389,.73541,.97363,.97363,.97363,.97363,.97363,.97363,.94385,.87897,.79429,.79429,.79429,.79429,1.1406,1.1406,1.1406,1.1406,1.0426,1.10615,.97552,.97552,.97552,.97552,.97552,1.21237,.97552,1.00135,1.00135,1.00135,1.00135,.91142,.94436,.98721,1.06585,1.06585,1.06585,1.06585,1.06585,1.06585,.96705,.83055,.93503,.93503,.93503,.93503,1.14236,1.14236,1.14236,1.14236,.93125,.97922,.94165,.94165,.94165,.94165,.94165,1.29004,.94165,.97922,.97922,.97922,.97922,.96752,.97042,.96752,.97363,1.06585,.97363,1.06585,.97363,1.06585,.87897,.83055,.87897,.83055,.87897,.83055,.87897,.83055,1.0426,1.0033,1.0426,.97042,.79429,.93503,.79429,.93503,.79429,.93503,.79429,.93503,.79429,.93503,.91149,.97042,.91149,.97042,.91149,.97042,1,1,1.05815,.97922,1.05815,.97922,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,.97441,1.04302,.79631,1.01582,1,1,1.01054,.83853,1.14236,1,1,.83853,1.09125,.83853,.90418,.83853,1.19508,1.10615,.97922,1,1,1.10615,.97922,1.01034,1.10466,.97922,.97552,.94165,.97552,.94165,.97552,.94165,.91602,.91981,.88641,1.0276,1,1,.88641,1.0276,.80527,.78929,.80527,.78929,.80527,.78929,.80527,.78929,1,1,.96083,1.05403,.95923,1.16862,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.06777,1.02197,.91142,.96752,.91142,.99361,.97168,.99361,.97168,.99361,.97168,1.23199,1.036,.97363,1.06585,.94385,.96705,.97552,.94165,1,1,.96083,1.1261,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,.95161,1.27126,1.00811,.83284,.77702,.99137,.95253,1.0347,.86142,1.07205,1.14236,.97363,.89723,.86869,1.09818,.79429,.99361,1.05815,.97552,1.1406,.90128,1.06662,1.04396,1.10615,.84918,.97552,1.04694,.94436,.98015,.96083,.91142,1.00356,.9817,1.01945,.98999,1.1406,.91142,1.04961,.9898,1.00639,1.14236,1.07514,1.04961,.99607,1.02897,1.008,.9898,.95134,1.00639,1.11121,1.14236,1.00518,.97981,1.02186,1,1.08578,.94165,.99314,.98387,.93028,.93377,1.35125,1.07514,1.10687,.93491,1.04232,1.00351,1.14236,1.07514,.94165,1.07514,1.00351,.79429,1,1,1,1,1,1,1,1,1,1,1,1,1.09097,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.93503,1,1,1,1,1,1,1,1,1,1,1,1,.96609,1,1,1,1,1,1,1.06777,1.02197,1.06777,1.02197,1.06777,1.02197,.91142,.96752,1,1.21261,.89903,1,1,.75155,1.04745,1.04745,1.04745,1.04394,.98633,.98633,.98633,.72959,.72959,1.20502,.91406,1.26514,1.222,1.02956,1.03372,1.03372,.96039,1.24633,1,1.09125,.93327,1.03336,1.16541,1.036,1,1,1,.771,1,1,1.15574,1.15574,1.15574,1.15574,.86364,.94434,.86279,.94434,.86224,1,1,1.16798,1,.96085,.90068,1.21237,1.18416,1.13904,.69825,.9716,2.10339,1.29004,1.29004,1.21339,1.29004,1.29004,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18775,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.13269,1.13269,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],as={lineHeight:1.33008,lineGap:0},rs=[1.76738,1,1,.98946,1.14763,1.05365,1.06234,.96927,.92586,1.15373,1.18414,.91349,.91349,1.07403,1.17308,.78383,1.20088,.78383,1.42531,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.78383,.78383,1.17308,1.17308,1.17308,.77349,.94565,.94729,.85944,.88506,.9858,.74817,.80016,.88449,.98039,.95782,.69238,.89898,.83231,.98183,1.03989,.96924,.86237,.96924,.80595,.74524,.86091,.95402,.94143,.98448,.8858,.83089,.93285,1.0949,1.39016,1.0949,1.45994,.74627,1.04839,.97454,.97454,.87207,.97454,.87533,1.06151,.97454,1.00176,1.16484,1.08132,.98047,1.16484,1.02989,1.01054,.96225,.97454,.97454,1.06598,.79004,1.16344,1.00351,.94629,.9973,.91016,.96777,.9043,.91082,.92481,.91082,1.17308,.95748,.96927,.96927,1,.96927,.92481,.80597,1.04839,1.23393,1.1781,.9245,1.17308,1.20808,.63218,.94261,1.24822,1.09971,1.09971,1.04839,1,.85273,.78032,1.04839,1.09971,1.22326,.9245,1.09836,1.13525,1.15222,.70424,.94729,.94729,.94729,.94729,.94729,.94729,.85498,.88506,.74817,.74817,.74817,.74817,.95782,.95782,.95782,.95782,.9858,1.03989,.96924,.96924,.96924,.96924,.96924,1.17308,.96924,.95402,.95402,.95402,.95402,.83089,.86237,.88409,.97454,.97454,.97454,.97454,.97454,.97454,.92916,.87207,.87533,.87533,.87533,.87533,.93146,.93146,.93146,.93146,.93854,1.01054,.96225,.96225,.96225,.96225,.96225,1.24822,.8761,1.00351,1.00351,1.00351,1.00351,.96777,.97454,.96777,.94729,.97454,.94729,.97454,.94729,.97454,.88506,.87207,.88506,.87207,.88506,.87207,.88506,.87207,.9858,.95391,.9858,.97454,.74817,.87533,.74817,.87533,.74817,.87533,.74817,.87533,.74817,.87533,.88449,.97454,.88449,.97454,.88449,.97454,1,1,.98039,1.00176,.98039,1.00176,.95782,.93146,.95782,.93146,.95782,.93146,.95782,1.16484,.95782,.93146,.84421,1.12761,.69238,1.08132,1,1,.98047,.83231,1.16484,1,1,.84723,1.04861,.84723,.78755,.83231,1.23736,1.03989,1.01054,1,1,1.03989,1.01054,.9857,1.03849,1.01054,.96924,.96225,.96924,.96225,.96924,.96225,.92383,.90171,.80595,1.06598,1,1,.80595,1.06598,.74524,.79004,.74524,.79004,.74524,.79004,.74524,.79004,1,1,.86091,1.02759,.85771,1.16344,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.98448,.9973,.83089,.96777,.83089,.93285,.9043,.93285,.9043,.93285,.9043,1.31868,.96927,.94729,.97454,.85498,.92916,.96924,.8761,1,1,.86091,1.16344,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,.81965,.81965,.94729,.78032,.71022,.90883,.84171,.99877,.77596,1.05734,1.2,.94729,.85944,.82791,.9607,.74817,.93285,.98039,.96924,.95782,.89898,.98316,.98183,1.03989,.78614,.96924,.97642,.86237,.86075,.86091,.83089,.90082,.8858,.97296,1.01284,.95782,.83089,1.0976,1.04,1.03342,1.2,1.0675,1.0976,.98205,1.03809,1.05097,1.04,.95364,1.03342,1.05401,1.2,1.02148,1.0119,1.04724,1.0127,1.02732,.96225,.8965,.97783,.93574,.94818,1.30679,1.0675,1.11826,.99821,1.0557,1.0326,1.2,1.0675,.96225,1.0675,1.0326,.74817,1,1,1,1,1,1,1,1,1,1,1,1,1.03754,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.87533,1,1,1,1,1,1,1,1,1,1,1,1,.98705,1,1,1,1,1,1,.98448,.9973,.98448,.9973,.98448,.9973,.83089,.96777,1,1.20088,.89903,1,1,.75155,.94945,.94945,.94945,.94945,1.12317,1.12317,1.12317,.67603,.67603,1.15621,.73584,1.21191,1.22135,1.06483,.94868,.94868,.95996,1.24633,1,1.07497,.87709,.96927,1.01473,.96927,1,1,1,.77295,1,1,1.09836,1.09836,1.09836,1.01522,.86321,.94434,.8649,.94434,.86182,1,1,1.083,1,.91578,.86438,1.17308,1.18416,1.14589,.69825,.97622,1.96791,1.24822,1.24822,1.17308,1.24822,1.24822,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.17984,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.10742,1.10742,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],ss={lineHeight:1.33008,lineGap:0},is=[1.76738,1,1,.98594,1.02285,1.10454,1.06234,.96927,.92037,1.19985,1.2046,.90616,.90616,1.07152,1.1714,.78032,1.20088,.78032,1.40246,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.78032,.78032,1.1714,1.1714,1.1714,.80597,.94084,.96706,.85944,.85734,.97093,.75842,.79936,.88198,.9831,.95782,.71387,.86969,.84636,1.07796,1.03584,.96924,.83968,.96924,.82826,.79649,.85771,.95132,.93119,.98965,.88433,.8287,.93365,1.08612,1.3638,1.08612,1.45786,.74627,.80499,.91484,1.05707,.92383,1.05882,.9403,1.12654,1.05882,1.01756,1.09011,1.09011,.99414,1.09011,1.034,1.01756,1.05356,1.05707,1.05882,1.04399,.84863,1.21968,1.01756,.95801,1.00068,.91797,.96777,.9043,.90351,.92105,.90351,1.1714,.85337,.96927,.96927,.99912,.96927,.92105,.80597,1.2434,1.20808,1.05937,.90957,1.1714,1.20808,.75155,.94261,1.24644,1.09971,1.09971,.84751,1,.85273,.78032,.61584,1.05425,1.17914,.90957,1.08665,1.11593,1.14169,.73381,.96706,.96706,.96706,.96706,.96706,.96706,.86035,.85734,.75842,.75842,.75842,.75842,.95782,.95782,.95782,.95782,.97093,1.03584,.96924,.96924,.96924,.96924,.96924,1.1714,.96924,.95132,.95132,.95132,.95132,.8287,.83968,.89049,.91484,.91484,.91484,.91484,.91484,.91484,.93575,.92383,.9403,.9403,.9403,.9403,.8717,.8717,.8717,.8717,1.00527,1.01756,1.05356,1.05356,1.05356,1.05356,1.05356,1.24644,.95923,1.01756,1.01756,1.01756,1.01756,.96777,1.05707,.96777,.96706,.91484,.96706,.91484,.96706,.91484,.85734,.92383,.85734,.92383,.85734,.92383,.85734,.92383,.97093,1.0969,.97093,1.05882,.75842,.9403,.75842,.9403,.75842,.9403,.75842,.9403,.75842,.9403,.88198,1.05882,.88198,1.05882,.88198,1.05882,1,1,.9831,1.01756,.9831,1.01756,.95782,.8717,.95782,.8717,.95782,.8717,.95782,1.09011,.95782,.8717,.84784,1.11551,.71387,1.09011,1,1,.99414,.84636,1.09011,1,1,.84636,1.0536,.84636,.94298,.84636,1.23297,1.03584,1.01756,1,1,1.03584,1.01756,1.00323,1.03444,1.01756,.96924,1.05356,.96924,1.05356,.96924,1.05356,.93066,.98293,.82826,1.04399,1,1,.82826,1.04399,.79649,.84863,.79649,.84863,.79649,.84863,.79649,.84863,1,1,.85771,1.17318,.85771,1.21968,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.98965,1.00068,.8287,.96777,.8287,.93365,.9043,.93365,.9043,.93365,.9043,1.08571,.96927,.96706,.91484,.86035,.93575,.96924,.95923,1,1,.85771,1.21968,1.11437,1.11437,.93109,.91202,.60411,.84164,.55572,1.01173,.97361,.81818,.81818,.96635,.78032,.72727,.92366,.98601,1.03405,.77968,1.09799,1.2,.96706,.85944,.85638,.96491,.75842,.93365,.9831,.96924,.95782,.86969,.94152,1.07796,1.03584,.78437,.96924,.98715,.83968,.83491,.85771,.8287,.94492,.88433,.9287,1.0098,.95782,.8287,1.0625,.98248,1.03424,1.2,1.01071,1.0625,.95246,1.03809,1.04912,.98248,1.00221,1.03424,1.05443,1.2,1.04785,.99609,1.00169,1.05176,.99346,1.05356,.9087,1.03004,.95542,.93117,1.23362,1.01071,1.07831,1.02512,1.05205,1.03502,1.2,1.01071,1.05356,1.01071,1.03502,.75842,1,1,1,1,1,1,1,1,1,1,1,1,1.03719,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.9403,1,1,1,1,1,1,1,1,1,1,1,1,1.04021,1,1,1,1,1,1,.98965,1.00068,.98965,1.00068,.98965,1.00068,.8287,.96777,1,1.20088,.89903,1,1,.75155,1.03077,1.03077,1.03077,1.03077,1.13196,1.13196,1.13196,.67428,.67428,1.16039,.73291,1.20996,1.22135,1.06483,.94868,.94868,.95996,1.24633,1,1.07497,.87796,.96927,1.01518,.96927,1,1,1,.77295,1,1,1.10539,1.10539,1.11358,1.06967,.86279,.94434,.86279,.94434,.86182,1,1,1.083,1,.91578,.86507,1.1714,1.18416,1.14589,.69825,.97622,1.9697,1.24822,1.24822,1.17238,1.24822,1.24822,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18083,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.10938,1.10938,1,1,1,1.05425,1.09971,1.09971,1.09971,1,1,1,1,1,1,1,1,1,1,1],os={lineHeight:1.33008,lineGap:0},ls=getLookupTableFactory(function(e){e["MyriadPro-Regular"]=e["PdfJS-Fallback-Regular"]={name:"LiberationSans-Regular",factors:Qr,baseWidths:Xr,baseMapping:Wr,metrics:Zr};e["MyriadPro-Bold"]=e["PdfJS-Fallback-Bold"]={name:"LiberationSans-Bold",factors:Kr,baseWidths:Er,baseMapping:Nr,metrics:Vr};e["MyriadPro-It"]=e["MyriadPro-Italic"]=e["PdfJS-Fallback-Italic"]={name:"LiberationSans-Italic",factors:Yr,baseWidths:Lr,baseMapping:Ur,metrics:Jr};e["MyriadPro-BoldIt"]=e["MyriadPro-BoldItalic"]=e["PdfJS-Fallback-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:Gr,baseWidths:zr,baseMapping:_r,metrics:$r};e.ArialMT=e.Arial=e["Arial-Regular"]={name:"LiberationSans-Regular",baseWidths:Xr,baseMapping:Wr};e["Arial-BoldMT"]=e["Arial-Bold"]={name:"LiberationSans-Bold",baseWidths:Er,baseMapping:Nr};e["Arial-ItalicMT"]=e["Arial-Italic"]={name:"LiberationSans-Italic",baseWidths:Lr,baseMapping:Ur};e["Arial-BoldItalicMT"]=e["Arial-BoldItalic"]={name:"LiberationSans-BoldItalic",baseWidths:zr,baseMapping:_r};e["Calibri-Regular"]={name:"LiberationSans-Regular",factors:Cr,baseWidths:Xr,baseMapping:Wr,metrics:Ir};e["Calibri-Bold"]={name:"LiberationSans-Bold",factors:yr,baseWidths:Er,baseMapping:Nr,metrics:qr};e["Calibri-Italic"]={name:"LiberationSans-Italic",factors:xr,baseWidths:Lr,baseMapping:Ur,metrics:Ar};e["Calibri-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:vr,baseWidths:zr,baseMapping:_r,metrics:Sr};e["Segoeui-Regular"]={name:"LiberationSans-Regular",factors:is,baseWidths:Xr,baseMapping:Wr,metrics:os};e["Segoeui-Bold"]={name:"LiberationSans-Bold",factors:es,baseWidths:Er,baseMapping:Nr,metrics:ts};e["Segoeui-Italic"]={name:"LiberationSans-Italic",factors:rs,baseWidths:Lr,baseMapping:Ur,metrics:ss};e["Segoeui-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:ns,baseWidths:zr,baseMapping:_r,metrics:as};e["Helvetica-Regular"]=e.Helvetica={name:"LiberationSans-Regular",factors:Mr,baseWidths:Xr,baseMapping:Wr,metrics:Pr};e["Helvetica-Bold"]={name:"LiberationSans-Bold",factors:Fr,baseWidths:Er,baseMapping:Nr,metrics:Tr};e["Helvetica-Italic"]={name:"LiberationSans-Italic",factors:Hr,baseWidths:Lr,baseMapping:Ur,metrics:Dr};e["Helvetica-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:Or,baseWidths:zr,baseMapping:_r,metrics:Rr}});function getXfaFontName(e){const t=normalizeFontName(e);return ls()[t]}function getXfaFontDict(e){const t=function getXfaFontWidths(e){const t=getXfaFontName(e);if(!t)return null;const{baseWidths:n,baseMapping:a,factors:r}=t,s=r?n.map((e,t)=>e*r[t]):n;let i,o=-2;const l=[];for(const[e,t]of a.map((e,t)=>[e,t]).sort(([e],[t])=>e-t))if(-1!==e)if(e===o+1){i.push(s[t]);o+=1}else{o=e;i=[s[t]];l.push(e,i)}return l}(e),n=new Dict(null);n.set("BaseFont",Name.get(e));n.set("Type",Name.get("Font"));n.set("Subtype",Name.get("CIDFontType2"));n.set("Encoding",Name.get("Identity-H"));n.set("CIDToGIDMap",Name.get("Identity"));n.set("W",t);n.set("FirstChar",t[0]);n.set("LastChar",t.at(-2)+t.at(-1).length-1);const a=new Dict(null);n.set("FontDescriptor",a);const r=new Dict(null);r.set("Ordering","Identity");r.set("Registry","Adobe");r.set("Supplement",0);n.set("CIDSystemInfo",r);return n}class PostScriptParser{constructor(e){this.lexer=e;this.operators=[];this.token=null;this.prev=null}nextToken(){this.prev=this.token;this.token=this.lexer.getToken()}accept(e){if(this.token.type===e){this.nextToken();return!0}return!1}expect(e){if(this.accept(e))return!0;throw new FormatError(`Unexpected symbol: found ${this.token.type} expected ${e}.`)}parse(){this.nextToken();this.expect(fs.LBRACE);this.parseBlock();this.expect(fs.RBRACE);return this.operators}parseBlock(){for(;;)if(this.accept(fs.NUMBER))this.operators.push(this.prev.value);else if(this.accept(fs.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(fs.LBRACE))return;this.parseCondition()}}parseCondition(){const e=this.operators.length;this.operators.push(null,null);this.parseBlock();this.expect(fs.RBRACE);if(this.accept(fs.IF)){this.operators[e]=this.operators.length;this.operators[e+1]="jz"}else{if(!this.accept(fs.LBRACE))throw new FormatError("PS Function: error parsing conditional.");{const t=this.operators.length;this.operators.push(null,null);const n=this.operators.length;this.parseBlock();this.expect(fs.RBRACE);this.expect(fs.IFELSE);this.operators[t]=this.operators.length;this.operators[t+1]="j";this.operators[e]=n;this.operators[e+1]="jz"}}}}const fs={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5};class PostScriptToken{static get opCache(){return shadow(this,"opCache",Object.create(null))}constructor(e,t){this.type=e;this.value=t}static getOperator(e){return PostScriptToken.opCache[e]||=new PostScriptToken(fs.OPERATOR,e)}static get LBRACE(){return shadow(this,"LBRACE",new PostScriptToken(fs.LBRACE,"{"))}static get RBRACE(){return shadow(this,"RBRACE",new PostScriptToken(fs.RBRACE,"}"))}static get IF(){return shadow(this,"IF",new PostScriptToken(fs.IF,"IF"))}static get IFELSE(){return shadow(this,"IFELSE",new PostScriptToken(fs.IFELSE,"IFELSE"))}}class PostScriptLexer{constructor(e){this.stream=e;this.nextChar();this.strBuf=[]}nextChar(){return this.currentChar=this.stream.getByte()}getToken(){let e=!1,t=this.currentChar;for(;;){if(t<0)return hn;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!isWhiteSpace(t))break;t=this.nextChar()}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return new PostScriptToken(fs.NUMBER,this.getNumber());case 123:this.nextChar();return PostScriptToken.LBRACE;case 125:this.nextChar();return PostScriptToken.RBRACE}const n=this.strBuf;n.length=0;n[0]=String.fromCharCode(t);for(;(t=this.nextChar())>=0&&(t>=65&&t<=90||t>=97&&t<=122);)n.push(String.fromCharCode(t));const a=n.join("");switch(a.toLowerCase()){case"if":return PostScriptToken.IF;case"ifelse":return PostScriptToken.IFELSE;default:return PostScriptToken.getOperator(a)}}getNumber(){let e=this.currentChar;const t=this.strBuf;t.length=0;t[0]=String.fromCharCode(e);for(;(e=this.nextChar())>=0&&(e>=48&&e<=57||45===e||46===e);)t.push(String.fromCharCode(e));const n=parseFloat(t.join(""));if(isNaN(n))throw new FormatError(`Invalid floating point number: ${n}`);return n}}class BaseLocalCache{constructor(e){this._onlyRefs=!0===e?.onlyRefs;if(!this._onlyRefs){this._nameRefMap=new Map;this._imageMap=new Map}this._imageCache=new RefSetCache}getByName(e){this._onlyRefs&&unreachable("Should not call `getByName` method.");const t=this._nameRefMap.get(e);return t?this.getByRef(t):this._imageMap.get(e)||null}getByRef(e){return this._imageCache.get(e)||null}set(e,t,n){unreachable("Abstract method `set` called.")}}class LocalImageCache extends BaseLocalCache{set(e,t=null,n){if("string"!=typeof e)throw new Error('LocalImageCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;this._nameRefMap.set(e,t);this._imageCache.put(t,n)}else this._imageMap.has(e)||this._imageMap.set(e,n)}}class LocalColorSpaceCache extends BaseLocalCache{set(e=null,t=null,n){if("string"!=typeof e&&!t)throw new Error('LocalColorSpaceCache.set - expected "name" and/or "ref" argument.');if(t){if(this._imageCache.has(t))return;null!==e&&this._nameRefMap.set(e,t);this._imageCache.put(t,n)}else this._imageMap.has(e)||this._imageMap.set(e,n)}}class LocalFunctionCache extends BaseLocalCache{constructor(e){super({onlyRefs:!0})}set(e=null,t,n){if(!t)throw new Error('LocalFunctionCache.set - expected "ref" argument.');this._imageCache.has(t)||this._imageCache.put(t,n)}}class LocalGStateCache extends BaseLocalCache{set(e,t=null,n){if("string"!=typeof e)throw new Error('LocalGStateCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;this._nameRefMap.set(e,t);this._imageCache.put(t,n)}else this._imageMap.has(e)||this._imageMap.set(e,n)}}class LocalTilingPatternCache extends BaseLocalCache{constructor(e){super({onlyRefs:!0})}set(e=null,t,n){if(!t)throw new Error('LocalTilingPatternCache.set - expected "ref" argument.');this._imageCache.has(t)||this._imageCache.put(t,n)}}class RegionalImageCache extends BaseLocalCache{constructor(e){super({onlyRefs:!0})}set(e=null,t,n){if(!t)throw new Error('RegionalImageCache.set - expected "ref" argument.');this._imageCache.has(t)||this._imageCache.put(t,n)}}class GlobalColorSpaceCache extends BaseLocalCache{constructor(e){super({onlyRefs:!0})}set(e=null,t,n){if(!t)throw new Error('GlobalColorSpaceCache.set - expected "ref" argument.');this._imageCache.has(t)||this._imageCache.put(t,n)}clear(){this._imageCache.clear()}}class GlobalImageCache{static NUM_PAGES_THRESHOLD=2;static MIN_IMAGES_TO_CACHE=10;static MAX_BYTE_SIZE=5e7;#le=new RefSet;constructor(){this._refCache=new RefSetCache;this._imageCache=new RefSetCache}get#fe(){let e=0;for(const t of this._imageCache)e+=t.byteSize;return e}get#ce(){return!(this._imageCache.size<GlobalImageCache.MIN_IMAGES_TO_CACHE)&&!(this.#fe<GlobalImageCache.MAX_BYTE_SIZE)}shouldCache(e,t){let n=this._refCache.get(e);if(!n){n=new Set;this._refCache.put(e,n)}n.add(t);return!(n.size<GlobalImageCache.NUM_PAGES_THRESHOLD)&&!(!this._imageCache.has(e)&&this.#ce)}addDecodeFailed(e){this.#le.put(e)}hasDecodeFailed(e){return this.#le.has(e)}addByteSize(e,t){const n=this._imageCache.get(e);n&&(n.byteSize||(n.byteSize=t))}getData(e,t){const n=this._refCache.get(e);if(!n)return null;if(n.size<GlobalImageCache.NUM_PAGES_THRESHOLD)return null;const a=this._imageCache.get(e);if(!a)return null;n.add(t);return a}setData(e,t){if(!this._refCache.has(e))throw new Error('GlobalImageCache.setData - expected "shouldCache" to have been called.');this._imageCache.has(e)||(this.#ce?warn("GlobalImageCache.setData - cache limit reached."):this._imageCache.put(e,t))}clear(e=!1){if(!e){this.#le.clear();this._refCache.clear()}this._imageCache.clear()}}class PDFFunctionFactory{constructor({xref:e,isEvalSupported:t=!0}){this.xref=e;this.isEvalSupported=!1!==t}create(e,t=!1){let n,a;e instanceof Ref?n=e:e instanceof Dict?n=e.objId:e instanceof BaseStream&&(n=e.dict?.objId);if(n){const e=this._localFunctionCache.getByRef(n);if(e)return e}const r=this.xref.fetchIfRef(e);if(Array.isArray(r)){if(!t)throw new Error('PDFFunctionFactory.create - expected "parseArray" argument.');a=PDFFunction.parseArray(this,r)}else a=PDFFunction.parse(this,r);n&&this._localFunctionCache.set(null,n,a);return a}get _localFunctionCache(){return shadow(this,"_localFunctionCache",new LocalFunctionCache)}}function toNumberArray(e){return Array.isArray(e)?isNumberArray(e,null)?e:e.map(e=>+e):null}class PDFFunction{static getSampleArray(e,t,n,a){let r=t;for(const t of e)r*=t;const s=new Array(r);let i=0,o=0;const l=1/(2**n-1),f=a.getBytes((r*n+7)/8);let c=0;for(let e=0;e<r;e++){for(;i<n;){o<<=8;o|=f[c++];i+=8}i-=n;s[e]=(o>>i)*l;o&=(1<<i)-1}return s}static parse(e,t){const n=t.dict||t;switch(n.get("FunctionType")){case 0:return this.constructSampled(e,t,n);case 1:break;case 2:return this.constructInterpolated(e,n);case 3:return this.constructStiched(e,n);case 4:return this.constructPostScript(e,t,n)}throw new FormatError("Unknown type of function")}static parseArray(e,t){const{xref:n}=e,a=[];for(const r of t)a.push(this.parse(e,n.fetchIfRef(r)));return function(e,t,n,r){for(let s=0,i=a.length;s<i;s++)a[s](e,t,n,r+s)}}static constructSampled(e,t,n){function toMultiArray(e){const t=e.length,n=[];let a=0;for(let r=0;r<t;r+=2)n[a++]=[e[r],e[r+1]];return n}function interpolate(e,t,n,a,r){return a+(r-a)/(n-t)*(e-t)}let a=toNumberArray(n.getArray("Domain")),r=toNumberArray(n.getArray("Range"));if(!a||!r)throw new FormatError("No domain or range");const s=a.length/2,i=r.length/2;a=toMultiArray(a);r=toMultiArray(r);const o=toNumberArray(n.getArray("Size")),l=n.get("BitsPerSample"),f=n.get("Order")||1;1!==f&&info("No support for cubic spline interpolation: "+f);let c=toNumberArray(n.getArray("Encode"));if(c)c=toMultiArray(c);else{c=[];for(let e=0;e<s;++e)c.push([0,o[e]-1])}let h=toNumberArray(n.getArray("Decode"));h=h?toMultiArray(h):r;const u=this.getSampleArray(o,i,l,t);return function constructSampledFn(e,t,n,l){const f=1<<s,m=new Float64Array(f).fill(1),p=new Uint32Array(f);let d,g,b=i,w=1;for(d=0;d<s;++d){const n=a[d][0],r=a[d][1];let s=interpolate(MathClamp(e[t+d],n,r),n,r,c[d][0],c[d][1]);const i=o[d];s=MathClamp(s,0,i-1);const l=s<i-1?Math.floor(s):s-1,h=l+1-s,u=s-l,j=l*b,k=j+b;for(g=0;g<f;g++)if(g&w){m[g]*=u;p[g]+=k}else{m[g]*=h;p[g]+=j}b*=i;w<<=1}for(g=0;g<i;++g){let e=0;for(d=0;d<f;d++)e+=u[p[d]+g]*m[d];e=interpolate(e,0,1,h[g][0],h[g][1]);n[l+g]=MathClamp(e,r[g][0],r[g][1])}}}static constructInterpolated(e,t){const n=toNumberArray(t.getArray("C0"))||[0],a=toNumberArray(t.getArray("C1"))||[1],r=t.get("N"),s=[];for(let e=0,t=n.length;e<t;++e)s.push(a[e]-n[e]);const i=s.length;return function constructInterpolatedFn(e,t,a,o){const l=1===r?e[t]:e[t]**r;for(let e=0;e<i;++e)a[o+e]=n[e]+l*s[e]}}static constructStiched(e,t){const n=toNumberArray(t.getArray("Domain"));if(!n)throw new FormatError("No domain");if(1!==n.length/2)throw new FormatError("Bad domain for stiched function");const{xref:a}=e,r=[];for(const n of t.get("Functions"))r.push(this.parse(e,a.fetchIfRef(n)));const s=toNumberArray(t.getArray("Bounds")),i=toNumberArray(t.getArray("Encode")),o=new Float32Array(1);return function constructStichedFn(e,t,a,l){const f=MathClamp(e[t],n[0],n[1]),c=s.length;let h;for(h=0;h<c&&!(f<s[h]);++h);const u=h>0?s[h-1]:n[0],m=h<c?s[h]:n[1],p=i[2*h],d=i[2*h+1];o[0]=u===m?p:p+(f-u)*(d-p)/(m-u);r[h](o,0,a,l)}}static constructPostScript(e,t,n){const a=toNumberArray(n.getArray("Domain")),r=toNumberArray(n.getArray("Range"));if(!a)throw new FormatError("No domain.");if(!r)throw new FormatError("No range.");const s=new PostScriptLexer(t),i=new PostScriptParser(s).parse();if(e.isEvalSupported&&FeatureTest.isEvalSupported){const e=(new PostScriptCompiler).compile(i,a,r);if(e)return new Function("src","srcOffset","dest","destOffset",e)}info("Unable to compile PS function");const o=r.length>>1,l=a.length>>1,f=new PostScriptEvaluator(i),c=Object.create(null);let h=8192;const u=new Float32Array(l);return function constructPostScriptFn(e,t,n,a){let s,i,m="";const p=u;for(s=0;s<l;s++){i=e[t+s];p[s]=i;m+=i+"_"}const d=c[m];if(void 0!==d){n.set(d,a);return}const g=new Float32Array(o),b=f.execute(p),w=b.length-o;for(s=0;s<o;s++)g[s]=MathClamp(b[w+s],r[2*s],r[2*s+1]);if(h>0){h--;c[m]=g}n.set(g,a)}}}function isPDFFunction(e){let t;if(e instanceof Dict)t=e;else{if(!(e instanceof BaseStream))return!1;t=e.dict}return t.has("FunctionType")}class PostScriptStack{static MAX_STACK_SIZE=100;constructor(e){this.stack=e?Array.from(e):[]}push(e){if(this.stack.length>=PostScriptStack.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");this.stack.push(e)}pop(){if(this.stack.length<=0)throw new Error("PostScript function stack underflow.");return this.stack.pop()}copy(e){if(this.stack.length+e>=PostScriptStack.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");const t=this.stack;for(let n=t.length-e,a=e-1;a>=0;a--,n++)t.push(t[n])}index(e){this.push(this.stack[this.stack.length-e-1])}roll(e,t){const n=this.stack,a=n.length-e,r=n.length-1,s=a+(t-Math.floor(t/e)*e);for(let e=a,t=r;e<t;e++,t--){const a=n[e];n[e]=n[t];n[t]=a}for(let e=a,t=s-1;e<t;e++,t--){const a=n[e];n[e]=n[t];n[t]=a}for(let e=s,t=r;e<t;e++,t--){const a=n[e];n[e]=n[t];n[t]=a}}}class PostScriptEvaluator{constructor(e){this.operators=e}execute(e){const t=new PostScriptStack(e);let n=0;const a=this.operators,r=a.length;let s,i,o;for(;n<r;){s=a[n++];if("number"!=typeof s)switch(s){case"jz":o=t.pop();i=t.pop();i||(n=o);break;case"j":i=t.pop();n=i;break;case"abs":i=t.pop();t.push(Math.abs(i));break;case"add":o=t.pop();i=t.pop();t.push(i+o);break;case"and":o=t.pop();i=t.pop();"boolean"==typeof i&&"boolean"==typeof o?t.push(i&&o):t.push(i&o);break;case"atan":o=t.pop();i=t.pop();i=Math.atan2(i,o)/Math.PI*180;i<0&&(i+=360);t.push(i);break;case"bitshift":o=t.pop();i=t.pop();i>0?t.push(i<<o):t.push(i>>o);break;case"ceiling":i=t.pop();t.push(Math.ceil(i));break;case"copy":i=t.pop();t.copy(i);break;case"cos":i=t.pop();t.push(Math.cos(i%360/180*Math.PI));break;case"cvi":i=0|t.pop();t.push(i);break;case"cvr":break;case"div":o=t.pop();i=t.pop();t.push(i/o);break;case"dup":t.copy(1);break;case"eq":o=t.pop();i=t.pop();t.push(i===o);break;case"exch":t.roll(2,1);break;case"exp":o=t.pop();i=t.pop();t.push(i**o);break;case"false":t.push(!1);break;case"floor":i=t.pop();t.push(Math.floor(i));break;case"ge":o=t.pop();i=t.pop();t.push(i>=o);break;case"gt":o=t.pop();i=t.pop();t.push(i>o);break;case"idiv":o=t.pop();i=t.pop();t.push(i/o|0);break;case"index":i=t.pop();t.index(i);break;case"le":o=t.pop();i=t.pop();t.push(i<=o);break;case"ln":i=t.pop();t.push(Math.log(i));break;case"log":i=t.pop();t.push(Math.log10(i));break;case"lt":o=t.pop();i=t.pop();t.push(i<o);break;case"mod":o=t.pop();i=t.pop();t.push(i%o);break;case"mul":o=t.pop();i=t.pop();t.push(i*o);break;case"ne":o=t.pop();i=t.pop();t.push(i!==o);break;case"neg":i=t.pop();t.push(-i);break;case"not":i=t.pop();"boolean"==typeof i?t.push(!i):t.push(~i);break;case"or":o=t.pop();i=t.pop();"boolean"==typeof i&&"boolean"==typeof o?t.push(i||o):t.push(i|o);break;case"pop":t.pop();break;case"roll":o=t.pop();i=t.pop();t.roll(i,o);break;case"round":i=t.pop();t.push(Math.round(i));break;case"sin":i=t.pop();t.push(Math.sin(i%360/180*Math.PI));break;case"sqrt":i=t.pop();t.push(Math.sqrt(i));break;case"sub":o=t.pop();i=t.pop();t.push(i-o);break;case"true":t.push(!0);break;case"truncate":i=t.pop();i=i<0?Math.ceil(i):Math.floor(i);t.push(i);break;case"xor":o=t.pop();i=t.pop();"boolean"==typeof i&&"boolean"==typeof o?t.push(i!==o):t.push(i^o);break;default:throw new FormatError(`Unknown operator ${s}`)}else t.push(s)}return t.stack}}class AstNode{constructor(e){this.type=e}visit(e){unreachable("abstract method")}}class AstArgument extends AstNode{constructor(e,t,n){super("args");this.index=e;this.min=t;this.max=n}visit(e){e.visitArgument(this)}}class AstLiteral extends AstNode{constructor(e){super("literal");this.number=e;this.min=e;this.max=e}visit(e){e.visitLiteral(this)}}class AstBinaryOperation extends AstNode{constructor(e,t,n,a,r){super("binary");this.op=e;this.arg1=t;this.arg2=n;this.min=a;this.max=r}visit(e){e.visitBinaryOperation(this)}}class AstMin extends AstNode{constructor(e,t){super("max");this.arg=e;this.min=e.min;this.max=t}visit(e){e.visitMin(this)}}class AstVariable extends AstNode{constructor(e,t,n){super("var");this.index=e;this.min=t;this.max=n}visit(e){e.visitVariable(this)}}class AstVariableDefinition extends AstNode{constructor(e,t){super("definition");this.variable=e;this.arg=t}visit(e){e.visitVariableDefinition(this)}}class ExpressionBuilderVisitor{parts=[];visitArgument(e){this.parts.push("Math.max(",e.min,", Math.min(",e.max,", src[srcOffset + ",e.index,"]))")}visitVariable(e){this.parts.push("v",e.index)}visitLiteral(e){this.parts.push(e.number)}visitBinaryOperation(e){this.parts.push("(");e.arg1.visit(this);this.parts.push(" ",e.op," ");e.arg2.visit(this);this.parts.push(")")}visitVariableDefinition(e){this.parts.push("var ");e.variable.visit(this);this.parts.push(" = ");e.arg.visit(this);this.parts.push(";")}visitMin(e){this.parts.push("Math.min(");e.arg.visit(this);this.parts.push(", ",e.max,")")}toString(){return this.parts.join("")}}function buildAddOperation(e,t){return"literal"===t.type&&0===t.number?e:"literal"===e.type&&0===e.number?t:"literal"===t.type&&"literal"===e.type?new AstLiteral(e.number+t.number):new AstBinaryOperation("+",e,t,e.min+t.min,e.max+t.max)}function buildMulOperation(e,t){if("literal"===t.type){if(0===t.number)return new AstLiteral(0);if(1===t.number)return e;if("literal"===e.type)return new AstLiteral(e.number*t.number)}if("literal"===e.type){if(0===e.number)return new AstLiteral(0);if(1===e.number)return t}const n=Math.min(e.min*t.min,e.min*t.max,e.max*t.min,e.max*t.max),a=Math.max(e.min*t.min,e.min*t.max,e.max*t.min,e.max*t.max);return new AstBinaryOperation("*",e,t,n,a)}function buildSubOperation(e,t){if("literal"===t.type){if(0===t.number)return e;if("literal"===e.type)return new AstLiteral(e.number-t.number)}return"binary"===t.type&&"-"===t.op&&"literal"===e.type&&1===e.number&&"literal"===t.arg1.type&&1===t.arg1.number?t.arg2:new AstBinaryOperation("-",e,t,e.min-t.max,e.max-t.min)}function buildMinOperation(e,t){return e.min>=t?new AstLiteral(t):e.max<=t?e:new AstMin(e,t)}class PostScriptCompiler{compile(e,t,n){const a=[],r=[],s=t.length>>1,i=n.length>>1;let o,l,f,c,h,u,m,p,d=0;for(let e=0;e<s;e++)a.push(new AstArgument(e,t[2*e],t[2*e+1]));for(let t=0,n=e.length;t<n;t++){p=e[t];if("number"!=typeof p)switch(p){case"add":if(a.length<2)return null;c=a.pop();f=a.pop();a.push(buildAddOperation(f,c));break;case"cvr":if(a.length<1)return null;break;case"mul":if(a.length<2)return null;c=a.pop();f=a.pop();a.push(buildMulOperation(f,c));break;case"sub":if(a.length<2)return null;c=a.pop();f=a.pop();a.push(buildSubOperation(f,c));break;case"exch":if(a.length<2)return null;h=a.pop();u=a.pop();a.push(h,u);break;case"pop":if(a.length<1)return null;a.pop();break;case"index":if(a.length<1)return null;f=a.pop();if("literal"!==f.type)return null;o=f.number;if(o<0||!Number.isInteger(o)||a.length<o)return null;h=a[a.length-o-1];if("literal"===h.type||"var"===h.type){a.push(h);break}m=new AstVariable(d++,h.min,h.max);a[a.length-o-1]=m;a.push(m);r.push(new AstVariableDefinition(m,h));break;case"dup":if(a.length<1)return null;if("number"==typeof e[t+1]&&"gt"===e[t+2]&&e[t+3]===t+7&&"jz"===e[t+4]&&"pop"===e[t+5]&&e[t+6]===e[t+1]){f=a.pop();a.push(buildMinOperation(f,e[t+1]));t+=6;break}h=a.at(-1);if("literal"===h.type||"var"===h.type){a.push(h);break}m=new AstVariable(d++,h.min,h.max);a[a.length-1]=m;a.push(m);r.push(new AstVariableDefinition(m,h));break;case"roll":if(a.length<2)return null;c=a.pop();f=a.pop();if("literal"!==c.type||"literal"!==f.type)return null;l=c.number;o=f.number;if(o<=0||!Number.isInteger(o)||!Number.isInteger(l)||a.length<o)return null;l=(l%o+o)%o;if(0===l)break;a.push(...a.splice(a.length-o,o-l));break;default:return null}else a.push(new AstLiteral(p))}if(a.length!==i)return null;const g=[];for(const e of r){const t=new ExpressionBuilderVisitor;e.visit(t);g.push(t.toString())}for(let e=0,t=a.length;e<t;e++){const t=a[e],r=new ExpressionBuilderVisitor;t.visit(r);const s=n[2*e],i=n[2*e+1],o=[r.toString()];if(s>t.min){o.unshift("Math.max(",s,", ");o.push(")")}if(i<t.max){o.unshift("Math.min(",i,", ");o.push(")")}o.unshift("dest[destOffset + ",e,"] = ");o.push(";");g.push(o.join(""))}return g.join("\n")}}const cs=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],hs=["AN","AN","AN","AN","AN","AN","ON","ON","AL","ET","ET","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL"];function isOdd(e){return!!(1&e)}function isEven(e){return!(1&e)}function findUnequal(e,t,n){let a,r;for(a=t,r=e.length;a<r;++a)if(e[a]!==n)return a;return a}function reverseValues(e,t,n){for(let a=t,r=n-1;a<r;++a,--r){const t=e[a];e[a]=e[r];e[r]=t}}function createBidiText(e,t,n=!1){let a="ltr";n?a="ttb":t||(a="rtl");return{str:e,dir:a}}const us=[],ms=[];function bidi(e,t=-1,n=!1){let a=!0;const r=e.length;if(0===r||n)return createBidiText(e,a,n);us.length=r;ms.length=r;let s,i,o=0;for(s=0;s<r;++s){us[s]=e.charAt(s);const t=e.charCodeAt(s);let n="L";if(t<=255)n=cs[t];else if(1424<=t&&t<=1524)n="R";else if(1536<=t&&t<=1791){n=hs[255&t];n||warn("Bidi: invalid Unicode character "+t.toString(16))}else(1792<=t&&t<=2220||64336<=t&&t<=65023||65136<=t&&t<=65279)&&(n="AL");"R"!==n&&"AL"!==n&&"AN"!==n||o++;ms[s]=n}if(0===o){a=!0;return createBidiText(e,a)}if(-1===t)if(o/r<.3&&r>4){a=!0;t=0}else{a=!1;t=1}const l=[];for(s=0;s<r;++s)l[s]=t;const f=isOdd(t)?"R":"L",c=f,h=c;let u,m=c;for(s=0;s<r;++s)"NSM"===ms[s]?ms[s]=m:m=ms[s];m=c;for(s=0;s<r;++s){u=ms[s];"EN"===u?ms[s]="AL"===m?"AN":"EN":"R"!==u&&"L"!==u&&"AL"!==u||(m=u)}for(s=0;s<r;++s){u=ms[s];"AL"===u&&(ms[s]="R")}for(s=1;s<r-1;++s){"ES"===ms[s]&&"EN"===ms[s-1]&&"EN"===ms[s+1]&&(ms[s]="EN");"CS"!==ms[s]||"EN"!==ms[s-1]&&"AN"!==ms[s-1]||ms[s+1]!==ms[s-1]||(ms[s]=ms[s-1])}for(s=0;s<r;++s)if("EN"===ms[s]){for(let e=s-1;e>=0&&"ET"===ms[e];--e)ms[e]="EN";for(let e=s+1;e<r&&"ET"===ms[e];++e)ms[e]="EN"}for(s=0;s<r;++s){u=ms[s];"WS"!==u&&"ES"!==u&&"ET"!==u&&"CS"!==u||(ms[s]="ON")}m=c;for(s=0;s<r;++s){u=ms[s];"EN"===u?ms[s]="L"===m?"L":"EN":"R"!==u&&"L"!==u||(m=u)}for(s=0;s<r;++s)if("ON"===ms[s]){const e=findUnequal(ms,s+1,"ON");let t=c;s>0&&(t=ms[s-1]);let n=h;e+1<r&&(n=ms[e+1]);"L"!==t&&(t="R");"L"!==n&&(n="R");t===n&&ms.fill(t,s,e);s=e-1}for(s=0;s<r;++s)"ON"===ms[s]&&(ms[s]=f);for(s=0;s<r;++s){u=ms[s];isEven(l[s])?"R"===u?l[s]+=1:"AN"!==u&&"EN"!==u||(l[s]+=2):"L"!==u&&"AN"!==u&&"EN"!==u||(l[s]+=1)}let p,d=-1,g=99;for(s=0,i=l.length;s<i;++s){p=l[s];d<p&&(d=p);g>p&&isOdd(p)&&(g=p)}for(p=d;p>=g;--p){let e=-1;for(s=0,i=l.length;s<i;++s)if(l[s]<p){if(e>=0){reverseValues(us,e,s);e=-1}}else e<0&&(e=s);e>=0&&reverseValues(us,e,l.length)}for(s=0,i=us.length;s<i;++s){const e=us[s];"<"!==e&&">"!==e||(us[s]="")}return createBidiText(us.join(""),a)}const ps={style:"normal",weight:"normal"},ds={style:"normal",weight:"bold"},gs={style:"italic",weight:"normal"},bs={style:"italic",weight:"bold"},ws=new Map([["Times-Roman",{local:["Times New Roman","Times-Roman","Times","Liberation Serif","Nimbus Roman","Nimbus Roman L","Tinos","Thorndale","TeX Gyre Termes","FreeSerif","Linux Libertine O","Libertinus Serif","PT Astra Serif","DejaVu Serif","Bitstream Vera Serif","Ubuntu"],style:ps,ultimate:"serif"}],["Times-Bold",{alias:"Times-Roman",style:ds,ultimate:"serif"}],["Times-Italic",{alias:"Times-Roman",style:gs,ultimate:"serif"}],["Times-BoldItalic",{alias:"Times-Roman",style:bs,ultimate:"serif"}],["Helvetica",{local:["Helvetica","Helvetica Neue","Arial","Arial Nova","Liberation Sans","Arimo","Nimbus Sans","Nimbus Sans L","A030","TeX Gyre Heros","FreeSans","DejaVu Sans","Albany","Bitstream Vera Sans","Arial Unicode MS","Microsoft Sans Serif","Apple Symbols","Cantarell"],path:"LiberationSans-Regular.ttf",style:ps,ultimate:"sans-serif"}],["Helvetica-Bold",{alias:"Helvetica",path:"LiberationSans-Bold.ttf",style:ds,ultimate:"sans-serif"}],["Helvetica-Oblique",{alias:"Helvetica",path:"LiberationSans-Italic.ttf",style:gs,ultimate:"sans-serif"}],["Helvetica-BoldOblique",{alias:"Helvetica",path:"LiberationSans-BoldItalic.ttf",style:bs,ultimate:"sans-serif"}],["Courier",{local:["Courier","Courier New","Liberation Mono","Nimbus Mono","Nimbus Mono L","Cousine","Cumberland","TeX Gyre Cursor","FreeMono","Linux Libertine Mono O","Libertinus Mono"],style:ps,ultimate:"monospace"}],["Courier-Bold",{alias:"Courier",style:ds,ultimate:"monospace"}],["Courier-Oblique",{alias:"Courier",style:gs,ultimate:"monospace"}],["Courier-BoldOblique",{alias:"Courier",style:bs,ultimate:"monospace"}],["ArialBlack",{local:["Arial Black"],style:{style:"normal",weight:"900"},fallback:"Helvetica-Bold"}],["ArialBlack-Bold",{alias:"ArialBlack"}],["ArialBlack-Italic",{alias:"ArialBlack",style:{style:"italic",weight:"900"},fallback:"Helvetica-BoldOblique"}],["ArialBlack-BoldItalic",{alias:"ArialBlack-Italic"}],["ArialNarrow",{local:["Arial Narrow","Liberation Sans Narrow","Helvetica Condensed","Nimbus Sans Narrow","TeX Gyre Heros Cn"],style:ps,fallback:"Helvetica"}],["ArialNarrow-Bold",{alias:"ArialNarrow",style:ds,fallback:"Helvetica-Bold"}],["ArialNarrow-Italic",{alias:"ArialNarrow",style:gs,fallback:"Helvetica-Oblique"}],["ArialNarrow-BoldItalic",{alias:"ArialNarrow",style:bs,fallback:"Helvetica-BoldOblique"}],["Calibri",{local:["Calibri","Carlito"],style:ps,fallback:"Helvetica"}],["Calibri-Bold",{alias:"Calibri",style:ds,fallback:"Helvetica-Bold"}],["Calibri-Italic",{alias:"Calibri",style:gs,fallback:"Helvetica-Oblique"}],["Calibri-BoldItalic",{alias:"Calibri",style:bs,fallback:"Helvetica-BoldOblique"}],["Wingdings",{local:["Wingdings","URW Dingbats"],style:ps}],["Wingdings-Regular",{alias:"Wingdings"}],["Wingdings-Bold",{alias:"Wingdings"}],["ËÎÌå",{local:["SimSun","SimSun Regular","NSimSun"],style:ps,ultimate:"serif"}],["ºÚÌå",{local:["SimHei","SimHei Regular"],style:ps,ultimate:"sans-serif"}],["¿¬Ìå",{local:["KaiTi","SimKai","SimKai Regular"],style:ps,ultimate:"sans-serif"}],["·ÂËÎ",{local:["FangSong","SimFang","SimFang Regular"],style:ps,ultimate:"serif"}],["¿¬Ìå_GB2312",{alias:"¿¬Ìå"}],["·ÂËÎ_GB2312",{alias:"·ÂËÎ"}],["Á¥Êé",{local:["SimLi","SimLi Regular"],style:ps,ultimate:"serif"}],["ÐÂËÎ",{alias:"ËÎÌå"}]]),js=new Map([["Arial-Black","ArialBlack"]]);function getFamilyName(e){const t=new Set(["thin","extralight","ultralight","demilight","semilight","light","book","regular","normal","medium","demibold","semibold","bold","extrabold","ultrabold","black","heavy","extrablack","ultrablack","roman","italic","oblique","ultracondensed","extracondensed","condensed","semicondensed","normal","semiexpanded","expanded","extraexpanded","ultraexpanded","bolditalic"]);return e.split(/[- ,+]+/g).filter(e=>!t.has(e.toLowerCase())).join(" ")}function generateFont({alias:e,local:t,path:n,fallback:a,style:r,ultimate:s},i,o,l=!0,f=!0,c=""){const h={style:null,ultimate:null};if(t){const e=c?` ${c}`:"";for(const n of t)i.push(`local(${n}${e})`)}if(e){const t=ws.get(e),s=c||function getStyleToAppend(e){switch(e){case ds:return"Bold";case gs:return"Italic";case bs:return"Bold Italic";default:if("bold"===e?.weight)return"Bold";if("italic"===e?.style)return"Italic"}return""}(r);Object.assign(h,generateFont(t,i,o,l&&!a,f&&!n,s))}r&&(h.style=r);s&&(h.ultimate=s);if(l&&a){const e=ws.get(a),{ultimate:t}=generateFont(e,i,o,l,f&&!n,c);h.ultimate||=t}f&&n&&o&&i.push(`url(${o}${n})`);return h}function getFontSubstitution(e,t,n,a,r,s){if(a.startsWith("InvalidPDFjsFont_"))return null;"TrueType"!==s&&"Type1"!==s||!/^[A-Z]{6}\+/.test(a)||(a=a.slice(7));const i=a=normalizeFontName(a);let o=e.get(i);if(o)return o;let l=ws.get(a);if(!l)for(const[e,t]of js)if(a.startsWith(e)){a=`${t}${a.substring(e.length)}`;l=ws.get(a);break}let f=!1;if(!l){l=ws.get(r);f=!0}const c=`${t.getDocId()}_s${t.createFontId()}`;if(!l){if(!validateFontName(a)){warn(`Cannot substitute the font because of its name: ${a}`);e.set(i,null);return null}const t=/bold/gi.test(a),n=/oblique|italic/gi.test(a),r=t&&n&&bs||t&&ds||n&&gs||ps;o={css:`"${getFamilyName(a)}",${c}`,guessFallback:!0,loadedName:c,baseFontName:a,src:`local(${a})`,style:r};e.set(i,o);return o}const h=[];f&&validateFontName(a)&&h.push(`local(${a})`);const{style:u,ultimate:m}=generateFont(l,h,n),p=null===m,d=p?"":`,${m}`;o={css:`"${getFamilyName(a)}",${c}${d}`,guessFallback:p,loadedName:c,baseFontName:a,src:h.join(","),style:u};e.set(i,o);return o}const ks=3285377520,ys=4294901760,qs=65535;class MurmurHash3_64{constructor(e){this.h1=e?4294967295&e:ks;this.h2=e?4294967295&e:ks}update(e){let t,n;if("string"==typeof e){t=new Uint8Array(2*e.length);n=0;for(let a=0,r=e.length;a<r;a++){const r=e.charCodeAt(a);if(r<=255)t[n++]=r;else{t[n++]=r>>>8;t[n++]=255&r}}}else{if(!ArrayBuffer.isView(e))throw new Error("Invalid data format, must be a string or TypedArray.");t=e.slice();n=t.byteLength}const a=n>>2,r=n-4*a,s=new Uint32Array(t.buffer,0,a);let i=0,o=0,l=this.h1,f=this.h2;const c=3432918353,h=461845907,u=11601,m=13715;for(let e=0;e<a;e++)if(1&e){i=s[e];i=i*c&ys|i*u&qs;i=i<<15|i>>>17;i=i*h&ys|i*m&qs;l^=i;l=l<<13|l>>>19;l=5*l+3864292196}else{o=s[e];o=o*c&ys|o*u&qs;o=o<<15|o>>>17;o=o*h&ys|o*m&qs;f^=o;f=f<<13|f>>>19;f=5*f+3864292196}i=0;switch(r){case 3:i^=t[4*a+2]<<16;case 2:i^=t[4*a+1]<<8;case 1:i^=t[4*a];i=i*c&ys|i*u&qs;i=i<<15|i>>>17;i=i*h&ys|i*m&qs;1&a?l^=i:f^=i}this.h1=l;this.h2=f}hexdigest(){let e=this.h1,t=this.h2;e^=t>>>1;e=3981806797*e&ys|36045*e&qs;t=4283543511*t&ys|(2950163797*(t<<16|e>>>16)&ys)>>>16;e^=t>>>1;e=444984403*e&ys|60499*e&qs;t=3301882366*t&ys|(3120437893*(t<<16|e>>>16)&ys)>>>16;e^=t>>>1;return(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}function resizeImageMask(e,t,n,a,r,s){const i=r*s;let o;o=t<=8?new Uint8Array(i):t<=16?new Uint16Array(i):new Uint32Array(i);const l=n/r,f=a/s;let c,h,u,m,p=0;const d=new Uint16Array(r),g=n;for(c=0;c<r;c++)d[c]=Math.floor(c*l);for(c=0;c<s;c++){u=Math.floor(c*f)*g;for(h=0;h<r;h++){m=u+d[h];o[p++]=e[m]}}return o}class PDFImage{constructor({xref:e,res:t,image:n,isInline:a=!1,smask:r=null,mask:s=null,isMask:i=!1,pdfFunctionFactory:o,globalColorSpaceCache:l,localColorSpaceCache:f}){this.image=n;const c=n.dict,h=c.get("F","Filter");let u;if(h instanceof Name)u=h.name;else if(Array.isArray(h)){const t=e.fetchIfRef(h[0]);t instanceof Name&&(u=t.name)}switch(u){case"JPXDecode":({width:n.width,height:n.height,componentsCount:n.numComps,bitsPerComponent:n.bitsPerComponent}=JpxImage.parseImageProperties(n.stream));n.stream.reset();const e=ImageResizer.getReducePowerForJPX(n.width,n.height,n.numComps);this.jpxDecoderOptions={numComponents:0,isIndexedColormap:!1,smaskInData:c.has("SMaskInData"),reducePower:e};if(e){const t=2**e;n.width=Math.ceil(n.width/t);n.height=Math.ceil(n.height/t)}break;case"JBIG2Decode":n.bitsPerComponent=1;n.numComps=1}let m=c.get("W","Width"),p=c.get("H","Height");if(Number.isInteger(n.width)&&n.width>0&&Number.isInteger(n.height)&&n.height>0&&(n.width!==m||n.height!==p)){warn("PDFImage - using the Width/Height of the image data, rather than the image dictionary.");m=n.width;p=n.height}else{const e="number"==typeof m&&m>0,t="number"==typeof p&&p>0;if(!e||!t){if(!n.fallbackDims)throw new FormatError(`Invalid image width: ${m} or height: ${p}`);warn("PDFImage - using the Width/Height of the parent image, for SMask/Mask data.");e||(m=n.fallbackDims.width);t||(p=n.fallbackDims.height)}}this.width=m;this.height=p;this.interpolate=c.get("I","Interpolate");this.imageMask=c.get("IM","ImageMask")||!1;this.matte=c.get("Matte")||!1;let d=n.bitsPerComponent;if(!d){d=c.get("BPC","BitsPerComponent");if(!d){if(!this.imageMask)throw new FormatError(`Bits per component missing in image: ${this.imageMask}`);d=1}}this.bpc=d;if(!this.imageMask){let r=c.getRaw("CS")||c.getRaw("ColorSpace");const s=!!r;if(s)this.jpxDecoderOptions?.smaskInData&&(r=Name.get("DeviceRGBA"));else if(this.jpxDecoderOptions)r=Name.get("DeviceRGBA");else switch(n.numComps){case 1:r=Name.get("DeviceGray");break;case 3:r=Name.get("DeviceRGB");break;case 4:r=Name.get("DeviceCMYK");break;default:throw new Error(`Images with ${n.numComps} color components not supported.`)}this.colorSpace=ColorSpaceUtils.parse({cs:r,xref:e,resources:a?t:null,pdfFunctionFactory:o,globalColorSpaceCache:l,localColorSpaceCache:f});this.numComps=this.colorSpace.numComps;if(this.jpxDecoderOptions){this.jpxDecoderOptions.numComponents=s?this.numComps:0;this.jpxDecoderOptions.isIndexedColormap="Indexed"===this.colorSpace.name}}this.decode=c.getArray("D","Decode");this.needsDecode=!1;if(this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode,d)||i&&!ColorSpace.isDefaultDecode(this.decode,1))){this.needsDecode=!0;const e=(1<<d)-1;this.decodeCoefficients=[];this.decodeAddends=[];const t="Indexed"===this.colorSpace?.name;for(let n=0,a=0;n<this.decode.length;n+=2,++a){const r=this.decode[n],s=this.decode[n+1];this.decodeCoefficients[a]=t?(s-r)/e:s-r;this.decodeAddends[a]=t?r:e*r}}if(r){r.fallbackDims??={width:m,height:p};this.smask=new PDFImage({xref:e,res:t,image:r,isInline:a,pdfFunctionFactory:o,globalColorSpaceCache:l,localColorSpaceCache:f})}else if(s)if(s instanceof BaseStream){if(s.dict.get("IM","ImageMask")){s.fallbackDims??={width:m,height:p};this.mask=new PDFImage({xref:e,res:t,image:s,isInline:a,isMask:!0,pdfFunctionFactory:o,globalColorSpaceCache:l,localColorSpaceCache:f})}else warn("Ignoring /Mask in image without /ImageMask.")}else this.mask=s}static async buildImage({xref:e,res:t,image:n,isInline:a=!1,pdfFunctionFactory:r,globalColorSpaceCache:s,localColorSpaceCache:i}){const o=n;let l=null,f=null;const c=n.dict.get("SMask"),h=n.dict.get("Mask");c?c instanceof BaseStream?l=c:warn("Unsupported /SMask format."):h&&(h instanceof BaseStream||Array.isArray(h)?f=h:warn("Unsupported /Mask format."));return new PDFImage({xref:e,res:t,image:o,isInline:a,smask:l,mask:f,pdfFunctionFactory:r,globalColorSpaceCache:s,localColorSpaceCache:i})}static async createMask({image:e,isOffscreenCanvasSupported:t=!1}){const{dict:n}=e,a=n.get("W","Width"),r=n.get("H","Height"),s=n.get("I","Interpolate"),i=n.getArray("D","Decode"),o=i?.[0]>0,l=(a+7>>3)*r,f=await e.getImageData(l),c=1===a&&1===r&&o===(0===f.length||!!(128&f[0]));if(c)return{isSingleOpaquePixel:c};if(t){if(ImageResizer.needsToBeResized(a,r)){const e=new Uint8ClampedArray(a*r*4);convertBlackAndWhiteToRGBA({src:f,dest:e,width:a,height:r,nonBlackColor:0,inverseDecode:o});return ImageResizer.createImage({kind:R,data:e,width:a,height:r,interpolate:s})}const e=new OffscreenCanvas(a,r),t=e.getContext("2d"),n=t.createImageData(a,r);convertBlackAndWhiteToRGBA({src:f,dest:n.data,width:a,height:r,nonBlackColor:0,inverseDecode:o});t.putImageData(n,0,0);return{data:null,width:a,height:r,interpolate:s,bitmap:e.transferToImageBitmap()}}const h=f.byteLength;let u;if(e instanceof DecodeStream&&(!o||l===h))u=f;else if(o){u=new Uint8Array(l);u.set(f);u.fill(255,h)}else u=new Uint8Array(f);if(o)for(let e=0;e<h;e++)u[e]^=255;return{data:u,width:a,height:r,interpolate:s}}get drawWidth(){return Math.max(this.width,this.smask?.width||0,this.mask?.width||0)}get drawHeight(){return Math.max(this.height,this.smask?.height||0,this.mask?.height||0)}decodeBuffer(e){const t=this.bpc,n=this.numComps,a=this.decodeAddends,r=this.decodeCoefficients,s=(1<<t)-1;let i,o;if(1===t){for(i=0,o=e.length;i<o;i++)e[i]=+!e[i];return}let l=0;for(i=0,o=this.width*this.height;i<o;i++)for(let t=0;t<n;t++){e[l]=MathClamp(a[t]+e[l]*r[t],0,s);l++}}getComponents(e){const t=this.bpc;if(8===t)return e;const n=this.width,a=this.height,r=this.numComps,s=n*a*r;let i,o=0;i=t<=8?new Uint8Array(s):t<=16?new Uint16Array(s):new Uint32Array(s);const l=n*r,f=(1<<t)-1;let c,h,u=0;if(1===t){let t,n,r;for(let s=0;s<a;s++){n=u+(-8&l);r=u+l;for(;u<n;){h=e[o++];i[u]=h>>7&1;i[u+1]=h>>6&1;i[u+2]=h>>5&1;i[u+3]=h>>4&1;i[u+4]=h>>3&1;i[u+5]=h>>2&1;i[u+6]=h>>1&1;i[u+7]=1&h;u+=8}if(u<r){h=e[o++];t=128;for(;u<r;){i[u++]=+!!(h&t);t>>=1}}}}else{let n=0;h=0;for(u=0,c=s;u<c;++u){if(u%l===0){h=0;n=0}for(;n<t;){h=h<<8|e[o++];n+=8}const a=n-t;let r=h>>a;r<0?r=0:r>f&&(r=f);i[u]=r;h&=(1<<a)-1;n=a}}return i}async fillOpacity(e,t,n,a,r){const s=this.smask,i=this.mask;let o,l,f,c,h,u;if(s){l=s.width;f=s.height;o=new Uint8ClampedArray(l*f);await s.fillGrayBuffer(o);l===t&&f===n||(o=resizeImageMask(o,s.bpc,l,f,t,n))}else if(i)if(i instanceof PDFImage){l=i.width;f=i.height;o=new Uint8ClampedArray(l*f);i.numComps=1;await i.fillGrayBuffer(o);for(c=0,h=l*f;c<h;++c)o[c]=255-o[c];l===t&&f===n||(o=resizeImageMask(o,i.bpc,l,f,t,n))}else{if(!Array.isArray(i))throw new FormatError("Unknown mask format.");{o=new Uint8ClampedArray(t*n);const e=this.numComps;for(c=0,h=t*n;c<h;++c){let t=0;const n=c*e;for(u=0;u<e;++u){const e=r[n+u],a=2*u;if(e<i[a]||e>i[a+1]){t=255;break}}o[c]=t}}}if(o)for(c=0,u=3,h=t*a;c<h;++c,u+=4)e[u]=o[c];else for(c=0,u=3,h=t*a;c<h;++c,u+=4)e[u]=255}undoPreblend(e,t,n){const a=this.smask?.matte;if(!a)return;const r=this.colorSpace.getRgb(a,0),s=r[0],i=r[1],o=r[2],l=t*n*4;for(let t=0;t<l;t+=4){const n=e[t+3];if(0===n){e[t]=255;e[t+1]=255;e[t+2]=255;continue}const a=255/n;e[t]=(e[t]-s)*a+s;e[t+1]=(e[t+1]-i)*a+i;e[t+2]=(e[t+2]-o)*a+o}}async createImageData(e=!1,t=!1){const n=this.drawWidth,a=this.drawHeight,r={width:n,height:a,interpolate:this.interpolate,kind:0,data:null},s=this.numComps,i=this.width,o=this.height,l=this.bpc,f=i*s*l+7>>3,c=t&&ImageResizer.needsToBeResized(n,a);if(!this.smask&&!this.mask&&"DeviceRGBA"===this.colorSpace.name){r.kind=R;const e=r.data=await this.getImageBytes(o*i*4,{});return t?c?ImageResizer.createImage(r,!1):this.createBitmap(R,n,a,e):r}if(!e){let e;"DeviceGray"===this.colorSpace.name&&1===l?e=T:"DeviceRGB"!==this.colorSpace.name||8!==l||this.needsDecode||(e=O);if(e&&!this.smask&&!this.mask&&n===i&&a===o){const s=await this.#he(i,o);if(s)return s;const l=await this.getImageBytes(o*f,{});if(t)return c?ImageResizer.createImage({data:l,kind:e,width:n,height:a,interpolate:this.interpolate},this.needsDecode):this.createBitmap(e,i,o,l);r.kind=e;r.data=l;if(this.needsDecode){assert(e===T,"PDFImage.createImageData: The image must be grayscale.");const t=r.data;for(let e=0,n=t.length;e<n;e++)t[e]^=255}return r}if(this.image instanceof JpegStream&&!this.smask&&!this.mask&&!this.needsDecode){let e=o*f;if(t&&!c){let t=!1;switch(this.colorSpace.name){case"DeviceGray":e*=4;t=!0;break;case"DeviceRGB":e=e/3*4;t=!0;break;case"DeviceCMYK":t=!0}if(t){const t=await this.#he(n,a);if(t)return t;const r=await this.getImageBytes(e,{drawWidth:n,drawHeight:a,forceRGBA:!0});return this.createBitmap(R,n,a,r)}}else switch(this.colorSpace.name){case"DeviceGray":e*=3;case"DeviceRGB":case"DeviceCMYK":r.kind=O;r.data=await this.getImageBytes(e,{drawWidth:n,drawHeight:a,forceRGB:!0});return c?ImageResizer.createImage(r):r}}}const h=await this.getImageBytes(o*f,{internal:!0}),u=0|h.length/f*a/o,m=this.getComponents(h);let p,d,g,b,w,j;if(t&&!c){g=new OffscreenCanvas(n,a);b=g.getContext("2d");w=b.createImageData(n,a);j=w.data}r.kind=R;if(e||this.smask||this.mask){t&&!c||(j=new Uint8ClampedArray(n*a*4));p=1;d=!0;await this.fillOpacity(j,n,a,u,m)}else{if(!t||c){r.kind=O;j=new Uint8ClampedArray(n*a*3);p=0}else{new Uint32Array(j.buffer).fill(FeatureTest.isLittleEndian?4278190080:255);p=1}d=!1}this.needsDecode&&this.decodeBuffer(m);this.colorSpace.fillRgb(j,i,o,n,a,u,l,m,p);d&&this.undoPreblend(j,n,u);if(t&&!c){b.putImageData(w,0,0);return{data:null,width:n,height:a,bitmap:g.transferToImageBitmap(),interpolate:this.interpolate}}r.data=j;return c?ImageResizer.createImage(r):r}async fillGrayBuffer(e){const t=this.numComps;if(1!==t)throw new FormatError(`Reading gray scale from a color image: ${t}`);const n=this.width,a=this.height,r=this.bpc,s=n*t*r+7>>3,i=await this.getImageBytes(a*s,{internal:!0}),o=this.getComponents(i);let l,f;if(1===r){f=n*a;if(this.needsDecode)for(l=0;l<f;++l)e[l]=o[l]-1&255;else for(l=0;l<f;++l)e[l]=255&-o[l];return}this.needsDecode&&this.decodeBuffer(o);f=n*a;const c=255/((1<<r)-1);for(l=0;l<f;++l)e[l]=c*o[l]}createBitmap(e,t,n,a){const r=new OffscreenCanvas(t,n),s=r.getContext("2d");let i;if(e===R)i=new ImageData(a,t,n);else{i=s.createImageData(t,n);convertToRGBA({kind:e,src:a,dest:new Uint32Array(i.data.buffer),width:t,height:n,inverseDecode:this.needsDecode})}s.putImageData(i,0,0);return{data:null,width:t,height:n,bitmap:r.transferToImageBitmap(),interpolate:this.interpolate}}async#he(e,t){const n=await this.image.getTransferableImage();return n?{data:null,width:e,height:t,bitmap:n,interpolate:this.interpolate}:null}async getImageBytes(e,{drawWidth:t,drawHeight:n,forceRGBA:a=!1,forceRGB:r=!1,internal:s=!1}){this.image.reset();this.image.drawWidth=t||this.width;this.image.drawHeight=n||this.height;this.image.forceRGBA=!!a;this.image.forceRGB=!!r;const i=await this.image.getImageData(e,this.jpxDecoderOptions);if(s||this.image instanceof DecodeStream)return i;assert(i instanceof Uint8Array,'PDFImage.getImageBytes: Unsupported "imageBytes" type.');return new Uint8Array(i)}}const vs=Object.freeze({maxImageSize:-1,disableFontFace:!1,ignoreErrors:!1,isEvalSupported:!0,isOffscreenCanvasSupported:!1,isImageDecoderSupported:!1,canvasMaxAreaInBytes:-1,fontExtraProperties:!1,useSystemFonts:!0,useWasm:!0,useWorkerFetch:!0,cMapUrl:null,iccUrl:null,standardFontDataUrl:null,wasmUrl:null}),Ss=1,xs=2,As=Promise.resolve();function normalizeBlendMode(e,t=!1){if(Array.isArray(e)){for(const t of e){const e=normalizeBlendMode(t,!0);if(e)return e}warn(`Unsupported blend mode Array: ${e}`);return"source-over"}if(!(e instanceof Name))return t?null:"source-over";switch(e.name){case"Normal":case"Compatible":return"source-over";case"Multiply":return"multiply";case"Screen":return"screen";case"Overlay":return"overlay";case"Darken":return"darken";case"Lighten":return"lighten";case"ColorDodge":return"color-dodge";case"ColorBurn":return"color-burn";case"HardLight":return"hard-light";case"SoftLight":return"soft-light";case"Difference":return"difference";case"Exclusion":return"exclusion";case"Hue":return"hue";case"Saturation":return"saturation";case"Color":return"color";case"Luminosity":return"luminosity"}if(t)return null;warn(`Unsupported blend mode: ${e.name}`);return"source-over"}function addCachedImageOps(e,{objId:t,fn:n,args:a,optionalContent:r,hasMask:s}){t&&e.addDependency(t);e.addImageOps(n,a,r,s);n===Et&&a[0]?.count>0&&a[0].count++}class TimeSlotManager{static TIME_SLOT_DURATION_MS=20;static CHECK_TIME_EVERY=100;constructor(){this.reset()}check(){if(++this.checked<TimeSlotManager.CHECK_TIME_EVERY)return!1;this.checked=0;return this.endTime<=Date.now()}reset(){this.endTime=Date.now()+TimeSlotManager.TIME_SLOT_DURATION_MS;this.checked=0}}class PartialEvaluator{constructor({xref:e,handler:t,pageIndex:n,idFactory:a,fontCache:r,builtInCMapCache:s,standardFontDataCache:i,globalColorSpaceCache:o,globalImageCache:l,systemFontCache:f,options:c=null}){this.xref=e;this.handler=t;this.pageIndex=n;this.idFactory=a;this.fontCache=r;this.builtInCMapCache=s;this.standardFontDataCache=i;this.globalColorSpaceCache=o;this.globalImageCache=l;this.systemFontCache=f;this.options=c||vs;this.type3FontRefs=null;this._regionalImageCache=new RegionalImageCache;this._fetchBuiltInCMapBound=this.fetchBuiltInCMap.bind(this)}get _pdfFunctionFactory(){return shadow(this,"_pdfFunctionFactory",new PDFFunctionFactory({xref:this.xref,isEvalSupported:this.options.isEvalSupported}))}get parsingType3Font(){return!!this.type3FontRefs}clone(e=null){const t=Object.create(this);t.options=Object.assign(Object.create(null),this.options,e);return t}hasBlendModes(e,t){if(!(e instanceof Dict))return!1;if(e.objId&&t.has(e.objId))return!1;const n=new RefSet(t);e.objId&&n.put(e.objId);const a=[e],r=this.xref;for(;a.length;){const e=a.shift(),t=e.get("ExtGState");if(t instanceof Dict)for(let e of t.getRawValues()){if(e instanceof Ref){if(n.has(e))continue;try{e=r.fetch(e)}catch(t){n.put(e);info(`hasBlendModes - ignoring ExtGState: "${t}".`);continue}}if(!(e instanceof Dict))continue;e.objId&&n.put(e.objId);const t=e.get("BM");if(t instanceof Name){if("Normal"!==t.name)return!0}else if(void 0!==t&&Array.isArray(t))for(const e of t)if(e instanceof Name&&"Normal"!==e.name)return!0}const s=e.get("XObject");if(s instanceof Dict)for(let e of s.getRawValues()){if(e instanceof Ref){if(n.has(e))continue;try{e=r.fetch(e)}catch(t){n.put(e);info(`hasBlendModes - ignoring XObject: "${t}".`);continue}}if(!(e instanceof BaseStream))continue;e.dict.objId&&n.put(e.dict.objId);const t=e.dict.get("Resources");if(t instanceof Dict&&(!t.objId||!n.has(t.objId))){a.push(t);t.objId&&n.put(t.objId)}}}for(const e of n)t.put(e);return!1}async fetchBuiltInCMap(e){const t=this.builtInCMapCache.get(e);if(t)return t;let n;n=this.options.useWorkerFetch?{cMapData:await fetchBinaryData(`${this.options.cMapUrl}${e}.bcmap`),isCompressed:!0}:await this.handler.sendWithPromise("FetchBinaryData",{type:"cMapReaderFactory",name:e});this.builtInCMapCache.set(e,n);return n}async fetchStandardFontData(e){const t=this.standardFontDataCache.get(e);if(t)return new Stream(t);if(this.options.useSystemFonts&&"Symbol"!==e&&"ZapfDingbats"!==e)return null;const n=Xa()[e];let a;try{a=this.options.useWorkerFetch?await fetchBinaryData(`${this.options.standardFontDataUrl}${n}`):await this.handler.sendWithPromise("FetchBinaryData",{type:"standardFontDataFactory",filename:n})}catch(e){warn(e);return null}this.standardFontDataCache.set(e,a);return new Stream(a)}async buildFormXObject(e,t,n,a,r,s,i,o){const{dict:l}=t,f=lookupMatrix(l.getArray("Matrix"),null),c=lookupNormalRect(l.getArray("BBox"),null);let h,u;l.has("OC")&&(h=await this.parseMarkedContentProps(l.get("OC"),e));void 0!==h&&a.addOp(It,["OC",h]);const m=l.get("Group");if(m){u={matrix:f,bbox:c,smask:n,isolated:!1,knockout:!1};let t=null;if(isName(m.get("S"),"Transparency")){u.isolated=m.get("I")||!1;u.knockout=m.get("K")||!1;if(m.has("CS")){const n=this._getColorSpace(m.getRaw("CS"),e,i);t=n instanceof ColorSpace?n:await this._handleColorSpace(n)}}if(n?.backdrop){t||=ColorSpaceUtils.rgb;n.backdrop=t.getRgbHex(n.backdrop,0)}a.addOp(Ht,[u])}const p=[f&&new Float32Array(f),!m&&c&&new Float32Array(c)||null];a.addOp(Rt,p);const d=l.get("Resources");await this.getOperatorList({stream:t,task:r,resources:d instanceof Dict?d:e,operatorList:a,initialState:s,prevRefs:o});a.addOp(Bt,[]);m&&a.addOp(Dt,[u]);void 0!==h&&a.addOp(Ft,[])}_sendImgData(e,t,n=!1){const a=t?[t.bitmap||t.data.buffer]:null;return this.parsingType3Font||n?this.handler.send("commonobj",[e,"Image",t],a):this.handler.send("obj",[e,this.pageIndex,"Image",t],a)}async buildPaintImageXObject({resources:e,image:t,isInline:n=!1,operatorList:a,cacheKey:r,localImageCache:s,localColorSpaceCache:i}){const{maxImageSize:o,ignoreErrors:l,isOffscreenCanvasSupported:f}=this.options,{dict:c}=t,h=c.objId,u=c.get("W","Width"),m=c.get("H","Height");if(!u||"number"!=typeof u||!m||"number"!=typeof m){warn("Image dimensions are missing, or not numbers.");return}if(-1!==o&&u*m>o){const e="Image exceeded maximum allowed size and was removed.";if(!l)throw new Error(e);warn(e);return}let p;c.has("OC")&&(p=await this.parseMarkedContentProps(c.get("OC"),e));let d,g,b;if(c.get("IM","ImageMask")||!1){d=await PDFImage.createMask({image:t,isOffscreenCanvasSupported:f&&!this.parsingType3Font});if(d.isSingleOpaquePixel){g=Wt;b=[];a.addImageOps(g,b,p);if(r){const e={fn:g,args:b,optionalContent:p};s.set(r,h,e);h&&this._regionalImageCache.set(null,h,e)}return}if(this.parsingType3Font){b=function compileType3Glyph({data:e,width:t,height:n}){if(t>1e3||n>1e3)return null;const a=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),r=t+1,s=new Uint8Array(r*(n+1));let i,o,l;const f=t+7&-8,c=new Uint8Array(f*n);let h=0;for(const t of e){let e=128;for(;e>0;){c[h++]=t&e?0:255;e>>=1}}let u=0;h=0;if(0!==c[h]){s[0]=1;++u}for(o=1;o<t;o++){if(c[h]!==c[h+1]){s[o]=c[h]?2:1;++u}h++}if(0!==c[h]){s[o]=2;++u}for(i=1;i<n;i++){h=i*f;l=i*r;if(c[h-f]!==c[h]){s[l]=c[h]?1:8;++u}let e=(c[h]?4:0)+(c[h-f]?8:0);for(o=1;o<t;o++){e=(e>>2)+(c[h+1]?4:0)+(c[h-f+1]?8:0);if(a[e]){s[l+o]=a[e];++u}h++}if(c[h-f]!==c[h]){s[l+o]=c[h]?2:4;++u}if(u>1e3)return null}h=f*(n-1);l=i*r;if(0!==c[h]){s[l]=8;++u}for(o=1;o<t;o++){if(c[h]!==c[h+1]){s[l+o]=c[h]?4:8;++u}h++}if(0!==c[h]){s[l+o]=4;++u}if(u>1e3)return null;const m=new Int32Array([0,r,-1,0,-r,0,0,0,1]),p=[],{a:d,b:g,c:b,d:w,e:j,f:k}=(new DOMMatrix).scaleSelf(1/t,-1/n).translateSelf(0,-n);for(i=0;u&&i<=n;i++){let e=i*r;const n=e+t;for(;e<n&&!s[e];)e++;if(e===n)continue;let a=e%r,o=i;p.push(Yt,d*a+b*o+j,g*a+w*o+k);const l=e;let f=s[e];do{const t=m[f];do{e+=t}while(!s[e]);const n=s[e];if(5!==n&&10!==n){f=n;s[e]=0}else{f=n&51*f>>4;s[e]&=f>>2|f<<2}a=e%r;o=e/r|0;p.push(Jt,d*a+b*o+j,g*a+w*o+k);s[e]||--u}while(l!==e);--i}return[$t,[new Float32Array(p)],new Float32Array([0,0,t,n])]}(d);if(b){a.addImageOps(Kt,b,p);return}warn("Cannot compile Type3 glyph.");a.addImageOps(Et,[d],p);return}const e=`mask_${this.idFactory.createObjId()}`;a.addDependency(e);d.dataLen=d.bitmap?d.width*d.height*4:d.data.length;this._sendImgData(e,d);g=Et;b=[{data:e,width:d.width,height:d.height,interpolate:d.interpolate,count:1}];a.addImageOps(g,b,p);if(r){const t={objId:e,fn:g,args:b,optionalContent:p};s.set(r,h,t);h&&this._regionalImageCache.set(null,h,t)}return}const w=c.has("SMask")||c.has("Mask");if(n&&u+m<200&&!w){try{const r=new PDFImage({xref:this.xref,res:e,image:t,isInline:n,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:i});d=await r.createImageData(!0,!1);a.addImageOps(_t,[d],p)}catch(e){const t=`Unable to decode inline image: "${e}".`;if(!l)throw new Error(t);warn(t)}return}let j=`img_${this.idFactory.createObjId()}`,k=!1,y=null;if(this.parsingType3Font)j=`${this.idFactory.getDocId()}_type3_${j}`;else if(r&&h){k=this.globalImageCache.shouldCache(h,this.pageIndex);if(k){assert(!n,"Cannot cache an inline image globally.");j=`${this.idFactory.getDocId()}_${j}`}}a.addDependency(j);g=zt;b=[j,u,m];a.addImageOps(g,b,p,w);if(k){y={objId:j,fn:g,args:b,optionalContent:p,hasMask:w,byteSize:0};if(this.globalImageCache.hasDecodeFailed(h)){this.globalImageCache.setData(h,y);this._sendImgData(j,null,k);return}if(u*m>25e4||w){const e=await this.handler.sendWithPromise("commonobj",[j,"CopyLocalImage",{imageRef:h}]);if(e){this.globalImageCache.setData(h,y);this.globalImageCache.addByteSize(h,e);return}}}PDFImage.buildImage({xref:this.xref,res:e,image:t,isInline:n,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:i}).then(async e=>{d=await e.createImageData(!1,f);d.dataLen=d.bitmap?d.width*d.height*4:d.data.length;d.ref=h;k&&this.globalImageCache.addByteSize(h,d.dataLen);return this._sendImgData(j,d,k)}).catch(e=>{warn(`Unable to decode image "${j}": "${e}".`);h&&this.globalImageCache.addDecodeFailed(h);return this._sendImgData(j,null,k)});if(r){const e={objId:j,fn:g,args:b,optionalContent:p,hasMask:w};s.set(r,h,e);if(h){this._regionalImageCache.set(null,h,e);if(k){assert(y,"The global cache-data must be available.");this.globalImageCache.setData(h,y)}}}}handleSMask(e,t,n,a,r,s,i){const o=e.get("G"),l={subtype:e.get("S").name,backdrop:e.get("BC")},f=e.get("TR");if(isPDFFunction(f)){const e=this._pdfFunctionFactory.create(f),t=new Uint8Array(256),n=new Float32Array(1);for(let a=0;a<256;a++){n[0]=a/255;e(n,0,n,0);t[a]=255*n[0]|0}l.transferMap=t}return this.buildFormXObject(t,o,l,n,a,r.state.clone({newPath:!0}),s,i)}handleTransferFunction(e){let t;if(Array.isArray(e)){t=e;e.length>1&&e.every(t=>t===e[0])&&(t=[e[0]])}else{if(!isPDFFunction(e))return null;t=[e]}const n=[];let a=0,r=0;for(const e of t){const t=this.xref.fetchIfRef(e);a++;if(isName(t,"Identity")){n.push(null);continue}if(!isPDFFunction(t))return null;const s=this._pdfFunctionFactory.create(t),i=new Uint8Array(256),o=new Float32Array(1);for(let e=0;e<256;e++){o[0]=e/255;s(o,0,o,0);i[e]=255*o[0]|0}n.push(i);r++}return 1!==a&&4!==a||0===r?null:n}handleTilingType(e,t,n,a,r,s,i,o){const l=new OperatorList,f=Dict.merge({xref:this.xref,dictArray:[r.get("Resources"),n]});return this.getOperatorList({stream:a,task:i,resources:f,operatorList:l}).then(function(){const n=l.getIR(),a=getTilingPatternIR(n,r,t);s.addDependencies(l.dependencies);s.addOp(e,a);r.objId&&o.set(null,r.objId,{operatorListIR:n,dict:r})}).catch(e=>{if(!(e instanceof AbortException)){if(!this.options.ignoreErrors)throw e;warn(`handleTilingType - ignoring pattern: "${e}".`)}})}async handleSetFont(e,t,n,a,r,s,i=null,o=null){const l=t?.[0]instanceof Name?t[0].name:null,f=await this.loadFont(l,n,e,r,i,o);f.font.isType3Font&&a.addDependencies(f.type3Dependencies);s.font=f.font;f.send(this.handler);return f.loadedName}handleText(e,t){const n=t.font,a=n.charsToGlyphs(e);if(n.data){(!!(t.textRenderingMode&C)||"Pattern"===t.fillColorSpace.name||"Pattern"===t.strokeColorSpace.name||n.disableFontFace)&&PartialEvaluator.buildFontPaths(n,a,this.handler,this.options)}return a}ensureStateFont(e){if(e.font)return;const t=new FormatError("Missing setFont (Tf) operator before text rendering operator.");if(!this.options.ignoreErrors)throw t;warn(`ensureStateFont: "${t}".`)}async setGState({resources:e,gState:t,operatorList:n,cacheKey:a,task:r,stateManager:s,localGStateCache:i,localColorSpaceCache:o,seenRefs:l}){const f=t.objId;let c=!0;const h=[];let u=Promise.resolve();for(const[a,i]of t)switch(a){case"Type":break;case"LW":if("number"!=typeof i){warn(`Invalid LW (line width): ${i}`);break}h.push([a,Math.abs(i)]);break;case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":h.push([a,i]);break;case"Font":c=!1;u=u.then(()=>this.handleSetFont(e,null,i[0],n,r,s.state).then(function(e){n.addDependency(e);h.push([a,[e,i[1]]])}));break;case"BM":h.push([a,normalizeBlendMode(i)]);break;case"SMask":if(isName(i,"None")){h.push([a,!1]);break}if(i instanceof Dict){c=!1;u=u.then(()=>this.handleSMask(i,e,n,r,s,o,l));h.push([a,!0])}else warn("Unsupported SMask type");break;case"TR":const t=this.handleTransferFunction(i);h.push([a,t]);break;case"OP":case"op":case"OPM":case"BG":case"BG2":case"UCR":case"UCR2":case"TR2":case"HT":case"SM":case"SA":case"AIS":case"TK":info("graphic state operator "+a);break;default:info("Unknown graphic state operator "+a)}await u;h.length>0&&n.addOp(ke,[h]);c&&i.set(a,f,h)}loadFont(e,t,n,a,r=null,s=null){const errorFont=async()=>new TranslatedFont({loadedName:"g_font_error",font:new ErrorFont(`Font "${e}" is not available.`),dict:t});let i;if(t)t instanceof Ref&&(i=t);else{const t=n.get("Font");t&&(i=t.getRaw(e))}if(i){if(this.type3FontRefs?.has(i))return errorFont();if(this.fontCache.has(i))return this.fontCache.get(i);try{t=this.xref.fetchIfRef(i)}catch(e){warn(`loadFont - lookup failed: "${e}".`)}}if(!(t instanceof Dict)){if(!this.options.ignoreErrors&&!this.parsingType3Font){warn(`Font "${e}" is not available.`);return errorFont()}warn(`Font "${e}" is not available -- attempting to fallback to a default font.`);t=r||PartialEvaluator.fallbackFontDict}if(t.cacheKey&&this.fontCache.has(t.cacheKey))return this.fontCache.get(t.cacheKey);const{promise:o,resolve:l}=Promise.withResolvers();let f;try{f=this.preEvaluateFont(t);f.cssFontInfo=s}catch(e){warn(`loadFont - preEvaluateFont failed: "${e}".`);return errorFont()}const{descriptor:c,hash:h}=f,u=i instanceof Ref;let m;if(h&&c instanceof Dict){const e=c.fontAliases||=Object.create(null);if(e[h]){const t=e[h].aliasRef;if(u&&t&&this.fontCache.has(t)){this.fontCache.putAlias(i,t);return this.fontCache.get(i)}}else e[h]={fontID:this.idFactory.createFontId()};u&&(e[h].aliasRef=i);m=e[h].fontID}else m=this.idFactory.createFontId();assert(m?.startsWith("f"),'The "fontID" must be (correctly) defined.');if(u)this.fontCache.put(i,o);else{t.cacheKey=`cacheKey_${m}`;this.fontCache.put(t.cacheKey,o)}t.loadedName=`${this.idFactory.getDocId()}_${m}`;this.translateFont(f).then(async e=>{const r=new TranslatedFont({loadedName:t.loadedName,font:e,dict:t});if(e.isType3Font)try{await r.loadType3Data(this,n,a)}catch(e){throw new Error(`Type3 font load error: ${e}`)}l(r)}).catch(e=>{warn(`loadFont - translateFont failed: "${e}".`);l(new TranslatedFont({loadedName:t.loadedName,font:new ErrorFont(e?.message),dict:t}))});return o}buildPath(e,t,n){const{pathMinMax:a,pathBuffer:r}=n;switch(0|e){case Te:{const e=n.currentPointX=t[0],s=n.currentPointY=t[1],i=t[2],o=t[3],l=e+i,f=s+o;0===i||0===o?r.push(Yt,e,s,Jt,l,f,en):r.push(Yt,e,s,Jt,l,s,Jt,l,f,Jt,e,f,en);Util.rectBoundingBox(e,s,l,f,a);break}case Se:{const e=n.currentPointX=t[0],s=n.currentPointY=t[1];r.push(Yt,e,s);Util.pointBoundingBox(e,s,a);break}case xe:{const e=n.currentPointX=t[0],s=n.currentPointY=t[1];r.push(Jt,e,s);Util.pointBoundingBox(e,s,a);break}case Ae:{const e=n.currentPointX,s=n.currentPointY,[i,o,l,f,c,h]=t;n.currentPointX=c;n.currentPointY=h;r.push(Qt,i,o,l,f,c,h);Util.bezierBoundingBox(e,s,i,o,l,f,c,h,a);break}case Ce:{const e=n.currentPointX,s=n.currentPointY,[i,o,l,f]=t;n.currentPointX=l;n.currentPointY=f;r.push(Qt,e,s,i,o,l,f);Util.bezierBoundingBox(e,s,e,s,i,o,l,f,a);break}case Ie:{const e=n.currentPointX,s=n.currentPointY,[i,o,l,f]=t;n.currentPointX=l;n.currentPointY=f;r.push(Qt,i,o,l,f,l,f);Util.bezierBoundingBox(e,s,i,o,l,f,l,f,a);break}case Fe:r.push(en)}}_getColorSpace(e,t,n){return ColorSpaceUtils.parse({cs:e,xref:this.xref,resources:t,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:n,asyncIfNotCached:!0})}async _handleColorSpace(e){try{return await e}catch(e){if(e instanceof AbortException)return null;if(this.options.ignoreErrors){warn(`_handleColorSpace - ignoring ColorSpace: "${e}".`);return null}throw e}}parseShading({shading:e,resources:t,localColorSpaceCache:n,localShadingPatternCache:a}){let r,s=a.get(e);if(s)return s;try{r=Pattern.parseShading(e,this.xref,t,this._pdfFunctionFactory,this.globalColorSpaceCache,n).getIR()}catch(t){if(t instanceof AbortException)return null;if(this.options.ignoreErrors){warn(`parseShading - ignoring shading: "${t}".`);a.set(e,null);return null}throw t}s=`pattern_${this.idFactory.createObjId()}`;this.parsingType3Font&&(s=`${this.idFactory.getDocId()}_type3_${s}`);a.set(e,s);if(this.parsingType3Font){const e=[],t=PatternInfo.write(r);e.push(t);this.handler.send("commonobj",[s,"Pattern",t],e)}else this.handler.send("obj",[s,this.pageIndex,"Pattern",r]);return s}handleColorN(e,t,n,a,r,s,i,o,l,f){const c=n.pop();if(c instanceof Name){const h=r.getRaw(c.name),u=h instanceof Ref&&l.getByRef(h);if(u)try{const r=a.base?a.base.getRgbHex(n,0):null,s=getTilingPatternIR(u.operatorListIR,u.dict,r);e.addOp(t,s);return}catch{}const m=this.xref.fetchIfRef(h);if(m){const r=m instanceof BaseStream?m.dict:m,c=r.get("PatternType");if(c===Ss){const o=a.base?a.base.getRgbHex(n,0):null;return this.handleTilingType(t,o,s,m,r,e,i,l)}if(c===xs){const n=r.get("Shading"),a=this.parseShading({shading:n,resources:s,localColorSpaceCache:o,localShadingPatternCache:f});if(a){const n=lookupMatrix(r.getArray("Matrix"),null);e.addOp(t,["Shading",a,n])}return}throw new FormatError(`Unknown PatternType: ${c}`)}}throw new FormatError(`Unknown PatternName: ${c}`)}_parseVisibilityExpression(e,t,n){if(++t>10){warn("Visibility expression is too deeply nested");return}const a=e.length,r=this.xref.fetchIfRef(e[0]);if(!(a<2)&&r instanceof Name){switch(r.name){case"And":case"Or":case"Not":n.push(r.name);break;default:warn(`Invalid operator ${r.name} in visibility expression`);return}for(let r=1;r<a;r++){const a=e[r],s=this.xref.fetchIfRef(a);if(Array.isArray(s)){const e=[];n.push(e);this._parseVisibilityExpression(s,t,e)}else a instanceof Ref&&n.push(a.toString())}}else warn("Invalid visibility expression")}async parseMarkedContentProps(e,t){let n;if(e instanceof Name){n=t.get("Properties").get(e.name)}else{if(!(e instanceof Dict))throw new FormatError("Optional content properties malformed.");n=e}const a=n.get("Type")?.name;if("OCG"===a)return{type:a,id:n.objId};if("OCMD"===a){const e=n.get("VE");if(Array.isArray(e)){const t=[];this._parseVisibilityExpression(e,0,t);if(t.length>0)return{type:"OCMD",expression:t}}const t=n.get("OCGs");if(Array.isArray(t)||t instanceof Dict){const e=[];if(Array.isArray(t))for(const n of t)e.push(n.toString());else e.push(t.objId);return{type:a,ids:e,policy:n.get("P")instanceof Name?n.get("P").name:null,expression:null}}if(t instanceof Ref)return{type:a,id:t.toString()}}return null}async getOperatorList({stream:e,task:t,resources:n,operatorList:a,initialState:r=null,fallbackFontDict:s=null,prevRefs:i=null}){if(e.isAsync){const t=await e.asyncGetBytes();t&&(e=new Stream(t,0,t.length,e.dict))}const o=e.dict?.objId,l=new RefSet(i);if(o){if(i?.has(o))throw new Error(`getOperatorList - ignoring circular reference: ${o}`);l.put(o)}n||=Dict.empty;r||=new EvalState;if(!a)throw new Error('getOperatorList: missing "operatorList" parameter');const f=this,c=this.xref,h=new LocalImageCache,u=new LocalColorSpaceCache,m=new LocalGStateCache,p=new LocalTilingPatternCache,d=new Map,g=n.get("XObject")||Dict.empty,b=n.get("Pattern")||Dict.empty,w=new StateManager(r),j=new EvaluatorPreprocessor(e,c,w),k=new TimeSlotManager;function closePendingRestoreOPS(e){for(let e=0,t=j.savedStatesDepth;e<t;e++)a.addOp(qe,[])}return new Promise(function promiseBody(e,r){const next=function(t){Promise.all([t,a.ready]).then(function(){try{promiseBody(e,r)}catch(e){r(e)}},r)};t.ensureNotTerminated();k.reset();const i={};let o,y,q,v,S,x;for(;!(o=k.check());){i.args=null;if(!j.read(i))break;let e=i.args,r=i.fn;switch(0|r){case St:x=e[0]instanceof Name;S=e[0].name;if(x){const t=h.getByName(S);if(t){addCachedImageOps(a,t);e=null;continue}}next(new Promise(function(e,r){if(!x)throw new FormatError("XObject must be referred to by name.");let s=g.getRaw(S);if(s instanceof Ref){const t=h.getByRef(s)||f._regionalImageCache.getByRef(s)||f.globalImageCache.getData(s,f.pageIndex);if(t){addCachedImageOps(a,t);e();return}s=c.fetch(s)}if(!(s instanceof BaseStream))throw new FormatError("XObject should be a stream");const i=s.dict.get("Subtype");if(!(i instanceof Name))throw new FormatError("XObject should have a Name subtype");if("Form"!==i.name)if("Image"!==i.name){if("PS"!==i.name)throw new FormatError(`Unhandled XObject subtype ${i.name}`);info("Ignored XObject subtype PS");e()}else f.buildPaintImageXObject({resources:n,image:s,operatorList:a,cacheKey:S,localImageCache:h,localColorSpaceCache:u}).then(e,r);else{w.save();f.buildFormXObject(n,s,null,a,t,w.state.clone({newPath:!0}),u,l).then(function(){w.restore();e()},r)}}).catch(function(e){if(!(e instanceof AbortException)){if(!f.options.ignoreErrors)throw e;warn(`getOperatorList - ignoring XObject: "${e}".`)}}));return;case Ge:const i=e[1];next(f.handleSetFont(n,e,null,a,t,w.state,s).then(function(e){a.addDependency(e);a.addOp(Ge,[e,i])}));return;case vt:const o=e[0].cacheKey;if(o){const t=h.getByName(o);if(t){addCachedImageOps(a,t);e=null;continue}}next(f.buildPaintImageXObject({resources:n,image:e[0],isInline:!0,operatorList:a,cacheKey:o,localImageCache:h,localColorSpaceCache:u}));return;case tt:if(!w.state.font){f.ensureStateFont(w.state);continue}e[0]=f.handleText(e[0],w.state);break;case nt:if(!w.state.font){f.ensureStateFont(w.state);continue}const j=[],k=w.state;for(const t of e[0])"string"==typeof t?j.push(...f.handleText(t,k)):"number"==typeof t&&j.push(t);e[0]=j;r=tt;break;case rt:if(!w.state.font){f.ensureStateFont(w.state);continue}a.addOp(et);e[0]=f.handleText(e[0],w.state);r=tt;break;case st:if(!w.state.font){f.ensureStateFont(w.state);continue}a.addOp(et);a.addOp(We,[e.shift()]);a.addOp(Xe,[e.shift()]);e[0]=f.handleText(e[0],w.state);r=tt;break;case $e:w.state.textRenderingMode=e[0];break;case ft:{const t=f._getColorSpace(e[0],n,u);if(t instanceof ColorSpace){w.state.fillColorSpace=t;continue}next(f._handleColorSpace(t).then(e=>{w.state.fillColorSpace=e||ColorSpaceUtils.gray}));return}case lt:{const t=f._getColorSpace(e[0],n,u);if(t instanceof ColorSpace){w.state.strokeColorSpace=t;continue}next(f._handleColorSpace(t).then(e=>{w.state.strokeColorSpace=e||ColorSpaceUtils.gray}));return}case ut:v=w.state.fillColorSpace;e=[v.getRgbHex(e,0)];r=bt;break;case ct:v=w.state.strokeColorSpace;e=[v.getRgbHex(e,0)];r=gt;break;case dt:w.state.fillColorSpace=ColorSpaceUtils.gray;e=[ColorSpaceUtils.gray.getRgbHex(e,0)];r=bt;break;case pt:w.state.strokeColorSpace=ColorSpaceUtils.gray;e=[ColorSpaceUtils.gray.getRgbHex(e,0)];r=gt;break;case jt:w.state.fillColorSpace=ColorSpaceUtils.cmyk;e=[ColorSpaceUtils.cmyk.getRgbHex(e,0)];r=bt;break;case wt:w.state.strokeColorSpace=ColorSpaceUtils.cmyk;e=[ColorSpaceUtils.cmyk.getRgbHex(e,0)];r=gt;break;case bt:w.state.fillColorSpace=ColorSpaceUtils.rgb;e=[ColorSpaceUtils.rgb.getRgbHex(e,0)];break;case gt:w.state.strokeColorSpace=ColorSpaceUtils.rgb;e=[ColorSpaceUtils.rgb.getRgbHex(e,0)];break;case mt:v=w.state.patternFillColorSpace;if(!v){if(isNumberArray(e,null)){e=[ColorSpaceUtils.gray.getRgbHex(e,0)];r=bt;break}e=[];r=Gt;break}if("Pattern"===v.name){next(f.handleColorN(a,mt,e,v,b,n,t,u,p,d));return}e=[v.getRgbHex(e,0)];r=bt;break;case ht:v=w.state.patternStrokeColorSpace;if(!v){if(isNumberArray(e,null)){e=[ColorSpaceUtils.gray.getRgbHex(e,0)];r=gt;break}e=[];r=Vt;break}if("Pattern"===v.name){next(f.handleColorN(a,ht,e,v,b,n,t,u,p,d));return}e=[v.getRgbHex(e,0)];r=gt;break;case kt:let C;try{const t=n.get("Shading");if(!t)throw new FormatError("No shading resource found");C=t.get(e[0].name);if(!C)throw new FormatError("No shading object found")}catch(e){if(e instanceof AbortException)continue;if(f.options.ignoreErrors){warn(`getOperatorList - ignoring Shading: "${e}".`);continue}throw e}const T=f.parseShading({shading:C,resources:n,localColorSpaceCache:u,localShadingPatternCache:d});if(!T)continue;e=[T];r=kt;break;case ke:x=e[0]instanceof Name;S=e[0].name;if(x){const t=m.getByName(S);if(t){t.length>0&&a.addOp(ke,[t]);e=null;continue}}next(new Promise(function(e,r){if(!x)throw new FormatError("GState must be referred to by name.");const s=n.get("ExtGState");if(!(s instanceof Dict))throw new FormatError("ExtGState should be a dictionary.");const i=s.get(S);if(!(i instanceof Dict))throw new FormatError("GState should be a dictionary.");f.setGState({resources:n,gState:i,operatorList:a,cacheKey:S,task:t,stateManager:w,localGStateCache:m,localColorSpaceCache:u,seenRefs:l}).then(e,r)}).catch(function(e){if(!(e instanceof AbortException)){if(!f.options.ignoreErrors)throw e;warn(`getOperatorList - ignoring ExtGState: "${e}".`)}}));return;case me:{const[t]=e;if("number"!=typeof t){warn(`Invalid setLineWidth: ${t}`);continue}e[0]=Math.abs(t);break}case be:{const t=e[1];if("number"!=typeof t){warn(`Invalid setDash: ${t}`);continue}const n=e[0];if(!Array.isArray(n)){warn(`Invalid setDash: ${n}`);continue}n.some(e=>"number"!=typeof e)&&(e[0]=n.filter(e=>"number"==typeof e));break}case Se:case xe:case Ae:case Ce:case Ie:case Fe:case Te:f.buildPath(r,e,w.state);continue;case Oe:case Re:case Be:case He:case De:case Me:case Pe:case Ee:case Ne:{const{state:{pathBuffer:e,pathMinMax:t}}=w;r!==Re&&r!==Pe&&r!==Ee||e.push(en);if(0===e.length)a.addOp(Kt,[r,[null],null]);else{a.addOp(Kt,[r,[new Float32Array(e)],t.slice()]);e.length=0;t.set([1/0,1/0,-1/0,-1/0],0)}continue}case Ze:a.addOp(r,[new Float32Array(e)]);continue;case xt:case At:case Tt:case Ot:continue;case It:if(!(e[0]instanceof Name)){warn(`Expected name for beginMarkedContentProps arg0=${e[0]}`);a.addOp(It,["OC",null]);continue}if("OC"===e[0].name){next(f.parseMarkedContentProps(e[1],n).then(e=>{a.addOp(It,["OC",e])}).catch(e=>{if(!(e instanceof AbortException)){if(!f.options.ignoreErrors)throw e;warn(`getOperatorList - ignoring beginMarkedContentProps: "${e}".`);a.addOp(It,["OC",null])}}));return}e=[e[0].name,e[1]instanceof Dict?e[1].get("MCID"):null];break;default:if(null!==e){for(y=0,q=e.length;y<q&&!(e[y]instanceof Dict);y++);if(y<q){warn("getOperatorList - ignoring operator: "+r);continue}}}a.addOp(r,e)}if(o)next(As);else{closePendingRestoreOPS();e()}}).catch(e=>{if(!(e instanceof AbortException)){if(!this.options.ignoreErrors)throw e;warn(`getOperatorList - ignoring errors during "${t.name}" task: "${e}".`);closePendingRestoreOPS()}})}async getTextContent({stream:e,task:t,resources:n,stateManager:r=null,includeMarkedContent:s=!1,sink:i,seenStyles:o=new Set,viewBox:l,lang:f=null,markedContentData:c=null,disableNormalization:h=!1,keepWhiteSpace:u=!1,prevRefs:m=null,intersector:p=null}){if(e.isAsync){const t=await e.asyncGetBytes();t&&(e=new Stream(t,0,t.length,e.dict))}const d=e.dict?.objId,g=new RefSet(m);if(d){if(m?.has(d))throw new Error(`getTextContent - ignoring circular reference: ${d}`);g.put(d)}n||=Dict.empty;r||=new StateManager(new TextState);s&&(c||={level:0});const b={items:[],styles:Object.create(null),lang:f},w={initialized:!1,str:[],totalWidth:0,totalHeight:0,width:0,height:0,vertical:!1,prevTransform:null,textAdvanceScale:0,spaceInFlowMin:0,spaceInFlowMax:0,trackingSpaceMin:1/0,negativeSpaceMax:-1/0,notASpace:-1/0,transform:null,fontName:null,hasEOL:!1},j=[" "," "];let k=0;function saveLastChar(e){const t=(k+1)%2,n=" "!==j[k]&&" "===j[t];j[k]=e;k=t;return!u&&n}function shouldAddWhitepsace(){return!u&&" "!==j[k]&&" "===j[(k+1)%2]}function resetLastChars(){j[0]=j[1]=" ";k=0}const y=this,q=this.xref,v=[];let S=null;const x=new LocalImageCache,C=new LocalGStateCache,T=new EvaluatorPreprocessor(e,q,r);let O,R;function pushWhitespace({width:e=0,height:t=0,transform:n=w.prevTransform,fontName:a=w.fontName}){p?.addExtraChar(" ");b.items.push({str:" ",dir:"ltr",width:e,height:t,transform:n,fontName:a,hasEOL:!1})}function getCurrentTextTransform(){const e=O.font,t=[O.fontSize*O.textHScale,0,0,O.fontSize,0,O.textRise];if(e.isType3Font&&(O.fontSize<=1||e.isCharBBox)&&!isArrayEqual(O.fontMatrix,a)){const n=e.bbox[3]-e.bbox[1];n>0&&(t[3]*=n*O.fontMatrix[3])}return Util.transform(O.ctm,Util.transform(O.textMatrix,t))}function ensureTextContentItem(){if(w.initialized)return w;const{font:e,loadedName:t}=O;if(!o.has(t)){o.add(t);b.styles[t]={fontFamily:e.fallbackName,ascent:e.ascent,descent:e.descent,vertical:e.vertical};if(y.options.fontExtraProperties&&e.systemFontInfo){const n=b.styles[t];n.fontSubstitution=e.systemFontInfo.css;n.fontSubstitutionLoadedName=e.systemFontInfo.loadedName}}w.fontName=t;const n=w.transform=getCurrentTextTransform();if(e.vertical){w.width=w.totalWidth=Math.hypot(n[0],n[1]);w.height=w.totalHeight=0;w.vertical=!0}else{w.width=w.totalWidth=0;w.height=w.totalHeight=Math.hypot(n[2],n[3]);w.vertical=!1}const a=Math.hypot(O.textLineMatrix[0],O.textLineMatrix[1]),r=Math.hypot(O.ctm[0],O.ctm[1]);w.textAdvanceScale=r*a;const{fontSize:s}=O;w.trackingSpaceMin=.102*s;w.notASpace=.03*s;w.negativeSpaceMax=-.2*s;w.spaceInFlowMin=.102*s;w.spaceInFlowMax=.6*s;w.hasEOL=!1;w.initialized=!0;return w}function updateAdvanceScale(){if(!w.initialized)return;const e=Math.hypot(O.textLineMatrix[0],O.textLineMatrix[1]),t=Math.hypot(O.ctm[0],O.ctm[1])*e;if(t!==w.textAdvanceScale){if(w.vertical){w.totalHeight+=w.height*w.textAdvanceScale;w.height=0}else{w.totalWidth+=w.width*w.textAdvanceScale;w.width=0}w.textAdvanceScale=t}}function runBidiTransform(e){let t=e.str.join("");h||(t=function normalizeUnicode(e){if(!ln){ln=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu;fn=new Map([["ſt","ſt"]])}return e.replaceAll(ln,(e,t,n)=>t?t.normalize("NFKC"):fn.get(n))}(t));const n=bidi(t,-1,e.vertical);return{str:n.str,dir:n.dir,width:Math.abs(e.totalWidth),height:Math.abs(e.totalHeight),transform:e.transform,fontName:e.fontName,hasEOL:e.hasEOL}}async function handleSetFont(e,r){const s=await y.loadFont(e,r,n,t);O.loadedName=s.loadedName;O.font=s.font;O.fontMatrix=s.font.fontMatrix||a}function applyInverseRotation(e,t,n){const a=Math.hypot(n[0],n[1]);return[(n[0]*e+n[1]*t)/a,(n[2]*e+n[3]*t)/a]}function compareWithLastPosition(e){const t=getCurrentTextTransform();let n=t[4],a=t[5];if(O.font?.vertical){if(n<l[0]||n>l[2]||a+e<l[1]||a>l[3])return!1}else if(n+e<l[0]||n>l[2]||a<l[1]||a>l[3])return!1;if(!O.font||!w.prevTransform)return!0;let r=w.prevTransform[4],s=w.prevTransform[5];if(r===n&&s===a)return!0;let i=-1;t[0]&&0===t[1]&&0===t[2]?i=t[0]>0?0:180:t[1]&&0===t[0]&&0===t[3]&&(i=t[1]>0?90:270);switch(i){case 0:break;case 90:[n,a]=[a,n];[r,s]=[s,r];break;case 180:[n,a,r,s]=[-n,-a,-r,-s];break;case 270:[n,a]=[-a,-n];[r,s]=[-s,-r];break;default:[n,a]=applyInverseRotation(n,a,t);[r,s]=applyInverseRotation(r,s,w.prevTransform)}if(O.font.vertical){const e=(s-a)/w.textAdvanceScale,t=n-r,i=Math.sign(w.height||w.totalHeight);if(e<i*w.negativeSpaceMax){if(Math.abs(t)>.5*w.width){appendEOL();return!0}resetLastChars();flushTextContentItem();return!0}if(Math.abs(t)>w.width){appendEOL();return!0}e<=i*w.notASpace&&resetLastChars();if(e<=i*w.trackingSpaceMin)if(shouldAddWhitepsace()){resetLastChars();flushTextContentItem();pushWhitespace({height:Math.abs(e)})}else w.height+=e;else if(!addFakeSpaces(e,w.prevTransform,i))if(0===w.str.length){resetLastChars();pushWhitespace({height:Math.abs(e)})}else w.height+=e;Math.abs(t)>.25*w.width&&flushTextContentItem();return!0}const o=(n-r)/w.textAdvanceScale,f=a-s,c=Math.sign(w.width||w.totalWidth);if(o<c*w.negativeSpaceMax){if(Math.abs(f)>.5*w.height){appendEOL();return!0}resetLastChars();flushTextContentItem();return!0}if(Math.abs(f)>w.height){appendEOL();return!0}o<=c*w.notASpace&&resetLastChars();if(o<=c*w.trackingSpaceMin)if(shouldAddWhitepsace()){resetLastChars();flushTextContentItem();pushWhitespace({width:Math.abs(o)})}else w.width+=o;else if(!addFakeSpaces(o,w.prevTransform,c))if(0===w.str.length){resetLastChars();pushWhitespace({width:Math.abs(o)})}else w.width+=o;Math.abs(f)>.25*w.height&&flushTextContentItem();return!0}function buildTextContentItem({chars:e,extraSpacing:t}){if(R!==O&&(R.fontName!==O.fontName||R.fontSize!==O.fontSize)){flushTextContentItem();R=O.clone()}const n=O.font;if(!e){const e=O.charSpacing+t;e&&(n.vertical?O.translateTextMatrix(0,-e):O.translateTextMatrix(e*O.textHScale,0));u&&compareWithLastPosition(0);return}const a=n.charsToGlyphs(e),r=O.fontMatrix[0]*O.fontSize;for(let e=0,s=a.length;e<s;e++){const i=a[e],{category:o,originalCharCode:l}=i;if(o.isInvisibleFormatMark)continue;let f=O.charSpacing+(e+1===s?t:0),c=i.width;n.vertical&&(c=i.vmetric?i.vmetric[0]:-c);let h=c*r;32===l&&(f+=O.wordSpacing);if(!u&&o.isWhitespace){if(n.vertical){f+=-h;O.translateTextMatrix(0,-f)}else{f+=h;O.translateTextMatrix(f*O.textHScale,0)}saveLastChar(" ");continue}if(!o.isZeroWidthDiacritic&&!compareWithLastPosition(h)){n.vertical?O.translateTextMatrix(0,h):O.translateTextMatrix(h*O.textHScale,0);continue}const m=ensureTextContentItem();o.isZeroWidthDiacritic&&(h=0);if(n.vertical){p?.addGlyph(getCurrentTextTransform(),0,h,i.unicode);O.translateTextMatrix(0,h);h=Math.abs(h);m.height+=h}else{h*=O.textHScale;p?.addGlyph(getCurrentTextTransform(),h,0,i.unicode);O.translateTextMatrix(h,0);m.width+=h}h&&(m.prevTransform=getCurrentTextTransform());const d=i.unicode;if(saveLastChar(d)){m.str.push(" ");p?.addExtraChar(" ")}p||m.str.push(d);f&&(n.vertical?O.translateTextMatrix(0,-f):O.translateTextMatrix(f*O.textHScale,0))}}function appendEOL(){p?.addExtraChar("\n");resetLastChars();if(w.initialized){w.hasEOL=!0;flushTextContentItem()}else b.items.push({str:"",dir:"ltr",width:0,height:0,transform:getCurrentTextTransform(),fontName:O.loadedName,hasEOL:!0})}function addFakeSpaces(e,t,n){if(n*w.spaceInFlowMin<=e&&e<=n*w.spaceInFlowMax){if(w.initialized){resetLastChars();w.str.push(" ");p?.addExtraChar(" ")}return!1}const a=w.fontName;let r=0;if(w.vertical){r=e;e=0}flushTextContentItem();resetLastChars();pushWhitespace({width:Math.abs(e),height:Math.abs(r),transform:t||getCurrentTextTransform(),fontName:a});return!0}function flushTextContentItem(){if(w.initialized&&w.str){w.vertical?w.totalHeight+=w.height*w.textAdvanceScale:w.totalWidth+=w.width*w.textAdvanceScale;b.items.push(runBidiTransform(w));w.initialized=!1;w.str.length=0}}function enqueueChunk(e=!1){const t=b.items.length;if(0!==t&&!(e&&t<10)){i?.enqueue(b,t);b.items=[];b.styles=Object.create(null)}}const H=new TimeSlotManager;return new Promise(function promiseBody(e,a){const next=function(t){enqueueChunk(!0);Promise.all([t,i?.ready]).then(function(){try{promiseBody(e,a)}catch(e){a(e)}},a)};t.ensureNotTerminated();H.reset();const m={};let p,d,w,j=[];for(;!(p=H.check());){j.length=0;m.args=j;if(!T.read(m))break;O=r.state;R||=O.clone();const e=m.fn;j=m.args;switch(0|e){case Ge:const e=j[0].name,a=j[1];if(O.font&&e===O.fontName&&a===O.fontSize)break;O.fontName=e;O.fontSize=a;next(handleSetFont(e,null));return;case Ye:O.textRise=j[0];break;case Ke:O.textHScale=j[0]/100;break;case Ve:O.leading=j[0];break;case Je:O.translateTextLineMatrix(j[0],j[1]);O.textMatrix=O.textLineMatrix.slice();break;case Qe:O.leading=-j[1];O.translateTextLineMatrix(j[0],j[1]);O.textMatrix=O.textLineMatrix.slice();break;case et:O.carriageReturn();break;case Ze:O.setTextMatrix(j[0],j[1],j[2],j[3],j[4],j[5]);O.setTextLineMatrix(j[0],j[1],j[2],j[3],j[4],j[5]);updateAdvanceScale();break;case Xe:O.charSpacing=j[0];break;case We:O.wordSpacing=j[0];break;case Le:O.textMatrix=wn.slice();O.textLineMatrix=wn.slice();break;case nt:if(!r.state.font){y.ensureStateFont(r.state);continue}const m=(O.font.vertical?1:-1)*O.fontSize/1e3,p=j[0];for(let e=0,t=p.length;e<t;e++){const t=p[e];if("string"==typeof t)v.push(t);else if("number"==typeof t&&0!==t){const e=v.join("");v.length=0;buildTextContentItem({chars:e,extraSpacing:t*m})}}if(v.length>0){const e=v.join("");v.length=0;buildTextContentItem({chars:e,extraSpacing:0})}break;case tt:if(!r.state.font){y.ensureStateFont(r.state);continue}buildTextContentItem({chars:j[0],extraSpacing:0});break;case rt:if(!r.state.font){y.ensureStateFont(r.state);continue}O.carriageReturn();buildTextContentItem({chars:j[0],extraSpacing:0});break;case st:if(!r.state.font){y.ensureStateFont(r.state);continue}O.wordSpacing=j[0];O.charSpacing=j[1];O.carriageReturn();buildTextContentItem({chars:j[2],extraSpacing:0});break;case St:flushTextContentItem();S??=n.get("XObject")||Dict.empty;w=j[0]instanceof Name;d=j[0].name;if(w&&x.getByName(d))break;next(new Promise(function(e,a){if(!w)throw new FormatError("XObject must be referred to by name.");let m=S.getRaw(d);if(m instanceof Ref){if(x.getByRef(m)){e();return}if(y.globalImageCache.getData(m,y.pageIndex)){e();return}m=q.fetch(m)}if(!(m instanceof BaseStream))throw new FormatError("XObject should be a stream");const{dict:p}=m,b=p.get("Subtype");if(!(b instanceof Name))throw new FormatError("XObject should have a Name subtype");if("Form"!==b.name){x.set(d,p.objId,!0);e();return}const j=r.state.clone(),k=new StateManager(j),v=lookupMatrix(p.getArray("Matrix"),null);v&&k.transform(v);const C=p.get("Resources");enqueueChunk();const T={enqueueInvoked:!1,enqueue(e,t){this.enqueueInvoked=!0;i.enqueue(e,t)},get desiredSize(){return i.desiredSize??0},get ready(){return i.ready}};y.getTextContent({stream:m,task:t,resources:C instanceof Dict?C:n,stateManager:k,includeMarkedContent:s,sink:i&&T,seenStyles:o,viewBox:l,lang:f,markedContentData:c,disableNormalization:h,keepWhiteSpace:u,prevRefs:g}).then(function(){T.enqueueInvoked||x.set(d,p.objId,!0);e()},a)}).catch(function(e){if(!(e instanceof AbortException)){if(!y.options.ignoreErrors)throw e;warn(`getTextContent - ignoring XObject: "${e}".`)}}));return;case ke:w=j[0]instanceof Name;d=j[0].name;if(w&&C.getByName(d))break;next(new Promise(function(e,t){if(!w)throw new FormatError("GState must be referred to by name.");const a=n.get("ExtGState");if(!(a instanceof Dict))throw new FormatError("ExtGState should be a dictionary.");const r=a.get(d);if(!(r instanceof Dict))throw new FormatError("GState should be a dictionary.");const s=r.get("Font");if(s){flushTextContentItem();O.fontName=null;O.fontSize=s[1];handleSetFont(null,s[0]).then(e,t)}else{C.set(d,r.objId,!0);e()}}).catch(function(e){if(!(e instanceof AbortException)){if(!y.options.ignoreErrors)throw e;warn(`getTextContent - ignoring ExtGState: "${e}".`)}}));return;case Ct:flushTextContentItem();if(s){c.level++;b.items.push({type:"beginMarkedContent",tag:j[0]instanceof Name?j[0].name:null})}break;case It:flushTextContentItem();if(s){c.level++;let e=null;j[1]instanceof Dict&&(e=j[1].get("MCID"));b.items.push({type:"beginMarkedContentProps",id:Number.isInteger(e)?`${y.idFactory.getPageObjId()}_mc${e}`:null,tag:j[0]instanceof Name?j[0].name:null})}break;case Ft:flushTextContentItem();if(s){if(0===c.level)break;c.level--;b.items.push({type:"endMarkedContent"})}break;case qe:r.restore();break;case ye:r.save()}if(b.items.length>=(i?.desiredSize??1)){p=!0;break}}if(p)next(As);else{flushTextContentItem();enqueueChunk();e()}}).catch(e=>{if(!(e instanceof AbortException)){if(!this.options.ignoreErrors)throw e;warn(`getTextContent - ignoring errors during "${t.name}" task: "${e}".`);flushTextContentItem();enqueueChunk()}})}async extractDataStructures(e,t){const n=this.xref;let a;const r=this.readToUnicode(t.toUnicode);if(t.composite){const n=e.get("CIDSystemInfo");n instanceof Dict&&!t.cidSystemInfo&&(t.cidSystemInfo={registry:stringToPDFString(n.get("Registry")),ordering:stringToPDFString(n.get("Ordering")),supplement:n.get("Supplement")});try{const t=e.get("CIDToGIDMap");t instanceof BaseStream&&(a=t.getBytes())}catch(e){if(!this.options.ignoreErrors)throw e;warn(`extractDataStructures - ignoring CIDToGIDMap data: "${e}".`)}}const s=[];let i,o=null;if(e.has("Encoding")){i=e.get("Encoding");if(i instanceof Dict){o=i.get("BaseEncoding");o=o instanceof Name?o.name:null;if(i.has("Differences")){const e=i.get("Differences");let t=0;for(const a of e){const e=n.fetchIfRef(a);if("number"==typeof e)t=e;else{if(!(e instanceof Name))throw new FormatError(`Invalid entry in 'Differences' array: ${e}`);s[t++]=e.name}}}}else if(i instanceof Name)o=i.name;else{const e="Encoding is not a Name nor a Dict";if(!this.options.ignoreErrors)throw new FormatError(e);warn(e)}"MacRomanEncoding"!==o&&"MacExpertEncoding"!==o&&"WinAnsiEncoding"!==o&&(o=null)}const l=!t.file||t.isInternalFont,f=Va()[t.name];o&&l&&f&&(o=null);if("WinAnsiEncoding"===o&&l&&t.name?.charCodeAt(0)>=183){const e=t.name;if(["ËÎÌå","ºÚÌå","¿¬Ìå","·ÂËÎ","¿¬Ìå_GB2312","·ÂËÎ_GB2312","Á¥Êé","ÐÂËÎ"].includes(e)){o=null;t.defaultEncoding="Adobe-GB1-UCS2";t.composite=!0;t.cidEncoding=Name.get("GBK-EUC-H");const e=await CMapFactory.create({encoding:t.cidEncoding,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});t.cMap=e;t.vertical=t.cMap.vertical;t.cidSystemInfo={registry:"Adobe",ordering:"GB1",supplement:0}}}if(o)t.defaultEncoding=getEncoding(o);else{let e=!!(t.flags&Fa);const n=!!(t.flags&Ta);if("TrueType"===t.type&&e&&n&&0!==s.length){t.flags&=~Fa;e=!1}i=ga;"TrueType"!==t.type||n||(i=ba);if(e||f){i=da;l&&(/Symbol/i.test(t.name)?i=wa:/Dingbats/i.test(t.name)?i=ja:/Wingdings/i.test(t.name)&&(i=ba))}t.defaultEncoding=i}t.differences=s;t.baseEncodingName=o;t.hasEncoding=!!o||s.length>0;t.dict=e;t.toUnicode=await r;const c=await this.buildToUnicode(t);t.toUnicode=c;a&&(t.cidToGidMap=this.readCidToGidMap(a,c));return t}_simpleFontToUnicode(e,t=!1){assert(!e.composite,"Must be a simple font.");const n=[],a=e.defaultEncoding.slice(),r=e.baseEncodingName,s=e.differences;for(const e in s){const t=s[e];".notdef"!==t&&(a[e]=t)}const i=ka();for(const s in a){let o=a[s];if(""===o)continue;let l=i[o];if(void 0!==l){n[s]=String.fromCharCode(l);continue}let f=0;switch(o[0]){case"G":3===o.length&&(f=parseInt(o.substring(1),16));break;case"g":5===o.length&&(f=parseInt(o.substring(1),16));break;case"C":case"c":if(o.length>=3&&o.length<=4){const n=o.substring(1);if(t){f=parseInt(n,16);break}f=+n;if(Number.isNaN(f)&&Number.isInteger(parseInt(n,16)))return this._simpleFontToUnicode(e,!0)}break;case"u":l=getUnicodeForGlyph(o,i);-1!==l&&(f=l);break;default:switch(o){case"f_h":case"f_t":case"T_h":n[s]=o.replaceAll("_","");continue}}if(f>0&&f<=1114111&&Number.isInteger(f)){if(r&&f===+s){const e=getEncoding(r);if(e&&(o=e[s])){n[s]=String.fromCharCode(i[o]);continue}}n[s]=String.fromCodePoint(f)}}return n}async buildToUnicode(e){e.hasIncludedToUnicodeMap=e.toUnicode?.length>0;if(e.hasIncludedToUnicodeMap){!e.composite&&e.hasEncoding&&(e.fallbackToUnicode=this._simpleFontToUnicode(e));return e.toUnicode}if(!e.composite)return new ToUnicodeMap(this._simpleFontToUnicode(e));if(e.composite&&(e.cMap.builtInCMap&&!(e.cMap instanceof IdentityCMap)||"Adobe"===e.cidSystemInfo?.registry&&("GB1"===e.cidSystemInfo.ordering||"CNS1"===e.cidSystemInfo.ordering||"Japan1"===e.cidSystemInfo.ordering||"Korea1"===e.cidSystemInfo.ordering))){const{registry:t,ordering:n}=e.cidSystemInfo,a=Name.get(`${t}-${n}-UCS2`),r=await CMapFactory.create({encoding:a,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}),s=[],i=[];e.cMap.forEach(function(e,t){if(t>65535)throw new FormatError("Max size of CID is 65,535");const n=r.lookup(t);if(n){i.length=0;for(let e=0,t=n.length;e<t;e+=2)i.push((n.charCodeAt(e)<<8)+n.charCodeAt(e+1));s[e]=String.fromCharCode(...i)}});return new ToUnicodeMap(s)}return new IdentityToUnicodeMap(e.firstChar,e.lastChar)}async readToUnicode(e){if(!e)return null;if(e instanceof Name){const t=await CMapFactory.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});return t instanceof IdentityCMap?new IdentityToUnicodeMap(0,65535):new ToUnicodeMap(t.getMap())}if(e instanceof BaseStream)try{const t=await CMapFactory.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});if(t instanceof IdentityCMap)return new IdentityToUnicodeMap(0,65535);const n=new Array(t.length);t.forEach(function(e,t){if("number"==typeof t){n[e]=String.fromCodePoint(t);return}t.length%2!=0&&(t="\0"+t);const a=[];for(let e=0;e<t.length;e+=2){const n=t.charCodeAt(e)<<8|t.charCodeAt(e+1);if(55296!=(63488&n)){a.push(n);continue}e+=2;const r=t.charCodeAt(e)<<8|t.charCodeAt(e+1);a.push(((1023&n)<<10)+(1023&r)+65536)}n[e]=String.fromCodePoint(...a)});return new ToUnicodeMap(n)}catch(e){if(e instanceof AbortException)return null;if(this.options.ignoreErrors){warn(`readToUnicode - ignoring ToUnicode data: "${e}".`);return null}throw e}return null}readCidToGidMap(e,t){const n=[];for(let a=0,r=e.length;a<r;a++){const r=e[a++]<<8|e[a],s=a>>1;(0!==r||t.has(s))&&(n[s]=r)}return n}extractWidths(e,t,n){const a=this.xref;let r=[],s=0;const i=[];let o;if(n.composite){const t=e.get("DW");s="number"==typeof t?Math.ceil(t):1e3;const l=e.get("W");if(Array.isArray(l))for(let e=0,t=l.length;e<t;e++){let t=a.fetchIfRef(l[e++]);if(!Number.isInteger(t))break;const n=a.fetchIfRef(l[e]);if(Array.isArray(n))for(const e of n){const n=a.fetchIfRef(e);"number"==typeof n&&(r[t]=n);t++}else{if(!Number.isInteger(n))break;{const s=a.fetchIfRef(l[++e]);if("number"!=typeof s)continue;for(let e=t;e<=n;e++)r[e]=s}}}if(n.vertical){const t=e.getArray("DW2");let n=isNumberArray(t,2)?t:[880,-1e3];o=[n[1],.5*s,n[0]];n=e.get("W2");if(Array.isArray(n))for(let e=0,t=n.length;e<t;e++){let t=a.fetchIfRef(n[e++]);if(!Number.isInteger(t))break;const r=a.fetchIfRef(n[e]);if(Array.isArray(r))for(let e=0,n=r.length;e<n;e++){const n=[a.fetchIfRef(r[e++]),a.fetchIfRef(r[e++]),a.fetchIfRef(r[e])];isNumberArray(n,null)&&(i[t]=n);t++}else{if(!Number.isInteger(r))break;{const s=[a.fetchIfRef(n[++e]),a.fetchIfRef(n[++e]),a.fetchIfRef(n[++e])];if(!isNumberArray(s,null))continue;for(let e=t;e<=r;e++)i[e]=s}}}}}else{const i=e.get("Widths");if(Array.isArray(i)){let e=n.firstChar;for(const t of i){const n=a.fetchIfRef(t);"number"==typeof n&&(r[e]=n);e++}const o=t.get("MissingWidth");s="number"==typeof o?o:0}else{const t=e.get("BaseFont");if(t instanceof Name){const e=this.getBaseFontMetrics(t.name);r=this.buildCharCodeToWidth(e.widths,n);s=e.defaultWidth}}}let l=!0,f=s;for(const e in r){const t=r[e];if(t)if(f){if(f!==t){l=!1;break}}else f=t}l?n.flags|=Ca:n.flags&=~Ca;n.defaultWidth=s;n.widths=r;n.defaultVMetrics=o;n.vmetrics=i}isSerifFont(e){const t=e.split("-",1)[0];return t in Ka()||/serif/gi.test(t)}getBaseFontMetrics(e){let t=0,n=Object.create(null),a=!1,r=normalizeFontName(e);r=Ua()[r]||r;const s=Ja(),i=s[r]??s[this.isSerifFont(e)?"Times-Roman":"Helvetica"];if("number"==typeof i){t=i;a=!0}else n=i();return{defaultWidth:t,monospace:a,widths:n}}buildCharCodeToWidth(e,t){const n=Object.create(null),a=t.differences,r=t.defaultEncoding;for(let t=0;t<256;t++)t in a&&e[a[t]]?n[t]=e[a[t]]:t in r&&e[r[t]]&&(n[t]=e[r[t]]);return n}preEvaluateFont(e){const t=e;let n=e.get("Subtype");if(!(n instanceof Name))throw new FormatError("invalid font Subtype");let a,r=!1;if("Type0"===n.name){const t=e.get("DescendantFonts");if(!t)throw new FormatError("Descendant fonts are not specified");if(!((e=Array.isArray(t)?this.xref.fetchIfRef(t[0]):t)instanceof Dict))throw new FormatError("Descendant font is not a dictionary.");n=e.get("Subtype");if(!(n instanceof Name))throw new FormatError("invalid font Subtype");r=!0}let s=e.get("FirstChar");Number.isInteger(s)||(s=0);let i=e.get("LastChar");Number.isInteger(i)||(i=r?65535:255);const o=e.get("FontDescriptor"),l=e.get("ToUnicode")||t.get("ToUnicode");if(o){a=new MurmurHash3_64;const n=t.getRaw("Encoding");if(n instanceof Name)a.update(n.name);else if(n instanceof Ref)a.update(n.toString());else if(n instanceof Dict)for(const e of n.getRawValues())if(e instanceof Name)a.update(e.name);else if(e instanceof Ref)a.update(e.toString());else if(Array.isArray(e)){const t=e.length,n=new Array(t);for(let a=0;a<t;a++){const t=e[a];t instanceof Name?n[a]=t.name:("number"==typeof t||t instanceof Ref)&&(n[a]=t.toString())}a.update(n.join())}a.update(`${s}-${i}`);if(l instanceof BaseStream){const e=l.stream||l,t=e.buffer?new Uint8Array(e.buffer.buffer,0,e.bufferLength):new Uint8Array(e.bytes.buffer,e.start,e.end-e.start);a.update(t)}else l instanceof Name&&a.update(l.name);const o=e.get("Widths")||t.get("Widths");if(Array.isArray(o)){const e=[];for(const t of o)("number"==typeof t||t instanceof Ref)&&e.push(t.toString());a.update(e.join())}if(r){a.update("compositeFont");const n=e.get("W")||t.get("W");if(Array.isArray(n)){const e=[];for(const t of n)if("number"==typeof t||t instanceof Ref)e.push(t.toString());else if(Array.isArray(t)){const n=[];for(const e of t)("number"==typeof e||e instanceof Ref)&&n.push(e.toString());e.push(`[${n.join()}]`)}a.update(e.join())}const r=e.getRaw("CIDToGIDMap")||t.getRaw("CIDToGIDMap");r instanceof Name?a.update(r.name):r instanceof Ref?a.update(r.toString()):r instanceof BaseStream&&a.update(r.peekBytes())}}return{descriptor:o,dict:e,baseDict:t,composite:r,type:n.name,firstChar:s,lastChar:i,toUnicode:l,hash:a?a.hexdigest():""}}async translateFont({descriptor:e,dict:t,baseDict:n,composite:r,type:s,firstChar:i,lastChar:o,toUnicode:l,cssFontInfo:f}){const c="Type3"===s;if(!e){if(!c){let e=t.get("BaseFont");if(!(e instanceof Name))throw new FormatError("Base font is not specified");e=normalizeFontName(e.name);const a=this.getBaseFontMetrics(e),r=e.split("-",1)[0],f=(this.isSerifFont(r)?Ia:0)|(a.monospace?Ca:0)|(Va()[r]?Fa:Ta),h={type:s,name:e,loadedName:n.loadedName,systemFontInfo:null,widths:a.widths,defaultWidth:a.defaultWidth,isSimulatedFlags:!0,flags:f,firstChar:i,lastChar:o,toUnicode:l,xHeight:0,capHeight:0,italicAngle:0,isType3Font:c},u=t.get("Widths"),m=getStandardFontName(e);let p=null;if(m){p=await this.fetchStandardFontData(m);h.isInternalFont=!!p}!h.isInternalFont&&this.options.useSystemFonts&&(h.systemFontInfo=getFontSubstitution(this.systemFontCache,this.idFactory,this.options.standardFontDataUrl,e,m,s));const d=await this.extractDataStructures(t,h);if(Array.isArray(u)){const e=[];let t=i;for(const n of u){const a=this.xref.fetchIfRef(n);"number"==typeof a&&(e[t]=a);t++}d.widths=e}else d.widths=this.buildCharCodeToWidth(a.widths,d);return new Font(e,p,d,this.options)}e=Dict.empty}let h=e.get("FontName"),u=t.get("BaseFont");"string"==typeof h&&(h=Name.get(h));"string"==typeof u&&(u=Name.get(u));const m=h?.name,p=u?.name;if(c)m||(h=Name.get(s));else if(m!==p){info(`The FontDescriptor's FontName is "${m}" but should be the same as the Font's BaseFont "${p}".`);m&&p&&(p.startsWith(m)||!isKnownFontName(m)&&isKnownFontName(p))&&(h=null);h||=u}if(!(h instanceof Name))throw new FormatError("invalid font name");let d,g,b,w,j;try{d=e.get("FontFile","FontFile2","FontFile3");if(d){if(!(d instanceof BaseStream))throw new FormatError("FontFile should be a stream");if(d.isAsync){const e=await d.asyncGetBytes();e&&(d=new Stream(e,0,e.length,d.dict))}if(d.isEmpty)throw new FormatError("FontFile is empty")}}catch(e){if(!this.options.ignoreErrors)throw e;warn(`translateFont - fetching "${h.name}" font file: "${e}".`);d=null}let k=!1,y=null,q=null;if(d){if(d.dict){const e=d.dict.get("Subtype");e instanceof Name&&(g=e.name);b=d.dict.get("Length1");w=d.dict.get("Length2");j=d.dict.get("Length3")}}else if(f){const e=getXfaFontName(h.name);if(e){f.fontFamily=`${f.fontFamily}-PdfJS-XFA`;f.metrics=e.metrics||null;y=e.factors||null;d=await this.fetchStandardFontData(e.name);k=!!d;n=t=getXfaFontDict(h.name);r=!0}}else if(!c){const e=getStandardFontName(h.name);if(e){d=await this.fetchStandardFontData(e);k=!!d}!k&&this.options.useSystemFonts&&(q=getFontSubstitution(this.systemFontCache,this.idFactory,this.options.standardFontDataUrl,h.name,e,s))}const v=lookupMatrix(t.getArray("FontMatrix"),a),S=lookupNormalRect(e.getArray("FontBBox")||t.getArray("FontBBox"),c?[0,0,0,0]:void 0);let x=e.get("Ascent");"number"!=typeof x&&(x=void 0);let C=e.get("Descent");"number"!=typeof C&&(C=void 0);let T=e.get("XHeight");"number"!=typeof T&&(T=0);let O=e.get("CapHeight");"number"!=typeof O&&(O=0);let R=e.get("Flags");Number.isInteger(R)||(R=0);let H=e.get("ItalicAngle");"number"!=typeof H&&(H=0);const D={type:s,name:h.name,subtype:g,file:d,length1:b,length2:w,length3:j,isInternalFont:k,loadedName:n.loadedName,composite:r,fixedPitch:!1,fontMatrix:v,firstChar:i,lastChar:o,toUnicode:l,bbox:S,ascent:x,descent:C,xHeight:T,capHeight:O,flags:R,italicAngle:H,isType3Font:c,cssFontInfo:f,scaleFactors:y,systemFontInfo:q};if(r){const e=n.get("Encoding");e instanceof Name&&(D.cidEncoding=e.name);const t=await CMapFactory.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});D.cMap=t;D.vertical=D.cMap.vertical}const M=await this.extractDataStructures(t,D);this.extractWidths(t,e,M);return new Font(h.name,d,M,this.options)}static buildFontPaths(e,t,n,a){function buildPath(t){const r=`${e.loadedName}_path_${t}`;try{if(e.renderer.hasBuiltPath(t))return;const a=FontPathInfo.write(e.renderer.getPathJs(t));n.send("commonobj",[r,"FontPath",a],[a])}catch(e){if(a.ignoreErrors){warn(`buildFontPaths - ignoring ${r} glyph: "${e}".`);return}throw e}}for(const e of t){buildPath(e.fontChar);const t=e.accent;t?.fontChar&&buildPath(t.fontChar)}}static get fallbackFontDict(){const e=new Dict;e.set("BaseFont",Name.get("Helvetica"));e.set("Type",Name.get("FallbackType"));e.set("Subtype",Name.get("FallbackType"));e.set("Encoding",Name.get("WinAnsiEncoding"));return shadow(this,"fallbackFontDict",e)}}class TranslatedFont{#ue=!1;#me=null;constructor({loadedName:e,font:t,dict:n}){this.loadedName=e;this.font=t;this.dict=n;this.type3Dependencies=t.isType3Font?new Set:null}send(e){if(this.#ue)return;this.#ue=!0;const t=this.font.exportData(),n=[];if(t.data){t.data.charProcOperatorList&&(t.charProcOperatorList=t.data.charProcOperatorList);t.data=FontInfo.write(t.data);n.push(t.data)}e.send("commonobj",[this.loadedName,"Font",t],n)}fallback(e,t){if(this.font.data){this.font.disableFontFace=!0;PartialEvaluator.buildFontPaths(this.font,this.font.glyphCacheValues,e,t)}}loadType3Data(e,t,n){if(this.#me)return this.#me;const{font:a,type3Dependencies:r}=this;assert(a.isType3Font,"Must be a Type3 font.");const s=e.clone({ignoreErrors:!1}),i=new RefSet(e.type3FontRefs);this.dict.objId&&!i.has(this.dict.objId)&&i.put(this.dict.objId);s.type3FontRefs=i;let o=Promise.resolve();const l=this.dict.get("CharProcs"),f=this.dict.get("Resources")||t,c=Object.create(null),[h,u,m,p]=a.bbox,d=m-h,g=p-u,b=Math.hypot(d,g);for(const e of l.getKeys())o=o.then(()=>{const t=l.get(e),a=new OperatorList;return s.getOperatorList({stream:t,task:n,resources:f,operatorList:a}).then(()=>{switch(a.fnArray[0]){case ot:this.#pe(a,b);break;case it:b||this.#de(a)}c[e]=a.getIR();for(const e of a.dependencies)r.add(e)}).catch(function(t){warn(`Type3 font resource "${e}" is not available.`);const n=new OperatorList;c[e]=n.getIR()})});this.#me=o.then(()=>{a.charProcOperatorList=c;if(this._bbox){a.isCharBBox=!0;a.bbox=this._bbox}});return this.#me}#pe(e,t=NaN){const n=Util.normalizeRect(e.argsArray[0].slice(2)),a=n[2]-n[0],r=n[3]-n[1],s=Math.hypot(a,r);if(0===a||0===r){e.fnArray.splice(0,1);e.argsArray.splice(0,1)}else if(0===t||Math.round(s/t)>=10){this._bbox??=[1/0,1/0,-1/0,-1/0];Util.rectBoundingBox(...n,this._bbox)}let i=0,o=e.length;for(;i<o;){switch(e.fnArray[i]){case ot:break;case lt:case ft:case ct:case ht:case ut:case mt:case pt:case dt:case gt:case bt:case wt:case jt:case kt:case we:e.fnArray.splice(i,1);e.argsArray.splice(i,1);o--;continue;case ke:const[t]=e.argsArray[i];let n=0,a=t.length;for(;n<a;){const[e]=t[n];switch(e){case"TR":case"TR2":case"HT":case"BG":case"BG2":case"UCR":case"UCR2":t.splice(n,1);a--;continue}n++}}i++}}#de(e){let t=1;const n=e.length;for(;t<n;){if(e.fnArray[t]===Kt){const n=e.argsArray[t][2];this._bbox??=[1/0,1/0,-1/0,-1/0];Util.rectBoundingBox(...n,this._bbox)}t++}}}class StateManager{constructor(e=new EvalState){this.state=e;this.stateStack=[]}save(){const e=this.state;this.stateStack.push(this.state);this.state=e.clone()}restore(){const e=this.stateStack.pop();e&&(this.state=e)}transform(e){this.state.ctm=Util.transform(this.state.ctm,e)}}class TextState{ctm=new Float32Array(wn);fontName=null;fontSize=0;loadedName=null;font=null;fontMatrix=a;textMatrix=wn.slice();textLineMatrix=wn.slice();charSpacing=0;wordSpacing=0;leading=0;textHScale=1;textRise=0;setTextMatrix(e,t,n,a,r,s){const i=this.textMatrix;i[0]=e;i[1]=t;i[2]=n;i[3]=a;i[4]=r;i[5]=s}setTextLineMatrix(e,t,n,a,r,s){const i=this.textLineMatrix;i[0]=e;i[1]=t;i[2]=n;i[3]=a;i[4]=r;i[5]=s}translateTextMatrix(e,t){const n=this.textMatrix;n[4]=n[0]*e+n[2]*t+n[4];n[5]=n[1]*e+n[3]*t+n[5]}translateTextLineMatrix(e,t){const n=this.textLineMatrix;n[4]=n[0]*e+n[2]*t+n[4];n[5]=n[1]*e+n[3]*t+n[5]}carriageReturn(){this.translateTextLineMatrix(0,-this.leading);this.textMatrix=this.textLineMatrix.slice()}clone(){const e=Object.assign(Object.create(this),this);e.textMatrix=this.textMatrix.slice();e.textLineMatrix=this.textLineMatrix.slice();e.fontMatrix=this.fontMatrix.slice();return e}}class EvalState{ctm=new Float32Array(wn);font=null;textRenderingMode=x;_fillColorSpace=ColorSpaceUtils.gray;_strokeColorSpace=ColorSpaceUtils.gray;patternFillColorSpace=null;patternStrokeColorSpace=null;currentPointX=0;currentPointY=0;pathMinMax=new Float32Array([1/0,1/0,-1/0,-1/0]);pathBuffer=[];get fillColorSpace(){return this._fillColorSpace}set fillColorSpace(e){this._fillColorSpace=this.patternFillColorSpace=e}get strokeColorSpace(){return this._strokeColorSpace}set strokeColorSpace(e){this._strokeColorSpace=this.patternStrokeColorSpace=e}clone({newPath:e=!1}={}){const t=Object.create(this);if(e){t.pathBuffer=[];t.pathMinMax=new Float32Array([1/0,1/0,-1/0,-1/0])}return t}}class EvaluatorPreprocessor{static get opMap(){return shadow(this,"opMap",Object.assign(Object.create(null),{w:{id:me,numArgs:1,variableArgs:!1},J:{id:pe,numArgs:1,variableArgs:!1},j:{id:de,numArgs:1,variableArgs:!1},M:{id:ge,numArgs:1,variableArgs:!1},d:{id:be,numArgs:2,variableArgs:!1},ri:{id:we,numArgs:1,variableArgs:!1},i:{id:je,numArgs:1,variableArgs:!1},gs:{id:ke,numArgs:1,variableArgs:!1},q:{id:ye,numArgs:0,variableArgs:!1},Q:{id:qe,numArgs:0,variableArgs:!1},cm:{id:ve,numArgs:6,variableArgs:!1},m:{id:Se,numArgs:2,variableArgs:!1},l:{id:xe,numArgs:2,variableArgs:!1},c:{id:Ae,numArgs:6,variableArgs:!1},v:{id:Ce,numArgs:4,variableArgs:!1},y:{id:Ie,numArgs:4,variableArgs:!1},h:{id:Fe,numArgs:0,variableArgs:!1},re:{id:Te,numArgs:4,variableArgs:!1},S:{id:Oe,numArgs:0,variableArgs:!1},s:{id:Re,numArgs:0,variableArgs:!1},f:{id:Be,numArgs:0,variableArgs:!1},F:{id:Be,numArgs:0,variableArgs:!1},"f*":{id:He,numArgs:0,variableArgs:!1},B:{id:De,numArgs:0,variableArgs:!1},"B*":{id:Me,numArgs:0,variableArgs:!1},b:{id:Pe,numArgs:0,variableArgs:!1},"b*":{id:Ee,numArgs:0,variableArgs:!1},n:{id:Ne,numArgs:0,variableArgs:!1},W:{id:ze,numArgs:0,variableArgs:!1},"W*":{id:_e,numArgs:0,variableArgs:!1},BT:{id:Le,numArgs:0,variableArgs:!1},ET:{id:Ue,numArgs:0,variableArgs:!1},Tc:{id:Xe,numArgs:1,variableArgs:!1},Tw:{id:We,numArgs:1,variableArgs:!1},Tz:{id:Ke,numArgs:1,variableArgs:!1},TL:{id:Ve,numArgs:1,variableArgs:!1},Tf:{id:Ge,numArgs:2,variableArgs:!1},Tr:{id:$e,numArgs:1,variableArgs:!1},Ts:{id:Ye,numArgs:1,variableArgs:!1},Td:{id:Je,numArgs:2,variableArgs:!1},TD:{id:Qe,numArgs:2,variableArgs:!1},Tm:{id:Ze,numArgs:6,variableArgs:!1},"T*":{id:et,numArgs:0,variableArgs:!1},Tj:{id:tt,numArgs:1,variableArgs:!1},TJ:{id:nt,numArgs:1,variableArgs:!1},"'":{id:rt,numArgs:1,variableArgs:!1},'"':{id:st,numArgs:3,variableArgs:!1},d0:{id:it,numArgs:2,variableArgs:!1},d1:{id:ot,numArgs:6,variableArgs:!1},CS:{id:lt,numArgs:1,variableArgs:!1},cs:{id:ft,numArgs:1,variableArgs:!1},SC:{id:ct,numArgs:4,variableArgs:!0},SCN:{id:ht,numArgs:33,variableArgs:!0},sc:{id:ut,numArgs:4,variableArgs:!0},scn:{id:mt,numArgs:33,variableArgs:!0},G:{id:pt,numArgs:1,variableArgs:!1},g:{id:dt,numArgs:1,variableArgs:!1},RG:{id:gt,numArgs:3,variableArgs:!1},rg:{id:bt,numArgs:3,variableArgs:!1},K:{id:wt,numArgs:4,variableArgs:!1},k:{id:jt,numArgs:4,variableArgs:!1},sh:{id:kt,numArgs:1,variableArgs:!1},BI:{id:yt,numArgs:0,variableArgs:!1},ID:{id:qt,numArgs:0,variableArgs:!1},EI:{id:vt,numArgs:1,variableArgs:!1},Do:{id:St,numArgs:1,variableArgs:!1},MP:{id:xt,numArgs:1,variableArgs:!1},DP:{id:At,numArgs:2,variableArgs:!1},BMC:{id:Ct,numArgs:1,variableArgs:!1},BDC:{id:It,numArgs:2,variableArgs:!1},EMC:{id:Ft,numArgs:0,variableArgs:!1},BX:{id:Tt,numArgs:0,variableArgs:!1},EX:{id:Ot,numArgs:0,variableArgs:!1},BM:null,BD:null,true:null,fa:null,fal:null,fals:null,false:null,nu:null,nul:null,null:null}))}static MAX_INVALID_PATH_OPS=10;constructor(e,t,n=new StateManager){this.parser=new Parser({lexer:new Lexer(e,EvaluatorPreprocessor.opMap),xref:t});this.stateManager=n;this.nonProcessedArgs=[];this._isPathOp=!1;this._numInvalidPathOPS=0}get savedStatesDepth(){return this.stateManager.stateStack.length}read(e){let t=e.args;for(;;){const n=this.parser.getObj();if(n instanceof Cmd){const a=n.cmd,r=EvaluatorPreprocessor.opMap[a];if(!r){warn(`Unknown command "${a}".`);continue}const s=r.id,i=r.numArgs;let o=null!==t?t.length:0;this._isPathOp||(this._numInvalidPathOPS=0);this._isPathOp=s>=Se&&s<=Ne;if(r.variableArgs)o>i&&info(`Command ${a}: expected [0, ${i}] args, but received ${o} args.`);else{if(o!==i){const e=this.nonProcessedArgs;for(;o>i;){e.push(t.shift());o--}for(;o<i&&0!==e.length;){null===t&&(t=[]);t.unshift(e.pop());o++}}if(o<i){const e=`command ${a}: expected ${i} args, but received ${o} args.`;if(this._isPathOp&&++this._numInvalidPathOPS>EvaluatorPreprocessor.MAX_INVALID_PATH_OPS)throw new FormatError(`Invalid ${e}`);warn(`Skipping ${e}`);null!==t&&(t.length=0);continue}}this.preprocessCommand(s,t);e.fn=s;e.args=t;return!0}if(n===hn)return!1;if(null!==n){null===t&&(t=[]);t.push(n);if(t.length>33)throw new FormatError("Too many arguments")}}}preprocessCommand(e,t){switch(0|e){case ye:this.stateManager.save();break;case qe:this.stateManager.restore();break;case ve:this.stateManager.transform(t)}}}class DefaultAppearanceEvaluator extends EvaluatorPreprocessor{constructor(e){super(new StringStream(e))}parse(){const e={fn:0,args:[]},t={fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3)};try{for(;;){e.args.length=0;if(!this.read(e))break;if(0!==this.savedStatesDepth)continue;const{fn:n,args:a}=e;switch(0|n){case Ge:const[e,n]=a;e instanceof Name&&(t.fontName=e.name);"number"==typeof n&&n>0&&(t.fontSize=n);break;case bt:ColorSpaceUtils.rgb.getRgbItem(a,0,t.fontColor,0);break;case dt:ColorSpaceUtils.gray.getRgbItem(a,0,t.fontColor,0);break;case jt:ColorSpaceUtils.cmyk.getRgbItem(a,0,t.fontColor,0)}}}catch(e){warn(`parseDefaultAppearance - ignoring errors: "${e}".`)}return t}}function parseDefaultAppearance(e){return new DefaultAppearanceEvaluator(e).parse()}class AppearanceStreamEvaluator extends EvaluatorPreprocessor{constructor(e,t,n,a){super(e);this.stream=e;this.evaluatorOptions=t;this.xref=n;this.globalColorSpaceCache=a;this.resources=e.dict?.get("Resources")}parse(){const e={fn:0,args:[]};let t={scaleFactor:1,fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3),fillColorSpace:ColorSpaceUtils.gray},n=!1;const a=[];try{for(;;){e.args.length=0;if(n||!this.read(e))break;const{fn:r,args:s}=e;switch(0|r){case ye:a.push({scaleFactor:t.scaleFactor,fontSize:t.fontSize,fontName:t.fontName,fontColor:t.fontColor.slice(),fillColorSpace:t.fillColorSpace});break;case qe:t=a.pop()||t;break;case Ze:t.scaleFactor*=Math.hypot(s[0],s[1]);break;case Ge:const[e,r]=s;e instanceof Name&&(t.fontName=e.name);"number"==typeof r&&r>0&&(t.fontSize=r*t.scaleFactor);break;case ft:t.fillColorSpace=ColorSpaceUtils.parse({cs:s[0],xref:this.xref,resources:this.resources,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:this._localColorSpaceCache});break;case ut:t.fillColorSpace.getRgbItem(s,0,t.fontColor,0);break;case bt:ColorSpaceUtils.rgb.getRgbItem(s,0,t.fontColor,0);break;case dt:ColorSpaceUtils.gray.getRgbItem(s,0,t.fontColor,0);break;case jt:ColorSpaceUtils.cmyk.getRgbItem(s,0,t.fontColor,0);break;case tt:case nt:case rt:case st:n=!0}}}catch(e){warn(`parseAppearanceStream - ignoring errors: "${e}".`)}this.stream.reset();delete t.scaleFactor;delete t.fillColorSpace;return t}get _localColorSpaceCache(){return shadow(this,"_localColorSpaceCache",new LocalColorSpaceCache)}get _pdfFunctionFactory(){return shadow(this,"_pdfFunctionFactory",new PDFFunctionFactory({xref:this.xref,isEvalSupported:this.evaluatorOptions.isEvalSupported}))}}function getPdfColor(e,t){if(e[0]===e[1]&&e[1]===e[2]){return`${numberToString(e[0]/255)} ${t?"g":"G"}`}return Array.from(e,e=>numberToString(e/255)).join(" ")+" "+(t?"rg":"RG")}class FakeUnicodeFont{constructor(e,t){this.xref=e;this.widths=null;this.firstChar=1/0;this.lastChar=-1/0;this.fontFamily=t;const n=new OffscreenCanvas(1,1);this.ctxMeasure=n.getContext("2d",{willReadFrequently:!0});FakeUnicodeFont._fontNameId||(FakeUnicodeFont._fontNameId=1);this.fontName=Name.get(`InvalidPDFjsFont_${t}_${FakeUnicodeFont._fontNameId++}`)}get fontDescriptorRef(){if(!FakeUnicodeFont._fontDescriptorRef){const e=new Dict(this.xref);e.setIfName("Type","FontDescriptor");e.set("FontName",this.fontName);e.set("FontFamily","MyriadPro Regular");e.set("FontBBox",[0,0,0,0]);e.setIfName("FontStretch","Normal");e.set("FontWeight",400);e.set("ItalicAngle",0);FakeUnicodeFont._fontDescriptorRef=this.xref.getNewPersistentRef(e)}return FakeUnicodeFont._fontDescriptorRef}get descendantFontRef(){const e=new Dict(this.xref);e.set("BaseFont",this.fontName);e.setIfName("Type","Font");e.setIfName("Subtype","CIDFontType0");e.setIfName("CIDToGIDMap","Identity");e.set("FirstChar",this.firstChar);e.set("LastChar",this.lastChar);e.set("FontDescriptor",this.fontDescriptorRef);e.set("DW",1e3);const t=[],n=[...this.widths].sort();let a=null,r=null;for(const[e,s]of n)if(a)if(e===a+r.length)r.push(s);else{t.push(a,r);a=e;r=[s]}else{a=e;r=[s]}a&&t.push(a,r);e.set("W",t);const s=new Dict(this.xref);s.set("Ordering","Identity");s.set("Registry","Adobe");s.set("Supplement",0);e.set("CIDSystemInfo",s);return this.xref.getNewPersistentRef(e)}get baseFontRef(){const e=new Dict(this.xref);e.set("BaseFont",this.fontName);e.setIfName("Type","Font");e.setIfName("Subtype","Type0");e.setIfName("Encoding","Identity-H");e.set("DescendantFonts",[this.descendantFontRef]);e.setIfName("ToUnicode","Identity-H");return this.xref.getNewPersistentRef(e)}get resources(){const e=new Dict(this.xref),t=new Dict(this.xref);t.set(this.fontName.name,this.baseFontRef);e.set("Font",t);return e}_createContext(){this.widths=new Map;this.ctxMeasure.font=`1000px ${this.fontFamily}`;return this.ctxMeasure}createFontResources(e){const t=this._createContext();for(const n of e.split(/\r\n?|\n/))for(const e of n.split("")){const n=e.charCodeAt(0);if(this.widths.has(n))continue;const a=t.measureText(e),r=Math.ceil(a.width);this.widths.set(n,r);this.firstChar=Math.min(n,this.firstChar);this.lastChar=Math.max(n,this.lastChar)}return this.resources}static getFirstPositionInfo(e,t,n){const[a,i,o,l]=e;let f=o-a,c=l-i;t%180!=0&&([f,c]=[c,f]);const h=r*n;return{coords:[0,c+s*n-h],bbox:[0,0,f,c],matrix:0!==t?getRotationMatrix(t,c,h):void 0}}createAppearance(e,t,n,a,i,o){const l=this._createContext(),f=[];let c=-1/0;for(const t of e.split(/\r\n?|\n/)){f.push(t);const e=l.measureText(t).width;c=Math.max(c,e);for(const e of codePointIter(t)){const t=String.fromCodePoint(e);let n=this.widths.get(e);if(void 0===n){const a=l.measureText(t);n=Math.ceil(a.width);this.widths.set(e,n);this.firstChar=Math.min(e,this.firstChar);this.lastChar=Math.max(e,this.lastChar)}}}c*=a/1e3;const[h,u,m,p]=t;let d=m-h,g=p-u;n%180!=0&&([d,g]=[g,d]);let b=1;c>d&&(b=d/c);let w=1;const j=r*a,k=s*a,y=j*f.length;y>g&&(w=g/y);const q=a*Math.min(b,w),v=["q",`0 0 ${numberToString(d)} ${numberToString(g)} re W n`,"BT",`1 0 0 1 0 ${numberToString(g+k)} Tm 0 Tc ${getPdfColor(i,!0)}`,`/${this.fontName.name} ${numberToString(q)} Tf`],{resources:S}=this;if(1!==(o="number"==typeof o&&o>=0&&o<=1?o:1)){v.push("/R0 gs");const e=new Dict(this.xref),t=new Dict(this.xref);t.set("ca",o);t.set("CA",o);t.setIfName("Type","ExtGState");e.set("R0",t);S.set("ExtGState",e)}const x=numberToString(j);for(const e of f)v.push(`0 -${x} Td <${stringToUTF16HexString(e)}> Tj`);v.push("ET","Q");const C=v.join("\n"),T=new Dict(this.xref);T.setIfName("Subtype","Form");T.setIfName("Type","XObject");T.set("BBox",[0,0,d,g]);T.set("Length",C.length);T.set("Resources",S);if(n){const e=getRotationMatrix(n,d,g);T.set("Matrix",e)}const O=new StringStream(C);O.dict=T;return O}}const Cs=["m/d","m/d/yy","mm/dd/yy","mm/yy","d-mmm","d-mmm-yy","dd-mmm-yy","yy-mm-dd","mmm-yy","mmmm-yy","mmm d, yyyy","mmmm d, yyyy","m/d/yy h:MM tt","m/d/yy HH:MM"],Is=["HH:MM","h:MM tt","HH:MM:ss","h:MM:ss tt"];__webpack_require__(3110);class NameOrNumberTree{constructor(e,t,n){this.root=e;this.xref=t;this._type=n}getAll(e=!1){const t=new Map;if(!this.root)return t;const n=this.xref,a=new RefSet;a.put(this.root);const r=[this.root];for(;r.length>0;){const s=n.fetchIfRef(r.shift());if(!(s instanceof Dict))continue;if(s.has("Kids")){const e=s.get("Kids");if(!Array.isArray(e))continue;for(const t of e){if(a.has(t))throw new FormatError(`Duplicate entry in "${this._type}" tree.`);r.push(t);a.put(t)}continue}const i=s.get(this._type);if(Array.isArray(i))for(let a=0,r=i.length;a<r;a+=2)t.set(n.fetchIfRef(i[a]),e?i[a+1]:n.fetchIfRef(i[a+1]))}return t}getRaw(e){if(!this.root)return null;const t=this.xref;let n=t.fetchIfRef(this.root),a=0;for(;n.has("Kids");){if(++a>10){warn(`Search depth limit reached for "${this._type}" tree.`);return null}const r=n.get("Kids");if(!Array.isArray(r))return null;let s=0,i=r.length-1;for(;s<=i;){const a=s+i>>1,o=t.fetchIfRef(r[a]),l=o.get("Limits");if(e<t.fetchIfRef(l[0]))i=a-1;else{if(!(e>t.fetchIfRef(l[1]))){n=o;break}s=a+1}}if(s>i)return null}const r=n.get(this._type);if(Array.isArray(r)){let n=0,a=r.length-2;for(;n<=a;){const s=n+a>>1,i=s+(1&s),o=t.fetchIfRef(r[i]);if(e<o)a=i-2;else{if(!(e>o))return r[i+1];n=i+2}}}return null}get(e){return this.xref.fetchIfRef(this.getRaw(e))}}class NameTree extends NameOrNumberTree{constructor(e,t){super(e,t,"Names")}}class NumberTree extends NameOrNumberTree{constructor(e,t){super(e,t,"Nums")}}function clearGlobalCaches(){!function clearPatternCaches(){kr=Object.create(null)}();!function clearPrimitiveCaches(){un=Object.create(null);mn=Object.create(null);pn=Object.create(null)}();!function clearUnicodeCaches(){xa.clear()}();JpxImage.cleanup()}function pickPlatformItem(e){if(e instanceof Dict)for(const t of["UF","F","Unix","Mac","DOS"])if(e.has(t))return e.get(t);return null}class FileSpec{#ge=!1;constructor(e,t=!1){if(e instanceof Dict){this.root=e;e.has("FS")&&(this.fs=e.get("FS"));e.has("RF")&&warn("Related file specifications are not supported");t||(e.has("EF")?this.#ge=!0:warn("Non-embedded file specifications are not supported"))}}get filename(){const e=pickPlatformItem(this.root);return e&&"string"==typeof e?stringToPDFString(e,!0).replaceAll("\\\\","\\").replaceAll("\\/","/").replaceAll("\\","/"):""}get content(){if(!this.#ge)return null;const e=pickPlatformItem(this.root?.get("EF"));if(e instanceof BaseStream)return e.getBytes();warn("Embedded file specification points to non-existing/invalid content");return null}get description(){const e=this.root?.get("Desc");return e&&"string"==typeof e?stringToPDFString(e):""}get serializable(){const{filename:e,content:t,description:n}=this;return{rawFilename:e,filename:(a=e,a.substring(a.lastIndexOf("/")+1))||"unnamed",content:t,description:n};var a}}const Fs=0,Ts=-2,Os=-3,Rs=-4,Bs=-5,Hs=-6,Ds=-9;function isWhitespace(e,t){const n=e[t];return" "===n||"\n"===n||"\r"===n||"\t"===n}class XMLParserBase{_resolveEntities(e){return e.replaceAll(/&([^;]+);/g,(e,t)=>{if("#x"===t.substring(0,2))return String.fromCodePoint(parseInt(t.substring(2),16));if("#"===t.substring(0,1))return String.fromCodePoint(parseInt(t.substring(1),10));switch(t){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"';case"apos":return"'"}return this.onResolveEntity(t)})}_parseContent(e,t){const n=[];let a=t;function skipWs(){for(;a<e.length&&isWhitespace(e,a);)++a}for(;a<e.length&&!isWhitespace(e,a)&&">"!==e[a]&&"/"!==e[a];)++a;const r=e.substring(t,a);skipWs();for(;a<e.length&&">"!==e[a]&&"/"!==e[a]&&"?"!==e[a];){skipWs();let t="",r="";for(;a<e.length&&!isWhitespace(e,a)&&"="!==e[a];){t+=e[a];++a}skipWs();if("="!==e[a])return null;++a;skipWs();const s=e[a];if('"'!==s&&"'"!==s)return null;const i=e.indexOf(s,++a);if(i<0)return null;r=e.substring(a,i);n.push({name:t,value:this._resolveEntities(r)});a=i+1;skipWs()}return{name:r,attributes:n,parsed:a-t}}_parseProcessingInstruction(e,t){let n=t;for(;n<e.length&&!isWhitespace(e,n)&&">"!==e[n]&&"?"!==e[n]&&"/"!==e[n];)++n;const a=e.substring(t,n);!function skipWs(){for(;n<e.length&&isWhitespace(e,n);)++n}();const r=n;for(;n<e.length&&("?"!==e[n]||">"!==e[n+1]);)++n;return{name:a,value:e.substring(r,n),parsed:n-t}}parseXml(e){let t=0;for(;t<e.length;){let n=t;if("<"===e[t]){++n;let t;switch(e[n]){case"/":++n;t=e.indexOf(">",n);if(t<0){this.onError(Ds);return}this.onEndElement(e.substring(n,t));n=t+1;break;case"?":++n;const a=this._parseProcessingInstruction(e,n);if("?>"!==e.substring(n+a.parsed,n+a.parsed+2)){this.onError(Os);return}this.onPi(a.name,a.value);n+=a.parsed+2;break;case"!":if("--"===e.substring(n+1,n+3)){t=e.indexOf("--\x3e",n+3);if(t<0){this.onError(Bs);return}this.onComment(e.substring(n+3,t));n=t+3}else if("[CDATA["===e.substring(n+1,n+8)){t=e.indexOf("]]>",n+8);if(t<0){this.onError(Ts);return}this.onCdata(e.substring(n+8,t));n=t+3}else{if("DOCTYPE"!==e.substring(n+1,n+8)){this.onError(Hs);return}{const a=e.indexOf("[",n+8);let r=!1;t=e.indexOf(">",n+8);if(t<0){this.onError(Rs);return}if(a>0&&t>a){t=e.indexOf("]>",n+8);if(t<0){this.onError(Rs);return}r=!0}const s=e.substring(n+8,t+(r?1:0));this.onDoctype(s);n=t+(r?2:1)}}break;default:const r=this._parseContent(e,n);if(null===r){this.onError(Hs);return}let s=!1;if("/>"===e.substring(n+r.parsed,n+r.parsed+2))s=!0;else if(">"!==e.substring(n+r.parsed,n+r.parsed+1)){this.onError(Ds);return}this.onBeginElement(r.name,r.attributes,s);n+=r.parsed+(s?2:1)}}else{for(;n<e.length&&"<"!==e[n];)n++;const a=e.substring(t,n);this.onText(this._resolveEntities(a))}t=n}}onResolveEntity(e){return`&${e};`}onPi(e,t){}onComment(e){}onCdata(e){}onDoctype(e){}onText(e){}onBeginElement(e,t,n){}onEndElement(e){}onError(e){}}class SimpleDOMNode{constructor(e,t){this.nodeName=e;this.nodeValue=t;Object.defineProperty(this,"parentNode",{value:null,writable:!0})}get firstChild(){return this.childNodes?.[0]}get nextSibling(){const e=this.parentNode.childNodes;if(!e)return;const t=e.indexOf(this);return-1!==t?e[t+1]:void 0}get textContent(){return this.childNodes?this.childNodes.map(e=>e.textContent).join(""):this.nodeValue||""}get children(){return this.childNodes||[]}hasChildNodes(){return this.childNodes?.length>0}searchNode(e,t){if(t>=e.length)return this;const n=e[t];if(n.name.startsWith("#")&&t<e.length-1)return this.searchNode(e,t+1);const a=[];let r=this;for(;;){if(n.name===r.nodeName){if(0!==n.pos){if(0===a.length)return null;{const[s]=a.pop();let i=0;for(const a of s.childNodes)if(n.name===a.nodeName){if(i===n.pos)return a.searchNode(e,t+1);i++}return r.searchNode(e,t+1)}}{const n=r.searchNode(e,t+1);if(null!==n)return n}}if(r.childNodes?.length>0){a.push([r,0]);r=r.childNodes[0]}else{if(0===a.length)return null;for(;0!==a.length;){const[e,t]=a.pop(),n=t+1;if(n<e.childNodes.length){a.push([e,n]);r=e.childNodes[n];break}}if(0===a.length)return null}}}dump(e){if("#text"!==this.nodeName){e.push(`<${this.nodeName}`);if(this.attributes)for(const t of this.attributes)e.push(` ${t.name}="${encodeToXmlString(t.value)}"`);if(this.hasChildNodes()){e.push(">");for(const t of this.childNodes)t.dump(e);e.push(`</${this.nodeName}>`)}else this.nodeValue?e.push(`>${encodeToXmlString(this.nodeValue)}</${this.nodeName}>`):e.push("/>")}else e.push(encodeToXmlString(this.nodeValue))}}class SimpleXMLParser extends XMLParserBase{constructor({hasAttributes:e=!1,lowerCaseName:t=!1}){super();this._currentFragment=null;this._stack=null;this._errorCode=Fs;this._hasAttributes=e;this._lowerCaseName=t}parseFromString(e){this._currentFragment=[];this._stack=[];this._errorCode=Fs;this.parseXml(e);if(this._errorCode!==Fs)return;const[t]=this._currentFragment;return t?{documentElement:t}:void 0}onText(e){if(function isWhitespaceString(e){for(let t=0,n=e.length;t<n;t++)if(!isWhitespace(e,t))return!1;return!0}(e))return;const t=new SimpleDOMNode("#text",e);this._currentFragment.push(t)}onCdata(e){const t=new SimpleDOMNode("#text",e);this._currentFragment.push(t)}onBeginElement(e,t,n){this._lowerCaseName&&(e=e.toLowerCase());const a=new SimpleDOMNode(e);a.childNodes=[];this._hasAttributes&&(a.attributes=t);this._currentFragment.push(a);if(!n){this._stack.push(this._currentFragment);this._currentFragment=a.childNodes}}onEndElement(e){this._currentFragment=this._stack.pop()||[];const t=this._currentFragment.at(-1);if(!t)return null;for(const e of t.childNodes)e.parentNode=t;return t}onError(e){this._errorCode=e}}class MetadataParser{constructor(e){e=this._repair(e);const t=new SimpleXMLParser({lowerCaseName:!0}).parseFromString(e);this._metadataMap=new Map;this._data=e;t&&this._parse(t)}_repair(e){return e.replace(/^[^<]+/,"").replaceAll(/>\\376\\377([^<]+)/g,function(e,t){const n=t.replaceAll(/\\([0-3])([0-7])([0-7])/g,function(e,t,n,a){return String.fromCharCode(64*t+8*n+1*a)}).replaceAll(/&(amp|apos|gt|lt|quot);/g,function(e,t){switch(t){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw new Error(`_repair: ${t} isn't defined.`)}),a=[">"];for(let e=0,t=n.length;e<t;e+=2){const t=256*n.charCodeAt(e)+n.charCodeAt(e+1);t>=32&&t<127&&60!==t&&62!==t&&38!==t?a.push(String.fromCharCode(t)):a.push("&#x"+(65536+t).toString(16).substring(1)+";")}return a.join("")})}_getSequence(e){const t=e.nodeName;return"rdf:bag"!==t&&"rdf:seq"!==t&&"rdf:alt"!==t?null:e.childNodes.filter(e=>"rdf:li"===e.nodeName)}_parseArray(e){if(!e.hasChildNodes())return;const[t]=e.childNodes,n=this._getSequence(t)||[];this._metadataMap.set(e.nodeName,n.map(e=>e.textContent.trim()))}_parse(e){let t=e.documentElement;if("rdf:rdf"!==t.nodeName){t=t.firstChild;for(;t&&"rdf:rdf"!==t.nodeName;)t=t.nextSibling}if(t&&"rdf:rdf"===t.nodeName&&t.hasChildNodes())for(const e of t.childNodes)if("rdf:description"===e.nodeName)for(const t of e.childNodes){const e=t.nodeName;switch(e){case"#text":continue;case"dc:creator":case"dc:subject":this._parseArray(t);continue}this._metadataMap.set(e,t.textContent.trim())}}get serializable(){return{parsedData:this._metadataMap,rawData:this._data}}}const Ms=1,Es=2,Ns=3,zs=4,_s=5;class StructTreeRoot{constructor(e,t,n){this.xref=e;this.dict=t;this.ref=n instanceof Ref?n:null;this.roleMap=new Map;this.structParentIds=null;this.kidRefToPosition=void 0;this.parentTree=null}getKidPosition(e){if(void 0===this.kidRefToPosition){const e=this.dict.get("K");if(Array.isArray(e)){const t=this.kidRefToPosition=new Map;for(let n=0,a=e.length;n<a;n++){const a=e[n];a&&t.set(a.toString(),n)}}else this.kidRefToPosition=e instanceof Dict?new Map([[e.objId,0]]):e?null:new Map}return this.kidRefToPosition?this.kidRefToPosition.get(e)??NaN:-1}init(){this.readRoleMap();const e=this.dict.get("ParentTree");e&&(this.parentTree=new NumberTree(e,this.xref))}#be(e,t,n){if(!(e instanceof Ref)||t<0)return;this.structParentIds||=new RefSetCache;let a=this.structParentIds.get(e);if(!a){a=[];this.structParentIds.put(e,a)}a.push([t,n])}addAnnotationIdToPage(e,t){this.#be(e,t,zs)}readRoleMap(){const e=this.dict.get("RoleMap");if(e instanceof Dict)for(const[t,n]of e)n instanceof Name&&this.roleMap.set(t,n.name)}static async canCreateStructureTree({catalogRef:e,pdfManager:t,newAnnotationsByPage:n}){if(!(e instanceof Ref)){warn("Cannot save the struct tree: no catalog reference.");return!1}let a=0,r=!0;for(const[e,s]of n){const{ref:n}=await t.getPage(e);if(!(n instanceof Ref)){warn(`Cannot save the struct tree: page ${e} has no ref.`);r=!0;break}for(const e of s)if(e.accessibilityData?.type){e.parentTreeId=a++;r=!1}}if(r){for(const e of n.values())for(const t of e)delete t.parentTreeId;return!1}return!0}static async createStructureTree({newAnnotationsByPage:e,xref:t,catalogRef:n,pdfManager:a,changes:r}){const s=await a.ensureCatalog("cloneDict"),i=new RefSetCache;i.put(n,s);const o=t.getNewTemporaryRef();s.set("StructTreeRoot",o);const l=new Dict(t);l.set("Type",Name.get("StructTreeRoot"));const f=t.getNewTemporaryRef();l.set("ParentTree",f);const c=[];l.set("K",c);i.put(o,l);const h=new Dict(t),u=[];h.set("Nums",u);const m=await this.#we({newAnnotationsByPage:e,structTreeRootRef:o,structTreeRoot:null,kids:c,nums:u,xref:t,pdfManager:a,changes:r,cache:i});l.set("ParentTreeNextKey",m);i.put(f,h);for(const[e,t]of i.items())r.put(e,{data:t})}async canUpdateStructTree({pdfManager:e,newAnnotationsByPage:t}){if(!this.ref){warn("Cannot update the struct tree: no root reference.");return!1}let n=this.dict.get("ParentTreeNextKey");if(!Number.isInteger(n)||n<0){warn("Cannot update the struct tree: invalid next key.");return!1}const a=this.dict.get("ParentTree");if(!(a instanceof Dict)){warn("Cannot update the struct tree: ParentTree isn't a dict.");return!1}const r=a.get("Nums");if(!Array.isArray(r)){warn("Cannot update the struct tree: nums isn't an array.");return!1}const s=new NumberTree(a,this.xref);for(const n of t.keys()){const{pageDict:t}=await e.getPage(n);if(!t.has("StructParents"))continue;const a=t.get("StructParents");if(!Number.isInteger(a)||!Array.isArray(s.get(a))){warn(`Cannot save the struct tree: page ${n} has a wrong id.`);return!1}}let i=!0;for(const[a,r]of t){const{pageDict:t}=await e.getPage(a);StructTreeRoot.#je({elements:r,xref:this.xref,pageDict:t,numberTree:s});for(const e of r)if(e.accessibilityData?.type){e.accessibilityData.structParent>=0||(e.parentTreeId=n++);i=!1}}if(i){for(const e of t.values())for(const t of e){delete t.parentTreeId;delete t.structTreeParent}return!1}return!0}async updateStructureTree({newAnnotationsByPage:e,pdfManager:t,changes:n}){const{ref:a,xref:r}=this,s=this.dict.clone(),i=new RefSetCache;i.put(a,s);let o,l=s.getRaw("ParentTree");if(l instanceof Ref)o=r.fetch(l);else{o=l;l=r.getNewTemporaryRef();s.set("ParentTree",l)}o=o.clone();i.put(l,o);let f=o.getRaw("Nums"),c=null;if(f instanceof Ref){c=f;f=r.fetch(c)}f=f.slice();c||o.set("Nums",f);const h=await StructTreeRoot.#we({newAnnotationsByPage:e,structTreeRootRef:a,structTreeRoot:this,kids:null,nums:f,xref:r,pdfManager:t,changes:n,cache:i});if(-1!==h){s.set("ParentTreeNextKey",h);c&&i.put(c,f);for(const[e,t]of i.items())n.put(e,{data:t})}}static async#we({newAnnotationsByPage:e,structTreeRootRef:t,structTreeRoot:n,kids:a,nums:r,xref:s,pdfManager:i,changes:o,cache:l}){const f=Name.get("OBJR");let c,h=-1;for(const[u,m]of e){const e=await i.getPage(u),{ref:p}=e,d=p instanceof Ref;for(const{accessibilityData:i,ref:g,parentTreeId:b,structTreeParent:w}of m){if(!i?.type)continue;const{structParent:m}=i;if(n&&Number.isInteger(m)&&m>=0){let t=(c||=new Map).get(u);if(void 0===t){t=new StructTreePage(n,e.pageDict).collectObjects(p);c.set(u,t)}const a=t?.get(m);if(a){const e=s.fetch(a).clone();StructTreeRoot.#ke(e,i);o.put(a,{data:e});continue}}h=Math.max(h,b);const j=s.getNewTemporaryRef(),k=new Dict(s);StructTreeRoot.#ke(k,i);await this.#ye({structTreeParent:w,tagDict:k,newTagRef:j,structTreeRootRef:t,fallbackKids:a,xref:s,cache:l});const y=new Dict(s);k.set("K",y);y.set("Type",f);d&&y.set("Pg",p);y.set("Obj",g);l.put(j,k);r.push(b,j)}}return h+1}static#ke(e,{type:t,title:n,lang:a,alt:r,expanded:s,actualText:i}){e.set("S",Name.get(t));n&&e.set("T",stringToAsciiOrUTF16BE(n));a&&e.set("Lang",stringToAsciiOrUTF16BE(a));r&&e.set("Alt",stringToAsciiOrUTF16BE(r));s&&e.set("E",stringToAsciiOrUTF16BE(s));i&&e.set("ActualText",stringToAsciiOrUTF16BE(i))}static#je({elements:e,xref:t,pageDict:n,numberTree:a}){const r=new Map;for(const t of e)if(t.structTreeParentId){const e=parseInt(t.structTreeParentId.split("_mc")[1],10);r.getOrInsertComputed(e,makeArr).push(t)}const s=n.get("StructParents");if(!Number.isInteger(s))return;const i=a.get(s),updateElement=(e,n,a)=>{const s=r.get(e);if(s){const e=n.getRaw("P"),r=t.fetchIfRef(e);if(e instanceof Ref&&r instanceof Dict){const e={ref:a,dict:n};for(const t of s)t.structTreeParent=e}return!0}return!1};for(const e of i){if(!(e instanceof Ref))continue;const n=t.fetch(e),a=n.get("K");if(Number.isInteger(a))updateElement(a,n,e);else if(Array.isArray(a))for(let r of a){r=t.fetchIfRef(r);if(Number.isInteger(r)&&updateElement(r,n,e))break;if(!(r instanceof Dict))continue;if(!isName(r.get("Type"),"MCR"))break;const a=r.get("MCID");if(Number.isInteger(a)&&updateElement(a,n,e))break}}}static async#ye({structTreeParent:e,tagDict:t,newTagRef:n,structTreeRootRef:a,fallbackKids:r,xref:s,cache:i}){let o,l=null;if(e){({ref:l}=e);o=e.dict.getRaw("P")||a}else o=a;t.set("P",o);const f=s.fetchIfRef(o);if(!f){r.push(n);return}let c=i.get(o);if(!c){c=f.clone();i.put(o,c)}const h=c.getRaw("K");let u=h instanceof Ref?i.get(h):null;if(!u){u=s.fetchIfRef(h);u=Array.isArray(u)?u.slice():[h];const e=s.getNewTemporaryRef();c.set("K",e);i.put(e,u)}const m=u.indexOf(l);u.splice(m>=0?m+1:u.length,0,n)}}class StructElementNode{constructor(e,t){this.tree=e;this.xref=e.xref;this.dict=t;this.kids=[];this.parseKids()}get role(){const e=this.dict.get("S"),t=e instanceof Name?e.name:"",{root:n}=this.tree;return n.roleMap.get(t)??t}get mathML(){let e=this.dict.get("AF")||[];Array.isArray(e)||(e=[e]);for(let t of e){t=this.xref.fetchIfRef(t);if(!(t instanceof Dict))continue;if(!isName(t.get("Type"),"Filespec"))continue;if(!isName(t.get("AFRelationship"),"Supplement"))continue;const e=t.get("EF");if(!(e instanceof Dict))continue;const n=e.get("UF")||e.get("F");if(n instanceof BaseStream&&(isName(n.dict.get("Type"),"EmbeddedFile")&&isName(n.dict.get("Subtype"),"application/mathml+xml")))return stringToUTF8String(n.getString())}const t=this.dict.get("A");if(t instanceof Dict){if(isName(t.get("O"),"MSFT_Office")){const e=t.get("MSFT_MathML");return e?stringToPDFString(e):null}}return null}parseKids(){let e=null;const t=this.dict.getRaw("Pg");t instanceof Ref&&(e=t.toString());const n=this.dict.get("K");if(Array.isArray(n))for(const t of n){const n=this.parseKid(e,this.xref.fetchIfRef(t));n&&this.kids.push(n)}else{const t=this.parseKid(e,n);t&&this.kids.push(t)}}parseKid(e,t){if(Number.isInteger(t))return this.tree.pageDict.objId!==e?null:new StructElement({type:Ms,mcid:t,pageObjId:e});if(!(t instanceof Dict))return null;const n=t.getRaw("Pg");n instanceof Ref&&(e=n.toString());const a=t.get("Type")instanceof Name?t.get("Type").name:null;if("MCR"===a){if(this.tree.pageDict.objId!==e)return null;const n=t.getRaw("Stm");return new StructElement({type:Es,refObjId:n instanceof Ref?n.toString():null,pageObjId:e,mcid:t.get("MCID")})}if("OBJR"===a){if(this.tree.pageDict.objId!==e)return null;const n=t.getRaw("Obj");return new StructElement({type:Ns,refObjId:n instanceof Ref?n.toString():null,pageObjId:e})}return new StructElement({type:_s,dict:t})}}class StructElement{constructor({type:e,dict:t=null,mcid:n=null,pageObjId:a=null,refObjId:r=null}){this.type=e;this.dict=t;this.mcid=n;this.pageObjId=a;this.refObjId=r;this.parentNode=null}}class StructTreePage{constructor(e,t){this.root=e;this.xref=e?.xref??null;this.rootDict=e?.dict??null;this.pageDict=t;this.nodes=[]}collectObjects(e){if(!(this.root&&this.rootDict&&e instanceof Ref))return null;const t=this.rootDict.get("ParentTree");if(!t)return null;const n=this.root.structParentIds?.get(e);if(!n)return null;const a=new Map,r=new NumberTree(t,this.xref);for(const[e]of n){const t=r.getRaw(e);t instanceof Ref&&a.set(e,t)}return a}parse(e){if(!(this.root&&this.rootDict&&e instanceof Ref))return;const{parentTree:t}=this.root;if(!t)return;const n=this.pageDict.get("StructParents"),a=this.root.structParentIds?.get(e);if(!Number.isInteger(n)&&!a)return;const r=new Map;if(Number.isInteger(n)){const e=t.get(n);if(Array.isArray(e))for(const t of e)t instanceof Ref&&this.addNode(this.xref.fetch(t),r)}if(a)for(const[e,n]of a){const a=t.get(e);if(a){const e=this.addNode(this.xref.fetchIfRef(a),r);1===e?.kids?.length&&e.kids[0].type===Ns&&(e.kids[0].type=n)}}}addNode(e,t,n=0){if(n>40){warn("StructTree MAX_DEPTH reached.");return null}if(!(e instanceof Dict))return null;if(t.has(e))return t.get(e);const a=new StructElementNode(this,e);t.set(e,a);switch(a.role){case"L":case"LBody":case"LI":case"Table":case"THead":case"TBody":case"TFoot":case"TR":for(const e of a.kids)e.type===_s&&this.addNode(e.dict,t,n-1)}const r=e.get("P");if(!(r instanceof Dict)||isName(r.get("Type"),"StructTreeRoot")){this.addTopLevelNode(e,a)||t.delete(e);return a}const s=this.addNode(r,t,n+1);if(!s)return a;let i=!1;for(const t of s.kids)if(t.type===_s&&t.dict===e){t.parentNode=a;i=!0}i||t.delete(e);return a}addTopLevelNode(e,t){const n=this.root.getKidPosition(e.objId);if(isNaN(n))return!1;-1!==n&&(this.nodes[n]=t);return!0}get serializable(){function nodeToSerializable(e,t,n=0){if(n>40){warn("StructTree too deep to be fully serialized.");return}const a=Object.create(null);a.role=e.role;a.children=[];t.children.push(a);let r=e.dict.get("Alt");"string"!=typeof r&&(r=e.dict.get("ActualText"));"string"==typeof r&&(a.alt=stringToPDFString(r));if("Formula"===a.role){const{mathML:t}=e;t&&(a.mathML=t)}const s=e.dict.get("A");if(s instanceof Dict){const e=lookupNormalRect(s.getArray("BBox"),null);if(e)a.bbox=e;else{const e=s.get("Width"),t=s.get("Height");"number"==typeof e&&e>0&&"number"==typeof t&&t>0&&(a.bbox=[0,0,e,t])}}const i=e.dict.get("Lang");"string"==typeof i&&(a.lang=stringToPDFString(i));for(const t of e.kids){const e=t.type===_s?t.parentNode:null;e?nodeToSerializable(e,a,n+1):t.type===Ms||t.type===Es?a.children.push({type:"content",id:`p${t.pageObjId}_mc${t.mcid}`}):t.type===Ns?a.children.push({type:"object",id:t.refObjId}):t.type===zs&&a.children.push({type:"annotation",id:`pdfjs_internal_id_${t.refObjId}`})}}const e=Object.create(null);e.children=[];e.role="Root";for(const t of this.nodes)t&&nodeToSerializable(t,e);return e}}const Ls=function _isValidExplicitDest(e,t,n){if(!Array.isArray(n)||n.length<2)return!1;const[a,r,...s]=n;if(!e(a)&&!Number.isInteger(a))return!1;if(!t(r))return!1;const i=s.length;let o=!0;switch(r.name){case"XYZ":if(i<2||i>3)return!1;break;case"Fit":case"FitB":return 0===i;case"FitH":case"FitBH":case"FitV":case"FitBV":if(i>1)return!1;break;case"FitR":if(4!==i)return!1;o=!1;break;default:return!1}for(const e of s)if(!("number"==typeof e||o&&null===e))return!1;return!0}.bind(null,e=>e instanceof Ref,isName);function fetchDest(e){e instanceof Dict&&(e=e.get("D"));return Ls(e)?e:null}function fetchRemoteDest(e){let t=e.get("D");if(t){t instanceof Name&&(t=t.name);if("string"==typeof t)return stringToPDFString(t,!0);if(Ls(t))return JSON.stringify(t)}return null}class Catalog{#qe=null;#ve=null;builtInCMapCache=new Map;fontCache=new RefSetCache;globalColorSpaceCache=new GlobalColorSpaceCache;globalImageCache=new GlobalImageCache;nonBlendModesSet=new RefSet;pageDictCache=new RefSetCache;pageIndexCache=new RefSetCache;pageKidsCountCache=new RefSetCache;standardFontDataCache=new Map;systemFontCache=new Map;constructor(e,t){this.pdfManager=e;this.xref=t;this.#ve=t.getCatalogObj();if(!(this.#ve instanceof Dict))throw new FormatError("Catalog object is not a dictionary.");this.toplevelPagesDict}cloneDict(){return this.#ve.clone()}get version(){const e=this.#ve.get("Version");if(e instanceof Name){if(gn.test(e.name))return shadow(this,"version",e.name);warn(`Invalid PDF catalog version: ${e.name}`)}return shadow(this,"version",null)}get lang(){const e=this.#ve.get("Lang");return shadow(this,"lang",e&&"string"==typeof e?stringToPDFString(e):null)}get needsRendering(){const e=this.#ve.get("NeedsRendering");return shadow(this,"needsRendering","boolean"==typeof e&&e)}get collection(){let e=null;try{const t=this.#ve.get("Collection");t instanceof Dict&&t.size>0&&(e=t)}catch(e){if(e instanceof MissingDataException)throw e;info("Cannot fetch Collection entry; assuming no collection is present.")}return shadow(this,"collection",e)}get acroForm(){let e=null;try{const t=this.#ve.get("AcroForm");t instanceof Dict&&t.size>0&&(e=t)}catch(e){if(e instanceof MissingDataException)throw e;info("Cannot fetch AcroForm entry; assuming no forms are present.")}return shadow(this,"acroForm",e)}get acroFormRef(){const e=this.#ve.getRaw("AcroForm");return shadow(this,"acroFormRef",e instanceof Ref?e:null)}get metadata(){const e=this.#ve.getRaw("Metadata");if(!(e instanceof Ref))return shadow(this,"metadata",null);let t=null;try{const n=this.xref.fetch(e,!this.xref.encrypt?.encryptMetadata);if(n instanceof BaseStream&&n.dict instanceof Dict){const e=n.dict.get("Type"),a=n.dict.get("Subtype");if(isName(e,"Metadata")&&isName(a,"XML")){const e=stringToUTF8String(n.getString());e&&(t=new MetadataParser(e).serializable)}}}catch(e){if(e instanceof MissingDataException)throw e;info(`Skipping invalid Metadata: "${e}".`)}return shadow(this,"metadata",t)}get markInfo(){let e=null;try{e=this.#Se()}catch(e){if(e instanceof MissingDataException)throw e;warn("Unable to read mark info.")}return shadow(this,"markInfo",e)}#Se(){const e=this.#ve.get("MarkInfo");if(!(e instanceof Dict))return null;const t={Marked:!1,UserProperties:!1,Suspects:!1};for(const n in t){const a=e.get(n);"boolean"==typeof a&&(t[n]=a)}return t}get hasStructTree(){return this.#ve.has("StructTreeRoot")}get structTreeRoot(){let e=null;try{e=this.#xe()}catch(e){if(e instanceof MissingDataException)throw e;warn("Unable read to structTreeRoot info.")}return shadow(this,"structTreeRoot",e)}#xe(){const e=this.#ve.getRaw("StructTreeRoot"),t=this.xref.fetchIfRef(e);if(!(t instanceof Dict))return null;const n=new StructTreeRoot(this.xref,t,e);n.init();return n}get toplevelPagesDict(){const e=this.#ve.get("Pages");if(!(e instanceof Dict))throw new FormatError("Invalid top-level pages dictionary.");return shadow(this,"toplevelPagesDict",e)}get documentOutline(){let e=null;try{e=this.#Ae()}catch(e){if(e instanceof MissingDataException)throw e;warn("Unable to read document outline.")}return shadow(this,"documentOutline",e)}#Ae(){let e=this.#ve.get("Outlines");if(!(e instanceof Dict))return null;e=e.getRaw("First");if(!(e instanceof Ref))return null;const t={items:[]},n=[{obj:e,parent:t}],a=new RefSet;a.put(e);const r=this.xref,s=new Uint8ClampedArray(3);for(;n.length>0;){const t=n.shift(),i=r.fetchIfRef(t.obj);if(null===i)continue;i.has("Title")||warn("Invalid outline item encountered.");const o={url:null,dest:null,action:null};Catalog.parseDestDictionary({destDict:i,resultObj:o,docBaseUrl:this.baseUrl,docAttachments:this.attachments});const l=i.get("Title"),f=i.get("F")||0,c=i.getArray("C"),h=i.get("Count");let u=s;!isNumberArray(c,3)||0===c[0]&&0===c[1]&&0===c[2]||(u=ColorSpaceUtils.rgb.getRgb(c,0));const m={action:o.action,attachment:o.attachment,dest:o.dest,url:o.url,unsafeUrl:o.unsafeUrl,newWindow:o.newWindow,setOCGState:o.setOCGState,title:"string"==typeof l?stringToPDFString(l):"",color:u,count:Number.isInteger(h)?h:void 0,bold:!!(2&f),italic:!!(1&f),items:[]};t.parent.items.push(m);e=i.getRaw("First");if(e instanceof Ref&&!a.has(e)){n.push({obj:e,parent:m});a.put(e)}e=i.getRaw("Next");if(e instanceof Ref&&!a.has(e)){n.push({obj:e,parent:t.parent});a.put(e)}}return t.items.length>0?t.items:null}get permissions(){let e=null;try{e=this.#Ce()}catch(e){if(e instanceof MissingDataException)throw e;warn("Unable to read permissions.")}return shadow(this,"permissions",e)}#Ce(){const e=this.xref.trailer.get("Encrypt");if(!(e instanceof Dict))return null;let t=e.get("P");if("number"!=typeof t)return null;t+=2**32;const n=[];for(const e in y){const a=y[e];t&a&&n.push(a)}return n}get optionalContentConfig(){let e=null;try{const t=this.#ve.get("OCProperties");if(!t)return shadow(this,"optionalContentConfig",null);const n=t.get("D");if(!n)return shadow(this,"optionalContentConfig",null);const a=t.get("OCGs");if(!Array.isArray(a))return shadow(this,"optionalContentConfig",null);const r=new RefSetCache;for(const e of a)e instanceof Ref&&!r.has(e)&&r.put(e,this.#Ie(e));e=this.#Fe(n,r)}catch(e){if(e instanceof MissingDataException)throw e;warn(`Unable to read optional content config: ${e}`)}return shadow(this,"optionalContentConfig",e)}#Ie(e){const t=this.xref.fetch(e),n={id:e.toString(),name:null,intent:null,usage:{print:null,view:null},rbGroups:[]},a=t.get("Name");"string"==typeof a&&(n.name=stringToPDFString(a));let r=t.getArray("Intent");Array.isArray(r)||(r=[r]);r.every(e=>e instanceof Name)&&(n.intent=r.map(e=>e.name));const s=t.get("Usage");if(!(s instanceof Dict))return n;const i=n.usage,o=s.get("Print");if(o instanceof Dict){const e=o.get("PrintState");if(e instanceof Name)switch(e.name){case"ON":case"OFF":i.print={printState:e.name}}}const l=s.get("View");if(l instanceof Dict){const e=l.get("ViewState");if(e instanceof Name)switch(e.name){case"ON":case"OFF":i.view={viewState:e.name}}}return n}#Fe(e,t){function parseOnOff(e){const n=[];if(Array.isArray(e))for(const a of e)a instanceof Ref&&t.has(a)&&n.push(a.toString());return n}function parseOrder(e,n=0){if(!Array.isArray(e))return null;const r=[];for(const s of e){if(s instanceof Ref&&t.has(s)){a.put(s);r.push(s.toString());continue}const e=parseNestedOrder(s,n);e&&r.push(e)}if(n>0)return r;const s=[];for(const[e]of t.items())a.has(e)||s.push(e.toString());s.length&&r.push({name:null,order:s});return r}function parseNestedOrder(e,t){if(++t>r){warn("parseNestedOrder - reached MAX_NESTED_LEVELS.");return null}const a=n.fetchIfRef(e);if(!Array.isArray(a))return null;const s=n.fetchIfRef(a[0]);if("string"!=typeof s)return null;const i=parseOrder(a.slice(1),t);return i?.length?{name:stringToPDFString(s),order:i}:null}const n=this.xref,a=new RefSet,r=10;!function parseRBGroups(e){if(Array.isArray(e))for(const a of e){const e=n.fetchIfRef(a);if(!Array.isArray(e)||!e.length)continue;const r=new Set;for(const n of e)if(n instanceof Ref&&t.has(n)&&!r.has(n.toString())){r.add(n.toString());t.get(n).rbGroups.push(r)}}}(e.get("RBGroups"));return{name:"string"==typeof e.get("Name")?stringToPDFString(e.get("Name")):null,creator:"string"==typeof e.get("Creator")?stringToPDFString(e.get("Creator")):null,baseState:e.get("BaseState")instanceof Name?e.get("BaseState").name:null,on:parseOnOff(e.get("ON")),off:parseOnOff(e.get("OFF")),order:parseOrder(e.get("Order")),groups:[...t]}}setActualNumPages(e=null){this.#qe=e}get hasActualNumPages(){return null!==this.#qe}get _pagesCount(){const e=this.toplevelPagesDict.get("Count");if(!Number.isInteger(e))throw new FormatError("Page count in top-level pages dictionary is not an integer.");return shadow(this,"_pagesCount",e)}get numPages(){return this.#qe??this._pagesCount}get destinations(){const e=this.#Te(),t=Object.create(null);for(const n of e)if(n instanceof NameTree)for(const[e,a]of n.getAll()){const n=fetchDest(a);n&&(t[stringToPDFString(e,!0)]=n)}else if(n instanceof Dict)for(const[e,a]of n){const n=fetchDest(a);n&&(t[stringToPDFString(e,!0)]||=n)}return shadow(this,"destinations",t)}getDestination(e){if(this.hasOwnProperty("destinations"))return this.destinations[e]??null;const t=this.#Te();for(const n of t)if(n instanceof NameTree||n instanceof Dict){const t=fetchDest(n.get(e));if(t)return t}if(t.length){const t=this.destinations[e];if(t)return t}return null}#Te(){const e=this.#ve.get("Names"),t=[];e?.has("Dests")&&t.push(new NameTree(e.getRaw("Dests"),this.xref));this.#ve.has("Dests")&&t.push(this.#ve.get("Dests"));return t}get rawPageLabels(){const e=this.#ve.getRaw("PageLabels");if(!e)return null;return new NumberTree(e,this.xref).getAll()}get pageLabels(){let e=null;try{e=this.#Oe()}catch(e){if(e instanceof MissingDataException)throw e;warn("Unable to read page labels.")}return shadow(this,"pageLabels",e)}#Oe(){const e=this.rawPageLabels;if(!e)return null;const t=new Array(this.numPages);let n=null,a="",r="",s=1;for(let i=0,o=this.numPages;i<o;i++){const o=e.get(i);if(void 0!==o){if(!(o instanceof Dict))throw new FormatError("PageLabel is not a dictionary.");if(o.has("Type")&&!isName(o.get("Type"),"PageLabel"))throw new FormatError("Invalid type in PageLabel dictionary.");if(o.has("S")){const e=o.get("S");if(!(e instanceof Name))throw new FormatError("Invalid style in PageLabel dictionary.");n=e.name}else n=null;if(o.has("P")){const e=o.get("P");if("string"!=typeof e)throw new FormatError("Invalid prefix in PageLabel dictionary.");a=stringToPDFString(e)}else a="";if(o.has("St")){const e=o.get("St");if(!(Number.isInteger(e)&&e>=1))throw new FormatError("Invalid start in PageLabel dictionary.");s=e}else s=1}switch(n){case"D":r=s;break;case"R":case"r":r=toRomanNumerals(s,"r"===n);break;case"A":case"a":const e=26,t="a"===n?97:65,a=s-1;r=String.fromCharCode(t+a%e).repeat(Math.floor(a/e)+1);break;default:if(n)throw new FormatError(`Invalid style "${n}" in PageLabel dictionary.`);r=""}t[i]=a+r;s++}return t}get pageLayout(){const e=this.#ve.get("PageLayout");let t="";if(e instanceof Name)switch(e.name){case"SinglePage":case"OneColumn":case"TwoColumnLeft":case"TwoColumnRight":case"TwoPageLeft":case"TwoPageRight":t=e.name}return shadow(this,"pageLayout",t)}get pageMode(){const e=this.#ve.get("PageMode");let t="UseNone";if(e instanceof Name)switch(e.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"FullScreen":case"UseOC":case"UseAttachments":t=e.name}return shadow(this,"pageMode",t)}get viewerPreferences(){const e=this.#ve.get("ViewerPreferences");if(!(e instanceof Dict))return shadow(this,"viewerPreferences",null);let t=null;for(const[n,a]of e){let e;switch(n){case"HideToolbar":case"HideMenubar":case"HideWindowUI":case"FitWindow":case"CenterWindow":case"DisplayDocTitle":case"PickTrayByPDFSize":"boolean"==typeof a&&(e=a);break;case"NonFullScreenPageMode":if(a instanceof Name)switch(a.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"UseOC":e=a.name;break;default:e="UseNone"}break;case"Direction":if(a instanceof Name)switch(a.name){case"L2R":case"R2L":e=a.name;break;default:e="L2R"}break;case"ViewArea":case"ViewClip":case"PrintArea":case"PrintClip":if(a instanceof Name)switch(a.name){case"MediaBox":case"CropBox":case"BleedBox":case"TrimBox":case"ArtBox":e=a.name;break;default:e="CropBox"}break;case"PrintScaling":if(a instanceof Name)switch(a.name){case"None":case"AppDefault":e=a.name;break;default:e="AppDefault"}break;case"Duplex":if(a instanceof Name)switch(a.name){case"Simplex":case"DuplexFlipShortEdge":case"DuplexFlipLongEdge":e=a.name;break;default:e="None"}break;case"PrintPageRange":if(Array.isArray(a)&&a.length%2==0){a.every((e,t,n)=>Number.isInteger(e)&&e>0&&(0===t||e>=n[t-1])&&e<=this.numPages)&&(e=a)}break;case"NumCopies":Number.isInteger(a)&&a>0&&(e=a);break;default:warn(`Ignoring non-standard key in ViewerPreferences: ${n}.`);continue}if(void 0!==e){t??=Object.create(null);t[n]=e}else warn(`Bad value, for key "${n}", in ViewerPreferences: ${a}.`)}return shadow(this,"viewerPreferences",t)}get openAction(){const e=this.#ve.get("OpenAction"),t=Object.create(null);if(e instanceof Dict){const n=new Dict(this.xref);n.set("A",e);const a={url:null,dest:null,action:null};Catalog.parseDestDictionary({destDict:n,resultObj:a});Array.isArray(a.dest)?t.dest=a.dest:a.action&&(t.action=a.action)}else Ls(e)&&(t.dest=e);return shadow(this,"openAction",objectSize(t)>0?t:null)}get attachments(){const e=this.#ve.get("Names");let t=null;if(e instanceof Dict&&e.has("EmbeddedFiles")){const n=new NameTree(e.getRaw("EmbeddedFiles"),this.xref);for(const[e,a]of n.getAll()){const n=new FileSpec(a);t??=Object.create(null);t[stringToPDFString(e,!0)]=n.serializable}}return shadow(this,"attachments",t)}get xfaImages(){const e=this.#ve.get("Names");let t=null;if(e instanceof Dict&&e.has("XFAImages")){const n=new NameTree(e.getRaw("XFAImages"),this.xref);for(const[e,a]of n.getAll())if(a instanceof BaseStream){t??=new Map;t.set(stringToPDFString(e,!0),a.getBytes())}}return shadow(this,"xfaImages",t)}#Re(){const e=this.#ve.get("Names");let t=null;function appendIfJavaScriptDict(e,n){if(!(n instanceof Dict))return;if(!isName(n.get("S"),"JavaScript"))return;let a=n.get("JS");if(a instanceof BaseStream)a=a.getString();else if("string"!=typeof a)return;a=stringToPDFString(a,!0).replaceAll("\0","");a&&(t||=new Map).set(e,a)}if(e instanceof Dict&&e.has("JavaScript")){const t=new NameTree(e.getRaw("JavaScript"),this.xref);for(const[e,n]of t.getAll())appendIfJavaScriptDict(stringToPDFString(e,!0),n)}const n=this.#ve.get("OpenAction");n&&appendIfJavaScriptDict("OpenAction",n);return t}get jsActions(){const e=this.#Re();let t=collectActions(this.xref,this.#ve,le);if(e){t||=Object.create(null);for(const[n,a]of e)n in t?t[n].push(a):t[n]=[a]}return shadow(this,"jsActions",t)}async cleanup(e=!1){clearGlobalCaches();this.globalColorSpaceCache.clear();this.globalImageCache.clear(e);this.pageKidsCountCache.clear();this.pageIndexCache.clear();this.pageDictCache.clear();this.nonBlendModesSet.clear();for(const{dict:e}of await Promise.all(this.fontCache))delete e.cacheKey;this.fontCache.clear();this.builtInCMapCache.clear();this.standardFontDataCache.clear();this.systemFontCache.clear()}async getPageDict(e){const t=[this.toplevelPagesDict],n=new RefSet,a=this.#ve.getRaw("Pages");a instanceof Ref&&n.put(a);const r=this.xref,s=this.pageKidsCountCache,i=this.pageIndexCache,o=this.pageDictCache;let l=0;for(;t.length;){const a=t.pop();if(a instanceof Ref){const f=s.get(a);if(f>=0&&l+f<=e){l+=f;continue}if(n.has(a))throw new FormatError("Pages tree contains circular reference.");n.put(a);const c=await(o.get(a)||r.fetchAsync(a));if(c instanceof Dict){let t=c.getRaw("Type");t instanceof Ref&&(t=await r.fetchAsync(t));if(isName(t,"Page")||!c.has("Kids")){s.has(a)||s.put(a,1);i.has(a)||i.put(a,l);if(l===e)return[c,a];l++;continue}}t.push(c);continue}if(!(a instanceof Dict))throw new FormatError("Page dictionary kid reference points to wrong type of object.");const{objId:f}=a;let c=a.getRaw("Count");c instanceof Ref&&(c=await r.fetchAsync(c));if(Number.isInteger(c)&&c>=0){f&&!s.has(f)&&s.put(f,c);if(l+c<=e){l+=c;continue}}let h=a.getRaw("Kids");h instanceof Ref&&(h=await r.fetchAsync(h));if(!Array.isArray(h)){let t=a.getRaw("Type");t instanceof Ref&&(t=await r.fetchAsync(t));if(isName(t,"Page")||!a.has("Kids")){if(l===e)return[a,null];l++;continue}throw new FormatError("Page dictionary kids object is not an array.")}for(let e=h.length-1;e>=0;e--){const n=h[e];t.push(n);a===this.toplevelPagesDict&&n instanceof Ref&&!o.has(n)&&o.put(n,r.fetchAsync(n))}}throw new Error(`Page index ${e} not found.`)}async getAllPageDicts(e=!1){const{ignoreErrors:t}=this.pdfManager.evaluatorOptions,n=[{currentNode:this.toplevelPagesDict,posInKids:0}],a=new RefSet,r=this.#ve.getRaw("Pages");r instanceof Ref&&a.put(r);const s=new Map,i=this.xref,o=this.pageIndexCache;let l=0;function addPageDict(e,t){t&&!o.has(t)&&o.put(t,l);s.set(l++,[e,t])}function addPageError(n){if(n instanceof XRefEntryException&&!e)throw n;if(e&&t&&0===l){warn(`getAllPageDicts - Skipping invalid first page: "${n}".`);n=Dict.empty}s.set(l++,[n,null])}for(;n.length>0;){const e=n.at(-1),{currentNode:t,posInKids:r}=e;let s=t.getRaw("Kids");if(s instanceof Ref)try{s=await i.fetchAsync(s)}catch(e){addPageError(e);break}if(!Array.isArray(s)){addPageError(new FormatError("Page dictionary kids object is not an array."));break}if(r>=s.length){n.pop();continue}const o=s[r];let l;if(o instanceof Ref){if(a.has(o)){addPageError(new FormatError("Pages tree contains circular reference."));break}a.put(o);try{l=await i.fetchAsync(o)}catch(e){addPageError(e);break}}else l=o;if(!(l instanceof Dict)){addPageError(new FormatError("Page dictionary kid reference points to wrong type of object."));break}let f=l.getRaw("Type");if(f instanceof Ref)try{f=await i.fetchAsync(f)}catch(e){addPageError(e);break}isName(f,"Page")||!l.has("Kids")?addPageDict(l,o instanceof Ref?o:null):n.push({currentNode:l,posInKids:0});e.posInKids++}return s}getPageIndex(e){const t=this.pageIndexCache.get(e);if(void 0!==t)return Promise.resolve(t);const n=this.xref;let a=0;const next=t=>function pagesBeforeRef(t){let a,r=0;return n.fetchAsync(t).then(function(n){if(isRefsEqual(t,e)&&!isDict(n,"Page")&&!(n instanceof Dict&&!n.has("Type")&&n.has("Contents")))throw new FormatError("The reference does not point to a /Page dictionary.");if(!n)return null;if(!(n instanceof Dict))throw new FormatError("Node must be a dictionary.");a=n.getRaw("Parent");return n.getAsync("Parent")}).then(function(e){if(!e)return null;if(!(e instanceof Dict))throw new FormatError("Parent must be a dictionary.");return e.getAsync("Kids")}).then(function(e){if(!e)return null;const s=[];let i=!1;for(const a of e){if(!(a instanceof Ref))throw new FormatError("Kid must be a reference.");if(isRefsEqual(a,t)){i=!0;break}s.push(n.fetchAsync(a).then(function(e){if(!(e instanceof Dict))throw new FormatError("Kid node must be a dictionary.");e.has("Count")?r+=e.get("Count"):r++}))}if(!i)throw new FormatError("Kid reference not found in parent's kids.");return Promise.all(s).then(()=>[r,a])})}(t).then(t=>{if(!t){this.pageIndexCache.put(e,a);return a}const[n,r]=t;a+=n;return next(r)});return next(e)}get baseUrl(){const e=this.#ve.get("URI");if(e instanceof Dict){const t=e.get("Base");if("string"==typeof t){const e=createValidAbsoluteUrl(t,null,{tryConvertEncoding:!0});if(e)return shadow(this,"baseUrl",e.href)}}return shadow(this,"baseUrl",this.pdfManager.docBaseUrl)}static parseDestDictionary({destDict:e,resultObj:t,docBaseUrl:n=null,docAttachments:a=null}){if(!(e instanceof Dict)){warn("parseDestDictionary: `destDict` must be a dictionary.");return}let r,s,i=e.get("A");if(!(i instanceof Dict))if(e.has("Dest"))i=e.get("Dest");else{i=e.get("AA");i instanceof Dict&&(i.has("D")?i=i.get("D"):i.has("U")&&(i=i.get("U")))}if(i instanceof Dict){const e=i.get("S");if(!(e instanceof Name)){warn("parseDestDictionary: Invalid type in Action dictionary.");return}const n=e.name;switch(n){case"ResetForm":const e=i.get("Flags"),o=!(1&("number"==typeof e?e:0)),l=[],f=[];for(const e of i.get("Fields")||[])e instanceof Ref?f.push(e.toString()):"string"==typeof e&&l.push(stringToPDFString(e));t.resetForm={fields:l,refs:f,include:o};break;case"URI":r=i.get("URI");r instanceof Name&&(r="/"+r.name);break;case"GoTo":s=i.get("D");break;case"Launch":case"GoToR":const c=i.get("F");if(c instanceof Dict){const e=new FileSpec(c,!0);({rawFilename:r}=e.serializable)}else{if("string"!=typeof c)break;r=c}const h=fetchRemoteDest(i);h&&(r=r.split("#",1)[0]+"#"+h);const u=i.get("NewWindow");"boolean"==typeof u&&(t.newWindow=u);break;case"GoToE":const m=i.get("T");let p;if(a&&m instanceof Dict){const e=m.get("R"),t=m.get("N");isName(e,"C")&&"string"==typeof t&&(p=a[stringToPDFString(t,!0)])}if(p){t.attachment=p;const e=fetchRemoteDest(i);e&&(t.attachmentDest=e)}else warn('parseDestDictionary - unimplemented "GoToE" action.');break;case"Named":const d=i.get("N");d instanceof Name&&(t.action=d.name);break;case"SetOCGState":const g=i.get("State"),b=i.get("PreserveRB");if(!Array.isArray(g)||0===g.length)break;const w=[];for(const e of g)if(e instanceof Name)switch(e.name){case"ON":case"OFF":case"Toggle":w.push(e.name)}else e instanceof Ref&&w.push(e.toString());if(w.length!==g.length)break;t.setOCGState={state:w,preserveRB:"boolean"!=typeof b||b};break;case"JavaScript":const j=i.get("JS");let k;j instanceof BaseStream?k=j.getString():"string"==typeof j&&(k=j);const y=k&&recoverJsURL(stringToPDFString(k,!0));if(y){r=y.url;t.newWindow=y.newWindow;break}default:if("JavaScript"===n||"SubmitForm"===n)break;warn(`parseDestDictionary - unsupported action: "${n}".`)}}else e.has("Dest")&&(s=e.get("Dest"));if("string"==typeof r){const e=createValidAbsoluteUrl(r,n,{addDefaultProtocol:!0,tryConvertEncoding:!0});e&&(t.url=e.href);t.unsafeUrl=r}if(s){s instanceof Name&&(s=s.name);"string"==typeof s?t.dest=stringToPDFString(s,!0):Ls(s)&&(t.dest=s)}}}function mayHaveChildren(e){return e instanceof Ref||e instanceof Dict||e instanceof BaseStream||Array.isArray(e)}function addChildren(e,t){if(e instanceof Dict)e=e.getRawValues();else if(e instanceof BaseStream)e=e.dict.getRawValues();else if(!Array.isArray(e))return;for(const n of e)mayHaveChildren(n)&&t.push(n)}class ObjectLoader{refSet=new RefSet;constructor(e,t,n){this.dict=e;this.keys=t;this.xref=n}async load(){const{keys:e,dict:t}=this,n=[];for(const a of e){const e=t.getRaw(a);void 0!==e&&n.push(e)}await this.#Be(n);this.refSet=null}async#Be(e){const t=[],n=[];for(;e.length;){let a=e.pop();if(a instanceof Ref){if(this.refSet.has(a))continue;try{this.refSet.put(a);a=this.xref.fetch(a)}catch(e){if(!(e instanceof MissingDataException)){warn(`ObjectLoader.#walk - requesting all data: "${e}".`);await this.xref.stream.manager.requestAllChunks();return}t.push(a);n.push({begin:e.begin,end:e.end})}}if(a instanceof BaseStream){const e=a.getBaseStreams();if(e){let r=!1;for(const t of e)if(!t.isDataLoaded){r=!0;n.push({begin:t.start,end:t.end})}r&&t.push(a)}}addChildren(a,e)}if(n.length){await this.xref.stream.manager.requestRanges(n);for(const e of t)e instanceof Ref&&this.refSet.remove(e);await this.#Be(t)}}static async load(e,t,n){if(n.stream.isDataLoaded)return;const a=new ObjectLoader(e,t,n);await a.load()}}const Us=Symbol(),Xs=Symbol(),Ws=Symbol(),Ks=Symbol(),Vs=Symbol(),Gs=Symbol(),$s=Symbol(),Ys=Symbol(),Js=Symbol(),Qs=Symbol("content"),Zs=Symbol("data"),ei=Symbol(),ti=Symbol("extra"),ni=Symbol(),ai=Symbol(),ri=Symbol(),si=Symbol(),ii=Symbol(),oi=Symbol(),li=Symbol(),fi=Symbol(),ci=Symbol(),hi=Symbol(),ui=Symbol(),mi=Symbol(),pi=Symbol(),di=Symbol(),gi=Symbol(),bi=Symbol(),wi=Symbol(),ji=Symbol(),ki=Symbol(),yi=Symbol(),qi=Symbol(),vi=Symbol(),Si=Symbol(),xi=Symbol(),Ai=Symbol(),Ci=Symbol(),Ii=Symbol(),Fi=Symbol(),Ti=Symbol(),Oi=Symbol(),Ri=Symbol(),Bi=Symbol(),Hi=Symbol("namespaceId"),Di=Symbol("nodeName"),Mi=Symbol(),Pi=Symbol(),Ei=Symbol(),Ni=Symbol(),zi=Symbol(),_i=Symbol(),Xi=Symbol(),Wi=Symbol(),Ki=Symbol("root"),Vi=Symbol(),Gi=Symbol(),$i=Symbol(),Yi=Symbol(),Ji=Symbol(),Qi=Symbol(),Zi=Symbol(),eo=Symbol(),to=Symbol(),no=Symbol(),ao=Symbol(),ro=Symbol("uid");__webpack_require__(531),__webpack_require__(5213);const so=Symbol(),io={config:{id:0,check:e=>e.startsWith("http://www.xfa.org/schema/xci/")},connectionSet:{id:1,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-connection-set/")},datasets:{id:2,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-data/")},form:{id:3,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-form/")},localeSet:{id:4,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-locale-set/")},pdf:{id:5,check:e=>"http://ns.adobe.com/xdp/pdf/"===e},signature:{id:6,check:e=>"http://www.w3.org/2000/09/xmldsig#"===e},sourceSet:{id:7,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-source-set/")},stylesheet:{id:8,check:e=>"http://www.w3.org/1999/XSL/Transform"===e},template:{id:9,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-template/")},xdc:{id:10,check:e=>e.startsWith("http://www.xfa.org/schema/xdc/")},xdp:{id:11,check:e=>"http://ns.adobe.com/xdp/"===e},xfdf:{id:12,check:e=>"http://ns.adobe.com/xfdf/"===e},xhtml:{id:13,check:e=>"http://www.w3.org/1999/xhtml"===e},xmpmeta:{id:14,check:e=>"http://ns.adobe.com/xmpmeta/"===e}},oo={pt:e=>e,cm:e=>e/2.54*72,mm:e=>e/25.4*72,in:e=>72*e,px:e=>e},lo=/([+-]?\d+\.?\d*)(.*)/;function stripQuotes(e){return e.startsWith("'")||e.startsWith('"')?e.slice(1,-1):e}function getInteger({data:e,defaultValue:t,validate:n}){if(!e)return t;e=e.trim();const a=parseInt(e,10);return!isNaN(a)&&n(a)?a:t}function getFloat({data:e,defaultValue:t,validate:n}){if(!e)return t;e=e.trim();const a=parseFloat(e);return!isNaN(a)&&n(a)?a:t}function getKeyword({data:e,defaultValue:t,validate:n}){return e&&n(e=e.trim())?e:t}function getStringOption(e,t){return getKeyword({data:e,defaultValue:t[0],validate:e=>t.includes(e)})}function getMeasurement(e,t="0"){t||="0";if(!e)return getMeasurement(t);const n=e.trim().match(lo);if(!n)return getMeasurement(t);const[,a,r]=n,s=parseFloat(a);if(isNaN(s))return getMeasurement(t);if(0===s)return 0;const i=oo[r];return i?i(s):s}function getRatio(e){if(!e)return{num:1,den:1};const t=e.split(":",2).map(e=>parseFloat(e.trim())).filter(e=>!isNaN(e));1===t.length&&t.push(1);if(0===t.length)return{num:1,den:1};const[n,a]=t;return{num:n,den:a}}function getRelevant(e){return e?e.trim().split(/\s+/).map(e=>({excluded:"-"===e[0],viewname:e.substring(1)})):[]}class HTMLResult{static get FAILURE(){return shadow(this,"FAILURE",new HTMLResult(!1,null,null,null))}static get EMPTY(){return shadow(this,"EMPTY",new HTMLResult(!0,null,null,null))}constructor(e,t,n,a){this.success=e;this.html=t;this.bbox=n;this.breakNode=a}isBreak(){return!!this.breakNode}static breakNode(e){return new HTMLResult(!1,null,null,e)}static success(e,t=null){return new HTMLResult(!0,e,t,null)}}class FontFinder{constructor(e){this.fonts=new Map;this.cache=new Map;this.warned=new Set;this.defaultFont=null;this.add(e)}add(e,t=null){for(const t of e)this.addPdfFont(t);for(const e of this.fonts.values())e.regular||(e.regular=e.italic||e.bold||e.bolditalic);if(!t||0===t.size)return;const n=this.fonts.get("PdfJS-Fallback-PdfJS-XFA");for(const e of t)this.fonts.set(e,n)}addPdfFont(e){const t=e.cssFontInfo,n=t.fontFamily,a=this.fonts.getOrInsertComputed(n,makeObj);this.defaultFont??=a;let r="";const s=parseFloat(t.fontWeight);0!==parseFloat(t.italicAngle)?r=s>=700?"bolditalic":"italic":s>=700&&(r="bold");if(!r){(e.name.includes("Bold")||e.psName?.includes("Bold"))&&(r="bold");(e.name.includes("Italic")||e.name.endsWith("It")||e.psName?.includes("Italic")||e.psName?.endsWith("It"))&&(r+="italic")}r||(r="regular");a[r]=e}getDefault(){return this.defaultFont}find(e,t=!0){let n=this.fonts.get(e)||this.cache.get(e);if(n)return n;const a=/,|-|_| |bolditalic|bold|italic|regular|it/gi;let r=e.replaceAll(a,"");n=this.fonts.get(r);if(n){this.cache.set(e,n);return n}r=r.toLowerCase();const s=[];for(const[e,t]of this.fonts)e.replaceAll(a,"").toLowerCase().startsWith(r)&&s.push(t);if(0===s.length)for(const e of this.fonts.values())e.regular.name?.replaceAll(a,"").toLowerCase().startsWith(r)&&s.push(e);if(0===s.length){r=r.replaceAll(/psmt|mt/gi,"");for(const[e,t]of this.fonts)e.replaceAll(a,"").toLowerCase().startsWith(r)&&s.push(t)}if(0===s.length)for(const e of this.fonts.values())e.regular.name?.replaceAll(a,"").toLowerCase().startsWith(r)&&s.push(e);if(s.length>=1){1!==s.length&&t&&warn(`XFA - Too many choices to guess the correct font: ${e}`);this.cache.set(e,s[0]);return s[0]}if(t&&!this.warned.has(e)){this.warned.add(e);warn(`XFA - Cannot find the font: ${e}`)}return null}}function selectFont(e,t){return"italic"===e.posture?"bold"===e.weight?t.bolditalic:t.italic:"bold"===e.weight?t.bold:t.regular}class text_FontInfo{constructor(e,t,n,a){this.lineHeight=n;this.paraMargin=t||{top:0,bottom:0,left:0,right:0};if(!e){[this.pdfFont,this.xfaFont]=this.defaultFont(a);return}this.xfaFont={typeface:e.typeface,posture:e.posture,weight:e.weight,size:e.size,letterSpacing:e.letterSpacing};const r=a.find(e.typeface);if(r){this.pdfFont=selectFont(e,r);this.pdfFont||([this.pdfFont,this.xfaFont]=this.defaultFont(a))}else[this.pdfFont,this.xfaFont]=this.defaultFont(a)}defaultFont(e){const t=e.find("Helvetica",!1)||e.find("Myriad Pro",!1)||e.find("Arial",!1)||e.getDefault();if(t?.regular){const e=t.regular;return[e,{typeface:e.cssFontInfo.fontFamily,posture:"normal",weight:"normal",size:10,letterSpacing:0}]}return[null,{typeface:"Courier",posture:"normal",weight:"normal",size:10,letterSpacing:0}]}}class FontSelector{constructor(e,t,n,a){this.fontFinder=a;this.stack=[new text_FontInfo(e,t,n,a)]}pushData(e,t,n){const a=this.stack.at(-1);for(const t of["typeface","posture","weight","size","letterSpacing"])e[t]||(e[t]=a.xfaFont[t]);for(const e of["top","bottom","left","right"])isNaN(t[e])&&(t[e]=a.paraMargin[e]);const r=new text_FontInfo(e,t,n||a.lineHeight,this.fontFinder);r.pdfFont||(r.pdfFont=a.pdfFont);this.stack.push(r)}popFont(){this.stack.pop()}topFont(){return this.stack.at(-1)}}class TextMeasure{constructor(e,t,n,a){this.glyphs=[];this.fontSelector=new FontSelector(e,t,n,a);this.extraHeight=0}pushData(e,t,n){this.fontSelector.pushData(e,t,n)}popFont(e){return this.fontSelector.popFont()}addPara(){const e=this.fontSelector.topFont();this.extraHeight+=e.paraMargin.top+e.paraMargin.bottom}addString(e){if(!e)return;const t=this.fontSelector.topFont(),n=t.xfaFont.size;if(t.pdfFont){const a=t.xfaFont.letterSpacing,r=t.pdfFont,s=r.lineHeight||1.2,i=t.lineHeight||Math.max(1.2,s)*n,o=s-(void 0===r.lineGap?.2:r.lineGap),l=Math.max(1,o)*n,f=n/1e3,c=r.defaultWidth||r.charsToGlyphs(" ")[0].width;for(const t of e.split(/[\u2029\n]/)){const e=r.encodeString(t).join(""),n=r.charsToGlyphs(e);for(const e of n){const t=e.width||c;this.glyphs.push([t*f+a,i,l,e.unicode,!1])}this.glyphs.push([0,0,0,"\n",!0])}this.glyphs.pop();return}for(const t of e.split(/[\u2029\n]/)){for(const e of t.split(""))this.glyphs.push([n,1.2*n,n,e,!1]);this.glyphs.push([0,0,0,"\n",!0])}this.glyphs.pop()}compute(e){let t=-1,n=0,a=0,r=0,s=0,i=0,o=!1,l=!0;for(let f=0,c=this.glyphs.length;f<c;f++){const[c,h,u,m,p]=this.glyphs[f],d=" "===m,g=l?u:h;if(p){a=Math.max(a,s);s=0;r+=i;i=g;t=-1;n=0;l=!1}else if(d)if(s+c>e){a=Math.max(a,s);s=0;r+=i;i=g;t=-1;n=0;o=!0;l=!1}else{i=Math.max(g,i);n=s;s+=c;t=f}else if(s+c>e){r+=i;i=g;if(-1!==t){f=t;a=Math.max(a,n);s=0;t=-1;n=0}else{a=Math.max(a,s);s=c}o=!0;l=!1}else{s+=c;i=Math.max(g,i)}}a=Math.max(a,s);r+=i+this.extraHeight;return{width:1.02*a,height:r,isBroken:o}}}__webpack_require__(8454),__webpack_require__(9452);const fo=/^[^.[]+/,co=/^[^\]]+/,ho=0,uo=1,mo=2,po=3,go=4,bo=new Map([["$data",(e,t)=>e.datasets?e.datasets.data:e],["$record",(e,t)=>(e.datasets?e.datasets.data:e)[mi]()[0]],["$template",(e,t)=>e.template],["$connectionSet",(e,t)=>e.connectionSet],["$form",(e,t)=>e.form],["$layout",(e,t)=>e.layout],["$host",(e,t)=>e.host],["$dataWindow",(e,t)=>e.dataWindow],["$event",(e,t)=>e.event],["!",(e,t)=>e.datasets],["$xfa",(e,t)=>e],["xfa",(e,t)=>e],["$",(e,t)=>t]]),wo=new WeakMap;function parseIndex(e){return"*"===(e=e.trim())?1/0:parseInt(e,10)||0}function parseExpression(e,t,n=!0){let a=e.match(fo);if(!a)return null;let[r]=a;const s=[{name:r,cacheName:"."+r,index:0,js:null,formCalc:null,operator:ho}];let i=r.length;for(;i<e.length;){const o=i;if("["===e.charAt(i++)){a=e.slice(i).match(co);if(!a){warn("XFA - Invalid index in SOM expression");return null}s.at(-1).index=parseIndex(a[0]);i+=a[0].length+1;continue}let l;switch(e.charAt(i)){case".":if(!t)return null;i++;l=uo;break;case"#":i++;l=mo;break;case"[":if(n){warn("XFA - SOM expression contains a FormCalc subexpression which is not supported for now.");return null}l=po;break;case"(":if(n){warn("XFA - SOM expression contains a JavaScript subexpression which is not supported for now.");return null}l=go;break;default:l=ho}a=e.slice(i).match(fo);if(!a)break;[r]=a;i+=r.length;s.push({name:r,cacheName:e.slice(o,i),operator:l,index:0,js:null,formCalc:null})}return s}function searchNode(e,t,n,a=!0,r=!0){const s=parseExpression(n,a);if(!s)return null;const i=bo.get(s[0].name);let o,l=0;if(i){o=!0;e=[i(e,t)];l=1}else{o=null===t;e=[t||e]}for(let n=s.length;l<n;l++){const{name:n,cacheName:a,operator:i,index:f}=s[l],c=[];for(const t of e){if(!t.isXFAObject)continue;let e,s;if(r){s=wo.getOrInsertComputed(t,makeMap);e=s.get(a)}if(!e){switch(i){case ho:e=t[li](n,!1);break;case uo:e=t[li](n,!0);break;case mo:e=t[oi](n);e=e.isXFAObjectArray?e.children:[e]}r&&s.set(a,e)}e.length>0&&c.push(e)}if(0===c.length&&!o&&0===l){const n=t[bi]();if(!(t=n))return null;l=-1;e=[t];continue}e=isFinite(f)?c.filter(e=>f<e.length).map(e=>e[f]):c.flat()}return 0===e.length?null:e}function createDataNode(e,t,n){const a=parseExpression(n);if(!a)return null;if(a.some(e=>e.operator===uo))return null;const r=bo.get(a[0].name);let s=0;if(r){e=r(e,t);s=1}else e=t||e;for(let t=a.length;s<t;s++){const{name:t,operator:n,index:r}=a[s];if(!isFinite(r)){a[s].index=0;return e.createNodes(a.slice(s))}let i;switch(n){case ho:i=e[li](t,!1);break;case uo:i=e[li](t,!0);break;case mo:i=e[oi](t);i=i.isXFAObjectArray?i.children:[i]}if(0===i.length)return e.createNodes(a.slice(s));if(!(r<i.length)){a[s].index=r-i.length;return e.createNodes(a.slice(s))}{const t=i[r];if(!t.isXFAObject){warn("XFA - Cannot create a node.");return null}e=t}}return null}const jo=Symbol(),ko=Symbol(),yo=Symbol(),qo=Symbol("_children"),vo=Symbol(),So=Symbol(),xo=Symbol(),Ao=Symbol(),Co=Symbol(),Io=Symbol(),Fo=Symbol(),Oo=Symbol(),Ro=Symbol(),Bo=Symbol("parent"),Ho=Symbol(),Do=Symbol(),Mo=Symbol();let Po=0;const Eo=io.datasets.id;class XFAObject{constructor(e,t,n=!1){this[Hi]=e;this[Di]=t;this[Fo]=n;this[Bo]=null;this[qo]=[];this[ro]=`${t}${Po++}`;this[ji]=null}get isXFAObject(){return!0}get isXFAObjectArray(){return!1}createNodes(e){let t=this,n=null;for(const{name:a,index:r}of e){for(let e=0,s=isFinite(r)?r:0;e<=s;e++){const e=t[Hi]===Eo?-1:t[Hi];n=new XmlObject(e,a);t[Ws](n)}t=n}return n}[Pi](e){if(!this[Fo]||!this[Ei](e))return!1;const t=e[Di],n=this[t];if(!(n instanceof XFAObjectArray)){null!==n&&this[Wi](n);this[t]=e;this[Ws](e);return!0}if(n.push(e)){this[Ws](e);return!0}let a="";this.id?a=` (id: ${this.id})`:this.name&&(a=` (name: ${this.name} ${this.h.value})`);warn(`XFA - node "${this[Di]}"${a} has already enough "${t}"!`);return!1}[Ei](e){return this.hasOwnProperty(e[Di])&&e[Hi]===this[Hi]}[Ii](){return!1}[Us](){return!1}[Si](){return!1}[xi](){return!1}[_i](){this.para&&this[wi]()[ti].paraStack.pop()}[Xi](){this[wi]()[ti].paraStack.push(this.para)}[$i](e){this.id&&this[Hi]===io.template.id&&e.set(this.id,this)}[wi](){return this[ji].template}[Fi](){return!1}[Ti](){return!1}[Ws](e){e[Bo]=this;this[qo].push(e);!e[ji]&&this[ji]&&(e[ji]=this[ji])}[Wi](e){const t=this[qo].indexOf(e);this[qo].splice(t,1)}[ki](){return this.hasOwnProperty("value")}[Ji](e){}[Ni](e){}[ni](){}[Vs](e){delete this[Fo];if(this[$s]){e.clean(this[$s]);delete this[$s]}}[qi](e){return this[qo].indexOf(e)}[vi](e,t){t[Bo]=this;this[qo].splice(e,0,t);!t[ji]&&this[ji]&&(t[ji]=this[ji])}[Oi](){return!this.name}[Bi](){return""}[Zi](){return 0===this[qo].length?this[Qs]:this[qo].map(e=>e[Zi]()).join("")}get[yo](){const e=Object.getPrototypeOf(this);if(!e._attributes){const t=e._attributes=new Set;for(const e of Object.getOwnPropertyNames(this)){if(null===this[e]||this[e]instanceof XFAObject||this[e]instanceof XFAObjectArray)break;t.add(e)}}return shadow(this,yo,e._attributes)}[Ci](e){let t=this;for(;t;){if(t===e)return!0;t=t[bi]()}return!1}[bi](){return this[Bo]}[gi](){return this[bi]()}[mi](e=null){return e?this[e]:this[qo]}[ei](){const e=Object.create(null);this[Qs]&&(e.$content=this[Qs]);for(const t of Object.getOwnPropertyNames(this)){const n=this[t];null!==n&&(n instanceof XFAObject?e[t]=n[ei]():n instanceof XFAObjectArray?n.isEmpty()||(e[t]=n.dump()):e[t]=n)}return e}[ao](){return null}[to](){return HTMLResult.EMPTY}*[pi](){for(const e of this[mi]())yield e}*[Ao](e,t){for(const n of this[pi]())if(!e||t===e.has(n[Di])){const e=this[ii](),t=n[to](e);t.success||(this[ti].failingNode=n);yield t}}[ai](){return null}[Xs](e,t){this[ti].children.push(e)}[ii](){}[Ks]({filter:e=null,include:t=!0}){if(this[ti].generator){const e=this[ii](),t=this[ti].failingNode[to](e);if(!t.success)return t;t.html&&this[Xs](t.html,t.bbox);delete this[ti].failingNode}else this[ti].generator=this[Ao](e,t);for(;;){const e=this[ti].generator.next();if(e.done)break;const t=e.value;if(!t.success)return t;t.html&&this[Xs](t.html,t.bbox)}this[ti].generator=null;return HTMLResult.EMPTY}[Yi](e){this[Do]=new Set(Object.keys(e))}[Io](e){const t=this[yo],n=this[Do];return[...e].filter(e=>t.has(e)&&!n.has(e))}[Vi](e,t=new Set){for(const n of this[qo])n[Ho](e,t)}[Ho](e,t){const n=this[Co](e,t);n?this[jo](n,e,t):this[Vi](e,t)}[Co](e,t){const{use:n,usehref:a}=this;if(!n&&!a)return null;let r=null,s=null,i=null,o=n;if(a){o=a;a.startsWith("#som(")&&a.endsWith(")")?s=a.slice(5,-1):a.startsWith(".#som(")&&a.endsWith(")")?s=a.slice(6,-1):a.startsWith("#")?i=a.slice(1):a.startsWith(".#")&&(i=a.slice(2))}else n.startsWith("#")?i=n.slice(1):s=n;this.use=this.usehref="";if(i)r=e.get(i);else{r=searchNode(e.get(Ki),this,s,!0,!1);r&&(r=r[0])}if(!r){warn(`XFA - Invalid prototype reference: ${o}.`);return null}if(r[Di]!==this[Di]){warn(`XFA - Incompatible prototype: ${r[Di]} !== ${this[Di]}.`);return null}if(t.has(r)){warn("XFA - Cycle detected in prototypes use.");return null}t.add(r);const l=r[Co](e,t);l&&r[jo](l,e,t);r[Vi](e,t);t.delete(r);return r}[jo](e,t,n){if(n.has(e)){warn("XFA - Cycle detected in prototypes use.");return}!this[Qs]&&e[Qs]&&(this[Qs]=e[Qs]);new Set(n).add(e);for(const t of this[Io](e[Do])){this[t]=e[t];this[Do]&&this[Do].add(t)}for(const a of Object.getOwnPropertyNames(this)){if(this[yo].has(a))continue;const r=this[a],s=e[a];if(r instanceof XFAObjectArray){for(const e of r[qo])e[Ho](t,n);for(let a=r[qo].length,i=s[qo].length;a<i;a++){const s=e[qo][a][Ys]();if(!r.push(s))break;s[Bo]=this;this[qo].push(s);s[Ho](t,n)}}else if(null===r){if(null!==s){const e=s[Ys]();e[Bo]=this;this[a]=e;this[qo].push(e);e[Ho](t,n)}}else{r[Vi](t,n);s&&r[jo](s,t,n)}}}static[vo](e){return Array.isArray(e)?e.map(e=>XFAObject[vo](e)):"object"==typeof e&&null!==e?Object.assign({},e):e}[Ys](){const e=Object.create(Object.getPrototypeOf(this));for(const t of Object.getOwnPropertySymbols(this))try{e[t]=this[t]}catch{shadow(e,t,this[t])}e[ro]=`${e[Di]}${Po++}`;e[qo]=[];for(const t of Object.getOwnPropertyNames(this)){if(this[yo].has(t)){e[t]=XFAObject[vo](this[t]);continue}const n=this[t];e[t]=n instanceof XFAObjectArray?new XFAObjectArray(n[Oo]):null}for(const t of this[qo]){const n=t[Di],a=t[Ys]();e[qo].push(a);a[Bo]=e;null===e[n]?e[n]=a:e[n][qo].push(a)}return e}[mi](e=null){return e?this[qo].filter(t=>t[Di]===e):this[qo]}[oi](e){return this[e]}[li](e,t,n=!0){return Array.from(this[fi](e,t,n))}*[fi](e,t,n=!0){if("parent"!==e){for(const n of this[qo]){n[Di]===e&&(yield n);n.name===e&&(yield n);(t||n[Oi]())&&(yield*n[fi](e,t,!1))}n&&this[yo].has(e)&&(yield new XFAAttribute(this,e,this[e]))}else yield this[Bo]}}class XFAObjectArray{constructor(e=1/0){this[Oo]=e;this[qo]=[]}get isXFAObject(){return!1}get isXFAObjectArray(){return!0}push(e){if(this[qo].length<=this[Oo]){this[qo].push(e);return!0}warn(`XFA - node "${e[Di]}" accepts no more than ${this[Oo]} children`);return!1}isEmpty(){return 0===this[qo].length}dump(){return 1===this[qo].length?this[qo][0][ei]():this[qo].map(e=>e[ei]())}[Ys](){const e=new XFAObjectArray(this[Oo]);e[qo]=this[qo].map(e=>e[Ys]());return e}get children(){return this[qo]}clear(){this[qo].length=0}}class XFAAttribute{constructor(e,t,n){this[Bo]=e;this[Di]=t;this[Qs]=n;this[Js]=!1;this[ro]="attribute"+Po++}[bi](){return this[Bo]}[Ai](){return!0}[ci](){return this[Qs].trim()}[Ji](e){e=e.value||"";this[Qs]=e.toString()}[Zi](){return this[Qs]}[Ci](e){return this[Bo]===e||this[Bo][Ci](e)}}class XmlObject extends XFAObject{constructor(e,t,n={}){super(e,t);this[Qs]="";this[So]=null;if("#text"!==t){const e=new Map;this[ko]=e;for(const[t,a]of Object.entries(n))e.set(t,new XFAAttribute(this,t,a));if(n.hasOwnProperty(Mi)){const e=n[Mi].xfa.dataNode;void 0!==e&&("dataGroup"===e?this[So]=!1:"dataValue"===e&&(this[So]=!0))}}this[Js]=!1}[no](e){const t=this[Di];if("#text"===t){e.push(encodeToXmlString(this[Qs]));return}const n=utf8StringToString(t),a=this[Hi]===Eo?"xfa:":"";e.push(`<${a}${n}`);for(const[t,n]of this[ko]){const a=utf8StringToString(t);e.push(` ${a}="${encodeToXmlString(n[Qs])}"`)}null!==this[So]&&(this[So]?e.push(' xfa:dataNode="dataValue"'):e.push(' xfa:dataNode="dataGroup"'));if(this[Qs]||0!==this[qo].length){e.push(">");if(this[Qs])"string"==typeof this[Qs]?e.push(encodeToXmlString(this[Qs])):this[Qs][no](e);else for(const t of this[qo])t[no](e);e.push(`</${a}${n}>`)}else e.push("/>")}[Pi](e){if(this[Qs]){const e=new XmlObject(this[Hi],"#text");this[Ws](e);e[Qs]=this[Qs];this[Qs]=""}this[Ws](e);return!0}[Ni](e){this[Qs]+=e}[ni](){if(this[Qs]&&this[qo].length>0){const e=new XmlObject(this[Hi],"#text");this[Ws](e);e[Qs]=this[Qs];delete this[Qs]}}[to](){return"#text"===this[Di]?HTMLResult.success({name:"#text",value:this[Qs]}):HTMLResult.EMPTY}[mi](e=null){return e?this[qo].filter(t=>t[Di]===e):this[qo]}[si](){return this[ko]}[oi](e){const t=this[ko].get(e);return void 0!==t?t:this[mi](e)}*[fi](e,t){const n=this[ko].get(e);n&&(yield n);for(const n of this[qo]){n[Di]===e&&(yield n);t&&(yield*n[fi](e,t))}}*[ri](e,t){const n=this[ko].get(e);!n||t&&n[Js]||(yield n);for(const n of this[qo])yield*n[ri](e,t)}*[ui](e,t,n){for(const a of this[qo]){a[Di]!==e||n&&a[Js]||(yield a);t&&(yield*a[ui](e,t,n))}}[Ai](){return null===this[So]?0===this[qo].length||this[qo][0][Hi]===io.xhtml.id:this[So]}[ci](){return null===this[So]?0===this[qo].length?this[Qs].trim():this[qo][0][Hi]===io.xhtml.id?this[qo][0][Zi]().trim():null:this[Qs].trim()}[Ji](e){e=e.value||"";this[Qs]=e.toString()}[ei](e=!1){const t=Object.create(null);e&&(t.$ns=this[Hi]);this[Qs]&&(t.$content=this[Qs]);t.$name=this[Di];t.children=[];for(const n of this[qo])t.children.push(n[ei](e));t.attributes=Object.create(null);for(const[e,n]of this[ko])t.attributes[e]=n[Qs];return t}}class ContentObject extends XFAObject{constructor(e,t){super(e,t);this[Qs]=""}[Ni](e){this[Qs]+=e}[ni](){}}class OptionObject extends ContentObject{constructor(e,t,n){super(e,t);this[Ro]=n}[ni](){this[Qs]=getKeyword({data:this[Qs],defaultValue:this[Ro][0],validate:e=>this[Ro].includes(e)})}[Vs](e){super[Vs](e);delete this[Ro]}}class StringObject extends ContentObject{[ni](){this[Qs]=this[Qs].trim()}}class IntegerObject extends ContentObject{constructor(e,t,n,a){super(e,t);this[xo]=n;this[Mo]=a}[ni](){this[Qs]=getInteger({data:this[Qs],defaultValue:this[xo],validate:this[Mo]})}[Vs](e){super[Vs](e);delete this[xo];delete this[Mo]}}class Option01 extends IntegerObject{constructor(e,t){super(e,t,0,e=>1===e)}}class Option10 extends IntegerObject{constructor(e,t){super(e,t,1,e=>0===e)}}function measureToString(e){return"string"==typeof e?"0px":Number.isInteger(e)?`${e}px`:`${e.toFixed(2)}px`}const No={anchorType(e,t){const n=e[gi]();if(n&&(!n.layout||"position"===n.layout)){"transform"in t||(t.transform="");switch(e.anchorType){case"bottomCenter":t.transform+="translate(-50%, -100%)";break;case"bottomLeft":t.transform+="translate(0,-100%)";break;case"bottomRight":t.transform+="translate(-100%,-100%)";break;case"middleCenter":t.transform+="translate(-50%,-50%)";break;case"middleLeft":t.transform+="translate(0,-50%)";break;case"middleRight":t.transform+="translate(-100%,-50%)";break;case"topCenter":t.transform+="translate(-50%,0)";break;case"topRight":t.transform+="translate(-100%,0)"}}},dimensions(e,t){const n=e[gi]();let a=e.w;const r=e.h;if(n.layout?.includes("row")){const t=n[ti],r=e.colSpan;let s;if(-1===r){s=Math.sumPrecise(t.columnWidths.slice(t.currentColumn));t.currentColumn=0}else{s=Math.sumPrecise(t.columnWidths.slice(t.currentColumn,t.currentColumn+r));t.currentColumn=(t.currentColumn+e.colSpan)%t.columnWidths.length}isNaN(s)||(a=e.w=s)}t.width=""!==a?measureToString(a):"auto";t.height=""!==r?measureToString(r):"auto"},position(e,t){const n=e[gi]();if(!n?.layout||"position"===n.layout){t.position="absolute";t.left=measureToString(e.x);t.top=measureToString(e.y)}},rotate(e,t){if(e.rotate){"transform"in t||(t.transform="");t.transform+=`rotate(-${e.rotate}deg)`;t.transformOrigin="top left"}},presence(e,t){switch(e.presence){case"invisible":t.visibility="hidden";break;case"hidden":case"inactive":t.display="none"}},hAlign(e,t){if("para"===e[Di])switch(e.hAlign){case"justifyAll":t.textAlign="justify-all";break;case"radix":t.textAlign="left";break;default:t.textAlign=e.hAlign}else switch(e.hAlign){case"left":t.alignSelf="start";break;case"center":t.alignSelf="center";break;case"right":t.alignSelf="end"}},margin(e,t){e.margin&&(t.margin=e.margin[ao]().margin)}};function setMinMaxDimensions(e,t){if("position"===e[gi]().layout){e.minW>0&&(t.minWidth=measureToString(e.minW));e.maxW>0&&(t.maxWidth=measureToString(e.maxW));e.minH>0&&(t.minHeight=measureToString(e.minH));e.maxH>0&&(t.maxHeight=measureToString(e.maxH))}}function layoutText(e,t,n,a,r,s){const i=new TextMeasure(t,n,a,r);"string"==typeof e?i.addString(e):e[zi](i);return i.compute(s)}function layoutNode(e,t){let n=null,a=null,r=!1;if((!e.w||!e.h)&&e.value){let s=0,i=0;if(e.margin){s=e.margin.leftInset+e.margin.rightInset;i=e.margin.topInset+e.margin.bottomInset}let o=null,l=null;if(e.para){l=Object.create(null);o=""===e.para.lineHeight?null:e.para.lineHeight;l.top=""===e.para.spaceAbove?0:e.para.spaceAbove;l.bottom=""===e.para.spaceBelow?0:e.para.spaceBelow;l.left=""===e.para.marginLeft?0:e.para.marginLeft;l.right=""===e.para.marginRight?0:e.para.marginRight}let f=e.font;if(!f){const t=e[wi]();let n=e[bi]();for(;n&&n!==t;){if(n.font){f=n.font;break}n=n[bi]()}}const c=(e.w||t.width)-s,h=e[ji].fontFinder;if(e.value.exData&&e.value.exData[Qs]&&"text/html"===e.value.exData.contentType){const t=layoutText(e.value.exData[Qs],f,l,o,h,c);a=t.width;n=t.height;r=t.isBroken}else{const t=e.value[Zi]();if(t){const e=layoutText(t,f,l,o,h,c);a=e.width;n=e.height;r=e.isBroken}}null===a||e.w||(a+=s);null===n||e.h||(n+=i)}return{w:a,h:n,isBroken:r}}function computeBbox(e,t,n){let a;if(""!==e.w&&""!==e.h)a=[e.x,e.y,e.w,e.h];else{if(!n)return null;let r=e.w;if(""===r){if(0===e.maxW){const t=e[gi]();r="position"===t.layout&&""!==t.w?0:e.minW}else r=Math.min(e.maxW,n.width);t.attributes.style.width=measureToString(r)}let s=e.h;if(""===s){if(0===e.maxH){const t=e[gi]();s="position"===t.layout&&""!==t.h?0:e.minH}else s=Math.min(e.maxH,n.height);t.attributes.style.height=measureToString(s)}a=[e.x,e.y,r,s]}return a}function fixDimensions(e){const t=e[gi]();if(t.layout?.includes("row")){const n=t[ti],a=e.colSpan;let r;r=-1===a?Math.sumPrecise(n.columnWidths.slice(n.currentColumn)):Math.sumPrecise(n.columnWidths.slice(n.currentColumn,n.currentColumn+a));isNaN(r)||(e.w=r)}t.layout&&"position"!==t.layout&&(e.x=e.y=0);"table"===e.layout&&""===e.w&&Array.isArray(e.columnWidths)&&(e.w=Math.sumPrecise(e.columnWidths))}function layoutClass(e){switch(e.layout){case"position":default:return"xfaPosition";case"lr-tb":return"xfaLrTb";case"rl-row":return"xfaRlRow";case"rl-tb":return"xfaRlTb";case"row":return"xfaRow";case"table":return"xfaTable";case"tb":return"xfaTb"}}function toStyle(e,...t){const n=Object.create(null);for(const a of t){const t=e[a];if(null!==t)if(No.hasOwnProperty(a))No[a](e,n);else if(t instanceof XFAObject){const e=t[ao]();e?Object.assign(n,e):warn(`(DEBUG) - XFA - style for ${a} not implemented yet`)}}return n}function createWrapper(e,t){const{attributes:n}=t,{style:a}=n,r={name:"div",attributes:{class:["xfaWrapper"],style:Object.create(null)},children:[]};n.class.push("xfaWrapped");if(e.border){const{widths:n,insets:s}=e.border[ti];let i,o,l=s[0],f=s[3];const c=s[0]+s[2],h=s[1]+s[3];switch(e.border.hand){case"even":l-=n[0]/2;f-=n[3]/2;i=`calc(100% + ${(n[1]+n[3])/2-h}px)`;o=`calc(100% + ${(n[0]+n[2])/2-c}px)`;break;case"left":l-=n[0];f-=n[3];i=`calc(100% + ${n[1]+n[3]-h}px)`;o=`calc(100% + ${n[0]+n[2]-c}px)`;break;case"right":i=h?`calc(100% - ${h}px)`:"100%";o=c?`calc(100% - ${c}px)`:"100%"}const u=["xfaBorder"];isPrintOnly(e.border)&&u.push("xfaPrintOnly");const m={name:"div",attributes:{class:u,style:{top:`${l}px`,left:`${f}px`,width:i,height:o}},children:[]};for(const e of["border","borderWidth","borderColor","borderRadius","borderStyle"])if(void 0!==a[e]){m.attributes.style[e]=a[e];delete a[e]}r.children.push(m,t)}else r.children.push(t);for(const e of["background","backgroundClip","top","left","width","height","minWidth","minHeight","maxWidth","maxHeight","transform","transformOrigin","visibility"])if(void 0!==a[e]){r.attributes.style[e]=a[e];delete a[e]}r.attributes.style.position="absolute"===a.position?"absolute":"relative";delete a.position;if(a.alignSelf){r.attributes.style.alignSelf=a.alignSelf;delete a.alignSelf}return r}function fixTextIndent(e){const t=getMeasurement(e.textIndent,"0px");if(t>=0)return;const n="padding"+("left"===("right"===e.textAlign?"right":"left")?"Left":"Right"),a=getMeasurement(e[n],"0px");e[n]=a-t+"px"}function setAccess(e,t){switch(e.access){case"nonInteractive":t.push("xfaNonInteractive");break;case"readOnly":t.push("xfaReadOnly");break;case"protected":t.push("xfaDisabled")}}function isPrintOnly(e){return e.relevant.length>0&&!e.relevant[0].excluded&&"print"===e.relevant[0].viewname}function getCurrentPara(e){const t=e[wi]()[ti].paraStack;return t.length?t.at(-1):null}function setPara(e,t,n){if(n.attributes.class?.includes("xfaRich")){if(t){""===e.h&&(t.height="auto");""===e.w&&(t.width="auto")}const a=getCurrentPara(e);if(a){const e=n.attributes.style;e.display="flex";e.flexDirection="column";switch(a.vAlign){case"top":e.justifyContent="start";break;case"bottom":e.justifyContent="end";break;case"middle":e.justifyContent="center"}const t=a[ao]();for(const[n,a]of Object.entries(t))n in e||(e[n]=a)}}}function setFontFamily(e,t,n,a){if(!n){delete a.fontFamily;return}const r=stripQuotes(e.typeface);a.fontFamily=`"${r}"`;const s=n.find(r);if(s){const{fontFamily:n}=s.regular.cssFontInfo;n!==r&&(a.fontFamily=`"${n}"`);const i=getCurrentPara(t);if(i&&""!==i.lineHeight)return;if(a.lineHeight)return;const o=selectFont(e,s);o&&(a.lineHeight=Math.max(1.2,o.lineHeight))}}function fixURL(e){const t=createValidAbsoluteUrl(e,null,{addDefaultProtocol:!0,tryConvertEncoding:!0});return t?t.href:null}function createLine(e,t){return{name:"div",attributes:{class:["lr-tb"===e.layout?"xfaLr":"xfaRl"]},children:t}}function flushHTML(e){if(!e[ti])return null;const t={name:"div",attributes:e[ti].attributes,children:e[ti].children};if(e[ti].failingNode){const n=e[ti].failingNode[ai]();n&&(e.layout.endsWith("-tb")?t.children.push(createLine(e,[n])):t.children.push(n))}return 0===t.children.length?null:t}function addHTML(e,t,n){const a=e[ti],r=a.availableSpace,[s,i,o,l]=n;switch(e.layout){case"position":a.width=Math.max(a.width,s+o);a.height=Math.max(a.height,i+l);a.children.push(t);break;case"lr-tb":case"rl-tb":if(!a.line||1===a.attempt){a.line=createLine(e,[]);a.children.push(a.line);a.numberInLine=0}a.numberInLine+=1;a.line.children.push(t);if(0===a.attempt){a.currentWidth+=o;a.height=Math.max(a.height,a.prevHeight+l)}else{a.currentWidth=o;a.prevHeight=a.height;a.height+=l;a.attempt=0}a.width=Math.max(a.width,a.currentWidth);break;case"rl-row":case"row":{a.children.push(t);a.width+=o;a.height=Math.max(a.height,l);const e=measureToString(a.height);for(const t of a.children)t.attributes.style.height=e;break}case"table":case"tb":a.width=MathClamp(o,a.width,r.width);a.height+=l;a.children.push(t)}}function getAvailableSpace(e){const t=e[ti].availableSpace,n=e.margin?e.margin.topInset+e.margin.bottomInset:0,a=e.margin?e.margin.leftInset+e.margin.rightInset:0;switch(e.layout){case"lr-tb":case"rl-tb":return 0===e[ti].attempt?{width:t.width-a-e[ti].currentWidth,height:t.height-n-e[ti].prevHeight}:{width:t.width-a,height:t.height-n-e[ti].height};case"rl-row":case"row":return{width:Math.sumPrecise(e[ti].columnWidths.slice(e[ti].currentColumn)),height:t.height-a};case"table":case"tb":return{width:t.width-a,height:t.height-n-e[ti].height};default:return t}}function checkDimensions(e,t){if(null===e[wi]()[ti].firstUnsplittable)return!0;if(0===e.w||0===e.h)return!0;const n=e[gi](),a=n[ti]?.attempt||0,[,r,s,i]=function getTransformedBBox(e){let t,n,a=""===e.w?NaN:e.w,r=""===e.h?NaN:e.h,[s,i]=[0,0];switch(e.anchorType||""){case"bottomCenter":[s,i]=[a/2,r];break;case"bottomLeft":[s,i]=[0,r];break;case"bottomRight":[s,i]=[a,r];break;case"middleCenter":[s,i]=[a/2,r/2];break;case"middleLeft":[s,i]=[0,r/2];break;case"middleRight":[s,i]=[a,r/2];break;case"topCenter":[s,i]=[a/2,0];break;case"topRight":[s,i]=[a,0]}switch(e.rotate||0){case 0:[t,n]=[-s,-i];break;case 90:[t,n]=[-i,s];[a,r]=[r,-a];break;case 180:[t,n]=[s,i];[a,r]=[-a,-r];break;case 270:[t,n]=[i,-s];[a,r]=[-r,a]}return[e.x+t+Math.min(0,a),e.y+n+Math.min(0,r),Math.abs(a),Math.abs(r)]}(e);switch(n.layout){case"lr-tb":case"rl-tb":return 0===a?e[wi]()[ti].noLayoutFailure?""!==e.w?Math.round(s-t.width)<=2:t.width>2:!(""!==e.h&&Math.round(i-t.height)>2)&&(""!==e.w?Math.round(s-t.width)<=2||0===n[ti].numberInLine&&t.height>2:t.width>2):!!e[wi]()[ti].noLayoutFailure||!(""!==e.h&&Math.round(i-t.height)>2)&&((""===e.w||Math.round(s-t.width)<=2||!n[Ti]())&&t.height>2);case"table":case"tb":return!!e[wi]()[ti].noLayoutFailure||(""===e.h||e[Fi]()?(""===e.w||Math.round(s-t.width)<=2||!n[Ti]())&&t.height>2:Math.round(i-t.height)<=2);case"position":if(e[wi]()[ti].noLayoutFailure)return!0;if(""===e.h||Math.round(i+r-t.height)<=2)return!0;return i+r>e[wi]()[ti].currentContentArea.h;case"rl-row":case"row":return!!e[wi]()[ti].noLayoutFailure||(""===e.h||Math.round(i-t.height)<=2);default:return!0}}const zo=io.template.id,_o="http://www.w3.org/2000/svg",Lo=/^H(\d+)$/,Uo=new Set(["image/gif","image/jpeg","image/jpg","image/pjpeg","image/png","image/apng","image/x-png","image/bmp","image/x-ms-bmp","image/tiff","image/tif","application/octet-stream"]),Xo=[[[66,77],"image/bmp"],[[255,216,255],"image/jpeg"],[[73,73,42,0],"image/tiff"],[[77,77,0,42],"image/tiff"],[[71,73,70,56,57,97],"image/gif"],[[137,80,78,71,13,10,26,10],"image/png"]];function getBorderDims(e){if(!e||!e.border)return{w:0,h:0};const t=e.border[hi]();return t?{w:t.widths[0]+t.widths[2]+t.insets[0]+t.insets[2],h:t.widths[1]+t.widths[3]+t.insets[1]+t.insets[3]}:{w:0,h:0}}function hasMargin(e){return e.margin&&(e.margin.topInset||e.margin.rightInset||e.margin.bottomInset||e.margin.leftInset)}function _setValue(e,t){if(!e.value){const t=new Value({});e[Ws](t);e.value=t}e.value[Ji](t)}function*getContainedChildren(e){for(const t of e[mi]())t instanceof SubformSet?yield*t[pi]():yield t}function isRequired(e){return"error"===e.validate?.nullTest}function setTabIndex(e){for(;e;){if(!e.traversal){e[Qi]=e[bi]()[Qi];return}if(e[Qi])return;let t=null;for(const n of e.traversal[mi]())if("next"===n.operation){t=n;break}if(!t||!t.ref){e[Qi]=e[bi]()[Qi];return}const n=e[wi]();e[Qi]=++n[Qi];const a=n[Gi](t.ref,e);if(!a)return;e=a[0]}}function applyAssist(e,t){const n=e.assist;if(n){const e=n[to]();e&&(t.title=e);const a=n.role.match(Lo);if(a){const e="heading",n=a[1];t.role=e;t["aria-level"]=n}}if("table"===e.layout)t.role="table";else if("row"===e.layout)t.role="row";else{const n=e[bi]();"row"===n.layout&&(t.role="TH"===n.assist?.role?"columnheader":"cell")}}function ariaLabel(e){if(!e.assist)return null;const t=e.assist;return t.speak&&""!==t.speak[Qs]?t.speak[Qs]:t.toolTip?t.toolTip[Qs]:null}function valueToHtml(e){return HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:Object.create(null)},children:[{name:"span",attributes:{style:Object.create(null)},value:e}]})}function setFirstUnsplittable(e){const t=e[wi]();if(null===t[ti].firstUnsplittable){t[ti].firstUnsplittable=e;t[ti].noLayoutFailure=!0}}function unsetFirstUnsplittable(e){const t=e[wi]();t[ti].firstUnsplittable===e&&(t[ti].noLayoutFailure=!1)}function handleBreak(e){if(e[ti])return!1;e[ti]=Object.create(null);if("auto"===e.targetType)return!1;const t=e[wi]();let n=null;if(e.target){n=t[Gi](e.target,e[bi]());if(!n)return!1;n=n[0]}const{currentPageArea:a,currentContentArea:r}=t[ti];if("pageArea"===e.targetType){n instanceof PageArea||(n=null);if(e.startNew){e[ti].target=n||a;return!0}if(n&&n!==a){e[ti].target=n;return!0}return!1}n instanceof ContentArea||(n=null);const s=n&&n[bi]();let i,o=s;if(e.startNew)if(n){const e=s.contentArea.children,t=e.indexOf(r),a=e.indexOf(n);-1!==t&&t<a&&(o=null);i=a-1}else i=a.contentArea.children.indexOf(r);else{if(!n||n===r)return!1;i=s.contentArea.children.indexOf(n)-1;o=s===a?null:s}e[ti].target=o;e[ti].index=i;return!0}function handleOverflow(e,t,n){const a=e[wi](),r=a[ti].noLayoutFailure,s=t[gi];t[gi]=()=>e;a[ti].noLayoutFailure=!0;const i=t[to](n);e[Xs](i.html,i.bbox);a[ti].noLayoutFailure=r;t[gi]=s}class AppearanceFilter extends StringObject{constructor(e){super(zo,"appearanceFilter");this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Arc extends XFAObject{constructor(e){super(zo,"arc",!0);this.circular=getInteger({data:e.circular,defaultValue:0,validate:e=>1===e});this.hand=getStringOption(e.hand,["even","left","right"]);this.id=e.id||"";this.startAngle=getFloat({data:e.startAngle,defaultValue:0,validate:e=>!0});this.sweepAngle=getFloat({data:e.sweepAngle,defaultValue:360,validate:e=>!0});this.use=e.use||"";this.usehref=e.usehref||"";this.edge=null;this.fill=null}[to](){const e=this.edge||new Edge({}),t=e[ao](),n=Object.create(null);"visible"===this.fill?.presence?Object.assign(n,this.fill[ao]()):n.fill="transparent";n.strokeWidth=measureToString("visible"===e.presence?e.thickness:0);n.stroke=t.color;let a;const r={xmlns:_o,style:{width:"100%",height:"100%",overflow:"visible"}};if(360===this.sweepAngle)a={name:"ellipse",attributes:{xmlns:_o,cx:"50%",cy:"50%",rx:"50%",ry:"50%",style:n}};else{const e=this.startAngle*Math.PI/180,t=this.sweepAngle*Math.PI/180,s=this.sweepAngle>180?1:0,[i,o,l,f]=[50*(1+Math.cos(e)),50*(1-Math.sin(e)),50*(1+Math.cos(e+t)),50*(1-Math.sin(e+t))];a={name:"path",attributes:{xmlns:_o,d:`M ${i} ${o} A 50 50 0 ${s} 0 ${l} ${f}`,vectorEffect:"non-scaling-stroke",style:n}};Object.assign(r,{viewBox:"0 0 100 100",preserveAspectRatio:"none"})}const s={name:"svg",children:[a],attributes:r};if(hasMargin(this[bi]()[bi]()))return HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[s]});s.attributes.style.position="absolute";return HTMLResult.success(s)}}class Area extends XFAObject{constructor(e){super(zo,"area",!0);this.colSpan=getInteger({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e});this.id=e.id||"";this.name=e.name||"";this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.x=getMeasurement(e.x,"0pt");this.y=getMeasurement(e.y,"0pt");this.desc=null;this.extras=null;this.area=new XFAObjectArray;this.draw=new XFAObjectArray;this.exObject=new XFAObjectArray;this.exclGroup=new XFAObjectArray;this.field=new XFAObjectArray;this.subform=new XFAObjectArray;this.subformSet=new XFAObjectArray}*[pi](){yield*getContainedChildren(this)}[Oi](){return!0}[xi](){return!0}[Xs](e,t){const[n,a,r,s]=t;this[ti].width=Math.max(this[ti].width,n+r);this[ti].height=Math.max(this[ti].height,a+s);this[ti].children.push(e)}[ii](){return this[ti].availableSpace}[to](e){const t=toStyle(this,"position"),n={style:t,id:this[ro],class:["xfaArea"]};isPrintOnly(this)&&n.class.push("xfaPrintOnly");this.name&&(n.xfaName=this.name);const a=[];this[ti]={children:a,width:0,height:0,availableSpace:e};const r=this[Ks]({filter:new Set(["area","draw","field","exclGroup","subform","subformSet"]),include:!0});if(!r.success){if(r.isBreak())return r;delete this[ti];return HTMLResult.FAILURE}t.width=measureToString(this[ti].width);t.height=measureToString(this[ti].height);const s={name:"div",attributes:n,children:a},i=[this.x,this.y,this[ti].width,this[ti].height];delete this[ti];return HTMLResult.success(s,i)}}class Assist extends XFAObject{constructor(e){super(zo,"assist",!0);this.id=e.id||"";this.role=e.role||"";this.use=e.use||"";this.usehref=e.usehref||"";this.speak=null;this.toolTip=null}[to](){return this.toolTip?.[Qs]||null}}class Barcode extends XFAObject{constructor(e){super(zo,"barcode",!0);this.charEncoding=getKeyword({data:e.charEncoding?e.charEncoding.toLowerCase():"",defaultValue:"",validate:e=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(e)||e.match(/iso-8859-\d{2}/)});this.checksum=getStringOption(e.checksum,["none","1mod10","1mod10_1mod11","2mod10","auto"]);this.dataColumnCount=getInteger({data:e.dataColumnCount,defaultValue:-1,validate:e=>e>=0});this.dataLength=getInteger({data:e.dataLength,defaultValue:-1,validate:e=>e>=0});this.dataPrep=getStringOption(e.dataPrep,["none","flateCompress"]);this.dataRowCount=getInteger({data:e.dataRowCount,defaultValue:-1,validate:e=>e>=0});this.endChar=e.endChar||"";this.errorCorrectionLevel=getInteger({data:e.errorCorrectionLevel,defaultValue:-1,validate:e=>e>=0&&e<=8});this.id=e.id||"";this.moduleHeight=getMeasurement(e.moduleHeight,"5mm");this.moduleWidth=getMeasurement(e.moduleWidth,"0.25mm");this.printCheckDigit=getInteger({data:e.printCheckDigit,defaultValue:0,validate:e=>1===e});this.rowColumnRatio=getRatio(e.rowColumnRatio);this.startChar=e.startChar||"";this.textLocation=getStringOption(e.textLocation,["below","above","aboveEmbedded","belowEmbedded","none"]);this.truncate=getInteger({data:e.truncate,defaultValue:0,validate:e=>1===e});this.type=getStringOption(e.type?e.type.toLowerCase():"",["aztec","codabar","code2of5industrial","code2of5interleaved","code2of5matrix","code2of5standard","code3of9","code3of9extended","code11","code49","code93","code128","code128a","code128b","code128c","code128sscc","datamatrix","ean8","ean8add2","ean8add5","ean13","ean13add2","ean13add5","ean13pwcd","fim","logmars","maxicode","msi","pdf417","pdf417macro","plessey","postauscust2","postauscust3","postausreplypaid","postausstandard","postukrm4scc","postusdpbc","postusimb","postusstandard","postus5zip","qrcode","rfid","rss14","rss14expanded","rss14limited","rss14stacked","rss14stackedomni","rss14truncated","telepen","ucc128","ucc128random","ucc128sscc","upca","upcaadd2","upcaadd5","upcapwcd","upce","upceadd2","upceadd5","upcean2","upcean5","upsmaxicode"]);this.upsMode=getStringOption(e.upsMode,["usCarrier","internationalCarrier","secureSymbol","standardSymbol"]);this.use=e.use||"";this.usehref=e.usehref||"";this.wideNarrowRatio=getRatio(e.wideNarrowRatio);this.encrypt=null;this.extras=null}}class Bind extends XFAObject{constructor(e){super(zo,"bind",!0);this.match=getStringOption(e.match,["once","dataRef","global","none"]);this.ref=e.ref||"";this.picture=null}}class BindItems extends XFAObject{constructor(e){super(zo,"bindItems");this.connection=e.connection||"";this.labelRef=e.labelRef||"";this.ref=e.ref||"";this.valueRef=e.valueRef||""}}class Bookend extends XFAObject{constructor(e){super(zo,"bookend");this.id=e.id||"";this.leader=e.leader||"";this.trailer=e.trailer||"";this.use=e.use||"";this.usehref=e.usehref||""}}class BooleanElement extends Option01{constructor(e){super(zo,"boolean");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[to](e){return valueToHtml(1===this[Qs]?"1":"0")}}class Border extends XFAObject{constructor(e){super(zo,"border",!0);this.break=getStringOption(e.break,["close","open"]);this.hand=getStringOption(e.hand,["even","left","right"]);this.id=e.id||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.corner=new XFAObjectArray(4);this.edge=new XFAObjectArray(4);this.extras=null;this.fill=null;this.margin=null}[hi](){if(!this[ti]){const e=this.edge.children.slice();if(e.length<4){const t=e.at(-1)||new Edge({});for(let n=e.length;n<4;n++)e.push(t)}const t=e.map(e=>e.thickness),n=[0,0,0,0];if(this.margin){n[0]=this.margin.topInset;n[1]=this.margin.rightInset;n[2]=this.margin.bottomInset;n[3]=this.margin.leftInset}this[ti]={widths:t,insets:n,edges:e}}return this[ti]}[ao](){const{edges:e}=this[hi](),t=e.map(e=>{const t=e[ao]();t.color||="#000000";return t}),n=Object.create(null);this.margin&&Object.assign(n,this.margin[ao]());"visible"===this.fill?.presence&&Object.assign(n,this.fill[ao]());if(this.corner.children.some(e=>0!==e.radius)){const e=this.corner.children.map(e=>e[ao]());if(2===e.length||3===e.length){const t=e.at(-1);for(let n=e.length;n<4;n++)e.push(t)}n.borderRadius=e.map(e=>e.radius).join(" ")}switch(this.presence){case"invisible":case"hidden":n.borderStyle="";break;case"inactive":n.borderStyle="none";break;default:n.borderStyle=t.map(e=>e.style).join(" ")}n.borderWidth=t.map(e=>e.width).join(" ");n.borderColor=t.map(e=>e.color).join(" ");return n}}class Break extends XFAObject{constructor(e){super(zo,"break",!0);this.after=getStringOption(e.after,["auto","contentArea","pageArea","pageEven","pageOdd"]);this.afterTarget=e.afterTarget||"";this.before=getStringOption(e.before,["auto","contentArea","pageArea","pageEven","pageOdd"]);this.beforeTarget=e.beforeTarget||"";this.bookendLeader=e.bookendLeader||"";this.bookendTrailer=e.bookendTrailer||"";this.id=e.id||"";this.overflowLeader=e.overflowLeader||"";this.overflowTarget=e.overflowTarget||"";this.overflowTrailer=e.overflowTrailer||"";this.startNew=getInteger({data:e.startNew,defaultValue:0,validate:e=>1===e});this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}}class BreakAfter extends XFAObject{constructor(e){super(zo,"breakAfter",!0);this.id=e.id||"";this.leader=e.leader||"";this.startNew=getInteger({data:e.startNew,defaultValue:0,validate:e=>1===e});this.target=e.target||"";this.targetType=getStringOption(e.targetType,["auto","contentArea","pageArea"]);this.trailer=e.trailer||"";this.use=e.use||"";this.usehref=e.usehref||"";this.script=null}}class BreakBefore extends XFAObject{constructor(e){super(zo,"breakBefore",!0);this.id=e.id||"";this.leader=e.leader||"";this.startNew=getInteger({data:e.startNew,defaultValue:0,validate:e=>1===e});this.target=e.target||"";this.targetType=getStringOption(e.targetType,["auto","contentArea","pageArea"]);this.trailer=e.trailer||"";this.use=e.use||"";this.usehref=e.usehref||"";this.script=null}[to](e){this[ti]={};return HTMLResult.FAILURE}}class Button extends XFAObject{constructor(e){super(zo,"button",!0);this.highlight=getStringOption(e.highlight,["inverted","none","outline","push"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}[to](e){const t=this[bi]()[bi](),n={name:"button",attributes:{id:this[ro],class:["xfaButton"],style:{}},children:[]};for(const e of t.event.children){if("click"!==e.activity||!e.script)continue;const t=recoverJsURL(e.script[Qs]);if(!t)continue;const a=fixURL(t.url);a&&n.children.push({name:"a",attributes:{id:"link"+this[ro],href:a,newWindow:t.newWindow,class:["xfaLink"],style:{}},children:[]})}return HTMLResult.success(n)}}class Calculate extends XFAObject{constructor(e){super(zo,"calculate",!0);this.id=e.id||"";this.override=getStringOption(e.override,["disabled","error","ignore","warning"]);this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.message=null;this.script=null}}class Caption extends XFAObject{constructor(e){super(zo,"caption",!0);this.id=e.id||"";this.placement=getStringOption(e.placement,["left","bottom","inline","right","top"]);this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.reserve=Math.ceil(getMeasurement(e.reserve));this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.font=null;this.margin=null;this.para=null;this.value=null}[Ji](e){_setValue(this,e)}[hi](e){if(!this[ti]){let{width:t,height:n}=e;switch(this.placement){case"left":case"right":case"inline":t=this.reserve<=0?t:this.reserve;break;case"top":case"bottom":n=this.reserve<=0?n:this.reserve}this[ti]=layoutNode(this,{width:t,height:n})}return this[ti]}[to](e){if(!this.value)return HTMLResult.EMPTY;this[Xi]();const t=this.value[to](e).html;if(!t){this[_i]();return HTMLResult.EMPTY}const n=this.reserve;if(this.reserve<=0){const{w:t,h:n}=this[hi](e);switch(this.placement){case"left":case"right":case"inline":this.reserve=t;break;case"top":case"bottom":this.reserve=n}}const a=[];"string"==typeof t?a.push({name:"#text",value:t}):a.push(t);const r=toStyle(this,"font","margin","visibility");switch(this.placement){case"left":case"right":this.reserve>0&&(r.width=measureToString(this.reserve));break;case"top":case"bottom":this.reserve>0&&(r.height=measureToString(this.reserve))}setPara(this,null,t);this[_i]();this.reserve=n;return HTMLResult.success({name:"div",attributes:{style:r,class:["xfaCaption"]},children:a})}}class Certificate extends StringObject{constructor(e){super(zo,"certificate");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Certificates extends XFAObject{constructor(e){super(zo,"certificates",!0);this.credentialServerPolicy=getStringOption(e.credentialServerPolicy,["optional","required"]);this.id=e.id||"";this.url=e.url||"";this.urlPolicy=e.urlPolicy||"";this.use=e.use||"";this.usehref=e.usehref||"";this.encryption=null;this.issuers=null;this.keyUsage=null;this.oids=null;this.signing=null;this.subjectDNs=null}}class CheckButton extends XFAObject{constructor(e){super(zo,"checkButton",!0);this.id=e.id||"";this.mark=getStringOption(e.mark,["default","check","circle","cross","diamond","square","star"]);this.shape=getStringOption(e.shape,["square","round"]);this.size=getMeasurement(e.size,"10pt");this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=null;this.margin=null}[to](e){const t=toStyle(this,"margin"),n=measureToString(this.size);t.width=t.height=n;let a,r,s;const i=this[bi]()[bi](),o=i.items.children.length&&i.items.children[0][to]().html||[],l={on:(void 0!==o[0]?o[0]:"on").toString(),off:(void 0!==o[1]?o[1]:"off").toString()},f=(i.value?.[Zi]()||"off")===l.on||void 0,c=i[gi](),h=i[ro];let u;if(c instanceof ExclGroup){s=c[ro];a="radio";r="xfaRadio";u=c[Zs]?.[ro]||c[ro]}else{a="checkbox";r="xfaCheckbox";u=i[Zs]?.[ro]||i[ro]}const m={name:"input",attributes:{class:[r],style:t,fieldId:h,dataId:u,type:a,checked:f,xfaOn:l.on,xfaOff:l.off,"aria-label":ariaLabel(i),"aria-required":!1}};s&&(m.attributes.name=s);if(isRequired(i)){m.attributes["aria-required"]=!0;m.attributes.required=!0}return HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[m]})}}class ChoiceList extends XFAObject{constructor(e){super(zo,"choiceList",!0);this.commitOn=getStringOption(e.commitOn,["select","exit"]);this.id=e.id||"";this.open=getStringOption(e.open,["userControl","always","multiSelect","onEntry"]);this.textEntry=getInteger({data:e.textEntry,defaultValue:0,validate:e=>1===e});this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=null;this.margin=null}[to](e){const t=toStyle(this,"border","margin"),n=this[bi]()[bi](),a={fontSize:`calc(${n.font?.size||10}px * var(--total-scale-factor))`},r=[];if(n.items.children.length>0){const e=n.items;let t=0,s=0;if(2===e.children.length){t=e.children[0].save;s=1-t}const i=e.children[t][to]().html,o=e.children[s][to]().html;let l=!1;const f=n.value?.[Zi]()||"";for(let e=0,t=i.length;e<t;e++){const t={name:"option",attributes:{value:o[e]||i[e],style:a},value:i[e]};o[e]===f&&(t.attributes.selected=l=!0);r.push(t)}l||r.splice(0,0,{name:"option",attributes:{hidden:!0,selected:!0},value:" "})}const s={class:["xfaSelect"],fieldId:n[ro],dataId:n[Zs]?.[ro]||n[ro],style:t,"aria-label":ariaLabel(n),"aria-required":!1};if(isRequired(n)){s["aria-required"]=!0;s.required=!0}"multiSelect"===this.open&&(s.multiple=!0);return HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[{name:"select",children:r,attributes:s}]})}}class Color extends XFAObject{constructor(e){super(zo,"color",!0);this.cSpace=getStringOption(e.cSpace,["SRGB"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.value=e.value?function getColor(e,t=[0,0,0]){let[n,a,r]=t;if(!e)return{r:n,g:a,b:r};const s=e.split(",",3).map(e=>MathClamp(parseInt(e.trim(),10),0,255)).map(e=>isNaN(e)?0:e);if(s.length<3)return{r:n,g:a,b:r};[n,a,r]=s;return{r:n,g:a,b:r}}(e.value):"";this.extras=null}[ki](){return!1}[ao](){return this.value?Util.makeHexColor(this.value.r,this.value.g,this.value.b):null}}class Comb extends XFAObject{constructor(e){super(zo,"comb");this.id=e.id||"";this.numberOfCells=getInteger({data:e.numberOfCells,defaultValue:0,validate:e=>e>=0});this.use=e.use||"";this.usehref=e.usehref||""}}class Connect extends XFAObject{constructor(e){super(zo,"connect",!0);this.connection=e.connection||"";this.id=e.id||"";this.ref=e.ref||"";this.usage=getStringOption(e.usage,["exportAndImport","exportOnly","importOnly"]);this.use=e.use||"";this.usehref=e.usehref||"";this.picture=null}}class ContentArea extends XFAObject{constructor(e){super(zo,"contentArea",!0);this.h=getMeasurement(e.h);this.id=e.id||"";this.name=e.name||"";this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.w=getMeasurement(e.w);this.x=getMeasurement(e.x,"0pt");this.y=getMeasurement(e.y,"0pt");this.desc=null;this.extras=null}[to](e){const t={left:measureToString(this.x),top:measureToString(this.y),width:measureToString(this.w),height:measureToString(this.h)},n=["xfaContentarea"];isPrintOnly(this)&&n.push("xfaPrintOnly");return HTMLResult.success({name:"div",children:[],attributes:{style:t,class:n,id:this[ro]}})}}class Corner extends XFAObject{constructor(e){super(zo,"corner",!0);this.id=e.id||"";this.inverted=getInteger({data:e.inverted,defaultValue:0,validate:e=>1===e});this.join=getStringOption(e.join,["square","round"]);this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.radius=getMeasurement(e.radius);this.stroke=getStringOption(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]);this.thickness=getMeasurement(e.thickness,"0.5pt");this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[ao](){const e=toStyle(this,"visibility");e.radius=measureToString("square"===this.join?0:this.radius);return e}}class DateElement extends ContentObject{constructor(e){super(zo,"date");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[ni](){const e=this[Qs].trim();this[Qs]=e?new Date(e):null}[to](e){return valueToHtml(this[Qs]?this[Qs].toString():"")}}class DateTime extends ContentObject{constructor(e){super(zo,"dateTime");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[ni](){const e=this[Qs].trim();this[Qs]=e?new Date(e):null}[to](e){return valueToHtml(this[Qs]?this[Qs].toString():"")}}class DateTimeEdit extends XFAObject{constructor(e){super(zo,"dateTimeEdit",!0);this.hScrollPolicy=getStringOption(e.hScrollPolicy,["auto","off","on"]);this.id=e.id||"";this.picker=getStringOption(e.picker,["host","none"]);this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.comb=null;this.extras=null;this.margin=null}[to](e){const t=toStyle(this,"border","font","margin"),n=this[bi]()[bi](),a={name:"input",attributes:{type:"text",fieldId:n[ro],dataId:n[Zs]?.[ro]||n[ro],class:["xfaTextfield"],style:t,"aria-label":ariaLabel(n),"aria-required":!1}};if(isRequired(n)){a.attributes["aria-required"]=!0;a.attributes.required=!0}return HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[a]})}}class Decimal extends ContentObject{constructor(e){super(zo,"decimal");this.fracDigits=getInteger({data:e.fracDigits,defaultValue:2,validate:e=>!0});this.id=e.id||"";this.leadDigits=getInteger({data:e.leadDigits,defaultValue:-1,validate:e=>!0});this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[ni](){const e=parseFloat(this[Qs].trim());this[Qs]=isNaN(e)?null:e}[to](e){return valueToHtml(null!==this[Qs]?this[Qs].toString():"")}}class DefaultUi extends XFAObject{constructor(e){super(zo,"defaultUi",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}}class Desc extends XFAObject{constructor(e){super(zo,"desc",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.boolean=new XFAObjectArray;this.date=new XFAObjectArray;this.dateTime=new XFAObjectArray;this.decimal=new XFAObjectArray;this.exData=new XFAObjectArray;this.float=new XFAObjectArray;this.image=new XFAObjectArray;this.integer=new XFAObjectArray;this.text=new XFAObjectArray;this.time=new XFAObjectArray}}class DigestMethod extends OptionObject{constructor(e){super(zo,"digestMethod",["","SHA1","SHA256","SHA512","RIPEMD160"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class DigestMethods extends XFAObject{constructor(e){super(zo,"digestMethods",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.digestMethod=new XFAObjectArray}}class Draw extends XFAObject{constructor(e){super(zo,"draw",!0);this.anchorType=getStringOption(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]);this.colSpan=getInteger({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e});this.h=e.h?getMeasurement(e.h):"";this.hAlign=getStringOption(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.locale=e.locale||"";this.maxH=getMeasurement(e.maxH,"0pt");this.maxW=getMeasurement(e.maxW,"0pt");this.minH=getMeasurement(e.minH,"0pt");this.minW=getMeasurement(e.minW,"0pt");this.name=e.name||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=getRelevant(e.relevant);this.rotate=getInteger({data:e.rotate,defaultValue:0,validate:e=>e%90==0});this.use=e.use||"";this.usehref=e.usehref||"";this.w=e.w?getMeasurement(e.w):"";this.x=getMeasurement(e.x,"0pt");this.y=getMeasurement(e.y,"0pt");this.assist=null;this.border=null;this.caption=null;this.desc=null;this.extras=null;this.font=null;this.keep=null;this.margin=null;this.para=null;this.traversal=null;this.ui=null;this.value=null;this.setProperty=new XFAObjectArray}[Ji](e){_setValue(this,e)}[to](e){setTabIndex(this);if("hidden"===this.presence||"inactive"===this.presence)return HTMLResult.EMPTY;fixDimensions(this);this[Xi]();const t=this.w,n=this.h,{w:a,h:r,isBroken:s}=layoutNode(this,e);if(a&&""===this.w){if(s&&this[gi]()[Ti]()){this[_i]();return HTMLResult.FAILURE}this.w=a}r&&""===this.h&&(this.h=r);setFirstUnsplittable(this);if(!checkDimensions(this,e)){this.w=t;this.h=n;this[_i]();return HTMLResult.FAILURE}unsetFirstUnsplittable(this);const i=toStyle(this,"font","hAlign","dimensions","position","presence","rotate","anchorType","border","margin");setMinMaxDimensions(this,i);if(i.margin){i.padding=i.margin;delete i.margin}const o=["xfaDraw"];this.font&&o.push("xfaFont");isPrintOnly(this)&&o.push("xfaPrintOnly");const l={style:i,id:this[ro],class:o};this.name&&(l.xfaName=this.name);const f={name:"div",attributes:l,children:[]};applyAssist(this,l);const c=computeBbox(this,f,e),h=this.value?this.value[to](e).html:null;if(null===h){this.w=t;this.h=n;this[_i]();return HTMLResult.success(createWrapper(this,f),c)}f.children.push(h);setPara(this,i,h);this.w=t;this.h=n;this[_i]();return HTMLResult.success(createWrapper(this,f),c)}}class Edge extends XFAObject{constructor(e){super(zo,"edge",!0);this.cap=getStringOption(e.cap,["square","butt","round"]);this.id=e.id||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.stroke=getStringOption(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]);this.thickness=getMeasurement(e.thickness,"0.5pt");this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[ao](){const e=toStyle(this,"visibility");Object.assign(e,{linecap:this.cap,width:measureToString(this.thickness),color:this.color?this.color[ao]():"#000000",style:""});if("visible"!==this.presence)e.style="none";else switch(this.stroke){case"solid":e.style="solid";break;case"dashDot":case"dashDotDot":case"dashed":e.style="dashed";break;case"dotted":e.style="dotted";break;case"embossed":e.style="ridge";break;case"etched":e.style="groove";break;case"lowered":e.style="inset";break;case"raised":e.style="outset"}return e}}class Encoding extends OptionObject{constructor(e){super(zo,"encoding",["adbe.x509.rsa_sha1","adbe.pkcs7.detached","adbe.pkcs7.sha1"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Encodings extends XFAObject{constructor(e){super(zo,"encodings",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.encoding=new XFAObjectArray}}class Encrypt extends XFAObject{constructor(e){super(zo,"encrypt",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.certificate=null}}class EncryptData extends XFAObject{constructor(e){super(zo,"encryptData",!0);this.id=e.id||"";this.operation=getStringOption(e.operation,["encrypt","decrypt"]);this.target=e.target||"";this.use=e.use||"";this.usehref=e.usehref||"";this.filter=null;this.manifest=null}}class Encryption extends XFAObject{constructor(e){super(zo,"encryption",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.certificate=new XFAObjectArray}}class EncryptionMethod extends OptionObject{constructor(e){super(zo,"encryptionMethod",["","AES256-CBC","TRIPLEDES-CBC","AES128-CBC","AES192-CBC"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class EncryptionMethods extends XFAObject{constructor(e){super(zo,"encryptionMethods",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.encryptionMethod=new XFAObjectArray}}class Event extends XFAObject{constructor(e){super(zo,"event",!0);this.activity=getStringOption(e.activity,["click","change","docClose","docReady","enter","exit","full","indexChange","initialize","mouseDown","mouseEnter","mouseExit","mouseUp","postExecute","postOpen","postPrint","postSave","postSign","postSubmit","preExecute","preOpen","prePrint","preSave","preSign","preSubmit","ready","validationState"]);this.id=e.id||"";this.listen=getStringOption(e.listen,["refOnly","refAndDescendents"]);this.name=e.name||"";this.ref=e.ref||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.encryptData=null;this.execute=null;this.script=null;this.signData=null;this.submit=null}}class ExData extends ContentObject{constructor(e){super(zo,"exData");this.contentType=e.contentType||"";this.href=e.href||"";this.id=e.id||"";this.maxLength=getInteger({data:e.maxLength,defaultValue:-1,validate:e=>e>=-1});this.name=e.name||"";this.rid=e.rid||"";this.transferEncoding=getStringOption(e.transferEncoding,["none","base64","package"]);this.use=e.use||"";this.usehref=e.usehref||""}[Si](){return"text/html"===this.contentType}[Pi](e){if("text/html"===this.contentType&&e[Hi]===io.xhtml.id){this[Qs]=e;return!0}if("text/xml"===this.contentType){this[Qs]=e;return!0}return!1}[to](e){return"text/html"===this.contentType&&this[Qs]?this[Qs][to](e):HTMLResult.EMPTY}}class ExObject extends XFAObject{constructor(e){super(zo,"exObject",!0);this.archive=e.archive||"";this.classId=e.classId||"";this.codeBase=e.codeBase||"";this.codeType=e.codeType||"";this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.boolean=new XFAObjectArray;this.date=new XFAObjectArray;this.dateTime=new XFAObjectArray;this.decimal=new XFAObjectArray;this.exData=new XFAObjectArray;this.exObject=new XFAObjectArray;this.float=new XFAObjectArray;this.image=new XFAObjectArray;this.integer=new XFAObjectArray;this.text=new XFAObjectArray;this.time=new XFAObjectArray}}class ExclGroup extends XFAObject{constructor(e){super(zo,"exclGroup",!0);this.access=getStringOption(e.access,["open","nonInteractive","protected","readOnly"]);this.accessKey=e.accessKey||"";this.anchorType=getStringOption(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]);this.colSpan=getInteger({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e});this.h=e.h?getMeasurement(e.h):"";this.hAlign=getStringOption(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.layout=getStringOption(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]);this.maxH=getMeasurement(e.maxH,"0pt");this.maxW=getMeasurement(e.maxW,"0pt");this.minH=getMeasurement(e.minH,"0pt");this.minW=getMeasurement(e.minW,"0pt");this.name=e.name||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.w=e.w?getMeasurement(e.w):"";this.x=getMeasurement(e.x,"0pt");this.y=getMeasurement(e.y,"0pt");this.assist=null;this.bind=null;this.border=null;this.calculate=null;this.caption=null;this.desc=null;this.extras=null;this.margin=null;this.para=null;this.traversal=null;this.validate=null;this.connect=new XFAObjectArray;this.event=new XFAObjectArray;this.field=new XFAObjectArray;this.setProperty=new XFAObjectArray}[xi](){return!0}[ki](){return!0}[Ji](e){for(const t of this.field.children){if(!t.value){const e=new Value({});t[Ws](e);t.value=e}t.value[Ji](e)}}[Ti](){return this.layout.endsWith("-tb")&&0===this[ti].attempt&&this[ti].numberInLine>0||this[bi]()[Ti]()}[Fi](){const e=this[gi]();if(!e[Fi]())return!1;if(void 0!==this[ti]._isSplittable)return this[ti]._isSplittable;if("position"===this.layout||this.layout.includes("row")){this[ti]._isSplittable=!1;return!1}if(e.layout?.endsWith("-tb")&&0!==e[ti].numberInLine)return!1;this[ti]._isSplittable=!0;return!0}[ai](){return flushHTML(this)}[Xs](e,t){addHTML(this,e,t)}[ii](){return getAvailableSpace(this)}[to](e){setTabIndex(this);if("hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return HTMLResult.EMPTY;fixDimensions(this);const t=[],n={id:this[ro],class:[]};setAccess(this,n.class);this[ti]||=Object.create(null);Object.assign(this[ti],{children:t,attributes:n,attempt:0,line:null,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,e.width),height:Math.min(this.h||1/0,e.height)},width:0,height:0,prevHeight:0,currentWidth:0});const a=this[Fi]();a||setFirstUnsplittable(this);if(!checkDimensions(this,e))return HTMLResult.FAILURE;const r=new Set(["field"]);if(this.layout.includes("row")){const e=this[gi]().columnWidths;if(Array.isArray(e)&&e.length>0){this[ti].columnWidths=e;this[ti].currentColumn=0}}const s=toStyle(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),i=["xfaExclgroup"],o=layoutClass(this);o&&i.push(o);isPrintOnly(this)&&i.push("xfaPrintOnly");n.style=s;n.class=i;this.name&&(n.xfaName=this.name);this[Xi]();const l="lr-tb"===this.layout||"rl-tb"===this.layout,f=l?2:1;for(;this[ti].attempt<f;this[ti].attempt++){l&&1===this[ti].attempt&&(this[ti].numberInLine=0);const e=this[Ks]({filter:r,include:!0});if(e.success)break;if(e.isBreak()){this[_i]();return e}if(l&&0===this[ti].attempt&&0===this[ti].numberInLine&&!this[wi]()[ti].noLayoutFailure){this[ti].attempt=f;break}}this[_i]();a||unsetFirstUnsplittable(this);if(this[ti].attempt===f){a||delete this[ti];return HTMLResult.FAILURE}let c=0,h=0;if(this.margin){c=this.margin.leftInset+this.margin.rightInset;h=this.margin.topInset+this.margin.bottomInset}const u=Math.max(this[ti].width+c,this.w||0),m=Math.max(this[ti].height+h,this.h||0),p=[this.x,this.y,u,m];""===this.w&&(s.width=measureToString(u));""===this.h&&(s.height=measureToString(m));const d={name:"div",attributes:n,children:t};applyAssist(this,n);delete this[ti];return HTMLResult.success(createWrapper(this,d),p)}}class Execute extends XFAObject{constructor(e){super(zo,"execute");this.connection=e.connection||"";this.executeType=getStringOption(e.executeType,["import","remerge"]);this.id=e.id||"";this.runAt=getStringOption(e.runAt,["client","both","server"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Extras extends XFAObject{constructor(e){super(zo,"extras",!0);this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||"";this.boolean=new XFAObjectArray;this.date=new XFAObjectArray;this.dateTime=new XFAObjectArray;this.decimal=new XFAObjectArray;this.exData=new XFAObjectArray;this.extras=new XFAObjectArray;this.float=new XFAObjectArray;this.image=new XFAObjectArray;this.integer=new XFAObjectArray;this.text=new XFAObjectArray;this.time=new XFAObjectArray}}class Field extends XFAObject{constructor(e){super(zo,"field",!0);this.access=getStringOption(e.access,["open","nonInteractive","protected","readOnly"]);this.accessKey=e.accessKey||"";this.anchorType=getStringOption(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]);this.colSpan=getInteger({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e});this.h=e.h?getMeasurement(e.h):"";this.hAlign=getStringOption(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.locale=e.locale||"";this.maxH=getMeasurement(e.maxH,"0pt");this.maxW=getMeasurement(e.maxW,"0pt");this.minH=getMeasurement(e.minH,"0pt");this.minW=getMeasurement(e.minW,"0pt");this.name=e.name||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=getRelevant(e.relevant);this.rotate=getInteger({data:e.rotate,defaultValue:0,validate:e=>e%90==0});this.use=e.use||"";this.usehref=e.usehref||"";this.w=e.w?getMeasurement(e.w):"";this.x=getMeasurement(e.x,"0pt");this.y=getMeasurement(e.y,"0pt");this.assist=null;this.bind=null;this.border=null;this.calculate=null;this.caption=null;this.desc=null;this.extras=null;this.font=null;this.format=null;this.items=new XFAObjectArray(2);this.keep=null;this.margin=null;this.para=null;this.traversal=null;this.ui=null;this.validate=null;this.value=null;this.bindItems=new XFAObjectArray;this.connect=new XFAObjectArray;this.event=new XFAObjectArray;this.setProperty=new XFAObjectArray}[xi](){return!0}[Ji](e){_setValue(this,e)}[to](e){setTabIndex(this);if(!this.ui){this.ui=new Ui({});this.ui[ji]=this[ji];this[Ws](this.ui);let e;switch(this.items.children.length){case 0:e=new TextEdit({});this.ui.textEdit=e;break;case 1:e=new CheckButton({});this.ui.checkButton=e;break;case 2:e=new ChoiceList({});this.ui.choiceList=e}this.ui[Ws](e)}if(!this.ui||"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return HTMLResult.EMPTY;this.caption&&delete this.caption[ti];this[Xi]();const t=this.caption?this.caption[to](e).html:null,n=this.w,a=this.h;let r=0,s=0;if(this.margin){r=this.margin.leftInset+this.margin.rightInset;s=this.margin.topInset+this.margin.bottomInset}let i=null;if(""===this.w||""===this.h){let t=null,n=null,a=0,o=0;if(this.ui.checkButton)a=o=this.ui.checkButton.size;else{const{w:t,h:n}=layoutNode(this,e);if(null!==t){a=t;o=n}else o=function fonts_getMetrics(e,t=!1){let n=null;if(e){const t=stripQuotes(e.typeface),a=e[ji].fontFinder.find(t);n=selectFont(e,a)}if(!n)return{lineHeight:12,lineGap:2,lineNoGap:10};const a=e.size||10,r=n.lineHeight?Math.max(t?0:1.2,n.lineHeight):1.2,s=void 0===n.lineGap?.2:n.lineGap;return{lineHeight:r*a,lineGap:s*a,lineNoGap:Math.max(1,r-s)*a}}(this.font,!0).lineNoGap}i=getBorderDims(this.ui[hi]());a+=i.w;o+=i.h;if(this.caption){const{w:r,h:s,isBroken:i}=this.caption[hi](e);if(i&&this[gi]()[Ti]()){this[_i]();return HTMLResult.FAILURE}t=r;n=s;switch(this.caption.placement){case"left":case"right":case"inline":t+=a;break;case"top":case"bottom":n+=o}}else{t=a;n=o}if(t&&""===this.w){t+=r;this.w=Math.min(this.maxW<=0?1/0:this.maxW,this.minW+1<t?t:this.minW)}if(n&&""===this.h){n+=s;this.h=Math.min(this.maxH<=0?1/0:this.maxH,this.minH+1<n?n:this.minH)}}this[_i]();fixDimensions(this);setFirstUnsplittable(this);if(!checkDimensions(this,e)){this.w=n;this.h=a;this[_i]();return HTMLResult.FAILURE}unsetFirstUnsplittable(this);const o=toStyle(this,"font","dimensions","position","rotate","anchorType","presence","margin","hAlign");setMinMaxDimensions(this,o);const l=["xfaField"];this.font&&l.push("xfaFont");isPrintOnly(this)&&l.push("xfaPrintOnly");const f={style:o,id:this[ro],class:l};if(o.margin){o.padding=o.margin;delete o.margin}setAccess(this,l);this.name&&(f.xfaName=this.name);const c=[],h={name:"div",attributes:f,children:c};applyAssist(this,f);const u=this.border?this.border[ao]():null,m=computeBbox(this,h,e),p=this.ui[to]().html;if(!p){Object.assign(o,u);return HTMLResult.success(createWrapper(this,h),m)}this[Qi]&&(p.children?.[0]?p.children[0].attributes.tabindex=this[Qi]:p.attributes.tabindex=this[Qi]);p.attributes.style||=Object.create(null);let d=null;if(this.ui.button){1===p.children.length&&([d]=p.children.splice(0,1));Object.assign(p.attributes.style,u)}else Object.assign(o,u);c.push(p);if(this.value)if(this.ui.imageEdit)p.children.push(this.value[to]().html);else if(!this.ui.button){let e="";if(this.value.exData)e=this.value.exData[Zi]();else if(this.value.text)e=this.value.text[hi]();else{const t=this.value[to]().html;null!==t&&(e=t.children[0].value)}this.ui.textEdit&&this.value.text?.maxChars&&(p.children[0].attributes.maxLength=this.value.text.maxChars);if(e){if(this.ui.numericEdit){e=parseFloat(e);e=isNaN(e)?"":e.toString()}"textarea"===p.children[0].name?p.children[0].attributes.textContent=e:p.children[0].attributes.value=e}}if(!this.ui.imageEdit&&p.children?.[0]&&this.h){i=i||getBorderDims(this.ui[hi]());let t=0;if(this.caption&&["top","bottom"].includes(this.caption.placement)){t=this.caption.reserve;t<=0&&(t=this.caption[hi](e).h);const n=this.h-t-s-i.h;p.children[0].attributes.style.height=measureToString(n)}else p.children[0].attributes.style.height="100%"}d&&p.children.push(d);if(!t){p.attributes.class&&p.attributes.class.push("xfaLeft");this.w=n;this.h=a;return HTMLResult.success(createWrapper(this,h),m)}if(this.ui.button){o.padding&&delete o.padding;"div"===t.name&&(t.name="span");p.children.push(t);return HTMLResult.success(h,m)}this.ui.checkButton&&(t.attributes.class[0]="xfaCaptionForCheckButton");p.attributes.class||=[];p.children.splice(0,0,t);switch(this.caption.placement){case"left":case"inline":p.attributes.class.push("xfaLeft");break;case"right":p.attributes.class.push("xfaRight");break;case"top":p.attributes.class.push("xfaTop");break;case"bottom":p.attributes.class.push("xfaBottom")}this.w=n;this.h=a;return HTMLResult.success(createWrapper(this,h),m)}}class Fill extends XFAObject{constructor(e){super(zo,"fill",!0);this.id=e.id||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null;this.linear=null;this.pattern=null;this.radial=null;this.solid=null;this.stipple=null}[ao](){const e=this[bi](),t=e[bi]()[bi](),n=Object.create(null);let a="color",r=a;if(e instanceof Border){a="background-color";r="background";t instanceof Ui&&(n.backgroundColor="white")}if(e instanceof Rectangle||e instanceof Arc){a=r="fill";n.fill="white"}for(const e of Object.getOwnPropertyNames(this)){if("extras"===e||"color"===e)continue;const t=this[e];if(!(t instanceof XFAObject))continue;const s=t[ao](this.color);s&&(n[s.startsWith("#")?a:r]=s);return n}if(this.color?.value){const e=this.color[ao]();n[e.startsWith("#")?a:r]=e}return n}}class Filter extends XFAObject{constructor(e){super(zo,"filter",!0);this.addRevocationInfo=getStringOption(e.addRevocationInfo,["","required","optional","none"]);this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||"";this.version=getInteger({data:this.version,defaultValue:5,validate:e=>e>=1&&e<=5});this.appearanceFilter=null;this.certificates=null;this.digestMethods=null;this.encodings=null;this.encryptionMethods=null;this.handler=null;this.lockDocument=null;this.mdp=null;this.reasons=null;this.timeStamp=null}}class Float extends ContentObject{constructor(e){super(zo,"float");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[ni](){const e=parseFloat(this[Qs].trim());this[Qs]=isNaN(e)?null:e}[to](e){return valueToHtml(null!==this[Qs]?this[Qs].toString():"")}}class template_Font extends XFAObject{constructor(e){super(zo,"font",!0);this.baselineShift=getMeasurement(e.baselineShift);this.fontHorizontalScale=getFloat({data:e.fontHorizontalScale,defaultValue:100,validate:e=>e>=0});this.fontVerticalScale=getFloat({data:e.fontVerticalScale,defaultValue:100,validate:e=>e>=0});this.id=e.id||"";this.kerningMode=getStringOption(e.kerningMode,["none","pair"]);this.letterSpacing=getMeasurement(e.letterSpacing,"0");this.lineThrough=getInteger({data:e.lineThrough,defaultValue:0,validate:e=>1===e||2===e});this.lineThroughPeriod=getStringOption(e.lineThroughPeriod,["all","word"]);this.overline=getInteger({data:e.overline,defaultValue:0,validate:e=>1===e||2===e});this.overlinePeriod=getStringOption(e.overlinePeriod,["all","word"]);this.posture=getStringOption(e.posture,["normal","italic"]);this.size=getMeasurement(e.size,"10pt");this.typeface=e.typeface||"Courier";this.underline=getInteger({data:e.underline,defaultValue:0,validate:e=>1===e||2===e});this.underlinePeriod=getStringOption(e.underlinePeriod,["all","word"]);this.use=e.use||"";this.usehref=e.usehref||"";this.weight=getStringOption(e.weight,["normal","bold"]);this.extras=null;this.fill=null}[Vs](e){super[Vs](e);this[ji].usedTypefaces.add(this.typeface)}[ao](){const e=toStyle(this,"fill"),t=e.color;if(t)if("#000000"===t)delete e.color;else if(!t.startsWith("#")){e.background=t;e.backgroundClip="text";e.color="transparent"}this.baselineShift&&(e.verticalAlign=measureToString(this.baselineShift));e.fontKerning="none"===this.kerningMode?"none":"normal";e.letterSpacing=measureToString(this.letterSpacing);if(0!==this.lineThrough){e.textDecoration="line-through";2===this.lineThrough&&(e.textDecorationStyle="double")}if(0!==this.overline){e.textDecoration="overline";2===this.overline&&(e.textDecorationStyle="double")}e.fontStyle=this.posture;e.fontSize=measureToString(.99*this.size);setFontFamily(this,this,this[ji].fontFinder,e);if(0!==this.underline){e.textDecoration="underline";2===this.underline&&(e.textDecorationStyle="double")}e.fontWeight=this.weight;return e}}class Format extends XFAObject{constructor(e){super(zo,"format",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.picture=null}}class Handler extends StringObject{constructor(e){super(zo,"handler");this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Hyphenation extends XFAObject{constructor(e){super(zo,"hyphenation");this.excludeAllCaps=getInteger({data:e.excludeAllCaps,defaultValue:0,validate:e=>1===e});this.excludeInitialCap=getInteger({data:e.excludeInitialCap,defaultValue:0,validate:e=>1===e});this.hyphenate=getInteger({data:e.hyphenate,defaultValue:0,validate:e=>1===e});this.id=e.id||"";this.pushCharacterCount=getInteger({data:e.pushCharacterCount,defaultValue:3,validate:e=>e>=0});this.remainCharacterCount=getInteger({data:e.remainCharacterCount,defaultValue:3,validate:e=>e>=0});this.use=e.use||"";this.usehref=e.usehref||"";this.wordCharacterCount=getInteger({data:e.wordCharacterCount,defaultValue:7,validate:e=>e>=0})}}class Image extends StringObject{constructor(e){super(zo,"image");this.aspect=getStringOption(e.aspect,["fit","actual","height","none","width"]);this.contentType=e.contentType||"";this.href=e.href||"";this.id=e.id||"";this.name=e.name||"";this.transferEncoding=getStringOption(e.transferEncoding,["base64","none","package"]);this.use=e.use||"";this.usehref=e.usehref||""}[to](){if(this.contentType&&!Uo.has(this.contentType.toLowerCase()))return HTMLResult.EMPTY;let e=this[ji].images?.get(this.href);if(!e&&(this.href||!this[Qs]))return HTMLResult.EMPTY;e||"base64"!==this.transferEncoding||(e=Uint8Array.fromBase64(this[Qs]));if(!e)return HTMLResult.EMPTY;if(!this.contentType){for(const[t,n]of Xo)if(e.length>t.length&&t.every((t,n)=>t===e[n])){this.contentType=n;break}if(!this.contentType)return HTMLResult.EMPTY}const t=new Blob([e],{type:this.contentType});let n;switch(this.aspect){case"fit":case"actual":break;case"height":n={height:"100%",objectFit:"fill"};break;case"none":n={width:"100%",height:"100%",objectFit:"fill"};break;case"width":n={width:"100%",objectFit:"fill"}}const a=this[bi]();return HTMLResult.success({name:"img",attributes:{class:["xfaImage"],style:n,src:URL.createObjectURL(t),alt:a?ariaLabel(a[bi]()):null}})}}class ImageEdit extends XFAObject{constructor(e){super(zo,"imageEdit",!0);this.data=getStringOption(e.data,["link","embed"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=null;this.margin=null}[to](e){return"embed"===this.data?HTMLResult.success({name:"div",children:[],attributes:{}}):HTMLResult.EMPTY}}class Integer extends ContentObject{constructor(e){super(zo,"integer");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[ni](){const e=parseInt(this[Qs].trim(),10);this[Qs]=isNaN(e)?null:e}[to](e){return valueToHtml(null!==this[Qs]?this[Qs].toString():"")}}class Issuers extends XFAObject{constructor(e){super(zo,"issuers",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.certificate=new XFAObjectArray}}class Items extends XFAObject{constructor(e){super(zo,"items",!0);this.id=e.id||"";this.name=e.name||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.ref=e.ref||"";this.save=getInteger({data:e.save,defaultValue:0,validate:e=>1===e});this.use=e.use||"";this.usehref=e.usehref||"";this.boolean=new XFAObjectArray;this.date=new XFAObjectArray;this.dateTime=new XFAObjectArray;this.decimal=new XFAObjectArray;this.exData=new XFAObjectArray;this.float=new XFAObjectArray;this.image=new XFAObjectArray;this.integer=new XFAObjectArray;this.text=new XFAObjectArray;this.time=new XFAObjectArray}[to](){const e=[];for(const t of this[mi]())e.push(t[Zi]());return HTMLResult.success(e)}}class Keep extends XFAObject{constructor(e){super(zo,"keep",!0);this.id=e.id||"";const t=["none","contentArea","pageArea"];this.intact=getStringOption(e.intact,t);this.next=getStringOption(e.next,t);this.previous=getStringOption(e.previous,t);this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}}class KeyUsage extends XFAObject{constructor(e){super(zo,"keyUsage");const t=["","yes","no"];this.crlSign=getStringOption(e.crlSign,t);this.dataEncipherment=getStringOption(e.dataEncipherment,t);this.decipherOnly=getStringOption(e.decipherOnly,t);this.digitalSignature=getStringOption(e.digitalSignature,t);this.encipherOnly=getStringOption(e.encipherOnly,t);this.id=e.id||"";this.keyAgreement=getStringOption(e.keyAgreement,t);this.keyCertSign=getStringOption(e.keyCertSign,t);this.keyEncipherment=getStringOption(e.keyEncipherment,t);this.nonRepudiation=getStringOption(e.nonRepudiation,t);this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Line extends XFAObject{constructor(e){super(zo,"line",!0);this.hand=getStringOption(e.hand,["even","left","right"]);this.id=e.id||"";this.slope=getStringOption(e.slope,["\\","/"]);this.use=e.use||"";this.usehref=e.usehref||"";this.edge=null}[to](){const e=this[bi]()[bi](),t=this.edge||new Edge({}),n=t[ao](),a=Object.create(null),r="visible"===t.presence?t.thickness:0;a.strokeWidth=measureToString(r);a.stroke=n.color;let s,i,o,l,f="100%",c="100%";if(e.w<=r){[s,i,o,l]=["50%",0,"50%","100%"];f=a.strokeWidth}else if(e.h<=r){[s,i,o,l]=[0,"50%","100%","50%"];c=a.strokeWidth}else"\\"===this.slope?[s,i,o,l]=[0,0,"100%","100%"]:[s,i,o,l]=[0,"100%","100%",0];const h={name:"svg",children:[{name:"line",attributes:{xmlns:_o,x1:s,y1:i,x2:o,y2:l,style:a}}],attributes:{xmlns:_o,width:f,height:c,style:{overflow:"visible"}}};if(hasMargin(e))return HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[h]});h.attributes.style.position="absolute";return HTMLResult.success(h)}}class Linear extends XFAObject{constructor(e){super(zo,"linear",!0);this.id=e.id||"";this.type=getStringOption(e.type,["toRight","toBottom","toLeft","toTop"]);this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[ao](e){e=e?e[ao]():"#FFFFFF";return`linear-gradient(${this.type.replace(/([RBLT])/," $1").toLowerCase()}, ${e}, ${this.color?this.color[ao]():"#000000"})`}}class LockDocument extends ContentObject{constructor(e){super(zo,"lockDocument");this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}[ni](){this[Qs]=getStringOption(this[Qs],["auto","0","1"])}}class Manifest extends XFAObject{constructor(e){super(zo,"manifest",!0);this.action=getStringOption(e.action,["include","all","exclude"]);this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.ref=new XFAObjectArray}}class Margin extends XFAObject{constructor(e){super(zo,"margin",!0);this.bottomInset=getMeasurement(e.bottomInset,"0");this.id=e.id||"";this.leftInset=getMeasurement(e.leftInset,"0");this.rightInset=getMeasurement(e.rightInset,"0");this.topInset=getMeasurement(e.topInset,"0");this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}[ao](){return{margin:measureToString(this.topInset)+" "+measureToString(this.rightInset)+" "+measureToString(this.bottomInset)+" "+measureToString(this.leftInset)}}}class Mdp extends XFAObject{constructor(e){super(zo,"mdp");this.id=e.id||"";this.permissions=getInteger({data:e.permissions,defaultValue:2,validate:e=>1===e||3===e});this.signatureType=getStringOption(e.signatureType,["filler","author"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Medium extends XFAObject{constructor(e){super(zo,"medium");this.id=e.id||"";this.imagingBBox=function getBBox(e){const t=-1;if(!e)return{x:t,y:t,width:t,height:t};const n=e.split(",",4).map(e=>getMeasurement(e.trim(),"-1"));if(n.length<4||n[2]<0||n[3]<0)return{x:t,y:t,width:t,height:t};const[a,r,s,i]=n;return{x:a,y:r,width:s,height:i}}(e.imagingBBox);this.long=getMeasurement(e.long);this.orientation=getStringOption(e.orientation,["portrait","landscape"]);this.short=getMeasurement(e.short);this.stock=e.stock||"";this.trayIn=getStringOption(e.trayIn,["auto","delegate","pageFront"]);this.trayOut=getStringOption(e.trayOut,["auto","delegate"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Message extends XFAObject{constructor(e){super(zo,"message",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.text=new XFAObjectArray}}class NumericEdit extends XFAObject{constructor(e){super(zo,"numericEdit",!0);this.hScrollPolicy=getStringOption(e.hScrollPolicy,["auto","off","on"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.comb=null;this.extras=null;this.margin=null}[to](e){const t=toStyle(this,"border","font","margin"),n=this[bi]()[bi](),a={name:"input",attributes:{type:"text",fieldId:n[ro],dataId:n[Zs]?.[ro]||n[ro],class:["xfaTextfield"],style:t,"aria-label":ariaLabel(n),"aria-required":!1}};if(isRequired(n)){a.attributes["aria-required"]=!0;a.attributes.required=!0}return HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[a]})}}class Occur extends XFAObject{constructor(e){super(zo,"occur",!0);this.id=e.id||"";this.initial=""!==e.initial?getInteger({data:e.initial,defaultValue:"",validate:e=>!0}):"";this.max=""!==e.max?getInteger({data:e.max,defaultValue:-1,validate:e=>!0}):"";this.min=""!==e.min?getInteger({data:e.min,defaultValue:1,validate:e=>!0}):"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}[Vs](){const e=this[bi](),t=this.min;""===this.min&&(this.min=e instanceof PageArea||e instanceof PageSet?0:1);""===this.max&&(this.max=""===t?e instanceof PageArea||e instanceof PageSet?-1:1:this.min);-1!==this.max&&this.max<this.min&&(this.max=this.min);""===this.initial&&(this.initial=e instanceof Template?1:this.min)}}class Oid extends StringObject{constructor(e){super(zo,"oid");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Oids extends XFAObject{constructor(e){super(zo,"oids",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.oid=new XFAObjectArray}}class Overflow extends XFAObject{constructor(e){super(zo,"overflow");this.id=e.id||"";this.leader=e.leader||"";this.target=e.target||"";this.trailer=e.trailer||"";this.use=e.use||"";this.usehref=e.usehref||""}[hi](){if(!this[ti]){const e=this[bi](),t=this[wi](),n=t[Gi](this.target,e),a=t[Gi](this.leader,e),r=t[Gi](this.trailer,e);this[ti]={target:n?.[0]||null,leader:a?.[0]||null,trailer:r?.[0]||null,addLeader:!1,addTrailer:!1}}return this[ti]}}class PageArea extends XFAObject{constructor(e){super(zo,"pageArea",!0);this.blankOrNotBlank=getStringOption(e.blankOrNotBlank,["any","blank","notBlank"]);this.id=e.id||"";this.initialNumber=getInteger({data:e.initialNumber,defaultValue:1,validate:e=>!0});this.name=e.name||"";this.numbered=getInteger({data:e.numbered,defaultValue:1,validate:e=>!0});this.oddOrEven=getStringOption(e.oddOrEven,["any","even","odd"]);this.pagePosition=getStringOption(e.pagePosition,["any","first","last","only","rest"]);this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.desc=null;this.extras=null;this.medium=null;this.occur=null;this.area=new XFAObjectArray;this.contentArea=new XFAObjectArray;this.draw=new XFAObjectArray;this.exclGroup=new XFAObjectArray;this.field=new XFAObjectArray;this.subform=new XFAObjectArray}[Ri](){if(!this[ti]){this[ti]={numberOfUse:0};return!0}return!this.occur||-1===this.occur.max||this[ti].numberOfUse<this.occur.max}[Gs](){delete this[ti]}[di](){this[ti]||={numberOfUse:0};const e=this[bi]();if("orderedOccurrence"===e.relation&&this[Ri]()){this[ti].numberOfUse+=1;return this}return e[di]()}[ii](){return this[ti].space||{width:0,height:0}}[to](){this[ti]||={numberOfUse:1};const e=[];this[ti].children=e;const t=Object.create(null);if(this.medium&&this.medium.short&&this.medium.long){t.width=measureToString(this.medium.short);t.height=measureToString(this.medium.long);this[ti].space={width:this.medium.short,height:this.medium.long};if("landscape"===this.medium.orientation){const e=t.width;t.width=t.height;t.height=e;this[ti].space={width:this.medium.long,height:this.medium.short}}}else warn("XFA - No medium specified in pageArea: please file a bug.");this[Ks]({filter:new Set(["area","draw","field","subform"]),include:!0});this[Ks]({filter:new Set(["contentArea"]),include:!0});return HTMLResult.success({name:"div",children:e,attributes:{class:["xfaPage"],id:this[ro],style:t,xfaName:this.name}})}}class PageSet extends XFAObject{constructor(e){super(zo,"pageSet",!0);this.duplexImposition=getStringOption(e.duplexImposition,["longEdge","shortEdge"]);this.id=e.id||"";this.name=e.name||"";this.relation=getStringOption(e.relation,["orderedOccurrence","duplexPaginated","simplexPaginated"]);this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.occur=null;this.pageArea=new XFAObjectArray;this.pageSet=new XFAObjectArray}[Gs](){for(const e of this.pageArea.children)e[Gs]();for(const e of this.pageSet.children)e[Gs]()}[Ri](){return!this.occur||-1===this.occur.max||this[ti].numberOfUse<this.occur.max}[di](){this[ti]||={numberOfUse:1,pageIndex:-1,pageSetIndex:-1};if("orderedOccurrence"===this.relation){if(this[ti].pageIndex+1<this.pageArea.children.length){this[ti].pageIndex+=1;return this.pageArea.children[this[ti].pageIndex][di]()}if(this[ti].pageSetIndex+1<this.pageSet.children.length){this[ti].pageSetIndex+=1;return this.pageSet.children[this[ti].pageSetIndex][di]()}if(this[Ri]()){this[ti].numberOfUse+=1;this[ti].pageIndex=-1;this[ti].pageSetIndex=-1;return this[di]()}const e=this[bi]();if(e instanceof PageSet)return e[di]();this[Gs]();return this[di]()}const e=this[wi]()[ti].pageNumber,t=e%2==0?"even":"odd",n=0===e?"first":"rest";let a=this.pageArea.children.find(e=>e.oddOrEven===t&&e.pagePosition===n);if(a)return a;a=this.pageArea.children.find(e=>"any"===e.oddOrEven&&e.pagePosition===n);if(a)return a;a=this.pageArea.children.find(e=>"any"===e.oddOrEven&&"any"===e.pagePosition);return a||this.pageArea.children[0]}}class Para extends XFAObject{constructor(e){super(zo,"para",!0);this.hAlign=getStringOption(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.lineHeight=e.lineHeight?getMeasurement(e.lineHeight,"0pt"):"";this.marginLeft=e.marginLeft?getMeasurement(e.marginLeft,"0pt"):"";this.marginRight=e.marginRight?getMeasurement(e.marginRight,"0pt"):"";this.orphans=getInteger({data:e.orphans,defaultValue:0,validate:e=>e>=0});this.preserve=e.preserve||"";this.radixOffset=e.radixOffset?getMeasurement(e.radixOffset,"0pt"):"";this.spaceAbove=e.spaceAbove?getMeasurement(e.spaceAbove,"0pt"):"";this.spaceBelow=e.spaceBelow?getMeasurement(e.spaceBelow,"0pt"):"";this.tabDefault=e.tabDefault?getMeasurement(this.tabDefault):"";this.tabStops=(e.tabStops||"").trim().split(/\s+/).map((e,t)=>t%2==1?getMeasurement(e):e);this.textIndent=e.textIndent?getMeasurement(e.textIndent,"0pt"):"";this.use=e.use||"";this.usehref=e.usehref||"";this.vAlign=getStringOption(e.vAlign,["top","bottom","middle"]);this.widows=getInteger({data:e.widows,defaultValue:0,validate:e=>e>=0});this.hyphenation=null}[ao](){const e=toStyle(this,"hAlign");""!==this.marginLeft&&(e.paddingLeft=measureToString(this.marginLeft));""!==this.marginRight&&(e.paddingRight=measureToString(this.marginRight));""!==this.spaceAbove&&(e.paddingTop=measureToString(this.spaceAbove));""!==this.spaceBelow&&(e.paddingBottom=measureToString(this.spaceBelow));if(""!==this.textIndent){e.textIndent=measureToString(this.textIndent);fixTextIndent(e)}this.lineHeight>0&&(e.lineHeight=measureToString(this.lineHeight));""!==this.tabDefault&&(e.tabSize=measureToString(this.tabDefault));this.tabStops.length;this.hyphenatation&&Object.assign(e,this.hyphenatation[ao]());return e}}class PasswordEdit extends XFAObject{constructor(e){super(zo,"passwordEdit",!0);this.hScrollPolicy=getStringOption(e.hScrollPolicy,["auto","off","on"]);this.id=e.id||"";this.passwordChar=e.passwordChar||"*";this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=null;this.margin=null}}class template_Pattern extends XFAObject{constructor(e){super(zo,"pattern",!0);this.id=e.id||"";this.type=getStringOption(e.type,["crossHatch","crossDiagonal","diagonalLeft","diagonalRight","horizontal","vertical"]);this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[ao](e){e=e?e[ao]():"#FFFFFF";const t=this.color?this.color[ao]():"#000000",n="repeating-linear-gradient",a=`${e},${e} 5px,${t} 5px,${t} 10px`;switch(this.type){case"crossHatch":return`${n}(to top,${a}) ${n}(to right,${a})`;case"crossDiagonal":return`${n}(45deg,${a}) ${n}(-45deg,${a})`;case"diagonalLeft":return`${n}(45deg,${a})`;case"diagonalRight":return`${n}(-45deg,${a})`;case"horizontal":return`${n}(to top,${a})`;case"vertical":return`${n}(to right,${a})`}return""}}class Picture extends StringObject{constructor(e){super(zo,"picture");this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Proto extends XFAObject{constructor(e){super(zo,"proto",!0);this.appearanceFilter=new XFAObjectArray;this.arc=new XFAObjectArray;this.area=new XFAObjectArray;this.assist=new XFAObjectArray;this.barcode=new XFAObjectArray;this.bindItems=new XFAObjectArray;this.bookend=new XFAObjectArray;this.boolean=new XFAObjectArray;this.border=new XFAObjectArray;this.break=new XFAObjectArray;this.breakAfter=new XFAObjectArray;this.breakBefore=new XFAObjectArray;this.button=new XFAObjectArray;this.calculate=new XFAObjectArray;this.caption=new XFAObjectArray;this.certificate=new XFAObjectArray;this.certificates=new XFAObjectArray;this.checkButton=new XFAObjectArray;this.choiceList=new XFAObjectArray;this.color=new XFAObjectArray;this.comb=new XFAObjectArray;this.connect=new XFAObjectArray;this.contentArea=new XFAObjectArray;this.corner=new XFAObjectArray;this.date=new XFAObjectArray;this.dateTime=new XFAObjectArray;this.dateTimeEdit=new XFAObjectArray;this.decimal=new XFAObjectArray;this.defaultUi=new XFAObjectArray;this.desc=new XFAObjectArray;this.digestMethod=new XFAObjectArray;this.digestMethods=new XFAObjectArray;this.draw=new XFAObjectArray;this.edge=new XFAObjectArray;this.encoding=new XFAObjectArray;this.encodings=new XFAObjectArray;this.encrypt=new XFAObjectArray;this.encryptData=new XFAObjectArray;this.encryption=new XFAObjectArray;this.encryptionMethod=new XFAObjectArray;this.encryptionMethods=new XFAObjectArray;this.event=new XFAObjectArray;this.exData=new XFAObjectArray;this.exObject=new XFAObjectArray;this.exclGroup=new XFAObjectArray;this.execute=new XFAObjectArray;this.extras=new XFAObjectArray;this.field=new XFAObjectArray;this.fill=new XFAObjectArray;this.filter=new XFAObjectArray;this.float=new XFAObjectArray;this.font=new XFAObjectArray;this.format=new XFAObjectArray;this.handler=new XFAObjectArray;this.hyphenation=new XFAObjectArray;this.image=new XFAObjectArray;this.imageEdit=new XFAObjectArray;this.integer=new XFAObjectArray;this.issuers=new XFAObjectArray;this.items=new XFAObjectArray;this.keep=new XFAObjectArray;this.keyUsage=new XFAObjectArray;this.line=new XFAObjectArray;this.linear=new XFAObjectArray;this.lockDocument=new XFAObjectArray;this.manifest=new XFAObjectArray;this.margin=new XFAObjectArray;this.mdp=new XFAObjectArray;this.medium=new XFAObjectArray;this.message=new XFAObjectArray;this.numericEdit=new XFAObjectArray;this.occur=new XFAObjectArray;this.oid=new XFAObjectArray;this.oids=new XFAObjectArray;this.overflow=new XFAObjectArray;this.pageArea=new XFAObjectArray;this.pageSet=new XFAObjectArray;this.para=new XFAObjectArray;this.passwordEdit=new XFAObjectArray;this.pattern=new XFAObjectArray;this.picture=new XFAObjectArray;this.radial=new XFAObjectArray;this.reason=new XFAObjectArray;this.reasons=new XFAObjectArray;this.rectangle=new XFAObjectArray;this.ref=new XFAObjectArray;this.script=new XFAObjectArray;this.setProperty=new XFAObjectArray;this.signData=new XFAObjectArray;this.signature=new XFAObjectArray;this.signing=new XFAObjectArray;this.solid=new XFAObjectArray;this.speak=new XFAObjectArray;this.stipple=new XFAObjectArray;this.subform=new XFAObjectArray;this.subformSet=new XFAObjectArray;this.subjectDN=new XFAObjectArray;this.subjectDNs=new XFAObjectArray;this.submit=new XFAObjectArray;this.text=new XFAObjectArray;this.textEdit=new XFAObjectArray;this.time=new XFAObjectArray;this.timeStamp=new XFAObjectArray;this.toolTip=new XFAObjectArray;this.traversal=new XFAObjectArray;this.traverse=new XFAObjectArray;this.ui=new XFAObjectArray;this.validate=new XFAObjectArray;this.value=new XFAObjectArray;this.variables=new XFAObjectArray}}class Radial extends XFAObject{constructor(e){super(zo,"radial",!0);this.id=e.id||"";this.type=getStringOption(e.type,["toEdge","toCenter"]);this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[ao](e){e=e?e[ao]():"#FFFFFF";const t=this.color?this.color[ao]():"#000000";return`radial-gradient(circle at center, ${"toEdge"===this.type?`${e},${t}`:`${t},${e}`})`}}class Reason extends StringObject{constructor(e){super(zo,"reason");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Reasons extends XFAObject{constructor(e){super(zo,"reasons",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.reason=new XFAObjectArray}}class Rectangle extends XFAObject{constructor(e){super(zo,"rectangle",!0);this.hand=getStringOption(e.hand,["even","left","right"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.corner=new XFAObjectArray(4);this.edge=new XFAObjectArray(4);this.fill=null}[to](){const e=this.edge.children.length?this.edge.children[0]:new Edge({}),t=e[ao](),n=Object.create(null);"visible"===this.fill?.presence?Object.assign(n,this.fill[ao]()):n.fill="transparent";n.strokeWidth=measureToString("visible"===e.presence?e.thickness:0);n.stroke=t.color;const a=(this.corner.children.length?this.corner.children[0]:new Corner({}))[ao](),r={name:"svg",children:[{name:"rect",attributes:{xmlns:_o,width:"100%",height:"100%",x:0,y:0,rx:a.radius,ry:a.radius,style:n}}],attributes:{xmlns:_o,style:{overflow:"visible"},width:"100%",height:"100%"}};if(hasMargin(this[bi]()[bi]()))return HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[r]});r.attributes.style.position="absolute";return HTMLResult.success(r)}}class RefElement extends StringObject{constructor(e){super(zo,"ref");this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Script extends StringObject{constructor(e){super(zo,"script");this.binding=e.binding||"";this.contentType=e.contentType||"";this.id=e.id||"";this.name=e.name||"";this.runAt=getStringOption(e.runAt,["client","both","server"]);this.use=e.use||"";this.usehref=e.usehref||""}}class SetProperty extends XFAObject{constructor(e){super(zo,"setProperty");this.connection=e.connection||"";this.ref=e.ref||"";this.target=e.target||""}}class SignData extends XFAObject{constructor(e){super(zo,"signData",!0);this.id=e.id||"";this.operation=getStringOption(e.operation,["sign","clear","verify"]);this.ref=e.ref||"";this.target=e.target||"";this.use=e.use||"";this.usehref=e.usehref||"";this.filter=null;this.manifest=null}}class Signature extends XFAObject{constructor(e){super(zo,"signature",!0);this.id=e.id||"";this.type=getStringOption(e.type,["PDF1.3","PDF1.6"]);this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=null;this.filter=null;this.manifest=null;this.margin=null}}class Signing extends XFAObject{constructor(e){super(zo,"signing",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.certificate=new XFAObjectArray}}class Solid extends XFAObject{constructor(e){super(zo,"solid",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}[ao](e){return e?e[ao]():"#FFFFFF"}}class Speak extends StringObject{constructor(e){super(zo,"speak");this.disable=getInteger({data:e.disable,defaultValue:0,validate:e=>1===e});this.id=e.id||"";this.priority=getStringOption(e.priority,["custom","caption","name","toolTip"]);this.rid=e.rid||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Stipple extends XFAObject{constructor(e){super(zo,"stipple",!0);this.id=e.id||"";this.rate=getInteger({data:e.rate,defaultValue:50,validate:e=>e>=0&&e<=100});this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[ao](e){const t=this.rate/100;return Util.makeHexColor(Math.round(e.value.r*(1-t)+this.value.r*t),Math.round(e.value.g*(1-t)+this.value.g*t),Math.round(e.value.b*(1-t)+this.value.b*t))}}class Subform extends XFAObject{constructor(e){super(zo,"subform",!0);this.access=getStringOption(e.access,["open","nonInteractive","protected","readOnly"]);this.allowMacro=getInteger({data:e.allowMacro,defaultValue:0,validate:e=>1===e});this.anchorType=getStringOption(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]);this.colSpan=getInteger({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e});this.columnWidths=(e.columnWidths||"").trim().split(/\s+/).map(e=>"-1"===e?-1:getMeasurement(e));this.h=e.h?getMeasurement(e.h):"";this.hAlign=getStringOption(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.layout=getStringOption(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]);this.locale=e.locale||"";this.maxH=getMeasurement(e.maxH,"0pt");this.maxW=getMeasurement(e.maxW,"0pt");this.mergeMode=getStringOption(e.mergeMode,["consumeData","matchTemplate"]);this.minH=getMeasurement(e.minH,"0pt");this.minW=getMeasurement(e.minW,"0pt");this.name=e.name||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=getRelevant(e.relevant);this.restoreState=getStringOption(e.restoreState,["manual","auto"]);this.scope=getStringOption(e.scope,["name","none"]);this.use=e.use||"";this.usehref=e.usehref||"";this.w=e.w?getMeasurement(e.w):"";this.x=getMeasurement(e.x,"0pt");this.y=getMeasurement(e.y,"0pt");this.assist=null;this.bind=null;this.bookend=null;this.border=null;this.break=null;this.calculate=null;this.desc=null;this.extras=null;this.keep=null;this.margin=null;this.occur=null;this.overflow=null;this.pageSet=null;this.para=null;this.traversal=null;this.validate=null;this.variables=null;this.area=new XFAObjectArray;this.breakAfter=new XFAObjectArray;this.breakBefore=new XFAObjectArray;this.connect=new XFAObjectArray;this.draw=new XFAObjectArray;this.event=new XFAObjectArray;this.exObject=new XFAObjectArray;this.exclGroup=new XFAObjectArray;this.field=new XFAObjectArray;this.proto=new XFAObjectArray;this.setProperty=new XFAObjectArray;this.subform=new XFAObjectArray;this.subformSet=new XFAObjectArray}[gi](){const e=this[bi]();return e instanceof SubformSet?e[gi]():e}[xi](){return!0}[Ti](){return this.layout.endsWith("-tb")&&0===this[ti].attempt&&this[ti].numberInLine>0||this[bi]()[Ti]()}*[pi](){yield*getContainedChildren(this)}[ai](){return flushHTML(this)}[Xs](e,t){addHTML(this,e,t)}[ii](){return getAvailableSpace(this)}[Fi](){const e=this[gi]();if(!e[Fi]())return!1;if(void 0!==this[ti]._isSplittable)return this[ti]._isSplittable;if("position"===this.layout||this.layout.includes("row")){this[ti]._isSplittable=!1;return!1}if(this.keep&&"none"!==this.keep.intact){this[ti]._isSplittable=!1;return!1}if(e.layout?.endsWith("-tb")&&0!==e[ti].numberInLine)return!1;this[ti]._isSplittable=!0;return!0}[to](e){setTabIndex(this);if(this.break){if("auto"!==this.break.after||""!==this.break.afterTarget){const e=new BreakAfter({targetType:this.break.after,target:this.break.afterTarget,startNew:this.break.startNew.toString()});e[ji]=this[ji];this[Ws](e);this.breakAfter.push(e)}if("auto"!==this.break.before||""!==this.break.beforeTarget){const e=new BreakBefore({targetType:this.break.before,target:this.break.beforeTarget,startNew:this.break.startNew.toString()});e[ji]=this[ji];this[Ws](e);this.breakBefore.push(e)}if(""!==this.break.overflowTarget){const e=new Overflow({target:this.break.overflowTarget,leader:this.break.overflowLeader,trailer:this.break.overflowTrailer});e[ji]=this[ji];this[Ws](e);this.overflow.push(e)}this[Wi](this.break);this.break=null}if("hidden"===this.presence||"inactive"===this.presence)return HTMLResult.EMPTY;(this.breakBefore.children.length>1||this.breakAfter.children.length>1)&&warn("XFA - Several breakBefore or breakAfter in subforms: please file a bug.");if(this.breakBefore.children.length>=1){const e=this.breakBefore.children[0];if(handleBreak(e))return HTMLResult.breakNode(e)}if(this[ti]?.afterBreakAfter)return HTMLResult.EMPTY;fixDimensions(this);const t=[],n={id:this[ro],class:[]};setAccess(this,n.class);this[ti]||=Object.create(null);Object.assign(this[ti],{children:t,line:null,attributes:n,attempt:0,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,e.width),height:Math.min(this.h||1/0,e.height)},width:0,height:0,prevHeight:0,currentWidth:0});const a=this[wi](),r=a[ti].noLayoutFailure,s=this[Fi]();s||setFirstUnsplittable(this);if(!checkDimensions(this,e))return HTMLResult.FAILURE;const i=new Set(["area","draw","exclGroup","field","subform","subformSet"]);if(this.layout.includes("row")){const e=this[gi]().columnWidths;if(Array.isArray(e)&&e.length>0){this[ti].columnWidths=e;this[ti].currentColumn=0}}const o=toStyle(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),l=["xfaSubform"],f=layoutClass(this);f&&l.push(f);n.style=o;n.class=l;this.name&&(n.xfaName=this.name);if(this.overflow){const t=this.overflow[hi]();if(t.addLeader){t.addLeader=!1;handleOverflow(this,t.leader,e)}}this[Xi]();const c="lr-tb"===this.layout||"rl-tb"===this.layout,h=c?2:1;for(;this[ti].attempt<h;this[ti].attempt++){c&&1===this[ti].attempt&&(this[ti].numberInLine=0);const e=this[Ks]({filter:i,include:!0});if(e.success)break;if(e.isBreak()){this[_i]();return e}if(c&&0===this[ti].attempt&&0===this[ti].numberInLine&&!a[ti].noLayoutFailure){this[ti].attempt=h;break}}this[_i]();s||unsetFirstUnsplittable(this);a[ti].noLayoutFailure=r;if(this[ti].attempt===h){this.overflow&&(this[wi]()[ti].overflowNode=this.overflow);s||delete this[ti];return HTMLResult.FAILURE}if(this.overflow){const t=this.overflow[hi]();if(t.addTrailer){t.addTrailer=!1;handleOverflow(this,t.trailer,e)}}let u=0,m=0;if(this.margin){u=this.margin.leftInset+this.margin.rightInset;m=this.margin.topInset+this.margin.bottomInset}const p=Math.max(this[ti].width+u,this.w||0),d=Math.max(this[ti].height+m,this.h||0),g=[this.x,this.y,p,d];""===this.w&&(o.width=measureToString(p));""===this.h&&(o.height=measureToString(d));if(("0px"===o.width||"0px"===o.height)&&0===t.length)return HTMLResult.EMPTY;const b={name:"div",attributes:n,children:t};applyAssist(this,n);const w=HTMLResult.success(createWrapper(this,b),g);if(this.breakAfter.children.length>=1){const e=this.breakAfter.children[0];if(handleBreak(e)){this[ti].afterBreakAfter=w;return HTMLResult.breakNode(e)}}delete this[ti];return w}}class SubformSet extends XFAObject{constructor(e){super(zo,"subformSet",!0);this.id=e.id||"";this.name=e.name||"";this.relation=getStringOption(e.relation,["ordered","choice","unordered"]);this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.bookend=null;this.break=null;this.desc=null;this.extras=null;this.occur=null;this.overflow=null;this.breakAfter=new XFAObjectArray;this.breakBefore=new XFAObjectArray;this.subform=new XFAObjectArray;this.subformSet=new XFAObjectArray}*[pi](){yield*getContainedChildren(this)}[gi](){let e=this[bi]();for(;!(e instanceof Subform);)e=e[bi]();return e}[xi](){return!0}}class SubjectDN extends ContentObject{constructor(e){super(zo,"subjectDN");this.delimiter=e.delimiter||",";this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[ni](){this[Qs]=new Map(this[Qs].split(this.delimiter).map(e=>{(e=e.split("=",2))[0]=e[0].trim();return e}))}}class SubjectDNs extends XFAObject{constructor(e){super(zo,"subjectDNs",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.subjectDN=new XFAObjectArray}}class Submit extends XFAObject{constructor(e){super(zo,"submit",!0);this.embedPDF=getInteger({data:e.embedPDF,defaultValue:0,validate:e=>1===e});this.format=getStringOption(e.format,["xdp","formdata","pdf","urlencoded","xfd","xml"]);this.id=e.id||"";this.target=e.target||"";this.textEncoding=getKeyword({data:e.textEncoding?e.textEncoding.toLowerCase():"",defaultValue:"",validate:e=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(e)||e.match(/iso-8859-\d{2}/)});this.use=e.use||"";this.usehref=e.usehref||"";this.xdpContent=e.xdpContent||"";this.encrypt=null;this.encryptData=new XFAObjectArray;this.signData=new XFAObjectArray}}class Template extends XFAObject{constructor(e){super(zo,"template",!0);this.baseProfile=getStringOption(e.baseProfile,["full","interactiveForms"]);this.extras=null;this.subform=new XFAObjectArray}[ni](){0===this.subform.children.length&&warn("XFA - No subforms in template node.");this.subform.children.length>=2&&warn("XFA - Several subforms in template node: please file a bug.");this[Qi]=5e3}[Fi](){return!0}[Gi](e,t){return e.startsWith("#")?[this[yi].get(e.slice(1))]:searchNode(this,t,e,!0,!0)}*[eo](){if(!this.subform.children.length)return HTMLResult.success({name:"div",children:[]});this[ti]={overflowNode:null,firstUnsplittable:null,currentContentArea:null,currentPageArea:null,noLayoutFailure:!1,pageNumber:1,pagePosition:"first",oddOrEven:"odd",blankOrNotBlank:"nonBlank",paraStack:[]};const e=this.subform.children[0];e.pageSet[Gs]();const t=e.pageSet.pageArea.children,n={name:"div",children:[]};let a=null,r=null,s=null;if(e.breakBefore.children.length>=1){r=e.breakBefore.children[0];s=r.target}else if(e.subform.children.length>=1&&e.subform.children[0].breakBefore.children.length>=1){r=e.subform.children[0].breakBefore.children[0];s=r.target}else if(e.break?.beforeTarget){r=e.break;s=r.beforeTarget}else if(e.subform.children.length>=1&&e.subform.children[0].break?.beforeTarget){r=e.subform.children[0].break;s=r.beforeTarget}if(r){const e=this[Gi](s,r[bi]());if(e instanceof PageArea){a=e;r[ti]={}}}a||=t[0];a[ti]={numberOfUse:1};const i=a[bi]();i[ti]={numberOfUse:1,pageIndex:i.pageArea.children.indexOf(a),pageSetIndex:0};let o,l=null,f=null,c=!0,h=0,u=0;for(;;){if(c)h=0;else{n.children.pop();if(3===++h){warn("XFA - Something goes wrong: please file a bug.");return n}}o=null;this[ti].currentPageArea=a;const t=a[to]().html;n.children.push(t);if(l){this[ti].noLayoutFailure=!0;t.children.push(l[to](a[ti].space).html);l=null}if(f){this[ti].noLayoutFailure=!0;t.children.push(f[to](a[ti].space).html);f=null}const r=a.contentArea.children,s=t.children.filter(e=>e.attributes.class.includes("xfaContentarea"));c=!1;this[ti].firstUnsplittable=null;this[ti].noLayoutFailure=!1;const flush=t=>{const n=e[ai]();if(n){c||=n.children?.length>0;s[t].children.push(n)}};for(let t=u,a=r.length;t<a;t++){const a=this[ti].currentContentArea=r[t],i={width:a.w,height:a.h};u=0;if(l){s[t].children.push(l[to](i).html);l=null}if(f){s[t].children.push(f[to](i).html);f=null}const h=e[to](i);if(h.success){if(h.html){c||=h.html.children?.length>0;s[t].children.push(h.html)}else!c&&n.children.length>1&&n.children.pop();return n}if(h.isBreak()){const e=h.breakNode;flush(t);if("auto"===e.targetType)continue;if(e.leader){l=this[Gi](e.leader,e[bi]());l=l?l[0]:null}if(e.trailer){f=this[Gi](e.trailer,e[bi]());f=f?f[0]:null}if("pageArea"===e.targetType){o=e[ti].target;t=1/0}else if(e[ti].target){o=e[ti].target;u=e[ti].index+1;t=1/0}else t=e[ti].index;continue}if(this[ti].overflowNode){const e=this[ti].overflowNode;this[ti].overflowNode=null;const n=e[hi](),a=n.target;n.addLeader=null!==n.leader;n.addTrailer=null!==n.trailer;flush(t);const s=t;t=1/0;if(a instanceof PageArea)o=a;else if(a instanceof ContentArea){const e=r.indexOf(a);if(-1!==e)e>s?t=e-1:u=e;else{o=a[bi]();u=o.contentArea.children.indexOf(a)}}continue}flush(t)}this[ti].pageNumber+=1;o&&(o[Ri]()?o[ti].numberOfUse+=1:o=null);a=o||a[di]();yield null}}}class Text extends ContentObject{constructor(e){super(zo,"text");this.id=e.id||"";this.maxChars=getInteger({data:e.maxChars,defaultValue:0,validate:e=>e>=0});this.name=e.name||"";this.rid=e.rid||"";this.use=e.use||"";this.usehref=e.usehref||""}[Us](){return!0}[Pi](e){if(e[Hi]===io.xhtml.id){this[Qs]=e;return!0}warn(`XFA - Invalid content in Text: ${e[Di]}.`);return!1}[Ni](e){this[Qs]instanceof XFAObject||super[Ni](e)}[ni](){"string"==typeof this[Qs]&&(this[Qs]=this[Qs].replaceAll("\r\n","\n"))}[hi](){return"string"==typeof this[Qs]?this[Qs].split(/[\u2029\u2028\n]/).filter(e=>!!e).join("\n"):this[Qs][Zi]()}[to](e){if("string"==typeof this[Qs]){const e=valueToHtml(this[Qs]).html;if(this[Qs].includes("\u2029")){e.name="div";e.children=[];this[Qs].split("\u2029").map(e=>e.split(/[\u2028\n]/).flatMap(e=>[{name:"span",value:e},{name:"br"}])).forEach(t=>{e.children.push({name:"p",children:t})})}else if(/[\u2028\n]/.test(this[Qs])){e.name="div";e.children=[];this[Qs].split(/[\u2028\n]/).forEach(t=>{e.children.push({name:"span",value:t},{name:"br"})})}return HTMLResult.success(e)}return this[Qs][to](e)}}class TextEdit extends XFAObject{constructor(e){super(zo,"textEdit",!0);this.allowRichText=getInteger({data:e.allowRichText,defaultValue:0,validate:e=>1===e});this.hScrollPolicy=getStringOption(e.hScrollPolicy,["auto","off","on"]);this.id=e.id||"";this.multiLine=getInteger({data:e.multiLine,defaultValue:"",validate:e=>0===e||1===e});this.use=e.use||"";this.usehref=e.usehref||"";this.vScrollPolicy=getStringOption(e.vScrollPolicy,["auto","off","on"]);this.border=null;this.comb=null;this.extras=null;this.margin=null}[to](e){const t=toStyle(this,"border","font","margin");let n;const a=this[bi]()[bi]();""===this.multiLine&&(this.multiLine=a instanceof Draw?1:0);n=1===this.multiLine?{name:"textarea",attributes:{dataId:a[Zs]?.[ro]||a[ro],fieldId:a[ro],class:["xfaTextfield"],style:t,"aria-label":ariaLabel(a),"aria-required":!1}}:{name:"input",attributes:{type:"text",dataId:a[Zs]?.[ro]||a[ro],fieldId:a[ro],class:["xfaTextfield"],style:t,"aria-label":ariaLabel(a),"aria-required":!1}};if(isRequired(a)){n.attributes["aria-required"]=!0;n.attributes.required=!0}return HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[n]})}}class Time extends StringObject{constructor(e){super(zo,"time");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[ni](){const e=this[Qs].trim();this[Qs]=e?new Date(e):null}[to](e){return valueToHtml(this[Qs]?this[Qs].toString():"")}}class TimeStamp extends XFAObject{constructor(e){super(zo,"timeStamp");this.id=e.id||"";this.server=e.server||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}}class ToolTip extends StringObject{constructor(e){super(zo,"toolTip");this.id=e.id||"";this.rid=e.rid||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Traversal extends XFAObject{constructor(e){super(zo,"traversal",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.traverse=new XFAObjectArray}}class Traverse extends XFAObject{constructor(e){super(zo,"traverse",!0);this.id=e.id||"";this.operation=getStringOption(e.operation,["next","back","down","first","left","right","up"]);this.ref=e.ref||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.script=null}get name(){return this.operation}[Oi](){return!1}}class Ui extends XFAObject{constructor(e){super(zo,"ui",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.picture=null;this.barcode=null;this.button=null;this.checkButton=null;this.choiceList=null;this.dateTimeEdit=null;this.defaultUi=null;this.imageEdit=null;this.numericEdit=null;this.passwordEdit=null;this.signature=null;this.textEdit=null}[hi](){if(void 0===this[ti]){for(const e of Object.getOwnPropertyNames(this)){if("extras"===e||"picture"===e)continue;const t=this[e];if(t instanceof XFAObject){this[ti]=t;return t}}this[ti]=null}return this[ti]}[to](e){const t=this[hi]();return t?t[to](e):HTMLResult.EMPTY}}class Validate extends XFAObject{constructor(e){super(zo,"validate",!0);this.formatTest=getStringOption(e.formatTest,["warning","disabled","error"]);this.id=e.id||"";this.nullTest=getStringOption(e.nullTest,["disabled","error","warning"]);this.scriptTest=getStringOption(e.scriptTest,["error","disabled","warning"]);this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.message=null;this.picture=null;this.script=null}}class Value extends XFAObject{constructor(e){super(zo,"value",!0);this.id=e.id||"";this.override=getInteger({data:e.override,defaultValue:0,validate:e=>1===e});this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.arc=null;this.boolean=null;this.date=null;this.dateTime=null;this.decimal=null;this.exData=null;this.float=null;this.image=null;this.integer=null;this.line=null;this.rectangle=null;this.text=null;this.time=null}[Ji](e){const t=this[bi]();if(t instanceof Field&&t.ui?.imageEdit){if(!this.image){this.image=new Image({});this[Ws](this.image)}this.image[Qs]=e[Qs];return}const n=e[Di];if(null===this[n]){for(const e of Object.getOwnPropertyNames(this)){const t=this[e];if(t instanceof XFAObject){this[e]=null;this[Wi](t)}}this[e[Di]]=e;this[Ws](e)}else this[n][Qs]=e[Qs]}[Zi](){if(this.exData)return"string"==typeof this.exData[Qs]?this.exData[Qs].trim():this.exData[Qs][Zi]().trim();for(const e of Object.getOwnPropertyNames(this)){if("image"===e)continue;const t=this[e];if(t instanceof XFAObject)return(t[Qs]||"").toString().trim()}return null}[to](e){for(const t of Object.getOwnPropertyNames(this)){const n=this[t];if(n instanceof XFAObject)return n[to](e)}return HTMLResult.EMPTY}}class Variables extends XFAObject{constructor(e){super(zo,"variables",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.boolean=new XFAObjectArray;this.date=new XFAObjectArray;this.dateTime=new XFAObjectArray;this.decimal=new XFAObjectArray;this.exData=new XFAObjectArray;this.float=new XFAObjectArray;this.image=new XFAObjectArray;this.integer=new XFAObjectArray;this.manifest=new XFAObjectArray;this.script=new XFAObjectArray;this.text=new XFAObjectArray;this.time=new XFAObjectArray}[Oi](){return!0}}class TemplateNamespace{static[so](e,t){if(TemplateNamespace.hasOwnProperty(e)){const n=TemplateNamespace[e](t);n[Yi](t);return n}}static appearanceFilter(e){return new AppearanceFilter(e)}static arc(e){return new Arc(e)}static area(e){return new Area(e)}static assist(e){return new Assist(e)}static barcode(e){return new Barcode(e)}static bind(e){return new Bind(e)}static bindItems(e){return new BindItems(e)}static bookend(e){return new Bookend(e)}static boolean(e){return new BooleanElement(e)}static border(e){return new Border(e)}static break(e){return new Break(e)}static breakAfter(e){return new BreakAfter(e)}static breakBefore(e){return new BreakBefore(e)}static button(e){return new Button(e)}static calculate(e){return new Calculate(e)}static caption(e){return new Caption(e)}static certificate(e){return new Certificate(e)}static certificates(e){return new Certificates(e)}static checkButton(e){return new CheckButton(e)}static choiceList(e){return new ChoiceList(e)}static color(e){return new Color(e)}static comb(e){return new Comb(e)}static connect(e){return new Connect(e)}static contentArea(e){return new ContentArea(e)}static corner(e){return new Corner(e)}static date(e){return new DateElement(e)}static dateTime(e){return new DateTime(e)}static dateTimeEdit(e){return new DateTimeEdit(e)}static decimal(e){return new Decimal(e)}static defaultUi(e){return new DefaultUi(e)}static desc(e){return new Desc(e)}static digestMethod(e){return new DigestMethod(e)}static digestMethods(e){return new DigestMethods(e)}static draw(e){return new Draw(e)}static edge(e){return new Edge(e)}static encoding(e){return new Encoding(e)}static encodings(e){return new Encodings(e)}static encrypt(e){return new Encrypt(e)}static encryptData(e){return new EncryptData(e)}static encryption(e){return new Encryption(e)}static encryptionMethod(e){return new EncryptionMethod(e)}static encryptionMethods(e){return new EncryptionMethods(e)}static event(e){return new Event(e)}static exData(e){return new ExData(e)}static exObject(e){return new ExObject(e)}static exclGroup(e){return new ExclGroup(e)}static execute(e){return new Execute(e)}static extras(e){return new Extras(e)}static field(e){return new Field(e)}static fill(e){return new Fill(e)}static filter(e){return new Filter(e)}static float(e){return new Float(e)}static font(e){return new template_Font(e)}static format(e){return new Format(e)}static handler(e){return new Handler(e)}static hyphenation(e){return new Hyphenation(e)}static image(e){return new Image(e)}static imageEdit(e){return new ImageEdit(e)}static integer(e){return new Integer(e)}static issuers(e){return new Issuers(e)}static items(e){return new Items(e)}static keep(e){return new Keep(e)}static keyUsage(e){return new KeyUsage(e)}static line(e){return new Line(e)}static linear(e){return new Linear(e)}static lockDocument(e){return new LockDocument(e)}static manifest(e){return new Manifest(e)}static margin(e){return new Margin(e)}static mdp(e){return new Mdp(e)}static medium(e){return new Medium(e)}static message(e){return new Message(e)}static numericEdit(e){return new NumericEdit(e)}static occur(e){return new Occur(e)}static oid(e){return new Oid(e)}static oids(e){return new Oids(e)}static overflow(e){return new Overflow(e)}static pageArea(e){return new PageArea(e)}static pageSet(e){return new PageSet(e)}static para(e){return new Para(e)}static passwordEdit(e){return new PasswordEdit(e)}static pattern(e){return new template_Pattern(e)}static picture(e){return new Picture(e)}static proto(e){return new Proto(e)}static radial(e){return new Radial(e)}static reason(e){return new Reason(e)}static reasons(e){return new Reasons(e)}static rectangle(e){return new Rectangle(e)}static ref(e){return new RefElement(e)}static script(e){return new Script(e)}static setProperty(e){return new SetProperty(e)}static signData(e){return new SignData(e)}static signature(e){return new Signature(e)}static signing(e){return new Signing(e)}static solid(e){return new Solid(e)}static speak(e){return new Speak(e)}static stipple(e){return new Stipple(e)}static subform(e){return new Subform(e)}static subformSet(e){return new SubformSet(e)}static subjectDN(e){return new SubjectDN(e)}static subjectDNs(e){return new SubjectDNs(e)}static submit(e){return new Submit(e)}static template(e){return new Template(e)}static text(e){return new Text(e)}static textEdit(e){return new TextEdit(e)}static time(e){return new Time(e)}static timeStamp(e){return new TimeStamp(e)}static toolTip(e){return new ToolTip(e)}static traversal(e){return new Traversal(e)}static traverse(e){return new Traverse(e)}static ui(e){return new Ui(e)}static validate(e){return new Validate(e)}static value(e){return new Value(e)}static variables(e){return new Variables(e)}}const Wo=io.datasets.id;function createText(e){const t=new Text({});t[Qs]=e;return t}class Binder{constructor(e){this.root=e;this.datasets=e.datasets;this.data=e.datasets?.data||new XmlObject(io.datasets.id,"data");this.emptyMerge=0===this.data[mi]().length;this.root.form=this.form=e.template[Ys]()}_isConsumeData(){return!this.emptyMerge&&this._mergeMode}_isMatchTemplate(){return!this._isConsumeData()}bind(){this._bindElement(this.form,this.data);return this.form}getData(){return this.data}_bindValue(e,t,n){e[Zs]=t;if(e[ki]())if(t[Ai]()){const n=t[ci]();e[Ji](createText(n))}else if(e instanceof Field&&"multiSelect"===e.ui?.choiceList?.open){const n=t[mi]().map(e=>e[Qs].trim()).join("\n");e[Ji](createText(n))}else this._isConsumeData()&&warn("XFA - Nodes haven't the same type.");else!t[Ai]()||this._isMatchTemplate()?this._bindElement(e,t):warn("XFA - Nodes haven't the same type.")}_findDataByNameToConsume(e,t,n,a){if(!e)return null;let r,s;for(let a=0;a<3;a++){r=n[ui](e,!1,!0);for(;;){s=r.next().value;if(!s)break;if(t===s[Ai]())return s}if(n[Hi]===io.datasets.id&&"data"===n[Di])break;n=n[bi]()}if(!a)return null;r=this.data[ui](e,!0,!1);s=r.next().value;if(s)return s;r=this.data[ri](e,!0);s=r.next().value;return s?.[Ai]()?s:null}_setProperties(e,t){if(e.hasOwnProperty("setProperty"))for(const{ref:n,target:a,connection:r}of e.setProperty.children){if(r)continue;if(!n)continue;const s=searchNode(this.root,t,n,!1,!1);if(!s){warn(`XFA - Invalid reference: ${n}.`);continue}const[i]=s;if(!i[Ci](this.data)){warn("XFA - Invalid node: must be a data node.");continue}const o=searchNode(this.root,e,a,!1,!1);if(!o){warn(`XFA - Invalid target: ${a}.`);continue}const[l]=o;if(!l[Ci](e)){warn("XFA - Invalid target: must be a property or subproperty.");continue}const f=l[bi]();if(l instanceof SetProperty||f instanceof SetProperty){warn("XFA - Invalid target: cannot be a setProperty or one of its properties.");continue}if(l instanceof BindItems||f instanceof BindItems){warn("XFA - Invalid target: cannot be a bindItems or one of its properties.");continue}const c=i[Zi](),h=l[Di];if(l instanceof XFAAttribute){const e=Object.create(null);e[h]=c;const t=Reflect.construct(Object.getPrototypeOf(f).constructor,[e]);f[h]=t[h];continue}if(l.hasOwnProperty(Qs)){l[Zs]=i;l[Qs]=c;l[ni]()}else warn("XFA - Invalid node to use in setProperty")}}_bindItems(e,t){if(!e.hasOwnProperty("items")||!e.hasOwnProperty("bindItems")||e.bindItems.isEmpty())return;for(const t of e.items.children)e[Wi](t);e.items.clear();const n=new Items({}),a=new Items({});e[Ws](n);e.items.push(n);e[Ws](a);e.items.push(a);for(const{ref:r,labelRef:s,valueRef:i,connection:o}of e.bindItems.children){if(o)continue;if(!r)continue;const e=searchNode(this.root,t,r,!1,!1);if(e)for(const t of e){if(!t[Ci](this.datasets)){warn(`XFA - Invalid ref (${r}): must be a datasets child.`);continue}const e=searchNode(this.root,t,s,!0,!1);if(!e){warn(`XFA - Invalid label: ${s}.`);continue}const[o]=e;if(!o[Ci](this.datasets)){warn("XFA - Invalid label: must be a datasets child.");continue}const l=searchNode(this.root,t,i,!0,!1);if(!l){warn(`XFA - Invalid value: ${i}.`);continue}const[f]=l;if(!f[Ci](this.datasets)){warn("XFA - Invalid value: must be a datasets child.");continue}const c=createText(o[Zi]()),h=createText(f[Zi]());n[Ws](c);n.text.push(c);a[Ws](h);a.text.push(h)}else warn(`XFA - Invalid reference: ${r}.`)}}_bindOccurrences(e,t,n){let a;if(t.length>1){a=e[Ys]();a[Wi](a.occur);a.occur=null}this._bindValue(e,t[0],n);this._setProperties(e,t[0]);this._bindItems(e,t[0]);if(1===t.length)return;const r=e[bi](),s=e[Di],i=r[qi](e);for(let e=1,o=t.length;e<o;e++){const o=t[e],l=a[Ys]();r[s].push(l);r[vi](i+e,l);this._bindValue(l,o,n);this._setProperties(l,o);this._bindItems(l,o)}}_createOccurrences(e){if(!this.emptyMerge)return;const{occur:t}=e;if(!t||t.initial<=1)return;const n=e[bi](),a=e[Di];if(!(n[a]instanceof XFAObjectArray))return;let r;r=e.name?n[a].children.filter(t=>t.name===e.name).length:n[a].children.length;const s=n[qi](e)+1,i=t.initial-r;if(i){const t=e[Ys]();t[Wi](t.occur);t.occur=null;n[a].push(t);n[vi](s,t);for(let e=1;e<i;e++){const r=t[Ys]();n[a].push(r);n[vi](s+e,r)}}}_getOccurInfo(e){const{name:t,occur:n}=e;if(!n||!t)return[1,1];const a=-1===n.max?1/0:n.max;return[n.min,a]}_setAndBind(e,t){this._setProperties(e,t);this._bindItems(e,t);this._bindElement(e,t)}_bindElement(e,t){const n=[];this._createOccurrences(e);for(const a of e[mi]()){if(a[Zs])continue;if(void 0===this._mergeMode&&"subform"===a[Di]){this._mergeMode="consumeData"===a.mergeMode;const e=t[mi]();if(e.length>0)this._bindOccurrences(a,[e[0]],null);else if(this.emptyMerge){const e=t[Hi]===Wo?-1:t[Hi],n=a[Zs]=new XmlObject(e,a.name||"root");t[Ws](n);this._bindElement(a,n)}continue}if(!a[xi]())continue;let e=!1,r=null,s=null,i=null;if(a.bind){switch(a.bind.match){case"none":this._setAndBind(a,t);continue;case"global":e=!0;break;case"dataRef":if(!a.bind.ref){warn(`XFA - ref is empty in node ${a[Di]}.`);this._setAndBind(a,t);continue}s=a.bind.ref}a.bind.picture&&(r=a.bind.picture[Qs])}const[o,l]=this._getOccurInfo(a);if(s){i=searchNode(this.root,t,s,!0,!1);if(null===i){i=createDataNode(this.data,t,s);if(!i)continue;this._isConsumeData()&&(i[Js]=!0);this._setAndBind(a,i);continue}this._isConsumeData()&&(i=i.filter(e=>!e[Js]));i.length>l?i=i.slice(0,l):0===i.length&&(i=null);i&&this._isConsumeData()&&i.forEach(e=>{e[Js]=!0})}else{if(!a.name){this._setAndBind(a,t);continue}if(this._isConsumeData()){const n=[];for(;n.length<l;){const r=this._findDataByNameToConsume(a.name,a[ki](),t,e);if(!r)break;r[Js]=!0;n.push(r)}i=n.length>0?n:null}else{i=t[ui](a.name,!1,this.emptyMerge).next().value;if(!i){if(0===o){n.push(a);continue}const e=t[Hi]===Wo?-1:t[Hi];i=a[Zs]=new XmlObject(e,a.name);this.emptyMerge&&(i[Js]=!0);t[Ws](i);this._setAndBind(a,i);continue}this.emptyMerge&&(i[Js]=!0);i=[i]}}i?this._bindOccurrences(a,i,r):o>0?this._setAndBind(a,t):n.push(a)}n.forEach(e=>e[bi]()[Wi](e))}}class DataHandler{constructor(e,t){this.data=t;this.dataset=e.datasets||null}serialize(e){const t=[[-1,this.data[mi]()]];for(;t.length>0;){const n=t.at(-1),[a,r]=n;if(a+1===r.length){t.pop();continue}const s=r[++n[0]],i=e.get(s[ro]);if(i)s[Ji](i);else{const t=s[si]();for(const n of t.values()){const t=e.get(n[ro]);if(t){n[Ji](t);break}}}const o=s[mi]();o.length>0&&t.push([-1,o])}const n=['<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">'];if(this.dataset)for(const e of this.dataset[mi]())"data"!==e[Di]&&e[no](n);this.data[no](n);n.push("</xfa:datasets>");return n.join("")}}const Ko=io.config.id;class Acrobat extends XFAObject{constructor(e){super(Ko,"acrobat",!0);this.acrobat7=null;this.autoSave=null;this.common=null;this.validate=null;this.validateApprovalSignatures=null;this.submitUrl=new XFAObjectArray}}class Acrobat7 extends XFAObject{constructor(e){super(Ko,"acrobat7",!0);this.dynamicRender=null}}class ADBE_JSConsole extends OptionObject{constructor(e){super(Ko,"ADBE_JSConsole",["delegate","Enable","Disable"])}}class ADBE_JSDebugger extends OptionObject{constructor(e){super(Ko,"ADBE_JSDebugger",["delegate","Enable","Disable"])}}class AddSilentPrint extends Option01{constructor(e){super(Ko,"addSilentPrint")}}class AddViewerPreferences extends Option01{constructor(e){super(Ko,"addViewerPreferences")}}class AdjustData extends Option10{constructor(e){super(Ko,"adjustData")}}class AdobeExtensionLevel extends IntegerObject{constructor(e){super(Ko,"adobeExtensionLevel",0,e=>e>=1&&e<=8)}}class Agent extends XFAObject{constructor(e){super(Ko,"agent",!0);this.name=e.name?e.name.trim():"";this.common=new XFAObjectArray}}class AlwaysEmbed extends ContentObject{constructor(e){super(Ko,"alwaysEmbed")}}class Amd extends StringObject{constructor(e){super(Ko,"amd")}}class config_Area extends XFAObject{constructor(e){super(Ko,"area");this.level=getInteger({data:e.level,defaultValue:0,validate:e=>e>=1&&e<=3});this.name=getStringOption(e.name,["","barcode","coreinit","deviceDriver","font","general","layout","merge","script","signature","sourceSet","templateCache"])}}class Attributes extends OptionObject{constructor(e){super(Ko,"attributes",["preserve","delegate","ignore"])}}class AutoSave extends OptionObject{constructor(e){super(Ko,"autoSave",["disabled","enabled"])}}class Base extends StringObject{constructor(e){super(Ko,"base")}}class BatchOutput extends XFAObject{constructor(e){super(Ko,"batchOutput");this.format=getStringOption(e.format,["none","concat","zip","zipCompress"])}}class BehaviorOverride extends ContentObject{constructor(e){super(Ko,"behaviorOverride")}[ni](){this[Qs]=new Map(this[Qs].trim().split(/\s+/).filter(e=>e.includes(":")).map(e=>e.split(":",2)))}}class Cache extends XFAObject{constructor(e){super(Ko,"cache",!0);this.templateCache=null}}class Change extends Option01{constructor(e){super(Ko,"change")}}class Common extends XFAObject{constructor(e){super(Ko,"common",!0);this.data=null;this.locale=null;this.localeSet=null;this.messaging=null;this.suppressBanner=null;this.template=null;this.validationMessaging=null;this.versionControl=null;this.log=new XFAObjectArray}}class Compress extends XFAObject{constructor(e){super(Ko,"compress");this.scope=getStringOption(e.scope,["imageOnly","document"])}}class CompressLogicalStructure extends Option01{constructor(e){super(Ko,"compressLogicalStructure")}}class CompressObjectStream extends Option10{constructor(e){super(Ko,"compressObjectStream")}}class Compression extends XFAObject{constructor(e){super(Ko,"compression",!0);this.compressLogicalStructure=null;this.compressObjectStream=null;this.level=null;this.type=null}}class Config extends XFAObject{constructor(e){super(Ko,"config",!0);this.acrobat=null;this.present=null;this.trace=null;this.agent=new XFAObjectArray}}class Conformance extends OptionObject{constructor(e){super(Ko,"conformance",["A","B"])}}class ContentCopy extends Option01{constructor(e){super(Ko,"contentCopy")}}class Copies extends IntegerObject{constructor(e){super(Ko,"copies",1,e=>e>=1)}}class Creator extends StringObject{constructor(e){super(Ko,"creator")}}class CurrentPage extends IntegerObject{constructor(e){super(Ko,"currentPage",0,e=>e>=0)}}class Data extends XFAObject{constructor(e){super(Ko,"data",!0);this.adjustData=null;this.attributes=null;this.incrementalLoad=null;this.outputXSL=null;this.range=null;this.record=null;this.startNode=null;this.uri=null;this.window=null;this.xsl=null;this.excludeNS=new XFAObjectArray;this.transform=new XFAObjectArray}}class Debug extends XFAObject{constructor(e){super(Ko,"debug",!0);this.uri=null}}class DefaultTypeface extends ContentObject{constructor(e){super(Ko,"defaultTypeface");this.writingScript=getStringOption(e.writingScript,["*","Arabic","Cyrillic","EastEuropeanRoman","Greek","Hebrew","Japanese","Korean","Roman","SimplifiedChinese","Thai","TraditionalChinese","Vietnamese"])}}class Destination extends OptionObject{constructor(e){super(Ko,"destination",["pdf","pcl","ps","webClient","zpl"])}}class DocumentAssembly extends Option01{constructor(e){super(Ko,"documentAssembly")}}class Driver extends XFAObject{constructor(e){super(Ko,"driver",!0);this.name=e.name?e.name.trim():"";this.fontInfo=null;this.xdc=null}}class DuplexOption extends OptionObject{constructor(e){super(Ko,"duplexOption",["simplex","duplexFlipLongEdge","duplexFlipShortEdge"])}}class DynamicRender extends OptionObject{constructor(e){super(Ko,"dynamicRender",["forbidden","required"])}}class Embed extends Option01{constructor(e){super(Ko,"embed")}}class config_Encrypt extends Option01{constructor(e){super(Ko,"encrypt")}}class config_Encryption extends XFAObject{constructor(e){super(Ko,"encryption",!0);this.encrypt=null;this.encryptionLevel=null;this.permissions=null}}class EncryptionLevel extends OptionObject{constructor(e){super(Ko,"encryptionLevel",["40bit","128bit"])}}class Enforce extends StringObject{constructor(e){super(Ko,"enforce")}}class Equate extends XFAObject{constructor(e){super(Ko,"equate");this.force=getInteger({data:e.force,defaultValue:1,validate:e=>0===e});this.from=e.from||"";this.to=e.to||""}}class EquateRange extends XFAObject{constructor(e){super(Ko,"equateRange");this.from=e.from||"";this.to=e.to||"";this._unicodeRange=e.unicodeRange||""}get unicodeRange(){const e=[],t=/U\+([0-9a-fA-F]+)/,n=this._unicodeRange;for(let a of n.split(",").map(e=>e.trim()).filter(e=>!!e)){a=a.split("-",2).map(e=>{const n=e.match(t);return n?parseInt(n[1],16):0});1===a.length&&a.push(a[0]);e.push(a)}return shadow(this,"unicodeRange",e)}}class Exclude extends ContentObject{constructor(e){super(Ko,"exclude")}[ni](){this[Qs]=this[Qs].trim().split(/\s+/).filter(e=>e&&["calculate","close","enter","exit","initialize","ready","validate"].includes(e))}}class ExcludeNS extends StringObject{constructor(e){super(Ko,"excludeNS")}}class FlipLabel extends OptionObject{constructor(e){super(Ko,"flipLabel",["usePrinterSetting","on","off"])}}class config_FontInfo extends XFAObject{constructor(e){super(Ko,"fontInfo",!0);this.embed=null;this.map=null;this.subsetBelow=null;this.alwaysEmbed=new XFAObjectArray;this.defaultTypeface=new XFAObjectArray;this.neverEmbed=new XFAObjectArray}}class FormFieldFilling extends Option01{constructor(e){super(Ko,"formFieldFilling")}}class GroupParent extends StringObject{constructor(e){super(Ko,"groupParent")}}class IfEmpty extends OptionObject{constructor(e){super(Ko,"ifEmpty",["dataValue","dataGroup","ignore","remove"])}}class IncludeXDPContent extends StringObject{constructor(e){super(Ko,"includeXDPContent")}}class IncrementalLoad extends OptionObject{constructor(e){super(Ko,"incrementalLoad",["none","forwardOnly"])}}class IncrementalMerge extends Option01{constructor(e){super(Ko,"incrementalMerge")}}class Interactive extends Option01{constructor(e){super(Ko,"interactive")}}class Jog extends OptionObject{constructor(e){super(Ko,"jog",["usePrinterSetting","none","pageSet"])}}class LabelPrinter extends XFAObject{constructor(e){super(Ko,"labelPrinter",!0);this.name=getStringOption(e.name,["zpl","dpl","ipl","tcpl"]);this.batchOutput=null;this.flipLabel=null;this.fontInfo=null;this.xdc=null}}class Layout extends OptionObject{constructor(e){super(Ko,"layout",["paginate","panel"])}}class Level extends IntegerObject{constructor(e){super(Ko,"level",0,e=>e>0)}}class Linearized extends Option01{constructor(e){super(Ko,"linearized")}}class Locale extends StringObject{constructor(e){super(Ko,"locale")}}class LocaleSet extends StringObject{constructor(e){super(Ko,"localeSet")}}class Log extends XFAObject{constructor(e){super(Ko,"log",!0);this.mode=null;this.threshold=null;this.to=null;this.uri=null}}class MapElement extends XFAObject{constructor(e){super(Ko,"map",!0);this.equate=new XFAObjectArray;this.equateRange=new XFAObjectArray}}class MediumInfo extends XFAObject{constructor(e){super(Ko,"mediumInfo",!0);this.map=null}}class config_Message extends XFAObject{constructor(e){super(Ko,"message",!0);this.msgId=null;this.severity=null}}class Messaging extends XFAObject{constructor(e){super(Ko,"messaging",!0);this.message=new XFAObjectArray}}class Mode extends OptionObject{constructor(e){super(Ko,"mode",["append","overwrite"])}}class ModifyAnnots extends Option01{constructor(e){super(Ko,"modifyAnnots")}}class MsgId extends IntegerObject{constructor(e){super(Ko,"msgId",1,e=>e>=1)}}class NameAttr extends StringObject{constructor(e){super(Ko,"nameAttr")}}class NeverEmbed extends ContentObject{constructor(e){super(Ko,"neverEmbed")}}class NumberOfCopies extends IntegerObject{constructor(e){super(Ko,"numberOfCopies",null,e=>e>=2&&e<=5)}}class OpenAction extends XFAObject{constructor(e){super(Ko,"openAction",!0);this.destination=null}}class Output extends XFAObject{constructor(e){super(Ko,"output",!0);this.to=null;this.type=null;this.uri=null}}class OutputBin extends StringObject{constructor(e){super(Ko,"outputBin")}}class OutputXSL extends XFAObject{constructor(e){super(Ko,"outputXSL",!0);this.uri=null}}class Overprint extends OptionObject{constructor(e){super(Ko,"overprint",["none","both","draw","field"])}}class Packets extends StringObject{constructor(e){super(Ko,"packets")}[ni](){"*"!==this[Qs]&&(this[Qs]=this[Qs].trim().split(/\s+/).filter(e=>["config","datasets","template","xfdf","xslt"].includes(e)))}}class PageOffset extends XFAObject{constructor(e){super(Ko,"pageOffset");this.x=getInteger({data:e.x,defaultValue:"useXDCSetting",validate:e=>!0});this.y=getInteger({data:e.y,defaultValue:"useXDCSetting",validate:e=>!0})}}class PageRange extends StringObject{constructor(e){super(Ko,"pageRange")}[ni](){const e=this[Qs].trim().split(/\s+/).map(e=>parseInt(e,10)),t=[];for(let n=0,a=e.length;n<a;n+=2)t.push(e.slice(n,n+2));this[Qs]=t}}class Pagination extends OptionObject{constructor(e){super(Ko,"pagination",["simplex","duplexShortEdge","duplexLongEdge"])}}class PaginationOverride extends OptionObject{constructor(e){super(Ko,"paginationOverride",["none","forceDuplex","forceDuplexLongEdge","forceDuplexShortEdge","forceSimplex"])}}class Part extends IntegerObject{constructor(e){super(Ko,"part",1,e=>!1)}}class Pcl extends XFAObject{constructor(e){super(Ko,"pcl",!0);this.name=e.name||"";this.batchOutput=null;this.fontInfo=null;this.jog=null;this.mediumInfo=null;this.outputBin=null;this.pageOffset=null;this.staple=null;this.xdc=null}}class Pdf extends XFAObject{constructor(e){super(Ko,"pdf",!0);this.name=e.name||"";this.adobeExtensionLevel=null;this.batchOutput=null;this.compression=null;this.creator=null;this.encryption=null;this.fontInfo=null;this.interactive=null;this.linearized=null;this.openAction=null;this.pdfa=null;this.producer=null;this.renderPolicy=null;this.scriptModel=null;this.silentPrint=null;this.submitFormat=null;this.tagged=null;this.version=null;this.viewerPreferences=null;this.xdc=null}}class Pdfa extends XFAObject{constructor(e){super(Ko,"pdfa",!0);this.amd=null;this.conformance=null;this.includeXDPContent=null;this.part=null}}class Permissions extends XFAObject{constructor(e){super(Ko,"permissions",!0);this.accessibleContent=null;this.change=null;this.contentCopy=null;this.documentAssembly=null;this.formFieldFilling=null;this.modifyAnnots=null;this.plaintextMetadata=null;this.print=null;this.printHighQuality=null}}class PickTrayByPDFSize extends Option01{constructor(e){super(Ko,"pickTrayByPDFSize")}}class config_Picture extends StringObject{constructor(e){super(Ko,"picture")}}class PlaintextMetadata extends Option01{constructor(e){super(Ko,"plaintextMetadata")}}class Presence extends OptionObject{constructor(e){super(Ko,"presence",["preserve","dissolve","dissolveStructure","ignore","remove"])}}class Present extends XFAObject{constructor(e){super(Ko,"present",!0);this.behaviorOverride=null;this.cache=null;this.common=null;this.copies=null;this.destination=null;this.incrementalMerge=null;this.layout=null;this.output=null;this.overprint=null;this.pagination=null;this.paginationOverride=null;this.script=null;this.validate=null;this.xdp=null;this.driver=new XFAObjectArray;this.labelPrinter=new XFAObjectArray;this.pcl=new XFAObjectArray;this.pdf=new XFAObjectArray;this.ps=new XFAObjectArray;this.submitUrl=new XFAObjectArray;this.webClient=new XFAObjectArray;this.zpl=new XFAObjectArray}}class Print extends Option01{constructor(e){super(Ko,"print")}}class PrintHighQuality extends Option01{constructor(e){super(Ko,"printHighQuality")}}class PrintScaling extends OptionObject{constructor(e){super(Ko,"printScaling",["appdefault","noScaling"])}}class PrinterName extends StringObject{constructor(e){super(Ko,"printerName")}}class Producer extends StringObject{constructor(e){super(Ko,"producer")}}class Ps extends XFAObject{constructor(e){super(Ko,"ps",!0);this.name=e.name||"";this.batchOutput=null;this.fontInfo=null;this.jog=null;this.mediumInfo=null;this.outputBin=null;this.staple=null;this.xdc=null}}class Range extends ContentObject{constructor(e){super(Ko,"range")}[ni](){this[Qs]=this[Qs].split(",",2).map(e=>e.split("-").map(e=>parseInt(e.trim(),10))).filter(e=>e.every(e=>!isNaN(e))).map(e=>{1===e.length&&e.push(e[0]);return e})}}class Record extends ContentObject{constructor(e){super(Ko,"record")}[ni](){this[Qs]=this[Qs].trim();const e=parseInt(this[Qs],10);!isNaN(e)&&e>=0&&(this[Qs]=e)}}class Relevant extends ContentObject{constructor(e){super(Ko,"relevant")}[ni](){this[Qs]=this[Qs].trim().split(/\s+/)}}class Rename extends ContentObject{constructor(e){super(Ko,"rename")}[ni](){this[Qs]=this[Qs].trim();(this[Qs].toLowerCase().startsWith("xml")||new RegExp("[\\p{L}_][\\p{L}\\d._\\p{M}-]*","u").test(this[Qs]))&&warn("XFA - Rename: invalid XFA name")}}class RenderPolicy extends OptionObject{constructor(e){super(Ko,"renderPolicy",["server","client"])}}class RunScripts extends OptionObject{constructor(e){super(Ko,"runScripts",["both","client","none","server"])}}class config_Script extends XFAObject{constructor(e){super(Ko,"script",!0);this.currentPage=null;this.exclude=null;this.runScripts=null}}class ScriptModel extends OptionObject{constructor(e){super(Ko,"scriptModel",["XFA","none"])}}class Severity extends OptionObject{constructor(e){super(Ko,"severity",["ignore","error","information","trace","warning"])}}class SilentPrint extends XFAObject{constructor(e){super(Ko,"silentPrint",!0);this.addSilentPrint=null;this.printerName=null}}class Staple extends XFAObject{constructor(e){super(Ko,"staple");this.mode=getStringOption(e.mode,["usePrinterSetting","on","off"])}}class StartNode extends StringObject{constructor(e){super(Ko,"startNode")}}class StartPage extends IntegerObject{constructor(e){super(Ko,"startPage",0,e=>!0)}}class SubmitFormat extends OptionObject{constructor(e){super(Ko,"submitFormat",["html","delegate","fdf","xml","pdf"])}}class SubmitUrl extends StringObject{constructor(e){super(Ko,"submitUrl")}}class SubsetBelow extends IntegerObject{constructor(e){super(Ko,"subsetBelow",100,e=>e>=0&&e<=100)}}class SuppressBanner extends Option01{constructor(e){super(Ko,"suppressBanner")}}class Tagged extends Option01{constructor(e){super(Ko,"tagged")}}class config_Template extends XFAObject{constructor(e){super(Ko,"template",!0);this.base=null;this.relevant=null;this.startPage=null;this.uri=null;this.xsl=null}}class Threshold extends OptionObject{constructor(e){super(Ko,"threshold",["trace","error","information","warning"])}}class To extends OptionObject{constructor(e){super(Ko,"to",["null","memory","stderr","stdout","system","uri"])}}class TemplateCache extends XFAObject{constructor(e){super(Ko,"templateCache");this.maxEntries=getInteger({data:e.maxEntries,defaultValue:5,validate:e=>e>=0})}}class Trace extends XFAObject{constructor(e){super(Ko,"trace",!0);this.area=new XFAObjectArray}}class Transform extends XFAObject{constructor(e){super(Ko,"transform",!0);this.groupParent=null;this.ifEmpty=null;this.nameAttr=null;this.picture=null;this.presence=null;this.rename=null;this.whitespace=null}}class Type extends OptionObject{constructor(e){super(Ko,"type",["none","ascii85","asciiHex","ccittfax","flate","lzw","runLength","native","xdp","mergedXDP"])}}class Uri extends StringObject{constructor(e){super(Ko,"uri")}}class config_Validate extends OptionObject{constructor(e){super(Ko,"validate",["preSubmit","prePrint","preExecute","preSave"])}}class ValidateApprovalSignatures extends ContentObject{constructor(e){super(Ko,"validateApprovalSignatures")}[ni](){this[Qs]=this[Qs].trim().split(/\s+/).filter(e=>["docReady","postSign"].includes(e))}}class ValidationMessaging extends OptionObject{constructor(e){super(Ko,"validationMessaging",["allMessagesIndividually","allMessagesTogether","firstMessageOnly","noMessages"])}}class Version extends OptionObject{constructor(e){super(Ko,"version",["1.7","1.6","1.5","1.4","1.3","1.2"])}}class VersionControl extends XFAObject{constructor(e){super(Ko,"VersionControl");this.outputBelow=getStringOption(e.outputBelow,["warn","error","update"]);this.sourceAbove=getStringOption(e.sourceAbove,["warn","error"]);this.sourceBelow=getStringOption(e.sourceBelow,["update","maintain"])}}class ViewerPreferences extends XFAObject{constructor(e){super(Ko,"viewerPreferences",!0);this.ADBE_JSConsole=null;this.ADBE_JSDebugger=null;this.addViewerPreferences=null;this.duplexOption=null;this.enforce=null;this.numberOfCopies=null;this.pageRange=null;this.pickTrayByPDFSize=null;this.printScaling=null}}class WebClient extends XFAObject{constructor(e){super(Ko,"webClient",!0);this.name=e.name?e.name.trim():"";this.fontInfo=null;this.xdc=null}}class Whitespace extends OptionObject{constructor(e){super(Ko,"whitespace",["preserve","ltrim","normalize","rtrim","trim"])}}class Window extends ContentObject{constructor(e){super(Ko,"window")}[ni](){const e=this[Qs].split(",",2).map(e=>parseInt(e.trim(),10));if(e.some(e=>isNaN(e)))this[Qs]=[0,0];else{1===e.length&&e.push(e[0]);this[Qs]=e}}}class Xdc extends XFAObject{constructor(e){super(Ko,"xdc",!0);this.uri=new XFAObjectArray;this.xsl=new XFAObjectArray}}class Xdp extends XFAObject{constructor(e){super(Ko,"xdp",!0);this.packets=null}}class Xsl extends XFAObject{constructor(e){super(Ko,"xsl",!0);this.debug=null;this.uri=null}}class Zpl extends XFAObject{constructor(e){super(Ko,"zpl",!0);this.name=e.name?e.name.trim():"";this.batchOutput=null;this.flipLabel=null;this.fontInfo=null;this.xdc=null}}class ConfigNamespace{static[so](e,t){if(ConfigNamespace.hasOwnProperty(e))return ConfigNamespace[e](t)}static acrobat(e){return new Acrobat(e)}static acrobat7(e){return new Acrobat7(e)}static ADBE_JSConsole(e){return new ADBE_JSConsole(e)}static ADBE_JSDebugger(e){return new ADBE_JSDebugger(e)}static addSilentPrint(e){return new AddSilentPrint(e)}static addViewerPreferences(e){return new AddViewerPreferences(e)}static adjustData(e){return new AdjustData(e)}static adobeExtensionLevel(e){return new AdobeExtensionLevel(e)}static agent(e){return new Agent(e)}static alwaysEmbed(e){return new AlwaysEmbed(e)}static amd(e){return new Amd(e)}static area(e){return new config_Area(e)}static attributes(e){return new Attributes(e)}static autoSave(e){return new AutoSave(e)}static base(e){return new Base(e)}static batchOutput(e){return new BatchOutput(e)}static behaviorOverride(e){return new BehaviorOverride(e)}static cache(e){return new Cache(e)}static change(e){return new Change(e)}static common(e){return new Common(e)}static compress(e){return new Compress(e)}static compressLogicalStructure(e){return new CompressLogicalStructure(e)}static compressObjectStream(e){return new CompressObjectStream(e)}static compression(e){return new Compression(e)}static config(e){return new Config(e)}static conformance(e){return new Conformance(e)}static contentCopy(e){return new ContentCopy(e)}static copies(e){return new Copies(e)}static creator(e){return new Creator(e)}static currentPage(e){return new CurrentPage(e)}static data(e){return new Data(e)}static debug(e){return new Debug(e)}static defaultTypeface(e){return new DefaultTypeface(e)}static destination(e){return new Destination(e)}static documentAssembly(e){return new DocumentAssembly(e)}static driver(e){return new Driver(e)}static duplexOption(e){return new DuplexOption(e)}static dynamicRender(e){return new DynamicRender(e)}static embed(e){return new Embed(e)}static encrypt(e){return new config_Encrypt(e)}static encryption(e){return new config_Encryption(e)}static encryptionLevel(e){return new EncryptionLevel(e)}static enforce(e){return new Enforce(e)}static equate(e){return new Equate(e)}static equateRange(e){return new EquateRange(e)}static exclude(e){return new Exclude(e)}static excludeNS(e){return new ExcludeNS(e)}static flipLabel(e){return new FlipLabel(e)}static fontInfo(e){return new config_FontInfo(e)}static formFieldFilling(e){return new FormFieldFilling(e)}static groupParent(e){return new GroupParent(e)}static ifEmpty(e){return new IfEmpty(e)}static includeXDPContent(e){return new IncludeXDPContent(e)}static incrementalLoad(e){return new IncrementalLoad(e)}static incrementalMerge(e){return new IncrementalMerge(e)}static interactive(e){return new Interactive(e)}static jog(e){return new Jog(e)}static labelPrinter(e){return new LabelPrinter(e)}static layout(e){return new Layout(e)}static level(e){return new Level(e)}static linearized(e){return new Linearized(e)}static locale(e){return new Locale(e)}static localeSet(e){return new LocaleSet(e)}static log(e){return new Log(e)}static map(e){return new MapElement(e)}static mediumInfo(e){return new MediumInfo(e)}static message(e){return new config_Message(e)}static messaging(e){return new Messaging(e)}static mode(e){return new Mode(e)}static modifyAnnots(e){return new ModifyAnnots(e)}static msgId(e){return new MsgId(e)}static nameAttr(e){return new NameAttr(e)}static neverEmbed(e){return new NeverEmbed(e)}static numberOfCopies(e){return new NumberOfCopies(e)}static openAction(e){return new OpenAction(e)}static output(e){return new Output(e)}static outputBin(e){return new OutputBin(e)}static outputXSL(e){return new OutputXSL(e)}static overprint(e){return new Overprint(e)}static packets(e){return new Packets(e)}static pageOffset(e){return new PageOffset(e)}static pageRange(e){return new PageRange(e)}static pagination(e){return new Pagination(e)}static paginationOverride(e){return new PaginationOverride(e)}static part(e){return new Part(e)}static pcl(e){return new Pcl(e)}static pdf(e){return new Pdf(e)}static pdfa(e){return new Pdfa(e)}static permissions(e){return new Permissions(e)}static pickTrayByPDFSize(e){return new PickTrayByPDFSize(e)}static picture(e){return new config_Picture(e)}static plaintextMetadata(e){return new PlaintextMetadata(e)}static presence(e){return new Presence(e)}static present(e){return new Present(e)}static print(e){return new Print(e)}static printHighQuality(e){return new PrintHighQuality(e)}static printScaling(e){return new PrintScaling(e)}static printerName(e){return new PrinterName(e)}static producer(e){return new Producer(e)}static ps(e){return new Ps(e)}static range(e){return new Range(e)}static record(e){return new Record(e)}static relevant(e){return new Relevant(e)}static rename(e){return new Rename(e)}static renderPolicy(e){return new RenderPolicy(e)}static runScripts(e){return new RunScripts(e)}static script(e){return new config_Script(e)}static scriptModel(e){return new ScriptModel(e)}static severity(e){return new Severity(e)}static silentPrint(e){return new SilentPrint(e)}static staple(e){return new Staple(e)}static startNode(e){return new StartNode(e)}static startPage(e){return new StartPage(e)}static submitFormat(e){return new SubmitFormat(e)}static submitUrl(e){return new SubmitUrl(e)}static subsetBelow(e){return new SubsetBelow(e)}static suppressBanner(e){return new SuppressBanner(e)}static tagged(e){return new Tagged(e)}static template(e){return new config_Template(e)}static templateCache(e){return new TemplateCache(e)}static threshold(e){return new Threshold(e)}static to(e){return new To(e)}static trace(e){return new Trace(e)}static transform(e){return new Transform(e)}static type(e){return new Type(e)}static uri(e){return new Uri(e)}static validate(e){return new config_Validate(e)}static validateApprovalSignatures(e){return new ValidateApprovalSignatures(e)}static validationMessaging(e){return new ValidationMessaging(e)}static version(e){return new Version(e)}static versionControl(e){return new VersionControl(e)}static viewerPreferences(e){return new ViewerPreferences(e)}static webClient(e){return new WebClient(e)}static whitespace(e){return new Whitespace(e)}static window(e){return new Window(e)}static xdc(e){return new Xdc(e)}static xdp(e){return new Xdp(e)}static xsl(e){return new Xsl(e)}static zpl(e){return new Zpl(e)}}const Vo=io.connectionSet.id;class ConnectionSet extends XFAObject{constructor(e){super(Vo,"connectionSet",!0);this.wsdlConnection=new XFAObjectArray;this.xmlConnection=new XFAObjectArray;this.xsdConnection=new XFAObjectArray}}class EffectiveInputPolicy extends XFAObject{constructor(e){super(Vo,"effectiveInputPolicy");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class EffectiveOutputPolicy extends XFAObject{constructor(e){super(Vo,"effectiveOutputPolicy");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Operation extends StringObject{constructor(e){super(Vo,"operation");this.id=e.id||"";this.input=e.input||"";this.name=e.name||"";this.output=e.output||"";this.use=e.use||"";this.usehref=e.usehref||""}}class RootElement extends StringObject{constructor(e){super(Vo,"rootElement");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class SoapAction extends StringObject{constructor(e){super(Vo,"soapAction");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class SoapAddress extends StringObject{constructor(e){super(Vo,"soapAddress");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class connection_set_Uri extends StringObject{constructor(e){super(Vo,"uri");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class WsdlAddress extends StringObject{constructor(e){super(Vo,"wsdlAddress");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class WsdlConnection extends XFAObject{constructor(e){super(Vo,"wsdlConnection",!0);this.dataDescription=e.dataDescription||"";this.name=e.name||"";this.effectiveInputPolicy=null;this.effectiveOutputPolicy=null;this.operation=null;this.soapAction=null;this.soapAddress=null;this.wsdlAddress=null}}class XmlConnection extends XFAObject{constructor(e){super(Vo,"xmlConnection",!0);this.dataDescription=e.dataDescription||"";this.name=e.name||"";this.uri=null}}class XsdConnection extends XFAObject{constructor(e){super(Vo,"xsdConnection",!0);this.dataDescription=e.dataDescription||"";this.name=e.name||"";this.rootElement=null;this.uri=null}}class ConnectionSetNamespace{static[so](e,t){if(ConnectionSetNamespace.hasOwnProperty(e))return ConnectionSetNamespace[e](t)}static connectionSet(e){return new ConnectionSet(e)}static effectiveInputPolicy(e){return new EffectiveInputPolicy(e)}static effectiveOutputPolicy(e){return new EffectiveOutputPolicy(e)}static operation(e){return new Operation(e)}static rootElement(e){return new RootElement(e)}static soapAction(e){return new SoapAction(e)}static soapAddress(e){return new SoapAddress(e)}static uri(e){return new connection_set_Uri(e)}static wsdlAddress(e){return new WsdlAddress(e)}static wsdlConnection(e){return new WsdlConnection(e)}static xmlConnection(e){return new XmlConnection(e)}static xsdConnection(e){return new XsdConnection(e)}}const Go=io.datasets.id;class datasets_Data extends XmlObject{constructor(e){super(Go,"data",e)}[Ii](){return!0}}class Datasets extends XFAObject{constructor(e){super(Go,"datasets",!0);this.data=null;this.Signature=null}[Pi](e){const t=e[Di];("data"===t&&e[Hi]===Go||"Signature"===t&&e[Hi]===io.signature.id)&&(this[t]=e);this[Ws](e)}}class DatasetsNamespace{static[so](e,t){if(DatasetsNamespace.hasOwnProperty(e))return DatasetsNamespace[e](t)}static datasets(e){return new Datasets(e)}static data(e){return new datasets_Data(e)}}const $o=io.localeSet.id;class CalendarSymbols extends XFAObject{constructor(e){super($o,"calendarSymbols",!0);this.name="gregorian";this.dayNames=new XFAObjectArray(2);this.eraNames=null;this.meridiemNames=null;this.monthNames=new XFAObjectArray(2)}}class CurrencySymbol extends StringObject{constructor(e){super($o,"currencySymbol");this.name=getStringOption(e.name,["symbol","isoname","decimal"])}}class CurrencySymbols extends XFAObject{constructor(e){super($o,"currencySymbols",!0);this.currencySymbol=new XFAObjectArray(3)}}class DatePattern extends StringObject{constructor(e){super($o,"datePattern");this.name=getStringOption(e.name,["full","long","med","short"])}}class DatePatterns extends XFAObject{constructor(e){super($o,"datePatterns",!0);this.datePattern=new XFAObjectArray(4)}}class DateTimeSymbols extends ContentObject{constructor(e){super($o,"dateTimeSymbols")}}class Day extends StringObject{constructor(e){super($o,"day")}}class DayNames extends XFAObject{constructor(e){super($o,"dayNames",!0);this.abbr=getInteger({data:e.abbr,defaultValue:0,validate:e=>1===e});this.day=new XFAObjectArray(7)}}class Era extends StringObject{constructor(e){super($o,"era")}}class EraNames extends XFAObject{constructor(e){super($o,"eraNames",!0);this.era=new XFAObjectArray(2)}}class locale_set_Locale extends XFAObject{constructor(e){super($o,"locale",!0);this.desc=e.desc||"";this.name="isoname";this.calendarSymbols=null;this.currencySymbols=null;this.datePatterns=null;this.dateTimeSymbols=null;this.numberPatterns=null;this.numberSymbols=null;this.timePatterns=null;this.typeFaces=null}}class locale_set_LocaleSet extends XFAObject{constructor(e){super($o,"localeSet",!0);this.locale=new XFAObjectArray}}class Meridiem extends StringObject{constructor(e){super($o,"meridiem")}}class MeridiemNames extends XFAObject{constructor(e){super($o,"meridiemNames",!0);this.meridiem=new XFAObjectArray(2)}}class Month extends StringObject{constructor(e){super($o,"month")}}class MonthNames extends XFAObject{constructor(e){super($o,"monthNames",!0);this.abbr=getInteger({data:e.abbr,defaultValue:0,validate:e=>1===e});this.month=new XFAObjectArray(12)}}class NumberPattern extends StringObject{constructor(e){super($o,"numberPattern");this.name=getStringOption(e.name,["full","long","med","short"])}}class NumberPatterns extends XFAObject{constructor(e){super($o,"numberPatterns",!0);this.numberPattern=new XFAObjectArray(4)}}class NumberSymbol extends StringObject{constructor(e){super($o,"numberSymbol");this.name=getStringOption(e.name,["decimal","grouping","percent","minus","zero"])}}class NumberSymbols extends XFAObject{constructor(e){super($o,"numberSymbols",!0);this.numberSymbol=new XFAObjectArray(5)}}class TimePattern extends StringObject{constructor(e){super($o,"timePattern");this.name=getStringOption(e.name,["full","long","med","short"])}}class TimePatterns extends XFAObject{constructor(e){super($o,"timePatterns",!0);this.timePattern=new XFAObjectArray(4)}}class TypeFace extends XFAObject{constructor(e){super($o,"typeFace",!0);this.name=""|e.name}}class TypeFaces extends XFAObject{constructor(e){super($o,"typeFaces",!0);this.typeFace=new XFAObjectArray}}class LocaleSetNamespace{static[so](e,t){if(LocaleSetNamespace.hasOwnProperty(e))return LocaleSetNamespace[e](t)}static calendarSymbols(e){return new CalendarSymbols(e)}static currencySymbol(e){return new CurrencySymbol(e)}static currencySymbols(e){return new CurrencySymbols(e)}static datePattern(e){return new DatePattern(e)}static datePatterns(e){return new DatePatterns(e)}static dateTimeSymbols(e){return new DateTimeSymbols(e)}static day(e){return new Day(e)}static dayNames(e){return new DayNames(e)}static era(e){return new Era(e)}static eraNames(e){return new EraNames(e)}static locale(e){return new locale_set_Locale(e)}static localeSet(e){return new locale_set_LocaleSet(e)}static meridiem(e){return new Meridiem(e)}static meridiemNames(e){return new MeridiemNames(e)}static month(e){return new Month(e)}static monthNames(e){return new MonthNames(e)}static numberPattern(e){return new NumberPattern(e)}static numberPatterns(e){return new NumberPatterns(e)}static numberSymbol(e){return new NumberSymbol(e)}static numberSymbols(e){return new NumberSymbols(e)}static timePattern(e){return new TimePattern(e)}static timePatterns(e){return new TimePatterns(e)}static typeFace(e){return new TypeFace(e)}static typeFaces(e){return new TypeFaces(e)}}const Yo=io.signature.id;class signature_Signature extends XFAObject{constructor(e){super(Yo,"signature",!0)}}class SignatureNamespace{static[so](e,t){if(SignatureNamespace.hasOwnProperty(e))return SignatureNamespace[e](t)}static signature(e){return new signature_Signature(e)}}const Jo=io.stylesheet.id;class Stylesheet extends XFAObject{constructor(e){super(Jo,"stylesheet",!0)}}class StylesheetNamespace{static[so](e,t){if(StylesheetNamespace.hasOwnProperty(e))return StylesheetNamespace[e](t)}static stylesheet(e){return new Stylesheet(e)}}const Qo=io.xdp.id;class xdp_Xdp extends XFAObject{constructor(e){super(Qo,"xdp",!0);this.uuid=e.uuid||"";this.timeStamp=e.timeStamp||"";this.config=null;this.connectionSet=null;this.datasets=null;this.localeSet=null;this.stylesheet=new XFAObjectArray;this.template=null}[Ei](e){const t=io[e[Di]];return t&&e[Hi]===t.id}}class XdpNamespace{static[so](e,t){if(XdpNamespace.hasOwnProperty(e))return XdpNamespace[e](t)}static xdp(e){return new xdp_Xdp(e)}}const Zo=io.xhtml.id,el=Symbol(),tl=new Set(["color","font","font-family","font-size","font-stretch","font-style","font-weight","margin","margin-bottom","margin-left","margin-right","margin-top","letter-spacing","line-height","orphans","page-break-after","page-break-before","page-break-inside","tab-interval","tab-stop","text-align","text-decoration","text-indent","vertical-align","widows","kerning-mode","xfa-font-horizontal-scale","xfa-font-vertical-scale","xfa-spacerun","xfa-tab-stops"]),nl=new Map([["page-break-after","breakAfter"],["page-break-before","breakBefore"],["page-break-inside","breakInside"],["kerning-mode",e=>"none"===e?"none":"normal"],["xfa-font-horizontal-scale",e=>`scaleX(${Math.max(0,parseInt(e)/100).toFixed(2)})`],["xfa-font-vertical-scale",e=>`scaleY(${Math.max(0,parseInt(e)/100).toFixed(2)})`],["xfa-spacerun",""],["xfa-tab-stops",""],["font-size",(e,t)=>measureToString(.99*(e=t.fontSize=Math.abs(getMeasurement(e))))],["letter-spacing",e=>measureToString(getMeasurement(e))],["line-height",e=>measureToString(getMeasurement(e))],["margin",e=>measureToString(getMeasurement(e))],["margin-bottom",e=>measureToString(getMeasurement(e))],["margin-left",e=>measureToString(getMeasurement(e))],["margin-right",e=>measureToString(getMeasurement(e))],["margin-top",e=>measureToString(getMeasurement(e))],["text-indent",e=>measureToString(getMeasurement(e))],["font-family",e=>e],["vertical-align",e=>measureToString(getMeasurement(e))]]),al=/\s+/g,rl=/[\r\n]+/g,sl=/\r\n?/g;function mapStyle(e,t,n){const a=Object.create(null);if(!e)return a;const r=Object.create(null);for(const[t,n]of e.split(";").map(e=>e.split(":",2))){const e=nl.get(t);if(""===e)continue;let s=n;e&&(s="string"==typeof e?e:e(n,r));t.endsWith("scale")?a.transform=a.transform?`${a[t]} ${s}`:s:a[t.replaceAll(/-([a-zA-Z])/g,(e,t)=>t.toUpperCase())]=s}a.fontFamily&&setFontFamily({typeface:a.fontFamily,weight:a.fontWeight||"normal",posture:a.fontStyle||"normal",size:r.fontSize||0},t,t[ji].fontFinder,a);if(n&&a.verticalAlign&&"0px"!==a.verticalAlign&&a.fontSize){const e=.583,t=.333,n=getMeasurement(a.fontSize);a.fontSize=measureToString(n*e);a.verticalAlign=measureToString(Math.sign(getMeasurement(a.verticalAlign))*n*t)}n&&a.fontSize&&(a.fontSize=`calc(${a.fontSize} * var(--total-scale-factor))`);fixTextIndent(a);return a}const il=new Set(["body","html"]);class XhtmlObject extends XmlObject{constructor(e,t){super(Zo,t);this[el]=!1;this.style=e.style||""}[Vs](e){super[Vs](e);this.style=function checkStyle(e){return e.style?e.style.split(";").filter(e=>!!e.trim()).map(e=>e.split(":",2).map(e=>e.trim())).filter(([t,n])=>{"font-family"===t&&e[ji].usedTypefaces.add(n);return tl.has(t)}).map(e=>e.join(":")).join(";"):""}(this)}[Us](){return!il.has(this[Di])}[Ni](e,t=!1){if(t)this[el]=!0;else{e=e.replaceAll(rl,"");this.style.includes("xfa-spacerun:yes")||(e=e.replaceAll(al," "))}e&&(this[Qs]+=e)}[zi](e,t=!0){const n=Object.create(null),a={top:NaN,bottom:NaN,left:NaN,right:NaN};let r=null;for(const[e,t]of this.style.split(";").map(e=>e.split(":",2)))switch(e){case"font-family":n.typeface=stripQuotes(t);break;case"font-size":n.size=getMeasurement(t);break;case"font-weight":n.weight=t;break;case"font-style":n.posture=t;break;case"letter-spacing":n.letterSpacing=getMeasurement(t);break;case"margin":const e=t.split(/ \t/).map(e=>getMeasurement(e));switch(e.length){case 1:a.top=a.bottom=a.left=a.right=e[0];break;case 2:a.top=a.bottom=e[0];a.left=a.right=e[1];break;case 3:a.top=e[0];a.bottom=e[2];a.left=a.right=e[1];break;case 4:a.top=e[0];a.left=e[1];a.bottom=e[2];a.right=e[3]}break;case"margin-top":a.top=getMeasurement(t);break;case"margin-bottom":a.bottom=getMeasurement(t);break;case"margin-left":a.left=getMeasurement(t);break;case"margin-right":a.right=getMeasurement(t);break;case"line-height":r=getMeasurement(t)}e.pushData(n,a,r);if(this[Qs])e.addString(this[Qs]);else for(const t of this[mi]())"#text"!==t[Di]?t[zi](e):e.addString(t[Qs]);t&&e.popFont()}[to](e){const t=[];this[ti]={children:t};this[Ks]({});if(0===t.length&&!this[Qs])return HTMLResult.EMPTY;let n;n=this[el]?this[Qs]?this[Qs].replaceAll(sl,"\n"):void 0:this[Qs]||void 0;return HTMLResult.success({name:this[Di],attributes:{href:this.href,style:mapStyle(this.style,this,this[el])},children:t,value:n})}}class A extends XhtmlObject{constructor(e){super(e,"a");this.href=fixURL(e.href)||""}}class B extends XhtmlObject{constructor(e){super(e,"b")}[zi](e){e.pushFont({weight:"bold"});super[zi](e);e.popFont()}}class Body extends XhtmlObject{constructor(e){super(e,"body")}[to](e){const t=super[to](e),{html:n}=t;if(!n)return HTMLResult.EMPTY;n.name="div";n.attributes.class=["xfaRich"];return t}}class Br extends XhtmlObject{constructor(e){super(e,"br")}[Zi](){return"\n"}[zi](e){e.addString("\n")}[to](e){return HTMLResult.success({name:"br"})}}class Html extends XhtmlObject{constructor(e){super(e,"html")}[to](e){const t=[];this[ti]={children:t};this[Ks]({});if(0===t.length)return HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:{}},value:this[Qs]||""});if(1===t.length){const e=t[0];if(e.attributes?.class.includes("xfaRich"))return HTMLResult.success(e)}return HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:{}},children:t})}}class I extends XhtmlObject{constructor(e){super(e,"i")}[zi](e){e.pushFont({posture:"italic"});super[zi](e);e.popFont()}}class Li extends XhtmlObject{constructor(e){super(e,"li")}}class Ol extends XhtmlObject{constructor(e){super(e,"ol")}}class P extends XhtmlObject{constructor(e){super(e,"p")}[zi](e){super[zi](e,!1);e.addString("\n");e.addPara();e.popFont()}[Zi](){return this[bi]()[mi]().at(-1)===this?super[Zi]():super[Zi]()+"\n"}}class Span extends XhtmlObject{constructor(e){super(e,"span")}}class Sub extends XhtmlObject{constructor(e){super(e,"sub")}}class Sup extends XhtmlObject{constructor(e){super(e,"sup")}}class Ul extends XhtmlObject{constructor(e){super(e,"ul")}}class XhtmlNamespace{static[so](e,t){if(XhtmlNamespace.hasOwnProperty(e))return XhtmlNamespace[e](t)}static a(e){return new A(e)}static b(e){return new B(e)}static body(e){return new Body(e)}static br(e){return new Br(e)}static html(e){return new Html(e)}static i(e){return new I(e)}static li(e){return new Li(e)}static ol(e){return new Ol(e)}static p(e){return new P(e)}static span(e){return new Span(e)}static sub(e){return new Sub(e)}static sup(e){return new Sup(e)}static ul(e){return new Ul(e)}}const ol={config:ConfigNamespace,connection:ConnectionSetNamespace,datasets:DatasetsNamespace,localeSet:LocaleSetNamespace,signature:SignatureNamespace,stylesheet:StylesheetNamespace,template:TemplateNamespace,xdp:XdpNamespace,xhtml:XhtmlNamespace};class UnknownNamespace{constructor(e){this.namespaceId=e}[so](e,t){return new XmlObject(this.namespaceId,e,t)}}class Root extends XFAObject{constructor(e){super(-1,"root",Object.create(null));this.element=null;this[yi]=e}[Pi](e){this.element=e;return!0}[ni](){super[ni]();if(this.element.template instanceof Template){this[yi].set(Ki,this.element);this.element.template[Vi](this[yi]);this.element.template[yi]=this[yi]}}}class Empty extends XFAObject{constructor(){super(-1,"",Object.create(null))}[Pi](e){return!1}}class Builder{constructor(e=null){this._namespaceStack=[];this._nsAgnosticLevel=0;this._namespacePrefixes=new Map;this._namespaces=new Map;this._nextNsId=Math.max(...Object.values(io).map(({id:e})=>e));this._currentNamespace=e||new UnknownNamespace(++this._nextNsId)}buildRoot(e){return new Root(e)}build({nsPrefix:e,name:t,attributes:n,namespace:a,prefixes:r}){const s=null!==a;if(s){this._namespaceStack.push(this._currentNamespace);this._currentNamespace=this._searchNamespace(a)}r&&this._addNamespacePrefix(r);if(n.hasOwnProperty(Mi)){const e=ol.datasets,t=n[Mi];let a=null;for(const[n,r]of Object.entries(t)){if(this._getNamespaceToUse(n)===e){a={xfa:r};break}}a?n[Mi]=a:delete n[Mi]}const i=this._getNamespaceToUse(e),o=i?.[so](t,n)||new Empty;o[Ii]()&&this._nsAgnosticLevel++;(s||r||o[Ii]())&&(o[$s]={hasNamespace:s,prefixes:r,nsAgnostic:o[Ii]()});return o}isNsAgnostic(){return this._nsAgnosticLevel>0}_searchNamespace(e){let t=this._namespaces.get(e);if(t)return t;for(const[n,{check:a}]of Object.entries(io))if(a(e)){t=ol[n];if(t){this._namespaces.set(e,t);return t}break}t=new UnknownNamespace(++this._nextNsId);this._namespaces.set(e,t);return t}_addNamespacePrefix(e){for(const{prefix:t,value:n}of e){const e=this._searchNamespace(n);this._namespacePrefixes.getOrInsertComputed(t,makeArr).push(e)}}_getNamespaceToUse(e){if(!e)return this._currentNamespace;const t=this._namespacePrefixes.get(e);if(t?.length>0)return t.at(-1);warn(`Unknown namespace prefix: ${e}.`);return null}clean(e){const{hasNamespace:t,prefixes:n,nsAgnostic:a}=e;t&&(this._currentNamespace=this._namespaceStack.pop());n&&n.forEach(({prefix:e})=>{this._namespacePrefixes.get(e).pop()});a&&this._nsAgnosticLevel--}}class XFAParser extends XMLParserBase{constructor(e=null,t=!1){super();this._builder=new Builder(e);this._stack=[];this._globalData={usedTypefaces:new Set};this._ids=new Map;this._current=this._builder.buildRoot(this._ids);this._errorCode=Fs;this._whiteRegex=/^\s+$/;this._nbsps=/\xa0+/g;this._richText=t}parse(e){this.parseXml(e);if(this._errorCode===Fs){this._current[ni]();return this._current.element}}onText(e){e=e.replace(this._nbsps,e=>e.slice(1)+" ");this._richText||this._current[Us]()?this._current[Ni](e,this._richText):this._whiteRegex.test(e)||this._current[Ni](e.trim())}onCdata(e){this._current[Ni](e)}_mkAttributes(e,t){let n=null,a=null;const r=Object.create({});for(const{name:s,value:i}of e)if("xmlns"===s)n?warn(`XFA - multiple namespace definition in <${t}>`):n=i;else if(s.startsWith("xmlns:")){const e=s.substring(6);a??=[];a.push({prefix:e,value:i})}else{const e=s.indexOf(":");if(-1===e)r[s]=i;else{const t=r[Mi]??=Object.create(null),[n,a]=[s.slice(0,e),s.slice(e+1)];(t[n]||=Object.create(null))[a]=i}}return[n,a,r]}_getNameAndPrefix(e,t){const n=e.indexOf(":");return-1===n?[e,null]:[e.substring(n+1),t?"":e.substring(0,n)]}onBeginElement(e,t,n){const[a,r,s]=this._mkAttributes(t,e),[i,o]=this._getNameAndPrefix(e,this._builder.isNsAgnostic()),l=this._builder.build({nsPrefix:o,name:i,attributes:s,namespace:a,prefixes:r});l[ji]=this._globalData;if(n){l[ni]();this._current[Pi](l)&&l[$i](this._ids);l[Vs](this._builder)}else{this._stack.push(this._current);this._current=l}}onEndElement(e){const t=this._current;if(t[Si]()&&"string"==typeof t[Qs]){const e=new XFAParser;e._globalData=this._globalData;const n=e.parse(t[Qs]);t[Qs]=null;t[Pi](n)}t[ni]();this._current=this._stack.pop();this._current[Pi](t)&&t[$i](this._ids);t[Vs](this._builder)}onError(e){this._errorCode=e}}class XFAFactory{constructor(e){try{this.root=(new XFAParser).parse(XFAFactory._createDocument(e));const t=new Binder(this.root);this.form=t.bind();this.dataHandler=new DataHandler(this.root,t.getData());this.form[ji].template=this.form}catch(e){warn(`XFA - an error occurred during parsing and binding: ${e}`)}}isValid(){return!(!this.root||!this.form)}_createPagesHelper(){const e=this.form[eo]();return new Promise((t,n)=>{const nextIteration=()=>{try{const n=e.next();n.done?t(n.value):setTimeout(nextIteration,0)}catch(e){n(e)}};setTimeout(nextIteration,0)})}async _createPages(){try{this.pages=await this._createPagesHelper();this.dims=this.pages.children.map(e=>{const{width:t,height:n}=e.attributes.style;return[0,0,parseInt(t),parseInt(n)]})}catch(e){warn(`XFA - an error occurred during layout: ${e}`)}}getBoundingBox(e){return this.dims[e]}async getNumPages(){this.pages||await this._createPages();return this.dims.length}setImages(e){this.form[ji].images=e}setFonts(e){this.form[ji].fontFinder=new FontFinder(e);const t=[];for(let e of this.form[ji].usedTypefaces){e=stripQuotes(e);this.form[ji].fontFinder.find(e)||t.push(e)}return t.length>0?t:null}appendFonts(e,t){this.form[ji].fontFinder.add(e,t)}async getPages(){this.pages||await this._createPages();const e=this.pages;this.pages=null;return e}serializeData(e){return this.dataHandler.serialize(e)}static _createDocument(e){return e["/xdp:xdp"]?Object.values(e).join(""):e["xdp:xdp"]}static getRichTextAsHtml(e){if(!e||"string"!=typeof e)return null;try{let t=new XFAParser(XhtmlNamespace,!0).parse(e);if(!["body","xhtml"].includes(t[Di])){const e=XhtmlNamespace.body({});e[Ws](t);t=e}const n=t[to]();if(!n.success)return null;const{html:a}=n,{attributes:r}=a;if(r){r.class&&(r.class=r.class.filter(e=>!e.startsWith("xfa")));r.dir="auto"}return{html:a,str:t[Zi]()}}catch(e){warn(`XFA - an error occurred during parsing of rich text: ${e}`)}return null}}class AnnotationFactory{static createGlobals(e){return Promise.all([e.ensureCatalog("acroForm"),e.ensureDoc("xfaDatasets"),e.ensureCatalog("structTreeRoot"),e.ensureCatalog("baseUrl"),e.ensureCatalog("attachments"),e.ensureCatalog("globalColorSpaceCache")]).then(([t,n,a,r,s,i])=>({pdfManager:e,acroForm:t instanceof Dict?t:Dict.empty,xfaDatasets:n,structTreeRoot:a,baseUrl:r,attachments:s,globalColorSpaceCache:i}),e=>{warn(`createGlobals: "${e}".`);return null})}static async create(e,t,n,a,r,s,i,o){const l=r?await this._getPageIndex(e,t,n.pdfManager):null;return n.pdfManager.ensure(this,"_create",[e,t,n,a,r,s,i,l,o])}static _create(e,t,n,a,r=!1,s=null,i=null,o=null,l=null){const f=e.fetchIfRef(t);if(!(f instanceof Dict))return;let c=f.get("Subtype");c=c instanceof Name?c.name:null;if(i&&!i.has(H[c?.toUpperCase()]))return null;const{acroForm:h,pdfManager:u}=n,m=t instanceof Ref?t.toString():`annot_${a.createObjId()}`,p={xref:e,ref:t,dict:f,subtype:c,id:m,annotationGlobals:n,collectFields:r,orphanFields:s,needAppearances:!r&&!0===h.get("NeedAppearances"),pageIndex:o,evaluatorOptions:u.evaluatorOptions,pageRef:l};switch(c){case"Link":return new LinkAnnotation(p);case"Text":return new TextAnnotation(p);case"Widget":let e=getInheritableProperty({dict:f,key:"FT"});e=e instanceof Name?e.name:null;switch(e){case"Tx":return new TextWidgetAnnotation(p);case"Btn":return new ButtonWidgetAnnotation(p);case"Ch":return new ChoiceWidgetAnnotation(p);case"Sig":return new SignatureWidgetAnnotation(p)}warn(`Unimplemented widget field type "${e}", falling back to base field type.`);return new WidgetAnnotation(p);case"Popup":return new PopupAnnotation(p);case"FreeText":return new FreeTextAnnotation(p);case"Line":return new LineAnnotation(p);case"Square":return new SquareAnnotation(p);case"Circle":return new CircleAnnotation(p);case"PolyLine":return new PolylineAnnotation(p);case"Polygon":return new PolygonAnnotation(p);case"Caret":return new CaretAnnotation(p);case"Ink":return new InkAnnotation(p);case"Highlight":return new HighlightAnnotation(p);case"Underline":return new UnderlineAnnotation(p);case"Squiggly":return new SquigglyAnnotation(p);case"StrikeOut":return new StrikeOutAnnotation(p);case"Stamp":return new StampAnnotation(p);case"FileAttachment":return new FileAttachmentAnnotation(p);default:r||warn(c?`Unimplemented annotation type "${c}", falling back to base annotation.`:"Annotation is missing the required /Subtype.");return new Annotation(p)}}static async _getPageIndex(e,t,n){try{const a=await e.fetchIfRefAsync(t);if(!(a instanceof Dict))return-1;const r=a.getRaw("P");if(r instanceof Ref)try{return await n.ensureCatalog("getPageIndex",[r])}catch(e){info(`_getPageIndex -- not a valid page reference: "${e}".`)}if(a.has("Kids"))return-1;const s=await n.ensureDoc("numPages");for(let e=0;e<s;e++){const a=await n.getPage(e),r=await n.ensure(a,"annotations");for(const n of r)if(n instanceof Ref&&isRefsEqual(n,t))return e}}catch(e){warn(`_getPageIndex: "${e}".`)}return-1}static generateImages(e,t,n){if(!n){warn("generateImages: OffscreenCanvas is not supported, cannot save or print some annotations with images.");return null}let a;for(const{bitmapId:n,bitmap:r}of e)if(r){a||=new Map;a.set(n,StampAnnotation.createImage(r,t))}return a}static async saveNewAnnotations(e,t,n,a,r){const s=e.xref;let i;const o=[],{isOffscreenCanvasSupported:l}=e.options;for(const f of n)if(!f.deleted)switch(f.annotationType){case g:if(!i){const e=new Dict(s);e.setIfName("BaseFont","Helvetica");e.setIfName("Type","Font");e.setIfName("Subtype","Type1");e.setIfName("Encoding","WinAnsiEncoding");i=s.getNewTemporaryRef();r.put(i,{data:e})}o.push(FreeTextAnnotation.createNewAnnotation(s,f,r,{evaluator:e,task:t,baseFontRef:i}));break;case b:f.quadPoints?o.push(HighlightAnnotation.createNewAnnotation(s,f,r)):o.push(InkAnnotation.createNewAnnotation(s,f,r));break;case j:o.push(InkAnnotation.createNewAnnotation(s,f,r));break;case w:const n=l?await(a?.get(f.bitmapId)):null;if(n?.imageStream){const{imageStream:e,smaskStream:t}=n;if(t){const n=s.getNewTemporaryRef();r.put(n,{data:t});e.dict.set("SMask",n)}const a=n.imageRef=s.getNewTemporaryRef();r.put(a,{data:e});n.imageStream=n.smaskStream=null}o.push(StampAnnotation.createNewAnnotation(s,f,r,{image:n}));break;case k:o.push(StampAnnotation.createNewAnnotation(s,f,r,{}))}return{annotations:(await Promise.all(o)).flat()}}static async printNewAnnotations(e,t,n,a,r){if(!a)return null;const{options:s,xref:i}=t,o=[];for(const l of a)if(!l.deleted)switch(l.annotationType){case g:o.push(FreeTextAnnotation.createNewPrintAnnotation(e,i,l,{evaluator:t,task:n,evaluatorOptions:s}));break;case b:l.quadPoints?o.push(HighlightAnnotation.createNewPrintAnnotation(e,i,l,{evaluatorOptions:s})):o.push(InkAnnotation.createNewPrintAnnotation(e,i,l,{evaluatorOptions:s}));break;case j:o.push(InkAnnotation.createNewPrintAnnotation(e,i,l,{evaluatorOptions:s}));break;case w:const a=s.isOffscreenCanvasSupported?await(r?.get(l.bitmapId)):null;if(a?.imageStream){const{imageStream:e,smaskStream:t}=a;t&&e.dict.set("SMask",t);a.imageRef=new JpegStream(e,e.length);a.imageStream=a.smaskStream=null}o.push(StampAnnotation.createNewPrintAnnotation(e,i,l,{image:a,evaluatorOptions:s}));break;case k:o.push(StampAnnotation.createNewPrintAnnotation(e,i,l,{evaluatorOptions:s}))}return Promise.all(o)}}function getRgbColor(e,t=new Uint8ClampedArray(3)){if(!Array.isArray(e))return t;const n=t||new Uint8ClampedArray(3);switch(e.length){case 0:return null;case 1:ColorSpaceUtils.gray.getRgbItem(e,0,n,0);return n;case 3:ColorSpaceUtils.rgb.getRgbItem(e,0,n,0);return n;case 4:ColorSpaceUtils.cmyk.getRgbItem(e,0,n,0);return n;default:return t}}function getPdfColorArray(e,t=null){return e&&Array.from(e,e=>e/255)||t}function getQuadPoints(e,t){const n=e.getArray("QuadPoints");if(!isNumberArray(n,null)||0===n.length||n.length%8>0)return null;const a=new Float32Array(n.length);for(let e=0,r=n.length;e<r;e+=8){const[r,s,i,o,l,f,c,h]=n.slice(e,e+8),u=Math.min(r,i,l,c),m=Math.max(r,i,l,c),p=Math.min(s,o,f,h),d=Math.max(s,o,f,h);if(null!==t&&(u<t[0]||m>t[2]||p<t[1]||d>t[3]))return null;a.set([u,d,m,d,u,p,m,p],e)}return a}function getTransformMatrix(e,t,n){const a=new Float32Array([1/0,1/0,-1/0,-1/0]);Util.axialAlignedBoundingBox(t,n,a);const[r,s,i,o]=a;if(r===i||s===o)return[1,0,0,1,e[0],e[1]];const l=(e[2]-e[0])/(i-r),f=(e[3]-e[1])/(o-s);return[l,0,0,f,e[0]-r*l,e[1]-s*f]}class Annotation{constructor(e){const{annotationGlobals:t,dict:n,orphanFields:a,ref:r,subtype:s,xref:i}=e,o=a?.get(r);o&&n.set("Parent",o);this.setTitle(n.get("T"));this.setContents(n.get("Contents"));this.setModificationDate(n.get("M"));this.setFlags(n.get("F"));this.setRectangle(n.getArray("Rect"));this.setColor(n.getArray("C"));this.setBorderStyle(n);this.setAppearance(n);this.setOptionalContent(n);const l=n.get("MK");this.setBorderAndBackgroundColors(l);this.setRotation(l,n);this.ref=e.ref instanceof Ref?e.ref:null;this._streams=[];this.appearance&&this._streams.push(this.appearance);const f=!!(this.flags&U),c=!!(this.flags&X);this.data={annotationType:H[s?.toUpperCase()],annotationFlags:this.flags,borderStyle:this.borderStyle,color:this.color,backgroundColor:this.backgroundColor,borderColor:this.borderColor,rotation:this.rotation,contentsObj:this._contents,hasAppearance:!!this.appearance,id:e.id,modificationDate:this.modificationDate,rect:this.rectangle,subtype:s,hasOwnCanvas:!1,noRotate:!!(this.flags&_),noHTML:f&&c,isEditable:!1,structParent:-1};if(t.structTreeRoot){let a=n.get("StructParent");this.data.structParent=a=Number.isInteger(a)&&a>=0?a:-1;t.structTreeRoot.addAnnotationIdToPage(e.pageRef,a)}if(e.collectFields){const t=n.get("Kids");if(Array.isArray(t)){const e=[];for(const n of t)n instanceof Ref&&e.push(n.toString());0!==e.length&&(this.data.kidIds=e)}this.data.actions=collectActions(i,n,oe);this.data.fieldName=this._constructFieldName(n);this.data.pageIndex=e.pageIndex}const h=n.get("IT");h instanceof Name&&(this.data.it=h.name);this._isOffscreenCanvasSupported=e.evaluatorOptions.isOffscreenCanvasSupported;this._fallbackFontDict=null;this._needAppearances=!1}_hasFlag(e,t){return!!(e&t)}_buildFlags(e,t){let{flags:n}=this;if(void 0===e){if(void 0===t)return;return t?n&~z:n&~N|z}if(e){n|=z;return t?n&~L|N:n&~N|L}n&=~(N|L);return t?n&~z:n|z}_isViewable(e){return!this._hasFlag(e,E)&&!this._hasFlag(e,L)}_isPrintable(e){return this._hasFlag(e,z)&&!this._hasFlag(e,N)&&!this._hasFlag(e,E)}mustBeViewed(e,t){const n=e?.get(this.data.id)?.noView;return void 0!==n?!n:this.viewable&&!this._hasFlag(this.flags,N)}mustBePrinted(e){const t=e?.get(this.data.id)?.noPrint;return void 0!==t?!t:this.printable}mustBeViewedWhenEditing(e,t=null){return e?!this.data.isEditable:!t?.has(this.data.id)}get viewable(){return null!==this.data.quadPoints&&(0===this.flags||this._isViewable(this.flags))}get printable(){return null!==this.data.quadPoints&&(0!==this.flags&&this._isPrintable(this.flags))}_parseStringHelper(e){const t="string"==typeof e?stringToPDFString(e):"";return{str:t,dir:t&&"rtl"===bidi(t).dir?"rtl":"ltr"}}setDefaultAppearance(e){const{dict:t,annotationGlobals:n}=e,a=getInheritableProperty({dict:t,key:"DA"})||n.acroForm.get("DA");this._defaultAppearance="string"==typeof a?a:"";this.data.defaultAppearanceData=parseDefaultAppearance(this._defaultAppearance)}setTitle(e){this._title=this._parseStringHelper(e)}setContents(e){this._contents=this._parseStringHelper(e)}setModificationDate(e){this.modificationDate="string"==typeof e?e:null}setFlags(e){this.flags=Number.isInteger(e)&&e>0?e:0;this.flags&E&&"Annotation"!==this.constructor.name&&(this.flags^=E)}hasFlag(e){return this._hasFlag(this.flags,e)}setRectangle(e){this.rectangle=lookupNormalRect(e,[0,0,0,0])}setColor(e){this.color=getRgbColor(e)}setLineEndings(e){this.lineEndings=["None","None"];if(Array.isArray(e)&&2===e.length)for(let t=0;t<2;t++){const n=e[t];if(n instanceof Name)switch(n.name){case"None":continue;case"Square":case"Circle":case"Diamond":case"OpenArrow":case"ClosedArrow":case"Butt":case"ROpenArrow":case"RClosedArrow":case"Slash":this.lineEndings[t]=n.name;continue}warn(`Ignoring invalid lineEnding: ${n}`)}}setRotation(e,t){this.rotation=0;let n=e instanceof Dict?e.get("R")||0:t.get("Rotate")||0;if(Number.isInteger(n)&&0!==n){n%=360;n<0&&(n+=360);n%90==0&&(this.rotation=n)}}setBorderAndBackgroundColors(e){if(e instanceof Dict){this.borderColor=getRgbColor(e.getArray("BC"),null);this.backgroundColor=getRgbColor(e.getArray("BG"),null)}else this.borderColor=this.backgroundColor=null}setBorderStyle(e){this.borderStyle=new AnnotationBorderStyle;if(e instanceof Dict)if(e.has("BS")){const t=e.get("BS");if(t instanceof Dict){const e=t.get("Type");if(!e||isName(e,"Border")){this.borderStyle.setWidth(t.get("W"),this.rectangle);this.borderStyle.setStyle(t.get("S"));this.borderStyle.setDashArray(t.getArray("D"))}}}else if(e.has("Border")){const t=e.getArray("Border");if(Array.isArray(t)&&t.length>=3){this.borderStyle.setHorizontalCornerRadius(t[0]);this.borderStyle.setVerticalCornerRadius(t[1]);this.borderStyle.setWidth(t[2],this.rectangle);4===t.length&&this.borderStyle.setDashArray(t[3],!0)}}else this.borderStyle.setWidth(0)}setAppearance(e){this.appearance=null;const t=e.get("AP");if(!(t instanceof Dict))return;const n=t.get("N");if(n instanceof BaseStream){this.appearance=n;return}if(!(n instanceof Dict))return;const a=e.get("AS");if(!(a instanceof Name&&n.has(a.name)))return;const r=n.get(a.name);r instanceof BaseStream&&(this.appearance=r)}setOptionalContent(e){this.oc=null;const t=e.get("OC");t instanceof Name?warn("setOptionalContent: Support for /Name-entry is not implemented."):t instanceof Dict&&(this.oc=t)}async loadResources(e,t){const n=await t.dict.getAsync("Resources");n&&await ObjectLoader.load(n,e,n.xref);return n}async getOperatorList(e,t,n,a){const{hasOwnCanvas:r,id:s,rect:i}=this.data;let o=this.appearance;const f=!!(r&&n&l);if(f&&(0===this.width||0===this.height)){this.data.hasOwnCanvas=!1;return{opList:new OperatorList,separateForm:!1,separateCanvas:!1}}if(!o){if(!f)return{opList:new OperatorList,separateForm:!1,separateCanvas:!1};o=new StringStream("");o.dict=new Dict}const c=o.dict,h=await this.loadResources(jn,o),u=lookupRect(c.getArray("BBox"),[0,0,1,1]),m=lookupMatrix(c.getArray("Matrix"),wn),p=getTransformMatrix(i,u,m),d=new OperatorList;let g;this.oc&&(g=await e.parseMarkedContentProps(this.oc,null));void 0!==g&&d.addOp(It,["OC",g]);d.addOp(Mt,[s,i,p,m,f]);await e.getOperatorList({stream:o,task:t,resources:h,operatorList:d,fallbackFontDict:this._fallbackFontDict});d.addOp(Pt,[]);void 0!==g&&d.addOp(Ft,[]);this.reset();return{opList:d,separateForm:!1,separateCanvas:f}}async save(e,t,n,a){return null}get overlaysTextContent(){return!1}get hasTextContent(){return!1}async extractTextContent(e,t,n){if(!this.appearance)return;const a=await this.loadResources(kn,this.appearance),r=[],s=[];let i=null;const o={desiredSize:Math.Infinity,ready:!0,enqueue(e,t){for(const t of e.items)if(void 0!==t.str){i||=t.transform.slice(-2);s.push(t.str);if(t.hasEOL){r.push(s.join("").trimEnd());s.length=0}}}};await e.getTextContent({stream:this.appearance,task:t,resources:a,includeMarkedContent:!0,keepWhiteSpace:!0,sink:o,viewBox:n});this.reset();s.length&&r.push(s.join("").trimEnd());if(r.length>1||r[0]){const e=this.appearance.dict,t=lookupRect(e.getArray("BBox"),null),n=lookupMatrix(e.getArray("Matrix"),null);this.data.textPosition=this._transformPoint(i,t,n);this.data.textContent=r}}_transformPoint(e,t,n){const{rect:a}=this.data;t||=[0,0,1,1];n||=[1,0,0,1,0,0];const r=getTransformMatrix(a,t,n);r[4]-=a[0];r[5]-=a[1];const s=e.slice();Util.applyTransform(s,r);Util.applyTransform(s,n);return s}getFieldObject(){return this.data.kidIds?{id:this.data.id,actions:this.data.actions,name:this.data.fieldName,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,type:"",kidIds:this.data.kidIds,page:this.data.pageIndex,rotation:this.rotation}:null}reset(){for(const e of this._streams)e.reset()}_constructFieldName(e){if(!e.has("T")&&!e.has("Parent")){warn("Unknown field name, falling back to empty field name.");return""}if(!e.has("Parent"))return stringToPDFString(e.get("T"));const t=[];e.has("T")&&t.unshift(stringToPDFString(e.get("T")));let n=e;const a=new RefSet;e.objId&&a.put(e.objId);for(;n.has("Parent");){n=n.get("Parent");if(!(n instanceof Dict)||n.objId&&a.has(n.objId))break;n.objId&&a.put(n.objId);n.has("T")&&t.unshift(stringToPDFString(n.get("T")))}return t.join(".")}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}}class AnnotationBorderStyle{width=1;rawWidth=1;style=ne;dashArray=[3];horizontalCornerRadius=0;verticalCornerRadius=0;setWidth(e,t=[0,0,0,0]){if(e instanceof Name)this.width=0;else if("number"==typeof e){if(e>0){this.rawWidth=e;const n=(t[2]-t[0])/2,a=(t[3]-t[1])/2;if(n>0&&a>0&&(e>n||e>a)){warn(`AnnotationBorderStyle.setWidth - ignoring width: ${e}`);e=1}}this.width=e}}setStyle(e){if(e instanceof Name)switch(e.name){case"S":this.style=ne;break;case"D":this.style=ae;break;case"B":this.style=re;break;case"I":this.style=se;break;case"U":this.style=ie}}setDashArray(e,t=!1){if(Array.isArray(e)){let n=!0,a=!0;for(const t of e){if(!(+t>=0)){n=!1;break}t>0&&(a=!1)}if(0===e.length||n&&!a){this.dashArray=e;t&&this.setStyle(Name.get("D"))}else this.width=0}else e&&(this.width=0)}setHorizontalCornerRadius(e){Number.isInteger(e)&&(this.horizontalCornerRadius=e)}setVerticalCornerRadius(e){Number.isInteger(e)&&(this.verticalCornerRadius=e)}}class MarkupAnnotation extends Annotation{constructor(e){super(e);const{dict:t}=e;if(t.has("IRT")){const e=t.getRaw("IRT");this.data.inReplyTo=e instanceof Ref?e.toString():null;const n=t.get("RT");this.data.replyType=n instanceof Name?n.name:M}let n=null;if(this.data.replyType===D){const e=t.get("IRT");this.setTitle(e.get("T"));this.data.titleObj=this._title;this.setContents(e.get("Contents"));this.data.contentsObj=this._contents;if(e.has("CreationDate")){this.setCreationDate(e.get("CreationDate"));this.data.creationDate=this.creationDate}else this.data.creationDate=null;if(e.has("M")){this.setModificationDate(e.get("M"));this.data.modificationDate=this.modificationDate}else this.data.modificationDate=null;n=e.getRaw("Popup");if(e.has("C")){this.setColor(e.getArray("C"));this.data.color=this.color}else this.data.color=null}else{this.data.titleObj=this._title;this.setCreationDate(t.get("CreationDate"));this.data.creationDate=this.creationDate;n=t.getRaw("Popup");t.has("C")||(this.data.color=null)}this.data.popupRef=n instanceof Ref?n.toString():null;t.has("RC")&&(this.data.richText=XFAFactory.getRichTextAsHtml(t.get("RC")))}setCreationDate(e){this.creationDate="string"==typeof e?e:null}_setDefaultAppearance({xref:e,extra:t,strokeColor:n,fillColor:a,blendMode:r,strokeAlpha:s,fillAlpha:i,pointsCallback:o}){const l=this.data.rect=[1/0,1/0,-1/0,-1/0],f=["q"];t&&f.push(t);n&&f.push(`${n[0]} ${n[1]} ${n[2]} RG`);a&&f.push(`${a[0]} ${a[1]} ${a[2]} rg`);const c=this.data.quadPoints||Float32Array.from([this.rectangle[0],this.rectangle[3],this.rectangle[2],this.rectangle[3],this.rectangle[0],this.rectangle[1],this.rectangle[2],this.rectangle[1]]);for(let e=0,t=c.length;e<t;e+=8){const t=o(f,c.subarray(e,e+8));Util.rectBoundingBox(...t,l)}f.push("Q");const h=new Dict(e),u=new Dict(e);u.setIfName("Subtype","Form");const m=new StringStream(f.join(" "));m.dict=u;h.set("Fm0",m);const p=new Dict(e);r&&p.setIfName("BM",r);p.setIfNumber("CA",s);p.setIfNumber("ca",i);const d=new Dict(e);d.set("GS0",p);const g=new Dict(e);g.set("ExtGState",d);g.set("XObject",h);const b=new Dict(e);b.set("Resources",g);b.set("BBox",l);this.appearance=new StringStream("/GS0 gs /Fm0 Do");this.appearance.dict=b;this._streams.push(this.appearance,m)}static async createNewAnnotation(e,t,n,a){const r=t.ref||=e.getNewTemporaryRef(),s=await this.createNewAppearanceStream(t,e,a);let i;if(s){const a=e.getNewTemporaryRef();i=this.createNewDict(t,e,{apRef:a});n.put(a,{data:s})}else i=this.createNewDict(t,e,{});Number.isInteger(t.parentTreeId)&&i.set("StructParent",t.parentTreeId);n.put(r,{data:i});const o={ref:r},{popup:l}=t;if(l){if(l.deleted){i.delete("Popup");i.delete("Contents");i.delete("RC");return o}const t=l.ref||=e.getNewTemporaryRef();l.parent=r;const a=PopupAnnotation.createNewDict(l,e);n.put(t,{data:a});i.setIfDefined("Contents",stringToAsciiOrUTF16BE(l.contents));i.set("Popup",t);return[o,{ref:t}]}return o}static async createNewPrintAnnotation(e,t,n,a){const r=await this.createNewAppearanceStream(n,t,a),s=this.createNewDict(n,t,r?{ap:r}:{}),i=new this.prototype.constructor({dict:s,xref:t,annotationGlobals:e,evaluatorOptions:a.evaluatorOptions});n.ref&&(i.ref=i.refToReplace=n.ref);return i}}class WidgetAnnotation extends Annotation{constructor(e){super(e);const{dict:t,xref:n,annotationGlobals:a}=e,r=this.data;this._needAppearances=e.needAppearances;void 0===r.fieldName&&(r.fieldName=this._constructFieldName(t));void 0===r.actions&&(r.actions=collectActions(n,t,oe));let s=getInheritableProperty({dict:t,key:"V",getArray:!0});r.fieldValue=this._decodeFormValue(s);const i=getInheritableProperty({dict:t,key:"DV",getArray:!0});r.defaultFieldValue=this._decodeFormValue(i);if(void 0===s&&a.xfaDatasets){const e=this._title.str;if(e){this._hasValueFromXFA=!0;r.fieldValue=s=a.xfaDatasets.getValue(e)}}void 0===s&&null!==r.defaultFieldValue&&(r.fieldValue=r.defaultFieldValue);r.alternativeText=stringToPDFString(t.get("TU")||"");this.setDefaultAppearance(e);r.hasAppearance||=this._needAppearances&&void 0!==r.fieldValue&&null!==r.fieldValue;const o=getInheritableProperty({dict:t,key:"FT"});r.fieldType=o instanceof Name?o.name:null;const l=getInheritableProperty({dict:t,key:"DR"}),f=a.acroForm.get("DR"),c=this.appearance?.dict.get("Resources");this._fieldResources={localResources:l,acroFormResources:f,appearanceResources:c,mergedResources:Dict.merge({xref:n,dictArray:[l,c,f],mergeSubDicts:!0})};r.fieldFlags=getInheritableProperty({dict:t,key:"Ff"});(!Number.isInteger(r.fieldFlags)||r.fieldFlags<0)&&(r.fieldFlags=0);r.password=this.hasFieldFlag(G);r.readOnly=this.hasFieldFlag(W);r.required=this.hasFieldFlag(K);r.hidden=this._hasFlag(r.annotationFlags,N)||this._hasFlag(r.annotationFlags,L)}_decodeFormValue(e){return Array.isArray(e)?e.filter(e=>"string"==typeof e).map(e=>stringToPDFString(e)):e instanceof Name?stringToPDFString(e.name):"string"==typeof e?stringToPDFString(e):null}hasFieldFlag(e){return!!(this.data.fieldFlags&e)}_isViewable(e){return!0}mustBeViewed(e,t){return t?this.viewable:super.mustBeViewed(e,t)&&!this._hasFlag(this.flags,L)}getRotationMatrix(e){let t=e?.get(this.data.id)?.rotation;void 0===t&&(t=this.rotation);return 0===t?wn:getRotationMatrix(t,this.width,this.height)}getBorderAndBackgroundAppearances(e){let t=e?.get(this.data.id)?.rotation;void 0===t&&(t=this.rotation);if(!this.backgroundColor&&!this.borderColor)return"";const n=0===t||180===t?`0 0 ${this.width} ${this.height} re`:`0 0 ${this.height} ${this.width} re`;let a="";this.backgroundColor&&(a=`${getPdfColor(this.backgroundColor,!0)} ${n} f `);if(this.borderColor){a+=`${this.borderStyle.width||1} w ${getPdfColor(this.borderColor,!1)} ${n} S `}return a}async getOperatorList(e,t,n,a){if(n&h&&!(this instanceof SignatureWidgetAnnotation)&&!this.data.noHTML&&!this.data.hasOwnCanvas)return{opList:new OperatorList,separateForm:!0,separateCanvas:!1};if(!this._hasText)return super.getOperatorList(e,t,n,a);const r=await this._getAppearance(e,t,n,a);if(this.appearance&&null===r)return super.getOperatorList(e,t,n,a);const s=new OperatorList;if(!this._defaultAppearance||null===r)return{opList:s,separateForm:!1,separateCanvas:!1};const i=!!(this.data.hasOwnCanvas&&n&l),o=[0,0,this.width,this.height],f=getTransformMatrix(this.data.rect,o,[1,0,0,1,0,0]);let c;this.oc&&(c=await e.parseMarkedContentProps(this.oc,null));void 0!==c&&s.addOp(It,["OC",c]);s.addOp(Mt,[this.data.id,this.data.rect,f,this.getRotationMatrix(a),i]);const u=new StringStream(r);await e.getOperatorList({stream:u,task:t,resources:this._fieldResources.mergedResources,operatorList:s});s.addOp(Pt,[]);void 0!==c&&s.addOp(Ft,[]);return{opList:s,separateForm:!1,separateCanvas:i}}_getMKDict(e){const t=new Dict(null);e&&t.set("R",e);t.setIfArray("BC",getPdfColorArray(this.borderColor));t.setIfArray("BG",getPdfColorArray(this.backgroundColor));return t.size>0?t:null}amendSavedDict(e,t){}setValue(e,t,n,a){const{dict:r,ref:s}=function getParentToUpdate(e,t,n){const a=new RefSet,r=e,s={dict:null,ref:null};for(;e instanceof Dict&&!a.has(t);){a.put(t);if(e.has("T"))break;if(!((t=e.getRaw("Parent"))instanceof Ref))return s;e=n.fetch(t)}if(e instanceof Dict&&e!==r){s.dict=e;s.ref=t}return s}(e,this.ref,n);if(r){if(!a.has(s)){const e=r.clone();e.set("V",t);a.put(s,{data:e});return e}}else e.set("V",t);return null}async save(e,t,n,a){const r=n?.get(this.data.id),s=this._buildFlags(r?.noView,r?.noPrint);let i=r?.value,o=r?.rotation;if(i===this.data.fieldValue||void 0===i){if(!this._hasValueFromXFA&&void 0===o&&void 0===s)return;i||=this.data.fieldValue}if(void 0===o&&!this._hasValueFromXFA&&Array.isArray(i)&&Array.isArray(this.data.fieldValue)&&isArrayEqual(i,this.data.fieldValue)&&void 0===s)return;void 0===o&&(o=this.rotation);let l=null;if(!this._needAppearances){l=await this._getAppearance(e,t,c,n);if(null===l&&void 0===s)return}let f=!1;if(l?.needAppearances){f=!0;l=null}const{xref:h}=e,u=h.fetchIfRef(this.ref);if(!(u instanceof Dict))return;const m=new Dict(h);for(const e of u.getKeys())"AP"!==e&&m.set(e,u.getRaw(e));if(void 0!==s){m.set("F",s);if(null===l&&!f){const e=u.getRaw("AP");e&&m.set("AP",e)}}const p={path:this.data.fieldName,value:i},d=this.setValue(m,Array.isArray(i)?i.map(stringToAsciiOrUTF16BE):stringToAsciiOrUTF16BE(i),h,a);this.amendSavedDict(n,d||m);const g=this._getMKDict(o);g&&m.set("MK",g);a.put(this.ref,{data:m,xfa:p,needAppearances:f});if(null!==l){const e=h.getNewTemporaryRef(),t=new Dict(h);m.set("AP",t);t.set("N",e);const r=this._getSaveFieldResources(h),s=new StringStream(l),i=s.dict=new Dict(h);i.setIfName("Subtype","Form");i.set("Resources",r);const f=o%180==0?[0,0,this.width,this.height]:[0,0,this.height,this.width];i.set("BBox",f);const c=this.getRotationMatrix(n);c!==wn&&i.set("Matrix",c);a.put(e,{data:s,xfa:null,needAppearances:!1})}m.set("M",`D:${getModificationDate()}`)}async _getAppearance(e,t,n,a){if(this.data.password)return null;const r=a?.get(this.data.id);let s,o;if(r){s=r.formattedValue||r.value;o=r.rotation}if(void 0===o&&void 0===s&&!this._needAppearances&&(!this._hasValueFromXFA||this.appearance))return null;const l=this.getBorderAndBackgroundAppearances(a);if(void 0===s){s=this.data.fieldValue;if(!s)return`/Tx BMC q ${l}Q EMC`}Array.isArray(s)&&1===s.length&&(s=s[0]);assert("string"==typeof s,"Expected `value` to be a string.");s=s.trimEnd();if(this.data.combo){const e=this.data.options.find(({exportValue:e})=>s===e);s=e?.displayValue||s}if(""===s)return`/Tx BMC q ${l}Q EMC`;void 0===o&&(o=this.rotation);let f,h=-1;if(this.data.multiLine){f=s.split(/\r\n?|\n/).map(e=>e.normalize("NFC"));h=f.length}else f=[s.replace(/\r\n?|\n/,"").normalize("NFC")];let{width:u,height:m}=this;90!==o&&270!==o||([u,m]=[m,u]);this._defaultAppearance||(this.data.defaultAppearanceData=parseDefaultAppearance(this._defaultAppearance="/Helvetica 0 Tf 0 g"));let p,d,g,b=await WidgetAnnotation._getFontData(e,t,this.data.defaultAppearanceData,this._fieldResources.mergedResources);const w=[];let j=!1;for(const e of f){const t=b.encodeString(e);t.length>1&&(j=!0);w.push(t.join(""))}if(j&&n&c)return{needAppearances:!0};if(j&&this._isOffscreenCanvasSupported){const n=this.data.comb?"monospace":"sans-serif",a=new FakeUnicodeFont(e.xref,n),r=a.createFontResources(f.join("")),i=r.getRaw("Font");if(this._fieldResources.mergedResources.has("Font")){const e=this._fieldResources.mergedResources.get("Font");for(const t of i.getKeys())e.set(t,i.getRaw(t))}else this._fieldResources.mergedResources.set("Font",i);const o=a.fontName.name;b=await WidgetAnnotation._getFontData(e,t,{fontName:o,fontSize:0},r);for(let e=0,t=w.length;e<t;e++)w[e]=stringToUTF16String(f[e]);const l=Object.assign(Object.create(null),this.data.defaultAppearanceData);this.data.defaultAppearanceData.fontSize=0;this.data.defaultAppearanceData.fontName=o;[p,d,g]=this._computeFontSize(m-2,u-4,s,b,h);this.data.defaultAppearanceData=l}else{this._isOffscreenCanvasSupported||warn("_getAppearance: OffscreenCanvas is not supported, annotation may not render correctly.");[p,d,g]=this._computeFontSize(m-2,u-4,s,b,h)}let k=b.descent;k=isNaN(k)?i*g:Math.max(i*g,Math.abs(k)*d);const y=Math.min(Math.floor((m-d)/2),1),q=this.data.textAlignment;if(this.data.multiLine)return this._getMultilineAppearance(p,w,b,d,u,m,q,2,y,k,g,a);if(this.data.comb)return this._getCombAppearance(p,b,w[0],d,u,m,2,y,k,g,a);const v=y+k;if(0===q||q>2)return`/Tx BMC q ${l}BT `+p+` 1 0 0 1 ${numberToString(2)} ${numberToString(v)} Tm (${escapeString(w[0])}) Tj ET Q EMC`;return`/Tx BMC q ${l}BT `+p+` 1 0 0 1 0 0 Tm ${this._renderText(w[0],b,d,u,q,{shift:0},2,v)} ET Q EMC`}static async _getFontData(e,t,n,a){const r=new OperatorList,s={font:null,clone(){return this}},{fontName:i,fontSize:o}=n;await e.handleSetFont(a,[i&&Name.get(i),o],null,r,t,s,null);return s.font}_getTextWidth(e,t){return Math.sumPrecise(t.charsToGlyphs(e).map(e=>e.width))/1e3}_computeFontSize(e,t,n,a,s){let{fontSize:i}=this.data.defaultAppearanceData,o=(i||12)*r,l=Math.round(e/o);if(!i){const roundWithTwoDigits=e=>Math.floor(100*e)/100;if(-1===s){const s=this._getTextWidth(n,a);i=roundWithTwoDigits(Math.min(e/r,t/s));l=1}else{const f=n.split(/\r\n?|\n/),c=[];for(const e of f){const t=a.encodeString(e).join(""),n=a.charsToGlyphs(t),r=a.getCharPositions(t);c.push({line:t,glyphs:n,positions:r})}const isTooBig=n=>{let r=0;for(const s of c){r+=this._splitLine(null,a,n,t,s).length*n;if(r>e)return!0}return!1};l=Math.max(l,s);for(;;){o=e/l;i=roundWithTwoDigits(o/r);if(!isTooBig(i))break;l++}}const{fontName:f,fontColor:c}=this.data.defaultAppearanceData;this._defaultAppearance=function createDefaultAppearance({fontSize:e,fontName:t,fontColor:n}){return`/${escapePDFName(t)} ${e} Tf ${getPdfColor(n,!0)}`}({fontSize:i,fontName:f,fontColor:c})}return[this._defaultAppearance,i,e/l]}_renderText(e,t,n,a,r,s,i,o){let l;if(1===r){l=(a-this._getTextWidth(e,t)*n)/2}else if(2===r){l=a-this._getTextWidth(e,t)*n-i}else l=i;const f=numberToString(l-s.shift);s.shift=l;return`${f} ${o=numberToString(o)} Td (${escapeString(e)}) Tj`}_getSaveFieldResources(e){const{localResources:t,appearanceResources:n,acroFormResources:a}=this._fieldResources,r=this.data.defaultAppearanceData?.fontName;if(!r)return t||Dict.empty;for(const e of[t,n])if(e instanceof Dict){const t=e.get("Font");if(t instanceof Dict&&t.has(r))return e}if(a instanceof Dict){const n=a.get("Font");if(n instanceof Dict&&n.has(r)){const a=new Dict(e);a.set(r,n.getRaw(r));const s=new Dict(e);s.set("Font",a);return Dict.merge({xref:e,dictArray:[s,t],mergeSubDicts:!0})}}return t||Dict.empty}getFieldObject(){return null}}class TextWidgetAnnotation extends WidgetAnnotation{constructor(e){super(e);const{dict:t}=e;if(t.has("PMD")){this.flags|=N;this.data.hidden=!0;warn("Barcodes are not supported")}this.data.hasOwnCanvas=this.data.readOnly&&!this.data.noHTML;this._hasText=!0;"string"!=typeof this.data.fieldValue&&(this.data.fieldValue="");let n=getInheritableProperty({dict:t,key:"Q"});(!Number.isInteger(n)||n<0||n>2)&&(n=null);this.data.textAlignment=n;let a=getInheritableProperty({dict:t,key:"MaxLen"});(!Number.isInteger(a)||a<0)&&(a=0);this.data.maxLen=a;this.data.multiLine=this.hasFieldFlag(V);this.data.comb=this.hasFieldFlag(te)&&!this.data.multiLine&&!this.data.password&&!this.hasFieldFlag(Q)&&0!==this.data.maxLen;this.data.doNotScroll=this.hasFieldFlag(ee);const{data:{actions:r}}=this;if(!r)return;const s=/^AF(Date|Time)_(?:Keystroke|Format)(?:Ex)?\(['"]?([^'"]+)['"]?\);$/;let i=!1;(1===r.Format?.length&&1===r.Keystroke?.length&&s.test(r.Format[0])&&s.test(r.Keystroke[0])||0===r.Format?.length&&1===r.Keystroke?.length&&s.test(r.Keystroke[0])||0===r.Keystroke?.length&&1===r.Format?.length&&s.test(r.Format[0]))&&(i=!0);const o=[];r.Format&&o.push(...r.Format);r.Keystroke&&o.push(...r.Keystroke);if(i){delete r.Keystroke;r.Format=o}for(const e of o){const t=e.match(s);if(!t)continue;const n="Date"===t[1];let a=t[2];const r=parseInt(a,10);isNaN(r)||Math.floor(Math.log10(r))+1!==t[2].length||(a=(n?Cs:Is)[r]??a);this.data.datetimeFormat=a;if(!i)break;if(n){if(/HH|MM|ss|h/.test(a)){this.data.datetimeType="datetime-local";this.data.timeStep=/ss/.test(a)?1:60}else this.data.datetimeType="date";break}this.data.datetimeType="time";this.data.timeStep=/ss/.test(a)?1:60;break}}get hasTextContent(){return!!this.appearance&&!this._needAppearances}_getCombAppearance(e,t,n,a,r,s,i,o,l,f,c){const h=r/this.data.maxLen,u=this.getBorderAndBackgroundAppearances(c),m=[],p=t.getCharPositions(n);for(const[e,t]of p)m.push(`(${escapeString(n.substring(e,t))}) Tj`);const d=m.join(` ${numberToString(h)} 0 Td `);return`/Tx BMC q ${u}BT `+e+` 1 0 0 1 ${numberToString(i)} ${numberToString(o+l)} Tm ${d} ET Q EMC`}_getMultilineAppearance(e,t,n,a,r,s,i,o,l,f,c,h){const u=[],m=r-2*o,p={shift:0};for(let e=0,s=t.length;e<s;e++){const s=t[e],h=this._splitLine(s,n,a,m);for(let t=0,s=h.length;t<s;t++){const s=h[t],m=0===e&&0===t?-l-(c-f):-c;u.push(this._renderText(s,n,a,r,i,p,o,m))}}const d=this.getBorderAndBackgroundAppearances(h),g=u.join("\n");return`/Tx BMC q ${d}BT `+e+` 1 0 0 1 0 ${numberToString(s)} Tm ${g} ET Q EMC`}_splitLine(e,t,n,a,r={}){e=r.line||e;const s=r.glyphs||t.charsToGlyphs(e);if(s.length<=1)return[e];const i=r.positions||t.getCharPositions(e),o=n/1e3,l=[];let f=-1,c=-1,h=-1,u=0,m=0;for(let t=0,n=s.length;t<n;t++){const[n,r]=i[t],p=s[t],d=p.width*o;if(" "===p.unicode)if(m+d>a){l.push(e.substring(u,n));u=n;m=d;f=-1;h=-1}else{m+=d;f=n;c=r;h=t}else if(m+d>a)if(-1!==f){l.push(e.substring(u,c));u=c;t=h+1;f=-1;m=0}else{l.push(e.substring(u,n));u=n;m=d}else m+=d}u<e.length&&l.push(e.substring(u,e.length));return l}async extractTextContent(e,t,n){await super.extractTextContent(e,t,n);const a=this.data.textContent;if(!a)return;const r=a.join("\n");if(r===this.data.fieldValue)return;const s=r.replaceAll(/([.*+?^${}()|[\]\\])|(\s+)/g,(e,t)=>t?`\\${t}`:"\\s+");new RegExp(`^\\s*${s}\\s*$`).test(this.data.fieldValue)&&(this.data.textContent=this.data.fieldValue.split("\n"))}getFieldObject(){return{id:this.data.id,value:this.data.fieldValue,defaultValue:this.data.defaultFieldValue||"",multiline:this.data.multiLine,password:this.data.password,charLimit:this.data.maxLen,comb:this.data.comb,editable:!this.data.readOnly,hidden:this.data.hidden,name:this.data.fieldName,rect:this.data.rect,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,datetimeFormat:this.data.datetimeFormat,hasDatetimeHTML:!!this.data.datetimeType,type:"text"}}}class ButtonWidgetAnnotation extends WidgetAnnotation{constructor(e){super(e);this.checkedAppearance=null;this.uncheckedAppearance=null;const t=this.hasFieldFlag($),n=this.hasFieldFlag(Y);this.data.checkBox=!t&&!n;this.data.radioButton=t&&!n;this.data.pushButton=n;this.data.isTooltipOnly=!1;if(this.data.checkBox)this._processCheckBox(e);else if(this.data.radioButton)this._processRadioButton(e);else if(this.data.pushButton){this.data.hasOwnCanvas=!0;this.data.noHTML=!1;this._processPushButton(e)}else warn("Invalid field flags for button widget annotation")}async getOperatorList(e,t,n,a){if(this.data.pushButton)return super.getOperatorList(e,t,n,!1,a);let r=null,s=null;if(a){const e=a.get(this.data.id);r=e?e.value:null;s=e?e.rotation:null}if(null===r&&this.appearance)return super.getOperatorList(e,t,n,a);null==r&&(r=this.data.checkBox?this.data.fieldValue===this.data.exportValue:this.data.fieldValue===this.data.buttonValue);const i=r?this.checkedAppearance:this.uncheckedAppearance;if(i){const r=this.appearance,o=lookupMatrix(i.dict.getArray("Matrix"),wn);s&&i.dict.set("Matrix",this.getRotationMatrix(a));this.appearance=i;const l=super.getOperatorList(e,t,n,a);this.appearance=r;i.dict.set("Matrix",o);return l}return{opList:new OperatorList,separateForm:!1,separateCanvas:!1}}async save(e,t,n,a){this.data.checkBox?this._saveCheckbox(e,t,n,a):this.data.radioButton&&this._saveRadioButton(e,t,n,a)}async _saveCheckbox(e,t,n,a){if(!n)return;const r=n.get(this.data.id),s=this._buildFlags(r?.noView,r?.noPrint);let i=r?.rotation,o=r?.value;if(void 0===i&&void 0===s){if(void 0===o)return;if(this.data.fieldValue===this.data.exportValue===o)return}let l=e.xref.fetchIfRef(this.ref);if(!(l instanceof Dict))return;l=l.clone();void 0===i&&(i=this.rotation);void 0===o&&(o=this.data.fieldValue===this.data.exportValue);const f={path:this.data.fieldName,value:o?this.data.exportValue:""},c=Name.get(o?this.data.exportValue:"Off");this.setValue(l,c,e.xref,a);l.set("AS",c);l.set("M",`D:${getModificationDate()}`);void 0!==s&&l.set("F",s);const h=this._getMKDict(i);h&&l.set("MK",h);a.put(this.ref,{data:l,xfa:f,needAppearances:!1})}async _saveRadioButton(e,t,n,a){if(!n)return;const r=n.get(this.data.id),s=this._buildFlags(r?.noView,r?.noPrint);let i=r?.rotation,o=r?.value;if(void 0===i&&void 0===s){if(void 0===o)return;if(this.data.fieldValue===this.data.buttonValue===o)return}let l=e.xref.fetchIfRef(this.ref);if(!(l instanceof Dict))return;l=l.clone();void 0===o&&(o=this.data.fieldValue===this.data.buttonValue);void 0===i&&(i=this.rotation);const f={path:this.data.fieldName,value:o?this.data.buttonValue:""},c=Name.get(o?this.data.buttonValue:"Off");o&&this.setValue(l,c,e.xref,a);l.set("AS",c);l.set("M",`D:${getModificationDate()}`);void 0!==s&&l.set("F",s);const h=this._getMKDict(i);h&&l.set("MK",h);a.put(this.ref,{data:l,xfa:f,needAppearances:!1})}_getDefaultCheckedAppearance(e,t){const{width:n,height:a}=this,r=[0,0,n,a],s=.8*Math.min(n,a);let i,o;if("check"===t){i={width:.755*s,height:.705*s};o="3"}else if("disc"===t){i={width:.791*s,height:.705*s};o="l"}else unreachable(`_getDefaultCheckedAppearance - unsupported type: ${t}`);const l=`q BT /PdfJsZaDb ${s} Tf 0 g ${numberToString((n-i.width)/2)} ${numberToString((a-i.height)/2)} Td (${o}) Tj ET Q`,f=new Dict(e.xref);f.set("FormType",1);f.setIfName("Subtype","Form");f.setIfName("Type","XObject");f.set("BBox",r);f.set("Matrix",[1,0,0,1,0,0]);f.set("Length",l.length);const c=new Dict(e.xref),h=new Dict(e.xref);h.set("PdfJsZaDb",this.fallbackFontDict);c.set("Font",h);f.set("Resources",c);this.checkedAppearance=new StringStream(l);this.checkedAppearance.dict=f;this._streams.push(this.checkedAppearance)}_processCheckBox(e){const t=e.dict.get("AP");if(!(t instanceof Dict))return;const n=t.get("N");if(!(n instanceof Dict))return;const a=this._decodeFormValue(e.dict.get("AS"));"string"==typeof a&&(this.data.fieldValue=a);const r=null!==this.data.fieldValue&&"Off"!==this.data.fieldValue?this.data.fieldValue:"Yes",s=this._decodeFormValue(n.getKeys());if(0===s.length)s.push("Off",r);else if(1===s.length)"Off"===s[0]?s.push(r):s.unshift("Off");else if(s.includes(r)){s.length=0;s.push("Off",r)}else{const e=s.find(e=>"Off"!==e);s.length=0;s.push("Off",e)}s.includes(this.data.fieldValue)||(this.data.fieldValue="Off");this.data.exportValue=s[1];const i=n.get(this.data.exportValue);this.checkedAppearance=i instanceof BaseStream?i:null;const o=n.get("Off");this.uncheckedAppearance=o instanceof BaseStream?o:null;this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(e,"check");this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance);this._fallbackFontDict=this.fallbackFontDict;null===this.data.defaultFieldValue&&(this.data.defaultFieldValue="Off")}_processRadioButton(e){this.data.buttonValue=null;const t=e.dict.get("Parent");if(t instanceof Dict){this.parent=e.dict.getRaw("Parent");const n=t.get("V");n instanceof Name&&(this.data.fieldValue=this._decodeFormValue(n))}const n=e.dict.get("AP");if(!(n instanceof Dict))return;const a=n.get("N");if(!(a instanceof Dict))return;for(const e of a.getKeys())if("Off"!==e){this.data.buttonValue=this._decodeFormValue(e);break}const r=a.get(this.data.buttonValue);this.checkedAppearance=r instanceof BaseStream?r:null;const s=a.get("Off");this.uncheckedAppearance=s instanceof BaseStream?s:null;this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(e,"disc");this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance);this._fallbackFontDict=this.fallbackFontDict;null===this.data.defaultFieldValue&&(this.data.defaultFieldValue="Off")}_processPushButton(e){const{dict:t,annotationGlobals:n}=e;if(t.has("A")||t.has("AA")||this.data.alternativeText){this.data.isTooltipOnly=!t.has("A")&&!t.has("AA");Catalog.parseDestDictionary({destDict:t,resultObj:this.data,docBaseUrl:n.baseUrl,docAttachments:n.attachments})}else warn("Push buttons without action dictionaries are not supported")}getFieldObject(){let e,t="button";if(this.data.checkBox){t="checkbox";e=this.data.exportValue}else if(this.data.radioButton){t="radiobutton";e=this.data.buttonValue}return{id:this.data.id,value:this.data.fieldValue||"Off",defaultValue:this.data.defaultFieldValue,exportValues:e,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,hidden:this.data.hidden,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:t}}get fallbackFontDict(){const e=new Dict;e.setIfName("BaseFont","ZapfDingbats");e.setIfName("Type","FallbackType");e.setIfName("Subtype","FallbackType");e.setIfName("Encoding","ZapfDingbatsEncoding");return shadow(this,"fallbackFontDict",e)}}class ChoiceWidgetAnnotation extends WidgetAnnotation{constructor(e){super(e);const{dict:t,xref:n}=e;this.indices=t.getArray("I");this.hasIndices=Array.isArray(this.indices)&&this.indices.length>0;this.data.options=[];const a=getInheritableProperty({dict:t,key:"Opt"});if(Array.isArray(a))for(let e=0,t=a.length;e<t;e++){const t=n.fetchIfRef(a[e]),r=Array.isArray(t);this.data.options[e]={exportValue:this._decodeFormValue(r?n.fetchIfRef(t[0]):t),displayValue:this._decodeFormValue(r?n.fetchIfRef(t[1]):t)}}if(this.hasIndices){this.data.fieldValue=[];const e=this.data.options.length;for(const t of this.indices)Number.isInteger(t)&&t>=0&&t<e&&this.data.fieldValue.push(this.data.options[t].exportValue)}else"string"==typeof this.data.fieldValue?this.data.fieldValue=[this.data.fieldValue]:this.data.fieldValue||=[];0===this.data.options.length&&this.data.fieldValue.length>0&&(this.data.options=this.data.fieldValue.map(e=>({exportValue:e,displayValue:e})));this.data.combo=this.hasFieldFlag(J);this.data.multiSelect=this.hasFieldFlag(Z);this._hasText=!0}getFieldObject(){const e=this.data.combo?"combobox":"listbox",t=this.data.fieldValue.length>0?this.data.fieldValue[0]:null;return{id:this.data.id,value:t,defaultValue:this.data.defaultFieldValue,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,numItems:this.data.fieldValue.length,multipleSelection:this.data.multiSelect,hidden:this.data.hidden,actions:this.data.actions,items:this.data.options,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:e}}amendSavedDict(e,t){if(!this.hasIndices)return;let n=e?.get(this.data.id)?.value;Array.isArray(n)||(n=[n]);const a=[],{options:r}=this.data;for(let e=0,t=0,s=r.length;e<s;e++)if(r[e].exportValue===n[t]){a.push(e);t+=1}t.set("I",a)}async _getAppearance(e,t,n,a){if(this.data.combo)return super._getAppearance(e,t,n,a);let s,i;const o=a?.get(this.data.id);if(o){i=o.rotation;s=o.value}if(void 0===i&&void 0===s&&!this._needAppearances)return null;void 0===s?s=this.data.fieldValue:Array.isArray(s)||(s=[s]);let{width:l,height:f}=this;90!==i&&270!==i||([l,f]=[f,l]);const c=this.data.options.length,h=[];for(let e=0;e<c;e++){const{exportValue:t}=this.data.options[e];s.includes(t)&&h.push(e)}this._defaultAppearance||(this.data.defaultAppearanceData=parseDefaultAppearance(this._defaultAppearance="/Helvetica 0 Tf 0 g"));const u=await WidgetAnnotation._getFontData(e,t,this.data.defaultAppearanceData,this._fieldResources.mergedResources);let m,{fontSize:p}=this.data.defaultAppearanceData;if(p)m=this._defaultAppearance;else{const e=(f-1)/c;let t,n=-1;for(const{displayValue:e}of this.data.options){const a=this._getTextWidth(e,u);if(a>n){n=a;t=e}}[m,p]=this._computeFontSize(e,l-4,t,u,-1)}const d=p*r,g=(d-p)/2,b=Math.floor(f/d);let w=0;if(h.length>0){const e=Math.min(...h),t=Math.max(...h);w=Math.max(0,t-b+1);w>e&&(w=e)}const j=Math.min(w+b+1,c),k=["/Tx BMC q",`1 1 ${l} ${f} re W n`];if(h.length){k.push("0.600006 0.756866 0.854904 rg");for(const e of h)w<=e&&e<j&&k.push(`1 ${f-(e-w+1)*d} ${l} ${d} re f`)}k.push("BT",m,`1 0 0 1 0 ${f} Tm`);const y={shift:0};for(let e=w;e<j;e++){const{displayValue:t}=this.data.options[e],n=e===w?g:0;k.push(this._renderText(t,u,p,l,0,y,2,-d+n))}k.push("ET Q EMC");return k.join("\n")}}class SignatureWidgetAnnotation extends WidgetAnnotation{constructor(e){super(e);this.data.fieldValue=null;this.data.hasOwnCanvas=this.data.noRotate;this.data.noHTML=!this.data.hasOwnCanvas}getFieldObject(){return{id:this.data.id,value:null,page:this.data.pageIndex,type:"signature"}}}class TextAnnotation extends MarkupAnnotation{constructor(e){super(e);this.data.noRotate=!0;this.data.hasOwnCanvas=this.data.noRotate;this.data.noHTML=!1;const{dict:t}=e;if(this.data.hasAppearance)this.data.name="NoIcon";else{this.data.rect[1]=this.data.rect[3]-22;this.data.rect[2]=this.data.rect[0]+22;this.data.name=t.has("Name")?t.get("Name").name:"Note"}if(t.has("State")){this.data.state=t.get("State")||null;this.data.stateModel=t.get("StateModel")||null}else{this.data.state=null;this.data.stateModel=null}}}class LinkAnnotation extends Annotation{constructor(e){super(e);const{dict:t,annotationGlobals:n}=e;this.data.noHTML=!1;const a=getQuadPoints(t,this.rectangle);a&&(this.data.quadPoints=a);this.data.borderColor||=this.data.color;Catalog.parseDestDictionary({destDict:t,resultObj:this.data,docBaseUrl:n.baseUrl,docAttachments:n.attachments})}get overlaysTextContent(){return!0}}class PopupAnnotation extends Annotation{constructor(e){super(e);const{dict:t}=e;this.data.noHTML=!1;0!==this.width&&0!==this.height||(this.data.rect=null);let n=t.get("Parent");if(!n){warn("Popup annotation has a missing or invalid parent annotation.");return}this.data.parentRect=lookupNormalRect(n.getArray("Rect"),null);this.data.creationDate=n.get("CreationDate")||"";isName(n.get("RT"),D)&&(n=n.get("IRT"));if(n.has("M")){this.setModificationDate(n.get("M"));this.data.modificationDate=this.modificationDate}else this.data.modificationDate=null;if(n.has("C")){this.setColor(n.getArray("C"));this.data.color=this.color}else this.data.color=null;if(!this.viewable){const e=n.get("F");this._isViewable(e)&&this.setFlags(e)}this.setTitle(n.get("T"));this.data.titleObj=this._title;this.setContents(n.get("Contents"));this.data.contentsObj=this._contents;n.has("RC")&&(this.data.richText=XFAFactory.getRichTextAsHtml(n.get("RC")));this.data.open=!!t.get("Open")}static createNewDict(e,t,n){const{oldAnnotation:a,rect:r,parent:s}=e,i=a||new Dict(t);i.setIfNotExists("Type",Name.get("Annot"));i.setIfNotExists("Subtype",Name.get("Popup"));i.setIfNotExists("Open",!1);i.setIfArray("Rect",r);i.set("Parent",s);return i}static async createNewAppearanceStream(e,t,n){return null}}class FreeTextAnnotation extends MarkupAnnotation{constructor(e){super(e);this.data.hasOwnCanvas=this.data.noRotate;this.data.isEditable=!this.data.noHTML;this.data.noHTML=!1;const{annotationGlobals:t,evaluatorOptions:n,xref:a}=e;this.setDefaultAppearance(e);this._hasAppearance=!!this.appearance;if(this._hasAppearance){const{fontColor:e,fontSize:r}=function parseAppearanceStream(e,t,n,a){return new AppearanceStreamEvaluator(e,t,n,a).parse()}(this.appearance,n,a,t.globalColorSpaceCache);this.data.defaultAppearanceData.fontColor=e;this.data.defaultAppearanceData.fontSize=r||10}else{this.data.defaultAppearanceData.fontSize||=10;const{fontColor:t,fontSize:n}=this.data.defaultAppearanceData;if(this._contents.str){this.data.textContent=this._contents.str.split(/\r\n?|\n/).map(e=>e.trimEnd());const{coords:e,bbox:t,matrix:a}=FakeUnicodeFont.getFirstPositionInfo(this.rectangle,this.rotation,n);this.data.textPosition=this._transformPoint(e,t,a)}if(this._isOffscreenCanvasSupported){const r=e.dict.get("CA"),s=new FakeUnicodeFont(a,"sans-serif");this.appearance=s.createAppearance(this._contents.str,this.rectangle,this.rotation,n,t,r);this._streams.push(this.appearance)}else warn("FreeTextAnnotation: OffscreenCanvas is not supported, annotation may not render correctly.")}}get hasTextContent(){return this._hasAppearance}static createNewDict(e,t,{apRef:n,ap:a}){const{color:r,date:s,fontSize:i,oldAnnotation:o,rect:l,rotation:f,user:c,value:h}=e,u=o||new Dict(t);u.setIfNotExists("Type",Name.get("Annot"));u.setIfNotExists("Subtype",Name.get("FreeText"));u.set(o?"M":"CreationDate",`D:${getModificationDate(s)}`);o&&u.delete("RC");u.setIfArray("Rect",l);const m=`/Helv ${i} Tf ${getPdfColor(r,!0)}`;u.set("DA",m);u.setIfDefined("Contents",stringToAsciiOrUTF16BE(h));u.setIfNotExists("F",4);u.setIfNotExists("Border",[0,0,0]);u.setIfNumber("Rotate",f);u.setIfDefined("T",stringToAsciiOrUTF16BE(c));if(n||a){const e=new Dict(t);u.set("AP",e);e.set("N",n||a)}return u}static async createNewAppearanceStream(e,t,n){const{baseFontRef:a,evaluator:s,task:i}=n,{color:o,fontSize:l,rect:f,rotation:c,value:h}=e;if(!o)return null;const u=new Dict(t),m=new Dict(t);if(a)m.set("Helv",a);else{const e=new Dict(t);e.setIfName("BaseFont","Helvetica");e.setIfName("Type","Font");e.setIfName("Subtype","Type1");e.setIfName("Encoding","WinAnsiEncoding");m.set("Helv",e)}u.set("Font",m);const p=await WidgetAnnotation._getFontData(s,i,{fontName:"Helv",fontSize:l},u),[d,g,b,w]=f;let j=b-d,k=w-g;c%180!=0&&([j,k]=[k,j]);const y=h.split("\n"),q=l/1e3;let v=-1/0;const S=[];for(let e of y){const t=p.encodeString(e);if(t.length>1)return null;e=t.join("");S.push(e);let n=0;const a=p.charsToGlyphs(e);for(const e of a)n+=e.width*q;v=Math.max(v,n)}let x=1;v>j&&(x=j/v);let C=1;const T=r*l,O=1*l,R=T*y.length;R>k&&(C=k/R);const H=l*Math.min(x,C);let D,M,E;switch(c){case 0:E=[1,0,0,1];M=[f[0],f[1],j,k];D=[f[0],f[3]-O];break;case 90:E=[0,1,-1,0];M=[f[1],-f[2],j,k];D=[f[1],-f[0]-O];break;case 180:E=[-1,0,0,-1];M=[-f[2],-f[3],j,k];D=[-f[2],-f[1]-O];break;case 270:E=[0,-1,1,0];M=[-f[3],f[0],j,k];D=[-f[3],f[2]-O]}const N=["q",`${E.join(" ")} 0 0 cm`,`${M.join(" ")} re W n`,"BT",`${getPdfColor(o,!0)}`,`0 Tc /Helv ${numberToString(H)} Tf`];N.push(`${D.join(" ")} Td (${escapeString(S[0])}) Tj`);const z=numberToString(T);for(let e=1,t=S.length;e<t;e++){const t=S[e];N.push(`0 -${z} Td (${escapeString(t)}) Tj`)}N.push("ET","Q");const _=N.join("\n"),L=new Dict(t);L.set("FormType",1);L.setIfName("Subtype","Form");L.setIfName("Type","XObject");L.set("BBox",f);L.set("Resources",u);L.set("Matrix",[1,0,0,1,-f[0],-f[1]]);const U=new StringStream(_);U.dict=L;return U}}class LineAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:n}=e;this.data.hasOwnCanvas=this.data.noRotate;this.data.noHTML=!1;const a=lookupRect(t.getArray("L"),[0,0,0,0]);this.data.lineCoordinates=Util.normalizeRect(a);this.setLineEndings(t.getArray("LE"));this.data.lineEndings=this.lineEndings;if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),r=t.get("CA"),s=getPdfColorArray(getRgbColor(t.getArray("IC"),null)),i=s?r:null,o=this.borderStyle.width||1,l=2*o,f=[this.data.lineCoordinates[0]-l,this.data.lineCoordinates[1]-l,this.data.lineCoordinates[2]+l,this.data.lineCoordinates[3]+l];Util.intersect(this.rectangle,f)||(this.rectangle=f);this._setDefaultAppearance({xref:n,extra:`${o} w`,strokeColor:e,fillColor:s,strokeAlpha:r,fillAlpha:i,pointsCallback:(e,t)=>{e.push(`${a[0]} ${a[1]} m`,`${a[2]} ${a[3]} l`,"S");return[t[0]-o,t[7]-o,t[2]+o,t[3]+o]}})}}}class SquareAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:n}=e;this.data.hasOwnCanvas=this.data.noRotate;this.data.noHTML=!1;if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),a=t.get("CA"),r=getPdfColorArray(getRgbColor(t.getArray("IC"),null)),s=r?a:null;if(0===this.borderStyle.width&&!r)return;this._setDefaultAppearance({xref:n,extra:`${this.borderStyle.width} w`,strokeColor:e,fillColor:r,strokeAlpha:a,fillAlpha:s,pointsCallback:(e,t)=>{const n=t[4]+this.borderStyle.width/2,a=t[5]+this.borderStyle.width/2,s=t[6]-t[4]-this.borderStyle.width,i=t[3]-t[7]-this.borderStyle.width;e.push(`${n} ${a} ${s} ${i} re`);r?e.push("B"):e.push("S");return[t[0],t[7],t[2],t[3]]}})}}}class CircleAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:n}=e;if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),a=t.get("CA"),r=getPdfColorArray(getRgbColor(t.getArray("IC"),null)),s=r?a:null;if(0===this.borderStyle.width&&!r)return;const i=4/3*Math.tan(Math.PI/8);this._setDefaultAppearance({xref:n,extra:`${this.borderStyle.width} w`,strokeColor:e,fillColor:r,strokeAlpha:a,fillAlpha:s,pointsCallback:(e,t)=>{const n=t[0]+this.borderStyle.width/2,a=t[1]-this.borderStyle.width/2,s=t[6]-this.borderStyle.width/2,o=t[7]+this.borderStyle.width/2,l=n+(s-n)/2,f=a+(o-a)/2,c=(s-n)/2*i,h=(o-a)/2*i;e.push(`${l} ${o} m`,`${l+c} ${o} ${s} ${f+h} ${s} ${f} c`,`${s} ${f-h} ${l+c} ${a} ${l} ${a} c`,`${l-c} ${a} ${n} ${f-h} ${n} ${f} c`,`${n} ${f+h} ${l-c} ${o} ${l} ${o} c`,"h");r?e.push("B"):e.push("S");return[t[0],t[7],t[2],t[3]]}})}}}class PolylineAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:n}=e;this.data.hasOwnCanvas=this.data.noRotate;this.data.noHTML=!1;this.data.vertices=null;if(!(this instanceof PolygonAnnotation)){this.setLineEndings(t.getArray("LE"));this.data.lineEndings=this.lineEndings}const a=t.getArray("Vertices");if(!isNumberArray(a,null))return;const r=this.data.vertices=Float32Array.from(a);if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),a=t.get("CA");let s,i=getRgbColor(t.getArray("IC"),null);i&&(i=getPdfColorArray(i));s=i?this.color?i.every((t,n)=>t===e[n])?"f":"B":"f":"S";const o=this.borderStyle.width||1,l=2*o,f=[1/0,1/0,-1/0,-1/0];for(let e=0,t=r.length;e<t;e+=2)Util.rectBoundingBox(r[e]-l,r[e+1]-l,r[e]+l,r[e+1]+l,f);Util.intersect(this.rectangle,f)||(this.rectangle=f);this._setDefaultAppearance({xref:n,extra:`${o} w`,strokeColor:e,strokeAlpha:a,fillColor:i,fillAlpha:i?a:null,pointsCallback:(e,t)=>{for(let t=0,n=r.length;t<n;t+=2)e.push(`${r[t]} ${r[t+1]} ${0===t?"m":"l"}`);e.push(s);return[t[0],t[7],t[2],t[3]]}})}}}class PolygonAnnotation extends PolylineAnnotation{}class CaretAnnotation extends MarkupAnnotation{}class InkAnnotation extends MarkupAnnotation{constructor(e){super(e);this.data.hasOwnCanvas=this.data.noRotate;this.data.noHTML=!1;const{dict:t,xref:n}=e;this.data.inkLists=[];this.data.isEditable=!this.data.noHTML;this.data.noHTML=!1;this.data.opacity=t.get("CA")||1;const a=t.getArray("InkList");if(Array.isArray(a)){for(let e=0,t=a.length;e<t;++e){if(!Array.isArray(a[e]))continue;const t=new Float32Array(a[e].length);this.data.inkLists.push(t);for(let r=0,s=a[e].length;r<s;r+=2){const s=n.fetchIfRef(a[e][r]),i=n.fetchIfRef(a[e][r+1]);if("number"==typeof s&&"number"==typeof i){t[r]=s;t[r+1]=i}}}if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),a=t.get("CA"),r=this.borderStyle.width||1,s=2*r,i=[1/0,1/0,-1/0,-1/0];for(const e of this.data.inkLists)for(let t=0,n=e.length;t<n;t+=2)Util.rectBoundingBox(e[t]-s,e[t+1]-s,e[t]+s,e[t+1]+s,i);Util.intersect(this.rectangle,i)||(this.rectangle=i);this._setDefaultAppearance({xref:n,extra:`${r} w`,strokeColor:e,strokeAlpha:a,pointsCallback:(e,t)=>{for(const t of this.data.inkLists){for(let n=0,a=t.length;n<a;n+=2)e.push(`${t[n]} ${t[n+1]} ${0===n?"m":"l"}`);e.push("S")}return[t[0],t[7],t[2],t[3]]}})}}}static createNewDict(e,t,{apRef:n,ap:a}){const{oldAnnotation:r,color:s,date:i,opacity:o,paths:l,outlines:f,rect:c,rotation:h,thickness:u,user:m}=e,p=r||new Dict(t);p.setIfNotExists("Type",Name.get("Annot"));p.setIfNotExists("Subtype",Name.get("Ink"));p.set(r?"M":"CreationDate",`D:${getModificationDate(i)}`);p.setIfArray("Rect",c);p.setIfArray("InkList",f?.points||l?.points);p.setIfNotExists("F",4);p.setIfNumber("Rotate",h);p.setIfDefined("T",stringToAsciiOrUTF16BE(m));f&&p.setIfName("IT","InkHighlight");if(u>0){const e=new Dict(t);p.set("BS",e);e.set("W",u)}p.setIfArray("C",getPdfColorArray(s));p.setIfNumber("CA",o);if(a||n){const e=new Dict(t);p.set("AP",e);e.set("N",n||a)}return p}static async createNewAppearanceStream(e,t,n){if(e.outlines)return this.createNewAppearanceStreamForHighlight(e,t,n);const{color:a,rect:r,paths:s,thickness:i,opacity:o}=e;if(!a)return null;const l=[`${i} w 1 J 1 j`,`${getPdfColor(a,!1)}`];1!==o&&l.push("/R0 gs");for(const e of s.lines){l.push(`${numberToString(e[4])} ${numberToString(e[5])} m`);for(let t=6,n=e.length;t<n;t+=6)if(isNaN(e[t]))l.push(`${numberToString(e[t+4])} ${numberToString(e[t+5])} l`);else{const[n,a,r,s,i,o]=e.slice(t,t+6);l.push([n,a,r,s,i,o].map(numberToString).join(" ")+" c")}6===e.length&&l.push(`${numberToString(e[4])} ${numberToString(e[5])} l`)}l.push("S");const f=l.join("\n"),c=new Dict(t);c.set("FormType",1);c.setIfName("Subtype","Form");c.setIfName("Type","XObject");c.set("BBox",r);c.set("Length",f.length);if(1!==o){const e=new Dict(t),n=new Dict(t),a=new Dict(t);a.set("CA",o);a.setIfName("Type","ExtGState");n.set("R0",a);e.set("ExtGState",n);c.set("Resources",e)}const h=new StringStream(f);h.dict=c;return h}static async createNewAppearanceStreamForHighlight(e,t,n){const{color:a,rect:r,outlines:{outline:s},opacity:i}=e;if(!a)return null;const o=[`${getPdfColor(a,!0)}`,"/R0 gs"];o.push(`${numberToString(s[4])} ${numberToString(s[5])} m`);for(let e=6,t=s.length;e<t;e+=6)if(isNaN(s[e]))o.push(`${numberToString(s[e+4])} ${numberToString(s[e+5])} l`);else{const[t,n,a,r,i,l]=s.slice(e,e+6);o.push([t,n,a,r,i,l].map(numberToString).join(" ")+" c")}o.push("h f");const l=o.join("\n"),f=new Dict(t);f.set("FormType",1);f.setIfName("Subtype","Form");f.setIfName("Type","XObject");f.set("BBox",r);f.set("Length",l.length);const c=new Dict(t),h=new Dict(t);c.set("ExtGState",h);f.set("Resources",c);const u=new Dict(t);h.set("R0",u);u.setIfName("BM","Multiply");if(1!==i){u.set("ca",i);u.setIfName("Type","ExtGState")}const m=new StringStream(l);m.dict=f;return m}}class HighlightAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:n}=e;this.data.isEditable=!this.data.noHTML;this.data.noHTML=!1;this.data.opacity=t.get("CA")||1;if(this.data.quadPoints=getQuadPoints(t,null)){const e=this.appearance?.dict.get("Resources");if(!this.appearance||!e?.has("ExtGState")){this.appearance&&warn("HighlightAnnotation - ignoring built-in appearance stream.");const e=getPdfColorArray(this.color,[1,1,0]),a=t.get("CA");this._setDefaultAppearance({xref:n,fillColor:e,blendMode:"Multiply",fillAlpha:a,pointsCallback:(e,t)=>{e.push(`${t[0]} ${t[1]} m`,`${t[2]} ${t[3]} l`,`${t[6]} ${t[7]} l`,`${t[4]} ${t[5]} l`,"f");return[t[0],t[7],t[2],t[3]]}})}}else this.data.popupRef=null}get overlaysTextContent(){return!0}static createNewDict(e,t,{apRef:n,ap:a}){const{color:r,date:s,oldAnnotation:i,opacity:o,rect:l,rotation:f,user:c,quadPoints:h}=e,u=i||new Dict(t);u.setIfNotExists("Type",Name.get("Annot"));u.setIfNotExists("Subtype",Name.get("Highlight"));u.set(i?"M":"CreationDate",`D:${getModificationDate(s)}`);u.setIfArray("Rect",l);u.setIfNotExists("F",4);u.setIfNotExists("Border",[0,0,0]);u.setIfNumber("Rotate",f);u.setIfArray("QuadPoints",h);u.setIfArray("C",getPdfColorArray(r));u.setIfNumber("CA",o);u.setIfDefined("T",stringToAsciiOrUTF16BE(c));if(n||a){const e=new Dict(t);u.set("AP",e);e.set("N",n||a)}return u}static async createNewAppearanceStream(e,t,n){const{color:a,rect:r,outlines:s,opacity:i}=e;if(!a)return null;const o=[`${getPdfColor(a,!0)}`,"/R0 gs"],l=[];for(const e of s){l.length=0;l.push(`${numberToString(e[0])} ${numberToString(e[1])} m`);for(let t=2,n=e.length;t<n;t+=2)l.push(`${numberToString(e[t])} ${numberToString(e[t+1])} l`);l.push("h");o.push(l.join("\n"))}o.push("f*");const f=o.join("\n"),c=new Dict(t);c.set("FormType",1);c.setIfName("Subtype","Form");c.setIfName("Type","XObject");c.set("BBox",r);c.set("Length",f.length);const h=new Dict(t),u=new Dict(t);h.set("ExtGState",u);c.set("Resources",h);const m=new Dict(t);u.set("R0",m);m.setIfName("BM","Multiply");if(1!==i){m.set("ca",i);m.setIfName("Type","ExtGState")}const p=new StringStream(f);p.dict=c;return p}}class UnderlineAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:n}=e;if(this.data.quadPoints=getQuadPoints(t,null)){if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),a=t.get("CA");this._setDefaultAppearance({xref:n,extra:"[] 0 d 0.571 w",strokeColor:e,strokeAlpha:a,pointsCallback:(e,t)=>{e.push(`${t[4]} ${t[5]+1.3} m`,`${t[6]} ${t[7]+1.3} l`,"S");return[t[0],t[7],t[2],t[3]]}})}}else this.data.popupRef=null}get overlaysTextContent(){return!0}}class SquigglyAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:n}=e;if(this.data.quadPoints=getQuadPoints(t,null)){if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),a=t.get("CA");this._setDefaultAppearance({xref:n,extra:"[] 0 d 1 w",strokeColor:e,strokeAlpha:a,pointsCallback:(e,t)=>{const n=(t[1]-t[5])/6;let a=n,r=t[4];const s=t[5],i=t[6];e.push(`${r} ${s+a} m`);do{r+=2;a=0===a?n:0;e.push(`${r} ${s+a} l`)}while(r<i);e.push("S");return[t[4],s-2*n,i,s+2*n]}})}}else this.data.popupRef=null}get overlaysTextContent(){return!0}}class StrikeOutAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:n}=e;if(this.data.quadPoints=getQuadPoints(t,null)){if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),a=t.get("CA");this._setDefaultAppearance({xref:n,extra:"[] 0 d 1 w",strokeColor:e,strokeAlpha:a,pointsCallback:(e,t)=>{e.push((t[0]+t[4])/2+" "+(t[1]+t[5])/2+" m",(t[2]+t[6])/2+" "+(t[3]+t[7])/2+" l","S");return[t[0],t[7],t[2],t[3]]}})}}else this.data.popupRef=null}get overlaysTextContent(){return!0}}class StampAnnotation extends MarkupAnnotation{#He=null;constructor(e){super(e);this.data.hasOwnCanvas=this.data.noRotate;this.data.isEditable=!this.data.noHTML;this.data.noHTML=!1}mustBeViewedWhenEditing(e,t=null){if(e){if(!this.data.isEditable)return!0;this.#He??=this.data.hasOwnCanvas;this.data.hasOwnCanvas=!0;return!0}if(null!==this.#He){this.data.hasOwnCanvas=this.#He;this.#He=null}return!t?.has(this.data.id)}static async createImage(e,t){const{width:n,height:a}=e,r=new OffscreenCanvas(n,a),s=r.getContext("2d",{alpha:!0});s.drawImage(e,0,0);const i=s.getImageData(0,0,n,a).data,o=new Uint32Array(i.buffer),l=o.some(FeatureTest.isLittleEndian?e=>e>>>24!=255:e=>!!(255&~e));if(l){s.fillStyle="white";s.fillRect(0,0,n,a);s.drawImage(e,0,0)}const f=r.convertToBlob({type:"image/jpeg",quality:1}).then(e=>e.arrayBuffer()),c=Name.get("XObject"),h=Name.get("Image"),u=new Dict(t);u.set("Type",c);u.set("Subtype",h);u.set("BitsPerComponent",8);u.setIfName("ColorSpace","DeviceRGB");u.setIfName("Filter","DCTDecode");u.set("BBox",[0,0,n,a]);u.set("Width",n);u.set("Height",a);let m=null;if(l){const e=new Uint8Array(o.length);if(FeatureTest.isLittleEndian)for(let t=0,n=o.length;t<n;t++)e[t]=o[t]>>>24;else for(let t=0,n=o.length;t<n;t++)e[t]=255&o[t];const r=new Dict(t);r.set("Type",c);r.set("Subtype",h);r.set("BitsPerComponent",8);r.setIfName("ColorSpace","DeviceGray");r.set("Width",n);r.set("Height",a);m=new Stream(e,0,0,r)}return{imageStream:new Stream(await f,0,0,u),smaskStream:m,width:n,height:a}}static createNewDict(e,t,{apRef:n,ap:a}){const{date:r,oldAnnotation:s,rect:i,rotation:o,user:l}=e,f=s||new Dict(t);f.setIfNotExists("Type",Name.get("Annot"));f.setIfNotExists("Subtype",Name.get("Stamp"));f.set(s?"M":"CreationDate",`D:${getModificationDate(r)}`);f.setIfArray("Rect",i);f.setIfNotExists("F",4);f.setIfNotExists("Border",[0,0,0]);f.setIfNumber("Rotate",o);f.setIfDefined("T",stringToAsciiOrUTF16BE(l));if(n||a){const e=new Dict(t);f.set("AP",e);e.set("N",n||a)}return f}static async#De(e,t){const{areContours:n,color:a,rect:r,lines:s,thickness:i}=e;if(!a)return null;const o=[`${i} w 1 J 1 j`,`${getPdfColor(a,n)}`];for(const e of s){o.push(`${numberToString(e[4])} ${numberToString(e[5])} m`);for(let t=6,n=e.length;t<n;t+=6)if(isNaN(e[t]))o.push(`${numberToString(e[t+4])} ${numberToString(e[t+5])} l`);else{const[n,a,r,s,i,l]=e.slice(t,t+6);o.push([n,a,r,s,i,l].map(numberToString).join(" ")+" c")}6===e.length&&o.push(`${numberToString(e[4])} ${numberToString(e[5])} l`)}o.push(n?"F":"S");const l=o.join("\n"),f=new Dict(t);f.set("FormType",1);f.setIfName("Subtype","Form");f.setIfName("Type","XObject");f.set("BBox",r);f.set("Length",l.length);const c=new StringStream(l);c.dict=f;return c}static async createNewAppearanceStream(e,t,n){if(e.oldAnnotation)return null;if(e.isSignature)return this.#De(e,t);const{rotation:a}=e,{imageRef:r,width:s,height:i}=n.image,o=new Dict(t),l=new Dict(t);o.set("XObject",l);l.set("Im0",r);const f=`q ${s} 0 0 ${i} 0 0 cm /Im0 Do Q`,c=new Dict(t);c.set("FormType",1);c.setIfName("Subtype","Form");c.setIfName("Type","XObject");c.set("BBox",[0,0,s,i]);c.set("Resources",o);if(a){const e=getRotationMatrix(a,s,i);c.set("Matrix",e)}const h=new StringStream(f);h.dict=c;return h}}class FileAttachmentAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t}=e,n=new FileSpec(t.get("FS"));this.data.hasOwnCanvas=this.data.noRotate;this.data.noHTML=!1;this.data.file=n.serializable;const a=t.get("Name");this.data.name=a instanceof Name?stringToPDFString(a.name):"PushPin";const r=t.get("ca");this.data.fillAlpha="number"==typeof r&&r>=0&&r<=1?r:null}}const ll={get r(){return shadow(this,"r",new Uint8Array([7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21]))},get k(){return shadow(this,"k",new Int32Array([-680876936,-389564586,606105819,-1044525330,-176418897,1200080426,-1473231341,-45705983,1770035416,-1958414417,-42063,-1990404162,1804603682,-40341101,-1502002290,1236535329,-165796510,-1069501632,643717713,-373897302,-701558691,38016083,-660478335,-405537848,568446438,-1019803690,-187363961,1163531501,-1444681467,-51403784,1735328473,-1926607734,-378558,-2022574463,1839030562,-35309556,-1530992060,1272893353,-155497632,-1094730640,681279174,-358537222,-722521979,76029189,-640364487,-421815835,530742520,-995338651,-198630844,1126891415,-1416354905,-57434055,1700485571,-1894986606,-1051523,-2054922799,1873313359,-30611744,-1560198380,1309151649,-145523070,-1120210379,718787259,-343485551]))}};function calculateMD5(e,t,n){let a=1732584193,r=-271733879,s=-1732584194,i=271733878;const o=n+72&-64,l=new Uint8Array(o);let f,c;for(f=0;f<n;++f)l[f]=e[t++];l[f++]=128;const h=o-8;f<h&&(f=h);l[f++]=n<<3&255;l[f++]=n>>5&255;l[f++]=n>>13&255;l[f++]=n>>21&255;l[f++]=n>>>29&255;f+=3;const u=new Int32Array(16),{k:m,r:p}=ll;for(f=0;f<o;){for(c=0;c<16;++c,f+=4)u[c]=l[f]|l[f+1]<<8|l[f+2]<<16|l[f+3]<<24;let e,t,n=a,o=r,h=s,d=i;for(c=0;c<64;++c){if(c<16){e=o&h|~o&d;t=c}else if(c<32){e=d&o|~d&h;t=5*c+1&15}else if(c<48){e=o^h^d;t=3*c+5&15}else{e=h^(o|~d);t=7*c&15}const a=d,r=n+e+m[c]+u[t]|0,s=p[c];d=h;h=o;o=o+(r<<s|r>>>32-s)|0;n=a}a=a+n|0;r=r+o|0;s=s+h|0;i=i+d|0}return new Uint8Array([255&a,a>>8&255,a>>16&255,a>>>24&255,255&r,r>>8&255,r>>16&255,r>>>24&255,255&s,s>>8&255,s>>16&255,s>>>24&255,255&i,i>>8&255,i>>16&255,i>>>24&255])}function decodeString(e){try{return stringToUTF8String(e)}catch(t){warn(`UTF-8 decoding failed: "${t}".`);return e}}class DatasetXMLParser extends SimpleXMLParser{node=null;onEndElement(e){const t=super.onEndElement(e);if(t&&"xfa:datasets"===e){this.node=t;throw new Error("Aborting DatasetXMLParser.")}}}class DatasetReader{constructor(e){if(e.datasets)this.node=new SimpleXMLParser({hasAttributes:!0}).parseFromString(e.datasets).documentElement;else{const t=new DatasetXMLParser({hasAttributes:!0});try{t.parseFromString(e["xdp:xdp"])}catch{}this.node=t.node}}getValue(e){if(!this.node||!e)return"";const t=this.node.searchNode(parseXFAPath(e),0);if(!t)return"";const n=t.firstChild;return"value"===n?.nodeName?t.children.map(e=>decodeString(e.textContent)):decodeString(t.textContent)}}class SingleIntersector{#Me;minX=1/0;minY=1/0;maxX=-1/0;maxY=-1/0;#Pe=null;#Ee=[];#Ne=[];#ze=-1;#_e=!1;constructor(e){this.#Me=e;const t=e.data.quadPoints;if(t){for(let e=0,n=t.length;e<n;e+=8){this.minX=Math.min(this.minX,t[e]);this.maxX=Math.max(this.maxX,t[e+2]);this.minY=Math.min(this.minY,t[e+5]);this.maxY=Math.max(this.maxY,t[e+1])}t.length>8&&(this.#Pe=t)}else[this.minX,this.minY,this.maxX,this.maxY]=e.data.rect}#Le(e,t){if(this.minX>=e||this.maxX<=e||this.minY>=t||this.maxY<=t)return!1;const n=this.#Pe;if(!n)return!0;if(this.#ze>=0){const a=this.#ze;if(!(n[a]>=e||n[a+2]<=e||n[a+5]>=t||n[a+1]<=t))return!0;this.#ze=-1}for(let a=0,r=n.length;a<r;a+=8)if(!(n[a]>=e||n[a+2]<=e||n[a+5]>=t||n[a+1]<=t)){this.#ze=a;return!0}return!1}addGlyph(e,t,n){if(!this.#Le(e,t)){this.disableExtraChars();return!1}if(this.#Ne.length>0){this.#Ee.push(this.#Ne.join(""));this.#Ne.length=0}this.#Ee.push(n);this.#_e=!0;return!0}addExtraChar(e){this.#_e&&this.#Ne.push(e)}disableExtraChars(){if(this.#_e){this.#_e=!1;this.#Ne.length=0}}setText(){this.#Me.data.overlaidText=this.#Ee.join("")}}const fl=64;class Intersector{#Ue=[];#Xe=[];#We;#Ke;#Ve;#Ge;#$e;#Ye;constructor(e){let t=1/0,n=1/0,a=-1/0,r=-1/0;const s=this.#Ue;for(const i of e){if(!i.data.quadPoints&&!i.data.rect)continue;const e=new SingleIntersector(i);s.push(e);t=Math.min(t,e.minX);n=Math.min(n,e.minY);a=Math.max(a,e.maxX);r=Math.max(r,e.maxY)}this.#We=t;this.#Ve=n;this.#Ke=a;this.#Ge=r;this.#$e=63/(a-t);this.#Ye=63/(r-n);for(const e of s){const t=this.#Je(e.minX,e.minY),n=this.#Je(e.maxX,e.maxY),a=(n-t)%fl,r=Math.floor((n-t)/fl);for(let n=t;n<=t+r*fl;n+=fl)for(let t=0;t<=a;t++){let a=this.#Xe[n+t];a||(this.#Xe[n+t]=a=[]);a.push(e)}}}#Je(e,t){return Math.floor((e-this.#We)*this.#$e)+Math.floor((t-this.#Ve)*this.#Ye)*fl}addGlyph(e,t,n,a){const r=e[4]+t/2,s=e[5]+n/2;if(r<this.#We||s<this.#Ve||r>this.#Ke||s>this.#Ge)return;const i=this.#Xe[this.#Je(r,s)];if(i)for(const e of i)e.addGlyph(r,s,a)}addExtraChar(e){for(const t of this.#Ue)t.addExtraChar(e)}setText(){for(const e of this.#Ue)e.setText()}}class Word64{constructor(e,t){this.high=0|e;this.low=0|t}and(e){this.high&=e.high;this.low&=e.low}xor(e){this.high^=e.high;this.low^=e.low}shiftRight(e){if(e>=32){this.low=this.high>>>e-32|0;this.high=0}else{this.low=this.low>>>e|this.high<<32-e;this.high=this.high>>>e|0}}rotateRight(e){let t,n;if(32&e){n=this.low;t=this.high}else{t=this.low;n=this.high}e&=31;this.low=t>>>e|n<<32-e;this.high=n>>>e|t<<32-e}not(){this.high=~this.high;this.low=~this.low}add(e){const t=(this.low>>>0)+(e.low>>>0);let n=(this.high>>>0)+(e.high>>>0);t>4294967295&&(n+=1);this.low=0|t;this.high=0|n}copyTo(e,t){e[t]=this.high>>>24&255;e[t+1]=this.high>>16&255;e[t+2]=this.high>>8&255;e[t+3]=255&this.high;e[t+4]=this.low>>>24&255;e[t+5]=this.low>>16&255;e[t+6]=this.low>>8&255;e[t+7]=255&this.low}assign(e){this.high=e.high;this.low=e.low}}const cl={get k(){return shadow(this,"k",[new Word64(1116352408,3609767458),new Word64(1899447441,602891725),new Word64(3049323471,3964484399),new Word64(3921009573,2173295548),new Word64(961987163,4081628472),new Word64(1508970993,3053834265),new Word64(2453635748,2937671579),new Word64(2870763221,3664609560),new Word64(3624381080,2734883394),new Word64(310598401,1164996542),new Word64(607225278,1323610764),new Word64(1426881987,3590304994),new Word64(1925078388,4068182383),new Word64(2162078206,991336113),new Word64(2614888103,633803317),new Word64(3248222580,3479774868),new Word64(3835390401,2666613458),new Word64(4022224774,944711139),new Word64(264347078,2341262773),new Word64(604807628,2007800933),new Word64(770255983,1495990901),new Word64(1249150122,1856431235),new Word64(1555081692,3175218132),new Word64(1996064986,2198950837),new Word64(2554220882,3999719339),new Word64(2821834349,766784016),new Word64(2952996808,2566594879),new Word64(3210313671,3203337956),new Word64(3336571891,1034457026),new Word64(3584528711,2466948901),new Word64(113926993,3758326383),new Word64(338241895,168717936),new Word64(666307205,1188179964),new Word64(773529912,1546045734),new Word64(1294757372,1522805485),new Word64(1396182291,2643833823),new Word64(1695183700,2343527390),new Word64(1986661051,1014477480),new Word64(2177026350,1206759142),new Word64(2456956037,344077627),new Word64(2730485921,1290863460),new Word64(2820302411,3158454273),new Word64(3259730800,3505952657),new Word64(3345764771,106217008),new Word64(3516065817,3606008344),new Word64(3600352804,1432725776),new Word64(4094571909,1467031594),new Word64(275423344,851169720),new Word64(430227734,3100823752),new Word64(506948616,1363258195),new Word64(659060556,3750685593),new Word64(883997877,3785050280),new Word64(958139571,3318307427),new Word64(1322822218,3812723403),new Word64(1537002063,2003034995),new Word64(1747873779,3602036899),new Word64(1955562222,1575990012),new Word64(2024104815,1125592928),new Word64(2227730452,2716904306),new Word64(2361852424,442776044),new Word64(2428436474,593698344),new Word64(2756734187,3733110249),new Word64(3204031479,2999351573),new Word64(3329325298,3815920427),new Word64(3391569614,3928383900),new Word64(3515267271,566280711),new Word64(3940187606,3454069534),new Word64(4118630271,4000239992),new Word64(116418474,1914138554),new Word64(174292421,2731055270),new Word64(289380356,3203993006),new Word64(460393269,320620315),new Word64(685471733,587496836),new Word64(852142971,1086792851),new Word64(1017036298,365543100),new Word64(1126000580,2618297676),new Word64(1288033470,3409855158),new Word64(1501505948,4234509866),new Word64(1607167915,987167468),new Word64(1816402316,1246189591)])}};function ch(e,t,n,a,r){e.assign(t);e.and(n);r.assign(t);r.not();r.and(a);e.xor(r)}function maj(e,t,n,a,r){e.assign(t);e.and(n);r.assign(t);r.and(a);e.xor(r);r.assign(n);r.and(a);e.xor(r)}function sigma(e,t,n){e.assign(t);e.rotateRight(28);n.assign(t);n.rotateRight(34);e.xor(n);n.assign(t);n.rotateRight(39);e.xor(n)}function sigmaPrime(e,t,n){e.assign(t);e.rotateRight(14);n.assign(t);n.rotateRight(18);e.xor(n);n.assign(t);n.rotateRight(41);e.xor(n)}function littleSigma(e,t,n){e.assign(t);e.rotateRight(1);n.assign(t);n.rotateRight(8);e.xor(n);n.assign(t);n.shiftRight(7);e.xor(n)}function littleSigmaPrime(e,t,n){e.assign(t);e.rotateRight(19);n.assign(t);n.rotateRight(61);e.xor(n);n.assign(t);n.shiftRight(6);e.xor(n)}function calculateSHA512(e,t,n,a=!1){let r,s,i,o,l,f,c,h;if(a){r=new Word64(3418070365,3238371032);s=new Word64(1654270250,914150663);i=new Word64(2438529370,812702999);o=new Word64(355462360,4144912697);l=new Word64(1731405415,4290775857);f=new Word64(2394180231,1750603025);c=new Word64(3675008525,1694076839);h=new Word64(1203062813,3204075428)}else{r=new Word64(1779033703,4089235720);s=new Word64(3144134277,2227873595);i=new Word64(1013904242,4271175723);o=new Word64(2773480762,1595750129);l=new Word64(1359893119,2917565137);f=new Word64(2600822924,725511199);c=new Word64(528734635,4215389547);h=new Word64(1541459225,327033209)}const u=128*Math.ceil((n+17)/128),m=new Uint8Array(u);let p,d;for(p=0;p<n;++p)m[p]=e[t++];m[p++]=128;const g=u-16;p<g&&(p=g);p+=11;m[p++]=n>>>29&255;m[p++]=n>>21&255;m[p++]=n>>13&255;m[p++]=n>>5&255;m[p++]=n<<3&255;const b=new Array(80);for(p=0;p<80;p++)b[p]=new Word64(0,0);const{k:w}=cl;let j=new Word64(0,0),k=new Word64(0,0),y=new Word64(0,0),q=new Word64(0,0),v=new Word64(0,0),S=new Word64(0,0),x=new Word64(0,0),C=new Word64(0,0);const T=new Word64(0,0),O=new Word64(0,0),R=new Word64(0,0),H=new Word64(0,0);let D,M;for(p=0;p<u;){for(d=0;d<16;++d){b[d].high=m[p]<<24|m[p+1]<<16|m[p+2]<<8|m[p+3];b[d].low=m[p+4]<<24|m[p+5]<<16|m[p+6]<<8|m[p+7];p+=8}for(d=16;d<80;++d){D=b[d];littleSigmaPrime(D,b[d-2],H);D.add(b[d-7]);littleSigma(R,b[d-15],H);D.add(R);D.add(b[d-16])}j.assign(r);k.assign(s);y.assign(i);q.assign(o);v.assign(l);S.assign(f);x.assign(c);C.assign(h);for(d=0;d<80;++d){T.assign(C);sigmaPrime(R,v,H);T.add(R);ch(R,v,S,x,H);T.add(R);T.add(w[d]);T.add(b[d]);sigma(O,j,H);maj(R,j,k,y,H);O.add(R);D=C;C=x;x=S;S=v;q.add(T);v=q;q=y;y=k;k=j;D.assign(T);D.add(O);j=D}r.add(j);s.add(k);i.add(y);o.add(q);l.add(v);f.add(S);c.add(x);h.add(C)}if(a){M=new Uint8Array(48);r.copyTo(M,0);s.copyTo(M,8);i.copyTo(M,16);o.copyTo(M,24);l.copyTo(M,32);f.copyTo(M,40)}else{M=new Uint8Array(64);r.copyTo(M,0);s.copyTo(M,8);i.copyTo(M,16);o.copyTo(M,24);l.copyTo(M,32);f.copyTo(M,40);c.copyTo(M,48);h.copyTo(M,56)}return M}function calculateSHA384(e,t,n){return calculateSHA512(e,t,n,!0)}const hl={get k(){return shadow(this,"k",[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298])}};function rotr(e,t){return e>>>t|e<<32-t}function calculate_sha256_ch(e,t,n){return e&t^~e&n}function calculate_sha256_maj(e,t,n){return e&t^e&n^t&n}function calculate_sha256_sigma(e){return rotr(e,2)^rotr(e,13)^rotr(e,22)}function calculate_sha256_sigmaPrime(e){return rotr(e,6)^rotr(e,11)^rotr(e,25)}function calculate_sha256_littleSigma(e){return rotr(e,7)^rotr(e,18)^e>>>3}function calculate_sha256_littleSigmaPrime(e){return rotr(e,17)^rotr(e,19)^e>>>10}function calculateSHA256(e,t,n){let a=1779033703,r=3144134277,s=1013904242,i=2773480762,o=1359893119,l=2600822924,f=528734635,c=1541459225;const h=64*Math.ceil((n+9)/64),u=new Uint8Array(h);let m,p;for(m=0;m<n;++m)u[m]=e[t++];u[m++]=128;const d=h-8;m<d&&(m=d);m+=3;u[m++]=n>>>29&255;u[m++]=n>>21&255;u[m++]=n>>13&255;u[m++]=n>>5&255;u[m++]=n<<3&255;const g=new Uint32Array(64),{k:b}=hl;for(m=0;m<h;){for(p=0;p<16;++p){g[p]=u[m]<<24|u[m+1]<<16|u[m+2]<<8|u[m+3];m+=4}for(p=16;p<64;++p)g[p]=calculate_sha256_littleSigmaPrime(g[p-2])+g[p-7]+calculate_sha256_littleSigma(g[p-15])+g[p-16]|0;let e,t,n=a,h=r,d=s,w=i,j=o,k=l,y=f,q=c;for(p=0;p<64;++p){e=q+calculate_sha256_sigmaPrime(j)+calculate_sha256_ch(j,k,y)+b[p]+g[p];t=calculate_sha256_sigma(n)+calculate_sha256_maj(n,h,d);q=y;y=k;k=j;j=w+e|0;w=d;d=h;h=n;n=e+t|0}a=a+n|0;r=r+h|0;s=s+d|0;i=i+w|0;o=o+j|0;l=l+k|0;f=f+y|0;c=c+q|0}return new Uint8Array([a>>24&255,a>>16&255,a>>8&255,255&a,r>>24&255,r>>16&255,r>>8&255,255&r,s>>24&255,s>>16&255,s>>8&255,255&s,i>>24&255,i>>16&255,i>>8&255,255&i,o>>24&255,o>>16&255,o>>8&255,255&o,l>>24&255,l>>16&255,l>>8&255,255&l,f>>24&255,f>>16&255,f>>8&255,255&f,c>>24&255,c>>16&255,c>>8&255,255&c])}class DecryptStream extends DecodeStream{constructor(e,t,n){super(t);this.stream=e;this.dict=e.dict;this.decrypt=n;this.nextChunk=null;this.initialized=!1}readBlock(){let e;if(this.initialized)e=this.nextChunk;else{e=this.stream.getBytes(512);this.initialized=!0}if(!e?.length){this.eof=!0;return}this.nextChunk=this.stream.getBytes(512);const t=this.nextChunk?.length>0;e=(0,this.decrypt)(e,!t);const n=this.bufferLength,a=n+e.length;this.ensureBuffer(a).set(e,n);this.bufferLength=a}getOriginalStream(){return this}}class ARCFourCipher{a=0;b=0;constructor(e){const t=new Uint8Array(256),n=e.length;for(let e=0;e<256;++e)t[e]=e;for(let a=0,r=0;a<256;++a){const s=t[a];r=r+s+e[a%n]&255;t[a]=t[r];t[r]=s}this.s=t}encryptBlock(e){let t=this.a,n=this.b;const a=this.s,r=e.length,s=new Uint8Array(r);for(let i=0;i<r;++i){t=t+1&255;const r=a[t];n=n+r&255;const o=a[n];a[t]=o;a[n]=r;s[i]=e[i]^a[r+o&255]}this.a=t;this.b=n;return s}decryptBlock(e){return this.encryptBlock(e)}encrypt(e){return this.encryptBlock(e)}}class NullCipher{decryptBlock(e){return e}encrypt(e){return e}}class AESBaseCipher{_s=new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]);_inv_s=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]);_mix=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]);_mixCol=new Uint8Array(256).map((e,t)=>t<128?t<<1:t<<1^27);constructor(){this.buffer=new Uint8Array(16);this.bufferPosition=0}_expandKey(e){unreachable("Cannot call `_expandKey` on the base class")}_decrypt(e,t){let n,a,r;const s=new Uint8Array(16);s.set(e);for(let e=0,n=this._keySize;e<16;++e,++n)s[e]^=t[n];for(let e=this._cyclesOfRepetition-1;e>=1;--e){n=s[13];s[13]=s[9];s[9]=s[5];s[5]=s[1];s[1]=n;n=s[14];a=s[10];s[14]=s[6];s[10]=s[2];s[6]=n;s[2]=a;n=s[15];a=s[11];r=s[7];s[15]=s[3];s[11]=n;s[7]=a;s[3]=r;for(let e=0;e<16;++e)s[e]=this._inv_s[s[e]];for(let n=0,a=16*e;n<16;++n,++a)s[n]^=t[a];for(let e=0;e<16;e+=4){const t=this._mix[s[e]],a=this._mix[s[e+1]],r=this._mix[s[e+2]],i=this._mix[s[e+3]];n=t^a>>>8^a<<24^r>>>16^r<<16^i>>>24^i<<8;s[e]=n>>>24&255;s[e+1]=n>>16&255;s[e+2]=n>>8&255;s[e+3]=255&n}}n=s[13];s[13]=s[9];s[9]=s[5];s[5]=s[1];s[1]=n;n=s[14];a=s[10];s[14]=s[6];s[10]=s[2];s[6]=n;s[2]=a;n=s[15];a=s[11];r=s[7];s[15]=s[3];s[11]=n;s[7]=a;s[3]=r;for(let e=0;e<16;++e){s[e]=this._inv_s[s[e]];s[e]^=t[e]}return s}_encrypt(e,t){const n=this._s;let a,r,s;const i=new Uint8Array(16);i.set(e);for(let e=0;e<16;++e)i[e]^=t[e];for(let e=1;e<this._cyclesOfRepetition;e++){for(let e=0;e<16;++e)i[e]=n[i[e]];s=i[1];i[1]=i[5];i[5]=i[9];i[9]=i[13];i[13]=s;s=i[2];r=i[6];i[2]=i[10];i[6]=i[14];i[10]=s;i[14]=r;s=i[3];r=i[7];a=i[11];i[3]=i[15];i[7]=s;i[11]=r;i[15]=a;for(let e=0;e<16;e+=4){const t=i[e],n=i[e+1],r=i[e+2],s=i[e+3];a=t^n^r^s;i[e]^=a^this._mixCol[t^n];i[e+1]^=a^this._mixCol[n^r];i[e+2]^=a^this._mixCol[r^s];i[e+3]^=a^this._mixCol[s^t]}for(let n=0,a=16*e;n<16;++n,++a)i[n]^=t[a]}for(let e=0;e<16;++e)i[e]=n[i[e]];s=i[1];i[1]=i[5];i[5]=i[9];i[9]=i[13];i[13]=s;s=i[2];r=i[6];i[2]=i[10];i[6]=i[14];i[10]=s;i[14]=r;s=i[3];r=i[7];a=i[11];i[3]=i[15];i[7]=s;i[11]=r;i[15]=a;for(let e=0,n=this._keySize;e<16;++e,++n)i[e]^=t[n];return i}_decryptBlock2(e,t){const n=e.length;let a=this.buffer,r=this.bufferPosition;const s=[];let i=this.iv;for(let t=0;t<n;++t){a[r]=e[t];++r;if(r<16)continue;const n=this._decrypt(a,this._key);for(let e=0;e<16;++e)n[e]^=i[e];i=a;s.push(n);a=new Uint8Array(16);r=0}this.buffer=a;this.bufferLength=r;this.iv=i;if(0===s.length)return new Uint8Array(0);let o=16*s.length;if(t){const e=s.at(-1);let t=e[15];if(t<=16){for(let n=15,a=16-t;n>=a;--n)if(e[n]!==t){t=0;break}o-=t;s[s.length-1]=e.subarray(0,16-t)}}const l=new Uint8Array(o);for(let e=0,t=0,n=s.length;e<n;++e,t+=16)l.set(s[e],t);return l}decryptBlock(e,t,n=null){const a=e.length,r=this.buffer;let s=this.bufferPosition;if(n)this.iv=n;else{for(let t=0;s<16&&t<a;++t,++s)r[s]=e[t];if(s<16){this.bufferLength=s;return new Uint8Array(0)}this.iv=r;e=e.subarray(16)}this.buffer=new Uint8Array(16);this.bufferLength=0;this.decryptBlock=this._decryptBlock2;return this.decryptBlock(e,t)}encrypt(e,t){const n=e.length;let a=this.buffer,r=this.bufferPosition;const s=[];t||=new Uint8Array(16);for(let i=0;i<n;++i){a[r]=e[i];++r;if(r<16)continue;for(let e=0;e<16;++e)a[e]^=t[e];const n=this._encrypt(a,this._key);t=n;s.push(n);a=new Uint8Array(16);r=0}this.buffer=a;this.bufferLength=r;this.iv=t;if(0===s.length)return new Uint8Array(0);const i=16*s.length,o=new Uint8Array(i);for(let e=0,t=0,n=s.length;e<n;++e,t+=16)o.set(s[e],t);return o}}class AES128Cipher extends AESBaseCipher{_rcon=new Uint8Array([141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]);constructor(e){super();this._cyclesOfRepetition=10;this._keySize=160;this._key=this._expandKey(e)}_expandKey(e){const t=this._s,n=this._rcon,a=new Uint8Array(176);a.set(e);for(let e=16,r=1;e<176;++r){let s=a[e-3],i=a[e-2],o=a[e-1],l=a[e-4];s=t[s];i=t[i];o=t[o];l=t[l];s^=n[r];for(let t=0;t<4;++t){a[e]=s^=a[e-16];e++;a[e]=i^=a[e-16];e++;a[e]=o^=a[e-16];e++;a[e]=l^=a[e-16];e++}}return a}}class AES256Cipher extends AESBaseCipher{constructor(e){super();this._cyclesOfRepetition=14;this._keySize=224;this._key=this._expandKey(e)}_expandKey(e){const t=this._s,n=new Uint8Array(240);n.set(e);let a,r,s,i,o=1;for(let e=32,l=1;e<240;++l){if(e%32==16){a=t[a];r=t[r];s=t[s];i=t[i]}else if(e%32==0){a=n[e-3];r=n[e-2];s=n[e-1];i=n[e-4];a=t[a];r=t[r];s=t[s];i=t[i];a^=o;(o<<=1)>=256&&(o=255&(27^o))}for(let t=0;t<4;++t){n[e]=a^=n[e-32];e++;n[e]=r^=n[e-32];e++;n[e]=s^=n[e-32];e++;n[e]=i^=n[e-32];e++}}return n}}class PDFBase{_hash(e,t,n){unreachable("Abstract method `_hash` called")}checkOwnerPassword(e,t,n,a){const r=new Uint8Array(e.length+56);r.set(e,0);r.set(t,e.length);r.set(n,e.length+t.length);return isArrayEqual(this._hash(e,r,n),a)}checkUserPassword(e,t,n){const a=new Uint8Array(e.length+8);a.set(e,0);a.set(t,e.length);return isArrayEqual(this._hash(e,a,[]),n)}getOwnerKey(e,t,n,a){const r=new Uint8Array(e.length+56);r.set(e,0);r.set(t,e.length);r.set(n,e.length+t.length);const s=this._hash(e,r,n);return new AES256Cipher(s).decryptBlock(a,!1,new Uint8Array(16))}getUserKey(e,t,n){const a=new Uint8Array(e.length+8);a.set(e,0);a.set(t,e.length);const r=this._hash(e,a,[]);return new AES256Cipher(r).decryptBlock(n,!1,new Uint8Array(16))}}class PDF17 extends PDFBase{_hash(e,t,n){return calculateSHA256(t,0,t.length)}}class PDF20 extends PDFBase{_hash(e,t,n){let a=calculateSHA256(t,0,t.length).subarray(0,32),r=[0],s=0;for(;s<64||r.at(-1)>s-32;){const t=e.length+a.length+n.length,i=new Uint8Array(t);let o=0;i.set(e,o);o+=e.length;i.set(a,o);o+=a.length;i.set(n,o);const l=new Uint8Array(64*t);for(let e=0,n=0;e<64;e++,n+=t)l.set(i,n);r=new AES128Cipher(a.subarray(0,16)).encrypt(l,a.subarray(16,32));const f=Math.sumPrecise(r.slice(0,16))%3;0===f?a=calculateSHA256(r,0,r.length):1===f?a=calculateSHA384(r,0,r.length):2===f&&(a=calculateSHA512(r,0,r.length));s++}return a.subarray(0,32)}}class CipherTransform{constructor(e,t){this.StringCipherConstructor=e;this.StreamCipherConstructor=t}createStream(e,t){const n=new this.StreamCipherConstructor;return new DecryptStream(e,t,function cipherTransformDecryptStream(e,t){return n.decryptBlock(e,t)})}decryptString(e){const t=new this.StringCipherConstructor;let n=stringToBytes(e);n=t.decryptBlock(n,!0);return bytesToString(n)}encryptString(e){const t=new this.StringCipherConstructor;if(t instanceof AESBaseCipher){const n=16-e.length%16;e+=String.fromCharCode(n).repeat(n);const a=new Uint8Array(16);crypto.getRandomValues(a);let r=stringToBytes(e);r=t.encrypt(r,a);const s=new Uint8Array(16+r.length);s.set(a);s.set(r,16);return bytesToString(s)}let n=stringToBytes(e);n=t.encrypt(n);return bytesToString(n)}}class CipherTransformFactory{static get _defaultPasswordBytes(){return shadow(this,"_defaultPasswordBytes",new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122]))}#Qe(e,t,n,a,r,s,i,o,l,f,c,h){if(t){const e=Math.min(127,t.length);t=t.subarray(0,e)}else t=[];const u=6===e?new PDF20:new PDF17;return u.checkUserPassword(t,o,i)?u.getUserKey(t,l,c):t.length&&u.checkOwnerPassword(t,a,s,n)?u.getOwnerKey(t,r,s,f):null}#Ze(e,t,n,a,r,s,i,o){const l=40+n.length+e.length,f=new Uint8Array(l);let c,h,u=0;if(t){h=Math.min(32,t.length);for(;u<h;++u)f[u]=t[u]}c=0;for(;u<32;)f[u++]=CipherTransformFactory._defaultPasswordBytes[c++];f.set(n,u);u+=n.length;f[u++]=255&r;f[u++]=r>>8&255;f[u++]=r>>16&255;f[u++]=r>>>24&255;f.set(e,u);u+=e.length;if(s>=4&&!o){f.fill(255,u,u+4);u+=4}let m=calculateMD5(f,0,u);const p=i>>3;if(s>=3)for(c=0;c<50;++c)m=calculateMD5(m,0,p);const d=m.subarray(0,p);let g,b;if(s>=3){u=0;f.set(CipherTransformFactory._defaultPasswordBytes,u);u+=32;f.set(e,u);u+=e.length;g=new ARCFourCipher(d);b=g.encryptBlock(calculateMD5(f,0,u));h=d.length;const t=new Uint8Array(h);for(c=1;c<=19;++c){for(let e=0;e<h;++e)t[e]=d[e]^c;g=new ARCFourCipher(t);b=g.encryptBlock(b)}}else{g=new ARCFourCipher(d);b=g.encryptBlock(CipherTransformFactory._defaultPasswordBytes)}return b.every((e,t)=>a[t]===e)?d:null}#et(e,t,n,a){const r=new Uint8Array(32);let s=0;const i=Math.min(32,e.length);for(;s<i;++s)r[s]=e[s];let o=0;for(;s<32;)r[s++]=CipherTransformFactory._defaultPasswordBytes[o++];let l=calculateMD5(r,0,s);const f=a>>3;if(n>=3)for(o=0;o<50;++o)l=calculateMD5(l,0,l.length);let c,h;if(n>=3){h=t;const e=new Uint8Array(f);for(o=19;o>=0;o--){for(let t=0;t<f;++t)e[t]=l[t]^o;c=new ARCFourCipher(e);h=c.encryptBlock(h)}}else{c=new ARCFourCipher(l.subarray(0,f));h=c.encryptBlock(t)}return h}#tt(e,t,n,a=!1){const r=n.length,s=new Uint8Array(r+9);s.set(n);let i=r;s[i++]=255&e;s[i++]=e>>8&255;s[i++]=e>>16&255;s[i++]=255&t;s[i++]=t>>8&255;if(a){s[i++]=115;s[i++]=65;s[i++]=108;s[i++]=84}return calculateMD5(s,0,i).subarray(0,Math.min(r+5,16))}#nt(e,t,n,a,r){if(!(t instanceof Name))throw new FormatError("Invalid crypt filter name.");const s=this,i=e.get(t.name),o=i?.get("CFM");if(!o||"None"===o.name)return function(){return new NullCipher};if("V2"===o.name)return function(){return new ARCFourCipher(s.#tt(n,a,r,!1))};if("AESV2"===o.name)return function(){return new AES128Cipher(s.#tt(n,a,r,!0))};if("AESV3"===o.name)return function(){return new AES256Cipher(r)};throw new FormatError("Unknown crypto method")}constructor(e,t,n){const a=e.get("Filter");if(!isName(a,"Standard"))throw new FormatError("unknown encryption method");this.filterName=a.name;this.dict=e;const r=e.get("V");if(!Number.isInteger(r)||1!==r&&2!==r&&4!==r&&5!==r)throw new FormatError("unsupported encryption algorithm");this.algorithm=r;let s=e.get("Length");if(!s)if(r<=3)s=40;else{const t=e.get("CF"),n=e.get("StmF");if(t instanceof Dict&&n instanceof Name){t.suppressEncryption=!0;const e=t.get(n.name);s=e?.get("Length")||128;s<40&&(s<<=3)}}if(!Number.isInteger(s)||s<40||s%8!=0)throw new FormatError("invalid key length");const i=stringToBytes(e.get("O")),o=stringToBytes(e.get("U")),l=i.subarray(0,32),f=o.subarray(0,32),c=e.get("P"),h=e.get("R"),u=(4===r||5===r)&&!1!==e.get("EncryptMetadata");this.encryptMetadata=u;const m=stringToBytes(t);let p,d;if(n){if(6===h)try{n=utf8StringToString(n)}catch{warn("CipherTransformFactory: Unable to convert UTF8 encoded password.")}p=stringToBytes(n)}if(5!==r)d=this.#Ze(m,p,l,f,c,h,s,u);else{const t=i.subarray(32,40),n=i.subarray(40,48),a=o.subarray(0,48),r=o.subarray(32,40),s=o.subarray(40,48),c=stringToBytes(e.get("OE")),u=stringToBytes(e.get("UE")),m=stringToBytes(e.get("Perms"));d=this.#Qe(h,p,l,t,n,a,f,r,s,c,u,m)}if(!d){if(!n)throw new PasswordException("No password given",tn);const e=this.#et(p,l,h,s);d=this.#Ze(m,e,l,f,c,h,s,u)}if(!d)throw new PasswordException("Incorrect Password",nn);if(4===r&&d.length<16){this.encryptionKey=new Uint8Array(16);this.encryptionKey.set(d)}else this.encryptionKey=d;if(r>=4){const t=e.get("CF");t instanceof Dict&&(t.suppressEncryption=!0);this.cf=t;this.stmf=e.get("StmF")||Name.get("Identity");this.strf=e.get("StrF")||Name.get("Identity");this.eff=e.get("EFF")||this.stmf}}createCipherTransform(e,t){if(4===this.algorithm||5===this.algorithm)return new CipherTransform(this.#nt(this.cf,this.strf,e,t,this.encryptionKey),this.#nt(this.cf,this.stmf,e,t,this.encryptionKey));const n=this.#tt(e,t,this.encryptionKey,!1),cipherConstructor=function(){return new ARCFourCipher(n)};return new CipherTransform(cipherConstructor,cipherConstructor)}}class XRef{constructor(e,t){this.stream=e;this.pdfManager=t;this.entries=[];this._xrefStms=new Set;this._cacheMap=new Map;this._pendingRefs=new RefSet;this._newPersistentRefNum=null;this._newTemporaryRefNum=null;this._persistentRefsCache=null}getNewPersistentRef(e){null===this._newPersistentRefNum&&(this._newPersistentRefNum=this.entries.length||1);const t=this._newPersistentRefNum++;this._cacheMap.set(t,e);return Ref.get(t,0)}getNewTemporaryRef(){if(null===this._newTemporaryRefNum){this._newTemporaryRefNum=this.entries.length||1;if(this._newPersistentRefNum){this._persistentRefsCache=new Map;for(let e=this._newTemporaryRefNum;e<this._newPersistentRefNum;e++){this._persistentRefsCache.set(e,this._cacheMap.get(e));this._cacheMap.delete(e)}}}return Ref.get(this._newTemporaryRefNum++,0)}resetNewTemporaryRef(){this._newTemporaryRefNum=null;if(this._persistentRefsCache)for(const[e,t]of this._persistentRefsCache)this._cacheMap.set(e,t);this._persistentRefsCache=null}setStartXRef(e){this.startXRefQueue=[e]}parse(e=!1){let t,n,a;if(e){warn("Indexing all PDF objects");t=this.indexObjects()}else t=this.readXRef();t.assignXref(this);this.trailer=t;try{n=t.get("Encrypt")}catch(e){if(e instanceof MissingDataException)throw e;warn(`XRef.parse - Invalid "Encrypt" reference: "${e}".`)}if(n instanceof Dict){const e=t.get("ID"),a=e?.length?e[0]:"";n.suppressEncryption=!0;this.encrypt=new CipherTransformFactory(n,a,this.pdfManager.password)}try{a=t.get("Root")}catch(e){if(e instanceof MissingDataException)throw e;warn(`XRef.parse - Invalid "Root" reference: "${e}".`)}if(a instanceof Dict)try{if(a.get("Pages")instanceof Dict){this.root=a;return}}catch(e){if(e instanceof MissingDataException)throw e;warn(`XRef.parse - Invalid "Pages" reference: "${e}".`)}if(!e)throw new XRefParseException;throw new InvalidPDFException("Invalid Root reference.")}processXRefTable(e){"tableState"in this||(this.tableState={entryNum:0,streamPos:e.lexer.stream.pos,parserBuf1:e.buf1,parserBuf2:e.buf2});if(!isCmd(this.readXRefTable(e),"trailer"))throw new FormatError("Invalid XRef table: could not find trailer dictionary");let t=e.getObj();t instanceof Dict||!t.dict||(t=t.dict);if(!(t instanceof Dict))throw new FormatError("Invalid XRef table: could not parse trailer dictionary");delete this.tableState;return t}readXRefTable(e){const t=e.lexer.stream,n=this.tableState;t.pos=n.streamPos;e.buf1=n.parserBuf1;e.buf2=n.parserBuf2;let a;for(;;){if(!("firstEntryNum"in n)||!("entryCount"in n)){if(isCmd(a=e.getObj(),"trailer"))break;n.firstEntryNum=a;n.entryCount=e.getObj()}let r=n.firstEntryNum;const s=n.entryCount;if(!Number.isInteger(r)||!Number.isInteger(s))throw new FormatError("Invalid XRef table: wrong types in subsection header");for(let a=n.entryNum;a<s;a++){n.streamPos=t.pos;n.entryNum=a;n.parserBuf1=e.buf1;n.parserBuf2=e.buf2;const i={};i.offset=e.getObj();i.gen=e.getObj();const o=e.getObj();if(o instanceof Cmd)switch(o.cmd){case"f":i.free=!0;break;case"n":i.uncompressed=!0}if(!Number.isInteger(i.offset)||!Number.isInteger(i.gen)||!i.free&&!i.uncompressed)throw new FormatError(`Invalid entry in XRef subsection: ${r}, ${s}`);0===a&&i.free&&1===r&&(r=0);this.entries[a+r]||(this.entries[a+r]=i)}n.entryNum=0;n.streamPos=t.pos;n.parserBuf1=e.buf1;n.parserBuf2=e.buf2;delete n.firstEntryNum;delete n.entryCount}if(this.entries[0]&&!this.entries[0].free)throw new FormatError("Invalid XRef table: unexpected first object");return a}processXRefStream(e){if(!("streamState"in this)){const{dict:t,pos:n}=e,a=t.get("W"),r=t.get("Index")||[0,t.get("Size")];this.streamState={entryRanges:r,byteWidths:a,entryNum:0,streamPos:n}}this.readXRefStream(e);delete this.streamState;return e.dict}readXRefStream(e){const t=this.streamState;e.pos=t.streamPos;const[n,a,r]=t.byteWidths,s=t.entryRanges;for(;s.length>0;){const[i,o]=s;if(!Number.isInteger(i)||!Number.isInteger(o))throw new FormatError(`Invalid XRef range fields: ${i}, ${o}`);if(!Number.isInteger(n)||!Number.isInteger(a)||!Number.isInteger(r))throw new FormatError(`Invalid XRef entry fields length: ${i}, ${o}`);for(let s=t.entryNum;s<o;++s){t.entryNum=s;t.streamPos=e.pos;let o=0,l=0,f=0;for(let t=0;t<n;++t){const t=e.getByte();if(-1===t)throw new FormatError("Invalid XRef byteWidths 'type'.");o=o<<8|t}0===n&&(o=1);for(let t=0;t<a;++t){const t=e.getByte();if(-1===t)throw new FormatError("Invalid XRef byteWidths 'offset'.");l=l<<8|t}for(let t=0;t<r;++t){const t=e.getByte();if(-1===t)throw new FormatError("Invalid XRef byteWidths 'generation'.");f=f<<8|t}const c={};c.offset=l;c.gen=f;switch(o){case 0:c.free=!0;break;case 1:c.uncompressed=!0;break;case 2:break;default:throw new FormatError(`Invalid XRef entry type: ${o}`)}this.entries[i+s]||(this.entries[i+s]=c)}t.entryNum=0;t.streamPos=e.pos;s.splice(0,2)}}indexObjects(){function readToken(e,t){let n="",a=e[t];for(;10!==a&&13!==a&&60!==a&&!(++t>=e.length);){n+=String.fromCharCode(a);a=e[t]}return n}function skipUntil(e,t,n){const a=n.length,r=e.length;let s=0;for(;t<r;){let r=0;for(;r<a&&e[t+r]===n[r];)++r;if(r>=a)break;t++;s++}return s}const e=/\b(endobj|\d+\s+\d+\s+obj|xref|trailer\s*<<)\b/g,t=/\b(startxref|\d+\s+\d+\s+obj)\b/g,n=/^(\d+)\s+(\d+)\s+obj\b/,a=new Uint8Array([116,114,97,105,108,101,114]),r=new Uint8Array([115,116,97,114,116,120,114,101,102]),s=new Uint8Array([47,88,82,101,102]);this.entries.length=0;this._cacheMap.clear();const i=this.stream;i.pos=0;const o=i.getBytes(),l=bytesToString(o),f=o.length;let c=i.start;const h=[],u=[];for(;c<f;){let m=o[c];if(9===m||10===m||13===m||32===m){++c;continue}if(37===m){do{++c;if(c>=f)break;m=o[c]}while(10!==m&&13!==m);continue}const p=readToken(o,c);let d;if(p.startsWith("xref")&&(4===p.length||/\s/.test(p[4]))){c+=skipUntil(o,c,a);h.push(c);c+=skipUntil(o,c,r)}else if(d=n.exec(p)){const t=0|d[1],n=0|d[2],a=c+p.length;let r,h=!1;if(this.entries[t]){if(this.entries[t].gen===n)try{new Parser({lexer:new Lexer(i.makeSubStream(a))}).getObj();h=!0}catch(e){e instanceof ParserEOFException?warn(`indexObjects -- checking object (${p}): "${e}".`):h=!0}}else h=!0;h&&(this.entries[t]={offset:c-i.start,gen:n,uncompressed:!0});e.lastIndex=a;const m=e.exec(l);if(m){r=e.lastIndex+1-c;if("endobj"!==m[1]){warn(`indexObjects: Found "${m[1]}" inside of another "obj", caused by missing "endobj" -- trying to recover.`);r-=m[1].length+1}}else r=f-c;const g=o.subarray(c,c+r),b=skipUntil(g,0,s);if(b<r&&g[b+5]<64){u.push(c-i.start);this._xrefStms.add(c-i.start)}c+=r}else if(p.startsWith("trailer")&&(7===p.length||/\s/.test(p[7]))){h.push(c);const e=c+p.length;let n;t.lastIndex=e;const a=t.exec(l);if(a){n=t.lastIndex+1-c;if("startxref"!==a[1]){warn(`indexObjects: Found "${a[1]}" after "trailer", caused by missing "startxref" -- trying to recover.`);n-=a[1].length+1}}else n=f-c;c+=n}else c+=p.length+1}for(const e of u){this.startXRefQueue.push(e);this.readXRef(!0)}const m=[];let p,d,g=!1;for(const e of h){i.pos=e;const t=new Parser({lexer:new Lexer(i),xref:this,allowStreams:!0,recoveryMode:!0});if(!isCmd(t.getObj(),"trailer"))continue;const n=t.getObj();if(n instanceof Dict){m.push(n);n.has("Encrypt")&&(g=!0)}}for(const e of[...m,"genFallback",...m]){if("genFallback"===e){if(!d)break;this._generationFallback=!0;continue}let t=!1;try{const n=e.get("Root");if(!(n instanceof Dict))continue;const a=n.get("Pages");if(!(a instanceof Dict))continue;const r=a.get("Count");Number.isInteger(r)&&(t=!0)}catch(e){d=e;continue}if(t&&(!g||e.has("Encrypt"))&&e.has("ID"))return e;p=e}if(p)return p;if(this.topDict)return this.topDict;if(!m.length)for(const e in this.entries){const t=this.entries[e];if(!t)continue;const n=Ref.get(parseInt(e),t.gen);let a;try{a=this.fetch(n)}catch{continue}a instanceof BaseStream&&(a=a.dict);if(a instanceof Dict&&a.has("Root"))return a}throw new InvalidPDFException("Invalid PDF structure.")}readXRef(e=!1){const t=this.stream,n=new Set;for(;this.startXRefQueue.length;){try{const e=this.startXRefQueue[0];if(n.has(e)){warn("readXRef - skipping XRef table since it was already parsed.");this.startXRefQueue.shift();continue}n.add(e);t.pos=e+t.start;const a=new Parser({lexer:new Lexer(t),xref:this,allowStreams:!0});let r,s=a.getObj();if(isCmd(s,"xref")){r=this.processXRefTable(a);this.topDict||(this.topDict=r);s=r.get("XRefStm");if(Number.isInteger(s)&&!this._xrefStms.has(s)){this._xrefStms.add(s);this.startXRefQueue.push(s)}}else{if(!Number.isInteger(s))throw new FormatError("Invalid XRef stream header");if(!(Number.isInteger(a.getObj())&&isCmd(a.getObj(),"obj")&&(s=a.getObj())instanceof BaseStream))throw new FormatError("Invalid XRef stream");r=this.processXRefStream(s);this.topDict||(this.topDict=r);if(!r)throw new FormatError("Failed to read XRef stream")}s=r.get("Prev");Number.isInteger(s)?this.startXRefQueue.push(s):s instanceof Ref&&this.startXRefQueue.push(s.num)}catch(e){if(e instanceof MissingDataException)throw e;info("(while reading XRef): "+e)}this.startXRefQueue.shift()}if(this.topDict)return this.topDict;if(!e)throw new XRefParseException}getEntry(e){const t=this.entries[e];return t&&!t.free&&t.offset?t:null}fetchIfRef(e,t=!1){return e instanceof Ref?this.fetch(e,t):e}fetch(e,t=!1){if(!(e instanceof Ref))throw new Error("ref object is not a reference");const n=e.num,a=this._cacheMap.get(n);if(void 0!==a){a instanceof Dict&&!a.objId&&(a.objId=e.toString());return a}let r=this.getEntry(n);if(null===r)return r;if(this._pendingRefs.has(e)){this._pendingRefs.remove(e);warn(`Ignoring circular reference: ${e}.`);return cn}this._pendingRefs.put(e);try{r=r.uncompressed?this.fetchUncompressed(e,r,t):this.fetchCompressed(e,r,t);this._pendingRefs.remove(e)}catch(t){this._pendingRefs.remove(e);throw t}r instanceof Dict?r.objId=e.toString():r instanceof BaseStream&&(r.dict.objId=e.toString());return r}fetchUncompressed(e,t,n=!1){const a=e.gen;let r=e.num;if(t.gen!==a){const s=`Inconsistent generation in XRef: ${e}`;if(this._generationFallback&&t.gen<a){warn(s);return this.fetchUncompressed(Ref.get(r,t.gen),t,n)}throw new XRefEntryException(s)}const s=this.stream.makeSubStream(t.offset+this.stream.start),i=new Parser({lexer:new Lexer(s),xref:this,allowStreams:!0}),o=i.getObj(),l=i.getObj(),f=i.getObj();if(o!==r||l!==a||!(f instanceof Cmd))throw new XRefEntryException(`Bad (uncompressed) XRef entry: ${e}`);if("obj"!==f.cmd){if(f.cmd.startsWith("obj")){r=parseInt(f.cmd.substring(3),10);if(!Number.isNaN(r))return r}throw new XRefEntryException(`Bad (uncompressed) XRef entry: ${e}`)}(t=this.encrypt&&!n?i.getObj(this.encrypt.createCipherTransform(r,a)):i.getObj())instanceof BaseStream||this._cacheMap.set(r,t);return t}fetchCompressed(e,t,n=!1){const a=t.offset,r=this.fetch(Ref.get(a,0));if(!(r instanceof BaseStream))throw new FormatError("bad ObjStm stream");const s=r.dict.get("First"),i=r.dict.get("N");if(!Number.isInteger(s)||!Number.isInteger(i))throw new FormatError("invalid first and n parameters for ObjStm stream");let o=new Parser({lexer:new Lexer(r),xref:this,allowStreams:!0});const l=new Array(i),f=new Array(i);for(let e=0;e<i;++e){const t=o.getObj();if(!Number.isInteger(t))throw new FormatError(`invalid object number in the ObjStm stream: ${t}`);const n=o.getObj();if(!Number.isInteger(n))throw new FormatError(`invalid object offset in the ObjStm stream: ${n}`);l[e]=t;const r=this.getEntry(t);r?.offset===a&&r.gen!==e&&(r.gen=e);f[e]=n}const c=(r.start||0)+s,h=new Array(i);for(let e=0;e<i;++e){const t=e<i-1?f[e+1]-f[e]:void 0;if(t<0)throw new FormatError("Invalid offset in the ObjStm stream.");o=new Parser({lexer:new Lexer(r.makeSubStream(c+f[e],t,r.dict)),xref:this,allowStreams:!0});const n=o.getObj();h[e]=n;if(n instanceof BaseStream)continue;const s=l[e],u=this.entries[s];u&&u.offset===a&&u.gen===e&&this._cacheMap.set(s,n)}if(void 0===(t=h[t.gen]))throw new XRefEntryException(`Bad (compressed) XRef entry: ${e}`);return t}async fetchIfRefAsync(e,t){return e instanceof Ref?this.fetchAsync(e,t):e}async fetchAsync(e,t){try{return this.fetch(e,t)}catch(n){if(!(n instanceof MissingDataException))throw n;await this.pdfManager.requestRange(n.begin,n.end);return this.fetchAsync(e,t)}}getCatalogObj(){return this.root}}const ul=[0,0,612,792];class Page{#at=!1;#rt=null;constructor({pdfManager:e,xref:t,pageIndex:n,pageDict:a,ref:r,globalIdFactory:s,fontCache:i,builtInCMapCache:o,standardFontDataCache:l,globalColorSpaceCache:f,globalImageCache:c,systemFontCache:h,nonBlendModesSet:u,xfaFactory:m}){this.pdfManager=e;this.pageIndex=n;this.pageDict=a;this.xref=t;this.ref=r;this.fontCache=i;this.builtInCMapCache=o;this.standardFontDataCache=l;this.globalColorSpaceCache=f;this.globalImageCache=c;this.systemFontCache=h;this.nonBlendModesSet=u;this.evaluatorOptions=e.evaluatorOptions;this.xfaFactory=m;const p={obj:0};this._localIdFactory=class extends s{static createObjId(){return`p${n}_${++p.obj}`}static getPageObjId(){return`p${r.toString()}`}}}#st(e,t=this.pageIndex){return new PartialEvaluator({xref:this.xref,handler:e,pageIndex:t,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalColorSpaceCache:this.globalColorSpaceCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions})}#it(e,t=!1){const n=getInheritableProperty({dict:this.pageDict,key:e,getArray:t,stopWhenFound:!1});return Array.isArray(n)?1!==n.length&&n[0]instanceof Dict?Dict.merge({xref:this.xref,dictArray:n}):n[0]:n}get content(){return this.pageDict.getArray("Contents")}get resources(){const e=this.#it("Resources");return shadow(this,"resources",e instanceof Dict?e:Dict.empty)}getBoundingBox(e){if(this.xfaData)return this.xfaData.bbox;const t=lookupNormalRect(this.#it(e,!0),null);if(t){if(t[2]-t[0]>0&&t[3]-t[1]>0)return t;warn(`Empty, or invalid, /${e} entry.`)}return null}get mediaBox(){return shadow(this,"mediaBox",this.getBoundingBox("MediaBox")||ul)}get cropBox(){return shadow(this,"cropBox",this.getBoundingBox("CropBox")||this.mediaBox)}get userUnit(){const e=this.pageDict.get("UserUnit");return shadow(this,"userUnit","number"==typeof e&&e>0?e:1)}get view(){const{cropBox:e,mediaBox:t}=this;if(e!==t&&!isArrayEqual(e,t)){const n=Util.intersect(e,t);if(n&&n[2]-n[0]>0&&n[3]-n[1]>0)return shadow(this,"view",n);warn("Empty /CropBox and /MediaBox intersection.")}return shadow(this,"view",t)}get rotate(){let e=this.#it("Rotate")||0;e%90!=0?e=0:e>=360?e%=360:e<0&&(e=(e%360+360)%360);return shadow(this,"rotate",e)}#ot(e,t){if(!this.evaluatorOptions.ignoreErrors)throw e;warn(`getContentStream - ignoring sub-stream (${t}): "${e}".`)}async getContentStream(){const e=await this.pdfManager.ensure(this,"content");if(e instanceof BaseStream&&!e.isImageStream){if(e.isAsync){const t=await e.asyncGetBytes();if(t)return new Stream(t,0,t.length,e.dict)}return e}if(Array.isArray(e)){const t=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];a instanceof BaseStream&&a.isAsync&&t.push(a.asyncGetBytes().then(t=>{t&&(e[n]=new Stream(t,0,t.length,a.dict))}))}t.length>0&&await Promise.all(t);return new StreamsSequenceStream(e,this.#ot.bind(this))}return new NullStream}get xfaData(){return shadow(this,"xfaData",this.xfaFactory?{bbox:this.xfaFactory.getBoundingBox(this.pageIndex)}:null)}async#lt(e,t,n){const a=[];for(const r of e)if(r.id){const e=Ref.fromString(r.id);if(!e){warn(`A non-linked annotation cannot be modified: ${r.id}`);continue}if(r.deleted){t.put(e,e);if(r.popupRef){const e=Ref.fromString(r.popupRef);e&&t.put(e,e)}continue}if(r.popup?.deleted){const e=Ref.fromString(r.popupRef);e&&t.put(e,e)}n?.put(e);r.ref=e;a.push(this.xref.fetchAsync(e).then(e=>{e instanceof Dict&&(r.oldAnnotation=e.clone())},()=>{warn(`Cannot fetch \`oldAnnotation\` for: ${e}.`)}));delete r.id}await Promise.all(a)}async saveNewAnnotations(e,t,n,a,r){if(this.xfaFactory)throw new Error("XFA: Cannot save new annotations.");const s=this.#st(e),i=new RefSetCache,o=new RefSet;await this.#lt(n,i,o);const l=this.pageDict,f=this.annotations.filter(e=>!(e instanceof Ref&&i.has(e))),c=await AnnotationFactory.saveNewAnnotations(s,t,n,a,r);for(const{ref:e}of c.annotations)e instanceof Ref&&!o.has(e)&&f.push(e);const h=l.clone();h.set("Annots",f);r.put(this.ref,{data:h});for(const e of i)r.put(e,{data:null})}async save(e,t,n,a){const r=this.#st(e),s=await this._parsedAnnotations,i=[];for(const e of s)i.push(e.save(r,t,n,a).catch(function(e){warn(`save - ignoring annotation data during "${t.name}" task: "${e}".`);return null}));return Promise.all(i)}async loadResources(e){await(this.#rt??=this.pdfManager.ensure(this,"resources"));await ObjectLoader.load(this.resources,e,this.xref)}async#ft(e,t){const n=e?.get("Resources");if(!(n instanceof Dict&&n.size))return this.resources;await ObjectLoader.load(n,t,this.xref);return Dict.merge({xref:this.xref,dictArray:[n,this.resources],mergeSubDicts:!0})}async getOperatorList({handler:e,sink:t,task:n,intent:a,cacheKey:r,pageIndex:s=this.pageIndex,annotationStorage:i=null,modifiedIds:c=null}){const p=this.getContentStream(),g=this.loadResources(jn),b=this.#st(e,s),w=this.xfaFactory?null:getNewAnnotationsMap(i),j=w?.get(this.pageIndex);let k=Promise.resolve(null),y=null;if(j){const e=this.pdfManager.ensureDoc("annotationGlobals");let t;const a=new Set;for(const{bitmapId:e,bitmap:t}of j)!e||t||a.has(e)||a.add(e);const{isOffscreenCanvasSupported:r}=this.evaluatorOptions;if(a.size>0){const e=j.slice();for(const[t,n]of i)t.startsWith(d)&&n.bitmap&&a.has(n.bitmapId)&&e.push(n);t=AnnotationFactory.generateImages(e,this.xref,r)}else t=AnnotationFactory.generateImages(j,this.xref,r);y=new RefSet;k=Promise.all([e,this.#lt(j,y,null)]).then(([e])=>e?AnnotationFactory.printNewAnnotations(e,b,n,j,t):null)}const q=Promise.all([p,g]).then(async([i])=>{const o=await this.#ft(i.dict,jn),l=new OperatorList(a,t);e.send("StartRenderPage",{transparency:b.hasBlendModes(o,this.nonBlendModesSet),pageIndex:s,cacheKey:r});await b.getOperatorList({stream:i,task:n,resources:o,operatorList:l});return l});let[v,S,x]=await Promise.all([q,this._parsedAnnotations,k]);if(x){S=S.filter(e=>!(e.ref&&y.has(e.ref)));for(let e=0,t=x.length;e<t;e++){const n=x[e];if(n.refToReplace){const a=S.findIndex(e=>e.ref&&isRefsEqual(e.ref,n.refToReplace));if(a>=0){S.splice(a,1,n);x.splice(e--,1);t--}}}S=S.concat(x)}if(0===S.length||a&u){v.flush(!0);return{length:v.totalLength}}const C=!!(a&h),T=!!(a&m),O=!!(a&o),R=!!(a&l),H=!!(a&f),D=[];for(const e of S)(O||R&&e.mustBeViewed(i,C)&&e.mustBeViewedWhenEditing(T,c)||H&&e.mustBePrinted(i))&&D.push(e.getOperatorList(b,n,a,i).catch(function(e){warn(`getOperatorList - ignoring annotation data during "${n.name}" task: "${e}".`);return{opList:null,separateForm:!1,separateCanvas:!1}}));const M=await Promise.all(D);let E=!1,N=!1;for(const{opList:e,separateForm:t,separateCanvas:n}of M){v.addOpList(e);E||=t;N||=n}v.flush(!0,{form:E,canvas:N});return{length:v.totalLength}}async extractTextContent({handler:e,task:t,includeMarkedContent:n,disableNormalization:a,sink:r,intersector:s=null}){const i=this.getContentStream(),o=this.loadResources(kn),l=this.pdfManager.ensureCatalog("lang"),[f,,c]=await Promise.all([i,o,l]),h=await this.#ft(f.dict,kn);return this.#st(e).getTextContent({stream:f,task:t,resources:h,includeMarkedContent:n,disableNormalization:a,sink:r,viewBox:this.view,lang:c,intersector:s})}async getStructTree(){const e=await this.pdfManager.ensureCatalog("structTreeRoot");if(!e)return null;await this._parsedAnnotations;try{const t=await this.pdfManager.ensure(this,"_parseStructTree",[e]);return await this.pdfManager.ensure(t,"serializable")}catch(e){warn(`getStructTree: "${e}".`);return null}}_parseStructTree(e){const t=new StructTreePage(e,this.pageDict);t.parse(this.ref);return t}async getAnnotationsData(e,t,n){const a=await this._parsedAnnotations;if(0===a.length)return a;const r=[],s=[];let i;const c=!!(n&o),h=!!(n&l),u=!!(n&f),m=[];for(const n of a){const a=c||h&&n.viewable;(a||u&&n.printable)&&r.push(n.data);if(n.hasTextContent&&a){i??=this.#st(e);s.push(n.extractTextContent(i,t,[-1/0,-1/0,1/0,1/0]).catch(function(e){warn(`getAnnotationsData - ignoring textContent during "${t.name}" task: "${e}".`)}))}else n.overlaysTextContent&&a&&m.push(n)}if(m.length>0){const n=new Intersector(m);s.push(this.extractTextContent({handler:e,task:t,includeMarkedContent:!1,disableNormalization:!1,sink:null,viewBox:this.view,lang:null,intersector:n}).then(()=>{n.setText()}))}await Promise.all(s);return r}get annotations(){const e=this.#it("Annots");return shadow(this,"annotations",Array.isArray(e)?e:[])}get _parsedAnnotations(){const e=this.pdfManager.ensure(this,"annotations").then(async e=>{if(0===e.length)return e;const[t,n]=await Promise.all([this.pdfManager.ensureDoc("annotationGlobals"),this.pdfManager.ensureDoc("fieldObjects")]);if(!t)return[];const a=n?.orphanFields,r=[];for(const n of e)r.push(AnnotationFactory.create(this.xref,n,t,this._localIdFactory,!1,a,null,this.ref).catch(function(e){warn(`_parsedAnnotations: "${e}".`);return null}));const s=[];let i,o;for(const e of await Promise.all(r))e&&(e instanceof WidgetAnnotation?(o||=[]).push(e):e instanceof PopupAnnotation?(i||=[]).push(e):s.push(e));o&&s.push(...o);i&&s.push(...i);return s});this.#at=!0;return shadow(this,"_parsedAnnotations",e)}get jsActions(){return shadow(this,"jsActions",collectActions(this.xref,this.pageDict,fe))}async collectAnnotationsByType(e,t,n,a,r){const{pageIndex:s}=this;if(this.#at){const e=await this._parsedAnnotations;for(const{data:t}of e)if(!n||n.has(t.annotationType)){t.pageIndex=s;a.push(Promise.resolve(t))}return}const i=await this.pdfManager.ensure(this,"annotations");for(const o of i)a.push(AnnotationFactory.create(this.xref,o,r,this._localIdFactory,!1,null,n,this.ref).then(async n=>{if(!n)return null;n.data.pageIndex=s;if(n.hasTextContent&&n.viewable){const a=this.#st(e);await n.extractTextContent(a,t,[-1/0,-1/0,1/0,1/0])}return n.data}).catch(function(e){warn(`collectAnnotationsByType: "${e}".`);return null}))}}const ml=new Uint8Array([37,80,68,70,45]),pl=new Uint8Array([115,116,97,114,116,120,114,101,102]),dl=new Uint8Array([101,110,100,111,98,106]);function find(e,t,n=1024,a=!1){const r=t.length,s=e.peekBytes(n),i=s.length-r;if(i<=0)return!1;if(a){const n=r-1;let a=s.length-1;for(;a>=n;){let i=0;for(;i<r&&s[a-i]===t[n-i];)i++;if(i>=r){e.pos+=a-n;return!0}a--}}else{let n=0;for(;n<=i;){let a=0;for(;a<r&&s[n+a]===t[a];)a++;if(a>=r){e.pos+=n;return!0}n++}}return!1}class PDFDocument{#ct=new Map;#ht=null;constructor(e,t){if(t.length<=0)throw new InvalidPDFException("The PDF file is empty, i.e. its size is zero bytes.");this.pdfManager=e;this.stream=t;this.xref=new XRef(t,e);const n={font:0};this._globalIdFactory=class{static getDocId(){return`g_${e.docId}`}static createFontId(){return"f"+ ++n.font}static createObjId(){unreachable("Abstract method `createObjId` called.")}static getPageObjId(){unreachable("Abstract method `getPageObjId` called.")}}}parse(e){this.xref.parse(e);this.catalog=new Catalog(this.pdfManager,this.xref)}get linearization(){let e=null;try{e=Linearization.create(this.stream)}catch(e){if(e instanceof MissingDataException)throw e;info(e)}return shadow(this,"linearization",e)}get startXRef(){const e=this.stream;let t=0;if(this.linearization){e.reset();if(find(e,dl)){e.skip(6);let n=e.peekByte();for(;isWhiteSpace(n);){e.pos++;n=e.peekByte()}t=e.pos-e.start}}else{const n=1024,a=pl.length;let r=!1,s=e.end;for(;!r&&s>0;){s-=n-a;s<0&&(s=0);e.pos=s;r=find(e,pl,n,!0)}if(r){e.skip(9);let n;do{n=e.getByte()}while(isWhiteSpace(n));let a="";for(;n>=32&&n<=57;){a+=String.fromCharCode(n);n=e.getByte()}t=parseInt(a,10);isNaN(t)&&(t=0)}}return shadow(this,"startXRef",t)}checkHeader(){const e=this.stream;e.reset();if(!find(e,ml))return;e.moveStart();e.skip(ml.length);let t,n="";for(;(t=e.getByte())>32&&n.length<7;)n+=String.fromCharCode(t);gn.test(n)?this.#ht=n:warn(`Invalid PDF header version: ${n}`)}parseStartXRef(){this.xref.setStartXRef(this.startXRef)}get numPages(){let e=0;e=this.catalog.hasActualNumPages?this.catalog.numPages:this.xfaFactory?this.xfaFactory.getNumPages():this.linearization?this.linearization.numPages:this.catalog.numPages;return shadow(this,"numPages",e)}#ut(e,t=0){return!!Array.isArray(e)&&e.every(e=>{if(!((e=this.xref.fetchIfRef(e))instanceof Dict))return!1;if(e.has("Kids")){if(++t>10){warn("#hasOnlyDocumentSignatures: maximum recursion depth reached");return!1}return this.#ut(e.get("Kids"),t)}const n=isName(e.get("FT"),"Sig"),a=e.get("Rect"),r=Array.isArray(a)&&a.every(e=>0===e);return n&&r})}get _xfaStreams(){const{acroForm:e}=this.catalog;if(!e)return null;const t=e.get("XFA"),n=new Map(["xdp:xdp","template","datasets","config","connectionSet","localeSet","stylesheet","/xdp:xdp"].map(e=>[e,null]));if(t instanceof BaseStream&&!t.isEmpty){n.set("xdp:xdp",t);return n}if(!Array.isArray(t)||0===t.length)return null;for(let e=0,a=t.length;e<a;e+=2){let r;r=0===e?"xdp:xdp":e===a-2?"/xdp:xdp":t[e];if(!n.has(r))continue;const s=this.xref.fetchIfRef(t[e+1]);s instanceof BaseStream&&!s.isEmpty&&n.set(r,s)}return n}get xfaDatasets(){const e=this._xfaStreams;if(!e)return shadow(this,"xfaDatasets",null);for(const t of["datasets","xdp:xdp"]){const n=e.get(t);if(n)try{const e=stringToUTF8String(n.getString());return shadow(this,"xfaDatasets",new DatasetReader({[t]:e}))}catch{warn("XFA - Invalid utf-8 string.");break}}return shadow(this,"xfaDatasets",null)}get xfaData(){const e=this._xfaStreams;if(!e)return null;const t=Object.create(null);for(const[n,a]of e)if(a)try{t[n]=stringToUTF8String(a.getString())}catch{warn("XFA - Invalid utf-8 string.");return null}return t}get xfaFactory(){let e;this.pdfManager.enableXfa&&this.catalog.needsRendering&&this.formInfo.hasXfa&&!this.formInfo.hasAcroForm&&(e=this.xfaData);return shadow(this,"xfaFactory",e?new XFAFactory(e):null)}get isPureXfa(){return!!this.xfaFactory&&this.xfaFactory.isValid()}get htmlForXfa(){return this.xfaFactory?this.xfaFactory.getPages():null}async#mt(){const e=await this.pdfManager.ensureCatalog("xfaImages");e&&this.xfaFactory.setImages(e)}async#pt(e,t){const n=await this.pdfManager.ensureCatalog("acroForm");if(!n)return;const a=await n.getAsync("DR");if(!(a instanceof Dict))return;await ObjectLoader.load(a,["Font"],this.xref);const r=a.get("Font");if(!(r instanceof Dict))return;const s=Object.assign(Object.create(null),this.pdfManager.evaluatorOptions,{useSystemFonts:!1}),{builtInCMapCache:i,fontCache:o,standardFontDataCache:l}=this.catalog,f=new PartialEvaluator({xref:this.xref,handler:e,pageIndex:-1,idFactory:this._globalIdFactory,fontCache:o,builtInCMapCache:i,standardFontDataCache:l,options:s}),c=new OperatorList,h=[],u={get font(){return h.at(-1)},set font(e){h.push(e)},clone(){return this}},parseFont=(e,n,r)=>f.handleSetFont(a,[Name.get(e),1],null,c,t,u,n,r).catch(e=>{warn(`loadXfaFonts: "${e}".`);return null}),m=[];for(const[e,t]of r){const n=t.get("FontDescriptor");if(!(n instanceof Dict))continue;let a=n.get("FontFamily");a=a.replaceAll(/[ ]+(\d)/g,"$1");const r={fontFamily:a,fontWeight:n.get("FontWeight"),italicAngle:-n.get("ItalicAngle")};validateCSSFont(r)&&m.push(parseFont(e,null,r))}await Promise.all(m);const p=this.xfaFactory.setFonts(h);if(!p)return;s.ignoreErrors=!0;m.length=0;h.length=0;const d=new Set;for(const e of p)getXfaFontName(`${e}-Regular`)||d.add(e);d.size&&p.push("PdfJS-Fallback");for(const e of p)if(!d.has(e))for(const t of[{name:"Regular",fontWeight:400,italicAngle:0},{name:"Bold",fontWeight:700,italicAngle:0},{name:"Italic",fontWeight:400,italicAngle:12},{name:"BoldItalic",fontWeight:700,italicAngle:12}]){const n=`${e}-${t.name}`;m.push(parseFont(n,getXfaFontDict(n),{fontFamily:e,fontWeight:t.fontWeight,italicAngle:t.italicAngle}))}await Promise.all(m);this.xfaFactory.appendFonts(h,d)}loadXfaResources(e,t){return Promise.all([this.#pt(e,t).catch(()=>{}),this.#mt()])}serializeXfaData(e){return this.xfaFactory?this.xfaFactory.serializeData(e):null}get version(){return this.catalog.version||this.#ht}get formInfo(){const e={hasFields:!1,hasAcroForm:!1,hasXfa:!1,hasSignatures:!1},{acroForm:t}=this.catalog;if(!t)return shadow(this,"formInfo",e);try{const n=t.get("Fields"),a=Array.isArray(n)&&n.length>0;e.hasFields=a;const r=t.get("XFA");e.hasXfa=Array.isArray(r)&&r.length>0||r instanceof BaseStream&&!r.isEmpty;const s=!!(1&t.get("SigFlags")),i=s&&this.#ut(n);e.hasAcroForm=a&&!i;e.hasSignatures=s}catch(e){if(e instanceof MissingDataException)throw e;warn(`Cannot fetch form information: "${e}".`)}return shadow(this,"formInfo",e)}get documentInfo(){const{catalog:e,formInfo:t,xref:n}=this,a={PDFFormatVersion:this.version,Language:e.lang,EncryptFilterName:n.encrypt?.filterName??null,IsLinearized:!!this.linearization,IsAcroFormPresent:t.hasAcroForm,IsXFAPresent:t.hasXfa,IsCollectionPresent:!!e.collection,IsSignaturesPresent:t.hasSignatures};let r;try{r=n.trailer.get("Info")}catch(e){if(e instanceof MissingDataException)throw e;info("The document information dictionary is invalid.")}if(!(r instanceof Dict))return shadow(this,"documentInfo",a);for(const[e,t]of r){switch(e){case"Title":case"Author":case"Subject":case"Keywords":case"Creator":case"Producer":case"CreationDate":case"ModDate":if("string"==typeof t){a[e]=stringToPDFString(t);continue}break;case"Trapped":if(t instanceof Name){a[e]=t;continue}break;default:let n;switch(typeof t){case"string":n=stringToPDFString(t);break;case"number":case"boolean":n=t;break;default:t instanceof Name&&(n=t)}if(void 0===n){warn(`Bad value, for custom key "${e}", in Info: ${t}.`);continue}a.Custom??=Object.create(null);a.Custom[e]=n;continue}warn(`Bad value, for key "${e}", in Info: ${t}.`)}return shadow(this,"documentInfo",a)}get fingerprints(){const e="\0".repeat(16);function validate(t){return"string"==typeof t&&16===t.length&&t!==e}const t=this.xref.trailer.get("ID");let n,a;if(Array.isArray(t)&&validate(t[0])){n=stringToBytes(t[0]);t[1]!==t[0]&&validate(t[1])&&(a=stringToBytes(t[1]))}else n=calculateMD5(this.stream.getByteRange(0,1024),0,1024);return shadow(this,"fingerprints",[n.toHex(),a?.toHex()??null])}async#dt(e){const{catalog:t,linearization:n,xref:a}=this,r=Ref.get(n.objectNumberFirst,0);try{const e=await a.fetchAsync(r);if(e instanceof Dict){let n=e.getRaw("Type");n instanceof Ref&&(n=await a.fetchAsync(n));if(isName(n,"Page")||!e.has("Type")&&!e.has("Kids")&&e.has("Contents")){t.pageKidsCountCache.has(r)||t.pageKidsCountCache.put(r,1);t.pageIndexCache.has(r)||t.pageIndexCache.put(r,0);return[e,r]}}throw new FormatError("The Linearization dictionary doesn't point to a valid Page dictionary.")}catch(n){warn(`_getLinearizationPage: "${n.message}".`);return t.getPageDict(e)}}getPage(e){const t=this.#ct.get(e);if(t)return t;const{catalog:n,linearization:a,xfaFactory:r}=this;let s;s=r?Promise.resolve([Dict.empty,null]):a?.pageFirst===e?this.#dt(e):n.getPageDict(e);s=s.then(([t,a])=>new Page({pdfManager:this.pdfManager,xref:this.xref,pageIndex:e,pageDict:t,ref:a,globalIdFactory:this._globalIdFactory,fontCache:n.fontCache,builtInCMapCache:n.builtInCMapCache,standardFontDataCache:n.standardFontDataCache,globalColorSpaceCache:n.globalColorSpaceCache,globalImageCache:n.globalImageCache,systemFontCache:n.systemFontCache,nonBlendModesSet:n.nonBlendModesSet,xfaFactory:r}));this.#ct.set(e,s);return s}async checkFirstPage(e=!1){if(!e)try{await this.getPage(0)}catch(e){if(e instanceof XRefEntryException){this.#ct.delete(0);await this.cleanup();throw new XRefParseException}}}async checkLastPage(e=!1){const{catalog:t,pdfManager:n}=this;t.setActualNumPages();let a;try{await Promise.all([n.ensureDoc("xfaFactory"),n.ensureDoc("linearization"),n.ensureCatalog("numPages")]);if(this.xfaFactory)return;a=this.linearization?this.linearization.numPages:t.numPages;if(!Number.isInteger(a))throw new FormatError("Page count is not an integer.");if(a<=1)return;await this.getPage(a-1)}catch(r){this.#ct.delete(a-1);await this.cleanup();if(r instanceof XRefEntryException&&!e)throw new XRefParseException;warn(`checkLastPage - invalid /Pages tree /Count: ${a}.`);let s;try{s=await t.getAllPageDicts(e)}catch(n){if(n instanceof XRefEntryException&&!e)throw new XRefParseException;t.setActualNumPages(1);return}for(const[e,[a,r]]of s){let s;if(a instanceof Error){s=Promise.reject(a);s.catch(()=>{})}else s=Promise.resolve(new Page({pdfManager:n,xref:this.xref,pageIndex:e,pageDict:a,ref:r,globalIdFactory:this._globalIdFactory,fontCache:t.fontCache,builtInCMapCache:t.builtInCMapCache,standardFontDataCache:t.standardFontDataCache,globalColorSpaceCache:this.globalColorSpaceCache,globalImageCache:t.globalImageCache,systemFontCache:t.systemFontCache,nonBlendModesSet:t.nonBlendModesSet,xfaFactory:null}));this.#ct.set(e,s)}t.setActualNumPages(s.size)}}async fontFallback(e,t){const{catalog:n,pdfManager:a}=this;for(const r of await Promise.all(n.fontCache))if(r.loadedName===e){r.fallback(t,a.evaluatorOptions);return}}async cleanup(e=!1){return this.catalog?this.catalog.cleanup(e):clearGlobalCaches()}async#gt(e,t,n,a,r,s,i){const{xref:o}=this;if(!(n instanceof Ref)||s.has(n))return;s.put(n);const l=await o.fetchAsync(n);if(!(l instanceof Dict))return;let f=await l.getAsync("Subtype");f=f instanceof Name?f.name:null;if("Link"===f)return;if(l.has("T")){const t=stringToPDFString(await l.getAsync("T"));e=""===e?t:`${e}.${t}`}else{let n=l;for(;;){n=n.getRaw("Parent")||t;if(n instanceof Ref){if(s.has(n))break;n=await o.fetchAsync(n)}if(!(n instanceof Dict))break;if(n.has("T")){const t=stringToPDFString(await n.getAsync("T"));e=""===e?t:`${e}.${t}`;break}}}t&&!l.has("Parent")&&isName(l.get("Subtype"),"Widget")&&i.put(n,t);a.getOrInsertComputed(e,makeArr).push(AnnotationFactory.create(o,n,r,null,!0,i,null,null).then(e=>e?.getFieldObject()).catch(function(e){warn(`#collectFieldObjects: "${e}".`);return null}));if(!l.has("Kids"))return;const c=await l.getAsync("Kids");if(Array.isArray(c))for(const t of c)await this.#gt(e,n,t,a,r,s,i)}get fieldObjects(){return shadow(this,"fieldObjects",this.pdfManager.ensureDoc("formInfo").then(async e=>{if(!e.hasFields)return null;const t=await this.annotationGlobals;if(!t)return null;const{acroForm:n}=t,a=new RefSet,r=Object.create(null),s=new Map,i=new RefSetCache;for(const e of n.get("Fields"))await this.#gt("",null,e,s,t,a,i);const o=[];for(const[e,t]of s)o.push(Promise.all(t).then(t=>{(t=t.filter(e=>!!e)).length>0&&(r[e]=t)}));await Promise.all(o);return{allFields:objectSize(r)>0?r:null,orphanFields:i}}))}get hasJSActions(){return shadow(this,"hasJSActions",this.pdfManager.ensureDoc("_parseHasJSActions"))}async _parseHasJSActions(){const[e,t]=await Promise.all([this.pdfManager.ensureCatalog("jsActions"),this.pdfManager.ensureDoc("fieldObjects")]);return!!e||!!t?.allFields&&Object.values(t.allFields).some(e=>e.some(e=>null!==e.actions))}get calculationOrderIds(){const e=this.catalog.acroForm?.get("CO");if(!Array.isArray(e)||0===e.length)return shadow(this,"calculationOrderIds",null);const t=[];for(const n of e)n instanceof Ref&&t.push(n.toString());return shadow(this,"calculationOrderIds",t.length?t:null)}get annotationGlobals(){return shadow(this,"annotationGlobals",AnnotationFactory.createGlobals(this.pdfManager))}}class BasePdfManager{constructor({docBaseUrl:e,docId:t,enableXfa:n,evaluatorOptions:a,handler:r,password:s}){this._docBaseUrl=function parseDocBaseUrl(e){if(e){const t=createValidAbsoluteUrl(e);if(t)return t.href;warn(`Invalid absolute docBaseUrl: "${e}".`)}return null}(e);this._docId=t;this._password=s;this.enableXfa=n;a.isOffscreenCanvasSupported&&=FeatureTest.isOffscreenCanvasSupported;a.isImageDecoderSupported&&=FeatureTest.isImageDecoderSupported;this.evaluatorOptions=Object.freeze(a);ImageResizer.setOptions(a);JpegStream.setOptions(a);OperatorList.setOptions(a);const i={...a,handler:r};JpxImage.setOptions(i);IccColorSpace.setOptions(i);CmykICCBasedCS.setOptions(i);JBig2CCITTFaxWasmImage.setOptions(i)}get docId(){return this._docId}get password(){return this._password}get docBaseUrl(){return this._docBaseUrl}ensureDoc(e,t){return this.ensure(this.pdfDocument,e,t)}ensureXRef(e,t){return this.ensure(this.pdfDocument.xref,e,t)}ensureCatalog(e,t){return this.ensure(this.pdfDocument.catalog,e,t)}getPage(e){return this.pdfDocument.getPage(e)}fontFallback(e,t){return this.pdfDocument.fontFallback(e,t)}cleanup(e=!1){return this.pdfDocument.cleanup(e)}async ensure(e,t,n){unreachable("Abstract method `ensure` called")}requestRange(e,t){unreachable("Abstract method `requestRange` called")}requestLoadedStream(e=!1){unreachable("Abstract method `requestLoadedStream` called")}sendProgressiveData(e){unreachable("Abstract method `sendProgressiveData` called")}updatePassword(e){this._password=e}terminate(e){unreachable("Abstract method `terminate` called")}}class LocalPdfManager extends BasePdfManager{constructor(e){super(e);const t=new Stream(e.source);this.pdfDocument=new PDFDocument(this,t);this._loadedStreamPromise=Promise.resolve(t)}async ensure(e,t,n){const a=e[t];return"function"==typeof a?a.apply(e,n):a}requestRange(e,t){return Promise.resolve()}requestLoadedStream(e=!1){return this._loadedStreamPromise}terminate(e){}}class NetworkPdfManager extends BasePdfManager{constructor(e){super(e);this.streamManager=new ChunkedStreamManager(e.source,{msgHandler:e.handler,length:e.length,disableAutoFetch:e.disableAutoFetch,rangeChunkSize:e.rangeChunkSize});this.pdfDocument=new PDFDocument(this,this.streamManager.getStream())}async ensure(e,t,n){try{const a=e[t];return"function"==typeof a?a.apply(e,n):a}catch(a){if(!(a instanceof MissingDataException))throw a;await this.requestRange(a.begin,a.end);return this.ensure(e,t,n)}}requestRange(e,t){return this.streamManager.requestRange(e,t)}requestLoadedStream(e=!1){return this.streamManager.requestAllChunks(e)}sendProgressiveData(e){this.streamManager.onReceiveData({chunk:e})}terminate(e){this.streamManager.abort(e)}}__webpack_require__(1689);const gl=1,bl=2,wl=1,jl=2,kl=3,yl=4,ql=5,vl=6,Sl=7,xl=8;function onFn(){}function wrapReason(e){if(e instanceof AbortException||e instanceof InvalidPDFException||e instanceof PasswordException||e instanceof ResponseException||e instanceof UnknownErrorException)return e;e instanceof Error||"object"==typeof e&&null!==e||unreachable('wrapReason: Expected "reason" to be a (possibly cloned) Error.');switch(e.name){case"AbortException":return new AbortException(e.message);case"InvalidPDFException":return new InvalidPDFException(e.message);case"PasswordException":return new PasswordException(e.message,e.code);case"ResponseException":return new ResponseException(e.message,e.status,e.missing);case"UnknownErrorException":return new UnknownErrorException(e.message,e.details)}return new UnknownErrorException(e.message,e.toString())}class MessageHandler{#bt=new AbortController;constructor(e,t,n){this.sourceName=e;this.targetName=t;this.comObj=n;this.callbackId=1;this.streamId=1;this.streamSinks=Object.create(null);this.streamControllers=Object.create(null);this.callbackCapabilities=Object.create(null);this.actionHandler=Object.create(null);n.addEventListener("message",this.#wt.bind(this),{signal:this.#bt.signal})}#wt({data:e}){if(e.targetName!==this.sourceName)return;if(e.stream){this.#jt(e);return}if(e.callback){const t=e.callbackId,n=this.callbackCapabilities[t];if(!n)throw new Error(`Cannot resolve callback ${t}`);delete this.callbackCapabilities[t];if(e.callback===gl)n.resolve(e.data);else{if(e.callback!==bl)throw new Error("Unexpected callback case");n.reject(wrapReason(e.reason))}return}const t=this.actionHandler[e.action];if(!t)throw new Error(`Unknown action from worker: ${e.action}`);if(e.callbackId){const n=this.sourceName,a=e.sourceName,r=this.comObj;Promise.try(t,e.data).then(function(t){r.postMessage({sourceName:n,targetName:a,callback:gl,callbackId:e.callbackId,data:t})},function(t){r.postMessage({sourceName:n,targetName:a,callback:bl,callbackId:e.callbackId,reason:wrapReason(t)})});return}e.streamId?this.#kt(e):t(e.data)}on(e,t){const n=this.actionHandler;if(n[e])throw new Error(`There is already an actionName called "${e}"`);n[e]=t}send(e,t,n){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},n)}sendWithPromise(e,t,n){const a=this.callbackId++,r=Promise.withResolvers();this.callbackCapabilities[a]=r;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:a,data:t},n)}catch(e){r.reject(e)}return r.promise}sendWithStream(e,t,n,a){const r=this.streamId++,s=this.sourceName,i=this.targetName,o=this.comObj;return new ReadableStream({start:n=>{const l=Promise.withResolvers();this.streamControllers[r]={controller:n,startCall:l,pullCall:null,cancelCall:null,isClosed:!1};o.postMessage({sourceName:s,targetName:i,action:e,streamId:r,data:t,desiredSize:n.desiredSize},a);return l.promise},pull:e=>{const t=Promise.withResolvers();this.streamControllers[r].pullCall=t;o.postMessage({sourceName:s,targetName:i,stream:vl,streamId:r,desiredSize:e.desiredSize});return t.promise},cancel:e=>{assert(e instanceof Error,"cancel must have a valid reason");const t=Promise.withResolvers();this.streamControllers[r].cancelCall=t;this.streamControllers[r].isClosed=!0;o.postMessage({sourceName:s,targetName:i,stream:wl,streamId:r,reason:wrapReason(e)});return t.promise}},n)}#kt(e){const t=e.streamId,n=this.sourceName,a=e.sourceName,r=this.comObj,s=this,i=this.actionHandler[e.action],o={enqueue(e,s=1,i){if(this.isCancelled)return;const o=this.desiredSize;this.desiredSize-=s;if(o>0&&this.desiredSize<=0){this.sinkCapability=Promise.withResolvers();this.ready=this.sinkCapability.promise}r.postMessage({sourceName:n,targetName:a,stream:yl,streamId:t,chunk:e},i)},close(){if(!this.isCancelled){this.isCancelled=!0;r.postMessage({sourceName:n,targetName:a,stream:kl,streamId:t});delete s.streamSinks[t]}},error(e){assert(e instanceof Error,"error must have a valid reason");if(!this.isCancelled){this.isCancelled=!0;r.postMessage({sourceName:n,targetName:a,stream:ql,streamId:t,reason:wrapReason(e)})}},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};o.sinkCapability.resolve();o.ready=o.sinkCapability.promise;this.streamSinks[t]=o;Promise.try(i,e.data,o).then(function(){r.postMessage({sourceName:n,targetName:a,stream:xl,streamId:t,success:!0})},function(e){r.postMessage({sourceName:n,targetName:a,stream:xl,streamId:t,reason:wrapReason(e)})})}#jt(e){const t=e.streamId,n=this.sourceName,a=e.sourceName,r=this.comObj,s=this.streamControllers[t],i=this.streamSinks[t];switch(e.stream){case xl:e.success?s.startCall.resolve():s.startCall.reject(wrapReason(e.reason));break;case Sl:e.success?s.pullCall.resolve():s.pullCall.reject(wrapReason(e.reason));break;case vl:if(!i){r.postMessage({sourceName:n,targetName:a,stream:Sl,streamId:t,success:!0});break}i.desiredSize<=0&&e.desiredSize>0&&i.sinkCapability.resolve();i.desiredSize=e.desiredSize;Promise.try(i.onPull||onFn).then(function(){r.postMessage({sourceName:n,targetName:a,stream:Sl,streamId:t,success:!0})},function(e){r.postMessage({sourceName:n,targetName:a,stream:Sl,streamId:t,reason:wrapReason(e)})});break;case yl:assert(s,"enqueue should have stream controller");if(s.isClosed)break;s.controller.enqueue(e.chunk);break;case kl:assert(s,"close should have stream controller");if(s.isClosed)break;s.isClosed=!0;s.controller.close();this.#yt(s,t);break;case ql:assert(s,"error should have stream controller");s.controller.error(wrapReason(e.reason));this.#yt(s,t);break;case jl:e.success?s.cancelCall.resolve():s.cancelCall.reject(wrapReason(e.reason));this.#yt(s,t);break;case wl:if(!i)break;const o=wrapReason(e.reason);Promise.try(i.onCancel||onFn,o).then(function(){r.postMessage({sourceName:n,targetName:a,stream:jl,streamId:t,success:!0})},function(e){r.postMessage({sourceName:n,targetName:a,stream:jl,streamId:t,reason:wrapReason(e)})});i.sinkCapability.reject(o);i.isCancelled=!0;delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}async#yt(e,t){await Promise.allSettled([e.startCall?.promise,e.pullCall?.promise,e.cancelCall?.promise]);delete this.streamControllers[t]}destroy(){this.#bt?.abort();this.#bt=null}}async function writeObject(e,t,n,{encrypt:a=null,encryptRef:r=null}){const s=a&&r!==e?a.createCipherTransform(e.num,e.gen):null;n.push(`${e.num} ${e.gen} obj\n`);await writeValue(t,n,s);n.push("\nendobj\n")}async function writeDict(e,t,n){t.push("<<");for(const[a,r]of e.getRawEntries()){t.push(` /${escapePDFName(a)} `);await writeValue(r,t,n)}t.push(">>")}async function writeValue(e,t,n){if(e instanceof Name)t.push(`/${escapePDFName(e.name)}`);else if(e instanceof Ref)t.push(`${e.num} ${e.gen} R`);else if(Array.isArray(e)||ArrayBuffer.isView(e))await async function writeArray(e,t,n){t.push("[");for(let a=0,r=e.length;a<r;a++){await writeValue(e[a],t,n);a<r-1&&t.push(" ")}t.push("]")}(e,t,n);else if("string"==typeof e){n&&(e=n.encryptString(e));t.push(`(${escapeString(e)})`)}else"number"==typeof e||"boolean"==typeof e?t.push(e.toString()):e instanceof Dict?await writeDict(e,t,n):e instanceof BaseStream?await async function writeStream(e,t,n){(e=e.getOriginalStream()).reset();let a=e.getBytes();const{dict:r}=e,[s,i]=await Promise.all([r.getAsync("Filter"),r.getAsync("DecodeParms")]),o=isName(Array.isArray(s)?await r.xref.fetchIfRefAsync(s[0]):s,"FlateDecode");if(a.length>=256&&!o)try{const e=new CompressionStream("deflate"),t=e.writable.getWriter();await t.ready;t.write(a).then(async()=>{await t.ready;await t.close()}).catch(()=>{});const n=await new Response(e.readable).arrayBuffer();a=new Uint8Array(n);let l,f;if(s){if(!o){l=Array.isArray(s)?[Name.get("FlateDecode"),...s]:[Name.get("FlateDecode"),s];i&&(f=Array.isArray(i)?[null,...i]:[null,i])}}else l=Name.get("FlateDecode");l&&r.set("Filter",l);f&&r.set("DecodeParms",f)}catch(e){info(`writeStream - cannot compress data: "${e}".`)}let l=bytesToString(a);n&&(l=n.encryptString(l));r.set("Length",l.length);await writeDict(r,t,n);t.push(" stream\n",l,"\nendstream")}(e,t,n):null===e?t.push("null"):warn(`Unhandled value in writer: ${typeof e}, please file a bug.`)}function writeInt(e,t,n,a){for(let r=t+n-1;r>n-1;r--){a[r]=255&e;e>>=8}return n+t}function writeString(e,t,n){const a=e.length;for(let r=0;r<a;r++)n[t+r]=255&e.charCodeAt(r);return t+a}function updateXFA({xfaData:e,xfaDatasetsRef:t,changes:n,xref:a}){if(null===e){e=function writeXFADataForAcroform(e,t){const n=new SimpleXMLParser({hasAttributes:!0}).parseFromString(e);for(const{xfa:e}of t){if(!e)continue;const{path:t,value:a}=e;if(!t)continue;const r=parseXFAPath(t);let s=n.documentElement.searchNode(r,0);!s&&r.length>1&&(s=n.documentElement.searchNode([r.at(-1)],0));s?s.childNodes=Array.isArray(a)?a.map(e=>new SimpleDOMNode("value",e)):[new SimpleDOMNode("#text",a)]:warn(`Node not found for path: ${t}`)}const a=[];n.documentElement.dump(a);return a.join("")}(a.fetchIfRef(t).getString(),n)}const r=new StringStream(e);r.dict=new Dict(a);r.dict.setIfName("Type","EmbeddedFile");n.put(t,{data:r})}function getIndexes(e){const t=[];for(const{ref:n}of e)n.num===t.at(-2)+t.at(-1)?t[t.length-1]+=1:t.push(n.num,1);return t}function computeIDs(e,t,n){if(Array.isArray(t.fileIds)&&t.fileIds.length>0){const a=function computeMD5(e,t){const n=Math.floor(Date.now()/1e3),a=t.filename||"",r=[n.toString(),a,e.toString(),...t.infoMap.values()],s=Math.sumPrecise(r.map(e=>e.length)),i=new Uint8Array(s);let o=0;for(const e of r)o=writeString(e,o,i);return bytesToString(calculateMD5(i,0,i.length))}(e,t);n.set("ID",[t.fileIds[0]||a,a])}}async function incrementalUpdate({originalData:e,xrefInfo:t,changes:n,xref:a=null,hasXfa:r=!1,xfaDatasetsRef:s=null,hasXfaDatasetsEntry:i=!1,needAppearances:o,acroFormRef:l=null,acroForm:f=null,xfaData:c=null,useXrefStream:h=!1}){await async function updateAcroform({xref:e,acroForm:t,acroFormRef:n,hasXfa:a,hasXfaDatasetsEntry:r,xfaDatasetsRef:s,needAppearances:i,changes:o}){!a||r||s||warn("XFA - Cannot save it");if(!i&&(!a||!s||r))return;const l=t.clone();if(a&&!r){const e=t.get("XFA").slice();e.splice(2,0,"datasets");e.splice(3,0,s);l.set("XFA",e)}i&&l.set("NeedAppearances",!0);o.put(n,{data:l})}({xref:a,acroForm:f,acroFormRef:l,hasXfa:r,hasXfaDatasetsEntry:i,xfaDatasetsRef:s,needAppearances:o,changes:n});r&&updateXFA({xfaData:c,xfaDatasetsRef:s,changes:n,xref:a});const u=function getTrailerDict(e,t,n){const a=new Dict(null);a.setIfDefined("Prev",e?.startXRef);const r=e.newRef;if(n){t.put(r,{data:""});a.set("Size",r.num+1);a.setIfName("Type","XRef")}else a.set("Size",r.num);a.setIfDefined("Root",e?.rootRef);a.setIfDefined("Info",e?.infoRef);a.setIfDefined("Encrypt",e?.encryptRef);return a}(t,n,h),m=[],p=await async function writeChanges(e,t,n=[]){const a=[];for(const[r,{data:s,objStreamRef:i,index:o}]of e.items())if(i)a.push({ref:r,data:s,objStreamRef:i,index:o});else if(null!==s&&"string"!=typeof s){await writeObject(r,s,n,t);a.push({ref:r,data:n.join("")});n.length=0}else a.push({ref:r,data:s});return a.sort((e,t)=>e.ref.num-t.ref.num)}(n,a,m);let d=e.length;const g=e.at(-1);if(10!==g&&13!==g){m.push("\n");d+=1}for(const{data:e}of p)null!==e&&m.push(e);await(h?async function getXRefStreamTable(e,t,n,a,r){const s=[];let i=0,o=0;for(const{ref:e,data:a,objStreamRef:r,index:l}of n){let n;i=Math.max(i,t);if(r){n=l;s.push([2,r.num,n])}else if(null!==a){n=Math.min(e.gen,65535);s.push([1,t,n]);t+=a.length}else{n=Math.min(e.gen+1,65535);s.push([0,0,n])}o=Math.max(o,n)}a.set("Index",getIndexes(n));const l=[1,getSizeInBytes(i),getSizeInBytes(o)];a.set("W",l);computeIDs(t,e,a);const f=Math.sumPrecise(l),c=new Uint8Array(f*s.length),h=new Stream(c);h.dict=a;let u=0;for(const[e,t,n]of s){u=writeInt(e,l[0],u,c);u=writeInt(t,l[1],u,c);u=writeInt(n,l[2],u,c)}await writeObject(e.newRef,h,r,{});r.push("startxref\n",t.toString(),"\n%%EOF\n")}(t,d,p,u,m):async function getXRefTable(e,t,n,a,r){r.push("xref\n");const s=getIndexes(n);let i=0;for(const{ref:e,data:a}of n){if(e.num===s[i]){r.push(`${s[i]} ${s[i+1]}\n`);i+=2}if(null!==a){r.push(`${t.toString().padStart(10,"0")} ${Math.min(e.gen,65535).toString().padStart(5,"0")} n\r\n`);t+=a.length}else r.push(`0000000000 ${Math.min(e.gen+1,65535).toString().padStart(5,"0")} f\r\n`)}computeIDs(t,e,a);r.push("trailer\n");await writeDict(a,r,null);r.push("\nstartxref\n",t.toString(),"\n%%EOF\n")}(t,d,p,u,m));const b=e.length+Math.sumPrecise(m.map(e=>e.length)),w=new Uint8Array(b);w.set(e);let j=e.length;for(const e of m)j=writeString(e,j,w);return w}class PageData{constructor(e,t){this.page=e;this.documentData=t;this.annotations=null;this.pointingNamedDestinations=null;t.pagesMap.put(e.ref,this)}}class DocumentData{constructor(e){this.document=e;this.destinations=null;this.pageLabels=null;this.pagesMap=new RefSetCache;this.oldRefMapping=new RefSetCache;this.dedupNamedDestinations=new Map;this.usedNamedDestinations=new Set;this.postponedRefCopies=new RefSetCache;this.usedStructParents=new Set;this.oldStructParentMapping=new Map;this.structTreeRoot=null;this.parentTree=null;this.idTree=null;this.roleMap=null;this.classMap=null;this.namespaces=null;this.structTreeAF=null;this.structTreePronunciationLexicon=[]}}class XRefWrapper{constructor(e){this.entries=e}fetch(e){return e instanceof Ref?this.entries[e.num]:e}}class PDFEditor{hasSingleFile=!1;currentDocument=null;oldPages=[];newPages=[];xref=[null];xrefWrapper=new XRefWrapper(this.xref);newRefCount=1;namesDict=null;version="1.7";pageLabels=null;namedDestinations=new Map;parentTree=new Map;structTreeKids=[];idTree=new Map;classMap=new Dict;roleMap=new Dict;namespaces=new Map;structTreeAF=[];structTreePronunciationLexicon=[];constructor({useObjectStreams:e=!0,title:t="",author:n=""}={}){[this.rootRef,this.rootDict]=this.newDict;[this.infoRef,this.infoDict]=this.newDict;[this.pagesRef,this.pagesDict]=this.newDict;this.useObjectStreams=e;this.objStreamRefs=e?new Set:null;this.title=t;this.author=n}get newRef(){return Ref.get(this.newRefCount++,0)}get newDict(){const e=this.newRef;return[e,this.xref[e.num]=new Dict]}async#qt(e,t){const n=this.newRef;this.xref[n.num]=await this.#vt(e,!0,t);return n}cloneDict(e){const t=e.clone();t.xref=this.xrefWrapper;return t}async#vt(e,t,n){if(e instanceof Ref){const{currentDocument:{oldRefMapping:t}}=this;let a=t.get(e);if(a)return a;const r=e;if("number"==typeof(e=await n.fetchAsync(r)))return e;a=this.newRef;t.put(r,a);this.xref[a.num]=await this.#vt(e,!0,n);return a}const a=[],{currentDocument:{postponedRefCopies:r}}=this;if(Array.isArray(e)){t&&(e=e.slice());for(let t=0,s=e.length;t<s;t++){const s=r.get(e[t]);s?s.push(n=>e[t]=n):a.push(this.#vt(e[t],!0,n).then(n=>e[t]=n))}await Promise.all(a);return e}let s;if(e instanceof BaseStream){({dict:s}=e=e.getOriginalStream().clone());s.xref=this.xrefWrapper}else if(e instanceof Dict){t&&((e=e.clone()).xref=this.xrefWrapper);s=e}if(s){for(const[e,t]of s.getRawEntries()){const i=r.get(t);i?i.push(t=>s.set(e,t)):a.push(this.#vt(t,!0,n).then(t=>s.set(e,t)))}await Promise.all(a)}return e}async#St(e,t,n,a,r,s,i,o=new RefSet){const{currentDocument:{pagesMap:l,oldRefMapping:f}}=this,c=t.getRaw("Pg");if(c instanceof Ref&&!l.has(c))return null;let h;const u=h=t.getRaw("K");if(u instanceof Ref){if(o.has(u))return null;h=await n.fetchAsync(u);Array.isArray(h)||(h=[u])}h=Array.isArray(h)?h:[h];const m=[],p=[];for(let t of h){const c=t instanceof Ref?t:null;if(c){if(o.has(c))continue;o.put(c);t=await n.fetchAsync(c)}if("number"==typeof t){m.push(t);continue}if(!(t instanceof Dict))continue;const h=t.getRaw("Pg");if(h instanceof Ref&&!l.has(h))continue;const u=t.get("Type");if(!u||isName(u,"StructElem")){let e=!1;if(c&&a.has(c)){if(!isName(t.get("S"),"Link"))continue;e=!0}const l=await this.#St(c,t,n,a,r,s,i,o);if(l){p.push(m.length);m.push(l);c&&f.put(c,l);e&&this.xref[l.num].setIfName("S","Span")}continue}if(isName(u,"OBJR")){if(!c)continue;const t=f.get(c);if(!t)continue;const n=this.xref[t.num].getRaw("Obj");if(n instanceof Ref){const t=this.xref[n.num];if(t instanceof Dict&&!t.has("StructParent")&&e){const n=this.parentTree.size;this.parentTree.set(n,[f,e]);t.set("StructParent",n)}}m.push(t);continue}if(isName(u,"MCR")){const e=await this.#vt(c||t,!0,n);m.push(e);continue}if(c){const e=await this.#vt(c,!0,n);m.push(e)}}if(0!==h.length&&0===m.length)return null;const d=this.newRef,g=this.xref[d.num]=this.cloneDict(t);g.delete("ID");g.delete("C");g.delete("K");g.delete("P");g.delete("S");await this.#vt(g,!1,n);const b=t.get("C");if(b instanceof Name){const e=s.get(b.name);e?g.set("C",Name.get(e)):g.set("C",b)}else if(Array.isArray(b)){const e=[];for(const t of b)if(t instanceof Name){const n=s.get(t.name);n?e.push(Name.get(n)):e.push(t)}g.set("C",e)}const w=t.get("S");if(w instanceof Name){const e=i.get(w.name);e?g.set("S",Name.get(e)):g.set("S",w)}const j=t.get("ID");if("string"==typeof j){const e=stringToPDFString(j,!1),t=r.get(e);t?g.set("ID",stringToAsciiOrUTF16BE(t)):g.set("ID",j)}let k=g.get("A");if(k){Array.isArray(k)||(k=[k]);for(let e of k){e=this.xrefWrapper.fetch(e);if(isName(e.get("O"),"Table")&&e.has("Headers")){const t=this.xrefWrapper.fetch(e.getRaw("Headers"));if(Array.isArray(t))for(let e=0,n=t.length;e<n;e++){const n=r.get(stringToPDFString(t[e],!1));n&&(t[e]=n)}}}}for(const e of p){const t=m[e];this.xref[t.num].set("P",d)}1===m.length?g.set("K",m[0]):m.length>1&&g.set("K",m);return d}async extractPages(e){const t=[];let n=0;this.hasSingleFile=1===e.length;const a=[];for(const{document:r,includePages:s,excludePages:i,pageIndices:o}of e){if(!r)continue;o&&(n=-1);const e=new DocumentData(r);a.push(e);t.push(this.#xt(e));let l,f,c,h;for(const e of s||[])Array.isArray(e)?(f||=[]).push(e):(l||=new Set).add(e);for(const e of i||[])Array.isArray(e)?(h||=[]).push(e):(c||=new Set).add(e);let u=0;for(let a=0,s=r.numPages;a<s;a++){if(c?.has(a))continue;if(h){let e=!1;for(const[t,n]of h)if(a>=t&&a<=n){e=!0;break}if(e)continue}let s,i=!1;l&&(i=l.has(a));if(!i&&f)for(const[e,t]of f)if(a>=e&&a<=t){i=!0;break}i||l||f||(i=!0);if(i){o&&(s=o[u++]);if(void 0===s)if(-1!==n)s=n++;else for(s=0;void 0===this.oldPages[s];s++);t.push(r.getPage(a).then(t=>{this.oldPages[s]=new PageData(t,e)}))}}}await Promise.all(t);t.length=0;this.#At(a);this.#Ct();for(const e of this.oldPages)t.push(this.#It(e));await Promise.all(t);this.#Ft();this.#Tt(a);for(let e=0,t=this.oldPages.length;e<t;e++)this.newPages[e]=await this.#Ot(e,null);this.#Rt(a);await this.#Bt(a);return this.writePDF()}async#xt(e){const{document:{pdfManager:t,xref:n}}=e;await Promise.all([t.ensureCatalog("destinations").then(t=>e.destinations=t),t.ensureCatalog("rawPageLabels").then(t=>e.pageLabels=t),t.ensureCatalog("structTreeRoot").then(t=>e.structTreeRoot=t)]);const a=e.structTreeRoot;if(a){const t=a.dict,r=t.get("ParentTree");if(r){const t=new NumberTree(r,n);e.parentTree=t.getAll(!0)}const s=t.get("IDTree");if(s){const t=new NameTree(s,n);e.idTree=t.getAll(!0)}e.roleMap=t.get("RoleMap")||null;e.classMap=t.get("ClassMap")||null;let i=t.get("Namespaces")||null;i&&!Array.isArray(i)&&(i=[i]);e.namespaces=i;e.structTreeAF=t.get("AF")||null;e.structTreePronunciationLexicon=t.get("PronunciationLexicon")||null}}async#It(e){const{page:{xref:t,annotations:n},documentData:{pagesMap:a,destinations:r,usedNamedDestinations:s}}=e;if(!n)return;const i=[];let o=[],l=0;for(const e of n){const n=l++;i.push(t.fetchIfRefAsync(e).then(async t=>{if(!isName(t.get("Subtype"),"Link")){o[n]=e;return}const i=t.get("A"),l=i instanceof Dict?i.get("D"):t.get("Dest");if(l&&(!Array.isArray(l)||l[0]instanceof Ref&&!a.has(l[0]))){if("string"==typeof l){const t=stringToPDFString(l,!0);if(r.has(t)){o[n]=e;s.add(t)}}}else o[n]=e}))}await Promise.all(i);o=o.filter(e=>!!e);e.annotations=o.length>0?o:null}#Tt(e){for(const{postponedRefCopies:t,pagesMap:n}of e)for(const e of n.keys())t.put(e,[])}#Rt(e){for(const{postponedRefCopies:t,oldRefMapping:n}of e){for(const[e,a]of t.items()){const t=n.get(e);for(const e of a)e(t)}t.clear()}}#Ht(e,t,n=new RefSet){if(e instanceof Ref){if(!n.has(e)){n.put(e);this.#Ht(this.xref[e.num],t,n)}return}if(Array.isArray(e)){for(const a of e)this.#Ht(a,t,n);return}let a;e instanceof BaseStream?({dict:a}=e):e instanceof Dict&&(a=e);if(a){t(a);for(const e of a.getRawValues())this.#Ht(e,t,n)}}async#Bt(e){let t=0;const{parentTree:n}=this;for(let e=0,a=this.newPages.length;e<a;e++){const{documentData:{parentTree:a,oldRefMapping:r,oldStructParentMapping:s,usedStructParents:i,document:{xref:o}}}=this.oldPages[e];if(!a)continue;const l=this.newPages[e],f=this.xref[l.num];this.#Ht(f,e=>{const l=e.get("StructParent")??e.get("StructParents");if("number"!=typeof l)return;i.add(l);let f=a.get(l);const c=f instanceof Ref?f:null;if(c){const e=o.fetch(c);Array.isArray(e)&&(f=e)}Array.isArray(f)&&f.every(e=>null===e)&&(f=null);if(!f){e.has("StructParent")?e.delete("StructParent"):e.delete("StructParents");return}let h=s.get(l);if(void 0===h){h=t++;s.set(l,h);n.set(h,[r,f])}e.has("StructParent")?e.set("StructParent",h):e.set("StructParents",h)})}const{structTreeKids:a,idTree:r,classMap:s,roleMap:i,namespaces:o,structTreeAF:l,structTreePronunciationLexicon:f}=this;for(const t of e){const{document:{xref:e},oldRefMapping:n,parentTree:c,usedStructParents:h,structTreeRoot:u,idTree:m,classMap:p,roleMap:d,namespaces:g,structTreeAF:b,structTreePronunciationLexicon:w}=t;if(!u)continue;this.currentDocument=t;const j=new RefSet;for(const[e,t]of c||[])!h.has(e)&&t instanceof Ref&&j.put(t);const k=new Map;for(const[e,t]of m||[]){let n=e;if(r.has(e))for(let t=1;;t++){const a=`${e}_${t}`;if(!r.has(a)){k.set(e,a);n=a;break}}r.set(n,t)}const y=new Map;if(p?.size>0)for(let[t,n]of p){n=await this.#vt(n,!0,e);if(s.has(t))for(let e=1;;e++){const n=`${t}_${e}`;if(!s.has(n)){y.set(t,n);t=n;break}}s.set(t,n)}const q=new Map;if(d?.size>0)for(const[e,t]of d){const n=i.get(e);if(n){if(n!==t)for(let n=1;;n++){const a=`${e}_${n}`;if(!i.has(a)){q.set(e,a);i.set(a,t);break}}}else i.set(e,t)}if(g?.length>0)for(const t of g){const n=await e.fetchIfRefAsync(t);let a=n.get("NS");if(!a||o.has(a))continue;a=stringToPDFString(a,!1);const r=await this.#vt(n,!0,e);o.set(a,r)}if(b)for(const t of b)l.push(await this.#vt(t,!0,e));if(w)for(const t of w)f.push(await this.#vt(t,!0,e));let v=u.dict.get("K");if(v){v=Array.isArray(v)?v:[v];for(let t of v){const n=t instanceof Ref?t:null;if(n&&j.has(n))continue;t=await e.fetchIfRefAsync(t);const r=await this.#St(n,t,e,j,k,y,q);r&&a.push(r)}for(const[e,t]of m||[]){const a=n.get(t),s=k.get(e)||e;a?r.set(s,a):r.delete(s)}}}for(const[e,[t,a]]of n){if(!a){n.delete(e);continue}if(!Array.isArray(a)){const r=t.get(a);void 0===r?n.delete(e):n.set(e,r);continue}const r=a.map(e=>e instanceof Ref&&t.get(e)||null);0===r.length||r.every(e=>null===e)?n.delete(e):n.set(e,r)}this.currentDocument=null}#At(e){for(const t of e){if(!t.destinations)continue;const{destinations:e,pagesMap:n}=t,a=t.destinations=new Map;for(const[t,r]of Object.entries(e)){const e=r[0],s=n.get(e);if(s){(s.pointingNamedDestinations||=new Set).add(t);a.set(t,r)}}}}#Ft(){const{namedDestinations:e}=this;for(let t=0,n=this.oldPages.length;t<n;t++){const n=this.oldPages[t],{documentData:{destinations:a,dedupNamedDestinations:r,usedNamedDestinations:s}}=n;let{pointingNamedDestinations:i}=n;if(i){n.pointingNamedDestinations=i=i.intersection(s);for(const n of i){if(!s.has(n))continue;const i=a.get(n).slice();if(!e.has(n)){e.set(n,i);continue}const o=`${n}_p${t+1}`;r.set(n,o);e.set(o,i)}}}}#Dt(e,t){if(0===t.size)return;const fixDestination=(e,n,a)=>{"string"==typeof a&&e.set(n,t.get(stringToPDFString(a,!0))||a)};for(const t of e){const e=this.xref[t.num];if(!isName(e.get("Subtype"),"Link"))continue;const n=e.get("A");if(n instanceof Dict&&n.has("D")){const e=n.get("D");fixDestination(n,"D",e);continue}const a=e.get("Dest");fixDestination(e,"Dest",a)}}async#Ct(){if(!this.hasSingleFile)return;const{documentData:{document:e,pageLabels:t}}=this.oldPages[0];if(!t)return;const n=e.numPages,a=[],r=new Set(this.oldPages.map(({page:{pageIndex:e}})=>e));let s=null,i=-1;for(let e=0;e<n;e++){const n=t.get(e);if(n){s=n;i=s.has("St")?e:-1}if(r.has(e)){if(-1!==i){const t=s.get("St");s=this.cloneDict(s);s.set("St",t+(e-i));i=-1}a.push(s)}}s=a[0];let o=0;const l=this.pageLabels=[[0,s]];for(let e=0,t=a.length;e<t;e++){const t=a[e];if(t!==s){o=e;s=t;l.push([o,s])}}}async#Ot(e){const{page:t,documentData:n,annotations:a,pointingNamedDestinations:r}=this.oldPages[e];this.currentDocument=n;const{dedupNamedDestinations:s,oldRefMapping:i}=n,{xref:o,rotate:l,mediaBox:f,resources:c,ref:h}=t,u=this.newRef,m=this.xref[u.num]=this.cloneDict(t.pageDict);i.put(h,u);if(r)for(const e of r){const t=s.get(e)||e;this.namedDestinations.get(t)[0]=u}for(const e of["Rotate","MediaBox","CropBox","BleedBox","TrimBox","ArtBox","Resources","Annots","Parent","UserUnit"])m.delete(e);const p=this.newRefCount;await this.#vt(m,!1,o);m.set("Rotate",l);m.set("MediaBox",f);for(const e of["CropBox","BleedBox","TrimBox","ArtBox"]){const n=t.getBoundingBox(e);n?.some((e,t)=>e!==f[t])&&m.set(e,n)}const d=t.userUnit;1!==d&&m.set("UserUnit",d);m.setIfDict("Resources",await this.#vt(c,!0,o));if(a){const e=await this.#vt(a,!0,o);this.#Dt(e,s);m.setIfArray("Annots",e)}if(this.useObjectStreams){const e=this.newRefCount,t=[];for(let n=p;n<e;n++){this.xref[n]instanceof BaseStream||t.push(Ref.get(n,0))}for(let e=0;e<t.length;e+=65535){const n=this.newRef;this.objStreamRefs.add(n.num);this.xref[n.num]=t.slice(e,e+65535)}}this.currentDocument=null;return u}#Mt(){const{newPages:e,rootDict:t,pagesRef:n,pagesDict:a}=this;t.set("Pages",n);a.setIfName("Type","Pages");a.set("Count",e.length);const r=[{dict:a,kids:e,parentRef:n}];for(;r.length>0;){const{dict:e,kids:t,parentRef:n}=r.pop();if(t.length<=16){e.set("Kids",t);for(const e of t)this.xref[e.num].set("Parent",n);continue}const a=Math.max(16,Math.ceil(t.length/16)),s=[];for(let e=0;e<t.length;e+=a)s.push(t.slice(e,e+a));const i=[];e.set("Kids",i);for(const e of s){const[t,a]=this.newDict;i.push(t);a.setIfName("Type","Pages");a.set("Parent",n);a.set("Count",e.length);r.push({dict:a,kids:e,parentRef:t})}}}#Pt(e,t){const n=e.sort(t?([e],[t])=>e.localeCompare(t):([e],[t])=>e-t),[a,r]=this.newDict,s=[{dict:r,entries:n}],i=t?"Names":"Nums";for(;s.length>0;){const{dict:e,entries:t}=s.pop();if(t.length<=64){e.set("Limits",[t[0][0],t.at(-1)[0]]);e.set(i,t.flat());continue}const n=[],a=Math.max(64,Math.ceil(t.length/64));for(let e=0;e<t.length;e+=a)n.push(t.slice(e,e+a));const r=[];e.set("Kids",r);for(const e of n){const[t,n]=this.newDict;r.push(t);n.set("Limits",[e[0][0],e.at(-1)[0]]);s.push({dict:n,entries:e})}}return a}#Et(){const{pageLabels:e}=this;if(!e||0===e.length)return;const{rootDict:t}=this,n=this.#Pt(this.pageLabels,!1);t.set("PageLabels",n)}#Nt(){const{namedDestinations:e}=this;if(0!==e.size){if(!this.namesDict){[this.namesRef,this.namesDict]=this.newDict;this.rootDict.set("Names",this.namesRef)}this.namesDict.set("Dests",this.#Pt(Array.from(e.entries()),!0))}}#zt(){const{structTreeKids:e}=this;if(!e||0===e.length)return;const{rootDict:t}=this,n=this.newRef,a=this.xref[n.num]=new Dict;a.setIfName("Type","StructTreeRoot");a.setIfArray("K",e);for(const t of e){const e=this.xref[t.num],a=e.get("Type");a&&!isName(a,"StructElem")||e.set("P",n)}if(this.parentTree.size>0){const e=this.#Pt(Array.from(this.parentTree.entries()),!1);this.xref[e.num].setIfName("Type","ParentTree");a.set("ParentTree",e);a.set("ParentTreeNextKey",this.parentTree.size)}if(this.idTree.size>0){const e=this.#Pt(Array.from(this.idTree.entries()),!0);this.xref[e.num].setIfName("Type","IDTree");a.set("IDTree",e)}if(this.classMap.size>0){const e=this.newRef;this.xref[e.num]=this.classMap;a.set("ClassMap",e)}if(this.roleMap.size>0){const e=this.newRef;this.xref[e.num]=this.roleMap;a.set("RoleMap",e)}if(this.namespaces.size>0){const e=this.newRef;this.xref[e.num]=Array.from(this.namespaces.values());a.set("Namespaces",e)}if(this.structTreeAF.length>0){const e=this.newRef;this.xref[e.num]=this.structTreeAF;a.set("AF",e)}if(this.structTreePronunciationLexicon.length>0){const e=this.newRef;this.xref[e.num]=this.structTreePronunciationLexicon;a.set("PronunciationLexicon",e)}t.set("StructTreeRoot",n)}async#_t(){const{rootDict:e}=this;e.setIfName("Type","Catalog");e.setIfName("Version",this.version);this.#Mt();this.#Et();this.#Nt();this.#zt()}#Lt(){const e=new Map;if(this.hasSingleFile){const{xref:{trailer:t}}=this.oldPages[0].documentData.document,n=t.get("Info");for(const[t,a]of n||[])"string"==typeof a&&e.set(t,stringToPDFString(a))}e.delete("ModDate");e.set("CreationDate",getModificationDate());e.set("Creator","PDF.js");e.set("Producer","Firefox");this.author&&e.set("Author",this.author);this.title&&e.set("Title",this.title);for(const[t,n]of e)this.infoDict.set(t,stringToAsciiOrUTF16BE(n));return e}async#Ut(){if(!this.hasSingleFile)return[null,null,null];const{documentData:e}=this.oldPages[0],{document:{xref:{trailer:t,encrypt:n}}}=e;if(!t.has("Encrypt"))return[null,null,null];const a=t.get("Encrypt");if(!(a instanceof Dict))return[null,null,null];this.currentDocument=e;const r=[await this.#qt(a,t.xref),n,t.get("ID")];this.currentDocument=null;return r}async#Xt(){const e=new RefSetCache;e.put(Ref.get(0,65535),{data:null});for(let t=1,n=this.xref.length;t<n;t++)this.objStreamRefs?.has(t)?await this.#Wt(Ref.get(t,0),this.xref[t],e):e.put(Ref.get(t,0),{data:this.xref[t]});return[e,this.newRef]}async#Wt(e,t,n){const a=[""],r=[];let s=0;const i=[];for(let o=0,l=t.length;o<l;o++){const l=t[o];n.put(l,{data:null,objStreamRef:e,index:o});r.push(`${l.num} ${s}`);const f=this.xref[l.num];await writeValue(f,i,null);const c=i.join("");i.length=0;a.push(c);s+=c.length+1}a[0]=r.join("\n");const o=new StringStream(a.join("\n")),l=o.dict=new Dict;l.setIfName("Type","ObjStm");l.set("N",t.length);l.set("First",a[0].length+1);n.put(e,{data:o})}async writePDF(){await this.#_t();const e=this.#Lt(),[t,n,a]=await this.#Ut(),[r,s]=await this.#Xt(),i=[...`%PDF-${this.version}\n%`.split("").map(e=>e.charCodeAt(0)),250,222,250,206];return incrementalUpdate({originalData:new Uint8Array(i),changes:r,xrefInfo:{startXRef:null,rootRef:this.rootRef,infoRef:this.infoRef,encryptRef:t,newRef:s,fileIds:a||[null,null],infoMap:e},useXrefStream:this.useObjectStreams,xref:{encrypt:n,encryptRef:t}})}}class BasePDFStream{#Kt=null;#Vt=null;_fullReader=null;_rangeReaders=new Set;_source=null;constructor(e,t,n){this._source=e;this.#Kt=t;this.#Vt=n}get _progressiveDataLength(){return this._fullReader?._loaded??0}getFullReader(){assert(!this._fullReader,"BasePDFStream.getFullReader can only be called once.");return this._fullReader=new this.#Kt(this)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const n=new this.#Vt(this,e,t);this._rangeReaders.add(n);return n}cancelAllRequests(e){this._fullReader?.cancel(e);for(const t of new Set(this._rangeReaders))t.cancel(e)}}class BasePDFStreamReader{onProgress=null;_contentLength=0;_filename=null;_headersCapability=Promise.withResolvers();_isRangeSupported=!1;_isStreamingSupported=!1;_loaded=0;_stream=null;constructor(e){this._stream=e}_callOnProgress(){this.onProgress?.({loaded:this._loaded,total:this._contentLength})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){unreachable("Abstract method `read` called")}cancel(e){unreachable("Abstract method `cancel` called")}}class BasePDFStreamRangeReader{_stream=null;constructor(e,t,n){this._stream=e}async read(){unreachable("Abstract method `read` called")}cancel(e){unreachable("Abstract method `cancel` called")}}class PDFWorkerStream extends BasePDFStream{constructor(e){super(e,PDFWorkerStreamReader,PDFWorkerStreamRangeReader)}}class PDFWorkerStreamReader extends BasePDFStreamReader{_reader=null;constructor(e){super(e);const{msgHandler:t}=e._source,n=t.sendWithStream("GetReader");this._reader=n.getReader();t.sendWithPromise("ReaderHeadersReady").then(e=>{this._contentLength=e.contentLength;this._isStreamingSupported=e.isStreamingSupported;this._isRangeSupported=e.isRangeSupported;this._headersCapability.resolve()},this._headersCapability.reject)}async read(){const{value:e,done:t}=await this._reader.read();return t?{value:void 0,done:!0}:{value:e.buffer,done:!1}}cancel(e){this._reader.cancel(e)}}class PDFWorkerStreamRangeReader extends BasePDFStreamRangeReader{_reader=null;constructor(e,t,n){super(e,t,n);const{msgHandler:a}=e._source,r=a.sendWithStream("GetRangeReader",{begin:t,end:n});this._reader=r.getReader()}async read(){const{value:e,done:t}=await this._reader.read();return t?{value:void 0,done:!0}:{value:e.buffer,done:!1}}cancel(e){this._reader.cancel(e)}}class WorkerTask{constructor(e){this.name=e;this.terminated=!1;this._capability=Promise.withResolvers()}get finished(){return this._capability.promise}finish(){this._capability.resolve()}terminate(){this.terminated=!0}ensureNotTerminated(){if(this.terminated)throw new Error("Worker task was terminated")}}class WorkerMessageHandler{static{"undefined"==typeof window&&!n&&"undefined"!=typeof self&&"function"==typeof self.postMessage&&"onmessage"in self&&this.initializeFromPort(self)}static setup(e,t){let n=!1;e.on("test",t=>{if(!n){n=!0;e.send("test",t instanceof Uint8Array)}});e.on("configure",e=>{!function setVerbosityLevel(e){Number.isInteger(e)&&(an=e)}(e.verbosity)});e.on("GetDocRequest",e=>this.createDocumentHandler(e,t))}static createDocumentHandler(e,t){let n,a=!1,r=null;const s=new Set,i=getVerbosityLevel(),{docId:o,apiVersion:l}=e,f="5.5.207";if(l!==f)throw new Error(`The API version "${l}" does not match the Worker version "${f}".`);const buildMsg=(e,t)=>`The \`${e}.prototype\` contains unexpected enumerable property "${t}", thus breaking e.g. \`for...in\` iteration of ${e}s.`;for(const e in{})throw new Error(buildMsg("Object",e));for(const e in[])throw new Error(buildMsg("Array",e));const c=o+"_worker";let h=new MessageHandler(c,o,t);function ensureNotTerminated(){if(a)throw new Error("Worker was terminated")}function startWorkerTask(e){s.add(e)}function finishWorkerTask(e){e.finish();s.delete(e)}async function loadDocument(e){await n.ensureDoc("checkHeader");await n.ensureDoc("parseStartXRef");await n.ensureDoc("parse",[e]);await n.ensureDoc("checkFirstPage",[e]);await n.ensureDoc("checkLastPage",[e]);const t=await n.ensureDoc("isPureXfa");if(t){const e=new WorkerTask("loadXfaResources");startWorkerTask(e);await n.ensureDoc("loadXfaResources",[h,e]);finishWorkerTask(e)}const[a,r]=await Promise.all([n.ensureDoc("numPages"),n.ensureDoc("fingerprints")]);return{numPages:a,fingerprints:r,htmlForXfa:t?await n.ensureDoc("htmlForXfa"):null}}function setupDoc(e){function onSuccess(e){ensureNotTerminated();h.send("GetDoc",{pdfInfo:e})}function onFailure(e){if(!a)if(e instanceof PasswordException){const t=new WorkerTask(`PasswordException: response ${e.code}`);startWorkerTask(t);h.sendWithPromise("PasswordRequest",e).then(function({password:e}){finishWorkerTask(t);n.updatePassword(e);pdfManagerReady()}).catch(function(){finishWorkerTask(t);h.send("DocException",e)})}else h.send("DocException",wrapReason(e))}function pdfManagerReady(){ensureNotTerminated();loadDocument(!1).then(onSuccess,function(e){ensureNotTerminated();e instanceof XRefParseException?n.requestLoadedStream().then(function(){ensureNotTerminated();loadDocument(!0).then(onSuccess,onFailure)}):onFailure(e)})}ensureNotTerminated();(async function getPdfManager({data:e,password:t,disableAutoFetch:n,rangeChunkSize:a,length:s,docBaseUrl:i,enableXfa:l,evaluatorOptions:f}){const c={source:null,disableAutoFetch:n,docBaseUrl:i,docId:o,enableXfa:l,evaluatorOptions:f,handler:h,length:s,password:t,rangeChunkSize:a};if(e){c.source=e;return new LocalPdfManager(c)}const u=new PDFWorkerStream({msgHandler:h}),m=u.getFullReader(),p=Promise.withResolvers();let d,g=[],b=0;m.headersReady.then(function(){if(m.isRangeSupported){c.source=u;c.length=m.contentLength;c.disableAutoFetch||=m.isStreamingSupported;d=new NetworkPdfManager(c);for(const e of g)d.sendProgressiveData(e);g=[];p.resolve(d);r=null}}).catch(function(e){p.reject(e);r=null});new Promise(function(e,t){const readChunk=function({value:e,done:n}){try{ensureNotTerminated();if(n){if(!d){const e=arrayBuffersToBytes(g);g=[];s&&e.length!==s&&warn("reported HTTP length is different from actual");c.source=e;d=new LocalPdfManager(c);p.resolve(d)}r=null;return}b+=e.byteLength;m.isStreamingSupported||h.send("DocProgress",{loaded:b,total:Math.max(b,m.contentLength||0)});d?d.sendProgressiveData(e):g.push(e);m.read().then(readChunk,t)}catch(e){t(e)}};m.read().then(readChunk,t)}).catch(function(e){p.reject(e);r=null});r=e=>{u.cancelAllRequests(e)};return p.promise})(e).then(function(e){if(a){e.terminate(new AbortException("Worker was terminated."));throw new Error("Worker was terminated")}n=e;n.requestLoadedStream(!0).then(e=>{h.send("DataLoaded",{length:e.bytes.byteLength})})}).then(pdfManagerReady,onFailure)}h.on("GetPage",function(e){return n.getPage(e.pageIndex).then(function(e){return Promise.all([n.ensure(e,"rotate"),n.ensure(e,"ref"),n.ensure(e,"userUnit"),n.ensure(e,"view")]).then(function([e,t,n,a]){return{rotate:e,ref:t,refStr:t?.toString()??null,userUnit:n,view:a}})})});h.on("GetPageIndex",function(e){const t=Ref.get(e.num,e.gen);return n.ensureCatalog("getPageIndex",[t])});h.on("GetDestinations",function(e){return n.ensureCatalog("destinations")});h.on("GetDestination",function(e){return n.ensureCatalog("getDestination",[e.id])});h.on("GetPageLabels",function(e){return n.ensureCatalog("pageLabels")});h.on("GetPageLayout",function(e){return n.ensureCatalog("pageLayout")});h.on("GetPageMode",function(e){return n.ensureCatalog("pageMode")});h.on("GetViewerPreferences",function(e){return n.ensureCatalog("viewerPreferences")});h.on("GetOpenAction",function(e){return n.ensureCatalog("openAction")});h.on("GetAttachments",function(e){return n.ensureCatalog("attachments")});h.on("GetDocJSActions",function(e){return n.ensureCatalog("jsActions")});h.on("GetPageJSActions",function({pageIndex:e}){return n.getPage(e).then(e=>n.ensure(e,"jsActions"))});h.on("GetAnnotationsByType",async function({types:e,pageIndexesToSkip:t}){const[a,r]=await Promise.all([n.ensureDoc("numPages"),n.ensureDoc("annotationGlobals")]);if(!r)return null;const s=[],i=[];let o=null;try{for(let l=0,f=a;l<f;l++)if(!t?.has(l)){if(!o){o=new WorkerTask("GetAnnotationsByType");startWorkerTask(o)}s.push(n.getPage(l).then(async t=>t&&t.collectAnnotationsByType(h,o,e,i,r)||[]))}await Promise.all(s);return(await Promise.all(i)).filter(e=>!!e)}finally{o&&finishWorkerTask(o)}});h.on("GetOutline",function(e){return n.ensureCatalog("documentOutline")});h.on("GetOptionalContentConfig",function(e){return n.ensureCatalog("optionalContentConfig")});h.on("GetPermissions",function(e){return n.ensureCatalog("permissions")});h.on("GetMetadata",function(e){return Promise.all([n.ensureDoc("documentInfo"),n.ensureCatalog("metadata"),n.ensureCatalog("hasStructTree")])});h.on("GetMarkInfo",function(e){return n.ensureCatalog("markInfo")});h.on("GetData",function(e){return n.requestLoadedStream().then(e=>e.bytes)});h.on("GetAnnotations",function({pageIndex:e,intent:t}){return n.getPage(e).then(function(n){const a=new WorkerTask(`GetAnnotations: page ${e}`);startWorkerTask(a);return n.getAnnotationsData(h,a,t).then(e=>{finishWorkerTask(a);return e},e=>{finishWorkerTask(a);throw e})})});h.on("GetFieldObjects",function(e){return n.ensureDoc("fieldObjects").then(e=>e?.allFields||null)});h.on("HasJSActions",function(e){return n.ensureDoc("hasJSActions")});h.on("GetCalculationOrderIds",function(e){return n.ensureDoc("calculationOrderIds")});h.on("ExtractPages",async function({pageInfos:e}){if(!e){warn("extractPages: nothing to extract.");return null}Array.isArray(e)||(e=[e]);let t=0;for(const a of e)if(null===a.document)a.document=n.pdfDocument;else if(ArrayBuffer.isView(a.document)){const e=new LocalPdfManager({source:a.document,docId:`${o}_extractPages_${t++}`,handler:h,password:a.password??null,evaluatorOptions:Object.assign({},n.evaluatorOptions)});let r=!1,s=!0;for(;;)try{await e.requestLoadedStream();await e.ensureDoc("checkHeader");await e.ensureDoc("parseStartXRef");await e.ensureDoc("parse",[r]);break}catch(t){if(t instanceof XRefParseException){if(!1===r){r=!0;continue}s=!1;warn("extractPages: XRefParseException.")}else if(t instanceof PasswordException){const n=new WorkerTask(`PasswordException: response ${t.code}`);startWorkerTask(n);try{const{password:n}=await h.sendWithPromise("PasswordRequest",t);e.updatePassword(n)}catch{s=!1;warn("extractPages: invalid password.")}finally{finishWorkerTask(n)}}else{s=!1;warn("extractPages: invalid document.")}if(!s)break}s||(a.document=null);if(await e.ensureDoc("isPureXfa")){a.document=null;warn("extractPages does not support pure XFA documents.")}else a.document=e.pdfDocument}else warn("extractPages: invalid document.");try{const t=new PDFEditor;return await t.extractPages(e)}catch(e){console.error(e);return null}});h.on("SaveDocument",async function({isPureXfa:e,numPages:t,annotationStorage:a,filename:r}){const s=[n.requestLoadedStream(),n.ensureCatalog("acroForm"),n.ensureCatalog("acroFormRef"),n.ensureDoc("startXRef"),n.ensureDoc("xref"),n.ensureCatalog("structTreeRoot")],i=new RefSetCache,o=[],l=e?null:getNewAnnotationsMap(a),[f,c,u,m,p,d]=await Promise.all(s),g=p.trailer.getRaw("Root")||null;let b;if(l){d?await d.canUpdateStructTree({pdfManager:n,newAnnotationsByPage:l})&&(b=d):await StructTreeRoot.canCreateStructureTree({catalogRef:g,pdfManager:n,newAnnotationsByPage:l})&&(b=null);const e=AnnotationFactory.generateImages(a.values(),p,n.evaluatorOptions.isOffscreenCanvasSupported),t=void 0===b?o:[];for(const[a,r]of l)t.push(n.getPage(a).then(t=>{const n=new WorkerTask(`Save (editor): page ${a}`);startWorkerTask(n);return t.saveNewAnnotations(h,n,r,e,i).finally(function(){finishWorkerTask(n)})}));null===b?o.push(Promise.all(t).then(async()=>{await StructTreeRoot.createStructureTree({newAnnotationsByPage:l,xref:p,catalogRef:g,pdfManager:n,changes:i})})):b&&o.push(Promise.all(t).then(async()=>{await b.updateStructureTree({newAnnotationsByPage:l,pdfManager:n,changes:i})}))}if(e)o.push(n.ensureDoc("serializeXfaData",[a]));else for(let e=0;e<t;e++)o.push(n.getPage(e).then(function(t){const n=new WorkerTask(`Save: page ${e}`);startWorkerTask(n);return t.save(h,n,a,i).finally(function(){finishWorkerTask(n)})}));const w=await Promise.all(o);let j=null;if(e){j=w[0];if(!j)return f.bytes}else if(0===i.size)return f.bytes;const k=u&&c instanceof Dict&&i.values().some(e=>e.needAppearances),y=c instanceof Dict&&c.get("XFA")||null;let q=null,v=!1;if(Array.isArray(y)){for(let e=0,t=y.length;e<t;e+=2)if("datasets"===y[e]){q=y[e+1];v=!0}null===q&&(q=p.getNewTemporaryRef())}else y&&warn("Unsupported XFA type.");let S=Object.create(null);if(p.trailer){const e=new Map,t=p.trailer.get("Info")||null;if(t instanceof Dict)for(const[n,a]of t)"string"==typeof a&&e.set(n,stringToPDFString(a));S={rootRef:g,encryptRef:p.trailer.getRaw("Encrypt")||null,newRef:p.getNewTemporaryRef(),infoRef:p.trailer.getRaw("Info")||null,infoMap:e,fileIds:p.trailer.get("ID")||null,startXRef:m,filename:r}}return incrementalUpdate({originalData:f.bytes,xrefInfo:S,changes:i,xref:p,hasXfa:!!y,xfaDatasetsRef:q,hasXfaDatasetsEntry:v,needAppearances:k,acroFormRef:u,acroForm:c,xfaData:j,useXrefStream:isDict(p.topDict,"XRef")}).finally(()=>{p.resetNewTemporaryRef()})});h.on("GetOperatorList",function(e,t){const{pageId:a,pageIndex:r}=e;n.getPage(a).then(function(n){const a=new WorkerTask(`GetOperatorList: page ${r}`);startWorkerTask(a);const s=i>=he?Date.now():0;n.getOperatorList({handler:h,sink:t,task:a,intent:e.intent,cacheKey:e.cacheKey,annotationStorage:e.annotationStorage,modifiedIds:e.modifiedIds,pageIndex:r}).then(function(e){finishWorkerTask(a);s&&info(`page=${r+1} - getOperatorList: time=${Date.now()-s}ms, len=${e.length}`);t.close()},function(e){finishWorkerTask(a);a.terminated||t.error(e)})})});h.on("GetTextContent",function(e,t){const{pageId:a,pageIndex:r,includeMarkedContent:s,disableNormalization:o}=e;n.getPage(a).then(function(e){const n=new WorkerTask("GetTextContent: page "+r);startWorkerTask(n);const a=i>=he?Date.now():0;e.extractTextContent({handler:h,task:n,sink:t,includeMarkedContent:s,disableNormalization:o}).then(function(){finishWorkerTask(n);a&&info(`page=${r+1} - getTextContent: time=`+(Date.now()-a)+"ms");t.close()},function(e){finishWorkerTask(n);n.terminated||t.error(e)})})});h.on("GetStructTree",function(e){return n.getPage(e.pageIndex).then(e=>n.ensure(e,"getStructTree"))});h.on("FontFallback",function(e){return n.fontFallback(e.id,h)});h.on("Cleanup",function(e){return n.cleanup(!0)});h.on("Terminate",function(e){a=!0;const t=[];if(n){n.terminate(new AbortException("Worker was terminated."));const e=n.cleanup();t.push(e);n=null}else clearGlobalCaches();r?.(new AbortException("Worker was terminated."));for(const e of s){t.push(e.finished);e.terminate()}return Promise.all(t).then(function(){h.destroy();h=null})});h.on("Ready",function(t){setupDoc(e);e=null});return c}static initializeFromPort(e){const t=new MessageHandler("worker","main",e);this.setup(t,e);t.send("ready",null)}}globalThis.pdfjsWorker={WorkerMessageHandler};export{WorkerMessageHandler};\ No newline at end of filediff --git a/public/pdfjs/5.5.207/standard_fonts/FoxitDingbats.pfb b/public/pdfjs/5.5.207/standard_fonts/FoxitDingbats.pfbnew file mode 100644index 0000000..30d5296Binary files /dev/null and b/public/pdfjs/5.5.207/standard_fonts/FoxitDingbats.pfb differdiff --git a/public/pdfjs/5.5.207/standard_fonts/FoxitFixed.pfb b/public/pdfjs/5.5.207/standard_fonts/FoxitFixed.pfbnew file mode 100644index 0000000..f12dcbcBinary files /dev/null and b/public/pdfjs/5.5.207/standard_fonts/FoxitFixed.pfb differdiff --git a/public/pdfjs/5.5.207/standard_fonts/FoxitFixedBold.pfb b/public/pdfjs/5.5.207/standard_fonts/FoxitFixedBold.pfbnew file mode 100644index 0000000..cf8e24aBinary files /dev/null and b/public/pdfjs/5.5.207/standard_fonts/FoxitFixedBold.pfb differdiff --git a/public/pdfjs/5.5.207/standard_fonts/FoxitFixedBoldItalic.pfb b/public/pdfjs/5.5.207/standard_fonts/FoxitFixedBoldItalic.pfbnew file mode 100644index 0000000..d288001Binary files /dev/null and b/public/pdfjs/5.5.207/standard_fonts/FoxitFixedBoldItalic.pfb differdiff --git a/public/pdfjs/5.5.207/standard_fonts/FoxitFixedItalic.pfb b/public/pdfjs/5.5.207/standard_fonts/FoxitFixedItalic.pfbnew file mode 100644index 0000000..d71697dBinary files /dev/null and b/public/pdfjs/5.5.207/standard_fonts/FoxitFixedItalic.pfb differdiff --git a/public/pdfjs/5.5.207/standard_fonts/FoxitSerif.pfb b/public/pdfjs/5.5.207/standard_fonts/FoxitSerif.pfbnew file mode 100644index 0000000..3fa682eBinary files /dev/null and b/public/pdfjs/5.5.207/standard_fonts/FoxitSerif.pfb differdiff --git a/public/pdfjs/5.5.207/standard_fonts/FoxitSerifBold.pfb b/public/pdfjs/5.5.207/standard_fonts/FoxitSerifBold.pfbnew file mode 100644index 0000000..ff7c6ddBinary files /dev/null and b/public/pdfjs/5.5.207/standard_fonts/FoxitSerifBold.pfb differdiff --git a/public/pdfjs/5.5.207/standard_fonts/FoxitSerifBoldItalic.pfb b/public/pdfjs/5.5.207/standard_fonts/FoxitSerifBoldItalic.pfbnew file mode 100644index 0000000..460231fBinary files /dev/null and b/public/pdfjs/5.5.207/standard_fonts/FoxitSerifBoldItalic.pfb differdiff --git a/public/pdfjs/5.5.207/standard_fonts/FoxitSerifItalic.pfb b/public/pdfjs/5.5.207/standard_fonts/FoxitSerifItalic.pfbnew file mode 100644index 0000000..d03a7c7Binary files /dev/null and b/public/pdfjs/5.5.207/standard_fonts/FoxitSerifItalic.pfb differdiff --git a/public/pdfjs/5.5.207/standard_fonts/FoxitSymbol.pfb b/public/pdfjs/5.5.207/standard_fonts/FoxitSymbol.pfbnew file mode 100644index 0000000..c8f9bcaBinary files /dev/null and b/public/pdfjs/5.5.207/standard_fonts/FoxitSymbol.pfb differdiff --git a/public/pdfjs/5.5.207/standard_fonts/LICENSE_FOXIT b/public/pdfjs/5.5.207/standard_fonts/LICENSE_FOXITnew file mode 100644index 0000000..8b4ed6d--- /dev/null+++ b/public/pdfjs/5.5.207/standard_fonts/LICENSE_FOXIT@@ -0,0 +1,27 @@+// Copyright 2014 PDFium Authors. 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.+// * Neither the name of Google Inc. nor the names of its+// contributors may be used to endorse or promote products derived from+// this software without specific prior written permission.+//+// 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+// OWNER 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/public/pdfjs/5.5.207/standard_fonts/LICENSE_LIBERATION b/public/pdfjs/5.5.207/standard_fonts/LICENSE_LIBERATIONnew file mode 100644index 0000000..aba73e8--- /dev/null+++ b/public/pdfjs/5.5.207/standard_fonts/LICENSE_LIBERATION@@ -0,0 +1,102 @@+Digitized data copyright (c) 2010 Google Corporation+ with Reserved Font Arimo, Tinos and Cousine.+Copyright (c) 2012 Red Hat, Inc.+ with Reserved Font Name Liberation.++This Font Software is licensed under the SIL Open Font License,+Version 1.1.++This license is copied below, and is also available with a FAQ at:+http://scripts.sil.org/OFL++SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007++PREAMBLE The goals of the Open Font License (OFL) are to stimulate+worldwide development of collaborative font projects, to support the font+creation efforts of academic and linguistic communities, and to provide+a free and open framework in which fonts may be shared and improved in+partnership with others.++The OFL allows the licensed fonts to be used, studied, modified and+redistributed freely as long as they are not sold by themselves.+The fonts, including any derivative works, can be bundled, embedded,+redistributed and/or sold with any software provided that any reserved+names are not used by derivative works. The fonts and derivatives,+however, cannot be released under any other type of license. The+requirement for fonts to remain under this license does not apply to+any document created using the fonts or their derivatives.++++DEFINITIONS+"Font Software" refers to the set of files released by the Copyright+Holder(s) under this license and clearly marked as such.+This may include source files, build scripts and documentation.++"Reserved Font Name" refers to any names specified as such after the+copyright statement(s).++"Original Version" refers to the collection of Font Software components+as distributed by the Copyright Holder(s).++"Modified Version" refers to any derivative made by adding to, deleting,+or substituting ? in part or in whole ?+any of the components of the Original Version, by changing formats or+by porting the Font Software to a new environment.++"Author" refers to any designer, engineer, programmer, technical writer+or other person who contributed to the Font Software.+++PERMISSION & CONDITIONS++Permission is hereby granted, free of charge, to any person obtaining a+copy of the Font Software, to use, study, copy, merge, embed, modify,+redistribute, and sell modified and unmodified copies of the Font+Software, subject to the following conditions:++1) Neither the Font Software nor any of its individual components,in+ Original or Modified Versions, may be sold by itself.++2) Original or Modified Versions of the Font Software may be bundled,+ redistributed and/or sold with any software, provided that each copy+ contains the above copyright notice and this license. These can be+ included either as stand-alone text files, human-readable headers or+ in the appropriate machine-readable metadata fields within text or+ binary files as long as those fields can be easily viewed by the user.++3) No Modified Version of the Font Software may use the Reserved Font+ Name(s) unless explicit written permission is granted by the+ corresponding Copyright Holder. This restriction only applies to the+ primary font name as presented to the users.++4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font+ Software shall not be used to promote, endorse or advertise any+ Modified Version, except to acknowledge the contribution(s) of the+ Copyright Holder(s) and the Author(s) or with their explicit written+ permission.++5) The Font Software, modified or unmodified, in part or in whole, must+ be distributed entirely under this license, and must not be distributed+ under any other license. The requirement for fonts to remain under+ this license does not apply to any document created using the Font+ Software.++++TERMINATION+This license becomes null and void if any of the above conditions are not met.++++DISCLAIMER+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER+DEALINGS IN THE FONT SOFTWARE.+diff --git a/public/pdfjs/5.5.207/standard_fonts/LiberationSans-Bold.ttf b/public/pdfjs/5.5.207/standard_fonts/LiberationSans-Bold.ttfnew file mode 100644index 0000000..ee23715Binary files /dev/null and b/public/pdfjs/5.5.207/standard_fonts/LiberationSans-Bold.ttf differdiff --git a/public/pdfjs/5.5.207/standard_fonts/LiberationSans-BoldItalic.ttf b/public/pdfjs/5.5.207/standard_fonts/LiberationSans-BoldItalic.ttfnew file mode 100644index 0000000..42b5717Binary files /dev/null and b/public/pdfjs/5.5.207/standard_fonts/LiberationSans-BoldItalic.ttf differdiff --git a/public/pdfjs/5.5.207/standard_fonts/LiberationSans-Italic.ttf b/public/pdfjs/5.5.207/standard_fonts/LiberationSans-Italic.ttfnew file mode 100644index 0000000..0cf6126Binary files /dev/null and b/public/pdfjs/5.5.207/standard_fonts/LiberationSans-Italic.ttf differdiff --git a/public/pdfjs/5.5.207/standard_fonts/LiberationSans-Regular.ttf b/public/pdfjs/5.5.207/standard_fonts/LiberationSans-Regular.ttfnew file mode 100644index 0000000..366d148Binary files /dev/null and b/public/pdfjs/5.5.207/standard_fonts/LiberationSans-Regular.ttf differdiff --git a/src/app/(app)/dashboard/page.tsx b/src/app/(app)/dashboard/page.tsxnew file mode 100644index 0000000..34dfa11--- /dev/null+++ b/src/app/(app)/dashboard/page.tsx@@ -0,0 +1,22 @@+import { DashboardShell } from "@/components/dashboard/dashboard-shell";+import { getAuthSession } from "@/lib/auth/server";+import { getDb } from "@/lib/db/connection";+import { listEnvelopesForUser } from "@/lib/envelopes";++export default async function DashboardPage() {+ const session = await getAuthSession();+ const database = getDb();+ let envelopes: Awaited<ReturnType<typeof listEnvelopesForUser>> | undefined;+ let initialState: "default" | "empty" | "error" = "error";++ try {+ envelopes = session+ ? await listEnvelopesForUser(session.user.id, {}, database)+ : [];+ initialState = envelopes.length === 0 ? "empty" : "default";+ } catch {+ initialState = "error";+ }++ return <DashboardShell envelopes={envelopes} initialState={initialState} />;+}diff --git a/src/app/(app)/envelopes/[id]/page.tsx b/src/app/(app)/envelopes/[id]/page.tsxnew file mode 100644index 0000000..59badee--- /dev/null+++ b/src/app/(app)/envelopes/[id]/page.tsx@@ -0,0 +1,39 @@+import { EnvelopeDetailShell } from "@/components/envelopes/envelope-detail-shell";+import { getAuthSession } from "@/lib/auth/server";+import { getDb } from "@/lib/db/connection";+import { getEnvelopeDetailDataForUser } from "@/lib/envelopes";++type EnvelopeDetailPageProps = {+ params: Promise<{+ id: string;+ }>;+};++export default async function EnvelopeDetailPage({+ params,+}: EnvelopeDetailPageProps) {+ const { id } = await params;++ let detailRecord: Awaited<ReturnType<typeof getEnvelopeDetailDataForUser>> =+ null;+ let initialState: "error" | "not-found" | undefined;++ try {+ const session = await getAuthSession();+ detailRecord = session+ ? await getEnvelopeDetailDataForUser(session.user.id, id, getDb())+ : null;+ initialState = detailRecord ? undefined : "not-found";+ } catch {+ initialState = "error";+ }++ return (+ <EnvelopeDetailShell+ envelopeId={id}+ initialState={initialState}+ key={id}+ record={detailRecord ?? undefined}+ />+ );+}diff --git a/src/app/(app)/envelopes/[id]/review/page.tsx b/src/app/(app)/envelopes/[id]/review/page.tsxnew file mode 100644index 0000000..f3858e3--- /dev/null+++ b/src/app/(app)/envelopes/[id]/review/page.tsx@@ -0,0 +1,49 @@+import { notFound, redirect } from "next/navigation";++import { ReviewShell } from "@/components/envelopes/review-shell";+import { getAuthSession } from "@/lib/auth/server";+import { getDb } from "@/lib/db/connection";+import { getReviewEnvelopeDataForUser } from "@/lib/envelopes";++type ReviewPageProps = {+ params: Promise<{+ id: string;+ }>;+};++export default async function ReviewPage({ params }: ReviewPageProps) {+ const { id } = await params;+ let reviewRecord: Awaited<ReturnType<typeof getReviewEnvelopeDataForUser>> =+ null;+ let initialState: "error" | undefined;++ try {+ const session = await getAuthSession();+ const database = getDb();++ reviewRecord = session+ ? await getReviewEnvelopeDataForUser(session.user.id, id, database)+ : null;+ } catch {+ initialState = "error";+ }++ if (!initialState) {+ if (!reviewRecord) {+ notFound();+ }++ if (reviewRecord.status !== "draft") {+ redirect(`/envelopes/${id}`);+ }+ }++ return (+ <ReviewShell+ envelopeId={id}+ initialState={initialState}+ key={id}+ record={reviewRecord ?? undefined}+ />+ );+}diff --git a/src/app/(app)/envelopes/[id]/signers/page.tsx b/src/app/(app)/envelopes/[id]/signers/page.tsxnew file mode 100644index 0000000..5f62449--- /dev/null+++ b/src/app/(app)/envelopes/[id]/signers/page.tsx@@ -0,0 +1,46 @@+import { notFound, redirect } from "next/navigation";++import { SignersShell } from "@/components/envelopes/signers-shell";+import { getAuthSession } from "@/lib/auth/server";+import { getDb } from "@/lib/db/connection";+import { getDraftSignerStepDataForUser } from "@/lib/envelopes";++type SignersPageProps = {+ params: Promise<{+ id: string;+ }>;+};++export default async function SignersPage({ params }: SignersPageProps) {+ const { id } = await params;+ let record: Awaited<ReturnType<typeof getDraftSignerStepDataForUser>> = null;+ let initialState: "error" | undefined;++ try {+ const session = await getAuthSession();+ record = session+ ? await getDraftSignerStepDataForUser(session.user.id, id, getDb())+ : null;+ } catch {+ initialState = "error";+ }++ if (!initialState) {+ if (!record) {+ notFound();+ }++ if (record.status !== "draft") {+ redirect(`/envelopes/${id}`);+ }+ }++ return (+ <SignersShell+ envelopeId={id}+ initialState={initialState}+ key={id}+ record={record ?? undefined}+ />+ );+}diff --git a/src/app/(app)/envelopes/new/page.tsx b/src/app/(app)/envelopes/new/page.tsxnew file mode 100644index 0000000..7ddbdea--- /dev/null+++ b/src/app/(app)/envelopes/new/page.tsx@@ -0,0 +1,5 @@+import { UploadShell } from "@/components/envelopes/upload-shell";++export default async function NewEnvelopePage() {+ return <UploadShell />;+}diff --git a/src/app/(app)/error.tsx b/src/app/(app)/error.tsxnew file mode 100644index 0000000..a43bb26--- /dev/null+++ b/src/app/(app)/error.tsx@@ -0,0 +1,28 @@+"use client";++import { StatusPanel } from "@/components/shared/status-panel";++export default function AppError({+ reset,+}: {+ error: Error & { digest?: string };+ reset: () => void;+}) {+ return (+ <StatusPanel+ description="The shared sender shell is mounted, but this page failed to load. Try the route again."+ eyebrow="App shell"+ footer={+ <button+ className="inline-flex min-h-11 items-center justify-center rounded-full border border-(--border) px-5 text-sm font-semibold text-(--fg) transition hover:bg-(--surface)"+ onClick={reset}+ type="button"+ >+ Try again+ </button>+ }+ title="We couldn't load this page."+ tone="error"+ />+ );+}diff --git a/src/app/(app)/layout.tsx b/src/app/(app)/layout.tsxnew file mode 100644index 0000000..2c34f1b--- /dev/null+++ b/src/app/(app)/layout.tsx@@ -0,0 +1,28 @@+import type { ReactNode } from "react";+import { redirect } from "next/navigation";++import { AppShell } from "@/components/layout/app-shell";+import { getAuthSession } from "@/lib/auth/server";++export default async function AuthenticatedAppLayout({+ children,+}: Readonly<{+ children: ReactNode;+}>) {+ const session = await getAuthSession();++ if (!session) {+ redirect("/login");+ }++ return (+ <AppShell+ user={{+ email: session.user.email,+ name: session.user.name,+ }}+ >+ {children}+ </AppShell>+ );+}diff --git a/src/app/(app)/loading.tsx b/src/app/(app)/loading.tsxnew file mode 100644index 0000000..da96fc8--- /dev/null+++ b/src/app/(app)/loading.tsx@@ -0,0 +1,34 @@+export default function AppLoading() {+ return (+ <div aria-label="Loading page" className="space-y-6">+ <section className="rounded-[28px] border border-(--border) bg-white px-6 py-6 shadow-(--shadow-card) sm:px-8">+ <div className="space-y-4">+ <div className="h-3 w-24 animate-pulse rounded-full bg-(--surface)" />+ <div className="h-9 w-56 animate-pulse rounded-full bg-(--surface)" />+ <div className="h-4 w-full max-w-xl animate-pulse rounded-full bg-(--surface)" />+ </div>+ </section>+ <section className="rounded-[28px] border border-(--border) bg-white p-6 shadow-(--shadow-card) sm:p-8">+ <div className="space-y-4">+ <div className="h-12 w-full animate-pulse rounded-2xl bg-(--surface)" />+ <div className="flex flex-wrap gap-2">+ {Array.from({ length: 6 }).map((_, index) => (+ <div+ className="h-10 w-24 animate-pulse rounded-full bg-(--surface)"+ key={index}+ />+ ))}+ </div>+ <div className="mt-6 space-y-3">+ {Array.from({ length: 4 }).map((_, index) => (+ <div+ className="h-20 animate-pulse rounded-[22px] bg-(--surface)"+ key={index}+ />+ ))}+ </div>+ </div>+ </section>+ </div>+ );+}diff --git a/src/app/(app)/settings/page.tsx b/src/app/(app)/settings/page.tsxnew file mode 100644index 0000000..e8d5c51--- /dev/null+++ b/src/app/(app)/settings/page.tsx@@ -0,0 +1,15 @@+import { SettingsShell } from "@/components/settings/settings-shell";+import { getAuthSession } from "@/lib/auth/server";++export default async function SettingsPage() {+ const session = await getAuthSession();++ return (+ <SettingsShell+ initialProfile={{+ email: session?.user.email ?? "",+ fullName: session?.user.name ?? "",+ }}+ />+ );+}diff --git a/src/app/(auth)/error.tsx b/src/app/(auth)/error.tsxnew file mode 100644index 0000000..444979c--- /dev/null+++ b/src/app/(auth)/error.tsx@@ -0,0 +1,30 @@+"use client";++import { StatusPanel } from "@/components/shared/status-panel";++export default function AuthError({+ reset,+}: {+ error: Error & { digest?: string };+ reset: () => void;+}) {+ return (+ <div className="w-full max-w-[520px]">+ <StatusPanel+ description="The public route-group shell is ready, but this page hit an unexpected error."+ eyebrow="Auth shell"+ footer={+ <button+ className="inline-flex min-h-11 items-center justify-center rounded-full border border-(--border) px-5 text-sm font-semibold text-(--fg) transition hover:bg-(--surface)"+ onClick={reset}+ type="button"+ >+ Try again+ </button>+ }+ title="Something went wrong."+ tone="error"+ />+ </div>+ );+}diff --git a/src/app/(auth)/layout.tsx b/src/app/(auth)/layout.tsxnew file mode 100644index 0000000..8d953af--- /dev/null+++ b/src/app/(auth)/layout.tsx@@ -0,0 +1,11 @@+import type { ReactNode } from "react";++import { AuthShell } from "@/components/layout/auth-shell";++export default function UnauthenticatedLayout({+ children,+}: Readonly<{+ children: ReactNode;+}>) {+ return <AuthShell>{children}</AuthShell>;+}diff --git a/src/app/(auth)/loading.tsx b/src/app/(auth)/loading.tsxnew file mode 100644index 0000000..15c34ce--- /dev/null+++ b/src/app/(auth)/loading.tsx@@ -0,0 +1,19 @@+export default function AuthLoading() {+ return (+ <section+ aria-label="Loading authentication page"+ className="w-full max-w-[440px] rounded-[32px] border border-(--border) bg-white p-8 shadow-(--shadow-soft)"+ >+ <div className="space-y-4">+ <div className="h-3 w-24 animate-pulse rounded-full bg-(--surface)" />+ <div className="h-8 w-48 animate-pulse rounded-full bg-(--surface)" />+ <div className="h-4 w-full animate-pulse rounded-full bg-(--surface)" />+ </div>+ <div className="mt-8 space-y-5">+ <div className="h-20 animate-pulse rounded-[24px] bg-(--surface)" />+ <div className="h-20 animate-pulse rounded-[24px] bg-(--surface)" />+ <div className="h-12 animate-pulse rounded-full bg-(--surface)" />+ </div>+ </section>+ );+}diff --git a/src/app/(auth)/login/page.tsx b/src/app/(auth)/login/page.tsxnew file mode 100644index 0000000..d3054a4--- /dev/null+++ b/src/app/(auth)/login/page.tsx@@ -0,0 +1,37 @@+import { redirect } from "next/navigation";++import { LoginShell } from "@/components/auth/login-shell";+import { getAuthSession } from "@/lib/auth/server";++type LoginPageProps = {+ searchParams?: Promise<{+ error?: string;+ token?: string;+ }>;+};++export default async function LoginPage({ searchParams }: LoginPageProps) {+ const resolvedSearchParams = searchParams ? await searchParams : undefined;+ const hasLiveAuthState =+ resolvedSearchParams?.token !== undefined ||+ resolvedSearchParams?.error !== undefined;++ if (!hasLiveAuthState) {+ const session = await getAuthSession();++ if (session) {+ redirect("/dashboard");+ }+ }++ return (+ <LoginShell+ resetError={+ resolvedSearchParams?.error === "INVALID_TOKEN"+ ? resolvedSearchParams.error+ : null+ }+ resetToken={resolvedSearchParams?.token ?? null}+ />+ );+}diff --git a/src/app/(auth)/signup/page.tsx b/src/app/(auth)/signup/page.tsxnew file mode 100644index 0000000..67f481a--- /dev/null+++ b/src/app/(auth)/signup/page.tsx@@ -0,0 +1,14 @@+import { redirect } from "next/navigation";++import { SignupShell } from "@/components/auth/signup-shell";+import { getAuthSession } from "@/lib/auth/server";++export default async function SignupPage() {+ const session = await getAuthSession();++ if (session) {+ redirect("/dashboard");+ }++ return <SignupShell />;+}diff --git a/src/app/(canvas)/envelopes/[id]/prepare/page.tsx b/src/app/(canvas)/envelopes/[id]/prepare/page.tsxnew file mode 100644index 0000000..b53a2d9--- /dev/null+++ b/src/app/(canvas)/envelopes/[id]/prepare/page.tsx@@ -0,0 +1,54 @@+import { notFound, redirect } from "next/navigation";++import { PrepareLiveShell } from "@/components/envelopes/prepare-live-shell";+import { getAuthSession } from "@/lib/auth/server";+import { getDb } from "@/lib/db/connection";+import { getPrepareEnvelopeDataForUser } from "@/lib/envelopes";++type PrepareEnvelopePageProps = {+ params: Promise<{+ id: string;+ }>;+};++export default async function PrepareEnvelopePage({+ params,+}: PrepareEnvelopePageProps) {+ const { id } = await params;+ let record: Awaited<ReturnType<typeof getPrepareEnvelopeDataForUser>> = null;+ let initialState: "error" | undefined;+ const session = await getAuthSession();++ try {+ record = session+ ? await getPrepareEnvelopeDataForUser(session.user.id, id, {+ database: getDb(),+ })+ : null;+ } catch {+ initialState = "error";+ }++ if (!initialState) {+ if (!record) {+ notFound();+ }++ if (record.status !== "draft") {+ redirect(`/envelopes/${id}`);+ }++ if (record.signers.length === 0) {+ redirect(`/envelopes/${id}/signers`);+ }+ }++ return (+ <PrepareLiveShell+ envelopeId={id}+ initialState={initialState}+ key={id}+ record={record ?? undefined}+ />+ );+}diff --git a/src/app/(canvas)/error.tsx b/src/app/(canvas)/error.tsxnew file mode 100644index 0000000..6a0d416--- /dev/null+++ b/src/app/(canvas)/error.tsx@@ -0,0 +1,30 @@+"use client";++import { StatusPanel } from "@/components/shared/status-panel";++export default function CanvasError({+ reset,+}: {+ error: Error & { digest?: string };+ reset: () => void;+}) {+ return (+ <div className="p-4 sm:p-6 lg:p-8">+ <StatusPanel+ description="The full-screen document shell is mounted, but the canvas payload could not render."+ eyebrow="Canvas shell"+ footer={+ <button+ className="inline-flex min-h-11 items-center justify-center rounded-full border border-(--border) px-5 text-sm font-semibold text-(--fg) transition hover:bg-(--surface)"+ onClick={reset}+ type="button"+ >+ Reload canvas+ </button>+ }+ title="We couldn't open this document."+ tone="error"+ />+ </div>+ );+}diff --git a/src/app/(canvas)/layout.tsx b/src/app/(canvas)/layout.tsxnew file mode 100644index 0000000..a8b07c4--- /dev/null+++ b/src/app/(canvas)/layout.tsx@@ -0,0 +1,18 @@+import type { ReactNode } from "react";+import { redirect } from "next/navigation";++import { getAuthSession } from "@/lib/auth/server";++export default async function CanvasLayout({+ children,+}: Readonly<{+ children: ReactNode;+}>) {+ const session = await getAuthSession();++ if (!session) {+ redirect("/login");+ }++ return children;+}diff --git a/src/app/(canvas)/loading.tsx b/src/app/(canvas)/loading.tsxnew file mode 100644index 0000000..28a6c75--- /dev/null+++ b/src/app/(canvas)/loading.tsx@@ -0,0 +1,22 @@+export default function CanvasLoading() {+ return (+ <div className="grid min-h-[calc(100vh-73px)] lg:grid-cols-[260px_minmax(0,1fr)]">+ <aside className="hidden border-r border-(--border) bg-white p-5 lg:block">+ <div className="space-y-4">+ <div className="h-4 w-20 animate-pulse rounded-full bg-(--surface)" />+ {Array.from({ length: 5 }).map((_, index) => (+ <div+ className="h-12 animate-pulse rounded-2xl bg-(--surface)"+ key={index}+ />+ ))}+ </div>+ </aside>+ <section className="p-4 sm:p-6 lg:p-8">+ <div className="rounded-[32px] border border-(--border) bg-white p-5 shadow-(--shadow-soft) sm:p-6">+ <div className="mx-auto h-[560px] max-w-[720px] animate-pulse rounded-[28px] bg-(--surface)" />+ </div>+ </section>+ </div>+ );+}diff --git a/src/app/accessibility/page.tsx b/src/app/accessibility/page.tsxnew file mode 100644index 0000000..2b2f9d7--- /dev/null+++ b/src/app/accessibility/page.tsx@@ -0,0 +1,151 @@+import type { Metadata } from "next";+import Link from "next/link";++import { PublicDocumentShell } from "@/components/layout/public-document-shell";+import { resolvePublicSupportAddress } from "@/lib/public-contact";++export const metadata: Metadata = {+ description:+ "Read SignuDoc's accessibility statement, current accessibility features, known limitations, and how to request assistance.",+ title: "Accessibility Statement | SignuDoc",+};++export default function AccessibilityPage() {+ const supportAddress = resolvePublicSupportAddress();++ return (+ <PublicDocumentShell+ description="SignuDoc is committed to improving accessibility for people with disabilities. This statement describes what is currently supported, the known limitations in our launch-stage product, and how to request assistance or accommodation."+ lastUpdated="March 25, 2026"+ title="Accessibility Statement"+ >+ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ Commitment+ </h2>+ <p>+ We want SignuDoc to be usable by as many people as possible, including+ people who rely on keyboard navigation, screen readers, zoom, or other+ assistive technologies. We use accessibility best practices and treat+ accessibility feedback as a product priority.+ </p>+ <p>+ SignuDoc is still a launch-stage product, and some parts of the+ experience are more accessible than others. This statement is intended+ to be candid about the current state of the product and the help that+ is available right now.+ </p>+ </section>++ <section className="space-y-4">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ What currently works best+ </h2>+ <ul className="list-disc space-y-2 pl-6">+ <li>+ Account creation, log in, dashboard, settings, and most non-canvas+ forms use semantic controls and are intended to be keyboard+ navigable.+ </li>+ <li>+ The signing experience uses keyboard-focusable HTML inputs and+ buttons layered over the PDF preview, and includes a sidebar summary+ of assigned fields.+ </li>+ <li>+ Status messages, buttons, and form labels are designed to expose+ meaningful text to assistive technology.+ </li>+ </ul>+ </section>++ <section className="space-y-4">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ Known limitations+ </h2>+ <ul className="list-disc space-y-2 pl-6">+ <li>+ The PDF preview is rendered on a canvas and is therefore not a fully+ semantic representation of the source document for screen readers.+ </li>+ <li>+ Sender-side document preparation currently relies heavily on+ drag-and-drop and pointer-based field placement, which is not yet a+ fully accessible workflow for blind users or some keyboard-only+ users.+ </li>+ <li>+ Some uploaded PDFs may contain scanned images, complex layouts, or+ third-party accessibility issues that SignuDoc cannot fully correct+ at display time.+ </li>+ </ul>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ Alternative assistance+ </h2>+ <p>+ If you need help creating, sending, reviewing, or signing a document,+ email{" "}+ <Link+ className="font-semibold text-(--fg) underline decoration-[rgba(17,17,17,0.24)] underline-offset-4"+ href={`mailto:${supportAddress}`}+ >+ {supportAddress}+ </Link>+ . Tell us what part of the workflow you are trying to complete, what+ assistive technology you use if you are comfortable sharing it, and+ what kind of accommodation would help.+ </p>+ <p>+ Depending on the situation, we may be able to provide manual+ assistance, an alternative communication path, or another supported+ way to complete the workflow.+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ Standards and ongoing work+ </h2>+ <p>+ We use WCAG 2.2 Level AA as a practical reference point when planning+ improvements, but we do not claim that every part of SignuDoc fully+ conforms today.+ </p>+ <p>+ Our near-term focus includes improving the accessibility of the+ canvas-based PDF experience, strengthening modal focus behavior,+ reducing pointer-only interactions, and continuing to expand+ keyboard-friendly alternatives.+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ Feedback+ </h2>+ <p>+ Accessibility feedback helps us prioritize the right fixes. If you+ find a barrier, email{" "}+ <Link+ className="font-semibold text-(--fg) underline decoration-[rgba(17,17,17,0.24)] underline-offset-4"+ href={`mailto:${supportAddress}`}+ >+ {supportAddress}+ </Link>{" "}+ or use the{" "}+ <Link+ className="font-semibold text-(--fg) underline decoration-[rgba(17,17,17,0.24)] underline-offset-4"+ href="/contact"+ >+ Contact+ </Link>{" "}+ page.+ </p>+ </section>+ </PublicDocumentShell>+ );+}diff --git a/src/app/api/account/closure-request/route.ts b/src/app/api/account/closure-request/route.tsnew file mode 100644index 0000000..ec5b688--- /dev/null+++ b/src/app/api/account/closure-request/route.ts@@ -0,0 +1,49 @@+import { NextResponse } from "next/server";++import { getAuthSessionFromHeaders } from "@/lib/auth/server";+import { AccountMutationError, requestAccountClosure } from "@/lib/account";+import { getDb } from "@/lib/db/connection";++export async function POST(request: Request) {+ const session = await getAuthSessionFromHeaders(request.headers);++ if (!session) {+ return NextResponse.json({ error: "Unauthorized." }, { status: 401 });+ }++ const payload = (await request.json().catch(() => null)) as Record<+ string,+ unknown+ > | null;++ try {+ const result = await requestAccountClosure(+ session.user.id,+ {+ confirmation: String(payload?.confirmation ?? ""),+ },+ {+ database: getDb(),+ },+ );++ return NextResponse.json(result, { status: 200 });+ } catch (error) {+ if (error instanceof AccountMutationError) {+ return NextResponse.json(+ {+ error: error.message,+ fieldErrors: error.fieldErrors,+ },+ { status: error.statusCode },+ );+ }++ return NextResponse.json(+ {+ error: "Unable to submit the closure request.",+ },+ { status: 500 },+ );+ }+}diff --git a/src/app/api/account/profile/route.ts b/src/app/api/account/profile/route.tsnew file mode 100644index 0000000..65eb55e--- /dev/null+++ b/src/app/api/account/profile/route.ts@@ -0,0 +1,48 @@+import { NextResponse } from "next/server";++import { getAuthSessionFromHeaders } from "@/lib/auth/server";+import { AccountMutationError, updateSenderProfile } from "@/lib/account";+import { getDb } from "@/lib/db/connection";++export async function PATCH(request: Request) {+ const session = await getAuthSessionFromHeaders(request.headers);++ if (!session) {+ return NextResponse.json({ error: "Unauthorized." }, { status: 401 });+ }++ const payload = (await request.json().catch(() => null)) as Record<+ string,+ unknown+ > | null;++ try {+ const profile = await updateSenderProfile(+ session.user.id,+ {+ email: String(payload?.email ?? ""),+ fullName: String(payload?.fullName ?? ""),+ },+ getDb(),+ );++ return NextResponse.json({ profile }, { status: 200 });+ } catch (error) {+ if (error instanceof AccountMutationError) {+ return NextResponse.json(+ {+ error: error.message,+ fieldErrors: error.fieldErrors,+ },+ { status: error.statusCode },+ );+ }++ return NextResponse.json(+ {+ error: "Unable to update your profile.",+ },+ { status: 500 },+ );+ }+}diff --git a/src/app/api/auth/[...all]/route.ts b/src/app/api/auth/[...all]/route.tsnew file mode 100644index 0000000..9f04efd--- /dev/null+++ b/src/app/api/auth/[...all]/route.ts@@ -0,0 +1,7 @@+import { toNextJsHandler } from "better-auth/next-js";++import { getAuth } from "@/lib/auth/server";++const handlers = toNextJsHandler(getAuth());++export const { DELETE, GET, PATCH, POST, PUT } = handlers;diff --git a/src/app/api/contact/route.ts b/src/app/api/contact/route.tsnew file mode 100644index 0000000..fdda56e--- /dev/null+++ b/src/app/api/contact/route.ts@@ -0,0 +1,92 @@+import { NextResponse } from "next/server";++import {+ ContactSubmissionError,+ submitPublicContactMessage,+} from "@/lib/contact";+import { logRouteError, logSecurityEvent } from "@/lib/security/logging";+import {+ applyRateLimit,+ buildRateLimitKey,+} from "@/lib/security/route-controls";+import {+ getClientIpAddress,+ getRequestPathname,+ getRequestUserAgent,+} from "@/lib/security/request";++export async function POST(request: Request) {+ const ipAddress = getClientIpAddress(request.headers);+ const userAgent = getRequestUserAgent(request.headers);+ const rateLimitResponse = applyRateLimit({+ category: "contact_form_submit",+ key: buildRateLimitKey([+ "contact-form",+ ipAddress ?? userAgent ?? "unknown",+ ]),+ limit: 5,+ request,+ windowMs: 60 * 60 * 1000,+ });++ if (rateLimitResponse) {+ return rateLimitResponse;+ }++ const payload = (await request.json().catch(() => null)) as Record<+ string,+ unknown+ > | null;++ try {+ const result = await submitPublicContactMessage({+ company:+ typeof payload?.company === "string" ? payload.company : undefined,+ email: String(payload?.email ?? ""),+ message: String(payload?.message ?? ""),+ name: String(payload?.name ?? ""),+ });++ if (result.ignored) {+ logSecurityEvent("info", {+ category: "contact_form_honeypot",+ ipAddress,+ message:+ "Ignored public contact form submission with honeypot content.",+ metadata: {+ userAgent,+ },+ path: getRequestPathname(request),+ });+ }++ return NextResponse.json({ ok: true }, { status: 200 });+ } catch (error) {+ if (error instanceof ContactSubmissionError) {+ return NextResponse.json(+ {+ error: error.message,+ fieldErrors: error.fieldErrors,+ },+ { status: error.statusCode },+ );+ }++ logRouteError(error, {+ category: "contact_form_submit_failure",+ ipAddress,+ message: "Unexpected failure while sending a public contact message.",+ metadata: {+ userAgent,+ },+ path: getRequestPathname(request),+ });++ return NextResponse.json(+ {+ error: "Unable to send your message right now.",+ },+ { status: 500 },+ );+ }+}diff --git a/src/app/api/download/[token]/route.ts b/src/app/api/download/[token]/route.tsnew file mode 100644index 0000000..85cdbb2--- /dev/null+++ b/src/app/api/download/[token]/route.ts@@ -0,0 +1,113 @@+import { NextResponse } from "next/server";++import { getDb } from "@/lib/db/connection";+import {+ DownloadAccessError,+ getPublicEnvelopeDownloadForToken,+} from "@/lib/downloads";+import { logRouteError } from "@/lib/security/logging";+import {+ applyRateLimit,+ buildRateLimitKey,+} from "@/lib/security/route-controls";+import { getClientIpAddress } from "@/lib/security/request";+import { buildContentDisposition } from "@/lib/services/storage";+import { createStorageService } from "@/lib/services/storage";++const PRESIGNED_DOWNLOAD_TTL_SECONDS = 5 * 60;++// Public download route for recipient email links only.+// Sender downloads must go through the authenticated /api/envelopes/[id]/download route.+type PublicDownloadRouteContext = {+ params: Promise<{+ token: string;+ }>;+};++export async function GET(+ request: Request,+ context: PublicDownloadRouteContext,+) {+ const { token } = await context.params;+ const rateLimitResponse = applyRateLimit({+ category: "public_download",+ key: buildRateLimitKey([+ "public-download",+ token,+ getClientIpAddress(request.headers) ?? "unknown",+ ]),+ limit: 20,+ request,+ windowMs: 10 * 60 * 1000,+ });++ if (rateLimitResponse) {+ return new NextResponse("Too many requests. Please try again soon.", {+ headers: {+ "cache-control": "private, no-store",+ "content-type": "text/plain; charset=utf-8",+ "retry-after": rateLimitResponse.headers.get("retry-after") ?? "60",+ },+ status: 429,+ });+ }++ try {+ const download = await getPublicEnvelopeDownloadForToken(token, {+ database: getDb(),+ });++ if ("body" in download) {+ const responseBody = download.body.slice().buffer as ArrayBuffer;++ return new Response(responseBody, {+ headers: {+ "cache-control": "private, no-store",+ "content-disposition": buildContentDisposition(download.fileName),+ "content-length": String(download.contentLength),+ "content-type": download.contentType,+ },+ status: 200,+ });+ }++ const presignedDownload =+ await createStorageService().createPresignedDownloadUrl({+ expiresInSeconds: PRESIGNED_DOWNLOAD_TTL_SECONDS,+ fileName: download.fileName,+ key: download.key,+ });++ return NextResponse.redirect(new URL(presignedDownload.url, request.url), {+ headers: {+ "cache-control": "private, no-store",+ },+ status: 302,+ });+ } catch (error) {+ if (error instanceof DownloadAccessError) {+ return new NextResponse(error.message, {+ headers: {+ "cache-control": "private, no-store",+ "content-type": "text/plain; charset=utf-8",+ },+ status: error.statusCode,+ });+ }++ logRouteError(error, {+ category: "public_download_failure",+ ipAddress: getClientIpAddress(request.headers),+ message: "Unexpected failure while starting a recipient download.",+ path: request.url,+ });++ return new NextResponse("Unable to start this download.", {+ headers: {+ "cache-control": "private, no-store",+ "content-type": "text/plain; charset=utf-8",+ },+ status: 500,+ });+ }+}diff --git a/src/app/api/envelopes/[id]/document/route.ts b/src/app/api/envelopes/[id]/document/route.tsnew file mode 100644index 0000000..33e0303--- /dev/null+++ b/src/app/api/envelopes/[id]/document/route.ts@@ -0,0 +1,81 @@+import { NextResponse } from "next/server";++import { requireVerifiedSenderSession } from "@/lib/auth/route-session";+import { getDb } from "@/lib/db/connection";+import {+ EnvelopeDocumentAccessError,+ getDraftEnvelopeDocumentForUser,+} from "@/lib/envelopes";+import { logRouteError } from "@/lib/security/logging";+import { getClientIpAddress, getRequestPathname } from "@/lib/security/request";+import { buildContentDisposition } from "@/lib/services/storage";++type EnvelopeDocumentRouteContext = {+ params: Promise<{+ id: string;+ }>;+};++export async function GET(+ request: Request,+ context: EnvelopeDocumentRouteContext,+) {+ const sessionResult = await requireVerifiedSenderSession(request);++ if (sessionResult instanceof Response) {+ return sessionResult;+ }++ const session = sessionResult;+ const { id } = await context.params;++ try {+ const document = await getDraftEnvelopeDocumentForUser(session.user.id, id, {+ database: getDb(),+ });+ const responseBody = document.body.slice().buffer as ArrayBuffer;++ return new Response(responseBody, {+ headers: {+ "cache-control": "private, no-store",+ "content-disposition": buildContentDisposition(+ document.fileName,+ "inline",+ ),+ "content-length": String(document.contentLength),+ "content-type": document.contentType,+ },+ status: 200,+ });+ } catch (error) {+ if (error instanceof EnvelopeDocumentAccessError) {+ return NextResponse.json(+ { error: error.message },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: error.statusCode,+ },+ );+ }++ logRouteError(error, {+ category: "draft_envelope_document_failure",+ ipAddress: getClientIpAddress(request.headers),+ message: "Unexpected failure while loading a draft envelope document.",+ path: getRequestPathname(request),+ userId: session.user.id,+ });++ return NextResponse.json(+ { error: "Unable to load this draft document." },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: 500,+ },+ );+ }+}diff --git a/src/app/api/envelopes/[id]/download/route.ts b/src/app/api/envelopes/[id]/download/route.tsnew file mode 100644index 0000000..256244b--- /dev/null+++ b/src/app/api/envelopes/[id]/download/route.ts@@ -0,0 +1,126 @@+import { NextResponse } from "next/server";+import { ZodError } from "zod";++import { requireVerifiedSenderSession } from "@/lib/auth/route-session";+import { getDb } from "@/lib/db/connection";+import {+ DownloadAccessError,+ getSenderEnvelopeDownload,+} from "@/lib/downloads";+import { downloadRequestSchema } from "@/lib/schemas/envelope";+import { logRouteError } from "@/lib/security/logging";+import { getClientIpAddress, getRequestPathname } from "@/lib/security/request";+import { buildContentDisposition } from "@/lib/services/storage";+import { createStorageService } from "@/lib/services/storage";++const PRESIGNED_DOWNLOAD_TTL_SECONDS = 5 * 60;++type EnvelopeDownloadRouteContext = {+ params: Promise<{+ id: string;+ }>;+};++function getDownloadType(request: Request) {+ const requestUrl = new URL(request.url);++ return requestUrl.searchParams.get("type");+}++export async function GET(+ request: Request,+ context: EnvelopeDownloadRouteContext,+) {+ const sessionResult = await requireVerifiedSenderSession(request);++ if (sessionResult instanceof Response) {+ return sessionResult;+ }++ const session = sessionResult;+ const { id } = await context.params;++ try {+ const { type } = downloadRequestSchema.parse({+ type: getDownloadType(request),+ });+ const download = await getSenderEnvelopeDownload(+ session.user.id,+ id,+ type,+ {+ database: getDb(),+ },+ );++ if (!("body" in download)) {+ const presignedDownload =+ await createStorageService().createPresignedDownloadUrl({+ expiresInSeconds: PRESIGNED_DOWNLOAD_TTL_SECONDS,+ fileName: download.fileName,+ key: download.key,+ });++ return NextResponse.redirect(+ new URL(presignedDownload.url, request.url),+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: 302,+ },+ );+ }++ const responseBody = download.body.slice().buffer as ArrayBuffer;++ return new Response(responseBody, {+ headers: {+ "cache-control": "private, no-store",+ "content-disposition": buildContentDisposition(download.fileName),+ "content-length": String(download.contentLength),+ "content-type": download.contentType,+ },+ status: 200,+ });+ } catch (error) {+ if (error instanceof ZodError) {+ const issue = error.issues[0];++ return NextResponse.json(+ { error: issue?.message ?? "Invalid download request." },+ { status: 400 },+ );+ }++ if (error instanceof DownloadAccessError) {+ return NextResponse.json(+ { error: error.message },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: error.statusCode,+ },+ );+ }++ logRouteError(error, {+ category: "sender_envelope_download_failure",+ ipAddress: getClientIpAddress(request.headers),+ message: "Unexpected failure while generating a sender download.",+ path: getRequestPathname(request),+ userId: session.user.id,+ });++ return NextResponse.json(+ { error: "Unable to start this download." },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: 500,+ },+ );+ }+}diff --git a/src/app/api/envelopes/[id]/fields/route.ts b/src/app/api/envelopes/[id]/fields/route.tsnew file mode 100644index 0000000..fcd3957--- /dev/null+++ b/src/app/api/envelopes/[id]/fields/route.ts@@ -0,0 +1,72 @@+import { NextResponse } from "next/server";+import { ZodError } from "zod";++import { requireVerifiedSenderSession } from "@/lib/auth/route-session";+import { getDb } from "@/lib/db/connection";+import {+ EnvelopeMutationError,+ replaceDraftEnvelopeFields,+} from "@/lib/envelopes";+import { logRouteError } from "@/lib/security/logging";+import { getClientIpAddress, getRequestPathname } from "@/lib/security/request";++type EnvelopeFieldsRouteContext = {+ params: Promise<{+ id: string;+ }>;+};++export async function PUT(+ request: Request,+ context: EnvelopeFieldsRouteContext,+) {+ const sessionResult = await requireVerifiedSenderSession(request);++ if (sessionResult instanceof Response) {+ return sessionResult;+ }++ const session = sessionResult;+ const { id } = await context.params;+ const body = (await request.json().catch(() => null)) as unknown;++ try {+ const result = await replaceDraftEnvelopeFields(+ session.user.id,+ id,+ body,+ getDb(),+ );++ return NextResponse.json(result, { status: 200 });+ } catch (error) {+ if (error instanceof ZodError) {+ const issue = error.issues[0];++ return NextResponse.json(+ { error: issue?.message ?? "Invalid field update request." },+ { status: 400 },+ );+ }++ if (error instanceof EnvelopeMutationError) {+ return NextResponse.json(+ { error: error.message },+ { status: error.statusCode },+ );+ }++ logRouteError(error, {+ category: "draft_envelope_fields_failure",+ ipAddress: getClientIpAddress(request.headers),+ message: "Unexpected failure while updating draft fields.",+ path: getRequestPathname(request),+ userId: session.user.id,+ });++ return NextResponse.json(+ { error: "Unable to update this draft field list." },+ { status: 500 },+ );+ }+}diff --git a/src/app/api/envelopes/[id]/nudge/route.ts b/src/app/api/envelopes/[id]/nudge/route.tsnew file mode 100644index 0000000..b7ebb29--- /dev/null+++ b/src/app/api/envelopes/[id]/nudge/route.ts@@ -0,0 +1,109 @@+import { NextResponse } from "next/server";++import { requireVerifiedSenderSession } from "@/lib/auth/route-session";+import { getDb } from "@/lib/db/connection";+import {+ ReminderMutationError,+ sendManualEnvelopeNudge,+} from "@/lib/reminders";+import { logRouteError } from "@/lib/security/logging";+import { applyRateLimit, buildRateLimitKey } from "@/lib/security/route-controls";+import {+ getClientIpAddress,+ getRequestPathname,+ getRequestUserAgent,+} from "@/lib/security/request";++type EnvelopeNudgeRouteContext = {+ params: Promise<{+ id: string;+ }>;+};++export async function POST(+ request: Request,+ context: EnvelopeNudgeRouteContext,+) {+ const sessionResult = await requireVerifiedSenderSession(request);++ if (sessionResult instanceof Response) {+ return sessionResult;+ }++ const session = sessionResult;+ const { id } = await context.params;+ const ipAddress = getClientIpAddress(request.headers);+ const rateLimitResponse = applyRateLimit({+ category: "envelope_nudge",+ key: buildRateLimitKey(["envelope-nudge", session.user.id, id]),+ limit: 5,+ request,+ userId: session.user.id,+ windowMs: 60 * 60 * 1000,+ });++ if (rateLimitResponse) {+ rateLimitResponse.headers.set("cache-control", "private, no-store");+ return rateLimitResponse;+ }++ try {+ const result = await sendManualEnvelopeNudge(+ session.user.id,+ id,+ {+ ipAddress,+ senderEmail: session.user.email,+ senderName:+ typeof session.user.name === "string" && session.user.name.trim()+ ? session.user.name+ : session.user.email,+ userAgent: getRequestUserAgent(request.headers),+ },+ {+ database: getDb(),+ },+ );++ return NextResponse.json(result, {+ headers: {+ "cache-control": "private, no-store",+ },+ status: 200,+ });+ } catch (error) {+ if (error instanceof ReminderMutationError) {+ return NextResponse.json(+ {+ error: error.message,+ nextAvailableAt: error.nextAvailableAt,+ nextAvailableAtLabel: error.nextAvailableAtLabel,+ },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: error.statusCode,+ },+ );+ }++ logRouteError(error, {+ category: "envelope_nudge_failure",+ ipAddress,+ message: "Unexpected failure while sending an envelope reminder.",+ path: getRequestPathname(request),+ userId: session.user.id,+ });++ return NextResponse.json(+ { error: "Unable to send a reminder." },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: 500,+ },+ );+ }+}diff --git a/src/app/api/envelopes/[id]/route.ts b/src/app/api/envelopes/[id]/route.tsnew file mode 100644index 0000000..72a0f88--- /dev/null+++ b/src/app/api/envelopes/[id]/route.ts@@ -0,0 +1,61 @@+import { NextResponse } from "next/server";++import { requireVerifiedSenderSession } from "@/lib/auth/route-session";+import { getDb } from "@/lib/db/connection";+import {+ deleteDraftEnvelope,+ EnvelopeMutationError,+} from "@/lib/envelopes";+import { logRouteError } from "@/lib/security/logging";+import { getClientIpAddress, getRequestPathname } from "@/lib/security/request";++type EnvelopeRouteContext = {+ params: Promise<{+ id: string;+ }>;+};++export async function DELETE(request: Request, context: EnvelopeRouteContext) {+ const sessionResult = await requireVerifiedSenderSession(request);++ if (sessionResult instanceof Response) {+ return sessionResult;+ }++ const session = sessionResult;+ const { id } = await context.params;++ try {+ const envelope = await deleteDraftEnvelope(session.user.id, id, {+ database: getDb(),+ });++ return NextResponse.json(+ {+ deletedEnvelopeId: envelope.id,+ redirectPath: "/dashboard",+ },+ { status: 200 },+ );+ } catch (error) {+ if (error instanceof EnvelopeMutationError) {+ return NextResponse.json(+ { error: error.message },+ { status: error.statusCode },+ );+ }++ logRouteError(error, {+ category: "draft_envelope_delete_failure",+ ipAddress: getClientIpAddress(request.headers),+ message: "Unexpected failure while deleting a draft envelope.",+ path: getRequestPathname(request),+ userId: session.user.id,+ });++ return NextResponse.json(+ { error: "Unable to delete this draft envelope." },+ { status: 500 },+ );+ }+}diff --git a/src/app/api/envelopes/[id]/send/route.ts b/src/app/api/envelopes/[id]/send/route.tsnew file mode 100644index 0000000..9314821--- /dev/null+++ b/src/app/api/envelopes/[id]/send/route.ts@@ -0,0 +1,108 @@+import { NextResponse } from "next/server";++import { requireVerifiedSenderSession } from "@/lib/auth/route-session";+import { getDb } from "@/lib/db/connection";+import { EnvelopeMutationError, sendDraftEnvelope } from "@/lib/envelopes";+import { logRouteError } from "@/lib/security/logging";+import {+ applyRateLimit,+ buildRateLimitKey,+} from "@/lib/security/route-controls";+import {+ getClientIpAddress,+ getRequestPathname,+ getRequestUserAgent,+} from "@/lib/security/request";++type EnvelopeSendRouteContext = {+ params: Promise<{+ id: string;+ }>;+};++type SendEnvelopeRequest = {+ permittedUseConfirmed?: boolean;+};++export async function POST(+ request: Request,+ context: EnvelopeSendRouteContext,+) {+ const sessionResult = await requireVerifiedSenderSession(request);++ if (sessionResult instanceof Response) {+ return sessionResult;+ }++ const session = sessionResult;+ const { id } = await context.params;+ const ipAddress = getClientIpAddress(request.headers);+ const rateLimitResponse = applyRateLimit({+ category: "draft_envelope_send",+ key: buildRateLimitKey(["envelope-send", session.user.id]),+ limit: 10,+ request,+ userId: session.user.id,+ windowMs: 60 * 60 * 1000,+ });++ if (rateLimitResponse) {+ rateLimitResponse.headers.set("cache-control", "private, no-store");+ return rateLimitResponse;+ }++ const body = (await request+ .json()+ .catch(() => null)) as SendEnvelopeRequest | null;++ if (body?.permittedUseConfirmed !== true) {+ return NextResponse.json(+ {+ error:+ "Confirm that this envelope is an ordinary business agreement before sending.",+ },+ { status: 400 },+ );+ }++ try {+ const result = await sendDraftEnvelope(+ session.user.id,+ id,+ {+ ipAddress,+ senderEmail: session.user.email,+ senderName:+ typeof session.user.name === "string" && session.user.name.trim()+ ? session.user.name+ : session.user.email,+ userAgent: getRequestUserAgent(request.headers),+ },+ {+ database: getDb(),+ },+ );++ return NextResponse.json(result, { status: 200 });+ } catch (error) {+ if (error instanceof EnvelopeMutationError) {+ return NextResponse.json(+ { error: error.message },+ { status: error.statusCode },+ );+ }++ logRouteError(error, {+ category: "draft_envelope_send_failure",+ ipAddress,+ message: "Unexpected failure while sending an envelope.",+ path: getRequestPathname(request),+ userId: session.user.id,+ });++ return NextResponse.json(+ { error: "Unable to send this envelope." },+ { status: 500 },+ );+ }+}diff --git a/src/app/api/envelopes/[id]/signers/route.ts b/src/app/api/envelopes/[id]/signers/route.tsnew file mode 100644index 0000000..b2194ef--- /dev/null+++ b/src/app/api/envelopes/[id]/signers/route.ts@@ -0,0 +1,72 @@+import { NextResponse } from "next/server";+import { ZodError } from "zod";++import { requireVerifiedSenderSession } from "@/lib/auth/route-session";+import { getDb } from "@/lib/db/connection";+import {+ EnvelopeMutationError,+ replaceDraftEnvelopeSigners,+} from "@/lib/envelopes";+import { logRouteError } from "@/lib/security/logging";+import { getClientIpAddress, getRequestPathname } from "@/lib/security/request";++type EnvelopeSignersRouteContext = {+ params: Promise<{+ id: string;+ }>;+};++export async function PUT(+ request: Request,+ context: EnvelopeSignersRouteContext,+) {+ const sessionResult = await requireVerifiedSenderSession(request);++ if (sessionResult instanceof Response) {+ return sessionResult;+ }++ const session = sessionResult;+ const { id } = await context.params;+ const body = (await request.json().catch(() => null)) as unknown;++ try {+ const result = await replaceDraftEnvelopeSigners(+ session.user.id,+ id,+ body,+ getDb(),+ );++ return NextResponse.json(result, { status: 200 });+ } catch (error) {+ if (error instanceof ZodError) {+ const issue = error.issues[0];++ return NextResponse.json(+ { error: issue?.message ?? "Invalid signer update request." },+ { status: 400 },+ );+ }++ if (error instanceof EnvelopeMutationError) {+ return NextResponse.json(+ { error: error.message },+ { status: error.statusCode },+ );+ }++ logRouteError(error, {+ category: "draft_envelope_signers_failure",+ ipAddress: getClientIpAddress(request.headers),+ message: "Unexpected failure while updating draft signers.",+ path: getRequestPathname(request),+ userId: session.user.id,+ });++ return NextResponse.json(+ { error: "Unable to update this draft signer list." },+ { status: 500 },+ );+ }+}diff --git a/src/app/api/envelopes/[id]/void/route.ts b/src/app/api/envelopes/[id]/void/route.tsnew file mode 100644index 0000000..714afe2--- /dev/null+++ b/src/app/api/envelopes/[id]/void/route.ts@@ -0,0 +1,102 @@+import { NextResponse } from "next/server";++import { requireVerifiedSenderSession } from "@/lib/auth/route-session";+import { getDb } from "@/lib/db/connection";+import { EnvelopeMutationError, voidSentEnvelope } from "@/lib/envelopes";+import { logRouteError } from "@/lib/security/logging";+import { applyRateLimit, buildRateLimitKey } from "@/lib/security/route-controls";+import {+ getClientIpAddress,+ getRequestPathname,+ getRequestUserAgent,+} from "@/lib/security/request";++type EnvelopeVoidRouteContext = {+ params: Promise<{+ id: string;+ }>;+};++export async function POST(+ request: Request,+ context: EnvelopeVoidRouteContext,+) {+ const sessionResult = await requireVerifiedSenderSession(request);++ if (sessionResult instanceof Response) {+ return sessionResult;+ }++ const session = sessionResult;+ const { id } = await context.params;+ const ipAddress = getClientIpAddress(request.headers);+ const rateLimitResponse = applyRateLimit({+ category: "sent_envelope_void",+ key: buildRateLimitKey(["envelope-void", session.user.id, id]),+ limit: 20,+ request,+ userId: session.user.id,+ windowMs: 10 * 60 * 1000,+ });++ if (rateLimitResponse) {+ rateLimitResponse.headers.set("cache-control", "private, no-store");+ return rateLimitResponse;+ }++ try {+ const result = await voidSentEnvelope(+ session.user.id,+ id,+ {+ ipAddress,+ senderEmail: session.user.email,+ senderName:+ typeof session.user.name === "string" && session.user.name.trim()+ ? session.user.name+ : session.user.email,+ userAgent: getRequestUserAgent(request.headers),+ },+ {+ database: getDb(),+ },+ );++ return NextResponse.json(result, {+ headers: {+ "cache-control": "private, no-store",+ },+ status: 200,+ });+ } catch (error) {+ if (error instanceof EnvelopeMutationError) {+ return NextResponse.json(+ { error: error.message },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: error.statusCode,+ },+ );+ }++ logRouteError(error, {+ category: "sent_envelope_void_failure",+ ipAddress,+ message: "Unexpected failure while voiding an envelope.",+ path: getRequestPathname(request),+ userId: session.user.id,+ });++ return NextResponse.json(+ { error: "Unable to void this envelope." },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: 500,+ },+ );+ }+}diff --git a/src/app/api/envelopes/route.ts b/src/app/api/envelopes/route.tsnew file mode 100644index 0000000..6f14b2c--- /dev/null+++ b/src/app/api/envelopes/route.ts@@ -0,0 +1,97 @@+import { NextResponse } from "next/server";++import { requireVerifiedSenderSession } from "@/lib/auth/route-session";+import {+ buildCreateEnvelopeResponse,+ createDraftEnvelope,+} from "@/lib/envelopes";+import { getDb } from "@/lib/db/connection";+import { envelopeTitleSchema } from "@/lib/schemas/common";+import { logRouteError } from "@/lib/security/logging";+import {+ applyRateLimit,+ buildRateLimitKey,+} from "@/lib/security/route-controls";+import { getClientIpAddress, getRequestPathname } from "@/lib/security/request";+import { DocumentImportError } from "@/lib/services/document-import";++export async function POST(request: Request) {+ const sessionResult = await requireVerifiedSenderSession(request);++ if (sessionResult instanceof Response) {+ return sessionResult;+ }++ const session = sessionResult;+ const rateLimitResponse = applyRateLimit({+ category: "draft_envelope_create",+ key: buildRateLimitKey(["draft-create", session.user.id]),+ limit: 20,+ request,+ userId: session.user.id,+ windowMs: 10 * 60 * 1000,+ });++ if (rateLimitResponse) {+ return rateLimitResponse;+ }++ const formData = await request.formData().catch(() => null);+ const parsedTitle = envelopeTitleSchema.safeParse(formData?.get("title"));+ const uploadedFile = formData?.get("file");++ if (!parsedTitle.success) {+ const issue = parsedTitle.error.issues[0];++ return NextResponse.json(+ { error: issue?.message ?? "Invalid envelope request." },+ { status: 400 },+ );+ }++ if (!(uploadedFile instanceof File)) {+ return NextResponse.json(+ { error: "A PDF file is required." },+ { status: 400 },+ );+ }++ try {+ const sourcePdfBody = new Uint8Array(await uploadedFile.arrayBuffer());+ const result = await createDraftEnvelope(+ session.user.id,+ {+ sourcePdf: {+ body: sourcePdfBody,+ contentType: uploadedFile.type,+ filename: uploadedFile.name,+ },+ title: parsedTitle.data,+ },+ {+ database: getDb(),+ },+ );++ return NextResponse.json(buildCreateEnvelopeResponse(result), {+ status: 201,+ });+ } catch (error) {+ if (error instanceof DocumentImportError) {+ return NextResponse.json({ error: error.message }, { status: 400 });+ }++ logRouteError(error, {+ category: "draft_envelope_create_failure",+ ipAddress: getClientIpAddress(request.headers),+ message: "Unexpected failure while creating a draft envelope.",+ path: getRequestPathname(request),+ userId: session.user.id,+ });++ return NextResponse.json(+ { error: "Unable to create the draft envelope." },+ { status: 500 },+ );+ }+}diff --git a/src/app/api/internal/retention/route.ts b/src/app/api/internal/retention/route.tsnew file mode 100644index 0000000..4640c75--- /dev/null+++ b/src/app/api/internal/retention/route.ts@@ -0,0 +1,34 @@+import { NextResponse } from "next/server";++import { runRetentionSweep } from "@/lib/retention";+import { getEnv } from "@/lib/utils/env";++function isAuthorizedRequest(request: Request, secret: string) {+ return request.headers.get("authorization") === `Bearer ${secret}`;+}++export async function POST(request: Request) {+ const retentionJobSecret = getEnv().internal.retentionJobSecret;++ if (!retentionJobSecret) {+ return NextResponse.json(+ {+ error: "Retention job secret is not configured.",+ },+ { status: 503 },+ );+ }++ if (!isAuthorizedRequest(request, retentionJobSecret)) {+ return NextResponse.json({ error: "Unauthorized." }, { status: 401 });+ }++ const summary = await runRetentionSweep();+ const hasFailures =+ summary.accountPurgeFailures.length > 0 ||+ summary.draftDeletionFailures.length > 0;++ return NextResponse.json(summary, {+ status: hasFailures ? 500 : 200,+ });+}diff --git a/src/app/api/signing/[token]/decline/route.ts b/src/app/api/signing/[token]/decline/route.tsnew file mode 100644index 0000000..1693381--- /dev/null+++ b/src/app/api/signing/[token]/decline/route.ts@@ -0,0 +1,122 @@+import { NextResponse } from "next/server";+import { ZodError } from "zod";++import { getDb } from "@/lib/db/connection";+import {+ SigningAccessError,+ SigningMutationError,+ declineSigningForToken,+} from "@/lib/signing";+import { logRouteError } from "@/lib/security/logging";+import { applyRateLimit, buildRateLimitKey } from "@/lib/security/route-controls";+import { getClientIpAddress, getRequestUserAgent } from "@/lib/security/request";++type SigningDeclineRouteContext = {+ params: Promise<{+ token: string;+ }>;+};++export async function POST(+ request: Request,+ context: SigningDeclineRouteContext,+) {+ const { token } = await context.params;+ const rateLimitResponse = applyRateLimit({+ category: "signing_decline",+ key: buildRateLimitKey([+ "signing-decline",+ token,+ getClientIpAddress(request.headers) ?? "unknown",+ ]),+ limit: 10,+ request,+ windowMs: 10 * 60 * 1000,+ });++ if (rateLimitResponse) {+ return rateLimitResponse;+ }+ const body = (await request.json().catch(() => null)) as unknown;++ try {+ const payload = await declineSigningForToken(token, body, {+ database: getDb(),+ requestMeta: {+ ipAddress: getClientIpAddress(request.headers),+ userAgent: getRequestUserAgent(request.headers),+ },+ });++ return NextResponse.json(payload, {+ headers: {+ "cache-control": "private, no-store",+ },+ status: 200,+ });+ } catch (error) {+ if (error instanceof ZodError) {+ const issue = error.issues[0];++ return NextResponse.json(+ {+ error: issue?.message ?? "Invalid decline request.",+ },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: 400,+ },+ );+ }++ if (error instanceof SigningAccessError) {+ return NextResponse.json(+ {+ error: error.message,+ state: error.state,+ },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: error.statusCode,+ },+ );+ }++ if (error instanceof SigningMutationError) {+ return NextResponse.json(+ {+ error: error.message,+ },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: error.statusCode,+ },+ );+ }++ logRouteError(error, {+ category: "signing_decline_failure",+ ipAddress: getClientIpAddress(request.headers),+ message: "Unexpected failure while declining a signing request.",+ path: request.url,+ });++ return NextResponse.json(+ {+ error: "Unable to decline this document.",+ },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: 500,+ },+ );+ }+}diff --git a/src/app/api/signing/[token]/document/route.ts b/src/app/api/signing/[token]/document/route.tsnew file mode 100644index 0000000..ff3b93d--- /dev/null+++ b/src/app/api/signing/[token]/document/route.ts@@ -0,0 +1,88 @@+import { NextResponse } from "next/server";++import { getDb } from "@/lib/db/connection";+import { SigningAccessError, getSigningDocumentForToken } from "@/lib/signing";+import { logRouteError } from "@/lib/security/logging";+import { applyRateLimit, buildRateLimitKey } from "@/lib/security/route-controls";+import { getClientIpAddress } from "@/lib/security/request";++type SigningDocumentRouteContext = {+ params: Promise<{+ token: string;+ }>;+};++export async function GET(+ request: Request,+ context: SigningDocumentRouteContext,+) {+ const { token } = await context.params;+ const rateLimitResponse = applyRateLimit({+ category: "signing_document_read",+ key: buildRateLimitKey([+ "signing-document",+ token,+ getClientIpAddress(request.headers) ?? "unknown",+ ]),+ limit: 60,+ request,+ windowMs: 5 * 60 * 1000,+ });++ if (rateLimitResponse) {+ return rateLimitResponse;+ }++ try {+ const documentObject = await getSigningDocumentForToken(token, {+ database: getDb(),+ });+ const responseBody = documentObject.body.slice().buffer as ArrayBuffer;++ return new Response(responseBody, {+ headers: {+ "cache-control": "private, no-store",+ "content-disposition": 'inline; filename="document.pdf"',+ "content-length": String(+ documentObject.contentLength ?? documentObject.body.length,+ ),+ "content-type": documentObject.contentType ?? "application/pdf",+ },+ status: 200,+ });+ } catch (error) {+ if (error instanceof SigningAccessError) {+ return NextResponse.json(+ {+ error: error.message,+ state: error.state,+ },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: error.statusCode,+ },+ );+ }++ logRouteError(error, {+ category: "signing_document_read_failure",+ ipAddress: getClientIpAddress(request.headers),+ message: "Unexpected failure while loading a signing document.",+ path: request.url,+ });++ return NextResponse.json(+ {+ error: "Unable to load this document.",+ },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: 500,+ },+ );+ }+}diff --git a/src/app/api/signing/[token]/route.ts b/src/app/api/signing/[token]/route.tsnew file mode 100644index 0000000..4460d2d--- /dev/null+++ b/src/app/api/signing/[token]/route.ts@@ -0,0 +1,83 @@+import { NextResponse } from "next/server";++import { getDb } from "@/lib/db/connection";+import { SigningAccessError, getSigningPayloadForToken } from "@/lib/signing";+import { logRouteError } from "@/lib/security/logging";+import { applyRateLimit, buildRateLimitKey } from "@/lib/security/route-controls";+import { getClientIpAddress, getRequestUserAgent } from "@/lib/security/request";++type SigningRouteContext = {+ params: Promise<{+ token: string;+ }>;+};++export async function GET(request: Request, context: SigningRouteContext) {+ const { token } = await context.params;+ const rateLimitResponse = applyRateLimit({+ category: "signing_token_read",+ key: buildRateLimitKey([+ "signing-read",+ token,+ getClientIpAddress(request.headers) ?? "unknown",+ ]),+ limit: 60,+ request,+ windowMs: 5 * 60 * 1000,+ });++ if (rateLimitResponse) {+ return rateLimitResponse;+ }++ try {+ const payload = await getSigningPayloadForToken(token, {+ database: getDb(),+ requestMeta: {+ ipAddress: getClientIpAddress(request.headers),+ userAgent: getRequestUserAgent(request.headers),+ },+ });++ return NextResponse.json(payload, {+ headers: {+ "cache-control": "private, no-store",+ },+ status: 200,+ });+ } catch (error) {+ if (error instanceof SigningAccessError) {+ return NextResponse.json(+ {+ error: error.message,+ state: error.state,+ },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: error.statusCode,+ },+ );+ }++ logRouteError(error, {+ category: "signing_token_read_failure",+ ipAddress: getClientIpAddress(request.headers),+ message: "Unexpected failure while loading a signing link.",+ path: request.url,+ });++ return NextResponse.json(+ {+ error: "Unable to load this signing link.",+ },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: 500,+ },+ );+ }+}diff --git a/src/app/api/signing/[token]/submit/route.ts b/src/app/api/signing/[token]/submit/route.tsnew file mode 100644index 0000000..fcbd007--- /dev/null+++ b/src/app/api/signing/[token]/submit/route.ts@@ -0,0 +1,122 @@+import { NextResponse } from "next/server";+import { ZodError } from "zod";++import { getDb } from "@/lib/db/connection";+import {+ SigningAccessError,+ SigningMutationError,+ submitSigningForToken,+} from "@/lib/signing";+import { logRouteError } from "@/lib/security/logging";+import { applyRateLimit, buildRateLimitKey } from "@/lib/security/route-controls";+import { getClientIpAddress, getRequestUserAgent } from "@/lib/security/request";++type SigningSubmitRouteContext = {+ params: Promise<{+ token: string;+ }>;+};++export async function POST(+ request: Request,+ context: SigningSubmitRouteContext,+) {+ const { token } = await context.params;+ const rateLimitResponse = applyRateLimit({+ category: "signing_submit",+ key: buildRateLimitKey([+ "signing-submit",+ token,+ getClientIpAddress(request.headers) ?? "unknown",+ ]),+ limit: 10,+ request,+ windowMs: 10 * 60 * 1000,+ });++ if (rateLimitResponse) {+ return rateLimitResponse;+ }+ const body = (await request.json().catch(() => null)) as unknown;++ try {+ const payload = await submitSigningForToken(token, body, {+ database: getDb(),+ requestMeta: {+ ipAddress: getClientIpAddress(request.headers),+ userAgent: getRequestUserAgent(request.headers),+ },+ });++ return NextResponse.json(payload, {+ headers: {+ "cache-control": "private, no-store",+ },+ status: 200,+ });+ } catch (error) {+ if (error instanceof ZodError) {+ const issue = error.issues[0];++ return NextResponse.json(+ {+ error: issue?.message ?? "Invalid signing submission.",+ },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: 400,+ },+ );+ }++ if (error instanceof SigningAccessError) {+ return NextResponse.json(+ {+ error: error.message,+ state: error.state,+ },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: error.statusCode,+ },+ );+ }++ if (error instanceof SigningMutationError) {+ return NextResponse.json(+ {+ error: error.message,+ },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: error.statusCode,+ },+ );+ }++ logRouteError(error, {+ category: "signing_submit_failure",+ ipAddress: getClientIpAddress(request.headers),+ message: "Unexpected failure while submitting a signing action.",+ path: request.url,+ });++ return NextResponse.json(+ {+ error: "Unable to finish signing.",+ },+ {+ headers: {+ "cache-control": "private, no-store",+ },+ status: 500,+ },+ );+ }+}diff --git a/src/app/contact/page.tsx b/src/app/contact/page.tsxnew file mode 100644index 0000000..8459cb0--- /dev/null+++ b/src/app/contact/page.tsx@@ -0,0 +1,24 @@+import type { Metadata } from "next";++import { ContactForm } from "@/components/contact/contact-form";+import { PublicDocumentShell } from "@/components/layout/public-document-shell";++export const metadata: Metadata = {+ description:+ "Get in touch with SignuDoc for support, privacy questions, accessibility requests, or legal inquiries.",+ title: "Contact | SignuDoc",+};++export default function ContactPage() {+ return (+ <PublicDocumentShell+ description="Use the form below for product support, privacy requests, accessibility accommodations, legal notices, or questions about a document sent through SignuDoc."+ lastUpdated="March 23, 2026"+ title="Contact"+ >+ <div className="mx-auto w-full max-w-[52rem]">+ <ContactForm />+ </div>+ </PublicDocumentShell>+ );+}diff --git a/src/app/globals.css b/src/app/globals.cssnew file mode 100644index 0000000..66a578e--- /dev/null+++ b/src/app/globals.css@@ -0,0 +1,231 @@+@import "tailwindcss";+@import "tw-animate-css";+@import "shadcn/tailwind.css";++@custom-variant dark (&:is(.dark *));++@theme inline {+ --color-background: var(--page);+ --color-foreground: var(--fg);+ --color-card: var(--paper);+ --color-card-foreground: var(--fg);+ --color-popover: var(--paper-raised);+ --color-popover-foreground: var(--fg);+ --color-primary: var(--accent);+ --color-primary-foreground: #ffffff;+ --color-secondary: var(--surface);+ --color-secondary-foreground: var(--fg);+ --color-muted: var(--surface);+ --color-muted-foreground: var(--secondary);+ --color-accent: var(--surface-strong);+ --color-accent-foreground: var(--fg);+ --color-destructive: var(--accent);+ --color-destructive-foreground: #ffffff;+ --color-border: var(--border);+ --color-input: var(--border);+ --color-ring: rgba(180, 35, 53, 0.24);+ --color-chart-1: var(--signer-1);+ --color-chart-2: var(--signer-2);+ --color-chart-3: var(--signer-3);+ --color-chart-4: var(--signer-4);+ --color-chart-5: var(--accent);+ --color-sidebar: var(--shell-surface);+ --color-sidebar-foreground: var(--fg);+ --color-sidebar-primary: var(--accent);+ --color-sidebar-primary-foreground: #ffffff;+ --color-sidebar-accent: rgba(255, 255, 255, 0.82);+ --color-sidebar-accent-foreground: var(--fg);+ --color-sidebar-border: var(--border);+ --color-sidebar-ring: rgba(180, 35, 53, 0.24);+ --radius-sm: calc(var(--radius) * 0.7);+ --radius-md: calc(var(--radius) * 0.9);+ --radius-lg: var(--radius);+ --radius-xl: calc(var(--radius) * 1.2);+ --radius-2xl: calc(var(--radius) * 1.5);+ --radius-3xl: calc(var(--radius) * 1.8);+ --radius-4xl: calc(var(--radius) * 2.2);+ --shadow-xs: 0 1px 2px rgba(18, 16, 12, 0.04);+ --shadow-sm: 0 14px 30px rgba(18, 16, 12, 0.055);+ --shadow: 0 18px 44px rgba(18, 16, 12, 0.08);+ --shadow-md: 0 28px 60px rgba(18, 16, 12, 0.1);+ --shadow-lg: 0 42px 90px rgba(18, 16, 12, 0.14);+}++:root {+ --page: #ffffff;+ --bg: #ffffff;+ --paper: #ffffff;+ --paper-raised: #ffffff;+ --fg: #000000;+ --secondary: #55555c;+ --tertiary: #7b7b84;+ --placeholder: #9b9ba3;+ --accent: #e50000;+ --accent-hover: #c00000;+ --surface: #f7f7f8;+ --surface-strong: #efeff1;+ --shell-surface: #ffffff;+ --border: #d4d4d4;+ --border-strong: #afafb6;+ --hover: rgba(0, 0, 0, 0.04);+ --shell-wash: #ffffff;+ --canvas-wash: #f7f7f8;+ --shadow-soft: 0 18px 36px rgba(0, 0, 0, 0.06);+ --shadow-card: 0 10px 22px rgba(0, 0, 0, 0.04);+ --signer-1: #2563eb;+ --signer-1-tint: rgba(37, 99, 235, 0.12);+ --signer-2: #9333ea;+ --signer-2-tint: rgba(147, 51, 234, 0.12);+ --signer-3: #d97706;+ --signer-3-tint: rgba(217, 119, 6, 0.14);+ --signer-4: #059669;+ --signer-4-tint: rgba(5, 150, 105, 0.12);+ --radius: 0.9rem;+}++* {+ box-sizing: border-box;+ border-color: var(--border);+}++html {+ background: #ffffff;+ color: var(--fg);+}++body {+ margin: 0;+ min-height: 100vh;+ background: var(--page);+ color: var(--fg);+ font-family: var(--font-ui), "Helvetica Neue", ui-sans-serif, system-ui,+ sans-serif;+ letter-spacing: -0.01em;+ text-rendering: optimizeLegibility;+}++a {+ color: inherit;+ text-decoration: none;+}++button,+input,+textarea {+ font: inherit;+}++button {+ cursor: pointer;+}++input::placeholder,+textarea::placeholder {+ color: var(--placeholder);+}++::selection {+ background: rgba(180, 35, 53, 0.16);+}++:focus-visible {+ outline: 2px solid rgba(180, 35, 53, 0.4);+ outline-offset: 2px;+}++[data-paper-grid] {+ background-image:+ linear-gradient(rgba(212, 212, 212, 0.62) 1px, transparent 1px),+ linear-gradient(90deg, rgba(212, 212, 212, 0.62) 1px, transparent 1px);+ background-position: center center;+ background-size: 28px 28px;+}++h1,+h2,+h3,+h4,+h5,+h6 {+ letter-spacing: -0.04em;+}++@media (prefers-reduced-motion: no-preference) {+ [data-animate="enter"] {+ animation: quiet-rise 420ms cubic-bezier(0.22, 1, 0.36, 1) both;+ }++ [data-animate-delay="1"] {+ animation-delay: 60ms;+ }++ [data-animate-delay="2"] {+ animation-delay: 120ms;+ }+}++@keyframes quiet-rise {+ from {+ opacity: 0;+ transform: translateY(12px);+ }++ to {+ opacity: 1;+ transform: translateY(0);+ }+}++.app-surface {+ border: 1px solid var(--border);+ border-radius: 1.25rem;+ background: #ffffff;+ box-shadow: none;+}++.app-surface-strong {+ border: 1px solid var(--border);+ border-radius: 1.25rem;+ background: #ffffff;+ box-shadow: none;+}++.muted-surface {+ border: 1px solid var(--border);+ border-radius: 1rem;+ background: var(--surface);+}++.section-eyebrow {+ font-family: var(--font-mono), ui-monospace, monospace;+ font-size: 0.7rem;+ font-weight: 700;+ letter-spacing: 0.24em;+ text-transform: uppercase;+ color: var(--tertiary);+}++.editorial-shell {+ width: min(1200px, calc(100% - 3rem));+ margin-inline: auto;+}++.editorial-meta {+ font-family: var(--font-mono), ui-monospace, monospace;+ font-size: 0.72rem;+ font-weight: 700;+ letter-spacing: 0.2em;+ text-transform: uppercase;+ color: var(--tertiary);+}++.editorial-panel {+ position: relative;+ border: 1px solid var(--border);+ background: #ffffff;+}++.editorial-panel-soft {+ border: 1px solid var(--border);+ background: var(--surface);+}diff --git a/src/app/icon.svg b/src/app/icon.svgnew file mode 100644index 0000000..8ff8858--- /dev/null+++ b/src/app/icon.svg@@ -0,0 +1,21 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ viewBox="0 0 64 64"+ fill="none"+>+ <rect width="64" height="64" rx="12" fill="#0A0A0A" />+ <path+ d="M20 16H37L44 23V48H20V16Z"+ fill="#FFFFFF"+ stroke="#FFFFFF"+ stroke-linejoin="round"+ stroke-width="2.5"+ />+ <path d="M37 16V23H44" stroke="#0A0A0A" stroke-width="2.5" />+ <path+ d="M24 38C27.2 34.6 29.8 33.6 31.2 34.5C32.8 35.5 32.1 39.3 34 40C35.8 40.7 38.4 38.7 42 34"+ stroke="#E11D48"+ stroke-linecap="round"+ stroke-width="3.5"+ />+</svg>diff --git a/src/app/layout.tsx b/src/app/layout.tsxnew file mode 100644index 0000000..e3bf88e--- /dev/null+++ b/src/app/layout.tsx@@ -0,0 +1,45 @@+import type { Metadata } from "next";+import { Archivo, IBM_Plex_Mono } from "next/font/google";++import { TooltipProvider } from "@/components/ui/tooltip";++import "./globals.css";++const archivo = Archivo({+ display: "swap",+ subsets: ["latin"],+ variable: "--font-ui",+ weight: ["400", "500", "600", "700", "800", "900"],+});++const ibmPlexMono = IBM_Plex_Mono({+ display: "swap",+ subsets: ["latin"],+ variable: "--font-mono",+ weight: ["400", "500", "600", "700"],+});++export const metadata: Metadata = {+ title: "SignuDoc",+ description:+ "Free e-signature software for small businesses. Upload, send, sign — no enterprise circus required.",+ icons: {+ icon: "/icon.svg",+ },+};++export default function RootLayout({+ children,+}: Readonly<{+ children: React.ReactNode;+}>) {+ return (+ <html lang="en">+ <body+ className={`${archivo.variable} ${ibmPlexMono.variable} antialiased`}+ >+ <TooltipProvider>{children}</TooltipProvider>+ </body>+ </html>+ );+}diff --git a/src/app/not-found.tsx b/src/app/not-found.tsxnew file mode 100644index 0000000..2c8f0da--- /dev/null+++ b/src/app/not-found.tsx@@ -0,0 +1,5 @@+import { NotFoundShell } from "@/components/not-found/not-found-shell";++export default function NotFound() {+ return <NotFoundShell initialState="default" />;+}diff --git a/src/app/page.tsx b/src/app/page.tsxnew file mode 100644index 0000000..2448981--- /dev/null+++ b/src/app/page.tsx@@ -0,0 +1,5 @@+import { LandingShell } from "@/components/landing/landing-shell";++export default function Home() {+ return <LandingShell initialState="default" />;+}diff --git a/src/app/privacy/page.tsx b/src/app/privacy/page.tsxnew file mode 100644index 0000000..1a5252f--- /dev/null+++ b/src/app/privacy/page.tsx@@ -0,0 +1,303 @@+import type { Metadata } from "next";+import Link from "next/link";++import { PublicDocumentShell } from "@/components/layout/public-document-shell";+import { resolvePublicSupportAddress } from "@/lib/public-contact";++export const metadata: Metadata = {+ description:+ "Read how SignuDoc collects, uses, shares, retains, and protects information for its public U.S. e-signature service.",+ title: "Privacy Policy | SignuDoc",+};++export default function PrivacyPage() {+ const privacyAddress = resolvePublicSupportAddress();++ return (+ <PublicDocumentShell+ description="This Privacy Policy describes the categories of information SignuDoc collects, how we use and share that information, the rights available to users, and how to contact us with privacy requests."+ lastUpdated="March 25, 2026"+ title="Privacy Policy"+ >+ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 1. Scope and service design+ </h2>+ <p>+ SignuDoc is a U.S.-focused electronic-signature service designed for+ ordinary business agreements and similar commercial workflows. This+ Privacy Policy applies to account holders, signers, website visitors,+ and support contacts who interact with SignuDoc.+ </p>+ <p>+ SignuDoc is not intended for legally required consumer disclosure+ workflows that need a separate E-SIGN consumer-consent process. If a+ sender uses SignuDoc outside that scope, the sender remains+ responsible for making sure the workflow is legally appropriate.+ </p>+ </section>++ <section className="space-y-4">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 2. Information we collect+ </h2>+ <p>We may collect the following categories of information:</p>+ <ul className="list-disc space-y-2 pl-6">+ <li>+ <strong>Account information</strong>, such as name, email address,+ password credentials, email-verification status, session data, and+ profile updates.+ </li>+ <li>+ <strong>Document and workflow data</strong>, such as uploaded PDFs,+ document titles, page counts, placed fields, signer routing order,+ envelope status, and related metadata.+ </li>+ <li>+ <strong>Signer and signature data</strong>, such as signer names and+ email addresses, typed signature values, drawn signature images,+ dates, text entries, checkbox selections, and decline reasons.+ </li>+ <li>+ <strong>Audit and security data</strong>, such as IP address,+ browser or device information, timestamps, token identifiers, record+ access events, sending events, reminder events, signing events, and+ system-generated audit trails.+ </li>+ <li>+ <strong>Support and communications data</strong>, such as emails you+ send to SignuDoc, account-closure requests, privacy requests, and+ feedback about accessibility or product issues.+ </li>+ <li>+ <strong>Cookies and local state</strong>, such as authentication+ cookies, session information, and limited browser-side data needed+ to operate the application securely.+ </li>+ </ul>+ </section>++ <section className="space-y-4">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 3. Where the information comes from+ </h2>+ <p>We collect information directly from you when you:</p>+ <ul className="list-disc space-y-2 pl-6">+ <li>create or use an account;</li>+ <li>upload or send a document;</li>+ <li>complete, decline, or download a signing package;</li>+ <li>communicate with us by email or through support channels; or</li>+ <li>browse or interact with the website.</li>+ </ul>+ <p>+ We also generate information automatically when SignuDoc records audit+ events, sends transactional emails, secures sessions, enforces rate+ limits, or stores completed records.+ </p>+ </section>++ <section className="space-y-4">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 4. How we use information+ </h2>+ <p>We may use information to:</p>+ <ul className="list-disc space-y-2 pl-6">+ <li>create and manage accounts;</li>+ <li>deliver signing workflows and completed document packages;</li>+ <li>verify email addresses and send transactional messages;</li>+ <li>maintain envelope history, audit trails, and security logs;</li>+ <li>prevent fraud, abuse, and unauthorized access;</li>+ <li>respond to support, privacy, and accessibility requests;</li>+ <li>+ comply with legal obligations, enforce agreements, and resolve+ disputes; and+ </li>+ <li>+ improve the reliability, security, and usability of the service.+ </li>+ </ul>+ </section>++ <section className="space-y-4">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 5. How we share information+ </h2>+ <p>+ We may share information with service providers that help us operate+ SignuDoc, such as providers for authentication, cloud storage, email+ delivery, hosting, infrastructure, logging, security, and customer+ support.+ </p>+ <p>+ We may also disclose information when reasonably necessary to comply+ with law, respond to legal process, protect the rights or safety of+ SignuDoc, users, or the public, or in connection with a merger,+ acquisition, financing, or asset sale.+ </p>+ <p>+ SignuDoc is not built as an advertising-supported service. If that+ changes, we will update this Privacy Policy before using personal+ information in a materially different way.+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 6. Retention+ </h2>+ <p>+ Unsent draft envelopes and their uploaded source documents may be+ deleted after a period of inactivity, such as 30 days without sender+ activity.+ </p>+ <p>+ Completed, declined, and voided envelopes remain available while your+ account is active so you can access signed documents and audit+ history. We also keep related audit and security records for as long+ as reasonably necessary to operate the service, prevent abuse, comply+ with legal obligations, resolve disputes, and enforce agreements.+ </p>+ <p>+ If you close your account, we may provide a limited export window and+ then delete stored document files and related envelope records, except+ limited information we need for security, fraud prevention, legal+ compliance, or dispute resolution.+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 7. Security+ </h2>+ <p>+ SignuDoc uses administrative, technical, and physical safeguards that+ are designed to protect personal information, including authenticated+ access controls, audit logging, rate limiting, security headers, and+ cloud-storage controls. No system is perfectly secure, and we cannot+ guarantee absolute security.+ </p>+ </section>++ <section className="space-y-4">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 8. Your privacy rights+ </h2>+ <p>+ Depending on where you live and the nature of your relationship with+ SignuDoc, you may have rights to:+ </p>+ <ul className="list-disc space-y-2 pl-6">+ <li>know or access the personal information we hold about you;</li>+ <li>request correction of inaccurate information;</li>+ <li>request deletion of information, subject to legal exceptions;</li>+ <li>+ receive a copy of certain information we can provide manually;+ </li>+ <li>+ withdraw consent where a processing activity depends on consent; and+ </li>+ <li>+ be free from discrimination for exercising applicable privacy+ rights.+ </li>+ </ul>+ <p>+ California residents may also have rights to request the categories+ and specific pieces of personal information we collected about them,+ request correction of inaccurate personal information, and request+ deletion, subject to applicable exemptions.+ </p>+ </section>++ <section className="space-y-4">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 9. How to exercise your rights+ </h2>+ <p>+ To request access, correction, deletion, or account closure, email{" "}+ <Link+ className="font-semibold text-(--fg) underline decoration-[rgba(17,17,17,0.24)] underline-offset-4"+ href={`mailto:${privacyAddress}`}+ >+ {privacyAddress}+ </Link>{" "}+ or use the in-app account-closure request flow when available.+ </p>+ <p>+ We may ask you to verify your identity before we act on a request. For+ example, we may ask you to confirm control of the relevant email+ address, identify recent account activity, or provide envelope details+ sufficient to locate the records you want us to review.+ </p>+ <p>+ Where California law applies, we aim to respond within 45 calendar+ days of a verifiable request and may extend once by another 45 days+ where permitted by law. Where GDPR or similar laws apply, we aim to+ respond within one month, subject to lawful extensions for complex or+ numerous requests.+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 10. Cookies and local storage+ </h2>+ <p>+ SignuDoc uses cookies and similar technologies primarily for+ authentication, session continuity, security, and basic application+ state. We may also store limited local settings needed to make the app+ usable, such as interface preferences and page state for active+ workflows. For sender workflows, draft PDF previews may be cached+ locally in the browser (IndexedDB) for up to 24 hours to improve+ document preparation performance.+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 11. Children and international use+ </h2>+ <p>+ SignuDoc is not directed to children under 13, and we do not knowingly+ collect personal information from children through the service. If you+ believe a child provided personal information to us, contact us so we+ can review and address the issue.+ </p>+ <p>+ SignuDoc is operated for U.S.-focused business use. If you access the+ service from outside the United States, you understand that+ information may be processed and stored in the United States or other+ locations where our service providers operate.+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 12. Changes and contact+ </h2>+ <p>+ We may update this Privacy Policy from time to time by posting a+ revised version on this page. Material changes will apply when posted+ unless a later date is stated.+ </p>+ <p>+ Privacy questions, requests, and complaints may be sent to{" "}+ <Link+ className="font-semibold text-(--fg) underline decoration-[rgba(17,17,17,0.24)] underline-offset-4"+ href={`mailto:${privacyAddress}`}+ >+ {privacyAddress}+ </Link>{" "}+ or through the{" "}+ <Link+ className="font-semibold text-(--fg) underline decoration-[rgba(17,17,17,0.24)] underline-offset-4"+ href="/contact"+ >+ Contact+ </Link>{" "}+ page.+ </p>+ </section>+ </PublicDocumentShell>+ );+}diff --git a/src/app/sign/[token]/done/page.tsx b/src/app/sign/[token]/done/page.tsxnew file mode 100644index 0000000..2455f5f--- /dev/null+++ b/src/app/sign/[token]/done/page.tsx@@ -0,0 +1,18 @@+import { SigningDoneShell } from "@/components/signing/signing-done-shell";++type SignDonePageProps = {+ searchParams?: Promise<{+ title?: string | string[];+ }>;+};++export default async function SignDonePage({+ searchParams,+}: SignDonePageProps) {+ const resolvedSearchParams = searchParams ? await searchParams : undefined;+ const envelopeTitle = Array.isArray(resolvedSearchParams?.title)+ ? resolvedSearchParams.title[0]+ : resolvedSearchParams?.title;++ return <SigningDoneShell envelopeTitle={envelopeTitle} />;+}diff --git a/src/app/sign/[token]/page.tsx b/src/app/sign/[token]/page.tsxnew file mode 100644index 0000000..869a1ab--- /dev/null+++ b/src/app/sign/[token]/page.tsx@@ -0,0 +1,53 @@+import { headers } from "next/headers";++import { SigningShell } from "@/components/signing/signing-shell";+import { getDb } from "@/lib/db/connection";+import { getClientIpAddress } from "@/lib/security/request";+import { SigningAccessError, getSigningPayloadForToken } from "@/lib/signing";++type SignPageProps = {+ params: Promise<{+ token: string;+ }>;+};++export default async function SignPage({+ params,+}: SignPageProps) {+ const { token } = await params;+ let initialState:+ | "already-signed"+ | "declined"+ | "error"+ | "expired"+ | "voided"+ | undefined;+ let record: Awaited<ReturnType<typeof getSigningPayloadForToken>> | null =+ null;++ try {+ const requestHeaders = await headers();++ record = await getSigningPayloadForToken(token, {+ database: getDb(),+ requestMeta: {+ ipAddress: getClientIpAddress(requestHeaders),+ userAgent: requestHeaders.get("user-agent")?.trim() ?? null,+ },+ });+ } catch (error) {+ if (error instanceof SigningAccessError) {+ initialState = error.state;+ } else {+ initialState = "error";+ }+ }++ return (+ <SigningShell+ initialState={initialState}+ key={token}+ record={record ?? undefined}+ />+ );+}diff --git a/src/app/terms/page.tsx b/src/app/terms/page.tsxnew file mode 100644index 0000000..48ef3e6--- /dev/null+++ b/src/app/terms/page.tsx@@ -0,0 +1,341 @@+import type { Metadata } from "next";+import Link from "next/link";++import { PublicDocumentShell } from "@/components/layout/public-document-shell";+import { resolvePublicSupportAddress } from "@/lib/public-contact";++export const metadata: Metadata = {+ description:+ "Review the terms that govern use of the SignuDoc public e-signature service.",+ title: "Terms of Service | SignuDoc",+};++export default function TermsPage() {+ const supportAddress = resolvePublicSupportAddress();++ return (+ <PublicDocumentShell+ description="These Terms of Service govern your access to and use of SignuDoc. They are written for a launch-stage U.S. e-signature product intended for ordinary business agreements and commercial workflows."+ lastUpdated="March 21, 2026"+ title="Terms of Service"+ >+ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 1. Overview+ </h2>+ <p>+ By creating an account, uploading a document, sending an envelope, or+ signing through SignuDoc, you agree to these Terms. If you use+ SignuDoc on behalf of a company or other organization, you represent+ that you are authorized to bind that organization to these Terms.+ </p>+ <p>+ SignuDoc provides software for preparing, sending, signing, and+ storing electronic records. SignuDoc is not a law firm, is not your+ lawyer, does not give legal advice, and does not determine whether a+ particular document is legally suitable for electronic signing in any+ jurisdiction.+ </p>+ <p>+ SignuDoc is currently offered for use by U.S.-based businesses and+ organizations.+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 2. Eligibility and authority+ </h2>+ <p>+ You may use SignuDoc only if you can form a binding contract under+ applicable law and only for lawful business or organizational+ purposes. You are responsible for making sure that each sender,+ signer, and recipient has authority to act for the party they+ represent.+ </p>+ <p>+ You are also responsible for determining whether your transaction+ requires witnesses, notarization, paper delivery, special retention+ rules, or a signature form that SignuDoc does not provide.+ </p>+ </section>++ <section className="space-y-4">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 3. Permitted use and excluded documents+ </h2>+ <p>+ SignuDoc is intended for ordinary business agreements and comparable+ commercial records, such as NDAs, statements of work, vendor+ agreements, service agreements, procurement approvals, and similar+ business documents.+ </p>+ <p>+ You must not use SignuDoc for documents or notices that are excluded+ from SignuDoc's permitted scope, including:+ </p>+ <ul className="list-disc space-y-2 pl-6">+ <li>wills, codicils, and testamentary trusts;</li>+ <li>adoption, divorce, or other matters of family law;</li>+ <li>+ court orders, court notices, pleadings, or other official court+ documents;+ </li>+ <li>+ notices of utility cancellation or termination, including water,+ heat, or power;+ </li>+ <li>+ notices of default, acceleration, repossession, foreclosure,+ eviction, or the right to cure involving a primary residence;+ </li>+ <li>+ cancellation or termination of health insurance benefits or life+ insurance benefits;+ </li>+ <li>+ product recall notices or notices of material product failure that+ risk endangering health or safety;+ </li>+ <li>+ documents required to accompany the transportation or handling of+ hazardous materials, pesticides, or other toxic or dangerous+ materials; and+ </li>+ <li>+ legally required consumer disclosures or other workflows that+ require a separate E-SIGN consumer-consent process before the record+ may be delivered electronically.+ </li>+ </ul>+ <p>+ If a document falls into a regulated, safety-sensitive, consumer+ disclosure, estate-planning, court, or family-law category, do not use+ SignuDoc for that workflow. By sending an envelope, you confirm that+ the document is an ordinary business agreement within SignuDoc's+ permitted use.+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 4. Sender responsibilities+ </h2>+ <p>+ Senders are responsible for the content they upload, the routing order+ they configure, the fields they place, the recipients they invite, and+ the legal sufficiency of the resulting process. You must have the+ rights and permissions needed to upload the document and request+ signatures from each recipient.+ </p>+ <p>+ You are responsible for maintaining accurate signer contact+ information, avoiding misleading or deceptive envelopes, and making+ sure that any required notices, disclosures, or offline procedures are+ handled outside SignuDoc when needed.+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 5. Electronic signatures and records+ </h2>+ <p>+ For documents within SignuDoc's permitted scope, SignuDoc is+ designed to support standard electronic signatures and records used in+ the United States under laws such as the Electronic Signatures in+ Global and National Commerce Act (E-SIGN) and state electronic+ transactions laws such as UETA, where applicable.+ </p>+ <p>+ SignuDoc does not provide qualified electronic signatures under eIDAS+ and does not promise that a SignuDoc workflow will satisfy any+ country-specific trust-service, certificate, identity-proofing, or+ notarization regime outside the ordinary U.S. electronic-signature+ context.+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 6. Account security and acceptable use+ </h2>+ <p>+ You are responsible for safeguarding your credentials, restricting+ access to your account, and promptly notifying SignuDoc if you suspect+ unauthorized use. You may not use SignuDoc to break the law, infringe+ rights, transmit malware, harass recipients, scrape data, interfere+ with service operation, or attempt to bypass access controls or rate+ limits.+ </p>+ <p>+ You may not use SignuDoc to impersonate another person, to collect+ signatures through deception, or to send spam or bulk messages that do+ not relate to an actual signing workflow.+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 7. Service changes, availability, and records+ </h2>+ <p>+ SignuDoc may change, improve, suspend, or discontinue features at any+ time. We may introduce limits on document size, signer count, storage,+ or retention as the service evolves. We may also remove content or+ suspend accounts that appear to violate these Terms or create legal,+ operational, or security risk.+ </p>+ <p>+ You should download and retain your own copies of important completed+ documents. SignuDoc's hosted document storage is a convenience+ feature and is subject to the retention and deletion practices+ described in the Privacy Policy.+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 8. Intellectual property and your content+ </h2>+ <p>+ As between you and SignuDoc, you retain ownership of the documents and+ data you upload, subject to the rights needed for SignuDoc and its+ service providers to host, process, transmit, display, secure, and+ store that content to operate the service.+ </p>+ <p>+ SignuDoc and its branding, software, interface, and related materials+ are protected by applicable intellectual-property laws. Except as+ expressly allowed by law, you may not copy, resell, reverse engineer,+ or create derivative works from the service.+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 9. Suspension, termination, and account closure+ </h2>+ <p>+ You may stop using the service at any time. SignuDoc may suspend or+ terminate access if we reasonably believe that you violated these+ Terms, used the service outside its permitted scope, or created+ security, fraud, or legal risk.+ </p>+ <p>+ Account-closure requests may be submitted through the settings page or+ by contacting{" "}+ <Link+ className="font-semibold text-(--fg) underline decoration-[rgba(17,17,17,0.24)] underline-offset-4"+ href={`mailto:${supportAddress}`}+ >+ {supportAddress}+ </Link>+ . Before closing your account, download any documents you want to+ keep. After closure, SignuDoc may provide a limited export window and+ then delete stored document files and related envelope records, except+ limited information kept for security, fraud prevention, legal+ compliance, or dispute resolution.+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 10. Disclaimers+ </h2>+ <p>+ SignuDoc is provided on an "as is" and "as+ available" basis to the maximum extent permitted by law. SignuDoc+ disclaims all warranties, whether express, implied, statutory, or+ otherwise, including implied warranties of merchantability, fitness+ for a particular purpose, title, noninfringement, accuracy,+ uninterrupted availability, and legal sufficiency for any specific+ transaction.+ </p>+ <p>+ SignuDoc does not warrant that a particular workflow will be valid in+ court, accepted by a regulator, or appropriate for a regulated or+ excluded document type. You should obtain legal advice for questions+ about document enforceability, retention, consumer disclosures,+ notarization, or jurisdiction-specific requirements.+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 11. Limitation of liability+ </h2>+ <p>+ To the maximum extent permitted by law, SignuDoc and its affiliates,+ service providers, licensors, and personnel will not be liable for any+ indirect, incidental, special, consequential, exemplary, or punitive+ damages, or for any loss of profits, revenue, goodwill, data, or use,+ arising out of or relating to the service or these Terms.+ </p>+ <p>+ To the maximum extent permitted by law, the aggregate liability of+ SignuDoc for all claims arising out of or relating to the service or+ these Terms will not exceed the greater of the amount you paid+ SignuDoc for the service during the 12 months before the event giving+ rise to the claim or one hundred U.S. dollars (US$100).+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 12. Indemnification+ </h2>+ <p>+ You will defend, indemnify, and hold harmless SignuDoc and its+ affiliates, service providers, licensors, and personnel from and+ against claims, losses, damages, liabilities, costs, and expenses+ (including reasonable attorneys' fees) arising out of or relating+ to your documents, your use of the service, your breach of these+ Terms, or your violation of law or the rights of another person.+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 13. Governing law and changes+ </h2>+ <p>+ Except where applicable law requires otherwise, these Terms are+ governed by applicable U.S. federal law and the law of the state in+ which the SignuDoc operator is organized, without regard to+ conflict-of-law rules. You and SignuDoc agree to the exclusive venue+ of the state or federal courts serving that location for disputes that+ may be brought in court.+ </p>+ <p>+ SignuDoc may update these Terms from time to time by posting a revised+ version on this page. The updated Terms will apply when posted unless+ a later effective date is stated.+ </p>+ </section>++ <section className="space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ 14. Contact+ </h2>+ <p>+ Questions about these Terms may be sent to{" "}+ <Link+ className="font-semibold text-(--fg) underline decoration-[rgba(17,17,17,0.24)] underline-offset-4"+ href={`mailto:${supportAddress}`}+ >+ {supportAddress}+ </Link>{" "}+ or through the{" "}+ <Link+ className="font-semibold text-(--fg) underline decoration-[rgba(17,17,17,0.24)] underline-offset-4"+ href="/contact"+ >+ Contact+ </Link>{" "}+ page.+ </p>+ </section>+ </PublicDocumentShell>+ );+}diff --git a/src/assets/fonts/GreatVibes-Regular.ttf b/src/assets/fonts/GreatVibes-Regular.ttfnew file mode 100644index 0000000..a1327ffBinary files /dev/null and b/src/assets/fonts/GreatVibes-Regular.ttf differdiff --git a/src/assets/fonts/LICENSE-OFL.txt b/src/assets/fonts/LICENSE-OFL.txtnew file mode 100644index 0000000..dcc913d--- /dev/null+++ b/src/assets/fonts/LICENSE-OFL.txt@@ -0,0 +1,93 @@+Copyright 2010 The Great Vibes Pro Project Authors (https://github.com/googlefonts/great-vibes)++This Font Software is licensed under the SIL Open Font License, Version 1.1.+This license is copied below, and is also available with a FAQ at:+http://scripts.sil.org/OFL+++-----------------------------------------------------------+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007+-----------------------------------------------------------++PREAMBLE+The goals of the Open Font License (OFL) are to stimulate worldwide+development of collaborative font projects, to support the font creation+efforts of academic and linguistic communities, and to provide a free and+open framework in which fonts may be shared and improved in partnership+with others.++The OFL allows the licensed fonts to be used, studied, modified and+redistributed freely as long as they are not sold by themselves. The+fonts, including any derivative works, can be bundled, embedded,+redistributed and/or sold with any software provided that any reserved+names are not used by derivative works. The fonts and derivatives,+however, cannot be released under any other type of license. The+requirement for fonts to remain under this license does not apply+to any document created using the fonts or their derivatives.++DEFINITIONS+"Font Software" refers to the set of files released by the Copyright+Holder(s) under this license and clearly marked as such. This may+include source files, build scripts and documentation.++"Reserved Font Name" refers to any names specified as such after the+copyright statement(s).++"Original Version" refers to the collection of Font Software components as+distributed by the Copyright Holder(s).++"Modified Version" refers to any derivative made by adding to, deleting,+or substituting -- in part or in whole -- any of the components of the+Original Version, by changing formats or by porting the Font Software to a+new environment.++"Author" refers to any designer, engineer, programmer, technical+writer or other person who contributed to the Font Software.++PERMISSION & CONDITIONS+Permission is hereby granted, free of charge, to any person obtaining+a copy of the Font Software, to use, study, copy, merge, embed, modify,+redistribute, and sell modified and unmodified copies of the Font+Software, subject to the following conditions:++1) Neither the Font Software nor any of its individual components,+in Original or Modified Versions, may be sold by itself.++2) Original or Modified Versions of the Font Software may be bundled,+redistributed and/or sold with any software, provided that each copy+contains the above copyright notice and this license. These can be+included either as stand-alone text files, human-readable headers or+in the appropriate machine-readable metadata fields within text or+binary files as long as those fields can be easily viewed by the user.++3) No Modified Version of the Font Software may use the Reserved Font+Name(s) unless explicit written permission is granted by the corresponding+Copyright Holder. This restriction only applies to the primary font name as+presented to the users.++4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font+Software shall not be used to promote, endorse or advertise any+Modified Version, except to acknowledge the contribution(s) of the+Copyright Holder(s) and the Author(s) or with their explicit written+permission.++5) The Font Software, modified or unmodified, in part or in whole,+must be distributed entirely under this license, and must not be+distributed under any other license. The requirement for fonts to+remain under this license does not apply to any document created+using the Font Software.++TERMINATION+This license becomes null and void if any of the above conditions are+not met.++DISCLAIMER+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM+OTHER DEALINGS IN THE FONT SOFTWARE.diff --git a/src/components/auth/login-shell.tsx b/src/components/auth/login-shell.tsxnew file mode 100644index 0000000..f9c16f0--- /dev/null+++ b/src/components/auth/login-shell.tsx@@ -0,0 +1,658 @@+"use client";++import Link from "next/link";+import { useState, type ChangeEvent, type FormEvent } from "react";++import { FieldShell, ShellButton } from "@/components/shared/form-shell";+import { authClient } from "@/lib/auth/client";+import { forgotPasswordSchema, loginSchema } from "@/lib/schemas/auth";+import {+ Dialog,+ DialogContent,+ DialogDescription,+ DialogHeader,+ DialogTitle,+} from "@/components/ui/dialog";++const verificationRequiredMessage =+ "Verify your email before logging in. Check your inbox for a fresh link.";++type AuthErrorLike = {+ message?: string;+};++type LoginFormValues = {+ email: string;+ password: string;+};++type ForgotPasswordFormValues = {+ email: string;+};++type LoginFormErrors = Partial<Record<keyof LoginFormValues, string>>;+type ForgotPasswordFormErrors = Partial<+ Record<keyof ForgotPasswordFormValues, string>+>;++type LoginShellProps = {+ resetError?: string | null;+ resetToken?: string | null;+};++type ForgotPasswordModel = {+ bannerMessage: string | null;+ errors: ForgotPasswordFormErrors;+ isOpen: boolean;+ isSubmitting: boolean;+ successMessage: string | null;+ values: ForgotPasswordFormValues;+};++function createLoginFormValues(): LoginFormValues {+ return {+ email: "",+ password: "",+ };+}++function createForgotPasswordValues(+ email: string,+ trim = false,+): ForgotPasswordFormValues {+ return {+ email: trim ? email.trim() : email,+ };+}++function createForgotPasswordModel(+ email: string,+ overrides: Partial<Omit<ForgotPasswordModel, "values">> = {},+): ForgotPasswordModel {+ return {+ bannerMessage: null,+ errors: {},+ isOpen: false,+ isSubmitting: false,+ successMessage: null,+ values: createForgotPasswordValues(email),+ ...overrides,+ };+}++function trimLoginValues(values: LoginFormValues): LoginFormValues {+ return {+ email: values.email.trim(),+ password: values.password,+ };+}++function trimForgotPasswordValues(+ values: ForgotPasswordFormValues,+): ForgotPasswordFormValues {+ return createForgotPasswordValues(values.email, true);+}++function normalizeAuthErrorMessage(+ error: AuthErrorLike | null | undefined,+): string {+ return error?.message?.trim().toLowerCase() ?? "";+}++export function LoginShell({+ resetError = null,+ resetToken = null,+}: LoginShellProps) {+ return <LiveLoginShell resetError={resetError} resetToken={resetToken} />;+}++function LiveLoginShell({+ resetError = null,+ resetToken = null,+}: LoginShellProps) {+ const [values, setValues] = useState<LoginFormValues>(+ createLoginFormValues(),+ );+ const [errors, setErrors] = useState<LoginFormErrors>({});+ const [bannerMessage, setBannerMessage] = useState<string | null>(+ resetError === "INVALID_TOKEN"+ ? "This reset link is invalid or has expired."+ : null,+ );+ const [isSubmitting, setIsSubmitting] = useState(false);+ const [forgotPassword, setForgotPassword] = useState<ForgotPasswordModel>(+ createForgotPasswordModel(""),+ );+ const [isResendingVerification, setIsResendingVerification] = useState(false);+ const [showResendVerification, setShowResendVerification] = useState(false);++ function handleChange(field: keyof LoginFormValues) {+ return (event: ChangeEvent<HTMLInputElement>) => {+ const nextValue = event.target.value;++ setValues((currentValues) => ({+ ...currentValues,+ [field]: nextValue,+ }));+ setErrors((currentErrors) => ({+ ...currentErrors,+ [field]: undefined,+ }));+ setBannerMessage(null);+ setShowResendVerification(false);+ };+ }++ function openForgotPasswordModal() {+ setForgotPassword(+ createForgotPasswordModel(values.email.trim(), { isOpen: true }),+ );+ }++ function closeForgotPasswordModal() {+ if (forgotPassword.isSubmitting) {+ return;+ }++ setForgotPassword(createForgotPasswordModel(values.email.trim()));+ }++ function handleForgotPasswordChange(event: ChangeEvent<HTMLInputElement>) {+ const nextValue = event.target.value;++ setForgotPassword((currentForgotPassword) => ({+ ...currentForgotPassword,+ bannerMessage: null,+ errors: {+ ...currentForgotPassword.errors,+ email: undefined,+ },+ successMessage: null,+ values: createForgotPasswordValues(nextValue),+ }));+ }++ async function handleSubmit(event: FormEvent<HTMLFormElement>) {+ event.preventDefault();++ if (isSubmitting) {+ return;+ }++ const formData = new FormData(event.currentTarget);+ const trimmedValues = trimLoginValues({+ email: String(formData.get("login-email") ?? values.email),+ password: String(formData.get("login-password") ?? values.password),+ });+ const validationResult = loginSchema.safeParse(trimmedValues);++ if (!validationResult.success) {+ const nextErrors: LoginFormErrors = {};++ for (const issue of validationResult.error.issues) {+ const field = issue.path[0];++ if (field === "email") {+ nextErrors.email = "Enter a valid email address";+ }++ if (field === "password") {+ nextErrors.password = "Enter your password";+ }+ }++ setValues(trimmedValues);+ setErrors(nextErrors);+ setBannerMessage(null);+ return;+ }++ setValues(validationResult.data);+ setErrors({});+ setBannerMessage(null);+ setShowResendVerification(false);+ setIsSubmitting(true);++ const result = await authClient.signIn.email({+ callbackURL: `${window.location.origin}/dashboard`,+ email: validationResult.data.email,+ password: validationResult.data.password,+ });++ if (result.error) {+ const normalizedErrorMessage = normalizeAuthErrorMessage(result.error);++ if (normalizedErrorMessage.includes("email not verified")) {+ setBannerMessage(verificationRequiredMessage);+ setShowResendVerification(true);+ } else {+ setBannerMessage(+ normalizedErrorMessage.includes("invalid email or password")+ ? "Invalid email or password. Please try again."+ : "Something went wrong. Please try again.",+ );+ }+ setIsSubmitting(false);+ return;+ }++ window.location.assign("/dashboard");+ }++ async function handleForgotPasswordSubmit(event: FormEvent<HTMLFormElement>) {+ event.preventDefault();++ if (forgotPassword.isSubmitting) {+ return;+ }++ const formData = new FormData(event.currentTarget);+ const trimmedValues = trimForgotPasswordValues({+ email: String(+ formData.get("forgot-password-email") ?? forgotPassword.values.email,+ ),+ });+ const validationResult = forgotPasswordSchema.safeParse(trimmedValues);++ if (!validationResult.success) {+ setForgotPassword((currentForgotPassword) => ({+ ...currentForgotPassword,+ bannerMessage: null,+ errors: {+ email: "Enter a valid email address",+ },+ successMessage: null,+ values: trimmedValues,+ }));+ return;+ }++ setForgotPassword((currentForgotPassword) => ({+ ...currentForgotPassword,+ bannerMessage: null,+ errors: {},+ isSubmitting: true,+ successMessage: null,+ values: validationResult.data,+ }));++ const result = await authClient.requestPasswordReset({+ email: validationResult.data.email,+ redirectTo: `${window.location.origin}/login`,+ });++ setForgotPassword((currentForgotPassword) => ({+ ...currentForgotPassword,+ bannerMessage: result.error+ ? "We couldn't send the reset link. Please try again."+ : null,+ errors: {},+ isSubmitting: false,+ successMessage: result.error+ ? null+ : "Check your email for a reset link.",+ }));+ }++ async function handleResendVerification() {+ const email = values.email.trim();++ if (!email || isResendingVerification) {+ return;+ }++ setIsResendingVerification(true);++ try {+ const response = await fetch("/api/auth/send-verification-email", {+ body: JSON.stringify({+ callbackURL: `${window.location.origin}/dashboard`,+ email,+ }),+ headers: {+ "content-type": "application/json",+ },+ method: "POST",+ });++ if (!response.ok) {+ setBannerMessage("We couldn't resend the verification email.");+ return;+ }++ setBannerMessage("Verification email sent. Check your inbox.");+ } catch {+ setBannerMessage("We couldn't resend the verification email.");+ } finally {+ setIsResendingVerification(false);+ }+ }++ if (resetToken) {+ return <ResetPasswordCard resetToken={resetToken} />;+ }++ const formLocked = isSubmitting;+ const forgotPasswordLocked = forgotPassword.isSubmitting;++ return (+ <>+ <section className="editorial-panel w-full max-w-[460px] p-8 sm:p-10">+ <div className="space-y-7">+ <div className="space-y-2">+ <p className="section-eyebrow">Log in</p>+ <h1 className="text-[clamp(2.2rem,5vw,3rem)] font-extrabold leading-[1.02] tracking-[-0.045em] text-black">+ Welcome back+ </h1>+ </div>++ {bannerMessage ? (+ <p+ className="rounded-[22px] border border-[rgba(180,35,53,0.16)] bg-[rgba(180,35,53,0.06)] px-4 py-3 text-sm font-medium text-(--accent)"+ role="alert"+ >+ {bannerMessage}+ </p>+ ) : null}++ <form className="space-y-5" noValidate onSubmit={handleSubmit}>+ <FieldShell+ autoComplete="email"+ disabled={formLocked}+ error={errors.email}+ label="Email"+ name="login-email"+ onChange={handleChange("email")}+ placeholder="[email protected]"+ readOnly={formLocked}+ type="email"+ value={values.email}+ />+ <FieldShell+ autoComplete="current-password"+ disabled={formLocked}+ error={errors.password}+ label="Password"+ name="login-password"+ onChange={handleChange("password")}+ readOnly={formLocked}+ type="password"+ value={values.password}+ />+ <ShellButton+ className="w-full"+ disabled={formLocked}+ loading={isSubmitting}+ type="submit"+ >+ {isSubmitting ? "Logging in..." : "Log in"}+ </ShellButton>+ {showResendVerification ? (+ <ShellButton+ className="w-full"+ disabled={formLocked}+ loading={isResendingVerification}+ onClick={handleResendVerification}+ type="button"+ variant="secondary"+ >+ {isResendingVerification+ ? "Sending..."+ : "Resend verification email"}+ </ShellButton>+ ) : null}+ </form>++ <div className="flex flex-col gap-3 border-t border-(--border) pt-5 text-sm text-muted-foreground">+ <button+ className="w-fit p-0 text-left font-medium text-(--fg) transition hover:text-(--accent)"+ onClick={openForgotPasswordModal}+ type="button"+ >+ Forgot your password?+ </button>+ <p>+ Don't have an account?{" "}+ <Link+ className="font-semibold text-(--fg) transition hover:text-(--accent)"+ href="/signup"+ >+ Sign up+ </Link>+ </p>+ </div>+ </div>+ </section>++ <ForgotPasswordDialog+ bannerMessage={forgotPassword.bannerMessage}+ email={forgotPassword.values.email}+ emailError={forgotPassword.errors.email}+ isOpen={forgotPassword.isOpen}+ isSubmitting={forgotPasswordLocked}+ onClose={closeForgotPasswordModal}+ onEmailChange={handleForgotPasswordChange}+ onSubmit={handleForgotPasswordSubmit}+ successMessage={forgotPassword.successMessage}+ />+ </>+ );+}++type ForgotPasswordDialogProps = {+ bannerMessage: string | null;+ email: string;+ emailError?: string;+ isOpen: boolean;+ isSubmitting: boolean;+ onClose: () => void;+ onEmailChange: (event: ChangeEvent<HTMLInputElement>) => void;+ onSubmit: (event: FormEvent<HTMLFormElement>) => void | Promise<void>;+ successMessage: string | null;+};++function ForgotPasswordDialog({+ bannerMessage,+ email,+ emailError,+ isOpen,+ isSubmitting,+ onClose,+ onEmailChange,+ onSubmit,+ successMessage,+}: ForgotPasswordDialogProps) {+ return (+ <Dialog+ open={isOpen}+ onOpenChange={(open) => {+ if (!open && !isSubmitting) {+ onClose();+ }+ }}+ >+ <DialogContent+ className="max-w-[560px] rounded-none border-(--border) sm:p-8"+ showCloseButton={false}+ >+ <div className="space-y-6">+ <DialogHeader className="space-y-3">+ <DialogTitle>Reset your password</DialogTitle>+ <DialogDescription className="max-w-[40ch]">+ Enter the email address associated with your account and+ we'll send you a reset link.+ </DialogDescription>+ </DialogHeader>++ {bannerMessage ? (+ <p+ className="rounded-[22px] border border-[rgba(180,35,53,0.16)] bg-[rgba(180,35,53,0.06)] px-4 py-3 text-sm font-medium text-(--accent)"+ role="alert"+ >+ {bannerMessage}+ </p>+ ) : null}++ {successMessage ? (+ <p+ className="rounded-[22px] border border-[rgba(5,150,105,0.18)] bg-[rgba(5,150,105,0.08)] px-4 py-3 text-sm font-medium text-(--fg)"+ role="status"+ >+ {successMessage}+ </p>+ ) : null}++ <form className="space-y-6" noValidate onSubmit={onSubmit}>+ <FieldShell+ autoComplete="email"+ disabled={isSubmitting}+ error={emailError}+ label="Email"+ name="forgot-password-email"+ onChange={onEmailChange}+ placeholder="[email protected]"+ readOnly={isSubmitting}+ type="email"+ value={email}+ />++ <div className="flex flex-col-reverse gap-3 sm:flex-row sm:justify-end">+ <ShellButton+ disabled={isSubmitting}+ onClick={onClose}+ type="button"+ variant="secondary"+ >+ Cancel+ </ShellButton>+ <ShellButton+ disabled={isSubmitting}+ loading={isSubmitting}+ type="submit"+ >+ {isSubmitting ? "Sending..." : "Send reset link"}+ </ShellButton>+ </div>+ </form>+ </div>+ </DialogContent>+ </Dialog>+ );+}++function ResetPasswordCard({ resetToken }: { resetToken: string }) {+ const [password, setPassword] = useState("");+ const [error, setError] = useState<string | null>(null);+ const [successMessage, setSuccessMessage] = useState<string | null>(null);+ const [isSubmitting, setIsSubmitting] = useState(false);++ async function handleSubmit(event: FormEvent<HTMLFormElement>) {+ event.preventDefault();++ if (isSubmitting) {+ return;+ }++ const formData = new FormData(event.currentTarget);+ const trimmedPassword = String(+ formData.get("reset-password") ?? password,+ ).trim();++ if (trimmedPassword.length < 15) {+ setError("Password must be at least 15 characters");+ setSuccessMessage(null);+ return;+ }++ setPassword(trimmedPassword);+ setError(null);+ setSuccessMessage(null);+ setIsSubmitting(true);++ const result = await authClient.resetPassword({+ newPassword: trimmedPassword,+ token: resetToken,+ });++ if (result.error) {+ const normalizedErrorMessage = normalizeAuthErrorMessage(result.error);++ setError(+ normalizedErrorMessage.includes("invalid token")+ ? "This reset link is invalid or has expired."+ : normalizedErrorMessage.includes("password too short")+ ? "Password must be at least 15 characters"+ : normalizedErrorMessage.includes("compromised")+ ? "Choose a password that hasn't appeared in a breach"+ : "Something went wrong. Please try again.",+ );+ setIsSubmitting(false);+ return;+ }++ setSuccessMessage(+ "Your password has been reset. Log in with your new password.",+ );+ setIsSubmitting(false);+ }++ const formLocked = isSubmitting;++ return (+ <section className="editorial-panel w-full max-w-[440px] p-8 sm:p-10">+ <div className="space-y-8">+ <div className="space-y-2">+ <p className="section-eyebrow">Reset password</p>+ <h1 className="text-[clamp(2.1rem,5vw,2.8rem)] font-extrabold leading-[1.02] tracking-[-0.045em] text-black">+ Create a new password+ </h1>+ </div>++ {error ? (+ <p+ className="rounded-[22px] border border-[rgba(255,0,51,0.16)] bg-[rgba(255,0,51,0.06)] px-4 py-3 text-sm font-medium text-(--accent)"+ role="alert"+ >+ {error}+ </p>+ ) : null}++ {successMessage ? (+ <p+ className="rounded-[22px] border border-[rgba(5,150,105,0.18)] bg-[rgba(5,150,105,0.08)] px-4 py-3 text-sm font-medium text-(--fg)"+ role="status"+ >+ {successMessage}+ </p>+ ) : null}++ <form className="space-y-5" noValidate onSubmit={handleSubmit}>+ <FieldShell+ autoComplete="new-password"+ disabled={formLocked}+ error={error ?? undefined}+ helper="Must be at least 15 characters"+ label="New password"+ name="reset-password"+ onChange={(event) => {+ setPassword(event.target.value);+ setError(null);+ setSuccessMessage(null);+ }}+ readOnly={formLocked}+ type="password"+ value={password}+ />+ <ShellButton+ className="w-full"+ disabled={formLocked}+ loading={isSubmitting}+ type="submit"+ >+ {isSubmitting ? "Updating password..." : "Update password"}+ </ShellButton>+ </form>+ </div>+ </section>+ );+}diff --git a/src/components/auth/signup-shell.tsx b/src/components/auth/signup-shell.tsxnew file mode 100644index 0000000..0115bf8--- /dev/null+++ b/src/components/auth/signup-shell.tsx@@ -0,0 +1,370 @@+"use client";++import Link from "next/link";+import {+ useState,+ type ChangeEvent,+ type ChangeEventHandler,+ type FormEvent,+} from "react";++import { FieldShell, ShellButton } from "@/components/shared/form-shell";+import { authClient } from "@/lib/auth/client";+import { signUpSchema } from "@/lib/schemas/auth";++const defaultSuccessMessage = "Check your email to verify your sender account.";++type AuthErrorLike = {+ message?: string;+};++type SignupFormValues = {+ email: string;+ fullName: string;+ password: string;+};++type SignupFormErrors = Partial<Record<keyof SignupFormValues, string>>;++function createSignupFormValues(): SignupFormValues {+ return {+ email: "",+ fullName: "",+ password: "",+ };+}++function trimFormValues(values: SignupFormValues): SignupFormValues {+ return {+ email: values.email.trim(),+ fullName: values.fullName.trim(),+ password: values.password,+ };+}++function normalizeAuthErrorMessage(+ error: AuthErrorLike | null | undefined,+): string {+ return error?.message?.trim().toLowerCase() ?? "";+}++type SignupFormCardProps = {+ bannerMessage: string | null;+ errors: SignupFormErrors;+ formLocked: boolean;+ isResendingVerification?: boolean;+ isSubmitting: boolean;+ onEmailChange: ChangeEventHandler<HTMLInputElement>;+ onFullNameChange: ChangeEventHandler<HTMLInputElement>;+ onPasswordChange: ChangeEventHandler<HTMLInputElement>;+ onResendVerification?: () => void | Promise<void>;+ onSubmit: (event: FormEvent<HTMLFormElement>) => void | Promise<void>;+ showSuccess: boolean;+ successMessage: string | null;+ values: SignupFormValues;+};++function SignupFormCard({+ bannerMessage,+ errors,+ formLocked,+ isResendingVerification = false,+ isSubmitting,+ onEmailChange,+ onFullNameChange,+ onPasswordChange,+ onResendVerification,+ onSubmit,+ showSuccess,+ successMessage,+ values,+}: SignupFormCardProps) {+ return (+ <section className="editorial-panel w-full max-w-[460px] p-8 sm:p-10">+ <div className="space-y-7">+ <div className="space-y-2">+ <p className="section-eyebrow">Create account</p>+ <h1 className="text-[clamp(2.2rem,5vw,3rem)] font-extrabold leading-[1.02] tracking-[-0.045em] text-black">+ Create your account+ </h1>+ </div>++ {bannerMessage ? (+ <p+ className="rounded-[22px] border border-[rgba(180,35,53,0.16)] bg-[rgba(180,35,53,0.06)] px-4 py-3 text-sm font-medium text-(--accent)"+ role="alert"+ >+ {bannerMessage}+ </p>+ ) : null}++ {showSuccess ? (+ <div+ aria-live="polite"+ className="rounded-[24px] border border-[rgba(5,150,105,0.18)] bg-[rgba(5,150,105,0.08)] px-5 py-4"+ >+ <p className="text-sm font-semibold text-(--fg)">+ {successMessage ?? defaultSuccessMessage}+ </p>+ </div>+ ) : null}++ <form className="space-y-5" noValidate onSubmit={onSubmit}>+ <FieldShell+ autoComplete="name"+ disabled={formLocked}+ error={errors.fullName}+ label="Full name"+ name="signup-full-name"+ onChange={onFullNameChange}+ placeholder="Jane Smith"+ readOnly={formLocked}+ value={values.fullName}+ />+ <FieldShell+ autoComplete="email"+ disabled={formLocked}+ error={errors.email}+ label="Email"+ name="signup-email"+ onChange={onEmailChange}+ placeholder="[email protected]"+ readOnly={formLocked}+ type="email"+ value={values.email}+ />+ <FieldShell+ autoComplete="new-password"+ disabled={formLocked}+ error={errors.password}+ helper="Must be at least 15 characters"+ label="Password"+ name="signup-password"+ onChange={onPasswordChange}+ placeholder="Enter a password"+ readOnly={formLocked}+ type="password"+ value={values.password}+ />++ {showSuccess ? (+ <div className="flex flex-col gap-3">+ <ShellButton className="w-full" href="/login" variant="primary">+ Go to log in+ </ShellButton>+ {onResendVerification ? (+ <ShellButton+ className="w-full"+ disabled={formLocked}+ loading={isResendingVerification}+ onClick={onResendVerification}+ type="button"+ variant="secondary"+ >+ {isResendingVerification+ ? "Sending..."+ : "Resend verification email"}+ </ShellButton>+ ) : null}+ </div>+ ) : (+ <ShellButton+ className="w-full"+ disabled={formLocked}+ loading={isSubmitting}+ type="submit"+ variant="primary"+ >+ {isSubmitting ? "Creating account..." : "Sign up"}+ </ShellButton>+ )}+ </form>++ <div className="border-t border-(--border) pt-5 text-sm text-muted-foreground">+ Already have an account?{" "}+ <Link+ className="font-semibold text-(--fg) transition hover:text-(--accent)"+ href="/login"+ >+ Log in+ </Link>+ </div>+ </div>+ </section>+ );+}++export function SignupShell() {+ return <LiveSignupShell />;+}++function LiveSignupShell() {+ const [values, setValues] = useState<SignupFormValues>(+ createSignupFormValues(),+ );+ const [errors, setErrors] = useState<SignupFormErrors>({});+ const [bannerMessage, setBannerMessage] = useState<string | null>(null);+ const [isSubmitting, setIsSubmitting] = useState(false);+ const [isResendingVerification, setIsResendingVerification] = useState(false);+ const [showSuccess, setShowSuccess] = useState(false);+ const [successEmail, setSuccessEmail] = useState<string | null>(null);+ const [successMessage, setSuccessMessage] = useState<string | null>(null);++ function handleChange(field: keyof SignupFormValues) {+ return (event: ChangeEvent<HTMLInputElement>) => {+ const nextValue = event.target.value;++ setValues((currentValues) => ({+ ...currentValues,+ [field]: nextValue,+ }));++ setErrors((currentErrors) => ({+ ...currentErrors,+ [field]: undefined,+ }));+ setBannerMessage(null);+ setShowSuccess(false);+ setSuccessMessage(null);+ };+ }++ async function handleResendVerification() {+ if (!successEmail || isResendingVerification) {+ return;+ }++ setBannerMessage(null);+ setIsResendingVerification(true);++ try {+ const response = await fetch("/api/auth/send-verification-email", {+ body: JSON.stringify({+ callbackURL: `${window.location.origin}/dashboard`,+ email: successEmail,+ }),+ headers: {+ "content-type": "application/json",+ },+ method: "POST",+ });++ if (!response.ok) {+ setBannerMessage("We couldn't resend the verification email.");+ return;+ }++ setSuccessMessage("Verification email sent. Check your inbox.");+ } catch {+ setBannerMessage("We couldn't resend the verification email.");+ } finally {+ setIsResendingVerification(false);+ }+ }++ async function handleSubmit(event: FormEvent<HTMLFormElement>) {+ event.preventDefault();++ if (isSubmitting || isResendingVerification) {+ return;+ }++ const formData = new FormData(event.currentTarget);+ const trimmedValues = trimFormValues({+ email: String(formData.get("signup-email") ?? values.email),+ fullName: String(formData.get("signup-full-name") ?? values.fullName),+ password: String(formData.get("signup-password") ?? values.password),+ });+ const validationResult = signUpSchema.safeParse(trimmedValues);++ if (!validationResult.success) {+ const nextErrors: SignupFormErrors = {};++ for (const issue of validationResult.error.issues) {+ const field = issue.path[0];++ if (field === "email") {+ nextErrors.email = "Enter a valid email address";+ }++ if (field === "fullName") {+ nextErrors.fullName = "Enter your full name";+ }++ if (field === "password") {+ nextErrors.password = "Password must be at least 15 characters";+ }+ }++ setValues(trimmedValues);+ setErrors(nextErrors);+ setBannerMessage(null);+ setShowSuccess(false);+ setSuccessMessage(null);+ return;+ }++ setValues(validationResult.data);+ setErrors({});+ setBannerMessage(null);+ setShowSuccess(false);+ setSuccessMessage(null);+ setIsSubmitting(true);++ const result = await authClient.signUp.email({+ callbackURL: `${window.location.origin}/dashboard`,+ email: validationResult.data.email,+ name: validationResult.data.fullName,+ password: validationResult.data.password,+ });++ if (result.error) {+ const normalizedErrorMessage = normalizeAuthErrorMessage(result.error);++ if (+ normalizedErrorMessage.includes("user already exists") ||+ normalizedErrorMessage.includes("use another email")+ ) {+ setErrors({+ email: "This email is already registered",+ });+ } else if (normalizedErrorMessage.includes("password too short")) {+ setErrors({+ password: "Password must be at least 15 characters",+ });+ } else if (normalizedErrorMessage.includes("compromised")) {+ setErrors({+ password: "Choose a password that hasn't appeared in a breach",+ });+ } else {+ setBannerMessage("Something went wrong. Please try again.");+ }++ setIsSubmitting(false);+ return;+ }++ setSuccessEmail(validationResult.data.email);+ setSuccessMessage(defaultSuccessMessage);+ setShowSuccess(true);+ setIsSubmitting(false);+ }++ return (+ <SignupFormCard+ bannerMessage={bannerMessage}+ errors={errors}+ formLocked={isSubmitting || isResendingVerification}+ isResendingVerification={isResendingVerification}+ isSubmitting={isSubmitting}+ onEmailChange={handleChange("email")}+ onFullNameChange={handleChange("fullName")}+ onPasswordChange={handleChange("password")}+ onResendVerification={handleResendVerification}+ onSubmit={handleSubmit}+ showSuccess={showSuccess}+ successMessage={successMessage}+ values={values}+ />+ );+}diff --git a/src/components/contact/contact-form.tsx b/src/components/contact/contact-form.tsxnew file mode 100644index 0000000..5e89125--- /dev/null+++ b/src/components/contact/contact-form.tsx@@ -0,0 +1,259 @@+"use client";++import { useState, type ChangeEvent, type FormEvent } from "react";++import { FieldShell, ShellButton } from "@/components/shared/form-shell";+import {+ Field,+ FieldError,+ FieldLabel,+} from "@/components/ui/field";+import { Textarea } from "@/components/ui/textarea";+import { contactFormSchema } from "@/lib/schemas/contact";++type ContactFormValues = {+ company: string;+ email: string;+ message: string;+ name: string;+};++type ContactFormErrors = Partial<+ Record<Exclude<keyof ContactFormValues, "company">, string>+>;++type ContactApiPayload = {+ error?: string;+ fieldErrors?: Partial<Record<string, string>>;+} | null;++const defaultValues: ContactFormValues = {+ company: "",+ email: "",+ message: "",+ name: "",+};++function readApiErrorMessage(payload: ContactApiPayload): string {+ if (typeof payload?.error === "string" && payload.error.trim()) {+ return payload.error;+ }++ return "Something went wrong. Please try again.";+}++export function ContactForm() {+ const [values, setValues] = useState<ContactFormValues>(defaultValues);+ const [errors, setErrors] = useState<ContactFormErrors>({});+ const [isSubmitting, setIsSubmitting] = useState(false);+ const [submitError, setSubmitError] = useState<string | null>(null);+ const [successMessage, setSuccessMessage] = useState<string | null>(null);++ function handleChange(field: keyof ContactFormValues) {+ return (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {+ const nextValue = event.target.value;++ setValues((currentValues) => ({+ ...currentValues,+ [field]: nextValue,+ }));++ if (field !== "company") {+ setErrors((currentErrors) => ({+ ...currentErrors,+ [field]: undefined,+ }));+ }++ setSubmitError(null);+ setSuccessMessage(null);+ };+ }++ async function handleSubmit(event: FormEvent<HTMLFormElement>) {+ event.preventDefault();++ if (isSubmitting) {+ return;+ }++ const formData = new FormData(event.currentTarget);+ const submittedValues = {+ company: String(formData.get("company") ?? values.company),+ email: String(formData.get("contact-email") ?? values.email),+ message: String(formData.get("contact-message") ?? values.message),+ name: String(formData.get("contact-name") ?? values.name),+ };+ const validationResult = contactFormSchema.safeParse(submittedValues);++ if (!validationResult.success) {+ const nextErrors: ContactFormErrors = {};++ for (const issue of validationResult.error.issues) {+ const field = issue.path[0];++ if (field === "name") {+ nextErrors.name = "Enter your name";+ }++ if (field === "email") {+ nextErrors.email = "Enter a valid email address";+ }++ if (field === "message") {+ nextErrors.message =+ issue.code === "too_big"+ ? "Message must be 5000 characters or fewer"+ : "Enter a message";+ }+ }++ setValues(submittedValues);+ setErrors(nextErrors);+ setSubmitError(null);+ setSuccessMessage(null);+ return;+ }++ setValues(validationResult.data);+ setErrors({});+ setSubmitError(null);+ setSuccessMessage(null);+ setIsSubmitting(true);++ try {+ const response = await fetch("/api/contact", {+ body: JSON.stringify(validationResult.data),+ headers: {+ "content-type": "application/json",+ },+ method: "POST",+ });+ const payload = (await response+ .json()+ .catch(() => null)) as ContactApiPayload;++ if (!response.ok) {+ setErrors({+ email:+ typeof payload?.fieldErrors?.email === "string"+ ? payload.fieldErrors.email+ : undefined,+ message:+ typeof payload?.fieldErrors?.message === "string"+ ? payload.fieldErrors.message+ : undefined,+ name:+ typeof payload?.fieldErrors?.name === "string"+ ? payload.fieldErrors.name+ : undefined,+ });+ setSubmitError(readApiErrorMessage(payload));+ return;+ }++ setValues(defaultValues);+ setErrors({});+ setSuccessMessage(+ `Your message was sent. We’ll follow up at ${validationResult.data.email} if we need more detail.`,+ );+ } catch {+ setSubmitError("Something went wrong. Please try again.");+ } finally {+ setIsSubmitting(false);+ }+ }++ return (+ <section className="border border-(--border) bg-white p-6 sm:p-8">+ <form className="space-y-5" onSubmit={handleSubmit}>+ <div+ aria-hidden="true"+ className="pointer-events-none absolute -left-[10000px] top-auto h-px w-px overflow-hidden"+ >+ <label htmlFor="company">Company</label>+ <input+ autoComplete="off"+ id="company"+ name="company"+ onChange={handleChange("company")}+ tabIndex={-1}+ value={values.company}+ />+ </div>++ {successMessage ? (+ <div className="rounded-[24px] border border-[rgba(36,109,78,0.2)] bg-[rgba(36,109,78,0.08)] px-4 py-3 text-sm text-[rgb(36,109,78)]">+ {successMessage}+ </div>+ ) : null}++ {submitError ? (+ <div className="rounded-[24px] border border-[rgba(180,35,53,0.18)] bg-[rgba(180,35,53,0.08)] px-4 py-3 text-sm text-(--accent)">+ {submitError}+ </div>+ ) : null}++ <div className="grid gap-5 sm:grid-cols-2">+ <FieldShell+ autoComplete="name"+ disabled={isSubmitting}+ error={errors.name}+ label="Name"+ name="contact-name"+ onChange={handleChange("name")}+ placeholder="Your name"+ readOnly={false}+ value={values.name}+ />+ <FieldShell+ autoComplete="email"+ disabled={isSubmitting}+ error={errors.email}+ label="Email"+ name="contact-email"+ onChange={handleChange("email")}+ placeholder="[email protected]"+ readOnly={false}+ type="email"+ value={values.email}+ />+ </div>++ <Field className="gap-2 text-sm">+ <FieldLabel+ className="text-[0.84rem] font-semibold tracking-[-0.02em] text-(--fg)"+ htmlFor="contact-message"+ >+ Message+ </FieldLabel>+ <Textarea+ aria-describedby="contact-message-description"+ aria-invalid={errors.message ? true : undefined}+ className={errors.message ? "border-[rgba(180,35,53,0.36)]" : ""}+ disabled={isSubmitting}+ id="contact-message"+ name="contact-message"+ onChange={handleChange("message")}+ placeholder="Tell us what you need, and include any account email, sender name, document title, or link that helps us identify the request."+ value={values.message}+ />+ {errors.message ? (+ <FieldError+ className="text-xs font-semibold text-(--accent)"+ id="contact-message-description"+ >+ {errors.message}+ </FieldError>+ ) : null}+ </Field>++ <div className="flex border-t border-(--border) pt-5 sm:justify-end">+ <ShellButton loading={isSubmitting} type="submit">+ {isSubmitting ? "Sending..." : "Send message"}+ </ShellButton>+ </div>+ </form>+ </section>+ );+}diff --git a/src/components/dashboard/dashboard-documents-surface.tsx b/src/components/dashboard/dashboard-documents-surface.tsxnew file mode 100644index 0000000..0617c27--- /dev/null+++ b/src/components/dashboard/dashboard-documents-surface.tsx@@ -0,0 +1,328 @@+import Link from "next/link";+import type { ChangeEventHandler } from "react";++import { cn } from "@/lib/cn";+import type { DashboardEnvelopeListItem } from "@/lib/envelopes";+import { ShellButton, StaticShellButton } from "@/components/shared/form-shell";+import { PageHeader } from "@/components/shared/page-header";++export type DashboardShellState = "default" | "empty" | "error";++export type DashboardFilter =+ | "All"+ | "Draft"+ | "Sent"+ | "Completed"+ | "Declined"+ | "Voided";++type EnvelopeStatus = "draft" | "sent" | "completed" | "declined" | "voided";++export const filterOptions: readonly DashboardFilter[] = [+ "All",+ "Draft",+ "Sent",+ "Completed",+ "Declined",+ "Voided",+];++export const dashboardStatusFilterMap: Record<+ Exclude<DashboardFilter, "All">,+ EnvelopeStatus+> = {+ Completed: "completed",+ Declined: "declined",+ Draft: "draft",+ Sent: "sent",+ Voided: "voided",+};++const documentsDescription =+ "Track drafts, sent envelopes, and completed agreements in one place.";++const statusLabelMap: Record<EnvelopeStatus, string> = {+ completed: "Completed",+ declined: "Declined",+ draft: "Draft",+ sent: "Sent",+ voided: "Voided",+};++const statusBadgeClasses: Record<EnvelopeStatus, string> = {+ completed: "bg-[rgba(5,150,105,0.12)] text-chart-4",+ declined: "bg-[rgba(255,0,51,0.1)] text-(--accent)",+ draft: "bg-[rgba(17,17,17,0.06)] text-muted-foreground",+ sent: "bg-[rgba(37,99,235,0.12)] text-chart-1",+ voided: "bg-[rgba(17,17,17,0.06)] text-(--tertiary)",+};++type DashboardDocumentsHeaderProps = {+ interactive?: boolean;+};++type DashboardDocumentsPanelProps = {+ envelopes: readonly DashboardEnvelopeListItem[];+ filteredEnvelopes: readonly DashboardEnvelopeListItem[];+ interactive?: boolean;+ isError?: boolean;+ onFilterChange?: (filter: DashboardFilter) => void;+ onReset?: () => void;+ onRetry?: () => void;+ onSearchChange?: ChangeEventHandler<HTMLInputElement>;+ searchValue: string;+ selectedFilter: DashboardFilter;+};++type EnvelopeListProps = {+ envelopes: readonly DashboardEnvelopeListItem[];+ interactive: boolean;+};++type NoResultsStateProps = {+ interactive: boolean;+ onReset?: () => void;+};++type ErrorBannerProps = {+ interactive: boolean;+ onRetry?: () => void;+};++export function DashboardDocumentsHeader({+ interactive = true,+}: DashboardDocumentsHeaderProps) {+ return (+ <PageHeader+ action={+ interactive ? (+ <ShellButton href="/envelopes/new">New envelope</ShellButton>+ ) : (+ <StaticShellButton>New envelope</StaticShellButton>+ )+ }+ description={documentsDescription}+ eyebrow="Sender workspace"+ title="Documents"+ />+ );+}++export function DashboardDocumentsPanel({+ envelopes,+ filteredEnvelopes,+ interactive = true,+ isError = false,+ onFilterChange,+ onReset,+ onRetry,+ onSearchChange,+ searchValue,+ selectedFilter,+}: DashboardDocumentsPanelProps) {+ const hasSeededEnvelopes = envelopes.length > 0;++ return (+ <section+ className="editorial-panel overflow-hidden p-4 sm:p-6"+ data-animate="enter"+ data-animate-delay="1"+ >+ <div className="space-y-6">+ <div className="flex flex-col gap-4 border-b border-(--border) pb-5">+ <div className="flex flex-col gap-2 sm:flex-row sm:items-end sm:justify-between">+ <div>+ <p className="section-eyebrow">Filter documents</p>+ <p className="mt-2 text-sm leading-6 text-muted-foreground">+ Search by title or signer email, then narrow by status.+ </p>+ </div>+ {!isError && hasSeededEnvelopes ? (+ <p className="text-sm text-muted-foreground">+ Showing {filteredEnvelopes.length} of {envelopes.length}{" "}+ envelopes+ </p>+ ) : null}+ </div>++ <input+ aria-label="Search by title or email..."+ className="min-h-12 w-full rounded-none border border-(--border) bg-white px-4 text-sm text-(--fg) outline-none placeholder:text-(--placeholder)"+ onChange={interactive ? onSearchChange : undefined}+ placeholder="Search by title or email..."+ readOnly={!interactive}+ tabIndex={interactive ? undefined : -1}+ type="search"+ value={searchValue}+ />++ <div className="flex flex-wrap gap-2">+ {filterOptions.map((filter) => {+ const isActive = filter === selectedFilter;+ const filterClassName = cn(+ "inline-flex min-h-10 items-center rounded-none border px-4 [font-family:var(--font-mono)] text-[0.72rem] font-semibold uppercase tracking-[0.18em] transition",+ isActive+ ? "border-(--accent) bg-(--accent) text-white"+ : "border-(--border) bg-white text-muted-foreground hover:border-black hover:bg-white hover:text-(--fg)",+ );++ if (!interactive) {+ return (+ <span+ aria-pressed={isActive}+ className={filterClassName}+ key={filter}+ >+ {filter}+ </span>+ );+ }++ return (+ <button+ aria-pressed={isActive}+ className={filterClassName}+ key={filter}+ onClick={() => onFilterChange?.(filter)}+ type="button"+ >+ {filter}+ </button>+ );+ })}+ </div>+ </div>++ {isError ? (+ <ErrorBanner interactive={interactive} onRetry={onRetry} />+ ) : null}++ {filteredEnvelopes.length > 0 ? (+ <EnvelopeList+ envelopes={filteredEnvelopes}+ interactive={interactive}+ />+ ) : hasSeededEnvelopes ? (+ <NoResultsState interactive={interactive} onReset={onReset} />+ ) : null}+ </div>+ </section>+ );+}++function ErrorBanner({ interactive, onRetry }: ErrorBannerProps) {+ return (+ <div+ className="flex flex-col gap-4 border border-[rgba(229,0,0,0.2)] bg-[#fff8f8] px-5 py-4 sm:flex-row sm:items-center sm:justify-between"+ role="alert"+ >+ <p className="text-sm font-medium text-(--fg)">+ We couldn't load your documents. Please try again.+ </p>+ {interactive ? (+ <ShellButton onClick={onRetry} variant="secondary">+ Retry+ </ShellButton>+ ) : (+ <StaticShellButton variant="secondary">Retry</StaticShellButton>+ )}+ </div>+ );+}++function EnvelopeList({ envelopes, interactive }: EnvelopeListProps) {+ return (+ <ul className="overflow-hidden border border-(--border) bg-white">+ {envelopes.map((envelope) => (+ <li+ className="border-b border-(--border) last:border-b-0"+ key={envelope.id}+ >+ <EnvelopeRow envelope={envelope} interactive={interactive} />+ </li>+ ))}+ </ul>+ );+}++function EnvelopeRow({+ envelope,+ interactive,+}: {+ envelope: DashboardEnvelopeListItem;+ interactive: boolean;+}) {+ const content = (+ <>+ <div className="space-y-2">+ <div className="flex flex-wrap items-start gap-3">+ <h2+ className={`text-lg font-semibold tracking-[-0.03em] ${+ envelope.status === "voided"+ ? "text-muted-foreground line-through"+ : "text-(--fg)"+ }`}+ >+ {envelope.title}+ </h2>+ </div>+ <p className="text-sm leading-6 text-muted-foreground">+ {envelope.contextLine}+ </p>+ <p className="text-sm text-(--tertiary)">+ Created {envelope.createdAtLabel}+ </p>+ </div>++ <span+ aria-label={`Status: ${statusLabelMap[envelope.status]}`}+ className={`inline-flex min-h-10 items-center justify-center rounded-none px-4 [font-family:var(--font-mono)] text-[0.72rem] font-semibold uppercase tracking-[0.18em] ${statusBadgeClasses[envelope.status]}`}+ >+ {statusLabelMap[envelope.status]}+ </span>+ </>+ );++ if (!interactive) {+ return (+ <div className="grid gap-4 px-5 py-5 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start sm:px-6">+ {content}+ </div>+ );+ }++ return (+ <Link+ className="grid gap-4 px-5 py-5 transition hover:bg-[#f7f7f8] sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start sm:px-6"+ href={`/envelopes/${envelope.id}`}+ >+ {content}+ </Link>+ );+}++function NoResultsState({ interactive, onReset }: NoResultsStateProps) {+ return (+ <div className="border border-dashed border-(--border) bg-(--surface) px-6 py-10 text-center">+ <div className="mx-auto max-w-md space-y-3">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ No documents match your search+ </h2>+ <p className="text-sm leading-6 text-muted-foreground">+ Try a different title, signer email, or status filter.+ </p>+ <div className="flex justify-center">+ {interactive ? (+ <ShellButton onClick={onReset} variant="secondary">+ Reset filters+ </ShellButton>+ ) : (+ <StaticShellButton variant="secondary">+ Reset filters+ </StaticShellButton>+ )}+ </div>+ </div>+ </div>+ );+}diff --git a/src/components/dashboard/dashboard-shell.tsx b/src/components/dashboard/dashboard-shell.tsxnew file mode 100644index 0000000..03d548d--- /dev/null+++ b/src/components/dashboard/dashboard-shell.tsx@@ -0,0 +1,111 @@+"use client";++import { useState, type ChangeEvent } from "react";++import type { DashboardEnvelopeListItem } from "@/lib/envelopes";+import {+ DashboardDocumentsHeader,+ DashboardDocumentsPanel,+ dashboardStatusFilterMap,+ type DashboardFilter,+ type DashboardShellState,+} from "@/components/dashboard/dashboard-documents-surface";+import { ShellButton } from "@/components/shared/form-shell";++type DashboardShellProps = {+ envelopes?: readonly DashboardEnvelopeListItem[];+ initialState?: DashboardShellState;+};++export function DashboardShell({+ envelopes: providedEnvelopes,+ initialState = "default",+}: DashboardShellProps) {+ const [searchValue, setSearchValue] = useState("");+ const [selectedFilter, setSelectedFilter] = useState<DashboardFilter>("All");++ const envelopes =+ initialState === "empty"+ ? ([] as readonly DashboardEnvelopeListItem[])+ : (providedEnvelopes ?? []);+ const normalizedSearchValue = searchValue.trim().toLowerCase();+ const filteredEnvelopes = envelopes.filter((envelope) => {+ const matchesFilter =+ selectedFilter === "All"+ ? true+ : envelope.status === dashboardStatusFilterMap[selectedFilter];+ const matchesSearch =+ normalizedSearchValue.length === 0 ||+ envelope.title.toLowerCase().includes(normalizedSearchValue) ||+ envelope.searchableEmails.some((email) =>+ email.toLowerCase().includes(normalizedSearchValue),+ );++ return matchesFilter && matchesSearch;+ });+ const isError = initialState === "error";++ function handleSearchChange(event: ChangeEvent<HTMLInputElement>) {+ setSearchValue(event.target.value);+ }++ function handleFilterChange(filter: DashboardFilter) {+ setSelectedFilter(filter);+ }++ function handleResetFilters() {+ setSearchValue("");+ setSelectedFilter("All");+ }++ function handleRetry() {+ window.location.reload();+ }++ return (+ <div className="space-y-8">+ <DashboardDocumentsHeader />++ {initialState === "empty" ? (+ <EmptyDashboardState />+ ) : (+ <DashboardDocumentsPanel+ envelopes={envelopes}+ filteredEnvelopes={filteredEnvelopes}+ isError={isError}+ onFilterChange={handleFilterChange}+ onReset={handleResetFilters}+ onRetry={handleRetry}+ onSearchChange={handleSearchChange}+ searchValue={searchValue}+ selectedFilter={selectedFilter}+ />+ )}+ </div>+ );+}++function EmptyDashboardState() {+ return (+ <section+ className="editorial-panel p-6 sm:p-8"+ data-animate="enter"+ data-animate-delay="1"+ >+ <div className="mx-auto flex max-w-md flex-col items-center gap-5 border border-dashed border-(--border) bg-(--surface) px-8 py-12 text-center">+ <span className="inline-flex h-16 min-w-16 items-center justify-center border border-(--accent) bg-[#fff8f8] px-4 text-xs font-semibold uppercase tracking-[0.28em] text-(--accent)">+ </span>+ <div className="space-y-2">+ <h2 className="text-2xl font-semibold tracking-[-0.04em] text-(--fg)">+ No documents yet+ </h2>+ <p className="text-sm leading-6 text-muted-foreground">+ Upload a PDF and send it for signatures in minutes.+ </p>+ </div>+ <ShellButton href="/envelopes/new">+ New envelope</ShellButton>+ </div>+ </section>+ );+}diff --git a/src/components/envelopes/envelope-detail-shell.tsx b/src/components/envelopes/envelope-detail-shell.tsxnew file mode 100644index 0000000..ac86737--- /dev/null+++ b/src/components/envelopes/envelope-detail-shell.tsx@@ -0,0 +1,587 @@+"use client";++import Link from "next/link";+import { useState } from "react";++import { ShellButton } from "@/components/shared/form-shell";+import { StatusPanel } from "@/components/shared/status-panel";+import {+ Dialog,+ DialogContent,+ DialogDescription,+ DialogHeader,+ DialogTitle,+} from "@/components/ui/dialog";+import type {+ EnvelopeDetailData,+ EnvelopeDetailTimelineItem,+} from "@/lib/envelopes";+import { getSignerPalette } from "./signer-palette";++type EnvelopeDetailShellProps = {+ envelopeId: string;+ initialState?: "error" | "not-found";+ record?: EnvelopeDetailData;+};++type EnvelopeStatus = "draft" | "sent" | "completed" | "declined" | "voided";++type SignerStatus = "signed" | "waiting" | "declined" | "pending";++type TimelineTone = "accent" | "danger" | "neutral" | "success";+type DownloadFileType = "evidence" | "signed";++type EnvelopeDetailSigner = {+ color?: string;+ email: string;+ id: string;+ metaLabel: string;+ name: string;+ order: number;+ status: SignerStatus;+ statusDateLabel?: string;+ tint?: string;+};++type EnvelopeDetailRecord = {+ createdAtLabel: string;+ signers: readonly EnvelopeDetailSigner[];+ status: EnvelopeStatus;+ timeline: readonly EnvelopeDetailTimelineItem[];+ title: string;+};++type ModalState = "delete-draft" | "void-envelope" | null;++const statusBadgeClasses: Record<EnvelopeStatus, string> = {+ completed: "bg-[rgba(5,150,105,0.12)] text-chart-4",+ declined: "bg-[rgba(255,0,51,0.1)] text-(--accent)",+ draft: "bg-[rgba(17,17,17,0.06)] text-muted-foreground",+ sent: "bg-[rgba(37,99,235,0.12)] text-chart-1",+ voided: "bg-[rgba(17,17,17,0.08)] text-(--tertiary)",+};++const statusLabelMap: Record<EnvelopeStatus, string> = {+ completed: "Completed",+ declined: "Declined",+ draft: "Draft",+ sent: "Sent",+ voided: "Voided",+};++const signerStatusBadgeClasses: Record<SignerStatus, string> = {+ declined: "bg-[rgba(255,0,51,0.1)] text-(--accent)",+ pending: "bg-[rgba(17,17,17,0.06)] text-muted-foreground",+ signed: "bg-[rgba(5,150,105,0.12)] text-chart-4",+ waiting: "bg-[rgba(37,99,235,0.12)] text-chart-1",+};++const signerStatusLabelMap: Record<SignerStatus, string> = {+ declined: "✗ Declined",+ pending: "— Pending",+ signed: "✓ Signed",+ waiting: "◷ Waiting",+};++const timelineToneClasses: Record<TimelineTone, string> = {+ accent: "bg-(--accent)",+ danger: "bg-[rgba(255,0,51,0.7)]",+ neutral: "bg-(--border)",+ success: "bg-(--signer-4)",+};++export function EnvelopeDetailShell({+ envelopeId,+ initialState,+ record,+}: EnvelopeDetailShellProps) {+ const [activeModal, setActiveModal] = useState<ModalState>(null);+ const [actionError, setActionError] = useState<string | null>(null);+ const [isDeletingDraft, setIsDeletingDraft] = useState(false);+ const [isSendingReminder, setIsSendingReminder] = useState(false);+ const [isVoidingEnvelope, setIsVoidingEnvelope] = useState(false);++ function handleRetry() {+ window.location.reload();+ }++ if (initialState === "error") {+ return (+ <StatusPanel+ description="Couldn't load this envelope. Please try again."+ footer={+ <ShellButton onClick={handleRetry} variant="secondary">+ Retry+ </ShellButton>+ }+ title="Couldn't load this envelope"+ tone="error"+ />+ );+ }++ if (initialState === "not-found") {+ return (+ <StatusPanel+ action={{ href: "/dashboard", label: "Back to documents" }}+ description="We couldn't find this envelope, or you no longer have access to it."+ eyebrow="Unavailable"+ title="This envelope is unavailable"+ tone="error"+ />+ );+ }++ if (!record) {+ return (+ <StatusPanel+ description="Couldn't load this envelope. Please try again."+ footer={+ <ShellButton onClick={handleRetry} variant="secondary">+ Retry+ </ShellButton>+ }+ title="Couldn't load this envelope"+ tone="error"+ />+ );+ }++ const activeRecord: EnvelopeDetailRecord = {+ createdAtLabel: record.createdAtLabel,+ signers: record.signers,+ status: record.status,+ timeline: record.timeline,+ title: record.title,+ };+ const manualReminderState = record.manualReminder ?? null;+ const reminderLimited =+ activeRecord.status === "sent" &&+ manualReminderState !== null &&+ !manualReminderState.canSend;+ const reminderHelperText =+ activeRecord.status === "sent" && manualReminderState?.nextAvailableAtLabel+ ? `You can send another reminder after ${manualReminderState.nextAvailableAtLabel}.`+ : null;+ const activeSigner =+ activeRecord.status === "sent"+ ? activeRecord.signers.find((signer) => signer.status === "waiting")+ : null;++ function handleDownload(fileType: DownloadFileType) {+ window.location.assign(+ `/api/envelopes/${encodeURIComponent(envelopeId)}/download?type=${fileType}`,+ );+ }++ async function handleSendReminder() {+ if (!activeSigner) {+ return;+ }++ setActionError(null);+ setIsSendingReminder(true);++ try {+ const response = await fetch(`/api/envelopes/${envelopeId}/nudge`, {+ method: "POST",+ });+ const payload = (await response.json().catch(() => null)) as {+ error?: string;+ } | null;++ if (+ response.ok ||+ response.status === 404 ||+ response.status === 409 ||+ response.status === 429+ ) {+ window.location.reload();+ return;+ }++ setActionError(payload?.error ?? "Unable to send a reminder right now.");+ } finally {+ setIsSendingReminder(false);+ }+ }++ async function handleConfirmDeleteDraft() {+ setActionError(null);+ setIsDeletingDraft(true);++ try {+ const response = await fetch(`/api/envelopes/${envelopeId}`, {+ method: "DELETE",+ });+ const payload = (await response.json().catch(() => null)) as {+ error?: string;+ redirectPath?: string;+ } | null;++ if (!response.ok) {+ setActionError(payload?.error ?? "Unable to delete this draft.");+ return;+ }++ window.location.assign(payload?.redirectPath ?? "/dashboard");+ } finally {+ setIsDeletingDraft(false);+ }+ }++ async function handleConfirmVoidEnvelope() {+ setActionError(null);+ setIsVoidingEnvelope(true);++ try {+ const response = await fetch(`/api/envelopes/${envelopeId}/void`, {+ method: "POST",+ });+ const payload = (await response.json().catch(() => null)) as {+ error?: string;+ redirectPath?: string;+ } | null;++ if (response.ok) {+ window.location.assign(+ payload?.redirectPath ??+ `/envelopes/${encodeURIComponent(envelopeId)}`,+ );+ return;+ }++ if (response.status === 404 || response.status === 409) {+ window.location.reload();+ return;+ }++ setActionError(payload?.error ?? "Unable to void this envelope.");+ } finally {+ setIsVoidingEnvelope(false);+ }+ }++ return (+ <div className="space-y-8">+ <section className="editorial-panel p-6 sm:p-8" data-animate="enter">+ <Link+ className="inline-flex items-center text-sm font-semibold text-muted-foreground transition hover:text-(--fg)"+ href="/dashboard"+ >+ ← Documents+ </Link>++ <div className="mt-5 flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">+ <div className="space-y-2">+ <h1+ className={`text-[28px] font-semibold tracking-[-0.04em] ${+ activeRecord.status === "voided"+ ? "text-muted-foreground"+ : "text-(--fg)"+ }`}+ >+ {activeRecord.title}+ </h1>+ <p className="text-sm text-muted-foreground">+ Created {activeRecord.createdAtLabel}+ </p>+ </div>+ <span+ className={`inline-flex w-fit rounded-full px-4 py-2 text-sm font-semibold ${statusBadgeClasses[activeRecord.status]}`}+ >+ {statusLabelMap[activeRecord.status]}+ </span>+ </div>++ {actionError ? (+ <div+ className="mt-5 border border-[rgba(180,35,53,0.2)] bg-[rgba(180,35,53,0.05)] px-4 py-3 text-sm font-medium text-(--fg)"+ role="alert"+ >+ {actionError}+ </div>+ ) : null}+ </section>++ <section className="grid gap-6 lg:grid-cols-[minmax(0,0.92fr)_minmax(0,1.08fr)]">+ <article className="editorial-panel p-6 sm:p-8">+ <div className="flex items-center justify-between gap-3">+ <h2 className="text-lg font-semibold tracking-[-0.03em] text-(--fg)">+ Signers+ </h2>+ <span className="text-xs font-semibold uppercase tracking-[0.24em] text-(--tertiary)">+ {activeRecord.signers.length} total+ </span>+ </div>++ <ol className="mt-5 space-y-4">+ {activeRecord.signers.map((signer, index) => {+ const palette =+ signer.color && signer.tint+ ? { color: signer.color, tint: signer.tint }+ : getSignerPalette(index);++ return (+ <li+ className="border border-(--border) bg-(--surface) p-4"+ key={signer.id}+ >+ <div className="flex items-start gap-4">+ <span+ aria-hidden="true"+ className="inline-flex size-11 shrink-0 items-center justify-center rounded-full text-sm font-semibold"+ style={{+ backgroundColor: palette.tint,+ color: palette.color,+ }}+ >+ {signer.order}+ </span>++ <div className="min-w-0 flex-1">+ <div className="flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between">+ <div className="min-w-0">+ <p className="truncate text-base font-semibold text-(--fg)">+ {signer.name}+ </p>+ <p className="truncate text-sm text-muted-foreground">+ {signer.email}+ </p>+ </div>++ <div className="space-y-2 sm:text-right">+ <span+ className={`inline-flex rounded-none px-3 py-1 [font-family:var(--font-mono)] text-[0.72rem] font-semibold uppercase tracking-[0.18em] ${signerStatusBadgeClasses[signer.status]}`}+ >+ {signerStatusLabelMap[signer.status]}+ </span>+ {signer.statusDateLabel ? (+ <p className="text-xs text-(--tertiary)">+ {signer.statusDateLabel}+ </p>+ ) : null}+ </div>+ </div>++ <p className="mt-3 text-sm leading-6 text-muted-foreground">+ {signer.metaLabel}+ </p>+ </div>+ </div>+ </li>+ );+ })}+ </ol>+ </article>++ <article className="editorial-panel p-6 sm:p-8">+ <div className="flex items-center justify-between gap-3">+ <h2 className="text-lg font-semibold tracking-[-0.03em] text-(--fg)">+ Timeline+ </h2>+ <span className="text-xs font-semibold uppercase tracking-[0.24em] text-(--tertiary)">+ {activeRecord.timeline.length} events+ </span>+ </div>++ <ol className="mt-5 space-y-5">+ {activeRecord.timeline.map((event, index) => (+ <li className="relative pl-6" key={event.id}>+ <span+ aria-hidden="true"+ className={`absolute left-0 top-2.5 size-2.5 rounded-full ${timelineToneClasses[event.tone]}`}+ />+ {index < activeRecord.timeline.length - 1 ? (+ <span+ aria-hidden="true"+ className="absolute left-[4.5px] top-5 h-[calc(100%+0.875rem)] w-px bg-(--border)"+ />+ ) : null}+ <p className="text-sm font-semibold text-(--fg)">+ {event.timestamp}+ </p>+ <p className="mt-1 text-sm leading-6 text-muted-foreground">+ {event.description}+ </p>+ </li>+ ))}+ </ol>+ </article>+ </section>++ <section className="editorial-panel p-6 sm:p-8">+ <h2 className="text-lg font-semibold tracking-[-0.03em] text-(--fg)">+ Actions+ </h2>++ <div className="mt-5 flex flex-wrap gap-3">+ {activeRecord.status === "draft" ? (+ <>+ <ShellButton href={`/envelopes/${envelopeId}/prepare`}>+ Continue editing+ </ShellButton>+ <ShellButton+ onClick={() => setActiveModal("delete-draft")}+ variant="secondary"+ >+ Delete draft+ </ShellButton>+ </>+ ) : null}++ {activeRecord.status === "sent" ? (+ <>+ <ShellButton+ disabled={!activeSigner || reminderLimited}+ loading={isSendingReminder}+ onClick={handleSendReminder}+ >+ Send reminder+ </ShellButton>+ <ShellButton+ onClick={() => setActiveModal("void-envelope")}+ variant="secondary"+ >+ Void envelope+ </ShellButton>+ </>+ ) : null}++ {activeRecord.status === "completed" ? (+ <>+ <ShellButton onClick={() => handleDownload("signed")}>+ Download signed PDF+ </ShellButton>+ <ShellButton+ onClick={() => handleDownload("evidence")}+ variant="secondary"+ >+ Download certificate+ </ShellButton>+ </>+ ) : null}++ {activeRecord.status === "declined" ||+ activeRecord.status === "voided" ? (+ <ShellButton onClick={() => handleDownload("evidence")}>+ Download certificate+ </ShellButton>+ ) : null}+ </div>++ {reminderHelperText ? (+ <p className="mt-4 text-sm leading-6 text-muted-foreground">+ {reminderHelperText}+ </p>+ ) : null}+ </section>++ {activeModal === "delete-draft" ? (+ <ConfirmationDialog+ confirmLabel="Delete draft"+ description={[+ "This draft has not been sent yet.",+ "Deleting it will permanently remove the draft and its placed fields.",+ ]}+ errorMessage={actionError}+ onCancel={() => setActiveModal(null)}+ onConfirm={handleConfirmDeleteDraft}+ processing={isDeletingDraft}+ title="Delete this draft?"+ />+ ) : null}++ {activeModal === "void-envelope" ? (+ <ConfirmationDialog+ confirmLabel="Void envelope"+ description={[+ "This will cancel the signing process.",+ "Notified signers will be informed that the envelope has been voided.",+ "This action cannot be undone.",+ ]}+ errorMessage={actionError}+ onCancel={() => setActiveModal(null)}+ onConfirm={handleConfirmVoidEnvelope}+ processing={isVoidingEnvelope}+ title="Void this envelope?"+ />+ ) : null}+ </div>+ );+}++type ConfirmationDialogProps = {+ confirmLabel: string;+ description: readonly string[];+ errorMessage?: string | null;+ onCancel: () => void;+ onConfirm: () => void | Promise<void>;+ processing?: boolean;+ title: string;+};++function ConfirmationDialog({+ confirmLabel,+ description,+ errorMessage,+ onCancel,+ onConfirm,+ processing = false,+ title,+}: ConfirmationDialogProps) {+ return (+ <Dialog+ open+ onOpenChange={(open) => {+ if (!open && !processing) {+ onCancel();+ }+ }}+ >+ <DialogContent+ className="max-w-md rounded-none border-(--border) sm:p-8"+ showCloseButton={false}+ >+ <div className="space-y-4">+ <DialogHeader className="space-y-3">+ <DialogTitle className="text-xl tracking-[-0.03em]">+ {title}+ </DialogTitle>+ <DialogDescription asChild>+ <div className="space-y-3 text-sm leading-6 text-muted-foreground">+ {description.map((line) => (+ <p key={line}>{line}</p>+ ))}+ </div>+ </DialogDescription>+ </DialogHeader>++ {errorMessage ? (+ <div+ className="border border-[rgba(180,35,53,0.18)] bg-[rgba(180,35,53,0.04)] px-4 py-3"+ role="alert"+ >+ <p className="text-sm font-semibold text-(--accent)">+ {errorMessage}+ </p>+ </div>+ ) : null}++ <div className="flex flex-wrap justify-end gap-3 pt-2">+ <ShellButton+ disabled={processing}+ onClick={onCancel}+ variant="secondary"+ >+ Cancel+ </ShellButton>+ <ShellButton loading={processing} onClick={onConfirm}>+ {processing ? `${confirmLabel}...` : confirmLabel}+ </ShellButton>+ </div>+ </div>+ </DialogContent>+ </Dialog>+ );+}diff --git a/src/components/envelopes/interactive-placed-field.tsx b/src/components/envelopes/interactive-placed-field.tsxnew file mode 100644index 0000000..1cc54b2--- /dev/null+++ b/src/components/envelopes/interactive-placed-field.tsx@@ -0,0 +1,257 @@+"use client";++import { useRef, type KeyboardEvent, type PointerEvent as ReactPointerEvent } from "react";++import { type FieldResizeHandle } from "@/lib/utils/pdf-coords";++const dragThresholdPx = 4;+const compactFieldHeightThreshold = 0.045;+const compactFieldWidthThreshold = 0.12;++const resizeHandles: ReadonlyArray<{+ corner: FieldResizeHandle;+ cursorClassName: string;+ positionClassName: string;+}> = [+ {+ corner: "top-left",+ cursorClassName: "cursor-nwse-resize",+ positionClassName: "-left-2 -top-2",+ },+ {+ corner: "top-right",+ cursorClassName: "cursor-nesw-resize",+ positionClassName: "-right-2 -top-2",+ },+ {+ corner: "bottom-left",+ cursorClassName: "cursor-nesw-resize",+ positionClassName: "-bottom-2 -left-2",+ },+ {+ corner: "bottom-right",+ cursorClassName: "cursor-nwse-resize",+ positionClassName: "-bottom-2 -right-2",+ },+] as const;++type InteractivePlacedFieldProps = {+ coordinateScale: number;+ field: {+ height: number;+ required: boolean;+ type: string;+ width: number;+ x: number;+ y: number;+ };+ isSelected: boolean;+ label: string;+ onInteractionChange?: (isActive: boolean) => void;+ onMove: (deltaX: number, deltaY: number) => void;+ onResize: (corner: FieldResizeHandle, deltaX: number, deltaY: number) => void;+ onSelect: () => void;+ signer: {+ color: string;+ name: string;+ tint: string;+ };+};++type PointerGesture = {+ corner?: FieldResizeHandle;+ hasMoved: boolean;+ lastClientX: number;+ lastClientY: number;+ pointerId: number;+ target: HTMLElement;+ type: "move" | "resize";+ viewportHeight: number;+ viewportWidth: number;+};++export function InteractivePlacedField({+ coordinateScale,+ field,+ isSelected,+ label,+ onInteractionChange,+ onMove,+ onResize,+ onSelect,+ signer,+}: InteractivePlacedFieldProps) {+ const gestureRef = useRef<PointerGesture | null>(null);+ const percentMultiplier = 100 / coordinateScale;+ const isCheckbox = field.type === "checkbox";+ const showInlineLabel =+ !isCheckbox &&+ field.width >= compactFieldWidthThreshold &&+ field.height >= compactFieldHeightThreshold;++ function beginGesture(+ event: ReactPointerEvent<HTMLElement>,+ type: PointerGesture["type"],+ corner?: FieldResizeHandle,+ ) {+ if (event.button !== 0) {+ return;+ }++ const viewport = event.currentTarget.closest("[data-field-viewport]");++ if (!(viewport instanceof HTMLElement)) {+ return;+ }++ const viewportRect = viewport.getBoundingClientRect();++ if (viewportRect.width === 0 || viewportRect.height === 0) {+ return;+ }++ event.preventDefault();+ event.stopPropagation();+ onSelect();++ if (typeof event.currentTarget.setPointerCapture === "function") {+ event.currentTarget.setPointerCapture(event.pointerId);+ }++ gestureRef.current = {+ corner,+ hasMoved: false,+ lastClientX: event.clientX,+ lastClientY: event.clientY,+ pointerId: event.pointerId,+ target: event.currentTarget,+ type,+ viewportHeight: viewportRect.height,+ viewportWidth: viewportRect.width,+ };+ }++ function handlePointerMove(event: ReactPointerEvent<HTMLElement>) {+ const gesture = gestureRef.current;++ if (!gesture || event.pointerId !== gesture.pointerId) {+ return;+ }++ const deltaClientX = event.clientX - gesture.lastClientX;+ const deltaClientY = event.clientY - gesture.lastClientY;++ if (+ !gesture.hasMoved &&+ Math.hypot(+ event.clientX - gesture.lastClientX,+ event.clientY - gesture.lastClientY,+ ) < dragThresholdPx+ ) {+ return;+ }++ event.preventDefault();++ if (!gesture.hasMoved) {+ gesture.hasMoved = true;+ onInteractionChange?.(true);+ }++ const scaledDeltaX = (deltaClientX / gesture.viewportWidth) * coordinateScale;+ const scaledDeltaY =+ (deltaClientY / gesture.viewportHeight) * coordinateScale;++ if (gesture.type === "move") {+ onMove(scaledDeltaX, scaledDeltaY);+ } else if (gesture.corner) {+ onResize(gesture.corner, scaledDeltaX, scaledDeltaY);+ }++ gesture.lastClientX = event.clientX;+ gesture.lastClientY = event.clientY;+ }++ function endGesture(event: ReactPointerEvent<HTMLElement>) {+ const gesture = gestureRef.current;++ if (!gesture || event.pointerId !== gesture.pointerId) {+ return;+ }++ event.preventDefault();++ if (typeof gesture.target.releasePointerCapture === "function") {+ gesture.target.releasePointerCapture(event.pointerId);+ }++ if (gesture.hasMoved) {+ onInteractionChange?.(false);+ }++ gestureRef.current = null;+ }++ function handleKeyboardSelect(event: KeyboardEvent<HTMLDivElement>) {+ if (event.key !== "Enter" && event.key !== " ") {+ return;+ }++ event.preventDefault();+ onSelect();+ }++ return (+ <div+ aria-label={`${signer.name} · ${label}`}+ aria-pressed={isSelected}+ className={`absolute z-2 flex touch-none select-none items-center justify-center overflow-visible border-2 text-center text-[11px] font-semibold shadow-(--shadow-card) transition ${+ isSelected+ ? "ring-2 ring-[rgba(17,17,17,0.12)]"+ : "hover:ring-1 hover:ring-[rgba(17,17,17,0.08)]"+ } cursor-grab ${isCheckbox ? "rounded-none p-0" : "rounded-none px-2 py-1"}`}+ onKeyDown={handleKeyboardSelect}+ onPointerCancel={endGesture}+ onPointerDown={(event) => beginGesture(event, "move")}+ onPointerMove={handlePointerMove}+ onPointerUp={endGesture}+ role="button"+ data-placed-field="true"+ style={{+ backgroundColor: signer.tint,+ borderColor: signer.color,+ color: signer.color,+ height: `${field.height * percentMultiplier}%`,+ left: `${field.x * percentMultiplier}%`,+ top: `${field.y * percentMultiplier}%`,+ width: `${field.width * percentMultiplier}%`,+ }}+ tabIndex={0}+ >+ {showInlineLabel ? (+ <span className="pointer-events-none max-w-full overflow-hidden text-ellipsis whitespace-nowrap px-1">+ {label}+ </span>+ ) : null}++ {isSelected+ ? resizeHandles.map((handle) => (+ <button+ aria-label={`Resize ${label} field from ${handle.corner}`}+ className={`absolute ${handle.positionClassName} ${handle.cursorClassName} z-1 size-4 rounded-full bg-white shadow-[0_4px_10px_rgba(17,17,17,0.18)]`}+ key={handle.corner}+ onPointerCancel={endGesture}+ onPointerDown={(event) => beginGesture(event, "resize", handle.corner)}+ onPointerMove={handlePointerMove}+ onPointerUp={endGesture}+ style={{+ border: `2px solid ${signer.color}`,+ }}+ tabIndex={-1}+ type="button"+ />+ ))+ : null}+ </div>+ );+}diff --git a/src/components/envelopes/pdf-page-canvas.tsx b/src/components/envelopes/pdf-page-canvas.tsxnew file mode 100644index 0000000..2252580--- /dev/null+++ b/src/components/envelopes/pdf-page-canvas.tsx@@ -0,0 +1,265 @@+"use client";++import { useEffect, useRef, useState } from "react";++import {+ loadPdfJsModule,+ PDF_JS_STANDARD_FONT_DATA_URL,+} from "@/lib/pdfjs-client";++type PdfJsModule = Awaited<ReturnType<typeof loadPdfJsModule>>;+type PdfDocumentProxy = Awaited<+ ReturnType<PdfJsModule["getDocument"]>["promise"]+>;+type PdfPageProxy = Awaited<ReturnType<PdfDocumentProxy["getPage"]>>;+type PdfRenderTask = ReturnType<PdfPageProxy["render"]>;+export type PdfPageRenderState = "error" | "loading" | "ready";++type PdfPageCanvasProps = {+ documentUrl: string | null;+ onRenderStateChange?: (state: PdfPageRenderState) => void;+ pageNumber: number;+};++export function PdfPageCanvas({+ documentUrl,+ onRenderStateChange,+ pageNumber,+}: PdfPageCanvasProps) {+ const canvasRef = useRef<HTMLCanvasElement | null>(null);+ const [documentProxy, setDocumentProxy] = useState<PdfDocumentProxy | null>(+ null,+ );+ const [viewportSize, setViewportSize] = useState({+ height: 0,+ width: 0,+ });+ const [renderState, setRenderState] = useState<PdfPageRenderState>("loading");++ useEffect(() => {+ const canvas = canvasRef.current;++ if (!canvas) {+ return;+ }++ const viewportCandidate = canvas.closest("[data-field-viewport]");++ if (!(viewportCandidate instanceof HTMLElement)) {+ return;+ }++ const viewportElement: HTMLElement = viewportCandidate;++ function updateViewportSize() {+ const nextWidth = Math.round(viewportElement.clientWidth);+ const nextHeight = Math.round(viewportElement.clientHeight);++ if (nextWidth === 0 || nextHeight === 0) {+ return;+ }++ setViewportSize((currentSize) =>+ currentSize.width === nextWidth && currentSize.height === nextHeight+ ? currentSize+ : {+ height: nextHeight,+ width: nextWidth,+ },+ );+ }++ updateViewportSize();++ if (typeof ResizeObserver === "undefined") {+ window.addEventListener("resize", updateViewportSize);++ return () => {+ window.removeEventListener("resize", updateViewportSize);+ };+ }++ const resizeObserver = new ResizeObserver(() => {+ updateViewportSize();+ });++ resizeObserver.observe(viewportElement);++ return () => {+ resizeObserver.disconnect();+ };+ }, []);++ useEffect(() => {+ let isActive = true;+ let activeDocument: PdfDocumentProxy | null = null;+ let loadingTask: ReturnType<PdfJsModule["getDocument"]> | null = null;++ async function loadDocument() {+ setRenderState("loading");+ setDocumentProxy(null);++ if (!documentUrl) {+ return;+ }++ try {+ const pdfjs = await loadPdfJsModule();+ loadingTask = pdfjs.getDocument({+ standardFontDataUrl: PDF_JS_STANDARD_FONT_DATA_URL,+ url: documentUrl,+ });+ const nextDocument = await loadingTask.promise;++ if (!isActive) {+ await nextDocument.destroy();+ return;+ }++ activeDocument = nextDocument;+ setDocumentProxy(nextDocument);+ } catch (error) {+ if (isActive) {+ console.error("Failed to load the PDF preview document.", error);+ setDocumentProxy(null);+ setRenderState("error");+ }+ }+ }++ void loadDocument();++ return () => {+ isActive = false;+ loadingTask?.destroy();+ void activeDocument?.destroy();+ };+ }, [documentUrl]);++ useEffect(() => {+ if (+ !documentProxy ||+ !canvasRef.current ||+ viewportSize.width === 0 ||+ viewportSize.height === 0+ ) {+ return;+ }++ let isActive = true;+ let activePage: PdfPageProxy | null = null;+ let renderTask: PdfRenderTask | null = null;++ async function renderPage() {+ setRenderState("loading");++ try {+ const page = await documentProxy.getPage(pageNumber);++ if (!isActive) {+ page.cleanup();+ return;+ }++ activePage = page;++ const baseViewport = page.getViewport({ scale: 1 });+ const scale = Math.min(+ viewportSize.width / baseViewport.width,+ viewportSize.height / baseViewport.height,+ );+ const viewport = page.getViewport({ scale });+ const outputScale = window.devicePixelRatio || 1;+ const canvas = canvasRef.current;++ if (!canvas) {+ return;+ }++ const context = canvas.getContext("2d");++ if (!context) {+ throw new Error("Unable to render PDF canvas context.");+ }++ canvas.width = Math.floor(viewport.width * outputScale);+ canvas.height = Math.floor(viewport.height * outputScale);+ canvas.style.width = `${viewport.width}px`;+ canvas.style.height = `${viewport.height}px`;+ context.setTransform(1, 0, 0, 1, 0, 0);+ context.clearRect(0, 0, canvas.width, canvas.height);++ renderTask = page.render({+ canvasContext: context,+ transform:+ outputScale === 1+ ? undefined+ : [outputScale, 0, 0, outputScale, 0, 0],+ viewport,+ });++ await renderTask.promise;++ if (!isActive) {+ return;+ }++ setRenderState("ready");+ } catch (error) {+ if (+ isActive &&+ (!error ||+ typeof error !== "object" ||+ !("name" in error) ||+ error.name !== "RenderingCancelledException")+ ) {+ console.error("Failed to render the PDF preview page.", error);+ setRenderState("error");+ }+ }+ }++ void renderPage();++ return () => {+ isActive = false;+ renderTask?.cancel();+ activePage?.cleanup();+ };+ }, [documentProxy, pageNumber, viewportSize.height, viewportSize.width]);++ useEffect(() => {+ onRenderStateChange?.(renderState);+ }, [onRenderStateChange, renderState]);++ return (+ <div+ aria-label={`Rendered PDF page ${pageNumber}`}+ className="absolute inset-0 flex items-center justify-center"+ role="img"+ >+ <canvas+ className={`max-h-full max-w-full ${+ renderState === "ready" ? "opacity-100" : "opacity-0"+ }`}+ ref={canvasRef}+ />+ {renderState !== "ready" ? (+ <div className="absolute inset-0 z-1 flex items-center justify-center rounded-[28px] bg-white/92 px-6 text-center">+ <div className="max-w-[320px] rounded-[24px] border border-(--border) bg-(--surface) px-5 py-4 shadow-(--shadow-card)">+ <p className="text-sm font-semibold text-(--fg)">+ {renderState === "error"+ ? "We couldn't render this PDF page."+ : "Rendering document page..."}+ </p>+ <p className="mt-2 text-sm leading-6 text-muted-foreground">+ {renderState === "error"+ ? "Reload the page or try this draft again in a moment."+ : "Preparing the source PDF so placed fields stay aligned with the stored page size."}+ </p>+ </div>+ </div>+ ) : null}+ </div>+ );+}diff --git a/src/components/envelopes/prepare-live-shell.tsx b/src/components/envelopes/prepare-live-shell.tsxnew file mode 100644index 0000000..0089d0b--- /dev/null+++ b/src/components/envelopes/prepare-live-shell.tsx@@ -0,0 +1,1538 @@+"use client";++import {+ useEffect,+ useRef,+ useState,+ type Dispatch,+ type PointerEvent as ReactPointerEvent,+ type MutableRefObject,+ type MouseEvent,+ type SetStateAction,+} from "react";++import { type PrepareEnvelopeData } from "@/lib/envelopes";+import {+ type FieldPlacement,+ type ReplaceFieldsResponse,+} from "@/lib/schemas/field";+import { CanvasShell } from "@/components/layout/canvas-shell";+import {+ ChevronLeftIcon,+ ChevronRightIcon,+} from "@/components/layout/nav-items";+import {+ beginDocumentPanGesture,+ clampDocumentZoomLevel,+ DEFAULT_DOCUMENT_ZOOM_LEVEL,+ DocumentZoomControls,+ endDocumentPanGesture,+ moveDocumentPanGesture,+ type DocumentPanGesture,+ DOCUMENT_ZOOM_STEP,+} from "@/components/shared/document-viewport";+import { getCachedDraftPdfBlob } from "@/lib/draft-pdf-cache";+import {+ moveFieldRect,+ placeFieldAtViewportPoint,+ resizeFieldRectFromHandle,+ type FieldResizeHandle,+} from "@/lib/utils/pdf-coords";+import { InteractivePlacedField } from "./interactive-placed-field";+import { PdfPageCanvas } from "./pdf-page-canvas";+import { getSignerPalette } from "./signer-palette";++type PrepareFieldType = FieldPlacement["type"];++type PrepareLiveShellProps = {+ envelopeId: string;+ initialState?: "error";+ record?: PrepareEnvelopeData;+};++type PrepareField = FieldPlacement & {+ id: string;+};++type LiveFieldSource = Array<{+ height: number;+ id: string;+ label?: string;+ page: number;+ required: boolean;+ signerId: string;+ type: PrepareFieldType;+ width: number;+ x: number;+ y: number;+}>;++type PrepareShellSigner = {+ color: string;+ email: string;+ id: string;+ name: string;+ order: number;+ tint: string;+};++type FieldTool = {+ defaultHeight: number;+ defaultWidth: number;+ label: string;+ minHeight: number;+ minWidth: number;+ placeholderLabel: string;+ type: PrepareFieldType;+};++type SignerCardProps = {+ fieldCount: number;+ hasSignatureField: boolean;+ isActive: boolean;+ onSelect: () => void;+ signer: PrepareShellSigner;+};++type FieldToolButtonProps = {+ isActive: boolean;+ onSelect: () => void;+ tool: FieldTool;+};++type FieldEditorProps = {+ field: PrepareField;+ onDelete: () => void;+ onSetRequired: (required: boolean) => void;+ onSignerChange: (signerId: string) => void;+ signers: readonly PrepareShellSigner[];+};++type SaveState = "error" | "saved" | "saving";+type PersistFieldsResult = {+ ok: boolean;+ redirectPath: string | null;+};+const fieldTools: readonly FieldTool[] = [+ {+ defaultHeight: 0.07,+ defaultWidth: 0.24,+ label: "Signature",+ minHeight: 0.0045,+ minWidth: 0.006,+ placeholderLabel: "Sign",+ type: "signature",+ },+ {+ defaultHeight: 0.055,+ defaultWidth: 0.14,+ label: "Initials",+ minHeight: 0.0045,+ minWidth: 0.006,+ placeholderLabel: "Initials",+ type: "initials",+ },+ {+ defaultHeight: 0.045,+ defaultWidth: 0.12,+ label: "Date",+ minHeight: 0.0045,+ minWidth: 0.006,+ placeholderLabel: "Date",+ type: "date",+ },+ {+ defaultHeight: 0.055,+ defaultWidth: 0.18,+ label: "Text",+ minHeight: 0.0045,+ minWidth: 0.006,+ placeholderLabel: "Text",+ type: "text",+ },+ {+ defaultHeight: 0.023,+ defaultWidth: 0.03,+ label: "Checkbox",+ minHeight: 0.0045,+ minWidth: 0.006,+ placeholderLabel: "Checkbox",+ type: "checkbox",+ },+] as const;++const genericSubmitError = "Something went wrong. Please try again.";+const autosaveDelayMs = 450;++function buildLiveSigners(+ signers: PrepareEnvelopeData["signers"],+): PrepareShellSigner[] {+ return signers+ .slice()+ .sort((left, right) => left.order - right.order)+ .map((signer, index) => ({+ ...getSignerPalette(index),+ email: signer.email,+ id: signer.id,+ name: signer.name,+ order: signer.order,+ }));+}++function buildLiveFields(+ fields: LiveFieldSource | PrepareEnvelopeData["fields"],+) {+ return fields.map((field, index) => ({+ height: field.height,+ id: field.id ?? `field-${index + 1}`,+ label: field.label,+ page: field.page,+ required: field.required,+ signerId: field.signerId,+ type: field.type,+ width: field.width,+ x: field.x,+ y: field.y,+ }));+}++function getFieldTool(type: PrepareFieldType) {+ return fieldTools.find((tool) => tool.type === type) ?? fieldTools[0];+}++function roundNormalized(value: number) {+ return Math.round(value * 1_000_000) / 1_000_000;+}++function isTextEntryTarget(target: EventTarget | null) {+ if (+ target instanceof HTMLInputElement ||+ target instanceof HTMLTextAreaElement ||+ target instanceof HTMLSelectElement+ ) {+ return true;+ }++ return target instanceof HTMLElement && target.isContentEditable;+}++function clearSelectedFieldFromViewportClick(+ event: ReactPointerEvent<HTMLElement>,+ armedTool: PrepareFieldType | null,+ setSelectedFieldId: Dispatch<SetStateAction<string | null>>,+) {+ if (armedTool) {+ return;+ }++ const target = event.target;++ if (+ target instanceof HTMLElement &&+ target.closest("[data-placed-field='true']")+ ) {+ return;+ }++ setSelectedFieldId(null);+}++function buildFieldRequest(fields: readonly PrepareField[]) {+ return {+ fields: fields.map((field) => ({+ height: roundNormalized(field.height),+ id: field.id,+ label: field.label,+ page: field.page,+ required: field.required,+ signerId: field.signerId,+ type: field.type,+ width: roundNormalized(field.width),+ x: roundNormalized(field.x),+ y: roundNormalized(field.y),+ })),+ };+}++function serializeFieldRequest(fields: readonly PrepareField[]) {+ return JSON.stringify(buildFieldRequest(fields));+}++async function parseJsonResponse<T>(+ response: Response,+): Promise<{ data: T | null; error: string | null }> {+ const payload = (await response.json().catch(() => null)) as+ | { error?: string }+ | T+ | null;++ if (!response.ok) {+ return {+ data: null,+ error:+ payload &&+ typeof payload === "object" &&+ "error" in payload &&+ typeof payload.error === "string"+ ? payload.error+ : genericSubmitError,+ };+ }++ return {+ data: payload as T | null,+ error: null,+ };+}++export function PrepareLiveShell({+ envelopeId,+ initialState,+ record,+}: PrepareLiveShellProps) {+ if (initialState === "error" || !record) {+ return <PrepareLiveShellError envelopeId={envelopeId} />;+ }++ return <PrepareLiveShellContent envelopeId={envelopeId} record={record} />;+}++function PrepareLiveShellError({ envelopeId }: { envelopeId: string }) {+ return (+ <CanvasShell+ backHref={`/envelopes/${envelopeId}/signers`}+ backLabel="Back"+ nextDisabled+ nextLabel="Next →"+ stepLabel="Step 3 of 4"+ title='"Document"'+ >+ <div className="flex min-h-[calc(100vh-73px)] items-center justify-center p-4 sm:p-6 lg:p-8">+ <section className="app-surface-strong w-full max-w-[520px] p-8 text-center sm:p-10">+ <div className="mx-auto inline-flex size-16 items-center justify-center rounded-full bg-[rgba(180,35,53,0.1)] text-lg font-semibold text-(--accent)">+ !+ </div>+ <h1 className="mt-6 text-[28px] font-semibold tracking-[-0.04em] text-(--fg)">+ Couldn't load this document+ </h1>+ <p className="mt-3 text-sm leading-6 text-muted-foreground">+ Something went wrong. Please try again.+ </p>+ <button+ className="mt-8 inline-flex min-h-11 items-center justify-center rounded-full bg-(--accent) px-5 text-sm font-semibold text-white shadow-[0_14px_28px_rgba(180,35,53,0.22)] transition hover:bg-(--accent-hover)"+ onClick={() => window.location.reload()}+ type="button"+ >+ Retry+ </button>+ </section>+ </div>+ </CanvasShell>+ );+}++function PrepareLiveShellContent({+ envelopeId,+ record,+}: {+ envelopeId: string;+ record: PrepareEnvelopeData;+}) {+ const signers = buildLiveSigners(record.signers);+ const initialFields = buildLiveFields(record.fields);+ const [activePage, setActivePage] = useState(1);+ const [selectedSignerId, setSelectedSignerId] = useState(+ signers[0]?.id ?? "",+ );+ const [selectedFieldId, setSelectedFieldId] = useState<string | null>(null);+ const [armedTool, setArmedTool] = useState<PrepareFieldType | null>(null);+ const [fields, setFields] = useState<PrepareField[]>(initialFields);+ const [isMobileToolsOpen, setIsMobileToolsOpen] = useState(false);+ const [saveState, setSaveState] = useState<SaveState>("saved");+ const [saveError, setSaveError] = useState<string | null>(null);+ const [isContinuing, setIsContinuing] = useState(false);+ const [isFieldInteracting, setIsFieldInteracting] = useState(false);+ const [isDocumentPanning, setIsDocumentPanning] = useState(false);+ const [zoomLevel, setZoomLevel] = useState(DEFAULT_DOCUMENT_ZOOM_LEVEL);+ const [preferredDocumentUrl, setPreferredDocumentUrl] = useState<+ string | null+ >(null);+ const autosaveTimeoutRef = useRef<number | null>(null);+ const paperGridRef = useRef<HTMLDivElement | null>(null);+ const documentPanGestureRef = useRef<DocumentPanGesture | null>(null);+ const currentFieldsRef = useRef(fields);+ const lastSavedSignatureRef = useRef(serializeFieldRequest(initialFields));+ const fieldCounterRef = useRef(initialFields.length);+ const persistFieldsRef = useRef<+ (nextFields: readonly PrepareField[]) => Promise<PersistFieldsResult>+ >(async () => ({+ ok: false,+ redirectPath: null,+ }));++ currentFieldsRef.current = fields;++ const pageCount = record.pages.length;+ const pageFields = fields.filter((field) => field.page === activePage);+ const activePageRecord =+ record.pages.find((page) => page.pageNumber === activePage) ??+ record.pages[0];+ const selectedField =+ fields.find(+ (field) => field.id === selectedFieldId && field.page === activePage,+ ) ?? null;+ const selectedSigner =+ signers.find((signer) => signer.id === selectedSignerId) ?? signers[0];+ const missingSignatureSigner = signers.find(+ (signer) =>+ !fields.some(+ (field) => field.signerId === signer.id && field.type === "signature",+ ),+ );+ const canContinue = missingSignatureSigner == null;++ useEffect(() => {+ let isActive = true;+ let localDocumentUrl: string | null = null;++ setPreferredDocumentUrl(null);++ async function resolvePreferredDocumentUrl() {+ try {+ const cachedPdfBlob = await getCachedDraftPdfBlob(envelopeId);++ if (!isActive) {+ return;+ }++ if (cachedPdfBlob) {+ localDocumentUrl = URL.createObjectURL(cachedPdfBlob);+ setPreferredDocumentUrl(localDocumentUrl);+ return;+ }+ } catch (error) {+ console.error("Failed to restore the cached draft PDF preview.", error);+ }++ if (isActive) {+ setPreferredDocumentUrl(record.pdfUrl);+ }+ }++ void resolvePreferredDocumentUrl();++ return () => {+ isActive = false;++ if (localDocumentUrl) {+ URL.revokeObjectURL(localDocumentUrl);+ }+ };+ }, [envelopeId, record.pdfUrl]);++ useEffect(() => {+ return () => {+ if (autosaveTimeoutRef.current) {+ window.clearTimeout(autosaveTimeoutRef.current);+ }+ };+ }, []);++ useEffect(() => {+ if (!selectedFieldId) {+ return;+ }++ const fieldId = selectedFieldId;++ function handleDeleteFieldKeydown(event: KeyboardEvent) {+ if (event.defaultPrevented || isFieldInteracting) {+ return;+ }++ if (event.key !== "Backspace" && event.key !== "Delete") {+ return;+ }++ if (event.altKey || event.ctrlKey || event.metaKey) {+ return;+ }++ if (isTextEntryTarget(event.target)) {+ return;+ }++ event.preventDefault();+ deleteField(fieldId, setFields, setSelectedFieldId);+ }++ window.addEventListener("keydown", handleDeleteFieldKeydown);++ return () => {+ window.removeEventListener("keydown", handleDeleteFieldKeydown);+ };+ }, [isFieldInteracting, selectedFieldId]);++ useEffect(() => {+ if (zoomLevel > DEFAULT_DOCUMENT_ZOOM_LEVEL) {+ return;+ }++ setIsDocumentPanning(false);+ documentPanGestureRef.current = null;+ }, [zoomLevel]);++ async function persistFields(nextFields: readonly PrepareField[]) {+ const requestedSignature = serializeFieldRequest(nextFields);++ setSaveError(null);+ setSaveState("saving");++ const response = await fetch(`/api/envelopes/${envelopeId}/fields`, {+ body: JSON.stringify(buildFieldRequest(nextFields)),+ headers: {+ "content-type": "application/json",+ },+ method: "PUT",+ });+ const payload = await parseJsonResponse<ReplaceFieldsResponse>(response);++ if (payload.error) {+ setSaveError(payload.error);+ setSaveState("error");+ return {+ ok: false,+ redirectPath: null,+ };+ }++ if (+ serializeFieldRequest(currentFieldsRef.current) !== requestedSignature+ ) {+ return {+ ok: false,+ redirectPath: payload.data?.redirectPath ?? null,+ };+ }++ const savedFields = payload.data?.fields+ ? buildLiveFields(payload.data.fields)+ : [...nextFields];+ const savedSignature = serializeFieldRequest(savedFields);++ lastSavedSignatureRef.current = savedSignature;+ setFields(savedFields);+ setSaveState("saved");++ return {+ ok: true,+ redirectPath: payload.data?.redirectPath ?? null,+ };+ }++ persistFieldsRef.current = persistFields;++ useEffect(() => {+ const nextSignature = serializeFieldRequest(fields);++ if (nextSignature === lastSavedSignatureRef.current) {+ return;+ }++ if (isFieldInteracting) {+ return;+ }++ if (autosaveTimeoutRef.current) {+ window.clearTimeout(autosaveTimeoutRef.current);+ }++ autosaveTimeoutRef.current = window.setTimeout(() => {+ void persistFieldsRef.current(currentFieldsRef.current);+ autosaveTimeoutRef.current = null;+ }, autosaveDelayMs);++ setSaveState("saving");++ return () => {+ if (autosaveTimeoutRef.current) {+ window.clearTimeout(autosaveTimeoutRef.current);+ autosaveTimeoutRef.current = null;+ }+ };+ }, [fields, isFieldInteracting]);++ async function handleContinue() {+ if (!canContinue || isContinuing) {+ return;+ }++ setIsContinuing(true);++ try {+ const currentSignature = serializeFieldRequest(fields);+ let redirectPath = `/envelopes/${envelopeId}/review`;++ if (currentSignature !== lastSavedSignatureRef.current) {+ const saveResult = await persistFields(fields);++ if (!saveResult.ok) {+ return;+ }++ redirectPath = saveResult.redirectPath ?? redirectPath;+ }++ window.location.assign(redirectPath);+ } finally {+ setIsContinuing(false);+ }+ }++ function beginDocumentPan(event: ReactPointerEvent<HTMLDivElement>) {+ documentPanGestureRef.current = beginDocumentPanGesture({+ canStart: !armedTool,+ event,+ scrollContainer: paperGridRef.current,+ shouldIgnoreTarget: (target) =>+ Boolean(target.closest("[data-placed-field='true']")),+ zoomLevel,+ });+ }++ function handleDocumentPanMove(event: ReactPointerEvent<HTMLDivElement>) {+ moveDocumentPanGesture({+ event,+ gesture: documentPanGestureRef.current,+ onPanStart: () => setIsDocumentPanning(true),+ scrollContainer: paperGridRef.current,+ });+ }++ function endDocumentPan(event: ReactPointerEvent<HTMLDivElement>) {+ if (+ endDocumentPanGesture({+ event,+ gesture: documentPanGestureRef.current,+ onPanEnd: () => setIsDocumentPanning(false),+ scrollContainer: paperGridRef.current,+ })+ ) {+ documentPanGestureRef.current = null;+ }+ }++ return (+ <CanvasShell+ backHref={`/envelopes/${envelopeId}/signers`}+ backLabel="Back"+ nextDisabled={!canContinue}+ nextLabel="Next →"+ nextLoading={isContinuing}+ onNext={handleContinue}+ stepLabel="Step 3 of 4"+ title={`"${record.title}"`}+ >+ <div className="grid min-h-[calc(100vh-73px)] lg:grid-cols-[280px_minmax(0,1fr)_320px]">+ <aside className="hidden border-r border-(--border) bg-[rgba(251,248,242,0.88)] lg:block">+ <div className="flex h-full flex-col gap-8 p-5">+ <section className="space-y-4">+ <p className="text-xs font-semibold uppercase tracking-[0.24em] text-(--tertiary)">+ Fields+ </p>+ <div className="grid gap-3">+ {fieldTools.map((tool) => (+ <FieldToolButton+ isActive={armedTool === tool.type}+ key={tool.type}+ onSelect={() =>+ handleToolSelect(+ tool.type,+ setArmedTool,+ setSelectedFieldId,+ setIsMobileToolsOpen,+ )+ }+ tool={tool}+ />+ ))}+ </div>+ </section>++ <section className="space-y-4 border-t border-(--border) pt-6">+ <div className="flex items-center justify-between">+ <p className="text-xs font-semibold uppercase tracking-[0.24em] text-(--tertiary)">+ Signers+ </p>+ <span className="text-xs font-medium text-(--tertiary)">+ {fields.length} fields placed+ </span>+ </div>+ <div className="space-y-3">+ {signers.map((signer) => {+ const signerFields = fields.filter(+ (field) => field.signerId === signer.id,+ );++ return (+ <SignerCard+ fieldCount={signerFields.length}+ hasSignatureField={signerFields.some(+ (field) => field.type === "signature",+ )}+ isActive={selectedSignerId === signer.id}+ key={signer.id}+ onSelect={() => setSelectedSignerId(signer.id)}+ signer={signer}+ />+ );+ })}+ </div>+ </section>+ </div>+ </aside>++ <section className="flex min-w-0 flex-col gap-4 p-4 sm:p-6 lg:p-8">+ <div className="editorial-panel px-4 py-3 sm:px-5">+ <div className="flex flex-col gap-3 lg:grid lg:grid-cols-[1fr_auto_1fr] lg:items-center">+ <div className="flex justify-center lg:justify-start">+ <DocumentZoomControls+ onDecrease={() =>+ setZoomLevel((currentZoom) =>+ clampDocumentZoomLevel(+ currentZoom - DOCUMENT_ZOOM_STEP,+ ),+ )+ }+ onIncrease={() =>+ setZoomLevel((currentZoom) =>+ clampDocumentZoomLevel(+ currentZoom + DOCUMENT_ZOOM_STEP,+ ),+ )+ }+ onReset={() => setZoomLevel(DEFAULT_DOCUMENT_ZOOM_LEVEL)}+ zoomLevel={zoomLevel}+ />+ </div>++ <div className="flex items-center justify-center gap-3">+ <button+ aria-label="Previous page"+ className="inline-flex size-11 items-center justify-center rounded-none border border-(--border) bg-white text-muted-foreground transition hover:border-black hover:bg-white disabled:cursor-not-allowed disabled:text-(--placeholder)"+ disabled={activePage === 1}+ onClick={() =>+ changePage(+ activePage - 1,+ pageCount,+ setActivePage,+ setSelectedFieldId,+ setArmedTool,+ )+ }+ type="button"+ >+ <ChevronLeftIcon className="size-4" />+ </button>+ <div className="min-w-[132px] text-center">+ <p className="text-xs font-semibold uppercase tracking-[0.22em] text-(--tertiary)">+ Document page+ </p>+ <p className="mt-1 text-sm font-semibold text-(--fg)">+ {`Page ${activePage} of ${pageCount}`}+ </p>+ </div>+ <button+ aria-label="Next page"+ className="inline-flex size-11 items-center justify-center rounded-none border border-(--border) bg-white text-muted-foreground transition hover:border-black hover:bg-white disabled:cursor-not-allowed disabled:text-(--placeholder)"+ disabled={activePage === pageCount}+ onClick={() =>+ changePage(+ activePage + 1,+ pageCount,+ setActivePage,+ setSelectedFieldId,+ setArmedTool,+ )+ }+ type="button"+ >+ <ChevronRightIcon className="size-4" />+ </button>+ </div>++ <div className="flex justify-center lg:justify-end">+ <SaveStatusIndicator+ onRetrySave={() => void persistFields(currentFieldsRef.current)}+ saveError={saveError}+ saveState={saveState}+ />+ </div>+ </div>+ </div>++ <div className="editorial-panel p-4 lg:hidden">+ <div className="flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between">+ <label className="grid gap-2 text-sm">+ <span className="font-semibold text-(--fg)">+ Selected signer+ </span>+ <select+ aria-label="Selected signer"+ className="min-h-12 rounded-none border border-(--border) bg-popover px-4 text-(--fg)"+ onChange={(event) => setSelectedSignerId(event.target.value)}+ value={selectedSignerId}+ >+ {signers.map((signer) => (+ <option key={signer.id} value={signer.id}>+ {signer.name}+ </option>+ ))}+ </select>+ </label>+ <button+ className="inline-flex min-h-11 items-center justify-center rounded-none border border-(--border) bg-(--surface) px-5 [font-family:var(--font-mono)] text-[0.72rem] font-semibold uppercase tracking-[0.18em] text-(--fg) transition hover:border-black hover:bg-white"+ onClick={() => setIsMobileToolsOpen(true)}+ type="button"+ >+ Open field tools+ </button>+ </div>+ </div>++ <div className="editorial-panel p-3 sm:p-4">+ <div+ className={`relative overflow-auto border border-(--border) bg-(--surface) p-3 sm:p-5 ${+ zoomLevel > DEFAULT_DOCUMENT_ZOOM_LEVEL && !armedTool+ ? isDocumentPanning+ ? "cursor-grabbing"+ : "cursor-grab"+ : ""+ }`}+ data-paper-grid+ onPointerCancel={endDocumentPan}+ onPointerDown={beginDocumentPan}+ onPointerMove={handleDocumentPanMove}+ onPointerUp={endDocumentPan}+ ref={paperGridRef}+ >+ <div+ className={`mx-auto ${zoomLevel > DEFAULT_DOCUMENT_ZOOM_LEVEL ? "w-full" : "flex justify-center"}`}+ >+ <div+ className="relative border border-[rgba(17,17,17,0.08)] bg-white"+ style={{+ width: `${zoomLevel * 100}%`,+ }}+ >+ <div+ className="relative overflow-hidden"+ data-field-viewport+ onPointerDown={(event) =>+ clearSelectedFieldFromViewportClick(+ event,+ armedTool,+ setSelectedFieldId,+ )+ }+ style={{+ aspectRatio: `${activePageRecord.widthPt} / ${activePageRecord.heightPt}`,+ }}+ >+ <PdfPageCanvas+ documentUrl={preferredDocumentUrl}+ pageNumber={activePage}+ />++ {armedTool ? (+ <button+ aria-label={`Place ${getFieldTool(armedTool).label} on page ${activePage}`}+ className="absolute inset-0 z-10 cursor-copy rounded-[28px] bg-transparent"+ onClick={(event) =>+ placeField(+ event,+ activePage,+ armedTool,+ fieldCounterRef,+ selectedSignerId,+ setArmedTool,+ setFields,+ setSelectedFieldId,+ )+ }+ type="button"+ >+ <span className="sr-only">+ Place {getFieldTool(armedTool).label} on the document+ page+ </span>+ </button>+ ) : null}++ {fields.length === 0 ? (+ <div className="absolute inset-0 z-1 flex items-center justify-center px-6">+ <div className="max-w-[300px] border border-dashed border-[rgba(17,17,17,0.12)] bg-white/92 px-6 py-8 text-center">+ <p className="text-lg font-semibold tracking-[-0.03em] text-(--fg)">+ No fields placed yet+ </p>+ <p className="mt-3 text-sm leading-6 text-muted-foreground">+ Pick a field, then click the page to place it for+ the selected signer.+ </p>+ </div>+ </div>+ ) : null}++ {pageFields.map((field) => {+ const signer =+ signers.find((entry) => entry.id === field.signerId) ??+ signers[0];++ return (+ <InteractivePlacedField+ coordinateScale={1}+ field={field}+ isSelected={selectedField?.id === field.id}+ key={field.id}+ label={getFieldTool(field.type).placeholderLabel}+ onInteractionChange={setIsFieldInteracting}+ onMove={(deltaX, deltaY) =>+ moveField(field.id, deltaX, deltaY, setFields)+ }+ onResize={(corner, deltaX, deltaY) =>+ resizeField(+ field.id,+ corner,+ deltaX,+ deltaY,+ setFields,+ )+ }+ onSelect={() => {+ setArmedTool(null);+ setSelectedSignerId(field.signerId);+ setSelectedFieldId(field.id);+ }}+ signer={signer}+ />+ );+ })}++ {armedTool ? (+ <div className="pointer-events-none absolute inset-x-4 bottom-4 z-11 border border-[rgba(180,35,53,0.12)] bg-white/94 px-4 py-3 sm:inset-x-6 sm:bottom-6">+ <p className="text-xs font-semibold uppercase tracking-[0.22em] text-(--accent)">+ Ready to place+ </p>+ <p className="mt-2 text-sm text-muted-foreground">+ Click the page to place{" "}+ <span className="font-semibold text-(--fg)">+ {getFieldTool(armedTool).label}+ </span>{" "}+ for{" "}+ <span className="font-semibold text-(--fg)">+ {selectedSigner.name}+ </span>+ .+ </p>+ </div>+ ) : null}+ </div>+ </div>+ </div>+ </div>+ </div>++ {selectedField ? (+ <div className="editorial-panel p-4 lg:hidden">+ <FieldEditor+ field={selectedField}+ onDelete={() =>+ deleteField(selectedField.id, setFields, setSelectedFieldId)+ }+ onSetRequired={(required) =>+ setFieldRequired(selectedField.id, required, setFields)+ }+ onSignerChange={(signerId) => {+ setSelectedSignerId(signerId);+ reassignField(selectedField.id, signerId, setFields);+ }}+ signers={signers}+ />+ </div>+ ) : null}++ <div className="grid gap-4 lg:hidden">+ <SelectedSignerPanel+ armedTool={armedTool}+ selectedSigner={selectedSigner}+ />+ </div>+ </section>++ <aside className="hidden border-l border-(--border) bg-white/92 lg:block">+ <div className="flex h-full flex-col gap-6 p-5">+ <section className="space-y-4">+ <p className="text-xs font-semibold uppercase tracking-[0.24em] text-(--tertiary)">+ Inspector+ </p>+ <div className="border border-(--border) bg-(--surface) p-4">+ {selectedField ? (+ <FieldEditor+ field={selectedField}+ onDelete={() =>+ deleteField(+ selectedField.id,+ setFields,+ setSelectedFieldId,+ )+ }+ onSetRequired={(required) =>+ setFieldRequired(selectedField.id, required, setFields)+ }+ onSignerChange={(signerId) => {+ setSelectedSignerId(signerId);+ reassignField(selectedField.id, signerId, setFields);+ }}+ signers={signers}+ />+ ) : (+ <EmptyFieldInspector+ armedTool={armedTool}+ selectedSigner={selectedSigner}+ />+ )}+ </div>+ </section>++ <SelectedSignerPanel+ armedTool={armedTool}+ selectedSigner={selectedSigner}+ />+ </div>+ </aside>+ </div>++ {isMobileToolsOpen ? (+ <div className="fixed inset-0 z-40 lg:hidden">+ <button+ aria-label="Close field tools"+ className="absolute inset-0 bg-[rgba(17,17,17,0.36)]"+ onClick={() => setIsMobileToolsOpen(false)}+ type="button"+ />+ <div+ aria-label="Field tools"+ className="absolute inset-x-0 bottom-0 rounded-t-[32px] border border-(--border) bg-[rgba(255,255,255,0.94)] px-4 py-5 shadow-[0_-24px_60px_rgba(17,17,17,0.18)]"+ role="dialog"+ >+ <div className="mx-auto mb-4 h-1.5 w-14 rounded-full bg-(--border)" />+ <div className="space-y-4">+ <div className="flex items-center justify-between">+ <p className="text-xs font-semibold uppercase tracking-[0.24em] text-(--tertiary)">+ Fields+ </p>+ <button+ className="text-sm font-semibold text-muted-foreground"+ onClick={() => setIsMobileToolsOpen(false)}+ type="button"+ >+ Done+ </button>+ </div>+ <div className="grid gap-3 sm:grid-cols-2">+ {fieldTools.map((tool) => (+ <FieldToolButton+ isActive={armedTool === tool.type}+ key={`mobile-${tool.type}`}+ onSelect={() =>+ handleToolSelect(+ tool.type,+ setArmedTool,+ setSelectedFieldId,+ setIsMobileToolsOpen,+ )+ }+ tool={tool}+ />+ ))}+ </div>+ </div>+ </div>+ </div>+ ) : null}+ </CanvasShell>+ );+}++function FieldToolButton({ isActive, onSelect, tool }: FieldToolButtonProps) {+ return (+ <button+ aria-label={tool.label}+ aria-pressed={isActive}+ className={`flex min-h-12 items-center justify-between rounded-none border px-4 text-left text-sm font-semibold transition ${+ isActive+ ? "border-[rgba(180,35,53,0.28)] bg-[rgba(180,35,53,0.08)] text-(--fg)"+ : "border-(--border) bg-(--surface) text-(--fg) hover:border-[rgba(17,17,17,0.16)] hover:bg-white"+ }`}+ onClick={onSelect}+ type="button"+ >+ <span>{tool.label}</span>+ <span className="text-xs uppercase tracking-[0.16em] text-(--tertiary)">+ Place+ </span>+ </button>+ );+}++function SignerCard({+ fieldCount,+ hasSignatureField,+ isActive,+ onSelect,+ signer,+}: SignerCardProps) {+ return (+ <button+ aria-pressed={isActive}+ className={`w-full border px-4 py-4 text-left transition ${+ isActive+ ? "border-black bg-white"+ : "border-(--border) bg-white hover:border-[rgba(17,17,17,0.16)]"+ }`}+ onClick={onSelect}+ type="button"+ >+ <div className="flex items-start gap-3">+ <span+ className="mt-0.5 inline-flex size-10 items-center justify-center rounded-full text-sm font-semibold"+ style={{+ backgroundColor: signer.tint,+ color: signer.color,+ }}+ >+ {signer.name+ .split(" ")+ .map((part) => part[0])+ .join("")}+ </span>+ <div className="min-w-0">+ <p className="text-sm font-semibold text-(--fg)">{signer.name}</p>+ <p className="mt-1 text-xs text-muted-foreground">+ {fieldCount} field{fieldCount === 1 ? "" : "s"} placed+ </p>+ <p+ className="mt-2 text-xs font-semibold uppercase tracking-[0.18em]"+ style={{+ color: hasSignatureField ? signer.color : "var(--accent)",+ }}+ >+ {hasSignatureField ? "Signature ready" : "Signature needed"}+ </p>+ </div>+ </div>+ </button>+ );+}++function EmptyFieldInspector({+ armedTool,+ selectedSigner,+}: {+ armedTool: PrepareFieldType | null;+ selectedSigner: PrepareShellSigner;+}) {+ const activeTool = armedTool ? getFieldTool(armedTool) : null;++ return (+ <div className="border border-dashed border-(--border) bg-[rgba(247,247,248,0.92)] px-4 py-5">+ <p className="text-sm font-semibold text-(--fg)">+ {activeTool ? `${activeTool.label} ready to place` : "No field selected"}+ </p>+ <p className="mt-3 text-sm leading-6 text-muted-foreground">+ {activeTool+ ? `Click the document to place ${activeTool.label.toLowerCase()} for ${selectedSigner.name}.`+ : "Select a field on the page to edit its settings, or choose a field tool on the left to place a new one."}+ </p>+ </div>+ );+}++function SelectedSignerPanel({+ armedTool,+ selectedSigner,+}: {+ armedTool: PrepareFieldType | null;+ selectedSigner: PrepareShellSigner;+}) {+ const activeTool = armedTool ? getFieldTool(armedTool) : null;++ return (+ <section className="space-y-4 border border-(--border) bg-(--surface) p-4">+ <p className="text-xs font-semibold uppercase tracking-[0.24em] text-(--tertiary)">+ Selected signer+ </p>+ <div className="flex items-center gap-3">+ <span+ className="inline-flex size-10 items-center justify-center rounded-full text-sm font-semibold"+ style={{+ backgroundColor: selectedSigner.tint,+ color: selectedSigner.color,+ }}+ >+ {selectedSigner.name+ .split(" ")+ .map((part) => part[0])+ .join("")}+ </span>+ <div className="min-w-0">+ <p className="text-sm font-semibold text-(--fg)">+ {selectedSigner.name}+ </p>+ <p className="mt-1 text-sm text-muted-foreground">+ {activeTool+ ? `Placing ${activeTool.label.toLowerCase()}`+ : "New fields will be assigned here"}+ </p>+ </div>+ </div>+ </section>+ );+}++function SaveStatusIndicator({+ onRetrySave,+ saveError,+ saveState,+}: {+ onRetrySave: () => void;+ saveError: string | null;+ saveState: SaveState;+}) {+ const isError = saveState === "error" && saveError;+ const isSaving = saveState === "saving";++ return (+ <div+ aria-live="polite"+ className={`inline-flex min-h-11 items-center gap-3 border px-3 py-2 text-sm ${+ isError+ ? "border-[rgba(180,35,53,0.18)] bg-[rgba(180,35,53,0.06)]"+ : "border-(--border) bg-white"+ }`}+ role={isError ? "alert" : "status"}+ >+ <span+ aria-hidden="true"+ className={`inline-flex size-5 items-center justify-center rounded-full ${+ isError+ ? "bg-[rgba(180,35,53,0.12)] text-(--accent)"+ : isSaving+ ? "bg-[rgba(17,17,17,0.04)] text-(--fg)"+ : "bg-[rgba(24,132,74,0.12)] text-[rgb(24,132,74)]"+ }`}+ >+ {isError ? (+ <span className="text-[13px] font-semibold leading-none">!</span>+ ) : isSaving ? (+ <span className="size-3.5 animate-spin rounded-full border-2 border-[rgba(17,17,17,0.18)] border-t-(--fg)" />+ ) : (+ <svg+ aria-hidden="true"+ className="size-3.5"+ fill="none"+ viewBox="0 0 16 16"+ >+ <path+ d="M3.5 8.5 6.5 11.5 12.5 4.5"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="2"+ />+ </svg>+ )}+ </span>+ <div className="min-w-0">+ <p className="font-semibold text-(--fg)">+ {isError ? "Save failed" : isSaving ? "Saving..." : "Saved"}+ </p>+ {saveError ? (+ <p className="truncate text-xs text-(--accent)">{saveError}</p>+ ) : null}+ </div>+ {isError ? (+ <button+ className="inline-flex min-h-9 items-center justify-center border border-[rgba(180,35,53,0.14)] bg-white px-3 [font-family:var(--font-mono)] text-[0.68rem] font-semibold uppercase tracking-[0.16em] text-(--accent)"+ onClick={onRetrySave}+ type="button"+ >+ Retry+ </button>+ ) : null}+ </div>+ );+}++function FieldEditor({+ field,+ onDelete,+ onSetRequired,+ onSignerChange,+ signers,+}: FieldEditorProps) {+ const tool = getFieldTool(field.type);+ const isOptionalField = field.type === "text" || field.type === "checkbox";++ return (+ <section aria-label="Field settings" role="region">+ <div>+ <p className="text-xs font-semibold uppercase tracking-[0.22em] text-(--tertiary)">+ Field settings+ </p>+ <p className="mt-2 text-sm font-semibold text-(--fg)">{tool.label}</p>+ </div>++ <div className="mt-4 space-y-4">+ <div>+ <p className="text-xs font-semibold uppercase tracking-[0.2em] text-(--tertiary)">+ Assigned to+ </p>+ <div className="mt-3 grid gap-2 sm:grid-cols-2">+ {signers.map((signer) => (+ <button+ className={`min-h-11 rounded-none border px-3 text-sm font-semibold transition ${+ field.signerId === signer.id+ ? "border-transparent bg-(--fg) text-white"+ : "border-(--border) bg-(--surface) text-(--fg) hover:bg-white"+ }`}+ key={signer.id}+ onClick={() => onSignerChange(signer.id)}+ type="button"+ >+ {signer.name}+ </button>+ ))}+ </div>+ </div>++ {isOptionalField ? (+ <div>+ <div className="border border-(--border) bg-(--surface) px-4 py-3">+ <p className="text-xs font-semibold uppercase tracking-[0.2em] text-(--tertiary)">+ Required+ </p>+ <div className="mt-3 grid gap-2 sm:grid-cols-2">+ {[+ {+ label: "Required",+ value: true,+ },+ {+ label: "Optional",+ value: false,+ },+ ].map((option) => (+ <button+ className={`min-h-11 rounded-none border px-3 text-sm font-semibold transition ${+ field.required === option.value+ ? "border-transparent bg-(--fg) text-white"+ : "border-(--border) bg-(--surface) text-(--fg) hover:bg-white"+ }`}+ key={option.label}+ onClick={() => onSetRequired(option.value)}+ type="button"+ >+ {option.label}+ </button>+ ))}+ </div>+ </div>+ </div>+ ) : null}++ <button+ className="inline-flex min-h-11 w-full items-center justify-center rounded-none border border-[rgba(180,35,53,0.16)] bg-[rgba(180,35,53,0.08)] px-5 [font-family:var(--font-mono)] text-[0.72rem] font-semibold uppercase tracking-[0.18em] text-(--accent) transition hover:bg-[rgba(180,35,53,0.14)]"+ onClick={onDelete}+ type="button"+ >+ Delete+ </button>+ </div>+ </section>+ );+}++function handleToolSelect(+ tool: PrepareFieldType,+ setArmedTool: Dispatch<SetStateAction<PrepareFieldType | null>>,+ setSelectedFieldId: Dispatch<SetStateAction<string | null>>,+ setIsMobileToolsOpen: Dispatch<SetStateAction<boolean>>,+) {+ setSelectedFieldId(null);+ setArmedTool((currentTool) => (currentTool === tool ? null : tool));+ setIsMobileToolsOpen(false);+}++function placeField(+ event: MouseEvent<HTMLButtonElement>,+ activePage: number,+ armedTool: PrepareFieldType,+ fieldCounterRef: MutableRefObject<number>,+ selectedSignerId: string,+ setArmedTool: Dispatch<SetStateAction<PrepareFieldType | null>>,+ setFields: Dispatch<SetStateAction<PrepareField[]>>,+ setSelectedFieldId: Dispatch<SetStateAction<string | null>>,+) {+ const pageRect = event.currentTarget.getBoundingClientRect();+ const tool = getFieldTool(armedTool);+ const nextRect = placeFieldAtViewportPoint({+ clientX: event.clientX - pageRect.left,+ clientY: event.clientY - pageRect.top,+ fieldHeight: tool.defaultHeight,+ fieldWidth: tool.defaultWidth,+ viewportHeight: pageRect.height,+ viewportWidth: pageRect.width,+ });++ fieldCounterRef.current += 1;+ const nextField: PrepareField = {+ ...nextRect,+ id:+ typeof window !== "undefined" && "crypto" in window+ ? window.crypto.randomUUID()+ : `field-${fieldCounterRef.current}`,+ label: undefined,+ page: activePage,+ required: tool.type === "text" || tool.type === "checkbox" ? false : true,+ signerId: selectedSignerId,+ type: tool.type,+ };++ setFields((currentFields) => [...currentFields, nextField]);+ setSelectedFieldId(nextField.id);+ setArmedTool(null);+}++function reassignField(+ fieldId: string,+ signerId: string,+ setFields: Dispatch<SetStateAction<PrepareField[]>>,+) {+ setFields((currentFields) =>+ currentFields.map((field) =>+ field.id === fieldId ? { ...field, signerId } : field,+ ),+ );+}++function moveField(+ fieldId: string,+ deltaX: number,+ deltaY: number,+ setFields: Dispatch<SetStateAction<PrepareField[]>>,+) {+ if (deltaX === 0 && deltaY === 0) {+ return;+ }++ setFields((currentFields) =>+ currentFields.map((field) =>+ field.id === fieldId+ ? {+ ...field,+ ...moveFieldRect({+ deltaX,+ deltaY,+ rect: field,+ }),+ }+ : field,+ ),+ );+}++function resizeField(+ fieldId: string,+ corner: FieldResizeHandle,+ deltaX: number,+ deltaY: number,+ setFields: Dispatch<SetStateAction<PrepareField[]>>,+) {+ if (deltaX === 0 && deltaY === 0) {+ return;+ }++ setFields((currentFields) =>+ currentFields.map((field) => {+ if (field.id !== fieldId) {+ return field;+ }++ const tool = getFieldTool(field.type);+ const resizedRect = resizeFieldRectFromHandle({+ corner,+ deltaX,+ deltaY,+ minHeight: tool.minHeight,+ minWidth: tool.minWidth,+ rect: field,+ });++ return {+ ...field,+ ...resizedRect,+ };+ }),+ );+}++function setFieldRequired(+ fieldId: string,+ required: boolean,+ setFields: Dispatch<SetStateAction<PrepareField[]>>,+) {+ setFields((currentFields) =>+ currentFields.map((field) => {+ if (field.id !== fieldId) {+ return field;+ }++ if (field.type !== "text" && field.type !== "checkbox") {+ return field;+ }++ return {+ ...field,+ required,+ };+ }),+ );+}++function deleteField(+ fieldId: string,+ setFields: Dispatch<SetStateAction<PrepareField[]>>,+ setSelectedFieldId: Dispatch<SetStateAction<string | null>>,+) {+ setFields((currentFields) =>+ currentFields.filter((field) => field.id !== fieldId),+ );+ setSelectedFieldId(null);+}++function changePage(+ nextPage: number,+ pageCount: number,+ setActivePage: Dispatch<SetStateAction<number>>,+ setSelectedFieldId: Dispatch<SetStateAction<string | null>>,+ setArmedTool: Dispatch<SetStateAction<PrepareFieldType | null>>,+) {+ setActivePage(clamp(nextPage, 1, pageCount));+ setSelectedFieldId(null);+ setArmedTool(null);+}++function clamp(value: number, min: number, max: number) {+ return Math.min(Math.max(value, min), max);+}diff --git a/src/components/envelopes/review-shell.tsx b/src/components/envelopes/review-shell.tsxnew file mode 100644index 0000000..e9a4df7--- /dev/null+++ b/src/components/envelopes/review-shell.tsx@@ -0,0 +1,500 @@+"use client";++import Link from "next/link";+import { useEffect, useRef, useState } from "react";++import { ShellButton } from "@/components/shared/form-shell";+import { PageHeader } from "@/components/shared/page-header";+import { StatusPanel } from "@/components/shared/status-panel";+import { StepIndicator } from "@/components/shared/step-indicator";+import { Checkbox } from "@/components/ui/checkbox";+import {+ Dialog,+ DialogContent,+ DialogDescription,+ DialogHeader,+ DialogTitle,+} from "@/components/ui/dialog";+import type { ReviewEnvelopeData } from "@/lib/envelopes";+import { getSignerPalette } from "./signer-palette";++const envelopeSteps = ["Upload", "Signers", "Place fields", "Review"];+const redirectDelayMs = 1200;+const defaultSendErrorMessage = "Failed to send. Please try again.";++type ReviewShellProps = {+ envelopeId: string;+ initialState?: "error";+ record?: ReviewEnvelopeData;+};++type ReviewRecordView = {+ filename: string;+ pageCount: number;+ signers: readonly ReviewSigner[];+ sizeLabel: string;+ title: string;+};++type ReviewFieldSummaryLabel =+ | "Checkbox"+ | "Date"+ | "Initials"+ | "Signature"+ | "Text";++type ReviewSigner = {+ color?: string;+ email: string;+ fieldSummaries: readonly ReviewFieldSummaryLabel[];+ id: string;+ name: string;+ order: number;+ tint?: string;+};++type SendPhase = "error" | "idle" | "sending";++function buildSuccessMessage(firstSignerName: string) {+ return `Envelope sent. ${firstSignerName} has been notified.`;+}++export function ReviewShell({+ envelopeId,+ initialState,+ record,+}: ReviewShellProps) {+ const [isConfirmationOpen, setIsConfirmationOpen] = useState(false);+ const [notice, setNotice] = useState<string | null>(null);+ const [sendPhase, setSendPhase] = useState<SendPhase>("idle");+ const [sendError, setSendError] = useState<string | null>(null);+ const sendTimeoutRef = useRef<number | null>(null);++ useEffect(() => {+ return () => {+ if (sendTimeoutRef.current) {+ window.clearTimeout(sendTimeoutRef.current);+ }+ };+ }, []);++ function closeConfirmation() {+ if (sendPhase === "sending") {+ return;+ }++ setSendPhase("idle");+ setIsConfirmationOpen(false);+ }++ function openConfirmation() {+ setNotice(null);+ setSendError(null);+ setSendPhase("idle");+ setIsConfirmationOpen(true);+ }++ async function handleConfirmSend() {+ if (sendPhase === "sending") {+ return;+ }++ if (sendTimeoutRef.current) {+ window.clearTimeout(sendTimeoutRef.current);+ sendTimeoutRef.current = null;+ }++ setSendError(null);+ setSendPhase("sending");++ try {+ const response = await fetch(`/api/envelopes/${envelopeId}/send`, {+ body: JSON.stringify({+ permittedUseConfirmed: true,+ }),+ headers: {+ "content-type": "application/json",+ },+ method: "POST",+ });+ const payload = (await response.json().catch(() => null)) as {+ error?: string;+ notifiedSignerName?: string;+ redirectPath?: string;+ } | null;++ if (!response.ok) {+ setSendError(payload?.error ?? defaultSendErrorMessage);+ setSendPhase("error");+ return;+ }++ const notifiedSignerName =+ payload?.notifiedSignerName?.trim() || firstSigner?.name || "Signer 1";+ const redirectPath = payload?.redirectPath || `/envelopes/${envelopeId}`;++ setIsConfirmationOpen(false);+ setNotice(buildSuccessMessage(notifiedSignerName));+ setSendPhase("idle");+ sendTimeoutRef.current = window.setTimeout(() => {+ window.location.assign(redirectPath);+ }, redirectDelayMs);+ } catch {+ setSendError(defaultSendErrorMessage);+ setSendPhase("error");+ }+ }++ if (initialState === "error") {+ return (+ <div className="space-y-6">+ <PageHeader+ description="Step 4 of 4 - Review and send"+ title="New envelope"+ />+ <StepIndicator current={4} steps={envelopeSteps} />+ <StatusPanel+ footer={+ <ShellButton+ onClick={() => window.location.reload()}+ variant="secondary"+ >+ Retry+ </ShellButton>+ }+ description="We couldn't load this draft summary. Try again after checking the earlier steps."+ title="Couldn't load the review summary"+ tone="error"+ />+ </div>+ );+ }++ if (!record || record.isEmpty) {+ return (+ <div className="space-y-6">+ <PageHeader+ description="Step 4 of 4 - Review and send"+ title="New envelope"+ />+ <StepIndicator current={4} steps={envelopeSteps} />+ <StatusPanel+ action={{+ href: `/envelopes/${envelopeId}/prepare`,+ label: "Back to prepare",+ }}+ description="Add signers and place fields before you review the final summary for this envelope."+ eyebrow="Incomplete draft"+ title="Nothing to review yet"+ />+ </div>+ );+ }++ const activeRecord: ReviewRecordView = {+ filename: record.filename,+ pageCount: record.pageCount,+ signers: record.signers.map((signer) => ({ ...signer })),+ sizeLabel: record.sizeLabel,+ title: record.title,+ };+ const canSend = Boolean(record.canSend);+ const disabledReason = record.disabledReason ?? null;+ const firstSigner = activeRecord.signers[0];++ return (+ <div className="space-y-8">+ <PageHeader+ description="Step 4 of 4 - Review and send"+ eyebrow="Envelope workflow"+ title="New envelope"+ />++ <StepIndicator current={4} steps={envelopeSteps} />++ {notice ? (+ <section+ className="border border-[rgba(5,150,105,0.18)] bg-[rgba(5,150,105,0.05)] px-5 py-4"+ role="status"+ >+ <p className="text-sm font-semibold text-chart-4">{notice}</p>+ <p className="mt-1 text-sm leading-6 text-muted-foreground">+ Opening the envelope detail view...+ </p>+ </section>+ ) : null}++ <section+ className="editorial-panel p-6 sm:p-8"+ data-animate="enter"+ data-animate-delay="2"+ >+ <div className="grid gap-6 xl:grid-cols-[minmax(0,0.42fr)_minmax(0,0.58fr)]">+ <article className="border border-(--border) bg-(--surface) p-5 sm:p-6">+ <div className="space-y-3">+ <p className="section-eyebrow">Document</p>+ <div className="space-y-2">+ <h2 className="text-[24px] font-semibold tracking-[-0.04em] text-(--fg)">+ {activeRecord.title}+ </h2>+ <p className="text-sm leading-6 text-muted-foreground">+ {activeRecord.filename} - {activeRecord.pageCount} pages -{" "}+ {activeRecord.sizeLabel}+ </p>+ </div>+ </div>+ </article>++ <article className="border border-(--border) bg-white p-5 sm:p-6">+ <div className="flex items-center justify-between gap-3">+ <h2 className="text-lg font-semibold tracking-[-0.03em] text-(--fg)">+ Signing order+ </h2>+ <span className="text-xs font-semibold uppercase tracking-[0.24em] text-(--tertiary)">+ {activeRecord.signers.length}{" "}+ {activeRecord.signers.length === 1 ? "signer" : "signers"}+ </span>+ </div>++ <ol className="mt-5 space-y-4">+ {activeRecord.signers.map((signer, index) => {+ const palette =+ signer.color && signer.tint+ ? { color: signer.color, tint: signer.tint }+ : getSignerPalette(index);++ return (+ <li+ className="border border-(--border) bg-(--surface) p-4"+ key={signer.id}+ >+ <div className="flex items-start gap-4">+ <span+ className="inline-flex size-11 shrink-0 items-center justify-center rounded-full text-sm font-semibold"+ style={{+ backgroundColor: palette.tint,+ color: palette.color,+ }}+ >+ {signer.order}+ </span>++ <div className="min-w-0 flex-1">+ <div className="flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between">+ <div className="min-w-0">+ <p className="truncate text-base font-semibold text-(--fg)">+ {signer.name}+ </p>+ <p className="truncate text-sm text-muted-foreground">+ {signer.email}+ </p>+ </div>+ <span+ className="inline-flex w-fit items-center gap-2 rounded-full px-3 py-1 text-xs font-semibold uppercase tracking-[0.18em]"+ style={{+ backgroundColor: palette.tint,+ color: palette.color,+ }}+ >+ <span+ aria-hidden="true"+ className="size-2 rounded-full"+ style={{ backgroundColor: palette.color }}+ />+ Signer {signer.order}+ </span>+ </div>++ <p+ className={`mt-3 text-sm leading-6 ${+ signer.fieldSummaries.includes("Signature")+ ? "text-muted-foreground"+ : "font-semibold text-(--accent)"+ }`}+ >+ {formatSignerFieldSummary(signer.fieldSummaries)}+ </p>+ </div>+ </div>+ </li>+ );+ })}+ </ol>+ </article>+ </div>++ <div className="mt-6 border border-(--border) bg-white px-5 py-5 sm:px-6">+ <p className="text-sm leading-7 text-muted-foreground">+ After you send, Signer 1 will receive an email with a link to sign.+ Each signer is notified in order after the previous signer+ completes.+ </p>+ </div>++ {disabledReason ? (+ <div+ className="mt-6 border border-[rgba(180,35,53,0.18)] bg-[rgba(180,35,53,0.04)] px-5 py-4"+ role="alert"+ >+ <p className="text-sm font-semibold text-(--accent)">+ {disabledReason}+ </p>+ </div>+ ) : null}++ <div className="mt-6 flex flex-col-reverse gap-3 sm:flex-row sm:justify-end">+ <ShellButton+ href={`/envelopes/${envelopeId}/prepare`}+ variant="secondary"+ >+ ← Back+ </ShellButton>+ <ShellButton disabled={!canSend} onClick={openConfirmation}>+ Send envelope+ </ShellButton>+ </div>+ </section>++ {isConfirmationOpen ? (+ <SendConfirmationDialog+ errorMessage={sendPhase === "error" ? sendError : null}+ firstSignerName={firstSigner?.name ?? "Signer 1"}+ isSending={sendPhase === "sending"}+ onCancel={closeConfirmation}+ onConfirm={handleConfirmSend}+ signerCount={activeRecord.signers.length}+ title={activeRecord.title}+ />+ ) : null}+ </div>+ );+}++type SendConfirmationDialogProps = {+ errorMessage: string | null;+ firstSignerName: string;+ isSending: boolean;+ onCancel: () => void;+ onConfirm: () => void;+ signerCount: number;+ title: string;+};++function SendConfirmationDialog({+ errorMessage,+ firstSignerName,+ isSending,+ onCancel,+ onConfirm,+ signerCount,+ title,+}: SendConfirmationDialogProps) {+ const [isPermittedUseConfirmed, setIsPermittedUseConfirmed] = useState(false);++ return (+ <Dialog+ open+ onOpenChange={(open) => {+ if (!open && !isSending) {+ onCancel();+ }+ }}+ >+ <DialogContent+ className="max-w-md rounded-none border-(--border) sm:p-8"+ showCloseButton={false}+ >+ <div className="space-y-4">+ <DialogHeader className="space-y-3">+ <DialogTitle className="text-xl tracking-[-0.03em]">+ Send this envelope?+ </DialogTitle>+ <DialogDescription asChild>+ <div className="space-y-3 text-sm leading-6 text-muted-foreground">+ <p>+ "{title}" will be sent to {signerCount}{" "}+ {signerCount === 1 ? "signer" : "signers"}.{" "}+ {signerCount === 1+ ? `${firstSignerName} will be notified immediately.`+ : `The first signer (${firstSignerName}) will be notified immediately.`}+ </p>+ </div>+ </DialogDescription>+ </DialogHeader>++ <label className="block border border-(--border) bg-(--surface) px-4 py-4">+ <span className="flex items-start gap-3">+ <Checkbox+ autoFocus+ checked={isPermittedUseConfirmed}+ className="mt-1"+ disabled={isSending}+ onCheckedChange={(checked) =>+ setIsPermittedUseConfirmed(checked === true)+ }+ />+ <span className="text-sm leading-6 text-muted-foreground">+ By sending, you confirm this document is an ordinary business+ agreement and not a will, court order, legally required consumer+ disclosure, or other excluded document type described in the{" "}+ <Link+ className="font-semibold text-(--fg)"+ href="/terms"+ rel="noreferrer"+ style={{+ textDecorationColor: "rgba(17,17,17,0.35)",+ textDecorationLine: "underline",+ textDecorationThickness: "1px",+ textUnderlineOffset: "4px",+ }}+ target="_blank"+ >+ Terms of Service+ </Link>+ .+ </span>+ </span>+ </label>++ {errorMessage ? (+ <div+ className="border border-[rgba(180,35,53,0.18)] bg-[rgba(180,35,53,0.04)] px-4 py-3"+ role="alert"+ >+ <p className="text-sm font-semibold text-(--accent)">+ {errorMessage}+ </p>+ </div>+ ) : null}++ <div className="flex flex-wrap justify-end gap-3 pt-2">+ <ShellButton+ disabled={isSending}+ onClick={onCancel}+ variant="secondary"+ >+ Cancel+ </ShellButton>+ <ShellButton+ disabled={!isPermittedUseConfirmed}+ loading={isSending}+ onClick={onConfirm}+ >+ {isSending ? "Sending..." : "Send now"}+ </ShellButton>+ </div>+ </div>+ </DialogContent>+ </Dialog>+ );+}++function formatSignerFieldSummary(fields: readonly ReviewFieldSummaryLabel[]) {+ const fieldCount = fields.length;++ if (fieldCount === 0) {+ return "No fields placed yet (0 fields)";+ }++ return `(${fieldCount} field${fieldCount === 1 ? "" : "s"})`;+}diff --git a/src/components/envelopes/signer-palette.ts b/src/components/envelopes/signer-palette.tsnew file mode 100644index 0000000..1f9ad8f--- /dev/null+++ b/src/components/envelopes/signer-palette.ts@@ -0,0 +1,32 @@+export type SignerPalette = {+ color: string;+ tint: string;+};++export function getSignerPalette(index: number): SignerPalette {+ if (index === 0) {+ return {+ color: "var(--signer-1)",+ tint: "var(--signer-1-tint)",+ };+ }++ if (index === 1) {+ return {+ color: "var(--signer-2)",+ tint: "var(--signer-2-tint)",+ };+ }++ if (index === 2) {+ return {+ color: "var(--signer-3)",+ tint: "var(--signer-3-tint)",+ };+ }++ return {+ color: "var(--signer-4)",+ tint: "var(--signer-4-tint)",+ };+}diff --git a/src/components/envelopes/signers-shell.tsx b/src/components/envelopes/signers-shell.tsxnew file mode 100644index 0000000..094f03f--- /dev/null+++ b/src/components/envelopes/signers-shell.tsx@@ -0,0 +1,613 @@+"use client";++import { useRef, useState, type ChangeEvent } from "react";++import {+ ChevronLeftIcon,+ ChevronRightIcon,+} from "@/components/layout/nav-items";+import { ShellButton } from "@/components/shared/form-shell";+import { PageHeader } from "@/components/shared/page-header";+import { StatusPanel } from "@/components/shared/status-panel";+import { StepIndicator } from "@/components/shared/step-indicator";+import type { DraftSignerStepData } from "@/lib/envelopes";+import {+ duplicateSignerEmailMessage,+ type ReplaceSignersResponse,+} from "@/lib/schemas/signer";+import { MAX_SIGNERS_PER_ENVELOPE } from "@/lib/types/domain";+import { getSignerPalette } from "./signer-palette";++const envelopeSteps = ["Upload", "Signers", "Place fields", "Review"];+const validEmailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;+const genericSubmitError = "Something went wrong. Please try again.";++type SignersShellProps = {+ envelopeId: string;+ initialState?: "error";+ record?: DraftSignerStepData;+};++type SignerField = "email" | "name";++type ShellSigner = {+ email: string;+ localId: string;+ name: string;+ signerId?: string;+ touched: Record<SignerField, boolean>;+};++type SignerErrors = {+ email?: string;+ name?: string;+};++type InitialModel = {+ showAllErrors: boolean;+ signers: ShellSigner[];+};++function createSigner(+ localId: string,+ overrides?: Partial<Omit<ShellSigner, "localId" | "touched">> & {+ touched?: Partial<Record<SignerField, boolean>>;+ },+): ShellSigner {+ return {+ email: overrides?.email ?? "",+ localId,+ name: overrides?.name ?? "",+ signerId: overrides?.signerId,+ touched: {+ email: overrides?.touched?.email ?? false,+ name: overrides?.touched?.name ?? false,+ },+ };+}++function buildInitialModel(record?: DraftSignerStepData): InitialModel {+ const signers =+ record?.signers+ .slice()+ .sort((left, right) => left.order - right.order)+ .map((signer) =>+ createSigner(signer.id, {+ email: signer.email,+ name: signer.name,+ signerId: signer.id,+ touched: { email: true, name: true },+ }),+ ) ?? [];++ return {+ showAllErrors: false,+ signers: signers.length > 0 ? signers : [createSigner("signer-1")],+ };+}++function buildSignerErrors(signers: readonly ShellSigner[]) {+ const errorsBySignerId: Record<string, SignerErrors> = {};+ const emailCounts = signers.reduce<Record<string, number>>(+ (counts, signer) => {+ const normalizedEmail = signer.email.trim().toLowerCase();++ if (normalizedEmail.length > 0) {+ counts[normalizedEmail] = (counts[normalizedEmail] ?? 0) + 1;+ }++ return counts;+ },+ {},+ );++ for (const signer of signers) {+ const signerErrors: SignerErrors = {};+ const normalizedName = signer.name.trim();+ const normalizedEmail = signer.email.trim().toLowerCase();++ if (normalizedName.length === 0) {+ signerErrors.name = "Name is required";+ }++ if (+ normalizedEmail.length === 0 ||+ !validEmailPattern.test(normalizedEmail)+ ) {+ signerErrors.email = "Enter a valid email address";+ } else if (emailCounts[normalizedEmail] > 1) {+ signerErrors.email = duplicateSignerEmailMessage;+ }++ errorsBySignerId[signer.localId] = signerErrors;+ }++ return errorsBySignerId;+}++function hasSignerErrors(errors: SignerErrors) {+ return Boolean(errors.name || errors.email);+}++function reorderSigners(+ signers: ShellSigner[],+ signerLocalId: string,+ direction: "earlier" | "later",+) {+ const signerIndex = signers.findIndex(+ (signer) => signer.localId === signerLocalId,+ );++ if (signerIndex === -1) {+ return signers;+ }++ const targetIndex =+ direction === "earlier" ? signerIndex - 1 : signerIndex + 1;++ if (targetIndex < 0 || targetIndex >= signers.length) {+ return signers;+ }++ const nextSigners = [...signers];+ const [movedSigner] = nextSigners.splice(signerIndex, 1);+ nextSigners.splice(targetIndex, 0, movedSigner);+ return nextSigners;+}++function buildSignerRequest(signers: readonly ShellSigner[]) {+ return {+ signers: signers.map((signer, index) => ({+ email: signer.email,+ id: signer.signerId,+ name: signer.name,+ signOrder: index + 1,+ })),+ };+}++async function parseJsonResponse<T>(+ response: Response,+): Promise<{ data: T | null; error: string | null }> {+ const payload = (await response.json().catch(() => null)) as+ | { error?: string }+ | T+ | null;++ if (!response.ok) {+ return {+ data: null,+ error:+ payload &&+ typeof payload === "object" &&+ "error" in payload &&+ typeof payload.error === "string"+ ? payload.error+ : genericSubmitError,+ };+ }++ return {+ data: payload as T | null,+ error: null,+ };+}++function SignerCard({+ canMoveEarlier,+ canMoveLater,+ canRemove,+ disabled = false,+ emailError,+ index,+ nameError,+ onChange,+ onBlur,+ onMove,+ onRemove,+ signer,+}: {+ canMoveEarlier: boolean;+ canMoveLater: boolean;+ canRemove: boolean;+ disabled?: boolean;+ emailError?: string;+ index: number;+ nameError?: string;+ onChange: (field: SignerField, value: string) => void;+ onBlur: (field: SignerField) => void;+ onMove: (direction: "earlier" | "later") => void;+ onRemove: () => void;+ signer: ShellSigner;+}) {+ const palette = getSignerPalette(index);+ const order = index + 1;+ const routeLabel =+ order === 1+ ? "Receives the invitation immediately after send."+ : `Receives the document after Signer ${order - 1} finishes.`;++ return (+ <li className="border border-(--border) bg-white p-5 sm:p-6">+ <div className="flex flex-col gap-4">+ <div className="flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between">+ <div className="space-y-3">+ <span+ className="inline-flex w-fit items-center gap-2 rounded-full px-3 py-1 text-xs font-semibold uppercase tracking-[0.22em]"+ style={{+ backgroundColor: palette.tint,+ color: palette.color,+ }}+ >+ <span+ aria-hidden="true"+ className="size-2 rounded-full"+ style={{ backgroundColor: palette.color }}+ />+ Signer {order}+ </span>+ <p className="text-sm leading-6 text-muted-foreground">+ {routeLabel}+ </p>+ </div>++ <div className="flex flex-wrap items-center gap-2">+ <button+ aria-label={`Move signer ${order} earlier`}+ className="inline-flex min-h-11 items-center justify-center rounded-none border border-(--border) bg-white px-4 [font-family:var(--font-mono)] text-[0.72rem] font-semibold uppercase tracking-[0.18em] text-muted-foreground transition hover:border-black hover:text-(--fg) disabled:cursor-not-allowed disabled:text-(--placeholder)"+ disabled={disabled || !canMoveEarlier}+ onClick={() => onMove("earlier")}+ type="button"+ >+ <ChevronLeftIcon className="mr-1 size-4" />+ Earlier+ </button>+ <button+ aria-label={`Move signer ${order} later`}+ className="inline-flex min-h-11 items-center justify-center rounded-none border border-(--border) bg-white px-4 [font-family:var(--font-mono)] text-[0.72rem] font-semibold uppercase tracking-[0.18em] text-muted-foreground transition hover:border-black hover:text-(--fg) disabled:cursor-not-allowed disabled:text-(--placeholder)"+ disabled={disabled || !canMoveLater}+ onClick={() => onMove("later")}+ type="button"+ >+ Later+ <ChevronRightIcon className="ml-1 size-4" />+ </button>+ <button+ aria-label={`Remove signer ${order}`}+ className="inline-flex min-h-11 items-center justify-center rounded-none border border-(--border) bg-white px-4 [font-family:var(--font-mono)] text-[0.72rem] font-semibold uppercase tracking-[0.18em] text-muted-foreground transition hover:border-black hover:text-(--fg) disabled:cursor-not-allowed disabled:text-(--placeholder)"+ disabled={disabled || !canRemove}+ onClick={onRemove}+ type="button"+ >+ Remove+ </button>+ </div>+ </div>++ <div className="grid gap-4 md:grid-cols-2">+ <label className="grid auto-rows-min gap-2 text-sm">+ <span className="font-semibold text-(--fg)">Name</span>+ <input+ aria-invalid={nameError ? true : undefined}+ aria-label={`Signer ${order} name`}+ className={`min-h-12 rounded-none border bg-popover px-4 text-(--fg) outline-none placeholder:text-(--placeholder) disabled:cursor-not-allowed disabled:bg-[rgba(247,247,248,0.92)] ${+ nameError+ ? "border-[rgba(180,35,53,0.36)]"+ : "border-(--border)"+ }`}+ disabled={disabled}+ onChange={(event: ChangeEvent<HTMLInputElement>) =>+ onChange("name", event.target.value)+ }+ onBlur={() => onBlur("name")}+ placeholder="Jane Smith"+ type="text"+ value={signer.name}+ />+ <span+ aria-live="polite"+ className={`min-h-4 text-xs font-semibold text-(--accent) ${+ nameError ? "" : "invisible"+ }`}+ role={nameError ? "alert" : undefined}+ >+ {nameError ?? " "}+ </span>+ </label>++ <label className="grid auto-rows-min gap-2 text-sm">+ <span className="font-semibold text-(--fg)">Email</span>+ <input+ aria-invalid={emailError ? true : undefined}+ aria-label={`Signer ${order} email`}+ className={`min-h-12 rounded-none border bg-popover px-4 text-(--fg) outline-none placeholder:text-(--placeholder) disabled:cursor-not-allowed disabled:bg-[rgba(247,247,248,0.92)] ${+ emailError+ ? "border-[rgba(180,35,53,0.36)]"+ : "border-(--border)"+ }`}+ disabled={disabled}+ onChange={(event: ChangeEvent<HTMLInputElement>) =>+ onChange("email", event.target.value)+ }+ onBlur={() => onBlur("email")}+ placeholder="[email protected]"+ type="email"+ value={signer.email}+ />+ <span+ aria-live="polite"+ className={`min-h-4 text-xs font-semibold text-(--accent) ${+ emailError ? "" : "invisible"+ }`}+ role={emailError ? "alert" : undefined}+ >+ {emailError ?? " "}+ </span>+ </label>+ </div>+ </div>+ </li>+ );+}++export function SignersShell({+ envelopeId,+ initialState,+ record,+}: SignersShellProps) {+ const initialModel = buildInitialModel(record);+ const [signers, setSigners] = useState(initialModel.signers);+ const [showAllErrors, setShowAllErrors] = useState(+ initialModel.showAllErrors,+ );+ const [submissionError, setSubmissionError] = useState<string | null>(null);+ const [isSubmitting, setIsSubmitting] = useState(false);+ const nextSignerNumberRef = useRef(initialModel.signers.length + 1);++ const errorsBySignerId = buildSignerErrors(signers);+ const canAddSigner = signers.length < MAX_SIGNERS_PER_ENVELOPE;+ const canContinue =+ signers.length > 0 &&+ signers.every(+ (signer) => !hasSignerErrors(errorsBySignerId[signer.localId] ?? {}),+ );++ function clearSubmitError() {+ setSubmissionError(null);+ }++ function handleSignerChange(+ signerLocalId: string,+ field: SignerField,+ value: string,+ ) {+ clearSubmitError();+ setShowAllErrors(false);+ setSigners((currentSigners) =>+ currentSigners.map((signer) =>+ signer.localId === signerLocalId+ ? {+ ...signer,+ [field]: value,+ }+ : signer,+ ),+ );+ }++ function handleSignerBlur(signerLocalId: string, field: SignerField) {+ setSigners((currentSigners) =>+ currentSigners.map((signer) =>+ signer.localId === signerLocalId+ ? {+ ...signer,+ touched: {+ ...signer.touched,+ [field]: true,+ },+ }+ : signer,+ ),+ );+ }++ function handleAddSigner() {+ if (!canAddSigner || isSubmitting) {+ return;+ }++ clearSubmitError();+ const nextSignerNumber = nextSignerNumberRef.current;+ nextSignerNumberRef.current += 1;+ setSigners((currentSigners) => [+ ...currentSigners,+ createSigner(`signer-${nextSignerNumber}`),+ ]);+ }++ function handleRemoveSigner(signerLocalId: string) {+ if (isSubmitting) {+ return;+ }++ clearSubmitError();+ setSigners((currentSigners) =>+ currentSigners.length === 1+ ? currentSigners+ : currentSigners.filter((signer) => signer.localId !== signerLocalId),+ );+ }++ function handleMoveSigner(+ signerLocalId: string,+ direction: "earlier" | "later",+ ) {+ if (isSubmitting) {+ return;+ }++ clearSubmitError();+ setSigners((currentSigners) =>+ reorderSigners(currentSigners, signerLocalId, direction),+ );+ }++ async function handleContinue() {+ setShowAllErrors(true);++ if (!canContinue || isSubmitting) {+ return;+ }++ clearSubmitError();+ setIsSubmitting(true);++ try {+ const response = await fetch(`/api/envelopes/${envelopeId}/signers`, {+ body: JSON.stringify(buildSignerRequest(signers)),+ headers: {+ "content-type": "application/json",+ },+ method: "PUT",+ });+ const payload = await parseJsonResponse<ReplaceSignersResponse>(response);++ if (payload.error) {+ setSubmissionError(payload.error);+ return;+ }++ window.location.assign(+ payload.data?.redirectPath ?? `/envelopes/${envelopeId}/prepare`,+ );+ } finally {+ setIsSubmitting(false);+ }+ }++ if (initialState === "error") {+ return (+ <div className="space-y-6">+ <PageHeader+ description="Step 2 of 4 - Add signers"+ title="New envelope"+ />+ <StepIndicator current={2} steps={envelopeSteps} />+ <StatusPanel+ action={{+ href: `/envelopes/${envelopeId}/signers`,+ label: "Retry",+ }}+ description="We couldn't load this draft's signer list. Try again and confirm the upload step completed successfully."+ title="Couldn't load signer setup"+ tone="error"+ />+ </div>+ );+ }++ return (+ <div className="space-y-8">+ <PageHeader+ description="Step 2 of 4 - Add signers"+ eyebrow="Envelope workflow"+ title="New envelope"+ />++ <StepIndicator current={2} steps={envelopeSteps} />++ <section+ className="editorial-panel p-6 sm:p-8"+ data-animate="enter"+ data-animate-delay="2"+ >+ <div className="space-y-6">+ <div className="space-y-2 border-b border-(--border) pb-5">+ <p className="text-base font-semibold text-(--fg)">+ Signers will receive the document in this order.+ </p>+ <p className="text-sm leading-6 text-muted-foreground">+ Up to 10 signers per document.+ </p>+ </div>++ {submissionError ? (+ <div+ className="rounded-[24px] border border-[rgba(180,35,53,0.18)] bg-[rgba(180,35,53,0.04)] px-5 py-4"+ role="alert"+ >+ <p className="text-sm font-semibold text-(--accent)">+ {submissionError}+ </p>+ </div>+ ) : null}++ <ol className="space-y-4">+ {signers.map((signer, index) => {+ const signerErrors = errorsBySignerId[signer.localId] ?? {};+ const nameError =+ showAllErrors || signer.touched.name+ ? signerErrors.name+ : undefined;+ const emailError =+ showAllErrors || signer.touched.email+ ? signerErrors.email+ : undefined;++ return (+ <SignerCard+ canMoveEarlier={index > 0}+ canMoveLater={index < signers.length - 1}+ canRemove={signers.length > 1}+ disabled={isSubmitting}+ emailError={emailError}+ index={index}+ key={signer.localId}+ nameError={nameError}+ onChange={(field, value) =>+ handleSignerChange(signer.localId, field, value)+ }+ onBlur={(field) => handleSignerBlur(signer.localId, field)}+ onMove={(direction) =>+ handleMoveSigner(signer.localId, direction)+ }+ onRemove={() => handleRemoveSigner(signer.localId)}+ signer={signer}+ />+ );+ })}+ </ol>++ <div className="space-y-2">+ <button+ className="inline-flex min-h-11 items-center justify-center rounded-none border border-(--border) bg-(--surface) px-5 [font-family:var(--font-mono)] text-[0.72rem] font-semibold uppercase tracking-[0.18em] text-(--fg) transition hover:border-black hover:bg-white disabled:cursor-not-allowed disabled:text-(--placeholder)"+ disabled={!canAddSigner || isSubmitting}+ onClick={handleAddSigner}+ type="button"+ >+ + Add another signer+ </button>+ {!canAddSigner ? (+ <p className="text-xs font-semibold uppercase tracking-[0.22em] text-(--tertiary)">+ Maximum reached+ </p>+ ) : null}+ </div>++ <div className="flex flex-col gap-3 pt-2 sm:flex-row sm:justify-end">+ <ShellButton href="/envelopes/new" variant="secondary">+ ← Back+ </ShellButton>+ <ShellButton+ disabled={!canContinue}+ loading={isSubmitting}+ onClick={handleContinue}+ >+ Next →+ </ShellButton>+ </div>+ </div>+ </section>+ </div>+ );+}diff --git a/src/components/envelopes/upload-shell.tsx b/src/components/envelopes/upload-shell.tsxnew file mode 100644index 0000000..c9540cd--- /dev/null+++ b/src/components/envelopes/upload-shell.tsx@@ -0,0 +1,472 @@+"use client";++import { useRouter } from "next/navigation";+import {+ startTransition,+ useRef,+ useState,+ type ChangeEvent,+ type DragEvent,+ type KeyboardEvent,+} from "react";++import { FieldShell, ShellButton } from "@/components/shared/form-shell";+import { PageHeader } from "@/components/shared/page-header";+import { StepIndicator } from "@/components/shared/step-indicator";+import { cacheDraftPdfBlob } from "@/lib/draft-pdf-cache";+import { assertPdfPreviewRenderable } from "@/lib/pdfjs-client";+import { type CreateEnvelopeResponse } from "@/lib/schemas/envelope";++const envelopeSteps = ["Upload", "Signers", "Place fields", "Review"];+const MAX_FILE_SIZE_BYTES = 20 * 1024 * 1024;++type UploadErrorCode = "invalid-type" | "preview-unavailable" | "too-large";++type UploadSummary = {+ file: File;+ fileName: string;+ sizeLabel: string;+};++const errorMessageMap: Record<UploadErrorCode, string> = {+ "invalid-type": "Only PDF files are supported. Please upload a valid PDF.",+ "preview-unavailable":+ "We couldn't render this PDF in the editor. Please export it as a standard PDF and try again.",+ "too-large": "This file exceeds the 20 MB limit.",+};++const knownTitleSuggestions: Record<string, string> = {+ "nda-clientbravo-2026.pdf": "NDA - Client Bravo",+ "nda-client-bravo-2026.pdf": "NDA - Client Bravo",+ "vendor-agreement-two-signer.pdf": "Vendor agreement - two signer flow",+};++function formatFileSize(sizeInBytes: number) {+ const sizeInMegabytes = sizeInBytes / (1024 * 1024);++ if (sizeInMegabytes >= 1) {+ return `${sizeInMegabytes.toFixed(1)} MB`;+ }++ return `${Math.max(1, Math.round(sizeInBytes / 1024))} KB`;+}++function makeTitleSuggestion(fileName: string) {+ return fileName+ .replace(/\.pdf$/i, "")+ .replace(/([a-z])([A-Z])/g, "$1 $2")+ .replace(/[_-]+/g, " ")+ .replace(/\s+/g, " ")+ .trim();+}++function getTitleSuggestion(fileName: string): string {+ const normalizedName = fileName.toLowerCase();+ const knownTitleSuggestion = knownTitleSuggestions[normalizedName];++ if (knownTitleSuggestion) {+ return knownTitleSuggestion;+ }++ return makeTitleSuggestion(fileName);+}++function isClientVisiblePdf(file: File): boolean {+ const normalizedName = file.name.toLowerCase();++ return (+ normalizedName.endsWith(".pdf") &&+ (file.type.length === 0 || file.type === "application/pdf")+ );+}++function UploadShellLayout({+ canContinue,+ errorMessage,+ isBusy,+ isDragActive,+ isSubmitting = false,+ onDropzoneKeyDown,+ onOpenFilePicker,+ onRemoveFile,+ onTitleChange,+ onContinue,+ summary,+ title,+}: {+ canContinue: boolean;+ errorMessage: string | null;+ isBusy: boolean;+ isDragActive: boolean;+ isSubmitting?: boolean;+ onContinue?: () => void;+ onDropzoneKeyDown: (event: KeyboardEvent<HTMLDivElement>) => void;+ onOpenFilePicker: () => void;+ onRemoveFile: () => void;+ onTitleChange: (event: ChangeEvent<HTMLInputElement>) => void;+ summary: UploadSummary | null;+ title: string;+}) {+ const dropzoneClasses = isBusy+ ? "border-[rgba(37,99,235,0.35)] bg-[rgba(37,99,235,0.04)]"+ : errorMessage+ ? "border-[rgba(180,35,53,0.28)] bg-[rgba(180,35,53,0.03)]"+ : isDragActive+ ? "border-[rgba(180,35,53,0.36)] bg-[rgba(180,35,53,0.03)]"+ : "border-(--border) bg-(--surface)";++ return (+ <div className="space-y-8">+ <PageHeader+ description="Step 1 of 4 - Upload document"+ eyebrow="Envelope workflow"+ title="New envelope"+ />++ <StepIndicator current={1} steps={envelopeSteps} />++ <section+ className="editorial-panel p-6 sm:p-8"+ data-animate="enter"+ data-animate-delay="2"+ >+ <div className="space-y-6">+ <FieldShell+ label="Envelope title"+ onChange={onTitleChange}+ placeholder="e.g., NDA - Client Bravo"+ readOnly={false}+ value={title}+ />++ <div+ aria-busy={isBusy}+ aria-label="Document upload dropzone"+ className={`cursor-pointer border border-dashed px-6 py-10 text-center transition sm:px-10 sm:py-14 ${dropzoneClasses}`}+ onClick={onOpenFilePicker}+ onDragLeave={isBusy ? undefined : () => undefined}+ onDragOver={undefined}+ onDrop={undefined}+ onKeyDown={onDropzoneKeyDown}+ role="button"+ tabIndex={0}+ >+ <div className="mx-auto flex max-w-xl flex-col items-center gap-4">+ {isBusy ? (+ <>+ <div+ aria-label="Upload progress"+ className="h-3 w-full overflow-hidden rounded-full bg-white"+ role="progressbar"+ >+ <div className="h-full w-2/3 animate-pulse rounded-full bg-chart-1" />+ </div>+ <div className="space-y-2">+ <p className="text-lg font-semibold tracking-[-0.03em] text-(--fg)">+ Uploading...+ </p>+ <p className="text-sm leading-6 text-muted-foreground">+ Validating the PDF before you continue to signer setup.+ </p>+ </div>+ </>+ ) : (+ <>+ <div className="space-y-2">+ <p className="text-lg font-semibold tracking-[-0.03em] text-(--fg)">+ Drag and drop your PDF here+ </p>+ <p className="text-sm text-muted-foreground">+ or{" "}+ <span className="font-semibold text-(--fg) underline decoration-[rgba(17,17,17,0.3)] underline-offset-4">+ click to browse+ </span>+ </p>+ </div>+ <p className="text-xs font-semibold uppercase tracking-[0.22em] text-(--tertiary)">+ PDF only - 20 MB max+ </p>+ </>+ )}+ </div>+ </div>++ {errorMessage ? (+ <div+ className="rounded-[24px] border border-[rgba(180,35,53,0.18)] bg-[rgba(180,35,53,0.04)] px-5 py-4"+ role="alert"+ >+ <p className="text-sm font-semibold text-(--accent)">+ {errorMessage}+ </p>+ </div>+ ) : null}++ {summary ? (+ <section className="border border-(--border) bg-(--surface) px-5 py-4">+ <div className="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">+ <div className="space-y-1">+ <p className="text-sm font-semibold text-(--fg)">+ {summary.fileName}+ </p>+ <p className="text-sm text-muted-foreground">+ {summary.sizeLabel}+ </p>+ </div>+ <button+ className="inline-flex min-h-11 items-center justify-center rounded-none border border-(--border) bg-white px-4 [font-family:var(--font-mono)] text-[0.72rem] font-semibold uppercase tracking-[0.18em] text-muted-foreground transition hover:border-black hover:text-(--fg)"+ onClick={onRemoveFile}+ type="button"+ >+ Remove+ </button>+ </div>+ </section>+ ) : null}++ <div className="flex justify-end">+ <ShellButton+ disabled={!canContinue}+ loading={isSubmitting}+ onClick={onContinue}+ >+ Next ->+ </ShellButton>+ </div>+ </div>+ </section>+ </div>+ );+}++export function UploadShell() {+ const router = useRouter();+ const [title, setTitle] = useState("");+ const [summary, setSummary] = useState<UploadSummary | null>(null);+ const [errorMessage, setErrorMessage] = useState<string | null>(null);+ const [isCreatingDraft, setIsCreatingDraft] = useState(false);+ const [autoFilledTitle, setAutoFilledTitle] = useState<string | null>(null);+ const [isDragActive, setIsDragActive] = useState(false);+ const fileInputRef = useRef<HTMLInputElement | null>(null);++ function resetSelection(clearTitle: boolean) {+ setSummary(null);+ setErrorMessage(null);+ setIsCreatingDraft(false);++ if (clearTitle) {+ setTitle((currentTitle) =>+ autoFilledTitle && currentTitle === autoFilledTitle ? "" : currentTitle,+ );+ }++ setAutoFilledTitle(null);+ }++ async function parseResponse<T>(+ response: Response,+ ): Promise<{ data: T | null; error: string | null }> {+ const payload = (await response.json().catch(() => null)) as+ | { error?: string }+ | T+ | null;++ if (!response.ok) {+ return {+ data: null,+ error:+ payload && typeof payload === "object" && "error" in payload+ ? (payload.error ?? "Something went wrong. Please try again.")+ : "Something went wrong. Please try again.",+ };+ }++ return {+ data: payload as T,+ error: null,+ };+ }++ function beginUpload(file: File) {+ if (!isClientVisiblePdf(file)) {+ setErrorMessage(errorMessageMap["invalid-type"]);+ setSummary(null);+ return;+ }++ if (file.size > MAX_FILE_SIZE_BYTES) {+ setErrorMessage(errorMessageMap["too-large"]);+ setSummary(null);+ return;+ }++ const titleSuggestion = getTitleSuggestion(file.name);++ setSummary({+ file,+ fileName: file.name,+ sizeLabel: formatFileSize(file.size),+ });+ setErrorMessage(null);++ if (title.trim().length === 0) {+ setTitle(titleSuggestion);+ setAutoFilledTitle(titleSuggestion);+ }+ }++ function handleFileSelection(file: File | null) {+ setIsDragActive(false);++ if (!file) {+ return;+ }++ beginUpload(file);+ }++ function handleInputChange(event: ChangeEvent<HTMLInputElement>) {+ const selectedFile = event.target.files?.[0] ?? null;+ handleFileSelection(selectedFile);+ event.target.value = "";+ }++ function handleRemoveFile() {+ resetSelection(true);+ }++ function handleTitleChange(event: ChangeEvent<HTMLInputElement>) {+ const nextTitle = event.target.value;+ setTitle(nextTitle);++ if (autoFilledTitle && nextTitle !== autoFilledTitle) {+ setAutoFilledTitle(null);+ }+ }++ function openFilePicker() {+ if (isCreatingDraft) {+ return;+ }++ fileInputRef.current?.click();+ }++ function handleDropzoneKeyDown(event: KeyboardEvent<HTMLDivElement>) {+ if (event.key === "Enter" || event.key === " ") {+ event.preventDefault();+ openFilePicker();+ }+ }++ async function handleContinue() {+ if (isCreatingDraft || !summary || title.trim().length === 0) {+ return;+ }++ setIsCreatingDraft(true);+ setErrorMessage(null);++ try {+ try {+ await assertPdfPreviewRenderable(summary.file);+ } catch (error) {+ console.error(+ "Failed to validate the PDF preview before draft creation.",+ error,+ );+ setErrorMessage(errorMessageMap["preview-unavailable"]);+ setIsCreatingDraft(false);+ return;+ }++ const formData = new FormData();+ formData.append("file", summary.file);+ formData.append("title", title.trim());++ const response = await fetch("/api/envelopes", {+ body: formData,+ method: "POST",+ });+ const payload = await parseResponse<CreateEnvelopeResponse>(response);++ if (!payload.data || payload.error) {+ setErrorMessage(+ payload.error ?? "Something went wrong. Please try again.",+ );++ if (response.status === 400) {+ setSummary(null);+ }++ setIsCreatingDraft(false);+ return;+ }++ try {+ await cacheDraftPdfBlob(payload.data.envelopeId, summary.file);+ } catch (error) {+ console.error(+ "Failed to cache the uploaded PDF for local preview.",+ error,+ );+ }++ const redirectPath = payload.data.redirectPath;++ startTransition(() => {+ router.push(redirectPath);+ });+ } catch {+ setErrorMessage("Something went wrong. Please try again.");+ setIsCreatingDraft(false);+ }+ }++ const canContinue =+ !isCreatingDraft && summary != null && title.trim().length > 0;++ return (+ <div+ onDragLeave={() => setIsDragActive(false)}+ onDragOver={(event) => {+ event.preventDefault();+ if (!isCreatingDraft) {+ setIsDragActive(true);+ }+ }}+ onDrop={(event: DragEvent<HTMLDivElement>) => {+ event.preventDefault();++ if (isCreatingDraft) {+ return;+ }++ handleFileSelection(event.dataTransfer.files?.[0] ?? null);+ }}+ >+ <input+ accept=".pdf,application/pdf"+ aria-label="Upload PDF"+ className="sr-only"+ onChange={handleInputChange}+ ref={fileInputRef}+ type="file"+ />+ <UploadShellLayout+ canContinue={canContinue}+ errorMessage={errorMessage}+ isBusy={isCreatingDraft}+ isDragActive={isDragActive}+ isSubmitting={isCreatingDraft}+ onContinue={handleContinue}+ onDropzoneKeyDown={handleDropzoneKeyDown}+ onOpenFilePicker={openFilePicker}+ onRemoveFile={handleRemoveFile}+ onTitleChange={handleTitleChange}+ summary={summary}+ title={title}+ />+ </div>+ );+}diff --git a/src/components/landing/dashboard-preview.tsx b/src/components/landing/dashboard-preview.tsxnew file mode 100644index 0000000..b13adba--- /dev/null+++ b/src/components/landing/dashboard-preview.tsx@@ -0,0 +1,229 @@+import { PanelLeftIcon, type LucideIcon } from "lucide-react";++import {+ DashboardDocumentsHeader,+ DashboardDocumentsPanel,+ type DashboardFilter,+} from "@/components/dashboard/dashboard-documents-surface";+import { Brand } from "@/components/layout/brand";+import { primaryNavItems } from "@/components/layout/nav-items";+import { cn } from "@/lib/cn";+import type { DashboardEnvelopeListItem } from "@/lib/envelopes";++const previewUser = {+ email: "[email protected]",+ name: "Alex Rowan",+} as const;++const previewFilter: DashboardFilter = "All";++const previewEnvelopes: readonly DashboardEnvelopeListItem[] = [+ {+ contextLine: "2 signers · 6 fields placed",+ createdAtLabel: "Mar 15, 2026",+ id: "preview-draft",+ searchableEmails: ["[email protected]", "[email protected]"],+ status: "draft",+ title: "Master Services Agreement",+ },+ {+ contextLine: "Sent to: [email protected], [email protected]",+ createdAtLabel: "Mar 10, 2026",+ id: "preview-completed",+ searchableEmails: ["[email protected]", "[email protected]"],+ status: "completed",+ title: "Independent Contractor Agreement",+ },+ {+ contextLine: "Waiting on: [email protected]",+ createdAtLabel: "Mar 8, 2026",+ id: "preview-sent",+ searchableEmails: ["[email protected]"],+ status: "sent",+ title: "NDA - Product Demo",+ },+ {+ contextLine: "Voided on Mar 10, 2026",+ createdAtLabel: "Mar 8, 2026",+ id: "preview-voided",+ searchableEmails: ["[email protected]"],+ status: "voided",+ title: "Supplier Terms - Atlas",+ },+ {+ contextLine: "Declined by: [email protected]",+ createdAtLabel: "Feb 27, 2026",+ id: "preview-declined",+ searchableEmails: ["[email protected]"],+ status: "declined",+ title: "Offer Letter - A. Rivera",+ },+] as const;++export function LandingDashboardPreview() {+ return (+ <div+ aria-hidden="true"+ className="overflow-hidden border border-[#d4d4d4] bg-white"+ >+ <div className="hidden md:block">+ <div className="h-[980px] overflow-hidden lg:h-[1040px]">+ <div className="grid h-full grid-cols-[336px_minmax(0,1fr)]">+ <aside className="flex h-full flex-col border-r border-(--border) bg-white">+ <div className="flex items-center justify-between gap-3 border-b border-(--border) bg-white px-4 py-5">+ <Brand href="/" />+ <StaticSidebarTrigger />+ </div>++ <div className="flex-1 bg-white px-2 py-5">+ <div className="px-2">+ <p className="section-eyebrow px-2 text-(--tertiary)">+ Workspace+ </p>++ <div className="mt-4 space-y-1">+ {primaryNavItems.map((item) => (+ <StaticNavItem+ active={item.href === "/dashboard"}+ key={item.href}+ label={item.label}+ Icon={item.icon}+ />+ ))}+ </div>+ </div>+ </div>++ <div className="border-t border-(--border) bg-white px-3 py-4">+ <StaticUserCard+ email={previewUser.email}+ name={previewUser.name}+ />+ </div>+ </aside>++ <div className="bg-transparent">+ <PreviewDocumentsWorkspace />+ </div>+ </div>+ </div>+ </div>++ <div className="md:hidden">+ <div className="h-[1240px] overflow-hidden bg-white">+ <header className="border-b border-(--border) bg-white">+ <div className="flex items-center justify-between gap-3 px-4 py-4">+ <div className="flex items-center gap-3">+ <Brand href="/" />+ <div>+ <p className="text-xs font-semibold uppercase tracking-[0.24em] text-(--tertiary)">+ Sender app+ </p>+ <p className="text-sm font-semibold text-(--fg)">Documents</p>+ </div>+ </div>++ <StaticSidebarTrigger mobile />+ </div>+ </header>++ <PreviewDocumentsWorkspace />+ </div>+ </div>+ </div>+ );+}++function PreviewDocumentsWorkspace() {+ return (+ <main className="flex-1 px-4 py-5 sm:px-6 sm:py-7 lg:px-8 xl:px-10">+ <div className="mx-auto w-full max-w-[1080px]">+ <div className="space-y-8">+ <DashboardDocumentsHeader interactive={false} />+ <DashboardDocumentsPanel+ envelopes={previewEnvelopes}+ filteredEnvelopes={previewEnvelopes}+ interactive={false}+ searchValue=""+ selectedFilter={previewFilter}+ />+ </div>+ </div>+ </main>+ );+}++function StaticSidebarTrigger({ mobile = false }: { mobile?: boolean }) {+ return (+ <div+ className={cn(+ "inline-flex items-center justify-center rounded-none border border-(--border) bg-white",+ mobile ? "size-11 text-(--fg)" : "size-10 text-muted-foreground",+ )}+ >+ <PanelLeftIcon className="size-5" />+ </div>+ );+}++function StaticNavItem({+ active,+ Icon,+ label,+}: {+ active: boolean;+ Icon: LucideIcon;+ label: string;+}) {+ return (+ <div+ className={cn(+ "flex min-h-12 items-center gap-3 rounded-none border px-3.5 py-2 text-[0.95rem] font-medium",+ active+ ? "border-(--border) bg-[#f7f7f8] text-(--fg)"+ : "border-transparent text-muted-foreground",+ )}+ >+ <span+ className={cn(+ "inline-flex size-9 shrink-0 items-center justify-center rounded-none",+ active+ ? "bg-[#fff8f8] text-(--accent)"+ : "bg-[#f7f7f8] text-muted-foreground",+ )}+ >+ <Icon className="size-4" />+ </span>+ <span className="truncate">{label}</span>+ </div>+ );+}++function StaticUserCard({ email, name }: { email: string; name: string }) {+ return (+ <div className="flex items-center gap-3 rounded-none border border-(--border) bg-white px-3 py-3 text-left text-(--fg)">+ <div className="inline-flex size-10 items-center justify-center rounded-none bg-[#fff8f8] text-sm font-semibold text-(--accent)">+ {getInitials(name)}+ </div>++ <div className="min-w-0">+ <p className="truncate text-sm font-semibold text-(--fg)">{name}</p>+ <p className="truncate text-xs text-(--tertiary)">{email}</p>+ </div>+ </div>+ );+}++function getInitials(name: string) {+ const segments = name+ .split(/\s+/)+ .map((segment) => segment.trim())+ .filter(Boolean)+ .slice(0, 2);++ if (segments.length === 0) {+ return "SU";+ }++ return segments.map((segment) => segment[0]?.toUpperCase() ?? "").join("");+}diff --git a/src/components/landing/landing-shell.tsx b/src/components/landing/landing-shell.tsxnew file mode 100644index 0000000..0f9e2bb--- /dev/null+++ b/src/components/landing/landing-shell.tsx@@ -0,0 +1,655 @@+import type { ReactNode } from "react";+import Link from "next/link";+import { Archivo, IBM_Plex_Mono } from "next/font/google";++import { PublicLegalFooter } from "@/components/layout/public-legal-links";+import { LandingDashboardPreview } from "@/components/landing/dashboard-preview";+import { resolveShellState } from "@/components/shared/shell-state";++const archivo = Archivo({+ display: "swap",+ subsets: ["latin"],+ weight: ["400", "500", "600", "700", "800", "900"],+});++const ibmPlexMono = IBM_Plex_Mono({+ display: "swap",+ subsets: ["latin"],+ weight: ["400", "500", "600", "700"],+});++export const landingShellStates = ["default", "authenticated"] as const;++export type LandingShellState = (typeof landingShellStates)[number];++type LandingShellProps = {+ initialState?: LandingShellState | string | string[] | null;+};++type WorkflowStep = {+ body: string;+ title: string;+};++type FaqItem = {+ answer: string;+ question: string;+};++const workflowSteps: readonly WorkflowStep[] = [+ {+ title: "Upload your PDF",+ body: "Bring the contract you already wrote. No template rebuilding.",+ },+ {+ title: "Add signers",+ body: "Pick who signs first, second, third. Each person gets invited after the last one finishes.",+ },+ {+ title: "Place fields",+ body: "Drop signature, initials, date, text, and checkbox fields onto the page.",+ },+ {+ title: "Send and track",+ body: "Fire off a signing link. Nudge the slow ones. Download the final PDF.",+ },+] as const;++type ComparisonRow = {+ feature: string;+ signudoc: string | boolean;+ docusign: string | boolean;+};++const comparisonRows: readonly ComparisonRow[] = [+ { feature: "Price", signudoc: "Free forever", docusign: "$10–15/mo" },+ { feature: "Envelopes per month", signudoc: "Unlimited", docusign: "5" },+ {+ feature: "Signers per document",+ signudoc: "Up to 10",+ docusign: "Varies by plan",+ },+ { feature: "Reminders", signudoc: true, docusign: "Standard+ ($25+/mo)" },+] as const;++const faqItems: readonly FaqItem[] = [+ {+ question: "Do signers need a SignuDoc account?",+ answer:+ "Nope. You sign in to send documents, but your signers just click a link and sign. No account, no friction.",+ },+ {+ question: "What field types can I place on a document?",+ answer:+ "Signature, initials, date, text, and checkbox. Everything most documents need.",+ },+ {+ question: "Can I remind a signer if they are taking too long?",+ answer:+ "Yes. Hit the remind button and they get a nudge. No need to resend the whole document.",+ },+ {+ question: "What do I get when everyone finishes signing?",+ answer:+ "You get the final signed PDF plus a tamper-proof certificate. Download both in one click.",+ },+] as const;++export function resolveLandingShellState(+ value?: string | string[] | null,+): LandingShellState {+ return resolveShellState(value, landingShellStates, "default");+}++export function LandingShell({ initialState = "default" }: LandingShellProps) {+ const resolvedInitialState = resolveLandingShellState(initialState);+ const authenticated = resolvedInitialState === "authenticated";+ const monoClassName = ibmPlexMono.className;+ const primaryHref = authenticated ? "/dashboard" : "/signup";+ const primaryLabel = authenticated ? "Go to dashboard" : "Start free";+ const secondaryLabel = "See how it works";++ return (+ <div+ className={`${archivo.className} min-h-screen bg-white text-[#000000]`}+ >+ <div+ aria-hidden="true"+ className="pointer-events-none fixed inset-0 z-0 opacity-35"+ style={{+ backgroundImage:+ "radial-gradient(circle, #d4d4d4 0.8px, transparent 0.8px)",+ backgroundSize: "48px 48px",+ }}+ />++ <header className="relative z-10 border-b border-[#d4d4d4] bg-white/90 backdrop-blur">+ <div className="mx-auto flex max-w-[1200px] flex-wrap items-center justify-between gap-4 px-6 py-5 sm:px-8 lg:px-10">+ <LandingWordmark />++ <nav className="flex flex-wrap items-center gap-3">+ {!authenticated ? (+ <Link+ className={`${monoClassName} text-sm font-medium text-[#71717a] transition-colors hover:text-black`}+ href="/login"+ >+ Log in+ </Link>+ ) : null}+ <ActionLink+ href={primaryHref}+ monoClassName={monoClassName}+ variant="primary"+ >+ {primaryLabel}+ </ActionLink>+ </nav>+ </div>+ </header>++ <main className="relative z-10">+ <section className="overflow-hidden border-b border-[#d4d4d4]">+ <div className="mx-auto max-w-[1200px] px-6 pb-20 pt-16 sm:px-8 sm:pt-20 lg:px-10 lg:pb-24 lg:pt-24">+ <div className="relative">+ <CropMarks+ className="hidden lg:block"+ color="#e50000"+ offset={26}+ size={28}+ />+ <div className="px-0 py-4 sm:py-6 lg:px-4 lg:py-8">+ <div+ className="mx-auto max-w-216 text-center"+ data-animate="enter"+ >+ <SectionMarker center monoClassName={monoClassName}>+ Free e-signature software+ </SectionMarker>++ <h1+ className="mx-auto max-w-[22ch] text-[clamp(2.2rem,4.5vw,4.2rem)] font-extrabold leading-[1.08] tracking-[-0.035em] text-black sm:max-w-[23ch] lg:max-w-[24ch] lg:leading-[1.1] lg:tracking-[-0.03em]"+ style={{ textWrap: "balance" }}+ >+ Free e-signature software. No catch.+ </h1>++ <p className="mx-auto mt-6 max-w-2xl text-lg leading-relaxed text-[#71717a] sm:text-[1.15rem]">+ Upload a PDF, drop in signature fields, and send.+ That's it.+ </p>++ <div className="mt-10 flex flex-wrap items-center justify-center gap-4">+ <ActionLink+ href={primaryHref}+ monoClassName={monoClassName}+ variant="primary"+ >+ {primaryLabel}+ </ActionLink>+ <ActionLink+ href="#workflow"+ monoClassName={monoClassName}+ variant="secondary"+ >+ {secondaryLabel}+ </ActionLink>+ </div>+ </div>+ </div>+ </div>+ </div>+ </section>++ <section+ className="border-b border-[#d4d4d4] bg-[#f7f7f8]"+ data-animate="enter"+ data-animate-delay="1"+ id="workflow"+ >+ <div className="mx-auto max-w-[1200px] px-6 py-20 sm:px-8 lg:px-10 lg:py-24">+ <div className="mx-auto max-w-160 text-center">+ <SectionMarker center monoClassName={monoClassName}>+ How it works+ </SectionMarker>+ <h2 className="text-[clamp(2rem,4vw,3.1rem)] font-extrabold leading-[1.06] tracking-[-0.03em] text-black">+ Four steps. One signed document.+ </h2>+ <p className="mx-auto mt-5 max-w-xl text-lg leading-relaxed text-[#71717a]">+ Upload a PDF, set the signing order, place fields, and hit send.+ Your signers don't even need an account.+ </p>+ </div>++ <div className="mt-12">+ <LandingDashboardPreview />+ </div>++ <div className="mt-14 grid gap-10 sm:grid-cols-2 lg:grid-cols-4 lg:gap-8">+ {workflowSteps.map((step, index) => (+ <WorkflowStepInline+ body={step.body}+ index={index + 1}+ key={step.title}+ monoClassName={monoClassName}+ title={step.title}+ />+ ))}+ </div>+ </div>+ </section>++ <section className="border-b border-[#d4d4d4]" data-animate="enter">+ <div className="mx-auto max-w-[1200px] px-6 py-20 sm:px-8 lg:px-10 lg:py-24">+ <div className="mx-auto max-w-160 text-center">+ <SectionMarker center monoClassName={monoClassName}>+ Pricing+ </SectionMarker>+ <h2 className="text-[clamp(2rem,4vw,3.1rem)] font-extrabold leading-[1.06] tracking-[-0.03em] text-black">+ Free beats $120 a year.+ </h2>+ <p className="mx-auto mt-5 max-w-xl text-lg leading-relaxed text-[#71717a]">+ Everything below is included. Forever. For $0. See how that+ stacks up against DocuSign.+ </p>+ </div>++ <div className="mt-14">+ <ComparisonTable monoClassName={monoClassName} />+ </div>++ <div className="mt-10 flex flex-col items-center gap-4 text-center">+ <ActionLink+ href={primaryHref}+ monoClassName={monoClassName}+ variant="primary"+ >+ {primaryLabel}+ </ActionLink>+ <p+ className={`${monoClassName} text-[11px] uppercase tracking-[0.18em] text-[#71717a]`}+ >+ Your signers never need to create an account.+ </p>+ </div>++ <div className="mt-20 lg:mt-24">+ <div className="mx-auto max-w-[780px]">+ <div className="text-center">+ <SectionMarker center monoClassName={monoClassName}>+ FAQ+ </SectionMarker>+ <h3 className="text-[clamp(1.9rem,3.5vw,2.85rem)] font-extrabold leading-[1.06] tracking-[-0.03em] text-black">+ Quick answers.+ </h3>+ </div>+ <div className="mt-8 border-t border-[#d4d4d4]">+ {faqItems.map((item) => (+ <FaqRow+ answer={item.answer}+ key={item.question}+ question={item.question}+ />+ ))}+ </div>+ </div>+ </div>+ </div>+ </section>++ <section+ className="border-b border-[#d4d4d4] bg-[#f7f7f8]"+ data-animate="enter"+ data-animate-delay="1"+ >+ <div className="mx-auto max-w-[1200px] px-6 py-20 text-center sm:px-8 lg:px-10 lg:py-24">+ <div className="mx-auto max-w-[780px]">+ <SectionMarker center monoClassName={monoClassName}>+ Start free+ </SectionMarker>+ <h2 className="text-[clamp(2.1rem,4.5vw,3.6rem)] font-extrabold leading-[1.04] tracking-[-0.04em] text-black">+ Send your next agreement. On us.+ </h2>+ <p className="mx-auto mt-6 max-w-2xl text-lg leading-relaxed text-[#71717a]">+ No credit card. No per-envelope fees. Just upload and send.+ </p>++ <div className="mt-10 flex flex-wrap justify-center gap-4">+ <ActionLink+ href={primaryHref}+ monoClassName={monoClassName}+ variant="primary"+ >+ {primaryLabel}+ </ActionLink>+ {!authenticated ? (+ <ActionLink+ href="/login"+ monoClassName={monoClassName}+ variant="secondary"+ >+ Log in+ </ActionLink>+ ) : null}+ </div>++ <p+ className={`${monoClassName} mt-8 text-[11px] uppercase tracking-[0.18em] text-[#71717a]`}+ >+ Free • no signer account required • up to 10 signers per+ document+ </p>+ </div>+ </div>+ </section>+ </main>++ <PublicLegalFooter />+ </div>+ );+}++function LandingWordmark() {+ return (+ <Link aria-label="SignuDoc" className="flex items-center" href="/">+ <span className="text-[24px] font-extrabold tracking-[-0.035em] text-black sm:text-[27px]">+ Signu<span className="text-[#e50000]">Doc</span>+ </span>+ </Link>+ );+}++function ActionLink({+ children,+ href,+ monoClassName,+ variant,+}: {+ children: ReactNode;+ href: string;+ monoClassName: string;+ variant: "primary" | "secondary";+}) {+ const sharedClassName = `${monoClassName} inline-flex items-center justify-center border-2 px-5 py-3 text-sm font-bold uppercase tracking-[0.16em] transition-colors`;+ const variantClassName =+ variant === "primary"+ ? "border-[#e50000] bg-[#e50000] hover:border-[#c00000] hover:bg-[#c00000]"+ : "border-[#d4d4d4] bg-transparent text-black hover:border-black";+ const style = variant === "primary" ? { color: "#fff" } : undefined;++ return (+ <Link+ className={`${sharedClassName} ${variantClassName}`}+ href={href}+ style={style}+ >+ {children}+ </Link>+ );+}++function SectionMarker({+ center = false,+ children,+ monoClassName,+}: {+ center?: boolean;+ children: string;+ monoClassName: string;+}) {+ return (+ <div+ className={`mb-6 flex items-center gap-3 ${center ? "justify-center" : ""}`}+ >+ <GridDot />+ <span+ className={`${monoClassName} text-xs font-medium uppercase tracking-[0.2em] text-[#71717a]`}+ >+ {children}+ </span>+ </div>+ );+}++function CropMarks({+ className = "",+ color = "#e50000",+ offset = 0,+ size = 20,+}: {+ className?: string;+ color?: string;+ offset?: number;+ size?: number;+}) {+ return (+ <div+ className={`pointer-events-none absolute ${className}`}+ style={{ inset: offset }}+ >+ <span+ className="absolute left-0 top-0"+ style={{+ borderLeft: `2px solid ${color}`,+ borderTop: `2px solid ${color}`,+ height: size,+ width: size,+ }}+ />+ <span+ className="absolute right-0 top-0"+ style={{+ borderRight: `2px solid ${color}`,+ borderTop: `2px solid ${color}`,+ height: size,+ width: size,+ }}+ />+ <span+ className="absolute bottom-0 left-0"+ style={{+ borderBottom: `2px solid ${color}`,+ borderLeft: `2px solid ${color}`,+ height: size,+ width: size,+ }}+ />+ <span+ className="absolute bottom-0 right-0"+ style={{+ borderBottom: `2px solid ${color}`,+ borderRight: `2px solid ${color}`,+ height: size,+ width: size,+ }}+ />+ </div>+ );+}++function GridDot() {+ return (+ <span className="inline-block h-[6px] w-[6px] rounded-full bg-[#e50000]" />+ );+}++function WorkflowStepInline({+ body,+ index,+ monoClassName,+ title,+}: WorkflowStep & {+ index: number;+ monoClassName: string;+}) {+ return (+ <div className="text-center lg:text-left">+ <div className="flex justify-center lg:justify-start">+ <div className="flex h-12 w-12 items-center justify-center rounded-full bg-[#e50000]">+ <span+ className={`${monoClassName} text-base font-bold leading-none text-white`}+ >+ {String(index).padStart(2, "0")}+ </span>+ </div>+ </div>+ <h3 className="mt-4 text-lg font-bold leading-tight tracking-[-0.02em] text-black">+ {title}+ </h3>+ <p className="mt-2 text-[15px] leading-relaxed text-[#71717a]">{body}</p>+ </div>+ );+}++function FaqRow({ answer, question }: FaqItem) {+ return (+ <article className="border-b border-[#d4d4d4] py-6 last:border-b-0">+ <h3 className="text-xl font-bold leading-tight tracking-[-0.03em] text-black">+ {question}+ </h3>+ <p className="mt-3 text-[15px] leading-relaxed text-[#71717a]">+ {answer}+ </p>+ </article>+ );+}++function ComparisonTable({ monoClassName }: { monoClassName: string }) {+ return (+ <div className="relative border-2 border-[#d4d4d4] bg-white">+ <CropMarks color="#e50000" size={14} />++ {/* Desktop table */}+ <div className="hidden lg:block">+ <table className="w-full border-separate border-spacing-0 text-left">+ <thead>+ <tr>+ <th+ className={`${monoClassName} w-[35%] border-b-2 border-[#d4d4d4] px-6 py-5 text-[10px] font-semibold uppercase tracking-[0.2em] text-[#71717a]`}+ >+ Feature+ </th>+ <th className="w-[32.5%] border-b-2 border-l border-[#d4d4d4] bg-[#fff8f8] px-6 py-5 text-center">+ <span className="text-[17px] font-bold tracking-tight text-black">+ Signu<span className="text-[#e50000]">Doc</span>+ </span>+ </th>+ <th className="w-[32.5%] border-b-2 border-l border-[#d4d4d4] px-6 py-5 text-center">+ <span className="text-[17px] font-bold tracking-tight text-[#71717a]">+ DocuSign+ </span>+ </th>+ </tr>+ </thead>+ <tbody>+ {comparisonRows.map((row) => (+ <tr key={row.feature}>+ <td className="border-t border-[#d4d4d4] px-6 py-4 text-[15px] font-medium text-black">+ {row.feature}+ </td>+ <td className="border-t border-l border-[#d4d4d4] bg-[#fff8f8] px-6 py-4 text-center">+ <ComparisonValue advantage value={row.signudoc} />+ </td>+ <td className="border-t border-l border-[#d4d4d4] px-6 py-4 text-center text-[#71717a]">+ <ComparisonValue value={row.docusign} />+ </td>+ </tr>+ ))}+ </tbody>+ </table>+ </div>++ {/* Mobile stacked layout */}+ <div className="lg:hidden">+ <div className="grid grid-cols-2 border-b-2 border-[#d4d4d4]">+ <div className="border-r border-[#d4d4d4] bg-[#fff8f8] px-4 py-4 text-center">+ <span className="text-[15px] font-bold tracking-tight text-black">+ Signu<span className="text-[#e50000]">Doc</span>+ </span>+ </div>+ <div className="px-4 py-4 text-center">+ <span className="text-[15px] font-bold tracking-tight text-[#71717a]">+ DocuSign+ </span>+ </div>+ </div>+ {comparisonRows.map((row) => (+ <div className="border-t border-[#d4d4d4]" key={row.feature}>+ <div+ className={`${monoClassName} px-4 pb-2 pt-4 text-[10px] font-semibold uppercase tracking-[0.2em] text-[#71717a]`}+ >+ {row.feature}+ </div>+ <div className="grid grid-cols-2">+ <div className="border-r border-[#d4d4d4] bg-[#fff8f8] px-4 pb-4 text-center">+ <ComparisonValue advantage value={row.signudoc} />+ </div>+ <div className="px-4 pb-4 text-center text-[#71717a]">+ <ComparisonValue value={row.docusign} />+ </div>+ </div>+ </div>+ ))}+ </div>+ </div>+ );+}++function ComparisonValue({+ advantage = false,+ value,+}: {+ advantage?: boolean;+ value: string | boolean;+}) {+ if (typeof value === "boolean") {+ return value ? <CheckIcon /> : <XIcon />;+ }++ const isStrong =+ advantage &&+ (value === "Free forever" || value === "Unlimited" || value === "Included");++ return (+ <span+ className={+ isStrong+ ? "text-[15px] font-bold text-black"+ : "text-[15px] leading-relaxed"+ }+ >+ {value}+ </span>+ );+}++function CheckIcon() {+ return (+ <svg+ className="inline-block h-5 w-5 text-[#16a34a]"+ fill="currentColor"+ viewBox="0 0 20 20"+ >+ <path+ clipRule="evenodd"+ d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"+ fillRule="evenodd"+ />+ </svg>+ );+}++function XIcon() {+ return (+ <svg+ className="inline-block h-5 w-5 text-[#e50000]"+ fill="currentColor"+ viewBox="0 0 20 20"+ >+ <path+ clipRule="evenodd"+ d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"+ fillRule="evenodd"+ />+ </svg>+ );+}diff --git a/src/components/layout/app-shell.tsx b/src/components/layout/app-shell.tsxnew file mode 100644index 0000000..3682bd3--- /dev/null+++ b/src/components/layout/app-shell.tsx@@ -0,0 +1,300 @@+"use client";++import Link from "next/link";+import { usePathname } from "next/navigation";+import {+ useState,+ type ComponentProps,+ type CSSProperties,+ type ReactNode,+} from "react";++import { Brand } from "@/components/layout/brand";+import {+ primaryNavItems,+ type ShellNavItem,+} from "@/components/layout/nav-items";+import { Avatar, AvatarFallback } from "@/components/ui/avatar";+import { Button } from "@/components/ui/button";+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuLabel,+ DropdownMenuSeparator,+ DropdownMenuTrigger,+} from "@/components/ui/dropdown-menu";+import {+ Sidebar,+ SidebarContent,+ SidebarFooter,+ SidebarGroup,+ SidebarGroupContent,+ SidebarGroupLabel,+ SidebarHeader,+ SidebarInset,+ SidebarMenu,+ SidebarMenuButton,+ SidebarMenuItem,+ SidebarProvider,+ SidebarRail,+ SidebarTrigger,+} from "@/components/ui/sidebar";+import { authClient } from "@/lib/auth/client";++type AppShellProps = {+ children: ReactNode;+ user: {+ email: string;+ name: string;+ };+};++type ShellSection = "documents" | "new-envelope" | "settings" | "workspace";++const sectionLabelMap: Record<ShellSection, string> = {+ documents: "Documents",+ "new-envelope": "New Envelope",+ settings: "Settings",+ workspace: "Workspace",+};++export function AppShell({ children, user }: AppShellProps) {+ const pathname = usePathname() ?? "/dashboard";+ const [isSigningOut, setIsSigningOut] = useState(false);+ const currentSection = resolveSection(pathname);+ const initials = getInitials(user.name);++ async function handleSignOut() {+ if (isSigningOut) {+ return;+ }++ setIsSigningOut(true);++ const result = await authClient.signOut();++ if (result.error) {+ setIsSigningOut(false);+ return;+ }++ window.location.assign("/login");+ }++ return (+ <SidebarProvider+ defaultOpen+ style={+ {+ "--sidebar-width": "15.5rem",+ "--sidebar-width-icon": "4.5rem",+ "--sidebar-width-mobile": "19rem",+ } as CSSProperties+ }+ >+ <Sidebar className="border-r-0" collapsible="icon" variant="sidebar">+ <SidebarHeader className="gap-4 border-b border-(--border) bg-white px-4 py-5 transition-all group-data-[collapsible=icon]:items-center group-data-[collapsible=icon]:px-3">+ <div className="flex items-center justify-between gap-3 group-data-[collapsible=icon]:justify-center">+ <Brand+ className="transition-all group-data-[collapsible=icon]:hidden"+ href="/"+ />+ <div className="hidden md:block">+ <SidebarTrigger className="rounded-none border border-(--border) bg-white text-muted-foreground hover:border-black hover:bg-white hover:text-(--fg)" />+ </div>+ </div>+ </SidebarHeader>++ <SidebarContent className="gap-5 bg-white px-2 py-5 group-data-[collapsible=icon]:px-3">+ <SidebarGroup className="px-2 group-data-[collapsible=icon]:px-0">+ <SidebarGroupLabel className="section-eyebrow px-2 text-(--tertiary) group-data-[collapsible=icon]:hidden">+ Workspace+ </SidebarGroupLabel>+ <SidebarGroupContent>+ <SidebarMenu>+ {primaryNavItems.map((item) => (+ <AppSidebarItem+ currentSection={currentSection}+ item={item}+ key={item.href}+ />+ ))}+ </SidebarMenu>+ </SidebarGroupContent>+ </SidebarGroup>+ </SidebarContent>++ <SidebarFooter className="border-t border-(--border) bg-white px-3 py-4 group-data-[collapsible=icon]:px-3">+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ className="h-auto w-full justify-start gap-3 rounded-none border border-(--border) bg-white px-3 py-3 text-left text-(--fg) shadow-none hover:border-black hover:bg-white group-data-[collapsible=icon]:h-10 group-data-[collapsible=icon]:min-h-10! group-data-[collapsible=icon]:w-10 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:rounded-none group-data-[collapsible=icon]:p-0"+ variant="outline"+ >+ <Avatar className="size-10 rounded-none bg-[#fff8f8] text-(--accent) group-data-[collapsible=icon]:size-8">+ <AvatarFallback className="bg-[#fff8f8] text-sm font-semibold text-(--accent)">+ {initials}+ </AvatarFallback>+ </Avatar>+ <div className="min-w-0 group-data-[collapsible=icon]:hidden">+ <p className="truncate text-sm font-semibold text-(--fg)">+ {user.name}+ </p>+ <p className="truncate text-xs text-(--tertiary)">+ {user.email}+ </p>+ </div>+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent+ align="end"+ className="w-64 rounded-none border border-(--border) bg-white p-2 shadow-none"+ >+ <DropdownMenuLabel className="px-3 py-2">+ <p className="text-sm font-semibold text-(--fg)">{user.name}</p>+ <p className="mt-1 text-xs font-normal text-(--tertiary)">+ {user.email}+ </p>+ </DropdownMenuLabel>+ <DropdownMenuSeparator />+ <DropdownMenuItem asChild>+ <Link+ className="rounded-xl px-3 py-2 text-sm font-medium text-(--fg)"+ href="/settings"+ >+ Settings+ </Link>+ </DropdownMenuItem>+ <DropdownMenuItem+ className="rounded-xl px-3 py-2 text-sm font-medium text-(--accent)"+ disabled={isSigningOut}+ onSelect={(+ event: ComponentProps<+ typeof DropdownMenuItem+ >["onSelect"] extends ((event: infer T) => void) | undefined+ ? T+ : never,+ ) => {+ event.preventDefault();+ void handleSignOut();+ }}+ variant="destructive"+ >+ {isSigningOut ? "Signing out..." : "Sign out"}+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu>+ </SidebarFooter>++ <SidebarRail />+ </Sidebar>++ <SidebarInset className="min-h-screen bg-transparent">+ <header className="sticky top-0 z-20 border-b border-(--border) bg-white md:hidden">+ <div className="flex items-center justify-between gap-3 px-4 py-4">+ <div className="flex items-center gap-3">+ <Brand href="/" />+ <div>+ <p className="text-xs font-semibold uppercase tracking-[0.24em] text-(--tertiary)">+ Sender app+ </p>+ <p className="text-sm font-semibold text-(--fg)">+ {getSectionLabel(currentSection)}+ </p>+ </div>+ </div>+ <SidebarTrigger className="size-11 rounded-none border border-(--border) bg-white text-(--fg)" />+ </div>+ </header>++ <main className="flex-1 px-4 py-5 sm:px-6 sm:py-7 lg:px-8 xl:px-10">+ <div className="mx-auto w-full max-w-[1080px]">{children}</div>+ </main>+ </SidebarInset>+ </SidebarProvider>+ );+}++function AppSidebarItem({+ currentSection,+ item,+}: {+ currentSection: ShellSection;+ item: ShellNavItem;+}) {+ const isActive = isItemActive(currentSection, item.href);+ const Icon = item.icon;++ return (+ <SidebarMenuItem>+ <SidebarMenuButton+ asChild+ className="min-h-12 rounded-none border border-transparent px-3.5 py-2 text-[0.95rem] font-medium text-muted-foreground data-[active=true]:border-(--border) data-[active=true]:bg-[#f7f7f8] data-[active=true]:text-(--fg) hover:border-(--border) hover:bg-[#f7f7f8] hover:text-(--fg) group-data-[collapsible=icon]:h-10! group-data-[collapsible=icon]:min-h-10! group-data-[collapsible=icon]:w-10! group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:rounded-none group-data-[collapsible=icon]:p-0!"+ isActive={isActive}+ tooltip={item.label}+ >+ <Link+ aria-current={isActive ? "page" : undefined}+ className="flex w-full items-center gap-3 group-data-[collapsible=icon]:justify-center"+ href={item.href}+ >+ <span+ className={`inline-flex size-9 shrink-0 items-center justify-center rounded-none transition group-data-[collapsible=icon]:size-4 group-data-[collapsible=icon]:rounded-none group-data-[collapsible=icon]:bg-transparent ${+ isActive+ ? "bg-[#fff8f8] text-(--accent)"+ : "bg-[#f7f7f8] text-muted-foreground"+ }`}+ >+ <Icon className="size-4" />+ </span>+ <span className="truncate group-data-[collapsible=icon]:hidden">+ {item.label}+ </span>+ </Link>+ </SidebarMenuButton>+ </SidebarMenuItem>+ );+}++function resolveSection(pathname: string): ShellSection {+ if (pathname === "/settings" || pathname.startsWith("/settings/")) {+ return "settings";+ }++ if (+ pathname === "/envelopes/new" ||+ pathname.startsWith("/envelopes/new/") ||+ /^\/envelopes\/[^/]+\/(review|signers)$/.test(pathname)+ ) {+ return "new-envelope";+ }++ if (pathname === "/dashboard" || /^\/envelopes\/[^/]+$/.test(pathname)) {+ return "documents";+ }++ return "workspace";+}++function isItemActive(currentSection: ShellSection, href: string) {+ return currentSection === resolveSection(href);+}++function getSectionLabel(section: ShellSection) {+ return sectionLabelMap[section];+}++function getInitials(name: string) {+ const segments = name+ .split(/\s+/)+ .map((segment) => segment.trim())+ .filter(Boolean)+ .slice(0, 2);++ if (segments.length === 0) {+ return "SU";+ }++ return segments.map((segment) => segment[0]?.toUpperCase() ?? "").join("");+}diff --git a/src/components/layout/auth-shell.tsx b/src/components/layout/auth-shell.tsxnew file mode 100644index 0000000..12a319a--- /dev/null+++ b/src/components/layout/auth-shell.tsx@@ -0,0 +1,65 @@+"use client";++import Link from "next/link";+import { usePathname } from "next/navigation";+import type { ReactNode } from "react";++import { Brand } from "@/components/layout/brand";+import { PublicLegalFooter } from "@/components/layout/public-legal-links";++type AuthShellProps = {+ children: ReactNode;+};++type AuthNavAction = {+ href: string;+ label: string;+};++function getAuthNavAction(pathname: string): AuthNavAction {+ if (pathname === "/signup") {+ return {+ href: "/login",+ label: "Log in",+ };+ }++ return {+ href: "/signup",+ label: "Sign up",+ };+}++export function AuthShell({ children }: AuthShellProps) {+ const pathname = usePathname() ?? "/login";+ const navAction = getAuthNavAction(pathname);++ return (+ <div className="flex min-h-screen flex-col bg-white">+ <header className="border-b border-(--border) bg-white">+ <div className="editorial-shell flex items-center justify-between gap-4 px-0 py-5">+ <Brand href="/" />+ <nav+ aria-label="Public navigation"+ className="flex items-center gap-3"+ >+ <Link+ className="editorial-meta transition-colors hover:text-(--fg)"+ href={navAction.href}+ >+ {navAction.label}+ </Link>+ </nav>+ </div>+ </header>++ <main className="editorial-shell flex flex-1 items-start justify-center px-0 py-12 sm:py-16">+ <div className="flex w-full justify-center" data-animate="enter">+ {children}+ </div>+ </main>++ <PublicLegalFooter />+ </div>+ );+}diff --git a/src/components/layout/brand.tsx b/src/components/layout/brand.tsxnew file mode 100644index 0000000..a48203f--- /dev/null+++ b/src/components/layout/brand.tsx@@ -0,0 +1,31 @@+import Link from "next/link";++type BrandProps = {+ className?: string;+ compact?: boolean;+ href?: string;+ labelClassName?: string;+};++export function Brand({+ className = "",+ compact = false,+ href = "/",+ labelClassName = "",+}: BrandProps) {+ return (+ <Link+ aria-label="SignuDoc"+ className={`inline-flex items-center text-(--fg) ${className}`}+ href={href}+ >+ {!compact ? (+ <span+ className={`text-[1.28rem] font-extrabold tracking-[-0.035em] sm:text-[1.45rem] ${labelClassName}`}+ >+ Signu<span className="text-(--accent)">Doc</span>+ </span>+ ) : null}+ </Link>+ );+}diff --git a/src/components/layout/canvas-shell.tsx b/src/components/layout/canvas-shell.tsxnew file mode 100644index 0000000..de5aef1--- /dev/null+++ b/src/components/layout/canvas-shell.tsx@@ -0,0 +1,67 @@+import Link from "next/link";+import type { ReactNode } from "react";++import { ChevronLeftIcon } from "@/components/layout/nav-items";+import { Button } from "@/components/ui/button";++type CanvasShellProps = {+ backHref: string;+ backLabel: string;+ children: ReactNode;+ nextDisabled?: boolean;+ nextHref?: string;+ nextLabel?: string;+ nextLoading?: boolean;+ onNext?: () => void;+ stepLabel: string;+ title: string;+};++export function CanvasShell({+ backHref,+ backLabel,+ children,+ nextDisabled = true,+ nextHref,+ nextLabel,+ nextLoading = false,+ onNext,+ stepLabel,+ title,+}: CanvasShellProps) {+ const nextButtonLabel = nextLoading ? "Loading..." : (nextLabel ?? "Next");++ return (+ <div className="min-h-screen bg-(--canvas-wash)">+ <header className="sticky top-0 z-20 border-b border-(--border) bg-white">+ <div className="flex min-h-18 items-center justify-between gap-3 px-4 py-3 sm:px-6 lg:px-8">+ <Link+ className="inline-flex min-h-11 items-center gap-2 rounded-none border border-(--border) bg-white px-4 [font-family:var(--font-mono)] text-[0.72rem] font-semibold uppercase tracking-[0.18em] text-(--fg) transition hover:border-black"+ href={backHref}+ >+ <ChevronLeftIcon className="size-4" />+ {backLabel}+ </Link>+ <div className="min-w-0 text-center">+ <p className="truncate text-base font-bold tracking-[-0.03em] text-(--fg) sm:text-lg">+ {title}+ </p>+ <p className="mt-1 section-eyebrow">+ {stepLabel}+ </p>+ </div>+ {nextHref && !nextDisabled && !nextLoading ? (+ <Button asChild>+ <Link href={nextHref}>{nextButtonLabel}</Link>+ </Button>+ ) : (+ <Button disabled={nextDisabled || nextLoading} onClick={onNext}>+ {nextButtonLabel}+ </Button>+ )}+ </div>+ </header>+ <main className="min-h-[calc(100vh-73px)]">{children}</main>+ </div>+ );+}diff --git a/src/components/layout/nav-items.tsx b/src/components/layout/nav-items.tsxnew file mode 100644index 0000000..48739dc--- /dev/null+++ b/src/components/layout/nav-items.tsx@@ -0,0 +1,31 @@+import type { LucideIcon } from "lucide-react";+import {+ ChevronLeft,+ ChevronRight,+ FileText,+ Menu,+ PanelLeftClose,+ PanelLeftOpen,+ SquarePen,+} from "lucide-react";++export type ShellNavItem = {+ href: string;+ label: string;+ icon: LucideIcon;+};++export const primaryNavItems: ShellNavItem[] = [+ { href: "/dashboard", label: "Documents", icon: FileText },+ { href: "/envelopes/new", label: "New Envelope", icon: SquarePen },+];++export const MenuIcon = Menu;++export const CollapseIcon = PanelLeftClose;++export const ExpandIcon = PanelLeftOpen;++export const ChevronLeftIcon = ChevronLeft;++export const ChevronRightIcon = ChevronRight;diff --git a/src/components/layout/public-document-shell.tsx b/src/components/layout/public-document-shell.tsxnew file mode 100644index 0000000..3348bbb--- /dev/null+++ b/src/components/layout/public-document-shell.tsx@@ -0,0 +1,53 @@+import type { ReactNode } from "react";++import { Brand } from "@/components/layout/brand";+import { PublicLegalFooter } from "@/components/layout/public-legal-links";++type PublicDocumentShellProps = {+ children: ReactNode;+ description: string;+ lastUpdated: string;+ title: string;+};++export function PublicDocumentShell({+ children,+ description,+ lastUpdated,+ title,+}: PublicDocumentShellProps) {+ return (+ <div className="flex min-h-screen flex-col bg-white text-(--fg)">+ <header className="border-b border-(--border) bg-white">+ <div className="editorial-shell flex items-center px-0 py-5">+ <Brand href="/" />+ </div>+ </header>++ <main className="flex-1 py-10 sm:py-12 lg:py-14">+ <div className="editorial-shell">+ <article+ className="editorial-panel overflow-hidden"+ data-animate="enter"+ >+ <div className="border-b border-(--border) px-6 py-8 sm:px-10 sm:py-10">+ <p className="editorial-meta">Last updated {lastUpdated}</p>+ <h1 className="mt-4 max-w-[18ch] text-[clamp(2.3rem,5vw,4rem)] font-extrabold leading-[1.02] tracking-[-0.045em] text-black">+ {title}+ </h1>+ <p className="mt-5 max-w-[760px] text-base leading-7 text-muted-foreground sm:text-[1.02rem]">+ {description}+ </p>+ </div>++ <div className="space-y-10 px-6 py-8 text-sm leading-7 text-muted-foreground sm:px-10 sm:py-10 sm:text-[15px]">+ {children}+ </div>+ </article>+ </div>+ </main>++ <PublicLegalFooter />+ </div>+ );+}diff --git a/src/components/layout/public-legal-links.tsx b/src/components/layout/public-legal-links.tsxnew file mode 100644index 0000000..9e2360e--- /dev/null+++ b/src/components/layout/public-legal-links.tsx@@ -0,0 +1,75 @@+import Link from "next/link";+import { IBM_Plex_Mono } from "next/font/google";++import {+ PUBLIC_COPYRIGHT_YEAR,+ publicFooterLinks,+} from "@/lib/legal";+import { cn } from "@/lib/cn";++const ibmPlexMono = IBM_Plex_Mono({+ display: "swap",+ subsets: ["latin"],+ weight: ["400", "500", "600", "700"],+});++type PublicLegalFooterProps = {+ className?: string;+ contentClassName?: string;+ labelVariant?: "long" | "short";+ linkClassName?: string;+};++export function PublicLegalFooter({+ className = "",+ contentClassName = "",+ labelVariant = "short",+ linkClassName,+}: PublicLegalFooterProps) {+ const monoClassName = ibmPlexMono.className;++ return (+ <footer+ className={cn(+ "relative z-10 border-t border-[#d4d4d4] bg-white",+ className,+ )}+ >+ <div+ className={cn(+ "mx-auto max-w-[1200px] px-6 py-8 sm:px-8 lg:px-10",+ contentClassName,+ )}+ >+ <div className="flex flex-col items-center justify-between gap-4 sm:flex-row">+ <p className={`${monoClassName} text-xs text-[#71717a]`}>+ © {PUBLIC_COPYRIGHT_YEAR} SignuDoc+ </p>++ <nav+ aria-label="Footer"+ className="flex flex-wrap items-center justify-center gap-6"+ >+ {publicFooterLinks.map((link) => (+ <Link+ className={+ linkClassName ??+ `${monoClassName} text-xs text-[#71717a] transition-colors hover:text-black`+ }+ href={link.href}+ key={link.href}+ >+ {labelVariant === "long" ? link.longLabel : link.shortLabel}+ </Link>+ ))}+ </nav>++ <div className="hidden items-center gap-2 sm:flex">+ <span className="h-[2px] w-8 bg-[#e50000]" />+ <span className="inline-block h-[6px] w-[6px] rounded-full bg-[#e50000]" />+ </div>+ </div>+ </div>+ </footer>+ );+}diff --git a/src/components/not-found/not-found-shell.tsx b/src/components/not-found/not-found-shell.tsxnew file mode 100644index 0000000..b233510--- /dev/null+++ b/src/components/not-found/not-found-shell.tsx@@ -0,0 +1,52 @@+"use client";++import { ShellButton } from "@/components/shared/form-shell";+import { resolveShellState } from "@/components/shared/shell-state";++export const notFoundShellStates = ["default", "authenticated"] as const;++export type NotFoundShellState = (typeof notFoundShellStates)[number];++type NotFoundShellProps = {+ initialState?: NotFoundShellState | string | string[] | null;+};++export function resolveNotFoundShellState(+ value?: string | string[] | null,+): NotFoundShellState {+ return resolveShellState(value, notFoundShellStates, "default");+}++export function NotFoundShell({+ initialState = "default",+}: NotFoundShellProps) {+ const resolvedInitialState = resolveNotFoundShellState(initialState);+ const authenticated = resolvedInitialState === "authenticated";+ const ctaHref = authenticated ? "/dashboard" : "/";+ const ctaLabel = authenticated ? "Go to Dashboard" : "Go to Home";++ return (+ <main className="min-h-screen bg-white px-4 py-6 sm:px-6 sm:py-8 lg:px-8">+ <div className="mx-auto flex min-h-[calc(100vh-3rem)] max-w-[1080px] items-center justify-center sm:min-h-[calc(100vh-4rem)]">+ <section className="relative w-full max-w-[620px] overflow-hidden border border-(--border) bg-white px-6 py-16 text-center sm:px-10 sm:py-20">+ <div className="relative">+ <p className="section-eyebrow">Unavailable</p>+ <h1 className="mt-4 text-[clamp(2.4rem,6vw,4rem)] font-extrabold leading-[1.02] tracking-[-0.05em] text-(--fg)">+ Page not found+ </h1>+ <p className="mx-auto mt-4 max-w-md text-sm leading-7 text-muted-foreground sm:text-base">+ The page you're looking for doesn't exist or has been+ moved.+ </p>++ <div className="mt-8 flex justify-center">+ <ShellButton className="px-6" href={ctaHref}>+ {ctaLabel}+ </ShellButton>+ </div>+ </div>+ </section>+ </div>+ </main>+ );+}diff --git a/src/components/settings/settings-shell.tsx b/src/components/settings/settings-shell.tsxnew file mode 100644index 0000000..4ee1065--- /dev/null+++ b/src/components/settings/settings-shell.tsx@@ -0,0 +1,806 @@+"use client";++import { useState, type ChangeEvent, type FormEvent } from "react";++import { FieldShell, ShellButton } from "@/components/shared/form-shell";+import { PageHeader } from "@/components/shared/page-header";+import {+ Dialog,+ DialogContent,+ DialogDescription,+ DialogHeader,+ DialogTitle,+} from "@/components/ui/dialog";+import { Field, FieldLabel } from "@/components/ui/field";+import { Input } from "@/components/ui/input";++const CLOSURE_CONFIRMATION_PHRASE = "close my account";+const GENERIC_ERROR_MESSAGE = "Something went wrong. Please try again.";++type SettingsShellProps = {+ initialProfile?: ProfileValues;+};++type FeedbackTone = "error" | "success";++type FeedbackMessage = {+ message: string;+ tone: FeedbackTone;+} | null;++type ProfileValues = {+ email: string;+ fullName: string;+};++type PasswordValues = {+ currentPassword: string;+ newPassword: string;+};++type ProfileErrors = Partial<Record<keyof ProfileValues, string>>;+type PasswordErrors = Partial<Record<keyof PasswordValues, string>>;++type PendingAction = "closure" | "password" | "profile" | "reset" | null;++type ApiErrorPayload = {+ error?:+ | string+ | {+ message?: string;+ };+ fieldErrors?: Partial<Record<string, string>>;+ message?: string;+} | null;++const defaultProfileValues: ProfileValues = {+ email: "",+ fullName: "",+};++const defaultPasswordValues: PasswordValues = {+ currentPassword: "",+ newPassword: "",+};++function trimProfileValues(values: ProfileValues): ProfileValues {+ return {+ email: values.email.trim(),+ fullName: values.fullName.trim(),+ };+}++function validateProfileValues(values: ProfileValues): ProfileErrors {+ const errors: ProfileErrors = {};++ if (values.fullName.length === 0) {+ errors.fullName = "Enter your full name";+ }++ if (values.email.length === 0 || !values.email.includes("@")) {+ errors.email = "Enter a valid email address";+ }++ return errors;+}++function validatePasswordValues(values: PasswordValues): PasswordErrors {+ const errors: PasswordErrors = {};++ if (values.currentPassword.length === 0) {+ errors.currentPassword = "Enter your current password";+ }++ if (values.newPassword.trim().length < 15) {+ errors.newPassword = "Password must be at least 15 characters";+ }++ return errors;+}++async function readApiPayload(response: Response): Promise<ApiErrorPayload> {+ return (await response.json().catch(() => null)) as ApiErrorPayload;+}++function extractApiErrorMessage(payload: ApiErrorPayload): string {+ if (!payload) {+ return GENERIC_ERROR_MESSAGE;+ }++ if (typeof payload.error === "string" && payload.error.trim()) {+ return payload.error;+ }++ if (+ payload.error &&+ typeof payload.error === "object" &&+ typeof payload.error.message === "string" &&+ payload.error.message.trim()+ ) {+ return payload.error.message;+ }++ if (typeof payload.message === "string" && payload.message.trim()) {+ return payload.message;+ }++ return GENERIC_ERROR_MESSAGE;+}++function isDuplicateEmailMessage(message: string) {+ const normalizedMessage = message.toLowerCase();++ return (+ normalizedMessage.includes("already registered") ||+ normalizedMessage.includes("already in use")+ );+}++function isInvalidPasswordMessage(message: string) {+ return message.toLowerCase().includes("invalid password");+}++function isPasswordTooShortMessage(message: string) {+ return message.toLowerCase().includes("password too short");+}++function isCompromisedPasswordMessage(message: string) {+ return message.toLowerCase().includes("compromised");+}++function isNoOpEmailChangeMessage(message: string) {+ const normalizedMessage = message.toLowerCase();++ return (+ normalizedMessage.includes("email is the same") ||+ normalizedMessage.includes("already verified")+ );+}++export function SettingsShell({+ initialProfile = defaultProfileValues,+}: SettingsShellProps) {+ const [profileValues, setProfileValues] = useState(initialProfile);+ const [savedProfileValues, setSavedProfileValues] = useState(initialProfile);+ const [profileErrors, setProfileErrors] = useState<ProfileErrors>({});+ const [passwordValues, setPasswordValues] = useState(defaultPasswordValues);+ const [passwordErrors, setPasswordErrors] = useState<PasswordErrors>({});+ const [feedback, setFeedback] = useState<FeedbackMessage>(null);+ const [pendingAction, setPendingAction] = useState<PendingAction>(null);+ const [isClosureDialogOpen, setIsClosureDialogOpen] = useState(false);+ const [closureConfirmation, setClosureConfirmation] = useState("");++ const isBusy = pendingAction !== null;+ const isClosureConfirmationValid =+ closureConfirmation.trim().toLowerCase() === CLOSURE_CONFIRMATION_PHRASE;++ function handleProfileChange(field: keyof ProfileValues) {+ return (event: ChangeEvent<HTMLInputElement>) => {+ const nextValue = event.target.value;++ setProfileValues((currentValues) => ({+ ...currentValues,+ [field]: nextValue,+ }));+ setProfileErrors((currentErrors) => ({+ ...currentErrors,+ [field]: undefined,+ }));+ setFeedback(null);+ };+ }++ function handlePasswordChange(field: keyof PasswordValues) {+ return (event: ChangeEvent<HTMLInputElement>) => {+ const nextValue = event.target.value;++ setPasswordValues((currentValues) => ({+ ...currentValues,+ [field]: nextValue,+ }));+ setPasswordErrors((currentErrors) => ({+ ...currentErrors,+ [field]: undefined,+ }));+ setFeedback(null);+ };+ }++ async function handleProfileSubmit(event: FormEvent<HTMLFormElement>) {+ event.preventDefault();++ if (isBusy) {+ return;+ }++ const trimmedValues = trimProfileValues(profileValues);+ const nextErrors = validateProfileValues(trimmedValues);++ if (Object.keys(nextErrors).length > 0) {+ setProfileValues(trimmedValues);+ setProfileErrors(nextErrors);+ setFeedback(null);+ return;+ }++ setProfileValues(trimmedValues);+ setProfileErrors({});+ setFeedback(null);+ setPendingAction("profile");++ try {+ const nameChanged =+ trimmedValues.fullName !== savedProfileValues.fullName;+ const emailChanged =+ trimmedValues.email.trim().toLowerCase() !==+ savedProfileValues.email.trim().toLowerCase();+ let nextSavedProfile = savedProfileValues;++ if (nameChanged) {+ const response = await fetch("/api/account/profile", {+ body: JSON.stringify({+ email: savedProfileValues.email,+ fullName: trimmedValues.fullName,+ }),+ headers: {+ "content-type": "application/json",+ },+ method: "PATCH",+ });+ const payload = await readApiPayload(response);++ if (!response.ok) {+ const fieldErrors = payload?.fieldErrors ?? {};+ const errorMessage = extractApiErrorMessage(payload);++ setProfileErrors({+ email:+ typeof fieldErrors.email === "string"+ ? fieldErrors.email+ : isDuplicateEmailMessage(errorMessage)+ ? "This email is already registered"+ : undefined,+ fullName:+ typeof fieldErrors.fullName === "string"+ ? fieldErrors.fullName+ : undefined,+ });+ setFeedback({+ message:+ typeof fieldErrors.email === "string" ||+ typeof fieldErrors.fullName === "string"+ ? "Please correct the highlighted fields."+ : errorMessage,+ tone: "error",+ });+ return;+ }++ nextSavedProfile = {+ email: savedProfileValues.email,+ fullName: trimmedValues.fullName,+ };+ setSavedProfileValues(nextSavedProfile);+ }++ if (emailChanged) {+ const response = await fetch("/api/auth/change-email", {+ body: JSON.stringify({+ callbackURL: `${window.location.origin}/settings`,+ newEmail: trimmedValues.email,+ }),+ headers: {+ "content-type": "application/json",+ },+ method: "POST",+ });+ const payload = await readApiPayload(response);++ if (!response.ok) {+ const errorMessage = extractApiErrorMessage(payload);++ setProfileErrors({+ email: isDuplicateEmailMessage(errorMessage)+ ? "This email is already registered"+ : isNoOpEmailChangeMessage(errorMessage)+ ? "Enter a different email address"+ : undefined,+ fullName: undefined,+ });+ setProfileValues({+ email: trimmedValues.email,+ fullName: nextSavedProfile.fullName,+ });+ setFeedback({+ message:+ isDuplicateEmailMessage(errorMessage) ||+ isNoOpEmailChangeMessage(errorMessage)+ ? "Please correct the highlighted fields."+ : errorMessage,+ tone: "error",+ });+ return;+ }++ setProfileValues(nextSavedProfile);+ setProfileErrors({});+ setFeedback({+ message: nameChanged+ ? "Profile updated. If the email change can proceed, you'll receive the next steps by email."+ : "If the email change can proceed, you'll receive the next steps by email.",+ tone: "success",+ });+ return;+ }++ setProfileValues(nextSavedProfile);+ setProfileErrors({});+ setFeedback({+ message: "Profile updated.",+ tone: "success",+ });+ } catch {+ setFeedback({+ message: GENERIC_ERROR_MESSAGE,+ tone: "error",+ });+ } finally {+ setPendingAction(null);+ }+ }++ async function handlePasswordSubmit(event: FormEvent<HTMLFormElement>) {+ event.preventDefault();++ if (isBusy) {+ return;+ }++ const nextErrors = validatePasswordValues(passwordValues);++ if (Object.keys(nextErrors).length > 0) {+ setPasswordErrors(nextErrors);+ setFeedback(null);+ return;+ }++ setPasswordErrors({});+ setFeedback(null);+ setPendingAction("password");++ try {+ const response = await fetch("/api/auth/change-password", {+ body: JSON.stringify({+ ...passwordValues,+ revokeOtherSessions: true,+ }),+ headers: {+ "content-type": "application/json",+ },+ method: "POST",+ });+ const payload = await readApiPayload(response);++ if (!response.ok) {+ const errorMessage = extractApiErrorMessage(payload);++ setPasswordErrors({+ currentPassword: isInvalidPasswordMessage(errorMessage)+ ? "Current password is incorrect"+ : undefined,+ newPassword: isPasswordTooShortMessage(errorMessage)+ ? "Password must be at least 15 characters"+ : isCompromisedPasswordMessage(errorMessage)+ ? "Choose a password that hasn't appeared in a breach"+ : undefined,+ });+ setFeedback({+ message:+ isInvalidPasswordMessage(errorMessage) ||+ isPasswordTooShortMessage(errorMessage) ||+ isCompromisedPasswordMessage(errorMessage)+ ? "Please correct the highlighted fields."+ : errorMessage,+ tone: "error",+ });+ return;+ }++ setPasswordValues(defaultPasswordValues);+ setPasswordErrors({});+ setFeedback({+ message: "Password updated.",+ tone: "success",+ });+ } catch {+ setFeedback({+ message: GENERIC_ERROR_MESSAGE,+ tone: "error",+ });+ } finally {+ setPendingAction(null);+ }+ }++ async function handleResetPasswordLink() {+ if (isBusy) {+ return;+ }++ const trimmedProfileValues = trimProfileValues(profileValues);+ const nextErrors = validateProfileValues(trimmedProfileValues);++ if (nextErrors.email) {+ setProfileValues(trimmedProfileValues);+ setProfileErrors((currentErrors) => ({+ ...currentErrors,+ email: nextErrors.email,+ }));+ setFeedback(null);+ return;+ }++ setProfileValues(trimmedProfileValues);+ setProfileErrors((currentErrors) => ({+ ...currentErrors,+ email: undefined,+ }));+ setFeedback(null);+ setPendingAction("reset");++ try {+ const response = await fetch("/api/auth/request-password-reset", {+ body: JSON.stringify({+ email: trimmedProfileValues.email,+ redirectTo: `${window.location.origin}/login`,+ }),+ headers: {+ "content-type": "application/json",+ },+ method: "POST",+ });+ const payload = await readApiPayload(response);++ if (!response.ok) {+ setFeedback({+ message: extractApiErrorMessage(payload),+ tone: "error",+ });+ return;+ }++ setFeedback({+ message: "Password reset link sent.",+ tone: "success",+ });+ } catch {+ setFeedback({+ message: GENERIC_ERROR_MESSAGE,+ tone: "error",+ });+ } finally {+ setPendingAction(null);+ }+ }++ function openClosureDialog() {+ if (isBusy) {+ return;+ }++ setClosureConfirmation("");+ setFeedback(null);+ setIsClosureDialogOpen(true);+ }++ function closeClosureDialog() {+ if (pendingAction === "closure") {+ return;+ }++ setClosureConfirmation("");+ setIsClosureDialogOpen(false);+ }++ async function handleClosureSubmit() {+ if (pendingAction === "closure" || !isClosureConfirmationValid) {+ return;+ }++ setFeedback(null);+ setPendingAction("closure");++ try {+ const response = await fetch("/api/account/closure-request", {+ body: JSON.stringify({+ confirmation: CLOSURE_CONFIRMATION_PHRASE,+ }),+ headers: {+ "content-type": "application/json",+ },+ method: "POST",+ });+ const payload = await readApiPayload(response);++ if (!response.ok) {+ setFeedback({+ message: extractApiErrorMessage(payload),+ tone: "error",+ });+ return;+ }++ setClosureConfirmation("");+ setIsClosureDialogOpen(false);+ setFeedback({+ message:+ "We've received your request. Download any documents you want to keep within 30 days.",+ tone: "success",+ });+ } catch {+ setFeedback({+ message: GENERIC_ERROR_MESSAGE,+ tone: "error",+ });+ } finally {+ setPendingAction(null);+ }+ }++ return (+ <div className="space-y-8">+ <PageHeader+ description="Manage your sender profile, password, and account lifecycle."+ eyebrow="Account"+ title="Settings"+ />++ {feedback ? <SettingsFeedback feedback={feedback} /> : null}++ <section+ className="editorial-panel p-6 sm:p-8"+ data-animate="enter"+ data-animate-delay="1"+ >+ <div className="space-y-8">+ <div className="space-y-5">+ <SectionHeading title="Profile" />++ <form className="space-y-5" onSubmit={handleProfileSubmit}>+ <div className="grid gap-4 sm:grid-cols-2">+ <FieldShell+ disabled={isBusy}+ error={profileErrors.fullName}+ label="Full name"+ name="fullName"+ onChange={handleProfileChange("fullName")}+ readOnly={false}+ value={profileValues.fullName}+ />+ <FieldShell+ disabled={isBusy}+ error={profileErrors.email}+ label="Email"+ name="email"+ onChange={handleProfileChange("email")}+ readOnly={false}+ type="email"+ value={profileValues.email}+ />+ </div>+ <p className="text-sm leading-6 text-muted-foreground">+ Email changes are verified through your current inbox first,+ then the new inbox.+ </p>++ <ShellButton+ className="w-fit"+ loading={pendingAction === "profile"}+ type="submit"+ >+ {pendingAction === "profile" ? "Saving..." : "Save changes"}+ </ShellButton>+ </form>+ </div>++ <div className="border-t border-(--border) pt-8">+ <div className="space-y-5">+ <SectionHeading title="Password" />++ <form className="space-y-5" onSubmit={handlePasswordSubmit}>+ <div className="grid gap-4 sm:grid-cols-2">+ <FieldShell+ disabled={isBusy}+ error={passwordErrors.currentPassword}+ label="Current password"+ name="currentPassword"+ onChange={handlePasswordChange("currentPassword")}+ placeholder="••••••••••"+ readOnly={false}+ type="password"+ value={passwordValues.currentPassword}+ />+ <FieldShell+ disabled={isBusy}+ error={passwordErrors.newPassword}+ helper="Must be at least 15 characters"+ label="New password"+ name="newPassword"+ onChange={handlePasswordChange("newPassword")}+ placeholder="•••••••••••••••"+ readOnly={false}+ type="password"+ value={passwordValues.newPassword}+ />+ </div>++ <div className="flex flex-col gap-3 sm:flex-row sm:flex-wrap">+ <ShellButton+ className="w-fit"+ loading={pendingAction === "password"}+ type="submit"+ >+ {pendingAction === "password"+ ? "Updating..."+ : "Update password"}+ </ShellButton>+ <ShellButton+ disabled={isBusy}+ loading={pendingAction === "reset"}+ onClick={handleResetPasswordLink}+ variant="secondary"+ >+ {pendingAction === "reset"+ ? "Sending..."+ : "Email me a reset link"}+ </ShellButton>+ </div>+ </form>+ </div>+ </div>++ <div className="border-t border-(--border) pt-8">+ <div className="space-y-5">+ <SectionHeading title="Danger zone" />+ <p className="max-w-2xl text-sm leading-6 text-muted-foreground">+ Before closing your account, download any documents you want to+ keep. After closure, SignuDoc may provide a 30-day export window+ and then delete stored document files and related envelope+ records.+ </p>+ <ShellButton+ className="w-fit"+ disabled={isBusy}+ onClick={openClosureDialog}+ variant="secondary"+ >+ Request account closure+ </ShellButton>+ </div>+ </div>+ </div>+ </section>++ {isClosureDialogOpen ? (+ <AccountClosureDialog+ confirmationValue={closureConfirmation}+ isReady={isClosureConfirmationValid}+ isSubmitting={pendingAction === "closure"}+ onCancel={closeClosureDialog}+ onChange={setClosureConfirmation}+ onConfirm={handleClosureSubmit}+ />+ ) : null}+ </div>+ );+}++function SectionHeading({ title }: Readonly<{ title: string }>) {+ return (+ <h2 className="text-xl font-bold tracking-[-0.03em] text-(--fg)">+ {title}+ </h2>+ );+}++function SettingsFeedback({+ feedback,+}: Readonly<{+ feedback: Exclude<FeedbackMessage, null>;+}>) {+ const toneClasses =+ feedback.tone === "success"+ ? "border-[rgba(5,150,105,0.18)] bg-[rgba(5,150,105,0.05)] text-chart-4"+ : "border-[rgba(180,35,53,0.18)] bg-[rgba(180,35,53,0.04)] text-(--accent)";++ return (+ <section+ className={`border px-5 py-4 ${toneClasses}`}+ role={feedback.tone === "error" ? "alert" : "status"}+ >+ <p className="text-sm font-semibold">{feedback.message}</p>+ </section>+ );+}++type AccountClosureDialogProps = {+ confirmationValue: string;+ isReady: boolean;+ isSubmitting: boolean;+ onCancel: () => void;+ onChange: (value: string) => void;+ onConfirm: () => void;+};++function AccountClosureDialog({+ confirmationValue,+ isReady,+ isSubmitting,+ onCancel,+ onChange,+ onConfirm,+}: AccountClosureDialogProps) {+ return (+ <Dialog+ open+ onOpenChange={(open) => {+ if (!open && !isSubmitting) {+ onCancel();+ }+ }}+ >+ <DialogContent+ className="max-w-lg rounded-none border-(--border) sm:p-8"+ showCloseButton={false}+ >+ <div className="space-y-5">+ <DialogHeader className="space-y-3">+ <DialogTitle className="text-xl tracking-[-0.03em]">+ Request account closure?+ </DialogTitle>+ <DialogDescription className="text-sm leading-6 text-muted-foreground">+ Before closing your account, download any documents you want to+ keep. After closure, SignuDoc may provide a 30-day export window+ and then delete stored document files and related envelope+ records.+ </DialogDescription>+ </DialogHeader>++ <Field className="gap-2 text-sm">+ <FieldLabel+ className="font-semibold text-(--fg)"+ htmlFor="close-account-confirmation"+ >+ Type "close my account" to confirm:+ </FieldLabel>+ <Input+ aria-label='Type "close my account" to confirm:'+ disabled={isSubmitting}+ id="close-account-confirmation"+ onChange={(event) => onChange(event.target.value)}+ type="text"+ value={confirmationValue}+ />+ </Field>++ <div className="flex flex-col-reverse gap-3 sm:flex-row sm:justify-end">+ <ShellButton+ disabled={isSubmitting}+ onClick={onCancel}+ variant="secondary"+ >+ Cancel+ </ShellButton>+ <ShellButton+ disabled={!isReady}+ loading={isSubmitting}+ onClick={onConfirm}+ >+ {isSubmitting ? "Requesting..." : "Request closure"}+ </ShellButton>+ </div>+ </div>+ </DialogContent>+ </Dialog>+ );+}diff --git a/src/components/shared/document-viewport.tsx b/src/components/shared/document-viewport.tsxnew file mode 100644index 0000000..6d771c8--- /dev/null+++ b/src/components/shared/document-viewport.tsx@@ -0,0 +1,195 @@+"use client";++import { type PointerEvent as ReactPointerEvent } from "react";++export type DocumentPanGesture = {+ hasMoved: boolean;+ pointerId: number;+ startClientX: number;+ startClientY: number;+ startScrollLeft: number;+ startScrollTop: number;+};++export const DEFAULT_DOCUMENT_ZOOM_LEVEL = 1;+export const DOCUMENT_ZOOM_STEP = 0.1;++const DOCUMENT_PAN_THRESHOLD_PX = 6;+const MAX_DOCUMENT_ZOOM_LEVEL = 2;+const MIN_DOCUMENT_ZOOM_LEVEL = 0.6;++function roundNormalized(value: number) {+ return Math.round(value * 1_000_000) / 1_000_000;+}++export function clampDocumentZoomLevel(value: number) {+ return Math.min(+ MAX_DOCUMENT_ZOOM_LEVEL,+ Math.max(MIN_DOCUMENT_ZOOM_LEVEL, roundNormalized(value)),+ );+}++export function beginDocumentPanGesture(input: {+ canStart?: boolean;+ event: ReactPointerEvent<HTMLDivElement>;+ scrollContainer: HTMLDivElement | null;+ shouldIgnoreTarget?: (target: HTMLElement) => boolean;+ zoomLevel: number;+}): DocumentPanGesture | null {+ if (+ input.canStart === false ||+ input.zoomLevel <= DEFAULT_DOCUMENT_ZOOM_LEVEL ||+ input.event.button !== 0+ ) {+ return null;+ }++ const target = input.event.target;+ const scrollContainer = input.scrollContainer;++ if (!(scrollContainer instanceof HTMLDivElement)) {+ return null;+ }++ if (+ !(target instanceof HTMLElement) ||+ input.shouldIgnoreTarget?.(target) === true+ ) {+ return null;+ }++ const canPanHorizontally =+ scrollContainer.scrollWidth > scrollContainer.clientWidth;+ const canPanVertically =+ scrollContainer.scrollHeight > scrollContainer.clientHeight;++ if (!canPanHorizontally && !canPanVertically) {+ return null;+ }++ if (typeof scrollContainer.setPointerCapture === "function") {+ scrollContainer.setPointerCapture(input.event.pointerId);+ }++ return {+ hasMoved: false,+ pointerId: input.event.pointerId,+ startClientX: input.event.clientX,+ startClientY: input.event.clientY,+ startScrollLeft: scrollContainer.scrollLeft,+ startScrollTop: scrollContainer.scrollTop,+ };+}++export function moveDocumentPanGesture(input: {+ event: ReactPointerEvent<HTMLDivElement>;+ gesture: DocumentPanGesture | null;+ onPanStart: () => void;+ scrollContainer: HTMLDivElement | null;+}) {+ const scrollContainer = input.scrollContainer;+ const gesture = input.gesture;++ if (+ !(scrollContainer instanceof HTMLDivElement) ||+ !gesture ||+ input.event.pointerId !== gesture.pointerId+ ) {+ return;+ }++ const deltaX = input.event.clientX - gesture.startClientX;+ const deltaY = input.event.clientY - gesture.startClientY;++ if (+ !gesture.hasMoved &&+ Math.hypot(deltaX, deltaY) < DOCUMENT_PAN_THRESHOLD_PX+ ) {+ return;+ }++ input.event.preventDefault();++ if (!gesture.hasMoved) {+ gesture.hasMoved = true;+ input.onPanStart();+ }++ scrollContainer.scrollLeft = gesture.startScrollLeft - deltaX;+ scrollContainer.scrollTop = gesture.startScrollTop - deltaY;+}++export function endDocumentPanGesture(input: {+ event: ReactPointerEvent<HTMLDivElement>;+ gesture: DocumentPanGesture | null;+ onPanEnd: () => void;+ scrollContainer: HTMLDivElement | null;+}): boolean {+ const scrollContainer = input.scrollContainer;+ const gesture = input.gesture;++ if (+ !(scrollContainer instanceof HTMLDivElement) ||+ !gesture ||+ input.event.pointerId !== gesture.pointerId+ ) {+ return false;+ }++ if (typeof scrollContainer.releasePointerCapture === "function") {+ scrollContainer.releasePointerCapture(input.event.pointerId);+ }++ if (gesture.hasMoved) {+ input.onPanEnd();+ }++ return true;+}++export function DocumentZoomControls({+ onDecrease,+ onIncrease,+ onReset,+ zoomLevel,+}: {+ onDecrease: () => void;+ onIncrease: () => void;+ onReset: () => void;+ zoomLevel: number;+}) {+ const zoomPercentage = Math.round(zoomLevel * 100);++ return (+ <div className="inline-flex min-h-11 items-center border border-(--border) bg-white">+ <button+ aria-label="Zoom out"+ className="inline-flex size-11 items-center justify-center border-r border-(--border) text-lg leading-none text-(--fg) transition hover:bg-[rgba(17,17,17,0.04)] disabled:text-(--placeholder)"+ disabled={zoomLevel <= MIN_DOCUMENT_ZOOM_LEVEL}+ onClick={onDecrease}+ type="button"+ >+ -+ </button>+ <div className="flex min-w-[76px] items-center justify-center px-3 text-sm font-semibold text-(--fg)">+ {zoomPercentage}%+ </div>+ <button+ aria-label="Zoom in"+ className="inline-flex size-11 items-center justify-center border-l border-(--border) text-lg leading-none text-(--fg) transition hover:bg-[rgba(17,17,17,0.04)] disabled:text-(--placeholder)"+ disabled={zoomLevel >= MAX_DOCUMENT_ZOOM_LEVEL}+ onClick={onIncrease}+ type="button"+ >+ ++ </button>+ <button+ className="inline-flex min-h-11 items-center justify-center border-l border-(--border) px-4 [font-family:var(--font-mono)] text-[0.68rem] font-semibold uppercase tracking-[0.16em] text-(--fg) transition hover:bg-[rgba(17,17,17,0.04)]"+ onClick={onReset}+ type="button"+ >+ Fit+ </button>+ </div>+ );+}diff --git a/src/components/shared/form-shell.tsx b/src/components/shared/form-shell.tsxnew file mode 100644index 0000000..ac5e7c2--- /dev/null+++ b/src/components/shared/form-shell.tsx@@ -0,0 +1,178 @@+import Link from "next/link";+import { useId, type ChangeEventHandler, type ReactNode } from "react";++import { cn } from "@/lib/cn";+import { Button, buttonVariants } from "@/components/ui/button";+import {+ Field,+ FieldDescription,+ FieldError,+ FieldLabel,+} from "@/components/ui/field";+import { Input } from "@/components/ui/input";++type FieldShellProps = {+ autoComplete?: string;+ disabled?: boolean;+ error?: string;+ helper?: string;+ label: string;+ name?: string;+ onChange?: ChangeEventHandler<HTMLInputElement>;+ placeholder?: string;+ readOnly?: boolean;+ type?: "text" | "email" | "password";+ value?: string;+};++type ShellButtonProps = {+ children: ReactNode;+ className?: string;+ disabled?: boolean;+ href?: string;+ loading?: boolean;+ onClick?: () => void;+ type?: "button" | "submit";+ variant?: "ghost" | "primary" | "secondary";+};++const variantMap: Record<+ NonNullable<ShellButtonProps["variant"]>,+ NonNullable<React.ComponentProps<typeof Button>["variant"]>+> = {+ primary: "default",+ secondary: "outline",+ ghost: "ghost",+};++export function FieldShell({+ autoComplete,+ disabled = false,+ error,+ helper,+ label,+ name,+ onChange,+ placeholder,+ readOnly = true,+ type = "text",+ value,+}: FieldShellProps) {+ const generatedId = useId();+ const inputId = name ?? generatedId;++ return (+ <Field className="gap-2 text-sm">+ <FieldLabel+ className="text-[0.84rem] font-semibold tracking-[-0.02em] text-(--fg)"+ htmlFor={inputId}+ >+ {label}+ </FieldLabel>+ <Input+ aria-describedby={name ? `${name}-description` : undefined}+ aria-invalid={error ? true : undefined}+ autoComplete={autoComplete}+ className={cn(+ "read-only:text-muted-foreground",+ error ? "border-[rgba(180,35,53,0.36)]" : "border-(--border)",+ )}+ disabled={disabled}+ id={inputId}+ name={name}+ onChange={onChange}+ placeholder={placeholder}+ readOnly={readOnly}+ type={type}+ value={value ?? ""}+ />+ {error ? (+ <FieldError+ className="text-xs font-semibold text-(--accent)"+ id={name ? `${name}-description` : undefined}+ >+ {error}+ </FieldError>+ ) : helper ? (+ <FieldDescription+ className="text-xs leading-5 text-(--tertiary)"+ id={name ? `${name}-description` : undefined}+ >+ {helper}+ </FieldDescription>+ ) : null}+ </Field>+ );+}++export function ShellButton({+ children,+ className = "",+ disabled = false,+ href,+ loading = false,+ onClick,+ type = "button",+ variant = "primary",+}: ShellButtonProps) {+ const buttonVariant = variantMap[variant];+ const shellButtonClassName = cn(+ "rounded-none [font-family:var(--font-mono)] text-[0.74rem] font-bold uppercase tracking-[0.18em] shadow-none",+ className,+ );+ const content = (+ <>+ {loading ? (+ <span+ aria-hidden="true"+ className="mr-2 inline-flex h-4 w-4 animate-spin rounded-full border-2 border-current border-r-transparent"+ />+ ) : null}+ {children}+ </>+ );++ if (href && !disabled && !loading) {+ return (+ <Button asChild className={shellButtonClassName} variant={buttonVariant}>+ <Link href={href}>{children}</Link>+ </Button>+ );+ }++ return (+ <Button+ className={shellButtonClassName}+ disabled={disabled || loading}+ onClick={onClick}+ type={type}+ variant={buttonVariant}+ >+ {content}+ </Button>+ );+}++type StaticShellButtonProps = {+ children: ReactNode;+ className?: string;+ variant?: NonNullable<ShellButtonProps["variant"]>;+};++export function StaticShellButton({+ children,+ className = "",+ variant = "primary",+}: StaticShellButtonProps) {+ return (+ <span+ className={cn(+ buttonVariants({ variant: variantMap[variant] }),+ "rounded-none [font-family:var(--font-mono)] text-[0.74rem] font-bold uppercase tracking-[0.18em] shadow-none",+ className,+ )}+ >+ {children}+ </span>+ );+}diff --git a/src/components/shared/page-header.tsx b/src/components/shared/page-header.tsxnew file mode 100644index 0000000..387cddf--- /dev/null+++ b/src/components/shared/page-header.tsx@@ -0,0 +1,37 @@+import type { ReactNode } from "react";++type PageHeaderProps = {+ action?: ReactNode;+ description?: string;+ eyebrow?: string;+ title: string;+};++export function PageHeader({+ action,+ description,+ eyebrow = "Workspace",+ title,+}: PageHeaderProps) {+ return (+ <div+ className="flex flex-col gap-5 border-b border-(--border) pb-6 sm:flex-row sm:items-end sm:justify-between"+ data-animate="enter"+ >+ <div className="space-y-3">+ <div className="space-y-2">+ <p className="section-eyebrow">{eyebrow}</p>+ <h1 className="text-[clamp(2.4rem,4.8vw,4rem)] font-extrabold leading-[1.02] tracking-[-0.045em] text-black">+ {title}+ </h1>+ {description ? (+ <p className="max-w-2xl text-sm leading-6 text-muted-foreground sm:text-base">+ {description}+ </p>+ ) : null}+ </div>+ </div>+ {action ? <div className="shrink-0">{action}</div> : null}+ </div>+ );+}diff --git a/src/components/shared/shell-state.ts b/src/components/shared/shell-state.tsnew file mode 100644index 0000000..c959b02--- /dev/null+++ b/src/components/shared/shell-state.ts@@ -0,0 +1,13 @@+export function resolveShellState<T extends string>(+ value: string | string[] | null | undefined,+ states: readonly T[],+ fallback: T,+): T {+ const normalizedValue = Array.isArray(value) ? value[0] : value;++ if (normalizedValue && states.includes(normalizedValue as T)) {+ return normalizedValue as T;+ }++ return fallback;+}diff --git a/src/components/shared/status-panel.tsx b/src/components/shared/status-panel.tsxnew file mode 100644index 0000000..6f032f9--- /dev/null+++ b/src/components/shared/status-panel.tsx@@ -0,0 +1,72 @@+import Link from "next/link";+import type { ReactNode } from "react";++import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";+import { Skeleton } from "@/components/ui/skeleton";++type StatusPanelProps = {+ action?: {+ href: string;+ label: string;+ };+ description: string;+ footer?: ReactNode;+ eyebrow?: string;+ title: string;+ tone?: "error" | "loading" | "neutral";+};++const badgeStyles: Record<NonNullable<StatusPanelProps["tone"]>, string> = {+ neutral: "bg-[rgba(17,17,17,0.06)] text-muted-foreground",+ loading: "bg-[rgba(37,99,235,0.12)] text-chart-1",+ error: "bg-[rgba(255,0,51,0.1)] text-(--accent)",+};++export function StatusPanel({+ action,+ description,+ footer,+ eyebrow,+ title,+ tone = "neutral",+}: StatusPanelProps) {+ return (+ <section className="editorial-panel space-y-4 p-6 sm:p-8">+ <Badge+ variant="secondary"+ className={`inline-flex rounded-none px-3 py-1 [font-family:var(--font-mono)] uppercase tracking-[0.18em] ${badgeStyles[tone]}`}+ >+ {eyebrow ??+ (tone === "error"+ ? "Error"+ : tone === "loading"+ ? "Loading"+ : "Ready")}+ </Badge>+ <div className="space-y-2">+ <h2 className="text-xl font-semibold tracking-[-0.03em] text-(--fg)">+ {title}+ </h2>+ <p className="max-w-2xl text-sm leading-6 text-muted-foreground">+ {description}+ </p>+ </div>+ {tone === "loading" ? (+ <div className="space-y-3" aria-hidden="true">+ <Skeleton className="h-3 w-full max-w-xl rounded-none bg-(--surface)" />+ <Skeleton className="h-3 w-4/5 rounded-none bg-(--surface)" />+ <Skeleton className="h-3 w-2/3 rounded-none bg-(--surface)" />+ </div>+ ) : null}+ <div className="flex flex-wrap items-center gap-3">+ {action ? (+ <Button asChild>+ <Link href={action.href}>{action.label}</Link>+ </Button>+ ) : null}+ {footer}+ </div>+ </section>+ );+}diff --git a/src/components/shared/step-indicator.tsx b/src/components/shared/step-indicator.tsxnew file mode 100644index 0000000..ad8683b--- /dev/null+++ b/src/components/shared/step-indicator.tsx@@ -0,0 +1,49 @@+type StepIndicatorProps = {+ current: number;+ steps: string[];+};++export function StepIndicator({ current, steps }: StepIndicatorProps) {+ return (+ <section+ className="editorial-panel px-4 py-4 sm:px-5"+ data-animate="enter"+ data-animate-delay="1"+ >+ <ol className="grid gap-3 sm:grid-cols-4">+ {steps.map((step, index) => {+ const isComplete = index < current - 1;+ const isCurrent = index === current - 1;++ return (+ <li+ className={`flex items-center gap-3 border px-3 py-2 ${+ isCurrent ? "border-(--accent) bg-[#fff8f8]" : "border-(--border) bg-white"+ }`}+ key={step}+ >+ <span+ className={`inline-flex size-8 shrink-0 items-center justify-center border text-xs font-bold ${+ isCurrent+ ? "border-(--accent) bg-(--accent) text-white"+ : isComplete+ ? "border-black bg-black text-white"+ : "border-(--border) bg-white text-(--tertiary)"+ }`}+ >+ {index + 1}+ </span>+ <span+ className={`[font-family:var(--font-mono)] text-[0.72rem] font-semibold uppercase tracking-[0.22em] ${+ isCurrent || isComplete ? "text-(--fg)" : "text-(--tertiary)"+ }`}+ >+ {step}+ </span>+ </li>+ );+ })}+ </ol>+ </section>+ );+}diff --git a/src/components/signing/signing-done-shell.tsx b/src/components/signing/signing-done-shell.tsxnew file mode 100644index 0000000..90c9ef7--- /dev/null+++ b/src/components/signing/signing-done-shell.tsx@@ -0,0 +1,69 @@+import { Brand } from "@/components/layout/brand";+import { PublicLegalFooter } from "@/components/layout/public-legal-links";++const fallbackEnvelopeTitle = "this document";++type SigningDoneShellProps = {+ envelopeTitle?: string | null;+};++export function SigningDoneShell({ envelopeTitle }: SigningDoneShellProps) {+ const resolvedEnvelopeTitle =+ envelopeTitle && envelopeTitle.trim().length > 0+ ? envelopeTitle.trim()+ : fallbackEnvelopeTitle;++ return (+ <div className="flex min-h-screen flex-col bg-white">+ <header className="border-b border-(--border) bg-white">+ <div className="mx-auto flex max-w-[1360px] items-center px-4 py-5 sm:px-6 lg:px-8">+ <Brand href="/" />+ </div>+ </header>++ <main className="mx-auto flex w-full max-w-[1360px] flex-1 items-center justify-center px-4 py-12 sm:px-6 lg:px-8">+ <section className="editorial-panel w-full max-w-[820px] px-6 py-12 text-center sm:px-10 sm:py-16">+ <div+ aria-hidden="true"+ className="mx-auto inline-flex size-20 items-center justify-center border border-[rgba(5,150,105,0.18)] bg-[rgba(5,150,105,0.1)]"+ >+ <svg+ className="size-9 text-chart-4"+ fill="none"+ viewBox="0 0 36 36"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ d="M10 18.5L15.25 23.75L26.5 12.5"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="3"+ />+ </svg>+ </div>++ <h1 className="mt-8 text-[32px] font-extrabold tracking-[-0.05em] text-(--fg) sm:text-[38px]">+ You're all done.+ </h1>+ <p className="mx-auto mt-5 max-w-[560px] text-base leading-7 text-muted-foreground sm:text-[15px]">+ Your signature has been recorded for{" "}+ <span className="font-semibold text-(--fg)">+ "{resolvedEnvelopeTitle}"+ </span>+ .+ </p>+ <p className="mx-auto mt-4 max-w-[560px] text-base leading-7 text-muted-foreground sm:text-[15px]">+ You'll receive an email with the signed document once all+ parties have signed.+ </p>+ <p className="mt-8 text-sm font-semibold uppercase tracking-[0.2em] text-(--tertiary)">+ You can close this tab.+ </p>+ </section>+ </main>++ <PublicLegalFooter />+ </div>+ );+}diff --git a/src/components/signing/signing-live-shell.tsx b/src/components/signing/signing-live-shell.tsxnew file mode 100644index 0000000..88ef69b--- /dev/null+++ b/src/components/signing/signing-live-shell.tsx@@ -0,0 +1,1696 @@+"use client";++import Image from "next/image";+import {+ type PointerEvent as ReactPointerEvent,+ useEffect,+ useRef,+ useState,+ type ReactNode,+} from "react";++import {+ PdfPageCanvas,+ type PdfPageRenderState,+} from "@/components/envelopes/pdf-page-canvas";+import { Brand } from "@/components/layout/brand";+import {+ ChevronLeftIcon,+ ChevronRightIcon,+} from "@/components/layout/nav-items";+import { PublicLegalFooter } from "@/components/layout/public-legal-links";+import {+ beginDocumentPanGesture,+ clampDocumentZoomLevel,+ DEFAULT_DOCUMENT_ZOOM_LEVEL,+ DocumentZoomControls,+ endDocumentPanGesture,+ moveDocumentPanGesture,+ type DocumentPanGesture,+ DOCUMENT_ZOOM_STEP,+} from "@/components/shared/document-viewport";+import { ShellButton } from "@/components/shared/form-shell";+import {+ Dialog,+ DialogContent,+ DialogDescription,+ DialogHeader,+ DialogTitle,+} from "@/components/ui/dialog";+import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";+import { Textarea } from "@/components/ui/textarea";+import {+ type SigningCurrentField,+ type SigningPayload,+ type SigningVisibleField,+} from "@/lib/schemas/signing";+import { type SigningSubmission } from "@/lib/schemas/field";++const typedSignatureFont =+ '"Snell Roundhand", "Brush Script MT", "Segoe Script", cursive';++type SignatureEntry = {+ imageDataUrl?: string | null;+ inputMethod: "drawn" | "typed";+ value: string;+};++type SignatureModalState = {+ fieldId: string;+ mode: "drawn" | "typed";+ type: "initials" | "signature";+};++type ReusableSignatureEntries = Record<+ SignatureModalState["type"],+ SignatureEntry | null+>;++type PositionedSigningField = {+ height: string;+ left: string;+ top: string;+ width: string;+};++const defaultSubmitErrorMessage =+ "We couldn't finish signing right now. Reload the page or request a fresh signing link from the sender.";+const defaultDeclineErrorMessage =+ "We couldn't record your decline right now. Reload the page or request a fresh signing link from the sender.";+const compactFieldHeightThreshold = 0.045;+const compactFieldWidthThreshold = 0.12;++function getInitials(name: string): string {+ return name+ .split(/\s+/)+ .filter(Boolean)+ .map((part) => part[0])+ .join("")+ .slice(0, 4)+ .toUpperCase();+}++function getFieldFrame(field: SigningCurrentField | SigningVisibleField) {+ return {+ height: `${field.height * 100}%`,+ left: `${field.x * 100}%`,+ top: `${field.y * 100}%`,+ width: `${field.width * 100}%`,+ } satisfies PositionedSigningField;+}++function shouldShowInlineFieldLabel(+ field: Pick<SigningCurrentField | SigningVisibleField, "height" | "width">,+) {+ return (+ field.width >= compactFieldWidthThreshold &&+ field.height >= compactFieldHeightThreshold+ );+}++function shouldShowInlineFieldValue(+ field: Pick<SigningCurrentField | SigningVisibleField, "height" | "width">,+) {+ return field.width >= 0.08 && field.height >= 0.03;+}++function getCanvasFieldLabel(+ field: Pick<SigningCurrentField | SigningVisibleField, "label" | "type">,+) {+ if (field.label?.trim()) {+ return field.label;+ }++ switch (field.type) {+ case "signature":+ return "Sign";+ case "initials":+ return "Initial";+ case "date":+ return "Date";+ case "text":+ return "Text";+ case "checkbox":+ return "Checkbox";+ default:+ return "Field";+ }+}++function getSignatureFieldType(+ field: Pick<SigningCurrentField, "type">,+): SignatureModalState["type"] | null {+ if (field.type === "initials" || field.type === "signature") {+ return field.type;+ }++ return null;+}++function getFieldLabel(+ field: Pick<SigningCurrentField, "label" | "type">,+): string {+ if (field.label?.trim()) {+ return field.label;+ }++ switch (field.type) {+ case "signature":+ return "Sign here";+ case "initials":+ return "Initial here";+ case "date":+ return "Date";+ case "text":+ return "Enter text";+ case "checkbox":+ return "Checkbox";+ default:+ return "Field";+ }+}++function getSummaryLabel(field: SigningCurrentField) {+ switch (field.type) {+ case "signature":+ return "Signature";+ case "initials":+ return "Initials";+ case "date":+ return "Date";+ case "text":+ return "Text input";+ case "checkbox":+ return "Checkbox";+ default:+ return "Field";+ }+}++function isActionSummaryField(field: SigningCurrentField) {+ if (field.type === "signature" || field.type === "initials") {+ return true;+ }++ if (field.type === "text") {+ return true;+ }++ if (field.type === "checkbox") {+ return field.required;+ }++ return false;+}++function getCompletionValue(+ field: SigningCurrentField,+ {+ checkboxValues,+ localDateLabel,+ signatureValues,+ textValues,+ }: {+ checkboxValues: Record<string, boolean>;+ localDateLabel: string;+ signatureValues: Record<string, SignatureEntry>;+ textValues: Record<string, string>;+ },+) {+ if (field.type === "signature" || field.type === "initials") {+ return signatureValues[field.id]?.value ?? "Tap to sign";+ }++ if (field.type === "text") {+ return textValues[field.id]?.trim() || "Enter text";+ }++ if (field.type === "checkbox") {+ return checkboxValues[field.id] ? "Checked" : "Optional";+ }++ return localDateLabel;+}++function isFieldComplete(+ field: SigningCurrentField,+ {+ checkboxValues,+ signatureValues,+ textValues,+ }: {+ checkboxValues: Record<string, boolean>;+ signatureValues: Record<string, SignatureEntry>;+ textValues: Record<string, string>;+ },+) {+ if (field.type === "signature" || field.type === "initials") {+ return Boolean(signatureValues[field.id]?.value);+ }++ if (field.type === "text") {+ if (!field.required) {+ return true;+ }++ return (textValues[field.id] ?? "").trim().length > 0;+ }++ if (field.type === "checkbox") {+ if (!field.required) {+ return true;+ }++ return Boolean(checkboxValues[field.id]);+ }++ return true;+}++function getVisibleFieldValue(field: SigningVisibleField) {+ if (field.type === "checkbox") {+ return field.checked ? "Checked" : "Unchecked";+ }++ return field.value?.trim() || getFieldLabel(field);+}++function buildSigningSubmissionPayload(+ record: SigningPayload,+ {+ checkboxValues,+ signatureValues,+ textValues,+ }: {+ checkboxValues: Record<string, boolean>;+ signatureValues: Record<string, SignatureEntry>;+ textValues: Record<string, string>;+ },+): SigningSubmission {+ const fields: SigningSubmission["fields"] = [];++ for (const field of record.currentSignerFields) {+ if (field.type === "signature" || field.type === "initials") {+ const entry = signatureValues[field.id];++ if (!entry) {+ continue;+ }++ if (entry.inputMethod === "drawn" && entry.imageDataUrl) {+ fields.push({+ fieldId: field.id,+ imageDataUrl: entry.imageDataUrl,+ inputMethod: "drawn",+ type: field.type,+ });+ continue;+ }++ fields.push({+ fieldId: field.id,+ inputMethod: "typed",+ type: field.type,+ value: entry.value,+ });+ continue;+ }++ if (field.type === "text") {+ const value = textValues[field.id]?.trim();++ if (value) {+ fields.push({+ fieldId: field.id,+ type: "text",+ value,+ });+ }++ continue;+ }++ if (field.type === "checkbox") {+ fields.push({+ checked: Boolean(checkboxValues[field.id]),+ fieldId: field.id,+ type: "checkbox",+ });+ }+ }++ return {+ clientTimezoneOffsetMinutes: new Date().getTimezoneOffset(),+ fields,+ };+}++export function SigningLiveShell({ record }: { record: SigningPayload }) {+ const [activePage, setActivePage] = useState(+ record.currentSignerFields[0]?.page ??+ record.visibleFields[0]?.page ??+ record.pages[0]?.pageNumber ??+ 1,+ );+ const [checkboxValues, setCheckboxValues] = useState<Record<string, boolean>>(+ {},+ );+ const [declineError, setDeclineError] = useState<string | null>(null);+ const [declineReason, setDeclineReason] = useState("");+ const [isDeclineDialogOpen, setIsDeclineDialogOpen] = useState(false);+ const [isDeclining, setIsDeclining] = useState(false);+ const [isFinishDialogOpen, setIsFinishDialogOpen] = useState(false);+ const [isDocumentPanning, setIsDocumentPanning] = useState(false);+ const [isSubmitting, setIsSubmitting] = useState(false);+ const [pdfRenderState, setPdfRenderState] =+ useState<PdfPageRenderState>("loading");+ const [signatureValues, setSignatureValues] = useState<+ Record<string, SignatureEntry>+ >({});+ const [reusableSignatureEntries, setReusableSignatureEntries] =+ useState<ReusableSignatureEntries>({+ initials: null,+ signature: null,+ });+ const [signatureModal, setSignatureModal] =+ useState<SignatureModalState | null>(null);+ const [submitError, setSubmitError] = useState<string | null>(null);+ const [textValues, setTextValues] = useState<Record<string, string>>({});+ const [drawnSignatureVersion, setDrawnSignatureVersion] = useState(0);+ const [zoomLevel, setZoomLevel] = useState(DEFAULT_DOCUMENT_ZOOM_LEVEL);+ const [localDateLabel] = useState(() =>+ new Intl.DateTimeFormat("en-US", {+ day: "numeric",+ month: "long",+ year: "numeric",+ }).format(new Date()),+ );+ const paperGridRef = useRef<HTMLDivElement | null>(null);+ const documentPanGestureRef = useRef<DocumentPanGesture | null>(null);++ const activePageRecord =+ record.pages.find((page) => page.pageNumber === activePage) ??+ record.pages[0];+ const pageCurrentFields = record.currentSignerFields.filter(+ (field) => field.page === activePage,+ );+ const pageVisibleFields = record.visibleFields.filter(+ (field) => field.page === activePage,+ );+ const actionSummaryFields = record.currentSignerFields.filter(+ isActionSummaryField,+ );+ const remainingFields = record.currentSignerFields.filter(+ (field) =>+ field.required &&+ !isFieldComplete(field, {+ checkboxValues,+ signatureValues,+ textValues,+ }),+ ).length;+ const canFinish = remainingFields === 0;+ const isDocumentReady = pdfRenderState === "ready";++ function applyZoomLevel(nextZoomLevel: number) {+ if (nextZoomLevel <= DEFAULT_DOCUMENT_ZOOM_LEVEL) {+ setIsDocumentPanning(false);+ documentPanGestureRef.current = null;+ }++ setZoomLevel(nextZoomLevel);+ }++ function handleSignatureFieldClick(field: SigningCurrentField) {+ const fieldType = getSignatureFieldType(field);++ if (!fieldType) {+ return;+ }++ const existingFieldEntry = signatureValues[field.id];+ const reusableEntry = reusableSignatureEntries[fieldType];++ setDrawnSignatureVersion(0);+ setSubmitError(null);++ if (!existingFieldEntry && reusableEntry) {+ setSignatureValues((current) => ({+ ...current,+ [field.id]: reusableEntry,+ }));+ return;+ }++ setSignatureModal({+ fieldId: field.id,+ mode:+ existingFieldEntry?.inputMethod ??+ reusableEntry?.inputMethod ??+ "typed",+ type: fieldType,+ });+ }++ async function handleFinishSigning() {+ if (!canFinish || isSubmitting) {+ return;+ }++ setIsSubmitting(true);+ setSubmitError(null);++ try {+ const response = await fetch(record.submitUrl, {+ body: JSON.stringify(+ buildSigningSubmissionPayload(record, {+ checkboxValues,+ signatureValues,+ textValues,+ }),+ ),+ headers: {+ "content-type": "application/json",+ },+ method: "POST",+ });+ const payload = (await response.json().catch(() => null)) as {+ error?: string;+ redirectPath?: string;+ state?: string;+ } | null;++ if (!response.ok) {+ if (payload?.state) {+ window.location.reload();+ return;+ }++ setSubmitError(payload?.error ?? defaultSubmitErrorMessage);+ setIsSubmitting(false);+ return;+ }++ const fallbackRedirectPath = `${window.location.pathname.replace(/\/$/, "")}/done?title=${encodeURIComponent(record.envelopeTitle)}`;++ window.location.assign(payload?.redirectPath ?? fallbackRedirectPath);+ } catch {+ setSubmitError(defaultSubmitErrorMessage);+ setIsSubmitting(false);+ }+ }++ async function handleDeclineSigning() {+ if (isDeclining) {+ return;+ }++ setIsDeclining(true);+ setDeclineError(null);++ try {+ const response = await fetch(record.declineUrl, {+ body: JSON.stringify({+ reason: declineReason,+ }),+ headers: {+ "content-type": "application/json",+ },+ method: "POST",+ });+ const payload = (await response.json().catch(() => null)) as {+ error?: string;+ state?: string;+ } | null;++ if (!response.ok) {+ if (payload?.state) {+ window.location.reload();+ return;+ }++ setDeclineError(payload?.error ?? defaultDeclineErrorMessage);+ setIsDeclining(false);+ return;+ }++ window.location.reload();+ } catch {+ setDeclineError(defaultDeclineErrorMessage);+ setIsDeclining(false);+ }+ }++ function beginDocumentPan(event: ReactPointerEvent<HTMLDivElement>) {+ documentPanGestureRef.current = beginDocumentPanGesture({+ event,+ scrollContainer: paperGridRef.current,+ shouldIgnoreTarget: (target) =>+ Boolean(target.closest("[data-signing-field='true']")),+ zoomLevel,+ });+ }++ function handleDocumentPanMove(event: ReactPointerEvent<HTMLDivElement>) {+ moveDocumentPanGesture({+ event,+ gesture: documentPanGestureRef.current,+ onPanStart: () => setIsDocumentPanning(true),+ scrollContainer: paperGridRef.current,+ });+ }++ function endDocumentPan(event: ReactPointerEvent<HTMLDivElement>) {+ if (+ endDocumentPanGesture({+ event,+ gesture: documentPanGestureRef.current,+ onPanEnd: () => setIsDocumentPanning(false),+ scrollContainer: paperGridRef.current,+ })+ ) {+ documentPanGestureRef.current = null;+ }+ }++ return (+ <div className="flex min-h-screen flex-col bg-white">+ <header className="sticky top-0 z-20 border-b border-(--border) bg-white/95 backdrop-blur">+ <div className="mx-auto flex w-full max-w-[1440px] items-center justify-between gap-4 px-4 py-4 sm:px-6 lg:px-8">+ <div className="flex min-w-0 items-center gap-5">+ <Brand href="/" />+ <div className="hidden min-w-0 border-l border-(--border) pl-5 sm:block">+ <p className="truncate text-sm font-semibold text-(--fg)">+ {record.envelopeTitle}+ </p>+ <p className="mt-1 text-xs uppercase tracking-[0.18em] text-(--tertiary)">+ From {record.senderName}+ </p>+ </div>+ </div>+ <ShellButton+ className="min-h-11 px-4"+ disabled={isSubmitting || isDeclining}+ onClick={() => {+ setDeclineError(null);+ setIsDeclineDialogOpen(true);+ }}+ variant="secondary"+ >+ Decline+ </ShellButton>+ </div>+ </header>++ <main className="mx-auto flex w-full max-w-[1440px] flex-1 flex-col gap-6 px-4 py-5 sm:px-6 lg:px-8 lg:py-8">+ <section className="grid gap-6 xl:grid-cols-[minmax(0,1fr)_320px]">+ <div className="flex min-w-0 flex-col gap-4">+ <div className="editorial-panel px-4 py-3 sm:px-5">+ <div className="flex flex-col gap-3 xl:grid xl:grid-cols-[1fr_auto_1fr] xl:items-center">+ <div className="flex justify-center xl:justify-start">+ <DocumentZoomControls+ onDecrease={() =>+ applyZoomLevel(+ clampDocumentZoomLevel(zoomLevel - DOCUMENT_ZOOM_STEP),+ )+ }+ onIncrease={() =>+ applyZoomLevel(+ clampDocumentZoomLevel(zoomLevel + DOCUMENT_ZOOM_STEP),+ )+ }+ onReset={() => applyZoomLevel(DEFAULT_DOCUMENT_ZOOM_LEVEL)}+ zoomLevel={zoomLevel}+ />+ </div>++ <div className="flex items-center justify-center gap-3">+ <button+ aria-label="Previous page"+ className="inline-flex size-11 items-center justify-center rounded-none border border-(--border) bg-white text-muted-foreground transition hover:border-black hover:bg-white disabled:cursor-not-allowed disabled:text-(--placeholder)"+ disabled={activePage === 1}+ onClick={() =>+ setActivePage((page) => Math.max(1, page - 1))+ }+ type="button"+ >+ <ChevronLeftIcon className="size-4" />+ </button>+ <div className="min-w-[132px] text-center">+ <p className="text-xs font-semibold uppercase tracking-[0.22em] text-(--tertiary)">+ Document page+ </p>+ <p className="mt-1 text-sm font-semibold text-(--fg)">+ {`Page ${activePage} of ${record.pageCount}`}+ </p>+ </div>+ <button+ aria-label="Next page"+ className="inline-flex size-11 items-center justify-center rounded-none border border-(--border) bg-white text-muted-foreground transition hover:border-black hover:bg-white disabled:cursor-not-allowed disabled:text-(--placeholder)"+ disabled={activePage === record.pageCount}+ onClick={() =>+ setActivePage((page) =>+ Math.min(record.pageCount, page + 1),+ )+ }+ type="button"+ >+ <ChevronRightIcon className="size-4" />+ </button>+ </div>++ <div className="flex justify-center xl:justify-end">+ <SigningToolbarStatus+ hasLockedFields={pageVisibleFields.length > 0}+ remainingFields={remainingFields}+ />+ </div>+ </div>+ </div>++ <div className="editorial-panel p-3 sm:p-4">+ <div+ className={`relative overflow-auto border border-(--border) bg-(--surface) p-3 sm:p-5 ${+ zoomLevel > DEFAULT_DOCUMENT_ZOOM_LEVEL+ ? isDocumentPanning+ ? "cursor-grabbing"+ : "cursor-grab"+ : ""+ }`}+ data-paper-grid+ onPointerCancel={endDocumentPan}+ onPointerDown={beginDocumentPan}+ onPointerMove={handleDocumentPanMove}+ onPointerUp={endDocumentPan}+ ref={paperGridRef}+ >+ <div+ className={`mx-auto ${+ zoomLevel > DEFAULT_DOCUMENT_ZOOM_LEVEL+ ? "w-full"+ : "flex justify-center"+ }`}+ >+ <div+ className="relative border border-[rgba(17,17,17,0.08)] bg-white"+ style={{+ width: `${zoomLevel * 100}%`,+ }}+ >+ <div+ className="relative overflow-hidden"+ data-field-viewport+ style={{+ aspectRatio: `${activePageRecord?.widthPt ?? 8.5} / ${activePageRecord?.heightPt ?? 11}`,+ }}+ >+ <PdfPageCanvas+ documentUrl={record.documentUrl}+ onRenderStateChange={setPdfRenderState}+ pageNumber={activePage}+ />++ {isDocumentReady+ ? pageVisibleFields.map((field) => (+ <VisibleFieldStamp field={field} key={field.id} />+ ))+ : null}++ {isDocumentReady+ ? pageCurrentFields.map((field) => (+ <CurrentSignerField+ checkboxValue={Boolean(checkboxValues[field.id])}+ field={field}+ key={field.id}+ localDateLabel={localDateLabel}+ onCheckboxChange={(checked) => {+ setSubmitError(null);+ setCheckboxValues((current) => ({+ ...current,+ [field.id]: checked,+ }));+ }}+ onSignatureClick={() =>+ handleSignatureFieldClick(field)+ }+ onTextChange={(value) => {+ setSubmitError(null);+ setTextValues((current) => ({+ ...current,+ [field.id]: value,+ }));+ }}+ signatureEntry={signatureValues[field.id]}+ textValue={textValues[field.id] ?? ""}+ />+ ))+ : null}++ {isDocumentReady &&+ pageCurrentFields.length === 0 &&+ pageVisibleFields.length === 0 ? (+ <div className="absolute inset-0 z-1 flex items-center justify-center px-6">+ <div className="max-w-[320px] border border-dashed border-[rgba(17,17,17,0.12)] bg-white/92 px-6 py-8 text-center">+ <p className="text-lg font-semibold tracking-[-0.03em] text-(--fg)">+ No signer fields on this page+ </p>+ <p className="mt-3 text-sm leading-6 text-muted-foreground">+ Move between pages to review your assigned fields+ and any completed values from earlier signers.+ </p>+ </div>+ </div>+ ) : null}+ </div>+ </div>+ </div>+ </div>+ </div>+ </div>++ <aside className="space-y-4 xl:sticky xl:top-24 xl:self-start">+ <section className="editorial-panel p-5 sm:p-6">+ <p className="text-xs font-semibold uppercase tracking-[0.22em] text-(--tertiary)">+ Current signer+ </p>+ <div className="mt-4 flex items-center gap-3">+ <span className="inline-flex size-11 items-center justify-center rounded-full bg-(--signer-1-tint) text-base font-semibold text-chart-1">+ {getInitials(record.signer.name)}+ </span>+ <div className="min-w-0">+ <p className="truncate text-sm font-semibold text-(--fg)">+ {record.signer.name}+ </p>+ <p className="truncate text-sm text-muted-foreground">+ {record.signer.email}+ </p>+ </div>+ </div>++ <div className="mt-6 border-t border-(--border) pt-5">+ <p className="text-xs font-semibold uppercase tracking-[0.22em] text-(--tertiary)">+ Ready to finish+ </p>+ <p className="mt-3 text-sm font-semibold text-(--fg)">+ {remainingFields === 0+ ? "All required fields complete"+ : `${remainingFields} required field${remainingFields === 1 ? "" : "s"} remaining`}+ </p>+ <p className="mt-2 text-sm leading-6 text-muted-foreground">+ Previous signer values stay visible but locked. Only your+ assigned fields are interactive.+ </p>+ <div className="mt-5">+ <ShellButton+ className="w-full"+ disabled={!canFinish || isDeclining || isSubmitting}+ onClick={() => {+ setSubmitError(null);+ setIsFinishDialogOpen(true);+ }}+ >+ Finish+ </ShellButton>+ </div>+ </div>+ </section>++ <section className="editorial-panel p-5 sm:p-6">+ <div className="flex items-center justify-between gap-3">+ <p className="text-xs font-semibold uppercase tracking-[0.22em] text-(--tertiary)">+ Assigned fields+ </p>+ <span className="text-xs font-semibold uppercase tracking-[0.18em] text-(--tertiary)">+ {actionSummaryFields.length}+ </span>+ </div>+ <div className="mt-4 divide-y divide-(--border) border-y border-(--border)">+ {actionSummaryFields.map((field) => (+ <FieldStatusRow+ isComplete={isFieldComplete(field, {+ checkboxValues,+ signatureValues,+ textValues,+ })}+ key={field.id}+ label={`${getSummaryLabel(field)} · Page ${field.page}`}+ value={getCompletionValue(field, {+ checkboxValues,+ localDateLabel,+ signatureValues,+ textValues,+ })}+ />+ ))}+ </div>+ </section>++ </aside>+ </section>+ </main>++ <PublicLegalFooter />++ {signatureModal ? (+ <SignatureModal+ existingEntry={+ signatureValues[signatureModal.fieldId] ??+ reusableSignatureEntries[signatureModal.type] ??+ undefined+ }+ drawnSignatureVersion={drawnSignatureVersion}+ fieldType={signatureModal.type}+ onApply={(entry) => {+ setReusableSignatureEntries((current) => ({+ ...current,+ [signatureModal.type]: entry,+ }));+ setSignatureValues((current) => ({+ ...current,+ [signatureModal.fieldId]: entry,+ }));+ setSubmitError(null);+ setSignatureModal(null);+ }}+ onClearDrawnSignature={() =>+ setDrawnSignatureVersion((current) => current + 1)+ }+ onClose={() => setSignatureModal(null)}+ onModeChange={(mode) =>+ setSignatureModal((current) =>+ current+ ? {+ ...current,+ mode,+ }+ : null,+ )+ }+ signatureMode={signatureModal.mode}+ signerName={record.signer.name}+ />+ ) : null}++ {isFinishDialogOpen ? (+ <DialogFrame+ description={`You are signing "${record.envelopeTitle}" from ${record.senderName}.`}+ title="Finish signing?"+ onClose={() => {+ if (isSubmitting) {+ return;+ }++ setIsFinishDialogOpen(false);+ setSubmitError(null);+ }}+ >+ <p className="text-sm leading-6 text-muted-foreground">+ By clicking Finish, you confirm that your electronic signature is+ intended to be binding for this document.+ </p>+ {submitError ? (+ <div className="border border-[rgba(180,35,53,0.18)] bg-[rgba(180,35,53,0.08)] px-4 py-3 text-sm text-(--accent)">+ {submitError}+ </div>+ ) : null}+ <div className="flex flex-col-reverse gap-3 sm:flex-row sm:justify-end">+ <ShellButton+ disabled={isDeclining || isSubmitting}+ onClick={() => {+ setIsFinishDialogOpen(false);+ setSubmitError(null);+ }}+ variant="secondary"+ >+ Back+ </ShellButton>+ <ShellButton loading={isSubmitting} onClick={handleFinishSigning}>+ {isSubmitting ? "Finishing..." : "Finish signing"}+ </ShellButton>+ </div>+ </DialogFrame>+ ) : null}++ {isDeclineDialogOpen ? (+ <DialogFrame+ description={`The sender (${record.senderName}) will be notified that you declined. This cannot be undone.`}+ title="Decline to sign?"+ onClose={() => {+ if (isDeclining) {+ return;+ }++ setDeclineError(null);+ setIsDeclineDialogOpen(false);+ }}+ >+ <label className="grid gap-2 text-sm">+ <span className="font-semibold text-(--fg)">Reason (optional)</span>+ <Textarea+ autoFocus+ className="min-h-28 rounded-none border-(--border) bg-white"+ id="signing-decline-reason"+ name="signing-decline-reason"+ onChange={(event) => setDeclineReason(event.target.value)}+ placeholder="I'd like to discuss some terms first..."+ value={declineReason}+ />+ </label>+ {declineError ? (+ <div className="border border-[rgba(180,35,53,0.18)] bg-[rgba(180,35,53,0.08)] px-4 py-3 text-sm text-(--accent)">+ {declineError}+ </div>+ ) : null}+ <div className="flex flex-col-reverse gap-3 sm:flex-row sm:justify-end">+ <ShellButton+ disabled={isDeclining}+ onClick={() => {+ setDeclineError(null);+ setIsDeclineDialogOpen(false);+ }}+ variant="secondary"+ >+ Cancel+ </ShellButton>+ <ShellButton loading={isDeclining} onClick={handleDeclineSigning}>+ {isDeclining ? "Declining..." : "Decline to sign"}+ </ShellButton>+ </div>+ </DialogFrame>+ ) : null}+ </div>+ );+}++function SigningToolbarStatus({+ hasLockedFields,+ remainingFields,+}: {+ hasLockedFields: boolean;+ remainingFields: number;+}) {+ return (+ <div className="inline-flex min-h-11 items-center gap-3 border border-(--border) bg-white px-3 py-2">+ <span+ aria-hidden="true"+ className={`inline-flex size-5 items-center justify-center rounded-full ${+ remainingFields === 0+ ? "bg-[rgba(24,132,74,0.12)] text-[rgb(24,132,74)]"+ : "bg-(--signer-1-tint) text-chart-1"+ }`}+ >+ {remainingFields === 0 ? (+ <svg+ aria-hidden="true"+ className="size-3.5"+ fill="none"+ viewBox="0 0 16 16"+ >+ <path+ d="M3.5 8.5 6.5 11.5 12.5 4.5"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="2"+ />+ </svg>+ ) : (+ <span className="text-[11px] font-semibold leading-none">+ {remainingFields}+ </span>+ )}+ </span>+ <div className="min-w-0">+ <p className="text-sm font-semibold text-(--fg)">+ {remainingFields === 0+ ? "Ready to finish"+ : `${remainingFields} required remaining`}+ </p>+ <p className="text-xs text-muted-foreground">+ {hasLockedFields ? "Locked values visible" : "Current signer view"}+ </p>+ </div>+ </div>+ );+}++function CurrentSignerField({+ checkboxValue,+ field,+ localDateLabel,+ onCheckboxChange,+ onSignatureClick,+ onTextChange,+ signatureEntry,+ textValue,+}: {+ checkboxValue: boolean;+ field: SigningCurrentField;+ localDateLabel: string;+ onCheckboxChange: (checked: boolean) => void;+ onSignatureClick: () => void;+ onTextChange: (value: string) => void;+ signatureEntry?: SignatureEntry;+ textValue: string;+}) {+ const frame = getFieldFrame(field);+ const showInlineLabel = shouldShowInlineFieldLabel(field);+ const showInlineValue = shouldShowInlineFieldValue(field);++ if (field.type === "signature" || field.type === "initials") {+ return (+ <button+ aria-label={getSummaryLabel(field)}+ className={`absolute z-2 overflow-hidden border-2 text-chart-1 transition ${+ signatureEntry?.value+ ? "bg-(--signer-1-tint) text-chart-1"+ : "bg-[rgba(37,99,235,0.06)] hover:bg-[rgba(37,99,235,0.12)]"+ }`}+ data-signing-field="true"+ onClick={onSignatureClick}+ style={{+ borderColor: "var(--signer-1)",+ ...frame,+ }}+ type="button"+ >+ <span className="pointer-events-none flex h-full w-full items-center justify-center overflow-hidden px-1 text-center">+ {signatureEntry?.inputMethod === "drawn" && signatureEntry.imageDataUrl ? (+ <span className="relative block h-full w-full">+ <Image+ alt={`${field.type === "initials" ? "Initials" : "Signature"} preview`}+ className="object-contain p-1"+ fill+ src={signatureEntry.imageDataUrl}+ unoptimized+ />+ </span>+ ) : signatureEntry?.value && showInlineValue ? (+ <span+ className="block max-w-full truncate px-1 text-sm"+ style={{+ fontFamily:+ signatureEntry.inputMethod === "typed"+ ? typedSignatureFont+ : undefined,+ fontSize:+ signatureEntry.inputMethod === "typed" ? "1.05rem" : undefined,+ }}+ >+ {signatureEntry.value}+ </span>+ ) : showInlineLabel ? (+ <span className="block max-w-full truncate px-1 text-[11px] font-semibold uppercase tracking-[0.18em]">+ {getCanvasFieldLabel(field)}+ </span>+ ) : null}+ </span>+ </button>+ );+ }++ if (field.type === "date") {+ return (+ <div+ className="absolute z-2 overflow-hidden border border-[rgba(17,17,17,0.12)] bg-white/92 text-sm text-(--fg)"+ data-signing-field="true"+ style={frame}+ >+ {showInlineValue ? (+ <p className="flex h-full items-center truncate px-2 text-[12px] font-semibold">+ {localDateLabel}+ </p>+ ) : null}+ </div>+ );+ }++ if (field.type === "text") {+ return (+ <div+ className="absolute z-2 overflow-hidden border-2 border-chart-1 bg-[rgba(37,99,235,0.06)]"+ data-signing-field="true"+ style={frame}+ >+ <input+ aria-label={getFieldLabel(field)}+ className="h-full w-full border-none bg-transparent px-2 text-sm text-(--fg) outline-none placeholder:text-(--placeholder)"+ id={`signing-field-${field.id}`}+ name={`signing-field-${field.id}`}+ onChange={(event) => onTextChange(event.target.value)}+ placeholder={showInlineLabel ? getFieldLabel(field) : ""}+ value={textValue}+ />+ </div>+ );+ }++ return (+ <button+ aria-label={getFieldLabel(field)}+ aria-pressed={checkboxValue}+ className={`absolute z-2 flex items-center justify-center border-2 transition ${+ checkboxValue+ ? "bg-(--signer-1-tint) text-chart-1"+ : "bg-white text-chart-1 hover:bg-[rgba(37,99,235,0.08)]"+ }`}+ data-signing-field="true"+ onClick={() => onCheckboxChange(!checkboxValue)}+ style={frame}+ type="button"+ >+ {checkboxValue ? (+ <svg+ aria-hidden="true"+ className="h-[68%] w-[68%] max-h-4 max-w-4 text-current"+ fill="none"+ viewBox="0 0 16 16"+ >+ <path+ d="M3.5 8.5 6.5 11.5 12.5 4.5"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="2"+ />+ </svg>+ ) : null}+ </button>+ );+}++function VisibleFieldStamp({ field }: { field: SigningVisibleField }) {+ const frame = getFieldFrame(field);+ const showInlineLabel = shouldShowInlineFieldLabel(field);+ const showInlineValue = shouldShowInlineFieldValue(field);++ if (field.type === "checkbox") {+ return (+ <div+ className="pointer-events-none absolute z-1 flex items-center justify-center border border-[rgba(17,17,17,0.12)] bg-[rgba(17,17,17,0.03)]"+ data-signing-field="true"+ style={frame}+ >+ {field.checked ? (+ <svg+ aria-hidden="true"+ className="h-[68%] w-[68%] max-h-4 max-w-4 text-[rgba(17,17,17,0.76)]"+ fill="none"+ viewBox="0 0 16 16"+ >+ <path+ d="M3.5 8.5 6.5 11.5 12.5 4.5"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="2"+ />+ </svg>+ ) : null}+ </div>+ );+ }++ if (+ (field.type === "signature" || field.type === "initials") &&+ field.imageDataUrl+ ) {+ return (+ <div+ className="pointer-events-none absolute z-1 overflow-hidden border border-[rgba(17,17,17,0.12)] bg-[rgba(17,17,17,0.03)]"+ data-signing-field="true"+ style={frame}+ >+ <Image+ alt={`${field.signerName} completed ${field.type}`}+ className="object-contain"+ fill+ src={field.imageDataUrl}+ unoptimized+ />+ </div>+ );+ }++ return (+ <div+ className="pointer-events-none absolute z-1 overflow-hidden border border-[rgba(17,17,17,0.12)] bg-[rgba(17,17,17,0.03)] text-muted-foreground"+ data-signing-field="true"+ style={frame}+ >+ <div className="flex h-full w-full items-center overflow-hidden px-1">+ {showInlineValue ? (+ <p+ className={`truncate ${+ showInlineLabel ? "text-[12px]" : "w-full text-center text-[11px]"+ } font-medium`}+ style={{+ fontFamily:+ field.inputMethod === "typed" &&+ (field.type === "signature" || field.type === "initials")+ ? typedSignatureFont+ : undefined,+ fontSize:+ field.inputMethod === "typed" &&+ (field.type === "signature" || field.type === "initials")+ ? "1rem"+ : undefined,+ }}+ >+ {getVisibleFieldValue(field)}+ </p>+ ) : showInlineLabel ? (+ <p className="w-full truncate text-center text-[10px] font-semibold uppercase tracking-[0.16em] text-(--tertiary)">+ {getCanvasFieldLabel(field)}+ </p>+ ) : null}+ </div>+ </div>+ );+}++function SignatureModal({+ existingEntry,+ drawnSignatureVersion,+ fieldType,+ onApply,+ onClearDrawnSignature,+ onClose,+ onModeChange,+ signatureMode,+ signerName,+}: {+ existingEntry?: SignatureEntry;+ drawnSignatureVersion: number;+ fieldType: "initials" | "signature";+ onApply: (entry: SignatureEntry) => void;+ onClearDrawnSignature: () => void;+ onClose: () => void;+ onModeChange: (mode: "drawn" | "typed") => void;+ signatureMode: "drawn" | "typed";+ signerName: string;+}) {+ const [drawnSignatureDataUrl, setDrawnSignatureDataUrl] = useState<+ string | null+ >(+ existingEntry?.inputMethod === "drawn"+ ? (existingEntry.imageDataUrl ?? null)+ : null,+ );+ const [typedSignatureValue, setTypedSignatureValue] = useState(() => {+ if (existingEntry?.inputMethod === "typed" && existingEntry.value.trim()) {+ return existingEntry.value;+ }++ return fieldType === "initials" ? getInitials(signerName) : signerName;+ });+ const drawPreviewMessage =+ drawnSignatureVersion === 0+ ? "Draw with mouse or finger"+ : `Canvas cleared ${drawnSignatureVersion} time${drawnSignatureVersion === 1 ? "" : "s"}`;+ const typedPlaceholder =+ fieldType === "initials" ? "Type your initials" : "Type your signature";+ const normalizedTypedSignatureValue = typedSignatureValue.trim();+ const canApply =+ signatureMode === "typed"+ ? normalizedTypedSignatureValue.length > 0+ : Boolean(drawnSignatureDataUrl);++ function handleTypedSignatureValueChange(value: string) {+ if (fieldType === "initials") {+ setTypedSignatureValue(value.toUpperCase().slice(0, 4));+ return;+ }++ setTypedSignatureValue(value);+ }++ return (+ <DialogFrame+ description="By signing, you agree that this electronic signature is the legal equivalent of your manual signature."+ title={+ fieldType === "initials" ? "Add your initials" : "Add your signature"+ }+ onClose={onClose}+ >+ <Tabs+ className="gap-4"+ onValueChange={(value) => onModeChange(value as "typed" | "drawn")}+ value={signatureMode}+ >+ <TabsList className="flex w-full gap-2 rounded-none border-0 bg-transparent p-0 shadow-none">+ <TabsTrigger+ className="min-h-11 flex-1 rounded-none border border-(--border) bg-(--surface) px-4 text-sm font-semibold text-muted-foreground data-active:border-(--border) data-active:bg-white data-active:text-(--fg) after:hidden"+ value="typed"+ >+ Type+ </TabsTrigger>+ <TabsTrigger+ className="min-h-11 flex-1 rounded-none border border-(--border) bg-(--surface) px-4 text-sm font-semibold text-muted-foreground data-active:border-(--border) data-active:bg-white data-active:text-(--fg) after:hidden"+ value="drawn"+ >+ Draw+ </TabsTrigger>+ </TabsList>+ </Tabs>++ {signatureMode === "typed" ? (+ <div className="space-y-4 border border-(--border) bg-(--surface) p-5 sm:p-6">+ <label className="grid gap-2 text-sm">+ <span className="font-semibold text-(--fg)">+ {fieldType === "initials" ? "Type initials" : "Type signature"}+ </span>+ <input+ autoFocus+ className="min-h-12 w-full rounded-none border border-(--border) bg-white px-4 text-sm text-(--fg) outline-none placeholder:text-(--placeholder)"+ id={`signature-modal-${fieldType}`}+ maxLength={fieldType === "initials" ? 4 : 80}+ name={`signature-modal-${fieldType}`}+ onChange={(event) =>+ handleTypedSignatureValueChange(event.target.value)+ }+ placeholder={typedPlaceholder}+ value={typedSignatureValue}+ />+ </label>++ <div className="border border-(--border) bg-white px-6 py-7 text-center">+ <p+ className={`text-[40px] leading-none sm:text-[52px] ${+ normalizedTypedSignatureValue+ ? "text-(--fg)"+ : "text-(--placeholder)"+ }`}+ style={{ fontFamily: typedSignatureFont }}+ >+ {normalizedTypedSignatureValue || typedPlaceholder}+ </p>+ <p className="mt-4 text-xs uppercase tracking-[0.2em] text-(--tertiary)">+ Rendered in signature style+ </p>+ </div>+ </div>+ ) : (+ <div className="border border-(--border) bg-(--surface) p-4">+ <SignatureDrawCanvas+ emptyMessage={drawPreviewMessage}+ initialDataUrl={+ drawnSignatureVersion === 0 &&+ existingEntry?.inputMethod === "drawn"+ ? (existingEntry.imageDataUrl ?? null)+ : null+ }+ key={drawnSignatureVersion}+ onChange={setDrawnSignatureDataUrl}+ />+ <div className="mt-3 flex justify-end">+ <ShellButton+ onClick={() => {+ setDrawnSignatureDataUrl(null);+ onClearDrawnSignature();+ }}+ variant="ghost"+ >+ Clear+ </ShellButton>+ </div>+ </div>+ )}++ <div className="flex flex-col-reverse gap-3 sm:flex-row sm:justify-end">+ <ShellButton onClick={onClose} variant="secondary">+ Cancel+ </ShellButton>+ <ShellButton+ disabled={!canApply}+ onClick={() =>+ onApply(+ signatureMode === "drawn"+ ? {+ imageDataUrl: drawnSignatureDataUrl,+ inputMethod: "drawn",+ value:+ fieldType === "initials"+ ? "Drawn initials"+ : "Drawn signature",+ }+ : {+ imageDataUrl: null,+ inputMethod: "typed",+ value: normalizedTypedSignatureValue,+ },+ )+ }+ >+ {fieldType === "initials" ? "Apply initials" : "Apply signature"}+ </ShellButton>+ </div>+ </DialogFrame>+ );+}++function SignatureDrawCanvas({+ emptyMessage,+ initialDataUrl,+ onChange,+}: {+ emptyMessage: string;+ initialDataUrl?: string | null;+ onChange: (value: string | null) => void;+}) {+ const canvasRef = useRef<HTMLCanvasElement | null>(null);+ const isDrawingRef = useRef(false);+ const lastPointRef = useRef<{ x: number; y: number } | null>(null);+ const storedDataUrlRef = useRef<string | null>(initialDataUrl ?? null);+ const [hasSignature, setHasSignature] = useState(Boolean(initialDataUrl));++ useEffect(() => {+ const canvas = canvasRef.current;++ if (!canvas) {+ return;+ }++ const redrawStoredImage = () => {+ const context = canvas.getContext("2d");++ if (!context) {+ return;+ }++ context.clearRect(0, 0, canvas.width, canvas.height);++ if (!storedDataUrlRef.current) {+ return;+ }++ const image = new window.Image();++ image.onload = () => {+ context.drawImage(image, 0, 0, canvas.clientWidth, canvas.clientHeight);+ };+ image.src = storedDataUrlRef.current;+ };++ const resizeCanvas = () => {+ const ratio = Math.max(window.devicePixelRatio || 1, 1);+ const width = Math.max(canvas.offsetWidth, 1);+ const height = Math.max(canvas.offsetHeight, 1);++ canvas.width = Math.floor(width * ratio);+ canvas.height = Math.floor(height * ratio);+ const context = canvas.getContext("2d");++ if (!context) {+ return;+ }++ context.scale(ratio, ratio);+ context.lineCap = "round";+ context.lineJoin = "round";+ context.lineWidth = 2.2;+ context.strokeStyle = "#111111";+ redrawStoredImage();+ };++ resizeCanvas();+ setHasSignature(Boolean(storedDataUrlRef.current));+ window.addEventListener("resize", resizeCanvas);++ return () => {+ window.removeEventListener("resize", resizeCanvas);+ };+ }, [onChange]);++ function getCanvasPoint(event: ReactPointerEvent<HTMLCanvasElement>) {+ const canvas = canvasRef.current;++ if (!canvas) {+ return null;+ }++ const rect = canvas.getBoundingClientRect();++ if (rect.width === 0 || rect.height === 0) {+ return null;+ }++ const x = event.clientX - rect.left;+ const y = event.clientY - rect.top;++ return { x, y };+ }++ function commitDrawing() {+ const canvas = canvasRef.current;++ if (!canvas) {+ return;+ }++ const dataUrl = canvas.toDataURL("image/png");++ storedDataUrlRef.current = dataUrl;+ setHasSignature(true);+ onChange(dataUrl);+ }++ function handlePointerDown(event: ReactPointerEvent<HTMLCanvasElement>) {+ const canvas = canvasRef.current;+ const context = canvas?.getContext("2d");+ const point = getCanvasPoint(event);++ if (!canvas || !context || !point) {+ return;+ }++ event.preventDefault();+ canvas.setPointerCapture(event.pointerId);+ isDrawingRef.current = true;+ lastPointRef.current = point;+ context.beginPath();+ context.arc(point.x, point.y, 1.2, 0, Math.PI * 2);+ context.fillStyle = "#111111";+ context.fill();+ context.beginPath();+ context.moveTo(point.x, point.y);+ setHasSignature(true);+ }++ function handlePointerMove(event: ReactPointerEvent<HTMLCanvasElement>) {+ const canvas = canvasRef.current;+ const context = canvas?.getContext("2d");+ const point = getCanvasPoint(event);++ if (+ !isDrawingRef.current ||+ !canvas ||+ !context ||+ !point ||+ !lastPointRef.current+ ) {+ return;+ }++ event.preventDefault();+ context.beginPath();+ context.moveTo(lastPointRef.current.x, lastPointRef.current.y);+ context.lineTo(point.x, point.y);+ context.stroke();+ lastPointRef.current = point;+ setHasSignature(true);+ }++ function handlePointerEnd(event: ReactPointerEvent<HTMLCanvasElement>) {+ const canvas = canvasRef.current;++ if (!isDrawingRef.current || !canvas) {+ return;+ }++ event.preventDefault();+ isDrawingRef.current = false;+ lastPointRef.current = null;+ canvas.releasePointerCapture(event.pointerId);+ commitDrawing();+ }++ return (+ <div className="relative border border-dashed border-[rgba(17,17,17,0.16)] bg-white">+ <canvas+ aria-label="Draw signature canvas"+ className="h-[220px] w-full touch-none"+ onPointerCancel={handlePointerEnd}+ onPointerDown={handlePointerDown}+ onPointerLeave={handlePointerEnd}+ onPointerMove={handlePointerMove}+ onPointerUp={handlePointerEnd}+ ref={canvasRef}+ />+ {!hasSignature ? (+ <div className="pointer-events-none absolute inset-0 flex items-center justify-center px-6 text-center text-sm text-muted-foreground">+ {emptyMessage}+ </div>+ ) : null}+ </div>+ );+}++function DialogFrame({+ children,+ description,+ onClose,+ title,+}: {+ children: ReactNode;+ description: string;+ onClose: () => void;+ title: string;+}) {+ return (+ <Dialog open onOpenChange={(open) => !open && onClose()}>+ <DialogContent+ className="max-w-[680px] rounded-none border-(--border) bg-white p-0 shadow-[0_24px_72px_rgba(0,0,0,0.14)]"+ showCloseButton={false}+ >+ <div>+ <DialogHeader className="space-y-3 border-b border-(--border) px-6 py-5 sm:px-8 sm:py-6">+ <DialogTitle>{title}</DialogTitle>+ <DialogDescription>{description}</DialogDescription>+ </DialogHeader>+ <div className="space-y-5 px-6 py-5 sm:px-8 sm:py-6">{children}</div>+ </div>+ </DialogContent>+ </Dialog>+ );+}++function FieldStatusRow({+ isComplete,+ label,+ value,+}: {+ isComplete: boolean;+ label: string;+ value: string;+}) {+ return (+ <div className="flex items-center justify-between gap-4 px-4 py-3.5">+ <div className="min-w-0">+ <p className="text-xs font-semibold uppercase tracking-[0.18em] text-(--tertiary)">+ {label}+ </p>+ <p className="mt-1 truncate text-sm font-medium text-(--fg)">{value}</p>+ </div>+ <span+ className={`inline-flex min-h-8 shrink-0 items-center border px-3 text-[11px] font-semibold uppercase tracking-[0.18em] ${+ isComplete+ ? "border-[rgba(5,150,105,0.18)] bg-[rgba(5,150,105,0.08)] text-chart-4"+ : "border-[rgba(37,99,235,0.18)] bg-[rgba(37,99,235,0.08)] text-chart-1"+ }`}+ >+ {isComplete ? "Complete" : "Required"}+ </span>+ </div>+ );+}diff --git a/src/components/signing/signing-shell.tsx b/src/components/signing/signing-shell.tsxnew file mode 100644index 0000000..457d190--- /dev/null+++ b/src/components/signing/signing-shell.tsx@@ -0,0 +1,94 @@+"use client";++import { Brand } from "@/components/layout/brand";+import { PublicLegalFooter } from "@/components/layout/public-legal-links";+import type { SigningPayload } from "@/lib/schemas/signing";+import { SigningLiveShell } from "./signing-live-shell";++type SigningUnavailableState =+ | "already-signed"+ | "declined"+ | "error"+ | "expired"+ | "voided";++type SigningShellProps = {+ initialState?: SigningUnavailableState;+ record?: SigningPayload;+};++const tokenStateCopy: Record<+ SigningUnavailableState,+ { description: string; title: string }+> = {+ error: {+ title: "Something went wrong. Please try again.",+ description:+ "We couldn't load this document right now. Reload the page or request a fresh signing link from the sender.",+ },+ expired: {+ title: "This link has expired",+ description: "Request a new signing link from the sender.",+ },+ "already-signed": {+ title: "You've already signed",+ description: "You already completed your signature for this document.",+ },+ voided: {+ title: "This envelope has been voided",+ description:+ "The sender cancelled this document. No further action is needed.",+ },+ declined: {+ title: "This envelope has been declined",+ description:+ "A signer declined this document. No further action is needed.",+ },+};++export function SigningShell({ initialState, record }: SigningShellProps) {+ if (record) {+ return <SigningLiveShell record={record} />;+ }++ const tokenState = tokenStateCopy[initialState ?? "error"];++ return (+ <StandaloneStateScreen+ description={tokenState.description}+ title={tokenState.title}+ />+ );+}++function StandaloneStateScreen({+ description,+ title,+}: {+ description: string;+ title: string;+}) {+ return (+ <div className="flex min-h-screen flex-col bg-white">+ <header className="border-b border-(--border) bg-white">+ <div className="mx-auto flex max-w-[1360px] items-center px-4 py-5 sm:px-6 lg:px-8">+ <Brand href="/" />+ </div>+ </header>+ <main className="mx-auto flex w-full max-w-[1360px] flex-1 items-center justify-center px-4 py-12 sm:px-6 lg:px-8">+ <section className="editorial-panel w-full max-w-[760px] px-6 py-10 text-center sm:px-10 sm:py-12">+ <span className="inline-flex border border-(--accent) bg-[#fff8f8] px-4 py-2 text-[11px] font-semibold uppercase tracking-[0.24em] text-(--accent)">+ Signing state+ </span>+ <h1 className="mt-6 text-[32px] font-extrabold tracking-[-0.05em] text-(--fg) sm:text-[38px]">+ {title}+ </h1>+ <p className="mx-auto mt-4 max-w-[520px] text-base leading-7 text-muted-foreground">+ {description}+ </p>+ </section>+ </main>+ <PublicLegalFooter />+ </div>+ );+}diff --git a/src/components/ui/avatar.tsx b/src/components/ui/avatar.tsxnew file mode 100644index 0000000..523f98d--- /dev/null+++ b/src/components/ui/avatar.tsx@@ -0,0 +1,112 @@+"use client";++import * as React from "react";+import { Avatar as AvatarPrimitive } from "radix-ui";++import { cn } from "@/lib/cn";++function Avatar({+ className,+ size = "default",+ ...props+}: React.ComponentProps<typeof AvatarPrimitive.Root> & {+ size?: "default" | "sm" | "lg";+}) {+ return (+ <AvatarPrimitive.Root+ data-slot="avatar"+ data-size={size}+ className={cn(+ "group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",+ className,+ )}+ {...props}+ />+ );+}++function AvatarImage({+ className,+ ...props+}: React.ComponentProps<typeof AvatarPrimitive.Image>) {+ return (+ <AvatarPrimitive.Image+ data-slot="avatar-image"+ className={cn(+ "aspect-square size-full rounded-full object-cover",+ className,+ )}+ {...props}+ />+ );+}++function AvatarFallback({+ className,+ ...props+}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {+ return (+ <AvatarPrimitive.Fallback+ data-slot="avatar-fallback"+ className={cn(+ "flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",+ className,+ )}+ {...props}+ />+ );+}++function AvatarBadge({ className, ...props }: React.ComponentProps<"span">) {+ return (+ <span+ data-slot="avatar-badge"+ className={cn(+ "absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none",+ "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",+ "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",+ "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",+ className,+ )}+ {...props}+ />+ );+}++function AvatarGroup({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="avatar-group"+ className={cn(+ "group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",+ className,+ )}+ {...props}+ />+ );+}++function AvatarGroupCount({+ className,+ ...props+}: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="avatar-group-count"+ className={cn(+ "relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",+ className,+ )}+ {...props}+ />+ );+}++export {+ Avatar,+ AvatarImage,+ AvatarFallback,+ AvatarGroup,+ AvatarGroupCount,+ AvatarBadge,+};diff --git a/src/components/ui/badge.tsx b/src/components/ui/badge.tsxnew file mode 100644index 0000000..209f42e--- /dev/null+++ b/src/components/ui/badge.tsx@@ -0,0 +1,49 @@+import * as React from "react";+import { cva, type VariantProps } from "class-variance-authority";+import { Slot } from "radix-ui";++import { cn } from "@/lib/cn";++const badgeVariants = cva(+ "group/badge inline-flex h-6 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2.5 py-0.5 text-[11px] font-semibold tracking-[0.08em] whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",+ {+ variants: {+ variant: {+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",+ secondary:+ "bg-[rgba(239,229,217,0.86)] text-secondary-foreground [a]:hover:bg-[var(--surface-strong)]",+ destructive:+ "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",+ outline:+ "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",+ ghost:+ "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",+ link: "text-primary underline-offset-4 hover:underline",+ },+ },+ defaultVariants: {+ variant: "default",+ },+ },+);++function Badge({+ className,+ variant = "default",+ asChild = false,+ ...props+}: React.ComponentProps<"span"> &+ VariantProps<typeof badgeVariants> & { asChild?: boolean }) {+ const Comp = asChild ? Slot.Root : "span";++ return (+ <Comp+ data-slot="badge"+ data-variant={variant}+ className={cn(badgeVariants({ variant }), className)}+ {...props}+ />+ );+}++export { Badge, badgeVariants };diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsxnew file mode 100644index 0000000..d77280d--- /dev/null+++ b/src/components/ui/button.tsx@@ -0,0 +1,74 @@+import * as React from "react";+import { cva, type VariantProps } from "class-variance-authority";+import { Slot } from "radix-ui";++import { cn } from "@/lib/cn";++const buttonVariants = cva(+ "group/button inline-flex shrink-0 items-center justify-center rounded-[0.9rem] border border-transparent bg-clip-padding text-sm font-semibold whitespace-nowrap tracking-[-0.02em] transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ {+ variants: {+ variant: {+ default:+ "border-primary bg-primary text-white [color:#fff] shadow-none hover:border-[var(--accent-hover)] hover:bg-[var(--accent-hover)] hover:text-white hover:[color:#fff]",+ outline:+ "border-[var(--border)] bg-[rgba(255,255,255,0.92)] text-card-foreground shadow-none hover:border-[var(--fg)] hover:bg-[var(--paper-raised)]",+ secondary:+ "border-[var(--border)] bg-secondary text-secondary-foreground hover:bg-[var(--surface-strong)]",+ ghost:+ "bg-transparent text-[var(--secondary)] shadow-none hover:bg-[var(--hover)] hover:text-[var(--fg)]",+ destructive: "bg-destructive text-white hover:bg-destructive/90",+ link: "text-primary underline-offset-4 hover:underline",+ },+ size: {+ default:+ "min-h-11 gap-2 px-5 has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4",+ xs: "min-h-8 gap-1 rounded-full px-3 text-xs [&_svg:not([class*='size-'])]:size-3",+ sm: "min-h-10 gap-1.5 rounded-full px-4 text-sm [&_svg:not([class*='size-'])]:size-3.5",+ lg: "min-h-12 gap-2 px-6 text-base",+ icon: "size-11",+ "icon-xs": "size-8 rounded-full [&_svg:not([class*='size-'])]:size-3",+ "icon-sm": "size-10 rounded-full [&_svg:not([class*='size-'])]:size-4",+ "icon-lg": "size-12 rounded-full",+ },+ },+ defaultVariants: {+ variant: "default",+ size: "default",+ },+ },+);++function Button({+ className,+ variant = "default",+ size = "default",+ asChild = false,+ style,+ ...props+}: React.ComponentProps<"button"> &+ VariantProps<typeof buttonVariants> & {+ asChild?: boolean;+ }) {+ const Comp = asChild ? Slot.Root : "button";+ const resolvedStyle =+ variant === "default"+ ? {+ ...style,+ color: "#fff",+ }+ : style;++ return (+ <Comp+ data-slot="button"+ data-variant={variant}+ data-size={size}+ className={cn(buttonVariants({ variant, size, className }))}+ style={resolvedStyle}+ {...props}+ />+ );+}++export { Button, buttonVariants };diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsxnew file mode 100644index 0000000..1d8c7a2--- /dev/null+++ b/src/components/ui/card.tsx@@ -0,0 +1,106 @@+import * as React from "react";++import { cn } from "@/lib/cn";++function Card({+ className,+ size = "default",+ ...props+}: React.ComponentProps<"div"> & { size?: "default" | "sm" }) {+ return (+ <div+ data-slot="card"+ data-size={size}+ className={cn(+ "group/card flex flex-col gap-4 overflow-hidden rounded-[26px] border border-[var(--border)] bg-[var(--paper-raised)] py-0 text-sm text-card-foreground shadow-[var(--shadow-sm)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-[26px] *:[img:last-child]:rounded-b-[26px]",+ className,+ )}+ {...props}+ />+ );+}++function CardHeader({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="card-header"+ className={cn(+ "group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-[26px] px-6 pt-6 group-data-[size=sm]/card:px-4 group-data-[size=sm]/card:pt-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",+ className,+ )}+ {...props}+ />+ );+}++function CardTitle({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="card-title"+ className={cn(+ "text-base leading-snug font-semibold tracking-[-0.03em] group-data-[size=sm]/card:text-sm",+ className,+ )}+ {...props}+ />+ );+}++function CardDescription({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="card-description"+ className={cn("text-sm text-muted-foreground", className)}+ {...props}+ />+ );+}++function CardAction({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="card-action"+ className={cn(+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",+ className,+ )}+ {...props}+ />+ );+}++function CardContent({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="card-content"+ className={cn(+ "px-6 pb-6 group-data-[size=sm]/card:px-4 group-data-[size=sm]/card:pb-4",+ className,+ )}+ {...props}+ />+ );+}++function CardFooter({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="card-footer"+ className={cn(+ "flex items-center rounded-b-[26px] border-t bg-[rgba(239,229,217,0.42)] p-6 group-data-[size=sm]/card:p-4",+ className,+ )}+ {...props}+ />+ );+}++export {+ Card,+ CardHeader,+ CardFooter,+ CardTitle,+ CardAction,+ CardDescription,+ CardContent,+};diff --git a/src/components/ui/checkbox.tsx b/src/components/ui/checkbox.tsxnew file mode 100644index 0000000..84c2dcd--- /dev/null+++ b/src/components/ui/checkbox.tsx@@ -0,0 +1,32 @@+"use client";++import * as React from "react";+import { Checkbox as CheckboxPrimitive } from "radix-ui";++import { cn } from "@/lib/cn";+import { CheckIcon } from "lucide-react";++function Checkbox({+ className,+ ...props+}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {+ return (+ <CheckboxPrimitive.Root+ data-slot="checkbox"+ className={cn(+ "peer relative flex size-5 shrink-0 items-center justify-center rounded-md border border-input bg-card transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground",+ className,+ )}+ {...props}+ >+ <CheckboxPrimitive.Indicator+ data-slot="checkbox-indicator"+ className="grid place-content-center text-current transition-none [&>svg]:size-3.5"+ >+ <CheckIcon />+ </CheckboxPrimitive.Indicator>+ </CheckboxPrimitive.Root>+ );+}++export { Checkbox };diff --git a/src/components/ui/dialog.tsx b/src/components/ui/dialog.tsxnew file mode 100644index 0000000..cbabea9--- /dev/null+++ b/src/components/ui/dialog.tsx@@ -0,0 +1,167 @@+"use client";++import * as React from "react";+import { Dialog as DialogPrimitive } from "radix-ui";++import { cn } from "@/lib/cn";+import { Button } from "@/components/ui/button";+import { XIcon } from "lucide-react";++function Dialog({+ ...props+}: React.ComponentProps<typeof DialogPrimitive.Root>) {+ return <DialogPrimitive.Root data-slot="dialog" {...props} />;+}++function DialogTrigger({+ ...props+}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {+ return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;+}++function DialogPortal({+ ...props+}: React.ComponentProps<typeof DialogPrimitive.Portal>) {+ return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />;+}++function DialogClose({+ ...props+}: React.ComponentProps<typeof DialogPrimitive.Close>) {+ return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;+}++function DialogOverlay({+ className,+ ...props+}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {+ return (+ <DialogPrimitive.Overlay+ data-slot="dialog-overlay"+ className={cn(+ "fixed inset-0 isolate z-50 bg-[rgba(23,20,17,0.22)] duration-100 supports-backdrop-filter:backdrop-blur-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",+ className,+ )}+ {...props}+ />+ );+}++function DialogContent({+ className,+ children,+ showCloseButton = true,+ ...props+}: React.ComponentProps<typeof DialogPrimitive.Content> & {+ showCloseButton?: boolean;+}) {+ return (+ <DialogPortal>+ <DialogOverlay />+ <DialogPrimitive.Content+ data-slot="dialog-content"+ className={cn(+ "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-5 rounded-[30px] border border-[var(--border)] bg-[var(--paper-raised)] p-6 text-sm shadow-[0_32px_80px_rgba(18,16,12,0.18)] duration-100 outline-none sm:max-w-md sm:p-8 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",+ className,+ )}+ {...props}+ >+ {children}+ {showCloseButton && (+ <DialogPrimitive.Close data-slot="dialog-close" asChild>+ <Button+ variant="ghost"+ className="absolute right-4 top-4"+ size="icon-sm"+ >+ <XIcon />+ <span className="sr-only">Close</span>+ </Button>+ </DialogPrimitive.Close>+ )}+ </DialogPrimitive.Content>+ </DialogPortal>+ );+}++function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="dialog-header"+ className={cn("flex flex-col gap-2", className)}+ {...props}+ />+ );+}++function DialogFooter({+ className,+ showCloseButton = false,+ children,+ ...props+}: React.ComponentProps<"div"> & {+ showCloseButton?: boolean;+}) {+ return (+ <div+ data-slot="dialog-footer"+ className={cn(+ "-mx-6 -mb-6 flex flex-col-reverse gap-3 rounded-b-[30px] border-t bg-[rgba(239,229,217,0.4)] px-6 py-5 sm:mx-[-2rem] sm:mb-[-2rem] sm:px-8 sm:py-6 sm:flex-row sm:justify-end",+ className,+ )}+ {...props}+ >+ {children}+ {showCloseButton && (+ <DialogPrimitive.Close asChild>+ <Button variant="outline">Close</Button>+ </DialogPrimitive.Close>+ )}+ </div>+ );+}++function DialogTitle({+ className,+ ...props+}: React.ComponentProps<typeof DialogPrimitive.Title>) {+ return (+ <DialogPrimitive.Title+ data-slot="dialog-title"+ className={cn(+ "text-[28px] leading-none font-semibold tracking-[-0.04em] text-[var(--fg)]",+ className,+ )}+ {...props}+ />+ );+}++function DialogDescription({+ className,+ ...props+}: React.ComponentProps<typeof DialogPrimitive.Description>) {+ return (+ <DialogPrimitive.Description+ data-slot="dialog-description"+ className={cn(+ "text-sm leading-6 text-[var(--secondary)] *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",+ className,+ )}+ {...props}+ />+ );+}++export {+ Dialog,+ DialogClose,+ DialogContent,+ DialogDescription,+ DialogFooter,+ DialogHeader,+ DialogOverlay,+ DialogPortal,+ DialogTitle,+ DialogTrigger,+};diff --git a/src/components/ui/dropdown-menu.tsx b/src/components/ui/dropdown-menu.tsxnew file mode 100644index 0000000..7c4bbb4--- /dev/null+++ b/src/components/ui/dropdown-menu.tsx@@ -0,0 +1,273 @@+"use client";++import * as React from "react";+import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";++import { cn } from "@/lib/cn";+import { CheckIcon, ChevronRightIcon } from "lucide-react";++function DropdownMenu({+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {+ return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />;+}++function DropdownMenuPortal({+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {+ return (+ <DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />+ );+}++function DropdownMenuTrigger({+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {+ return (+ <DropdownMenuPrimitive.Trigger+ data-slot="dropdown-menu-trigger"+ {...props}+ />+ );+}++function DropdownMenuContent({+ className,+ align = "start",+ sideOffset = 4,+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {+ return (+ <DropdownMenuPrimitive.Portal>+ <DropdownMenuPrimitive.Content+ data-slot="dropdown-menu-content"+ sideOffset={sideOffset}+ align={align}+ className={cn(+ "z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",+ className,+ )}+ {...props}+ />+ </DropdownMenuPrimitive.Portal>+ );+}++function DropdownMenuGroup({+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {+ return (+ <DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />+ );+}++function DropdownMenuItem({+ className,+ inset,+ variant = "default",+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {+ inset?: boolean;+ variant?: "default" | "destructive";+}) {+ return (+ <DropdownMenuPrimitive.Item+ data-slot="dropdown-menu-item"+ data-inset={inset}+ data-variant={variant}+ className={cn(+ "group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",+ className,+ )}+ {...props}+ />+ );+}++function DropdownMenuCheckboxItem({+ className,+ children,+ checked,+ inset,+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem> & {+ inset?: boolean;+}) {+ return (+ <DropdownMenuPrimitive.CheckboxItem+ data-slot="dropdown-menu-checkbox-item"+ data-inset={inset}+ className={cn(+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ className,+ )}+ checked={checked}+ {...props}+ >+ <span+ className="pointer-events-none absolute right-2 flex items-center justify-center"+ data-slot="dropdown-menu-checkbox-item-indicator"+ >+ <DropdownMenuPrimitive.ItemIndicator>+ <CheckIcon />+ </DropdownMenuPrimitive.ItemIndicator>+ </span>+ {children}+ </DropdownMenuPrimitive.CheckboxItem>+ );+}++function DropdownMenuRadioGroup({+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {+ return (+ <DropdownMenuPrimitive.RadioGroup+ data-slot="dropdown-menu-radio-group"+ {...props}+ />+ );+}++function DropdownMenuRadioItem({+ className,+ children,+ inset,+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & {+ inset?: boolean;+}) {+ return (+ <DropdownMenuPrimitive.RadioItem+ data-slot="dropdown-menu-radio-item"+ data-inset={inset}+ className={cn(+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ className,+ )}+ {...props}+ >+ <span+ className="pointer-events-none absolute right-2 flex items-center justify-center"+ data-slot="dropdown-menu-radio-item-indicator"+ >+ <DropdownMenuPrimitive.ItemIndicator>+ <CheckIcon />+ </DropdownMenuPrimitive.ItemIndicator>+ </span>+ {children}+ </DropdownMenuPrimitive.RadioItem>+ );+}++function DropdownMenuLabel({+ className,+ inset,+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {+ inset?: boolean;+}) {+ return (+ <DropdownMenuPrimitive.Label+ data-slot="dropdown-menu-label"+ data-inset={inset}+ className={cn(+ "px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",+ className,+ )}+ {...props}+ />+ );+}++function DropdownMenuSeparator({+ className,+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {+ return (+ <DropdownMenuPrimitive.Separator+ data-slot="dropdown-menu-separator"+ className={cn("-mx-1 my-1 h-px bg-border", className)}+ {...props}+ />+ );+}++function DropdownMenuShortcut({+ className,+ ...props+}: React.ComponentProps<"span">) {+ return (+ <span+ data-slot="dropdown-menu-shortcut"+ className={cn(+ "ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",+ className,+ )}+ {...props}+ />+ );+}++function DropdownMenuSub({+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {+ return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />;+}++function DropdownMenuSubTrigger({+ className,+ inset,+ children,+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {+ inset?: boolean;+}) {+ return (+ <DropdownMenuPrimitive.SubTrigger+ data-slot="dropdown-menu-sub-trigger"+ data-inset={inset}+ className={cn(+ "flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ className,+ )}+ {...props}+ >+ {children}+ <ChevronRightIcon className="ml-auto" />+ </DropdownMenuPrimitive.SubTrigger>+ );+}++function DropdownMenuSubContent({+ className,+ ...props+}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {+ return (+ <DropdownMenuPrimitive.SubContent+ data-slot="dropdown-menu-sub-content"+ className={cn(+ "z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",+ className,+ )}+ {...props}+ />+ );+}++export {+ DropdownMenu,+ DropdownMenuPortal,+ DropdownMenuTrigger,+ DropdownMenuContent,+ DropdownMenuGroup,+ DropdownMenuLabel,+ DropdownMenuItem,+ DropdownMenuCheckboxItem,+ DropdownMenuRadioGroup,+ DropdownMenuRadioItem,+ DropdownMenuSeparator,+ DropdownMenuShortcut,+ DropdownMenuSub,+ DropdownMenuSubTrigger,+ DropdownMenuSubContent,+};diff --git a/src/components/ui/field.tsx b/src/components/ui/field.tsxnew file mode 100644index 0000000..053b298--- /dev/null+++ b/src/components/ui/field.tsx@@ -0,0 +1,238 @@+"use client";++import { useMemo } from "react";+import { cva, type VariantProps } from "class-variance-authority";++import { cn } from "@/lib/cn";+import { Label } from "@/components/ui/label";+import { Separator } from "@/components/ui/separator";++function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) {+ return (+ <fieldset+ data-slot="field-set"+ className={cn(+ "flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",+ className,+ )}+ {...props}+ />+ );+}++function FieldLegend({+ className,+ variant = "legend",+ ...props+}: React.ComponentProps<"legend"> & { variant?: "legend" | "label" }) {+ return (+ <legend+ data-slot="field-legend"+ data-variant={variant}+ className={cn(+ "mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",+ className,+ )}+ {...props}+ />+ );+}++function FieldGroup({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="field-group"+ className={cn(+ "group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",+ className,+ )}+ {...props}+ />+ );+}++const fieldVariants = cva(+ "group/field flex w-full gap-2 data-[invalid=true]:text-destructive",+ {+ variants: {+ orientation: {+ vertical: "flex-col *:w-full [&>.sr-only]:w-auto",+ horizontal:+ "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",+ responsive:+ "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",+ },+ },+ defaultVariants: {+ orientation: "vertical",+ },+ },+);++function Field({+ className,+ orientation = "vertical",+ ...props+}: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>) {+ return (+ <div+ role="group"+ data-slot="field"+ data-orientation={orientation}+ className={cn(fieldVariants({ orientation }), className)}+ {...props}+ />+ );+}++function FieldContent({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="field-content"+ className={cn(+ "group/field-content flex flex-1 flex-col gap-0.5 leading-snug",+ className,+ )}+ {...props}+ />+ );+}++function FieldLabel({+ className,+ ...props+}: React.ComponentProps<typeof Label>) {+ return (+ <Label+ data-slot="field-label"+ className={cn(+ "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10",+ "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",+ className,+ )}+ {...props}+ />+ );+}++function FieldTitle({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="field-label"+ className={cn(+ "flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",+ className,+ )}+ {...props}+ />+ );+}++function FieldDescription({ className, ...props }: React.ComponentProps<"p">) {+ return (+ <p+ data-slot="field-description"+ className={cn(+ "text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",+ "last:mt-0 nth-last-2:-mt-1",+ "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",+ className,+ )}+ {...props}+ />+ );+}++function FieldSeparator({+ children,+ className,+ ...props+}: React.ComponentProps<"div"> & {+ children?: React.ReactNode;+}) {+ return (+ <div+ data-slot="field-separator"+ data-content={!!children}+ className={cn(+ "relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",+ className,+ )}+ {...props}+ >+ <Separator className="absolute inset-0 top-1/2" />+ {children && (+ <span+ className="relative mx-auto block w-fit bg-background px-2 text-muted-foreground"+ data-slot="field-separator-content"+ >+ {children}+ </span>+ )}+ </div>+ );+}++function FieldError({+ className,+ children,+ errors,+ ...props+}: React.ComponentProps<"div"> & {+ errors?: Array<{ message?: string } | undefined>;+}) {+ const content = useMemo(() => {+ if (children) {+ return children;+ }++ if (!errors?.length) {+ return null;+ }++ const uniqueErrors = [+ ...new Map(errors.map((error) => [error?.message, error])).values(),+ ];++ if (uniqueErrors?.length == 1) {+ return uniqueErrors[0]?.message;+ }++ return (+ <ul className="ml-4 flex list-disc flex-col gap-1">+ {uniqueErrors.map(+ (error, index) =>+ error?.message && <li key={index}>{error.message}</li>,+ )}+ </ul>+ );+ }, [children, errors]);++ if (!content) {+ return null;+ }++ return (+ <div+ role="alert"+ data-slot="field-error"+ className={cn("text-sm font-normal text-destructive", className)}+ {...props}+ >+ {content}+ </div>+ );+}++export {+ Field,+ FieldLabel,+ FieldDescription,+ FieldError,+ FieldGroup,+ FieldLegend,+ FieldSeparator,+ FieldSet,+ FieldContent,+ FieldTitle,+};diff --git a/src/components/ui/input.tsx b/src/components/ui/input.tsxnew file mode 100644index 0000000..7ab9f69--- /dev/null+++ b/src/components/ui/input.tsx@@ -0,0 +1,19 @@+import * as React from "react";++import { cn } from "@/lib/cn";++function Input({ className, type, ...props }: React.ComponentProps<"input">) {+ return (+ <input+ type={type}+ data-slot="input"+ className={cn(+ "min-h-12 w-full min-w-0 rounded-none border border-input bg-[var(--paper-raised)] px-4 py-3 text-sm text-[var(--fg)] transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-[var(--placeholder)] focus-visible:border-[var(--fg)] focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-[rgba(247,247,248,0.92)] disabled:text-[var(--secondary)] aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20",+ className,+ )}+ {...props}+ />+ );+}++export { Input };diff --git a/src/components/ui/label.tsx b/src/components/ui/label.tsxnew file mode 100644index 0000000..4fb4b99--- /dev/null+++ b/src/components/ui/label.tsx@@ -0,0 +1,24 @@+"use client";++import * as React from "react";+import { Label as LabelPrimitive } from "radix-ui";++import { cn } from "@/lib/cn";++function Label({+ className,+ ...props+}: React.ComponentProps<typeof LabelPrimitive.Root>) {+ return (+ <LabelPrimitive.Root+ data-slot="label"+ className={cn(+ "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",+ className,+ )}+ {...props}+ />+ );+}++export { Label };diff --git a/src/components/ui/separator.tsx b/src/components/ui/separator.tsxnew file mode 100644index 0000000..8ccaea5--- /dev/null+++ b/src/components/ui/separator.tsx@@ -0,0 +1,28 @@+"use client";++import * as React from "react";+import { Separator as SeparatorPrimitive } from "radix-ui";++import { cn } from "@/lib/cn";++function Separator({+ className,+ orientation = "horizontal",+ decorative = true,+ ...props+}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {+ return (+ <SeparatorPrimitive.Root+ data-slot="separator"+ decorative={decorative}+ orientation={orientation}+ className={cn(+ "shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",+ className,+ )}+ {...props}+ />+ );+}++export { Separator };diff --git a/src/components/ui/sheet.tsx b/src/components/ui/sheet.tsxnew file mode 100644index 0000000..91a726a--- /dev/null+++ b/src/components/ui/sheet.tsx@@ -0,0 +1,143 @@+"use client";++import * as React from "react";+import { Dialog as SheetPrimitive } from "radix-ui";++import { cn } from "@/lib/cn";+import { Button } from "@/components/ui/button";+import { XIcon } from "lucide-react";++function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {+ return <SheetPrimitive.Root data-slot="sheet" {...props} />;+}++function SheetTrigger({+ ...props+}: React.ComponentProps<typeof SheetPrimitive.Trigger>) {+ return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />;+}++function SheetClose({+ ...props+}: React.ComponentProps<typeof SheetPrimitive.Close>) {+ return <SheetPrimitive.Close data-slot="sheet-close" {...props} />;+}++function SheetPortal({+ ...props+}: React.ComponentProps<typeof SheetPrimitive.Portal>) {+ return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />;+}++function SheetOverlay({+ className,+ ...props+}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {+ return (+ <SheetPrimitive.Overlay+ data-slot="sheet-overlay"+ className={cn(+ "fixed inset-0 z-50 bg-[rgba(23,20,17,0.18)] duration-100 supports-backdrop-filter:backdrop-blur-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",+ className,+ )}+ {...props}+ />+ );+}++function SheetContent({+ className,+ children,+ side = "right",+ showCloseButton = true,+ ...props+}: React.ComponentProps<typeof SheetPrimitive.Content> & {+ side?: "top" | "right" | "bottom" | "left";+ showCloseButton?: boolean;+}) {+ return (+ <SheetPortal>+ <SheetOverlay />+ <SheetPrimitive.Content+ data-slot="sheet-content"+ data-side={side}+ className={cn(+ "fixed z-50 flex flex-col gap-4 bg-[var(--paper-raised)] bg-clip-padding text-sm shadow-[0_32px_70px_rgba(18,16,12,0.18)] transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",+ className,+ )}+ {...props}+ >+ {children}+ {showCloseButton && (+ <SheetPrimitive.Close data-slot="sheet-close" asChild>+ <Button+ variant="ghost"+ className="absolute top-3 right-3"+ size="icon-sm"+ >+ <XIcon />+ <span className="sr-only">Close</span>+ </Button>+ </SheetPrimitive.Close>+ )}+ </SheetPrimitive.Content>+ </SheetPortal>+ );+}++function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="sheet-header"+ className={cn("flex flex-col gap-0.5 p-4", className)}+ {...props}+ />+ );+}++function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="sheet-footer"+ className={cn("mt-auto flex flex-col gap-2 p-4", className)}+ {...props}+ />+ );+}++function SheetTitle({+ className,+ ...props+}: React.ComponentProps<typeof SheetPrimitive.Title>) {+ return (+ <SheetPrimitive.Title+ data-slot="sheet-title"+ className={cn("text-base font-medium text-foreground", className)}+ {...props}+ />+ );+}++function SheetDescription({+ className,+ ...props+}: React.ComponentProps<typeof SheetPrimitive.Description>) {+ return (+ <SheetPrimitive.Description+ data-slot="sheet-description"+ className={cn("text-sm text-muted-foreground", className)}+ {...props}+ />+ );+}++export {+ Sheet,+ SheetTrigger,+ SheetClose,+ SheetContent,+ SheetHeader,+ SheetFooter,+ SheetTitle,+ SheetDescription,+};diff --git a/src/components/ui/sidebar.tsx b/src/components/ui/sidebar.tsxnew file mode 100644index 0000000..06d294e--- /dev/null+++ b/src/components/ui/sidebar.tsx@@ -0,0 +1,702 @@+"use client";++import * as React from "react";+import { cva, type VariantProps } from "class-variance-authority";+import { Slot } from "radix-ui";++import { useIsMobile } from "@/lib/hooks/use-mobile";+import { cn } from "@/lib/cn";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { Separator } from "@/components/ui/separator";+import {+ Sheet,+ SheetContent,+ SheetDescription,+ SheetHeader,+ SheetTitle,+} from "@/components/ui/sheet";+import { Skeleton } from "@/components/ui/skeleton";+import {+ Tooltip,+ TooltipContent,+ TooltipTrigger,+} from "@/components/ui/tooltip";+import { PanelLeftIcon } from "lucide-react";++const SIDEBAR_COOKIE_NAME = "sidebar_state";+const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;+const SIDEBAR_WIDTH = "16rem";+const SIDEBAR_WIDTH_MOBILE = "18rem";+const SIDEBAR_WIDTH_ICON = "3rem";+const SIDEBAR_KEYBOARD_SHORTCUT = "b";++type SidebarContextProps = {+ state: "expanded" | "collapsed";+ open: boolean;+ setOpen: (open: boolean) => void;+ openMobile: boolean;+ setOpenMobile: (open: boolean) => void;+ isMobile: boolean;+ toggleSidebar: () => void;+};++const SidebarContext = React.createContext<SidebarContextProps | null>(null);++function useSidebar() {+ const context = React.useContext(SidebarContext);+ if (!context) {+ throw new Error("useSidebar must be used within a SidebarProvider.");+ }++ return context;+}++function SidebarProvider({+ defaultOpen = true,+ open: openProp,+ onOpenChange: setOpenProp,+ className,+ style,+ children,+ ...props+}: React.ComponentProps<"div"> & {+ defaultOpen?: boolean;+ open?: boolean;+ onOpenChange?: (open: boolean) => void;+}) {+ const isMobile = useIsMobile();+ const [openMobile, setOpenMobile] = React.useState(false);++ // This is the internal state of the sidebar.+ // We use openProp and setOpenProp for control from outside the component.+ const [_open, _setOpen] = React.useState(defaultOpen);+ const open = openProp ?? _open;+ const setOpen = React.useCallback(+ (value: boolean | ((value: boolean) => boolean)) => {+ const openState = typeof value === "function" ? value(open) : value;+ if (setOpenProp) {+ setOpenProp(openState);+ } else {+ _setOpen(openState);+ }++ // This sets the cookie to keep the sidebar state.+ document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;+ },+ [setOpenProp, open],+ );++ // Helper to toggle the sidebar.+ const toggleSidebar = React.useCallback(() => {+ return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);+ }, [isMobile, setOpen, setOpenMobile]);++ // Adds a keyboard shortcut to toggle the sidebar.+ React.useEffect(() => {+ const handleKeyDown = (event: KeyboardEvent) => {+ if (+ event.key === SIDEBAR_KEYBOARD_SHORTCUT &&+ (event.metaKey || event.ctrlKey)+ ) {+ event.preventDefault();+ toggleSidebar();+ }+ };++ window.addEventListener("keydown", handleKeyDown);+ return () => window.removeEventListener("keydown", handleKeyDown);+ }, [toggleSidebar]);++ // We add a state so that we can do data-state="expanded" or "collapsed".+ // This makes it easier to style the sidebar with Tailwind classes.+ const state = open ? "expanded" : "collapsed";++ const contextValue = React.useMemo<SidebarContextProps>(+ () => ({+ state,+ open,+ setOpen,+ isMobile,+ openMobile,+ setOpenMobile,+ toggleSidebar,+ }),+ [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar],+ );++ return (+ <SidebarContext.Provider value={contextValue}>+ <div+ data-slot="sidebar-wrapper"+ style={+ {+ "--sidebar-width": SIDEBAR_WIDTH,+ "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,+ ...style,+ } as React.CSSProperties+ }+ className={cn(+ "group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",+ className,+ )}+ {...props}+ >+ {children}+ </div>+ </SidebarContext.Provider>+ );+}++function Sidebar({+ side = "left",+ variant = "sidebar",+ collapsible = "offcanvas",+ className,+ children,+ dir,+ ...props+}: React.ComponentProps<"div"> & {+ side?: "left" | "right";+ variant?: "sidebar" | "floating" | "inset";+ collapsible?: "offcanvas" | "icon" | "none";+}) {+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();++ if (collapsible === "none") {+ return (+ <div+ data-slot="sidebar"+ className={cn(+ "flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",+ className,+ )}+ {...props}+ >+ {children}+ </div>+ );+ }++ if (isMobile) {+ return (+ <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>+ <SheetContent+ dir={dir}+ data-sidebar="sidebar"+ data-slot="sidebar"+ data-mobile="true"+ className="w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden"+ style={+ {+ "--sidebar-width": SIDEBAR_WIDTH_MOBILE,+ } as React.CSSProperties+ }+ side={side}+ >+ <SheetHeader className="sr-only">+ <SheetTitle>Sidebar</SheetTitle>+ <SheetDescription>Displays the mobile sidebar.</SheetDescription>+ </SheetHeader>+ <div className="flex h-full w-full flex-col">{children}</div>+ </SheetContent>+ </Sheet>+ );+ }++ return (+ <div+ className="group peer hidden text-sidebar-foreground md:block"+ data-state={state}+ data-collapsible={state === "collapsed" ? collapsible : ""}+ data-variant={variant}+ data-side={side}+ data-slot="sidebar"+ >+ {/* This is what handles the sidebar gap on desktop */}+ <div+ data-slot="sidebar-gap"+ className={cn(+ "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",+ "group-data-[collapsible=offcanvas]:w-0",+ "group-data-[side=right]:rotate-180",+ variant === "floating" || variant === "inset"+ ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]"+ : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)",+ )}+ />+ <div+ data-slot="sidebar-container"+ data-side={side}+ className={cn(+ "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",+ // Adjust the padding for floating and inset variants.+ variant === "floating" || variant === "inset"+ ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]"+ : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",+ className,+ )}+ {...props}+ >+ <div+ data-sidebar="sidebar"+ data-slot="sidebar-inner"+ className="flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border"+ >+ {children}+ </div>+ </div>+ </div>+ );+}++function SidebarTrigger({+ className,+ onClick,+ ...props+}: React.ComponentProps<typeof Button>) {+ const { toggleSidebar } = useSidebar();++ return (+ <Button+ data-sidebar="trigger"+ data-slot="sidebar-trigger"+ variant="ghost"+ size="icon-sm"+ className={cn(className)}+ onClick={(event) => {+ onClick?.(event);+ toggleSidebar();+ }}+ {...props}+ >+ <PanelLeftIcon />+ <span className="sr-only">Toggle Sidebar</span>+ </Button>+ );+}++function SidebarRail({ className, ...props }: React.ComponentProps<"button">) {+ const { toggleSidebar } = useSidebar();++ return (+ <button+ data-sidebar="rail"+ data-slot="sidebar-rail"+ aria-label="Toggle Sidebar"+ tabIndex={-1}+ onClick={toggleSidebar}+ title="Toggle Sidebar"+ className={cn(+ "absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2",+ "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",+ "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",+ "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar",+ "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",+ "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",+ className,+ )}+ {...props}+ />+ );+}++function SidebarInset({ className, ...props }: React.ComponentProps<"main">) {+ return (+ <main+ data-slot="sidebar-inset"+ className={cn(+ "relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",+ className,+ )}+ {...props}+ />+ );+}++function SidebarInput({+ className,+ ...props+}: React.ComponentProps<typeof Input>) {+ return (+ <Input+ data-slot="sidebar-input"+ data-sidebar="input"+ className={cn("h-8 w-full bg-background shadow-none", className)}+ {...props}+ />+ );+}++function SidebarHeader({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="sidebar-header"+ data-sidebar="header"+ className={cn("flex flex-col gap-2 p-2", className)}+ {...props}+ />+ );+}++function SidebarFooter({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="sidebar-footer"+ data-sidebar="footer"+ className={cn("flex flex-col gap-2 p-2", className)}+ {...props}+ />+ );+}++function SidebarSeparator({+ className,+ ...props+}: React.ComponentProps<typeof Separator>) {+ return (+ <Separator+ data-slot="sidebar-separator"+ data-sidebar="separator"+ className={cn("mx-2 w-auto bg-sidebar-border", className)}+ {...props}+ />+ );+}++function SidebarContent({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="sidebar-content"+ data-sidebar="content"+ className={cn(+ "no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",+ className,+ )}+ {...props}+ />+ );+}++function SidebarGroup({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="sidebar-group"+ data-sidebar="group"+ className={cn("relative flex w-full min-w-0 flex-col p-2", className)}+ {...props}+ />+ );+}++function SidebarGroupLabel({+ className,+ asChild = false,+ ...props+}: React.ComponentProps<"div"> & { asChild?: boolean }) {+ const Comp = asChild ? Slot.Root : "div";++ return (+ <Comp+ data-slot="sidebar-group-label"+ data-sidebar="group-label"+ className={cn(+ "flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",+ className,+ )}+ {...props}+ />+ );+}++function SidebarGroupAction({+ className,+ asChild = false,+ ...props+}: React.ComponentProps<"button"> & { asChild?: boolean }) {+ const Comp = asChild ? Slot.Root : "button";++ return (+ <Comp+ data-slot="sidebar-group-action"+ data-sidebar="group-action"+ className={cn(+ "absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",+ className,+ )}+ {...props}+ />+ );+}++function SidebarGroupContent({+ className,+ ...props+}: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="sidebar-group-content"+ data-sidebar="group-content"+ className={cn("w-full text-sm", className)}+ {...props}+ />+ );+}++function SidebarMenu({ className, ...props }: React.ComponentProps<"ul">) {+ return (+ <ul+ data-slot="sidebar-menu"+ data-sidebar="menu"+ className={cn("flex w-full min-w-0 flex-col gap-0", className)}+ {...props}+ />+ );+}++function SidebarMenuItem({ className, ...props }: React.ComponentProps<"li">) {+ return (+ <li+ data-slot="sidebar-menu-item"+ data-sidebar="menu-item"+ className={cn("group/menu-item relative", className)}+ {...props}+ />+ );+}++const sidebarMenuButtonVariants = cva(+ "peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",+ {+ variants: {+ variant: {+ default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",+ outline:+ "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]",+ },+ size: {+ default: "h-8 text-sm",+ sm: "h-7 text-xs",+ lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!",+ },+ },+ defaultVariants: {+ variant: "default",+ size: "default",+ },+ },+);++function SidebarMenuButton({+ asChild = false,+ isActive = false,+ variant = "default",+ size = "default",+ tooltip,+ className,+ ...props+}: React.ComponentProps<"button"> & {+ asChild?: boolean;+ isActive?: boolean;+ tooltip?: string | React.ComponentProps<typeof TooltipContent>;+} & VariantProps<typeof sidebarMenuButtonVariants>) {+ const Comp = asChild ? Slot.Root : "button";+ const { isMobile, state } = useSidebar();++ const button = (+ <Comp+ data-slot="sidebar-menu-button"+ data-sidebar="menu-button"+ data-size={size}+ data-active={isActive}+ className={cn(sidebarMenuButtonVariants({ variant, size }), className)}+ {...props}+ />+ );++ if (!tooltip) {+ return button;+ }++ if (typeof tooltip === "string") {+ tooltip = {+ children: tooltip,+ };+ }++ return (+ <Tooltip>+ <TooltipTrigger asChild>{button}</TooltipTrigger>+ <TooltipContent+ side="right"+ align="center"+ hidden={state !== "collapsed" || isMobile}+ {...tooltip}+ />+ </Tooltip>+ );+}++function SidebarMenuAction({+ className,+ asChild = false,+ showOnHover = false,+ ...props+}: React.ComponentProps<"button"> & {+ asChild?: boolean;+ showOnHover?: boolean;+}) {+ const Comp = asChild ? Slot.Root : "button";++ return (+ <Comp+ data-slot="sidebar-menu-action"+ data-sidebar="menu-action"+ className={cn(+ "absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",+ showOnHover &&+ "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0",+ className,+ )}+ {...props}+ />+ );+}++function SidebarMenuBadge({+ className,+ ...props+}: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="sidebar-menu-badge"+ data-sidebar="menu-badge"+ className={cn(+ "pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground",+ className,+ )}+ {...props}+ />+ );+}++function SidebarMenuSkeleton({+ className,+ showIcon = false,+ ...props+}: React.ComponentProps<"div"> & {+ showIcon?: boolean;+}) {+ // Random width between 50 to 90%.+ const [width] = React.useState(() => {+ return `${Math.floor(Math.random() * 40) + 50}%`;+ });++ return (+ <div+ data-slot="sidebar-menu-skeleton"+ data-sidebar="menu-skeleton"+ className={cn("flex h-8 items-center gap-2 rounded-md px-2", className)}+ {...props}+ >+ {showIcon && (+ <Skeleton+ className="size-4 rounded-md"+ data-sidebar="menu-skeleton-icon"+ />+ )}+ <Skeleton+ className="h-4 max-w-(--skeleton-width) flex-1"+ data-sidebar="menu-skeleton-text"+ style={+ {+ "--skeleton-width": width,+ } as React.CSSProperties+ }+ />+ </div>+ );+}++function SidebarMenuSub({ className, ...props }: React.ComponentProps<"ul">) {+ return (+ <ul+ data-slot="sidebar-menu-sub"+ data-sidebar="menu-sub"+ className={cn(+ "mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",+ className,+ )}+ {...props}+ />+ );+}++function SidebarMenuSubItem({+ className,+ ...props+}: React.ComponentProps<"li">) {+ return (+ <li+ data-slot="sidebar-menu-sub-item"+ data-sidebar="menu-sub-item"+ className={cn("group/menu-sub-item relative", className)}+ {...props}+ />+ );+}++function SidebarMenuSubButton({+ asChild = false,+ size = "md",+ isActive = false,+ className,+ ...props+}: React.ComponentProps<"a"> & {+ asChild?: boolean;+ size?: "sm" | "md";+ isActive?: boolean;+}) {+ const Comp = asChild ? Slot.Root : "a";++ return (+ <Comp+ data-slot="sidebar-menu-sub-button"+ data-sidebar="menu-sub-button"+ data-size={size}+ data-active={isActive}+ className={cn(+ "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",+ className,+ )}+ {...props}+ />+ );+}++export {+ Sidebar,+ SidebarContent,+ SidebarFooter,+ SidebarGroup,+ SidebarGroupAction,+ SidebarGroupContent,+ SidebarGroupLabel,+ SidebarHeader,+ SidebarInput,+ SidebarInset,+ SidebarMenu,+ SidebarMenuAction,+ SidebarMenuBadge,+ SidebarMenuButton,+ SidebarMenuItem,+ SidebarMenuSkeleton,+ SidebarMenuSub,+ SidebarMenuSubButton,+ SidebarMenuSubItem,+ SidebarProvider,+ SidebarRail,+ SidebarSeparator,+ SidebarTrigger,+ useSidebar,+};diff --git a/src/components/ui/skeleton.tsx b/src/components/ui/skeleton.tsxnew file mode 100644index 0000000..d877a5a--- /dev/null+++ b/src/components/ui/skeleton.tsx@@ -0,0 +1,13 @@+import { cn } from "@/lib/cn";++function Skeleton({ className, ...props }: React.ComponentProps<"div">) {+ return (+ <div+ data-slot="skeleton"+ className={cn("animate-pulse rounded-md bg-muted", className)}+ {...props}+ />+ );+}++export { Skeleton };diff --git a/src/components/ui/tabs.tsx b/src/components/ui/tabs.tsxnew file mode 100644index 0000000..f1305b8--- /dev/null+++ b/src/components/ui/tabs.tsx@@ -0,0 +1,90 @@+"use client";++import * as React from "react";+import { cva, type VariantProps } from "class-variance-authority";+import { Tabs as TabsPrimitive } from "radix-ui";++import { cn } from "@/lib/cn";++function Tabs({+ className,+ orientation = "horizontal",+ ...props+}: React.ComponentProps<typeof TabsPrimitive.Root>) {+ return (+ <TabsPrimitive.Root+ data-slot="tabs"+ data-orientation={orientation}+ className={cn(+ "group/tabs flex gap-2 data-horizontal:flex-col",+ className,+ )}+ {...props}+ />+ );+}++const tabsListVariants = cva(+ "group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",+ {+ variants: {+ variant: {+ default: "bg-muted",+ line: "gap-1 bg-transparent",+ },+ },+ defaultVariants: {+ variant: "default",+ },+ },+);++function TabsList({+ className,+ variant = "default",+ ...props+}: React.ComponentProps<typeof TabsPrimitive.List> &+ VariantProps<typeof tabsListVariants>) {+ return (+ <TabsPrimitive.List+ data-slot="tabs-list"+ data-variant={variant}+ className={cn(tabsListVariants({ variant }), className)}+ {...props}+ />+ );+}++function TabsTrigger({+ className,+ ...props+}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {+ return (+ <TabsPrimitive.Trigger+ data-slot="tabs-trigger"+ className={cn(+ "relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",+ "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground",+ "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",+ className,+ )}+ {...props}+ />+ );+}++function TabsContent({+ className,+ ...props+}: React.ComponentProps<typeof TabsPrimitive.Content>) {+ return (+ <TabsPrimitive.Content+ data-slot="tabs-content"+ className={cn("flex-1 text-sm outline-none", className)}+ {...props}+ />+ );+}++export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };diff --git a/src/components/ui/textarea.tsx b/src/components/ui/textarea.tsxnew file mode 100644index 0000000..768fb85--- /dev/null+++ b/src/components/ui/textarea.tsx@@ -0,0 +1,18 @@+import * as React from "react";++import { cn } from "@/lib/cn";++function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {+ return (+ <textarea+ data-slot="textarea"+ className={cn(+ "flex field-sizing-content min-h-28 w-full rounded-[1.35rem] border border-input bg-[var(--paper-raised)] px-4 py-3 text-sm text-[var(--fg)] transition-colors outline-none placeholder:text-[var(--placeholder)] focus-visible:border-[var(--border-strong)] focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-[rgba(248,244,238,0.9)] disabled:text-[var(--secondary)] aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20",+ className,+ )}+ {...props}+ />+ );+}++export { Textarea };diff --git a/src/components/ui/toggle.tsx b/src/components/ui/toggle.tsxnew file mode 100644index 0000000..518bc11--- /dev/null+++ b/src/components/ui/toggle.tsx@@ -0,0 +1,46 @@+"use client";++import * as React from "react";+import { cva, type VariantProps } from "class-variance-authority";+import { Toggle as TogglePrimitive } from "radix-ui";++import { cn } from "@/lib/cn";++const toggleVariants = cva(+ "group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",+ {+ variants: {+ variant: {+ default: "bg-transparent",+ outline: "border border-input bg-transparent hover:bg-muted",+ },+ size: {+ default: "h-8 min-w-8 px-2",+ sm: "h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-1.5 text-[0.8rem]",+ lg: "h-9 min-w-9 px-2.5",+ },+ },+ defaultVariants: {+ variant: "default",+ size: "default",+ },+ },+);++function Toggle({+ className,+ variant = "default",+ size = "default",+ ...props+}: React.ComponentProps<typeof TogglePrimitive.Root> &+ VariantProps<typeof toggleVariants>) {+ return (+ <TogglePrimitive.Root+ data-slot="toggle"+ className={cn(toggleVariants({ variant, size, className }))}+ {...props}+ />+ );+}++export { Toggle, toggleVariants };diff --git a/src/components/ui/tooltip.tsx b/src/components/ui/tooltip.tsxnew file mode 100644index 0000000..118a2d9--- /dev/null+++ b/src/components/ui/tooltip.tsx@@ -0,0 +1,57 @@+"use client";++import * as React from "react";+import { Tooltip as TooltipPrimitive } from "radix-ui";++import { cn } from "@/lib/cn";++function TooltipProvider({+ delayDuration = 0,+ ...props+}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {+ return (+ <TooltipPrimitive.Provider+ data-slot="tooltip-provider"+ delayDuration={delayDuration}+ {...props}+ />+ );+}++function Tooltip({+ ...props+}: React.ComponentProps<typeof TooltipPrimitive.Root>) {+ return <TooltipPrimitive.Root data-slot="tooltip" {...props} />;+}++function TooltipTrigger({+ ...props+}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {+ return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />;+}++function TooltipContent({+ className,+ sideOffset = 0,+ children,+ ...props+}: React.ComponentProps<typeof TooltipPrimitive.Content>) {+ return (+ <TooltipPrimitive.Portal>+ <TooltipPrimitive.Content+ data-slot="tooltip-content"+ sideOffset={sideOffset}+ className={cn(+ "z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",+ className,+ )}+ {...props}+ >+ {children}+ <TooltipPrimitive.Arrow className="z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" />+ </TooltipPrimitive.Content>+ </TooltipPrimitive.Portal>+ );+}++export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };diff --git a/src/lib/account.ts b/src/lib/account.tsnew file mode 100644index 0000000..6f244f9--- /dev/null+++ b/src/lib/account.ts@@ -0,0 +1,292 @@+import {+ accountClosureConfirmationPhrase,+ accountClosureRequestSchema,+ senderProfileSchema,+ updateProfileSchema,+ type AccountClosureRequestInput,+ type SenderProfile,+ type UpdateProfileInput,+} from "./schemas/auth.ts";+import {+ type DbExecutor,+ getDb,+ queryMany,+ queryOne,+} from "./db/connection.ts";+import {+ ACCOUNT_CLOSURE_EXPORT_WINDOW_DAYS,+ scheduleAccountClosure,+} from "./retention.ts";+import { createEmailService } from "./services/email.ts";+import { ServiceConfigurationError } from "./services/service-config.ts";+import { getEnv, type EnvSource } from "./utils/env.ts";++type SenderAccountRow = {+ email: string;+ id: string;+ name: string;+};++type EnvelopeCountRow = {+ status: string;+ total: number;+};++type RequestAccountClosureOptions = {+ database?: DbExecutor;+ env?: EnvSource;+};++type AccountClosureRequestResult = {+ alreadyQueued: boolean;+ exportExpiresAt: number;+ purgeAfterAt: number;+ submittedAt: number;+};++export class AccountMutationError extends Error {+ readonly fieldErrors: Partial<Record<string, string>>;+ readonly statusCode: number;++ constructor(+ message: string,+ statusCode: number,+ fieldErrors: Partial<Record<string, string>> = {},+ ) {+ super(message);+ this.name = "AccountMutationError";+ this.fieldErrors = fieldErrors;+ this.statusCode = statusCode;+ }+}++const envelopeStatuses = [+ "draft",+ "sent",+ "completed",+ "declined",+ "voided",+] as const;++async function getSenderAccountRow(+ userId: string,+ database: DbExecutor,+): Promise<SenderAccountRow | null> {+ return queryOne<SenderAccountRow>(+ database,+ `+ SELECT+ id,+ email,+ name+ FROM "user"+ WHERE id = $1+ `,+ [userId],+ );+}++function mapSenderProfile(row: SenderAccountRow): SenderProfile {+ return senderProfileSchema.parse({+ email: row.email,+ fullName: row.name,+ id: row.id,+ });+}++function buildProfileValidationErrors(input: unknown) {+ const parsedInput = updateProfileSchema.safeParse(input);++ if (parsedInput.success) {+ return parsedInput.data;+ }++ const fieldErrors: Partial<Record<keyof UpdateProfileInput, string>> = {};++ for (const issue of parsedInput.error.issues) {+ const field = issue.path[0];++ if (field === "email") {+ fieldErrors.email = "Enter a valid email address";+ }++ if (field === "fullName") {+ fieldErrors.fullName = "Enter your full name";+ }+ }++ throw new AccountMutationError("Invalid profile input.", 400, fieldErrors);+}++function normalizeEmail(email: string) {+ return email.trim().toLowerCase();+}++export async function updateSenderProfile(+ userId: string,+ input: UpdateProfileInput,+ database: DbExecutor = getDb(),+): Promise<SenderProfile> {+ const normalizedInput = buildProfileValidationErrors(input);+ const account = await getSenderAccountRow(userId, database);++ if (!account) {+ throw new AccountMutationError("Account not found.", 404);+ }++ const normalizedEmail = normalizeEmail(normalizedInput.email);++ if (normalizeEmail(account.email) !== normalizedEmail) {+ throw new AccountMutationError(+ "Use the verified email change flow to update your sender email.",+ 400,+ {+ email: "Use the secure email change flow.",+ },+ );+ }++ try {+ const result = await database.query(+ `+ UPDATE "user"+ SET+ name = $1,+ "updatedAt" = $2+ WHERE id = $3+ `,+ [normalizedInput.fullName.trim(), new Date().toISOString(), userId],+ );++ if (result.rowCount !== 1) {+ throw new Error("Profile update affected an unexpected number of rows.");+ }+ } catch {+ throw new AccountMutationError("Unable to update your profile.", 500);+ }++ return mapSenderProfile({+ email: account.email,+ id: userId,+ name: normalizedInput.fullName.trim(),+ });+}++function buildClosureValidationError(+ input: unknown,+): AccountClosureRequestInput {+ const parsedInput = accountClosureRequestSchema.safeParse(input);++ if (parsedInput.success) {+ return parsedInput.data;+ }++ throw new AccountMutationError(+ "Type the confirmation phrase to continue.",+ 400,+ {+ confirmation: `Type "${accountClosureConfirmationPhrase}" to confirm.`,+ },+ );+}++async function formatEnvelopeCounts(+ userId: string,+ database: DbExecutor,+): Promise<string[]> {+ const countRows = await queryMany<EnvelopeCountRow>(+ database,+ `+ SELECT+ status,+ COUNT(*) AS total+ FROM envelopes+ WHERE user_id = $1+ GROUP BY status+ `,+ [userId],+ );+ const totalsByStatus = new Map(+ countRows.map((row) => [row.status, row.total] as const),+ );++ return envelopeStatuses.map(+ (status) => `- ${status}: ${String(totalsByStatus.get(status) ?? 0)}`,+ );+}++function resolveSupportAddress(env: EnvSource): string {+ const supportAddress = getEnv(env).email.supportAddress;++ if (supportAddress) {+ return supportAddress;+ }++ throw new ServiceConfigurationError("email", ["SUPPORT_EMAIL"]);+}++function formatRetentionDeadline(timestamp: number): string {+ return new Date(timestamp * 1000).toISOString().replace(".000Z", " UTC");+}++export async function requestAccountClosure(+ userId: string,+ input: unknown,+ { database = getDb(), env = process.env }: RequestAccountClosureOptions = {},+): Promise<AccountClosureRequestResult> {+ buildClosureValidationError(input);++ const account = await getSenderAccountRow(userId, database);++ if (!account) {+ throw new AccountMutationError("Account not found.", 404);+ }++ const closureSchedule = await scheduleAccountClosure(userId, database);++ if (!closureSchedule.alreadyQueued) {+ const submittedAt = formatRetentionDeadline(closureSchedule.requestedAt);+ const exportExpiresAt = formatRetentionDeadline(+ closureSchedule.exportExpiresAt,+ );+ const purgeAfterAt = formatRetentionDeadline(closureSchedule.purgeAfterAt);++ try {+ const emailService = createEmailService({ env });++ await emailService.send({+ replyTo: account.email,+ subject: `Account closure request — ${account.name}`,+ template: "account_closure_request",+ textBody: [+ "A sender requested account closure from the SignuDoc settings page.",+ "",+ `Sender: ${account.name} <${account.email}>`,+ `User ID: ${userId}`,+ `Submitted at: ${submittedAt}`,+ `Export window: ${ACCOUNT_CLOSURE_EXPORT_WINDOW_DAYS} days`,+ `Export window ends: ${exportExpiresAt}`,+ `Automatic purge eligible at: ${purgeAfterAt}`,+ "",+ "Envelope counts:",+ ...(await formatEnvelopeCounts(userId, database)),+ "",+ "This request came through the guarded in-app danger-zone flow.",+ ].join("\n"),+ to: resolveSupportAddress(env),+ });+ } catch (error) {+ console.error(+ `Failed to send account closure email for user ${userId}:`,+ error,+ );+ }+ }++ return {+ alreadyQueued: closureSchedule.alreadyQueued,+ exportExpiresAt: closureSchedule.exportExpiresAt,+ purgeAfterAt: closureSchedule.purgeAfterAt,+ submittedAt: closureSchedule.requestedAt,+ };+}diff --git a/src/lib/auth/better-auth.config.ts b/src/lib/auth/better-auth.config.tsnew file mode 100644index 0000000..13ab665--- /dev/null+++ b/src/lib/auth/better-auth.config.ts@@ -0,0 +1,7 @@+import { createAppAuth } from "./server.ts";++export const auth = createAppAuth({+ includeNextCookies: false,+});++export default auth;diff --git a/src/lib/auth/client.ts b/src/lib/auth/client.tsnew file mode 100644index 0000000..cc27458--- /dev/null+++ b/src/lib/auth/client.ts@@ -0,0 +1,7 @@+"use client";++import { createAuthClient } from "better-auth/react";++export const authClient = createAuthClient({+ disableDefaultFetchPlugins: true,+});diff --git a/src/lib/auth/route-session.ts b/src/lib/auth/route-session.tsnew file mode 100644index 0000000..ac3b1d1--- /dev/null+++ b/src/lib/auth/route-session.ts@@ -0,0 +1,35 @@+import { NextResponse } from "next/server";++import { getAuthSessionFromHeaders } from "./server.ts";+import { logSecurityEvent } from "../security/logging.ts";+import {+ getClientIpAddress,+ getRequestPathname,+} from "../security/request.ts";++export async function requireVerifiedSenderSession(request: Request) {+ const session = await getAuthSessionFromHeaders(request.headers);++ if (!session) {+ return NextResponse.json({ error: "Unauthorized." }, { status: 401 });+ }++ if (session.user.emailVerified === true) {+ return session;+ }++ logSecurityEvent("warn", {+ category: "email_verification_required",+ ipAddress: getClientIpAddress(request.headers),+ message: "Blocked an authenticated sender action for an unverified user.",+ path: getRequestPathname(request),+ userId: session.user.id,+ });++ return NextResponse.json(+ {+ error: "Verify your email address before continuing.",+ },+ { status: 403 },+ );+}diff --git a/src/lib/auth/server.ts b/src/lib/auth/server.tsnew file mode 100644index 0000000..36274a0--- /dev/null+++ b/src/lib/auth/server.ts@@ -0,0 +1,264 @@+import { betterAuth } from "better-auth";+import { nextCookies } from "better-auth/next-js";+import { haveIBeenPwned } from "better-auth/plugins";+import { headers } from "next/headers";+import type { Pool } from "pg";++import { getDb } from "../db/connection.ts";+import {+ createEmailService,+ type EmailService,+ type TransactionalEmailMessage,+} from "../services/email.ts";+import { withUserEmailLegalFooter } from "../services/email-legal-footer.ts";+import { assertServiceConfig } from "../services/service-config.ts";+import { getEnv, type EnvSource } from "../utils/env.ts";++type CreateAppAuthOptions = {+ database?: Pool;+ env?: EnvSource;+ includeNextCookies?: boolean;+};++type AppAuth = ReturnType<typeof createAppAuth>;++let cachedAuth: AppAuth | null = null;++const LOOPBACK_HOST_ALIASES = ["127.0.0.1", "localhost"] as const;+const AUTH_ENV_KEYS = ["BETTER_AUTH_SECRET", "BETTER_AUTH_URL"] as const;++function isLoopbackHost(hostname: string): boolean {+ return (+ hostname === "::1" ||+ LOOPBACK_HOST_ALIASES.includes(+ hostname as (typeof LOOPBACK_HOST_ALIASES)[number],+ )+ );+}++function addTrustedOrigin(+ trustedOrigins: Set<string>,+ origin: string | null | undefined,+) {+ if (!origin) {+ return;+ }++ try {+ const parsedOrigin = new URL(origin);++ trustedOrigins.add(parsedOrigin.origin);++ if (!isLoopbackHost(parsedOrigin.hostname)) {+ return;+ }++ for (const loopbackHost of LOOPBACK_HOST_ALIASES) {+ const aliasOrigin = new URL(parsedOrigin.origin);+ aliasOrigin.hostname = loopbackHost;+ trustedOrigins.add(aliasOrigin.origin);+ }+ } catch {+ return;+ }+}++function buildEmailVerificationMessage(input: { name: string; url: string }) {+ const textBody = [+ `Hi ${input.name},`,+ "",+ "Verify your email address to finish setting up your SignuDoc sender account:",+ input.url,+ "",+ "If you didn't request this, you can ignore this email.",+ ].join("\n");+ const htmlBody = [+ `<p>Hi ${input.name},</p>`,+ "<p>Verify your email address to finish setting up your SignuDoc sender account.</p>",+ `<p><a href="${input.url}">Verify your email</a></p>`,+ "<p>If you didn't request this, you can ignore this email.</p>",+ ].join("");+ const legalFooter = withUserEmailLegalFooter({+ htmlBody,+ textBody,+ });++ return {+ htmlBody: legalFooter.htmlBody,+ subject: "Verify your SignuDoc email",+ template: "email_verification" as const,+ textBody: legalFooter.textBody,+ };+}++function buildChangeEmailConfirmationMessage(input: {+ name: string;+ newEmail: string;+ url: string;+}) {+ const textBody = [+ `Hi ${input.name},`,+ "",+ `Confirm that you want to change your SignuDoc sender email to ${input.newEmail}:`,+ input.url,+ "",+ "If you didn't request this, you can ignore this email.",+ ].join("\n");+ const htmlBody = [+ `<p>Hi ${input.name},</p>`,+ `<p>Confirm that you want to change your SignuDoc sender email to ${input.newEmail}.</p>`,+ `<p><a href="${input.url}">Confirm this email change</a></p>`,+ "<p>If you didn't request this, you can ignore this email.</p>",+ ].join("");+ const legalFooter = withUserEmailLegalFooter({+ htmlBody,+ textBody,+ });++ return {+ htmlBody: legalFooter.htmlBody,+ subject: "Confirm your SignuDoc email change",+ template: "change_email_confirmation" as const,+ textBody: legalFooter.textBody,+ };+}++function sendAuthEmailInBackground(+ emailService: EmailService,+ message: TransactionalEmailMessage,+) {+ void emailService.send(message).catch((error) => {+ console.error(+ `Failed to send auth email "${message.template}" to ${message.to}:`,+ error,+ );+ });+}++export function createAppAuth({+ database = getDb(),+ env = process.env,+ includeNextCookies = true,+}: CreateAppAuthOptions = {}) {+ assertServiceConfig("auth", AUTH_ENV_KEYS, env);++ const appEnv = getEnv(env);+ const authEnv = appEnv.auth;+ const emailService = createEmailService({ env });+ const plugins = [+ ...(includeNextCookies ? [nextCookies()] : []),+ ...(env.NODE_ENV === "production"+ ? [+ haveIBeenPwned({+ customPasswordCompromisedMessage:+ "This password has appeared in a breach. Choose a different password.",+ }),+ ]+ : []),+ ];+ const secret = authEnv.betterAuthSecret!;++ return betterAuth({+ trustedOrigins: async () => {+ const trustedOrigins = new Set<string>();++ addTrustedOrigin(trustedOrigins, appEnv.appUrl);+ addTrustedOrigin(trustedOrigins, authEnv.betterAuthUrl);++ return Array.from(trustedOrigins);+ },+ advanced: {+ useSecureCookies: env.NODE_ENV === "production",+ },+ baseURL: authEnv.betterAuthUrl!,+ database,+ emailVerification: {+ sendOnSignIn: true,+ sendOnSignUp: true,+ sendVerificationEmail: async ({ url, user }) => {+ sendAuthEmailInBackground(emailService, {+ ...buildEmailVerificationMessage({+ name: user.name,+ url,+ }),+ to: user.email,+ });+ },+ },+ emailAndPassword: {+ enabled: true,+ maxPasswordLength: 128,+ minPasswordLength: 15,+ requireEmailVerification: true,+ revokeSessionsOnPasswordReset: true,+ sendResetPassword: async ({ url, user }) => {+ const textBody = [+ `Hi ${user.name},`,+ "",+ "Use the link below to reset your SignuDoc password:",+ url,+ "",+ "If you didn't request this reset, you can ignore this email.",+ ].join("\n");+ const htmlBody = [+ `<p>Hi ${user.name},</p>`,+ "<p>Use the link below to reset your SignuDoc password.</p>",+ `<p><a href="${url}">Reset your password</a></p>`,+ "<p>If you didn't request this reset, you can ignore this email.</p>",+ ].join("");+ const legalFooter = withUserEmailLegalFooter({+ htmlBody,+ textBody,+ });++ sendAuthEmailInBackground(emailService, {+ htmlBody: legalFooter.htmlBody,+ subject: "Reset your SignuDoc password",+ template: "password_reset",+ textBody: legalFooter.textBody,+ to: user.email,+ });+ },+ },+ plugins,+ secret,+ user: {+ changeEmail: {+ enabled: true,+ sendChangeEmailConfirmation: async ({ newEmail, url, user }) => {+ sendAuthEmailInBackground(emailService, {+ ...buildChangeEmailConfirmationMessage({+ name: user.name,+ newEmail,+ url,+ }),+ to: user.email,+ });+ },+ updateEmailWithoutVerification: false,+ },+ },+ });+}++export function getAuth(): AppAuth {+ if (cachedAuth) {+ return cachedAuth;+ }++ cachedAuth = createAppAuth();++ return cachedAuth;+}++export async function getAuthSessionFromHeaders(requestHeaders: Headers) {+ return getAuth().api.getSession({+ headers: requestHeaders,+ });+}++export async function getAuthSession() {+ const requestHeaders = await headers();++ return getAuthSessionFromHeaders(requestHeaders);+}diff --git a/src/lib/cn.ts b/src/lib/cn.tsnew file mode 100644index 0000000..a5ef193--- /dev/null+++ b/src/lib/cn.ts@@ -0,0 +1,6 @@+import { clsx, type ClassValue } from "clsx";+import { twMerge } from "tailwind-merge";++export function cn(...inputs: ClassValue[]) {+ return twMerge(clsx(inputs));+}diff --git a/src/lib/contact.ts b/src/lib/contact.tsnew file mode 100644index 0000000..3246ce4--- /dev/null+++ b/src/lib/contact.ts@@ -0,0 +1,151 @@+import { contactFormSchema, type ContactFormInput } from "./schemas/contact.ts";+import { resolvePublicSupportAddress } from "./public-contact.ts";+import { createEmailService } from "./services/email.ts";+import { ServiceConfigurationError } from "./services/service-config.ts";+import { type EnvSource } from "./utils/env.ts";+import { escapeHtml } from "./utils/html.ts";++type ContactFieldName = "email" | "message" | "name";++type SubmitPublicContactMessageOptions = {+ env?: EnvSource;+};++type SubmitPublicContactMessageResult = {+ ignored: boolean;+ messageId?: string;+};++export class ContactSubmissionError extends Error {+ readonly fieldErrors: Partial<Record<ContactFieldName, string>>;+ readonly statusCode: number;++ constructor(+ message: string,+ statusCode: number,+ fieldErrors: Partial<Record<ContactFieldName, string>> = {},+ ) {+ super(message);+ this.name = "ContactSubmissionError";+ this.fieldErrors = fieldErrors;+ this.statusCode = statusCode;+ }+}++function formatSubmittedAt(date = new Date()): string {+ return date.toISOString().replace("T", " ").replace(".000Z", " UTC");+}++function isEmailServiceConfigurationError(error: unknown): boolean {+ if (error instanceof ServiceConfigurationError) {+ return true;+ }++ if (!(error instanceof Error)) {+ return false;+ }++ const normalizedMessage = error.message.trim().toLowerCase();++ return (+ normalizedMessage.includes("api key is invalid") ||+ normalizedMessage.includes("invalid api key") ||+ normalizedMessage.includes("missing api key") ||+ normalizedMessage.includes("restricted api key") ||+ normalizedMessage.includes("invalid from address")+ );+}++function buildContactValidationError(input: unknown): ContactFormInput {+ const parsedInput = contactFormSchema.safeParse(input);++ if (parsedInput.success) {+ return parsedInput.data;+ }++ const fieldErrors: Partial<Record<ContactFieldName, string>> = {};++ for (const issue of parsedInput.error.issues) {+ const field = issue.path[0];++ if (field === "name") {+ fieldErrors.name = "Enter your name";+ }++ if (field === "email") {+ fieldErrors.email = "Enter a valid email address";+ }++ if (field === "message") {+ fieldErrors.message =+ issue.code === "too_big"+ ? "Message must be 5000 characters or fewer"+ : "Enter a message";+ }+ }++ throw new ContactSubmissionError(+ "Please review the highlighted fields.",+ 400,+ fieldErrors,+ );+}++export async function submitPublicContactMessage(+ input: unknown,+ { env = process.env }: SubmitPublicContactMessageOptions = {},+): Promise<SubmitPublicContactMessageResult> {+ const parsedInput = buildContactValidationError(input);++ if (parsedInput.company) {+ return {+ ignored: true,+ };+ }++ const supportAddress = resolvePublicSupportAddress(env);+ const submittedAt = formatSubmittedAt();+ const escapedMessageHtml = escapeHtml(parsedInput.message).replaceAll(+ "\n",+ "<br />",+ );++ try {+ const emailService = createEmailService({ env });+ const deliveryResult = await emailService.send({+ htmlBody: [+ "<p>A new public contact request was submitted through SignuDoc.</p>",+ `<p><strong>Name:</strong> ${escapeHtml(parsedInput.name)}<br /><strong>Email:</strong> ${escapeHtml(parsedInput.email)}<br /><strong>Submitted at:</strong> ${escapeHtml(submittedAt)}</p>`,+ `<p><strong>Message:</strong><br />${escapedMessageHtml}</p>`,+ ].join(""),+ replyTo: parsedInput.email,+ subject: `[Contact] ${parsedInput.name}`,+ template: "contact_form",+ textBody: [+ "A new public contact request was submitted through SignuDoc.",+ "",+ `Name: ${parsedInput.name}`,+ `Email: ${parsedInput.email}`,+ `Submitted at: ${submittedAt}`,+ "",+ "Message:",+ parsedInput.message,+ ].join("\n"),+ to: supportAddress,+ });++ return {+ ignored: false,+ messageId: deliveryResult.messageId,+ };+ } catch (error) {+ if (isEmailServiceConfigurationError(error)) {+ throw new ContactSubmissionError(+ "Contact form is temporarily unavailable.",+ 503,+ );+ }++ throw error;+ }+}diff --git a/src/lib/db/connection.ts b/src/lib/db/connection.tsnew file mode 100644index 0000000..fef7b96--- /dev/null+++ b/src/lib/db/connection.ts@@ -0,0 +1,93 @@+import pg, {+ Pool,+ type PoolClient,+ type QueryResult,+ type QueryResultRow,+} from "pg";++import { getEnv } from "../utils/env.ts";+import { assertServiceConfig } from "../services/service-config.ts";++const DATABASE_ENV_KEYS = ["DATABASE_URL"] as const;++declare global {+ var __signudocPgPool: Pool | undefined;+}++// Parse bigint values into numbers because this app stores timestamps and counts+// that are already modeled as numbers throughout the codebase.+pg.types.setTypeParser(20, (value) => Number.parseInt(value, 10));++let cachedPool: Pool | null = null;++export type DbExecutor = Pick<Pool, "query"> | Pick<PoolClient, "query">;+export type DbPool = Pool;++export function getDb(): Pool {+ if (cachedPool) {+ return cachedPool;+ }++ if (globalThis.__signudocPgPool) {+ cachedPool = globalThis.__signudocPgPool;+ return cachedPool;+ }++ assertServiceConfig("database", DATABASE_ENV_KEYS, process.env);++ const pool = new Pool({+ application_name: "signudoc",+ connectionString: getEnv().databaseUrl!,+ connectionTimeoutMillis: 10_000,+ idleTimeoutMillis: 30_000,+ max: process.env.NODE_ENV === "production" ? 10 : 5,+ });++ pool.on("error", (error) => {+ console.error("[db] Postgres pool error", error);+ });++ if (process.env.NODE_ENV !== "production") {+ globalThis.__signudocPgPool = pool;+ }++ cachedPool = pool;+ return pool;+}++export async function withTransaction<T>(+ run: (client: PoolClient) => Promise<T>,+ pool: Pool = getDb(),+): Promise<T> {+ const client = await pool.connect();++ try {+ await client.query("BEGIN");+ const result = await run(client);+ await client.query("COMMIT");+ return result;+ } catch (error) {+ await client.query("ROLLBACK");+ throw error;+ } finally {+ client.release();+ }+}++export async function queryOne<T extends QueryResultRow>(+ db: DbExecutor,+ text: string,+ values: readonly unknown[] = [],+): Promise<T | null> {+ const result: QueryResult<T> = await db.query(text, values as unknown[]);+ return result.rows[0] ?? null;+}++export async function queryMany<T extends QueryResultRow>(+ db: DbExecutor,+ text: string,+ values: readonly unknown[] = [],+): Promise<T[]> {+ const result: QueryResult<T> = await db.query(text, values as unknown[]);+ return result.rows;+}diff --git a/src/lib/downloads.ts b/src/lib/downloads.tsnew file mode 100644index 0000000..9fbdc77--- /dev/null+++ b/src/lib/downloads.ts@@ -0,0 +1,725 @@+import {+ type DbExecutor,+ getDb,+ queryMany,+ queryOne,+} from "./db/connection.ts";+import {+ downloadFileTypeSchema,+ envelopeRecordSchema,+ type EnvelopeRecord,+} from "./schemas/envelope.ts";+import { fieldRecordSchema, type FieldRecord } from "./schemas/field.ts";+import { signerRecordSchema, type SignerRecord } from "./schemas/signer.ts";+import { listAuditEventsForEnvelope } from "./services/audit.ts";+import {+ type IssuedDownloadLink,+ issueRecipientDownloadLink,+} from "./services/downloads.ts";+import { hashOpaqueToken } from "./services/opaque-tokens.ts";+import {+ renderEnvelopeCertificatePdf,+ renderFinalizedEnvelopePdf,+} from "./services/pdf-finalize.ts";+import {+ createStorageService,+ type StorageService,+} from "./services/storage.ts";+import { getRecipientCertificateKey } from "./services/storage-keys.ts";+import { type DownloadFileType } from "./types/domain.ts";++type EnvelopeRow = {+ completedAt: number | null;+ createdAt: number;+ declinedAt: number | null;+ evidenceKey: string | null;+ id: string;+ pageCount: number;+ sentAt: number | null;+ signedPdfKey: string | null;+ sourcePdfFilename: string;+ sourcePdfHash: string;+ sourcePdfKey: string;+ sourcePdfSizeBytes: number;+ status: EnvelopeRecord["status"];+ title: string;+ updatedAt: number;+ userId: string;+ voidedAt: number | null;+};++type RecipientDownloadTokenRow = {+ createdAt: number;+ envelopeId: string;+ expiresAt: number;+ fileType: DownloadFileType;+ signerId: string;+ tokenHash: string;+};++type SignerRow = {+ createdAt: number;+ declineReason: string | null;+ declinedAt: number | null;+ email: string;+ envelopeId: string;+ id: string;+ lastNotifiedAt: number | null;+ lastNudgedAt: number | null;+ name: string;+ signedAt: number | null;+ signOrder: number;+ signingTokenExpiresAt: number | null;+ signingTokenHash: string | null;+ status: SignerRecord["status"];+ turnStartedAt: number | null;+ updatedAt: number;+};++type FieldRow = {+ checked: boolean | null;+ createdAt: number;+ envelopeId: string;+ height: number;+ id: string;+ imageKey: string | null;+ inputMethod: FieldRecord["inputMethod"] | null;+ label: string | null;+ page: number;+ required: boolean;+ signerId: string;+ submittedAt: number | null;+ type: FieldRecord["type"];+ updatedAt: number;+ value: string | null;+ width: number;+ x: number;+ y: number;+};++export type ResolvedDownload = {+ contentType: string;+ envelopeId: string;+ fileName: string;+ fileType: DownloadFileType;+ key: string;+};++export type SenderEnvelopeDownload = ResolvedDownload & {+ body: Uint8Array;+ contentLength: number;+};++export type EnvelopeDownloadResult = ResolvedDownload | SenderEnvelopeDownload;++export class DownloadAccessError extends Error {+ readonly statusCode: number;++ constructor(message: string, statusCode: number) {+ super(message);+ this.name = "DownloadAccessError";+ this.statusCode = statusCode;+ }+}++function mapEnvelopeRow(row: EnvelopeRow): EnvelopeRecord {+ return envelopeRecordSchema.parse(row);+}++function mapSignerRow(row: SignerRow): SignerRecord {+ return signerRecordSchema.parse({+ createdAt: row.createdAt,+ declineReason: row.declineReason ?? undefined,+ declinedAt: row.declinedAt,+ email: row.email,+ envelopeId: row.envelopeId,+ id: row.id,+ lastNotifiedAt: row.lastNotifiedAt,+ lastNudgedAt: row.lastNudgedAt,+ name: row.name,+ signOrder: row.signOrder,+ signedAt: row.signedAt,+ signingTokenExpiresAt: row.signingTokenExpiresAt,+ signingTokenHash: row.signingTokenHash,+ status: row.status,+ turnStartedAt: row.turnStartedAt,+ updatedAt: row.updatedAt,+ });+}++function mapFieldRow(row: FieldRow): FieldRecord {+ return fieldRecordSchema.parse({+ checked: row.checked,+ createdAt: row.createdAt,+ envelopeId: row.envelopeId,+ height: row.height,+ id: row.id,+ imageKey: row.imageKey,+ inputMethod: row.inputMethod,+ label: row.label ?? undefined,+ page: row.page,+ required: row.required,+ signerId: row.signerId,+ submittedAt: row.submittedAt,+ type: row.type,+ updatedAt: row.updatedAt,+ value: row.value ?? undefined,+ width: row.width,+ x: row.x,+ y: row.y,+ });+}++async function getEnvelopeById(+ envelopeId: string,+ database: DbExecutor,+): Promise<EnvelopeRecord | null> {+ const row = await queryOne<EnvelopeRow>(+ database,+ `+ SELECT+ id,+ user_id AS "userId",+ title,+ status,+ source_pdf_key AS "sourcePdfKey",+ source_pdf_filename AS "sourcePdfFilename",+ source_pdf_size_bytes AS "sourcePdfSizeBytes",+ page_count AS "pageCount",+ signed_pdf_key AS "signedPdfKey",+ evidence_key AS "evidenceKey",+ source_pdf_hash AS "sourcePdfHash",+ sent_at AS "sentAt",+ completed_at AS "completedAt",+ declined_at AS "declinedAt",+ voided_at AS "voidedAt",+ created_at AS "createdAt",+ updated_at AS "updatedAt"+ FROM envelopes+ WHERE id = $1+ `,+ [envelopeId],+ );++ return row ? mapEnvelopeRow(row) : null;+}++async function getEnvelopeByIdForUser(+ userId: string,+ envelopeId: string,+ database: DbExecutor,+): Promise<EnvelopeRecord | null> {+ const row = await queryOne<EnvelopeRow>(+ database,+ `+ SELECT+ id,+ user_id AS "userId",+ title,+ status,+ source_pdf_key AS "sourcePdfKey",+ source_pdf_filename AS "sourcePdfFilename",+ source_pdf_size_bytes AS "sourcePdfSizeBytes",+ page_count AS "pageCount",+ signed_pdf_key AS "signedPdfKey",+ evidence_key AS "evidenceKey",+ source_pdf_hash AS "sourcePdfHash",+ sent_at AS "sentAt",+ completed_at AS "completedAt",+ declined_at AS "declinedAt",+ voided_at AS "voidedAt",+ created_at AS "createdAt",+ updated_at AS "updatedAt"+ FROM envelopes+ WHERE id = $1+ AND user_id = $2+ `,+ [envelopeId, userId],+ );++ return row ? mapEnvelopeRow(row) : null;+}++async function getRecipientDownloadTokenByHash(+ tokenHash: string,+ database: DbExecutor,+): Promise<RecipientDownloadTokenRow | null> {+ return queryOne<RecipientDownloadTokenRow>(+ database,+ `+ SELECT+ token_hash AS "tokenHash",+ envelope_id AS "envelopeId",+ signer_id AS "signerId",+ file_type AS "fileType",+ expires_at AS "expiresAt",+ created_at AS "createdAt"+ FROM recipient_download_tokens+ WHERE token_hash = $1+ `,+ [tokenHash],+ );+}++async function getSignerForEnvelope(+ signerId: string,+ envelopeId: string,+ database: DbExecutor,+): Promise<SignerRecord | null> {+ const row = await queryOne<SignerRow>(+ database,+ `+ SELECT+ id,+ envelope_id AS "envelopeId",+ name,+ email,+ sign_order AS "signOrder",+ status,+ signing_token_hash AS "signingTokenHash",+ signing_token_expires_at AS "signingTokenExpiresAt",+ turn_started_at AS "turnStartedAt",+ last_notified_at AS "lastNotifiedAt",+ last_nudged_at AS "lastNudgedAt",+ signed_at AS "signedAt",+ declined_at AS "declinedAt",+ decline_reason AS "declineReason",+ created_at AS "createdAt",+ updated_at AS "updatedAt"+ FROM signers+ WHERE id = $1+ AND envelope_id = $2+ `,+ [signerId, envelopeId],+ );++ return row ? mapSignerRow(row) : null;+}++async function listSignersForEnvelope(+ envelopeId: string,+ database: DbExecutor,+): Promise<SignerRecord[]> {+ const rows = await queryMany<SignerRow>(+ database,+ `+ SELECT+ id,+ envelope_id AS "envelopeId",+ name,+ email,+ sign_order AS "signOrder",+ status,+ signing_token_hash AS "signingTokenHash",+ signing_token_expires_at AS "signingTokenExpiresAt",+ turn_started_at AS "turnStartedAt",+ last_notified_at AS "lastNotifiedAt",+ last_nudged_at AS "lastNudgedAt",+ signed_at AS "signedAt",+ declined_at AS "declinedAt",+ decline_reason AS "declineReason",+ created_at AS "createdAt",+ updated_at AS "updatedAt"+ FROM signers+ WHERE envelope_id = $1+ ORDER BY sign_order ASC, id ASC+ `,+ [envelopeId],+ );++ return rows.map(mapSignerRow);+}++async function storeRecipientDownloadToken(+ {+ envelopeId,+ expiresAt,+ fileType,+ issuedAt,+ signerId,+ tokenHash,+ }: {+ envelopeId: string;+ expiresAt: number;+ fileType: DownloadFileType;+ issuedAt: number;+ signerId: string;+ tokenHash: string;+ },+ database: DbExecutor,+) {+ await database.query(+ `+ INSERT INTO recipient_download_tokens (+ token_hash,+ envelope_id,+ signer_id,+ file_type,+ expires_at,+ created_at+ ) VALUES ($1, $2, $3, $4, $5, $6)+ ON CONFLICT (envelope_id, signer_id, file_type)+ DO UPDATE SET+ token_hash = EXCLUDED.token_hash,+ expires_at = EXCLUDED.expires_at,+ created_at = EXCLUDED.created_at+ `,+ [tokenHash, envelopeId, signerId, fileType, expiresAt, issuedAt],+ );+}++export async function createRecipientDownloadLink(+ {+ envelopeId,+ fileType,+ issuedAt,+ signerId,+ }: {+ envelopeId: string;+ fileType: DownloadFileType;+ issuedAt?: number;+ signerId: string;+ },+ {+ database = getDb(),+ }: {+ database?: DbExecutor;+ } = {},+): Promise<IssuedDownloadLink> {+ const issuedLink = await issueRecipientDownloadLink({+ fileType,+ issuedAt,+ });++ await storeRecipientDownloadToken(+ {+ envelopeId,+ expiresAt: issuedLink.exp,+ fileType,+ issuedAt: issuedLink.iat,+ signerId,+ tokenHash: issuedLink.tokenHash,+ },+ database,+ );++ return issuedLink;+}++async function listFieldsForEnvelope(+ envelopeId: string,+ database: DbExecutor,+): Promise<FieldRecord[]> {+ const rows = await queryMany<FieldRow>(+ database,+ `+ SELECT+ id,+ envelope_id AS "envelopeId",+ signer_id AS "signerId",+ type,+ page,+ x,+ y,+ width,+ height,+ required,+ label,+ input_method AS "inputMethod",+ value,+ image_key AS "imageKey",+ checked,+ submitted_at AS "submittedAt",+ created_at AS "createdAt",+ updated_at AS "updatedAt"+ FROM fields+ WHERE envelope_id = $1+ ORDER BY page ASC, created_at ASC, id ASC+ `,+ [envelopeId],+ );++ return rows.map(mapFieldRow);+}++function sanitizeFileNameSegment(value: string): string {+ return value+ .trim()+ .replace(/[<>:"/\\|?*\u0000-\u001F]+/g, " ")+ .replace(/\s+/g, " ")+ .replace(/\.+$/g, "")+ .slice(0, 120);+}++function buildDownloadFileName(+ envelope: EnvelopeRecord,+ fileType: DownloadFileType,+): string {+ const safeTitle =+ sanitizeFileNameSegment(envelope.title) || `envelope-${envelope.id}`;++ return fileType === "signed"+ ? `${safeTitle} - signed.pdf`+ : `${safeTitle} - certificate.pdf`;+}++function getStoredCertificateKey(+ envelope: EnvelopeRecord,+ redactForRecipients: boolean,+): string | null {+ if (+ !envelope.evidenceKey ||+ !envelope.evidenceKey.trim().replaceAll("\\", "/").endsWith("/internal.pdf")+ ) {+ return null;+ }++ return redactForRecipients+ ? getRecipientCertificateKey(envelope.evidenceKey)+ : envelope.evidenceKey;+}++async function buildSignedPdfDownload(+ envelope: EnvelopeRecord,+ database: DbExecutor,+ storageService: StorageService,+): Promise<EnvelopeDownloadResult> {+ if (envelope.status !== "completed") {+ throw new DownloadAccessError(+ "Signed PDF downloads are available only for completed envelopes.",+ 409,+ );+ }++ if (typeof envelope.completedAt !== "number") {+ throw new DownloadAccessError("Signed PDF is unavailable.", 404);+ }++ if (envelope.signedPdfKey) {+ const signedPdfObject = await storageService.headObject(+ envelope.signedPdfKey,+ );++ if (signedPdfObject.exists) {+ return {+ contentType: signedPdfObject.contentType ?? "application/pdf",+ envelopeId: envelope.id,+ fileName: buildDownloadFileName(envelope, "signed"),+ fileType: "signed",+ key: signedPdfObject.key,+ };+ }+ }++ const [auditEvents, fields, signers] = await Promise.all([+ listAuditEventsForEnvelope(envelope.id, database),+ listFieldsForEnvelope(envelope.id, database),+ listSignersForEnvelope(envelope.id, database),+ ]);+ const body = await renderFinalizedEnvelopePdf(+ {+ auditEvents,+ completedAt: envelope.completedAt,+ envelope,+ fields,+ signers,+ sourcePdfKey: envelope.sourcePdfKey,+ },+ {+ storageService,+ },+ );++ if (envelope.signedPdfKey) {+ await storageService.putObject({+ body,+ contentType: "application/pdf",+ key: envelope.signedPdfKey,+ });++ return {+ contentType: "application/pdf",+ envelopeId: envelope.id,+ fileName: buildDownloadFileName(envelope, "signed"),+ fileType: "signed",+ key: envelope.signedPdfKey,+ };+ }++ return {+ body,+ contentLength: body.length,+ contentType: "application/pdf",+ envelopeId: envelope.id,+ fileName: buildDownloadFileName(envelope, "signed"),+ fileType: "signed",+ key: envelope.signedPdfKey ?? envelope.sourcePdfKey,+ };+}++async function buildCertificateDownload(+ envelope: EnvelopeRecord,+ database: DbExecutor,+ storageService: StorageService,+ {+ redactForRecipients = false,+ }: {+ redactForRecipients?: boolean;+ } = {},+): Promise<EnvelopeDownloadResult> {+ if (+ envelope.status !== "completed" &&+ envelope.status !== "declined" &&+ envelope.status !== "voided"+ ) {+ throw new DownloadAccessError(+ "Certificate downloads are available only after completion, decline, or void.",+ 409,+ );+ }++ const storedCertificateKey = getStoredCertificateKey(+ envelope,+ redactForRecipients,+ );++ if (storedCertificateKey) {+ const certificateObject =+ await storageService.headObject(storedCertificateKey);++ if (certificateObject.exists) {+ return {+ contentType: certificateObject.contentType ?? "application/pdf",+ envelopeId: envelope.id,+ fileName: buildDownloadFileName(envelope, "evidence"),+ fileType: "evidence",+ key: certificateObject.key,+ };+ }+ }++ const [auditEvents, signers] = await Promise.all([+ listAuditEventsForEnvelope(envelope.id, database),+ listSignersForEnvelope(envelope.id, database),+ ]);+ const body = await renderEnvelopeCertificatePdf({+ auditEvents,+ envelope,+ redactForRecipients,+ signers,+ });++ if (storedCertificateKey) {+ await storageService.putObject({+ body,+ contentType: "application/pdf",+ key: storedCertificateKey,+ });++ return {+ contentType: "application/pdf",+ envelopeId: envelope.id,+ fileName: buildDownloadFileName(envelope, "evidence"),+ fileType: "evidence",+ key: storedCertificateKey,+ };+ }++ return {+ body,+ contentLength: body.length,+ contentType: "application/pdf",+ envelopeId: envelope.id,+ fileName: buildDownloadFileName(envelope, "evidence"),+ fileType: "evidence",+ key: envelope.evidenceKey ?? envelope.id,+ };+}++async function isRecipientAuthorizedForEnvelope(+ signerId: string,+ envelopeId: string,+ database: DbExecutor,+): Promise<boolean> {+ return (await getSignerForEnvelope(signerId, envelopeId, database)) !== null;+}++export async function getSenderEnvelopeDownload(+ userId: string,+ envelopeId: string,+ fileType: unknown,+ {+ database = getDb(),+ }: {+ database?: DbExecutor;+ } = {},+): Promise<EnvelopeDownloadResult> {+ const parsedFileType = downloadFileTypeSchema.parse(fileType);+ const envelope = await getEnvelopeByIdForUser(userId, envelopeId, database);+ const storageService = createStorageService();++ if (!envelope) {+ throw new DownloadAccessError("Envelope not found.", 404);+ }++ if (parsedFileType === "signed") {+ return buildSignedPdfDownload(envelope, database, storageService);+ }++ return buildCertificateDownload(envelope, database, storageService);+}++export async function getPublicEnvelopeDownloadForToken(+ token: string,+ {+ database = getDb(),+ }: {+ database?: DbExecutor;+ } = {},+): Promise<EnvelopeDownloadResult> {+ const storageService = createStorageService();+ const tokenRow = await getRecipientDownloadTokenByHash(+ hashOpaqueToken(token),+ database,+ );+ const now = Math.floor(Date.now() / 1000);++ if (!tokenRow || tokenRow.expiresAt <= now) {+ throw new DownloadAccessError(+ "This download link is invalid or has expired.",+ 410,+ );+ }++ const envelope = await getEnvelopeById(tokenRow.envelopeId, database);++ if (!envelope) {+ throw new DownloadAccessError(+ "This download link is invalid or has expired.",+ 410,+ );+ }++ if (+ !(await isRecipientAuthorizedForEnvelope(+ tokenRow.signerId,+ envelope.id,+ database,+ ))+ ) {+ throw new DownloadAccessError(+ "This download link is invalid or has expired.",+ 410,+ );+ }++ const fileType = downloadFileTypeSchema.parse(tokenRow.fileType);++ if (fileType === "signed") {+ return buildSignedPdfDownload(envelope, database, storageService);+ }++ return buildCertificateDownload(envelope, database, storageService, {+ redactForRecipients: true,+ });+}diff --git a/src/lib/draft-pdf-cache.ts b/src/lib/draft-pdf-cache.tsnew file mode 100644index 0000000..bda44b2--- /dev/null+++ b/src/lib/draft-pdf-cache.ts@@ -0,0 +1,143 @@+const DRAFT_PDF_CACHE_DB_NAME = "signudoc-draft-preview-cache";+const DRAFT_PDF_CACHE_DB_VERSION = 1;+const DRAFT_PDF_CACHE_MAX_AGE_MS = 24 * 60 * 60 * 1000;+const DRAFT_PDF_CACHE_STORE_NAME = "draftPdfs";++type DraftPdfCacheRecord = {+ blob: Blob;+ createdAt: number;+ envelopeId: string;+};++let draftPdfCacheDbPromise: Promise<IDBDatabase | null> | null = null;++function supportsIndexedDb(): boolean {+ return typeof indexedDB !== "undefined";+}++async function openDraftPdfCacheDatabase(): Promise<IDBDatabase | null> {+ if (!supportsIndexedDb()) {+ return null;+ }++ draftPdfCacheDbPromise ??= new Promise((resolve, reject) => {+ const request = indexedDB.open(+ DRAFT_PDF_CACHE_DB_NAME,+ DRAFT_PDF_CACHE_DB_VERSION,+ );++ request.onerror = () => {+ reject(+ request.error ?? new Error("Unable to open the draft PDF cache."),+ );+ };++ request.onupgradeneeded = () => {+ const database = request.result;++ if (!database.objectStoreNames.contains(DRAFT_PDF_CACHE_STORE_NAME)) {+ database.createObjectStore(DRAFT_PDF_CACHE_STORE_NAME, {+ keyPath: "envelopeId",+ });+ }+ };++ request.onsuccess = () => {+ resolve(request.result);+ };+ });++ return draftPdfCacheDbPromise;+}++function runDraftPdfCacheTransaction<T>(+ database: IDBDatabase,+ mode: IDBTransactionMode,+ callback: (store: IDBObjectStore) => IDBRequest<T>,+): Promise<T> {+ return new Promise((resolve, reject) => {+ const transaction = database.transaction(DRAFT_PDF_CACHE_STORE_NAME, mode);+ const store = transaction.objectStore(DRAFT_PDF_CACHE_STORE_NAME);+ const request = callback(store);+ let result: T;++ request.onerror = () => {+ reject(+ request.error ?? new Error("Unable to complete the draft PDF cache request."),+ );+ };++ request.onsuccess = () => {+ result = request.result;+ };++ transaction.onerror = () => {+ reject(+ transaction.error ??+ new Error("Unable to complete the draft PDF cache transaction."),+ );+ };++ transaction.oncomplete = () => {+ resolve(result);+ };+ });+}++export async function cacheDraftPdfBlob(+ envelopeId: string,+ blob: Blob,+): Promise<void> {+ const database = await openDraftPdfCacheDatabase();++ if (!database) {+ return;+ }++ await runDraftPdfCacheTransaction(database, "readwrite", (store) =>+ store.put({+ blob,+ createdAt: Date.now(),+ envelopeId,+ } satisfies DraftPdfCacheRecord),+ );+}++export async function getCachedDraftPdfBlob(+ envelopeId: string,+): Promise<Blob | null> {+ const database = await openDraftPdfCacheDatabase();++ if (!database) {+ return null;+ }++ const record = await runDraftPdfCacheTransaction<+ DraftPdfCacheRecord | undefined+ >(database, "readonly", (store) => store.get(envelopeId));++ if (!record) {+ return null;+ }++ if (Date.now() - record.createdAt > DRAFT_PDF_CACHE_MAX_AGE_MS) {+ await deleteCachedDraftPdfBlob(envelopeId);+ return null;+ }++ return record.blob;+}++async function deleteCachedDraftPdfBlob(+ envelopeId: string,+): Promise<void> {+ const database = await openDraftPdfCacheDatabase();++ if (!database) {+ return;+ }++ await runDraftPdfCacheTransaction(database, "readwrite", (store) =>+ store.delete(envelopeId),+ );+}diff --git a/src/lib/envelopes.ts b/src/lib/envelopes.tsnew file mode 100644index 0000000..f86f582--- /dev/null+++ b/src/lib/envelopes.ts@@ -0,0 +1,2135 @@+import { randomUUID } from "node:crypto";++import {+ type DbExecutor,+ type DbPool,+ getDb,+ queryMany,+ queryOne,+ withTransaction,+} from "./db/connection.ts";+import {+ envelopeListFiltersSchema,+ type AuditEventRecord,+ envelopeCreateResponseSchema,+ envelopePageSchema,+ envelopeRecordSchema,+ sendEnvelopeResponseSchema,+ voidEnvelopeResponseSchema,+ type CreateEnvelopeResponse,+ type EnvelopeListFilters,+ type EnvelopePageRecord,+ type EnvelopeRecord,+ type SendEnvelopeResponse,+ type VoidEnvelopeResponse,+} from "./schemas/envelope.ts";+import {+ fieldPlacementSchema,+ fieldRecordSchema,+ replaceFieldsResponseSchema,+ replaceFieldsSchema,+ type FieldRecord,+ type ReplaceFieldsResponse,+} from "./schemas/field.ts";+import {+ replaceSignersResponseSchema,+ replaceSignersSchema,+ signerRecordSchema,+ type ReplaceSignersResponse,+ type SignerRecord,+} from "./schemas/signer.ts";+import { importPdfDocument } from "./services/document-import.ts";+import {+ listAuditEventsForEnvelope,+ recordAuditEvent,+} from "./services/audit.ts";+import { createEmailService } from "./services/email.ts";+import { withUserEmailLegalFooter } from "./services/email-legal-footer.ts";+import { buildSigningInvitationEmail } from "./services/signing-invitation-email.ts";+import {+ storeEnvelopeCertificatePdf,+ storeRecipientEnvelopeCertificatePdf,+} from "./services/pdf-finalize.ts";+import { issueSigningLink } from "./services/signing-links.ts";+import {+ buildEnvelopeCertificateKey,+ buildEnvelopeOriginalPdfKey,+} from "./services/storage-keys.ts";+import { createStorageService } from "./services/storage.ts";+import {+ formatReminderAvailableAt,+ getManualNudgeAvailableAt,+ isManualNudgeAvailable,+} from "./services/reminders.ts";+import { escapeHtml } from "./utils/html.ts";++type CreateDraftEnvelopeOptions = {+ database?: DbPool;+};++type CreateDraftEnvelopeInput = {+ sourcePdf: {+ body: Uint8Array;+ contentType?: string | null;+ filename: string;+ };+ title: string;+};++type SendDraftEnvelopeInput = {+ ipAddress?: string | null;+ senderEmail: string;+ senderName: string;+ userAgent?: string | null;+};++type VoidEnvelopeInput = {+ ipAddress?: string | null;+ senderEmail: string;+ senderName: string;+ userAgent?: string | null;+};++type SendDraftEnvelopeOptions = {+ database?: DbPool;+};++type VoidEnvelopeOptions = {+ database?: DbPool;+};++type EnvelopeRow = {+ completedAt: number | null;+ createdAt: number;+ declinedAt: number | null;+ evidenceKey: string | null;+ id: string;+ pageCount: number;+ sentAt: number | null;+ signedPdfKey: string | null;+ sourcePdfFilename: string;+ sourcePdfHash: string;+ sourcePdfKey: string;+ sourcePdfSizeBytes: number;+ status: EnvelopeRecord["status"];+ title: string;+ updatedAt: number;+ userId: string;+ voidedAt: number | null;+};++type SignerRow = {+ createdAt: number;+ declineReason: string | null;+ declinedAt: number | null;+ email: string;+ envelopeId: string;+ id: string;+ lastNotifiedAt: number | null;+ lastNudgedAt: number | null;+ name: string;+ signedAt: number | null;+ signOrder: number;+ signingTokenExpiresAt: number | null;+ signingTokenHash: string | null;+ status: SignerRecord["status"];+ turnStartedAt: number | null;+ updatedAt: number;+};++type FieldRow = {+ checked: boolean | null;+ createdAt: number;+ envelopeId: string;+ height: number;+ id: string;+ imageKey: string | null;+ inputMethod: FieldRecord["inputMethod"] | null;+ label: string | null;+ page: number;+ required: boolean;+ signerId: string;+ submittedAt: number | null;+ type: FieldRecord["type"];+ updatedAt: number;+ value: string | null;+ width: number;+ x: number;+ y: number;+};++function shouldCountFieldForSignerSummary(+ field: Pick<FieldRecord, "required" | "type">,+): boolean {+ if (field.type === "signature" || field.type === "initials") {+ return true;+ }++ if (field.type === "text") {+ return true;+ }++ if (field.type === "checkbox") {+ return field.required;+ }++ return false;+}++type EnvelopePageRow = {+ envelopeId: string;+ heightPt: number;+ id: string;+ pageNumber: number;+ widthPt: number;+};++type PersistedSignerRecord = SignerRecord & {+ envelopeId: string;+ id: string;+ signOrder: number;+};++type PersistedFieldRecord = FieldRecord & {+ envelopeId: string;+ id: string;+ signerId: string;+};++export type DashboardEnvelopeListItem = {+ contextLine: string;+ createdAtLabel: string;+ id: string;+ searchableEmails: readonly string[];+ status: EnvelopeRecord["status"];+ title: string;+};++type ReviewFieldSummary =+ | "Checkbox"+ | "Date"+ | "Initials"+ | "Signature"+ | "Text";++export type ReviewSignerSummary = {+ email: string;+ fieldSummaries: readonly ReviewFieldSummary[];+ id: string;+ name: string;+ order: number;+};++export type ReviewEnvelopeData = {+ canSend: boolean;+ disabledReason: string | null;+ envelopeId: string;+ filename: string;+ isEmpty: boolean;+ pageCount: number;+ signers: readonly ReviewSignerSummary[];+ sizeLabel: string;+ status: EnvelopeRecord["status"];+ title: string;+};++export type DraftSignerStepSigner = {+ email: string;+ id: string;+ name: string;+ order: number;+};++export type DraftSignerStepData = {+ envelopeId: string;+ signers: readonly DraftSignerStepSigner[];+ status: EnvelopeRecord["status"];+};++export type PrepareEnvelopeData = {+ envelopeId: string;+ fields: readonly FieldRecord[];+ pageCount: number;+ pages: readonly EnvelopePageRecord[];+ pdfUrl: string;+ signers: readonly DraftSignerStepSigner[];+ status: EnvelopeRecord["status"];+ title: string;+};++export type EnvelopeDetailSignerView = {+ email: string;+ id: string;+ metaLabel: string;+ name: string;+ order: number;+ status: "declined" | "pending" | "signed" | "waiting";+ statusDateLabel?: string;+};++export type EnvelopeDetailTimelineItem = {+ description: string;+ id: string;+ timestamp: string;+ tone: "accent" | "danger" | "neutral" | "success";+};++export type EnvelopeDetailManualReminderState = {+ canSend: boolean;+ nextAvailableAtLabel: string | null;+};++export type EnvelopeDetailData = {+ createdAtLabel: string;+ envelopeId: string;+ manualReminder: EnvelopeDetailManualReminderState | null;+ signers: readonly EnvelopeDetailSignerView[];+ status: EnvelopeRecord["status"];+ timeline: readonly EnvelopeDetailTimelineItem[];+ title: string;+};++export type DraftEnvelopeDocument = {+ body: Uint8Array;+ contentLength: number;+ contentType: string;+ fileName: string;+};++export class EnvelopeMutationError extends Error {+ readonly statusCode: number;++ constructor(message: string, statusCode: number) {+ super(message);+ this.name = "EnvelopeMutationError";+ this.statusCode = statusCode;+ }+}++export class EnvelopeDocumentAccessError extends Error {+ readonly statusCode: number;++ constructor(message: string, statusCode: number) {+ super(message);+ this.name = "EnvelopeDocumentAccessError";+ this.statusCode = statusCode;+ }+}++export type DraftEnvelopeResult = {+ envelope: EnvelopeRecord;+ pages: EnvelopePageRecord[];+};++export type ReplaceDraftSignersResult = ReplaceSignersResponse;+export type ReplaceDraftFieldsResult = ReplaceFieldsResponse;+export type SendDraftEnvelopeResult = SendEnvelopeResponse;+export type VoidEnvelopeResult = VoidEnvelopeResponse;++const FIELD_TYPE_SUMMARY_LABELS: Record<+ FieldRecord["type"],+ ReviewFieldSummary+> = {+ checkbox: "Checkbox",+ date: "Date",+ initials: "Initials",+ signature: "Signature",+ text: "Text",+};++const FIELD_TYPE_SORT_ORDER: Record<FieldRecord["type"], number> = {+ checkbox: 4,+ date: 2,+ initials: 1,+ signature: 0,+ text: 3,+};++const TIMELINE_TONE_MAP: Record<+ AuditEventRecord["event"],+ EnvelopeDetailTimelineItem["tone"]+> = {+ completed: "success",+ created: "accent",+ declined: "danger",+ reminded_manual: "neutral",+ sent: "neutral",+ signed: "success",+ viewed: "neutral",+ voided: "danger",+};++const shortDateFormatter = new Intl.DateTimeFormat("en-US", {+ day: "numeric",+ month: "short",+ timeZone: "UTC",+ year: "numeric",+});++const longDateFormatter = new Intl.DateTimeFormat("en-US", {+ day: "numeric",+ month: "long",+ timeZone: "UTC",+ year: "numeric",+});++const timelineDateFormatter = new Intl.DateTimeFormat("en-US", {+ day: "numeric",+ hour: "numeric",+ minute: "2-digit",+ month: "short",+ timeZone: "UTC",+});++export async function createDraftEnvelope(+ userId: string,+ input: CreateDraftEnvelopeInput,+ { database = getDb() }: CreateDraftEnvelopeOptions = {},+): Promise<DraftEnvelopeResult> {+ const importedPdf = await importPdfDocument({+ body: input.sourcePdf.body,+ contentType: input.sourcePdf.contentType,+ filename: input.sourcePdf.filename,+ });+ const envelopeId = randomUUID();+ const now = Math.floor(Date.now() / 1000);+ const sourcePdfKey = buildEnvelopeOriginalPdfKey({+ envelopeId,+ userId,+ });+ const storageService = createStorageService();++ await storageService.putObject({+ body: input.sourcePdf.body,+ contentType: "application/pdf",+ key: sourcePdfKey,+ });++ try {+ const envelope = envelopeRecordSchema.parse({+ completedAt: null,+ createdAt: now,+ declinedAt: null,+ evidenceKey: null,+ id: envelopeId,+ pageCount: importedPdf.pageCount,+ sentAt: null,+ signedPdfKey: null,+ sourcePdfFilename: importedPdf.filename,+ sourcePdfHash: importedPdf.sourceHash,+ sourcePdfKey,+ sourcePdfSizeBytes: importedPdf.sizeBytes,+ status: "draft",+ title: input.title,+ updatedAt: now,+ userId,+ voidedAt: null,+ });+ const pages = importedPdf.pages.map((page) =>+ envelopePageSchema.parse({+ envelopeId,+ heightPt: page.heightPt,+ id: randomUUID(),+ pageNumber: page.pageNumber,+ widthPt: page.widthPt,+ }),+ );++ await withTransaction(async (tx) => {+ await tx.query(+ `+ INSERT INTO envelopes (+ id,+ user_id,+ title,+ status,+ source_pdf_key,+ source_pdf_filename,+ source_pdf_size_bytes,+ page_count,+ signed_pdf_key,+ evidence_key,+ source_pdf_hash,+ sent_at,+ completed_at,+ declined_at,+ voided_at,+ created_at,+ updated_at+ ) VALUES (+ $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17+ )+ `,+ [+ envelope.id,+ envelope.userId,+ envelope.title,+ envelope.status,+ envelope.sourcePdfKey,+ envelope.sourcePdfFilename,+ envelope.sourcePdfSizeBytes,+ envelope.pageCount,+ envelope.signedPdfKey,+ envelope.evidenceKey,+ envelope.sourcePdfHash,+ envelope.sentAt,+ envelope.completedAt,+ envelope.declinedAt,+ envelope.voidedAt,+ envelope.createdAt,+ envelope.updatedAt,+ ],+ );++ for (const page of pages) {+ await tx.query(+ `+ INSERT INTO envelope_pages (+ id,+ envelope_id,+ page_number,+ width_pt,+ height_pt+ ) VALUES ($1, $2, $3, $4, $5)+ `,+ [+ page.id,+ page.envelopeId,+ page.pageNumber,+ page.widthPt,+ page.heightPt,+ ],+ );+ }++ await recordAuditEvent(+ {+ actorEmail: null,+ actorType: "sender",+ createdAt: now,+ envelopeId,+ event: "created",+ metadata: null,+ },+ tx,+ );+ }, database);++ return {+ envelope,+ pages,+ };+ } catch (error) {+ await storageService.deleteObject(sourcePdfKey).catch(() => undefined);+ throw error;+ }+}++export function buildCreateEnvelopeResponse(+ result: DraftEnvelopeResult,+): CreateEnvelopeResponse {+ return envelopeCreateResponseSchema.parse({+ envelopeId: result.envelope.id,+ pageCount: result.envelope.pageCount,+ redirectPath: `/envelopes/${result.envelope.id}/signers`,+ sourcePdfFilename: result.envelope.sourcePdfFilename,+ sourcePdfSizeBytes: result.envelope.sourcePdfSizeBytes,+ title: result.envelope.title,+ });+}++function mapEnvelopeRow(row: EnvelopeRow): EnvelopeRecord {+ return envelopeRecordSchema.parse(row);+}++function mapSignerRow(row: SignerRow): PersistedSignerRecord {+ return signerRecordSchema.parse(row) as PersistedSignerRecord;+}++function mapEnvelopePageRow(row: EnvelopePageRow): EnvelopePageRecord {+ return envelopePageSchema.parse(row);+}++function mapFieldRow(row: FieldRow): PersistedFieldRecord {+ return fieldRecordSchema.parse({+ checked: row.checked,+ createdAt: row.createdAt,+ envelopeId: row.envelopeId,+ height: row.height,+ id: row.id,+ imageKey: row.imageKey,+ inputMethod: row.inputMethod,+ label: row.label ?? undefined,+ page: row.page,+ required: row.required,+ signerId: row.signerId,+ submittedAt: row.submittedAt,+ type: row.type,+ updatedAt: row.updatedAt,+ value: row.value ?? undefined,+ width: row.width,+ x: row.x,+ y: row.y,+ }) as PersistedFieldRecord;+}++function escapeLike(value: string): string {+ return value+ .replaceAll("\\", "\\\\")+ .replaceAll("%", "\\%")+ .replaceAll("_", "\\_");+}++function buildInClausePlaceholders(length: number, startAt = 1): string {+ return Array.from(+ { length },+ (_, index) => `$${String(index + startAt)}`,+ ).join(", ");+}++function pluralize(count: number, singular: string, plural = `${singular}s`) {+ return `${count} ${count === 1 ? singular : plural}`;+}++function formatShortDate(timestamp: number): string {+ return shortDateFormatter.format(new Date(timestamp * 1000));+}++function formatLongDate(timestamp: number): string {+ return longDateFormatter.format(new Date(timestamp * 1000));+}++function formatTimelineTimestamp(timestamp: number): string {+ return timelineDateFormatter.format(new Date(timestamp * 1000));+}++function formatFileSize(sizeBytes: number): string {+ if (sizeBytes < 1024 * 1024) {+ return `${(sizeBytes / 1024).toFixed(1)} KB`;+ }++ return `${(sizeBytes / (1024 * 1024)).toFixed(1)} MB`;+}++async function getEnvelopeByIdForUser(+ userId: string,+ envelopeId: string,+ database: DbExecutor,+): Promise<EnvelopeRecord | null> {+ const row = await queryOne<EnvelopeRow>(+ database,+ `+ SELECT+ id,+ user_id AS "userId",+ title,+ status,+ source_pdf_key AS "sourcePdfKey",+ source_pdf_filename AS "sourcePdfFilename",+ source_pdf_size_bytes AS "sourcePdfSizeBytes",+ page_count AS "pageCount",+ signed_pdf_key AS "signedPdfKey",+ evidence_key AS "evidenceKey",+ source_pdf_hash AS "sourcePdfHash",+ sent_at AS "sentAt",+ completed_at AS "completedAt",+ declined_at AS "declinedAt",+ voided_at AS "voidedAt",+ created_at AS "createdAt",+ updated_at AS "updatedAt"+ FROM envelopes+ WHERE id = $1 AND user_id = $2+ `,+ [envelopeId, userId],+ );++ return row ? mapEnvelopeRow(row) : null;+}++async function listSignersForEnvelopeIds(+ envelopeIds: readonly string[],+ database: DbExecutor,+): Promise<Map<string, PersistedSignerRecord[]>> {+ if (envelopeIds.length === 0) {+ return new Map();+ }++ const placeholders = buildInClausePlaceholders(envelopeIds.length);+ const rows = await queryMany<SignerRow>(+ database,+ `+ SELECT+ id,+ envelope_id AS "envelopeId",+ name,+ email,+ sign_order AS "signOrder",+ status,+ signing_token_hash AS "signingTokenHash",+ signing_token_expires_at AS "signingTokenExpiresAt",+ turn_started_at AS "turnStartedAt",+ last_notified_at AS "lastNotifiedAt",+ last_nudged_at AS "lastNudgedAt",+ signed_at AS "signedAt",+ declined_at AS "declinedAt",+ decline_reason AS "declineReason",+ created_at AS "createdAt",+ updated_at AS "updatedAt"+ FROM signers+ WHERE envelope_id IN (${placeholders})+ ORDER BY envelope_id ASC, sign_order ASC, id ASC+ `,+ envelopeIds,+ );++ const signersByEnvelope = new Map<string, PersistedSignerRecord[]>();++ for (const row of rows) {+ const signer = mapSignerRow(row);+ const existing = signersByEnvelope.get(signer.envelopeId);++ if (existing) {+ existing.push(signer);+ continue;+ }++ signersByEnvelope.set(signer.envelopeId, [signer]);+ }++ return signersByEnvelope;+}++async function listSignersForEnvelopeId(+ envelopeId: string,+ database: DbExecutor,+): Promise<PersistedSignerRecord[]> {+ return (+ (await listSignersForEnvelopeIds([envelopeId], database)).get(envelopeId) ??+ []+ );+}++async function listEnvelopePagesForEnvelopeId(+ envelopeId: string,+ database: DbExecutor,+): Promise<EnvelopePageRecord[]> {+ const rows = await queryMany<EnvelopePageRow>(+ database,+ `+ SELECT+ id,+ envelope_id AS "envelopeId",+ page_number AS "pageNumber",+ width_pt AS "widthPt",+ height_pt AS "heightPt"+ FROM envelope_pages+ WHERE envelope_id = $1+ ORDER BY page_number ASC, id ASC+ `,+ [envelopeId],+ );++ return rows.map(mapEnvelopePageRow);+}++async function listFieldsForEnvelopeIds(+ envelopeIds: readonly string[],+ database: DbExecutor,+): Promise<Map<string, PersistedFieldRecord[]>> {+ if (envelopeIds.length === 0) {+ return new Map();+ }++ const placeholders = buildInClausePlaceholders(envelopeIds.length);+ const rows = await queryMany<FieldRow>(+ database,+ `+ SELECT+ id,+ envelope_id AS "envelopeId",+ signer_id AS "signerId",+ type,+ page,+ x,+ y,+ width,+ height,+ required,+ label,+ input_method AS "inputMethod",+ value,+ image_key AS "imageKey",+ checked,+ submitted_at AS "submittedAt",+ created_at AS "createdAt",+ updated_at AS "updatedAt"+ FROM fields+ WHERE envelope_id IN (${placeholders})+ ORDER BY envelope_id ASC, page ASC, created_at ASC, id ASC+ `,+ envelopeIds,+ );++ const fieldsByEnvelope = new Map<string, PersistedFieldRecord[]>();++ for (const row of rows) {+ const field = mapFieldRow(row);+ const existing = fieldsByEnvelope.get(field.envelopeId);++ if (existing) {+ existing.push(field);+ continue;+ }++ fieldsByEnvelope.set(field.envelopeId, [field]);+ }++ return fieldsByEnvelope;+}++function buildDashboardContextLine(+ envelope: EnvelopeRecord,+ signers: readonly PersistedSignerRecord[],+ fields: readonly PersistedFieldRecord[],+): string {+ if (envelope.status === "completed") {+ const sentTo = signers.map((signer) => signer.email).join(", ");+ return sentTo.length > 0 ? `Sent to: ${sentTo}` : "Sent to: —";+ }++ if (envelope.status === "sent") {+ const currentSigner =+ signers.find((signer) => signer.status === "notified") ??+ signers.find((signer) => signer.status === "pending");++ return `Waiting on: ${currentSigner?.email ?? "—"}`;+ }++ if (envelope.status === "declined") {+ const declinedSigner = signers.find(+ (signer) => signer.status === "declined",+ );+ return `Declined by: ${declinedSigner?.email ?? "—"}`;+ }++ if (envelope.status === "voided") {+ return `Voided on ${formatShortDate(envelope.voidedAt ?? envelope.updatedAt)}`;+ }++ return `${pluralize(signers.length, "signer")} · ${pluralize(fields.length, "field")} placed`;+}++function buildFieldsBySigner(+ fields: readonly FieldRecord[],+): Map<string, FieldRecord[]> {+ return fields.reduce<Map<string, FieldRecord[]>>((entries, field) => {+ const existing = entries.get(field.signerId);++ if (existing) {+ existing.push(field);+ } else {+ entries.set(field.signerId, [field]);+ }++ return entries;+ }, new Map());+}++function getMissingSignatureSigner(+ signers: readonly PersistedSignerRecord[],+ fieldsBySigner: ReadonlyMap<string, readonly FieldRecord[]>,+): PersistedSignerRecord | undefined {+ return signers.find(+ (signer) =>+ !(fieldsBySigner.get(signer.id) ?? []).some(+ (field) => field.type === "signature",+ ),+ );+}++function buildVoidNotificationEmail(input: {+ envelopeId: string;+ envelopeTitle: string;+ senderName: string;+ signerEmail: string;+ signerName: string;+}) {+ const subject = `"${input.envelopeTitle}" was voided by ${input.senderName}`;+ const textBody = [+ `Hi ${input.signerName},`,+ "",+ `${input.senderName} voided "${input.envelopeTitle}" in SignuDoc.`,+ "The signing process has been canceled. No further action is needed.",+ ].join("\n");+ const htmlBody = [+ `<p>Hi ${escapeHtml(input.signerName)},</p>`,+ `<p>${escapeHtml(input.senderName)} voided “${escapeHtml(input.envelopeTitle)}” in SignuDoc.</p>`,+ "<p>The signing process has been canceled. No further action is needed.</p>",+ ].join("");+ const legalFooter = withUserEmailLegalFooter({+ htmlBody,+ textBody,+ });++ return {+ htmlBody: legalFooter.htmlBody,+ subject,+ template: "void_notification" as const,+ textBody: legalFooter.textBody,+ to: input.signerEmail,+ };+}++function buildTimelineDescription(event: AuditEventRecord): string {+ const signerName =+ typeof event.metadata?.signerName === "string"+ ? event.metadata.signerName+ : null;+ const signerEmail =+ typeof event.metadata?.signerEmail === "string"+ ? event.metadata.signerEmail+ : null;+ const declineReason =+ typeof event.metadata?.reason === "string" &&+ event.metadata.reason.trim().length > 0+ ? event.metadata.reason.trim()+ : null;+ const targetLabel = signerName ?? event.actorEmail ?? signerEmail ?? "signer";++ switch (event.event) {+ case "created":+ return "Envelope created";+ case "sent":+ return `Sent to ${targetLabel}`;+ case "viewed":+ return `Viewed by ${targetLabel}`;+ case "signed":+ return `Signed by ${targetLabel}`;+ case "declined":+ return declineReason+ ? `Declined by ${targetLabel} — ${declineReason}`+ : `Declined by ${targetLabel}`;+ case "reminded_manual":+ return `Manual reminder sent to ${targetLabel}`;+ case "completed":+ return "Final signed PDF and certificate generated";+ case "voided":+ return "Envelope voided by sender";+ default:+ return event.event;+ }+}++function buildDetailSignerStatusLabel(+ envelope: EnvelopeRecord,+ signer: PersistedSignerRecord,+ previousSignerName?: string,+): string | undefined {+ if (signer.status === "signed" && signer.signedAt) {+ return `Signed ${formatShortDate(signer.signedAt)}`;+ }++ if (signer.status === "declined" && signer.declinedAt) {+ return `Declined ${formatShortDate(signer.declinedAt)}`;+ }++ if (signer.status === "notified") {+ const sentAt = signer.lastNotifiedAt ?? signer.turnStartedAt;+ if (envelope.status === "voided") {+ return sentAt+ ? `Notified ${formatShortDate(sentAt)}`+ : "Notified before void";+ }++ return sentAt ? `Sent ${formatShortDate(sentAt)}` : undefined;+ }++ if (envelope.status === "draft") {+ return previousSignerName+ ? `Ready to notify after ${previousSignerName}`+ : "Ready to notify after send";+ }++ return "No notification sent";+}++function buildDetailSignerMetaLabel(+ envelope: EnvelopeRecord,+ signer: PersistedSignerRecord,+ assignedFieldCount: number,+): string {+ if (envelope.status === "voided" && signer.status === "notified") {+ return "Last notified signer before void";+ }++ if (signer.status === "declined" && signer.declineReason) {+ return `Decline reason: ${signer.declineReason}`;+ }++ if (envelope.status === "declined" && signer.status === "pending") {+ return "Skipped after decline";+ }++ if (envelope.status === "voided" && signer.status === "pending") {+ return "Not reached before void";+ }++ if (signer.status === "signed") {+ return `${pluralize(assignedFieldCount, "field")} completed`;+ }++ if (signer.status === "notified") {+ return "Current signer";+ }++ return `${pluralize(assignedFieldCount, "field")} assigned`;+}++export async function listEnvelopesForUser(+ userId: string,+ filters: Partial<EnvelopeListFilters> = {},+ database: DbExecutor = getDb(),+): Promise<DashboardEnvelopeListItem[]> {+ const parsedFilters = envelopeListFiltersSchema.parse(filters);+ const values: unknown[] = [userId];+ const clauses = ["user_id = $1"];+ let nextParamIndex = 2;++ if (parsedFilters.status) {+ clauses.push(`status = $${String(nextParamIndex)}`);+ values.push(parsedFilters.status);+ nextParamIndex += 1;+ }++ if (parsedFilters.search) {+ const searchPlaceholder = `$${String(nextParamIndex)}`;+ clauses.push(+ `(+ lower(title) LIKE ${searchPlaceholder} ESCAPE '\\'+ OR EXISTS (+ SELECT 1+ FROM signers+ WHERE signers.envelope_id = envelopes.id+ AND lower(signers.email) LIKE ${searchPlaceholder} ESCAPE '\\'+ )+ )`,+ );+ values.push(`%${escapeLike(parsedFilters.search.toLowerCase())}%`);+ nextParamIndex += 1;+ }++ const limitPlaceholder = `$${String(nextParamIndex)}`;+ values.push(parsedFilters.limit);+ nextParamIndex += 1;+ const offsetPlaceholder = `$${String(nextParamIndex)}`;+ values.push((parsedFilters.page - 1) * parsedFilters.limit);++ const rows = await queryMany<EnvelopeRow>(+ database,+ `+ SELECT+ id,+ user_id AS "userId",+ title,+ status,+ source_pdf_key AS "sourcePdfKey",+ source_pdf_filename AS "sourcePdfFilename",+ source_pdf_size_bytes AS "sourcePdfSizeBytes",+ page_count AS "pageCount",+ signed_pdf_key AS "signedPdfKey",+ evidence_key AS "evidenceKey",+ source_pdf_hash AS "sourcePdfHash",+ sent_at AS "sentAt",+ completed_at AS "completedAt",+ declined_at AS "declinedAt",+ voided_at AS "voidedAt",+ created_at AS "createdAt",+ updated_at AS "updatedAt"+ FROM envelopes+ WHERE ${clauses.join(" AND ")}+ ORDER BY created_at DESC, id DESC+ LIMIT ${limitPlaceholder} OFFSET ${offsetPlaceholder}+ `,+ values,+ );++ const envelopes = rows.map(mapEnvelopeRow);+ const envelopeIds = envelopes.map((envelope) => envelope.id);+ const [signersByEnvelope, fieldsByEnvelope] = await Promise.all([+ listSignersForEnvelopeIds(envelopeIds, database),+ listFieldsForEnvelopeIds(envelopeIds, database),+ ]);++ return envelopes.map((envelope) => {+ const signers = signersByEnvelope.get(envelope.id) ?? [];+ const fields = fieldsByEnvelope.get(envelope.id) ?? [];++ return {+ contextLine: buildDashboardContextLine(envelope, signers, fields),+ createdAtLabel: formatShortDate(envelope.createdAt),+ id: envelope.id,+ searchableEmails: signers.map((signer) => signer.email),+ status: envelope.status,+ title: envelope.title,+ };+ });+}++export async function getEnvelopeDetailDataForUser(+ userId: string,+ envelopeId: string,+ database: DbExecutor = getDb(),+): Promise<EnvelopeDetailData | null> {+ const envelope = await getEnvelopeByIdForUser(userId, envelopeId, database);++ if (!envelope) {+ return null;+ }++ const [signersByEnvelope, fieldsByEnvelope, auditEvents] = await Promise.all([+ listSignersForEnvelopeIds([envelopeId], database),+ listFieldsForEnvelopeIds([envelopeId], database),+ listAuditEventsForEnvelope(envelopeId, database),+ ]);+ const signers = signersByEnvelope.get(envelopeId) ?? [];+ const fields = fieldsByEnvelope.get(envelopeId) ?? [];+ const fieldCountsBySigner = fields.reduce<Map<string, number>>(+ (counts, field) => {+ if (!shouldCountFieldForSignerSummary(field)) {+ return counts;+ }++ counts.set(field.signerId, (counts.get(field.signerId) ?? 0) + 1);+ return counts;+ },+ new Map(),+ );+ const timeline = auditEvents.map((event) => ({+ description: buildTimelineDescription(event),+ id: event.id,+ timestamp: formatTimelineTimestamp(event.createdAt),+ tone: TIMELINE_TONE_MAP[event.event],+ }));++ const signerViews = signers.map((signer, index) => {+ const previousSignerName = index > 0 ? signers[index - 1]?.name : undefined;+ const signerStatus: EnvelopeDetailSignerView["status"] =+ signer.status === "notified" ? "waiting" : signer.status;++ return {+ email: signer.email,+ id: signer.id,+ metaLabel: buildDetailSignerMetaLabel(+ envelope,+ signer,+ fieldCountsBySigner.get(signer.id) ?? 0,+ ),+ name: signer.name,+ order: signer.signOrder,+ status: signerStatus,+ statusDateLabel: buildDetailSignerStatusLabel(+ envelope,+ signer,+ previousSignerName,+ ),+ };+ });+ const currentSigner = signers.find((signer) => signer.status === "notified");+ let manualReminder: EnvelopeDetailManualReminderState | null = null;++ if (envelope.status === "sent" && currentSigner) {+ const nowUnixTimestamp = Math.floor(Date.now() / 1000);+ const nextAvailableAt =+ typeof currentSigner.lastNudgedAt === "number"+ ? getManualNudgeAvailableAt(currentSigner.lastNudgedAt)+ : null;+ const canSend = isManualNudgeAvailable(+ currentSigner.lastNudgedAt,+ nowUnixTimestamp,+ );++ manualReminder = {+ canSend,+ nextAvailableAtLabel:+ !canSend && typeof nextAvailableAt === "number"+ ? formatReminderAvailableAt(nextAvailableAt)+ : null,+ };+ }++ return {+ createdAtLabel: formatLongDate(envelope.createdAt),+ envelopeId,+ manualReminder,+ signers: signerViews,+ status: envelope.status,+ timeline,+ title: envelope.title,+ };+}++export async function getDraftSignerStepDataForUser(+ userId: string,+ envelopeId: string,+ database: DbExecutor = getDb(),+): Promise<DraftSignerStepData | null> {+ const envelope = await getEnvelopeByIdForUser(userId, envelopeId, database);++ if (!envelope) {+ return null;+ }++ return {+ envelopeId,+ signers: (await listSignersForEnvelopeId(envelopeId, database)).map(+ (signer) => ({+ email: signer.email,+ id: signer.id,+ name: signer.name,+ order: signer.signOrder,+ }),+ ),+ status: envelope.status,+ };+}++export async function getDraftEnvelopeDocumentForUser(+ userId: string,+ envelopeId: string,+ {+ database = getDb(),+ }: {+ database?: DbExecutor;+ } = {},+): Promise<DraftEnvelopeDocument> {+ const envelope = await getEnvelopeByIdForUser(userId, envelopeId, database);++ if (!envelope) {+ throw new EnvelopeDocumentAccessError("Envelope not found.", 404);+ }++ const storageService = createStorageService();++ try {+ const object = await storageService.getObject(envelope.sourcePdfKey);++ return {+ body: object.body,+ contentLength: object.contentLength ?? object.body.length,+ contentType: object.contentType ?? "application/pdf",+ fileName: envelope.sourcePdfFilename,+ };+ } catch (error) {+ if (+ error instanceof Error &&+ (error.name === "NoSuchKey" || error.name === "NotFound")+ ) {+ throw new EnvelopeDocumentAccessError("Source PDF is unavailable.", 404);+ }++ throw error;+ }+}++export async function getPrepareEnvelopeDataForUser(+ userId: string,+ envelopeId: string,+ {+ database = getDb(),+ }: {+ database?: DbExecutor;+ } = {},+): Promise<PrepareEnvelopeData | null> {+ const envelope = await getEnvelopeByIdForUser(userId, envelopeId, database);++ if (!envelope) {+ return null;+ }++ const [fieldsByEnvelope, pages, signers] = await Promise.all([+ listFieldsForEnvelopeIds([envelopeId], database),+ listEnvelopePagesForEnvelopeId(envelopeId, database),+ listSignersForEnvelopeId(envelopeId, database),+ ]);++ return {+ envelopeId,+ fields: fieldsByEnvelope.get(envelopeId) ?? [],+ pageCount: envelope.pageCount,+ pages,+ pdfUrl: `/api/envelopes/${encodeURIComponent(envelopeId)}/document`,+ signers: signers.map((signer) => ({+ email: signer.email,+ id: signer.id,+ name: signer.name,+ order: signer.signOrder,+ })),+ status: envelope.status,+ title: envelope.title,+ };+}++export async function getReviewEnvelopeDataForUser(+ userId: string,+ envelopeId: string,+ database: DbExecutor = getDb(),+): Promise<ReviewEnvelopeData | null> {+ const envelope = await getEnvelopeByIdForUser(userId, envelopeId, database);++ if (!envelope) {+ return null;+ }++ const [signersByEnvelope, fieldsByEnvelope] = await Promise.all([+ listSignersForEnvelopeIds([envelopeId], database),+ listFieldsForEnvelopeIds([envelopeId], database),+ ]);+ const signers = signersByEnvelope.get(envelopeId) ?? [];+ const fields = fieldsByEnvelope.get(envelopeId) ?? [];+ const fieldsBySigner = buildFieldsBySigner(fields);+ const missingSignatureSigner = getMissingSignatureSigner(+ signers,+ fieldsBySigner,+ );+ const isEmpty = signers.length === 0 || fields.length === 0;++ return {+ canSend: !isEmpty && !missingSignatureSigner,+ disabledReason: missingSignatureSigner+ ? `Every signer must have at least one Signature field before sending. ${missingSignatureSigner.name} is missing one.`+ : null,+ envelopeId,+ filename: envelope.sourcePdfFilename,+ isEmpty,+ pageCount: envelope.pageCount,+ signers: signers.map((signer) => ({+ email: signer.email,+ fieldSummaries: (fieldsBySigner.get(signer.id) ?? [])+ .slice()+ .sort(+ (left, right) =>+ FIELD_TYPE_SORT_ORDER[left.type] -+ FIELD_TYPE_SORT_ORDER[right.type],+ )+ .map((field) => FIELD_TYPE_SUMMARY_LABELS[field.type]),+ id: signer.id,+ name: signer.name,+ order: signer.signOrder,+ })),+ sizeLabel: formatFileSize(envelope.sourcePdfSizeBytes),+ status: envelope.status,+ title: envelope.title,+ };+}++export async function sendDraftEnvelope(+ userId: string,+ envelopeId: string,+ input: SendDraftEnvelopeInput,+ { database = getDb() }: SendDraftEnvelopeOptions = {},+): Promise<SendDraftEnvelopeResult> {+ const envelope = await getEnvelopeByIdForUser(userId, envelopeId, database);++ if (!envelope) {+ throw new EnvelopeMutationError("Envelope not found.", 404);+ }++ if (envelope.status !== "draft") {+ throw new EnvelopeMutationError("Only draft envelopes can be sent.", 409);+ }++ const signers = await listSignersForEnvelopeId(envelopeId, database);+ const fields =+ (await listFieldsForEnvelopeIds([envelopeId], database)).get(envelopeId) ??+ [];++ if (signers.length === 0 || fields.length === 0) {+ throw new EnvelopeMutationError(+ "Add signers and place fields before sending this envelope.",+ 400,+ );+ }++ const signerIds = new Set(signers.map((signer) => signer.id));++ if (fields.some((field) => !signerIds.has(field.signerId))) {+ throw new EnvelopeMutationError(+ "Each field must be assigned to an existing signer on this envelope.",+ 400,+ );+ }++ const missingSignatureSigner = getMissingSignatureSigner(+ signers,+ buildFieldsBySigner(fields),+ );++ if (missingSignatureSigner) {+ throw new EnvelopeMutationError(+ `Every signer must have at least one Signature field before sending. ${missingSignatureSigner.name} is missing one.`,+ 400,+ );+ }++ const firstSigner = signers[0];++ if (!firstSigner) {+ throw new EnvelopeMutationError(+ "Add signers before sending this envelope.",+ 400,+ );+ }++ const emailService = createEmailService();+ const storageService = createStorageService();+ const sourcePdfHead = await storageService.headObject(envelope.sourcePdfKey);++ if (!sourcePdfHead.exists) {+ throw new EnvelopeMutationError(+ "The source document for this envelope could not be found.",+ 500,+ );+ }++ const sentAt = Math.floor(Date.now() / 1000);+ const sentAuditAt = Math.max(sentAt, envelope.createdAt + 1);+ const issuedLink = await issueSigningLink({+ issuedAt: sentAt,+ });++ try {+ await withTransaction(async (tx) => {+ const updatedEnvelope = await tx.query(+ `+ UPDATE envelopes+ SET+ status = 'sent',+ sent_at = $1,+ updated_at = $2+ WHERE id = $3+ AND user_id = $4+ AND status = 'draft'+ `,+ [sentAt, sentAt, envelopeId, userId],+ );++ if (updatedEnvelope.rowCount !== 1) {+ throw new EnvelopeMutationError(+ "This envelope has already been sent.",+ 409,+ );+ }++ await tx.query(+ `+ UPDATE signers+ SET+ status = 'pending',+ signing_token_hash = NULL,+ signing_token_expires_at = NULL,+ turn_started_at = NULL,+ last_notified_at = NULL,+ last_nudged_at = NULL,+ signed_at = NULL,+ declined_at = NULL,+ decline_reason = NULL,+ updated_at = $1+ WHERE envelope_id = $2+ `,+ [sentAt, envelopeId],+ );++ const updatedSigner = await tx.query(+ `+ UPDATE signers+ SET+ status = 'notified',+ signing_token_hash = $1,+ signing_token_expires_at = $2,+ turn_started_at = $3,+ last_notified_at = $4,+ updated_at = $5+ WHERE id = $6+ AND envelope_id = $7+ `,+ [+ issuedLink.tokenHash,+ issuedLink.exp,+ sentAt,+ sentAt,+ sentAt,+ firstSigner.id,+ envelopeId,+ ],+ );++ if (updatedSigner.rowCount !== 1) {+ throw new EnvelopeMutationError(+ "Unable to activate the first signer for this envelope.",+ 500,+ );+ }++ await recordAuditEvent(+ {+ actorEmail: input.senderEmail,+ actorType: "sender",+ createdAt: sentAuditAt,+ envelopeId,+ event: "sent",+ ipAddress: input.ipAddress ?? null,+ metadata: {+ signerEmail: firstSigner.email,+ signerId: firstSigner.id,+ signerName: firstSigner.name,+ },+ userAgent: input.userAgent ?? null,+ },+ tx,+ );+ }, database);+ } catch (error) {+ throw error;+ }++ try {+ await emailService.send(+ buildSigningInvitationEmail({+ envelopeTitle: envelope.title,+ senderName: input.senderName,+ signerEmail: firstSigner.email,+ signerName: firstSigner.name,+ signingUrl: issuedLink.url,+ }),+ );+ } catch (error) {+ await withTransaction(async (tx) => {+ await tx.query(+ `+ UPDATE envelopes+ SET+ status = 'draft',+ sent_at = NULL,+ updated_at = $1+ WHERE id = $2+ AND user_id = $3+ AND status = 'sent'+ `,+ [envelope.updatedAt, envelopeId, userId],+ );++ await tx.query(+ `+ UPDATE signers+ SET+ status = 'pending',+ signing_token_hash = NULL,+ signing_token_expires_at = NULL,+ turn_started_at = NULL,+ last_notified_at = NULL,+ last_nudged_at = NULL,+ signed_at = NULL,+ declined_at = NULL,+ decline_reason = NULL,+ updated_at = $1+ WHERE envelope_id = $2+ `,+ [envelope.updatedAt, envelopeId],+ );++ await tx.query(+ `+ DELETE FROM audit_events+ WHERE envelope_id = $1+ AND event = 'sent'+ AND created_at = $2+ AND actor_email = $3+ `,+ [envelopeId, sentAuditAt, input.senderEmail],+ );+ }, database).catch((rollbackError) => {+ console.error(+ `Failed to roll back sent envelope ${envelopeId} after email delivery failure:`,+ rollbackError,+ );+ });++ throw error;+ }++ return sendEnvelopeResponseSchema.parse({+ envelopeId,+ notifiedSignerName: firstSigner.name,+ redirectPath: `/envelopes/${envelopeId}`,+ sentAt,+ });+}++export async function voidSentEnvelope(+ userId: string,+ envelopeId: string,+ input: VoidEnvelopeInput,+ { database = getDb() }: VoidEnvelopeOptions = {},+): Promise<VoidEnvelopeResult> {+ const envelope = await getEnvelopeByIdForUser(userId, envelopeId, database);++ if (!envelope) {+ throw new EnvelopeMutationError("Envelope not found.", 404);+ }++ if (envelope.status !== "sent") {+ throw new EnvelopeMutationError("Only sent envelopes can be voided.", 409);+ }++ const signers = await listSignersForEnvelopeId(envelopeId, database);+ const notifiedSigners = signers.filter(+ (signer) => signer.status === "notified",+ );+ const currentSigner = notifiedSigners[0];+ const voidedAt = Math.floor(Date.now() / 1000);+ const emailService = createEmailService();+ const storageService = createStorageService();+ const sourcePdfHead = await storageService.headObject(envelope.sourcePdfKey);++ if (!sourcePdfHead.exists) {+ throw new EnvelopeMutationError(+ "The source document for this envelope could not be found.",+ 500,+ );+ }++ const voidedAuditEvent: AuditEventRecord = {+ actorEmail: input.senderEmail,+ actorType: "sender",+ createdAt: voidedAt,+ envelopeId,+ event: "voided",+ id: randomUUID(),+ ipAddress: input.ipAddress ?? null,+ metadata: currentSigner+ ? {+ signerEmail: currentSigner.email,+ signerId: currentSigner.id,+ signerName: currentSigner.name,+ signerOrder: currentSigner.signOrder,+ }+ : null,+ userAgent: input.userAgent ?? null,+ };+ const storageIdentity = {+ envelopeId,+ userId,+ };+ const canonicalCertificate = {+ bucketName: sourcePdfHead.bucketName,+ key: buildEnvelopeCertificateKey({+ ...storageIdentity,+ audience: "internal",+ }),+ };+ const voidedEnvelope = envelopeRecordSchema.parse({+ ...envelope,+ evidenceKey: canonicalCertificate.key,+ status: "voided",+ updatedAt: voidedAt,+ voidedAt,+ });+ const voidedSigners = signers.map((signer) =>+ signer.status === "notified"+ ? signerRecordSchema.parse({+ ...signer,+ signingTokenExpiresAt: null,+ signingTokenHash: null,+ updatedAt: voidedAt,+ })+ : signer,+ );+ const auditEvents = [+ ...(await listAuditEventsForEnvelope(envelopeId, database)),+ voidedAuditEvent,+ ];+ const storedCertificateKeys: string[] = [];+ let certificate: { key: string };++ try {+ certificate = await storeEnvelopeCertificatePdf(+ {+ auditEvents,+ certificate: canonicalCertificate,+ envelope: voidedEnvelope,+ signers: voidedSigners,+ },+ {+ storageService,+ },+ );+ storedCertificateKeys.push(certificate.key);++ const recipientCertificate = await storeRecipientEnvelopeCertificatePdf(+ {+ auditEvents,+ certificate: {+ bucketName: sourcePdfHead.bucketName,+ key: buildEnvelopeCertificateKey({+ ...storageIdentity,+ audience: "recipient",+ }),+ },+ envelope: voidedEnvelope,+ signers: voidedSigners,+ },+ {+ storageService,+ },+ );+ storedCertificateKeys.push(recipientCertificate.key);+ } catch (error) {+ await Promise.all(+ storedCertificateKeys.map((key) =>+ storageService.deleteObject(key).catch(() => undefined),+ ),+ );+ throw error;+ }++ try {+ await withTransaction(async (tx) => {+ const persistedEnvelope = await getEnvelopeByIdForUser(+ userId,+ envelopeId,+ tx,+ );++ if (!persistedEnvelope) {+ throw new EnvelopeMutationError("Envelope not found.", 404);+ }++ if (persistedEnvelope.status !== "sent") {+ throw new EnvelopeMutationError(+ "Only sent envelopes can be voided.",+ 409,+ );+ }++ const updatedEnvelope = await tx.query(+ `+ UPDATE envelopes+ SET+ status = 'voided',+ evidence_key = $1,+ voided_at = $2,+ updated_at = $3+ WHERE id = $4+ AND user_id = $5+ AND status = 'sent'+ `,+ [certificate.key, voidedAt, voidedAt, envelopeId, userId],+ );++ if (updatedEnvelope.rowCount !== 1) {+ throw new EnvelopeMutationError(+ "This envelope can no longer be voided.",+ 409,+ );+ }++ await tx.query(+ `+ UPDATE signers+ SET+ signing_token_hash = NULL,+ signing_token_expires_at = NULL,+ updated_at = $1+ WHERE envelope_id = $2+ AND status = 'notified'+ `,+ [voidedAt, envelopeId],+ );++ await recordAuditEvent(+ {+ actorEmail: voidedAuditEvent.actorEmail,+ actorType: voidedAuditEvent.actorType,+ createdAt: voidedAuditEvent.createdAt,+ envelopeId: voidedAuditEvent.envelopeId,+ event: voidedAuditEvent.event,+ ipAddress: voidedAuditEvent.ipAddress,+ metadata: voidedAuditEvent.metadata,+ userAgent: voidedAuditEvent.userAgent,+ },+ tx,+ );+ }, database);+ } catch (error) {+ await Promise.all(+ storedCertificateKeys.map((key) =>+ storageService.deleteObject(key).catch(() => undefined),+ ),+ );+ throw error;+ }++ await Promise.all(+ notifiedSigners.map(async (signer) => {+ try {+ await emailService.send(+ buildVoidNotificationEmail({+ envelopeId,+ envelopeTitle: envelope.title,+ senderName: input.senderName,+ signerEmail: signer.email,+ signerName: signer.name,+ }),+ );+ } catch (error) {+ console.error(+ `Failed to send void notification for envelope ${envelopeId} to ${signer.email}:`,+ error,+ );+ }+ }),+ );++ return voidEnvelopeResponseSchema.parse({+ envelopeId,+ redirectPath: `/envelopes/${envelopeId}`,+ voidedAt,+ });+}++export async function replaceDraftEnvelopeFields(+ userId: string,+ envelopeId: string,+ input: unknown,+ database: DbPool = getDb(),+): Promise<ReplaceDraftFieldsResult> {+ const parsedInput = replaceFieldsSchema.parse(input);+ const envelope = await getEnvelopeByIdForUser(userId, envelopeId, database);++ if (!envelope) {+ throw new EnvelopeMutationError("Envelope not found.", 404);+ }++ if (envelope.status !== "draft") {+ throw new EnvelopeMutationError(+ "Only draft envelopes can be updated.",+ 409,+ );+ }++ const [signers, pages, existingFieldsByEnvelope] = await Promise.all([+ listSignersForEnvelopeId(envelopeId, database),+ listEnvelopePagesForEnvelopeId(envelopeId, database),+ listFieldsForEnvelopeIds([envelopeId], database),+ ]);+ const signerIds = new Set(signers.map((signer) => signer.id));+ const pageNumbers = new Set(pages.map((page) => page.pageNumber));+ const existingFields = existingFieldsByEnvelope.get(envelopeId) ?? [];+ const existingFieldMetadata = new Map(+ existingFields.map((field) => [field.id, field.createdAt] as const),+ );+ const usedFieldIds = new Set<string>();+ const updatedAt = Math.floor(Date.now() / 1000);+ const nextFields = parsedInput.fields.map((field, index) => {+ const parsedField = fieldPlacementSchema.parse(field);++ if (!signerIds.has(parsedField.signerId)) {+ throw new EnvelopeMutationError(+ "Each field must be assigned to an existing signer on this envelope.",+ 400,+ );+ }++ if (!pageNumbers.has(parsedField.page)) {+ throw new EnvelopeMutationError(+ "Each field must be placed on an existing page in this document.",+ 400,+ );+ }++ const fieldId = parsedField.id ?? randomUUID();++ if (usedFieldIds.has(fieldId)) {+ throw new EnvelopeMutationError("Each field must be unique.", 400);+ }++ usedFieldIds.add(fieldId);++ return {+ ...parsedField,+ createdAt: existingFieldMetadata.get(fieldId) ?? updatedAt + index,+ id: fieldId,+ updatedAt,+ };+ });++ await withTransaction(async (tx) => {+ await tx.query(+ `+ DELETE FROM fields+ WHERE envelope_id = $1+ `,+ [envelopeId],+ );++ for (const field of nextFields) {+ await tx.query(+ `+ INSERT INTO fields (+ id,+ envelope_id,+ signer_id,+ type,+ page,+ x,+ y,+ width,+ height,+ required,+ label,+ input_method,+ value,+ image_key,+ checked,+ submitted_at,+ created_at,+ updated_at+ ) VALUES (+ $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, NULL, NULL, NULL, NULL, NULL, $12, $13+ )+ `,+ [+ field.id,+ envelopeId,+ field.signerId,+ field.type,+ field.page,+ field.x,+ field.y,+ field.width,+ field.height,+ field.required,+ field.label ?? null,+ field.createdAt,+ field.updatedAt,+ ],+ );+ }++ await tx.query(+ `+ UPDATE envelopes+ SET updated_at = $1+ WHERE id = $2 AND user_id = $3+ `,+ [updatedAt, envelopeId, userId],+ );+ }, database);++ return replaceFieldsResponseSchema.parse({+ envelopeId,+ fields:+ (await listFieldsForEnvelopeIds([envelopeId], database)).get(+ envelopeId,+ ) ?? [],+ redirectPath: `/envelopes/${envelopeId}/review`,+ updatedAt,+ }) as ReplaceDraftFieldsResult;+}++export async function replaceDraftEnvelopeSigners(+ userId: string,+ envelopeId: string,+ input: unknown,+ database: DbPool = getDb(),+): Promise<ReplaceDraftSignersResult> {+ const parsedInput = replaceSignersSchema.parse(input);+ const envelope = await getEnvelopeByIdForUser(userId, envelopeId, database);++ if (!envelope) {+ throw new EnvelopeMutationError("Envelope not found.", 404);+ }++ if (envelope.status !== "draft") {+ throw new EnvelopeMutationError(+ "Only draft envelopes can be updated.",+ 409,+ );+ }++ const existingSigners = await listSignersForEnvelopeId(envelopeId, database);+ const existingSignerIds = new Set(existingSigners.map((signer) => signer.id));+ const usedSignerIds = new Set<string>();+ const updatedAt = Math.floor(Date.now() / 1000);+ const nextSigners = parsedInput.signers.map((signer, index) => {+ const persistedSignerId =+ signer.id && existingSignerIds.has(signer.id) ? signer.id : randomUUID();++ if (usedSignerIds.has(persistedSignerId)) {+ throw new EnvelopeMutationError("Each signer must be unique.", 400);+ }++ usedSignerIds.add(persistedSignerId);++ return {+ email: signer.email,+ id: persistedSignerId,+ name: signer.name,+ signOrder: index + 1,+ };+ });++ await withTransaction(async (tx) => {+ if (existingSigners.length > 0) {+ await tx.query(+ `+ UPDATE signers+ SET+ email = id || '@temp.invalid',+ sign_order = sign_order + 1000,+ updated_at = $1+ WHERE envelope_id = $2+ `,+ [updatedAt, envelopeId],+ );+ }++ for (const signer of nextSigners) {+ if (existingSignerIds.has(signer.id)) {+ await tx.query(+ `+ UPDATE signers+ SET+ name = $1,+ email = $2,+ sign_order = $3,+ updated_at = $4+ WHERE id = $5 AND envelope_id = $6+ `,+ [+ signer.name,+ signer.email,+ signer.signOrder,+ updatedAt,+ signer.id,+ envelopeId,+ ],+ );+ } else {+ await tx.query(+ `+ INSERT INTO signers (+ id,+ envelope_id,+ name,+ email,+ sign_order,+ status,+ signing_token_hash,+ signing_token_expires_at,+ turn_started_at,+ last_notified_at,+ last_nudged_at,+ signed_at,+ declined_at,+ decline_reason,+ created_at,+ updated_at+ ) VALUES (+ $1, $2, $3, $4, $5, 'pending', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, $6, $7+ )+ `,+ [+ signer.id,+ envelopeId,+ signer.name,+ signer.email,+ signer.signOrder,+ updatedAt,+ updatedAt,+ ],+ );+ }+ }++ await tx.query(+ `+ DELETE FROM signers+ WHERE envelope_id = $1+ AND id NOT IN (${buildInClausePlaceholders(nextSigners.length, 2)})+ `,+ [envelopeId, ...nextSigners.map((signer) => signer.id)],+ );++ await tx.query(+ `+ UPDATE envelopes+ SET updated_at = $1+ WHERE id = $2 AND user_id = $3+ `,+ [updatedAt, envelopeId, userId],+ );+ }, database);++ return replaceSignersResponseSchema.parse({+ envelopeId,+ redirectPath: `/envelopes/${envelopeId}/prepare`,+ signers: (await listSignersForEnvelopeId(envelopeId, database)).map(+ (signer) => ({+ email: signer.email,+ id: signer.id,+ name: signer.name,+ signOrder: signer.signOrder,+ }),+ ),+ updatedAt,+ }) as ReplaceDraftSignersResult;+}++export async function deleteDraftEnvelope(+ userId: string,+ envelopeId: string,+ {+ database = getDb(),+ }: {+ database?: DbExecutor;+ } = {},+): Promise<EnvelopeRecord> {+ const envelope = await getEnvelopeByIdForUser(userId, envelopeId, database);++ if (!envelope) {+ throw new EnvelopeMutationError("Envelope not found.", 404);+ }++ if (envelope.status !== "draft") {+ throw new EnvelopeMutationError(+ "Only draft envelopes can be deleted.",+ 409,+ );+ }++ const storageService = createStorageService();+ const deleteResult = await database.query(+ `+ DELETE FROM envelopes+ WHERE id = $1 AND user_id = $2 AND status = 'draft'+ `,+ [envelopeId, userId],+ );++ if (deleteResult.rowCount !== 1) {+ throw new EnvelopeMutationError(+ "This draft envelope can no longer be deleted.",+ 409,+ );+ }++ await storageService.deleteObject(envelope.sourcePdfKey).catch((error) => {+ console.error(+ `Failed to delete source PDF for draft envelope ${envelopeId}:`,+ error,+ );+ });++ return envelope;+}diff --git a/src/lib/hooks/use-mobile.ts b/src/lib/hooks/use-mobile.tsnew file mode 100644index 0000000..a93d583--- /dev/null+++ b/src/lib/hooks/use-mobile.ts@@ -0,0 +1,21 @@+import * as React from "react";++const MOBILE_BREAKPOINT = 768;++export function useIsMobile() {+ const [isMobile, setIsMobile] = React.useState<boolean | undefined>(+ undefined,+ );++ React.useEffect(() => {+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);+ const onChange = () => {+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);+ };+ mql.addEventListener("change", onChange);+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);+ return () => mql.removeEventListener("change", onChange);+ }, []);++ return !!isMobile;+}diff --git a/src/lib/legal.ts b/src/lib/legal.tsnew file mode 100644index 0000000..4da9513--- /dev/null+++ b/src/lib/legal.ts@@ -0,0 +1,30 @@+export const PUBLIC_COPYRIGHT_YEAR = 2026;++export const publicLegalLinks = [+ {+ href: "/terms",+ longLabel: "Terms of Service",+ shortLabel: "Terms",+ },+ {+ href: "/privacy",+ longLabel: "Privacy Policy",+ shortLabel: "Privacy",+ },+ {+ href: "/contact",+ longLabel: "Contact",+ shortLabel: "Contact",+ },+] as const;++export const publicFooterLinks = [+ publicLegalLinks[0],+ publicLegalLinks[1],+ {+ href: "/accessibility",+ longLabel: "Accessibility Statement",+ shortLabel: "Accessibility",+ },+ publicLegalLinks[2],+] as const;diff --git a/src/lib/pdfjs-client.ts b/src/lib/pdfjs-client.tsnew file mode 100644index 0000000..4d7535c--- /dev/null+++ b/src/lib/pdfjs-client.ts@@ -0,0 +1,95 @@+type PdfJsModule = typeof import("pdfjs-dist/legacy/build/pdf.mjs");+type PdfDocumentProxy = Awaited<+ ReturnType<PdfJsModule["getDocument"]>["promise"]+>;+type PdfPageProxy = Awaited<ReturnType<PdfDocumentProxy["getPage"]>>;+type PdfRenderTask = ReturnType<PdfPageProxy["render"]>;++const PDF_JS_ASSET_BASE = "/pdfjs/5.5.207";+export const PDF_JS_STANDARD_FONT_DATA_URL =+ `${PDF_JS_ASSET_BASE}/standard_fonts/`;+export const PDF_JS_WORKER_SRC =+ `${PDF_JS_ASSET_BASE}/legacy/build/pdf.worker.min.mjs`;++let pdfJsModulePromise: Promise<PdfJsModule> | null = null;++function createRenderContext(width: number, height: number) {+ if (typeof OffscreenCanvas !== "undefined") {+ const canvas = new OffscreenCanvas(width, height);+ const context = canvas.getContext("2d");++ if (!context) {+ throw new Error("Unable to create an offscreen PDF preview context.");+ }++ return context;+ }++ if (typeof document === "undefined") {+ throw new Error("Unable to create a PDF preview context.");+ }++ const canvas = document.createElement("canvas");+ canvas.width = width;+ canvas.height = height;++ const context = canvas.getContext("2d");++ if (!context) {+ throw new Error("Unable to create a PDF preview context.");+ }++ return context;+}++export async function loadPdfJsModule(): Promise<PdfJsModule> {+ pdfJsModulePromise ??= import("pdfjs-dist/legacy/build/pdf.mjs").then((pdfjs) => {+ pdfjs.GlobalWorkerOptions.workerSrc = PDF_JS_WORKER_SRC;++ return pdfjs;+ });++ return pdfJsModulePromise;+}++export async function assertPdfPreviewRenderable(+ file: File | Uint8Array,+): Promise<void> {+ const pdfBytes =+ file instanceof Uint8Array ? file.slice() : new Uint8Array(await file.arrayBuffer());+ const pdfjs = await loadPdfJsModule();+ let loadingTask: ReturnType<PdfJsModule["getDocument"]> | null = null;+ let documentProxy: PdfDocumentProxy | null = null;+ let page: PdfPageProxy | null = null;+ let renderTask: PdfRenderTask | null = null;++ try {+ loadingTask = pdfjs.getDocument({+ data: pdfBytes,+ standardFontDataUrl: PDF_JS_STANDARD_FONT_DATA_URL,+ });+ documentProxy = await loadingTask.promise;+ page = await documentProxy.getPage(1);++ const viewport = page.getViewport({ scale: 1 });+ const renderContext = createRenderContext(+ Math.max(1, Math.ceil(viewport.width)),+ Math.max(1, Math.ceil(viewport.height)),+ );++ renderTask = page.render({+ canvasContext: renderContext as CanvasRenderingContext2D,+ viewport,+ });++ await renderTask.promise;+ } finally {+ renderTask?.cancel();+ page?.cleanup();+ loadingTask?.destroy();++ if (documentProxy) {+ await documentProxy.destroy();+ }+ }+}diff --git a/src/lib/public-contact.ts b/src/lib/public-contact.tsnew file mode 100644index 0000000..f2f6aed--- /dev/null+++ b/src/lib/public-contact.ts@@ -0,0 +1,12 @@+import { getEnv, type EnvSource } from "./utils/env";+import { ServiceConfigurationError } from "./services/service-config.ts";++export function resolvePublicSupportAddress(env: EnvSource = process.env) {+ const supportAddress = getEnv(env).email.supportAddress;++ if (supportAddress) {+ return supportAddress;+ }++ throw new ServiceConfigurationError("email", ["SUPPORT_EMAIL"]);+}diff --git a/src/lib/reminders.ts b/src/lib/reminders.tsnew file mode 100644index 0000000..a38914b--- /dev/null+++ b/src/lib/reminders.ts@@ -0,0 +1,451 @@+import {+ type DbExecutor,+ type DbPool,+ getDb,+ queryOne,+ withTransaction,+} from "./db/connection.ts";+import {+ manualNudgeResponseSchema,+ type EnvelopeRecord,+} from "./schemas/envelope.ts";+import { type SignerRecord } from "./schemas/signer.ts";+import { recordAuditEvent } from "./services/audit.ts";+import { createEmailService } from "./services/email.ts";+import { withUserEmailLegalFooter } from "./services/email-legal-footer.ts";+import {+ formatReminderAvailableAt,+ getManualNudgeAvailableAt,+} from "./services/reminders.ts";+import {+ issueSigningLink,+ type IssuedSigningLink,+} from "./services/signing-links.ts";+import { escapeHtml } from "./utils/html.ts";++type ReminderEnvelopeRow = {+ id: string;+ status: EnvelopeRecord["status"];+ title: string;+ updatedAt: number;+ userId: string;+};++type ReminderSignerRow = {+ email: string;+ envelopeId: string;+ id: string;+ lastNotifiedAt: number | null;+ lastNudgedAt: number | null;+ name: string;+ signOrder: number;+ signingTokenExpiresAt: number | null;+ signingTokenHash: string | null;+ status: SignerRecord["status"];+ updatedAt: number;+};++type ManualNudgeInput = {+ ipAddress?: string | null;+ senderEmail: string;+ senderName: string;+ userAgent?: string | null;+};++type PersistedManualNudge = {+ envelopeId: string;+ envelopeTitle: string;+ issuedLink: IssuedSigningLink;+ nextAvailableAt: number;+ previousEnvelopeUpdatedAt: number;+ previousSigner: Pick<+ ReminderSignerRow,+ | "id"+ | "lastNotifiedAt"+ | "lastNudgedAt"+ | "signingTokenExpiresAt"+ | "signingTokenHash"+ | "updatedAt"+ >;+ signerEmail: string;+ signerId: string;+ signerName: string;+ senderName: string;+};++type SendManualEnvelopeNudgeOptions = {+ database?: DbPool;+ nowUnixTimestamp?: number;+};++export class ReminderMutationError extends Error {+ readonly nextAvailableAt: number | null;+ readonly nextAvailableAtLabel: string | null;+ readonly statusCode: number;++ constructor(+ message: string,+ statusCode: number,+ {+ nextAvailableAt = null,+ nextAvailableAtLabel = null,+ }: {+ nextAvailableAt?: number | null;+ nextAvailableAtLabel?: string | null;+ } = {},+ ) {+ super(message);+ this.name = "ReminderMutationError";+ this.nextAvailableAt = nextAvailableAt;+ this.nextAvailableAtLabel = nextAvailableAtLabel;+ this.statusCode = statusCode;+ }+}++async function getEnvelopeByIdForUser(+ envelopeId: string,+ userId: string,+ database: DbExecutor,+): Promise<ReminderEnvelopeRow | null> {+ return queryOne<ReminderEnvelopeRow>(+ database,+ `+ SELECT+ id,+ user_id AS "userId",+ title,+ status,+ updated_at AS "updatedAt"+ FROM envelopes+ WHERE id = $1+ AND user_id = $2+ `,+ [envelopeId, userId],+ );+}++async function getCurrentSignerForEnvelope(+ envelopeId: string,+ database: DbExecutor,+): Promise<ReminderSignerRow | null> {+ return queryOne<ReminderSignerRow>(+ database,+ `+ SELECT+ id,+ envelope_id AS "envelopeId",+ name,+ email,+ sign_order AS "signOrder",+ status,+ signing_token_hash AS "signingTokenHash",+ signing_token_expires_at AS "signingTokenExpiresAt",+ last_notified_at AS "lastNotifiedAt",+ last_nudged_at AS "lastNudgedAt",+ updated_at AS "updatedAt"+ FROM signers+ WHERE envelope_id = $1+ AND status = 'notified'+ ORDER BY sign_order ASC, id ASC+ LIMIT 1+ `,+ [envelopeId],+ );+}++function buildReminderEmail(input: {+ envelopeId: string;+ envelopeTitle: string;+ senderName: string;+ signerEmail: string;+ signerName: string;+ signingUrl: string;+}) {+ const subject = `${input.senderName} sent you a reminder to sign "${input.envelopeTitle}"`;+ const introLine = `${input.senderName} sent you a reminder to sign "${input.envelopeTitle}" through SignuDoc.`;+ const textBody = [+ `Hi ${input.signerName},`,+ "",+ introLine,+ "",+ "Review and sign the document here:",+ input.signingUrl,+ "",+ "You do not need a SignuDoc account to sign.",+ "If you receive a newer invitation or reminder link, use the newest one.",+ ].join("\n");+ const htmlBody = [+ `<p>Hi ${escapeHtml(input.signerName)},</p>`,+ `<p>${escapeHtml(introLine)}</p>`,+ `<p><a href="${escapeHtml(input.signingUrl)}">Review and sign the document</a></p>`,+ "<p>You do not need a SignuDoc account to sign.</p>",+ "<p>If you receive a newer invitation or reminder link, use the newest one.</p>",+ ].join("");+ const legalFooter = withUserEmailLegalFooter({+ htmlBody,+ textBody,+ });++ return {+ htmlBody: legalFooter.htmlBody,+ subject,+ template: "manual_nudge" as const,+ textBody: legalFooter.textBody,+ to: input.signerEmail,+ };+}++async function persistManualNudge(+ userId: string,+ envelopeId: string,+ input: ManualNudgeInput,+ dispatchedAt: number,+ database: DbPool,+): Promise<PersistedManualNudge> {+ const envelope = await getEnvelopeByIdForUser(envelopeId, userId, database);++ if (!envelope) {+ throw new ReminderMutationError("This envelope is unavailable.", 404);+ }++ if (envelope.status !== "sent") {+ throw new ReminderMutationError(+ "Only sent envelopes can receive reminders.",+ 409,+ );+ }++ const signer = await getCurrentSignerForEnvelope(envelopeId, database);++ if (!signer) {+ throw new ReminderMutationError(+ "This envelope is no longer waiting on a signer.",+ 409,+ );+ }++ const issuedLink = await issueSigningLink({+ issuedAt: dispatchedAt,+ });+ return withTransaction(async (tx) => {+ const persistedEnvelope = await getEnvelopeByIdForUser(+ envelopeId,+ userId,+ tx,+ );++ if (!persistedEnvelope) {+ throw new ReminderMutationError("This envelope is unavailable.", 404);+ }++ if (persistedEnvelope.status !== "sent") {+ throw new ReminderMutationError(+ "Only sent envelopes can receive reminders.",+ 409,+ );+ }++ const persistedSigner = await getCurrentSignerForEnvelope(envelopeId, tx);++ if (!persistedSigner) {+ throw new ReminderMutationError(+ "This envelope is no longer waiting on a signer.",+ 409,+ );+ }++ if (typeof persistedSigner.lastNudgedAt === "number") {+ const nextAvailableAt = getManualNudgeAvailableAt(+ persistedSigner.lastNudgedAt,+ );++ if (nextAvailableAt > dispatchedAt) {+ throw new ReminderMutationError(+ `You can send another reminder after ${formatReminderAvailableAt(nextAvailableAt)}.`,+ 429,+ {+ nextAvailableAt,+ nextAvailableAtLabel: formatReminderAvailableAt(nextAvailableAt),+ },+ );+ }+ }++ await tx.query(+ `+ UPDATE envelopes+ SET updated_at = $1+ WHERE id = $2+ AND user_id = $3+ AND status = 'sent'+ `,+ [dispatchedAt, envelopeId, userId],+ );++ const signerUpdate = await tx.query(+ `+ UPDATE signers+ SET+ signing_token_hash = $1,+ signing_token_expires_at = $2,+ last_notified_at = $3,+ last_nudged_at = $4,+ updated_at = $5+ WHERE id = $6+ AND envelope_id = $7+ AND status = 'notified'+ `,+ [+ issuedLink.tokenHash,+ issuedLink.exp,+ dispatchedAt,+ dispatchedAt,+ dispatchedAt,+ persistedSigner.id,+ envelopeId,+ ],+ );++ if (signerUpdate.rowCount !== 1) {+ throw new ReminderMutationError(+ "This envelope is no longer waiting on a signer.",+ 409,+ );+ }++ await recordAuditEvent(+ {+ actorEmail: input.senderEmail,+ actorType: "sender",+ createdAt: dispatchedAt,+ envelopeId,+ event: "reminded_manual",+ ipAddress: input.ipAddress ?? null,+ metadata: {+ signerEmail: persistedSigner.email,+ signerId: persistedSigner.id,+ signerName: persistedSigner.name,+ signerOrder: persistedSigner.signOrder,+ },+ userAgent: input.userAgent ?? null,+ },+ tx,+ );++ return {+ envelopeId,+ envelopeTitle: persistedEnvelope.title,+ issuedLink,+ nextAvailableAt: getManualNudgeAvailableAt(dispatchedAt),+ previousEnvelopeUpdatedAt: persistedEnvelope.updatedAt,+ previousSigner: {+ id: persistedSigner.id,+ lastNotifiedAt: persistedSigner.lastNotifiedAt,+ lastNudgedAt: persistedSigner.lastNudgedAt,+ signingTokenExpiresAt: persistedSigner.signingTokenExpiresAt,+ signingTokenHash: persistedSigner.signingTokenHash,+ updatedAt: persistedSigner.updatedAt,+ },+ senderName: input.senderName,+ signerEmail: persistedSigner.email,+ signerId: persistedSigner.id,+ signerName: persistedSigner.name,+ };+ }, database);+}++export async function sendManualEnvelopeNudge(+ userId: string,+ envelopeId: string,+ input: ManualNudgeInput,+ {+ database = getDb(),+ nowUnixTimestamp = Math.floor(Date.now() / 1000),+ }: SendManualEnvelopeNudgeOptions = {},+) {+ const persisted = await persistManualNudge(+ userId,+ envelopeId,+ input,+ nowUnixTimestamp,+ database,+ );+ const emailService = createEmailService();++ try {+ await emailService.send(+ buildReminderEmail({+ envelopeId: persisted.envelopeId,+ envelopeTitle: persisted.envelopeTitle,+ senderName: persisted.senderName,+ signerEmail: persisted.signerEmail,+ signerName: persisted.signerName,+ signingUrl: persisted.issuedLink.url,+ }),+ );+ } catch (error) {+ await withTransaction(async (tx) => {+ await tx.query(+ `+ UPDATE envelopes+ SET updated_at = $1+ WHERE id = $2+ AND user_id = $3+ AND status = 'sent'+ `,+ [persisted.previousEnvelopeUpdatedAt, persisted.envelopeId, userId],+ );++ await tx.query(+ `+ UPDATE signers+ SET+ signing_token_hash = $1,+ signing_token_expires_at = $2,+ last_notified_at = $3,+ last_nudged_at = $4,+ updated_at = $5+ WHERE id = $6+ AND envelope_id = $7+ AND status = 'notified'+ `,+ [+ persisted.previousSigner.signingTokenHash,+ persisted.previousSigner.signingTokenExpiresAt,+ persisted.previousSigner.lastNotifiedAt,+ persisted.previousSigner.lastNudgedAt,+ persisted.previousSigner.updatedAt,+ persisted.previousSigner.id,+ persisted.envelopeId,+ ],+ );++ await tx.query(+ `+ DELETE FROM audit_events+ WHERE envelope_id = $1+ AND event = 'reminded_manual'+ AND created_at = $2+ AND actor_email = $3+ `,+ [persisted.envelopeId, nowUnixTimestamp, input.senderEmail],+ );+ }, database).catch((rollbackError) => {+ console.error(+ `Failed to roll back manual reminder for envelope ${persisted.envelopeId} after email delivery failure:`,+ rollbackError,+ );+ });++ throw error;+ }++ return manualNudgeResponseSchema.parse({+ envelopeId: persisted.envelopeId,+ nextAvailableAt: persisted.nextAvailableAt,+ nextAvailableAtLabel: formatReminderAvailableAt(persisted.nextAvailableAt),+ sentAt: nowUnixTimestamp,+ signerId: persisted.signerId,+ signerName: persisted.signerName,+ });+}diff --git a/src/lib/retention.ts b/src/lib/retention.tsnew file mode 100644index 0000000..66e09a2--- /dev/null+++ b/src/lib/retention.ts@@ -0,0 +1,434 @@+import {+ type DbExecutor,+ getDb,+ queryMany,+ queryOne,+} from "./db/connection.ts";+import { getRecipientCertificateKey } from "./services/storage-keys.ts";+import {+ createStorageService,+ type StorageService,+} from "./services/storage.ts";++const DAY_IN_SECONDS = 24 * 60 * 60;+export const STALE_DRAFT_RETENTION_DAYS = 30;+export const ACCOUNT_CLOSURE_EXPORT_WINDOW_DAYS = 30;++type AccountClosureRequestRow = {+ exportExpiresAt: number;+ purgeAfterAt: number;+ requestedAt: number;+ updatedAt: number;+ userId: string;+};++type EnvelopeArtifactRow = {+ evidenceKey: string | null;+ id: string;+ signedPdfKey: string | null;+ sourcePdfKey: string;+ status: "completed" | "declined" | "draft" | "sent" | "voided";+ updatedAt: number;+ userId: string;+};++type FieldImageRow = {+ envelopeId: string;+ imageKey: string;+};++export type ScheduledAccountClosure = {+ alreadyQueued: boolean;+ exportExpiresAt: number;+ purgeAfterAt: number;+ requestedAt: number;+ userId: string;+};++export type RetentionSweepSummary = {+ accountPurgeFailures: string[];+ accountsPurged: number;+ draftDeletionFailures: string[];+ draftsDeleted: number;+ expiredRecipientDownloadTokensDeleted: number;+ ranAt: number;+};++function getCurrentUnixTimestamp() {+ return Math.floor(Date.now() / 1000);+}++async function getAccountClosureRequestRow(+ userId: string,+ database: DbExecutor,+): Promise<AccountClosureRequestRow | null> {+ return queryOne<AccountClosureRequestRow>(+ database,+ `+ SELECT+ user_id AS "userId",+ requested_at AS "requestedAt",+ export_expires_at AS "exportExpiresAt",+ purge_after_at AS "purgeAfterAt",+ updated_at AS "updatedAt"+ FROM account_closure_requests+ WHERE user_id = $1+ `,+ [userId],+ );+}++async function listDueAccountClosureRequests(+ now: number,+ database: DbExecutor,+): Promise<AccountClosureRequestRow[]> {+ return queryMany<AccountClosureRequestRow>(+ database,+ `+ SELECT+ user_id AS "userId",+ requested_at AS "requestedAt",+ export_expires_at AS "exportExpiresAt",+ purge_after_at AS "purgeAfterAt",+ updated_at AS "updatedAt"+ FROM account_closure_requests+ WHERE purge_after_at <= $1+ ORDER BY purge_after_at ASC, requested_at ASC+ `,+ [now],+ );+}++async function listStaleDraftEnvelopes(+ staleBefore: number,+ database: DbExecutor,+): Promise<EnvelopeArtifactRow[]> {+ return queryMany<EnvelopeArtifactRow>(+ database,+ `+ SELECT+ id,+ user_id AS "userId",+ status,+ source_pdf_key AS "sourcePdfKey",+ signed_pdf_key AS "signedPdfKey",+ evidence_key AS "evidenceKey",+ updated_at AS "updatedAt"+ FROM envelopes+ WHERE status = 'draft'+ AND updated_at < $1+ ORDER BY updated_at ASC, id ASC+ `,+ [staleBefore],+ );+}++async function listEnvelopeArtifactsForUser(+ userId: string,+ database: DbExecutor,+): Promise<EnvelopeArtifactRow[]> {+ return queryMany<EnvelopeArtifactRow>(+ database,+ `+ SELECT+ id,+ user_id AS "userId",+ status,+ source_pdf_key AS "sourcePdfKey",+ signed_pdf_key AS "signedPdfKey",+ evidence_key AS "evidenceKey",+ updated_at AS "updatedAt"+ FROM envelopes+ WHERE user_id = $1+ ORDER BY created_at ASC, id ASC+ `,+ [userId],+ );+}++async function listFieldImagesForEnvelopeIds(+ envelopeIds: readonly string[],+ database: DbExecutor,+): Promise<Map<string, string[]>> {+ if (envelopeIds.length === 0) {+ return new Map();+ }++ const placeholders = envelopeIds+ .map((_, index) => `$${String(index + 1)}`)+ .join(", ");+ const rows = await queryMany<FieldImageRow>(+ database,+ `+ SELECT+ envelope_id AS "envelopeId",+ image_key AS "imageKey"+ FROM fields+ WHERE envelope_id IN (${placeholders})+ AND image_key IS NOT NULL+ `,+ envelopeIds,+ );++ const keysByEnvelopeId = new Map<string, string[]>();++ for (const row of rows) {+ const currentKeys = keysByEnvelopeId.get(row.envelopeId) ?? [];+ currentKeys.push(row.imageKey);+ keysByEnvelopeId.set(row.envelopeId, currentKeys);+ }++ return keysByEnvelopeId;+}++function buildEnvelopeStorageKeys(+ envelope: Pick<+ EnvelopeArtifactRow,+ "evidenceKey" | "id" | "signedPdfKey" | "sourcePdfKey" | "status" | "userId"+ >,+ fieldImageKeys: readonly string[],+): string[] {+ const keys = new Set<string>(fieldImageKeys);++ keys.add(envelope.sourcePdfKey);++ if (envelope.signedPdfKey) {+ keys.add(envelope.signedPdfKey);+ }++ if (envelope.evidenceKey) {+ keys.add(envelope.evidenceKey);+ keys.add(getRecipientCertificateKey(envelope.evidenceKey));+ }++ return [...keys];+}++async function deleteStorageKeys(+ keys: readonly string[],+ storageService: StorageService,+) {+ for (const key of keys) {+ await storageService.deleteObject(key);+ }+}++async function deleteExpiredRecipientDownloadTokens(+ now: number,+ database: DbExecutor,+): Promise<number> {+ const result = await database.query(+ `+ DELETE FROM recipient_download_tokens+ WHERE expires_at <= $1+ `,+ [now],+ );++ return result.rowCount ?? 0;+}++function getClosureSchedule(requestedAt = getCurrentUnixTimestamp()) {+ const exportExpiresAt =+ requestedAt + ACCOUNT_CLOSURE_EXPORT_WINDOW_DAYS * DAY_IN_SECONDS;++ return {+ exportExpiresAt,+ purgeAfterAt: exportExpiresAt,+ requestedAt,+ updatedAt: requestedAt,+ };+}++export async function scheduleAccountClosure(+ userId: string,+ database: DbExecutor = getDb(),+): Promise<ScheduledAccountClosure> {+ const existingRequest = await getAccountClosureRequestRow(userId, database);++ if (existingRequest) {+ return {+ alreadyQueued: true,+ exportExpiresAt: existingRequest.exportExpiresAt,+ purgeAfterAt: existingRequest.purgeAfterAt,+ requestedAt: existingRequest.requestedAt,+ userId,+ };+ }++ const schedule = getClosureSchedule();++ await database.query(+ `+ INSERT INTO account_closure_requests (+ user_id,+ requested_at,+ export_expires_at,+ purge_after_at,+ updated_at+ ) VALUES ($1, $2, $3, $4, $5)+ `,+ [+ userId,+ schedule.requestedAt,+ schedule.exportExpiresAt,+ schedule.purgeAfterAt,+ schedule.updatedAt,+ ],+ );++ return {+ alreadyQueued: false,+ exportExpiresAt: schedule.exportExpiresAt,+ purgeAfterAt: schedule.purgeAfterAt,+ requestedAt: schedule.requestedAt,+ userId,+ };+}++async function purgeQueuedAccount(+ userId: string,+ database: DbExecutor,+ storageService: StorageService,+): Promise<boolean> {+ const envelopes = await listEnvelopeArtifactsForUser(userId, database);+ const fieldImagesByEnvelopeId = await listFieldImagesForEnvelopeIds(+ envelopes.map((envelope) => envelope.id),+ database,+ );+ const storageKeys = new Set<string>();++ for (const envelope of envelopes) {+ for (const key of buildEnvelopeStorageKeys(+ envelope,+ fieldImagesByEnvelopeId.get(envelope.id) ?? [],+ )) {+ storageKeys.add(key);+ }+ }++ const deleteResult = await database.query(+ `+ DELETE FROM "user"+ WHERE id = $1+ `,+ [userId],+ );++ if (deleteResult.rowCount !== 1) {+ return false;+ }++ await deleteStorageKeys([...storageKeys], storageService).catch((error) => {+ console.error(+ `Failed to delete storage artifacts for purged account ${userId}:`,+ error,+ );+ });++ return true;+}++async function purgeStaleDraftEnvelope(+ envelope: EnvelopeArtifactRow,+ database: DbExecutor,+ storageService: StorageService,+ fieldImagesByEnvelopeId: ReadonlyMap<string, readonly string[]>,+): Promise<boolean> {+ const deleteResult = await database.query(+ `+ DELETE FROM envelopes+ WHERE id = $1+ AND user_id = $2+ AND status = 'draft'+ AND updated_at = $3+ `,+ [envelope.id, envelope.userId, envelope.updatedAt],+ );++ if (deleteResult.rowCount !== 1) {+ return false;+ }++ await deleteStorageKeys(+ buildEnvelopeStorageKeys(+ envelope,+ fieldImagesByEnvelopeId.get(envelope.id) ?? [],+ ),+ storageService,+ );++ return true;+}++export async function runRetentionSweep({+ database = getDb(),+ now = getCurrentUnixTimestamp(),+ storageService = createStorageService(),+}: {+ database?: DbExecutor;+ now?: number;+ storageService?: StorageService;+} = {}): Promise<RetentionSweepSummary> {+ const staleBefore = now - STALE_DRAFT_RETENTION_DAYS * DAY_IN_SECONDS;+ const staleDrafts = await listStaleDraftEnvelopes(staleBefore, database);+ const staleDraftFieldImagesByEnvelopeId = await listFieldImagesForEnvelopeIds(+ staleDrafts.map((envelope) => envelope.id),+ database,+ );+ const dueAccountClosures = await listDueAccountClosureRequests(now, database);+ const summary: RetentionSweepSummary = {+ accountPurgeFailures: [],+ accountsPurged: 0,+ draftDeletionFailures: [],+ draftsDeleted: 0,+ expiredRecipientDownloadTokensDeleted: 0,+ ranAt: now,+ };++ summary.expiredRecipientDownloadTokensDeleted =+ await deleteExpiredRecipientDownloadTokens(now, database);++ for (const envelope of staleDrafts) {+ try {+ const deleted = await purgeStaleDraftEnvelope(+ envelope,+ database,+ storageService,+ staleDraftFieldImagesByEnvelopeId,+ );++ if (deleted) {+ summary.draftsDeleted += 1;+ }+ } catch (error) {+ summary.draftDeletionFailures.push(envelope.id);+ console.error(+ `Retention cleanup failed for draft envelope ${envelope.id}:`,+ error,+ );+ }+ }++ for (const closureRequest of dueAccountClosures) {+ try {+ const deleted = await purgeQueuedAccount(+ closureRequest.userId,+ database,+ storageService,+ );++ if (deleted) {+ summary.accountsPurged += 1;+ }+ } catch (error) {+ summary.accountPurgeFailures.push(closureRequest.userId);+ console.error(+ `Retention cleanup failed for account ${closureRequest.userId}:`,+ error,+ );+ }+ }++ return summary;+}diff --git a/src/lib/schemas/auth.ts b/src/lib/schemas/auth.tsnew file mode 100644index 0000000..22d45dc--- /dev/null+++ b/src/lib/schemas/auth.ts@@ -0,0 +1,62 @@+import { z } from "zod";++import {+ emailSchema,+ idSchema,+ nameSchema,+ nonEmptyStringSchema,+ unixTimestampSchema,+} from "./common.ts";++export const accountClosureConfirmationPhrase = "close my account" as const;++export const signUpSchema = z.object({+ fullName: nameSchema,+ email: emailSchema,+ password: z.string().min(15).max(128),+});++export const loginSchema = z.object({+ email: emailSchema,+ password: nonEmptyStringSchema,+});++export const forgotPasswordSchema = z.object({+ email: emailSchema,+});++export const updateProfileSchema = z.object({+ fullName: nameSchema,+ email: emailSchema,+});++export const updatePasswordSchema = z.object({+ currentPassword: nonEmptyStringSchema,+ newPassword: z.string().min(15).max(128),+});++export const accountClosureRequestSchema = z.object({+ confirmation: z.literal(accountClosureConfirmationPhrase),+});++export const senderProfileSchema = z.object({+ id: idSchema,+ fullName: nameSchema,+ email: emailSchema,+});++export const senderSessionSchema = z.object({+ user: senderProfileSchema,+ expiresAt: unixTimestampSchema.nullable().optional(),+});++export type SignUpInput = z.infer<typeof signUpSchema>;+export type LoginInput = z.infer<typeof loginSchema>;+export type ForgotPasswordInput = z.infer<typeof forgotPasswordSchema>;+export type UpdateProfileInput = z.infer<typeof updateProfileSchema>;+export type UpdatePasswordInput = z.infer<typeof updatePasswordSchema>;+export type AccountClosureRequestInput = z.infer<+ typeof accountClosureRequestSchema+>;+export type SenderProfile = z.infer<typeof senderProfileSchema>;+export type SenderSession = z.infer<typeof senderSessionSchema>;diff --git a/src/lib/schemas/common.ts b/src/lib/schemas/common.tsnew file mode 100644index 0000000..6556008--- /dev/null+++ b/src/lib/schemas/common.ts@@ -0,0 +1,27 @@+import { z } from "zod";++export const idSchema = z.string().trim().min(1);+export const nonEmptyStringSchema = z.string().trim().min(1);+export const emailSchema = z.string().trim().email().max(320);+export const nameSchema = nonEmptyStringSchema.max(120);+export const envelopeTitleSchema = nonEmptyStringSchema.max(160);+export const unixTimestampSchema = z.number().int().nonnegative();+export const normalizedCoordinateSchema = z.number().finite().min(0).max(1);+export const normalizedSizeSchema = z.number().finite().gt(0).max(1);++function emptyStringToUndefined(value: unknown): unknown {+ if (typeof value !== "string") {+ return value;+ }++ const trimmedValue = value.trim();++ return trimmedValue.length > 0 ? trimmedValue : undefined;+}++export function optionalTrimmedString(maxLength: number) {+ return z.preprocess(+ emptyStringToUndefined,+ z.string().max(maxLength).optional(),+ );+}diff --git a/src/lib/schemas/contact.ts b/src/lib/schemas/contact.tsnew file mode 100644index 0000000..de8ead1--- /dev/null+++ b/src/lib/schemas/contact.ts@@ -0,0 +1,14 @@+import { z } from "zod";++import { emailSchema, nameSchema, nonEmptyStringSchema } from "./common.ts";++export const contactMessageSchema = nonEmptyStringSchema.max(5000);++export const contactFormSchema = z.object({+ company: z.string().trim().default(""),+ email: emailSchema,+ message: contactMessageSchema,+ name: nameSchema,+});++export type ContactFormInput = z.infer<typeof contactFormSchema>;diff --git a/src/lib/schemas/envelope.ts b/src/lib/schemas/envelope.tsnew file mode 100644index 0000000..084e7c1--- /dev/null+++ b/src/lib/schemas/envelope.ts@@ -0,0 +1,116 @@+import { z } from "zod";++import {+ auditActorTypes,+ auditEventTypes,+ downloadFileTypes,+ envelopeStatuses,+} from "../types/domain.ts";+import {+ emailSchema,+ envelopeTitleSchema,+ idSchema,+ optionalTrimmedString,+ unixTimestampSchema,+} from "./common.ts";++const sourcePdfHashSchema = z.string().regex(/^[a-f0-9]{64}$/);++export const envelopeStatusSchema = z.enum(envelopeStatuses);+export const downloadFileTypeSchema = z.enum(downloadFileTypes);+export const auditEventTypeSchema = z.enum(auditEventTypes);+export const auditActorTypeSchema = z.enum(auditActorTypes);++export const envelopeCreateResponseSchema = z.object({+ envelopeId: idSchema,+ pageCount: z.number().int().positive(),+ redirectPath: z.string().trim().min(1),+ sourcePdfFilename: z.string().trim().min(1).max(255),+ sourcePdfSizeBytes: z.number().int().positive(),+ title: envelopeTitleSchema,+});++export const sendEnvelopeResponseSchema = z.object({+ envelopeId: idSchema,+ notifiedSignerName: z.string().trim().min(1).max(160),+ redirectPath: z.string().trim().min(1),+ sentAt: unixTimestampSchema,+});++export const voidEnvelopeResponseSchema = z.object({+ envelopeId: idSchema,+ redirectPath: z.string().trim().min(1),+ voidedAt: unixTimestampSchema,+});++export const manualNudgeResponseSchema = z.object({+ envelopeId: idSchema,+ nextAvailableAt: unixTimestampSchema,+ nextAvailableAtLabel: z.string().trim().min(1),+ sentAt: unixTimestampSchema,+ signerId: idSchema,+ signerName: z.string().trim().min(1).max(160),+});++export const envelopeListFiltersSchema = z.object({+ status: envelopeStatusSchema.optional(),+ search: optionalTrimmedString(160),+ page: z.coerce.number().int().positive().default(1),+ limit: z.coerce.number().int().positive().max(100).default(20),+});++export const downloadRequestSchema = z.object({+ type: downloadFileTypeSchema,+});++export const envelopePageSchema = z.object({+ id: idSchema.optional(),+ envelopeId: idSchema.optional(),+ pageNumber: z.number().int().positive(),+ widthPt: z.number().positive(),+ heightPt: z.number().positive(),+});++export const auditEventRecordSchema = z.object({+ id: idSchema,+ envelopeId: idSchema,+ event: auditEventTypeSchema,+ actorType: auditActorTypeSchema,+ actorEmail: emailSchema.nullable().optional(),+ ipAddress: z.string().trim().min(1).nullable().optional(),+ userAgent: z.string().trim().min(1).nullable().optional(),+ metadata: z.record(z.string(), z.unknown()).nullable().optional(),+ createdAt: unixTimestampSchema,+});++export const envelopeRecordSchema = z.object({+ id: idSchema,+ userId: idSchema,+ title: envelopeTitleSchema,+ status: envelopeStatusSchema,+ sourcePdfKey: z.string().trim().min(1),+ sourcePdfFilename: z.string().trim().min(1).max(255),+ sourcePdfSizeBytes: z.number().int().positive(),+ pageCount: z.number().int().positive(),+ signedPdfKey: z.string().trim().min(1).nullable().optional(),+ evidenceKey: z.string().trim().min(1).nullable().optional(),+ sourcePdfHash: sourcePdfHashSchema,+ sentAt: unixTimestampSchema.nullable().optional(),+ completedAt: unixTimestampSchema.nullable().optional(),+ declinedAt: unixTimestampSchema.nullable().optional(),+ voidedAt: unixTimestampSchema.nullable().optional(),+ createdAt: unixTimestampSchema,+ updatedAt: unixTimestampSchema,+});++export type CreateEnvelopeResponse = z.infer<+ typeof envelopeCreateResponseSchema+>;+export type SendEnvelopeResponse = z.infer<typeof sendEnvelopeResponseSchema>;+export type VoidEnvelopeResponse = z.infer<typeof voidEnvelopeResponseSchema>;+export type ManualNudgeResponse = z.infer<typeof manualNudgeResponseSchema>;+export type EnvelopeListFilters = z.infer<typeof envelopeListFiltersSchema>;+export type DownloadRequest = z.infer<typeof downloadRequestSchema>;+export type EnvelopePageRecord = z.infer<typeof envelopePageSchema>;+export type AuditEventRecord = z.infer<typeof auditEventRecordSchema>;+export type EnvelopeRecord = z.infer<typeof envelopeRecordSchema>;diff --git a/src/lib/schemas/field.ts b/src/lib/schemas/field.tsnew file mode 100644index 0000000..a57a74a--- /dev/null+++ b/src/lib/schemas/field.ts@@ -0,0 +1,144 @@+import { z } from "zod";++import { fieldInputMethods, fieldTypes } from "../types/domain.ts";+import {+ idSchema,+ normalizedCoordinateSchema,+ normalizedSizeSchema,+ optionalTrimmedString,+ unixTimestampSchema,+} from "./common.ts";++export const fieldTypeSchema = z.enum(fieldTypes);+export const fieldInputMethodSchema = z.enum(fieldInputMethods);++export const MAX_DRAWN_SIGNATURE_BYTES = 256 * 1024;+const MAX_DRAWN_SIGNATURE_DATA_URL_LENGTH =+ "data:image/png;base64,".length ++ Math.ceil(MAX_DRAWN_SIGNATURE_BYTES / 3) * 4;++export const fieldPlacementSchema = z+ .object({+ id: idSchema.optional(),+ envelopeId: idSchema.optional(),+ signerId: idSchema,+ type: fieldTypeSchema,+ page: z.number().int().positive(),+ x: normalizedCoordinateSchema,+ y: normalizedCoordinateSchema,+ width: normalizedSizeSchema,+ height: normalizedSizeSchema,+ required: z.boolean().default(true),+ label: optionalTrimmedString(120),+ })+ .superRefine((field, ctx) => {+ if (field.x + field.width > 1.000001) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "Field width extends beyond the page bounds",+ path: ["width"],+ });+ }++ if (field.y + field.height > 1.000001) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "Field height extends beyond the page bounds",+ path: ["height"],+ });+ }++ if (+ (field.type === "signature" ||+ field.type === "initials" ||+ field.type === "date") &&+ !field.required+ ) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: `${field.type} fields are always required`,+ path: ["required"],+ });+ }+ });++export const fieldPlacementListSchema = z.array(fieldPlacementSchema);++export const replaceFieldsSchema = z.object({+ fields: fieldPlacementListSchema,+});++export const replaceFieldsResponseSchema = z.object({+ envelopeId: idSchema,+ fields: z.array(+ fieldPlacementSchema.safeExtend({+ id: idSchema,+ }),+ ),+ redirectPath: z.string().trim().min(1),+ updatedAt: unixTimestampSchema,+});++export const fieldRecordSchema = fieldPlacementSchema.extend({+ inputMethod: fieldInputMethodSchema.nullable().optional(),+ value: optionalTrimmedString(5000).nullable().optional(),+ imageKey: z.string().trim().min(1).nullable().optional(),+ checked: z.boolean().nullable().optional(),+ submittedAt: unixTimestampSchema.nullable().optional(),+ createdAt: unixTimestampSchema,+ updatedAt: unixTimestampSchema,+});++const typedSignatureSubmissionSchema = z.object({+ fieldId: idSchema,+ type: z.enum(["signature", "initials"]),+ inputMethod: z.literal("typed"),+ value: z.string().trim().min(1).max(200),+});++const drawnSignatureSubmissionSchema = z.object({+ fieldId: idSchema,+ type: z.enum(["signature", "initials"]),+ inputMethod: z.literal("drawn"),+ imageDataUrl: z+ .string()+ .trim()+ .min(1)+ .max(+ MAX_DRAWN_SIGNATURE_DATA_URL_LENGTH,+ "Drawn signature image data is too large.",+ ),+});++const textSubmissionSchema = z.object({+ fieldId: idSchema,+ type: z.literal("text"),+ value: z.string().trim().min(1).max(5000),+});++const checkboxSubmissionSchema = z.object({+ fieldId: idSchema,+ type: z.literal("checkbox"),+ checked: z.boolean(),+});++export const signingFieldSubmissionSchema = z.union([+ typedSignatureSubmissionSchema,+ drawnSignatureSubmissionSchema,+ textSubmissionSchema,+ checkboxSubmissionSchema,+]);++export const signingSubmissionSchema = z.object({+ clientTimezoneOffsetMinutes: z.number().int().min(-840).max(840),+ fields: z.array(signingFieldSubmissionSchema),+});++export type FieldPlacement = z.infer<typeof fieldPlacementSchema>;+export type FieldRecord = z.infer<typeof fieldRecordSchema>;+export type ReplaceFieldsInput = z.infer<typeof replaceFieldsSchema>;+export type ReplaceFieldsResponse = z.infer<typeof replaceFieldsResponseSchema>;+export type SigningFieldSubmission = z.infer<+ typeof signingFieldSubmissionSchema+>;+export type SigningSubmission = z.infer<typeof signingSubmissionSchema>;diff --git a/src/lib/schemas/signer.ts b/src/lib/schemas/signer.tsnew file mode 100644index 0000000..808c757--- /dev/null+++ b/src/lib/schemas/signer.ts@@ -0,0 +1,103 @@+import { z } from "zod";++import { MAX_SIGNERS_PER_ENVELOPE, signerStatuses } from "../types/domain.ts";+import {+ emailSchema,+ idSchema,+ nameSchema,+ optionalTrimmedString,+ unixTimestampSchema,+} from "./common.ts";++export const signerStatusSchema = z.enum(signerStatuses);+export const duplicateSignerEmailMessage =+ "Each signer must have a unique email address.";++export const draftSignerSchema = z.object({+ id: idSchema.optional(),+ envelopeId: idSchema.optional(),+ name: nameSchema,+ email: emailSchema,+ signOrder: z.number().int().positive().optional(),+});++export const signerListSchema = z+ .array(draftSignerSchema)+ .min(1)+ .max(MAX_SIGNERS_PER_ENVELOPE)+ .superRefine((signers, ctx) => {+ const emails = new Set<string>();+ const signOrders = new Set<number>();++ for (const [index, signer] of signers.entries()) {+ const normalizedEmail = signer.email.toLowerCase();++ if (emails.has(normalizedEmail)) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: duplicateSignerEmailMessage,+ path: [index, "email"],+ });+ }++ emails.add(normalizedEmail);++ if (signer.signOrder === undefined) {+ continue;+ }++ if (signOrders.has(signer.signOrder)) {+ ctx.addIssue({+ code: z.ZodIssueCode.custom,+ message: "Each signer must have a unique routing order",+ path: [index, "signOrder"],+ });+ }++ signOrders.add(signer.signOrder);+ }+ });++export const replaceSignersSchema = z.object({+ signers: signerListSchema,+});++export const replaceSignersResponseSchema = z.object({+ envelopeId: idSchema,+ redirectPath: z.string().trim().min(1),+ signers: z.array(+ z.object({+ email: emailSchema,+ id: idSchema,+ name: nameSchema,+ signOrder: z.number().int().positive(),+ }),+ ),+ updatedAt: unixTimestampSchema,+});++export const signerRecordSchema = draftSignerSchema.extend({+ status: signerStatusSchema,+ signingTokenExpiresAt: unixTimestampSchema.nullable().optional(),+ signingTokenHash: z.string().trim().length(64).nullable().optional(),+ turnStartedAt: unixTimestampSchema.nullable().optional(),+ lastNotifiedAt: unixTimestampSchema.nullable().optional(),+ lastNudgedAt: unixTimestampSchema.nullable().optional(),+ signedAt: unixTimestampSchema.nullable().optional(),+ declinedAt: unixTimestampSchema.nullable().optional(),+ declineReason: optionalTrimmedString(1000).nullable().optional(),+ createdAt: unixTimestampSchema,+ updatedAt: unixTimestampSchema,+});++export const declineEnvelopeSchema = z.object({+ reason: optionalTrimmedString(1000),+});++export type DraftSigner = z.infer<typeof draftSignerSchema>;+export type ReplaceSignersInput = z.infer<typeof replaceSignersSchema>;+export type ReplaceSignersResponse = z.infer<+ typeof replaceSignersResponseSchema+>;+export type SignerRecord = z.infer<typeof signerRecordSchema>;+export type DeclineEnvelopeInput = z.infer<typeof declineEnvelopeSchema>;diff --git a/src/lib/schemas/signing.ts b/src/lib/schemas/signing.tsnew file mode 100644index 0000000..f2ca2ed--- /dev/null+++ b/src/lib/schemas/signing.ts@@ -0,0 +1,100 @@+import { z } from "zod";++import { envelopePageSchema } from "./envelope.ts";+import { fieldInputMethodSchema, fieldTypeSchema } from "./field.ts";+import {+ emailSchema,+ envelopeTitleSchema,+ idSchema,+ nameSchema,+ normalizedCoordinateSchema,+ normalizedSizeSchema,+ optionalTrimmedString,+ unixTimestampSchema,+} from "./common.ts";++export const signingUnavailableStateSchema = z.enum([+ "expired",+ "already-signed",+ "voided",+ "declined",+]);++const signingFieldBaseSchema = z.object({+ height: normalizedSizeSchema,+ id: idSchema,+ label: optionalTrimmedString(120),+ page: z.number().int().positive(),+ required: z.boolean(),+ signerId: idSchema,+ type: fieldTypeSchema,+ width: normalizedSizeSchema,+ x: normalizedCoordinateSchema,+ y: normalizedCoordinateSchema,+});++export const signingCurrentFieldSchema = signingFieldBaseSchema.extend({+ signerName: nameSchema,+});++export const signingVisibleFieldSchema = signingFieldBaseSchema.extend({+ checked: z.boolean().nullable().optional(),+ imageDataUrl: z.string().trim().min(1).nullable().optional(),+ inputMethod: fieldInputMethodSchema.nullable().optional(),+ signerName: nameSchema,+ submittedAt: unixTimestampSchema,+ value: optionalTrimmedString(5000).nullable().optional(),+});++export const signingPayloadSchema = z.object({+ currentSignerFields: z.array(signingCurrentFieldSchema),+ declineUrl: z.string().trim().min(1),+ documentUrl: z.string().trim().min(1),+ envelopeId: idSchema,+ envelopeTitle: envelopeTitleSchema,+ pageCount: z.number().int().positive(),+ pages: z.array(envelopePageSchema),+ senderName: z.string().trim().min(1).max(320),+ signer: z.object({+ email: emailSchema,+ id: idSchema,+ name: nameSchema,+ order: z.number().int().positive(),+ }),+ state: z.literal("ready"),+ submitUrl: z.string().trim().min(1),+ visibleFields: z.array(signingVisibleFieldSchema),+});++export const signingSubmitResponseSchema = z.object({+ envelopeId: idSchema,+ redirectPath: z.string().trim().min(1),+ submittedAt: unixTimestampSchema,+});++export const signingDeclineResponseSchema = z.object({+ declinedAt: unixTimestampSchema,+ envelopeId: idSchema,+ state: z.literal("declined"),+});++export const signingUnavailableResponseSchema = z.object({+ error: z.string().trim().min(1),+ state: signingUnavailableStateSchema,+});++export const signingRouteResponseSchema = z.union([+ signingPayloadSchema,+ signingUnavailableResponseSchema,+]);++export type SigningCurrentField = z.infer<typeof signingCurrentFieldSchema>;+export type SigningVisibleField = z.infer<typeof signingVisibleFieldSchema>;+export type SigningPayload = z.infer<typeof signingPayloadSchema>;+export type SigningDeclineResponse = z.infer<+ typeof signingDeclineResponseSchema+>;+export type SigningSubmitResponse = z.infer<typeof signingSubmitResponseSchema>;+export type SigningUnavailableResponse = z.infer<+ typeof signingUnavailableResponseSchema+>;diff --git a/src/lib/security/logging.ts b/src/lib/security/logging.tsnew file mode 100644index 0000000..df2db93--- /dev/null+++ b/src/lib/security/logging.ts@@ -0,0 +1,88 @@+type SecurityLogLevel = "error" | "info" | "warn";++type SecurityLogInput = {+ category: string;+ ipAddress?: string | null;+ message: string;+ metadata?: Record<string, unknown>;+ path?: string;+ userId?: string | null;+};++const TOKEN_PATH_PATTERNS = [+ /^\/sign\/[^/]+/i,+ /^\/api\/signing\/[^/]+/i,+ /^\/api\/download\/[^/]+/i,+] as const;++function normalizeLoggedPath(path: string): string {+ if (path.startsWith("/")) {+ return path;+ }++ try {+ return new URL(path).pathname;+ } catch {+ return path;+ }+}++function getConsoleMethod(level: SecurityLogLevel) {+ if (level === "info") {+ return console.info;+ }++ if (level === "warn") {+ return console.warn;+ }++ return console.error;+}++export function redactSensitivePath(path: string): string {+ const normalizedPath = normalizeLoggedPath(path);++ for (const pattern of TOKEN_PATH_PATTERNS) {+ if (pattern.test(normalizedPath)) {+ return normalizedPath.replace(pattern, (match) => {+ const segments = match.split("/");++ if (segments.length < 3) {+ return match;+ }++ segments[segments.length - 1] = "[redacted]";++ return segments.join("/");+ });+ }+ }++ return normalizedPath;+}++export function logSecurityEvent(+ level: SecurityLogLevel,+ input: SecurityLogInput,+): void {+ const consoleMethod = getConsoleMethod(level);+ const payload = {+ category: input.category,+ ipAddress: input.ipAddress ?? null,+ metadata: input.metadata ?? null,+ path: input.path ? redactSensitivePath(input.path) : null,+ userId: input.userId ?? null,+ };++ consoleMethod(`[security] ${input.message}`, payload);+}++export function logRouteError(+ error: unknown,+ input: Omit<SecurityLogInput, "message"> & {+ message: string;+ },+): void {+ logSecurityEvent("error", input);+ console.error(error);+}diff --git a/src/lib/security/rate-limit.ts b/src/lib/security/rate-limit.tsnew file mode 100644index 0000000..73c6c31--- /dev/null+++ b/src/lib/security/rate-limit.ts@@ -0,0 +1,95 @@+type RateLimitResult = {+ remaining: number;+ resetAt: number;+};++type SlidingWindowEntry = {+ expiresAt: number;+ timestamps: number[];+};++declare global {+ var __signudocRateLimitStore: Map<string, SlidingWindowEntry> | undefined;+ var __signudocRateLimitSweepAt: number | undefined;+}++const rateLimitStore =+ globalThis.__signudocRateLimitStore ??+ (globalThis.__signudocRateLimitStore = new Map<string, SlidingWindowEntry>());++const RATE_LIMIT_SWEEP_INTERVAL_MS = 60 * 1000;++function sweepExpiredRateLimitEntries(now: number) {+ const nextSweepAt = globalThis.__signudocRateLimitSweepAt ?? 0;++ if (nextSweepAt > now) {+ return;+ }++ for (const [key, entry] of rateLimitStore.entries()) {+ if (entry.expiresAt <= now) {+ rateLimitStore.delete(key);+ }+ }++ globalThis.__signudocRateLimitSweepAt = now + RATE_LIMIT_SWEEP_INTERVAL_MS;+}++export class RateLimitExceededError extends Error {+ readonly retryAfterSeconds: number;++ constructor(retryAfterSeconds: number) {+ super("Too many requests. Please try again soon.");+ this.name = "RateLimitExceededError";+ this.retryAfterSeconds = retryAfterSeconds;+ }+}++export function enforceSlidingWindowRateLimit(input: {+ key: string;+ limit: number;+ now?: number;+ windowMs: number;+}): RateLimitResult {+ const now = input.now ?? Date.now();+ const windowStart = now - input.windowMs;+ sweepExpiredRateLimitEntries(now);+ const entry = rateLimitStore.get(input.key) ?? {+ expiresAt: windowStart,+ timestamps: [],+ };++ entry.timestamps = entry.timestamps.filter((timestamp) => timestamp > windowStart);++ if (entry.timestamps.length === 0) {+ rateLimitStore.delete(input.key);+ } else {+ entry.expiresAt = (entry.timestamps.at(-1) ?? now) + input.windowMs;+ rateLimitStore.set(input.key, entry);+ }++ if (entry.timestamps.length >= input.limit) {+ const oldestTimestamp = entry.timestamps[0] ?? now;+ const retryAfterSeconds = Math.max(+ 1,+ Math.ceil((oldestTimestamp + input.windowMs - now) / 1000),+ );+ throw new RateLimitExceededError(retryAfterSeconds);+ }++ entry.timestamps.push(now);+ entry.expiresAt = now + input.windowMs;+ rateLimitStore.set(input.key, entry);++ const oldestTimestamp = entry.timestamps[0] ?? now;++ return {+ remaining: Math.max(0, input.limit - entry.timestamps.length),+ resetAt: oldestTimestamp + input.windowMs,+ };+}++export function clearRateLimitStoreForTests() {+ rateLimitStore.clear();+ globalThis.__signudocRateLimitSweepAt = undefined;+}diff --git a/src/lib/security/request.ts b/src/lib/security/request.tsnew file mode 100644index 0000000..ebceb4a--- /dev/null+++ b/src/lib/security/request.ts@@ -0,0 +1,25 @@+export function getClientIpAddress(headers: Headers): string | null {+ const forwardedFor = headers.get("x-forwarded-for")?.split(",")[0]?.trim();++ if (forwardedFor) {+ return forwardedFor;+ }++ return (+ headers.get("cf-connecting-ip")?.trim() ??+ headers.get("x-real-ip")?.trim() ??+ null+ );+}++export function getRequestUserAgent(headers: Headers): string | null {+ return headers.get("user-agent")?.trim() ?? null;+}++export function getRequestPathname(request: Request): string {+ try {+ return new URL(request.url).pathname;+ } catch {+ return "/";+ }+}diff --git a/src/lib/security/route-controls.ts b/src/lib/security/route-controls.tsnew file mode 100644index 0000000..69ca1a5--- /dev/null+++ b/src/lib/security/route-controls.ts@@ -0,0 +1,62 @@+import { NextResponse } from "next/server";++import { RateLimitExceededError, enforceSlidingWindowRateLimit } from "./rate-limit.ts";+import { logSecurityEvent } from "./logging.ts";+import { getClientIpAddress, getRequestPathname } from "./request.ts";++type RateLimitInput = {+ category: string;+ key: string;+ limit: number;+ message?: string;+ request: Request;+ userId?: string | null;+ windowMs: number;+};++function getRetryAfterHeaders(retryAfterSeconds: number) {+ return {+ "retry-after": String(retryAfterSeconds),+ };+}++export function applyRateLimit(input: RateLimitInput): NextResponse | null {+ try {+ enforceSlidingWindowRateLimit({+ key: input.key,+ limit: input.limit,+ windowMs: input.windowMs,+ });++ return null;+ } catch (error) {+ if (!(error instanceof RateLimitExceededError)) {+ throw error;+ }++ logSecurityEvent("warn", {+ category: input.category,+ ipAddress: getClientIpAddress(input.request.headers),+ message: "Rate limit exceeded.",+ path: getRequestPathname(input.request),+ userId: input.userId ?? null,+ });++ return NextResponse.json(+ {+ error: input.message ?? "Too many requests. Please try again soon.",+ },+ {+ headers: getRetryAfterHeaders(error.retryAfterSeconds),+ status: 429,+ },+ );+ }+}++export function buildRateLimitKey(parts: Array<string | null | undefined>) {+ return parts+ .map((part) => part?.trim())+ .filter((part): part is string => Boolean(part))+ .join(":");+}diff --git a/src/lib/services/audit.ts b/src/lib/services/audit.tsnew file mode 100644index 0000000..319d3d4--- /dev/null+++ b/src/lib/services/audit.ts@@ -0,0 +1,120 @@+import { randomUUID } from "node:crypto";++import {+ auditEventRecordSchema,+ type AuditEventRecord,+} from "../schemas/envelope.ts";+import { type DbExecutor, getDb, queryMany } from "../db/connection.ts";++export type AuditEventMetadata = Record<string, unknown> | null;++export type RecordAuditEventInput = {+ envelopeId: string;+ event: AuditEventRecord["event"];+ actorType: AuditEventRecord["actorType"];+ actorEmail?: string | null;+ ipAddress?: string | null;+ userAgent?: string | null;+ metadata?: AuditEventMetadata;+ createdAt?: number;+};++type AuditEventRow = {+ actorEmail: string | null;+ actorType: AuditEventRecord["actorType"];+ createdAt: number;+ envelopeId: string;+ event: AuditEventRecord["event"];+ id: string;+ ipAddress: string | null;+ metadata: Record<string, unknown> | null;+ userAgent: string | null;+};++function mapAuditRow(row: AuditEventRow): AuditEventRecord {+ return auditEventRecordSchema.parse({+ actorEmail: row.actorEmail,+ actorType: row.actorType,+ createdAt: row.createdAt,+ envelopeId: row.envelopeId,+ event: row.event,+ id: row.id,+ ipAddress: row.ipAddress,+ metadata: row.metadata,+ userAgent: row.userAgent,+ });+}++export async function listAuditEventsForEnvelope(+ envelopeId: string,+ database: DbExecutor = getDb(),+): Promise<AuditEventRecord[]> {+ const rows = await queryMany<AuditEventRow>(+ database,+ `+ SELECT+ id,+ envelope_id AS "envelopeId",+ event,+ actor_type AS "actorType",+ actor_email AS "actorEmail",+ ip_address AS "ipAddress",+ user_agent AS "userAgent",+ metadata,+ created_at AS "createdAt"+ FROM audit_events+ WHERE envelope_id = $1+ ORDER BY created_at ASC, id ASC+ `,+ [envelopeId],+ );++ return rows.map(mapAuditRow);+}++export async function recordAuditEvent(+ input: RecordAuditEventInput,+ database: DbExecutor = getDb(),+): Promise<AuditEventRecord> {+ const id = randomUUID();+ const createdAt = input.createdAt ?? Math.floor(Date.now() / 1000);++ await database.query(+ `+ INSERT INTO audit_events (+ id,+ envelope_id,+ event,+ actor_type,+ actor_email,+ ip_address,+ user_agent,+ metadata,+ created_at+ ) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)+ `,+ [+ id,+ input.envelopeId,+ input.event,+ input.actorType,+ input.actorEmail ?? null,+ input.ipAddress ?? null,+ input.userAgent ?? null,+ input.metadata ?? null,+ createdAt,+ ],+ );++ return auditEventRecordSchema.parse({+ actorEmail: input.actorEmail ?? null,+ actorType: input.actorType,+ createdAt,+ envelopeId: input.envelopeId,+ event: input.event,+ id,+ ipAddress: input.ipAddress ?? null,+ metadata: input.metadata ?? null,+ userAgent: input.userAgent ?? null,+ });+}diff --git a/src/lib/services/document-import.ts b/src/lib/services/document-import.tsnew file mode 100644index 0000000..e1104ce--- /dev/null+++ b/src/lib/services/document-import.ts@@ -0,0 +1,228 @@+import { createHash } from "node:crypto";++import { PDFDocument } from "pdf-lib";++import type { EnvelopePageRecord } from "../schemas/envelope.ts";+import { MAX_UPLOAD_SIZE_BYTES } from "../types/domain.ts";++const PDF_MAGIC_HEADER = "%PDF-";++const PDF_IMPORT_ERROR_MESSAGES = {+ encrypted_pdf:+ "This PDF is password-protected or encrypted. Please upload an unlocked PDF.",+ invalid_type: "Only PDF files are supported. Please upload a valid PDF.",+ too_large: "This file exceeds the 20 MB limit.",+ unreadable_pdf: "We couldn't read this PDF. Please upload a valid file.",+ unsupported_variant:+ "This PDF uses an unsupported format. Please export it as a standard PDF.",+ upload_failed: "Upload failed. Please try again.",+} as const;++export const pdfImportFailureCodes = [+ "encrypted_pdf",+ "invalid_type",+ "too_large",+ "unreadable_pdf",+ "unsupported_variant",+ "upload_failed",+] as const;++export type PdfImportFailureCode = (typeof pdfImportFailureCodes)[number];++export type PdfImportError = {+ code: PdfImportFailureCode;+ message: string;+};++export type ImportedPdfPage = Pick<+ EnvelopePageRecord,+ "heightPt" | "pageNumber" | "widthPt"+>;++export type ImportedPdfDocument = {+ encrypted: boolean;+ filename: string;+ pageCount: number;+ pages: ImportedPdfPage[];+ pureXfa: boolean;+ sizeBytes: number;+ sourceHash: string;+};++type ImportPdfDocumentInput = {+ body: Uint8Array;+ contentType?: string | null;+ filename: string;+ maxSizeBytes?: number;+};++export class DocumentImportError extends Error {+ code: PdfImportFailureCode;++ constructor(+ code: PdfImportFailureCode,+ message = getPdfImportErrorMessage(code),+ ) {+ super(message);+ this.code = code;+ this.name = "DocumentImportError";+ }+}++export const DEFAULT_DOCUMENT_IMPORT_LIMITS = {+ maxSizeBytes: MAX_UPLOAD_SIZE_BYTES,+};++export function getPdfImportErrorMessage(code: PdfImportFailureCode): string {+ return PDF_IMPORT_ERROR_MESSAGES[code];+}++function assertImportRequest(input: {+ contentType?: string | null;+ filename: string;+ maxSizeBytes: number;+ sizeBytes: number;+}): void {+ if (!input.filename.toLowerCase().endsWith(".pdf")) {+ throw new DocumentImportError("invalid_type");+ }++ const normalizedContentType = input.contentType?.trim().toLowerCase() ?? "";++ if (+ normalizedContentType.length > 0 &&+ normalizedContentType !== "application/pdf"+ ) {+ throw new DocumentImportError("invalid_type");+ }++ if (input.sizeBytes > input.maxSizeBytes) {+ throw new DocumentImportError("too_large");+ }+}++function isPasswordException(error: unknown): boolean {+ if (!(error instanceof Error)) {+ return false;+ }++ const normalizedMessage = error.message.trim().toLowerCase();++ return (+ error.name === "PasswordException" ||+ normalizedMessage.includes("password") ||+ normalizedMessage.includes("encrypted")+ );+}++function looksLikePdf(body: Uint8Array): boolean {+ if (body.length < PDF_MAGIC_HEADER.length) {+ return false;+ }++ const header = new TextDecoder("latin1").decode(+ body.subarray(0, PDF_MAGIC_HEADER.length),+ );++ return header === PDF_MAGIC_HEADER;+}++function maybeContainsXfa(body: Uint8Array): boolean {+ const prefix = new TextDecoder("latin1").decode(+ body.subarray(0, Math.min(body.length, 512 * 1024)),+ );++ return prefix.includes("/XFA");+}++function maybeContainsEncrypt(body: Uint8Array): boolean {+ const prefix = new TextDecoder("latin1").decode(+ body.subarray(0, Math.min(body.length, 512 * 1024)),+ );++ return prefix.includes("/Encrypt");+}++async function parsePdfDocument(+ body: Uint8Array,+): Promise<{ pages: ImportedPdfPage[]; pureXfa: boolean }> {+ const document = await PDFDocument.load(body, {+ ignoreEncryption: false,+ });++ const pages = document.getPages().map((page, index) => ({+ heightPt: page.getHeight(),+ pageNumber: index + 1,+ widthPt: page.getWidth(),+ }));++ return {+ pages,+ pureXfa: false,+ };+}++function hashDocument(body: Uint8Array): string {+ return createHash("sha256").update(body).digest("hex");+}++export async function importPdfDocument({+ body,+ contentType,+ filename,+ maxSizeBytes = DEFAULT_DOCUMENT_IMPORT_LIMITS.maxSizeBytes,+}: ImportPdfDocumentInput): Promise<ImportedPdfDocument> {+ const normalizedFilename = filename.trim() || "document.pdf";+ const sizeBytes = body.length;++ assertImportRequest({+ contentType,+ filename: normalizedFilename,+ maxSizeBytes,+ sizeBytes,+ });++ if (!looksLikePdf(body)) {+ throw new DocumentImportError("invalid_type");+ }++ const containsEncrypt = maybeContainsEncrypt(body);+ const containsXfa = maybeContainsXfa(body);+ const sourceHash = hashDocument(body);++ if (containsEncrypt) {+ throw new DocumentImportError("encrypted_pdf");+ }++ try {+ const { pages, pureXfa } = await parsePdfDocument(body.slice());++ if (pureXfa || containsXfa) {+ throw new DocumentImportError("unsupported_variant");+ }++ return {+ encrypted: false,+ filename: normalizedFilename,+ pageCount: pages.length,+ pages,+ pureXfa,+ sizeBytes,+ sourceHash,+ };+ } catch (error) {+ if (error instanceof DocumentImportError) {+ throw error;+ }++ if (isPasswordException(error) || containsXfa) {+ if (isPasswordException(error)) {+ throw new DocumentImportError("encrypted_pdf");+ }++ throw new DocumentImportError("unsupported_variant");+ }++ throw new DocumentImportError("unreadable_pdf");+ }+}diff --git a/src/lib/services/downloads.ts b/src/lib/services/downloads.tsnew file mode 100644index 0000000..83870d4--- /dev/null+++ b/src/lib/services/downloads.ts@@ -0,0 +1,68 @@+import {+ RECIPIENT_DOWNLOAD_LINK_TTL_SECONDS,+ type DownloadFileType,+} from "../types/domain.ts";+import { getEnv, type EnvSource } from "../utils/env.ts";+import { assertServiceConfig } from "./service-config.ts";+import { issueOpaqueToken } from "./opaque-tokens.ts";++const DOWNLOAD_ENV_KEYS = ["APP_URL"] as const;++export type IssuedDownloadLink = {+ exp: number;+ fileType: DownloadFileType;+ iat: number;+ token: string;+ tokenHash: string;+ url: string;+};++type DownloadTokenOptions = {+ env?: EnvSource;+};++type DownloadTokenConfig = {+ appUrl: string;+ defaultTtlSeconds: number;+};++function getDownloadTokenConfig({+ env = process.env,+}: DownloadTokenOptions = {}): DownloadTokenConfig {+ assertServiceConfig("downloads", DOWNLOAD_ENV_KEYS, env);++ const appEnv = getEnv(env);++ return {+ appUrl: appEnv.appUrl!,+ defaultTtlSeconds: RECIPIENT_DOWNLOAD_LINK_TTL_SECONDS,+ };+}++export async function issueRecipientDownloadLink(+ {+ expiresInSeconds,+ fileType,+ issuedAt,+ }: {+ expiresInSeconds?: number;+ fileType: DownloadFileType;+ issuedAt?: number;+ },+ options: DownloadTokenOptions = {},+): Promise<IssuedDownloadLink> {+ const config = getDownloadTokenConfig(options);+ const issuedToken = issueOpaqueToken({+ expiresInSeconds: expiresInSeconds ?? config.defaultTtlSeconds,+ issuedAt,+ });++ return {+ fileType,+ ...issuedToken,+ url: new URL(+ `/api/download/${issuedToken.token}`,+ config.appUrl,+ ).toString(),+ };+}diff --git a/src/lib/services/email-legal-footer.ts b/src/lib/services/email-legal-footer.tsnew file mode 100644index 0000000..19b60de--- /dev/null+++ b/src/lib/services/email-legal-footer.ts@@ -0,0 +1,48 @@+import { publicLegalLinks } from "../legal.ts";+import { getEnv, type EnvSource } from "../utils/env.ts";+import { escapeHtml } from "../utils/html.ts";+import { assertServiceConfig } from "./service-config.ts";++const APP_URL_ENV_KEYS = ["APP_URL"] as const;++type EmailBodyContent = {+ htmlBody: string;+ textBody: string;+};++function getAbsoluteLegalLinks(env: EnvSource = process.env) {+ assertServiceConfig("app", APP_URL_ENV_KEYS, env);+ const { appUrl } = getEnv(env);++ return publicLegalLinks.map((link) => ({+ ...link,+ url: new URL(link.href, appUrl!).toString(),+ }));+}++export function withUserEmailLegalFooter(+ input: EmailBodyContent,+ env: EnvSource = process.env,+): EmailBodyContent {+ const [termsLink, privacyLink, contactLink] = getAbsoluteLegalLinks(env);+ const textFooter = [+ "",+ "Terms of Service:",+ termsLink.url,+ "",+ "Privacy Policy:",+ privacyLink.url,+ "",+ "Contact:",+ contactLink.url,+ ].join("\n");+ const htmlFooter = [+ '<hr style="margin:24px 0;border:none;border-top:1px solid #e2e2e2;" />',+ `<p><a href="${escapeHtml(termsLink.url)}">${termsLink.longLabel}</a><br /><a href="${escapeHtml(privacyLink.url)}">${privacyLink.longLabel}</a><br /><a href="${escapeHtml(contactLink.url)}">${contactLink.longLabel}</a></p>`,+ ].join("");++ return {+ htmlBody: `${input.htmlBody}${htmlFooter}`,+ textBody: `${input.textBody}${textFooter}`,+ };+}diff --git a/src/lib/services/email.ts b/src/lib/services/email.tsnew file mode 100644index 0000000..0801574--- /dev/null+++ b/src/lib/services/email.ts@@ -0,0 +1,144 @@+import { Resend } from "resend";++import { type EmailTemplateKind } from "../types/domain.ts";+import { getEnv, type EnvSource } from "../utils/env.ts";+import { assertServiceConfig } from "./service-config.ts";++const EMAIL_ENV_KEYS = [+ "RESEND_API_KEY",+ "RESEND_FROM_EMAIL",+ "SUPPORT_EMAIL",+] as const;++export type TransactionalEmailMessage = {+ htmlBody?: string;+ replyTo?: string;+ subject: string;+ template: EmailTemplateKind;+ textBody: string;+ to: string;+};++export type EmailDeliveryResult = {+ accepted: string[];+ messageId?: string;+ rejected: string[];+};++export type EmailSendOptions = {+ idempotencyKey?: string;+};++type CreateEmailServiceOptions = {+ env?: EnvSource;+ resendClient?: Resend;+};++function getResendErrorMessage(error: unknown): string {+ if (+ error &&+ typeof error === "object" &&+ "message" in error &&+ typeof (error as { message?: unknown }).message === "string"+ ) {+ return (error as { message: string }).message;+ }++ return "Email delivery failed.";+}++function buildResendOptions(options?: EmailSendOptions) {+ return options?.idempotencyKey+ ? {+ idempotencyKey: options.idempotencyKey,+ }+ : undefined;+}++function buildResendPayload(+ message: TransactionalEmailMessage,+ config: {+ senderAddress: string;+ supportAddress: string;+ },+) {+ return {+ from: config.senderAddress,+ html: message.htmlBody,+ replyTo: message.replyTo ?? config.supportAddress,+ subject: message.subject,+ tags: [+ {+ name: "category",+ value: message.template,+ },+ ],+ text: message.textBody,+ to: [message.to],+ };+}++export interface EmailService {+ send(+ message: TransactionalEmailMessage,+ options?: EmailSendOptions,+ ): Promise<EmailDeliveryResult>;+ sendBatch(+ messages: readonly TransactionalEmailMessage[],+ options?: EmailSendOptions,+ ): Promise<EmailDeliveryResult[]>;+}++export function createEmailService({+ env = process.env,+ resendClient,+}: CreateEmailServiceOptions = {}): EmailService {+ assertServiceConfig("email", EMAIL_ENV_KEYS, env);++ const emailEnv = getEnv(env).email;+ const client = resendClient ?? new Resend(emailEnv.apiKey!);+ const config = {+ senderAddress: emailEnv.senderAddress!,+ supportAddress: emailEnv.supportAddress!,+ };++ return {+ async send(message, options) {+ const { data, error } = await client.emails.send(+ buildResendPayload(message, config),+ buildResendOptions(options),+ );++ if (error) {+ throw new Error(getResendErrorMessage(error));+ }++ return {+ accepted: [message.to],+ messageId: data?.id,+ rejected: [],+ };+ },++ async sendBatch(messages, options) {+ if (messages.length === 0) {+ return [];+ }++ const { data, error } = await client.batch.send(+ messages.map((message) => buildResendPayload(message, config)),+ buildResendOptions(options),+ );++ if (error) {+ throw new Error(getResendErrorMessage(error));+ }++ return messages.map((message, index) => ({+ accepted: [message.to],+ messageId: data?.data[index]?.id,+ rejected: [],+ }));+ },+ };+}diff --git a/src/lib/services/opaque-tokens.ts b/src/lib/services/opaque-tokens.tsnew file mode 100644index 0000000..d863d5f--- /dev/null+++ b/src/lib/services/opaque-tokens.ts@@ -0,0 +1,29 @@+import { createHash, randomBytes } from "node:crypto";++export type IssuedOpaqueToken = {+ exp: number;+ iat: number;+ token: string;+ tokenHash: string;+};++export function hashOpaqueToken(token: string): string {+ return createHash("sha256").update(token).digest("hex");+}++export function issueOpaqueToken({+ expiresInSeconds,+ issuedAt = Math.floor(Date.now() / 1000),+}: {+ expiresInSeconds: number;+ issuedAt?: number;+}): IssuedOpaqueToken {+ const token = randomBytes(32).toString("base64url");++ return {+ exp: issuedAt + expiresInSeconds,+ iat: issuedAt,+ token,+ tokenHash: hashOpaqueToken(token),+ };+}diff --git a/src/lib/services/pdf-finalize.ts b/src/lib/services/pdf-finalize.tsnew file mode 100644index 0000000..c9fd9be--- /dev/null+++ b/src/lib/services/pdf-finalize.ts@@ -0,0 +1,995 @@+import fs from "node:fs/promises";+import path from "node:path";+import { randomUUID } from "node:crypto";++import fontkit from "@pdf-lib/fontkit";+import {+ PDFDocument,+ type PDFFont,+ type PDFImage,+ type PDFPage,+ rgb,+ StandardFonts,+} from "pdf-lib";++import {+ auditEventRecordSchema,+ type AuditEventRecord,+ type EnvelopeRecord,+} from "../schemas/envelope.ts";+import type { FieldRecord } from "../schemas/field.ts";+import type { SignerRecord } from "../schemas/signer.ts";+import { normalizedRectToPdfRect } from "../utils/pdf-coords.ts";+import {+ buildEnvelopeCertificateKey,+ buildEnvelopeSignedPdfKey,+} from "./storage-keys.ts";+import {+ createStorageService,+ type StorageObjectRef,+ type StorageService,+} from "./storage.ts";++const TYPED_SIGNATURE_FONT_PATH = path.join(+ process.cwd(),+ "src",+ "assets",+ "fonts",+ "GreatVibes-Regular.ttf",+);+const DEFAULT_AUDIT_PAGE_SIZE = {+ height: 792,+ width: 612,+} as const;++let typedSignatureFontBytesPromise: Promise<Uint8Array> | null = null;++export type FinalizedEnvelopeArtifacts = {+ certificate: StorageObjectRef;+ generatedAt: number;+ signedPdf: StorageObjectRef;+};++export class PdfFinalizeError extends Error {+ constructor(message: string) {+ super(message);+ this.name = "PdfFinalizeError";+ }+}++function redactAuditEventMetadataForRecipients(+ metadata: AuditEventRecord["metadata"],+): AuditEventRecord["metadata"] {+ if (!metadata) {+ return null;+ }++ const nextMetadata = { ...metadata };++ delete nextMetadata.signerEmail;++ return Object.keys(nextMetadata).length > 0 ? nextMetadata : null;+}++function redactAuditEventForRecipients(+ event: AuditEventRecord,+): AuditEventRecord {+ return auditEventRecordSchema.parse({+ ...event,+ actorEmail:+ event.actorType === "signer" ? null : (event.actorEmail ?? null),+ ipAddress: null,+ metadata: redactAuditEventMetadataForRecipients(event.metadata ?? null),+ userAgent: null,+ });+}++type WrappedLine = {+ font: PDFFont;+ size: number;+ text: string;+};++function formatAuditTimestamp(timestamp: number | null | undefined): string {+ if (typeof timestamp !== "number") {+ return "—";+ }++ const value = new Date(timestamp * 1000);++ return value.toISOString().replace(".000Z", " UTC");+}++function chunkLongWord(+ font: PDFFont,+ size: number,+ maxWidth: number,+ word: string,+): string[] {+ if (font.widthOfTextAtSize(word, size) <= maxWidth) {+ return [word];+ }++ const chunks: string[] = [];+ let buffer = "";++ for (const character of word) {+ const candidate = `${buffer}${character}`;++ if (buffer && font.widthOfTextAtSize(candidate, size) > maxWidth) {+ chunks.push(buffer);+ buffer = character;+ continue;+ }++ buffer = candidate;+ }++ if (buffer) {+ chunks.push(buffer);+ }++ return chunks;+}++function wrapText(+ font: PDFFont,+ size: number,+ maxWidth: number,+ text: string,+): WrappedLine[] {+ const normalized = text.trim();++ if (!normalized) {+ return [];+ }++ const rawWords = normalized+ .split(/\s+/)+ .flatMap((word) => chunkLongWord(font, size, maxWidth, word));+ const lines: string[] = [];+ let currentLine = "";++ for (const word of rawWords) {+ const candidate = currentLine ? `${currentLine} ${word}` : word;++ if (font.widthOfTextAtSize(candidate, size) <= maxWidth) {+ currentLine = candidate;+ continue;+ }++ if (currentLine) {+ lines.push(currentLine);+ }++ currentLine = word;+ }++ if (currentLine) {+ lines.push(currentLine);+ }++ return lines.map((line) => ({+ font,+ size,+ text: line,+ }));+}++function fitTextSize(+ font: PDFFont,+ text: string,+ maxWidth: number,+ maxHeight: number,+ preferredSize: number,+): number {+ let size = Math.min(preferredSize, maxHeight);++ while (size > 4 && font.widthOfTextAtSize(text, size) > maxWidth) {+ size -= 0.5;+ }++ return Math.max(4, size);+}++function getFieldPadding(widthPt: number, heightPt: number): number {+ return Math.max(2, Math.min(widthPt, heightPt) * 0.12);+}++function shouldStampField(field: FieldRecord): boolean {+ if (field.type === "checkbox") {+ return typeof field.checked === "boolean";+ }++ return typeof field.submittedAt === "number";+}++async function getTypedSignatureFontBytes(): Promise<Uint8Array> {+ typedSignatureFontBytesPromise ??= fs+ .readFile(TYPED_SIGNATURE_FONT_PATH)+ .then((buffer) => new Uint8Array(buffer));++ return typedSignatureFontBytesPromise;+}++function buildCompletedAuditEvent(+ envelopeId: string,+ generatedAt: number,+): AuditEventRecord {+ return {+ actorEmail: null,+ actorType: "system",+ createdAt: generatedAt,+ envelopeId,+ event: "completed",+ id: randomUUID(),+ ipAddress: null,+ metadata: null,+ userAgent: null,+ };+}++async function getEmbeddedPng(+ imageKey: string,+ imageCache: Map<string, PDFImage>,+ pdfDocument: PDFDocument,+ storageService: StorageService,+): Promise<PDFImage> {+ const cachedImage = imageCache.get(imageKey);++ if (cachedImage) {+ return cachedImage;+ }++ const imageObject = await storageService.getObject(imageKey);+ const embeddedImage = await pdfDocument.embedPng(imageObject.body);++ imageCache.set(imageKey, embeddedImage);++ return embeddedImage;+}++function stripCompletedAuditEvents(+ auditEvents: readonly AuditEventRecord[],+): AuditEventRecord[] {+ return auditEvents.filter((event) => event.event !== "completed");+}++function getEnvelopeStatusLabel(status: EnvelopeRecord["status"]): string {+ switch (status) {+ case "completed":+ return "Completed";+ case "declined":+ return "Declined";+ case "voided":+ return "Voided";+ case "sent":+ return "Sent";+ case "draft":+ return "Draft";+ default:+ return status;+ }+}++function getCertificateTitle(envelope: EnvelopeRecord): string {+ return envelope.status === "completed"+ ? "SignuDoc Certificate of Completion"+ : "SignuDoc Audit Certificate";+}++function getTerminalTimestampLabel(envelope: EnvelopeRecord): string {+ switch (envelope.status) {+ case "completed":+ return "Completed at";+ case "declined":+ return "Declined at";+ case "voided":+ return "Voided at";+ default:+ return "Recorded at";+ }+}++function resolveTerminalTimestamp(+ envelope: EnvelopeRecord,+ fallbackTimestamp: number,+): number {+ switch (envelope.status) {+ case "completed":+ return envelope.completedAt ?? fallbackTimestamp;+ case "declined":+ return envelope.declinedAt ?? fallbackTimestamp;+ case "voided":+ return envelope.voidedAt ?? fallbackTimestamp;+ default:+ return fallbackTimestamp;+ }+}++function buildCertificateAuditEvents(input: {+ auditEvents: AuditEventRecord[];+ envelope: EnvelopeRecord;+ terminalTimestamp: number;+}): AuditEventRecord[] {+ const baseAuditEvents =+ input.envelope.status === "completed"+ ? stripCompletedAuditEvents(input.auditEvents)+ : input.auditEvents;+ const terminalAuditEvents =+ input.envelope.status === "completed"+ ? [buildCompletedAuditEvent(input.envelope.id, input.terminalTimestamp)]+ : [];++ return [...baseAuditEvents, ...terminalAuditEvents].sort(+ (left, right) =>+ left.createdAt - right.createdAt || left.id.localeCompare(right.id),+ );+}++async function stampFieldValue(+ field: FieldRecord,+ page: PDFPage,+ fonts: {+ auditBold: PDFFont;+ auditRegular: PDFFont;+ signature: PDFFont;+ },+ imageCache: Map<string, PDFImage>,+ pdfDocument: PDFDocument,+ storageService: StorageService,+): Promise<void> {+ if (!shouldStampField(field)) {+ return;+ }++ const rect = normalizedRectToPdfRect(field, {+ heightPt: page.getHeight(),+ widthPt: page.getWidth(),+ });+ const padding = getFieldPadding(rect.widthPt, rect.heightPt);++ switch (field.type) {+ case "signature":+ case "initials": {+ if (field.inputMethod === "drawn" && field.imageKey) {+ const image = await getEmbeddedPng(+ field.imageKey,+ imageCache,+ pdfDocument,+ storageService,+ );+ const maxWidth = Math.max(4, rect.widthPt - padding * 2);+ const maxHeight = Math.max(4, rect.heightPt - padding * 2);+ const scaled = image.scaleToFit(maxWidth, maxHeight);+ const x = rect.xPt + (rect.widthPt - scaled.width) / 2;+ const y = rect.yPt + (rect.heightPt - scaled.height) / 2;++ page.drawImage(image, {+ height: scaled.height,+ width: scaled.width,+ x,+ y,+ });++ return;+ }++ const signatureValue = field.value?.trim();++ if (!signatureValue) {+ return;+ }++ const maxWidth = Math.max(12, rect.widthPt - padding * 2);+ const maxHeight = Math.max(10, rect.heightPt - padding * 2);+ const fontSize = fitTextSize(+ fonts.signature,+ signatureValue,+ maxWidth,+ maxHeight,+ Math.min(maxHeight, rect.heightPt * 0.9),+ );++ page.drawText(signatureValue, {+ color: rgb(0.12, 0.12, 0.12),+ font: fonts.signature,+ size: fontSize,+ x: rect.xPt + padding,+ y: rect.yPt + (rect.heightPt - fontSize) / 2 + fontSize * 0.1,+ });++ return;+ }+ case "date":+ case "text": {+ const textValue = field.value?.trim();++ if (!textValue) {+ return;+ }++ const maxWidth = Math.max(12, rect.widthPt - padding * 2);+ const maxHeight = Math.max(10, rect.heightPt - padding * 2);+ const fontSize = fitTextSize(+ fonts.auditRegular,+ textValue,+ maxWidth,+ maxHeight,+ Math.min(maxHeight, rect.heightPt * 0.64),+ );++ page.drawText(textValue, {+ color: rgb(0.12, 0.12, 0.12),+ font: fonts.auditRegular,+ size: fontSize,+ x: rect.xPt + padding,+ y: rect.yPt + (rect.heightPt - fontSize) / 2 + fontSize * 0.2,+ });++ return;+ }+ case "checkbox": {+ const boxSize = Math.min(rect.widthPt, rect.heightPt, 14);+ const x = rect.xPt + padding / 2;+ const y = rect.yPt + (rect.heightPt - boxSize) / 2;++ page.drawRectangle({+ borderColor: rgb(0.18, 0.18, 0.18),+ borderWidth: 1.1,+ height: boxSize,+ width: boxSize,+ x,+ y,+ });++ if (field.checked) {+ page.drawLine({+ color: rgb(0.08, 0.08, 0.08),+ end: { x: x + boxSize * 0.42, y: y + boxSize * 0.2 },+ start: { x: x + boxSize * 0.16, y: y + boxSize * 0.5 },+ thickness: 1.4,+ });+ page.drawLine({+ color: rgb(0.08, 0.08, 0.08),+ end: { x: x + boxSize * 0.84, y: y + boxSize * 0.82 },+ start: { x: x + boxSize * 0.4, y: y + boxSize * 0.18 },+ thickness: 1.4,+ });+ }++ return;+ }+ default:+ return;+ }+}++function buildAuditLines(input: {+ auditEvents: AuditEventRecord[];+ completedAt: number;+ envelope: EnvelopeRecord;+ fonts: {+ bold: PDFFont;+ regular: PDFFont;+ };+ maxWidth: number;+ redactForRecipients?: boolean;+ signers: SignerRecord[];+}) {+ const titleFontSize = 18;+ const sectionFontSize = 11;+ const bodyFontSize = 9.25;+ const lines: Array<WrappedLine & { gapAfter?: number; gapBefore?: number }> =+ [];++ const pushParagraph = (+ text: string,+ font: PDFFont,+ size: number,+ options: { gapAfter?: number; gapBefore?: number } = {},+ ) => {+ const wrapped = wrapText(font, size, input.maxWidth, text);++ if (wrapped.length === 0) {+ return;+ }++ wrapped.forEach((line, index) => {+ lines.push({+ ...line,+ gapAfter: index === wrapped.length - 1 ? options.gapAfter : undefined,+ gapBefore: index === 0 ? options.gapBefore : undefined,+ });+ });+ };++ const terminalTimestamp = resolveTerminalTimestamp(+ input.envelope,+ input.completedAt,+ );+ const auditEvents = buildCertificateAuditEvents({+ auditEvents: input.auditEvents,+ envelope: input.envelope,+ terminalTimestamp,+ });++ pushParagraph(+ getCertificateTitle(input.envelope),+ input.fonts.bold,+ titleFontSize,+ {+ gapAfter: 8,+ },+ );+ pushParagraph(+ `Envelope ID: ${input.envelope.id}`,+ input.fonts.regular,+ bodyFontSize,+ );+ pushParagraph(+ `Document title: ${input.envelope.title}`,+ input.fonts.regular,+ bodyFontSize,+ );+ pushParagraph(+ `Source PDF: ${input.envelope.sourcePdfFilename}`,+ input.fonts.regular,+ bodyFontSize,+ );+ pushParagraph(+ `Source document hash: ${input.envelope.sourcePdfHash}`,+ input.fonts.regular,+ bodyFontSize,+ );+ pushParagraph(+ `Status: ${getEnvelopeStatusLabel(input.envelope.status)}`,+ input.fonts.regular,+ bodyFontSize,+ );+ pushParagraph(+ `${getTerminalTimestampLabel(input.envelope)}: ${formatAuditTimestamp(terminalTimestamp)}`,+ input.fonts.regular,+ bodyFontSize,+ {+ gapAfter: 10,+ },+ );++ pushParagraph("Signers", input.fonts.bold, sectionFontSize, {+ gapAfter: 4,+ });++ for (const signer of input.signers) {+ const actionLabel = getSignerCertificateActionLabel(+ input.envelope,+ signer,+ );+ const signerLabel = input.redactForRecipients+ ? `${signer.signOrder}. ${signer.name} | ${actionLabel}`+ : `${signer.signOrder}. ${signer.name} <${signer.email}> | ${actionLabel}`;++ pushParagraph(signerLabel, input.fonts.regular, bodyFontSize);+ }++ pushParagraph("Audit events", input.fonts.bold, sectionFontSize, {+ gapAfter: 4,+ gapBefore: 10,+ });++ for (const event of auditEvents) {+ const actor =+ event.actorEmail ??+ (typeof event.metadata?.signerEmail === "string"+ ? event.metadata.signerEmail+ : event.actorType);+ const signerName =+ typeof event.metadata?.signerName === "string"+ ? event.metadata.signerName+ : null;+ const actorLabel =+ signerName && actor !== signerName ? `${signerName} <${actor}>` : actor;++ pushParagraph(+ `${formatAuditTimestamp(event.createdAt)} | ${event.event} | ${actorLabel}`,+ input.fonts.regular,+ bodyFontSize,+ );+ }++ return lines;+}++function getSignerCertificateActionLabel(+ envelope: EnvelopeRecord,+ signer: SignerRecord,+): string {+ switch (signer.status) {+ case "signed":+ return `Signed at ${formatAuditTimestamp(signer.signedAt)}`;+ case "declined":+ return `Declined at ${formatAuditTimestamp(signer.declinedAt)}`;+ case "notified":+ if (envelope.status === "voided") {+ return "Awaiting signature when envelope was voided";+ }++ if (envelope.status === "declined") {+ return "Awaiting signature when envelope was declined";+ }++ return "Awaiting signature";+ case "pending":+ return "Not reached";+ default: {+ const exhaustiveStatus: never = signer.status;+ return exhaustiveStatus;+ }+ }+}++function appendAuditTrailPages(input: {+ auditEvents: AuditEventRecord[];+ completedAt: number;+ envelope: EnvelopeRecord;+ fonts: {+ bold: PDFFont;+ regular: PDFFont;+ };+ pdfDocument: PDFDocument;+ redactForRecipients?: boolean;+ signers: SignerRecord[];+}) {+ const templatePage = input.pdfDocument.getPageCount()+ ? input.pdfDocument.getPage(0)+ : null;+ const pageSize = templatePage+ ? {+ height: templatePage.getHeight(),+ width: templatePage.getWidth(),+ }+ : DEFAULT_AUDIT_PAGE_SIZE;+ const margin = 48;+ const maxWidth = pageSize.width - margin * 2;+ const lineHeightMultiplier = 1.24;+ const lines = buildAuditLines({+ auditEvents: input.auditEvents,+ completedAt: input.completedAt,+ envelope: input.envelope,+ fonts: input.fonts,+ maxWidth,+ redactForRecipients: input.redactForRecipients,+ signers: input.signers,+ });++ let page = input.pdfDocument.addPage([pageSize.width, pageSize.height]);+ let cursorY = pageSize.height - margin;++ for (const line of lines) {+ cursorY -= line.gapBefore ?? 0;++ const lineHeight = line.size * lineHeightMultiplier;++ if (cursorY - lineHeight < margin) {+ page = input.pdfDocument.addPage([pageSize.width, pageSize.height]);+ cursorY = pageSize.height - margin;+ }++ page.drawText(line.text, {+ color: rgb(0.14, 0.14, 0.14),+ font: line.font,+ size: line.size,+ x: margin,+ y: cursorY - line.size,+ });++ cursorY -= lineHeight;+ cursorY -= line.gapAfter ?? 0;+ }+}++export async function storeEnvelopeCertificatePdf(input: {+ auditEvents: AuditEventRecord[];+ envelope: EnvelopeRecord;+ certificate: StorageObjectRef;+ redactForRecipients?: boolean;+ signers: SignerRecord[];+ },+ {+ storageService = createStorageService(),+ }: {+ storageService?: StorageService;+ } = {},+): Promise<StorageObjectRef> {+ if (+ input.envelope.status !== "completed" &&+ input.envelope.status !== "declined" &&+ input.envelope.status !== "voided"+ ) {+ throw new PdfFinalizeError(+ "Certificates can only be generated for terminal envelopes.",+ );+ }++ const body = await renderEnvelopeCertificatePdf({+ auditEvents: input.auditEvents,+ envelope: input.envelope,+ redactForRecipients: input.redactForRecipients,+ signers: input.signers,+ });++ return storageService.putObject({+ body,+ contentType: "application/pdf",+ key: input.certificate.key,+ });+}++export async function storeRecipientEnvelopeCertificatePdf(+ input: {+ auditEvents: AuditEventRecord[];+ certificate: StorageObjectRef;+ envelope: EnvelopeRecord;+ signers: SignerRecord[];+ },+ {+ storageService = createStorageService(),+ }: {+ storageService?: StorageService;+ } = {},+): Promise<StorageObjectRef> {+ if (+ input.envelope.status !== "completed" &&+ input.envelope.status !== "declined" &&+ input.envelope.status !== "voided"+ ) {+ throw new PdfFinalizeError(+ "Evidence bundles can only be generated for terminal envelopes.",+ );+ }++ return storeEnvelopeCertificatePdf(+ {+ ...input,+ redactForRecipients: true,+ },+ {+ storageService,+ },+ );+}++export async function renderEnvelopeCertificatePdf(input: {+ auditEvents: AuditEventRecord[];+ envelope: EnvelopeRecord;+ redactForRecipients?: boolean;+ signers: SignerRecord[];+}): Promise<Uint8Array> {+ if (+ input.envelope.status !== "completed" &&+ input.envelope.status !== "declined" &&+ input.envelope.status !== "voided"+ ) {+ throw new PdfFinalizeError(+ "Certificates can only be generated for terminal envelopes.",+ );+ }++ const pdfDocument = await PDFDocument.create();+ const auditRegularFont = await pdfDocument.embedFont(StandardFonts.Helvetica);+ const auditBoldFont = await pdfDocument.embedFont(+ StandardFonts.HelveticaBold,+ );+ const terminalTimestamp = resolveTerminalTimestamp(+ input.envelope,+ Math.floor(Date.now() / 1000),+ );++ appendAuditTrailPages({+ auditEvents: input.redactForRecipients+ ? input.auditEvents.map(redactAuditEventForRecipients)+ : input.auditEvents,+ completedAt: terminalTimestamp,+ envelope: input.envelope,+ fonts: {+ bold: auditBoldFont,+ regular: auditRegularFont,+ },+ pdfDocument,+ redactForRecipients: input.redactForRecipients,+ signers: input.signers,+ });++ return pdfDocument.save({+ useObjectStreams: false,+ });+}++export async function renderFinalizedEnvelopePdf(+ input: {+ auditEvents: AuditEventRecord[];+ completedAt: number;+ envelope: EnvelopeRecord;+ fields: FieldRecord[];+ includeAuditTrail?: boolean;+ signers: SignerRecord[];+ sourcePdfKey: string;+ },+ {+ storageService = createStorageService(),+ }: {+ storageService?: StorageService;+ } = {},+): Promise<Uint8Array> {+ const sourcePdfObject = await storageService.getObject(input.sourcePdfKey);+ const pdfDocument = await PDFDocument.load(sourcePdfObject.body);++ pdfDocument.registerFontkit(fontkit);++ const signatureFont = await pdfDocument.embedFont(+ await getTypedSignatureFontBytes(),+ );+ const auditRegularFont = await pdfDocument.embedFont(StandardFonts.Helvetica);+ const auditBoldFont = await pdfDocument.embedFont(+ StandardFonts.HelveticaBold,+ );+ const imageCache = new Map<string, PDFImage>();++ for (const field of input.fields+ .filter(shouldStampField)+ .sort((left, right) => left.page - right.page || left.y - right.y)) {+ const page = pdfDocument.getPage(field.page - 1);++ if (!page) {+ throw new PdfFinalizeError(+ `Field ${field.id} references missing page ${field.page}.`,+ );+ }++ await stampFieldValue(+ field,+ page,+ {+ auditBold: auditBoldFont,+ auditRegular: auditRegularFont,+ signature: signatureFont,+ },+ imageCache,+ pdfDocument,+ storageService,+ );+ }++ try {+ pdfDocument.getForm().flatten();+ } catch {+ // Many source PDFs have no AcroForm. Stamping still produces the final locked view.+ }++ if (input.includeAuditTrail) {+ appendAuditTrailPages({+ auditEvents: stripCompletedAuditEvents(input.auditEvents),+ completedAt: input.completedAt,+ envelope: input.envelope,+ fonts: {+ bold: auditBoldFont,+ regular: auditRegularFont,+ },+ pdfDocument,+ signers: input.signers,+ });+ }++ return pdfDocument.save({+ useObjectStreams: false,+ });+}++export async function finalizeEnvelope(+ input: {+ auditEvents: AuditEventRecord[];+ envelope: EnvelopeRecord;+ fields: FieldRecord[];+ signers: SignerRecord[];+ sourcePdf: StorageObjectRef;+ },+ {+ storageService = createStorageService(),+ }: {+ storageService?: StorageService;+ } = {},+): Promise<FinalizedEnvelopeArtifacts> {+ const generatedAt = Math.floor(Date.now() / 1000);+ const storageIdentity = {+ envelopeId: input.envelope.id,+ userId: input.envelope.userId,+ };+ const signedPdfBytes = await renderFinalizedEnvelopePdf(+ {+ auditEvents: input.auditEvents,+ completedAt: generatedAt,+ envelope: input.envelope,+ fields: input.fields,+ signers: input.signers,+ sourcePdfKey: input.sourcePdf.key,+ },+ {+ storageService,+ },+ );+ const completedEnvelope = {+ ...input.envelope,+ completedAt: generatedAt,+ status: "completed" as const,+ updatedAt: generatedAt,+ };+ let signedPdf: StorageObjectRef | null = null;+ let certificate: StorageObjectRef | null = null;+ let recipientCertificate: StorageObjectRef | null = null;++ try {+ signedPdf = await storageService.putObject({+ body: signedPdfBytes,+ contentType: "application/pdf",+ key: buildEnvelopeSignedPdfKey(storageIdentity),+ });++ certificate = await storeEnvelopeCertificatePdf(+ {+ auditEvents: input.auditEvents,+ certificate: {+ bucketName: input.sourcePdf.bucketName,+ key: buildEnvelopeCertificateKey({+ ...storageIdentity,+ audience: "internal",+ }),+ },+ envelope: completedEnvelope,+ signers: input.signers,+ },+ {+ storageService,+ },+ );+ recipientCertificate = await storeRecipientEnvelopeCertificatePdf(+ {+ auditEvents: input.auditEvents,+ certificate: {+ bucketName: input.sourcePdf.bucketName,+ key: buildEnvelopeCertificateKey({+ ...storageIdentity,+ audience: "recipient",+ }),+ },+ envelope: completedEnvelope,+ signers: input.signers,+ },+ {+ storageService,+ },+ );++ return {+ certificate,+ generatedAt,+ signedPdf,+ };+ } catch (error) {+ await Promise.all([+ ...(signedPdf+ ? [storageService.deleteObject(signedPdf.key).catch(() => undefined)]+ : []),+ ...(certificate+ ? [storageService.deleteObject(certificate.key).catch(() => undefined)]+ : []),+ ...(recipientCertificate+ ? [+ storageService+ .deleteObject(recipientCertificate.key)+ .catch(() => undefined),+ ]+ : []),+ ]);+ throw error;+ }+}diff --git a/src/lib/services/reminders.ts b/src/lib/services/reminders.tsnew file mode 100644index 0000000..e4e27e2--- /dev/null+++ b/src/lib/services/reminders.ts@@ -0,0 +1,27 @@+import { MANUAL_NUDGE_COOLDOWN_SECONDS } from "../types/domain.ts";++export function getManualNudgeAvailableAt(lastNudgedAt: number): number {+ return lastNudgedAt + MANUAL_NUDGE_COOLDOWN_SECONDS;+}++export function isManualNudgeAvailable(+ lastNudgedAt: number | null | undefined,+ nowUnixTimestamp: number,+): boolean {+ if (typeof lastNudgedAt !== "number") {+ return true;+ }++ return getManualNudgeAvailableAt(lastNudgedAt) <= nowUnixTimestamp;+}++const reminderAvailabilityFormatter = new Intl.DateTimeFormat("en-US", {+ day: "numeric",+ hour: "numeric",+ minute: "2-digit",+ month: "long",+});++export function formatReminderAvailableAt(unixTimestamp: number): string {+ return reminderAvailabilityFormatter.format(new Date(unixTimestamp * 1000));+}diff --git a/src/lib/services/service-config.ts b/src/lib/services/service-config.tsnew file mode 100644index 0000000..f9a2fde--- /dev/null+++ b/src/lib/services/service-config.ts@@ -0,0 +1,37 @@+import { hasEnv, type EnvSource } from "../utils/env.ts";++export class ServiceConfigurationError extends Error {+ constructor(serviceName: string, variableNames: readonly string[]) {+ super(+ `${serviceName} service requires environment variables: ${variableNames.join(", ")}`,+ );+ this.name = "ServiceConfigurationError";+ }+}++function listMissingEnvVariables(+ variableNames: readonly string[],+ env: EnvSource = process.env,+): string[] {+ return variableNames.filter((variableName) => {+ if (!hasEnv(variableName, env)) {+ return true;+ }++ const value = env[variableName]?.trim().toLowerCase() ?? "";++ return value.startsWith("replace-with-");+ });+}++export function assertServiceConfig(+ serviceName: string,+ variableNames: readonly string[],+ env: EnvSource = process.env,+): void {+ const missingVariables = listMissingEnvVariables(variableNames, env);++ if (missingVariables.length > 0) {+ throw new ServiceConfigurationError(serviceName, missingVariables);+ }+}diff --git a/src/lib/services/signing-invitation-email.ts b/src/lib/services/signing-invitation-email.tsnew file mode 100644index 0000000..5b90079--- /dev/null+++ b/src/lib/services/signing-invitation-email.ts@@ -0,0 +1,47 @@+import { escapeHtml } from "../utils/html.ts";+import { withUserEmailLegalFooter } from "./email-legal-footer.ts";+import { type TransactionalEmailMessage } from "./email.ts";++type SigningInvitationEmailInput = {+ envelopeTitle: string;+ senderName: string;+ signerEmail: string;+ signerName: string;+ signingUrl: string;+};++export function buildSigningInvitationEmail(+ input: SigningInvitationEmailInput,+): TransactionalEmailMessage {+ const subject = `${input.senderName} requested your signature on "${input.envelopeTitle}"`;+ const textBody = [+ `Hi ${input.signerName},`,+ "",+ `${input.senderName} sent you "${input.envelopeTitle}" through SignuDoc.`,+ "",+ "Review and sign the document here:",+ input.signingUrl,+ "",+ "You do not need a SignuDoc account to sign.",+ "If you receive a newer invitation or reminder link, use the newest one.",+ ].join("\n");+ const htmlBody = [+ `<p>Hi ${escapeHtml(input.signerName)},</p>`,+ `<p>${escapeHtml(input.senderName)} sent you “${escapeHtml(input.envelopeTitle)}” through SignuDoc.</p>`,+ `<p><a href="${escapeHtml(input.signingUrl)}">Review and sign the document</a></p>`,+ "<p>You do not need a SignuDoc account to sign.</p>",+ "<p>If you receive a newer invitation or reminder link, use the newest one.</p>",+ ].join("");+ const legalFooter = withUserEmailLegalFooter({+ htmlBody,+ textBody,+ });++ return {+ htmlBody: legalFooter.htmlBody,+ subject,+ template: "signing_invitation",+ textBody: legalFooter.textBody,+ to: input.signerEmail,+ };+}diff --git a/src/lib/services/signing-links.ts b/src/lib/services/signing-links.tsnew file mode 100644index 0000000..b605c54--- /dev/null+++ b/src/lib/services/signing-links.ts@@ -0,0 +1,58 @@+import { SIGNING_LINK_TTL_SECONDS } from "../types/domain.ts";+import { getEnv, type EnvSource } from "../utils/env.ts";+import { assertServiceConfig } from "./service-config.ts";+import { issueOpaqueToken } from "./opaque-tokens.ts";++const SIGNING_LINK_ENV_KEYS = ["APP_URL"] as const;++export type IssuedSigningLink = {+ exp: number;+ iat: number;+ token: string;+ tokenHash: string;+ url: string;+};++type SigningLinkOptions = {+ env?: EnvSource;+};++type SigningLinkConfig = {+ appUrl: string;+ defaultTtlSeconds: number;+};++function getSigningLinkConfig({+ env = process.env,+}: SigningLinkOptions = {}): SigningLinkConfig {+ assertServiceConfig("signing links", SIGNING_LINK_ENV_KEYS, env);++ const appEnv = getEnv(env);++ return {+ appUrl: appEnv.appUrl!,+ defaultTtlSeconds: SIGNING_LINK_TTL_SECONDS,+ };+}++export async function issueSigningLink(+ {+ expiresInSeconds,+ issuedAt,+ }: {+ expiresInSeconds?: number;+ issuedAt?: number;+ } = {},+ options: SigningLinkOptions = {},+): Promise<IssuedSigningLink> {+ const config = getSigningLinkConfig(options);+ const issuedToken = issueOpaqueToken({+ expiresInSeconds: expiresInSeconds ?? config.defaultTtlSeconds,+ issuedAt,+ });++ return {+ ...issuedToken,+ url: new URL(`/sign/${issuedToken.token}`, config.appUrl).toString(),+ };+}diff --git a/src/lib/services/storage-keys.ts b/src/lib/services/storage-keys.tsnew file mode 100644index 0000000..5753033--- /dev/null+++ b/src/lib/services/storage-keys.ts@@ -0,0 +1,82 @@+import path from "node:path";++const STORAGE_ROOT_SEGMENT = "users";+const ENVELOPE_ROOT_SEGMENT = "envelopes";+const CERTIFICATE_ROOT_SEGMENT = "certificates";+const INTERNAL_CERTIFICATE_FILE_NAME = "internal.pdf";+const RECIPIENT_CERTIFICATE_FILE_NAME = "recipient.pdf";+const LEGACY_INTERNAL_EVIDENCE_FILE_NAME = "internal.json";+const LEGACY_RECIPIENT_EVIDENCE_FILE_NAME = "recipient.json";++export type CertificateAudience = "internal" | "recipient";++type EnvelopeStorageIdentity = {+ envelopeId: string;+ userId: string;+};++export function buildEnvelopePrefix(input: EnvelopeStorageIdentity): string {+ return path.posix.join(+ STORAGE_ROOT_SEGMENT,+ input.userId,+ ENVELOPE_ROOT_SEGMENT,+ input.envelopeId,+ );+}++export function buildEnvelopeOriginalPdfKey(+ input: EnvelopeStorageIdentity,+): string {+ return path.posix.join(buildEnvelopePrefix(input), "original.pdf");+}++export function buildEnvelopeSignedPdfKey(+ input: EnvelopeStorageIdentity,+): string {+ return path.posix.join(buildEnvelopePrefix(input), "final.pdf");+}++export function buildEnvelopeCertificateKey(+ input: EnvelopeStorageIdentity & {+ audience: CertificateAudience;+ },+): string {+ const fileName =+ input.audience === "internal"+ ? INTERNAL_CERTIFICATE_FILE_NAME+ : RECIPIENT_CERTIFICATE_FILE_NAME;++ return path.posix.join(+ buildEnvelopePrefix(input),+ CERTIFICATE_ROOT_SEGMENT,+ fileName,+ );+}++export function buildSignatureImageKey(+ input: EnvelopeStorageIdentity & {+ fieldId: string;+ },+): string {+ return path.posix.join(+ buildEnvelopePrefix(input),+ "signatures",+ `${input.fieldId}.png`,+ );+}++export function getRecipientCertificateKey(evidenceKey: string): string {+ const normalizedKey = evidenceKey.trim().replaceAll("\\", "/");++ if (normalizedKey.endsWith(`/${INTERNAL_CERTIFICATE_FILE_NAME}`)) {+ return `${normalizedKey.slice(0, -INTERNAL_CERTIFICATE_FILE_NAME.length)}${RECIPIENT_CERTIFICATE_FILE_NAME}`;+ }++ if (normalizedKey.endsWith(`/${LEGACY_INTERNAL_EVIDENCE_FILE_NAME}`)) {+ return `${normalizedKey.slice(0, -LEGACY_INTERNAL_EVIDENCE_FILE_NAME.length)}${LEGACY_RECIPIENT_EVIDENCE_FILE_NAME}`;+ }++ throw new Error(+ `Cannot derive recipient certificate key from "${normalizedKey}".`,+ );+}diff --git a/src/lib/services/storage.ts b/src/lib/services/storage.tsnew file mode 100644index 0000000..c803664--- /dev/null+++ b/src/lib/services/storage.ts@@ -0,0 +1,246 @@+import {+ DeleteObjectCommand,+ GetObjectCommand,+ HeadObjectCommand,+ PutObjectCommand,+ S3Client,+} from "@aws-sdk/client-s3";+import { getSignedUrl } from "@aws-sdk/s3-request-presigner";++import { getEnv, type EnvSource } from "../utils/env.ts";+import { assertServiceConfig } from "./service-config.ts";++const STORAGE_ENV_KEYS = [+ "R2_ACCOUNT_ID",+ "R2_ACCESS_KEY_ID",+ "R2_BUCKET_NAME",+ "R2_SECRET_ACCESS_KEY",+] as const;++type CreateStorageServiceOptions = {+ env?: EnvSource;+ s3Client?: S3Client;+};++export type StorageObjectRef = {+ bucketName: string;+ key: string;+};++export type PresignedStorageUrl = StorageObjectRef & {+ expiresAt: number;+ method: "GET" | "PUT";+ url: string;+};++export type StorageObject = StorageObjectRef & {+ body: Uint8Array;+ contentLength?: number;+ contentType?: string;+ etag?: string;+};++export type StorageObjectHead = StorageObjectRef & {+ contentLength?: number;+ contentType?: string;+ etag?: string;+ exists: boolean;+};++export function buildContentDisposition(+ fileName: string,+ dispositionType: "attachment" | "inline" = "attachment",+): string {+ const fallbackName = fileName.replace(/["\\\r\n]+/g, "_");+ const encodedName = encodeURIComponent(fileName).replace(/\+/g, "%20");++ return `${dispositionType}; filename="${fallbackName}"; filename*=UTF-8''${encodedName}`;+}++async function readS3Body(body: unknown): Promise<Uint8Array> {+ if (+ !body ||+ typeof body !== "object" ||+ !("transformToByteArray" in body) ||+ typeof body.transformToByteArray !== "function"+ ) {+ return new Uint8Array();+ }++ return (+ body as {+ transformToByteArray: () => Promise<Uint8Array>;+ }+ ).transformToByteArray();+}++function normalizeStorageKey(key: string): string {+ const normalizedKey = key.trim().replaceAll("\\", "/").replace(/^\/+/, "");++ if (normalizedKey.length === 0) {+ throw new Error("Storage key is required.");+ }++ const segments = normalizedKey.split("/");++ if (+ segments.some(+ (segment) => segment.length === 0 || segment === "." || segment === "..",+ )+ ) {+ throw new Error("Storage key is invalid.");+ }++ return normalizedKey;+}++export interface StorageService {+ createPresignedDownloadUrl(input: {+ expiresInSeconds: number;+ fileName?: string;+ key: string;+ }): Promise<PresignedStorageUrl>;+ deleteObject(key: string): Promise<void>;+ getObject(key: string): Promise<StorageObject>;+ headObject(key: string): Promise<StorageObjectHead>;+ putObject(input: {+ body: Uint8Array;+ contentType: string;+ key: string;+ }): Promise<StorageObjectRef>;+}++export function createStorageService({+ env = process.env,+ s3Client,+}: CreateStorageServiceOptions = {}): StorageService {+ assertServiceConfig("storage", STORAGE_ENV_KEYS, env);++ const storageEnv = getEnv(env).storage;+ const config = {+ accessKeyId: storageEnv.accessKeyId!,+ bucketName: storageEnv.bucketName!,+ endpoint: `https://${storageEnv.accountId!}.r2.cloudflarestorage.com`,+ region: "auto" as const,+ secretAccessKey: storageEnv.secretAccessKey!,+ };+ const client =+ s3Client ??+ new S3Client({+ credentials: {+ accessKeyId: config.accessKeyId,+ secretAccessKey: config.secretAccessKey,+ },+ endpoint: config.endpoint,+ region: config.region,+ });++ return {+ async createPresignedDownloadUrl(input) {+ const key = normalizeStorageKey(input.key);+ const url = await getSignedUrl(+ client,+ new GetObjectCommand({+ Bucket: config.bucketName,+ Key: key,+ ResponseContentDisposition: input.fileName+ ? buildContentDisposition(input.fileName)+ : undefined,+ }),+ {+ expiresIn: input.expiresInSeconds,+ },+ );++ return {+ bucketName: config.bucketName,+ expiresAt: Math.floor(Date.now() / 1000) + input.expiresInSeconds,+ key,+ method: "GET",+ url,+ };+ },+ async deleteObject(key) {+ const normalizedKey = normalizeStorageKey(key);++ await client.send(+ new DeleteObjectCommand({+ Bucket: config.bucketName,+ Key: normalizedKey,+ }),+ );+ },+ async getObject(key) {+ const normalizedKey = normalizeStorageKey(key);+ const response = await client.send(+ new GetObjectCommand({+ Bucket: config.bucketName,+ Key: normalizedKey,+ }),+ );+ const body = await readS3Body(response.Body);++ return {+ body,+ bucketName: config.bucketName,+ contentLength: response.ContentLength,+ contentType: response.ContentType,+ etag: response.ETag?.replaceAll('"', ""),+ key: normalizedKey,+ };+ },+ async headObject(key) {+ const normalizedKey = normalizeStorageKey(key);++ try {+ const response = await client.send(+ new HeadObjectCommand({+ Bucket: config.bucketName,+ Key: normalizedKey,+ }),+ );++ return {+ bucketName: config.bucketName,+ contentLength: response.ContentLength,+ contentType: response.ContentType,+ etag: response.ETag?.replaceAll('"', ""),+ exists: true,+ key: normalizedKey,+ };+ } catch (error) {+ if (+ error instanceof Error &&+ "name" in error &&+ (error.name === "NotFound" || error.name === "NoSuchKey")+ ) {+ return {+ bucketName: config.bucketName,+ exists: false,+ key: normalizedKey,+ };+ }++ throw error;+ }+ },+ async putObject(input) {+ const key = normalizeStorageKey(input.key);++ await client.send(+ new PutObjectCommand({+ Body: input.body,+ Bucket: config.bucketName,+ ContentLength: input.body.length,+ ContentType: input.contentType,+ Key: key,+ }),+ );++ return {+ bucketName: config.bucketName,+ key,+ };+ },+ };+}diff --git a/src/lib/signing.ts b/src/lib/signing.tsnew file mode 100644index 0000000..3d36ea4--- /dev/null+++ b/src/lib/signing.ts@@ -0,0 +1,1884 @@+import { Buffer } from "node:buffer";+import { randomUUID } from "node:crypto";++import {+ type DbExecutor,+ type DbPool,+ getDb,+ queryMany,+ queryOne,+ withTransaction,+} from "./db/connection.ts";+import {+ type AuditEventRecord,+ envelopePageSchema,+ envelopeRecordSchema,+} from "./schemas/envelope.ts";+import { createRecipientDownloadLink } from "./downloads.ts";+import {+ fieldRecordSchema,+ MAX_DRAWN_SIGNATURE_BYTES,+ signingSubmissionSchema,+ type SigningFieldSubmission,+} from "./schemas/field.ts";+import {+ signingPayloadSchema,+ signingDeclineResponseSchema,+ type SigningDeclineResponse,+ type SigningPayload,+ signingSubmitResponseSchema,+ type SigningSubmitResponse,+ type SigningUnavailableResponse,+} from "./schemas/signing.ts";+import { declineEnvelopeSchema, signerRecordSchema } from "./schemas/signer.ts";+import {+ listAuditEventsForEnvelope,+ recordAuditEvent,+} from "./services/audit.ts";+import { createEmailService, type EmailService } from "./services/email.ts";+import { withUserEmailLegalFooter } from "./services/email-legal-footer.ts";+import { hashOpaqueToken } from "./services/opaque-tokens.ts";+import {+ finalizeEnvelope,+ storeEnvelopeCertificatePdf,+ storeRecipientEnvelopeCertificatePdf,+} from "./services/pdf-finalize.ts";+import { buildSigningInvitationEmail } from "./services/signing-invitation-email.ts";+import {+ issueSigningLink,+ type IssuedSigningLink,+} from "./services/signing-links.ts";+import {+ buildEnvelopeCertificateKey,+ buildEnvelopeSignedPdfKey,+ buildSignatureImageKey,+} from "./services/storage-keys.ts";+import {+ createStorageService,+ type StorageService,+} from "./services/storage.ts";+import { assertServiceConfig } from "./services/service-config.ts";+import { RECIPIENT_DOWNLOAD_LINK_TTL_SECONDS } from "./types/domain.ts";+import { getEnv } from "./utils/env.ts";+import { escapeHtml } from "./utils/html.ts";++const APP_URL_ENV_KEYS = ["APP_URL"] as const;++type SigningRequestMeta = {+ ipAddress?: string | null;+ userAgent?: string | null;+};++type FieldPersistenceUpdate = {+ checked: boolean | null;+ fieldId: string;+ imageKey: string | null;+ inputMethod: "auto" | "drawn" | "typed" | null;+ submittedAt: number | null;+ value: string | null;+};++type SigningEnvelopeRow = {+ completedAt: number | null;+ createdAt: number;+ declinedAt: number | null;+ evidenceKey: string | null;+ id: string;+ pageCount: number;+ sentAt: number | null;+ signedPdfKey: string | null;+ sourcePdfFilename: string;+ sourcePdfHash: string;+ sourcePdfKey: string;+ sourcePdfSizeBytes: number;+ status: "completed" | "declined" | "draft" | "sent" | "voided";+ title: string;+ updatedAt: number;+ userId: string;+ voidedAt: number | null;+};++type SigningSignerRow = {+ createdAt: number;+ declineReason: string | null;+ declinedAt: number | null;+ email: string;+ envelopeId: string;+ id: string;+ lastNotifiedAt: number | null;+ lastNudgedAt: number | null;+ name: string;+ signOrder: number;+ signedAt: number | null;+ signingTokenExpiresAt: number | null;+ signingTokenHash: string | null;+ status: "declined" | "notified" | "pending" | "signed";+ turnStartedAt: number | null;+ updatedAt: number;+};++type SigningFieldRow = {+ checked: boolean | null;+ createdAt: number;+ envelopeId: string;+ height: number;+ id: string;+ imageKey: string | null;+ inputMethod: "auto" | "drawn" | "typed" | null;+ label: string | null;+ page: number;+ required: boolean;+ signerId: string;+ submittedAt: number | null;+ type: "checkbox" | "date" | "initials" | "signature" | "text";+ updatedAt: number;+ value: string | null;+ width: number;+ x: number;+ y: number;+};++type SigningPageRow = {+ envelopeId: string;+ heightPt: number;+ id: string;+ pageNumber: number;+ widthPt: number;+};++type SenderRow = {+ email: string;+ name: string | null;+};++type ResolvedSigningContext = {+ envelope: ReturnType<typeof envelopeRecordSchema.parse>;+ fields: Array<ReturnType<typeof fieldRecordSchema.parse>>;+ pages: Array<ReturnType<typeof envelopePageSchema.parse>>;+ sender: SenderRow;+ signer: ReturnType<typeof signerRecordSchema.parse>;+ signers: Array<ReturnType<typeof signerRecordSchema.parse>>;+};++type SubmitSigningOptions = {+ database?: DbPool;+ requestMeta?: SigningRequestMeta;+};++const signingUnavailableStatusCodeMap: Record<+ SigningUnavailableResponse["state"],+ number+> = {+ "already-signed": 409,+ declined: 409,+ expired: 410,+ voided: 409,+};++export class SigningAccessError extends Error {+ readonly state: SigningUnavailableResponse["state"];+ readonly statusCode: number;++ constructor(+ state: SigningUnavailableResponse["state"],+ message = getSigningUnavailableMessage(state),+ ) {+ super(message);+ this.name = "SigningAccessError";+ this.state = state;+ this.statusCode = signingUnavailableStatusCodeMap[state];+ }+}++function getSigningUnavailableMessage(+ state: SigningUnavailableResponse["state"],+): string {+ switch (state) {+ case "already-signed":+ return "You've already signed.";+ case "declined":+ return "This envelope has been declined.";+ case "voided":+ return "This envelope has been voided.";+ case "expired":+ default:+ return "This link has expired.";+ }+}++function getSigningDocumentUrl(token: string): string {+ return `/api/signing/${encodeURIComponent(token)}/document`;+}++function getSigningSubmitUrl(token: string): string {+ return `/api/signing/${encodeURIComponent(token)}/submit`;+}++function getSigningDeclineUrl(token: string): string {+ return `/api/signing/${encodeURIComponent(token)}/decline`;+}++function getSigningDoneRedirectPath(+ token: string,+ envelopeTitle: string,+): string {+ const searchParams = new URLSearchParams();++ searchParams.set("title", envelopeTitle);++ return `/sign/${encodeURIComponent(token)}/done?${searchParams.toString()}`;+}++function normalizeSenderName(sender: SenderRow): string {+ return sender.name?.trim() ? sender.name : sender.email;+}++function getEnvelopeUrl(envelopeId: string): string {+ assertServiceConfig("app", APP_URL_ENV_KEYS, process.env);++ return new URL(`/envelopes/${envelopeId}`, getEnv().appUrl!).toString();+}++const RECIPIENT_DOWNLOAD_LINK_TTL_DAYS =+ RECIPIENT_DOWNLOAD_LINK_TTL_SECONDS / (24 * 60 * 60);++function buildCompletionSenderEmail(input: {+ envelopeId: string;+ envelopeTitle: string;+ senderEmail: string;+ senderName: string;+}) {+ const completedUrl = getEnvelopeUrl(input.envelopeId);+ const subject = `"${input.envelopeTitle}" is fully signed`;+ const textBody = [+ `Hi ${input.senderName},`,+ "",+ `"${input.envelopeTitle}" has been fully signed in SignuDoc.`,+ "The final signed PDF and certificate are ready in your dashboard.",+ "",+ "Review the completed envelope:",+ completedUrl,+ ].join("\n");+ const htmlBody = [+ `<p>Hi ${escapeHtml(input.senderName)},</p>`,+ `<p>“${escapeHtml(input.envelopeTitle)}” has been fully signed in SignuDoc.</p>`,+ "<p>The final signed PDF and certificate are ready in your dashboard.</p>",+ `<p><a href="${escapeHtml(completedUrl)}">Review the completed envelope</a></p>`,+ ].join("");+ const legalFooter = withUserEmailLegalFooter({+ htmlBody,+ textBody,+ });++ return {+ htmlBody: legalFooter.htmlBody,+ subject,+ template: "completion_notification" as const,+ textBody: legalFooter.textBody,+ to: input.senderEmail,+ };+}++function buildDeclineNotificationEmail(input: {+ declineReason?: string;+ envelopeId: string;+ envelopeTitle: string;+ senderEmail: string;+ senderName: string;+ signerEmail: string;+ signerName: string;+}) {+ const envelopeUrl = getEnvelopeUrl(input.envelopeId);+ const subject = `"${input.envelopeTitle}" was declined by ${input.signerName}`;+ const reasonLine = input.declineReason?.trim()+ ? `Reason provided: ${input.declineReason.trim()}`+ : null;+ const textBody = [+ `Hi ${input.senderName},`,+ "",+ `${input.signerName} (${input.signerEmail}) declined "${input.envelopeTitle}" in SignuDoc.`,+ ...(reasonLine ? ["", reasonLine] : []),+ "",+ "Review the envelope:",+ envelopeUrl,+ ].join("\n");+ const htmlBody = [+ `<p>Hi ${escapeHtml(input.senderName)},</p>`,+ `<p>${escapeHtml(input.signerName)} (${escapeHtml(input.signerEmail)}) declined “${escapeHtml(input.envelopeTitle)}” in SignuDoc.</p>`,+ reasonLine+ ? `<p><strong>Reason provided:</strong> ${escapeHtml(input.declineReason!.trim())}</p>`+ : "",+ `<p><a href="${escapeHtml(envelopeUrl)}">Review the envelope</a></p>`,+ ].join("");+ const legalFooter = withUserEmailLegalFooter({+ htmlBody,+ textBody,+ });++ return {+ htmlBody: legalFooter.htmlBody,+ subject,+ template: "decline_notification" as const,+ textBody: legalFooter.textBody,+ to: input.senderEmail,+ };+}++function buildCompletionSignerEmail(input: {+ evidenceDownloadUrl: string;+ envelopeId: string;+ envelopeTitle: string;+ senderName: string;+ signerEmail: string;+ signerName: string;+ signedDownloadUrl: string;+}) {+ const subject = `"${input.envelopeTitle}" is fully signed`;+ const textBody = [+ `Hi ${input.signerName},`,+ "",+ `"${input.envelopeTitle}" from ${input.senderName} has been fully signed in SignuDoc.`,+ "The completed document and redacted certificate are ready.",+ "",+ `Download links (available for ${RECIPIENT_DOWNLOAD_LINK_TTL_DAYS} days):`,+ `Signed PDF: ${input.signedDownloadUrl}`,+ `Redacted certificate: ${input.evidenceDownloadUrl}`,+ ].join("\n");+ const htmlBody = [+ `<p>Hi ${escapeHtml(input.signerName)},</p>`,+ `<p>“${escapeHtml(input.envelopeTitle)}” from ${escapeHtml(input.senderName)} has been fully signed in SignuDoc.</p>`,+ "<p>The completed document and redacted certificate are ready.</p>",+ `<p>Download links are available for ${RECIPIENT_DOWNLOAD_LINK_TTL_DAYS} days.</p>`,+ `<p><a href="${escapeHtml(input.signedDownloadUrl)}">Download signed PDF</a><br /><a href="${escapeHtml(input.evidenceDownloadUrl)}">Download redacted certificate</a></p>`,+ ].join("");+ const legalFooter = withUserEmailLegalFooter({+ htmlBody,+ textBody,+ });++ return {+ htmlBody: legalFooter.htmlBody,+ subject,+ template: "completion_notification" as const,+ textBody: legalFooter.textBody,+ to: input.signerEmail,+ };+}++function mapEnvelopeRow(row: SigningEnvelopeRow) {+ return envelopeRecordSchema.parse(row);+}++function mapSignerRow(row: SigningSignerRow) {+ return signerRecordSchema.parse(row);+}++function mapFieldRow(row: SigningFieldRow) {+ return fieldRecordSchema.parse({+ checked: row.checked,+ createdAt: row.createdAt,+ envelopeId: row.envelopeId,+ height: row.height,+ id: row.id,+ imageKey: row.imageKey,+ inputMethod: row.inputMethod,+ label: row.label ?? undefined,+ page: row.page,+ required: row.required,+ signerId: row.signerId,+ submittedAt: row.submittedAt,+ type: row.type,+ updatedAt: row.updatedAt,+ value: row.value ?? undefined,+ width: row.width,+ x: row.x,+ y: row.y,+ });+}++function mapPageRow(row: SigningPageRow) {+ return envelopePageSchema.parse(row);+}++async function getEnvelopeRow(+ envelopeId: string,+ database: DbExecutor,+): Promise<SigningEnvelopeRow | undefined> {+ return (+ (await queryOne<SigningEnvelopeRow>(+ database,+ `+ SELECT+ id,+ user_id AS "userId",+ title,+ status,+ source_pdf_key AS "sourcePdfKey",+ source_pdf_filename AS "sourcePdfFilename",+ source_pdf_size_bytes AS "sourcePdfSizeBytes",+ signed_pdf_key AS "signedPdfKey",+ evidence_key AS "evidenceKey",+ source_pdf_hash AS "sourcePdfHash",+ page_count AS "pageCount",+ sent_at AS "sentAt",+ completed_at AS "completedAt",+ declined_at AS "declinedAt",+ voided_at AS "voidedAt",+ created_at AS "createdAt",+ updated_at AS "updatedAt"+ FROM envelopes+ WHERE id = $1+ `,+ [envelopeId],+ )) ?? undefined+ );+}++async function listSignerRows(+ envelopeId: string,+ database: DbExecutor,+): Promise<SigningSignerRow[]> {+ return queryMany<SigningSignerRow>(+ database,+ `+ SELECT+ id,+ envelope_id AS "envelopeId",+ name,+ email,+ sign_order AS "signOrder",+ status,+ signing_token_hash AS "signingTokenHash",+ signing_token_expires_at AS "signingTokenExpiresAt",+ turn_started_at AS "turnStartedAt",+ last_notified_at AS "lastNotifiedAt",+ last_nudged_at AS "lastNudgedAt",+ signed_at AS "signedAt",+ declined_at AS "declinedAt",+ decline_reason AS "declineReason",+ created_at AS "createdAt",+ updated_at AS "updatedAt"+ FROM signers+ WHERE envelope_id = $1+ ORDER BY sign_order ASC, id ASC+ `,+ [envelopeId],+ );+}++async function getSignerRowBySigningTokenHash(+ tokenHash: string,+ database: DbExecutor,+): Promise<SigningSignerRow | null> {+ return queryOne<SigningSignerRow>(+ database,+ `+ SELECT+ id,+ envelope_id AS "envelopeId",+ name,+ email,+ sign_order AS "signOrder",+ status,+ signing_token_hash AS "signingTokenHash",+ signing_token_expires_at AS "signingTokenExpiresAt",+ turn_started_at AS "turnStartedAt",+ last_notified_at AS "lastNotifiedAt",+ last_nudged_at AS "lastNudgedAt",+ signed_at AS "signedAt",+ declined_at AS "declinedAt",+ decline_reason AS "declineReason",+ created_at AS "createdAt",+ updated_at AS "updatedAt"+ FROM signers+ WHERE signing_token_hash = $1+ LIMIT 1+ `,+ [tokenHash],+ );+}++async function listFieldRows(+ envelopeId: string,+ database: DbExecutor,+): Promise<SigningFieldRow[]> {+ return queryMany<SigningFieldRow>(+ database,+ `+ SELECT+ id,+ envelope_id AS "envelopeId",+ signer_id AS "signerId",+ type,+ page,+ x,+ y,+ width,+ height,+ required,+ label,+ input_method AS "inputMethod",+ value,+ image_key AS "imageKey",+ checked,+ submitted_at AS "submittedAt",+ created_at AS "createdAt",+ updated_at AS "updatedAt"+ FROM fields+ WHERE envelope_id = $1+ ORDER BY page ASC, created_at ASC, id ASC+ `,+ [envelopeId],+ );+}++async function listPageRows(+ envelopeId: string,+ database: DbExecutor,+): Promise<SigningPageRow[]> {+ return queryMany<SigningPageRow>(+ database,+ `+ SELECT+ id,+ envelope_id AS "envelopeId",+ page_number AS "pageNumber",+ width_pt AS "widthPt",+ height_pt AS "heightPt"+ FROM envelope_pages+ WHERE envelope_id = $1+ ORDER BY page_number ASC, id ASC+ `,+ [envelopeId],+ );+}++async function getSenderRow(+ userId: string,+ database: DbExecutor,+): Promise<SenderRow | undefined> {+ return (+ (await queryOne<SenderRow>(+ database,+ `+ SELECT+ name,+ FROM "user"+ WHERE id = $1+ `,+ [userId],+ )) ?? undefined+ );+}++async function recordViewedEventOnce(+ context: Pick<ResolvedSigningContext, "envelope" | "signer">,+ meta: SigningRequestMeta,+ database: DbPool,+): Promise<void> {+ await withTransaction(async (tx) => {+ const existing = await queryOne<{ id: string }>(+ tx,+ `+ SELECT id+ FROM audit_events+ WHERE envelope_id = $1+ AND event = 'viewed'+ AND metadata->>'signerId' = $2+ LIMIT 1+ `,+ [context.envelope.id, context.signer.id],+ );++ if (existing) {+ return;+ }++ await recordAuditEvent(+ {+ actorEmail: context.signer.email,+ actorType: "signer",+ envelopeId: context.envelope.id,+ event: "viewed",+ ipAddress: meta.ipAddress ?? null,+ metadata: {+ signerEmail: context.signer.email,+ signerId: context.signer.id,+ signerName: context.signer.name,+ signerOrder: context.signer.signOrder,+ },+ userAgent: meta.userAgent ?? null,+ },+ tx,+ );+ }, database);+}++async function buildImageDataUrl(+ imageKey: string,+ storageService: StorageService,+): Promise<string> {+ const imageObject = await storageService.getObject(imageKey);++ return `data:${imageObject.contentType ?? "image/png"};base64,${Buffer.from(imageObject.body).toString("base64")}`;+}++function formatLocalSigningDate(+ submittedAt: number,+ timezoneOffsetMinutes: number,+): string {+ const localDateTime = new Date(+ submittedAt * 1000 - timezoneOffsetMinutes * 60 * 1000,+ );++ return new Intl.DateTimeFormat("en-US", {+ day: "numeric",+ month: "long",+ timeZone: "UTC",+ year: "numeric",+ }).format(localDateTime);+}++function parsePngDataUrl(dataUrl: string): Uint8Array {+ const match = dataUrl+ .trim()+ .match(/^data:image\/png;base64,([a-z0-9+/=\s]+)$/i);++ if (!match?.[1]) {+ throw new SigningMutationError(+ "Drawn signatures must be submitted as PNG images.",+ 400,+ );+ }++ const base64Body = match[1].replace(/\s+/g, "");+ const paddingLength = base64Body.endsWith("==")+ ? 2+ : base64Body.endsWith("=")+ ? 1+ : 0;+ const decodedByteLength =+ Math.floor((base64Body.length * 3) / 4) - paddingLength;++ if (decodedByteLength > MAX_DRAWN_SIGNATURE_BYTES) {+ throw new SigningMutationError(+ "Drawn signature image data is too large.",+ 400,+ );+ }++ const imageBody = Buffer.from(base64Body, "base64");++ if (imageBody.byteLength === 0) {+ throw new SigningMutationError("Drawn signature image data is empty.", 400);+ }++ if (imageBody.byteLength > MAX_DRAWN_SIGNATURE_BYTES) {+ throw new SigningMutationError(+ "Drawn signature image data is too large.",+ 400,+ );+ }++ return new Uint8Array(imageBody);+}++function isFieldSubmissionComplete(+ field: ReturnType<typeof fieldRecordSchema.parse>,+ update: FieldPersistenceUpdate,+): boolean {+ if (!field.required) {+ return true;+ }++ switch (field.type) {+ case "signature":+ case "initials":+ case "date":+ return typeof update.submittedAt === "number";+ case "text":+ return typeof update.value === "string" && update.value.trim().length > 0;+ case "checkbox":+ return update.checked === true;+ default:+ return false;+ }+}++function buildSignedAuditEvent(input: {+ envelopeId: string;+ requestMeta: SigningRequestMeta;+ signer: ReturnType<typeof signerRecordSchema.parse>;+ submittedAt: number;+ timezoneOffsetMinutes: number;+}): AuditEventRecord {+ return {+ actorEmail: input.signer.email,+ actorType: "signer",+ createdAt: input.submittedAt,+ envelopeId: input.envelopeId,+ event: "signed",+ id: randomUUID(),+ ipAddress: input.requestMeta.ipAddress ?? null,+ metadata: {+ signerEmail: input.signer.email,+ signerId: input.signer.id,+ signerName: input.signer.name,+ signerOrder: input.signer.signOrder,+ timezoneOffsetMinutes: input.timezoneOffsetMinutes,+ },+ userAgent: input.requestMeta.userAgent ?? null,+ };+}++function buildDeclinedAuditEvent(input: {+ declinedAt: number;+ envelopeId: string;+ reason?: string;+ requestMeta: SigningRequestMeta;+ signer: ReturnType<typeof signerRecordSchema.parse>;+}): AuditEventRecord {+ return {+ actorEmail: input.signer.email,+ actorType: "signer",+ createdAt: input.declinedAt,+ envelopeId: input.envelopeId,+ event: "declined",+ id: randomUUID(),+ ipAddress: input.requestMeta.ipAddress ?? null,+ metadata: {+ ...(input.reason ? { reason: input.reason } : {}),+ signerEmail: input.signer.email,+ signerId: input.signer.id,+ signerName: input.signer.name,+ signerOrder: input.signer.signOrder,+ },+ userAgent: input.requestMeta.userAgent ?? null,+ };+}++function applyFieldUpdatesToRecords(+ fields: Array<ReturnType<typeof fieldRecordSchema.parse>>,+ fieldUpdates: Map<string, FieldPersistenceUpdate>,+ updatedAt: number,+) {+ return fields.map((field) => {+ if (!field.id) {+ return field;+ }++ const update = fieldUpdates.get(field.id);++ if (!update) {+ return field;+ }++ return fieldRecordSchema.parse({+ ...field,+ checked: update.checked,+ imageKey: update.imageKey,+ inputMethod: update.inputMethod,+ submittedAt: update.submittedAt,+ updatedAt,+ value: update.value,+ });+ });+}++function applyCurrentSignerCompletion(+ signers: Array<ReturnType<typeof signerRecordSchema.parse>>,+ currentSignerId: string,+ submittedAt: number,+) {+ return signers.map((signer) => {+ if (signer.id !== currentSignerId) {+ return signer;+ }++ return signerRecordSchema.parse({+ ...signer,+ signedAt: submittedAt,+ signingTokenExpiresAt: null,+ signingTokenHash: null,+ status: "signed",+ updatedAt: submittedAt,+ });+ });+}++function applyCurrentSignerDecline(+ signers: Array<ReturnType<typeof signerRecordSchema.parse>>,+ currentSignerId: string,+ declinedAt: number,+ reason?: string,+) {+ return signers.map((signer) => {+ if (signer.id !== currentSignerId) {+ return signer;+ }++ return signerRecordSchema.parse({+ ...signer,+ declineReason: reason ?? null,+ declinedAt,+ signingTokenExpiresAt: null,+ signingTokenHash: null,+ status: "declined",+ updatedAt: declinedAt,+ });+ });+}++async function sendCompletionEmails(input: {+ database?: DbExecutor;+ emailService: EmailService;+ envelopeId: string;+ envelopeTitle: string;+ sender: SenderRow;+ signers: Array<ReturnType<typeof signerRecordSchema.parse>>;+}) {+ const senderName = normalizeSenderName(input.sender);+ const issuedAt = Math.floor(Date.now() / 1000);+ const signerMessages = await Promise.all(+ input.signers.map(async (signer) => {+ if (!signer.id) {+ throw new SigningMutationError(+ "Completed signer records must include an id.",+ 500,+ );+ }++ const [signedLink, redactedEvidenceLink] = await Promise.all([+ createRecipientDownloadLink(+ {+ envelopeId: input.envelopeId,+ fileType: "signed",+ issuedAt,+ signerId: signer.id,+ },+ {+ database: input.database,+ },+ ),+ // Recipient certificate downloads resolve to the redacted certificate PDF.+ createRecipientDownloadLink(+ {+ envelopeId: input.envelopeId,+ fileType: "evidence",+ issuedAt,+ signerId: signer.id,+ },+ {+ database: input.database,+ },+ ),+ ]);++ return buildCompletionSignerEmail({+ envelopeId: input.envelopeId,+ envelopeTitle: input.envelopeTitle,+ evidenceDownloadUrl: redactedEvidenceLink.url,+ senderName,+ signedDownloadUrl: signedLink.url,+ signerEmail: signer.email,+ signerName: signer.name,+ });+ }),+ );+ const messages = [+ buildCompletionSenderEmail({+ envelopeId: input.envelopeId,+ envelopeTitle: input.envelopeTitle,+ senderEmail: input.sender.email,+ senderName,+ }),+ ...signerMessages,+ ];++ await input.emailService.sendBatch(messages, {+ idempotencyKey: `completion/${input.envelopeId}`,+ });+}++export class SigningMutationError extends Error {+ readonly statusCode: number;++ constructor(message: string, statusCode: number) {+ super(message);+ this.name = "SigningMutationError";+ this.statusCode = statusCode;+ }+}++async function resolveSigningContext(+ token: string,+ {+ database = getDb(),+ }: {+ database?: DbExecutor;+ } = {},+): Promise<ResolvedSigningContext> {+ const signerRow = await getSignerRowBySigningTokenHash(+ hashOpaqueToken(token),+ database,+ );++ if (!signerRow) {+ throw new SigningAccessError("expired");+ }++ const envelopeRow = await getEnvelopeRow(signerRow.envelopeId, database);++ if (!envelopeRow) {+ throw new SigningAccessError("expired");+ }++ if (envelopeRow.status === "voided") {+ throw new SigningAccessError("voided");+ }++ if (envelopeRow.status === "declined") {+ throw new SigningAccessError("declined");+ }++ const signers = (await listSignerRows(envelopeRow.id, database)).map(+ mapSignerRow,+ );+ const signer = signers.find((entry) => entry.id === signerRow.id);++ if (!signer) {+ throw new SigningAccessError("expired");+ }++ if (signer.status === "signed") {+ throw new SigningAccessError("already-signed");+ }++ if (typeof signer.signOrder !== "number") {+ throw new SigningAccessError("expired");+ }++ const now = Math.floor(Date.now() / 1000);+ const signingTokenExpiresAt = signer.signingTokenExpiresAt ?? null;++ if (+ envelopeRow.status !== "sent" ||+ signer.status !== "notified" ||+ signer.envelopeId !== envelopeRow.id ||+ signer.signingTokenHash !== signerRow.signingTokenHash ||+ (signingTokenExpiresAt !== null && signingTokenExpiresAt < now)+ ) {+ throw new SigningAccessError("expired");+ }++ const sender = await getSenderRow(envelopeRow.userId, database);++ if (!sender) {+ throw new SigningAccessError("expired");+ }++ return {+ envelope: mapEnvelopeRow(envelopeRow),+ fields: (await listFieldRows(envelopeRow.id, database)).map(mapFieldRow),+ pages: (await listPageRows(envelopeRow.id, database)).map(mapPageRow),+ sender,+ signer,+ signers,+ };+}++export async function getSigningPayloadForToken(+ token: string,+ {+ database = getDb(),+ requestMeta = {},+ }: {+ database?: DbPool;+ requestMeta?: SigningRequestMeta;+ } = {},+): Promise<SigningPayload> {+ const context = await resolveSigningContext(token, { database });+ const storageService = createStorageService();++ await recordViewedEventOnce(context, requestMeta, database);++ const signerNamesById = new Map(+ context.signers.map((signer) => [signer.id, signer.name] as const),+ );+ const signerOrdersById = new Map(+ context.signers.map((signer) => [signer.id, signer.signOrder] as const),+ );+ const currentSignerOrder = context.signer.signOrder ?? 0;++ const currentSignerFields = context.fields+ .filter((field) => field.signerId === context.signer.id)+ .map((field) => ({+ height: field.height,+ id: field.id,+ label: field.label,+ page: field.page,+ required: field.required,+ signerId: field.signerId,+ signerName: context.signer.name,+ type: field.type,+ width: field.width,+ x: field.x,+ y: field.y,+ }));++ const visibleFields = await Promise.all(+ context.fields+ .filter((field) => {+ const signerOrder = signerOrdersById.get(field.signerId);++ return (+ typeof signerOrder === "number" &&+ signerOrder < currentSignerOrder &&+ typeof field.submittedAt === "number"+ );+ })+ .map(async (field) => ({+ checked: field.checked ?? null,+ height: field.height,+ id: field.id,+ imageDataUrl: field.imageKey+ ? await buildImageDataUrl(field.imageKey, storageService)+ : null,+ inputMethod: field.inputMethod ?? null,+ label: field.label,+ page: field.page,+ required: field.required,+ signerId: field.signerId,+ signerName: signerNamesById.get(field.signerId) ?? "Signed field",+ submittedAt: field.submittedAt!,+ type: field.type,+ value: field.value ?? null,+ width: field.width,+ x: field.x,+ y: field.y,+ })),+ );++ return signingPayloadSchema.parse({+ currentSignerFields,+ declineUrl: getSigningDeclineUrl(token),+ documentUrl: getSigningDocumentUrl(token),+ envelopeId: context.envelope.id,+ envelopeTitle: context.envelope.title,+ pageCount: context.envelope.pageCount,+ pages: context.pages,+ senderName: normalizeSenderName(context.sender),+ signer: {+ email: context.signer.email,+ id: context.signer.id,+ name: context.signer.name,+ order: context.signer.signOrder,+ },+ state: "ready",+ submitUrl: getSigningSubmitUrl(token),+ visibleFields,+ });+}++export async function submitSigningForToken(+ token: string,+ input: unknown,+ { database = getDb(), requestMeta = {} }: SubmitSigningOptions = {},+): Promise<SigningSubmitResponse> {+ const parsedInput = signingSubmissionSchema.parse(input);+ const context = await resolveSigningContext(token, { database });+ const emailService = createEmailService();+ const storageService = createStorageService();+ const currentSignerId = context.signer.id;++ if (!currentSignerId) {+ throw new SigningMutationError(+ "This signing link is no longer active.",+ 409,+ );+ }++ const currentSignerFields = context.fields.filter(+ (+ field,+ ): field is ReturnType<typeof fieldRecordSchema.parse> & { id: string } =>+ field.signerId === currentSignerId && typeof field.id === "string",+ );++ if (currentSignerFields.length === 0) {+ throw new SigningMutationError(+ "No signable fields are assigned to this signer.",+ 400,+ );+ }++ const currentSignerFieldsById = new Map(+ currentSignerFields.map((field) => [field.id, field] as const),+ );+ const relevantSubmissions = new Map<string, SigningFieldSubmission>();++ for (const submission of parsedInput.fields) {+ const matchingField = currentSignerFieldsById.get(submission.fieldId);++ if (!matchingField || matchingField.type !== submission.type) {+ continue;+ }++ if (relevantSubmissions.has(submission.fieldId)) {+ throw new SigningMutationError(+ "Each field can only be submitted once.",+ 400,+ );+ }++ relevantSubmissions.set(submission.fieldId, submission);+ }++ const submittedAt = Math.floor(Date.now() / 1000);+ const localDateValue = formatLocalSigningDate(+ submittedAt,+ parsedInput.clientTimezoneOffsetMinutes,+ );+ const drawnSignatureUploads: Array<{+ body: Uint8Array;+ imageKey: string;+ }> = [];+ const fieldUpdates = new Map<string, FieldPersistenceUpdate>();++ for (const field of currentSignerFields) {+ const submission = relevantSubmissions.get(field.id);++ if (field.type === "signature" || field.type === "initials") {+ if (!submission) {+ fieldUpdates.set(field.id, {+ checked: null,+ fieldId: field.id,+ imageKey: null,+ inputMethod: null,+ submittedAt: null,+ value: null,+ });+ continue;+ }++ if (submission.type !== field.type) {+ continue;+ }++ if (submission.inputMethod === "typed") {+ fieldUpdates.set(field.id, {+ checked: null,+ fieldId: field.id,+ imageKey: null,+ inputMethod: "typed",+ submittedAt,+ value: submission.value,+ });+ continue;+ }++ const imageKey = buildSignatureImageKey({+ envelopeId: context.envelope.id,+ fieldId: field.id,+ userId: context.envelope.userId,+ });++ drawnSignatureUploads.push({+ body: parsePngDataUrl(submission.imageDataUrl),+ imageKey,+ });+ fieldUpdates.set(field.id, {+ checked: null,+ fieldId: field.id,+ imageKey,+ inputMethod: "drawn",+ submittedAt,+ value: null,+ });+ continue;+ }++ if (field.type === "date") {+ fieldUpdates.set(field.id, {+ checked: null,+ fieldId: field.id,+ imageKey: null,+ inputMethod: "auto",+ submittedAt,+ value: localDateValue,+ });+ continue;+ }++ if (field.type === "text") {+ const trimmedValue =+ submission?.type === "text" ? submission.value.trim() : null;++ fieldUpdates.set(field.id, {+ checked: null,+ fieldId: field.id,+ imageKey: null,+ inputMethod: null,+ submittedAt: trimmedValue ? submittedAt : null,+ value: trimmedValue,+ });+ continue;+ }++ const checkedValue =+ submission?.type === "checkbox" ? submission.checked : false;++ fieldUpdates.set(field.id, {+ checked: checkedValue,+ fieldId: field.id,+ imageKey: null,+ inputMethod: null,+ submittedAt,+ value: null,+ });+ }++ const missingRequiredField = currentSignerFields.find((field) => {+ const update = fieldUpdates.get(field.id);++ return !update || !isFieldSubmissionComplete(field, update);+ });++ if (missingRequiredField) {+ throw new SigningMutationError(+ "Complete all required fields before finishing.",+ 400,+ );+ }++ let signingStatePersisted = false;++ try {+ const currentSignerIndex = context.signers.findIndex(+ (signer) => signer.id === context.signer.id,+ );+ const nextSigner =+ currentSignerIndex >= 0+ ? context.signers[currentSignerIndex + 1]+ : undefined;+ let nextSignerLink: IssuedSigningLink | undefined;++ if (nextSigner) {+ if (nextSigner.status !== "pending") {+ throw new SigningMutationError(+ "Envelope routing is out of sync for the next signer.",+ 409,+ );+ }++ if (!nextSigner.id) {+ throw new SigningMutationError(+ "Envelope routing is out of sync for the next signer.",+ 500,+ );+ }++ nextSignerLink = await issueSigningLink({+ issuedAt: submittedAt,+ });+ }++ for (const upload of drawnSignatureUploads) {+ await storageService.putObject({+ body: upload.body,+ contentType: "image/png",+ key: upload.imageKey,+ });+ }++ const signedAuditEvent = buildSignedAuditEvent({+ envelopeId: context.envelope.id,+ requestMeta,+ signer: context.signer,+ submittedAt,+ timezoneOffsetMinutes: parsedInput.clientTimezoneOffsetMinutes,+ });++ if (nextSigner && nextSignerLink) {+ await withTransaction(async (tx) => {+ await tx.query(+ `+ UPDATE envelopes+ SET updated_at = $1+ WHERE id = $2+ AND status = 'sent'+ `,+ [submittedAt, context.envelope.id],+ );++ for (const update of fieldUpdates.values()) {+ const result = await tx.query(+ `+ UPDATE fields+ SET+ input_method = $1,+ value = $2,+ image_key = $3,+ checked = $4,+ submitted_at = $5,+ updated_at = $6+ WHERE id = $7+ AND envelope_id = $8+ AND signer_id = $9+ `,+ [+ update.inputMethod,+ update.value,+ update.imageKey,+ update.checked,+ update.submittedAt,+ submittedAt,+ update.fieldId,+ context.envelope.id,+ currentSignerId,+ ],+ );++ if (result.rowCount !== 1) {+ throw new SigningMutationError(+ "Unable to save one or more field values.",+ 500,+ );+ }+ }++ const signedSignerResult = await tx.query(+ `+ UPDATE signers+ SET+ status = 'signed',+ signing_token_hash = NULL,+ signing_token_expires_at = NULL,+ signed_at = $1,+ updated_at = $2+ WHERE id = $3+ AND envelope_id = $4+ AND status = 'notified'+ `,+ [submittedAt, submittedAt, currentSignerId, context.envelope.id],+ );++ if (signedSignerResult.rowCount !== 1) {+ throw new SigningMutationError(+ "This signing link is no longer active.",+ 409,+ );+ }++ const nextSignerResult = await tx.query(+ `+ UPDATE signers+ SET+ status = 'notified',+ signing_token_hash = $1,+ signing_token_expires_at = $2,+ turn_started_at = $3,+ last_notified_at = $4,+ updated_at = $5+ WHERE id = $6+ AND envelope_id = $7+ AND status = 'pending'+ `,+ [+ nextSignerLink.tokenHash,+ nextSignerLink.exp,+ submittedAt,+ submittedAt,+ submittedAt,+ nextSigner.id,+ context.envelope.id,+ ],+ );++ if (nextSignerResult.rowCount !== 1) {+ throw new SigningMutationError(+ "Unable to activate the next signer for this envelope.",+ 500,+ );+ }++ await recordAuditEvent(+ {+ actorEmail: signedAuditEvent.actorEmail,+ actorType: signedAuditEvent.actorType,+ createdAt: signedAuditEvent.createdAt,+ envelopeId: signedAuditEvent.envelopeId,+ event: signedAuditEvent.event,+ ipAddress: signedAuditEvent.ipAddress,+ metadata: signedAuditEvent.metadata,+ userAgent: signedAuditEvent.userAgent,+ },+ tx,+ );+ }, database);+ signingStatePersisted = true;++ try {+ await emailService.send(+ buildSigningInvitationEmail({+ envelopeTitle: context.envelope.title,+ senderName: normalizeSenderName(context.sender),+ signerEmail: nextSigner.email,+ signerName: nextSigner.name,+ signingUrl: nextSignerLink.url,+ }),+ );+ } catch (error) {+ console.error(+ `Failed to send next signer invitation for envelope ${context.envelope.id} to ${nextSigner.email}:`,+ error,+ );+ }++ return signingSubmitResponseSchema.parse({+ envelopeId: context.envelope.id,+ redirectPath: getSigningDoneRedirectPath(token, context.envelope.title),+ submittedAt,+ });+ }++ const completedFields = applyFieldUpdatesToRecords(+ context.fields,+ fieldUpdates,+ submittedAt,+ );+ const completedSigners = applyCurrentSignerCompletion(+ context.signers,+ currentSignerId,+ submittedAt,+ );+ const sourcePdfHead = await storageService.headObject(+ context.envelope.sourcePdfKey,+ );++ if (!sourcePdfHead.exists) {+ throw new SigningMutationError(+ "The source document for this envelope could not be found.",+ 500,+ );+ }++ const finalArtifacts = await finalizeEnvelope(+ {+ auditEvents: [+ ...(await listAuditEventsForEnvelope(context.envelope.id, database)),+ signedAuditEvent,+ ],+ envelope: context.envelope,+ fields: completedFields,+ signers: completedSigners,+ sourcePdf: {+ bucketName: sourcePdfHead.bucketName,+ key: context.envelope.sourcePdfKey,+ },+ },+ {+ storageService,+ },+ );+ const storageIdentity = {+ envelopeId: context.envelope.id,+ userId: context.envelope.userId,+ };+ const storedArtifactKeys = [+ buildEnvelopeSignedPdfKey(storageIdentity),+ buildEnvelopeCertificateKey({+ ...storageIdentity,+ audience: "internal",+ }),+ buildEnvelopeCertificateKey({+ ...storageIdentity,+ audience: "recipient",+ }),+ ];++ try {+ await withTransaction(async (tx) => {+ for (const update of fieldUpdates.values()) {+ const result = await tx.query(+ `+ UPDATE fields+ SET+ input_method = $1,+ value = $2,+ image_key = $3,+ checked = $4,+ submitted_at = $5,+ updated_at = $6+ WHERE id = $7+ AND envelope_id = $8+ AND signer_id = $9+ `,+ [+ update.inputMethod,+ update.value,+ update.imageKey,+ update.checked,+ update.submittedAt,+ submittedAt,+ update.fieldId,+ context.envelope.id,+ currentSignerId,+ ],+ );++ if (result.rowCount !== 1) {+ throw new SigningMutationError(+ "Unable to save one or more field values.",+ 500,+ );+ }+ }++ const signedSignerResult = await tx.query(+ `+ UPDATE signers+ SET+ status = 'signed',+ signing_token_hash = NULL,+ signing_token_expires_at = NULL,+ signed_at = $1,+ updated_at = $2+ WHERE id = $3+ AND envelope_id = $4+ AND status = 'notified'+ `,+ [submittedAt, submittedAt, currentSignerId, context.envelope.id],+ );++ if (signedSignerResult.rowCount !== 1) {+ throw new SigningMutationError(+ "This signing link is no longer active.",+ 409,+ );+ }++ const completedEnvelopeResult = await tx.query(+ `+ UPDATE envelopes+ SET+ status = 'completed',+ signed_pdf_key = $1,+ evidence_key = $2,+ completed_at = $3,+ updated_at = $4+ WHERE id = $5+ AND status = 'sent'+ `,+ [+ finalArtifacts.signedPdf.key,+ finalArtifacts.certificate.key,+ finalArtifacts.generatedAt,+ finalArtifacts.generatedAt,+ context.envelope.id,+ ],+ );++ if (completedEnvelopeResult.rowCount !== 1) {+ throw new SigningMutationError(+ "Unable to finalize this completed envelope.",+ 500,+ );+ }++ await recordAuditEvent(+ {+ actorEmail: signedAuditEvent.actorEmail,+ actorType: signedAuditEvent.actorType,+ createdAt: signedAuditEvent.createdAt,+ envelopeId: signedAuditEvent.envelopeId,+ event: signedAuditEvent.event,+ ipAddress: signedAuditEvent.ipAddress,+ metadata: signedAuditEvent.metadata,+ userAgent: signedAuditEvent.userAgent,+ },+ tx,+ );++ await recordAuditEvent(+ {+ actorEmail: null,+ actorType: "system",+ createdAt: finalArtifacts.generatedAt,+ envelopeId: context.envelope.id,+ event: "completed",+ metadata: null,+ },+ tx,+ );+ }, database);+ signingStatePersisted = true;+ } catch (error) {+ await Promise.all(+ storedArtifactKeys.map((key) =>+ storageService.deleteObject(key).catch(() => undefined),+ ),+ );+ throw error;+ }++ try {+ await sendCompletionEmails({+ database,+ emailService,+ envelopeId: context.envelope.id,+ envelopeTitle: context.envelope.title,+ sender: context.sender,+ signers: completedSigners,+ });+ } catch (error) {+ console.error(+ `Failed to send completion emails for envelope ${context.envelope.id}:`,+ error,+ );+ }++ return signingSubmitResponseSchema.parse({+ envelopeId: context.envelope.id,+ redirectPath: getSigningDoneRedirectPath(token, context.envelope.title),+ submittedAt,+ });+ } catch (error) {+ if (!signingStatePersisted) {+ await Promise.all(+ drawnSignatureUploads.map((upload) =>+ storageService.deleteObject(upload.imageKey).catch(() => undefined),+ ),+ );+ }++ throw error;+ }+}++export async function declineSigningForToken(+ token: string,+ input: unknown,+ { database = getDb(), requestMeta = {} }: SubmitSigningOptions = {},+): Promise<SigningDeclineResponse> {+ const parsedInput = declineEnvelopeSchema.parse(input);+ const context = await resolveSigningContext(token, { database });+ const emailService = createEmailService();+ const storageService = createStorageService();+ const currentSignerId = context.signer.id;++ if (!currentSignerId) {+ throw new SigningMutationError(+ "This signing link is no longer active.",+ 409,+ );+ }++ const declinedAt = Math.floor(Date.now() / 1000);+ const declineReason = parsedInput.reason?.trim() || undefined;+ const sourcePdfHead = await storageService.headObject(+ context.envelope.sourcePdfKey,+ );++ if (!sourcePdfHead.exists) {+ throw new SigningMutationError(+ "The source document for this envelope could not be found.",+ 500,+ );+ }++ const declinedAuditEvent = buildDeclinedAuditEvent({+ declinedAt,+ envelopeId: context.envelope.id,+ reason: declineReason,+ requestMeta,+ signer: context.signer,+ });+ const storageIdentity = {+ envelopeId: context.envelope.id,+ userId: context.envelope.userId,+ };+ const canonicalCertificate = {+ bucketName: sourcePdfHead.bucketName,+ key: buildEnvelopeCertificateKey({+ ...storageIdentity,+ audience: "internal",+ }),+ };+ const declinedEnvelope = envelopeRecordSchema.parse({+ ...context.envelope,+ declinedAt,+ evidenceKey: canonicalCertificate.key,+ status: "declined",+ updatedAt: declinedAt,+ });+ const declinedSigners = applyCurrentSignerDecline(+ context.signers,+ currentSignerId,+ declinedAt,+ declineReason,+ );+ const auditEvents = [+ ...(await listAuditEventsForEnvelope(context.envelope.id, database)),+ declinedAuditEvent,+ ];+ const storedCertificateKeys: string[] = [];+ let certificate: { key: string };++ try {+ certificate = await storeEnvelopeCertificatePdf(+ {+ auditEvents,+ certificate: canonicalCertificate,+ envelope: declinedEnvelope,+ signers: declinedSigners,+ },+ {+ storageService,+ },+ );+ storedCertificateKeys.push(certificate.key);++ const recipientCertificate = await storeRecipientEnvelopeCertificatePdf(+ {+ auditEvents,+ certificate: {+ bucketName: sourcePdfHead.bucketName,+ key: buildEnvelopeCertificateKey({+ ...storageIdentity,+ audience: "recipient",+ }),+ },+ envelope: declinedEnvelope,+ signers: declinedSigners,+ },+ {+ storageService,+ },+ );+ storedCertificateKeys.push(recipientCertificate.key);+ } catch (error) {+ await Promise.all(+ storedCertificateKeys.map((key) =>+ storageService.deleteObject(key).catch(() => undefined),+ ),+ );+ throw error;+ }++ try {+ await withTransaction(async (tx) => {+ const declinedSignerResult = await tx.query(+ `+ UPDATE signers+ SET+ status = 'declined',+ signing_token_hash = NULL,+ signing_token_expires_at = NULL,+ declined_at = $1,+ decline_reason = $2,+ updated_at = $3+ WHERE id = $4+ AND envelope_id = $5+ AND status = 'notified'+ `,+ [+ declinedAt,+ declineReason ?? null,+ declinedAt,+ currentSignerId,+ context.envelope.id,+ ],+ );++ if (declinedSignerResult.rowCount !== 1) {+ throw new SigningMutationError(+ "This signing link is no longer active.",+ 409,+ );+ }++ const declinedEnvelopeResult = await tx.query(+ `+ UPDATE envelopes+ SET+ status = 'declined',+ evidence_key = $1,+ declined_at = $2,+ updated_at = $3+ WHERE id = $4+ AND status = 'sent'+ `,+ [certificate.key, declinedAt, declinedAt, context.envelope.id],+ );++ if (declinedEnvelopeResult.rowCount !== 1) {+ throw new SigningMutationError(+ "This signing link is no longer active.",+ 409,+ );+ }++ await recordAuditEvent(+ {+ actorEmail: declinedAuditEvent.actorEmail,+ actorType: declinedAuditEvent.actorType,+ createdAt: declinedAuditEvent.createdAt,+ envelopeId: declinedAuditEvent.envelopeId,+ event: declinedAuditEvent.event,+ ipAddress: declinedAuditEvent.ipAddress,+ metadata: declinedAuditEvent.metadata,+ userAgent: declinedAuditEvent.userAgent,+ },+ tx,+ );+ }, database);+ } catch (error) {+ await Promise.all(+ storedCertificateKeys.map((key) =>+ storageService.deleteObject(key).catch(() => undefined),+ ),+ );+ throw error;+ }++ try {+ await emailService.send(+ buildDeclineNotificationEmail({+ declineReason,+ envelopeId: context.envelope.id,+ envelopeTitle: context.envelope.title,+ senderEmail: context.sender.email,+ senderName: normalizeSenderName(context.sender),+ signerEmail: context.signer.email,+ signerName: context.signer.name,+ }),+ );+ } catch (error) {+ console.error(+ `Failed to send decline notification for envelope ${context.envelope.id}:`,+ error,+ );+ }++ return signingDeclineResponseSchema.parse({+ declinedAt,+ envelopeId: context.envelope.id,+ state: "declined",+ });+}++export async function getSigningDocumentForToken(+ token: string,+ {+ database = getDb(),+ }: {+ database?: DbPool;+ } = {},+) {+ const context = await resolveSigningContext(token, { database });+ const storageService = createStorageService();++ return storageService.getObject(context.envelope.sourcePdfKey);+}diff --git a/src/lib/types/domain.ts b/src/lib/types/domain.tsnew file mode 100644index 0000000..73555c2--- /dev/null+++ b/src/lib/types/domain.ts@@ -0,0 +1,67 @@+export const MAX_SIGNERS_PER_ENVELOPE = 10;+export const MAX_UPLOAD_SIZE_BYTES = 20 * 1024 * 1024;+export const SIGNING_LINK_TTL_SECONDS = 7 * 24 * 60 * 60;+export const RECIPIENT_DOWNLOAD_LINK_TTL_SECONDS = 7 * 24 * 60 * 60;+export const MANUAL_NUDGE_COOLDOWN_SECONDS = 24 * 60 * 60;++export const envelopeStatuses = [+ "draft",+ "sent",+ "completed",+ "declined",+ "voided",+] as const;++export const signerStatuses = [+ "pending",+ "notified",+ "signed",+ "declined",+] as const;++export const fieldTypes = [+ "signature",+ "initials",+ "date",+ "text",+ "checkbox",+] as const;++export const fieldInputMethods = ["typed", "drawn", "auto"] as const;++export const auditEventTypes = [+ "created",+ "sent",+ "viewed",+ "signed",+ "declined",+ "reminded_manual",+ "completed",+ "voided",+] as const;++export const auditActorTypes = ["sender", "signer", "system"] as const;++export const downloadFileTypes = ["signed", "evidence"] as const;++export const emailTemplateKinds = [+ "account_closure_request",+ "contact_form",+ "email_verification",+ "signing_invitation",+ "change_email_confirmation",+ "manual_nudge",+ "completion_notification",+ "decline_notification",+ "void_notification",+ "password_reset",+] as const;++export type EnvelopeStatus = (typeof envelopeStatuses)[number];+export type SignerStatus = (typeof signerStatuses)[number];+export type FieldType = (typeof fieldTypes)[number];+export type FieldInputMethod = (typeof fieldInputMethods)[number];+export type AuditEventType = (typeof auditEventTypes)[number];+export type AuditActorType = (typeof auditActorTypes)[number];+export type DownloadFileType = (typeof downloadFileTypes)[number];+export type EmailTemplateKind = (typeof emailTemplateKinds)[number];diff --git a/src/lib/utils/env.ts b/src/lib/utils/env.tsnew file mode 100644index 0000000..b593dd5--- /dev/null+++ b/src/lib/utils/env.ts@@ -0,0 +1,128 @@+export type EnvSource = Readonly<Record<string, string | undefined>>;++export class MissingEnvError extends Error {+ constructor(variableName: string) {+ super(`Missing required environment variable: ${variableName}`);+ this.name = "MissingEnvError";+ }+}++function readEnv(env: EnvSource, variableName: string): string | undefined {+ const value = env[variableName];++ if (typeof value !== "string") {+ return undefined;+ }++ const trimmedValue = value.trim();++ return trimmedValue.length > 0 ? trimmedValue : undefined;+}++function isLocalhostUrl(value: string): boolean {+ try {+ const parsedUrl = new URL(value);++ return (+ parsedUrl.hostname === "localhost" ||+ parsedUrl.hostname === "127.0.0.1" ||+ parsedUrl.hostname === "::1"+ );+ } catch {+ return false;+ }+}++function assertProductionHttpsUrl(+ variableName: string,+ value: string | undefined,+) {+ if (!value) {+ throw new MissingEnvError(variableName);+ }++ let parsedUrl: URL;++ try {+ parsedUrl = new URL(value);+ } catch {+ throw new Error(+ `${variableName} must be a valid absolute URL in production.`,+ );+ }++ if (parsedUrl.protocol !== "https:") {+ throw new Error(`${variableName} must use HTTPS in production.`);+ }++ if (isLocalhostUrl(value)) {+ throw new Error(`${variableName} must not use localhost in production.`);+ }+}++function assertStrongSecret(+ variableName: string,+ value: string | undefined,+ minimumLength = 32,+) {+ if (!value) {+ throw new MissingEnvError(variableName);+ }++ if (value.length < minimumLength) {+ throw new Error(+ `${variableName} must be at least ${String(minimumLength)} characters in production.`,+ );+ }+}++function assertProductionEnv(+ appEnv: ReturnType<typeof getEnv>,+ env: EnvSource,+) {+ if (env.NODE_ENV !== "production") {+ return;+ }++ assertProductionHttpsUrl("APP_URL", appEnv.appUrl);+ assertProductionHttpsUrl("BETTER_AUTH_URL", appEnv.auth.betterAuthUrl);+ assertStrongSecret("BETTER_AUTH_SECRET", appEnv.auth.betterAuthSecret);+}++export function hasEnv(+ variableName: string,+ env: EnvSource = process.env,+): boolean {+ return readEnv(env, variableName) !== undefined;+}++export function getEnv(env: EnvSource = process.env) {+ const appEnv = {+ databaseUrl: readEnv(env, "DATABASE_URL"),+ appUrl: readEnv(env, "APP_URL"),+ auth: {+ betterAuthSecret: readEnv(env, "BETTER_AUTH_SECRET"),+ betterAuthUrl: readEnv(env, "BETTER_AUTH_URL"),+ },+ email: {+ apiKey: readEnv(env, "RESEND_API_KEY"),+ senderAddress: readEnv(env, "RESEND_FROM_EMAIL"),+ supportAddress: readEnv(env, "SUPPORT_EMAIL"),+ },+ internal: {+ retentionJobSecret: readEnv(env, "RETENTION_JOB_SECRET"),+ },+ storage: {+ accountId: readEnv(env, "R2_ACCOUNT_ID"),+ accessKeyId: readEnv(env, "R2_ACCESS_KEY_ID"),+ bucketName: readEnv(env, "R2_BUCKET_NAME"),+ secretAccessKey: readEnv(env, "R2_SECRET_ACCESS_KEY"),+ },+ };++ assertProductionEnv(appEnv, env);++ return appEnv;+}++export type AppEnv = ReturnType<typeof getEnv>;diff --git a/src/lib/utils/html.ts b/src/lib/utils/html.tsnew file mode 100644index 0000000..fdbfc0b--- /dev/null+++ b/src/lib/utils/html.ts@@ -0,0 +1,8 @@+export function escapeHtml(value: string): string {+ return value+ .replaceAll("&", "&")+ .replaceAll("<", "<")+ .replaceAll(">", ">")+ .replaceAll('"', """)+ .replaceAll("'", "'");+}diff --git a/src/lib/utils/pdf-coords.ts b/src/lib/utils/pdf-coords.tsnew file mode 100644index 0000000..641852b--- /dev/null+++ b/src/lib/utils/pdf-coords.ts@@ -0,0 +1,182 @@+import type { EnvelopePageRecord } from "../schemas/envelope.ts";++export type NormalizedFieldRect = {+ height: number;+ width: number;+ x: number;+ y: number;+};++export type PdfFieldRect = {+ heightPt: number;+ widthPt: number;+ xPt: number;+ yPt: number;+};++export type FieldResizeHandle =+ | "bottom-left"+ | "bottom-right"+ | "top-left"+ | "top-right";++type RelativeFieldRect = {+ height: number;+ width: number;+ x: number;+ y: number;+};++export function clampNormalizedFieldRect(+ rect: NormalizedFieldRect,+): NormalizedFieldRect {+ return clampFieldRect(rect);+}++export function placeFieldAtViewportPoint(input: {+ clientX: number;+ clientY: number;+ fieldHeight: number;+ fieldWidth: number;+ viewportHeight: number;+ viewportWidth: number;+}): NormalizedFieldRect {+ const centeredRect = {+ height: input.fieldHeight,+ width: input.fieldWidth,+ x: input.clientX / input.viewportWidth - input.fieldWidth / 2,+ y: input.clientY / input.viewportHeight - input.fieldHeight / 2,+ };++ return clampNormalizedFieldRect(centeredRect);+}++export function normalizedRectToPdfRect(+ rect: NormalizedFieldRect,+ page: Pick<EnvelopePageRecord, "heightPt" | "widthPt">,+): PdfFieldRect {+ const normalizedRect = clampNormalizedFieldRect(rect);+ const widthPt = normalizedRect.width * page.widthPt;+ const heightPt = normalizedRect.height * page.heightPt;++ return {+ heightPt,+ widthPt,+ xPt: normalizedRect.x * page.widthPt,+ yPt:+ page.heightPt -+ (normalizedRect.y + normalizedRect.height) * page.heightPt,+ };+}++export function moveFieldRect(input: {+ deltaX: number;+ deltaY: number;+ maxCoordinate?: number;+ rect: RelativeFieldRect;+}): RelativeFieldRect {+ const { deltaX, deltaY, maxCoordinate = 1, rect } = input;++ return clampFieldRect(+ {+ ...rect,+ x: rect.x + deltaX,+ y: rect.y + deltaY,+ },+ maxCoordinate,+ );+}++export function resizeFieldRectFromHandle(input: {+ corner: FieldResizeHandle;+ deltaX: number;+ deltaY: number;+ maxCoordinate?: number;+ minHeight: number;+ minWidth: number;+ rect: RelativeFieldRect;+}): RelativeFieldRect {+ const {+ corner,+ deltaX,+ deltaY,+ maxCoordinate = 1,+ minHeight,+ minWidth,+ rect,+ } = input;+ const left = rect.x;+ const top = rect.y;+ const right = rect.x + rect.width;+ const bottom = rect.y + rect.height;++ switch (corner) {+ case "top-left":+ return clampFieldRect(+ {+ height: bottom - clamp(top + deltaY, 0, bottom - minHeight),+ width: right - clamp(left + deltaX, 0, right - minWidth),+ x: clamp(left + deltaX, 0, right - minWidth),+ y: clamp(top + deltaY, 0, bottom - minHeight),+ },+ maxCoordinate,+ );+ case "top-right": {+ const nextTop = clamp(top + deltaY, 0, bottom - minHeight);+ const nextRight = clamp(right + deltaX, left + minWidth, maxCoordinate);++ return clampFieldRect(+ {+ height: bottom - nextTop,+ width: nextRight - left,+ x: left,+ y: nextTop,+ },+ maxCoordinate,+ );+ }+ case "bottom-left": {+ const nextLeft = clamp(left + deltaX, 0, right - minWidth);+ const nextBottom = clamp(bottom + deltaY, top + minHeight, maxCoordinate);++ return clampFieldRect(+ {+ height: nextBottom - top,+ width: right - nextLeft,+ x: nextLeft,+ y: top,+ },+ maxCoordinate,+ );+ }+ case "bottom-right":+ return clampFieldRect(+ {+ height: clamp(bottom + deltaY, top + minHeight, maxCoordinate) - top,+ width: clamp(right + deltaX, left + minWidth, maxCoordinate) - left,+ x: left,+ y: top,+ },+ maxCoordinate,+ );+ }+}++function clampFieldRect(+ rect: RelativeFieldRect,+ maxCoordinate = 1,+): RelativeFieldRect {+ const width = clamp(rect.width, 0.000001, maxCoordinate);+ const height = clamp(rect.height, 0.000001, maxCoordinate);++ return {+ height,+ width,+ x: clamp(rect.x, 0, maxCoordinate - width),+ y: clamp(rect.y, 0, maxCoordinate - height),+ };+}++function clamp(value: number, min: number, max: number) {+ return Math.min(Math.max(value, min), max);+}diff --git a/src/types/pdfjs-dist.d.ts b/src/types/pdfjs-dist.d.tsnew file mode 100644index 0000000..a55a57f--- /dev/null+++ b/src/types/pdfjs-dist.d.ts@@ -0,0 +1,2 @@+declare module "pdfjs-dist/build/pdf.mjs";+declare module "pdfjs-dist/legacy/build/pdf.mjs";diff --git a/supabase/config.toml b/supabase/config.tomlnew file mode 100644index 0000000..2b50db3--- /dev/null+++ b/supabase/config.toml@@ -0,0 +1,22 @@+project_id = "signudoc"++[db]+major_version = 17++[db.seed]+enabled = false++[auth]+enabled = false++[realtime]+enabled = false++[storage]+enabled = false++[edge_runtime]+enabled = false++[inbucket]+enabled = falsediff --git a/supabase/migrations/20260325160428_init.sql b/supabase/migrations/20260325160428_init.sqlnew file mode 100644index 0000000..1323d45--- /dev/null+++ b/supabase/migrations/20260325160428_init.sql@@ -0,0 +1,225 @@+create table if not exists public."user" (+ id text primary key,+ name text not null,+ email text not null unique,+ "emailVerified" boolean not null default false,+ image text,+ "createdAt" timestamptz not null default current_timestamp,+ "updatedAt" timestamptz not null default current_timestamp+);++create table if not exists public.session (+ id text primary key,+ "expiresAt" timestamptz not null,+ token text not null unique,+ "createdAt" timestamptz not null default current_timestamp,+ "updatedAt" timestamptz not null default current_timestamp,+ "ipAddress" text,+ "userAgent" text,+ "userId" text not null references public."user"(id) on delete cascade+);++create table if not exists public.account (+ id text primary key,+ "accountId" text not null,+ "providerId" text not null,+ "userId" text not null references public."user"(id) on delete cascade,+ "accessToken" text,+ "refreshToken" text,+ "idToken" text,+ "accessTokenExpiresAt" timestamptz,+ "refreshTokenExpiresAt" timestamptz,+ scope text,+ password text,+ "createdAt" timestamptz not null default current_timestamp,+ "updatedAt" timestamptz not null default current_timestamp+);++create table if not exists public.verification (+ id text primary key,+ identifier text not null,+ value text not null,+ "expiresAt" timestamptz not null,+ "createdAt" timestamptz not null default current_timestamp,+ "updatedAt" timestamptz not null default current_timestamp+);++create table if not exists public.envelopes (+ id text primary key,+ user_id text not null references public."user"(id) on delete cascade,+ title text not null,+ status text not null default 'draft'+ check (status in ('draft', 'sent', 'completed', 'declined', 'voided')),+ source_pdf_key text not null,+ source_pdf_filename text not null,+ source_pdf_size_bytes bigint not null check (source_pdf_size_bytes > 0),+ page_count integer not null check (page_count > 0),+ signed_pdf_key text,+ evidence_key text,+ source_pdf_hash text not null check (length(source_pdf_hash) = 64),+ sent_at bigint,+ completed_at bigint,+ declined_at bigint,+ voided_at bigint,+ created_at bigint not null default (extract(epoch from now())::bigint),+ updated_at bigint not null default (extract(epoch from now())::bigint)+);++create table if not exists public.envelope_pages (+ id text primary key,+ envelope_id text not null references public.envelopes(id) on delete cascade,+ page_number integer not null check (page_number > 0),+ width_pt real not null check (width_pt > 0),+ height_pt real not null check (height_pt > 0),+ unique (envelope_id, page_number)+);++create table if not exists public.signers (+ id text primary key,+ envelope_id text not null references public.envelopes(id) on delete cascade,+ name text not null,+ email text not null,+ sign_order integer not null check (sign_order > 0),+ status text not null default 'pending'+ check (status in ('pending', 'notified', 'signed', 'declined')),+ signing_token_hash text,+ signing_token_expires_at bigint,+ turn_started_at bigint,+ last_notified_at bigint,+ last_nudged_at bigint,+ signed_at bigint,+ declined_at bigint,+ decline_reason text,+ created_at bigint not null default (extract(epoch from now())::bigint),+ updated_at bigint not null default (extract(epoch from now())::bigint),+ constraint signers_id_envelope_unique unique (id, envelope_id),+ constraint signers_envelope_order_unique unique (envelope_id, sign_order)+);++create table if not exists public.recipient_download_tokens (+ token_hash text primary key check (length(token_hash) = 64),+ envelope_id text not null,+ signer_id text not null,+ file_type text not null check (file_type in ('signed', 'evidence')),+ expires_at bigint not null,+ created_at bigint not null default (extract(epoch from now())::bigint),+ constraint recipient_download_tokens_signer_envelope_fk+ foreign key (signer_id, envelope_id)+ references public.signers(id, envelope_id)+ on delete cascade,+ constraint recipient_download_tokens_signer_file_unique+ unique (envelope_id, signer_id, file_type),+ check (expires_at >= created_at)+);++create table if not exists public.fields (+ id text primary key,+ envelope_id text not null references public.envelopes(id) on delete cascade,+ signer_id text not null,+ type text not null+ check (type in ('signature', 'initials', 'date', 'text', 'checkbox')),+ page integer not null check (page > 0),+ x real not null check (x >= 0 and x <= 1),+ y real not null check (y >= 0 and y <= 1),+ width real not null check (width > 0 and width <= 1),+ height real not null check (height > 0 and height <= 1),+ required boolean not null default true,+ label text,+ input_method text+ check (input_method is null or input_method in ('typed', 'drawn', 'auto')),+ value text,+ image_key text,+ checked boolean,+ submitted_at bigint,+ created_at bigint not null default (extract(epoch from now())::bigint),+ updated_at bigint not null default (extract(epoch from now())::bigint),+ check (x + width <= 1.000001),+ check (y + height <= 1.000001),+ constraint fields_signer_envelope_fk+ foreign key (signer_id, envelope_id)+ references public.signers(id, envelope_id)+ on delete cascade+);++create table if not exists public.audit_events (+ id text primary key,+ envelope_id text not null references public.envelopes(id) on delete cascade,+ event text not null+ check (event in (+ 'created',+ 'sent',+ 'viewed',+ 'signed',+ 'declined',+ 'reminded_manual',+ 'completed',+ 'voided'+ )),+ actor_type text not null+ check (actor_type in ('sender', 'signer', 'system')),+ actor_email text,+ ip_address text,+ user_agent text,+ metadata jsonb,+ created_at bigint not null default (extract(epoch from now())::bigint)+);++create table if not exists public.account_closure_requests (+ user_id text primary key references public."user"(id) on delete cascade,+ requested_at bigint not null,+ export_expires_at bigint not null,+ purge_after_at bigint not null,+ updated_at bigint not null,+ check (export_expires_at >= requested_at),+ check (purge_after_at >= export_expires_at)+);++create index if not exists account_userid_idx+ on public.account ("userId");++create index if not exists session_userid_idx+ on public.session ("userId");++create index if not exists verification_identifier_idx+ on public.verification (identifier);++create index if not exists idx_envelopes_user_created_at+ on public.envelopes(user_id, created_at desc);++create index if not exists idx_envelopes_user_status+ on public.envelopes(user_id, status, created_at desc);++create unique index if not exists idx_signers_envelope_email+ on public.signers(envelope_id, lower(email));++create index if not exists idx_signers_envelope_status+ on public.signers(envelope_id, status);++create unique index if not exists idx_signers_signing_token_hash+ on public.signers(signing_token_hash)+ where signing_token_hash is not null;++create unique index if not exists idx_signers_single_notified+ on public.signers(envelope_id)+ where status = 'notified';++create index if not exists idx_recipient_download_tokens_expires_at+ on public.recipient_download_tokens(expires_at);++create index if not exists idx_fields_signer_envelope+ on public.fields(signer_id, envelope_id);++create index if not exists idx_fields_envelope_page+ on public.fields(envelope_id, page, created_at, id);++create index if not exists idx_audit_events_envelope_event+ on public.audit_events(envelope_id, event);++create index if not exists idx_audit_events_envelope_created_at+ on public.audit_events(envelope_id, created_at, id);++create index if not exists idx_audit_events_envelope_event_signer_id+ on public.audit_events(envelope_id, event, ((metadata->>'signerId')));++create index if not exists idx_account_closure_requests_purge_after+ on public.account_closure_requests(purge_after_at, requested_at);diff --git a/tsconfig.json b/tsconfig.jsonnew file mode 100644index 0000000..88fcd7f--- /dev/null+++ b/tsconfig.json@@ -0,0 +1,43 @@+{+ "compilerOptions": {+ "target": "ES2017",+ "lib": [+ "dom",+ "dom.iterable",+ "esnext"+ ],+ "allowJs": true,+ "allowImportingTsExtensions": true,+ "skipLibCheck": true,+ "strict": true,+ "noEmit": true,+ "esModuleInterop": true,+ "module": "esnext",+ "moduleResolution": "bundler",+ "resolveJsonModule": true,+ "isolatedModules": true,+ "jsx": "react-jsx",+ "incremental": true,+ "plugins": [+ {+ "name": "next"+ }+ ],+ "paths": {+ "@/*": [+ "./src/*"+ ]+ }+ },+ "include": [+ "next-env.d.ts",+ "**/*.ts",+ "**/*.tsx",+ "**/*.mts",+ ".next/types/**/*.ts",+ ".next/dev/types/**/*.ts"+ ],+ "exclude": [+ "node_modules"+ ]+}