From 5d4134248b9440ab10a0f80bf93bb31e2979357b Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Thu, 3 Dec 2026 03:04:07 +1300 Subject: [PATCH 1/2] app/: review fixes for #54 and #62 (sc-8900): indexes on the foreign keys whose deletes would scan (baselines.review_id and approved_by, builds.created_by_user_id, comments.user_id, comment_threads.resolved_by); credit_transactions.build_id and a gallery day key; snapshot registration as one conditional upsert (a race between two files is a 409 for one of them), resetting a carried row; limits on commits, parent commits, branch, name, nonce, content type and meta; every snapshot validated before any is written; today's 401 messages; the personal organization takes the next slug on a race; credits::usage, plans, allowance and spend --- .../2026_12_03_000200_create_domain_tables.rs | 14 + app/src/domain/builds.rs | 16 + app/src/domain/credits.rs | 366 +++++++++++++++++- app/src/domain/snapshots.rs | 58 ++- app/src/http/api/builds.rs | 3 + app/src/http/api/mod.rs | 21 +- app/src/models/credit_transactions.rs | 2 + app/src/models/organizations.rs | 8 +- app/tests/api_builds.rs | 45 +++ app/tests/credits.rs | 13 + 10 files changed, 507 insertions(+), 39 deletions(-) diff --git a/app/database/migrations/2026_12_03_000200_create_domain_tables.rs b/app/database/migrations/2026_12_03_000200_create_domain_tables.rs index b08c5975..3e176dcf 100644 --- a/app/database/migrations/2026_12_03_000200_create_domain_tables.rs +++ b/app/database/migrations/2026_12_03_000200_create_domain_tables.rs @@ -209,6 +209,10 @@ CREATE TABLE credit_transactions ( updated_at timestamp with time zone DEFAULT now() NOT NULL, project_id bigint, open_source_credits bigint DEFAULT 0 NOT NULL, + -- The build a charge is for (one row per build charge step); NULL for purchases, grants and gallery days. + build_id bigint, + -- A gallery day's roll-up: one row per (organization, project, day), its amount grown as images are served. + day date, CONSTRAINT credit_transactions_kind_check CHECK ((kind = ANY (ARRAY['purchase'::text, 'grant'::text, 'build'::text, 'render'::text, 'diff'::text, 'summary'::text, 'refund'::text, 'adjustment'::text, 'gallery'::text]))) ); @@ -747,6 +751,8 @@ CREATE INDEX credit_transactions_org_created ON credit_transactions USING btree CREATE INDEX credit_transactions_project ON credit_transactions USING btree (project_id, created_at); CREATE UNIQUE INDEX credit_transactions_purchase_once ON credit_transactions USING btree (organization_id, reference) WHERE (kind = 'purchase'::text); +CREATE UNIQUE INDEX credit_transactions_gallery_day ON credit_transactions USING btree (organization_id, project_id, day) WHERE (kind = 'gallery'::text); +CREATE INDEX credit_transactions_build_idx ON credit_transactions USING btree (build_id) WHERE build_id IS NOT NULL; CREATE INDEX feedback_account_created ON feedback USING btree (account, created_at); @@ -915,6 +921,11 @@ CREATE INDEX build_groups_source_idx ON build_groups USING btree (source_build_i CREATE INDEX snapshots_build_group_idx ON snapshots USING btree (build_id, group_key); -- Hot paths and foreign keys (every delete of a parent row checks these columns). +CREATE INDEX baselines_review_idx ON baselines USING btree (review_id) WHERE review_id IS NOT NULL; +CREATE INDEX baselines_approved_by_idx ON baselines USING btree (approved_by) WHERE approved_by IS NOT NULL; +CREATE INDEX builds_created_by_idx ON builds USING btree (created_by_user_id) WHERE created_by_user_id IS NOT NULL; +CREATE INDEX comments_user_idx ON comments USING btree (user_id) WHERE user_id IS NOT NULL; +CREATE INDEX comment_threads_resolved_by_idx ON comment_threads USING btree (resolved_by) WHERE resolved_by IS NOT NULL; CREATE INDEX snapshots_render_idx ON snapshots USING btree (render_id) WHERE render_id IS NOT NULL; CREATE INDEX snapshots_source_blob_idx ON snapshots USING btree (source_blob) WHERE source_blob IS NOT NULL; @@ -1055,6 +1066,9 @@ CREATE TABLE downloads ( CREATE INDEX downloads_build_filter ON downloads USING btree (build_id, filter_key, created_at DESC); CREATE INDEX downloads_created_brin ON downloads USING brin (created_at); +ALTER TABLE ONLY credit_transactions + ADD CONSTRAINT credit_transactions_build_id_fkey FOREIGN KEY (build_id) REFERENCES builds(id) ON DELETE SET NULL; + -- Project tokens (the auth migration) belong to a project. ALTER TABLE ONLY project_tokens ADD CONSTRAINT project_tokens_project_id_fkey FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; diff --git a/app/src/domain/builds.rs b/app/src/domain/builds.rs index 8fdc2696..f6eeb81e 100644 --- a/app/src/domain/builds.rs +++ b/app/src/domain/builds.rs @@ -132,6 +132,22 @@ pub async fn create(project: &Project, params: &CreateParams, creator: Option 255 || params.branch.chars().any(char::is_control) { + return invalid("branch must be at most 255 characters"); + } + if params.name.trim().is_empty() || params.name.len() > 100 { + return invalid("name must be 1 to 100 characters"); + } + if params.nonce.as_ref().is_some_and(|n| n.is_empty() || n.len() > 200) { + return invalid("nonce must be 1 to 200 characters"); + } if !(1..=1000).contains(¶ms.shard_total) { return invalid("shard_total must be 1 to 1000"); } diff --git a/app/src/domain/credits.rs b/app/src/domain/credits.rs index 1fe803c5..d0acfa39 100644 --- a/app/src/domain/credits.rs +++ b/app/src/domain/credits.rs @@ -50,7 +50,371 @@ pub async fn add_purchased_credits(organization_id: i64, credits: i64, reference // (`credit_transactions_purchase_once`) refuses the second, and its transaction adds nothing. match add_credits(organization_id, credits, "purchase", Some(reference)).await { Ok(_) => Ok(true), - Err(e) if e.to_string().contains("credit_transactions_purchase_once") => Ok(false), + Err(e) if db::is_unique_violation(&e) => Ok(false), Err(e) => Err(e), } } + +/// A plan. Builds use credits: 1 per snapshot checked, 5 per text diff, 10 per image diff and 20 per PDF page drawn. +#[derive(Debug, Clone, Copy, serde::Serialize)] +pub struct Plan { + pub id: &'static str, + pub name: &'static str, + /// US cents per month. + pub price_cents: i64, + /// Credits included each calendar month (UTC). + pub included_credits: i64, + /// Whether the organization can buy credit packs for builds past the allowance. Without them, builds stop until + /// the month renews. + pub credit_packs: bool, + /// No allowance or limit at all: builds never stop for credits. Usage is still recorded. + pub unlimited: bool, +} + +pub const FREE: Plan = + Plan { id: "free", name: "Free", price_cents: 0, included_credits: 25_000, credit_packs: false, unlimited: false }; +pub const TEAM: Plan = Plan { + id: "team", + name: "Team", + price_cents: 2_900, + included_credits: 1_000_000, + credit_packs: true, + unlimited: false, +}; +/// DocSpring's own organizations: unlimited, free, and never offered. +pub const STAFF: Plan = + Plan { id: "staff", name: "Staff", price_cents: 0, included_credits: 0, credit_packs: false, unlimited: true }; + +/// The plans anyone can choose (Staff isn't one of them). +pub const PLANS: &[Plan] = &[FREE, TEAM]; + +/// The plan with this id (an organization's `plan` column). Anything unknown is Free. +#[must_use] +pub fn plan_by_id(id: &str) -> Plan { + [TEAM, STAFF].into_iter().find(|p| p.id == id).unwrap_or(FREE) +} + +/// Credits a month each organization gets for its open source projects, on any plan: their builds use this pool +/// first, then the plan's allowance and packs like any other project. +pub const OPEN_SOURCE_POOL: i64 = 1_000_000; + +/// A prepaid credit pack, used after the month's allowance. Pack credits don't expire. +#[derive(Debug, Clone, Copy, serde::Serialize)] +pub struct CreditPack { + pub credits: i64, + pub price_cents: i64, + /// An automatic reload buys a pack when the credits left (allowance and packs) fall below this. + pub reload_below: i64, +} + +pub const CREDIT_PACK: CreditPack = CreditPack { credits: 500_000, price_cents: 1_500, reload_below: 100_000 }; +/// Most automatic reloads an organization can allow in a month. +pub const MAX_AUTO_RELOAD_PACKS: i32 = 50; + +/// What each thing costs in credits, for the billing page and the MCP server. +#[must_use] +pub fn credit_rates() -> serde_json::Value { + use super::builds::{ + CREDITS_PER_IMAGE_DIFF, CREDITS_PER_RENDERED_PAGE, CREDITS_PER_SNAPSHOT_CHECK, CREDITS_PER_TEXT_DIFF, + }; + serde_json::json!({ + "snapshot_check": CREDITS_PER_SNAPSHOT_CHECK, + "text_diff": CREDITS_PER_TEXT_DIFF, + "image_diff": CREDITS_PER_IMAGE_DIFF, + "rendered_page": CREDITS_PER_RENDERED_PAGE, + }) +} + +/// Who a spend is for: the project, and whether it draws from the open source pool. +#[derive(Debug, Clone, Copy)] +pub struct Spender { + pub project_id: i64, + pub open_source: bool, +} + +impl Spender { + #[must_use] + pub fn of(project: &crate::models::Project) -> Self { + Self { project_id: project.id, open_source: counts_as_open_source(project) } + } +} + +/// Whether a project's credits come from the open source pool: the forge verified it, it's public on VisualCI, and +/// staff haven't withdrawn it. +#[must_use] +pub fn counts_as_open_source(p: &crate::models::Project) -> bool { + p.open_source && p.public && !p.open_source_withdrawn +} + +/// The time, as allowances count it. `VISUALCI_NOW` (RFC 3339) stands in for the clock for VisualCI's own screenshots +/// of seeded data; it's never set in production. Tests move Laravel's clock instead. +#[must_use] +pub fn now() -> laravel::time::Timestamp { + std::env::var("VISUALCI_NOW").ok().and_then(|v| v.parse().ok()).unwrap_or_else(|| laravel::now().timestamp()) +} + +/// The start of the current calendar month, UTC: when allowances renew. +#[must_use] +pub fn month_start() -> laravel::time::Timestamp { + use laravel::time::civil; + let now = now(); + let Ok(today) = now.in_tz("UTC").map(|z| z.date()) else { return now }; + civil::date(today.year(), today.month(), 1).at(0, 0, 0, 0).in_tz("UTC").map_or(now, |z| z.timestamp()) +} + +/// The start of next month: when this month's allowance renews. +#[must_use] +pub fn renews_at() -> Option { + use laravel::time::ToSpan; + month_start().in_tz("UTC").ok()?.checked_add(1.month()).ok().map(|z| z.timestamp()) +} + +/// "1,000,000". +#[must_use] +pub fn thousands(n: i64) -> String { + let digits = n.unsigned_abs().to_string(); + let mut out = String::new(); + for (i, c) in digits.chars().enumerate() { + if i > 0 && (digits.len() - i).is_multiple_of(3) { + out.push(','); + } + out.push(c); + } + if n < 0 { format!("-{out}") } else { out } +} + +/// The plan's credits used this month: everything open source projects didn't take from their pool. +/// +/// # Errors +/// On a database error. +pub async fn used_this_month(organization_id: i64) -> laravel::Result { + let since = month_start(); + Ok(db::query!( + "SELECT (COALESCE(-SUM(amount) - SUM(open_source_credits), 0))::BIGINT FROM credit_transactions \ + WHERE organization_id = {organization_id} AND kind IN ('build', 'render', 'gallery') AND created_at >= {since}" + ) + .scalar() + .await? + .unwrap_or(0)) +} + +/// Credits the organization's open source projects took from the pool this month. +/// +/// # Errors +/// On a database error. +pub async fn pool_used_this_month(organization_id: i64) -> laravel::Result { + let since = month_start(); + Ok(db::query!( + "SELECT (COALESCE(SUM(open_source_credits), 0))::BIGINT FROM credit_transactions \ + WHERE organization_id = {organization_id} AND created_at >= {since}" + ) + .scalar() + .await? + .unwrap_or(0)) +} + +/// Credits left: what's left of this month's allowance, plus pack credits. +/// +/// # Errors +/// On a database error. +pub async fn credits_left(org: &crate::models::Organization) -> laravel::Result { + let plan = plan_by_id(&org.plan); + if plan.unlimited { + return Ok(i64::MAX); + } + Ok((plan.included_credits - used_this_month(org.id).await?).max(0) + org.credits_balance.max(0)) +} + +/// Whether this month's allowance and every pack credit are used up: new builds stop until the month renews or +/// someone buys a pack. +/// +/// # Errors +/// On a database error. +pub async fn out_of_credits(org: &crate::models::Organization) -> laravel::Result { + let plan = plan_by_id(&org.plan); + if plan.unlimited { + return Ok(false); + } + Ok(org.credits_balance <= 0 && used_this_month(org.id).await? >= plan.included_credits) +} + +/// Whether a project's next build has nothing to spend: an open source project still has the pool while it lasts. +/// +/// # Errors +/// On a database error. +pub async fn out_of_credits_for(org: &crate::models::Organization, spender: Spender) -> laravel::Result { + if spender.open_source && pool_used_this_month(org.id).await? < OPEN_SOURCE_POOL { + return Ok(false); + } + out_of_credits(org).await +} + +/// Why an organization's builds can't be compared now, for an agent to act on: `None` while it has credits. `spender` +/// is the project asking (an open source one still has the pool); `None` asks about the plan's credits. The `message` +/// is one plain line an agent can pass on to its person as it is. +/// +/// # Errors +/// On a database error. +pub async fn blocked( + org: &crate::models::Organization, + app_url: &str, + spender: Option, +) -> laravel::Result> { + let out = match spender { + Some(s) => out_of_credits_for(org, s).await?, + None => out_of_credits(org).await?, + }; + if !out { + return Ok(None); + } + let plan = plan_by_id(&org.plan); + let used = used_this_month(org.id).await?; + let billing = format!("{}/{}/billing", app_url.trim_end_matches('/'), org.slug); + let renews_at = renews_at(); + let renews = renews_at + .map_or_else(String::new, |t| t.in_tz("UTC").map(|z| z.strftime("%-d %B %Y").to_string()).unwrap_or_default()); + let fix = |action: &str, label: &str| serde_json::json!({ "action": action, "label": label, "url": billing }); + let (fixes, what) = if plan.credit_packs { + // Automatic packs need a card; they pause after a declined payment, and stop at the monthly limit. + let auto = if org.stripe_customer_id.is_none() || org.auto_reload_packs == 0 { + fix("turn_on_auto_buy", "Turn on automatic packs, with a card") + } else if org.reloads_paused_at.is_some() { + fix("resume_auto_buy", "Update the card and resume automatic packs") + } else { + fix("raise_auto_buy_limit", "Raise the monthly limit on automatic packs") + }; + (vec![fix("buy_pack", "Buy a credit pack"), auto], "buy a credit pack or turn on automatic packs") + } else { + (vec![fix("upgrade", "Upgrade to Team")], "upgrade to Team") + }; + let message = format!( + "{} is out of VisualCI credits until {renews}: it has used all {} credits on the {} plan, so builds aren't \ + compared. An admin can {what} at {billing}", + org.name, + thousands(plan.included_credits), + plan.name, + ); + Ok(Some(serde_json::json!({ + "reason": "out_of_credits", + "plan": plan.name, + "credits_used": used, + "credits_limit": plan.included_credits, + "pack_credits": org.credits_balance.max(0), + "renews_at": renews_at.map(|t| t.to_string()), + "fixes": fixes, + "billing_url": billing, + "message": message, + }))) +} + +/// Spend credits: from the open source pool first (for an open source project), then this month's allowance, then +/// pack credits (which can go below zero by one build's worth). Records one transaction for the whole amount. +/// +/// # Errors +/// On a database error. +pub async fn spend( + organization_id: i64, + credits: i64, + kind: &str, + reference: Option<&str>, + spender: Option, + build_id: Option, +) -> laravel::Result<()> { + db::transaction(async |_| { + let plan: String = db::query!("SELECT plan FROM organizations WHERE id = {organization_id} FOR UPDATE") + .scalar() + .await? + .ok_or_else(|| laravel::Error::msg(format!("no organization {organization_id}")))?; + let plan = plan_by_id(&plan); + let from_pool = match spender { + Some(s) if s.open_source && credits > 0 => { + (OPEN_SOURCE_POOL - pool_used_this_month(organization_id).await?).clamp(0, credits) + } + _ => 0, + }; + let for_plan = credits - from_pool; + // Unlimited plans never touch pack credits; the transaction still records what was used. + let from_packs = if plan.unlimited { + 0 + } else { + let allowance_left = (plan.included_credits - used_this_month(organization_id).await?).max(0); + (for_plan - allowance_left).clamp(0, for_plan.max(0)) + }; + let balance: i64 = db::query!( + "UPDATE organizations SET credits_balance = credits_balance - {from_packs}, updated_at = now() \ + WHERE id = {organization_id} RETURNING credits_balance" + ) + .scalar() + .await? + .unwrap_or(0); + let (amount, project_id) = (-credits, spender.map(|s| s.project_id)); + db::query!( + "INSERT INTO credit_transactions (organization_id, amount, balance_after, kind, reference, project_id, \ + open_source_credits, build_id) \ + VALUES ({organization_id}, {amount}, {balance}, {kind}, {reference}, {project_id}, {from_pool}, {build_id})" + ) + .insert() + .await?; + Ok(()) + }) + .await +} + +/// Automatic reloads (pack purchases) this month. +/// +/// # Errors +/// On a database error. +pub async fn reloads_this_month(organization_id: i64) -> laravel::Result { + let since = month_start(); + Ok(db::query!( + "SELECT COUNT(*) FROM credit_transactions WHERE organization_id = {organization_id} AND kind = 'purchase' \ + AND reference LIKE 'auto-reload%' AND created_at >= {since}" + ) + .scalar() + .await? + .unwrap_or(0)) +} + +/// The organization's open source projects (verified, public, not withdrawn). +/// +/// # Errors +/// On a database error. +pub async fn open_source_projects(organization_id: i64) -> laravel::Result { + Ok(db::query!( + "SELECT COUNT(*) FROM projects WHERE organization_id = {organization_id} AND open_source AND public \ + AND NOT open_source_withdrawn" + ) + .scalar() + .await? + .unwrap_or(0)) +} + +/// The plan, this month's credits, pack credits and what things cost, as the web app and the MCP server show them. +/// +/// # Errors +/// On a database error. +pub async fn usage(org: &crate::models::Organization) -> laravel::Result { + let plan = plan_by_id(&org.plan); + let used = used_this_month(org.id).await?; + Ok(serde_json::json!({ + "plan": plan, + "credits_this_month": used, + "included_credits": plan.included_credits, + "pack_credits": org.credits_balance.max(0), + "credit_pack": CREDIT_PACK, + "auto_reload_packs": org.auto_reload_packs, + "reloads_this_month": reloads_this_month(org.id).await?, + "rates": credit_rates(), + "renews_at": renews_at().map(|t| t.to_string()), + "out_of_credits": !plan.unlimited && used >= plan.included_credits && org.credits_balance <= 0, + "unlimited": plan.unlimited, + "billing_problem": org.billing_problem, + // The open source pool: shown when the organization has open source projects or used the pool this month. + "open_source": { + "pool": OPEN_SOURCE_POOL, + "used": pool_used_this_month(org.id).await?, + "projects": open_source_projects(org.id).await?, + }, + "reloads_paused": org.reloads_paused_at.is_some(), + })) +} diff --git a/app/src/domain/snapshots.rs b/app/src/domain/snapshots.rs index 2dd57ac2..bb08c4ea 100644 --- a/app/src/domain/snapshots.rs +++ b/app/src/domain/snapshots.rs @@ -53,10 +53,16 @@ impl SnapshotParams { /// # Errors /// A message for the client when a field is invalid. pub fn validate(&self) -> std::result::Result<(), String> { - let hex64 = |s: &str| s.len() == 64 && s.bytes().all(|b| b.is_ascii_hexdigit()); + let hex64 = crate::storage::blobs::valid_sha256; if self.name.trim().is_empty() || self.name.len() > 500 { return Err(format!("snapshot name must be 1 to 500 characters: {:?}", self.name)); } + if self.content_type.is_empty() || self.content_type.len() > 255 { + return Err(format!("{}: content_type must be 1 to 255 characters", self.name)); + } + if self.meta.to_string().len() > 16 * 1024 { + return Err(format!("{}: meta must be under 16 KB", self.name)); + } if self.platform.len() > 200 { return Err(format!("{}: platform is too long", self.name)); } @@ -79,7 +85,7 @@ impl SnapshotParams { )); } if !hex64(&self.sha256) || !hex64(&self.fingerprint) { - return Err(format!("{}: sha256 and fingerprint must be hex SHA-256 digests", self.name)); + return Err(format!("{}: sha256 and fingerprint must be lowercase hex SHA-256 digests", self.name)); } if let Some(e) = &self.engine && !["pdfbox", "mutool"].contains(&e.as_str()) @@ -144,25 +150,6 @@ pub async fn register( renderer_version: &str, params: &SnapshotParams, ) -> laravel::Result> { - let earlier = Snapshot::query() - .filter( - Snapshot::build_id.eq(build.id) - & Snapshot::name.eq(params.name.as_str()) - & Snapshot::platform.eq(params.platform.as_str()), - ) - .first() - .await?; - if let Some(e) = earlier - && !e.carried_forward - && e.source_blob.as_deref() != Some(params.sha256.as_str()) - { - let platform = if params.platform.is_empty() { String::new() } else { format!(" ({})", params.platform) }; - return Ok(Err(format!( - "{}{platform} was {ALREADY_UPLOADED} with other content: snapshot names must be unique across a build's \ - jobs and shards", - params.name - ))); - } let renderer_key = settings.renderer_key(params.engine.as_deref(), renderer_version); let render = if params.kind == "document" { usable_render(build.project_id, ¶ms.fingerprint, &renderer_key).await? @@ -190,7 +177,9 @@ pub async fn register( params.threshold, params.ignore_anti_aliasing, ); - db::query!( + // One statement, so two shards racing with different files can't both win: the update applies only over a row + // carried forward or holding the same file (a retried job), and no row back means another file already has the name. + let saved: Option = db::query!( "INSERT INTO snapshots (pid, build_id, group_key, name, platform, kind, format, source_fingerprint, source_blob, \ render_id, engine, threshold, ignore_anti_aliasing, meta, ignore_rules, environment, state, \ matched_environment, baseline_id) \ @@ -201,19 +190,22 @@ pub async fn register( render_id = EXCLUDED.render_id, engine = EXCLUDED.engine, threshold = EXCLUDED.threshold, \ ignore_anti_aliasing = EXCLUDED.ignore_anti_aliasing, meta = EXCLUDED.meta, \ ignore_rules = EXCLUDED.ignore_rules, environment = EXCLUDED.environment, state = EXCLUDED.state, \ - matched_environment = NULL, baseline_id = NULL, group_key = EXCLUDED.group_key, updated_at = now()" + matched_environment = NULL, baseline_id = NULL, group_key = EXCLUDED.group_key, carried_forward = false, \ + base_snapshot_id = NULL, review = NULL, error = NULL, updated_at = now() \ + WHERE snapshots.carried_forward OR snapshots.source_blob = EXCLUDED.source_blob \ + RETURNING id" ) - .insert() + .scalar() .await?; - let snapshot = Snapshot::query() - .filter( - Snapshot::build_id.eq(build_id) - & Snapshot::name.eq(name.as_str()) - & Snapshot::platform.eq(platform.as_str()), - ) - .first() - .await? - .ok_or_else(|| laravel::Error::msg("the registered snapshot wasn't saved"))?; + let Some(id) = saved else { + let platform = if params.platform.is_empty() { String::new() } else { format!(" ({})", params.platform) }; + return Ok(Err(format!( + "{}{platform} was {ALREADY_UPLOADED} with other content: snapshot names must be unique across a build's \ + jobs and shards", + params.name + ))); + }; + let snapshot = Snapshot::find_or_fail(id).await?; Ok(Ok(Registration { snapshot, needs_upload })) } diff --git a/app/src/http/api/builds.rs b/app/src/http/api/builds.rs index 052aec39..23229451 100644 --- a/app/src/http/api/builds.rs +++ b/app/src/http/api/builds.rs @@ -168,8 +168,11 @@ pub async fn add_snapshots( let settings = BuildSettings::new(&project, &build); let version = renderer_version(); let mut snapshots = Vec::with_capacity(params.snapshots.len()); + // Every snapshot is checked before any is written. for p in ¶ms.snapshots { p.validate().map_err(ApiError::bad_request)?; + } + for p in ¶ms.snapshots { let registration = crate::domain::snapshots::register(&build, &settings, &version, p) .await? .map_err(ApiError::conflict)?; diff --git a/app/src/http/api/mod.rs b/app/src/http/api/mod.rs index ec458fd2..90889b8c 100644 --- a/app/src/http/api/mod.rs +++ b/app/src/http/api/mod.rs @@ -122,10 +122,23 @@ impl FromRequestParts for ApiProject { type Rejection = ApiError; async fn from_request_parts(parts: &mut Parts, state: &S) -> Result { - let has_token = parts.headers.get(axum::http::header::AUTHORIZATION).is_some(); - let principal = Principal::from_request_parts(parts, state) - .await - .map_err(|_| ApiError::unauthorized(if has_token { "invalid token" } else { "missing project token" }))?; + let token = parts + .headers + .get(axum::http::header::AUTHORIZATION) + .and_then(|v| v.to_str().ok()) + .and_then(|v| v.strip_prefix("Bearer ")) + .map(str::trim) + .unwrap_or_default() + .to_string(); + let principal = Principal::from_request_parts(parts, state).await.map_err(|_| { + ApiError::unauthorized(if token.is_empty() { + "missing project token" + } else if token.starts_with("vcu_") { + "invalid personal access token" + } else { + "invalid project token" + }) + })?; let project = match &principal { Principal::Project { project_id, .. } => { Project::find(*project_id).await?.ok_or_else(ApiError::not_found)? diff --git a/app/src/models/credit_transactions.rs b/app/src/models/credit_transactions.rs index d4da5e51..14afcc09 100644 --- a/app/src/models/credit_transactions.rs +++ b/app/src/models/credit_transactions.rs @@ -15,4 +15,6 @@ pub struct CreditTransaction { pub project_id: Option, #[default] pub open_source_credits: i64, + pub build_id: Option, + pub day: Option, } diff --git a/app/src/models/organizations.rs b/app/src/models/organizations.rs index d9c3bcc0..677d5d42 100644 --- a/app/src/models/organizations.rs +++ b/app/src/models/organizations.rs @@ -78,7 +78,7 @@ impl Organization { continue; } let name = user.name.clone(); - return laravel::db::transaction(async |_| { + let made = laravel::db::transaction(async |_| { let org = laravel::model::create!(Self { pid: laravel::str::uuid7(), slug: slug.as_str(), @@ -102,6 +102,12 @@ impl Organization { Ok((org, project)) }) .await; + // Another sign-up took the slug between the check and the insert: try the next one. + match made { + Ok(made) => return Ok(made), + Err(e) if laravel::db::is_unique_violation(&e) => {} + Err(e) => return Err(e), + } } Err(laravel::Error::msg("no free organization slug")) } diff --git a/app/tests/api_builds.rs b/app/tests/api_builds.rs index 49c2e6d3..395d667a 100644 --- a/app/tests/api_builds.rs +++ b/app/tests/api_builds.rs @@ -124,3 +124,48 @@ async fn a_token_names_its_project(app: Application) -> laravel::Result<()> { assert!(unknown.text().contains("unknown field `comitt`"), "{}", unknown.text()); Ok(()) } + +#[laravel::test] +async fn a_bad_token_or_build_is_refused_saying_why(app: Application) -> laravel::Result<()> { + let missing = app.post("/api/v1/builds").json(build_params(None)).await; + missing.assert_status(401); + assert_eq!(missing.json()["description"], "missing project token"); + let project = app.post("/api/v1/builds").header("authorization", "Bearer vci_nope").json(build_params(None)).await; + assert_eq!(project.json()["description"], "invalid project token"); + let personal = app.post("/api/v1/builds").header("authorization", "Bearer vcu_nope").json(build_params(None)).await; + assert_eq!(personal.json()["description"], "invalid personal access token"); + + let (token, _) = project_token("pdfs").await?; + let auth = format!("Bearer {token}"); + for (body, says) in [ + (json!({ "commit": "not a sha!", "branch": "main" }), "commit must be"), + (json!({ "commit": "abc", "branch": "main", "parent_commits": ["../x"] }), "parent_commits"), + (json!({ "commit": "abc", "branch": "x".repeat(300) }), "branch must be"), + (json!({ "commit": "abc", "branch": "main", "nonce": "" }), "nonce must be"), + ] { + let refused = app.post("/api/v1/builds").header("authorization", &auth).json(body).await; + refused.assert_status(400); + assert!(refused.text().contains(says), "{}", refused.text()); + } + Ok(()) +} + +#[laravel::test] +async fn no_snapshot_is_written_when_any_in_the_request_is_invalid(app: Application) -> laravel::Result<()> { + let (token, _) = project_token("pdfs").await?; + let auth = format!("Bearer {token}"); + let build = app.post("/api/v1/builds").header("authorization", &auth).json(build_params(None)).await.json().clone(); + let id = build["id"].as_str().unwrap().to_string(); + let good = json!({ "name": "a", "kind": "image", "fingerprint": "b".repeat(64), "sha256": "a".repeat(64), + "size": 1, "content_type": "image/png" }); + let bad = json!({ "name": "b", "kind": "image", "fingerprint": "b".repeat(64), "sha256": "A".repeat(64), + "size": 1, "content_type": "image/png" }); + app.post(format!("/api/v1/builds/{id}/snapshots")) + .header("authorization", &auth) + .json(json!({ "snapshots": [good, bad] })) + .await + .assert_status(400); + let count: Option = db::query!("SELECT COUNT(*) FROM snapshots").scalar().await?; + assert_eq!(count, Some(0)); + Ok(()) +} diff --git a/app/tests/credits.rs b/app/tests/credits.rs index 77c7defe..9c3457ff 100644 --- a/app/tests/credits.rs +++ b/app/tests/credits.rs @@ -17,3 +17,16 @@ async fn purchased_packs_are_credited_once_per_reference(_app: Application) -> l assert_eq!(rows, Some(2)); Ok(()) } + +#[laravel::test] +async fn usage_says_the_plan_credits_and_pool(_app: Application) -> laravel::Result<()> { + let org = fixtures::organization("acme").await?; + credits::spend(org.id, 1200, "build", Some("build web/1: 1200 snapshots checked"), None, None).await?; + let usage = credits::usage(&org).await?; + assert_eq!(usage["plan"]["id"], "free"); + assert_eq!(usage["credits_this_month"], 1200); + assert_eq!(usage["included_credits"], 25_000); + assert_eq!(usage["out_of_credits"], false); + assert_eq!(usage["open_source"]["pool"], 1_000_000); + Ok(()) +} From 36307e94ebdcc04a72e81c25f9ef0f6828a62e3a Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Thu, 3 Dec 2026 04:31:15 +1300 Subject: [PATCH 2/2] app/: the renderer version comes from RENDERER_VERSION, as production's server image sets it; build output under app/target/ is no longer tracked --- app/src/http/api/builds.rs | 2 +- .../bigdecimal-0f52ef40f42fdf2c/out/default_precision.rs | 1 - .../out/default_rounding_mode.rs | 1 - .../out/exponential_format_threshold.rs | 3 --- .../bigdecimal-0f52ef40f42fdf2c/out/serde_scale_limit.rs | 1 - .../mime_guess-3b56f0e01700d021/out/mime_types_generated.rs | 2 -- .../debug/build/serde-07b13cbb0fd598fc/out/private.rs | 6 ------ .../debug/build/serde_core-99e7571ac0e43228/out/private.rs | 5 ----- .../debug/build/thiserror-b16f062556d3d9bb/out/private.rs | 5 ----- 9 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 app/target/debug/build/bigdecimal-0f52ef40f42fdf2c/out/default_precision.rs delete mode 100644 app/target/debug/build/bigdecimal-0f52ef40f42fdf2c/out/default_rounding_mode.rs delete mode 100644 app/target/debug/build/bigdecimal-0f52ef40f42fdf2c/out/exponential_format_threshold.rs delete mode 100644 app/target/debug/build/bigdecimal-0f52ef40f42fdf2c/out/serde_scale_limit.rs delete mode 100644 app/target/debug/build/mime_guess-3b56f0e01700d021/out/mime_types_generated.rs delete mode 100644 app/target/debug/build/serde-07b13cbb0fd598fc/out/private.rs delete mode 100644 app/target/debug/build/serde_core-99e7571ac0e43228/out/private.rs delete mode 100644 app/target/debug/build/thiserror-b16f062556d3d9bb/out/private.rs diff --git a/app/src/http/api/builds.rs b/app/src/http/api/builds.rs index 23229451..90778dc8 100644 --- a/app/src/http/api/builds.rs +++ b/app/src/http/api/builds.rs @@ -23,7 +23,7 @@ pub fn routes(route: &mut Router) { /// The renderer version documents are drawn with: part of the render cache key. #[must_use] pub fn renderer_version() -> String { - std::env::var("VISUALCI_RENDERER_VERSION").unwrap_or_else(|_| "1".to_string()) + std::env::var("RENDERER_VERSION").unwrap_or_else(|_| "1".to_string()) } /// The web app's address, for links (`APP_URL`). diff --git a/app/target/debug/build/bigdecimal-0f52ef40f42fdf2c/out/default_precision.rs b/app/target/debug/build/bigdecimal-0f52ef40f42fdf2c/out/default_precision.rs deleted file mode 100644 index 9dbdfaba..00000000 --- a/app/target/debug/build/bigdecimal-0f52ef40f42fdf2c/out/default_precision.rs +++ /dev/null @@ -1 +0,0 @@ -const DEFAULT_PRECISION: u64 = 100; \ No newline at end of file diff --git a/app/target/debug/build/bigdecimal-0f52ef40f42fdf2c/out/default_rounding_mode.rs b/app/target/debug/build/bigdecimal-0f52ef40f42fdf2c/out/default_rounding_mode.rs deleted file mode 100644 index 7a5f069e..00000000 --- a/app/target/debug/build/bigdecimal-0f52ef40f42fdf2c/out/default_rounding_mode.rs +++ /dev/null @@ -1 +0,0 @@ -const DEFAULT_ROUNDING_MODE: RoundingMode = RoundingMode::HalfEven; \ No newline at end of file diff --git a/app/target/debug/build/bigdecimal-0f52ef40f42fdf2c/out/exponential_format_threshold.rs b/app/target/debug/build/bigdecimal-0f52ef40f42fdf2c/out/exponential_format_threshold.rs deleted file mode 100644 index 28909913..00000000 --- a/app/target/debug/build/bigdecimal-0f52ef40f42fdf2c/out/exponential_format_threshold.rs +++ /dev/null @@ -1,3 +0,0 @@ -const EXPONENTIAL_FORMAT_LEADING_ZERO_THRESHOLD: usize = 5; -const EXPONENTIAL_FORMAT_TRAILING_ZERO_THRESHOLD: usize = 15; -const FMT_MAX_INTEGER_PADDING: usize = 1000; \ No newline at end of file diff --git a/app/target/debug/build/bigdecimal-0f52ef40f42fdf2c/out/serde_scale_limit.rs b/app/target/debug/build/bigdecimal-0f52ef40f42fdf2c/out/serde_scale_limit.rs deleted file mode 100644 index f04f5f61..00000000 --- a/app/target/debug/build/bigdecimal-0f52ef40f42fdf2c/out/serde_scale_limit.rs +++ /dev/null @@ -1 +0,0 @@ -const SERDE_SCALE_LIMIT: i64 = 150000; \ No newline at end of file diff --git a/app/target/debug/build/mime_guess-3b56f0e01700d021/out/mime_types_generated.rs b/app/target/debug/build/mime_guess-3b56f0e01700d021/out/mime_types_generated.rs deleted file mode 100644 index 9b19ce41..00000000 --- a/app/target/debug/build/mime_guess-3b56f0e01700d021/out/mime_types_generated.rs +++ /dev/null @@ -1,2 +0,0 @@ -static REV_MAPPINGS: &'static [(UniCase<&'static str>, TopLevelExts)] = &[(UniCase::ascii("application"), TopLevelExts { start: 0, end: 941, subs: &[(UniCase::ascii("acad"), (0, 1)),(UniCase::ascii("andrew-inset"), (1, 2)),(UniCase::ascii("annodex"), (2, 3)),(UniCase::ascii("applixware"), (3, 4)),(UniCase::ascii("atom+xml"), (4, 5)),(UniCase::ascii("atomcat+xml"), (5, 6)),(UniCase::ascii("atomsvc+xml"), (6, 7)),(UniCase::ascii("bdoc"), (7, 8)),(UniCase::ascii("ccxml+xml"), (8, 9)),(UniCase::ascii("cdmi-capability"), (9, 10)),(UniCase::ascii("cdmi-container"), (10, 11)),(UniCase::ascii("cdmi-domain"), (11, 12)),(UniCase::ascii("cdmi-object"), (12, 13)),(UniCase::ascii("cdmi-queue"), (13, 14)),(UniCase::ascii("cu-seeme"), (14, 15)),(UniCase::ascii("dash+xml"), (15, 16)),(UniCase::ascii("davmount+xml"), (16, 17)),(UniCase::ascii("directx"), (17, 18)),(UniCase::ascii("docbook+xml"), (18, 19)),(UniCase::ascii("dssc+der"), (19, 20)),(UniCase::ascii("dssc+xml"), (20, 21)),(UniCase::ascii("emma+xml"), (21, 22)),(UniCase::ascii("envoy"), (22, 23)),(UniCase::ascii("epub+zip"), (23, 24)),(UniCase::ascii("etl"), (24, 25)),(UniCase::ascii("exi"), (25, 26)),(UniCase::ascii("font-sfnt"), (26, 28)),(UniCase::ascii("font-tdpfr"), (28, 29)),(UniCase::ascii("font-woff"), (29, 30)),(UniCase::ascii("fractals"), (30, 31)),(UniCase::ascii("fsharp-script"), (31, 33)),(UniCase::ascii("futuresplash"), (33, 34)),(UniCase::ascii("geo+json"), (34, 35)),(UniCase::ascii("gml+xml"), (35, 36)),(UniCase::ascii("gpx+xml"), (36, 37)),(UniCase::ascii("gxf"), (37, 38)),(UniCase::ascii("gzip"), (38, 39)),(UniCase::ascii("hjson"), (39, 40)),(UniCase::ascii("hta"), (40, 41)),(UniCase::ascii("hyperstudio"), (41, 42)),(UniCase::ascii("inkml+xml"), (42, 44)),(UniCase::ascii("internet-property-stream"), (44, 45)),(UniCase::ascii("ipfix"), (45, 46)),(UniCase::ascii("java-archive"), (46, 49)),(UniCase::ascii("java-serialized-object"), (49, 50)),(UniCase::ascii("javascript"), (50, 51)),(UniCase::ascii("json"), (51, 52)),(UniCase::ascii("json5"), (52, 53)),(UniCase::ascii("jsonml+json"), (53, 54)),(UniCase::ascii("ld+json"), (54, 55)),(UniCase::ascii("liquidmotion"), (55, 57)),(UniCase::ascii("lost+xml"), (57, 58)),(UniCase::ascii("mac-binhex40"), (58, 59)),(UniCase::ascii("mac-compactpro"), (59, 60)),(UniCase::ascii("mads+xml"), (60, 61)),(UniCase::ascii("manifest+json"), (61, 62)),(UniCase::ascii("marc"), (62, 63)),(UniCase::ascii("marcxml+xml"), (63, 64)),(UniCase::ascii("mathematica"), (64, 67)),(UniCase::ascii("mathml+xml"), (67, 68)),(UniCase::ascii("mbox"), (68, 69)),(UniCase::ascii("mediaservercontrol+xml"), (69, 70)),(UniCase::ascii("metalink+xml"), (70, 71)),(UniCase::ascii("metalink4+xml"), (71, 72)),(UniCase::ascii("mets+xml"), (72, 73)),(UniCase::ascii("mods+xml"), (73, 74)),(UniCase::ascii("mp21"), (74, 76)),(UniCase::ascii("mp4"), (76, 77)),(UniCase::ascii("mpeg"), (77, 78)),(UniCase::ascii("ms-vsi"), (78, 79)),(UniCase::ascii("msaccess"), (79, 86)),(UniCase::ascii("msaccess.addin"), (86, 87)),(UniCase::ascii("msaccess.cab"), (87, 88)),(UniCase::ascii("msaccess.ftemplate"), (88, 89)),(UniCase::ascii("msaccess.runtime"), (89, 90)),(UniCase::ascii("msaccess.webapplication"), (90, 91)),(UniCase::ascii("msword"), (91, 95)),(UniCase::ascii("mxf"), (95, 96)),(UniCase::ascii("n-quads"), (96, 97)),(UniCase::ascii("n-triples"), (97, 98)),(UniCase::ascii("octet-stream"), (98, 169)),(UniCase::ascii("oda"), (169, 170)),(UniCase::ascii("oebps-package+xml"), (170, 171)),(UniCase::ascii("ogg"), (171, 172)),(UniCase::ascii("olescript"), (172, 173)),(UniCase::ascii("omdoc+xml"), (173, 174)),(UniCase::ascii("onenote"), (174, 180)),(UniCase::ascii("opensearchdescription+xml"), (180, 181)),(UniCase::ascii("oxps"), (181, 182)),(UniCase::ascii("patch-ops-error+xml"), (182, 183)),(UniCase::ascii("pdf"), (183, 184)),(UniCase::ascii("pgp-encrypted"), (184, 185)),(UniCase::ascii("pgp-signature"), (185, 187)),(UniCase::ascii("pics-rules"), (187, 188)),(UniCase::ascii("pkcs10"), (188, 189)),(UniCase::ascii("pkcs7-mime"), (189, 191)),(UniCase::ascii("pkcs7-signature"), (191, 192)),(UniCase::ascii("pkcs8"), (192, 193)),(UniCase::ascii("pkix-attr-cert"), (193, 194)),(UniCase::ascii("pkix-crl"), (194, 195)),(UniCase::ascii("pkix-pkipath"), (195, 196)),(UniCase::ascii("pkixcmp"), (196, 197)),(UniCase::ascii("postscript"), (197, 200)),(UniCase::ascii("PowerShell"), (200, 201)),(UniCase::ascii("prs.cww"), (201, 202)),(UniCase::ascii("pskc+xml"), (202, 203)),(UniCase::ascii("raml+yaml"), (203, 204)),(UniCase::ascii("rat-file"), (204, 205)),(UniCase::ascii("rdf+xml"), (205, 206)),(UniCase::ascii("reginfo+xml"), (206, 207)),(UniCase::ascii("relax-ng-compact-syntax"), (207, 208)),(UniCase::ascii("resource-lists+xml"), (208, 209)),(UniCase::ascii("resource-lists-diff+xml"), (209, 210)),(UniCase::ascii("rpki-ghostbusters"), (210, 211)),(UniCase::ascii("rpki-manifest"), (211, 212)),(UniCase::ascii("rpki-roa"), (212, 213)),(UniCase::ascii("rsd+xml"), (213, 214)),(UniCase::ascii("rss+xml"), (214, 215)),(UniCase::ascii("rtf"), (215, 216)),(UniCase::ascii("sbml+xml"), (216, 217)),(UniCase::ascii("scvp-cv-request"), (217, 218)),(UniCase::ascii("scvp-cv-response"), (218, 219)),(UniCase::ascii("scvp-vp-request"), (219, 220)),(UniCase::ascii("scvp-vp-response"), (220, 221)),(UniCase::ascii("sdp"), (221, 222)),(UniCase::ascii("set-payment-initiation"), (222, 223)),(UniCase::ascii("set-registration-initiation"), (223, 224)),(UniCase::ascii("shf+xml"), (224, 225)),(UniCase::ascii("smil+xml"), (225, 226)),(UniCase::ascii("sparql-query"), (226, 227)),(UniCase::ascii("sparql-results+xml"), (227, 228)),(UniCase::ascii("srgs"), (228, 229)),(UniCase::ascii("srgs+xml"), (229, 230)),(UniCase::ascii("sru+xml"), (230, 231)),(UniCase::ascii("ssdl+xml"), (231, 232)),(UniCase::ascii("ssml+xml"), (232, 233)),(UniCase::ascii("step"), (233, 235)),(UniCase::ascii("streamingmedia"), (235, 236)),(UniCase::ascii("tei+xml"), (236, 238)),(UniCase::ascii("thraud+xml"), (238, 239)),(UniCase::ascii("timestamped-data"), (239, 240)),(UniCase::ascii("trig"), (240, 241)),(UniCase::ascii("vnd.3gpp.pic-bw-large"), (241, 242)),(UniCase::ascii("vnd.3gpp.pic-bw-small"), (242, 243)),(UniCase::ascii("vnd.3gpp.pic-bw-var"), (243, 244)),(UniCase::ascii("vnd.3gpp2.tcap"), (244, 245)),(UniCase::ascii("vnd.3m.post-it-notes"), (245, 246)),(UniCase::ascii("vnd.accpac.simply.aso"), (246, 247)),(UniCase::ascii("vnd.accpac.simply.imp"), (247, 248)),(UniCase::ascii("vnd.acucobol"), (248, 249)),(UniCase::ascii("vnd.acucorp"), (249, 251)),(UniCase::ascii("vnd.adobe.air-application-installer-package+zip"), (251, 252)),(UniCase::ascii("vnd.adobe.formscentral.fcdt"), (252, 253)),(UniCase::ascii("vnd.adobe.fxp"), (253, 255)),(UniCase::ascii("vnd.adobe.xdp+xml"), (255, 256)),(UniCase::ascii("vnd.adobe.xfdf"), (256, 257)),(UniCase::ascii("vnd.ahead.space"), (257, 258)),(UniCase::ascii("vnd.airzip.filesecure.azf"), (258, 259)),(UniCase::ascii("vnd.airzip.filesecure.azs"), (259, 260)),(UniCase::ascii("vnd.amazon.ebook"), (260, 261)),(UniCase::ascii("vnd.americandynamics.acc"), (261, 262)),(UniCase::ascii("vnd.amiga.ami"), (262, 263)),(UniCase::ascii("vnd.android.package-archive"), (263, 264)),(UniCase::ascii("vnd.anser-web-certificate-issue-initiation"), (264, 265)),(UniCase::ascii("vnd.anser-web-funds-transfer-initiation"), (265, 266)),(UniCase::ascii("vnd.antix.game-component"), (266, 267)),(UniCase::ascii("vnd.apache.parquet"), (267, 268)),(UniCase::ascii("vnd.apple.installer+xml"), (268, 269)),(UniCase::ascii("vnd.apple.pkpass"), (269, 270)),(UniCase::ascii("vnd.aristanetworks.swi"), (270, 271)),(UniCase::ascii("vnd.astraea-software.iota"), (271, 272)),(UniCase::ascii("vnd.audiograph"), (272, 273)),(UniCase::ascii("vnd.blueice.multipass"), (273, 274)),(UniCase::ascii("vnd.bmi"), (274, 275)),(UniCase::ascii("vnd.businessobjects"), (275, 276)),(UniCase::ascii("vnd.chemdraw+xml"), (276, 277)),(UniCase::ascii("vnd.chipnuts.karaoke-mmd"), (277, 278)),(UniCase::ascii("vnd.cinderella"), (278, 279)),(UniCase::ascii("vnd.citationstyles.style+xml"), (279, 280)),(UniCase::ascii("vnd.claymore"), (280, 281)),(UniCase::ascii("vnd.cloanto.rp9"), (281, 282)),(UniCase::ascii("vnd.clonk.c4group"), (282, 287)),(UniCase::ascii("vnd.cluetrust.cartomobile-config"), (287, 288)),(UniCase::ascii("vnd.cluetrust.cartomobile-config-pkg"), (288, 289)),(UniCase::ascii("vnd.commonspace"), (289, 290)),(UniCase::ascii("vnd.contact.cmsg"), (290, 291)),(UniCase::ascii("vnd.cosmocaller"), (291, 292)),(UniCase::ascii("vnd.crick.clicker"), (292, 293)),(UniCase::ascii("vnd.crick.clicker.keyboard"), (293, 294)),(UniCase::ascii("vnd.crick.clicker.palette"), (294, 295)),(UniCase::ascii("vnd.crick.clicker.template"), (295, 296)),(UniCase::ascii("vnd.crick.clicker.wordbank"), (296, 297)),(UniCase::ascii("vnd.criticaltools.wbs+xml"), (297, 298)),(UniCase::ascii("vnd.cups-ppd"), (298, 299)),(UniCase::ascii("vnd.curl.car"), (299, 300)),(UniCase::ascii("vnd.curl.pcurl"), (300, 301)),(UniCase::ascii("vnd.dart"), (301, 302)),(UniCase::ascii("vnd.data-vision.rdz"), (302, 303)),(UniCase::ascii("vnd.dece.data"), (303, 307)),(UniCase::ascii("vnd.dece.ttml+xml"), (307, 309)),(UniCase::ascii("vnd.dece.unspecified"), (309, 311)),(UniCase::ascii("vnd.dece.zip"), (311, 313)),(UniCase::ascii("vnd.denovo.fcselayout-link"), (313, 314)),(UniCase::ascii("vnd.dna"), (314, 315)),(UniCase::ascii("vnd.dolby.mlp"), (315, 316)),(UniCase::ascii("vnd.dpgraph"), (316, 317)),(UniCase::ascii("vnd.dreamfactory"), (317, 318)),(UniCase::ascii("vnd.ds-keypoint"), (318, 319)),(UniCase::ascii("vnd.dvb.ait"), (319, 320)),(UniCase::ascii("vnd.dynageo"), (320, 321)),(UniCase::ascii("vnd.ecowin.chart"), (321, 322)),(UniCase::ascii("vnd.enliven"), (322, 323)),(UniCase::ascii("vnd.epson.esf"), (323, 324)),(UniCase::ascii("vnd.epson.msf"), (324, 325)),(UniCase::ascii("vnd.epson.quickanime"), (325, 326)),(UniCase::ascii("vnd.epson.salt"), (326, 327)),(UniCase::ascii("vnd.epson.ssf"), (327, 328)),(UniCase::ascii("vnd.eszigno3+xml"), (328, 330)),(UniCase::ascii("vnd.ezpix-album"), (330, 331)),(UniCase::ascii("vnd.ezpix-package"), (331, 332)),(UniCase::ascii("vnd.fdf"), (332, 333)),(UniCase::ascii("vnd.fdsn.mseed"), (333, 334)),(UniCase::ascii("vnd.fdsn.seed"), (334, 336)),(UniCase::ascii("vnd.flographit"), (336, 337)),(UniCase::ascii("vnd.fluxtime.clip"), (337, 338)),(UniCase::ascii("vnd.framemaker"), (338, 342)),(UniCase::ascii("vnd.frogans.fnc"), (342, 343)),(UniCase::ascii("vnd.frogans.ltf"), (343, 344)),(UniCase::ascii("vnd.fsc.weblaunch"), (344, 345)),(UniCase::ascii("vnd.fujitsu.oasys"), (345, 346)),(UniCase::ascii("vnd.fujitsu.oasys2"), (346, 347)),(UniCase::ascii("vnd.fujitsu.oasys3"), (347, 348)),(UniCase::ascii("vnd.fujitsu.oasysgp"), (348, 349)),(UniCase::ascii("vnd.fujitsu.oasysprs"), (349, 350)),(UniCase::ascii("vnd.fujixerox.ddd"), (350, 351)),(UniCase::ascii("vnd.fujixerox.docuworks"), (351, 352)),(UniCase::ascii("vnd.fujixerox.docuworks.binder"), (352, 353)),(UniCase::ascii("vnd.fuzzysheet"), (353, 354)),(UniCase::ascii("vnd.genomatix.tuxedo"), (354, 355)),(UniCase::ascii("vnd.geogebra.file"), (355, 356)),(UniCase::ascii("vnd.geogebra.tool"), (356, 357)),(UniCase::ascii("vnd.geometry-explorer"), (357, 359)),(UniCase::ascii("vnd.geonext"), (359, 360)),(UniCase::ascii("vnd.geoplan"), (360, 361)),(UniCase::ascii("vnd.geospace"), (361, 362)),(UniCase::ascii("vnd.gmx"), (362, 363)),(UniCase::ascii("vnd.google-apps.document"), (363, 364)),(UniCase::ascii("vnd.google-apps.presentation"), (364, 365)),(UniCase::ascii("vnd.google-apps.spreadsheet"), (365, 366)),(UniCase::ascii("vnd.google-earth.kml+xml"), (366, 367)),(UniCase::ascii("vnd.google-earth.kmz"), (367, 368)),(UniCase::ascii("vnd.grafeq"), (368, 370)),(UniCase::ascii("vnd.groove-account"), (370, 371)),(UniCase::ascii("vnd.groove-help"), (371, 372)),(UniCase::ascii("vnd.groove-identity-message"), (372, 373)),(UniCase::ascii("vnd.groove-injector"), (373, 374)),(UniCase::ascii("vnd.groove-tool-message"), (374, 375)),(UniCase::ascii("vnd.groove-tool-template"), (375, 376)),(UniCase::ascii("vnd.groove-vcard"), (376, 377)),(UniCase::ascii("vnd.hal+xml"), (377, 378)),(UniCase::ascii("vnd.handheld-entertainment+xml"), (378, 379)),(UniCase::ascii("vnd.hbci"), (379, 380)),(UniCase::ascii("vnd.hhe.lesson-player"), (380, 381)),(UniCase::ascii("vnd.hp-hpgl"), (381, 382)),(UniCase::ascii("vnd.hp-hpid"), (382, 383)),(UniCase::ascii("vnd.hp-hps"), (383, 384)),(UniCase::ascii("vnd.hp-jlyt"), (384, 385)),(UniCase::ascii("vnd.hp-pcl"), (385, 386)),(UniCase::ascii("vnd.hp-pclxl"), (386, 387)),(UniCase::ascii("vnd.hydrostatix.sof-data"), (387, 388)),(UniCase::ascii("vnd.ibm.minipay"), (388, 389)),(UniCase::ascii("vnd.ibm.modcap"), (389, 392)),(UniCase::ascii("vnd.ibm.rights-management"), (392, 393)),(UniCase::ascii("vnd.ibm.secure-container"), (393, 394)),(UniCase::ascii("vnd.iccprofile"), (394, 396)),(UniCase::ascii("vnd.igloader"), (396, 397)),(UniCase::ascii("vnd.immervision-ivp"), (397, 398)),(UniCase::ascii("vnd.immervision-ivu"), (398, 399)),(UniCase::ascii("vnd.insors.igm"), (399, 400)),(UniCase::ascii("vnd.intercon.formnet"), (400, 402)),(UniCase::ascii("vnd.intergeo"), (402, 403)),(UniCase::ascii("vnd.intu.qbo"), (403, 404)),(UniCase::ascii("vnd.intu.qfx"), (404, 405)),(UniCase::ascii("vnd.ipunplugged.rcprofile"), (405, 406)),(UniCase::ascii("vnd.irepository.package+xml"), (406, 407)),(UniCase::ascii("vnd.is-xpr"), (407, 408)),(UniCase::ascii("vnd.isac.fcs"), (408, 409)),(UniCase::ascii("vnd.jam"), (409, 410)),(UniCase::ascii("vnd.jcp.javame.midlet-rms"), (410, 411)),(UniCase::ascii("vnd.jisp"), (411, 412)),(UniCase::ascii("vnd.joost.joda-archive"), (412, 413)),(UniCase::ascii("vnd.kahootz"), (413, 415)),(UniCase::ascii("vnd.kde.karbon"), (415, 416)),(UniCase::ascii("vnd.kde.kchart"), (416, 417)),(UniCase::ascii("vnd.kde.kformula"), (417, 418)),(UniCase::ascii("vnd.kde.kivio"), (418, 419)),(UniCase::ascii("vnd.kde.kontour"), (419, 420)),(UniCase::ascii("vnd.kde.kpresenter"), (420, 422)),(UniCase::ascii("vnd.kde.kspread"), (422, 423)),(UniCase::ascii("vnd.kde.kword"), (423, 425)),(UniCase::ascii("vnd.kenameaapp"), (425, 426)),(UniCase::ascii("vnd.kidspiration"), (426, 427)),(UniCase::ascii("vnd.kinar"), (427, 429)),(UniCase::ascii("vnd.koan"), (429, 432)),(UniCase::ascii("vnd.kodak-descriptor"), (432, 433)),(UniCase::ascii("vnd.las.las+xml"), (433, 434)),(UniCase::ascii("vnd.llamagraphics.life-balance.desktop"), (434, 435)),(UniCase::ascii("vnd.llamagraphics.life-balance.exchange+xml"), (435, 436)),(UniCase::ascii("vnd.lotus-1-2-3"), (436, 437)),(UniCase::ascii("vnd.lotus-approach"), (437, 438)),(UniCase::ascii("vnd.lotus-freelance"), (438, 439)),(UniCase::ascii("vnd.lotus-notes"), (439, 440)),(UniCase::ascii("vnd.lotus-organizer"), (440, 441)),(UniCase::ascii("vnd.lotus-screencam"), (441, 442)),(UniCase::ascii("vnd.lotus-wordpro"), (442, 443)),(UniCase::ascii("vnd.macports.portpkg"), (443, 444)),(UniCase::ascii("vnd.mcd"), (444, 445)),(UniCase::ascii("vnd.medcalcdata"), (445, 446)),(UniCase::ascii("vnd.mediastation.cdkey"), (446, 447)),(UniCase::ascii("vnd.mfer"), (447, 448)),(UniCase::ascii("vnd.mfmp"), (448, 449)),(UniCase::ascii("vnd.micrografx.flo"), (449, 450)),(UniCase::ascii("vnd.micrografx.igx"), (450, 451)),(UniCase::ascii("vnd.mif"), (451, 452)),(UniCase::ascii("vnd.mobius.daf"), (452, 453)),(UniCase::ascii("vnd.mobius.dis"), (453, 454)),(UniCase::ascii("vnd.mobius.mbk"), (454, 455)),(UniCase::ascii("vnd.mobius.mqy"), (455, 456)),(UniCase::ascii("vnd.mobius.msl"), (456, 457)),(UniCase::ascii("vnd.mobius.plc"), (457, 458)),(UniCase::ascii("vnd.mobius.txf"), (458, 459)),(UniCase::ascii("vnd.mophun.application"), (459, 460)),(UniCase::ascii("vnd.mophun.certificate"), (460, 461)),(UniCase::ascii("vnd.mozilla.xul+xml"), (461, 462)),(UniCase::ascii("vnd.ms-artgalry"), (462, 463)),(UniCase::ascii("vnd.ms-excel"), (463, 473)),(UniCase::ascii("vnd.ms-excel.addin.macroEnabled.12"), (473, 474)),(UniCase::ascii("vnd.ms-excel.sheet.binary.macroEnabled.12"), (474, 475)),(UniCase::ascii("vnd.ms-excel.sheet.macroEnabled.12"), (475, 476)),(UniCase::ascii("vnd.ms-excel.template.macroEnabled.12"), (476, 477)),(UniCase::ascii("vnd.ms-fontobject"), (477, 478)),(UniCase::ascii("vnd.ms-htmlhelp"), (478, 479)),(UniCase::ascii("vnd.ms-ims"), (479, 480)),(UniCase::ascii("vnd.ms-lrm"), (480, 481)),(UniCase::ascii("vnd.ms-mediapackage"), (481, 482)),(UniCase::ascii("vnd.ms-office.calx"), (482, 483)),(UniCase::ascii("vnd.ms-officetheme"), (483, 484)),(UniCase::ascii("vnd.ms-outlook"), (484, 486)),(UniCase::ascii("vnd.ms-pki.certstore"), (486, 487)),(UniCase::ascii("vnd.ms-pki.pko"), (487, 488)),(UniCase::ascii("vnd.ms-pki.seccat"), (488, 489)),(UniCase::ascii("vnd.ms-pki.stl"), (489, 490)),(UniCase::ascii("vnd.ms-powerpoint"), (490, 495)),(UniCase::ascii("vnd.ms-powerpoint.addin.macroEnabled.12"), (495, 496)),(UniCase::ascii("vnd.ms-powerpoint.presentation.macroEnabled.12"), (496, 497)),(UniCase::ascii("vnd.ms-powerpoint.slide.macroEnabled.12"), (497, 498)),(UniCase::ascii("vnd.ms-powerpoint.slideshow.macroEnabled.12"), (498, 499)),(UniCase::ascii("vnd.ms-powerpoint.template.macroEnabled.12"), (499, 500)),(UniCase::ascii("vnd.ms-project"), (500, 502)),(UniCase::ascii("vnd.ms-visio.viewer"), (502, 503)),(UniCase::ascii("vnd.ms-word.document.macroEnabled.12"), (503, 504)),(UniCase::ascii("vnd.ms-word.template.macroEnabled.12"), (504, 505)),(UniCase::ascii("vnd.ms-works"), (505, 509)),(UniCase::ascii("vnd.ms-wpl"), (509, 510)),(UniCase::ascii("vnd.ms-xpsdocument"), (510, 511)),(UniCase::ascii("vnd.mseq"), (511, 512)),(UniCase::ascii("vnd.musician"), (512, 513)),(UniCase::ascii("vnd.muvee.style"), (513, 514)),(UniCase::ascii("vnd.mynfc"), (514, 515)),(UniCase::ascii("vnd.neurolanguage.nlu"), (515, 516)),(UniCase::ascii("vnd.nitf"), (516, 518)),(UniCase::ascii("vnd.noblenet-directory"), (518, 519)),(UniCase::ascii("vnd.noblenet-sealer"), (519, 520)),(UniCase::ascii("vnd.noblenet-web"), (520, 521)),(UniCase::ascii("vnd.nokia.n-gage.data"), (521, 522)),(UniCase::ascii("vnd.nokia.n-gage.symbian.install"), (522, 523)),(UniCase::ascii("vnd.nokia.radio-preset"), (523, 524)),(UniCase::ascii("vnd.nokia.radio-presets"), (524, 525)),(UniCase::ascii("vnd.novadigm.edm"), (525, 526)),(UniCase::ascii("vnd.novadigm.edx"), (526, 527)),(UniCase::ascii("vnd.novadigm.ext"), (527, 528)),(UniCase::ascii("vnd.oasis.opendocument.chart"), (528, 529)),(UniCase::ascii("vnd.oasis.opendocument.chart-template"), (529, 530)),(UniCase::ascii("vnd.oasis.opendocument.database"), (530, 531)),(UniCase::ascii("vnd.oasis.opendocument.formula"), (531, 532)),(UniCase::ascii("vnd.oasis.opendocument.formula-template"), (532, 533)),(UniCase::ascii("vnd.oasis.opendocument.graphics"), (533, 534)),(UniCase::ascii("vnd.oasis.opendocument.graphics-template"), (534, 535)),(UniCase::ascii("vnd.oasis.opendocument.image"), (535, 536)),(UniCase::ascii("vnd.oasis.opendocument.image-template"), (536, 537)),(UniCase::ascii("vnd.oasis.opendocument.presentation"), (537, 538)),(UniCase::ascii("vnd.oasis.opendocument.presentation-template"), (538, 539)),(UniCase::ascii("vnd.oasis.opendocument.spreadsheet"), (539, 540)),(UniCase::ascii("vnd.oasis.opendocument.spreadsheet-template"), (540, 541)),(UniCase::ascii("vnd.oasis.opendocument.text"), (541, 542)),(UniCase::ascii("vnd.oasis.opendocument.text-master"), (542, 543)),(UniCase::ascii("vnd.oasis.opendocument.text-template"), (543, 544)),(UniCase::ascii("vnd.oasis.opendocument.text-web"), (544, 545)),(UniCase::ascii("vnd.olpc-sugar"), (545, 546)),(UniCase::ascii("vnd.oma.dd2+xml"), (546, 547)),(UniCase::ascii("vnd.openofficeorg.extension"), (547, 548)),(UniCase::ascii("vnd.openxmlformats-officedocument.presentationml.presentation"), (548, 549)),(UniCase::ascii("vnd.openxmlformats-officedocument.presentationml.slide"), (549, 550)),(UniCase::ascii("vnd.openxmlformats-officedocument.presentationml.slideshow"), (550, 551)),(UniCase::ascii("vnd.openxmlformats-officedocument.presentationml.template"), (551, 552)),(UniCase::ascii("vnd.openxmlformats-officedocument.spreadsheetml.sheet"), (552, 553)),(UniCase::ascii("vnd.openxmlformats-officedocument.spreadsheetml.template"), (553, 554)),(UniCase::ascii("vnd.openxmlformats-officedocument.wordprocessingml.document"), (554, 555)),(UniCase::ascii("vnd.openxmlformats-officedocument.wordprocessingml.template"), (555, 556)),(UniCase::ascii("vnd.osgeo.mapguide.package"), (556, 557)),(UniCase::ascii("vnd.osgi.dp"), (557, 558)),(UniCase::ascii("vnd.osgi.subsystem"), (558, 559)),(UniCase::ascii("vnd.palm"), (559, 562)),(UniCase::ascii("vnd.pawaafile"), (562, 563)),(UniCase::ascii("vnd.pg.format"), (563, 564)),(UniCase::ascii("vnd.pg.osasli"), (564, 565)),(UniCase::ascii("vnd.picsel"), (565, 566)),(UniCase::ascii("vnd.pmi.widget"), (566, 567)),(UniCase::ascii("vnd.pocketlearn"), (567, 568)),(UniCase::ascii("vnd.powerbuilder6"), (568, 569)),(UniCase::ascii("vnd.previewsystems.box"), (569, 570)),(UniCase::ascii("vnd.proteus.magazine"), (570, 571)),(UniCase::ascii("vnd.publishare-delta-tree"), (571, 572)),(UniCase::ascii("vnd.pvi.ptid1"), (572, 573)),(UniCase::ascii("vnd.quark.quarkxpress"), (573, 578)),(UniCase::ascii("vnd.realvnc.bed"), (578, 579)),(UniCase::ascii("vnd.recordare.musicxml"), (579, 580)),(UniCase::ascii("vnd.recordare.musicxml+xml"), (580, 581)),(UniCase::ascii("vnd.rig.cryptonote"), (581, 582)),(UniCase::ascii("vnd.rn-realmedia"), (582, 583)),(UniCase::ascii("vnd.rn-realmedia-vbr"), (583, 584)),(UniCase::ascii("vnd.rn-rn_music_package"), (584, 585)),(UniCase::ascii("vnd.route66.link66+xml"), (585, 586)),(UniCase::ascii("vnd.sailingtracker.track"), (586, 587)),(UniCase::ascii("vnd.seemail"), (587, 588)),(UniCase::ascii("vnd.sema"), (588, 589)),(UniCase::ascii("vnd.semd"), (589, 590)),(UniCase::ascii("vnd.semf"), (590, 591)),(UniCase::ascii("vnd.shana.informed.formdata"), (591, 592)),(UniCase::ascii("vnd.shana.informed.formtemplate"), (592, 593)),(UniCase::ascii("vnd.shana.informed.interchange"), (593, 594)),(UniCase::ascii("vnd.shana.informed.package"), (594, 595)),(UniCase::ascii("vnd.simtech-mindmapper"), (595, 597)),(UniCase::ascii("vnd.smart.teacher"), (597, 598)),(UniCase::ascii("vnd.solent.sdkm+xml"), (598, 600)),(UniCase::ascii("vnd.spotfire.dxp"), (600, 601)),(UniCase::ascii("vnd.spotfire.sfs"), (601, 602)),(UniCase::ascii("vnd.stardivision.calc"), (602, 603)),(UniCase::ascii("vnd.stardivision.draw"), (603, 604)),(UniCase::ascii("vnd.stardivision.impress"), (604, 605)),(UniCase::ascii("vnd.stardivision.math"), (605, 606)),(UniCase::ascii("vnd.stardivision.writer"), (606, 608)),(UniCase::ascii("vnd.stardivision.writer-global"), (608, 609)),(UniCase::ascii("vnd.stepmania.package"), (609, 610)),(UniCase::ascii("vnd.stepmania.stepchart"), (610, 611)),(UniCase::ascii("vnd.sun.wadl+xml"), (611, 612)),(UniCase::ascii("vnd.sun.xml.calc"), (612, 613)),(UniCase::ascii("vnd.sun.xml.calc.template"), (613, 614)),(UniCase::ascii("vnd.sun.xml.draw"), (614, 615)),(UniCase::ascii("vnd.sun.xml.draw.template"), (615, 616)),(UniCase::ascii("vnd.sun.xml.impress"), (616, 617)),(UniCase::ascii("vnd.sun.xml.impress.template"), (617, 618)),(UniCase::ascii("vnd.sun.xml.math"), (618, 619)),(UniCase::ascii("vnd.sun.xml.writer"), (619, 620)),(UniCase::ascii("vnd.sun.xml.writer.global"), (620, 621)),(UniCase::ascii("vnd.sun.xml.writer.template"), (621, 622)),(UniCase::ascii("vnd.sus-calendar"), (622, 624)),(UniCase::ascii("vnd.svd"), (624, 625)),(UniCase::ascii("vnd.symbian.install"), (625, 627)),(UniCase::ascii("vnd.syncml+xml"), (627, 628)),(UniCase::ascii("vnd.syncml.dm+wbxml"), (628, 629)),(UniCase::ascii("vnd.syncml.dm+xml"), (629, 630)),(UniCase::ascii("vnd.tao.intent-module-archive"), (630, 631)),(UniCase::ascii("vnd.tcpdump.pcap"), (631, 634)),(UniCase::ascii("vnd.tmobile-livetv"), (634, 635)),(UniCase::ascii("vnd.trid.tpt"), (635, 636)),(UniCase::ascii("vnd.triscape.mxs"), (636, 637)),(UniCase::ascii("vnd.trueapp"), (637, 638)),(UniCase::ascii("vnd.ufdl"), (638, 640)),(UniCase::ascii("vnd.uiq.theme"), (640, 641)),(UniCase::ascii("vnd.umajin"), (641, 642)),(UniCase::ascii("vnd.unity"), (642, 643)),(UniCase::ascii("vnd.uoml+xml"), (643, 644)),(UniCase::ascii("vnd.vcx"), (644, 645)),(UniCase::ascii("vnd.visio"), (645, 651)),(UniCase::ascii("vnd.visionary"), (651, 652)),(UniCase::ascii("vnd.vsf"), (652, 653)),(UniCase::ascii("vnd.wap.wbxml"), (653, 654)),(UniCase::ascii("vnd.wap.wmlc"), (654, 655)),(UniCase::ascii("vnd.wap.wmlscriptc"), (655, 656)),(UniCase::ascii("vnd.webturbo"), (656, 657)),(UniCase::ascii("vnd.wolfram.player"), (657, 658)),(UniCase::ascii("vnd.wordperfect"), (658, 659)),(UniCase::ascii("vnd.wqd"), (659, 660)),(UniCase::ascii("vnd.wt.stf"), (660, 661)),(UniCase::ascii("vnd.xara"), (661, 662)),(UniCase::ascii("vnd.xfdl"), (662, 663)),(UniCase::ascii("vnd.yamaha.hv-dic"), (663, 664)),(UniCase::ascii("vnd.yamaha.hv-script"), (664, 665)),(UniCase::ascii("vnd.yamaha.hv-voice"), (665, 666)),(UniCase::ascii("vnd.yamaha.openscoreformat"), (666, 667)),(UniCase::ascii("vnd.yamaha.openscoreformat.osfpvg+xml"), (667, 668)),(UniCase::ascii("vnd.yamaha.smaf-audio"), (668, 669)),(UniCase::ascii("vnd.yamaha.smaf-phrase"), (669, 670)),(UniCase::ascii("vnd.yellowriver-custom-menu"), (670, 671)),(UniCase::ascii("vnd.zul"), (671, 673)),(UniCase::ascii("vnd.zzazz.deck+xml"), (673, 674)),(UniCase::ascii("voicexml+xml"), (674, 675)),(UniCase::ascii("vsix"), (675, 676)),(UniCase::ascii("wasm"), (676, 677)),(UniCase::ascii("widget"), (677, 678)),(UniCase::ascii("windows-library+xml"), (678, 679)),(UniCase::ascii("windows-search-connector+xml"), (679, 680)),(UniCase::ascii("winhlp"), (680, 681)),(UniCase::ascii("wlmoviemaker"), (681, 682)),(UniCase::ascii("wspolicy+xml"), (682, 683)),(UniCase::ascii("x-7z-compressed"), (683, 684)),(UniCase::ascii("x-abiword"), (684, 685)),(UniCase::ascii("x-ace-compressed"), (685, 686)),(UniCase::ascii("x-arj"), (686, 687)),(UniCase::ascii("x-authorware-bin"), (687, 690)),(UniCase::ascii("x-authorware-map"), (690, 691)),(UniCase::ascii("x-authorware-seg"), (691, 692)),(UniCase::ascii("x-bcpio"), (692, 693)),(UniCase::ascii("x-bittorrent"), (693, 694)),(UniCase::ascii("x-blorb"), (694, 696)),(UniCase::ascii("x-bridge-url"), (696, 697)),(UniCase::ascii("x-bzip"), (697, 698)),(UniCase::ascii("x-bzip2"), (698, 700)),(UniCase::ascii("x-cbr"), (700, 705)),(UniCase::ascii("x-cdf"), (705, 706)),(UniCase::ascii("x-cdlink"), (706, 707)),(UniCase::ascii("x-cfs-compressed"), (707, 708)),(UniCase::ascii("x-chat"), (708, 709)),(UniCase::ascii("x-chess-pgn"), (709, 710)),(UniCase::ascii("x-chrome-extension"), (710, 711)),(UniCase::ascii("x-cocoa"), (711, 712)),(UniCase::ascii("x-compress"), (712, 713)),(UniCase::ascii("x-compressed"), (713, 714)),(UniCase::ascii("x-cpio"), (714, 715)),(UniCase::ascii("x-csh"), (715, 716)),(UniCase::ascii("x-debian-package"), (716, 717)),(UniCase::ascii("x-dgc-compressed"), (717, 718)),(UniCase::ascii("x-director"), (718, 727)),(UniCase::ascii("x-doom"), (727, 728)),(UniCase::ascii("x-dtbncx+xml"), (728, 729)),(UniCase::ascii("x-dtbook+xml"), (729, 730)),(UniCase::ascii("x-dtbresource+xml"), (730, 731)),(UniCase::ascii("x-dvi"), (731, 732)),(UniCase::ascii("x-dxf"), (732, 733)),(UniCase::ascii("x-endace-erf"), (733, 734)),(UniCase::ascii("x-eva"), (734, 735)),(UniCase::ascii("x-font-bdf"), (735, 736)),(UniCase::ascii("x-font-ghostscript"), (736, 737)),(UniCase::ascii("x-font-linux-psf"), (737, 738)),(UniCase::ascii("x-font-pcf"), (738, 739)),(UniCase::ascii("x-font-snf"), (739, 740)),(UniCase::ascii("x-font-ttf"), (740, 741)),(UniCase::ascii("x-font-type1"), (741, 742)),(UniCase::ascii("x-freearc"), (742, 743)),(UniCase::ascii("x-gca-compressed"), (743, 744)),(UniCase::ascii("x-glulx"), (744, 745)),(UniCase::ascii("x-gnumeric"), (745, 746)),(UniCase::ascii("x-gramps-xml"), (746, 747)),(UniCase::ascii("x-gtar"), (747, 748)),(UniCase::ascii("x-gzip"), (748, 749)),(UniCase::ascii("x-hdf"), (749, 750)),(UniCase::ascii("x-httpd-php"), (750, 751)),(UniCase::ascii("x-install-instructions"), (751, 752)),(UniCase::ascii("x-internet-signup"), (752, 754)),(UniCase::ascii("x-iphone"), (754, 755)),(UniCase::ascii("x-itunes-ipa"), (755, 756)),(UniCase::ascii("x-itunes-ipg"), (756, 757)),(UniCase::ascii("x-itunes-ipsw"), (757, 758)),(UniCase::ascii("x-itunes-ite"), (758, 759)),(UniCase::ascii("x-itunes-itlp"), (759, 760)),(UniCase::ascii("x-itunes-itms"), (760, 761)),(UniCase::ascii("x-itunes-itpc"), (761, 762)),(UniCase::ascii("x-java-applet"), (762, 763)),(UniCase::ascii("x-java-archive-diff"), (763, 764)),(UniCase::ascii("x-java-jnlp-file"), (764, 765)),(UniCase::ascii("x-koan"), (765, 766)),(UniCase::ascii("x-latex"), (766, 767)),(UniCase::ascii("x-lua-bytecode"), (767, 768)),(UniCase::ascii("x-lzh-compressed"), (768, 769)),(UniCase::ascii("x-makeself"), (769, 770)),(UniCase::ascii("x-mie"), (770, 771)),(UniCase::ascii("x-miva-compiled"), (771, 772)),(UniCase::ascii("x-mmxp"), (772, 773)),(UniCase::ascii("x-mobipocket-ebook"), (773, 775)),(UniCase::ascii("x-ms-application"), (775, 776)),(UniCase::ascii("x-ms-license"), (776, 777)),(UniCase::ascii("x-ms-manifest"), (777, 778)),(UniCase::ascii("x-ms-reader"), (778, 779)),(UniCase::ascii("x-ms-shortcut"), (779, 780)),(UniCase::ascii("x-ms-vsto"), (780, 781)),(UniCase::ascii("x-ms-wmd"), (781, 782)),(UniCase::ascii("x-ms-wmz"), (782, 783)),(UniCase::ascii("x-ms-xbap"), (783, 784)),(UniCase::ascii("x-msaccess"), (784, 785)),(UniCase::ascii("x-msbinder"), (785, 786)),(UniCase::ascii("x-mscardfile"), (786, 787)),(UniCase::ascii("x-msclip"), (787, 788)),(UniCase::ascii("x-msdownload"), (788, 791)),(UniCase::ascii("x-msmediaview"), (791, 794)),(UniCase::ascii("x-msmetafile"), (794, 796)),(UniCase::ascii("x-msmoney"), (796, 797)),(UniCase::ascii("x-mspublisher"), (797, 798)),(UniCase::ascii("x-msschedule"), (798, 799)),(UniCase::ascii("x-msterminal"), (799, 800)),(UniCase::ascii("x-mswrite"), (800, 801)),(UniCase::ascii("x-netcdf"), (801, 802)),(UniCase::ascii("x-ns-proxy-autoconfig"), (802, 803)),(UniCase::ascii("x-nzb"), (803, 804)),(UniCase::ascii("x-oleobject"), (804, 805)),(UniCase::ascii("x-parquet"), (805, 806)),(UniCase::ascii("x-perfmon"), (806, 811)),(UniCase::ascii("x-perl"), (811, 813)),(UniCase::ascii("x-pkcs12"), (813, 815)),(UniCase::ascii("x-pkcs7-certificates"), (815, 817)),(UniCase::ascii("x-pkcs7-certreqresp"), (817, 818)),(UniCase::ascii("x-podcast"), (818, 819)),(UniCase::ascii("x-quicktimeplayer"), (819, 820)),(UniCase::ascii("x-rar-compressed"), (820, 821)),(UniCase::ascii("x-research-info-systems"), (821, 822)),(UniCase::ascii("x-safari-safariextz"), (822, 823)),(UniCase::ascii("x-safari-webarchive"), (823, 824)),(UniCase::ascii("x-sgimb"), (824, 825)),(UniCase::ascii("x-sh"), (825, 826)),(UniCase::ascii("x-shar"), (826, 827)),(UniCase::ascii("x-shockwave-flash"), (827, 829)),(UniCase::ascii("x-silverlight-app"), (829, 830)),(UniCase::ascii("x-smaf"), (830, 831)),(UniCase::ascii("x-sql"), (831, 832)),(UniCase::ascii("x-stuffit"), (832, 833)),(UniCase::ascii("x-stuffitx"), (833, 834)),(UniCase::ascii("x-subrip"), (834, 835)),(UniCase::ascii("x-sv4cpio"), (835, 836)),(UniCase::ascii("x-sv4crc"), (836, 837)),(UniCase::ascii("x-t3vm-image"), (837, 838)),(UniCase::ascii("x-tads"), (838, 839)),(UniCase::ascii("x-tar"), (839, 840)),(UniCase::ascii("x-tcl"), (840, 842)),(UniCase::ascii("x-tex"), (842, 843)),(UniCase::ascii("x-tex-tfm"), (843, 844)),(UniCase::ascii("x-texinfo"), (844, 846)),(UniCase::ascii("x-tgif"), (846, 847)),(UniCase::ascii("x-troff"), (847, 850)),(UniCase::ascii("x-troff-man"), (850, 851)),(UniCase::ascii("x-troff-me"), (851, 852)),(UniCase::ascii("x-troff-ms"), (852, 853)),(UniCase::ascii("x-ustar"), (853, 854)),(UniCase::ascii("x-virtualbox-hdd"), (854, 855)),(UniCase::ascii("x-virtualbox-ova"), (855, 856)),(UniCase::ascii("x-virtualbox-ovf"), (856, 857)),(UniCase::ascii("x-virtualbox-vbox"), (857, 858)),(UniCase::ascii("x-virtualbox-vbox-extpack"), (858, 859)),(UniCase::ascii("x-virtualbox-vdi"), (859, 860)),(UniCase::ascii("x-virtualbox-vhd"), (860, 861)),(UniCase::ascii("x-virtualbox-vmdk"), (861, 862)),(UniCase::ascii("x-wais-source"), (862, 863)),(UniCase::ascii("x-web-app-manifest+json"), (863, 864)),(UniCase::ascii("x-wlpg-detect"), (864, 865)),(UniCase::ascii("x-wlpg3-detect"), (865, 866)),(UniCase::ascii("x-x509-ca-cert"), (866, 870)),(UniCase::ascii("x-xfig"), (870, 871)),(UniCase::ascii("x-xliff+xml"), (871, 872)),(UniCase::ascii("x-xpinstall"), (872, 873)),(UniCase::ascii("x-xz"), (873, 874)),(UniCase::ascii("x-zmachine"), (874, 882)),(UniCase::ascii("xaml+xml"), (882, 883)),(UniCase::ascii("xcap-diff+xml"), (883, 884)),(UniCase::ascii("xenc+xml"), (884, 885)),(UniCase::ascii("xhtml+xml"), (885, 887)),(UniCase::ascii("xml"), (887, 931)),(UniCase::ascii("xop+xml"), (931, 932)),(UniCase::ascii("xproc+xml"), (932, 933)),(UniCase::ascii("xspf+xml"), (933, 934)),(UniCase::ascii("xv+xml"), (934, 938)),(UniCase::ascii("yang"), (938, 939)),(UniCase::ascii("yin+xml"), (939, 940)),(UniCase::ascii("zip"), (940, 941)),] }),(UniCase::ascii("audio"), TopLevelExts { start: 941, end: 1007, subs: &[(UniCase::ascii("aac"), (941, 943)),(UniCase::ascii("ac3"), (943, 944)),(UniCase::ascii("aiff"), (944, 948)),(UniCase::ascii("annodex"), (948, 949)),(UniCase::ascii("audible"), (949, 950)),(UniCase::ascii("basic"), (950, 952)),(UniCase::ascii("flac"), (952, 953)),(UniCase::ascii("m4a"), (953, 954)),(UniCase::ascii("m4b"), (954, 955)),(UniCase::ascii("m4p"), (955, 956)),(UniCase::ascii("mid"), (956, 959)),(UniCase::ascii("midi"), (959, 960)),(UniCase::ascii("mp4"), (960, 961)),(UniCase::ascii("mpeg"), (961, 967)),(UniCase::ascii("ogg"), (967, 971)),(UniCase::ascii("s3m"), (971, 972)),(UniCase::ascii("scpls"), (972, 973)),(UniCase::ascii("silk"), (973, 974)),(UniCase::ascii("vnd.audible.aax"), (974, 975)),(UniCase::ascii("vnd.dece.audio"), (975, 977)),(UniCase::ascii("vnd.digital-winds"), (977, 978)),(UniCase::ascii("vnd.dlna.adts"), (978, 979)),(UniCase::ascii("vnd.dra"), (979, 980)),(UniCase::ascii("vnd.dts"), (980, 981)),(UniCase::ascii("vnd.dts.hd"), (981, 982)),(UniCase::ascii("vnd.lucent.voice"), (982, 983)),(UniCase::ascii("vnd.ms-playready.media.pya"), (983, 984)),(UniCase::ascii("vnd.nuera.ecelp4800"), (984, 985)),(UniCase::ascii("vnd.nuera.ecelp7470"), (985, 986)),(UniCase::ascii("vnd.nuera.ecelp9600"), (986, 987)),(UniCase::ascii("vnd.rip"), (987, 988)),(UniCase::ascii("wav"), (988, 990)),(UniCase::ascii("webm"), (990, 991)),(UniCase::ascii("x-caf"), (991, 992)),(UniCase::ascii("x-gsm"), (992, 993)),(UniCase::ascii("x-m4r"), (993, 994)),(UniCase::ascii("x-matroska"), (994, 995)),(UniCase::ascii("x-mpegurl"), (995, 997)),(UniCase::ascii("x-ms-wax"), (997, 998)),(UniCase::ascii("x-ms-wma"), (998, 999)),(UniCase::ascii("x-pn-realaudio"), (999, 1001)),(UniCase::ascii("x-pn-realaudio-plugin"), (1001, 1002)),(UniCase::ascii("x-sd2"), (1002, 1003)),(UniCase::ascii("x-smd"), (1003, 1006)),(UniCase::ascii("xm"), (1006, 1007)),] }),(UniCase::ascii("chemical"), TopLevelExts { start: 1007, end: 1013, subs: &[(UniCase::ascii("x-cdx"), (1007, 1008)),(UniCase::ascii("x-cif"), (1008, 1009)),(UniCase::ascii("x-cmdf"), (1009, 1010)),(UniCase::ascii("x-cml"), (1010, 1011)),(UniCase::ascii("x-csml"), (1011, 1012)),(UniCase::ascii("x-xyz"), (1012, 1013)),] }),(UniCase::ascii("drawing"), TopLevelExts { start: 1013, end: 1014, subs: &[(UniCase::ascii("x-dwf"), (1013, 1014)),] }),(UniCase::ascii("font"), TopLevelExts { start: 1014, end: 1017, subs: &[(UniCase::ascii("collection"), (1014, 1015)),(UniCase::ascii("ttf"), (1015, 1016)),(UniCase::ascii("woff2"), (1016, 1017)),] }),(UniCase::ascii("image"), TopLevelExts { start: 1017, end: 1119, subs: &[(UniCase::ascii("apng"), (1017, 1018)),(UniCase::ascii("avif"), (1018, 1019)),(UniCase::ascii("avif-sequence"), (1019, 1020)),(UniCase::ascii("bmp"), (1020, 1022)),(UniCase::ascii("cgm"), (1022, 1023)),(UniCase::ascii("cis-cod"), (1023, 1024)),(UniCase::ascii("g3fax"), (1024, 1025)),(UniCase::ascii("gif"), (1025, 1026)),(UniCase::ascii("heic"), (1026, 1027)),(UniCase::ascii("heic-sequence"), (1027, 1028)),(UniCase::ascii("heif"), (1028, 1029)),(UniCase::ascii("heif-sequence"), (1029, 1030)),(UniCase::ascii("ief"), (1030, 1031)),(UniCase::ascii("jp2"), (1031, 1033)),(UniCase::ascii("jpeg"), (1033, 1037)),(UniCase::ascii("jpm"), (1037, 1038)),(UniCase::ascii("jpx"), (1038, 1040)),(UniCase::ascii("jxl"), (1040, 1041)),(UniCase::ascii("ktx"), (1041, 1042)),(UniCase::ascii("pict"), (1042, 1045)),(UniCase::ascii("png"), (1045, 1047)),(UniCase::ascii("prs.btif"), (1047, 1048)),(UniCase::ascii("sgi"), (1048, 1049)),(UniCase::ascii("svg+xml"), (1049, 1051)),(UniCase::ascii("tiff"), (1051, 1053)),(UniCase::ascii("vnd.dece.graphic"), (1053, 1057)),(UniCase::ascii("vnd.djvu"), (1057, 1059)),(UniCase::ascii("vnd.fastbidsheet"), (1059, 1060)),(UniCase::ascii("vnd.fpx"), (1060, 1061)),(UniCase::ascii("vnd.fst"), (1061, 1062)),(UniCase::ascii("vnd.fujixerox.edmics-mmr"), (1062, 1063)),(UniCase::ascii("vnd.fujixerox.edmics-rlc"), (1063, 1064)),(UniCase::ascii("vnd.ms-modi"), (1064, 1065)),(UniCase::ascii("vnd.ms-photo"), (1065, 1066)),(UniCase::ascii("vnd.net-fpx"), (1066, 1067)),(UniCase::ascii("vnd.radiance"), (1067, 1068)),(UniCase::ascii("vnd.rn-realflash"), (1068, 1069)),(UniCase::ascii("vnd.wap.wbmp"), (1069, 1070)),(UniCase::ascii("vnd.xiff"), (1070, 1071)),(UniCase::ascii("webp"), (1071, 1072)),(UniCase::ascii("x-3ds"), (1072, 1073)),(UniCase::ascii("x-adobe-dng"), (1073, 1074)),(UniCase::ascii("x-canon-cr2"), (1074, 1075)),(UniCase::ascii("x-canon-cr3"), (1075, 1076)),(UniCase::ascii("x-canon-crw"), (1076, 1077)),(UniCase::ascii("x-cmu-raster"), (1077, 1078)),(UniCase::ascii("x-cmx"), (1078, 1079)),(UniCase::ascii("x-epson-erf"), (1079, 1080)),(UniCase::ascii("x-freehand"), (1080, 1085)),(UniCase::ascii("x-fuji-raf"), (1085, 1086)),(UniCase::ascii("x-icon"), (1086, 1087)),(UniCase::ascii("x-jg"), (1087, 1088)),(UniCase::ascii("x-jng"), (1088, 1089)),(UniCase::ascii("x-kodak-dcr"), (1089, 1090)),(UniCase::ascii("x-kodak-k25"), (1090, 1091)),(UniCase::ascii("x-kodak-kdc"), (1091, 1092)),(UniCase::ascii("x-macpaint"), (1092, 1095)),(UniCase::ascii("x-minolta-mrw"), (1095, 1096)),(UniCase::ascii("x-mrsid-image"), (1096, 1097)),(UniCase::ascii("x-nikon-nef"), (1097, 1098)),(UniCase::ascii("x-nikon-nrw"), (1098, 1099)),(UniCase::ascii("x-olympus-orf"), (1099, 1100)),(UniCase::ascii("x-panasonic-rw"), (1100, 1101)),(UniCase::ascii("x-panasonic-rw2"), (1101, 1103)),(UniCase::ascii("x-pentax-pef"), (1103, 1104)),(UniCase::ascii("x-portable-anymap"), (1104, 1105)),(UniCase::ascii("x-portable-bitmap"), (1105, 1106)),(UniCase::ascii("x-portable-graymap"), (1106, 1107)),(UniCase::ascii("x-portable-pixmap"), (1107, 1108)),(UniCase::ascii("x-quicktime"), (1108, 1110)),(UniCase::ascii("x-rgb"), (1110, 1111)),(UniCase::ascii("x-sigma-x3f"), (1111, 1112)),(UniCase::ascii("x-sony-arw"), (1112, 1113)),(UniCase::ascii("x-sony-sr2"), (1113, 1114)),(UniCase::ascii("x-sony-srf"), (1114, 1115)),(UniCase::ascii("x-tga"), (1115, 1116)),(UniCase::ascii("x-xbitmap"), (1116, 1117)),(UniCase::ascii("x-xpixmap"), (1117, 1118)),(UniCase::ascii("x-xwindowdump"), (1118, 1119)),] }),(UniCase::ascii("message"), TopLevelExts { start: 1119, end: 1129, subs: &[(UniCase::ascii("disposition-notification"), (1119, 1120)),(UniCase::ascii("global"), (1120, 1121)),(UniCase::ascii("global-delivery-status"), (1121, 1122)),(UniCase::ascii("global-disposition-notification"), (1122, 1123)),(UniCase::ascii("global-headers"), (1123, 1124)),(UniCase::ascii("rfc822"), (1124, 1129)),] }),(UniCase::ascii("model"), TopLevelExts { start: 1129, end: 1147, subs: &[(UniCase::ascii("gltf+json"), (1129, 1130)),(UniCase::ascii("gltf-binary"), (1130, 1131)),(UniCase::ascii("iges"), (1131, 1133)),(UniCase::ascii("mesh"), (1133, 1136)),(UniCase::ascii("vnd.collada+xml"), (1136, 1137)),(UniCase::ascii("vnd.gdl"), (1137, 1138)),(UniCase::ascii("vnd.gtw"), (1138, 1139)),(UniCase::ascii("vnd.vtu"), (1139, 1140)),(UniCase::ascii("vrml"), (1140, 1141)),(UniCase::ascii("x3d+binary"), (1141, 1143)),(UniCase::ascii("x3d+vrml"), (1143, 1145)),(UniCase::ascii("x3d+xml"), (1145, 1147)),] }),(UniCase::ascii("text"), TopLevelExts { start: 1147, end: 1330, subs: &[(UniCase::ascii("cache-manifest"), (1147, 1148)),(UniCase::ascii("calendar"), (1148, 1150)),(UniCase::ascii("coffeescript"), (1150, 1152)),(UniCase::ascii("css"), (1152, 1153)),(UniCase::ascii("csv"), (1153, 1154)),(UniCase::ascii("dlm"), (1154, 1155)),(UniCase::ascii("gemini"), (1155, 1157)),(UniCase::ascii("h323"), (1157, 1158)),(UniCase::ascii("html"), (1158, 1162)),(UniCase::ascii("iuls"), (1162, 1163)),(UniCase::ascii("jade"), (1163, 1164)),(UniCase::ascii("javascript"), (1164, 1169)),(UniCase::ascii("less"), (1169, 1170)),(UniCase::ascii("markdown"), (1170, 1172)),(UniCase::ascii("mathml"), (1172, 1173)),(UniCase::ascii("n3"), (1173, 1174)),(UniCase::ascii("plain"), (1174, 1242)),(UniCase::ascii("prs.lines.tag"), (1242, 1243)),(UniCase::ascii("richtext"), (1243, 1244)),(UniCase::ascii("scriptlet"), (1244, 1246)),(UniCase::ascii("sgml"), (1246, 1248)),(UniCase::ascii("shex"), (1248, 1249)),(UniCase::ascii("slim"), (1249, 1251)),(UniCase::ascii("stylus"), (1251, 1253)),(UniCase::ascii("tab-separated-values"), (1253, 1254)),(UniCase::ascii("turtle"), (1254, 1255)),(UniCase::ascii("uri-list"), (1255, 1258)),(UniCase::ascii("vbscript"), (1258, 1259)),(UniCase::ascii("vcard"), (1259, 1260)),(UniCase::ascii("vnd.curl"), (1260, 1261)),(UniCase::ascii("vnd.curl.dcurl"), (1261, 1262)),(UniCase::ascii("vnd.curl.mcurl"), (1262, 1263)),(UniCase::ascii("vnd.curl.scurl"), (1263, 1264)),(UniCase::ascii("vnd.dvb.subtitle"), (1264, 1265)),(UniCase::ascii("vnd.fly"), (1265, 1266)),(UniCase::ascii("vnd.fmi.flexstor"), (1266, 1267)),(UniCase::ascii("vnd.graphviz"), (1267, 1268)),(UniCase::ascii("vnd.in3d.3dml"), (1268, 1269)),(UniCase::ascii("vnd.in3d.spot"), (1269, 1270)),(UniCase::ascii("vnd.sun.j2me.app-descriptor"), (1270, 1271)),(UniCase::ascii("vnd.wap.wml"), (1271, 1272)),(UniCase::ascii("vnd.wap.wmlscript"), (1272, 1273)),(UniCase::ascii("vtt"), (1273, 1274)),(UniCase::ascii("webviewhtml"), (1274, 1275)),(UniCase::ascii("x-c"), (1275, 1276)),(UniCase::ascii("x-component"), (1276, 1277)),(UniCase::ascii("x-fortran"), (1277, 1281)),(UniCase::ascii("x-gherkin"), (1281, 1282)),(UniCase::ascii("x-handlebars-template"), (1282, 1283)),(UniCase::ascii("x-hdml"), (1283, 1284)),(UniCase::ascii("x-html-insertion"), (1284, 1286)),(UniCase::ascii("x-lua"), (1286, 1287)),(UniCase::ascii("x-markdown"), (1287, 1289)),(UniCase::ascii("x-ms-contact"), (1289, 1290)),(UniCase::ascii("x-ms-group"), (1290, 1291)),(UniCase::ascii("x-ms-iqy"), (1291, 1292)),(UniCase::ascii("x-ms-rqy"), (1292, 1293)),(UniCase::ascii("x-nfo"), (1293, 1294)),(UniCase::ascii("x-opml"), (1294, 1295)),(UniCase::ascii("x-pascal"), (1295, 1297)),(UniCase::ascii("x-processing"), (1297, 1298)),(UniCase::ascii("x-rust"), (1298, 1299)),(UniCase::ascii("x-sass"), (1299, 1300)),(UniCase::ascii("x-scss"), (1300, 1301)),(UniCase::ascii("x-setext"), (1301, 1302)),(UniCase::ascii("x-sfv"), (1302, 1303)),(UniCase::ascii("x-suse-ymp"), (1303, 1304)),(UniCase::ascii("x-toml"), (1304, 1305)),(UniCase::ascii("x-uuencode"), (1305, 1306)),(UniCase::ascii("x-vcard"), (1306, 1307)),(UniCase::ascii("x-yaml"), (1307, 1309)),(UniCase::ascii("xml"), (1309, 1330)),] }),(UniCase::ascii("video"), TopLevelExts { start: 1330, end: 1411, subs: &[(UniCase::ascii("3gpp"), (1330, 1332)),(UniCase::ascii("3gpp2"), (1332, 1334)),(UniCase::ascii("annodex"), (1334, 1335)),(UniCase::ascii("divx"), (1335, 1336)),(UniCase::ascii("h261"), (1336, 1337)),(UniCase::ascii("h263"), (1337, 1338)),(UniCase::ascii("h264"), (1338, 1339)),(UniCase::ascii("jpeg"), (1339, 1340)),(UniCase::ascii("jpm"), (1340, 1341)),(UniCase::ascii("mj2"), (1341, 1343)),(UniCase::ascii("mp4"), (1343, 1346)),(UniCase::ascii("mpeg"), (1346, 1357)),(UniCase::ascii("ogg"), (1357, 1358)),(UniCase::ascii("quicktime"), (1358, 1361)),(UniCase::ascii("vnd.dece.hd"), (1361, 1363)),(UniCase::ascii("vnd.dece.mobile"), (1363, 1365)),(UniCase::ascii("vnd.dece.pd"), (1365, 1367)),(UniCase::ascii("vnd.dece.sd"), (1367, 1369)),(UniCase::ascii("vnd.dece.video"), (1369, 1371)),(UniCase::ascii("vnd.dlna.mpeg-tts"), (1371, 1376)),(UniCase::ascii("vnd.dvb.file"), (1376, 1377)),(UniCase::ascii("vnd.fvt"), (1377, 1378)),(UniCase::ascii("vnd.mpegurl"), (1378, 1380)),(UniCase::ascii("vnd.ms-playready.media.pyv"), (1380, 1381)),(UniCase::ascii("vnd.uvvu.mp4"), (1381, 1383)),(UniCase::ascii("vnd.vivo"), (1383, 1384)),(UniCase::ascii("webm"), (1384, 1385)),(UniCase::ascii("x-dv"), (1385, 1387)),(UniCase::ascii("x-f4v"), (1387, 1388)),(UniCase::ascii("x-fli"), (1388, 1389)),(UniCase::ascii("x-flv"), (1389, 1390)),(UniCase::ascii("x-ivf"), (1390, 1391)),(UniCase::ascii("x-la-asf"), (1391, 1393)),(UniCase::ascii("x-m4v"), (1393, 1394)),(UniCase::ascii("x-matroska"), (1394, 1397)),(UniCase::ascii("x-mng"), (1397, 1398)),(UniCase::ascii("x-ms-asf"), (1398, 1402)),(UniCase::ascii("x-ms-vob"), (1402, 1403)),(UniCase::ascii("x-ms-wm"), (1403, 1404)),(UniCase::ascii("x-ms-wmp"), (1404, 1405)),(UniCase::ascii("x-ms-wmv"), (1405, 1406)),(UniCase::ascii("x-ms-wmx"), (1406, 1407)),(UniCase::ascii("x-ms-wvx"), (1407, 1408)),(UniCase::ascii("x-msvideo"), (1408, 1409)),(UniCase::ascii("x-sgi-movie"), (1409, 1410)),(UniCase::ascii("x-smv"), (1410, 1411)),] }),(UniCase::ascii("x-conference"), TopLevelExts { start: 1411, end: 1412, subs: &[(UniCase::ascii("x-cooltalk"), (1411, 1412)),] }),(UniCase::ascii("x-world"), TopLevelExts { start: 1412, end: 1417, subs: &[(UniCase::ascii("x-vrml"), (1412, 1417)),] }),]; -const EXTS: &'static [&'static str] = &["dwg", "ez", "anx", "aw", "atom", "atomcat", "atomsvc", "bdoc", "ccxml", "cdmia", "cdmic", "cdmid", "cdmio", "cdmiq", "cu", "mpd", "davmount", "x", "dbk", "dssc", "xdssc", "emma", "evy", "epub", "etl", "exi", "otf", "ttf", "pfr", "woff", "fif", "fsscript", "fsx", "spl", "geojson", "gml", "gpx", "gxf", "gz", "hjson", "hta", "stk", "ink", "inkml", "acx", "ipfix", "ear", "jar", "war", "ser", "mjs", "json", "json5", "jsonml", "jsonld", "jck", "jcz", "lostxml", "hqx", "cpt", "mads", "webmanifest", "mrc", "mrcx", "ma", "mb", "nb", "mathml", "mbox", "mscml", "metalink", "meta4", "mets", "mods", "m21", "mp21", "mp4s", "amc", "vsi", "accdb", "accde", "accdt", "ade", "adp", "mda", "mde", "accda", "accdc", "accft", "accdr", "accdw", "doc", "dot", "wbk", "wiz", "mxf", "nq", "nt", "aaf", "aca", "afm", "asd", "asi", "bin", "bpk", "buffer", "cab", "cur", "dat", "deb", "deploy", "dist", "distz", "dmg", "dms", "dsp", "dump", "dwp", "elc", "emz", "exe", "fla", "hhk", "hhp", "hxd", "hxh", "hxi", "hxq", "hxr", "hxs", "hxw", "img", "inf", "iso", "java", "jpb", "lpk", "lrf", "lzh", "mar", "mdp", "mix", "msi", "msm", "mso", "msp", "ocx", "pcx", "pcz", "pfb", "pfm", "pkg", "prm", "prx", "psd", "psm", "psp", "qxd", "rvt", "sea", "smi", "snp", "so", "thn", "toc", "u32", "xmp", "xsn", "xtp", "oda", "opf", "ogx", "axs", "omdoc", "one", "onea", "onepkg", "onetmp", "onetoc", "onetoc2", "osdx", "oxps", "xer", "pdf", "pgp", "asc", "sig", "prf", "p10", "p7c", "p7m", "p7s", "p8", "ac", "crl", "pkipath", "pki", "ai", "eps", "ps", "psc1", "cww", "pskcxml", "raml", "rat", "rdf", "rif", "rnc", "rl", "rld", "gbr", "mft", "roa", "rsd", "rss", "rtf", "sbml", "scq", "scs", "spq", "spp", "sdp", "setpay", "setreg", "shf", "smil", "rq", "srx", "gram", "grxml", "sru", "ssdl", "ssml", "step", "stp", "ssm", "tei", "teicorpus", "tfi", "tsd", "trig", "plb", "psb", "pvb", "tcap", "pwn", "aso", "imp", "acu", "acutc", "atc", "air", "fcdt", "fxp", "fxpl", "xdp", "xfdf", "ahead", "azf", "azs", "azw", "acc", "ami", "apk", "cii", "fti", "atx", "parquet", "mpkg", "pkpass", "swi", "iota", "aep", "mpm", "bmi", "rep", "cdxml", "mmd", "cdy", "csl", "cla", "rp9", "c4d", "c4f", "c4g", "c4p", "c4u", "c11amc", "c11amz", "csp", "cdbcmsg", "cmc", "clkx", "clkk", "clkp", "clkt", "clkw", "wbs", "ppd", "car", "pcurl", "dart", "rdz", "uvd", "uvf", "uvvd", "uvvf", "uvt", "uvvt", "uvvx", "uvx", "uvvz", "uvz", "fe_launch", "dna", "mlp", "dpg", "dfac", "kpxx", "ait", "geo", "mag", "nml", "esf", "msf", "qam", "slt", "ssf", "es3", "et3", "ez2", "ez3", "fdf", "mseed", "dataless", "seed", "gph", "ftc", "book", "fm", "frame", "maker", "fnc", "ltf", "fsc", "oas", "oa2", "oa3", "fg5", "bh2", "ddd", "xdw", "xbd", "fzs", "txd", "ggb", "ggt", "gex", "gre", "gxt", "g2w", "g3w", "gmx", "gdoc", "gslides", "gsheet", "kml", "kmz", "gqf", "gqs", "gac", "ghf", "gim", "grv", "gtm", "tpl", "vcg", "hal", "zmm", "hbci", "les", "hpgl", "hpid", "hps", "jlt", "pcl", "pclxl", "sfd-hdstx", "mpy", "afp", "list3820", "listafp", "irm", "sc", "icc", "icm", "igl", "ivp", "ivu", "igm", "xpw", "xpx", "i2g", "qbo", "qfx", "rcprofile", "irp", "xpr", "fcs", "jam", "rms", "jisp", "joda", "ktr", "ktz", "karbon", "chrt", "kfo", "flw", "kon", "kpr", "kpt", "ksp", "kwd", "kwt", "htke", "kia", "kne", "knp", "skd", "skm", "skt", "sse", "lasxml", "lbd", "lbe", "123", "apr", "pre", "nsf", "org", "scm", "lwp", "portpkg", "mcd", "mc1", "cdkey", "mwf", "mfm", "flo", "igx", "mif", "daf", "dis", "mbk", "mqy", "msl", "plc", "txf", "mpn", "mpc", "xul", "cil", "slk", "xla", "xlc", "xld", "xlk", "xll", "xlm", "xls", "xlt", "xlw", "xlam", "xlsb", "xlsm", "xltm", "eot", "chm", "ims", "lrm", "mpf", "calx", "thmx", "msg", "pst", "sst", "pko", "cat", "stl", "pot", "ppa", "pps", "ppt", "pwz", "ppam", "pptm", "sldm", "ppsm", "potm", "mpp", "mpt", "vdx", "docm", "dotm", "wcm", "wdb", "wks", "wps", "wpl", "xps", "mseq", "mus", "msty", "taglet", "nlu", "nitf", "ntf", "nnd", "nns", "nnw", "ngdat", "n-gage", "rpst", "rpss", "edm", "edx", "ext", "odc", "otc", "odb", "odf", "odft", "odg", "otg", "odi", "oti", "odp", "otp", "ods", "ots", "odt", "odm", "ott", "oth", "xo", "dd2", "oxt", "pptx", "sldx", "ppsx", "potx", "xlsx", "xltx", "docx", "dotx", "mgp", "dp", "esa", "oprc", "pdb", "pqa", "paw", "str", "ei6", "efif", "wg", "plf", "pbd", "box", "mgz", "qps", "ptid", "qwd", "qwt", "qxb", "qxl", "qxt", "bed", "mxl", "musicxml", "cryptonote", "rm", "rmvb", "rmp", "link66", "st", "see", "sema", "semd", "semf", "ifm", "itp", "iif", "ipk", "twd", "twds", "teacher", "sdkd", "sdkm", "dxp", "sfs", "sdc", "sda", "sdd", "smf", "sdw", "vor", "sgl", "smzip", "sm", "wadl", "sxc", "stc", "sxd", "std", "sxi", "sti", "sxm", "sxw", "sxg", "stw", "sus", "susp", "svd", "sis", "sisx", "xsm", "bdm", "xdm", "tao", "cap", "dmp", "pcap", "tmo", "tpt", "mxs", "tra", "ufd", "ufdl", "utz", "umj", "unityweb", "uoml", "vcx", "vsd", "vss", "vst", "vsw", "vsx", "vtx", "vis", "vsf", "wbxml", "wmlc", "wmlsc", "wtb", "nbp", "wpd", "wqd", "stf", "xar", "xfdl", "hvd", "hvs", "hvp", "osf", "osfpvg", "saf", "spf", "cmp", "zir", "zirz", "zaz", "vxml", "vsix", "wasm", "wgt", "library-ms", "searchconnector-ms", "hlp", "wlmp", "wspolicy", "7z", "abw", "ace", "arj", "aab", "vox", "x32", "aam", "aas", "bcpio", "torrent", "blb", "blorb", "adobebridge", "bz", "boz", "bz2", "cb7", "cba", "cbr", "cbt", "cbz", "cdf", "vcd", "cfs", "chat", "pgn", "crx", "cco", "z", "tgz", "cpio", "csh", "udeb", "dgc", "cct", "cst", "cxt", "dcr", "dir", "dxr", "fgd", "swa", "w3d", "wad", "ncx", "dtb", "res", "dvi", "dxf", "erf", "eva", "bdf", "gsf", "psf", "pcf", "snf", "ttf", "pfa", "arc", "gca", "ulx", "gnumeric", "gramps", "gtar", "gz", "hdf", "php", "install", "ins", "isp", "iii", "ipa", "ipg", "ipsw", "ite", "itlp", "itms", "itpc", "class", "jardiff", "jnlp", "skp", "latex", "luac", "lha", "run", "mie", "mvc", "mxp", "mobi", "prc", "application", "slupkg-ms", "manifest", "lit", "lnk", "vsto", "wmd", "wmz", "xbap", "mdb", "obd", "crd", "clp", "bat", "com", "dll", "m13", "m14", "mvb", "emf", "wmf", "mny", "pub", "scd", "trm", "wri", "nc", "pac", "nzb", "hhc", "parquet", "pma", "pmc", "pml", "pmr", "pmw", "pl", "pm", "p12", "pfx", "p7b", "spc", "p7r", "pcast", "qtl", "rar", "ris", "safariextz", "webarchive", "sgimb", "sh", "shar", "mfp", "swf", "xap", "mmf", "sql", "sit", "sitx", "srt", "sv4cpio", "sv4crc", "t3", "gam", "tar", "tcl", "tk", "tex", "tfm", "texi", "texinfo", "obj", "roff", "t", "tr", "man", "me", "ms", "ustar", "hdd", "ova", "ovf", "vbox", "vbox-extpack", "vdi", "vhd", "vmdk", "src", "webapp", "wlpginstall", "wlpginstall3", "cer", "crt", "der", "pem", "fig", "xlf", "xpi", "xz", "z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8", "xaml", "xdf", "xenc", "xht", "xhtml", "asa", "asax", "ascx", "ashx", "asmx", "aspx", "config", "coverage", "datasource", "dgml", "filters", "generictest", "hxa", "hxc", "hxe", "hxf", "hxk", "hxv", "loadtest", "master", "mtx", "orderedtest", "psess", "rdlc", "resx", "rng", "ruleset", "settings", "sitemap", "skin", "snippet", "svc", "testrunconfig", "testsettings", "trx", "vcproj", "vcxproj", "vscontent", "vsmdi", "webtest", "wiq", "xmta", "xsc", "xss", "xop", "xpl", "xspf", "mxml", "xhvml", "xvm", "xvml", "yang", "yin", "zip", "aac", "adts", "ac3", "aif", "aifc", "aiff", "cdda", "axa", "aa", "au", "snd", "flac", "m4a", "m4b", "m4p", "mid", "midi", "rmi", "kar", "mp4a", "m2a", "m3a", "mp2", "mp2a", "mp3", "mpga", "oga", "ogg", "opus", "spx", "s3m", "pls", "sil", "aax", "uva", "uvva", "eol", "adt", "dra", "dts", "dtshd", "lvp", "pya", "ecelp4800", "ecelp7470", "ecelp9600", "rip", "wav", "wave", "weba", "caf", "gsm", "m4r", "mka", "m3u", "m3u8", "wax", "wma", "ra", "ram", "rpm", "sd2", "smd", "smx", "smz", "xm", "cdx", "cif", "cmdf", "cml", "csml", "xyz", "dwf", "ttc", "ttf", "woff2", "apng", "avif", "avifs", "bmp", "dib", "cgm", "cod", "g3", "gif", "heic", "heics", "heif", "heifs", "ief", "jp2", "jpg2", "jfif", "jpe", "jpeg", "jpg", "jpm", "jpf", "jpx", "jxl", "ktx", "pct", "pic", "pict", "png", "pnz", "btif", "sgi", "svg", "svgz", "tif", "tiff", "uvg", "uvi", "uvvg", "uvvi", "djv", "djvu", "fbs", "fpx", "fst", "mmr", "rlc", "mdi", "wdp", "npx", "hdr", "rf", "wbmp", "xif", "webp", "3ds", "dng", "cr2", "cr3", "crw", "ras", "cmx", "erf", "fh", "fh4", "fh5", "fh7", "fhc", "raf", "ico", "art", "jng", "dcr", "k25", "kdc", "mac", "pnt", "pntg", "mrw", "sid", "nef", "nrw", "orf", "raw", "rw2", "rwl", "pef", "pnm", "pbm", "pgm", "ppm", "qti", "qtif", "rgb", "x3f", "arw", "sr2", "srf", "tga", "xbm", "xpm", "xwd", "disposition-notification", "u8msg", "u8dsn", "u8mdn", "u8hdr", "eml", "mht", "mhtml", "mime", "nws", "gltf", "glb", "iges", "igs", "mesh", "msh", "silo", "dae", "gdl", "gtw", "vtu", "vrml", "x3db", "x3dbz", "x3dv", "x3dvz", "x3d", "x3dz", "appcache", "ics", "ifb", "coffee", "litcoffee", "css", "csv", "dlm", "gemini", "gmi", "323", "htm", "html", "hxt", "shtml", "uls", "jade", "ecma", "es", "js", "jsm", "jsx", "less", "markdown", "md", "mml", "n3", "asm", "bas", "c", "cc", "cd", "cfg", "cmd", "cnf", "conf", "cpp", "cs", "csdproj", "csproj", "cxx", "dbproj", "def", "dsw", "h", "hh", "hpp", "hxx", "i", "idl", "in", "inc", "ini", "inl", "ipproj", "jsxbin", "list", "log", "lst", "mak", "map", "mk", "odh", "odl", "pkgdef", "pkgundef", "py", "rc", "rc2", "rct", "reg", "rgs", "s", "scr", "sln", "sol", "sor", "srf", "text", "tlh", "tli", "txt", "user", "vb", "vbdproj", "vbproj", "vcs", "vddproj", "vdp", "vdproj", "vspscc", "vsscc", "vssscc", "xdr", "xoml", "dsc", "rtx", "sct", "wsc", "sgm", "sgml", "shex", "slim", "slm", "styl", "stylus", "tsv", "ttl", "uri", "uris", "urls", "vbs", "vcard", "curl", "dcurl", "mcurl", "scurl", "sub", "fly", "flx", "gv", "3dml", "spot", "jad", "wml", "wmls", "vtt", "htt", "dic", "htc", "f", "f77", "f90", "for", "feature", "hbs", "hdml", "qht", "qhtm", "lua", "md", "mkd", "contact", "group", "iqy", "rqy", "nfo", "opml", "p", "pas", "pde", "rs", "sass", "scss", "etx", "sfv", "ymp", "toml", "uu", "vcf", "yaml", "yml", "addin", "disco", "dll.config", "dtd", "dtsconfig", "exe.config", "mno", "ssisdeploymentmanifest", "vml", "vsct", "vsixlangpack", "vsixmanifest", "vssettings", "vstemplate", "wsdl", "xml", "xrm-ms", "xsd", "xsf", "xsl", "xslt", "3gp", "3gpp", "3g2", "3gp2", "axv", "divx", "h261", "h263", "h264", "jpgv", "jpgm", "mj2", "mjp2", "mp4", "mp4v", "mpg4", "m1v", "m2v", "mod", "mp2", "mp2v", "mpa", "mpe", "mpeg", "mpg", "mpv2", "vbk", "ogv", "mov", "mqv", "qt", "uvh", "uvvh", "uvm", "uvvm", "uvp", "uvvp", "uvs", "uvvs", "uvv", "uvvv", "m2t", "m2ts", "mts", "ts", "tts", "dvb", "fvt", "m4u", "mxu", "pyv", "uvu", "uvvu", "viv", "webm", "dif", "dv", "f4v", "fli", "flv", "ivf", "lsf", "lsx", "m4v", "mk3d", "mks", "mkv", "mng", "asf", "asr", "asx", "nsc", "vob", "wm", "wmp", "wmv", "wmx", "wvx", "avi", "movie", "smv", "ice", "flr", "wrl", "wrz", "xaf", "xof"]; diff --git a/app/target/debug/build/serde-07b13cbb0fd598fc/out/private.rs b/app/target/debug/build/serde-07b13cbb0fd598fc/out/private.rs deleted file mode 100644 index 92008466..00000000 --- a/app/target/debug/build/serde-07b13cbb0fd598fc/out/private.rs +++ /dev/null @@ -1,6 +0,0 @@ -#[doc(hidden)] -pub mod __private229 { - #[doc(hidden)] - pub use crate::private::*; -} -use serde_core::__private229 as serde_core_private; diff --git a/app/target/debug/build/serde_core-99e7571ac0e43228/out/private.rs b/app/target/debug/build/serde_core-99e7571ac0e43228/out/private.rs deleted file mode 100644 index 2da7a58d..00000000 --- a/app/target/debug/build/serde_core-99e7571ac0e43228/out/private.rs +++ /dev/null @@ -1,5 +0,0 @@ -#[doc(hidden)] -pub mod __private229 { - #[doc(hidden)] - pub use crate::private::*; -} diff --git a/app/target/debug/build/thiserror-b16f062556d3d9bb/out/private.rs b/app/target/debug/build/thiserror-b16f062556d3d9bb/out/private.rs deleted file mode 100644 index 036d1e64..00000000 --- a/app/target/debug/build/thiserror-b16f062556d3d9bb/out/private.rs +++ /dev/null @@ -1,5 +0,0 @@ -#[doc(hidden)] -pub mod __private21 { - #[doc(hidden)] - pub use crate::private::*; -}