opencalque 1.10.2 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +1073 -331
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -7447,11 +7447,11 @@ var require_fast_deep_equal = __commonJS({
7447
7447
  if (a === b) return true;
7448
7448
  if (a && b && typeof a == "object" && typeof b == "object") {
7449
7449
  if (a.constructor !== b.constructor) return false;
7450
- var length, i, keys;
7450
+ var length2, i, keys;
7451
7451
  if (Array.isArray(a)) {
7452
- length = a.length;
7453
- if (length != b.length) return false;
7454
- for (i = length; i-- !== 0; )
7452
+ length2 = a.length;
7453
+ if (length2 != b.length) return false;
7454
+ for (i = length2; i-- !== 0; )
7455
7455
  if (!equal(a[i], b[i])) return false;
7456
7456
  return true;
7457
7457
  }
@@ -7459,11 +7459,11 @@ var require_fast_deep_equal = __commonJS({
7459
7459
  if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
7460
7460
  if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
7461
7461
  keys = Object.keys(a);
7462
- length = keys.length;
7463
- if (length !== Object.keys(b).length) return false;
7464
- for (i = length; i-- !== 0; )
7462
+ length2 = keys.length;
7463
+ if (length2 !== Object.keys(b).length) return false;
7464
+ for (i = length2; i-- !== 0; )
7465
7465
  if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
7466
- for (i = length; i-- !== 0; ) {
7466
+ for (i = length2; i-- !== 0; ) {
7467
7467
  var key = keys[i];
7468
7468
  if (!equal(a[key], b[key])) return false;
7469
7469
  }
@@ -10468,11 +10468,11 @@ var require_ucs2length = __commonJS({
10468
10468
  Object.defineProperty(exports, "__esModule", { value: true });
10469
10469
  function ucs2length(str) {
10470
10470
  const len2 = str.length;
10471
- let length = 0;
10471
+ let length2 = 0;
10472
10472
  let pos = 0;
10473
10473
  let value;
10474
10474
  while (pos < len2) {
10475
- length++;
10475
+ length2++;
10476
10476
  value = str.charCodeAt(pos++);
10477
10477
  if (value >= 55296 && value <= 56319 && pos < len2) {
10478
10478
  value = str.charCodeAt(pos);
@@ -10480,7 +10480,7 @@ var require_ucs2length = __commonJS({
10480
10480
  pos++;
10481
10481
  }
10482
10482
  }
10483
- return length;
10483
+ return length2;
10484
10484
  }
10485
10485
  exports.default = ucs2length;
10486
10486
  ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default';
@@ -12807,9 +12807,9 @@ function parallelPath(points, closed, distance, smooth = false) {
12807
12807
  const before = norm(sub(p, at2(i - 1)));
12808
12808
  const after = norm(sub(at2(i + 1), p));
12809
12809
  if (smooth) {
12810
- const across = perp(norm(sub(at2(i + 1), at2(i - 1))));
12811
- if (len(across) === 0) return null;
12812
- moved.push(add(p, scale(across, distance)));
12810
+ const across2 = perp(norm(sub(at2(i + 1), at2(i - 1))));
12811
+ if (len(across2) === 0) return null;
12812
+ moved.push(add(p, scale(across2, distance)));
12813
12813
  continue;
12814
12814
  }
12815
12815
  const [a, b] = [perp(len(before) === 0 ? after : before), perp(len(after) === 0 ? before : after)];
@@ -12829,7 +12829,7 @@ function besidePath(points, closed, p) {
12829
12829
  const n3 = points.length;
12830
12830
  let best = Infinity;
12831
12831
  let foot = points[0];
12832
- let across = { x: 0, y: 0 };
12832
+ let across2 = { x: 0, y: 0 };
12833
12833
  for (let i = 0; i < (closed ? n3 : n3 - 1); i++) {
12834
12834
  const a = points[i];
12835
12835
  const b = points[(i + 1) % n3];
@@ -12842,10 +12842,10 @@ function besidePath(points, closed, p) {
12842
12842
  if (gap < best - 1e-9) {
12843
12843
  best = gap;
12844
12844
  foot = q;
12845
- across = perp(norm(d));
12846
- } else if (gap <= best + 1e-9) across = add(across, perp(norm(d)));
12845
+ across2 = perp(norm(d));
12846
+ } else if (gap <= best + 1e-9) across2 = add(across2, perp(norm(d)));
12847
12847
  }
12848
- const side = (p.x - foot.x) * across.x + (p.y - foot.y) * across.y;
12848
+ const side = (p.x - foot.x) * across2.x + (p.y - foot.y) * across2.y;
12849
12849
  return side < 0 ? -best : best;
12850
12850
  }
12851
12851
  function ellipseArc(e) {
@@ -13417,10 +13417,10 @@ function promiseAllObject(promisesObj) {
13417
13417
  return resolvedObj;
13418
13418
  });
13419
13419
  }
13420
- function randomString(length = 10) {
13420
+ function randomString(length2 = 10) {
13421
13421
  const chars = "abcdefghijklmnopqrstuvwxyz";
13422
13422
  let str = "";
13423
- for (let i = 0; i < length; i++) {
13423
+ for (let i = 0; i < length2; i++) {
13424
13424
  str += chars[Math.floor(Math.random() * chars.length)];
13425
13425
  }
13426
13426
  return str;
@@ -14425,8 +14425,8 @@ var ulid = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
14425
14425
  var xid = /^[0-9a-vA-V]{20}$/;
14426
14426
  var ksuid = /^[A-Za-z0-9]{27}$/;
14427
14427
  var nanoid = /^[a-zA-Z0-9_-]{21}$/;
14428
- function nanoidOfLength(length) {
14429
- return new RegExp(`^[a-zA-Z0-9_-]{${length}}$`);
14428
+ function nanoidOfLength(length2) {
14429
+ return new RegExp(`^[a-zA-Z0-9_-]{${length2}}$`);
14430
14430
  }
14431
14431
  var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
14432
14432
  var guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
@@ -14628,8 +14628,8 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
14628
14628
  inst._zod.check = (payload) => {
14629
14629
  const input = payload.value;
14630
14630
  const units = input.length;
14631
- const length = typeof input === "string" && units > def.maximum ? codePointLength(input) : units;
14632
- if (length <= def.maximum)
14631
+ const length2 = typeof input === "string" && units > def.maximum ? codePointLength(input) : units;
14632
+ if (length2 <= def.maximum)
14633
14633
  return;
14634
14634
  const origin = getLengthableOrigin(input);
14635
14635
  payload.issues.push({
@@ -14650,8 +14650,8 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
14650
14650
  inst._zod.check = (payload) => {
14651
14651
  const input = payload.value;
14652
14652
  const units = input.length;
14653
- const length = typeof input === "string" && units >= def.minimum && units < def.minimum * 2 ? codePointLength(input) : units;
14654
- if (length >= def.minimum)
14653
+ const length2 = typeof input === "string" && units >= def.minimum && units < def.minimum * 2 ? codePointLength(input) : units;
14654
+ if (length2 >= def.minimum)
14655
14655
  return;
14656
14656
  const origin = getLengthableOrigin(input);
14657
14657
  payload.issues.push({
@@ -14672,11 +14672,11 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
14672
14672
  inst._zod.check = (payload) => {
14673
14673
  const input = payload.value;
14674
14674
  const units = input.length;
14675
- const length = typeof input === "string" && units >= def.length && units <= def.length * 2 ? codePointLength(input) : units;
14676
- if (length === def.length)
14675
+ const length2 = typeof input === "string" && units >= def.length && units <= def.length * 2 ? codePointLength(input) : units;
14676
+ if (length2 === def.length)
14677
14677
  return;
14678
14678
  const origin = getLengthableOrigin(input);
14679
- const tooBig = length > def.length;
14679
+ const tooBig = length2 > def.length;
14680
14680
  payload.issues.push({
14681
14681
  origin,
14682
14682
  ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length },
@@ -17434,11 +17434,11 @@ function _minLength(minimum, params) {
17434
17434
  });
17435
17435
  }
17436
17436
  // @__NO_SIDE_EFFECTS__
17437
- function _length(length, params) {
17437
+ function _length(length2, params) {
17438
17438
  return new $ZodCheckLengthEquals({
17439
17439
  check: "length_equals",
17440
17440
  ...normalizeParams(params),
17441
- length
17441
+ length: length2
17442
17442
  });
17443
17443
  }
17444
17444
  // @__NO_SIDE_EFFECTS__
@@ -19928,7 +19928,7 @@ function duration2(params) {
19928
19928
  config({ jitless: true });
19929
19929
  var FORMAT = "opencalque";
19930
19930
  var FORMER_FORMAT = "opencad";
19931
- var FORMAT_VERSION = 4;
19931
+ var FORMAT_VERSION = 5;
19932
19932
  var Id = string2().min(1);
19933
19933
  var Vec2Schema = object({ x: number2(), y: number2() });
19934
19934
  var PatternSchema = object({
@@ -20164,9 +20164,10 @@ var NodeSchema = discriminatedUnion("type", [
20164
20164
  author: string2().optional().describe("Overrides the author of the drawing on this sheet."),
20165
20165
  date: string2().optional(),
20166
20166
  number: string2().optional(),
20167
- hide: array(string2()).optional().describe("Entries this sheet leaves out, among project, client, address, sheet, page, author, scale, format, date and number. Defaults to ['page'].")
20167
+ revisions: string2().optional().describe(`The sheet's revisions, one per line, each its mark, date and description separated by '|' ("2 | 2026-11-17 | Issued for permit"). Only the strip shows them (the drawing's "settings", titleBlock).`),
20168
+ hide: array(string2()).optional().describe("Entries this sheet leaves out, among project, client, address, sheet, page, author, scale, format, date, number and revisions. Defaults to ['page'].")
20168
20169
  }).optional().describe(
20169
- `When present (even empty), the sheet gets a border and a title block in its bottom right corner. The block is made of the entries that have something to say and are not hidden: the project, client and address (from the document's "info"; the project falls back on the document name), the name of the paper and of its page, the author, the scale and format, and the date and sheet number given here. An entry with nothing in it takes no room. Texts may hold fields such as {date} or {page-number}.`
20170
+ `When present (even empty), the sheet gets a border and a title block, in its bottom right corner or down its right edge, as the drawing's "settings" say (titleBlock). The block is made of the entries that have something to say and are not hidden: the project, client and address (from the document's "info"; the project falls back on the document name), the name of the paper and of its page, the author, the scale and format, and the date, sheet number and revisions given here. An entry with nothing in it takes no room. Texts may hold fields such as {date} or {page-number}.`
20170
20171
  )
20171
20172
  }).describe(
20172
20173
  "A sheet of paper laid on the drawing, with its top-left corner at (x, y): it frames the part of the drawing meant for one printed sheet. Width and height are in drawing millimetres like everything else. It has no children: whatever lies entirely inside its rectangle is on it, and is moved and copied with it in the editor."
@@ -20278,7 +20279,8 @@ var NodeSchema = discriminatedUnion("type", [
20278
20279
  flipX: boolean2().optional(),
20279
20280
  scale: number2().positive().optional().describe("Size multiplier of this placement. Defaults to 1."),
20280
20281
  scaleX: number2().positive().optional().describe(`Stretch of this placement along the component's own X axis, on top of "scale": wider than it is drawn. Defaults to 1.`),
20281
- scaleY: number2().positive().optional().describe(`Stretch of this placement along the component's own Y axis, on top of "scale": taller than it is drawn. Defaults to 1.`)
20282
+ scaleY: number2().positive().optional().describe(`Stretch of this placement along the component's own Y axis, on top of "scale": taller than it is drawn. Defaults to 1.`),
20283
+ z: number2().nonnegative().optional().describe("How high above the floor its underside is, in mm, as elevations draw it: a mirror, a shelf. Left out, it stands on the floor.")
20282
20284
  }).describe("A placement of a component. Editing the component updates every instance."),
20283
20285
  object({
20284
20286
  ...base,
@@ -20289,13 +20291,17 @@ var NodeSchema = discriminatedUnion("type", [
20289
20291
  y: number2(),
20290
20292
  rotation,
20291
20293
  flipX: boolean2().optional(),
20292
- z: number2().nonnegative().optional().describe("How high above the floor it is, in mm, to its centre: a socket's or a switch's height. Left out, its kind's usual height for an object fixed on a wall, else none. The plan writes it only with showHeight."),
20294
+ z: number2().nonnegative().optional().describe("How high above the floor it is, in mm: for an object fixed on a wall, to its centre (a socket's or a switch's height) unless its kind measures it to its underside; for anything else, to its underside (a raised unit, a shelf). Left out, its kind's usual height for an object fixed on a wall, else on the floor. The plan writes it only with showHeight."),
20293
20295
  showHeight: boolean2().optional().describe("For an object fixed on a wall: its height above the floor is written beside it on the plan, as electrical plans do.")
20294
20296
  }).describe("An object generated from parameters by an extension. Unknown kinds are preserved and drawn as a placeholder.")
20295
20297
  ]).describe("All coordinates and lengths are millimetres. X grows to the right, Y grows downward.");
20296
20298
  var DrawingSettingsSchema = object({
20297
20299
  system: _enum(["metric", "imperial"]).optional().describe("'imperial': areas in square feet, and the lengths, volumes and thicknesses of tables of quantities in feet and inches. Defaults to 'metric' (square metres, metres)."),
20298
- decimal: _enum([".", ","]).optional().describe("The decimal separator of the areas, tables and dimensions. Defaults to '.'.")
20300
+ decimal: _enum([".", ","]).optional().describe("The decimal separator of the areas, tables and dimensions. Defaults to '.'."),
20301
+ titleBlock: object({
20302
+ layout: _enum(["corner", "strip"]).optional().describe("'corner' (the default): a block of values in the bottom right corner. 'strip': a column down the right edge of the sheet, as US sheets have it, each entry under its caption, the project at the top, the revisions under it and the sheet title and number at the bottom."),
20303
+ labels: record(string2(), string2()).optional().describe("The captions of the strip, by entry (project, client, address, sheet, page, author, scale, format, date, number, revisions). Left out, English ones; an empty one is not drawn.")
20304
+ }).optional().describe('How the title blocks of every sheet are laid out, the same throughout the set. Left out, in the corner. What each sheet shows is its own ("titleBlock" of a paper).')
20299
20305
  });
20300
20306
  var DocumentSchema = object({
20301
20307
  format: literal(FORMAT),
@@ -20310,7 +20316,7 @@ var DocumentSchema = object({
20310
20316
  assets: record(Id, AssetSchema).optional().describe("Embedded files by id. Large; tools that only need the drawing can ignore it."),
20311
20317
  nodes: record(Id, NodeSchema).describe(`Every node by id, as a flat map. The tree is expressed by each node's "parent" and "order".`),
20312
20318
  info: object({ project: string2().optional(), client: string2().optional(), address: string2().optional(), author: string2().optional() }).optional().describe("What the drawing says about itself, shown in the title block of every sheet: the project (the document name when not given), the client, the address of the site (lines separated by a line break), the author."),
20313
- settings: DrawingSettingsSchema.optional().describe("How the drawing writes its numbers: the floor areas of its rooms, its tables of quantities, its dimensions. Left out, in metric with a decimal point."),
20319
+ settings: DrawingSettingsSchema.optional().describe("How the drawing writes its numbers (the floor areas of its rooms, its tables of quantities, its dimensions) and lays out the title blocks of its sheets. Left out, in metric with a decimal point, the block in the corner."),
20314
20320
  meta: record(string2(), unknown()).optional()
20315
20321
  }).describe("An OpenCalque document (.opencalque file).");
20316
20322
  var NODE_TYPES = NodeSchema.options.map((option) => option.shape.type.value);
@@ -20451,12 +20457,13 @@ function withoutAssets(doc) {
20451
20457
  const { assets: _, ...rest } = doc;
20452
20458
  return rest;
20453
20459
  }
20460
+ var deskDrewChair = (node2) => node2.type === "parametric" && node2.kind === "arch.desk" && !(typeof node2.props === "object" && node2.props !== null && node2.props.chair === false);
20454
20461
  function serializeDocument(doc) {
20455
20462
  const used = new Set(Object.values(doc.nodes).flatMap((n3) => n3.type === "image" ? [n3.asset] : []));
20456
20463
  const assets = Object.fromEntries(Object.entries(doc.assets ?? {}).filter(([id]) => used.has(id)));
20457
20464
  const { assets: _, ...rest } = doc;
20458
20465
  const nodes = Object.values(doc.nodes);
20459
- const needed = nodes.some((n3) => n3.type === "link") ? 4 : nodes.some((n3) => n3.type === "elevation" || n3.type === "viewline") ? 3 : 2;
20466
+ const needed = nodes.some(deskDrewChair) ? 5 : nodes.some((n3) => n3.type === "link") ? 4 : nodes.some((n3) => n3.type === "elevation" || n3.type === "viewline") ? 3 : 2;
20460
20467
  const version2 = Math.min(doc.version, needed);
20461
20468
  return JSON.stringify(used.size > 0 ? { ...rest, version: version2, assets } : { ...rest, version: version2 }, null, 2) + "\n";
20462
20469
  }
@@ -20485,37 +20492,37 @@ function courseOf(wall) {
20485
20492
  function makeCourse(wall) {
20486
20493
  const arc = wallArc(wall);
20487
20494
  if (!arc) {
20488
- const length2 = dist(wall.a, wall.b);
20495
+ const length3 = dist(wall.a, wall.b);
20489
20496
  const d = norm(sub(wall.b, wall.a));
20490
20497
  const n3 = perp(d);
20491
20498
  const at2 = (s) => add(wall.a, scale(d, s));
20492
20499
  return {
20493
- length: length2,
20500
+ length: length3,
20494
20501
  at: at2,
20495
20502
  dir: () => d,
20496
- offset: (s, across) => add(at2(s), scale(n3, across)),
20503
+ offset: (s, across2) => add(at2(s), scale(n3, across2)),
20497
20504
  project: (p) => ({ along: dot(sub(p, wall.a), d), across: cross(d, sub(p, wall.a)) }),
20498
20505
  stops: []
20499
20506
  };
20500
20507
  }
20501
20508
  const { centre, radius, from, sweep: sweep2 } = arc;
20502
- const length = radius * Math.abs(sweep2);
20509
+ const length2 = radius * Math.abs(sweep2);
20503
20510
  const way = Math.sign(sweep2);
20504
- const angle = (s) => from + sweep2 * s / length;
20511
+ const angle = (s) => from + sweep2 * s / length2;
20505
20512
  const round3 = (s, r) => ({ x: centre.x + r * Math.cos(angle(s)), y: centre.y + r * Math.sin(angle(s)) });
20506
20513
  const steps = Math.max(4, Math.ceil(Math.abs(sweep2) / ARC_STEP));
20507
20514
  return {
20508
- length,
20515
+ length: length2,
20509
20516
  at: (s) => round3(s, radius),
20510
20517
  dir: (s) => ({ x: -way * Math.sin(angle(s)), y: way * Math.cos(angle(s)) }),
20511
20518
  // The inner face of a wall thicker than its radius would cross the centre: it stops there.
20512
- offset: (s, across) => round3(s, Math.max(0, radius - way * across)),
20519
+ offset: (s, across2) => round3(s, Math.max(0, radius - way * across2)),
20513
20520
  project: (p) => {
20514
20521
  let turn2 = Math.atan2(p.y - centre.y, p.x - centre.x) - (from + sweep2 / 2);
20515
20522
  turn2 = Math.atan2(Math.sin(turn2), Math.cos(turn2));
20516
- return { along: length / 2 + turn2 / sweep2 * length, across: way * (radius - dist(p, centre)) };
20523
+ return { along: length2 / 2 + turn2 / sweep2 * length2, across: way * (radius - dist(p, centre)) };
20517
20524
  },
20518
- stops: Array.from({ length: steps + 1 }, (_, i) => length * i / steps)
20525
+ stops: Array.from({ length: steps + 1 }, (_, i) => length2 * i / steps)
20519
20526
  };
20520
20527
  }
20521
20528
  function wallLength(wall) {
@@ -20529,10 +20536,10 @@ function wallPoints(wall) {
20529
20536
  const course = courseOf(wall);
20530
20537
  return [wall.a, ...course.stops.slice(1, -1).map((s) => course.at(s)), wall.b];
20531
20538
  }
20532
- function wallParallel(wall, across, extend2 = 0) {
20539
+ function wallParallel(wall, across2, extend2 = 0) {
20533
20540
  const course = courseOf(wall);
20534
20541
  const stops = course.stops.length > 0 ? course.stops : [0, course.length];
20535
- const line2 = stops.map((s) => course.offset(s, across));
20542
+ const line2 = stops.map((s) => course.offset(s, across2));
20536
20543
  return extend2 > 0 ? [sub(line2[0], scale(course.dir(0), extend2)), ...line2, add(line2[line2.length - 1], scale(course.dir(course.length), extend2))] : line2;
20537
20544
  }
20538
20545
  function wallSides(wall) {
@@ -20547,16 +20554,16 @@ var middleAcross = (wall) => {
20547
20554
  function wallContains(wall, p, tolerance = 0) {
20548
20555
  if (dist(wall.a, wall.b) < 1e-6) return false;
20549
20556
  const course = courseOf(wall);
20550
- const { along: along2, across } = course.project(p);
20557
+ const { along: along2, across: across2 } = course.project(p);
20551
20558
  const { left, right } = wallSides(wall);
20552
- return along2 >= -tolerance && along2 <= course.length + tolerance && across >= -left - tolerance && across <= right + tolerance;
20559
+ return along2 >= -tolerance && along2 <= course.length + tolerance && across2 >= -left - tolerance && across2 <= right + tolerance;
20553
20560
  }
20554
20561
  function distToBody(p, wall) {
20555
20562
  if (dist(wall.a, wall.b) < 1e-6) return Infinity;
20556
20563
  const course = courseOf(wall);
20557
- const { along: along2, across } = course.project(p);
20564
+ const { along: along2, across: across2 } = course.project(p);
20558
20565
  const { left, right } = wallSides(wall);
20559
- return Math.hypot(Math.max(0, -left - across, across - right), along2 < 0 ? -along2 : Math.max(0, along2 - course.length));
20566
+ return Math.hypot(Math.max(0, -left - across2, across2 - right), along2 < 0 ? -along2 : Math.max(0, along2 - course.length));
20560
20567
  }
20561
20568
  function bulgeThrough(wall, p) {
20562
20569
  const chord = dist(wall.a, wall.b);
@@ -20678,10 +20685,10 @@ function abuts(wall, p, other) {
20678
20685
  const d = norm(sub(wall.b, wall.a));
20679
20686
  const n3 = perp(d);
20680
20687
  const own2 = wallSides(wall);
20681
- const across = [add(p, scale(n3, own2.right)), add(p, scale(n3, -own2.left))];
20688
+ const across2 = [add(p, scale(n3, own2.right)), add(p, scale(n3, -own2.left))];
20682
20689
  const course = courseOf(other);
20683
20690
  const { left, right } = wallSides(other);
20684
- const at2 = across.map((q) => course.project(q));
20691
+ const at2 = across2.map((q) => course.project(q));
20685
20692
  if (at2.some(({ along: along2 }) => along2 < -ABUT_TOLERANCE || along2 > course.length + ABUT_TOLERANCE)) return false;
20686
20693
  for (const [face, body] of [[right, -1], [-left, 1]]) {
20687
20694
  if (!at2.every(({ across: c }) => Math.abs(c - face) < ABUT_TOLERANCE)) continue;
@@ -20745,26 +20752,45 @@ function meet(p, a, b, style = "auto") {
20745
20752
  if (!crossing) return square;
20746
20753
  c = crossing;
20747
20754
  } else if (s > a.length || u > b.length) return square;
20748
- if (s < 0 && style === "round") {
20749
- const from = Math.atan2(qa.y - p.y, qa.x - p.x);
20750
- let sweep2 = Math.atan2(qb.y - p.y, qb.x - p.x) - from;
20751
- if (sweep2 > Math.PI) sweep2 -= 2 * Math.PI;
20752
- if (sweep2 < -Math.PI) sweep2 += 2 * Math.PI;
20753
- const steps = Math.max(2, Math.ceil(Math.abs(sweep2) / (Math.PI / 16)));
20754
- const at2 = (t) => {
20755
- const r = a.plus + (b.minus - a.plus) * t;
20756
- return { x: tidy(p.x + r * Math.cos(from + sweep2 * t)), y: tidy(p.y + r * Math.sin(from + sweep2 * t)) };
20757
- };
20758
- const half = Array.from({ length: steps + 1 }, (_, i) => i / (2 * steps));
20759
- return { a: half.map((t) => at2(t)), b: half.map((t) => at2(1 - t)) };
20755
+ if (style === "round" || style === "bevel") {
20756
+ const o = middlesCross(p, a, b);
20757
+ const ga = add(o, scale(perp(a.d), (a.plus + a.minus) / 2));
20758
+ const gb = sub(o, scale(perp(b.d), (b.plus + b.minus) / 2));
20759
+ if (cross(sub(gb, ga), b.d) / denom < 0) {
20760
+ const r = Math.min(a.plus + a.minus, b.plus + b.minus) / 2;
20761
+ const ia = sub(qa, scale(perp(a.d), r));
20762
+ const ib = add(qb, scale(perp(b.d), r));
20763
+ const centre = add(ia, scale(a.d, cross(sub(ib, ia), b.d) / denom));
20764
+ const ta = add(centre, scale(perp(a.d), r));
20765
+ const tb = sub(centre, scale(perp(b.d), r));
20766
+ if (style === "bevel") {
20767
+ const m = mid(ta, tb);
20768
+ return { a: [ta, m], b: [tb, m], at: centre };
20769
+ }
20770
+ const from = Math.atan2(ta.y - centre.y, ta.x - centre.x);
20771
+ let sweep2 = Math.atan2(tb.y - centre.y, tb.x - centre.x) - from;
20772
+ if (sweep2 > Math.PI) sweep2 -= 2 * Math.PI;
20773
+ if (sweep2 < -Math.PI) sweep2 += 2 * Math.PI;
20774
+ const steps = Math.max(2, Math.ceil(Math.abs(sweep2) / (Math.PI / 16)));
20775
+ const point2 = (t) => ({ x: tidy(centre.x + r * Math.cos(from + sweep2 * t)), y: tidy(centre.y + r * Math.sin(from + sweep2 * t)) });
20776
+ const half = Array.from({ length: steps + 1 }, (_, i) => i / (2 * steps));
20777
+ return { a: half.map((t) => point2(t)), b: half.map((t) => point2(1 - t)), at: centre };
20778
+ }
20760
20779
  }
20761
20780
  const tip2 = dist(c, p) / Math.max(a.plus, b.minus, 1e-9);
20762
- if (s < 0 && (style === "bevel" || style === "auto" && tip2 > MITER_LIMIT || tip2 > FORCED_MITER_LIMIT)) {
20781
+ if (s < 0 && (style === "auto" && tip2 > MITER_LIMIT || tip2 > FORCED_MITER_LIMIT)) {
20763
20782
  const m = mid(qa, qb);
20764
20783
  return { a: [qa, m], b: [qb, m] };
20765
20784
  }
20766
20785
  return { a: [c], b: [c] };
20767
20786
  }
20787
+ function middlesCross(p, a, b) {
20788
+ const ma = add(p, scale(perp(a.d), (a.plus - a.minus) / 2));
20789
+ const mb = add(p, scale(perp(b.d), (b.plus - b.minus) / 2));
20790
+ const denom = cross(a.d, b.d);
20791
+ if (Math.abs(denom) < 1e-9) return p;
20792
+ return add(ma, scale(a.d, cross(sub(mb, ma), b.d) / denom));
20793
+ }
20768
20794
  var STOP_TOLERANCE = 1;
20769
20795
  var STOP_LIMIT = 0.25;
20770
20796
  function stopAgainst(doc, wall, p, away, own2) {
@@ -20833,17 +20859,19 @@ function cap(p, wall, away, doc, seams, stopped) {
20833
20859
  const lineShown = (usual) => rays.length !== 2 ? false : me.line === true || next.line === true ? true : me.line === false || next.line === false ? false : usual;
20834
20860
  const drawsLine = (usual) => me.look === next.look ? usual : !!me.look;
20835
20861
  const joined3 = (shape, draws) => {
20836
- const before = meet(p, prev, me, shape).b;
20837
- const after = meet(p, me, next, shape).a;
20862
+ const back = meet(p, prev, me, shape);
20863
+ const ahead = meet(p, me, next, shape);
20864
+ const before = back.b;
20865
+ const after = ahead.a;
20838
20866
  if (draws) seams?.push([before[before.length - 1], after[after.length - 1]]);
20839
- return [...before, p, ...after.reverse()];
20867
+ return [...before, back.at ?? ahead.at ?? p, ...after.reverse()];
20840
20868
  };
20841
20869
  if (style === "butt") {
20842
20870
  const other = next;
20843
20871
  const passes = me.join === "through" || me.join !== "butt" && other.join === "butt";
20844
20872
  const [passing, stopping] = passes ? [me, other] : [other, me];
20845
- const across = perp(passing.d);
20846
- const face = dot(stopping.d, across) >= 0 ? add(p, scale(across, passing.plus)) : sub(p, scale(across, passing.minus));
20873
+ const across2 = perp(passing.d);
20874
+ const face = dot(stopping.d, across2) >= 0 ? add(p, scale(across2, passing.plus)) : sub(p, scale(across2, passing.minus));
20847
20875
  const turn2 = cross(stopping.d, passing.d);
20848
20876
  const lands = (sign) => {
20849
20877
  const from = add(p, scale(perp(stopping.d), sign > 0 ? stopping.plus : -stopping.minus));
@@ -20854,7 +20882,7 @@ function cap(p, wall, away, doc, seams, stopped) {
20854
20882
  const cut = [lands(-1), lands(1)];
20855
20883
  if (lineShown(true) && drawsLine(!passes)) seams?.push([cut[0], cut[1]]);
20856
20884
  if (passes) return square(sub(p, scale(away, reach2)));
20857
- const plusSide = dot(stopping.d, across) >= 0;
20885
+ const plusSide = dot(stopping.d, across2) >= 0;
20858
20886
  if (stopped && passing.wall) stopped.stop = { wall: passing.wall, side: plusSide === (passing.end === "a") ? 1 : -1 };
20859
20887
  return cut;
20860
20888
  }
@@ -20960,16 +20988,16 @@ function openingSpan(node2, registry3) {
20960
20988
  function overlap(wall, span) {
20961
20989
  if (dist(wall.a, wall.b) < 1e-6) return null;
20962
20990
  const course = courseOf(wall);
20963
- const length = course.length;
20991
+ const length2 = course.length;
20964
20992
  const ts = [];
20965
20993
  const { left, right } = wallSides(wall);
20966
20994
  for (const p of span) {
20967
- const { along: along2, across } = course.project(p);
20968
- if (across < -left - 1e-6 || across > right + 1e-6) return null;
20995
+ const { along: along2, across: across2 } = course.project(p);
20996
+ if (across2 < -left - 1e-6 || across2 > right + 1e-6) return null;
20969
20997
  ts.push(along2);
20970
20998
  }
20971
20999
  const from = Math.max(0, Math.min(...ts));
20972
- const to = Math.min(length, Math.max(...ts));
21000
+ const to = Math.min(length2, Math.max(...ts));
20973
21001
  return to - from > 1e-6 ? [from, to] : null;
20974
21002
  }
20975
21003
  function wallOpenings(doc, wall, registry3) {
@@ -21100,7 +21128,8 @@ function fillFields(text2, doc, parentId, sheet) {
21100
21128
  // packages/core/src/imperial.ts
21101
21129
  var MM_PER_INCH = 25.4;
21102
21130
  function formatFeetInches(mm2, denominator = 16) {
21103
- const parts = Math.round(Math.abs(mm2) / MM_PER_INCH * denominator);
21131
+ const units = Math.abs(mm2) / MM_PER_INCH * denominator;
21132
+ const parts = Math.round(Math.round(units * 1e6) / 1e6);
21104
21133
  if (parts === 0) return '0"';
21105
21134
  const feet2 = Math.floor(parts / (12 * denominator));
21106
21135
  const rest = parts - feet2 * 12 * denominator;
@@ -21315,12 +21344,12 @@ var arrayModifier = {
21315
21344
  const columns = Math.min(whole(params.count), MAX_COPIES);
21316
21345
  const rows = Math.min(whole(params.rows), Math.max(1, Math.floor(MAX_COPIES / columns)));
21317
21346
  const origin = applyTransform({ x: 0, y: 0 }, frame);
21318
- const across = sub(applyTransform({ x: Number(params.dx) || 0, y: 0 }, frame), origin);
21347
+ const across2 = sub(applyTransform({ x: Number(params.dx) || 0, y: 0 }, frame), origin);
21319
21348
  const down = sub(applyTransform({ x: 0, y: Number(params.dy) || 0 }, frame), origin);
21320
21349
  const out = [];
21321
21350
  for (let row = 0; row < rows; row++) {
21322
21351
  for (let column = 0; column < columns; column++) {
21323
- const by = { x: across.x * column + down.x * row, y: across.y * column + down.y * row };
21352
+ const by = { x: across2.x * column + down.x * row, y: across2.y * column + down.y * row };
21324
21353
  out.push(...row === 0 && column === 0 ? prims : prims.map((prim) => transformPrimitive(prim, by)));
21325
21354
  }
21326
21355
  }
@@ -21389,13 +21418,27 @@ var turned = (degrees) => tidy2((degrees % 360 + 360) % 360);
21389
21418
  var sheetContentOf = (doc) => componentsOf(doc).find((component) => component.sheet !== void 0);
21390
21419
 
21391
21420
  // packages/core/src/papers.ts
21421
+ var INCH = 25.4;
21392
21422
  var PAPER_FORMATS = [
21393
- { name: "A5", short: 148, long: 210 },
21394
- { name: "A4", short: 210, long: 297 },
21395
- { name: "A3", short: 297, long: 420 },
21396
- { name: "A2", short: 420, long: 594 },
21397
- { name: "A1", short: 594, long: 841 },
21398
- { name: "A0", short: 841, long: 1189 }
21423
+ { name: "A5", series: "ISO", short: 148, long: 210 },
21424
+ { name: "A4", series: "ISO", short: 210, long: 297 },
21425
+ { name: "A3", series: "ISO", short: 297, long: 420 },
21426
+ { name: "A2", series: "ISO", short: 420, long: 594 },
21427
+ { name: "A1", series: "ISO", short: 594, long: 841 },
21428
+ { name: "A0", series: "ISO", short: 841, long: 1189 },
21429
+ // The sizes US plan sets are printed on, 9 × 12 to 36 × 48 inches; E1, 30 × 42, comes between D and E.
21430
+ { name: "ARCH A", series: "ARCH", short: 9 * INCH, long: 12 * INCH },
21431
+ { name: "ARCH B", series: "ARCH", short: 12 * INCH, long: 18 * INCH },
21432
+ { name: "ARCH C", series: "ARCH", short: 18 * INCH, long: 24 * INCH },
21433
+ { name: "ARCH D", series: "ARCH", short: 24 * INCH, long: 36 * INCH },
21434
+ { name: "ARCH E1", series: "ARCH", short: 30 * INCH, long: 42 * INCH },
21435
+ { name: "ARCH E", series: "ARCH", short: 36 * INCH, long: 48 * INCH },
21436
+ // The engineering sizes of ASME Y14.1: A is US Letter, B is Tabloid (11 × 17), each next one twice the one before.
21437
+ { name: "ANSI A", series: "ANSI", short: 8.5 * INCH, long: 11 * INCH },
21438
+ { name: "ANSI B", series: "ANSI", short: 11 * INCH, long: 17 * INCH },
21439
+ { name: "ANSI C", series: "ANSI", short: 17 * INCH, long: 22 * INCH },
21440
+ { name: "ANSI D", series: "ANSI", short: 22 * INCH, long: 34 * INCH },
21441
+ { name: "ANSI E", series: "ANSI", short: 34 * INCH, long: 44 * INCH }
21399
21442
  ];
21400
21443
  var DEFAULT_PAPER_SCALE = 100;
21401
21444
  function paperFormat(paper) {
@@ -21534,19 +21577,19 @@ function withoutSpikes(points) {
21534
21577
  }
21535
21578
  function wallPieces(wall, doc, cuts) {
21536
21579
  const course = courseOf(wall);
21537
- const length = course.length;
21580
+ const length2 = course.length;
21538
21581
  const { left: l, right: r } = wallSides(wall);
21539
21582
  const stopA = {};
21540
21583
  const stopB = {};
21541
21584
  const capA = cap(wall.a, wall, course.dir(0), doc, void 0, stopA);
21542
- const capB = cap(wall.b, wall, scale(course.dir(length), -1), doc, void 0, stopB);
21585
+ const capB = cap(wall.b, wall, scale(course.dir(length2), -1), doc, void 0, stopB);
21543
21586
  const pieces = [];
21544
21587
  const piece = (from, to) => {
21545
21588
  const start2 = from <= 0 ? capA : [course.offset(from, -l), course.offset(from, r)];
21546
- const end = to >= length ? capB : [course.offset(to, r), course.offset(to, -l)];
21589
+ const end = to >= length2 ? capB : [course.offset(to, r), course.offset(to, -l)];
21547
21590
  const face = (side, begin, stop) => {
21548
21591
  const lo = from <= 0 ? course.project(begin).along : from;
21549
- const hi = to >= length ? course.project(stop).along : to;
21592
+ const hi = to >= length2 ? course.project(stop).along : to;
21550
21593
  return course.stops.filter((s) => s > lo + 1e-3 && s < hi - 1e-3).map((s) => course.offset(s, side > 0 ? r : -l));
21551
21594
  };
21552
21595
  pieces.push({ start: start2, end, from, to, outline: withoutSpikes([...start2, ...face(1, start2[start2.length - 1], end[0]), ...end, ...face(-1, start2[0], end[end.length - 1]).reverse()]) });
@@ -21556,7 +21599,7 @@ function wallPieces(wall, doc, cuts) {
21556
21599
  if (from > start + 1e-6) piece(start, from);
21557
21600
  start = Math.max(start, to);
21558
21601
  }
21559
- if (start < length - 1e-6) piece(start, length);
21602
+ if (start < length2 - 1e-6) piece(start, length2);
21560
21603
  return { pieces, stops: { ...stopA.stop ? { a: stopA.stop } : {}, ...stopB.stop ? { b: stopB.stop } : {} } };
21561
21604
  }
21562
21605
  function wallSeams(wall, doc) {
@@ -21648,8 +21691,8 @@ function farSide(node2) {
21648
21691
  var SHORTEST = 100;
21649
21692
  var KEEP_WAY = Math.sin(4 * Math.PI / 180);
21650
21693
  function moveViewEnd(node2, end, p) {
21651
- const length = dist(node2.a, node2.b);
21652
- if (length < 1e-6) return {};
21694
+ const length2 = dist(node2.a, node2.b);
21695
+ if (length2 < 1e-6) return {};
21653
21696
  const d = norm(sub(node2.b, node2.a));
21654
21697
  const s = dot(sub(p, node2.a), d);
21655
21698
  const at2 = (t2) => ({ x: tidy(node2.a.x + d.x * t2), y: tidy(node2.a.y + d.y * t2) });
@@ -21657,14 +21700,14 @@ function moveViewEnd(node2, end, p) {
21657
21700
  const way = sub(p, other);
21658
21701
  const keeps = dist(p, other) < 1e-6 || Math.abs(cross(norm(way), d)) <= KEEP_WAY;
21659
21702
  if (end === "b") return { b: keeps ? at2(Math.max(SHORTEST, s)) : { x: tidy(p.x), y: tidy(p.y) } };
21660
- const t = Math.min(s, length - SHORTEST);
21703
+ const t = Math.min(s, length2 - SHORTEST);
21661
21704
  return { a: keeps ? at2(t) : { x: tidy(p.x), y: tidy(p.y) } };
21662
21705
  }
21663
21706
  var KEEP_TURN = Math.sin(3 * Math.PI / 180);
21664
21707
  function moveViewCorner(node2, corner, p, how = "turn") {
21665
21708
  if (how === "turn") return turnViewCorner(node2, corner, p);
21666
- const length = dist(node2.a, node2.b);
21667
- if (length < 1e-6) return {};
21709
+ const length2 = dist(node2.a, node2.b);
21710
+ if (length2 < 1e-6) return {};
21668
21711
  const d = norm(sub(node2.b, node2.a));
21669
21712
  const n3 = viewer(node2.a, node2.b);
21670
21713
  const look = { x: -n3.x, y: -n3.y };
@@ -21673,8 +21716,8 @@ function moveViewCorner(node2, corner, p, how = "turn") {
21673
21716
  const t = dot(sub(p, node2.a), look);
21674
21717
  const point2 = (along2, beyond) => ({ x: tidy(node2.a.x + d.x * along2 + look.x * beyond), y: tidy(node2.a.y + d.y * along2 + look.y * beyond) });
21675
21718
  const atStart = corner === 0 || corner === 3;
21676
- const from = atStart ? Math.min(s, length - SHORTEST) : 0;
21677
- const to = atStart ? length : Math.max(SHORTEST, s);
21719
+ const from = atStart ? Math.min(s, length2 - SHORTEST) : 0;
21720
+ const to = atStart ? length2 : Math.max(SHORTEST, s);
21678
21721
  if (corner === 0 || corner === 1) {
21679
21722
  const near2 = Math.min(t, deep);
21680
21723
  return { a: point2(from, near2), b: point2(to, near2), depth: tidy(deep - near2) };
@@ -21682,8 +21725,8 @@ function moveViewCorner(node2, corner, p, how = "turn") {
21682
21725
  return { ...atStart ? { a: point2(from, 0) } : { b: point2(to, 0) }, depth: tidy(Math.max(0, t)) };
21683
21726
  }
21684
21727
  function turnViewCorner(node2, corner, p) {
21685
- const length = dist(node2.a, node2.b);
21686
- if (length < 1e-6) return {};
21728
+ const length2 = dist(node2.a, node2.b);
21729
+ if (length2 < 1e-6) return {};
21687
21730
  const was = norm(sub(node2.b, node2.a));
21688
21731
  const lookOf = (u2) => ({ x: u2.y, y: -u2.x });
21689
21732
  const deep = depthOf(node2);
@@ -21718,13 +21761,13 @@ function turnViewCorner(node2, corner, p) {
21718
21761
  };
21719
21762
  }
21720
21763
  function moveViewEdge(node2, edge, p) {
21721
- const length = dist(node2.a, node2.b);
21722
- if (length < 1e-6) return {};
21764
+ const length2 = dist(node2.a, node2.b);
21765
+ if (length2 < 1e-6) return {};
21723
21766
  if (edge === "far") return { depth: depthThrough(node2, p) };
21724
21767
  const d = norm(sub(node2.b, node2.a));
21725
21768
  const s = dot(sub(p, node2.a), d);
21726
21769
  const at2 = (t2) => ({ x: tidy(node2.a.x + d.x * t2), y: tidy(node2.a.y + d.y * t2) });
21727
- if (edge === "start") return { a: at2(Math.min(s, length - SHORTEST)) };
21770
+ if (edge === "start") return { a: at2(Math.min(s, length2 - SHORTEST)) };
21728
21771
  if (edge === "end") return { b: at2(Math.max(SHORTEST, s)) };
21729
21772
  const n3 = viewer(node2.a, node2.b);
21730
21773
  const deep = depthOf(node2);
@@ -21746,8 +21789,8 @@ function faceUnder(wall, a, b) {
21746
21789
  const course = courseOf(wall);
21747
21790
  if (Math.abs(cross(course.dir(0), norm(sub(b, a)))) > 1e-3) return null;
21748
21791
  const face = dot(viewer(a, b), perp(course.dir(0))) > 0 ? "right" : "left";
21749
- const across = faceAcross(wall, face);
21750
- return [a, b].every((p) => Math.abs(course.project(p).across - across) <= ON_FACE) ? face : null;
21792
+ const across2 = faceAcross(wall, face);
21793
+ return [a, b].every((p) => Math.abs(course.project(p).across - across2) <= ON_FACE) ? face : null;
21751
21794
  }
21752
21795
  function heightsOf(kind, props, wall) {
21753
21796
  const bottom = kind.sill ? Math.max(0, Number(props[kind.sill]) || 0) : 0;
@@ -21790,8 +21833,8 @@ function clipConvex(subject, clip) {
21790
21833
  }
21791
21834
  return out;
21792
21835
  }
21793
- function clipLine(p, d, length, polygon) {
21794
- let [from, to] = [0, length];
21836
+ function clipLine(p, d, length2, polygon) {
21837
+ let [from, to] = [0, length2];
21795
21838
  const middle = polygon.reduce((m, q) => ({ x: m.x + q.x / polygon.length, y: m.y + q.y / polygon.length }), { x: 0, y: 0 });
21796
21839
  for (let i = 0; i < polygon.length; i++) {
21797
21840
  const [u, v] = [polygon[i], polygon[(i + 1) % polygon.length]];
@@ -21921,22 +21964,28 @@ function convexHull(points) {
21921
21964
  return [...half(sorted), ...half([...sorted].reverse())];
21922
21965
  }
21923
21966
  function seenFrom(facing, viewer2) {
21924
- const length = Math.hypot(facing.x, facing.y);
21925
- const c = length < 1e-9 ? 1 : dot(facing, viewer2) / length;
21967
+ const length2 = Math.hypot(facing.x, facing.y);
21968
+ const c = length2 < 1e-9 ? 1 : dot(facing, viewer2) / length2;
21926
21969
  return c >= Math.SQRT1_2 - 1e-9 ? "front" : c <= -Math.SQRT1_2 + 1e-9 ? "back" : "side";
21927
21970
  }
21928
21971
  var standingWeight = (p) => (p.kind === "path" || p.kind === "ellipse") && p.strokeWidth === void 0 ? { ...p, strokeWidth: STANDING_WEIGHT } : p;
21972
+ function shownOnPlan(doc, node2) {
21973
+ for (let at2 = node2, depth = 0; at2 && at2.type !== "page" && depth < 64; at2 = at2.parent ? doc.nodes[at2.parent] : void 0, depth++) {
21974
+ if (!isVisible(doc, at2)) return false;
21975
+ }
21976
+ return true;
21977
+ }
21929
21978
  function layout(view, doc, registry3, measure = () => []) {
21930
21979
  const line2 = lineOf(doc, view);
21931
21980
  if (!line2) return { prims: [], items: [] };
21932
21981
  const node2 = { ...line2, x: view.x, y: view.y, walls: view.walls, dimensions: view.dimensions };
21933
- const length = dist(node2.a, node2.b);
21934
- if (length < 1e-6) return { prims: [], items: [] };
21982
+ const length2 = dist(node2.a, node2.b);
21983
+ if (length2 < 1e-6) return { prims: [], items: [] };
21935
21984
  const d = norm(sub(node2.b, node2.a));
21936
21985
  const along2 = (p) => dot(sub(p, node2.a), d);
21937
21986
  const at2 = (s, h) => ({ x: node2.x + s, y: node2.y - h });
21938
21987
  const box = (s0, s1, h0, h1) => [at2(s0, h0), at2(s1, h0), at2(s1, h1), at2(s0, h1)];
21939
- const within = (s) => s >= -ON_FACE && s <= length + ON_FACE;
21988
+ const within = (s) => s >= -ON_FACE && s <= length2 + ON_FACE;
21940
21989
  const placed = (object3, shapes, h) => {
21941
21990
  const origin = applyTransform({ x: 0, y: 0 }, object3);
21942
21991
  const mirrored2 = dot(sub(applyTransform({ x: 1, y: 0 }, object3), origin), d) < 0;
@@ -21962,7 +22011,7 @@ function layout(view, doc, registry3, measure = () => []) {
21962
22011
  const box2 = prims.map(primitiveBounds).reduce((all, one) => one ? all ? unionBounds(all, one) : one : all, null);
21963
22012
  const kind = object3.type === "parametric" ? registry3.parametric.get(object3.kind) : void 0;
21964
22013
  if (box2) {
21965
- const item = { node: object3, role, box: box2, raises: role === "fixed" || !!kind?.sill };
22014
+ const item = { node: object3, role, box: box2, raises: role !== "opening" || !!kind?.sill };
21966
22015
  items.push(item);
21967
22016
  if (prims[0]) drawnFirst.set(item, prims[0]);
21968
22017
  }
@@ -21971,7 +22020,7 @@ function layout(view, doc, registry3, measure = () => []) {
21971
22020
  const deep = depthOf(node2);
21972
22021
  const front = viewer(node2.a, node2.b);
21973
22022
  const off = (p) => dot(sub(p, node2.a), front);
21974
- const walls = wallsIn(doc, node2.parent);
22023
+ const walls = wallsIn(doc, node2.parent).filter((wall) => shownOnPlan(doc, wall));
21975
22024
  const layers = [];
21976
22025
  const depthOn = (outline2) => (s) => sightDepth(outline2, s, along2, off);
21977
22026
  const seenOf = (points) => clipConvex(convexHull(points), seenArea(node2));
@@ -21987,8 +22036,8 @@ function layout(view, doc, registry3, measure = () => []) {
21987
22036
  for (const face of ["right", "left"]) {
21988
22037
  const outward = perp(course.dir(0));
21989
22038
  if (dot(outward, front) * (face === "right" ? 1 : -1) <= 0) continue;
21990
- const across = faceAcross(wall, face);
21991
- const [p, q] = faceStretch(doc, wall, face).map((t) => course.offset(t, across));
22039
+ const across2 = faceAcross(wall, face);
22040
+ const [p, q] = faceStretch(doc, wall, face).map((t) => course.offset(t, across2));
21992
22041
  const [op, oq] = [off(p), off(q)];
21993
22042
  const [lo, hi] = [-deep - ON_FACE, ON_FACE];
21994
22043
  const at3 = (k) => ({ x: p.x + (q.x - p.x) * k, y: p.y + (q.y - p.y) * k });
@@ -22002,7 +22051,7 @@ function layout(view, doc, registry3, measure = () => []) {
22002
22051
  for (const { wall, face, ends: ends2 } of seenFaces) {
22003
22052
  const ss = ends2.map(along2);
22004
22053
  const from = Math.max(0, Math.min(...ss));
22005
- const to = Math.min(length, Math.max(...ss));
22054
+ const to = Math.min(length2, Math.max(...ss));
22006
22055
  if (to - from < 1e-6) continue;
22007
22056
  seen.add(wall.id);
22008
22057
  const height = heightOf(doc, wall);
@@ -22010,6 +22059,7 @@ function layout(view, doc, registry3, measure = () => []) {
22010
22059
  layers.push({ from, to, depth: depthOn(ends2), prims: faces });
22011
22060
  faces.push({ kind: "path", points: box(from, to, 0, height), closed: true, fill: WALL_SEEN, own: true });
22012
22061
  for (const { node: opening } of wallOpenings(doc, wall, registry3)) {
22062
+ if (!shownOnPlan(doc, opening)) continue;
22013
22063
  const kind = registry3.parametric.get(opening.kind);
22014
22064
  if (!kind) continue;
22015
22065
  const props = registry3.resolveProps(kind, opening.props);
@@ -22021,6 +22071,7 @@ function layout(view, doc, registry3, measure = () => []) {
22021
22071
  faces.push(...shown(opening, "opening", own2 ? placed(opening, own2, 0) : [{ kind: "path", points: box(Math.min(s0, s1), Math.max(s0, s1), bottom, top), closed: true }]));
22022
22072
  }
22023
22073
  for (const object3 of wallMounted(doc, wall, registry3)) {
22074
+ if (!shownOnPlan(doc, object3)) continue;
22024
22075
  const origin = applyTransform({ x: 0, y: 0 }, object3);
22025
22076
  if (mountOf(object3, registry3)?.on !== "wall" || mountedOn(doc, object3, registry3)?.face !== face || !within(along2(origin)) || !between(origin)) continue;
22026
22077
  const kind = registry3.parametric.get(object3.kind);
@@ -22035,7 +22086,7 @@ function layout(view, doc, registry3, measure = () => []) {
22035
22086
  const course = courseOf(wall);
22036
22087
  const sides = wallSides(wall);
22037
22088
  const outline2 = [course.offset(0, -sides.left), course.offset(course.length, -sides.left), course.offset(course.length, sides.right), course.offset(0, sides.right)];
22038
- const taken = clipLine(node2.a, d, length, outline2);
22089
+ const taken = clipLine(node2.a, d, length2, outline2);
22039
22090
  if (taken) cutAt.set(wall.id, { taken });
22040
22091
  }
22041
22092
  const area = seenArea(node2);
@@ -22046,7 +22097,7 @@ function layout(view, doc, registry3, measure = () => []) {
22046
22097
  if (inside3.length < 3) continue;
22047
22098
  const ss = inside3.map(along2);
22048
22099
  const from = Math.max(0, Math.min(...ss));
22049
- const to = Math.min(length, Math.max(...ss));
22100
+ const to = Math.min(length2, Math.max(...ss));
22050
22101
  const cutThere = cutAt.get(wall.id)?.taken;
22051
22102
  const pieces = cutThere ? [[from, Math.min(to, cutThere[0])], [Math.max(from, cutThere[1]), to]] : [[from, to]];
22052
22103
  for (const [s0, s1] of pieces) if (s1 - s0 >= 1) inWay.push({ wall, from: s0, to: s1, depth: depthOn(inside3), height: heightOf(doc, wall) });
@@ -22074,15 +22125,16 @@ function layout(view, doc, registry3, measure = () => []) {
22074
22125
  layers.push({ from: run.from, to: run.to, depth: run.depth, prims: [{ kind: "path", points: box(run.from, run.to, 0, run.height), closed: true, fill: WALL_GREY, own: true }] });
22075
22126
  }
22076
22127
  for (const leaf of drawnBy ? leavesOf(doc, rootOf(doc, node2.parent)?.id ?? "") : []) {
22077
- if (leaf.type !== "instance" && leaf.type !== "parametric") continue;
22128
+ if (leaf.type !== "instance" && leaf.type !== "parametric" || !shownOnPlan(doc, leaf)) continue;
22078
22129
  if (leaf.type === "parametric" && (mountOf(leaf, registry3)?.on === "wall" || openingSpan(leaf, registry3))) continue;
22079
22130
  let tall;
22080
22131
  let looks = null;
22132
+ const raised = heightAboveFloor(leaf, registry3) ?? 0;
22081
22133
  if (leaf.type === "parametric") {
22082
22134
  const kind = registry3.parametric.get(leaf.kind);
22083
22135
  const props = kind ? registry3.resolveProps(kind, leaf.props) : {};
22084
22136
  tall = kind?.height?.(props);
22085
- looks = kind ? seenAs(leaf, props, 0) : null;
22137
+ looks = kind ? seenAs(leaf, props, raised) : null;
22086
22138
  } else {
22087
22139
  const component = doc.nodes[leaf.component];
22088
22140
  tall = component?.type === "component" && component.height ? component.height * (leaf.scale ?? 1) : void 0;
@@ -22095,37 +22147,37 @@ function layout(view, doc, registry3, measure = () => []) {
22095
22147
  if (nearest < -deep - ON_FACE || furthest > ON_FACE) continue;
22096
22148
  const ss = points.map(along2);
22097
22149
  const from = Math.max(0, Math.min(...ss));
22098
- const to = Math.min(length, Math.max(...ss));
22150
+ const to = Math.min(length2, Math.max(...ss));
22099
22151
  if (to - from < 1) continue;
22100
- const drawn = looks ? looks.map(standingWeight) : [{ kind: "path", points: box(from, to, 0, tall), closed: true, strokeWidth: STANDING_WEIGHT, own: true }];
22152
+ const drawn = looks ? looks.map(standingWeight) : [{ kind: "path", points: box(from, to, raised, raised + tall), closed: true, strokeWidth: STANDING_WEIGHT, own: true }];
22101
22153
  layers.push({ from, to, depth: depthOn(seenOf(points)), prims: shown(leaf, "standing", drawn) });
22102
22154
  }
22103
22155
  const onFaces = new Set(items.filter((item) => item.role === "fixed").map((item) => item.node.id));
22104
22156
  for (const leaf of drawnBy ? leavesOf(doc, rootOf(doc, node2.parent)?.id ?? "") : []) {
22105
- if (leaf.type !== "parametric" || onFaces.has(leaf.id) || mountOf(leaf, registry3)?.on !== "wall") continue;
22157
+ if (leaf.type !== "parametric" || onFaces.has(leaf.id) || mountOf(leaf, registry3)?.on !== "wall" || !shownOnPlan(doc, leaf)) continue;
22106
22158
  const points = drawnBy(leaf, doc, registry3).flatMap(outlineOf);
22107
22159
  if (points.length === 0) continue;
22108
22160
  const offs = points.map(off);
22109
22161
  const [nearest, furthest] = [Math.max(...offs), Math.min(...offs)];
22110
22162
  if (nearest < -deep - ON_FACE || furthest > ON_FACE) continue;
22111
22163
  const ss = points.map(along2);
22112
- if (Math.max(...ss) < 0 || Math.min(...ss) > length) continue;
22164
+ if (Math.max(...ss) < 0 || Math.min(...ss) > length2) continue;
22113
22165
  const kind = registry3.parametric.get(leaf.kind);
22114
22166
  const props = kind ? registry3.resolveProps(kind, leaf.props) : {};
22115
22167
  const own2 = kind?.front?.(props);
22116
22168
  const half = PLATE / 2;
22117
22169
  const h = heightAboveFloor(leaf, registry3) ?? 0;
22118
22170
  const prims = shown(leaf, "fixed", seenAs(leaf, props, h) ?? placed(leaf, own2 ?? [{ kind: "path", points: [{ x: -half, y: -half }, { x: half, y: -half }, { x: half, y: half }, { x: -half, y: half }], closed: true }], h));
22119
- layers.push({ from: Math.max(0, Math.min(...ss)), to: Math.min(length, Math.max(...ss)), depth: depthOn(seenOf(points)), prims });
22171
+ layers.push({ from: Math.max(0, Math.min(...ss)), to: Math.min(length2, Math.max(...ss)), depth: depthOn(seenOf(points)), prims });
22120
22172
  }
22121
- const [x0, x1] = [node2.x, node2.x + length];
22122
- const ends = box(0, length, -VIEW_HEIGHT, VIEW_HEIGHT);
22173
+ const [x0, x1] = [node2.x, node2.x + length2];
22174
+ const ends = box(0, length2, -VIEW_HEIGHT, VIEW_HEIGHT);
22123
22175
  const clipped = (p) => {
22124
22176
  const b = primitiveBounds(p);
22125
22177
  return b && (b.minX < x0 - ON_FACE || b.maxX > x1 + ON_FACE) ? { ...p, clip: [...p.clip ?? [], ends] } : p;
22126
22178
  };
22127
22179
  for (const item of items) item.box = { ...item.box, minX: Math.max(item.box.minX, x0), maxX: Math.min(item.box.maxX, x1) };
22128
- const floor = { kind: "path", points: [at2(0, 0), at2(length, 0)], strokeWidth: FLOOR_WEIGHT };
22180
+ const floor = { kind: "path", points: [at2(0, 0), at2(length2, 0)], strokeWidth: FLOOR_WEIGHT };
22129
22181
  const dimensions = [];
22130
22182
  const ordered = paintOrder(layers);
22131
22183
  const layerOf = new Map(ordered.flatMap((layer, i) => layer.prims.map((p) => [p, i])));
@@ -22136,7 +22188,7 @@ function layout(view, doc, registry3, measure = () => []) {
22136
22188
  }
22137
22189
  const placedItems = items.filter((item) => item.role === "fixed" && !item.hidden);
22138
22190
  if (node2.dimensions !== false && placedItems.length > 0) {
22139
- const stops = [0, ...placedItems.map((item) => along2(applyTransform({ x: 0, y: 0 }, item.node))), length].map((s) => Math.round(s)).sort((p, q) => p - q);
22191
+ const stops = [0, ...placedItems.map((item) => along2(applyTransform({ x: 0, y: 0 }, item.node))), length2].map((s) => Math.round(s)).sort((p, q) => p - q);
22140
22192
  const chain = stops.filter((s, i) => i === 0 || s - stops[i - 1] >= 1);
22141
22193
  for (let i = 1; i < chain.length; i++) dimensions.push(...measure(at2(chain[i - 1], 0), at2(chain[i], 0), CHAIN_BELOW));
22142
22194
  for (const item of placedItems) {
@@ -22153,9 +22205,9 @@ function carriers(doc, node2) {
22153
22205
  const face = faceUnder(wall, node2.a, node2.b);
22154
22206
  if (!face) return [];
22155
22207
  const course = courseOf(wall);
22156
- const across = faceAcross(wall, face);
22208
+ const across2 = faceAcross(wall, face);
22157
22209
  const stretch = faceStretch(doc, wall, face);
22158
- return [{ wall, face, stretch, ends: [course.offset(stretch[0], across), course.offset(stretch[1], across)] }];
22210
+ return [{ wall, face, stretch, ends: [course.offset(stretch[0], across2), course.offset(stretch[1], across2)] }];
22159
22211
  });
22160
22212
  }
22161
22213
  function elevationFollowOps(before, after, changed) {
@@ -22177,7 +22229,7 @@ function elevationFollowOps(before, after, changed) {
22177
22229
  if (!on) continue;
22178
22230
  const { old, now } = walls.get(on.wall.id);
22179
22231
  const [was, is] = [courseOf(old), courseOf(now)];
22180
- const across = faceAcross(now, on.face);
22232
+ const across2 = faceAcross(now, on.face);
22181
22233
  const still = carriers(after, far);
22182
22234
  const stretch = faceStretch(after, now, on.face);
22183
22235
  const d = norm(sub(far.b, far.a));
@@ -22185,7 +22237,7 @@ function elevationFollowOps(before, after, changed) {
22185
22237
  const s = was.project(p).along;
22186
22238
  const atEnd = Math.abs(s - on.stretch[0]) <= ON_FACE ? stretch[0] : Math.abs(s - on.stretch[1]) <= ON_FACE ? stretch[1] : null;
22187
22239
  if (atEnd !== null ? still.some(({ ends }) => ends.some((end) => dist(end, p) <= ON_FACE)) : still.some(({ ends }) => (dot(sub(p, ends[0]), d) + ON_FACE) * (dot(sub(p, ends[1]), d) - ON_FACE) <= 0)) return p;
22188
- const q = is.offset(atEnd ?? followAlong(old, now, s, 0), across);
22240
+ const q = is.offset(atEnd ?? followAlong(old, now, s, 0), across2);
22189
22241
  return { x: tidy(q.x), y: tidy(q.y) };
22190
22242
  };
22191
22243
  const [a, b] = [follow(far.a), follow(far.b)];
@@ -22285,7 +22337,7 @@ function quantities(doc, pageId, registry3) {
22285
22337
  const drawn = apply(map, along2);
22286
22338
  const stretch = chord < 1e-9 ? Math.sqrt(Math.abs(det(map))) : Math.hypot(drawn.x, drawn.y) / chord;
22287
22339
  const thick = stretch > 0 ? wall.thickness * Math.abs(det(map)) / stretch : wall.thickness;
22288
- const length = wallLength(wall) * stretch / 1e3;
22340
+ const length2 = wallLength(wall) * stretch / 1e3;
22289
22341
  const height = wall.height ?? storey;
22290
22342
  const openings = wallOpenings(doc, wall, registry3);
22291
22343
  let cut = 0;
@@ -22300,13 +22352,13 @@ function quantities(doc, pageId, registry3) {
22300
22352
  if (seen2) seen2.count++;
22301
22353
  else kinds.set(key2, { kind: node2.kind, label: kind?.label ?? node2.kind, width: round(width), height: own2 === null ? null : round(own2), count: 1 });
22302
22354
  }
22303
- const gross = height === null ? null : length * height / 1e3;
22355
+ const gross = height === null ? null : length2 * height / 1e3;
22304
22356
  const net = gross === null ? null : Math.max(0, gross - cut);
22305
22357
  const material2 = materialName(wall.material);
22306
22358
  const thickness = round(thick, 1);
22307
22359
  const key = `${materialId(wall.material)} ${thickness}`;
22308
22360
  const seen = made.get(key) ?? { material: material2, thickness, length: 0, area: 0, volume: 0, unknown: false };
22309
- seen.length += length;
22361
+ seen.length += length2;
22310
22362
  if (net === null) seen.unknown = true;
22311
22363
  else {
22312
22364
  seen.area += net;
@@ -22318,10 +22370,10 @@ function quantities(doc, pageId, registry3) {
22318
22370
  name: wall.name ?? "",
22319
22371
  material: material2,
22320
22372
  materialId: materialId(wall.material),
22321
- length: round(length),
22373
+ length: round(length2),
22322
22374
  thickness: round(thick, 1),
22323
22375
  height: height === null ? null : round(height / 1e3),
22324
- footprint: round(length * thick / 1e3),
22376
+ footprint: round(length2 * thick / 1e3),
22325
22377
  openings: openings.length,
22326
22378
  gross: gross === null ? null : round(gross),
22327
22379
  cut: gross === null ? null : round(cut),
@@ -22500,10 +22552,10 @@ function linkPath(doc, link, drawn) {
22500
22552
  const ends = linkEnds(doc, link, drawn);
22501
22553
  if (!ends) return null;
22502
22554
  const { boxes, a, b } = ends;
22503
- const length = dist(a, b);
22504
- if (length < 1e-6) return null;
22555
+ const length2 = dist(a, b);
22556
+ if (length2 < 1e-6) return null;
22505
22557
  const bend = linkBend(doc, link, a, b);
22506
- const pull = add(mid(a, b), scale(leftOf(a, b), bend * length));
22558
+ const pull = add(mid(a, b), scale(leftOf(a, b), bend * length2));
22507
22559
  const points = Array.from({ length: LINK_STEPS + 1 }, (_, i) => {
22508
22560
  const t = i / LINK_STEPS;
22509
22561
  const [p, q, r] = [(1 - t) * (1 - t), 2 * (1 - t) * t, t * t];
@@ -22526,11 +22578,11 @@ function bendThrough(doc, link, p, drawn) {
22526
22578
  const ends = linkEnds(doc, link, drawn);
22527
22579
  if (!ends) return null;
22528
22580
  const { a, b } = ends;
22529
- const length = dist(a, b);
22530
- if (length < 1e-6) return null;
22581
+ const length2 = dist(a, b);
22582
+ if (length2 < 1e-6) return null;
22531
22583
  const left = leftOf(a, b);
22532
22584
  const off = sub(p, mid(a, b));
22533
- return Math.round(2 * (off.x * left.x + off.y * left.y) / length * 1e3) / 1e3;
22585
+ return Math.round(2 * (off.x * left.x + off.y * left.y) / length2 * 1e3) / 1e3;
22534
22586
  }
22535
22587
  function linkPrimitives(doc, link, drawn) {
22536
22588
  const points = linkPath(doc, link, drawn);
@@ -22815,10 +22867,10 @@ var DIVIDER_INK = "#8b9099";
22815
22867
  var VIEW_LINE_ARROW = 500;
22816
22868
  var VIEW_LINE_HEAD = 180;
22817
22869
  function viewLinePrimitives(node2) {
22818
- const length = Math.hypot(node2.b.x - node2.a.x, node2.b.y - node2.a.y);
22870
+ const length2 = Math.hypot(node2.b.x - node2.a.x, node2.b.y - node2.a.y);
22819
22871
  const line2 = { kind: "path", points: [node2.a, node2.b], dash: [14, 4, 2, 4], own: true };
22820
- if (length < 1e-6) return [line2];
22821
- const d = { x: (node2.b.x - node2.a.x) / length, y: (node2.b.y - node2.a.y) / length };
22872
+ if (length2 < 1e-6) return [line2];
22873
+ const d = { x: (node2.b.x - node2.a.x) / length2, y: (node2.b.y - node2.a.y) / length2 };
22822
22874
  const look = { x: d.y, y: -d.x };
22823
22875
  const head = VIEW_LINE_HEAD;
22824
22876
  return [
@@ -22881,11 +22933,11 @@ function symbolPrimitives(object3, ctx) {
22881
22933
  const node2 = object3.kind === "component" ? { ...base2, type: "instance", component: object3.id } : { ...base2, type: "parametric", kind: object3.id, props: object3.props ?? {} };
22882
22934
  return nodePrimitives(node2, { ...ctx, depth: ctx.depth + 1 });
22883
22935
  }
22884
- function dimensionLabel(node2, length, drawing = {}) {
22936
+ function dimensionLabel(node2, length2, drawing = {}) {
22885
22937
  if (node2.text) return node2.text;
22886
22938
  const unit = node2.unit ?? "mm";
22887
- if (unit === "ft-in") return formatFeetInches(length, node2.fraction ?? 16);
22888
- const value = (length / { mm: 1, cm: 10, m: 1e3, in: 25.4, ft: 304.8 }[unit]).toFixed(node2.decimals ?? { mm: 0, cm: 1, m: 2, in: 1, ft: 2 }[unit]).replace(".", node2.decimal ?? drawing.decimal ?? ".");
22939
+ if (unit === "ft-in") return formatFeetInches(length2, node2.fraction ?? 16);
22940
+ const value = (length2 / { mm: 1, cm: 10, m: 1e3, in: 25.4, ft: 304.8 }[unit]).toFixed(node2.decimals ?? { mm: 0, cm: 1, m: 2, in: 1, ft: 2 }[unit]).replace(".", node2.decimal ?? drawing.decimal ?? ".");
22889
22941
  return node2.showUnit ? `${value} ${unit}` : value;
22890
22942
  }
22891
22943
  function roomArea(node2, area, drawing = {}) {
@@ -22928,6 +22980,19 @@ function dimensionMarker(type, at2, out, along2, size, style) {
22928
22980
  return [];
22929
22981
  }
22930
22982
  }
22983
+ var TITLE_CAPTIONS = {
22984
+ project: "Project",
22985
+ client: "Client",
22986
+ address: "Address",
22987
+ sheet: "Sheet title",
22988
+ page: "Page",
22989
+ author: "Drawn by",
22990
+ scale: "Scale",
22991
+ format: "Format",
22992
+ date: "Date",
22993
+ number: "Sheet no.",
22994
+ revisions: "Revisions"
22995
+ };
22931
22996
  var TITLE_HIDDEN = ["page"];
22932
22997
  var titleBlockHidden = (node2) => node2.titleBlock?.hide ?? TITLE_HIDDEN;
22933
22998
  function titleBlockValues(node2, doc) {
@@ -22946,7 +23011,8 @@ function titleBlockValues(node2, doc) {
22946
23011
  scale: `1:${s}`,
22947
23012
  format: paperFormat(node2)?.name ?? `${Math.round(node2.width / s)} \xD7 ${Math.round(node2.height / s)}`,
22948
23013
  date: fill(block.date),
22949
- number: fill(block.number)
23014
+ number: fill(block.number),
23015
+ revisions: fill(block.revisions)
22950
23016
  };
22951
23017
  }
22952
23018
  function titleBlock(node2, doc) {
@@ -22980,6 +23046,7 @@ function titleBlock(node2, doc) {
22980
23046
  ].filter(([field]) => shown(field) !== "");
22981
23047
  const cellsHeight = cells.length > 0 ? 9 : 0;
22982
23048
  const frame = { kind: "path", closed: true, ...ink, strokeWidth: 1.2, points: boxCorners({ x: node2.x + margin, y: node2.y + margin, width: node2.width - 2 * margin, height: node2.height - 2 * margin }) };
23049
+ if (doc.settings?.titleBlock?.layout === "strip") return [frame, ...titleStrip(node2, shown, doc.settings.titleBlock.labels ?? {}, { ink, line: line2, words })];
22983
23050
  const height = (headingHeight + namesHeight + cellsHeight) * s;
22984
23051
  if (height === 0) return [frame];
22985
23052
  const top = bottom - height;
@@ -23012,6 +23079,64 @@ function titleBlock(node2, doc) {
23012
23079
  }
23013
23080
  return out;
23014
23081
  }
23082
+ var MAX_REVISIONS = 20;
23083
+ function titleStrip(node2, shown, labels, draw) {
23084
+ const s = node2.scale ?? DEFAULT_PAPER_SCALE;
23085
+ const [width, margin, pad] = [70, 10, 3];
23086
+ const room = width - 2 * pad;
23087
+ const left = node2.x + node2.width - (margin + width) * s;
23088
+ const [top, bottom] = [node2.y + margin * s, node2.y + node2.height - margin * s];
23089
+ const caption = (field, y2) => {
23090
+ const text2 = (labels[field] ?? TITLE_CAPTIONS[field]).trim();
23091
+ return text2 ? [draw.words(text2, left + pad * s, y2 + 3.5 * s, 2, room)] : [];
23092
+ };
23093
+ const cell = (field, size = 3, bold = false) => {
23094
+ const lines = shown(field).split("\n").map((part) => part.trim()).filter(Boolean);
23095
+ if (lines.length === 0) return [];
23096
+ const step = size * 1.5;
23097
+ return [
23098
+ {
23099
+ height: 7 + size + (lines.length - 1) * step,
23100
+ draw: (y2) => [...caption(field, y2), ...lines.map((text2, i) => draw.words(text2, left + pad * s, y2 + (4.5 + size + i * step) * s, size, room, { bold }))]
23101
+ }
23102
+ ];
23103
+ };
23104
+ const revisions = (rows) => {
23105
+ if (rows.length === 0) return [];
23106
+ const starts = [0, 8, 26, width];
23107
+ const row = (text2, rowTop) => {
23108
+ const parts = text2.split("|").map((part) => part.trim());
23109
+ const cells = parts.length === 1 ? ["", "", parts[0]] : [parts[0], parts[1], parts.slice(2).join(" | ")];
23110
+ const out2 = [draw.line(left, rowTop, left + width * s, rowTop), draw.line(left + 8 * s, rowTop, left + 8 * s, rowTop + 5 * s), draw.line(left + 26 * s, rowTop, left + 26 * s, rowTop + 5 * s)];
23111
+ cells.forEach((words, i) => words && out2.push(draw.words(words, left + (starts[i] + 1.5) * s, rowTop + 3.7 * s, 2.5, starts[i + 1] - starts[i] - 3)));
23112
+ return out2;
23113
+ };
23114
+ return [{ height: 5 + rows.length * 5, draw: (y2) => [...caption("revisions", y2), ...rows.flatMap((text2, i) => row(text2, y2 + (5 + i * 5) * s))] }];
23115
+ };
23116
+ const below = [...cell("sheet", 4, true), ...cell("page"), ...cell("scale"), ...cell("format"), ...cell("number", 9, true)];
23117
+ const head = [...cell("project", 4.5, true), ...cell("client"), ...cell("address")];
23118
+ const signed = [...cell("author"), ...cell("date")];
23119
+ const sum = (cells) => cells.reduce((total, one) => total + one.height, 0);
23120
+ const free = (bottom - top) / s - sum(head) - sum(signed) - sum(below);
23121
+ if (free < 0) return [];
23122
+ const listed2 = shown("revisions").split("\n").map((row) => row.trim()).filter(Boolean);
23123
+ const above = [...head, ...revisions(listed2.slice(0, Math.max(0, Math.min(MAX_REVISIONS, Math.floor((free - 5) / 5))))), ...signed];
23124
+ if (above.length + below.length === 0) return [];
23125
+ const out = [{ kind: "path", closed: true, ...draw.ink, strokeWidth: 1.2, points: boxCorners({ x: left, y: top, width: width * s, height: bottom - top }) }];
23126
+ let y = top;
23127
+ above.forEach((one, i) => {
23128
+ if (i > 0) out.push(draw.line(left, y, left + width * s, y));
23129
+ out.push(...one.draw(y));
23130
+ y += one.height * s;
23131
+ });
23132
+ if (above.length > 0) out.push(draw.line(left, y, left + width * s, y));
23133
+ y = bottom - sum(below) * s;
23134
+ for (const one of below) {
23135
+ out.push(draw.line(left, y, left + width * s, y), ...one.draw(y));
23136
+ y += one.height * s;
23137
+ }
23138
+ return out;
23139
+ }
23015
23140
  function sheetContent(node2, ctx) {
23016
23141
  const component = node2.plain ? void 0 : sheetContentOf(ctx.doc);
23017
23142
  if (!component?.sheet || ctx.depth >= MAX_INSTANCE_DEPTH || rootOf(ctx.doc, node2.parent)?.id === component.id) return [];
@@ -23048,14 +23173,14 @@ function arcOf(node2) {
23048
23173
  return node2.from === void 0 && node2.to === void 0 ? null : { from: node2.from ?? 0, to: node2.to ?? 360 };
23049
23174
  }
23050
23175
  function annotationCurve(node2) {
23051
- const length = dist(node2.a, node2.b);
23176
+ const length2 = dist(node2.a, node2.b);
23052
23177
  const bend = node2.bend ?? ANNOTATION_BEND;
23053
23178
  if (node2.shape === "elbow") {
23054
23179
  const corner = { x: node2.a.x, y: node2.b.y };
23055
23180
  return dist(corner, node2.a) < 1e-6 || dist(corner, node2.b) < 1e-6 ? [node2.a, node2.b] : [node2.a, corner, node2.b];
23056
23181
  }
23057
- if (length < 1e-6 || Math.abs(bend) < 1e-6 || node2.shape === "straight") return [node2.a, node2.b];
23058
- const control = add(mid(node2.a, node2.b), scale(perp(norm(sub(node2.b, node2.a))), bend * length));
23182
+ if (length2 < 1e-6 || Math.abs(bend) < 1e-6 || node2.shape === "straight") return [node2.a, node2.b];
23183
+ const control = add(mid(node2.a, node2.b), scale(perp(norm(sub(node2.b, node2.a))), bend * length2));
23059
23184
  return Array.from({ length: 21 }, (_, i) => {
23060
23185
  const t = i / 20;
23061
23186
  const [p, q, r] = [(1 - t) ** 2, 2 * t * (1 - t), t ** 2];
@@ -23068,15 +23193,15 @@ function annotationText(node2) {
23068
23193
  return { x: node2.b.x + (right ? -1 : 1) * size * 0.3, y: node2.b.y + size * 0.35, size, right };
23069
23194
  }
23070
23195
  function annotationPrimitives(node2, ctx) {
23071
- const curve = annotationCurve(node2);
23196
+ const curve2 = annotationCurve(node2);
23072
23197
  const words = annotationText(node2);
23073
23198
  const text2 = textLines(said(node2.text, node2.parent, ctx), words, words.size, { align: words.right ? "right" : "left", font: node2.font });
23074
- if (curve.length < 2 || dist(node2.a, node2.b) < 1e-6) return text2;
23199
+ if (curve2.length < 2 || dist(node2.a, node2.b) < 1e-6) return text2;
23075
23200
  const markerSize3 = node2.markerSize ?? words.size * 0.75;
23076
- const atTip = norm(sub(curve[0], curve[1]));
23077
- const atText = norm(sub(curve[curve.length - 1], curve[curve.length - 2]));
23201
+ const atTip = norm(sub(curve2[0], curve2[1]));
23202
+ const atText = norm(sub(curve2[curve2.length - 1], curve2[curve2.length - 2]));
23078
23203
  return [
23079
- { kind: "path", points: curve },
23204
+ { kind: "path", points: curve2 },
23080
23205
  ...dimensionMarker(node2.startMarker ?? "arrow", node2.a, atTip, atTip, markerSize3, {}),
23081
23206
  ...dimensionMarker(node2.endMarker ?? "none", node2.b, atText, atText, markerSize3, {}),
23082
23207
  ...text2
@@ -23113,8 +23238,8 @@ function gridlinePrimitives(node2) {
23113
23238
  ];
23114
23239
  }
23115
23240
  function dimensionPrimitives(node2, drawing) {
23116
- const length = dist(node2.a, node2.b);
23117
- if (length < 1e-6) return [];
23241
+ const length2 = dist(node2.a, node2.b);
23242
+ if (length2 < 1e-6) return [];
23118
23243
  const size = node2.size ?? DIMENSION_TEXT_SIZE;
23119
23244
  const dir = norm(sub(node2.b, node2.a));
23120
23245
  const n3 = perp(dir);
@@ -23132,7 +23257,7 @@ function dimensionPrimitives(node2, drawing) {
23132
23257
  };
23133
23258
  const gap = scale(n3, side * (node2.extensionGap ?? 0));
23134
23259
  const overshoot = scale(n3, side * size * 0.4);
23135
- const label = dimensionLabel(node2, length, drawing);
23260
+ const label = dimensionLabel(node2, length2, drawing);
23136
23261
  const width = label.length * size * 0.55;
23137
23262
  const position = node2.textPosition ?? "above";
23138
23263
  let angle = 0;
@@ -23153,7 +23278,7 @@ function dimensionPrimitives(node2, drawing) {
23153
23278
  anchor2 = add(middle, scale(rotate({ x: 0, y: -1 }, angle), lift));
23154
23279
  cover = width / 2 + size * 0.3;
23155
23280
  }
23156
- const broken = position === "center" && length > 2 * cover;
23281
+ const broken = position === "center" && length2 > 2 * cover;
23157
23282
  const lines = broken ? [[a, sub(middle, scale(dir, cover))], [add(middle, scale(dir, cover)), b]] : [[a, b]];
23158
23283
  const markerSize3 = node2.markerSize ?? DIMENSION_MARKER_SIZE;
23159
23284
  return [
@@ -23386,16 +23511,16 @@ var KINDS = {
23386
23511
  move: moveAB,
23387
23512
  // The two ends, and the middle of the leader, which is dragged to bend it.
23388
23513
  handles: (node2) => {
23389
- const curve = annotationCurve(node2);
23390
- return (node2.shape ?? "curve") === "curve" ? [node2.a, node2.b, curve[Math.floor(curve.length / 2)]] : [node2.a, node2.b];
23514
+ const curve2 = annotationCurve(node2);
23515
+ return (node2.shape ?? "curve") === "curve" ? [node2.a, node2.b, curve2[Math.floor(curve2.length / 2)]] : [node2.a, node2.b];
23391
23516
  },
23392
23517
  moveHandle: (node2, index, p) => {
23393
23518
  if (index < 2) return moveHandleAB(node2, index, p);
23394
- const length = dist(node2.a, node2.b);
23395
- if (length < 1e-6) return {};
23519
+ const length2 = dist(node2.a, node2.b);
23520
+ if (length2 < 1e-6) return {};
23396
23521
  const off = sub(p, mid(node2.a, node2.b));
23397
- const across = perp(norm(sub(node2.b, node2.a)));
23398
- return { bend: Math.round(2 * (off.x * across.x + off.y * across.y) / length * 1e3) / 1e3 };
23522
+ const across2 = perp(norm(sub(node2.b, node2.a)));
23523
+ return { bend: Math.round(2 * (off.x * across2.x + off.y * across2.y) / length2 * 1e3) / 1e3 };
23399
23524
  },
23400
23525
  snapPoints: (node2) => [node2.a, node2.b],
23401
23526
  // A leader points at things; it is not one of them.
@@ -23638,9 +23763,9 @@ function near(mass, a, b, margin) {
23638
23763
  return [...found].sort((i, j) => i - j).filter((i) => mass.bounds[i].minX <= box.maxX && mass.bounds[i].maxX >= box.minX && mass.bounds[i].minY <= box.maxY && mass.bounds[i].maxY >= box.minY).map((i) => mass.shapes[i]);
23639
23764
  }
23640
23765
  function runsAlong(shape, p, q) {
23641
- const length = Math.hypot(q.x - p.x, q.y - p.y);
23642
- if (length < 1e-9) return false;
23643
- const u = { x: (q.x - p.x) / length, y: (q.y - p.y) / length };
23766
+ const length2 = Math.hypot(q.x - p.x, q.y - p.y);
23767
+ if (length2 < 1e-9) return false;
23768
+ const u = { x: (q.x - p.x) / length2, y: (q.y - p.y) / length2 };
23644
23769
  const middle = { x: (p.x + q.x) / 2, y: (p.y + q.y) / 2 };
23645
23770
  return shape.some((c, i) => {
23646
23771
  const e = shape[(i + 1) % shape.length];
@@ -23651,14 +23776,14 @@ function runsAlong(shape, p, q) {
23651
23776
  }
23652
23777
  function outsideMass(mass, a, b, of) {
23653
23778
  const d = { x: b.x - a.x, y: b.y - a.y };
23654
- const length = Math.hypot(d.x, d.y);
23655
- if (length < 1e-9) return [];
23779
+ const length2 = Math.hypot(d.x, d.y);
23780
+ if (length2 < 1e-9) return [];
23656
23781
  const shapes = near(mass, a, b, 2 * ASIDE);
23657
23782
  const cuts = [0, 1];
23658
23783
  for (const { points: other } of shapes) {
23659
23784
  other.forEach((c, i) => {
23660
23785
  const e = other[(i + 1) % other.length];
23661
- const along2 = ((c.x - a.x) * d.x + (c.y - a.y) * d.y) / (length * length);
23786
+ const along2 = ((c.x - a.x) * d.x + (c.y - a.y) * d.y) / (length2 * length2);
23662
23787
  if (along2 > 0 && along2 < 1 && distToSegment(c, a, b) < NEAR) cuts.push(along2);
23663
23788
  const cross2 = d.x * (e.y - c.y) - d.y * (e.x - c.x);
23664
23789
  if (Math.abs(cross2) < 1e-9) return;
@@ -23669,10 +23794,10 @@ function outsideMass(mass, a, b, of) {
23669
23794
  }
23670
23795
  cuts.sort((x, y) => x - y);
23671
23796
  const at2 = (t) => ({ x: a.x + d.x * t, y: a.y + d.y * t });
23672
- const aside = { x: -d.y / length * ASIDE, y: d.x / length * ASIDE };
23797
+ const aside = { x: -d.y / length2 * ASIDE, y: d.x / length2 * ASIDE };
23673
23798
  const parts = [];
23674
23799
  for (let i = 0; i + 1 < cuts.length; i++) {
23675
- if ((cuts[i + 1] - cuts[i]) * length < NEAR) continue;
23800
+ if ((cuts[i + 1] - cuts[i]) * length2 < NEAR) continue;
23676
23801
  const middle = at2((cuts[i] + cuts[i + 1]) / 2);
23677
23802
  const hides = (other) => !of || other.key === of.key || other.rank >= of.rank || runsAlong(other.points, at2(cuts[i]), at2(cuts[i + 1]));
23678
23803
  const walled = (q) => shapes.some((other) => pointInPolygon(q, other.points) && hides(other));
@@ -23811,6 +23936,7 @@ function mountOf(node2, registry3) {
23811
23936
  return mount?.on === "wall" || mount?.on === "floor" ? mount : null;
23812
23937
  }
23813
23938
  function heightAboveFloor(node2, registry3) {
23939
+ if (node2.type === "instance") return node2.z ?? null;
23814
23940
  if (node2.type !== "parametric") return null;
23815
23941
  const mount = mountOf(node2, registry3);
23816
23942
  return node2.z ?? (mount?.on === "wall" ? mount.height ?? null : null);
@@ -23827,18 +23953,18 @@ function backOf(node2, mount) {
23827
23953
  var faceAcross = (wall, face) => face === "right" ? wallSides(wall).right : -wallSides(wall).left;
23828
23954
  function faceStretch(doc, wall, face) {
23829
23955
  const course = courseOf(wall);
23830
- const across = faceAcross(wall, face);
23831
- const on = wallOutline(wall, doc).map((p) => course.project(p)).filter((p) => Math.abs(p.across - across) <= 0.5).map((p) => p.along);
23956
+ const across2 = faceAcross(wall, face);
23957
+ const on = wallOutline(wall, doc).map((p) => course.project(p)).filter((p) => Math.abs(p.across - across2) <= 0.5).map((p) => p.along);
23832
23958
  return on.length >= 2 ? [Math.min(...on), Math.max(...on)] : [0, course.length];
23833
23959
  }
23834
23960
  function onFace(wall, back) {
23835
23961
  const course = courseOf(wall);
23836
- const { along: along2, across } = course.project(back.at);
23962
+ const { along: along2, across: across2 } = course.project(back.at);
23837
23963
  if (along2 < -ON_FACE2 || along2 > course.length + ON_FACE2) return null;
23838
23964
  const d = course.dir(Math.max(0, Math.min(course.length, along2)));
23839
23965
  if (Math.abs(cross(d, back.along)) > ALONG_FACE) return null;
23840
23966
  const face = cross(d, back.out) > 0 ? "right" : "left";
23841
- return Math.abs(across - faceAcross(wall, face)) <= ON_FACE2 ? { wall, face, along: along2 } : null;
23967
+ return Math.abs(across2 - faceAcross(wall, face)) <= ON_FACE2 ? { wall, face, along: along2 } : null;
23842
23968
  }
23843
23969
  function mountedOn(doc, node2, registry3) {
23844
23970
  const mount = mountOf(node2, registry3);
@@ -23925,8 +24051,8 @@ function putBack(node2, old, now, registry3) {
23925
24051
  if (!opening) return null;
23926
24052
  const [was, is] = [courseOf(old), courseOf(now)];
23927
24053
  const middle = applyTransform({ x: (opening.from + opening.to) / 2, y: 0 }, node2);
23928
- const { along: along2, across } = was.project(middle);
23929
- const off = across - middleAcross(old);
24054
+ const { along: along2, across: across2 } = was.project(middle);
24055
+ const off = across2 - middleAcross(old);
23930
24056
  const s = followAlong(old, now, along2, Math.abs(opening.to - opening.from) / 2);
23931
24057
  const rotation2 = (((node2.rotation ?? 0) + angleOf(is.dir(0)) - angleOf(was.dir(0))) % 360 + 360) % 360;
23932
24058
  const centre = is.offset(s, middleAcross(now) + off);
@@ -23985,9 +24111,9 @@ function materialSeams(doc, wall, registry3) {
23985
24111
  const seams = [];
23986
24112
  for (const [p, q] of edges(wallPolygons(wall, doc, registry3))) {
23987
24113
  const d = { x: q.x - p.x, y: q.y - p.y };
23988
- const length = Math.hypot(d.x, d.y);
23989
- if (length < SHORT) continue;
23990
- const u = { x: d.x / length, y: d.y / length };
24114
+ const length2 = Math.hypot(d.x, d.y);
24115
+ if (length2 < SHORT) continue;
24116
+ const u = { x: d.x / length2, y: d.y / length2 };
23991
24117
  const off = (r) => cross(u, { x: r.x - p.x, y: r.y - p.y });
23992
24118
  const at2 = (r) => (r.x - p.x) * u.x + (r.y - p.y) * u.y;
23993
24119
  for (const [r, s] of theirs) {
@@ -23995,7 +24121,7 @@ function materialSeams(doc, wall, registry3) {
23995
24121
  if (theirLength < SHORT || Math.abs(off(r)) > TOUCH || Math.abs(off(s)) > TOUCH || (s.x - r.x) * u.x + (s.y - r.y) * u.y >= 0) continue;
23996
24122
  if (Math.abs(cross(u, { x: (s.x - r.x) / theirLength, y: (s.y - r.y) / theirLength })) > SKEW) continue;
23997
24123
  const from = Math.max(0, Math.min(at2(r), at2(s)));
23998
- const to = Math.min(length, Math.max(at2(r), at2(s)));
24124
+ const to = Math.min(length2, Math.max(at2(r), at2(s)));
23999
24125
  if (to - from > SHORT) seams.push([{ x: p.x + u.x * from, y: p.y + u.y * from }, { x: p.x + u.x * to, y: p.y + u.y * to }]);
24000
24126
  }
24001
24127
  }
@@ -24015,11 +24141,11 @@ var material = (wall) => wall.material ?? "";
24015
24141
  function sharedThickness(wall, other) {
24016
24142
  const course = courseOf(wall);
24017
24143
  const { left, right } = wallSides(wall);
24018
- const { across } = course.project(other.a);
24144
+ const { across: across2 } = course.project(other.a);
24019
24145
  const theirs = wallSides(other);
24020
24146
  const opposite = dot(course.dir(0), courseOf(other).dir(0)) < 0;
24021
24147
  const [before, after] = opposite ? [theirs.right, theirs.left] : [theirs.left, theirs.right];
24022
- return Math.min(right, across + after) - Math.max(-left, across - before);
24148
+ return Math.min(right, across2 + after) - Math.max(-left, across2 - before);
24023
24149
  }
24024
24150
  function aheadOf(from, way, wall) {
24025
24151
  for (let t = 0; t <= WALL_GAP; t += LOOK_STEP) if (wallContains(wall, add(from, scale(way, t)))) return t;
@@ -24032,8 +24158,8 @@ function gapAt(doc, wall, end) {
24032
24158
  const { left, right } = wallSides(wall);
24033
24159
  const from = course.offset(at2, middleAcross(wall));
24034
24160
  const others = wallsOver(wallIndex(doc, wall.parent), from, WALL_GAP + wall.thickness).filter((other2) => other2.id !== wall.id);
24035
- const across = [from, wall[end], course.offset(at2, -left), course.offset(at2, right)];
24036
- if (others.some((other2) => across.some((p) => distToBody(p, other2) < GAP))) return null;
24161
+ const across2 = [from, wall[end], course.offset(at2, -left), course.offset(at2, right)];
24162
+ if (others.some((other2) => across2.some((p) => distToBody(p, other2) < GAP))) return null;
24037
24163
  const way = scale(course.dir(at2), end === "a" ? -1 : 1);
24038
24164
  const stopped = others.filter((other2) => {
24039
24165
  if (aheadOf(from, way, other2) !== null) return true;
@@ -24245,13 +24371,27 @@ var OpSchema = discriminatedUnion("op", [
24245
24371
  op: literal("set_document"),
24246
24372
  name: string2().optional(),
24247
24373
  info: record(string2(), string2().nullable()).optional(),
24248
- settings: object({ system: _enum(["metric", "imperial"]).nullable().optional(), decimal: _enum([".", ","]).nullable().optional() }).optional()
24374
+ settings: object({
24375
+ system: _enum(["metric", "imperial"]).nullable().optional(),
24376
+ decimal: _enum([".", ","]).nullable().optional(),
24377
+ titleBlock: object({ layout: _enum(["corner", "strip"]).optional(), labels: record(string2(), string2()).optional() }).nullable().optional()
24378
+ }).optional()
24249
24379
  }).describe(
24250
- 'Renames the document and/or changes what it says about itself ("info": project, client, address, author), shown in title blocks, and/or how it writes its numbers ("settings": system, decimal). In "info" and "settings" each key replaces that entry and a null or empty value removes it.'
24380
+ 'Renames the document and/or changes what it says about itself ("info": project, client, address, author), shown in title blocks, and/or how it writes its numbers and lays out its title blocks ("settings": system, decimal, titleBlock). In "info" and "settings" each key replaces that entry and a null or empty value removes it.'
24251
24381
  )
24252
24382
  ]);
24253
24383
  var OpError = class extends Error {
24254
24384
  };
24385
+ function titleLayout(value) {
24386
+ if (typeof value !== "object" || value === null || Array.isArray(value)) throw new OpError('The setting "titleBlock" is an object with "layout" and "labels".');
24387
+ const { layout: layout2, labels, ...rest } = value;
24388
+ const unknown2 = Object.keys(rest)[0];
24389
+ if (unknown2 !== void 0) throw new OpError(`Unknown title block setting "${unknown2}". Use layout or labels.`);
24390
+ if (layout2 !== void 0 && layout2 !== "corner" && layout2 !== "strip") throw new OpError(`The title block's layout is "corner" or "strip", not "${String(layout2)}".`);
24391
+ if (labels !== void 0 && (typeof labels !== "object" || labels === null || Array.isArray(labels) || Object.values(labels).some((text2) => typeof text2 !== "string")))
24392
+ throw new OpError(`The title block's labels are texts by entry, such as { "project": "Project" }.`);
24393
+ return { ...layout2 !== void 0 ? { layout: layout2 } : {}, ...labels !== void 0 ? { labels } : {} };
24394
+ }
24255
24395
  function parseOps(json) {
24256
24396
  const result = array(OpSchema).safeParse(json);
24257
24397
  if (!result.success) throw new OpError(`Invalid operations:
@@ -24545,10 +24685,16 @@ function applyOp(d, op, batch) {
24545
24685
  if (op.settings) {
24546
24686
  const settings = { ...d.settings };
24547
24687
  for (const [key, value] of Object.entries(op.settings)) {
24688
+ if (key === "titleBlock") {
24689
+ const block = value === null || value === void 0 ? {} : titleLayout(value);
24690
+ if (Object.keys(block).length > 0) settings[key] = block;
24691
+ else delete settings[key];
24692
+ continue;
24693
+ }
24548
24694
  const allowed = key === "system" ? ["metric", "imperial"] : key === "decimal" ? [".", ","] : null;
24549
- if (!allowed) throw new OpError(`Unknown drawing setting "${key}". Use system or decimal.`);
24695
+ if (!allowed) throw new OpError(`Unknown drawing setting "${key}". Use system, decimal or titleBlock.`);
24550
24696
  if (value === null || value === void 0) delete settings[key];
24551
- else if (!allowed.includes(value)) throw new OpError(`The setting "${key}" is ${allowed.map((one) => `"${one}"`).join(" or ")}, not "${value}".`);
24697
+ else if (typeof value !== "string" || !allowed.includes(value)) throw new OpError(`The setting "${key}" is ${allowed.map((one) => `"${one}"`).join(" or ")}, not "${String(value)}".`);
24552
24698
  else settings[key] = value;
24553
24699
  }
24554
24700
  if (Object.keys(settings).length > 0) d.settings = settings;
@@ -25001,9 +25147,9 @@ function inflate(data, size) {
25001
25147
  let code = 0;
25002
25148
  let first = 0;
25003
25149
  let index = 0;
25004
- for (let length = 1; length < 16; length++) {
25150
+ for (let length2 = 1; length2 < 16; length2++) {
25005
25151
  code |= bits(1);
25006
- const count2 = table.count[length];
25152
+ const count2 = table.count[length2];
25007
25153
  if (code - count2 < first) return table.symbol[index + (code - first)];
25008
25154
  index += count2;
25009
25155
  first = first + count2 << 1;
@@ -25023,11 +25169,11 @@ function inflate(data, size) {
25023
25169
  if (type === 0) {
25024
25170
  held = 0;
25025
25171
  bitsHeld = 0;
25026
- const length = data[pos] | data[pos + 1] << 8;
25172
+ const length2 = data[pos] | data[pos + 1] << 8;
25027
25173
  pos += 4;
25028
- out.set(data.subarray(pos, pos + length), at2);
25029
- at2 += length;
25030
- pos += length;
25174
+ out.set(data.subarray(pos, pos + length2), at2);
25175
+ at2 += length2;
25176
+ pos += length2;
25031
25177
  continue;
25032
25178
  }
25033
25179
  if (type === 3) throw new Error("The picture is damaged.");
@@ -25057,10 +25203,10 @@ function inflate(data, size) {
25057
25203
  out[at2++] = symbol;
25058
25204
  continue;
25059
25205
  }
25060
- const length = LENGTH_BASE[symbol - 257] + bits(LENGTH_EXTRA[symbol - 257]);
25206
+ const length2 = LENGTH_BASE[symbol - 257] + bits(LENGTH_EXTRA[symbol - 257]);
25061
25207
  const code = decode3(tables.distances);
25062
25208
  const back = DIST_BASE[code] + bits(DIST_EXTRA[code]);
25063
- for (let k = 0; k < length; k++, at2++) out[at2] = out[at2 - back];
25209
+ for (let k = 0; k < length2; k++, at2++) out[at2] = out[at2 - back];
25064
25210
  }
25065
25211
  }
25066
25212
  return out;
@@ -25077,9 +25223,9 @@ function decodePng(file) {
25077
25223
  let opacity = null;
25078
25224
  const data = [];
25079
25225
  for (let i = 8; i + 8 <= file.length; ) {
25080
- const length = u32(i);
25226
+ const length2 = u32(i);
25081
25227
  const type = String.fromCharCode(file[i + 4], file[i + 5], file[i + 6], file[i + 7]);
25082
- const body = file.subarray(i + 8, i + 8 + length);
25228
+ const body = file.subarray(i + 8, i + 8 + length2);
25083
25229
  if (type === "IHDR") {
25084
25230
  width = u32(i + 8);
25085
25231
  height = u32(i + 12);
@@ -25090,7 +25236,7 @@ function decodePng(file) {
25090
25236
  else if (type === "tRNS") opacity = body;
25091
25237
  else if (type === "IDAT") data.push(body);
25092
25238
  else if (type === "IEND") break;
25093
- i += 12 + length;
25239
+ i += 12 + length2;
25094
25240
  }
25095
25241
  if (!width || !height || data.length === 0) return null;
25096
25242
  const channels = [1, 0, 3, 1, 2, 0, 4][colour2];
@@ -25367,7 +25513,7 @@ function dxfOps(doc, parent, text2, options = {}) {
25367
25513
  const layerRows = tables.filter((row) => row.type === "LAYER");
25368
25514
  const layerRow = new Map(layerRows.map((row) => [first(row, 2) ?? "", row]));
25369
25515
  const layerOfHandle = new Map(layerRows.map((row) => [first(row, 5) ?? "", first(row, 2) ?? ""]));
25370
- const dashes = new Map(tables.filter((row) => row.type === "LTYPE").map((row) => [(first(row, 2) ?? "").toUpperCase(), (row.codes.get(49) ?? []).map((length) => Math.abs(parseFloat(length)))]));
25516
+ const dashes = new Map(tables.filter((row) => row.type === "LTYPE").map((row) => [(first(row, 2) ?? "").toUpperCase(), (row.codes.get(49) ?? []).map((length2) => Math.abs(parseFloat(length2)))]));
25371
25517
  const styles = new Map(
25372
25518
  tables.filter((row) => row.type === "STYLE").map((row) => {
25373
25519
  const family = first(row, 1e3) ?? (first(row, 3) ?? "").replace(/\.(ttf|ttc|otf|shx)$/i, "");
@@ -25439,7 +25585,7 @@ function dxfOps(doc, parent, text2, options = {}) {
25439
25585
  const strokeWidth = weight(entity, ctx);
25440
25586
  const kind = (first(entity, 6) ?? "").toUpperCase();
25441
25587
  const onPaper = number3(entity, 48, 1) * growth(ctx.m) / sheetScale.n / unit;
25442
- const dash = dashes.get(kind)?.length ? dashes.get(kind).map((length) => Math.max(1, round2(length * onPaper * 4))) : kind && !["BYLAYER", "BYBLOCK", "CONTINUOUS"].includes(kind) ? [6, 4] : void 0;
25588
+ const dash = dashes.get(kind)?.length ? dashes.get(kind).map((length2) => Math.max(1, round2(length2 * onPaper * 4))) : kind && !["BYLAYER", "BYBLOCK", "CONTINUOUS"].includes(kind) ? [6, 4] : void 0;
25443
25589
  return { ...stroke ? { stroke } : {}, ...strokeWidth ? { strokeWidth } : {}, ...dash ? { dash } : {} };
25444
25590
  };
25445
25591
  const styled = (node2, style) => Object.keys(style).length ? { ...node2, style } : node2;
@@ -25560,11 +25706,11 @@ function dxfOps(doc, parent, text2, options = {}) {
25560
25706
  const patternOf = (families, ctx, stroke) => {
25561
25707
  const lines2 = families.filter((family) => family.gap > 0);
25562
25708
  if (lines2.length === 0) return void 0;
25563
- const across = lines2.filter((family) => Math.abs(Math.cos((family.angle - lines2[0].angle) * Math.PI / 180)) < 0.1);
25564
- const along2 = lines2.filter((family) => !across.includes(family));
25709
+ const across2 = lines2.filter((family) => Math.abs(Math.cos((family.angle - lines2[0].angle) * Math.PI / 180)) < 0.1);
25710
+ const along2 = lines2.filter((family) => !across2.includes(family));
25565
25711
  const gap = (set) => Math.min(...set.map((family) => family.gap)) / set.length;
25566
- const grid = across.length > 0 && Math.max(gap(along2), gap(across)) < 2 * Math.min(gap(along2), gap(across));
25567
- const main2 = across.length > 0 && gap(across) < gap(along2) ? across : along2;
25712
+ const grid = across2.length > 0 && Math.max(gap(along2), gap(across2)) < 2 * Math.min(gap(along2), gap(across2));
25713
+ const main2 = across2.length > 0 && gap(across2) < gap(along2) ? across2 : along2;
25568
25714
  const angle = heading(ctx.m, main2[0].angle) % (grid ? 90 : 180);
25569
25715
  const fine = gap(main2) * growth(ctx.m) < 0.3 * sheetScale.n;
25570
25716
  return { kind: grid ? angle === 0 ? "Tiles" : "Cross" : "Lines", spacing: Math.max(0.1, round2(gap(main2) * (fine ? unit * sheetScale.n : growth(ctx.m)))), angle, stroke };
@@ -25675,17 +25821,17 @@ function dxfOps(doc, parent, text2, options = {}) {
25675
25821
  };
25676
25822
  const picture = (entity, ctx) => {
25677
25823
  const held = asset(pictures.get(first(entity, 340) ?? ""));
25678
- const [wide, high] = [number3(entity, 13), number3(entity, 23)];
25679
- if (!held || wide <= 0 || high <= 0) return null;
25824
+ const [wide, high2] = [number3(entity, 13), number3(entity, 23)];
25825
+ if (!held || wide <= 0 || high2 <= 0) return null;
25680
25826
  const [p, u, v] = [{ x: number3(entity, 10), y: number3(entity, 20) }, { x: number3(entity, 11), y: number3(entity, 21) }, { x: number3(entity, 12), y: number3(entity, 22) }];
25681
- const pixel = (x, y) => at(ctx.m, p.x + u.x * x + v.x * (high - y), p.y + u.y * x + v.y * (high - y));
25682
- const [corner, right, below] = [pixel(0, 0), pixel(wide, 0), pixel(0, high)];
25827
+ const pixel = (x, y) => at(ctx.m, p.x + u.x * x + v.x * (high2 - y), p.y + u.y * x + v.y * (high2 - y));
25828
+ const [corner, right, below] = [pixel(0, 0), pixel(wide, 0), pixel(0, high2)];
25683
25829
  const rotation2 = turn(Math.atan2(right.y - corner.y, right.x - corner.x) * 180 / Math.PI);
25684
25830
  const node2 = { type: "image", asset: held.id, x: corner.x, y: corner.y, width: round2(dist(corner, right)), height: round2(dist(corner, below)), ...rotation2 ? { rotation: rotation2 } : {} };
25685
25831
  if (number3(entity, 280) === 1) {
25686
25832
  const [xs, ys] = [(entity.codes.get(14) ?? []).map((x) => parseFloat(x) + 0.5), (entity.codes.get(24) ?? []).map((y) => parseFloat(y) + 0.5)];
25687
- const [left, top, far, bottom] = [Math.max(0, Math.min(...xs)), Math.max(0, Math.min(...ys)), Math.min(wide, Math.max(...xs)), Math.min(high, Math.max(...ys))];
25688
- if (xs.length > 1 && (left > 0.5 || top > 0.5 || far < wide - 0.5 || bottom < high - 0.5)) {
25833
+ const [left, top, far, bottom] = [Math.max(0, Math.min(...xs)), Math.max(0, Math.min(...ys)), Math.min(wide, Math.max(...xs)), Math.min(high2, Math.max(...ys))];
25834
+ if (xs.length > 1 && (left > 0.5 || top > 0.5 || far < wide - 0.5 || bottom < high2 - 0.5)) {
25689
25835
  const from = pixel(left, top);
25690
25836
  node2.modifiers = [{ type: "crop", frame: { x: from.x, y: from.y, ...rotation2 ? { rotation: rotation2 } : {} }, params: { width: round2(dist(from, pixel(far, top))), height: round2(dist(from, pixel(left, bottom))) } }];
25691
25837
  }
@@ -25861,9 +26007,9 @@ function dxfOps(doc, parent, text2, options = {}) {
25861
26007
  continue;
25862
26008
  }
25863
26009
  if (!windows.includes(entity)) continue;
25864
- const [wide, high, shrink] = [number3(entity, 40), number3(entity, 41), ratio(entity)];
26010
+ const [wide, high2, shrink] = [number3(entity, 40), number3(entity, 41), ratio(entity)];
25865
26011
  const seen = mul(shift(number3(entity, 10), number3(entity, 20)), mul([shrink, 0, 0, shrink, 0, 0], mul(shift(-number3(entity, 12), -number3(entity, 22)), mul(turned2(number3(entity, 51)), shift(-number3(entity, 17), -number3(entity, 27))))));
25866
- const corners = [at(onPaper, number3(entity, 10) - wide / 2, number3(entity, 20) + high / 2), at(onPaper, number3(entity, 10) + wide / 2, number3(entity, 20) - high / 2)];
26012
+ const corners = [at(onPaper, number3(entity, 10) - wide / 2, number3(entity, 20) + high2 / 2), at(onPaper, number3(entity, 10) + wide / 2, number3(entity, 20) - high2 / 2)];
25867
26013
  const box = { minX: Math.max(corners[0].x, hasPaper ? 0 : -Infinity), minY: Math.max(corners[0].y, hasPaper ? 0 : -Infinity), maxX: Math.min(corners[1].x, hasPaper ? size[0] * n3 : Infinity), maxY: Math.min(corners[1].y, hasPaper ? size[1] * n3 : Infinity) };
25868
26014
  if (box.maxX <= box.minX || box.maxY <= box.minY) continue;
25869
26015
  const frozen = new Set((entity.codes.get(331) ?? []).map((handle) => layerOfHandle.get(handle) ?? ""));
@@ -25939,9 +26085,10 @@ function drawingGuide(registry3, { pictures = true, schema: schema3 = true } = {
25939
26085
  kind: k.kind,
25940
26086
  what: k.description ? `${k.label}. ${k.description}` : k.label,
25941
26087
  props: Object.fromEntries(k.params.map((p) => [p.key, `${p.options ? `one of ${p.options.join(" | ")}` : p.type}${p.unit === "length" ? " in mm" : p.unit === "angle" ? " in degrees" : ""} (default ${p.default})`])),
25942
- cutsWalls: Boolean(k.opening),
25943
- fixedOnWall: k.mount?.on === "wall" ? { back: k.mount.back ?? 0, out: k.mount.out ?? "down", height: k.mount.height } : void 0,
25944
- againstWall: k.mount?.on === "floor" ? { back: k.mount.back ?? 0, out: k.mount.out ?? "down" } : void 0,
26088
+ // Only what is not the usual, so that sixty kinds stay well within what a client takes from a tool.
26089
+ cutsWalls: k.opening ? true : void 0,
26090
+ fixedOnWall: k.mount?.on === "wall" ? { back: k.mount.back || void 0, out: k.mount.out === "up" ? "up" : void 0, height: k.mount.height } : void 0,
26091
+ againstWall: k.mount?.on === "floor" ? { back: k.mount.back || void 0, out: k.mount.out === "up" ? "up" : void 0 } : void 0,
25945
26092
  ports: portsOfKind(k)
25946
26093
  }));
25947
26094
  return `# How a drawing is stored
@@ -25970,7 +26117,7 @@ ${JSON.stringify(kinds)}
25970
26117
 
25971
26118
  Kinds with "cutsWalls" are doors and windows. One cuts an opening when it lies on a wall: put its insertion point (x, y) in the middle of the wall's thickness (on its line for a wall without "justify", half its thickness off it towards the wall otherwise) and set its rotation to the wall's direction, the angle from the wall's "a" to "b". The opening then runs along the wall from the insertion point for its width. It adapts to the wall's thickness by itself, and moves with the wall only by being on it.
25972
26119
 
25973
- Kinds with "fixedOnWall" (sockets, switches, wall lights) are fixed on a face of a wall, and follow the wall when it changes only while they are exactly on it. Their own point (0, back) lies on the face, their own X along it, and they stand out of the wall into the room towards their own +Y, or -Y when "out" is "up". For a wall whose direction from "a" to "b" is the angle \u03B8, that is rotation \u03B8 on its right face (the face to the right as it runs from a to b, at +90\xB0 from its direction since Y grows downward) and \u03B8 + 180 on its left face, adding 180 to either when "out" is "up"; then place the insertion point so that (0, back) turned by that rotation lands on the face. "z" on such an object is its height above the floor in mm, to its centre; left out, it is the "height" given. Kinds with "againstWall" (kitchen units, a fridge, a washbasin) stand on the floor with their back against a face, placed by the same rule, and have no height above the floor.
26120
+ Kinds with "fixedOnWall" (sockets, switches, wall lights) are fixed on a face of a wall, and follow the wall when it changes only while they are exactly on it. Their own point (0, back) lies on the face, "back" being 0 when not given, their own X along it, and they stand out of the wall into the room towards their own +Y, or -Y when "out" is "up". For a wall whose direction from "a" to "b" is the angle \u03B8, that is rotation \u03B8 on its right face (the face to the right as it runs from a to b, at +90\xB0 from its direction since Y grows downward) and \u03B8 + 180 on its left face, adding 180 to either when "out" is "up"; then place the insertion point so that (0, back) turned by that rotation lands on the face. "z" on such an object is its height above the floor in mm, to its centre; left out, it is the "height" given. Kinds with "againstWall" (kitchen units, a fridge, a washbasin) stand on the floor with their back against a face, placed by the same rule. Anything else, and a placement of a component, stands on the floor too unless given "z", the height of its underside above the floor in mm (a raised unit, a shelf, a mirror), which elevations draw it at.
25974
26121
 
25975
26122
  A "group" holds several nodes so they are selected, moved and stacked as one. It has no coordinates of its own: to group nodes, add a group and set their "parent" to its id; to move a group, move the nodes inside it. Its "opacity" (0 to 1, 1 when left out) makes everything inside it see-through.
25976
26123
 
@@ -25986,7 +26133,7 @@ A "link" joins two objects of the same page by their ids, "from" and "to", throu
25986
26133
 
25987
26134
  An elevation or a section is two nodes: a "viewline" on the plan (a to b, and depth), which says what is seen, and an "elevation" that refers to it by "line" and says where its view is drawn (x, y, on any page). For an elevation of a wall's face, put the viewline 1000 in front of the face, with depth 1000, running so that the face is on its left (seen from its right); add the viewline before its view. Removing a viewline removes its views.
25988
26135
 
25989
- A "paper" is a sheet laid over the drawing that frames what goes on one printed page. Its width and height are in drawing millimetres: the sheet's real size times its "scale" (an A3 lying at 1:100 is 42000 \xD7 29700). It has no children; whatever lies inside its rectangle is on it. Give it "titleBlock": {} (optionally with "project", "author", "date", "number") for a border and a title block; the person exports papers to PDF at their true scale from the File menu.
26136
+ A "paper" is a sheet laid over the drawing that frames what goes on one printed page. Its width and height are in drawing millimetres: the sheet's real size times its "scale" (an A3 lying at 1:100 is 42000 \xD7 29700; an ARCH D, 24 \xD7 36 inches, lying at 1:48 is 43891.2 \xD7 29260.8). It has no children; whatever lies inside its rectangle is on it. Give it "titleBlock": {} (optionally with "project", "author", "date", "number") for a border and a title block in its bottom right corner. The drawing's settings put the block of every sheet down its right edge instead, with captions, as on US sheets: set_document with "settings": { "titleBlock": { "layout": "strip" } }; each sheet then lists its own "revisions" in its "titleBlock", one per line as "mark | date | description". The person exports papers to PDF at their true scale from the File menu.
25990
26137
 
25991
26138
  A "dimension" shows the distance between "a" and "b"; "offset" is how far its line stands off them. An "annotation" is a note with a leader from the tip "a" to the text at "b". Texts may hold fields that are filled in when drawn: {date}, {page}, {page-number}, {pages}, {document}.
25992
26139
 
@@ -25998,7 +26145,7 @@ Call apply_operations with a list of operations:
25998
26145
  - update_node: {"op":"update_node","id":"...","patch":{...}}. The patch replaces the properties it names; a null value removes a property. Nested objects such as "a", "props" and "style" are replaced whole, so include every field of the one you change. Setting "parent" or "order" moves the node.
25999
26146
  - remove_node: {"op":"remove_node","id":"..."}. It takes along everything inside the node; removing a component also removes its instances, and removing an object the links that join it to others.
26000
26147
  - add_layer, update_layer, remove_layer; add_color, update_color, remove_color; add_dimension_style, update_dimension_style, remove_dimension_style, as described above.
26001
- - set_document: renames the drawing, and with "info" sets its project, client, address and author, which every sheet's title block shows.
26148
+ - set_document: renames the drawing, and with "info" sets its project, client, address and author, which every sheet's title block shows; with "settings" sets how it writes its numbers ("system", "decimal") and lays out its title blocks ("titleBlock").
26002
26149
  - add_asset embeds a picture's file for an image node; it is for the app's own imports, and you will not need it.
26003
26150
 
26004
26151
  ${CHECKING}${pictures ? ` ${LOOKING}` : ""}`;
@@ -26053,8 +26200,8 @@ function readTrueType(bytes) {
26053
26200
  const record2 = at2 + 6 + i * 12;
26054
26201
  if (data.getUint16(record2 + 6) !== 6) continue;
26055
26202
  const platform = data.getUint16(record2);
26056
- const [length, offset] = [data.getUint16(record2 + 8), strings + data.getUint16(record2 + 10)];
26057
- const text2 = platform === 1 ? String.fromCharCode(...bytes.subarray(offset, offset + length)) : String.fromCharCode(...Array.from({ length: length / 2 }, (_, k) => data.getUint16(offset + 2 * k)));
26203
+ const [length2, offset] = [data.getUint16(record2 + 8), strings + data.getUint16(record2 + 10)];
26204
+ const text2 = platform === 1 ? String.fromCharCode(...bytes.subarray(offset, offset + length2)) : String.fromCharCode(...Array.from({ length: length2 / 2 }, (_, k) => data.getUint16(offset + 2 * k)));
26058
26205
  const clean = text2.replace(/[^A-Za-z0-9-]/g, "");
26059
26206
  if (clean) return clean;
26060
26207
  }
@@ -26084,7 +26231,7 @@ function readTrueType(bytes) {
26084
26231
  outlines2.push(copy);
26085
26232
  }
26086
26233
  const count2 = order.length;
26087
- const padded = (length) => length + 3 & ~3;
26234
+ const padded = (length2) => length2 + 3 & ~3;
26088
26235
  const glyfOut = new Uint8Array(outlines2.reduce((sum, o) => sum + padded(o.length), 0));
26089
26236
  const locaOut = new DataView(new ArrayBuffer(4 * (count2 + 1)));
26090
26237
  let offset = 0;
@@ -26134,11 +26281,11 @@ function characterMap(data, cmap) {
26134
26281
  const known = /* @__PURE__ */ new Map();
26135
26282
  const find = (code) => {
26136
26283
  if (full >= 0) {
26137
- let [low2, high2] = [0, data.getUint32(full + 12) - 1];
26138
- while (low2 <= high2) {
26139
- const middle = low2 + high2 >> 1;
26284
+ let [low2, high3] = [0, data.getUint32(full + 12) - 1];
26285
+ while (low2 <= high3) {
26286
+ const middle = low2 + high3 >> 1;
26140
26287
  const group = full + 16 + middle * 12;
26141
- if (code < data.getUint32(group)) high2 = middle - 1;
26288
+ if (code < data.getUint32(group)) high3 = middle - 1;
26142
26289
  else if (code > data.getUint32(group + 4)) low2 = middle + 1;
26143
26290
  else return data.getUint32(group + 8) + code - data.getUint32(group);
26144
26291
  }
@@ -26150,11 +26297,11 @@ function characterMap(data, cmap) {
26150
26297
  const starts = ends + 2 * segments + 2;
26151
26298
  const deltas = starts + 2 * segments;
26152
26299
  const ranges = deltas + 2 * segments;
26153
- let [low, high] = [0, segments - 1];
26154
- while (low < high) {
26155
- const middle = low + high >> 1;
26300
+ let [low, high2] = [0, segments - 1];
26301
+ while (low < high2) {
26302
+ const middle = low + high2 >> 1;
26156
26303
  if (data.getUint16(ends + 2 * middle) < code) low = middle + 1;
26157
- else high = middle;
26304
+ else high2 = middle;
26158
26305
  }
26159
26306
  const start = data.getUint16(starts + 2 * low);
26160
26307
  if (code < start || code > data.getUint16(ends + 2 * low)) return 0;
@@ -26171,13 +26318,13 @@ function characterMap(data, cmap) {
26171
26318
  }
26172
26319
  function writeFont(tables) {
26173
26320
  tables.sort(([a], [b]) => a < b ? -1 : 1);
26174
- const padded = (length) => length + 3 & ~3;
26321
+ const padded = (length2) => length2 + 3 & ~3;
26175
26322
  const directory = 12 + 16 * tables.length;
26176
26323
  const file = new Uint8Array(directory + tables.reduce((sum, [, body]) => sum + padded(body.length), 0));
26177
26324
  const view = new DataView(file.buffer);
26178
- const checksum = (from, length) => {
26325
+ const checksum = (from, length2) => {
26179
26326
  let sum = 0;
26180
- for (let at2 = from; at2 < from + padded(length); at2 += 4) sum = sum + view.getUint32(at2) >>> 0;
26327
+ for (let at2 = from; at2 < from + padded(length2); at2 += 4) sum = sum + view.getUint32(at2) >>> 0;
26181
26328
  return sum;
26182
26329
  };
26183
26330
  const selector = Math.floor(Math.log2(tables.length));
@@ -26342,11 +26489,11 @@ function jpegInfo(bytes) {
26342
26489
  for (let i = 2; i + 9 < bytes.length; ) {
26343
26490
  if (bytes[i] !== 255) return null;
26344
26491
  const marker2 = bytes[i + 1];
26345
- const length = bytes[i + 2] << 8 | bytes[i + 3];
26492
+ const length2 = bytes[i + 2] << 8 | bytes[i + 3];
26346
26493
  if (marker2 >= 192 && marker2 <= 207 && marker2 !== 196 && marker2 !== 200 && marker2 !== 204) {
26347
26494
  return { height: bytes[i + 5] << 8 | bytes[i + 6], width: bytes[i + 7] << 8 | bytes[i + 8], channels: bytes[i + 9] };
26348
26495
  }
26349
- i += 2 + length;
26496
+ i += 2 + length2;
26350
26497
  }
26351
26498
  return null;
26352
26499
  }
@@ -26442,12 +26589,12 @@ function pageContent(doc, paper, registry3, resources) {
26442
26589
  }
26443
26590
  }
26444
26591
  if (index !== void 0) {
26445
- const across = rotate({ x: prim.width, y: 0 }, prim.rotation ?? 0);
26592
+ const across2 = rotate({ x: prim.width, y: 0 }, prim.rotation ?? 0);
26446
26593
  const down = rotate({ x: 0, y: prim.height }, prim.rotation ?? 0);
26447
26594
  const x = (prim.x + down.x - paper.x) * perMm;
26448
26595
  const y = height - (prim.y + down.y - paper.y) * perMm;
26449
26596
  alpha(prim.opacity ?? 1, 1);
26450
- out.push(`${n2(across.x * perMm)} ${n2(-across.y * perMm)} ${n2(-down.x * perMm)} ${n2(down.y * perMm)} ${n2(x)} ${n2(y)} cm /Im${index + 1} Do`);
26597
+ out.push(`${n2(across2.x * perMm)} ${n2(-across2.y * perMm)} ${n2(-down.x * perMm)} ${n2(down.y * perMm)} ${n2(x)} ${n2(y)} cm /Im${index + 1} Do`);
26451
26598
  }
26452
26599
  } else {
26453
26600
  const filled = fill ? parseColor(prim.fill) : null;
@@ -26516,15 +26663,15 @@ function toPDF(doc, registry3, paperIds, options = {}) {
26516
26663
  return [`<< /Type /Page /Parent 2 0 R /MediaBox [0 0 ${n2(page.width)} ${n2(page.height)}] /Resources ${shared} /Contents ${firstPage + i * 2 + 1} 0 R >>`, [`<< /Length ${commands.length} >>`, commands]];
26517
26664
  })
26518
26665
  ];
26519
- let length = 0;
26666
+ let length2 = 0;
26520
26667
  const offsets = [];
26521
26668
  const write = (part) => {
26522
26669
  chunks.push(part);
26523
- length += part.length;
26670
+ length2 += part.length;
26524
26671
  };
26525
26672
  write("%PDF-1.4\n%\xE2\xE3\xCF\xD3\n");
26526
26673
  objects.forEach((object3, i) => {
26527
- offsets.push(length);
26674
+ offsets.push(length2);
26528
26675
  write(`${i + 1} 0 obj
26529
26676
  `);
26530
26677
  if (typeof object3 === "string") write(`${object3}
@@ -26538,7 +26685,7 @@ stream
26538
26685
  }
26539
26686
  write("endobj\n");
26540
26687
  });
26541
- const table = length;
26688
+ const table = length2;
26542
26689
  write(`xref
26543
26690
  0 ${objects.length + 1}
26544
26691
  0000000000 65535 f
@@ -26550,7 +26697,7 @@ startxref
26550
26697
  ${table}
26551
26698
  %%EOF
26552
26699
  `);
26553
- const file = new Uint8Array(length);
26700
+ const file = new Uint8Array(length2);
26554
26701
  let at2 = 0;
26555
26702
  for (const chunk of chunks) {
26556
26703
  if (typeof chunk === "string") for (let i = 0; i < chunk.length; i++) file[at2++] = chunk.charCodeAt(i) & 255;
@@ -26790,12 +26937,55 @@ function withViewLines(doc) {
26790
26937
  }
26791
26938
  return { ...doc, nodes };
26792
26939
  }
26940
+ var OFFICE_CHAIR = "arch.officechair";
26941
+ var length = (value, fallback, least) => Math.max(least, typeof value === "number" && Number.isFinite(value) ? value : fallback);
26942
+ function withOfficeChairs(doc) {
26943
+ if (!isPlain2(doc.nodes) || !Object.values(doc.nodes).some((node2) => isPlain2(node2) && deskDrewChair(node2))) return doc;
26944
+ const nodes = { ...doc.nodes };
26945
+ const orders = /* @__PURE__ */ new Map();
26946
+ for (const node2 of Object.values(nodes)) {
26947
+ if (isPlain2(node2) && typeof node2.order === "string" && isOrderKey(node2.order)) orders.set(node2.parent, [...orders.get(node2.parent) ?? [], node2.order]);
26948
+ }
26949
+ for (const [key, desk2] of Object.entries(doc.nodes)) {
26950
+ if (!isPlain2(desk2) || !deskDrewChair(desk2)) continue;
26951
+ const props = isPlain2(desk2.props) ? desk2.props : {};
26952
+ nodes[key] = { ...desk2, props: { ...props, chair: false } };
26953
+ const place = { x: typeof desk2.x === "number" ? desk2.x : 0, y: typeof desk2.y === "number" ? desk2.y : 0, rotation: typeof desk2.rotation === "number" ? desk2.rotation : 0, flipX: desk2.flipX === true };
26954
+ const at2 = applyTransform({ x: length(props.width, 1400, 600) / 2 + 330, y: length(props.depth, 700, 400) + 750 }, place);
26955
+ let order;
26956
+ if (typeof desk2.order === "string" && isOrderKey(desk2.order)) {
26957
+ const above = (orders.get(desk2.parent) ?? []).filter((other) => other > desk2.order).sort()[0] ?? null;
26958
+ order = generateKeyBetween(desk2.order, above);
26959
+ orders.set(desk2.parent, [...orders.get(desk2.parent) ?? [], order]);
26960
+ }
26961
+ let id = `${typeof desk2.id === "string" ? desk2.id : key}_chair`;
26962
+ while (id in nodes) id = `${id}_`;
26963
+ nodes[id] = {
26964
+ id,
26965
+ type: "parametric",
26966
+ parent: desk2.parent,
26967
+ ...order ? { order } : {},
26968
+ ..."layer" in desk2 ? { layer: desk2.layer } : {},
26969
+ ...desk2.visible === false ? { visible: false } : {},
26970
+ ...desk2.locked === true ? { locked: true } : {},
26971
+ kind: OFFICE_CHAIR,
26972
+ props: {},
26973
+ x: at2.x,
26974
+ y: at2.y,
26975
+ rotation: ((place.rotation + 180) % 360 + 360) % 360,
26976
+ ...place.flipX ? { flipX: true } : {}
26977
+ };
26978
+ }
26979
+ return { ...doc, nodes };
26980
+ }
26793
26981
  var MIGRATIONS = [
26794
26982
  (doc) => toVersion2(withoutWallTypes(doc)),
26795
26983
  // Version 3 brings elevations and sections (the `viewline` and `elevation` node types) and nothing that changes what was there.
26796
26984
  (doc) => doc,
26797
26985
  // Version 4 brings links between objects (the `link` node type): a switch and the lights it controls. Nothing else changes.
26798
- (doc) => doc
26986
+ (doc) => doc,
26987
+ // Version 5: a desk's office chair is an object of its own.
26988
+ withOfficeChairs
26799
26989
  ];
26800
26990
 
26801
26991
  // packages/core/src/repair.ts
@@ -27271,6 +27461,9 @@ async function runDrawingTool(name, given, host2) {
27271
27461
  }
27272
27462
  }
27273
27463
 
27464
+ // packages/core/src/elevation-grips.ts
27465
+ var ALONG = Math.SQRT1_2 - 1e-9;
27466
+
27274
27467
  // packages/ext-architecture/src/shared.ts
27275
27468
  var THIN2 = { strokeWidth: 0.5 };
27276
27469
  var HEAVY = { strokeWidth: 2 };
@@ -27400,12 +27593,20 @@ function boxSide(depth, height, front = FRONT) {
27400
27593
  var COUNTER_TOP = 850;
27401
27594
  var COUNTER = 30;
27402
27595
  var VANITY_FOOT = 300;
27403
- function washbasinFront(w, bowls, below) {
27596
+ var VANITY_LEGS = 150;
27597
+ var vanityFoot = (feet2) => feet2 ? VANITY_LEGS : VANITY_FOOT;
27598
+ var vanityLegs = (w) => {
27599
+ const leg = Math.min(40, w / 8);
27600
+ const inset = Math.min(30, w / 10);
27601
+ return [rect(inset, 0, inset + leg, -VANITY_LEGS), rect(w - inset - leg, 0, w - inset, -VANITY_LEGS)];
27602
+ };
27603
+ function washbasinFront(w, bowls, below, feet2) {
27404
27604
  const n3 = Math.min(MAX_BOWLS, count(bowls));
27405
27605
  const share = w / n3;
27406
27606
  const prims = [rect(0, -COUNTER_TOP + COUNTER, w, -COUNTER_TOP)];
27407
27607
  if (below === "Drawers" || below === "Doors") {
27408
- prims.push(rect(0, -VANITY_FOOT, w, -COUNTER_TOP + COUNTER, THIN2), ...frontsOf(below, 0, w, -VANITY_FOOT, -COUNTER_TOP + COUNTER, w > 900 ? 2 : 1, 2));
27608
+ prims.push(rect(0, -vanityFoot(feet2), w, -COUNTER_TOP + COUNTER, THIN2), ...frontsOf(below, 0, w, -vanityFoot(feet2), -COUNTER_TOP + COUNTER, w > 900 ? 2 : 1, 2));
27609
+ if (feet2) prims.push(...vanityLegs(w));
27409
27610
  }
27410
27611
  for (let i = 0; i < n3; i++) {
27411
27612
  const cx = (i + 0.5) * share;
@@ -27415,9 +27616,12 @@ function washbasinFront(w, bowls, below) {
27415
27616
  }
27416
27617
  return prims;
27417
27618
  }
27418
- function washbasinSide(d, below) {
27619
+ function washbasinSide(d, below, feet2) {
27419
27620
  const prims = [rect(0, -COUNTER_TOP + COUNTER, d, -COUNTER_TOP), line([pt(60, -COUNTER_TOP), pt(60, -COUNTER_TOP - 180), pt(160, -COUNTER_TOP - 180), pt(160, -COUNTER_TOP - 140)], { strokeWidth: 1.5 })];
27420
- if (below === "Drawers" || below === "Doors") prims.push(rect(0, -VANITY_FOOT, Math.max(40, d - 20), -COUNTER_TOP + COUNTER, THIN2));
27621
+ if (below === "Drawers" || below === "Doors") {
27622
+ prims.push(rect(0, -vanityFoot(feet2), Math.max(40, d - 20), -COUNTER_TOP + COUNTER, THIN2));
27623
+ if (feet2) prims.push(...vanityLegs(Math.max(40, d - 20)));
27624
+ }
27421
27625
  return prims;
27422
27626
  }
27423
27627
  var MIN_COUNTER = 300;
@@ -27425,15 +27629,17 @@ var washbasin = (kind, label, width, depth, bowls) => ({
27425
27629
  kind,
27426
27630
  label,
27427
27631
  category: "bathroom",
27428
- description: "A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.",
27632
+ description: "A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.",
27429
27633
  params: [
27430
27634
  { ...WIDTH, default: width },
27431
27635
  { key: "depth", label: "Depth", type: "number", default: depth, unit: "length" },
27432
27636
  { key: "bowls", label: "Bowls", type: "number", default: bowls },
27433
- { key: "below", label: "Below", type: "string", default: "None", options: ["None", "Drawers", "Doors"] }
27637
+ { key: "below", label: "Below", type: "string", default: "None", options: ["None", "Drawers", "Doors"] },
27638
+ // The vanity unit under it, hung on the wall (as most are) or standing on feet.
27639
+ { key: "feet", label: "On feet", type: "boolean", default: false }
27434
27640
  ],
27435
- front: ({ width: width2, bowls: bowls2, below }) => washbasinFront(atLeast(1, width2), bowls2, below),
27436
- side: ({ depth: depth2, below }) => washbasinSide(atLeast(1, depth2), below),
27641
+ front: ({ width: width2, bowls: bowls2, below, feet: feet2 }) => washbasinFront(atLeast(1, width2), bowls2, below, feet2 === true),
27642
+ side: ({ depth: depth2, below, feet: feet2 }) => washbasinSide(atLeast(1, depth2), below, feet2 === true),
27437
27643
  box: {
27438
27644
  bounds: ({ width: width2, depth: depth2 }) => ({ left: 0, top: 0, right: atLeast(1, width2), bottom: atLeast(1, depth2) }),
27439
27645
  resize: (_, size) => ({
@@ -27465,6 +27671,155 @@ var washbasin = (kind, label, width, depth, bowls) => ({
27465
27671
  return prims;
27466
27672
  }
27467
27673
  });
27674
+ function bowl(cx, cy, halfWidth, back, front, square = 5) {
27675
+ return Array.from({ length: 72 }, (_, i) => {
27676
+ const t = i / 72 * 2 * Math.PI;
27677
+ const [c, s] = [Math.cos(t), Math.sin(t)];
27678
+ const power = (v, n4) => Math.sign(v) * Math.abs(v) ** (2 / n4);
27679
+ const n3 = s < 0 ? square : 2.2;
27680
+ return pt(cx + halfWidth * power(c, n3), cy + (s < 0 ? back : front) * power(s, n3));
27681
+ });
27682
+ }
27683
+ function across(outline2, y) {
27684
+ const xs = outline2.flatMap((p, i) => {
27685
+ const q = outline2[(i + 1) % outline2.length];
27686
+ return (p.y - y) * (q.y - y) <= 0 && p.y !== q.y ? [p.x + (y - p.y) * (q.x - p.x) / (q.y - p.y)] : [];
27687
+ });
27688
+ return xs.length > 0 ? [Math.min(...xs), Math.max(...xs)] : [0, 0];
27689
+ }
27690
+ var SEAT = 420;
27691
+ var CISTERN_TOP = 800;
27692
+ var HUNG_SEAT = 400;
27693
+ var FLUSH_PLATE = 1100;
27694
+ var LID = 430;
27695
+ var LID_THICK = 30;
27696
+ var MIN_TOILET_WIDTH = 300;
27697
+ var MIN_TOILET_DEPTH = 450;
27698
+ var toilet = {
27699
+ kind: "arch.toilet",
27700
+ label: "Toilet",
27701
+ category: "bathroom",
27702
+ description: "Its cistern goes against the wall. Pull its sides to make it wider or deeper.",
27703
+ params: [{ ...WIDTH, default: 380 }, DEPTH(700)],
27704
+ box: sizedBox("width", "depth", MIN_TOILET_WIDTH, MIN_TOILET_DEPTH),
27705
+ mount: { on: "floor" },
27706
+ height: () => CISTERN_TOP,
27707
+ build({ width, depth }) {
27708
+ const w = atLeast(1, width);
27709
+ const d = atLeast(1, depth);
27710
+ const c = Math.min(170, d / 4);
27711
+ const rest = d - c;
27712
+ const cy = c + rest * (130 / 530);
27713
+ return [
27714
+ roundBox(0, 0, w, c, [8, 8, Math.min(30, c / 3), Math.min(30, c / 3)]),
27715
+ circle(w / 2, c / 2, Math.min(32, c / 3), THIN2),
27716
+ line([pt(w / 2 - Math.min(32, c / 3), c / 2), pt(w / 2 + Math.min(32, c / 3), c / 2)], THIN2),
27717
+ outline(bowl(w / 2, cy, w / 2 - 10 * (w / 380), cy - c, d - cy)),
27718
+ { kind: "ellipse", cx: w / 2, cy: c + rest * (275 / 530), rx: w * (118 / 380), ry: rest * (205 / 530) }
27719
+ ];
27720
+ },
27721
+ // Seen from in front, its foot, its seat, its lid closed over it and, behind, its cistern with the
27722
+ // flush button on top; from its side, the cistern against the wall and the bowl reaching out from
27723
+ // it under its lid.
27724
+ front: ({ width }) => {
27725
+ const w = atLeast(1, width);
27726
+ return [
27727
+ outline([pt(w * 0.3, 0), pt(w * 0.7, 0), pt(w * 0.8, -SEAT + 60), pt(w * 0.2, -SEAT + 60)]),
27728
+ roundBox(w * 0.03, -SEAT, w * 0.97, -SEAT + 60, 20),
27729
+ roundBox(w * 0.04, -SEAT - LID_THICK, w * 0.96, -SEAT, LID_THICK / 2),
27730
+ rect(0, -SEAT - LID_THICK, w, -CISTERN_TOP),
27731
+ rect(w / 2 - 30, -CISTERN_TOP, w / 2 + 30, -CISTERN_TOP - 12, THIN2)
27732
+ ];
27733
+ },
27734
+ side: ({ depth }) => {
27735
+ const d = atLeast(1, depth);
27736
+ const c = Math.min(170, d / 4);
27737
+ return [
27738
+ rect(0, -SEAT, c, -CISTERN_TOP),
27739
+ outline([pt(c, 0), pt(c + (d - c) * 0.55, 0), pt(d, -SEAT + 80), pt(d, -SEAT), pt(c, -SEAT)]),
27740
+ outline(roundCorners([pt(c, -SEAT), pt(c, -SEAT - LID_THICK), pt(d - 5, -SEAT - LID_THICK), pt(d - 5, -SEAT)], [0, 0, LID_THICK / 2, 0]))
27741
+ ];
27742
+ }
27743
+ };
27744
+ var wallHungToilet = {
27745
+ kind: "arch.toilet.wallhung",
27746
+ label: "Toilet, wall-hung",
27747
+ category: "bathroom",
27748
+ description: "Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.",
27749
+ params: [{ ...WIDTH, default: 360 }, DEPTH(540)],
27750
+ box: sizedBox("width", "depth", MIN_TOILET_WIDTH, MIN_TOILET_DEPTH - 100),
27751
+ mount: { on: "floor" },
27752
+ height: () => HUNG_SEAT,
27753
+ build({ width, depth }) {
27754
+ const w = atLeast(1, width);
27755
+ const d = atLeast(1, depth);
27756
+ const cy = d * (150 / 540);
27757
+ const edge = bowl(w / 2, cy, w / 2, cy, d - cy, 6);
27758
+ const hinge = d * (100 / 540);
27759
+ const [left, right] = across(edge, hinge);
27760
+ return [
27761
+ outline(edge),
27762
+ { kind: "ellipse", cx: w / 2, cy: d * (330 / 540), rx: w * (112 / 360), ry: d * (180 / 540) },
27763
+ line([pt(left, hinge), pt(right, hinge)], THIN2)
27764
+ ];
27765
+ },
27766
+ // Seen from in front, its seat, its lid raised against the wall behind it, the bowl under them,
27767
+ // and the flush plate on the wall over it; from its side, the same, the lid leaning to the wall.
27768
+ front: ({ width }) => {
27769
+ const w = atLeast(1, width);
27770
+ const round3 = w * 0.35;
27771
+ return [
27772
+ outline(roundCorners([pt(w * 0.07, -HUNG_SEAT), pt(w * 0.07, -HUNG_SEAT - LID), pt(w * 0.93, -HUNG_SEAT - LID), pt(w * 0.93, -HUNG_SEAT)], [0, round3, round3, 0])),
27773
+ roundBox(w * 0.03, -HUNG_SEAT, w * 0.97, -HUNG_SEAT + 40, 15),
27774
+ outline([pt(w * 0.05, -HUNG_SEAT + 40), pt(w * 0.95, -HUNG_SEAT + 40), pt(w * 0.75, -HUNG_SEAT + 180), pt(w * 0.25, -HUNG_SEAT + 180)]),
27775
+ // The flush plate, on the wall over it, with its two buttons.
27776
+ rect(w / 2 - 120, -FLUSH_PLATE + 80, w / 2 + 120, -FLUSH_PLATE - 80, THIN2),
27777
+ line([pt(w / 2, -FLUSH_PLATE + 50), pt(w / 2, -FLUSH_PLATE - 50)], THIN2)
27778
+ ];
27779
+ },
27780
+ side: ({ depth }) => {
27781
+ const d = atLeast(1, depth);
27782
+ const hinge = d * (100 / 540);
27783
+ const top = -HUNG_SEAT - 30;
27784
+ return [
27785
+ outline([pt(0, top), pt(d, top), pt(d, -HUNG_SEAT + 30), pt(d * 0.7, -HUNG_SEAT + 170), pt(0, -HUNG_SEAT + 200)]),
27786
+ outline([pt(hinge - LID_THICK, top), pt(hinge, top), pt(hinge - 35, top - LID), pt(hinge - 35 - LID_THICK, top - LID + 5)])
27787
+ ];
27788
+ }
27789
+ };
27790
+ var TRAY = 100;
27791
+ var MIN_TRAY = 600;
27792
+ var showerTray = {
27793
+ kind: "arch.showertray",
27794
+ label: "Shower tray",
27795
+ category: "bathroom",
27796
+ description: "Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.",
27797
+ params: [{ ...WIDTH, default: 900 }, DEPTH(900)],
27798
+ box: sizedBox("width", "depth", MIN_TRAY),
27799
+ mount: { on: "floor" },
27800
+ height: () => TRAY,
27801
+ build({ width, depth }) {
27802
+ const w = atLeast(1, width);
27803
+ const d = atLeast(1, depth);
27804
+ const rim = Math.min(40, w / 6, d / 6);
27805
+ const [cx, cy] = [w / 2, d / 2];
27806
+ const drain = Math.min(50, w / 6, d / 6);
27807
+ const corner = rim + 30 * (1 - Math.SQRT1_2);
27808
+ const slopes = [
27809
+ [1, 1],
27810
+ [-1, 1],
27811
+ [1, -1],
27812
+ [-1, -1]
27813
+ ].map(([sx, sy]) => {
27814
+ const from = pt(cx - sx * (cx - corner), cy - sy * (cy - corner));
27815
+ const toward = Math.hypot(from.x - cx, from.y - cy);
27816
+ return line([from, pt(cx + (from.x - cx) * drain / toward, cy + (from.y - cy) * drain / toward)], THIN2);
27817
+ });
27818
+ return [roundBox(0, 0, w, d, 10), roundBox(rim, rim, w - rim, d - rim, 30, THIN2), ...slopes, circle(cx, cy, drain), circle(cx, cy, drain * 0.56, THIN2)];
27819
+ },
27820
+ front: ({ width }) => [rect(0, 0, atLeast(1, width), -TRAY)],
27821
+ side: ({ depth }) => [rect(0, 0, atLeast(1, depth), -TRAY)]
27822
+ };
27468
27823
  var TUB = 580;
27469
27824
  var MIN_TUB = 500;
27470
27825
  var bathtub = {
@@ -27478,7 +27833,7 @@ var bathtub = {
27478
27833
  { key: "rim", label: "Rim", type: "number", default: 60, unit: "length" }
27479
27834
  ],
27480
27835
  box: {
27481
- bounds: ({ length, width }) => ({ left: 0, top: 0, right: atLeast(1, length), bottom: atLeast(1, width) }),
27836
+ bounds: ({ length: length2, width }) => ({ left: 0, top: 0, right: atLeast(1, length2), bottom: atLeast(1, width) }),
27482
27837
  resize: (_, size) => ({
27483
27838
  ...size.width === void 0 ? {} : { length: Math.round(atLeast(MIN_TUB, size.width)) },
27484
27839
  ...size.height === void 0 ? {} : { width: Math.round(atLeast(MIN_TUB, size.height)) }
@@ -27486,8 +27841,8 @@ var bathtub = {
27486
27841
  },
27487
27842
  // Seen from in front, its panel and the rim along its top, its mixer on the wall at the drain end;
27488
27843
  // from its side, the same across its width.
27489
- front: ({ length, rim }) => {
27490
- const l = atLeast(1, length);
27844
+ front: ({ length: length2, rim }) => {
27845
+ const l = atLeast(1, length2);
27491
27846
  const x = Math.min(clamp(rim, 1, l / 2) + 140, l / 2);
27492
27847
  return [rect(0, 0, l, -TUB), line([pt(0, -TUB + 40), pt(l, -TUB + 40)], THIN2), rect(x - 60, -TUB - 150, x + 60, -TUB - 190), line([pt(x, -TUB - 150), pt(x, -TUB - 100)], { strokeWidth: 1.5 })];
27493
27848
  },
@@ -27495,8 +27850,8 @@ var bathtub = {
27495
27850
  const w = atLeast(1, width);
27496
27851
  return [rect(0, 0, w, -TUB), line([pt(0, -TUB + 40), pt(w, -TUB + 40)], THIN2)];
27497
27852
  },
27498
- build({ length, width, rim }) {
27499
- const l = atLeast(1, length);
27853
+ build({ length: length2, width, rim }) {
27854
+ const l = atLeast(1, length2);
27500
27855
  const w = atLeast(1, width);
27501
27856
  const r = clamp(rim, 1, atLeast(1, Math.min(l, w) / 2 - 25));
27502
27857
  const basin = [pt(r, r), pt(l - r, r), pt(l - r, w - r), pt(r, w - r)];
@@ -27508,6 +27863,66 @@ var bathtub = {
27508
27863
  ];
27509
27864
  }
27510
27865
  };
27866
+ var curve = (a, b, c) => Array.from({ length: 13 }, (_, i) => {
27867
+ const t = i / 12;
27868
+ return pt((1 - t) ** 2 * a.x + 2 * t * (1 - t) * b.x + t * t * c.x, (1 - t) ** 2 * a.y + 2 * t * (1 - t) * b.y + t * t * c.y);
27869
+ });
27870
+ var MIXER = 1100;
27871
+ var HEAD = 2100;
27872
+ var HIGH = { dash: [30, 20] };
27873
+ var high = (cx, cy, r, style = {}) => ({ kind: "ellipse", cx, cy, rx: r, ry: r, ...style, ...HIGH });
27874
+ var showerHead = {
27875
+ kind: "arch.shower",
27876
+ label: "Shower head",
27877
+ category: "bathroom",
27878
+ description: "Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.",
27879
+ params: [{ key: "type", label: "Type", type: "string", default: "Column", options: ["Column", "Slide rail", "Fixed head"] }],
27880
+ mount: { on: "wall", height: MIXER },
27881
+ build({ type }) {
27882
+ const prims = [rect(-80, 0, 80, 60), circle(-55, 75, 15, THIN2), circle(55, 75, 15, THIN2)];
27883
+ if (type === "Slide rail") prims.push(line([pt(0, 0), pt(0, 30)], THIN2), high(0, 60, 30, THIN2));
27884
+ else if (type === "Fixed head") prims.push(line([pt(0, 0), pt(0, 200)], { ...THIN2, ...HIGH }), high(0, 250, 60));
27885
+ else prims.push(line([pt(0, 0), pt(0, 175)], { ...THIN2, ...HIGH }), high(0, 300, 125), high(0, 300, 85, THIN2));
27886
+ return prims;
27887
+ },
27888
+ // Seen from in front, Y up from the middle of its mixer: the mixer and its two handles, then what rises over it.
27889
+ front: ({ type }) => {
27890
+ const top = MIXER - HEAD;
27891
+ const prims = [rect(-80, 30, 80, -30), circle(-55, 0, 15, THIN2), circle(55, 0, 15, THIN2)];
27892
+ if (type === "Slide rail") {
27893
+ prims.push(
27894
+ line([pt(110, -150), pt(110, -850)], { strokeWidth: 1.5 }),
27895
+ rect(95, -140, 125, -160, THIN2),
27896
+ rect(95, -840, 125, -860, THIN2),
27897
+ // The hand shower on its holder, its hose hanging down to the mixer.
27898
+ roundBox(95, -900, 125, -660, 12),
27899
+ { kind: "ellipse", cx: 110, cy: -930, rx: 40, ry: 30 },
27900
+ line(curve(pt(110, -660), pt(200, -250), pt(60, 30)), THIN2)
27901
+ );
27902
+ } else if (type === "Fixed head") {
27903
+ prims.push(line([pt(0, top + 100), pt(0, top + 60)], { strokeWidth: 1.5 }), { kind: "ellipse", cx: 0, cy: top + 40, rx: 60, ry: 25 });
27904
+ } else {
27905
+ prims.push(
27906
+ line([pt(0, -30), pt(0, top)], { strokeWidth: 1.5 }),
27907
+ // The overhead shower, flat, at the end of its arm towards the viewer.
27908
+ rect(-125, top - 5, 125, top + 12),
27909
+ // The hand shower hung on the column.
27910
+ roundBox(15, -650, 45, -400, 12),
27911
+ { kind: "ellipse", cx: 30, cy: -680, rx: 35, ry: 28 }
27912
+ );
27913
+ }
27914
+ return prims;
27915
+ },
27916
+ // Seen from its side, X out from the wall: the mixer, and the arm reaching out to the head.
27917
+ side: ({ type }) => {
27918
+ const top = MIXER - HEAD;
27919
+ const prims = [rect(0, 30, 70, -30), line([pt(70, 0), pt(110, 0)], { strokeWidth: 1.5 })];
27920
+ if (type === "Slide rail") prims.push(line([pt(30, -150), pt(30, -850)], { strokeWidth: 1.5 }), roundBox(30, -900, 70, -660, 12), { kind: "ellipse", cx: 60, cy: -930, rx: 30, ry: 40 });
27921
+ else if (type === "Fixed head") prims.push(line([pt(0, top + 100), pt(250, top + 60)], { strokeWidth: 1.5 }), rect(190, top + 40, 310, top + 70));
27922
+ else prims.push(line([pt(40, -30), pt(40, top), pt(300, top)], { strokeWidth: 1.5 }), rect(175, top, 425, top + 17), roundBox(40, -650, 70, -400, 12));
27923
+ return prims;
27924
+ }
27925
+ };
27511
27926
 
27512
27927
  // packages/ext-architecture/src/compass.ts
27513
27928
  var compass = {
@@ -27542,10 +27957,10 @@ var compass = {
27542
27957
  var SOFA_BACK = 170;
27543
27958
  var SOFA_ARM = 170;
27544
27959
  var SOFA_SEAT = 650;
27545
- function cornerSofaSize({ length, returnLength, depth }) {
27960
+ function cornerSofaSize({ length: length2, returnLength, depth }) {
27546
27961
  const d = clamp(depth, 2 * SOFA_BACK + 200, 1500);
27547
27962
  const least = d + SOFA_ARM + 300;
27548
- return { l: atLeast(least, length), r: atLeast(least, returnLength), d, least };
27963
+ return { l: atLeast(least, length2), r: atLeast(least, returnLength), d, least };
27549
27964
  }
27550
27965
  var cornerSofa = {
27551
27966
  kind: "arch.sofa.corner",
@@ -27605,7 +28020,7 @@ var cornerSofa = {
27605
28020
  front: (props) => cornerSofaFront(props),
27606
28021
  side: (props) => cornerSofaSide(props)
27607
28022
  };
27608
- var SEAT = 420;
28023
+ var SEAT2 = 420;
27609
28024
  var ARM_TOP = 600;
27610
28025
  var BACK_TOP = 850;
27611
28026
  var LEGS = 60;
@@ -27614,12 +28029,12 @@ function sofaFront(x0, x1, armLeft, armRight, seats) {
27614
28029
  const [a, b] = [x0 + armLeft, x1 - armRight];
27615
28030
  const n3 = Math.min(12, count(seats));
27616
28031
  const prims = [
27617
- outline([pt(x0, -LEGS), pt(x1, -LEGS), pt(x1, -ARM_TOP), pt(b, -ARM_TOP), pt(b, -SEAT), pt(a, -SEAT), pt(a, -ARM_TOP), pt(x0, -ARM_TOP)]),
28032
+ outline([pt(x0, -LEGS), pt(x1, -LEGS), pt(x1, -ARM_TOP), pt(b, -ARM_TOP), pt(b, -SEAT2), pt(a, -SEAT2), pt(a, -ARM_TOP), pt(x0, -ARM_TOP)]),
27618
28033
  // The back, over the arms and the seats.
27619
28034
  line([pt(x0, -ARM_TOP), pt(x0, -BACK_TOP), pt(x1, -BACK_TOP), pt(x1, -ARM_TOP)]),
27620
28035
  ...feet(x0, x1)
27621
28036
  ];
27622
- for (let i = 1; i < n3; i++) prims.push(line([pt(a + (b - a) * i / n3, -SEAT), pt(a + (b - a) * i / n3, -LEGS - 60)], THIN2), line([pt(a + (b - a) * i / n3, -SEAT - 20), pt(a + (b - a) * i / n3, -BACK_TOP + 30)], THIN2));
28037
+ for (let i = 1; i < n3; i++) prims.push(line([pt(a + (b - a) * i / n3, -SEAT2), pt(a + (b - a) * i / n3, -LEGS - 60)], THIN2), line([pt(a + (b - a) * i / n3, -SEAT2 - 20), pt(a + (b - a) * i / n3, -BACK_TOP + 30)], THIN2));
27623
28038
  return prims;
27624
28039
  }
27625
28040
  function sofaSide(d, back) {
@@ -27697,52 +28112,75 @@ function officeChairPlan() {
27697
28112
  });
27698
28113
  return [band(330, 900, 820, 70, 253, 287), roundBox(92, 150, 568, 590, [60, 60, 110, 110]), roundBox(46, 215, 88, 505, 21), roundBox(572, 215, 614, 505, 21), ...base2.slice(2)];
27699
28114
  }
27700
- var OFFICE = { width: 660, depth: 730 };
28115
+ var OFFICE = { width: 660 };
27701
28116
  var DESK_TOP = 750;
27702
28117
  var desk = {
27703
28118
  kind: "arch.desk",
27704
28119
  label: "Desk",
27705
28120
  category: "office",
27706
- description: "Against the wall, with its office chair pulled up to it, or without. Pull its sides to make it wider or deeper.",
27707
- params: [{ ...WIDTH, default: 1400 }, DEPTH(700), { key: "chair", label: "Office chair", type: "boolean", default: true }],
28121
+ description: "Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.",
28122
+ params: [{ ...WIDTH, default: 1400 }, DEPTH(700)],
27708
28123
  box: sizedBox("width", "depth", 600, 400),
27709
28124
  mount: { on: "floor" },
27710
28125
  height: () => DESK_TOP,
27711
- build({ width, depth, chair: chair2 }) {
28126
+ build({ width, depth }) {
27712
28127
  const [w, d] = [atLeast(600, width), atLeast(400, depth)];
27713
28128
  const mid2 = w / 2;
27714
- const prims = [
28129
+ return [
27715
28130
  rect(0, 0, w, d),
27716
28131
  roundBox(mid2 - 70, 100, mid2 + 70, 180, 20, THIN2),
27717
28132
  roundBox(mid2 - 280, 180, mid2 + 280, 212, 12, THIN2),
27718
28133
  roundBox(mid2 - 220, d - 320, mid2 + 220, d - 170, 16, THIN2),
27719
28134
  { kind: "ellipse", cx: mid2 + 310, cy: d - 245, rx: 30, ry: 48, strokeWidth: 0.5 }
27720
28135
  ];
27721
- if (chair2 !== false) prims.push(...officeChairPlan().map((p) => transformPrimitive(p, { x: mid2 + OFFICE.width / 2, y: d + 20 + OFFICE.depth, rotation: 180 })));
27722
- return prims;
27723
28136
  },
27724
- front: ({ width, chair: chair2 }) => {
28137
+ front: ({ width }) => {
27725
28138
  const w = atLeast(600, width);
27726
28139
  const mid2 = w / 2;
27727
- const prims = [rect(0, -DESK_TOP + 30, w, -DESK_TOP), rect(0, 0, 30, -DESK_TOP + 30, THIN2), rect(w - 30, 0, w, -DESK_TOP + 30, THIN2), rect(mid2 - 280, -DESK_TOP - 60, mid2 + 280, -DESK_TOP - 380), line([pt(mid2, -DESK_TOP), pt(mid2, -DESK_TOP - 60)])];
27728
- if (chair2 !== false) prims.push(roundBox(mid2 - 240, -520, mid2 + 240, -1050, 40, THIN2), line([pt(mid2, -470), pt(mid2, -90)], { strokeWidth: 1.5 }), line([pt(mid2 - 300, -40), pt(mid2 + 300, -40)], THIN2), circle(mid2 - 300, -20, 20, THIN2), circle(mid2 + 300, -20, 20, THIN2));
27729
- return prims;
28140
+ return [rect(0, -DESK_TOP + 30, w, -DESK_TOP), rect(0, 0, 30, -DESK_TOP + 30, THIN2), rect(w - 30, 0, w, -DESK_TOP + 30, THIN2), rect(mid2 - 280, -DESK_TOP - 60, mid2 + 280, -DESK_TOP - 380), line([pt(mid2, -DESK_TOP), pt(mid2, -DESK_TOP - 60)])];
27730
28141
  },
27731
- side: ({ depth, chair: chair2 }) => {
28142
+ side: ({ depth }) => {
27732
28143
  const d = atLeast(400, depth);
27733
- const prims = [rect(0, -DESK_TOP + 30, d, -DESK_TOP), rect(0, 0, d, -DESK_TOP + 30, THIN2), rect(120, -DESK_TOP, 140, -DESK_TOP - 380, THIN2)];
27734
- if (chair2 !== false) {
27735
- const at2 = d + 20;
27736
- prims.push(
27737
- rect(at2 + 60, -470, at2 + OFFICE.depth - 200, -520, THIN2),
27738
- outline([pt(at2 + OFFICE.depth - 200, -520), pt(at2 + OFFICE.depth - 160, -1050), pt(at2 + OFFICE.depth - 110, -1050), pt(at2 + OFFICE.depth - 150, -520)]),
27739
- line([pt(at2 + 300, -470), pt(at2 + 300, -90)], { strokeWidth: 1.5 }),
27740
- line([pt(at2, -40), pt(at2 + OFFICE.depth - 100, -40)], THIN2)
27741
- );
27742
- }
27743
- return prims;
28144
+ return [rect(0, -DESK_TOP + 30, d, -DESK_TOP), rect(0, 0, d, -DESK_TOP + 30, THIN2), rect(120, -DESK_TOP, 140, -DESK_TOP - 380, THIN2)];
27744
28145
  }
27745
28146
  };
28147
+ var OFFICE_SEAT = 470;
28148
+ var OFFICE_BACK = 1050;
28149
+ var officeChairFront = () => {
28150
+ const mid2 = OFFICE.width / 2;
28151
+ return [
28152
+ roundBox(mid2 - 240, -OFFICE_SEAT - 50, mid2 + 240, -OFFICE_BACK, 40),
28153
+ rect(92, -OFFICE_SEAT, 568, -OFFICE_SEAT - 50),
28154
+ roundBox(46, -OFFICE_SEAT - 180, 88, -OFFICE_SEAT - 220, 15, THIN2),
28155
+ roundBox(572, -OFFICE_SEAT - 180, 614, -OFFICE_SEAT - 220, 15, THIN2),
28156
+ line([pt(67, -OFFICE_SEAT - 180), pt(67, -OFFICE_SEAT - 50)], THIN2),
28157
+ line([pt(593, -OFFICE_SEAT - 180), pt(593, -OFFICE_SEAT - 50)], THIN2),
28158
+ line([pt(mid2, -OFFICE_SEAT), pt(mid2, -90)], { strokeWidth: 1.5 }),
28159
+ line([pt(mid2 - 300, -40), pt(mid2 + 300, -40)], THIN2),
28160
+ circle(mid2 - 300, -20, 20, THIN2),
28161
+ circle(mid2 + 300, -20, 20, THIN2)
28162
+ ];
28163
+ };
28164
+ var officeChair = {
28165
+ kind: "arch.officechair",
28166
+ label: "Office chair",
28167
+ category: "office",
28168
+ description: "On five casters, its back at the top. Turn it to face the desk.",
28169
+ params: [],
28170
+ height: () => OFFICE_BACK,
28171
+ build: () => officeChairPlan(),
28172
+ front: () => officeChairFront(),
28173
+ back: () => officeChairFront(),
28174
+ // From its side, its own Y from its back: the back leaning over the seat, the column, the base.
28175
+ side: () => [
28176
+ rect(60, -OFFICE_SEAT, 530, -OFFICE_SEAT - 50, THIN2),
28177
+ outline([pt(200, -OFFICE_SEAT - 50), pt(160, -OFFICE_BACK), pt(110, -OFFICE_BACK), pt(150, -OFFICE_SEAT - 50)]),
28178
+ line([pt(370, -OFFICE_SEAT), pt(370, -90)], { strokeWidth: 1.5 }),
28179
+ line([pt(70, -40), pt(670, -40)], THIN2),
28180
+ circle(70, -20, 20, THIN2),
28181
+ circle(670, -20, 20, THIN2)
28182
+ ]
28183
+ };
27746
28184
  function cornerSofaFront(props) {
27747
28185
  const { l, d } = cornerSofaSize(props);
27748
28186
  const prims = [...sofaFront(0, l, d, SOFA_ARM, Math.max(1, Math.round((l - SOFA_ARM - d) / SOFA_SEAT))), line([pt(d, -LEGS), pt(d, -ARM_TOP)], THIN2)];
@@ -27750,7 +28188,7 @@ function cornerSofaFront(props) {
27750
28188
  }
27751
28189
  function cornerSofaSide(props) {
27752
28190
  const { r, d } = cornerSofaSize(props);
27753
- return [rect(0, -LEGS, d, -ARM_TOP), line([pt(d, -SEAT), pt(r - SOFA_ARM, -SEAT), pt(r - SOFA_ARM, -ARM_TOP), pt(r, -ARM_TOP), pt(r, -LEGS), pt(d, -LEGS)]), line([pt(0, -ARM_TOP), pt(0, -BACK_TOP), pt(r, -BACK_TOP), pt(r, -ARM_TOP)]), ...feet(0, r)];
28191
+ return [rect(0, -LEGS, d, -ARM_TOP), line([pt(d, -SEAT2), pt(r - SOFA_ARM, -SEAT2), pt(r - SOFA_ARM, -ARM_TOP), pt(r, -ARM_TOP), pt(r, -LEGS), pt(d, -LEGS)]), line([pt(0, -ARM_TOP), pt(0, -BACK_TOP), pt(r, -BACK_TOP), pt(r, -ARM_TOP)]), ...feet(0, r)];
27754
28192
  }
27755
28193
 
27756
28194
  // packages/ext-architecture/src/heating.ts
@@ -27796,14 +28234,117 @@ var radiator = {
27796
28234
  return [outline([pt(30, -RADIATOR_FOOT), pt(30 + d, -RADIATOR_FOOT), pt(30 + d, -RADIATOR_TOP), pt(30, -RADIATOR_TOP)]), line([pt(0, -RADIATOR_FOOT - 80), pt(30, -RADIATOR_FOOT - 80)]), line([pt(0, -RADIATOR_TOP + 80), pt(30, -RADIATOR_TOP + 80)])];
27797
28235
  }
27798
28236
  };
28237
+ var MIN_UNIT_WIDTH = 400;
28238
+ var MIN_UNIT_DEPTH = 200;
28239
+ var FEET = 60;
28240
+ var heatPump = {
28241
+ kind: "arch.heatpump",
28242
+ label: "Heat pump, outdoor unit",
28243
+ category: "heating",
28244
+ description: "Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.",
28245
+ params: [{ ...WIDTH, default: 900 }, DEPTH(350), HEIGHT(700)],
28246
+ box: sizedBox("width", "depth", MIN_UNIT_WIDTH, MIN_UNIT_DEPTH),
28247
+ mount: { on: "floor" },
28248
+ height: ({ height }) => atLeast(1, height),
28249
+ build({ width, depth }) {
28250
+ const w = atLeast(1, width);
28251
+ const d = atLeast(1, depth);
28252
+ const r = Math.max(10, Math.min(d / 2 - 30, w * 0.3));
28253
+ const fan = w * 0.38;
28254
+ return [
28255
+ outline([pt(0, 0), pt(w, 0), pt(w, d), pt(0, d)]),
28256
+ circle(fan, d / 2, r, THIN2),
28257
+ circle(fan, d / 2, r * 0.25, THIN2),
28258
+ line([pt(w * 0.78, 0), pt(w * 0.78, d)], THIN2)
28259
+ ];
28260
+ },
28261
+ front: ({ width, height }) => {
28262
+ const w = atLeast(1, width);
28263
+ const h = Math.max(FEET + 1, height);
28264
+ const body = h - FEET;
28265
+ const r = Math.max(10, Math.min(body / 2 - 40, w * 0.3));
28266
+ return [
28267
+ rect(w * 0.08, 0, w * 0.18, -FEET),
28268
+ rect(w * 0.82, 0, w * 0.92, -FEET),
28269
+ rect(0, -FEET, w, -h),
28270
+ circle(w * 0.38, -FEET - body / 2, r),
28271
+ circle(w * 0.38, -FEET - body / 2, r * 0.25, THIN2),
28272
+ line([pt(w * 0.78, -FEET), pt(w * 0.78, -h)], THIN2)
28273
+ ];
28274
+ },
28275
+ side: ({ depth, height }) => {
28276
+ const d = atLeast(1, depth);
28277
+ const h = Math.max(FEET + 1, height);
28278
+ return [rect(d * 0.1, 0, d * 0.9, -FEET), rect(0, -FEET, d, -h)];
28279
+ }
28280
+ };
28281
+ var MIN_BOILER = 250;
28282
+ var FLUE = 150;
28283
+ var gasBoiler = {
28284
+ kind: "arch.boiler",
28285
+ label: "Gas boiler",
28286
+ category: "heating",
28287
+ description: "Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.",
28288
+ params: [{ ...WIDTH, default: 400 }, DEPTH(300), HEIGHT(700)],
28289
+ box: sizedBox("width", "depth", MIN_BOILER),
28290
+ mount: { on: "wall", height: 1e3, measured: "bottom" },
28291
+ build({ width, depth }) {
28292
+ const w = atLeast(1, width);
28293
+ const d = atLeast(1, depth);
28294
+ const r = Math.min(62, w / 5, d / 4);
28295
+ return [outline([pt(0, 0), pt(w, 0), pt(w, d), pt(0, d)]), circle(w / 2, d * 0.45, r), circle(w / 2, d * 0.45, r * 0.65, THIN2)];
28296
+ },
28297
+ front: ({ width, height }) => {
28298
+ const w = atLeast(1, width);
28299
+ const h = atLeast(1, height);
28300
+ const r = Math.min(62, w / 5);
28301
+ const prims = [rect(0, 0, w, -h), rect(w * 0.2, -40, w * 0.8, -Math.min(140, h / 4), THIN2), rect(w / 2 - r, -h, w / 2 + r, -h - FLUE)];
28302
+ for (let i = 0; i < 5; i++) prims.push(line([pt(w * (0.2 + i * 0.15), 0), pt(w * (0.2 + i * 0.15), 120)], THIN2));
28303
+ return prims;
28304
+ },
28305
+ side: ({ depth, height }) => {
28306
+ const d = atLeast(1, depth);
28307
+ const h = atLeast(1, height);
28308
+ const r = Math.min(62, d / 4);
28309
+ const x = d * 0.45;
28310
+ return [rect(0, 0, d, -h), outline([pt(x - r, -h), pt(x - r, -h - FLUE + r), pt(0, -h - FLUE + r), pt(0, -h - FLUE - r), pt(x + r, -h - FLUE - r), pt(x + r, -h)])];
28311
+ }
28312
+ };
28313
+ var MIN_TANK = 300;
28314
+ var waterHeater = {
28315
+ kind: "arch.waterheater",
28316
+ label: "Water heater",
28317
+ category: "heating",
28318
+ description: "A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.",
28319
+ params: [{ key: "diameter", label: "Diameter", type: "number", default: 570, unit: "length" }, HEIGHT(1600)],
28320
+ box: {
28321
+ bounds: ({ diameter }) => ({ left: 0, top: 0, right: atLeast(1, diameter), bottom: atLeast(1, diameter) }),
28322
+ resize: (_, size) => {
28323
+ const given = [size.width, size.height].filter((v) => v !== void 0);
28324
+ return given.length === 0 ? {} : { diameter: Math.round(atLeast(MIN_TANK, Math.max(...given))) };
28325
+ }
28326
+ },
28327
+ mount: { on: "floor" },
28328
+ height: ({ height }) => atLeast(1, height),
28329
+ build({ diameter }) {
28330
+ const r = atLeast(1, diameter) / 2;
28331
+ const pipe2 = Math.min(15, r / 8);
28332
+ return [circle(r, r, r), circle(r, r, Math.max(r * 0.5, r - 50), THIN2), circle(r * 0.76, r * 0.6, pipe2, THIN2), circle(r * 1.24, r * 0.6, pipe2, THIN2)];
28333
+ },
28334
+ front: ({ diameter, height }) => tank(atLeast(1, diameter), atLeast(1, height)),
28335
+ side: ({ diameter, height }) => tank(atLeast(1, diameter), atLeast(1, height))
28336
+ };
28337
+ function tank(d, h) {
28338
+ return [roundBox(0, -h, d, 0, Math.min(d * 0.2, h / 4)), line([pt(d * 0.38, -h), pt(d * 0.38, -h - 100)], THIN2), line([pt(d * 0.62, -h), pt(d * 0.62, -h - 100)], THIN2)];
28339
+ }
27799
28340
 
27800
28341
  // packages/ext-architecture/src/bedroom.ts
27801
28342
  var TOP = 25;
27802
- var FEET = 100;
28343
+ var FEET2 = 100;
27803
28344
  var GAP3 = 3;
27804
28345
  var planOf = (w, d) => [outline([pt(0, 0), pt(w, 0), pt(w, d), pt(0, d)]), line([pt(0, Math.max(0, d - 20)), pt(w, Math.max(0, d - 20))], THIN2)];
27805
28346
  function onFeet(w, h, inside3) {
27806
- const feet2 = Math.min(FEET, h / 4);
28347
+ const feet2 = Math.min(FEET2, h / 4);
27807
28348
  const foot = Math.min(40, w / 8);
27808
28349
  const body = [-feet2, -h + TOP];
27809
28350
  return [
@@ -27815,17 +28356,17 @@ function onFeet(w, h, inside3) {
27815
28356
  ];
27816
28357
  }
27817
28358
  function onFeetSide(d, h) {
27818
- const feet2 = Math.min(FEET, h / 4);
28359
+ const feet2 = Math.min(FEET2, h / 4);
27819
28360
  const foot = Math.min(40, d / 8);
27820
28361
  return [rect(0, -h + TOP, d, -h), rect(0, -feet2, d - 10, -h + TOP), line([pt(d - 30, -feet2), pt(d - 30, -h + TOP)], THIN2), rect(16, 0, 16 + foot, -feet2), rect(d - 26 - foot, 0, d - 26, -feet2)];
27821
28362
  }
27822
28363
  function drawerGrid(x0, x1, y0, y1, rows, columns) {
27823
28364
  const [r, c] = [Math.min(MAX_FRONTS, count(rows)), Math.min(4, count(columns))];
27824
- const [each, high] = [(x1 - x0) / c, (y0 - y1) / r];
28365
+ const [each, high2] = [(x1 - x0) / c, (y0 - y1) / r];
27825
28366
  const prims = [];
27826
28367
  for (let i = 0; i < c; i++) {
27827
28368
  for (let k = 0; k < r; k++) {
27828
- prims.push(...drawer(x0 + i * each + (i > 0 ? GAP3 / 2 : 0), x0 + (i + 1) * each - (i < c - 1 ? GAP3 / 2 : 0), y0 - k * high - (k > 0 ? GAP3 / 2 : 0), y0 - (k + 1) * high + (k < r - 1 ? GAP3 / 2 : 0)));
28369
+ prims.push(...drawer(x0 + i * each + (i > 0 ? GAP3 / 2 : 0), x0 + (i + 1) * each - (i < c - 1 ? GAP3 / 2 : 0), y0 - k * high2 - (k > 0 ? GAP3 / 2 : 0), y0 - (k + 1) * high2 + (k < r - 1 ? GAP3 / 2 : 0)));
27829
28370
  }
27830
28371
  }
27831
28372
  return prims;
@@ -28280,7 +28821,7 @@ var washingMachine = {
28280
28821
  return [rect(0, 0, body, -h), roundBox(body, cy + r * 0.8, d, cy - r * 0.8, [0, 12, 12, 0], THIN2)];
28281
28822
  }
28282
28823
  };
28283
- var HIGH = [6, 4];
28824
+ var HIGH2 = [6, 4];
28284
28825
  var hood = {
28285
28826
  kind: "arch.hood",
28286
28827
  label: "Range hood",
@@ -28298,9 +28839,9 @@ var hood = {
28298
28839
  const [w, d] = [atLeast(1, width), atLeast(1, depth)];
28299
28840
  const half = Math.min(140, w / 4);
28300
28841
  const filter = Math.min(90, w / 6, d / 5);
28301
- const prims = [{ kind: "path", points: [pt(0, 0), pt(w, 0), pt(w, d), pt(0, d)], closed: true, dash: HIGH }];
28302
- if (style !== "Flat") prims.push({ kind: "path", points: [pt(w / 2 - half, 0), pt(w / 2 + half, 0), pt(w / 2 + half, Math.min(250, d / 2)), pt(w / 2 - half, Math.min(250, d / 2))], closed: true, dash: HIGH, strokeWidth: 0.5 });
28303
- prims.push({ kind: "ellipse", cx: w / 2, cy: d * 0.6, rx: filter, ry: filter, dash: HIGH, strokeWidth: 0.5 });
28842
+ const prims = [{ kind: "path", points: [pt(0, 0), pt(w, 0), pt(w, d), pt(0, d)], closed: true, dash: HIGH2 }];
28843
+ if (style !== "Flat") prims.push({ kind: "path", points: [pt(w / 2 - half, 0), pt(w / 2 + half, 0), pt(w / 2 + half, Math.min(250, d / 2)), pt(w / 2 - half, Math.min(250, d / 2))], closed: true, dash: HIGH2, strokeWidth: 0.5 });
28844
+ prims.push({ kind: "ellipse", cx: w / 2, cy: d * 0.6, rx: filter, ry: filter, dash: HIGH2, strokeWidth: 0.5 });
28304
28845
  return prims;
28305
28846
  },
28306
28847
  front: ({ width, style, chimney }) => {
@@ -28369,12 +28910,12 @@ var door2 = {
28369
28910
  const w = atLeast(1, width);
28370
28911
  const h = (env.wallThickness ?? LOOSE_WALL) / 2;
28371
28912
  const open2 = clamp(angle, 5, 180);
28372
- const leaf = (hingeX, length, dir) => {
28913
+ const leaf = (hingeX, length2, dir) => {
28373
28914
  const hingePoint = pt(hingeX, h);
28374
28915
  const closed = dir === 1 ? 0 : 180;
28375
28916
  const opened = closed + dir * open2;
28376
- const tip2 = arcPoints(hingePoint, length, opened, opened, 1)[0];
28377
- return [line([hingePoint, tip2], HEAVY), line(arcPoints(hingePoint, length, closed, opened), THIN2)];
28917
+ const tip2 = arcPoints(hingePoint, length2, opened, opened, 1)[0];
28918
+ return [line([hingePoint, tip2], HEAVY), line(arcPoints(hingePoint, length2, closed, opened), THIN2)];
28378
28919
  };
28379
28920
  let prims = [line([pt(0, -h), pt(w, -h)], THIN2), line([pt(0, h), pt(w, h)], THIN2)];
28380
28921
  if (type === "Single") prims.push(...leaf(0, w, 1));
@@ -28628,7 +29169,7 @@ var translations = {
28628
29169
  "Double washbasin": "Lavabo double vasque",
28629
29170
  Depth: "Profondeur",
28630
29171
  Bowls: "Vasques",
28631
- "A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Un plan avec ses vasques. Tirez ses c\xF4t\xE9s pour l\u2019allonger ou l\u2019approfondir : les vasques et les robinets gardent leur taille.",
29172
+ "A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Un plan avec ses vasques et, dessous, un meuble \xE0 tiroirs ou \xE0 portes, suspendu ou sur pieds, ou aucun. Tirez ses c\xF4t\xE9s pour l\u2019allonger ou l\u2019approfondir : les vasques et les robinets gardent leur taille.",
28632
29173
  Triple: "Triple",
28633
29174
  "Glazing: Single": "Simple",
28634
29175
  "Glazing: Double": "Double",
@@ -28678,6 +29219,25 @@ var translations = {
28678
29219
  Radiator: "Radiateur",
28679
29220
  "Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "Contre le mur par son dos. Tirez ses c\xF4t\xE9s pour l\u2019allonger : ses \xE9l\xE9ments gardent leur largeur. Son robinet est \xE0 un bout.",
28680
29221
  Valve: "Robinet",
29222
+ "On feet": "Sur pieds",
29223
+ "Shower head": "Pommeau de douche",
29224
+ "Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "Fix\xE9 au mur \xE0 la hauteur de son mitigeur : une colonne avec une douche de t\xEAte, une barre de douche avec sa douchette, ou une t\xEAte sur son bras. Au-dessus d\u2019un receveur ou d\u2019une baignoire.",
29225
+ "Column": "Colonne",
29226
+ "Slide rail": "Barre de douche",
29227
+ "Fixed head": "T\xEAte fixe",
29228
+ Toilet: "WC",
29229
+ "Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "Son r\xE9servoir va contre le mur. Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir ou l\u2019approfondir.",
29230
+ "Toilet, wall-hung": "WC suspendu",
29231
+ "Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "Son dos va contre le mur, son r\xE9servoir dans le mur. Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir ou l\u2019approfondir.",
29232
+ "Shower tray": "Receveur de douche",
29233
+ "Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "Contre le mur par un c\xF4t\xE9. Tirez ses c\xF4t\xE9s pour l\u2019agrandir : son rebord et sa bonde gardent leur taille.",
29234
+ "Heat pump, outdoor unit": "Pompe \xE0 chaleur, unit\xE9 ext\xE9rieure",
29235
+ "Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "Contre un mur ext\xE9rieur par son dos. Tirez ses c\xF4t\xE9s pour l\u2019allonger ou l\u2019approfondir. Donnez-lui une hauteur au-dessus du sol pour la poser sur des consoles.",
29236
+ "Gas boiler": "Chaudi\xE8re gaz",
29237
+ "Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "Fix\xE9e au mur par son dos, son conduit de fum\xE9e au-dessus. Sa hauteur au-dessus du sol est celle de son dessous.",
29238
+ "Water heater": "Chauffe-eau",
29239
+ "A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "Un ballon rond contre le mur. Tirez ses c\xF4t\xE9s pour l\u2019agrandir. Donnez-lui une hauteur au-dessus du sol pour le fixer au mur.",
29240
+ Diameter: "Diam\xE8tre",
28681
29241
  "Base unit": "Meuble bas",
28682
29242
  "A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "Un meuble de cuisine avec son plan de travail, contre le mur : portes, tiroirs ou four, comme le montrent les \xE9l\xE9vations. Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir.",
28683
29243
  Below: "Dessous",
@@ -28724,7 +29284,8 @@ var translations = {
28724
29284
  "Office chair": "Chaise de bureau",
28725
29285
  "Its back goes against the wall. Pull its sides to make it wider or deeper.": "Son dossier va contre le mur. Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir ou l\u2019approfondir.",
28726
29286
  "Its back at the top. Turn it to face the table.": "Son dossier en haut. Tournez-la face \xE0 la table.",
28727
- "Against the wall, with its office chair pulled up to it, or without. Pull its sides to make it wider or deeper.": "Contre le mur, avec sa chaise de bureau tir\xE9e devant ou sans. Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir ou l\u2019approfondir."
29287
+ "Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "Contre le mur. Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir ou l\u2019approfondir. Sa chaise de bureau est un objet \xE0 part.",
29288
+ "On five casters, its back at the top. Turn it to face the desk.": "Sur cinq roulettes, son dossier en haut. Tournez-la face au bureau."
28728
29289
  },
28729
29290
  es: {
28730
29291
  Hob: "Placa de cocci\xF3n",
@@ -28752,7 +29313,7 @@ var translations = {
28752
29313
  "Double washbasin": "Lavabo doble",
28753
29314
  Depth: "Fondo",
28754
29315
  Bowls: "Senos",
28755
- "A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Una encimera con sus senos. Tire de sus lados para alargarla o hacerla m\xE1s profunda: los senos y los grifos conservan su tama\xF1o.",
29316
+ "A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Una encimera con sus senos y, debajo, un mueble con cajones o puertas, suspendido o sobre patas, o ninguno. Tire de sus lados para alargarla o hacerla m\xE1s profunda: los senos y los grifos conservan su tama\xF1o.",
28756
29317
  Triple: "Triple",
28757
29318
  "Glazing: Single": "Simple",
28758
29319
  "Glazing: Double": "Doble",
@@ -28802,6 +29363,25 @@ var translations = {
28802
29363
  Radiator: "Radiador",
28803
29364
  "Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "Contra la pared por su parte trasera. Tire de sus lados para alargarlo: sus elementos conservan su anchura. Su llave est\xE1 en un extremo.",
28804
29365
  Valve: "Llave",
29366
+ "On feet": "Sobre patas",
29367
+ "Shower head": "Rociador de ducha",
29368
+ "Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "Fijado a la pared a la altura de su mezclador: una columna con rociador de techo, una barra con su teleducha, o un rociador en su brazo. Sobre un plato de ducha o una ba\xF1era.",
29369
+ "Column": "Columna",
29370
+ "Slide rail": "Barra de ducha",
29371
+ "Fixed head": "Rociador fijo",
29372
+ Toilet: "Inodoro",
29373
+ "Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "Su cisterna va contra la pared. Tire de sus lados para hacerlo m\xE1s ancho o m\xE1s profundo.",
29374
+ "Toilet, wall-hung": "Inodoro suspendido",
29375
+ "Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "Su parte trasera va contra la pared, con la cisterna empotrada. Tire de sus lados para hacerlo m\xE1s ancho o m\xE1s profundo.",
29376
+ "Shower tray": "Plato de ducha",
29377
+ "Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "Contra la pared por un lado. Tire de sus lados para agrandarlo: su borde y su desag\xFCe conservan su tama\xF1o.",
29378
+ "Heat pump, outdoor unit": "Bomba de calor, unidad exterior",
29379
+ "Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "Contra una pared exterior por su parte trasera. Tire de sus lados para alargarla o hacerla m\xE1s profunda. Dele una altura sobre el suelo para ponerla sobre soportes.",
29380
+ "Gas boiler": "Caldera de gas",
29381
+ "Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "Colgada en la pared por su parte trasera, con la salida de humos arriba. Su altura sobre el suelo es la de su parte inferior.",
29382
+ "Water heater": "Calentador de agua",
29383
+ "A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "Un dep\xF3sito redondo contra la pared. Tire de sus lados para agrandarlo. Dele una altura sobre el suelo para colgarlo en la pared.",
29384
+ Diameter: "Di\xE1metro",
28805
29385
  "Base unit": "Mueble bajo",
28806
29386
  "A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "Un mueble de cocina con su encimera, contra la pared: puertas, cajones o un horno, como lo muestran los alzados. Tire de sus lados para ensancharlo.",
28807
29387
  Below: "Debajo",
@@ -28848,7 +29428,8 @@ var translations = {
28848
29428
  "Office chair": "Silla de oficina",
28849
29429
  "Its back goes against the wall. Pull its sides to make it wider or deeper.": "Su respaldo va contra la pared. Tire de sus lados para ensancharlo o hacerlo m\xE1s profundo.",
28850
29430
  "Its back at the top. Turn it to face the table.": "Su respaldo arriba. G\xEDrela hacia la mesa.",
28851
- "Against the wall, with its office chair pulled up to it, or without. Pull its sides to make it wider or deeper.": "Contra la pared, con su silla de oficina delante o sin ella. Tire de sus lados para ensancharlo o hacerlo m\xE1s profundo."
29431
+ "Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "Contra la pared. Tire de sus lados para ensancharlo o hacerlo m\xE1s profundo. Su silla de oficina es un objeto aparte.",
29432
+ "On five casters, its back at the top. Turn it to face the desk.": "Sobre cinco ruedas, su respaldo arriba. G\xEDrela hacia el escritorio."
28852
29433
  },
28853
29434
  de: {
28854
29435
  Hob: "Kochfeld",
@@ -28876,7 +29457,7 @@ var translations = {
28876
29457
  "Double washbasin": "Doppelwaschbecken",
28877
29458
  Depth: "Tiefe",
28878
29459
  Bowls: "Becken",
28879
- "A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Eine Platte mit ihren Becken. Ziehen Sie an den Seiten, um sie l\xE4nger oder tiefer zu machen: Becken und Armaturen behalten ihre Gr\xF6\xDFe.",
29460
+ "A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Eine Platte mit ihren Becken und darunter ein Unterschrank mit Schubladen oder T\xFCren, h\xE4ngend oder auf F\xFC\xDFen, oder keiner. Ziehen Sie an den Seiten, um sie l\xE4nger oder tiefer zu machen: Becken und Armaturen behalten ihre Gr\xF6\xDFe.",
28880
29461
  Triple: "Dreifach",
28881
29462
  "Glazing: Single": "Einfach",
28882
29463
  "Glazing: Double": "Zweifach",
@@ -28926,6 +29507,25 @@ var translations = {
28926
29507
  Radiator: "Heizk\xF6rper",
28927
29508
  "Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "Mit der R\xFCckseite an der Wand. Ziehen Sie an den Seiten, um ihn zu verl\xE4ngern: Seine Glieder behalten ihre Breite. Das Ventil sitzt an einem Ende.",
28928
29509
  Valve: "Ventil",
29510
+ "On feet": "Auf F\xFC\xDFen",
29511
+ "Shower head": "Duschkopf",
29512
+ "Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "An der Wand in der H\xF6he seiner Armatur befestigt: eine Duschs\xE4ule mit Kopfbrause, eine Brausestange mit Handbrause oder ein Kopf an seinem Arm. \xDCber einer Duschwanne oder Badewanne.",
29513
+ "Column": "Duschs\xE4ule",
29514
+ "Slide rail": "Brausestange",
29515
+ "Fixed head": "Fester Kopf",
29516
+ Toilet: "WC",
29517
+ "Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "Der Sp\xFClkasten steht an der Wand. Ziehen Sie an den Seiten, um es breiter oder tiefer zu machen.",
29518
+ "Toilet, wall-hung": "Wand-WC",
29519
+ "Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "Die R\xFCckseite liegt an der Wand, der Sp\xFClkasten in der Wand. Ziehen Sie an den Seiten, um es breiter oder tiefer zu machen.",
29520
+ "Shower tray": "Duschwanne",
29521
+ "Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "Mit einer Seite an der Wand. Ziehen Sie an den Seiten, um sie zu vergr\xF6\xDFern: Rand und Ablauf behalten ihre Gr\xF6\xDFe.",
29522
+ "Heat pump, outdoor unit": "W\xE4rmepumpe, Au\xDFenger\xE4t",
29523
+ "Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "Mit der R\xFCckseite an einer Au\xDFenwand. Ziehen Sie an den Seiten, um es l\xE4nger oder tiefer zu machen. Geben Sie ihm eine H\xF6he \xFCber dem Boden, um es auf Konsolen zu setzen.",
29524
+ "Gas boiler": "Gasheizkessel",
29525
+ "Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "Mit der R\xFCckseite an die Wand geh\xE4ngt, das Abgasrohr oben. Seine H\xF6he \xFCber dem Boden ist die seiner Unterkante.",
29526
+ "Water heater": "Warmwasserspeicher",
29527
+ "A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "Ein runder Speicher an der Wand. Ziehen Sie an den Seiten, um ihn zu vergr\xF6\xDFern. Geben Sie ihm eine H\xF6he \xFCber dem Boden, um ihn an die Wand zu h\xE4ngen.",
29528
+ Diameter: "Durchmesser",
28929
29529
  "Base unit": "Unterschrank",
28930
29530
  "A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "Ein K\xFCchenschrank mit Arbeitsplatte an der Wand: T\xFCren, Schubladen oder ein Backofen, wie die Ansichten ihn zeigen. Ziehen Sie an seinen Seiten, um ihn zu verbreitern.",
28931
29531
  Below: "Darunter",
@@ -28972,7 +29572,8 @@ var translations = {
28972
29572
  "Office chair": "B\xFCrostuhl",
28973
29573
  "Its back goes against the wall. Pull its sides to make it wider or deeper.": "Seine R\xFCckenlehne steht an der Wand. Ziehen Sie an seinen Seiten, um es breiter oder tiefer zu machen.",
28974
29574
  "Its back at the top. Turn it to face the table.": "Die Lehne oben. Drehen Sie ihn zum Tisch.",
28975
- "Against the wall, with its office chair pulled up to it, or without. Pull its sides to make it wider or deeper.": "An der Wand, mit herangezogenem B\xFCrostuhl oder ohne. Ziehen Sie an seinen Seiten, um ihn breiter oder tiefer zu machen."
29575
+ "Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "An der Wand. Ziehen Sie an seinen Seiten, um ihn breiter oder tiefer zu machen. Sein B\xFCrostuhl ist ein eigenes Objekt.",
29576
+ "On five casters, its back at the top. Turn it to face the desk.": "Auf f\xFCnf Rollen, die Lehne oben. Drehen Sie ihn zum Schreibtisch."
28976
29577
  },
28977
29578
  zh: {
28978
29579
  Hob: "\u7076\u53F0",
@@ -29000,7 +29601,7 @@ var translations = {
29000
29601
  "Double washbasin": "\u53CC\u76C6\u6D17\u624B\u53F0",
29001
29602
  Depth: "\u8FDB\u6DF1",
29002
29603
  Bowls: "\u76C6\u6570",
29003
- "A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "\u5E26\u76C6\u7684\u53F0\u9762\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u52A0\u957F\u6216\u52A0\u6DF1\uFF1A\u76C6\u548C\u6C34\u9F99\u5934\u4FDD\u6301\u539F\u5C3A\u5BF8\u3002",
29604
+ "A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "\u5E26\u76C6\u7684\u53F0\u9762\uFF0C\u4E0B\u65B9\u53EF\u914D\u62BD\u5C49\u6216\u95E8\u7684\u6D74\u5BA4\u67DC\uFF0C\u60AC\u6302\u6216\u843D\u5730\u5E26\u811A\uFF0C\u6216\u4E0D\u914D\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u52A0\u957F\u6216\u52A0\u6DF1\uFF1A\u76C6\u548C\u6C34\u9F99\u5934\u4FDD\u6301\u539F\u5C3A\u5BF8\u3002",
29004
29605
  Triple: "\u4E09\u5C42",
29005
29606
  "Glazing: Single": "\u5355\u5C42",
29006
29607
  "Glazing: Double": "\u53CC\u5C42",
@@ -29050,6 +29651,25 @@ var translations = {
29050
29651
  Radiator: "\u6696\u6C14\u7247",
29051
29652
  "Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "\u80CC\u9762\u9760\u5899\u3002\u62D6\u52A8\u4E24\u4FA7\u53EF\u5C06\u5176\u52A0\u957F\uFF0C\u5404\u7247\u5BBD\u5EA6\u4E0D\u53D8\u3002\u9600\u95E8\u5728\u4E00\u7AEF\u3002",
29052
29653
  Valve: "\u9600\u95E8",
29654
+ "On feet": "\u843D\u5730\u5E26\u811A",
29655
+ "Shower head": "\u82B1\u6D12",
29656
+ "Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "\u6309\u6DF7\u6C34\u9600\u9AD8\u5EA6\u56FA\u5B9A\u5728\u5899\u4E0A\uFF1A\u5E26\u9876\u55B7\u7684\u82B1\u6D12\u67F1\u3001\u5E26\u624B\u6301\u82B1\u6D12\u7684\u5347\u964D\u6746\uFF0C\u6216\u88C5\u5728\u81C2\u4E0A\u7684\u56FA\u5B9A\u82B1\u6D12\u3002\u7528\u4E8E\u6DCB\u6D74\u5E95\u76D8\u6216\u6D74\u7F38\u4E0A\u65B9\u3002",
29657
+ "Column": "\u82B1\u6D12\u67F1",
29658
+ "Slide rail": "\u5347\u964D\u6746",
29659
+ "Fixed head": "\u56FA\u5B9A\u82B1\u6D12",
29660
+ Toilet: "\u5750\u4FBF\u5668",
29661
+ "Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "\u6C34\u7BB1\u9760\u5899\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u52A0\u5BBD\u6216\u52A0\u6DF1\u3002",
29662
+ "Toilet, wall-hung": "\u58C1\u6302\u5F0F\u5750\u4FBF\u5668",
29663
+ "Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "\u80CC\u9762\u9760\u5899\uFF0C\u6C34\u7BB1\u5D4C\u5728\u5899\u5185\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u52A0\u5BBD\u6216\u52A0\u6DF1\u3002",
29664
+ "Shower tray": "\u6DCB\u6D74\u5E95\u76D8",
29665
+ "Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "\u4E00\u4FA7\u9760\u5899\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u653E\u5927\uFF1A\u8FB9\u6CBF\u548C\u5730\u6F0F\u4FDD\u6301\u5C3A\u5BF8\u3002",
29666
+ "Heat pump, outdoor unit": "\u70ED\u6CF5\u5BA4\u5916\u673A",
29667
+ "Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "\u80CC\u9762\u9760\u5916\u5899\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u52A0\u957F\u6216\u52A0\u6DF1\u3002\u8BBE\u7F6E\u79BB\u5730\u9AD8\u5EA6\u5373\u53EF\u653E\u5728\u652F\u67B6\u4E0A\u3002",
29668
+ "Gas boiler": "\u71C3\u6C14\u9505\u7089",
29669
+ "Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "\u80CC\u9762\u6302\u5728\u5899\u4E0A\uFF0C\u70DF\u9053\u5728\u9876\u90E8\u3002\u5176\u79BB\u5730\u9AD8\u5EA6\u4E3A\u5E95\u9762\u7684\u9AD8\u5EA6\u3002",
29670
+ "Water heater": "\u70ED\u6C34\u5668",
29671
+ "A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "\u9760\u5899\u7684\u5706\u5F62\u6C34\u7BB1\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u653E\u5927\u3002\u8BBE\u7F6E\u79BB\u5730\u9AD8\u5EA6\u5373\u53EF\u6302\u5728\u5899\u4E0A\u3002",
29672
+ Diameter: "\u76F4\u5F84",
29053
29673
  "Base unit": "\u5730\u67DC",
29054
29674
  "A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "\u5E26\u53F0\u9762\u7684\u53A8\u623F\u67DC\uFF0C\u9760\u5899\u653E\u7F6E\uFF1A\u95E8\u3001\u62BD\u5C49\u6216\u70E4\u7BB1\uFF0C\u7ACB\u9762\u4E2D\u53EF\u89C1\u3002\u62D6\u52A8\u4E24\u4FA7\u53EF\u52A0\u5BBD\u3002",
29055
29675
  Below: "\u4E0B\u65B9",
@@ -29096,7 +29716,8 @@ var translations = {
29096
29716
  "Office chair": "\u529E\u516C\u6905",
29097
29717
  "Its back goes against the wall. Pull its sides to make it wider or deeper.": "\u9760\u80CC\u8D34\u5899\u653E\u7F6E\u3002\u62D6\u52A8\u4E24\u4FA7\u53EF\u52A0\u5BBD\u6216\u52A0\u6DF1\u3002",
29098
29718
  "Its back at the top. Turn it to face the table.": "\u9760\u80CC\u5728\u4E0A\u65B9\u3002\u65CB\u8F6C\u4F7F\u5176\u9762\u5411\u684C\u5B50\u3002",
29099
- "Against the wall, with its office chair pulled up to it, or without. Pull its sides to make it wider or deeper.": "\u9760\u5899\u653E\u7F6E\uFF0C\u53EF\u5E26\u62C9\u5230\u684C\u524D\u7684\u529E\u516C\u6905\uFF0C\u4E5F\u53EF\u4E0D\u5E26\u3002\u62D6\u52A8\u4E24\u4FA7\u53EF\u52A0\u5BBD\u6216\u52A0\u6DF1\u3002"
29719
+ "Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "\u9760\u5899\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u52A0\u5BBD\u6216\u52A0\u6DF1\u3002\u529E\u516C\u6905\u662F\u5355\u72EC\u7684\u5BF9\u8C61\u3002",
29720
+ "On five casters, its back at the top. Turn it to face the desk.": "\u4E94\u4E2A\u811A\u8F6E\uFF0C\u9760\u80CC\u671D\u4E0A\u3002\u5C06\u5176\u8F6C\u5411\u4E66\u684C\u3002"
29100
29721
  },
29101
29722
  ja: {
29102
29723
  Hob: "\u30B3\u30F3\u30ED",
@@ -29124,7 +29745,7 @@ var translations = {
29124
29745
  "Double washbasin": "\u30C0\u30D6\u30EB\u30DC\u30A6\u30EB\u6D17\u9762\u53F0",
29125
29746
  Depth: "\u5965\u884C\u304D",
29126
29747
  Bowls: "\u30DC\u30A6\u30EB\u6570",
29127
- "A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "\u30DC\u30A6\u30EB\u4ED8\u304D\u306E\u30AB\u30A6\u30F3\u30BF\u30FC\u3002\u8FBA\u3092\u5F15\u304F\u3068\u9577\u304F\u30FB\u6DF1\u304F\u306A\u308A\u3001\u30DC\u30A6\u30EB\u3068\u6C34\u6813\u306E\u5927\u304D\u3055\u306F\u5909\u308F\u308A\u307E\u305B\u3093\u3002",
29748
+ "A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "\u30DC\u30A6\u30EB\u4ED8\u304D\u306E\u30AB\u30A6\u30F3\u30BF\u30FC\u3002\u4E0B\u306B\u5F15\u304D\u51FA\u3057\u304B\u6249\u306E\u6D17\u9762\u53F0\u4E0B\u53CE\u7D0D\u3092\u3001\u58C1\u639B\u3051\u304B\u811A\u4ED8\u304D\u3067\u4ED8\u3051\u3089\u308C\u307E\u3059\uFF08\u306A\u3057\u3082\u53EF\uFF09\u3002\u8FBA\u3092\u5F15\u304F\u3068\u9577\u304F\u30FB\u6DF1\u304F\u306A\u308A\u3001\u30DC\u30A6\u30EB\u3068\u6C34\u6813\u306E\u5927\u304D\u3055\u306F\u5909\u308F\u308A\u307E\u305B\u3093\u3002",
29128
29749
  Triple: "\u4E09\u5C64",
29129
29750
  "Glazing: Single": "\u5358\u677F",
29130
29751
  "Glazing: Double": "\u8907\u5C64",
@@ -29174,6 +29795,25 @@ var translations = {
29174
29795
  Radiator: "\u30E9\u30B8\u30A8\u30FC\u30BF\u30FC",
29175
29796
  "Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "\u80CC\u9762\u3092\u58C1\u306B\u4ED8\u3051\u3066\u7F6E\u304D\u307E\u3059\u3002\u5074\u9762\u3092\u5F15\u304F\u3068\u9577\u304F\u306A\u308A\u3001\u5404\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u5E45\u306F\u5909\u308F\u308A\u307E\u305B\u3093\u3002\u30D0\u30EB\u30D6\u306F\u4E00\u65B9\u306E\u7AEF\u306B\u3042\u308A\u307E\u3059\u3002",
29176
29797
  Valve: "\u30D0\u30EB\u30D6",
29798
+ "On feet": "\u811A\u4ED8\u304D",
29799
+ "Shower head": "\u30B7\u30E3\u30EF\u30FC\u30D8\u30C3\u30C9",
29800
+ "Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "\u6DF7\u5408\u6C34\u6813\u306E\u9AD8\u3055\u3067\u58C1\u306B\u53D6\u308A\u4ED8\u3051\u307E\u3059\u3002\u30AA\u30FC\u30D0\u30FC\u30D8\u30C3\u30C9\u30B7\u30E3\u30EF\u30FC\u4ED8\u304D\u306E\u30B7\u30E3\u30EF\u30FC\u30D0\u30FC\u3001\u30CF\u30F3\u30C9\u30B7\u30E3\u30EF\u30FC\u4ED8\u304D\u306E\u30B9\u30E9\u30A4\u30C9\u30D0\u30FC\u3001\u307E\u305F\u306F\u30A2\u30FC\u30E0\u4ED8\u304D\u306E\u56FA\u5B9A\u30D8\u30C3\u30C9\u3002\u30B7\u30E3\u30EF\u30FC\u30D1\u30F3\u3084\u6D74\u69FD\u306E\u4E0A\u306B\u3002",
29801
+ "Column": "\u30B7\u30E3\u30EF\u30FC\u30D0\u30FC",
29802
+ "Slide rail": "\u30B9\u30E9\u30A4\u30C9\u30D0\u30FC",
29803
+ "Fixed head": "\u56FA\u5B9A\u30D8\u30C3\u30C9",
29804
+ Toilet: "\u4FBF\u5668",
29805
+ "Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "\u30BF\u30F3\u30AF\u3092\u58C1\u306B\u4ED8\u3051\u307E\u3059\u3002\u8FBA\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u5E45\u3084\u5965\u884C\u304D\u3092\u5909\u3048\u307E\u3059\u3002",
29806
+ "Toilet, wall-hung": "\u58C1\u639B\u3051\u4FBF\u5668",
29807
+ "Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "\u80CC\u9762\u3092\u58C1\u306B\u4ED8\u3051\u3001\u30BF\u30F3\u30AF\u306F\u58C1\u306E\u4E2D\u3067\u3059\u3002\u8FBA\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u5E45\u3084\u5965\u884C\u304D\u3092\u5909\u3048\u307E\u3059\u3002",
29808
+ "Shower tray": "\u30B7\u30E3\u30EF\u30FC\u30D1\u30F3",
29809
+ "Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "\u4E00\u8FBA\u3092\u58C1\u306B\u4ED8\u3051\u307E\u3059\u3002\u8FBA\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u5927\u304D\u304F\u3057\u307E\u3059\u3002\u7E01\u3068\u6392\u6C34\u53E3\u306E\u5927\u304D\u3055\u306F\u5909\u308F\u308A\u307E\u305B\u3093\u3002",
29810
+ "Heat pump, outdoor unit": "\u30D2\u30FC\u30C8\u30DD\u30F3\u30D7\u5BA4\u5916\u6A5F",
29811
+ "Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "\u80CC\u9762\u3092\u5916\u58C1\u306B\u4ED8\u3051\u307E\u3059\u3002\u8FBA\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u9577\u3055\u3084\u5965\u884C\u304D\u3092\u5909\u3048\u307E\u3059\u3002\u5E8A\u304B\u3089\u306E\u9AD8\u3055\u3092\u6307\u5B9A\u3059\u308B\u3068\u67B6\u53F0\u306B\u8F09\u305B\u3089\u308C\u307E\u3059\u3002",
29812
+ "Gas boiler": "\u30AC\u30B9\u30DC\u30A4\u30E9\u30FC",
29813
+ "Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "\u80CC\u9762\u3067\u58C1\u306B\u639B\u3051\u3001\u4E0A\u306B\u6392\u6C17\u7B52\u304C\u3042\u308A\u307E\u3059\u3002\u5E8A\u304B\u3089\u306E\u9AD8\u3055\u306F\u5E95\u9762\u306E\u9AD8\u3055\u3067\u3059\u3002",
29814
+ "Water heater": "\u7D66\u6E6F\u5668",
29815
+ "A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "\u58C1\u969B\u306B\u7F6E\u304F\u5186\u7B52\u5F62\u306E\u30BF\u30F3\u30AF\u3002\u8FBA\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u5927\u304D\u304F\u3057\u307E\u3059\u3002\u5E8A\u304B\u3089\u306E\u9AD8\u3055\u3092\u6307\u5B9A\u3059\u308B\u3068\u58C1\u306B\u639B\u3051\u3089\u308C\u307E\u3059\u3002",
29816
+ Diameter: "\u76F4\u5F84",
29177
29817
  "Base unit": "\u30D9\u30FC\u30B9\u30AD\u30E3\u30D3\u30CD\u30C3\u30C8",
29178
29818
  "A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "\u5929\u677F\u4ED8\u304D\u306E\u30AD\u30C3\u30C1\u30F3\u30AD\u30E3\u30D3\u30CD\u30C3\u30C8\u3002\u58C1\u969B\u306B\u7F6E\u304D\u307E\u3059\u3002\u6249\u3001\u5F15\u304D\u51FA\u3057\u3001\u30AA\u30FC\u30D6\u30F3\u304C\u7ACB\u9762\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u5074\u9762\u3092\u5F15\u3044\u3066\u5E45\u3092\u5E83\u3052\u307E\u3059\u3002",
29179
29819
  Below: "\u4E0B\u90E8",
@@ -29220,7 +29860,8 @@ var translations = {
29220
29860
  "Office chair": "\u30AA\u30D5\u30A3\u30B9\u30C1\u30A7\u30A2",
29221
29861
  "Its back goes against the wall. Pull its sides to make it wider or deeper.": "\u80CC\u3082\u305F\u308C\u3092\u58C1\u306B\u3064\u3051\u3066\u7F6E\u304D\u307E\u3059\u3002\u5074\u9762\u3092\u5F15\u3044\u3066\u5E45\u3084\u5965\u884C\u304D\u3092\u5909\u3048\u307E\u3059\u3002",
29222
29862
  "Its back at the top. Turn it to face the table.": "\u80CC\u3082\u305F\u308C\u304C\u4E0A\u3002\u30C6\u30FC\u30D6\u30EB\u306B\u5411\u3051\u3066\u56DE\u8EE2\u3055\u305B\u307E\u3059\u3002",
29223
- "Against the wall, with its office chair pulled up to it, or without. Pull its sides to make it wider or deeper.": "\u58C1\u969B\u306B\u7F6E\u304D\u3001\u30AA\u30D5\u30A3\u30B9\u30C1\u30A7\u30A2\u3092\u5F15\u304D\u5BC4\u305B\u305F\u72B6\u614B\u3001\u307E\u305F\u306F\u306A\u3057\u3067\u3002\u5074\u9762\u3092\u5F15\u3044\u3066\u5E45\u3084\u5965\u884C\u304D\u3092\u5909\u3048\u307E\u3059\u3002"
29863
+ "Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "\u58C1\u306B\u4ED8\u3051\u307E\u3059\u3002\u8FBA\u3092\u5F15\u304F\u3068\u5E45\u3084\u5965\u884C\u304D\u304C\u5909\u308F\u308A\u307E\u3059\u3002\u30AA\u30D5\u30A3\u30B9\u30C1\u30A7\u30A2\u306F\u5225\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3067\u3059\u3002",
29864
+ "On five casters, its back at the top. Turn it to face the desk.": "\u30AD\u30E3\u30B9\u30BF\u30FC5\u3064\u3001\u80CC\u3082\u305F\u308C\u304C\u4E0A\u3002\u673A\u306E\u65B9\u3078\u5411\u3051\u3066\u304F\u3060\u3055\u3044\u3002"
29224
29865
  },
29225
29866
  ko: {
29226
29867
  Hob: "\uCFE1\uD0D1",
@@ -29248,7 +29889,7 @@ var translations = {
29248
29889
  "Double washbasin": "\uC774\uC911 \uC138\uBA74\uB300",
29249
29890
  Depth: "\uAE4A\uC774",
29250
29891
  Bowls: "\uBCFC \uC218",
29251
- "A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "\uBCFC\uC774 \uC788\uB294 \uCE74\uC6B4\uD130\uC785\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB04C\uC5B4 \uAE38\uAC8C \uB610\uB294 \uAE4A\uAC8C \uB9CC\uB4E4 \uC218 \uC788\uC73C\uBA70, \uBCFC\uACFC \uC218\uC804\uC758 \uD06C\uAE30\uB294 \uADF8\uB300\uB85C\uC785\uB2C8\uB2E4.",
29892
+ "A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "\uBCFC\uC774 \uC788\uB294 \uCE74\uC6B4\uD130\uC774\uBA70, \uC544\uB798\uC5D0 \uC11C\uB78D\uC774\uB098 \uBB38\uC774 \uB2EC\uB9B0 \uD558\uBD80\uC7A5\uC744 \uBCBD\uAC78\uC774 \uB610\uB294 \uB2E4\uB9AC\uD615\uC73C\uB85C \uB450\uAC70\uB098 \uB450\uC9C0 \uC54A\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB04C\uC5B4 \uAE38\uAC8C \uB610\uB294 \uAE4A\uAC8C \uB9CC\uB4E4 \uC218 \uC788\uC73C\uBA70, \uBCFC\uACFC \uC218\uC804\uC758 \uD06C\uAE30\uB294 \uADF8\uB300\uB85C\uC785\uB2C8\uB2E4.",
29252
29893
  Triple: "\uC0BC\uC911",
29253
29894
  "Glazing: Single": "\uB2E8\uD310",
29254
29895
  "Glazing: Double": "\uBCF5\uCE35",
@@ -29298,6 +29939,25 @@ var translations = {
29298
29939
  Radiator: "\uB77C\uB514\uC5D0\uC774\uD130",
29299
29940
  "Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "\uB4B7\uBA74\uC744 \uBCBD\uC5D0 \uBD99\uC785\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB2F9\uAE30\uBA74 \uAE38\uC5B4\uC9C0\uBA70 \uAC01 \uC139\uC158\uC758 \uD3ED\uC740 \uADF8\uB300\uB85C\uC785\uB2C8\uB2E4. \uBC38\uBE0C\uB294 \uD55C\uCABD \uB05D\uC5D0 \uC788\uC2B5\uB2C8\uB2E4.",
29300
29941
  Valve: "\uBC38\uBE0C",
29942
+ "On feet": "\uB2E4\uB9AC\uD615",
29943
+ "Shower head": "\uC0E4\uC6CC\uAE30",
29944
+ "Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "\uC218\uC804 \uB192\uC774\uB85C \uBCBD\uC5D0 \uACE0\uC815\uB429\uB2C8\uB2E4. \uD574\uBC14\uB77C\uAE30 \uC0E4\uC6CC\uAC00 \uC788\uB294 \uC0E4\uC6CC \uAE30\uB465, \uD578\uB4DC \uC0E4\uC6CC\uAC00 \uC788\uB294 \uC2AC\uB77C\uC774\uB4DC \uBC14, \uB610\uB294 \uC554\uC5D0 \uB2EC\uB9B0 \uACE0\uC815 \uD5E4\uB4DC. \uC0E4\uC6CC \uD2B8\uB808\uC774\uB098 \uC695\uC870 \uC704\uC5D0 \uB461\uB2C8\uB2E4.",
29945
+ "Column": "\uC0E4\uC6CC \uAE30\uB465",
29946
+ "Slide rail": "\uC2AC\uB77C\uC774\uB4DC \uBC14",
29947
+ "Fixed head": "\uACE0\uC815 \uD5E4\uB4DC",
29948
+ Toilet: "\uC591\uBCC0\uAE30",
29949
+ "Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "\uBB3C\uD0F1\uD06C\uAC00 \uBCBD\uC5D0 \uBD99\uC2B5\uB2C8\uB2E4. \uBCC0\uC744 \uB04C\uC5B4 \uB113\uD788\uAC70\uB098 \uAE4A\uAC8C \uD558\uC138\uC694.",
29950
+ "Toilet, wall-hung": "\uBCBD\uAC78\uC774 \uC591\uBCC0\uAE30",
29951
+ "Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "\uB4B7\uBA74\uC774 \uBCBD\uC5D0 \uBD99\uACE0 \uBB3C\uD0F1\uD06C\uB294 \uBCBD \uC548\uC5D0 \uC788\uC2B5\uB2C8\uB2E4. \uBCC0\uC744 \uB04C\uC5B4 \uB113\uD788\uAC70\uB098 \uAE4A\uAC8C \uD558\uC138\uC694.",
29952
+ "Shower tray": "\uC0E4\uC6CC \uD2B8\uB808\uC774",
29953
+ "Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "\uD55C \uBCC0\uC774 \uBCBD\uC5D0 \uBD99\uC2B5\uB2C8\uB2E4. \uBCC0\uC744 \uB04C\uC5B4 \uD0A4\uC6B0\uC138\uC694. \uD14C\uB450\uB9AC\uC640 \uBC30\uC218\uAD6C\uB294 \uD06C\uAE30\uAC00 \uC720\uC9C0\uB429\uB2C8\uB2E4.",
29954
+ "Heat pump, outdoor unit": "\uD788\uD2B8\uD38C\uD504 \uC2E4\uC678\uAE30",
29955
+ "Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "\uB4B7\uBA74\uC774 \uC678\uBCBD\uC5D0 \uBD99\uC2B5\uB2C8\uB2E4. \uBCC0\uC744 \uB04C\uC5B4 \uAE38\uAC8C \uD558\uAC70\uB098 \uAE4A\uAC8C \uD558\uC138\uC694. \uBC14\uB2E5\uC5D0\uC11C\uC758 \uB192\uC774\uB97C \uC8FC\uBA74 \uBC1B\uCE68\uB300 \uC704\uC5D0 \uB193\uC785\uB2C8\uB2E4.",
29956
+ "Gas boiler": "\uAC00\uC2A4 \uBCF4\uC77C\uB7EC",
29957
+ "Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "\uB4B7\uBA74\uC73C\uB85C \uBCBD\uC5D0 \uAC78\uB9AC\uACE0 \uC5F0\uB3C4\uB294 \uC704\uC5D0 \uC788\uC2B5\uB2C8\uB2E4. \uBC14\uB2E5\uC5D0\uC11C\uC758 \uB192\uC774\uB294 \uBC11\uBA74\uC758 \uB192\uC774\uC785\uB2C8\uB2E4.",
29958
+ "Water heater": "\uC628\uC218\uAE30",
29959
+ "A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "\uBCBD\uC5D0 \uBD99\uB294 \uC6D0\uD1B5\uD615 \uD0F1\uD06C\uC785\uB2C8\uB2E4. \uBCC0\uC744 \uB04C\uC5B4 \uD0A4\uC6B0\uC138\uC694. \uBC14\uB2E5\uC5D0\uC11C\uC758 \uB192\uC774\uB97C \uC8FC\uBA74 \uBCBD\uC5D0 \uAC78\uB9BD\uB2C8\uB2E4.",
29960
+ Diameter: "\uC9C0\uB984",
29301
29961
  "Base unit": "\uD558\uBD80\uC7A5",
29302
29962
  "A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "\uC0C1\uD310\uC774 \uC788\uB294 \uC8FC\uBC29 \uC218\uB0A9\uC7A5\uC73C\uB85C \uBCBD\uC5D0 \uBD99\uC5EC \uB193\uC2B5\uB2C8\uB2E4. \uBB38, \uC11C\uB78D \uB610\uB294 \uC624\uBE10\uC774 \uC785\uBA74\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB2F9\uACA8 \uB113\uD799\uB2C8\uB2E4.",
29303
29963
  Below: "\uC544\uB798",
@@ -29344,7 +30004,8 @@ var translations = {
29344
30004
  "Office chair": "\uC0AC\uBB34\uC6A9 \uC758\uC790",
29345
30005
  "Its back goes against the wall. Pull its sides to make it wider or deeper.": "\uB4F1\uBC1B\uC774\uB97C \uBCBD\uC5D0 \uBD99\uC5EC \uB193\uC2B5\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB2F9\uACA8 \uB113\uD788\uAC70\uB098 \uAE4A\uAC8C \uD569\uB2C8\uB2E4.",
29346
30006
  "Its back at the top. Turn it to face the table.": "\uB4F1\uBC1B\uC774\uAC00 \uC704\uCABD\uC785\uB2C8\uB2E4. \uD14C\uC774\uBE14\uC744 \uD5A5\uD558\uB3C4\uB85D \uB3CC\uB9AC\uC138\uC694.",
29347
- "Against the wall, with its office chair pulled up to it, or without. Pull its sides to make it wider or deeper.": "\uBCBD\uC5D0 \uBD99\uC5EC \uB193\uC73C\uBA70, \uC0AC\uBB34\uC6A9 \uC758\uC790\uB97C \uB2F9\uACA8 \uB193\uAC70\uB098 \uC5C6\uC774 \uB461\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB2F9\uACA8 \uB113\uD788\uAC70\uB098 \uAE4A\uAC8C \uD569\uB2C8\uB2E4."
30007
+ "Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "\uBCBD\uC5D0 \uBD99\uC2B5\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB04C\uC5B4 \uB113\uD788\uAC70\uB098 \uAE4A\uAC8C \uD558\uC138\uC694. \uC0AC\uBB34\uC6A9 \uC758\uC790\uB294 \uBCC4\uB3C4\uC758 \uAC1D\uCCB4\uC785\uB2C8\uB2E4.",
30008
+ "On five casters, its back at the top. Turn it to face the desk.": "\uBC14\uD034 \uB2E4\uC12F \uAC1C, \uB4F1\uBC1B\uC774\uAC00 \uC704\uCABD\uC785\uB2C8\uB2E4. \uCC45\uC0C1\uC744 \uD5A5\uD558\uB3C4\uB85D \uB3CC\uB9AC\uC138\uC694."
29348
30009
  },
29349
30010
  tr: {
29350
30011
  Hob: "Ocak",
@@ -29372,7 +30033,7 @@ var translations = {
29372
30033
  "Double washbasin": "\xC7ift lavabo",
29373
30034
  Depth: "Derinlik",
29374
30035
  Bowls: "Hazneler",
29375
- "A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Hazneleriyle bir tezg\xE2h. Uzatmak veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin: hazneler ve bataryalar boyutunu korur.",
30036
+ "A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Hazneleriyle bir tezg\xE2h; alt\u0131nda \xE7ekmeceli veya kapakl\u0131, asma ya da ayakl\u0131 bir dolap olabilir ya da hi\xE7 olmayabilir. Uzatmak veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin: hazneler ve bataryalar boyutunu korur.",
29376
30037
  Triple: "\xDC\xE7l\xFC",
29377
30038
  "Glazing: Single": "Tek cam",
29378
30039
  "Glazing: Double": "\xC7ift cam",
@@ -29422,6 +30083,25 @@ var translations = {
29422
30083
  Radiator: "Radyat\xF6r",
29423
30084
  "Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "S\u0131rt\u0131 duvara dayan\u0131r. Uzatmak i\xE7in kenarlar\u0131n\u0131 \xE7ekin: dilimleri geni\u015Fli\u011Fini korur. Vanas\u0131 bir ucundad\u0131r.",
29424
30085
  Valve: "Vana",
30086
+ "On feet": "Ayakl\u0131",
30087
+ "Shower head": "Du\u015F ba\u015Fl\u0131\u011F\u0131",
30088
+ "Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "Bataryas\u0131n\u0131n y\xFCksekli\u011Finde duvara sabitlenir: tepe du\u015Flu bir du\u015F kolonu, el du\u015Flu bir s\xFCrg\xFCl\xFC bar veya kolunda sabit bir ba\u015Fl\u0131k. Bir du\u015F teknesinin ya da k\xFCvetin \xFCst\xFCnde.",
30089
+ "Column": "Kolon",
30090
+ "Slide rail": "S\xFCrg\xFCl\xFC bar",
30091
+ "Fixed head": "Sabit ba\u015Fl\u0131k",
30092
+ Toilet: "Klozet",
30093
+ "Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "Rezervuar\u0131 duvara dayan\u0131r. Geni\u015Fletmek veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin.",
30094
+ "Toilet, wall-hung": "Asma klozet",
30095
+ "Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "Arkas\u0131 duvara dayan\u0131r, rezervuar\u0131 duvar\u0131n i\xE7indedir. Geni\u015Fletmek veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin.",
30096
+ "Shower tray": "Du\u015F teknesi",
30097
+ "Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "Bir kenar\u0131yla duvara dayan\u0131r. B\xFCy\xFCtmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin: kenar\u0131 ve s\xFCzgeci boyutunu korur.",
30098
+ "Heat pump, outdoor unit": "Is\u0131 pompas\u0131, d\u0131\u015F \xFCnite",
30099
+ "Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "Arkas\u0131yla bir d\u0131\u015F duvara dayan\u0131r. Uzatmak veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin. Konsollara oturtmak i\xE7in ona yerden bir y\xFCkseklik verin.",
30100
+ "Gas boiler": "Gaz kombisi",
30101
+ "Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "Arkas\u0131yla duvara as\u0131l\u0131r, bacas\u0131 \xFCst\xFCndedir. Yerden y\xFCksekli\u011Fi alt y\xFCz\xFCn\xFCn y\xFCksekli\u011Fidir.",
30102
+ "Water heater": "Su \u0131s\u0131t\u0131c\u0131",
30103
+ "A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "Duvara dayanan yuvarlak bir tank. B\xFCy\xFCtmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin. Duvara asmak i\xE7in ona yerden bir y\xFCkseklik verin.",
30104
+ Diameter: "\xC7ap",
29425
30105
  "Base unit": "Alt dolap",
29426
30106
  "A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "Tezg\xE2h\u0131yla birlikte duvara dayal\u0131 bir mutfak dolab\u0131: kap\u0131lar, \xE7ekmeceler veya f\u0131r\u0131n, g\xF6r\xFCn\xFC\u015Flerde g\xF6r\xFCld\xFC\u011F\xFC gibi. Geni\u015Fletmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin.",
29427
30107
  Below: "Alt\u0131nda",
@@ -29468,7 +30148,8 @@ var translations = {
29468
30148
  "Office chair": "Ofis sandalyesi",
29469
30149
  "Its back goes against the wall. Pull its sides to make it wider or deeper.": "S\u0131rtl\u0131\u011F\u0131 duvara dayan\u0131r. Geni\u015Fletmek veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin.",
29470
30150
  "Its back at the top. Turn it to face the table.": "S\u0131rtl\u0131\u011F\u0131 \xFCstte. Masaya do\u011Fru \xE7evirin.",
29471
- "Against the wall, with its office chair pulled up to it, or without. Pull its sides to make it wider or deeper.": "Duvara dayal\u0131, \xF6n\xFCne \xE7ekilmi\u015F ofis sandalyesiyle ya da onsuz. Geni\u015Fletmek veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin."
30151
+ "Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "Duvara dayan\u0131r. Geni\u015Fletmek veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin. Ofis sandalyesi ayr\u0131 bir nesnedir.",
30152
+ "On five casters, its back at the top. Turn it to face the desk.": "Be\u015F tekerlekli, s\u0131rtl\u0131\u011F\u0131 \xFCstte. Masaya do\u011Fru \xE7evirin."
29472
30153
  }
29473
30154
  };
29474
30155
 
@@ -29484,6 +30165,7 @@ var architecture = {
29484
30165
  api.registerParametric(tall(washbasin("arch.washbasin", "Washbasin", 600, 450, 1), 850));
29485
30166
  api.registerParametric(tall(washbasin("arch.washbasin.double", "Double washbasin", 1200, 500, 2), 850));
29486
30167
  api.registerParametric(tall(bathtub, 580));
30168
+ for (const kind of [toilet, wallHungToilet, showerTray, showerHead]) api.registerParametric(kind);
29487
30169
  api.registerParametric(tall(hob, 900));
29488
30170
  api.registerParametric(tall(sink, 900));
29489
30171
  api.registerParametric(tall(fridge("arch.fridge", "Fridge", 600, 650, 1, 1850), 1850));
@@ -29493,8 +30175,9 @@ var architecture = {
29493
30175
  api.registerParametric(hood);
29494
30176
  api.registerParametric(splashback);
29495
30177
  api.registerParametric(tall(cornerSofa, 850, false));
29496
- for (const kind of [sofa("arch.sofa", "Sofa", 1600, 2), sofa("arch.armchair", "Armchair", 850, 1), chair, desk]) api.registerParametric(kind);
30178
+ for (const kind of [sofa("arch.sofa", "Sofa", 1600, 2), sofa("arch.armchair", "Armchair", 850, 1), chair, desk, officeChair]) api.registerParametric(kind);
29497
30179
  api.registerParametric(tall(radiator, RADIATOR_TOP));
30180
+ for (const kind of [heatPump, gasBoiler, waterHeater]) api.registerParametric(kind);
29498
30181
  api.registerParametric(compass);
29499
30182
  api.registerCommand({
29500
30183
  id: "arch.room",
@@ -30357,7 +31040,7 @@ var furniture_default = {
30357
31040
  formatVersion: 1,
30358
31041
  id: "opencalque.furniture",
30359
31042
  name: "Adjustable furniture",
30360
- version: "1.6.0",
31043
+ version: "1.7.0",
30361
31044
  author: "OpenCalque",
30362
31045
  description: "Tables, beds and shelving whose size and number of seats or bays you set.",
30363
31046
  translations: {
@@ -30365,7 +31048,8 @@ var furniture_default = {
30365
31048
  "Adjustable furniture": "Mobilier ajustable",
30366
31049
  "Tables, beds and shelving whose size and number of seats or bays you set.": "Tables, lits et \xE9tag\xE8res dont vous r\xE9glez la taille et le nombre de places ou de trav\xE9es.",
30367
31050
  "Table with chairs": "Table avec chaises",
30368
- Bed: "Lit",
31051
+ "Single bed": "Lit simple",
31052
+ "Double bed": "Lit double",
30369
31053
  "Shelving unit": "\xC9tag\xE8re",
30370
31054
  Length: "Longueur",
30371
31055
  Width: "Largeur",
@@ -30377,7 +31061,8 @@ var furniture_default = {
30377
31061
  "Adjustable furniture": "Mobiliario ajustable",
30378
31062
  "Tables, beds and shelving whose size and number of seats or bays you set.": "Mesas, camas y estanter\xEDas cuyo tama\xF1o y n\xFAmero de plazas o m\xF3dulos usted define.",
30379
31063
  "Table with chairs": "Mesa con sillas",
30380
- Bed: "Cama",
31064
+ "Single bed": "Cama individual",
31065
+ "Double bed": "Cama doble",
30381
31066
  "Shelving unit": "Estanter\xEDa",
30382
31067
  Length: "Longitud",
30383
31068
  Width: "Ancho",
@@ -30389,7 +31074,8 @@ var furniture_default = {
30389
31074
  "Adjustable furniture": "Anpassbare M\xF6bel",
30390
31075
  "Tables, beds and shelving whose size and number of seats or bays you set.": "Tische, Betten und Regale, deren Gr\xF6\xDFe und Anzahl der Pl\xE4tze oder Felder Sie festlegen.",
30391
31076
  "Table with chairs": "Tisch mit St\xFChlen",
30392
- Bed: "Bett",
31077
+ "Single bed": "Einzelbett",
31078
+ "Double bed": "Doppelbett",
30393
31079
  "Shelving unit": "Regal",
30394
31080
  Length: "L\xE4nge",
30395
31081
  Width: "Breite",
@@ -30401,7 +31087,8 @@ var furniture_default = {
30401
31087
  "Adjustable furniture": "\u53EF\u8C03\u5BB6\u5177",
30402
31088
  "Tables, beds and shelving whose size and number of seats or bays you set.": "\u53EF\u8BBE\u7F6E\u5C3A\u5BF8\u53CA\u5EA7\u4F4D\u6570\u6216\u683C\u6570\u7684\u684C\u5B50\u3001\u5E8A\u548C\u7F6E\u7269\u67B6\u3002",
30403
31089
  "Table with chairs": "\u684C\u6905",
30404
- Bed: "\u5E8A",
31090
+ "Single bed": "\u5355\u4EBA\u5E8A",
31091
+ "Double bed": "\u53CC\u4EBA\u5E8A",
30405
31092
  "Shelving unit": "\u7F6E\u7269\u67B6",
30406
31093
  Length: "\u957F\u5EA6",
30407
31094
  Width: "\u5BBD\u5EA6",
@@ -30413,7 +31100,8 @@ var furniture_default = {
30413
31100
  "Adjustable furniture": "\u30B5\u30A4\u30BA\u53EF\u5909\u306E\u5BB6\u5177",
30414
31101
  "Tables, beds and shelving whose size and number of seats or bays you set.": "\u30B5\u30A4\u30BA\u3084\u5E2D\u6570\u30FB\u68DA\u306E\u6570\u3092\u8A2D\u5B9A\u3067\u304D\u308B\u30C6\u30FC\u30D6\u30EB\u3001\u30D9\u30C3\u30C9\u3001\u68DA\u3002",
30415
31102
  "Table with chairs": "\u30C6\u30FC\u30D6\u30EB\u3068\u3044\u3059",
30416
- Bed: "\u30D9\u30C3\u30C9",
31103
+ "Single bed": "\u30B7\u30F3\u30B0\u30EB\u30D9\u30C3\u30C9",
31104
+ "Double bed": "\u30C0\u30D6\u30EB\u30D9\u30C3\u30C9",
30417
31105
  "Shelving unit": "\u68DA",
30418
31106
  Length: "\u9577\u3055",
30419
31107
  Width: "\u5E45",
@@ -30425,7 +31113,8 @@ var furniture_default = {
30425
31113
  "Adjustable furniture": "\uD06C\uAE30 \uC870\uC808 \uAC00\uAD6C",
30426
31114
  "Tables, beds and shelving whose size and number of seats or bays you set.": "\uD06C\uAE30\uC640 \uC88C\uC11D \uC218 \uB610\uB294 \uCE78 \uC218\uB97C \uC815\uD560 \uC218 \uC788\uB294 \uD14C\uC774\uBE14, \uCE68\uB300, \uC120\uBC18.",
30427
31115
  "Table with chairs": "\uD14C\uC774\uBE14\uACFC \uC758\uC790",
30428
- Bed: "\uCE68\uB300",
31116
+ "Single bed": "\uC2F1\uAE00 \uCE68\uB300",
31117
+ "Double bed": "\uB354\uBE14 \uCE68\uB300",
30429
31118
  "Shelving unit": "\uC120\uBC18",
30430
31119
  Length: "\uAE38\uC774",
30431
31120
  Width: "\uB108\uBE44",
@@ -30437,7 +31126,8 @@ var furniture_default = {
30437
31126
  "Adjustable furniture": "Ayarlanabilir mobilya",
30438
31127
  "Tables, beds and shelving whose size and number of seats or bays you set.": "Boyutunu ve oturma yeri ya da b\xF6lme say\u0131s\u0131n\u0131 ayarlad\u0131\u011F\u0131n\u0131z masalar, yataklar ve raflar.",
30439
31128
  "Table with chairs": "Sandalyeli masa",
30440
- Bed: "Yatak",
31129
+ "Single bed": "Tek ki\u015Filik yatak",
31130
+ "Double bed": "\xC7ift ki\u015Filik yatak",
30441
31131
  "Shelving unit": "Raf \xFCnitesi",
30442
31132
  Length: "Uzunluk",
30443
31133
  Width: "Geni\u015Flik",
@@ -30551,11 +31241,63 @@ var furniture_default = {
30551
31241
  { repeat: { count: "max(1, floor(seats / 2))" }, path: [["(i + 0.5) * length / max(1, floor(seats / 2)) - 200", -750], ["(i + 0.5) * length / max(1, floor(seats / 2)) - 200", -900], ["(i + 0.5) * length / max(1, floor(seats / 2)) + 200", -900], ["(i + 0.5) * length / max(1, floor(seats / 2)) + 200", -750]] }
30552
31242
  ]
30553
31243
  },
31244
+ {
31245
+ kind: "furn.bed.single",
31246
+ mount: { on: "floor" },
31247
+ height: "500",
31248
+ category: "bedroom",
31249
+ label: "Single bed",
31250
+ params: [
31251
+ { key: "width", label: "Width", type: "number", default: 900, unit: "length" },
31252
+ { key: "length", label: "Length", type: "number", default: 1900, unit: "length" }
31253
+ ],
31254
+ box: { width: "width", height: "length" },
31255
+ draw: [
31256
+ { closed: true, radius: 25, path: [[0, 0], ["width", 0], ["width", "length"], [0, "length"]] },
31257
+ { path: [[0, 50], ["width", 50]] },
31258
+ {
31259
+ repeat: { count: "width >= 1400 ? 2 : 1" },
31260
+ closed: true,
31261
+ radius: 90,
31262
+ path: [
31263
+ ["80 + i * ((width - 160 - ((width >= 1400 ? 2 : 1) - 1) * 60) / (width >= 1400 ? 2 : 1) + 60)", 100],
31264
+ ["80 + i * ((width - 160 - ((width >= 1400 ? 2 : 1) - 1) * 60) / (width >= 1400 ? 2 : 1) + 60) + max(1, (width - 160 - ((width >= 1400 ? 2 : 1) - 1) * 60) / (width >= 1400 ? 2 : 1))", 100],
31265
+ ["80 + i * ((width - 160 - ((width >= 1400 ? 2 : 1) - 1) * 60) / (width >= 1400 ? 2 : 1) + 60) + max(1, (width - 160 - ((width >= 1400 ? 2 : 1) - 1) * 60) / (width >= 1400 ? 2 : 1))", 480],
31266
+ ["80 + i * ((width - 160 - ((width >= 1400 ? 2 : 1) - 1) * 60) / (width >= 1400 ? 2 : 1) + 60)", 480]
31267
+ ]
31268
+ },
31269
+ { path: [[0, 620], ["width - min(500, width * 0.3)", 620]] },
31270
+ {
31271
+ closed: true,
31272
+ path: [
31273
+ ["width - min(500, width * 0.3)", 620],
31274
+ ["width", "620 + min(500, width * 0.3)"],
31275
+ ["width - min(500, width * 0.3)", "620 + min(500, width * 0.3)"]
31276
+ ]
31277
+ }
31278
+ ],
31279
+ front: [
31280
+ { closed: true, path: [[0, 0], [60, 0], [60, -100], [0, -100]] },
31281
+ { closed: true, path: [["width - 60", 0], ["width", 0], ["width", -100], ["width - 60", -100]] },
31282
+ { closed: true, path: [[0, -100], ["width", -100], ["width", -300], [0, -300]] },
31283
+ { radius: 40, closed: true, path: [[10, -300], ["width - 10", -300], ["width - 10", -500], [10, -500]] },
31284
+ { path: [[0, -500], [0, -1e3], ["width", -1e3], ["width", -500]] }
31285
+ ],
31286
+ side: [
31287
+ { closed: true, path: [[0, 0], [50, 0], [50, -1e3], [0, -1e3]] },
31288
+ { closed: true, path: [[50, -100], ["length", -100], ["length", -300], [50, -300]] },
31289
+ { closed: true, path: [[50, 0], [110, 0], [110, -100], [50, -100]] },
31290
+ { closed: true, path: [["length - 60", 0], ["length", 0], ["length", -100], ["length - 60", -100]] },
31291
+ { radius: 40, closed: true, path: [[60, -300], ["length - 10", -300], ["length - 10", -500], [60, -500]] },
31292
+ { radius: 40, closed: true, path: [[100, -500], [480, -500], [480, -590], [100, -590]] }
31293
+ ]
31294
+ },
30554
31295
  {
30555
31296
  kind: "furn.bed",
31297
+ mount: { on: "floor" },
30556
31298
  height: "500",
30557
31299
  category: "bedroom",
30558
- label: "Bed",
31300
+ label: "Double bed",
30559
31301
  params: [
30560
31302
  { key: "width", label: "Width", type: "number", default: 1600, unit: "length" },
30561
31303
  { key: "length", label: "Length", type: "number", default: 2e3, unit: "length" }