{
  "version": 3,
  "sources": ["/cdn/shop/t/17/assets/configurator-gunite-lib.js?revision=3d012a73"],
  "sourcesContent": ["/* =============================================================================\n   GUNITE POOL -- assets/configurator-gunite-lib.js\n\n   One file, two parts, built like the bunker and the geodesic dome:\n     1. configureGunite(C), right here -- the pool itself: its outline, the\n        shapes, the two plan modes and the shell, the water and the coping.\n     2. Below it, the ADU lib unchanged but for its name. It carries the house\n        line's infrastructure -- the core boot, wizard, rail, budget bridge,\n        PDF, AR, sharing -- and calls configureGunite(__CORE) where the dome\n        calls its own. configureGunite replaces the ADU's boot, so not one ADU\n        layer is registered: only the pool's own.\n\n   Marek 2026-11-04 18:08: the UI as on the houses -- a choice of floorplans =\n   shapes, then editable, the scale apart from the shape by drag points; a\n   product of its own. 17:27: the floor sloped from the shallow to the deep end\n   with a rounded transition into the wall; steps as a sector along the curve.\n\n   THE OUTLINE. d.nodes are the control points, -1..1 across the footprint:\n   [x, z, smooth, straightToNext]. A sharp node is a corner; a smooth one has a\n   tangent; a segment marked straight stays a line, and a smooth node beside it\n   takes its direction. From them STATE.polygon, the dense ring every part of\n   the model and the core's plan read, is worked out before each build, so the\n   footprint's grips scale the whole shape and the nodes change the shape.\n\n   THE POLYGON IS THE WATER'S EDGE, the inside face of the shell: a pool is\n   sized by its water (a 15 x 30 ft pool has 15 x 30 ft of water). The plan\n   draws the shell and the coping past it (__PROD._planOut).\n   ============================================================================= */\n(function (global) {\n  'use strict';\n  global.configureGunite = function (C) {\n    var A = C.API, S = C.STATE, P = C.__PROD;\n    var VERSION = 'gunite-v16';\n    var mounted = false;\n    var FT = 0.3048, IN = 0.0254;\n\n    /* ---- the labels: the router's LEVA_I18N_X first, then the core's ---- */\n    function tr(k, fallback) {\n      var X = global.LEVA_I18N_X, v = X ? X[k] : null;\n      if (typeof v === 'string' && v && v.indexOf('ranslation missing') < 0) return v;\n      try { v = C._t(k, ''); } catch (e) { v = ''; }\n      return v || fallback || k;\n    }\n    function log(s) { try { C._log('GUNITE ' + s); } catch (e) {} }\n\n    /* ---- THE SHAPES ----------------------------------------------------\n       ft: the size it is laid out at, in US feet; m: in metres. The long side\n       along x. A node: [x, z, smooth, straight to the next]. */\n    var CN = 0, SM = 1;\n    var SHAPES = {\n      rectangle: { ft: [32, 16], m: [10, 5], key: 'pool_shape_rectangle', name: 'Rectangle',\n                   n: [[-1, -1, CN, 1], [1, -1, CN, 1], [1, 1, CN, 1], [-1, 1, CN, 1]] },\n      roman:     { ft: [32, 16], m: [10, 5], key: 'pool_shape_roman', name: 'Roman',\n                   n: [[-.76, -1, CN, 1], [.76, -1, CN, 1], [.76, -.52, CN, 0], [1, 0, SM, 0], [.76, .52, CN, 1], [.76, 1, CN, 1],\n                       [-.76, 1, CN, 1], [-.76, .52, CN, 0], [-1, 0, SM, 0], [-.76, -.52, CN, 1]] },\n      grecian:   { ft: [32, 16], m: [10, 5], key: 'pool_shape_grecian', name: 'Grecian',\n                   n: [[-.72, -1, CN, 1], [.72, -1, CN, 1], [1, -.52, CN, 1], [1, .52, CN, 1], [.72, 1, CN, 1], [-.72, 1, CN, 1], [-1, .52, CN, 1], [-1, -.52, CN, 1]] },\n      oval:      { ft: [30, 15], m: [10, 5], key: 'pool_shape_oval', name: 'Oval',\n                   n: [[-.52, -1, SM, 1], [.52, -1, SM, 0], [1, 0, SM, 0], [.52, 1, SM, 1], [-.52, 1, SM, 0], [-1, 0, SM, 0]] },\n      kidney:    { ft: [30, 15], m: [9, 4.5], key: 'pool_shape_kidney', name: 'Kidney',\n                   n: [[-1,-.03,SM,0],[-.72,-.80,SM,0],[.1,-.92,SM,0],[.82,-.61,SM,0],[1,.18,SM,0],[.62,.88,SM,0],[-.12,.48,SM,0],[-.72,.50,SM,0]] },\n      lshape:    { ft: [32, 20], m: [10, 6], key: 'pool_shape_l', name: 'L-Shape',\n                   n: [[-1, -1, CN, 1], [1, -1, CN, 1], [1, .1, CN, 1], [-.1, .1, CN, 1], [-.1, 1, CN, 1], [-1, 1, CN, 1]] },\n      figure8:   { ft: [32, 16], m: [10, 5], key: 'pool_shape_figure8', name: 'Figure 8',\n                   n: [[-1, 0, SM, 0], [-.56, -1, SM, 0], [-.04, -.56, SM, 0], [.5, -1, SM, 0], [1, 0, SM, 0], [.5, 1, SM, 0], [-.04, .56, SM, 0], [-.56, 1, SM, 0]] },\n      freeform:  { ft: [34, 18], m: [10.5, 5.5], key: 'pool_shape_freeform', name: 'Freeform',\n                   n: [[-1, -.2, SM, 0], [-.5, -1, SM, 0], [.1, -.62, SM, 0], [.72, -.92, SM, 0], [1, -.1, SM, 0], [.56, .5, SM, 0], [.3, 1, SM, 0], [-.3, .62, SM, 0], [-.82, .72, SM, 0]] }\n    };\n    SHAPES.roundrect = {ft:[32,16],m:[10,5],key:'pool_shape_roundrect',name:'Rounded rectangle',\n      n:[[-.65,-1,SM,1],[.65,-1,SM,0],[1,-.30,SM,1],[1,.30,SM,0],[.65,1,SM,1],[-.65,1,SM,0],[-1,.30,SM,1],[-1,-.30,SM,0]]};\n    SHAPES.lap = {ft:[48,10], m:[15,3], key:'pool_shape_lap', name:'Lap pool', n:SHAPES.rectangle.n};\n    var SHAPE_ORDER = ['rectangle','roundrect','roman','grecian','oval','kidney','lshape','figure8','freeform','lap'];\n    var LIM = { min: 8 * FT, maxW: 60 * FT, maxL: 60 * FT };\n    function clone(n) { return n.map(function (q) { return q.slice(); }); }\n\n    var newPool=false;\n    function settings() {\n      S.product = S.product || {};\n      var d = S.product.gunite;\n      if (!d || typeof d !== 'object') {d = S.product.gunite = { v: 1 };newPool=true;}\n      if (!SHAPES[d.shape]) d.shape = 'kidney';\n      if (!Array.isArray(d.nodes) || d.nodes.length < 3) d.nodes = clone(SHAPES[d.shape].n);\n      if(d.shape==='kidney' && oldKidney(d.nodes)){\n        var mirrored=d.nodes[0][0]>d.nodes[1][0];\n        d.nodes=clone(SHAPES.kidney.n);\n        if(mirrored)d.nodes.reverse().forEach(function(p){p[0]=-p[0];});\n      }\n      if (['shape', 'steps', 'kids', 'relax'].indexOf(d.mode) < 0) d.mode = 'size';\n      if (!d.sectors || typeof d.sectors !== 'object') d.sectors = {};\n      if(d.sectors.steps)d.sectors.steps.toe=true;\n      /* the depths as a builder says them in each system: 3 ft 6 to 6 ft, 1.1 to 1.8 m */\n      if (!(d.shallow > 0)) d.shallow = (S.isMetric === false) ? 3.5 * FT : 1.1;\n      if (!(d.deep > 0)) d.deep = (S.isMetric === false) ? 6 * FT : 1.8;\n      return d;\n    }\n\n    /* ---- THE OUTLINE, FROM THE NODES ------------------------------------ */\n    function unit(a, b) { var l = Math.hypot(a, b) || 1; return [a / l, b / l]; }\n    /* world nodes [x, z, smooth, straight] to a dense clockwise ring: one point\n       per node (ctrl says where) and points along each curved segment. The\n       handle's length is the one that makes a circular arc of the turn. */\n    var MAX_SEG = 0.25;\n    var LEGACY_KIDNEY=[[-1,.02],[-.62,-.84],[.18,-1],[.86,-.62],[1,.18],[.62,.92],[.1,.66],[-.34,.36],[-.72,.72]];\n    function oldKidney(nodes) {\n      if(nodes.length!==LEGACY_KIDNEY.length)return false;\n      return [false,true].some(function(mirror){\n        var ref=LEGACY_KIDNEY.map(function(_,i){\n          var p=LEGACY_KIDNEY[mirror?nodes.length-1-i:i];return [mirror?-p[0]:p[0],p[1]];\n        });\n        var a=boxOf(nodes),b=boxOf(ref);\n        return nodes.every(function(p,i){return p[2]===SM && !p[3] &&\n          Math.abs((p[0]-a.x0)/a.w-(ref[i][0]-b.x0)/b.w)<0.0001 &&\n          Math.abs((p[1]-a.z0)/a.l-(ref[i][1]-b.z0)/b.l)<0.0001;});\n      });\n    }\n    // Periodic chord-length cubic interpolation. Solve for derivatives at the\n    // knots so both the tangent and curvature match across every smooth join.\n    function smoothRing(nodes) {\n      var n=nodes.length, lengths=nodes.map(function(p,i){var q=nodes[(i+1)%n];return Math.max(1e-5,Math.hypot(q[0]-p[0],q[1]-p[1]));});\n      var slopes=nodes.map(function(){return [0,0];});\n      for(var pass=0;pass<24;pass++){\n        slopes=nodes.map(function(p,i){\n          var j=(i+n-1)%n,k=(i+1)%n,l=lengths[j],r=lengths[i];\n          return [0,1].map(function(ax){return (3*(r*(p[ax]-nodes[j][ax])/l+l*(nodes[k][ax]-p[ax])/r)-\n            r*slopes[j][ax]-l*slopes[k][ax])/(2*(l+r));});\n        });\n      }\n      var poly=[],ctrl=[];\n      nodes.forEach(function(p,i){\n        var j=(i+1)%n,h=lengths[i],steps=Math.max(8,Math.ceil(h/0.12));\n        ctrl.push(poly.length);\n        for(var k=0;k<steps;k++){\n          var t=k/steps,t2=t*t,t3=t2*t;\n          poly.push([0,1].map(function(ax){return (2*t3-3*t2+1)*p[ax]+(t3-2*t2+t)*h*slopes[i][ax]+\n            (-2*t3+3*t2)*nodes[j][ax]+(t3-t2)*h*slopes[j][ax];}));\n        }\n      });\n      return {poly:poly,ctrl:ctrl};\n    }\n    function tessellate(N) {\n      if(N.length>=3 && N.every(function(p){return p[2] && !p[3];}))return smoothRing(N);\n      var n = N.length, out = [], ctrl = [], i;\n      function pt(i) { return N[((i % n) + n) % n]; }\n      function tan(i) {\n        var a = pt(i - 1), b = pt(i), c = pt(i + 1);\n        if (!b[2]) return null;\n        if (a[3]) return unit(b[0] - a[0], b[1] - a[1]);\n        if (b[3]) return unit(c[0] - b[0], c[1] - b[1]);\n        var d0 = Math.hypot(b[0] - a[0], b[1] - a[1]), d1 = Math.hypot(c[0] - b[0], c[1] - b[1]);\n        var u0 = unit(b[0] - a[0], b[1] - a[1]), u1 = unit(c[0] - b[0], c[1] - b[1]);\n        return unit(u0[0] * d1 + u1[0] * d0, u0[1] * d1 + u1[1] * d0);\n      }\n      for (i = 0; i < n; i++) {\n        var a = pt(i), b = pt(i + 1), s;\n        ctrl.push(out.length);\n        out.push([a[0], a[1]]);\n        if (a[3]) continue;\n        var cx = b[0] - a[0], cz = b[1] - a[1], cl = Math.hypot(cx, cz);\n        if (cl < 1e-6) continue;\n        var cu = [cx / cl, cz / cl], t0 = tan(i), t1 = tan(i + 1);\n        var mir = function (t) { var d = 2 * (t[0] * cu[0] + t[1] * cu[1]); return [d * cu[0] - t[0], d * cu[1] - t[1]]; };\n        if (!t0 && t1) t0 = mir(t1);\n        if (!t1 && t0) t1 = mir(t0);\n        t0 = t0 || cu; t1 = t1 || cu;\n        var th = Math.abs(Math.atan2(t0[0] * cu[1] - t0[1] * cu[0], t0[0] * cu[0] + t0[1] * cu[1])) +\n                 Math.abs(Math.atan2(cu[0] * t1[1] - cu[1] * t1[0], cu[0] * t1[0] + cu[1] * t1[1]));\n        var h = (th < 1e-3) ? cl / 3 : (4 / 3) * Math.tan(th / 4) * cl / (2 * Math.sin(th / 2));\n        var c0 = [a[0] + t0[0] * h, a[1] + t0[1] * h], c1 = [b[0] - t1[0] * h, b[1] - t1[1] * h];\n        var steps = Math.max(4, Math.ceil(cl * (1 + th / 2) / Math.min(MAX_SEG,0.12)));\n        for (s = 1; s < steps; s++) {\n          var t = s / steps, m = 1 - t;\n          out.push([m * m * m * a[0] + 3 * m * m * t * c0[0] + 3 * m * t * t * c1[0] + t * t * t * b[0],\n                    m * m * m * a[1] + 3 * m * m * t * c0[1] + 3 * m * t * t * c1[1] + t * t * t * b[1]]);\n        }\n      }\n      return { poly: out, ctrl: ctrl };\n    }\n    function boxOf(p) {\n      var x0 = 1e9, x1 = -1e9, z0 = 1e9, z1 = -1e9, i;\n      for (i = 0; i < p.length; i++) { x0 = Math.min(x0, p[i][0]); x1 = Math.max(x1, p[i][0]); z0 = Math.min(z0, p[i][1]); z1 = Math.max(z1, p[i][1]); }\n      return { x0: x0, x1: x1, z0: z0, z1: z1, w: x1 - x0, l: z1 - z0, cx: (x0 + x1) / 2, cz: (z0 + z1) / 2 };\n    }\n    /* the ring crossing itself: a dragged node may not do that */\n    function selfHits(p) {\n      var n = p.length, i, j;\n      function o(a, b, c) { return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]); }\n      for (i = 0; i < n; i++) for (j = i + 2; j < n; j++) {\n        if (i === 0 && j === n - 1) continue;\n        var a = p[i], b = p[(i + 1) % n], c = p[j], d = p[(j + 1) % n];\n        if (o(a, b, c) * o(a, b, d) < 0 && o(c, d, a) * o(c, d, b) < 0) return true;\n      }\n      return false;\n    }\n    /* the world nodes for this footprint: scaled by the footprint and on the\n       origin; a footprint drag therefore scales the whole shape */\n    function worldNodes() {\n      var d = settings(), hw = S.footprint.w / 2, hl = S.footprint.l / 2, ox = S.origin.x, oz = S.origin.z;\n      return d.nodes.map(function (q) { return [ox + q[0] * hw, oz + q[1] * hl, q[2], q[3]]; });\n    }\n    /* the ring, its box fitted to the footprint exactly: the nodes are\n       normalised to the ring's box, so the fit moves nothing unless the\n       footprint has just been scaled, and then only by the curve's rounding */\n    var _ring = null, _ringKey = '';\n    function ring() {\n      var d = settings(), key = JSON.stringify(d.nodes) + '|' + S.footprint.w + '|' + S.footprint.l + '|' + S.origin.x + '|' + S.origin.z;\n      if (_ring && _ringKey === key) return _ring;\n      var T = tessellate(worldNodes()), B = boxOf(T.poly), hw = S.footprint.w / 2, hl = S.footprint.l / 2, ox = S.origin.x, oz = S.origin.z;\n      var sx = B.w > 1e-6 ? S.footprint.w / B.w : 1, sz = B.l > 1e-6 ? S.footprint.l / B.l : 1;\n      var poly = T.poly.map(function (p) {\n        return [ox + (p[0] - B.cx) * sx, oz + (p[1] - B.cz) * sz];\n      });\n      _ring = { poly: poly, ctrl: T.ctrl };\n      _ringKey = key;\n      return _ring;\n    }\n    /* a set of world nodes back into the settings: the footprint and the origin\n       become the ring's box, the nodes are stored across it */\n    function setWorld(W) {\n      var d = settings(), T = tessellate(W), B = boxOf(T.poly);\n      if (B.w < LIM.min - 1e-6 || B.l < LIM.min - 1e-6 || B.w > LIM.maxW + 1e-6 || B.l > LIM.maxL + 1e-6) return false;\n      if (selfHits(T.poly)) return false;\n      S.footprint = { w: Math.round(B.w * 10000) / 10000, l: Math.round(B.l * 10000) / 10000 };\n      S.origin.x = B.cx; S.origin.z = B.cz;\n      d.nodes = W.map(function (q) { return [(q[0] - B.cx) / (S.footprint.w / 2), (q[1] - B.cz) / (S.footprint.l / 2), q[2], q[3]]; });\n      return true;\n    }\n    /* a shape laid out at its own size, in the page's units; mirror turns it\n       over across its short axis */\n    function applyShape(key, mirror) {\n      var d = settings(), Sh = SHAPES[key] || SHAPES.kidney, n = clone(Sh.n), us = S.isMetric === false;\n      if (mirror) {\n        var m = n.length, flip = [], i;\n        for (i = m - 1; i >= 0; i--) flip.push([-n[i][0], n[i][1], n[i][2], n[(i - 1 + m) % m][3]]);\n        n = flip;\n      }\n      d.shape = SHAPES[key] ? key : 'kidney';\n      S.footprint = { w: us ? Sh.ft[0] * FT : Sh.m[0], l: us ? Sh.ft[1] * FT : Sh.m[1] };\n      S.origin.x = 0; S.origin.z = 0;\n      /* store across the ring's box, not the nodes': a curve can pass the nodes */\n      var hw = S.footprint.w / 2, hl = S.footprint.l / 2;\n      if (!setWorld(n.map(function (q) { return [q[0] * hw, q[1] * hl, q[2], q[3]]; }))) d.nodes = n;\n      if (S.footprint.w < LIM.min) S.footprint.w = LIM.min;\n      /* the box comes out a touch off the catalogue size on a curve: the size is the shape's */\n      S.footprint = { w: us ? Sh.ft[0] * FT : Sh.m[0], l: us ? Sh.ft[1] * FT : Sh.m[1] };\n      S.origin.x = 0; S.origin.z = 0;\n      _ring = null;\n    }\n    function limits() {\n      var L = C.LIMITS;\n      if (!L) return;\n      L.minW = L.minL = LIM.min; L.maxW = LIM.maxW; L.maxL = LIM.maxL;\n    }\n\n    /* ---- THE BASIN, FROM THE RING ---------------------------------------\n       y 0 is the ground and the top of the shell's bond beam. The inside face\n       runs down the polygon to the cove, the cove rounds it into the floor, and\n       the floor falls along the long axis: nearly level over the shallow end,\n       then the slope to the deep end. Depths are from the water line. */\n    var SHELL = 8 * IN, COPE_W = 12 * IN, COPE_T = 2 * IN, COPE_LIP = 1 * IN, DROP = 4 * IN, COVE = 12 * IN, TILE = 6 * IN;\n    var COVE_N = 5, T_BREAK = 0.42, T_DEEP = 0.68, SHALLOW_FALL = 0.5 * FT;\n    /* the stone under the shell: the old POOL's 150 mm, 6 in on the US side */\n    var GRAVEL = 6 * IN;\n    function offsetRing(poly, dist) {\n      /* the ring is clockwise (x right, z down): the inside is on the right of\n         the direction of travel. dist > 0 goes in, dist < 0 goes out. */\n      var n = poly.length, out = [], i;\n      for (i = 0; i < n; i++) {\n        var p = poly[(i - 1 + n) % n], c = poly[i], q = poly[(i + 1) % n];\n        var e1 = unit(c[0] - p[0], c[1] - p[1]), e2 = unit(q[0] - c[0], q[1] - c[1]);\n        var n1x = -e1[1], n1z = e1[0], n2x = -e2[1], n2z = e2[0], bx = n1x + n2x, bz = n1z + n2z, bl = bx * bx + bz * bz;\n        if (bl < 1e-6) { out.push([c[0] + n1x * dist, c[1] + n1z * dist]); continue; }\n        var k = 2 * dist / bl;\n        out.push([c[0] + bx * k, c[1] + bz * k]);\n      }\n      return out;\n    }\n    function polyArea(p) {\n      var a = 0, i, n = p.length;\n      for (i = 0; i < n; i++) { var q = p[(i + 1) % n]; a += p[i][0] * q[1] - q[0] * p[i][1]; }\n      return Math.abs(a) / 2;\n    }\n    function polyPerim(p) {\n      var a = 0, i, n = p.length;\n      for (i = 0; i < n; i++) { var q = p[(i + 1) % n]; a += Math.hypot(q[0] - p[i][0], q[1] - p[i][1]); }\n      return a;\n    }\n    function profile(B,swimEnd) {\n      var d = settings(), ax = (B.w >= B.l) ? 0 : 1, a0 = ax ? B.z0 : B.x0, span = ax ? B.l : B.w;\n      if(Number.isFinite(swimEnd))span=Math.min(span,Math.max(span*0.12,(swimEnd-a0)/T_DEEP));\n      var dS = d.shallow, dB = d.shallow + SHALLOW_FALL, dD = Math.max(d.deep, dB);\n      return {\n        ax: ax, a0: a0, span: span,\n        cuts: [a0 + span * T_BREAK, a0 + span * T_DEEP],\n        depth: function (p) {\n          var t = (p[ax] - a0) / span;\n          if (t <= T_BREAK) return dS + (dB - dS) * Math.max(0, t) / T_BREAK;\n          if (t >= T_DEEP) return dD;\n          return dB + (dD - dB) * (t - T_BREAK) / (T_DEEP - T_BREAK);\n        }\n      };\n    }\n    /* a ring cut to the band lo..hi along the axis (Sutherland-Hodgman: a\n       concave ring keeps a thin bridge along the cut, which has no area) */\n    function clipBand(poly, ax, lo, hi) {\n      function half(P0, keep, cut) {\n        var out = [], i, n = P0.length;\n        for (i = 0; i < n; i++) {\n          var a = P0[i], b = P0[(i + 1) % n], ia = keep(a), ib = keep(b);\n          if (ia) out.push(a);\n          if (ia !== ib) {\n            var t = (cut - a[ax]) / (b[ax] - a[ax]);\n            out.push([a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t]);\n          }\n        }\n        return out;\n      }\n      var r = poly;\n      if (lo != null) r = half(r, function (p) { return p[ax] >= lo; }, lo);\n      if (hi != null && r.length) r = half(r, function (p) { return p[ax] <= hi; }, hi);\n      return r;\n    }\n    function triangles(T3, poly) {\n      /* earcut through three: the flat triangles of a ring */\n      var c = poly.map(function (p) { return new T3.Vector2(p[0], p[1]); });\n      if (c.length < 3) return [];\n      return T3.ShapeUtils.triangulateShape(c, []).map(function (f) { return [poly[f[0]], poly[f[1]], poly[f[2]]]; });\n    }\n    function bands(T3, poly, P0) {\n      var out = [], cuts = [null].concat(P0.cuts, [null]), i;\n      for (i = 0; i + 1 < cuts.length; i++) out = out.concat(triangles(T3, clipBand(poly, P0.ax, cuts[i], cuts[i + 1])));\n      return out;\n    }\n    /* which ring points are real corners: a corner keeps a hard edge */\n    function sharpAt(poly) {\n      var n = poly.length, out = [], i;\n      for (i = 0; i < n; i++) {\n        var p = poly[(i - 1 + n) % n], c = poly[i], q = poly[(i + 1) % n];\n        var a = unit(c[0] - p[0], c[1] - p[1]), b = unit(q[0] - c[0], q[1] - c[1]);\n        out.push((a[0] * b[0] + a[1] * b[1]) < 0.85);\n      }\n      return out;\n    }\n    /* THE RING THE BASIN IS MADE OF. A straight side is one edge of the plan's\n       ring, but the floor falls under it in three pieces: drawn from its two\n       ends, the foot of a long wall ran straight from shallow to deep and left\n       the bent floor (gunite-v3, the rectangle held 4.7 m3 of water too many).\n       So the basin takes the same ring cut at the floor's creases and every\n       MAX_SEG along the way; the plan keeps its own. Near a real corner it\n       stays uncut: a ring offset past a corner shortens the edges there, and a\n       point closer than that folds back over the corner. */\n    function refine(poly, P0) {\n      var out = [], n = poly.length, ax = P0.ax, sharp = sharpAt(poly), guard = [], i;\n      for (i = 0; i < n; i++) {\n        var p = poly[(i - 1 + n) % n], c = poly[i], q = poly[(i + 1) % n], e1 = unit(c[0] - p[0], c[1] - p[1]), e2 = unit(q[0] - c[0], q[1] - c[1]);\n        guard.push(sharp[i] ? Math.max(COVE, COPE_W) * 1.02 * Math.tan(Math.acos(Math.max(-1, Math.min(1, e1[0] * e2[0] + e1[1] * e2[1]))) / 2) : 0);\n      }\n      for (i = 0; i < n; i++) {\n        var a = poly[i], b = poly[(i + 1) % n], len = Math.hypot(b[0] - a[0], b[1] - a[1]), parts = Math.ceil(len / MAX_SEG), ts = [], k, da = b[ax] - a[ax];\n        var t0 = Math.max(0.002, guard[i] / len), t1 = Math.min(0.998, 1 - guard[(i + 1) % n] / len);\n        for (k = 1; k < parts; k++) ts.push(k / parts);\n        if (Math.abs(da) > 1e-9) P0.cuts.forEach(function (c0) { ts.push((c0 - a[ax]) / da); });\n        ts.sort(function (u, v) { return u - v; });\n        out.push(a);\n        var last = 0;\n        ts.forEach(function (t) {\n          if (t < t0 || t > t1 || t - last < 0.002) return;\n          last = t;\n          out.push([a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t]);\n        });\n      }\n      return out;\n    }\n    /* ---- THE SECTORS (Marek 2026-11-04 17:27, 19:11) ------------------------\n       A sector is the part of the pool a chord cuts off: its outside follows the\n       outline, its inside is the straight chord. d.sectors holds one each of\n       steps, kids and relax as { a, b }, the chord's two ends as fractions of\n       the way round the ring, a to b clockwise, so a sector follows the shape\n       when the pool is scaled or reshaped. The water line stays; the floor\n       rises. Kids and relax are one flat shelf (12 and 18 in of water); steps\n       are treads between straight chords parallel to the first.\n       In the ground the shell follows them: the soil stays under a tread, so a\n       sector takes its volume off the pit and the water, and the shell, the\n       steel and the plaster follow the surface it changes. */\n    var SEC_ORDER = ['steps', 'kids', 'relax'];\n    var SEC = {\n      steps: { key: 'pool_stairs', def: 'Stairs', apex: 3 * FT },\n      kids:  { key: 'bench_hs_kids', def: 'Kids', apex: 3.5 * FT, level: 0.50 },\n      relax: { key: 'bench_hs_relax', def: 'Relax', apex: 3 * FT, level: 0.25 }\n    };\n    var RISE = 10 * IN, TREAD_MIN = 12 * IN, NOSE = 2 * IN, SEC_APEX_MIN = 1 * FT, SEC_CHORD_MIN = 2 * FT, SEC_ARC_MAX = 0.6;\n    function wrap(v) { v = v % 1; return v < 0 ? v + 1 : v; }\n    function cumOf(poly) {\n      var c = [0], i, n = poly.length;\n      for (i = 0; i < n; i++) { var q = poly[(i + 1) % n]; c.push(c[i] + Math.hypot(q[0] - poly[i][0], q[1] - poly[i][1])); }\n      return c;\n    }\n    function ptAt(poly, c, v) {\n      var n = poly.length, L = c[n], d = wrap(v) * L, i = 0;\n      while (i < n - 1 && c[i + 1] < d) i++;\n      var q = poly[(i + 1) % n], t = (d - c[i]) / ((c[i + 1] - c[i]) || 1);\n      return [poly[i][0] + (q[0] - poly[i][0]) * t, poly[i][1] + (q[1] - poly[i][1]) * t];\n    }\n    function nearS(poly, c, p) {\n      var n = poly.length, best = 1e18, out = 0, i;\n      for (i = 0; i < n; i++) {\n        var a = poly[i], b = poly[(i + 1) % n], dx = b[0] - a[0], dz = b[1] - a[1], l2 = dx * dx + dz * dz || 1;\n        var t = Math.max(0, Math.min(1, ((p[0] - a[0]) * dx + (p[1] - a[1]) * dz) / l2));\n        var e = Math.hypot(p[0] - a[0] - t * dx, p[1] - a[1] - t * dz);\n        if (e < best) { best = e; out = (c[i] + t * (c[i + 1] - c[i])) / c[n]; }\n      }\n      return out;\n    }\n    function inRing(p, poly) {\n      var ins = false, i, j, n = poly.length;\n      for (i = 0, j = n - 1; i < n; j = i++) {\n        var a = poly[i], b = poly[j];\n        if ((a[1] > p[1]) !== (b[1] > p[1]) && p[0] < (b[0] - a[0]) * (p[1] - a[1]) / (b[1] - a[1]) + a[0]) ins = !ins;\n      }\n      return ins;\n    }\n    /* the sector's outline: A, the ring's points on the way, B; m the unit\n       normal of the chord towards the arc, apex how far the arc stands off it */\n    function fifths(sx){\n      if(sx.bend && sx.bend.length===4)return {bend:sx.bend.slice(),along:(sx.along || [.2,.4,.6,.8]).slice()};\n      var bend=sx.bend || [0,0],along=sx.along || [1/3,2/3],old=[0].concat(along,[1]),y=[0].concat(bend,[0]);\n      var fractions=[.2,.4,.6,.8];\n      return {along:fractions,bend:fractions.map(function(t){\n        if(!sx.along)return 4.5*t*(1-t)*((2-3*t)*bend[0]+(3*t-1)*bend[1]);\n        var i=t<old[1]?0:t<old[2]?1:2,u=(t-old[i])/(old[i+1]-old[i]),span=old[i+1]-old[i];\n        var l=Math.max(0,i-1),r=Math.min(3,i+2);\n        return (1-u)*(1-u)*((1+2*u)*y[i]+u*span*(y[i+1]-y[l])/(old[i+1]-old[l]))+\n          u*u*((3-2*u)*y[i+1]+(u-1)*span*(y[r]-y[i])/(old[r]-old[i]));\n      })};\n    }\n    function rimNormal(poly,c,f){\n      var delta=0.012/c[poly.length],a=ptAt(poly,c,f-delta),b=ptAt(poly,c,f+delta);\n      return unit(a[1]-b[1],b[0]-a[0]);\n    }\n    function secGeo(poly, c, sx) {\n      var n = poly.length, L = c[n], da = wrap(sx.a) * L, span = wrap(sx.b - sx.a) * L, A0 = ptAt(poly, c, sx.a), B0 = ptAt(poly, c, sx.b), pts = [A0], i, k;\n      i = 0;\n      while (i < n && c[i] <= da) i++;\n      for (k = 0; k < n; k++) {\n        var at = (i + k) % n, run = c[at] - da;\n        if (run < 0) run += L;\n        if (run <= 0.001 || run >= span - 0.001) { if (run >= span - 0.001) break; continue; }\n        pts.push(poly[at]);\n      }\n      pts.push(B0);\n      var ex = B0[0] - A0[0], ez = B0[1] - A0[1], cl = Math.hypot(ex, ez) || 1, m = [ez / cl, -ex / cl], apex = 0;\n      pts.forEach(function (p) { apex = Math.max(apex, (p[0] - A0[0]) * m[0] + (p[1] - A0[1]) * m[1]); });\n      var rim=pts.slice(),edge=[A0];\n      if(sx.line || sx.toe || Number.isFinite(sx.angle)){\n        var shaped=sx.shaped || (sx.bend || []).some(function(v){return Math.abs(v)>1e-8;});\n        var handles=fifths(sx),anchor=[A0];\n        handles.along.forEach(function(t,j){var h=handles.bend[j]*cl;anchor.push([A0[0]+ex*t+m[0]*h,A0[1]+ez*t+m[1]*h]);});\n        anchor.push(B0);\n        var normals=[rimNormal(poly,c,sx.a),rimNormal(poly,c,sx.b)];\n        for(var part=0;part<5;part++){\n          var a=anchor[part],b=anchor[part+1],length=Math.hypot(b[0]-a[0],b[1]-a[1]);\n          var prev=anchor[Math.max(0,part-1)],next=anchor[Math.min(5,part+2)];\n          var d0=part?unit(b[0]-prev[0],b[1]-prev[1]):normals[0];\n          var d1=part===4?[-normals[1][0],-normals[1][1]]:unit(next[0]-a[0],next[1]-a[1]);\n          for(var j=1;j<=8;j++){\n            var t=j/8,u=1-t;\n            if(!shaped){edge.push([a[0]+(b[0]-a[0])*t,a[1]+(b[1]-a[1])*t]);continue;}\n            var v=[0,1].map(function(k){return (1+2*t)*u*u*a[k]+u*u*t*length*d0[k]+(3-2*t)*t*t*b[k]-u*t*t*length*d1[k];});\n            // The first and last rendered facets follow the local wall normal exactly.\n            if(part===0 && j===1)v=[a[0]+length*d0[0]/8,a[1]+length*d0[1]/8];\n            if(part===4 && j===7)v=[b[0]-length*d1[0]/8,b[1]-length*d1[1]/8];\n            edge.push(v);\n          }\n        }\n      }else edge.push(B0);\n      pts=rim.concat(edge.slice(1,-1).reverse());\n      return { A:A0,B:B0,pts:pts,rims:[rim],edge:edge,m:m,e:[ex/cl,ez/cl],chord:cl,apex:apex,arc:span };\n    }\n    function smallerShelf(poly,c,sx){\n      var g=secGeo(poly,c,sx);\n      if(polyArea(g.pts)<=polyArea(poly)/2+1e-8)return sx;\n      var handles=fifths(sx);\n      var flipped={shaped:sx.shaped,a:sx.b,b:sx.a,bend:handles.bend.reverse().map(function(h){return -h;}),\n        along:handles.along.reverse().map(function(t){return 1-t;}),line:true};\n      return flipped;\n    }\n    function shelfGeometry(poly,c,kind,all){\n      var sx=all[kind],g=secGeo(poly,c,sx);\n      if(kind==='steps' && !sx.from)return g;\n      var other=all[kind==='steps'?sx.from:kind==='kids'?'relax':'kids'];\n      if(!other || other.unplaced || !insideArc(other,sx))return g;\n      var inner=secGeo(poly,c,other);\n      var left=secGeo(poly,c,{a:sx.a,b:other.a}).rims[0],right=secGeo(poly,c,{a:other.b,b:sx.b}).rims[0];\n      if(kind==='steps'){\n        g.startDepth=SEC[sx.from].level;\n        g.apex=Math.min.apply(null,inner.edge.map(function(p){return (p[0]-g.A[0])*g.m[0]+(p[1]-g.A[1])*g.m[1];}));\n      }\n      g.rims=[left,right];\n      g.pts=left.concat(inner.edge.slice(1),right.slice(1),g.edge.slice(1,-1).reverse());\n      return g;\n    }\n    function parentLevel(poly,c,kind,all){\n      var parent=null,area=Infinity;\n      ['kids','relax'].forEach(function(k){\n        if(k===kind || !all[k] || all[k].unplaced || !insideArc(all[kind],all[k]))return;\n        var a=polyArea(secGeo(poly,c,all[k]).pts);if(a<area){parent=SEC[k].level;area=a;}\n      });\n      return parent;\n    }\n    function arcsMeet(p, q) {\n      function inside(x, r) { return wrap(x - r.a) <= wrap(r.b - r.a); }\n      return inside(p.a, q) || inside(p.b, q) || inside(q.a, p);\n    }\n    function crosses(A0, B0, poly) {\n      var n = poly.length, dx = B0[0] - A0[0], dz = B0[1] - A0[1], i;\n      for (i = 0; i < n; i++) {\n        var a = poly[i], b = poly[(i + 1) % n], ex = b[0] - a[0], ez = b[1] - a[1], den = dx * ez - dz * ex;\n        if (Math.abs(den) < 1e-9) continue;\n        var t = ((a[0] - A0[0]) * ez - (a[1] - A0[1]) * ex) / den, u = ((a[0] - A0[0]) * dz - (a[1] - A0[1]) * dx) / den;\n        if (t > 0.01 && t < 0.99 && u >= 0 && u <= 1) return true;\n      }\n      return false;\n    }\n    function secOk(poly, c, kind, sx, all) {\n      var g = secGeo(poly, c, sx), o;\n      if(kind==='steps' && sx.from && (!all[sx.from] || all[sx.from].unplaced || !insideArc(all[sx.from],sx)))return false;\n      if(sx.unplaced)return false;\n      if(kind==='steps' ? g.chord<SEC_CHORD_MIN || g.apex<SEC_APEX_MIN : g.chord<0.12 || polyArea(g.pts)<0.05)return false;\n      if(kind==='steps' && g.arc/c[poly.length]>SEC_ARC_MAX)return false;\n      if(kind!=='steps' && !sx.line && !Number.isFinite(sx.angle))return false;\n      for(var i=1;i<g.edge.length;i++){\n        var a=g.edge[i-1],b=g.edge[i];\n        if(crosses(a,b,poly) || !inRing([(a[0]+b[0])/2,(a[1]+b[1])/2],poly))return false;\n      }\n      for(o in all){\n        var other=all[o];\n        if(o===kind || !other || other.unplaced)continue;\n        var og=secGeo(poly,c,other);\n        if(!arcsMeet(sx,other)){\n          // Opposite wall arcs can still have curved dividing lines that cross.\n          if(g.edge.slice(1).some(function(p,i){return crosses(g.edge[i],p,og.pts);}) ||\n             g.edge.slice(1,-1).some(function(p){return inRing(p,og.pts);}))return false;\n          continue;\n        }\n        var inner=insideArc(sx,other),outer=insideArc(other,sx);\n        if(!(inner || outer))return false;\n        var entry=kind==='steps'?sx:o==='steps'?other:null;\n        if(entry && !(entry.from?(kind==='steps'?outer:inner):(kind==='steps'?inner:outer)))return false;\n        if(entry && entry.from && !all[entry.from])return false;\n        if(entry && entry.from && (kind==='steps'?o:kind)!==entry.from &&\n           !insideArc(kind==='steps'?other:sx,all[entry.from]))return false;\n        var child=inner?g:og,parent=inner?og:g;\n        if(polyArea(parent.pts)-polyArea(child.pts)<0.65)return false;\n        if(child.edge.slice(1,-1).some(function(p){return !inRing(p,parent.pts);}) ||\n          child.edge.slice(1).some(function(p,i){return crosses(child.edge[i],p,parent.pts);}))return false;\n      }\n      return true;\n    }\n    function clipHalf(poly, A0, m, t, keepOver) {\n      function side(p) { var v = (p[0] - A0[0]) * m[0] + (p[1] - A0[1]) * m[1] - t; return keepOver ? v : -v; }\n      var out = [], i, n = poly.length;\n      for (i = 0; i < n; i++) {\n        var a = poly[i], b = poly[(i + 1) % n], sa = side(a), sb = side(b);\n        if (sa >= 0) out.push(a);\n        if ((sa >= 0) !== (sb >= 0)) { var u = sa / (sa - sb); out.push([a[0] + (b[0] - a[0]) * u, a[1] + (b[1] - a[1]) * u]); }\n      }\n      return out;\n    }\n    /* where a chord t off the first one runs inside the sector */\n    function chordRuns(pts, A0, m, e, t) {\n      var hit = [], i, n = pts.length;\n      for (i = 0; i < n; i++) {\n        var a = pts[i], b = pts[(i + 1) % n], sa = (a[0] - A0[0]) * m[0] + (a[1] - A0[1]) * m[1] - t, sb = (b[0] - A0[0]) * m[0] + (b[1] - A0[1]) * m[1] - t;\n        if ((sa >= 0) !== (sb >= 0)) { var u = sa / (sa - sb); hit.push([a[0] + (b[0] - a[0]) * u, a[1] + (b[1] - a[1]) * u]); }\n      }\n      hit.sort(function (p, q) { return (p[0] * e[0] + p[1] * e[1]) - (q[0] * e[0] + q[1] * e[1]); });\n      var out = [];\n      for (i = 0; i + 1 < hit.length; i += 2) out.push([hit[i], hit[i + 1]]);\n      return out;\n    }\n    /* the levels: depth under the water of each tread, t0..t1 off the first\n       chord. Steps: as many risers as the floor at the chord asks at about\n       10 in, as many treads of at least 12 in as the sector holds. */\n    function secModel(P0, g, kind, baseDepth) {\n      var S0 = SEC[kind], treads = [], j;\n      if (S0.level) { treads.push({ t0: 0, t1: g.apex + 1, depth: S0.level, poly: g.pts }); return { treads: treads, rise: 0 }; }\n      var dm = baseDepth || P0.depth([(g.A[0] + g.B[0]) / 2, (g.A[1] + g.B[1]) / 2]);\n      var topDepth=g.startDepth || 0;\n      var n = Math.max(1, Math.min(Math.max(2, Math.round((dm-topDepth) / RISE)) - 1, Math.floor(g.apex / TREAD_MIN))), w = g.apex / n, rise = (dm-topDepth) / (n + 1);\n      for (j = 0; j < n; j++) {\n        var t0 = j * w, t1 = (j + 1) * w, p0 = j ? clipHalf(g.pts, g.A, g.m, t0, true) : g.pts;\n        treads.push({ t0: t0, t1: t1, depth: topDepth + (n - j) * rise, poly: (j < n - 1) ? clipHalf(p0, g.A, g.m, t1, false) : p0 });\n      }\n      return { treads: treads, rise: rise };\n    }\n    function secLevel(M0, g, p) {\n      var t = (p[0] - g.A[0]) * g.m[0] + (p[1] - g.A[1]) * g.m[1], i;\n      for (i = M0.treads.length - 1; i >= 0; i--) if (t >= M0.treads[i].t0 - 1e-6) return M0.treads[i].depth;\n      return M0.treads[0].depth;\n    }\n    function secPlace(kind) {\n      var d = settings(), R0 = ring(), poly = R0.poly, c = cumOf(poly), n = poly.length, L = c[n], B = boxOf(poly), P0 = profile(B), i, s0 = 0, lo = 1e9;\n      for (i = 0; i < n; i++) if (poly[i][P0.ax] < lo) { lo = poly[i][P0.ax]; s0 = c[i] / L; }\n      var want = SEC[kind].apex, pass, o, sgn, len;\n      for (pass = 0; pass < 2; pass++) {\n        for (o = 0; o <= 10; o++) {\n          for (sgn = -1; sgn <= 1; sgn += 2) {\n            if (!o && sgn > 0) continue;\n            var mid = s0 + sgn * o * 0.05;\n            for (len = 6 * FT; len <= L * 0.5; len += 1 * FT) {\n              var sx = { a: wrap(mid - len / (2 * L)), b: wrap(mid + len / (2 * L)) };\n              if (!secOk(poly, c, kind, sx, d.sectors)) continue;\n              if (secGeo(poly, c, sx).apex >= (pass ? SEC_APEX_MIN * 1.5 : want)) return sx;\n            }\n          }\n        }\n      }\n      return null;\n    }\n    /* Candidate positions are fractions of the actual perimeter, so the\n       same controls work for mirrored shapes, curves and concave corners. */\n    // A half-plane through both sides of the waterline, parametrized by its\n    // outward normal and setback from the end. Reject disconnected slices.\n    function endCap(poly,c,angle,reach) {\n      var n=[Math.cos(angle),Math.sin(angle)], e=[-n[1],n[0]], hi=-Infinity,lo=Infinity,emin=Infinity,emax=-Infinity;\n      poly.forEach(function(p){var v=p[0]*n[0]+p[1]*n[1],u=p[0]*e[0]+p[1]*e[1];lo=Math.min(lo,v);hi=Math.max(hi,v);emin=Math.min(emin,u);emax=Math.max(emax,u);});\n      reach=Math.min(reach,(hi-lo)*0.38);\n      if(reach<0.65)return null;\n      var cut=hi-reach,runs=chordRuns(poly,[0,0],n,e,cut);\n      if(runs.length!==1)return null;\n      var a=nearS(poly,c,runs[0][0]),b=nearS(poly,c,runs[0][1]);\n      var mid=ptAt(poly,c,a+wrap(b-a)/2);\n      if(mid[0]*n[0]+mid[1]*n[1]<cut){var tmp=a;a=b;b=tmp;}\n      var sx={a:a,b:b,angle:angle,reach:reach},g=secGeo(poly,c,sx);\n      if(g.chord<Math.max(1.20,(emax-emin)*0.53) || polyArea(g.pts)<1.3 || g.apex<0.62)return null;\n      return sx;\n    }\n    function insideArc(child,parent) {\n      return wrap(child.a-parent.a)+wrap(child.b-child.a)<=wrap(parent.b-parent.a)+1e-6;\n    }\n    function candidatesForEnd(kind,all) {\n      var R=ring(),p=R.poly,c=cumOf(p),B=boxOf(p),profile0=profile(B),out=[];\n      var major=B.w>=B.l?0:Math.PI/2;\n      [0,Math.PI].forEach(function(end){\n        [0,-15,15,-30,30,-45,45].forEach(function(deg){\n          var angle=major+end+deg*Math.PI/180;\n          var sx=endCap(p,c,angle,kind==='kids'?1.80:2.10);\n          if(!sx || !secOk(p,c,kind,sx,all))return;\n          var g=secGeo(p,c,sx),pt=[(g.A[0]+g.B[0])/2,(g.A[1]+g.B[1])/2];\n          var depth=profile0.depth(pt);\n          out.push({sx:sx,mid:sectorMid(sx),rank:(kind==='kids'?depth:-depth)+Math.abs(deg)*0.02});\n        });\n      });\n      return out;\n    }\n    function resolveEnds(d,R) {\n      var c=cumOf(R.poly), all=d.sectors;\n      // Normalize both cuts before testing one against the other after restore or resize.\n      ['kids','relax'].forEach(function(k){\n        var sx=all[k];if(sx && sx.line)all[k]=smallerShelf(R.poly,c,sx);\n      });\n      ['kids','relax'].forEach(function(kind){\n        var old=all[kind];if(!old)return;\n        var chosen=old.line?smallerShelf(R.poly,c,old):Number.isFinite(old.angle)?endCap(R.poly,c,old.angle,old.reach):null;\n        if(!chosen || !secOk(R.poly,c,kind,chosen,all)){\n          var others=Object.assign({},all);delete others[kind];\n          // An old wedge is migrated in a second pass, not used as an obstacle here.\n          var other=kind==='kids'?'relax':'kids';if(others[other] && !others[other].line && !Number.isFinite(others[other].angle))delete others[other];\n          var opts=candidatesForEnd(kind,others).sort(function(a,b){return a.rank-b.rank;});\n          chosen=opts.length?opts[0].sx:null;\n        }\n        if(chosen)all[kind]=smallerShelf(R.poly,c,Object.assign({line:true},chosen));else all[kind]=Object.assign({},old,{unplaced:true});\n      });\n    }\n\n    function zonePositions(kind,occupied,ignoreLadder,compact) {\n      var R=ring(), poly=R.poly, c=cumOf(poly), L=c[poly.length], P0=profile(boxOf(poly));\n      var all=occupied || settings().sectors, options=[];\n      if(kind!=='steps')return candidatesForEnd(kind,all);\n      var stations=compact?48:24;\n      for(var i=0;i<stations;i++) {\n        var mid=i/stations, best=null;\n        for(var length=Math.min(1.8,L/4);length<L*0.5;length+=0.24) {\n          var sx={a:wrap(mid-length/(2*L)),b:wrap(mid+length/(2*L)),toe:true};\n          if(!secOk(poly,c,kind,sx,all)) continue;\n          var ladder=settings().ladder;\n          if(!ignoreLadder && kind!=='steps' && Number.isFinite(ladder) && arcsMeet(sx,{a:wrap(ladder-0.36/L),b:wrap(ladder+0.36/L)})) continue;\n          var g=secGeo(poly,c,sx);\n          if(g.apex<(compact && kind!=='steps'?0.52:SEC[kind].apex*0.8)) continue;\n          var p=[(g.A[0]+g.B[0])/2,(g.A[1]+g.B[1])/2], depth=P0.depth(p);\n          if(kind==='steps') {\n            var base=parentLevel(poly,c,'steps',Object.assign({},all,{steps:sx}));\n            var stairs=secModel(P0,g,kind,base);\n            if(stairs.rise>0.305 || g.apex/stairs.treads.length<TREAD_MIN-0.001 ||\n              (base || Math.max(P0.depth(g.A),P0.depth(g.B)))-stairs.treads[0].depth>0.33) continue;\n          }\n          var rank=kind==='relax'?Math.abs(depth-1.35):depth;\n          if(kind!=='steps') rank+=0.13*Math.abs(polyArea(g.pts)-(kind==='kids'?2.5:1.6));\n          best={sx:sx,mid:mid,rank:rank};\n          break;\n        }\n        if(best) options.push(best);\n      }\n      return options;\n    }\n    function occupiedProfile(poly,sectors){\n      var B=boxOf(poly), axis=B.w>=B.l?0:1, start=axis?B.z0:B.x0,span=axis?B.l:B.w,swimEnd;\n      var occupied=Object.keys(sectors).filter(function(k){return sectors[k] && !sectors[k].unplaced;})\n        .map(function(k){return secGeo(poly,cumOf(poly),sectors[k]).pts;});\n      if(occupied.length){\n        for(var station=100;station>=0 && swimEnd==null;station--){\n          var v=start+span*station/100;\n          for(var cross=1;cross<32;cross++){\n            var q=axis?[B.x0+B.w*cross/32,v]:[v,B.z0+B.l*cross/32];\n            if(inRing(q,poly) && !occupied.some(function(cap){return inRing(q,cap);})){swimEnd=v-span*0.05;break;}\n          }\n        }\n      }\n      return profile(B,swimEnd);\n    }\n    function stairFits(poly,c,sx,all){\n      if(!secOk(poly,c,'steps',sx,all))return false;\n      var state=Object.assign({},all,{steps:sx}),g=shelfGeometry(poly,c,'steps',state);\n      var P=occupiedProfile(poly,state),base=parentLevel(poly,c,'steps',state),m=secModel(P,g,'steps',base);\n      var toeMax=Math.max.apply(null,g.edge.map(function(p){return (p[0]-g.A[0])*g.m[0]+(p[1]-g.A[1])*g.m[1];}));\n      return g.apex/m.treads.length-Math.max(0,toeMax)>=TREAD_MIN-.001 &&\n        m.rise>0 && m.rise<=.305 && (base || Math.max(P.depth(g.A),P.depth(g.B)))-m.treads[0].depth<=.33;\n    }\n    function shelfStairs(kind,all){\n      var poly=ring().poly,c=cumOf(poly),sx=all[kind],L=c[poly.length];\n      for(var extend=TREAD_MIN;extend<L*.35;extend+=.08){\n        var trial={a:wrap(sx.a-extend/L),b:wrap(sx.b+extend/L),from:kind,toe:true};\n        if(stairFits(poly,c,trial,all))return {sx:trial};\n      }\n      return null;\n    }\n    function nextPosition(options,current) {\n      if(!options.length) return null;\n      if(current==null) return options.slice().sort(function(a,b){return a.rank-b.rank;})[0];\n      // Advance around the rim by at least a practical tap-to-tap distance.\n      var sorted=options.map(function(o){return {o:o,d:wrap(o.mid-current)};}).filter(function(x){return x.d>0.015 && x.d<0.985;});\n      sorted.sort(function(a,b){return a.d-b.d;});\n      var wider=sorted.find(function(x){return x.d>0.065 && x.d<0.94;});\n      return wider?wider.o:(sorted.length?sorted[0].o:null);\n    }\n    function shelfPositions(kind,occupied,protectEntry) {\n      if(protectEntry && kind!=='steps' && !occupied.steps && !Number.isFinite(settings().ladder)) {\n        var reserve=nextPosition(zonePositions('steps',occupied),null);\n        if(reserve){\n          var options=zonePositions(kind,Object.assign({},occupied,{steps:reserve.sx}));\n          if(options.length)return options;\n        }\n      }\n      return zonePositions(kind,occupied);\n    }\n    function preferredSector(kind) {\n      var option=nextPosition(shelfPositions(kind,settings().sectors,true),null);\n      return option?option.sx:null;\n    }\n    function sectorMid(sx) {return wrap(sx.a+wrap(sx.b-sx.a)/2);}\n\n    function ladderOptions(G,replacingSteps) {\n      var cache=replacingSteps?'ladderReplacing':'ladderPositions';if(G[cache])return G[cache].slice();\n      var R=ring(), c=cumOf(R.poly), L=c[R.poly.length], options=[];\n      var fittings=circulation(G).rough.filter(function(it){return it.kind==='skimmer'||it.kind==='jet';});\n      var stations=Math.max(64,Math.ceil(L/0.10));\n      for(var i=0;i<stations;i++) {\n        var mid=i/stations, arc={a:wrap(mid-0.36/L),b:wrap(mid+0.36/L)};\n        if(G.sectors.some(function(s){return !(replacingSteps && s.kind===\"steps\") && arcsMeet(arc,settings().sectors[s.kind]);})) continue;\n        var p=ptAt(R.poly,c,mid), a=ptAt(R.poly,c,arc.a), b=ptAt(R.poly,c,arc.b);\n        if(Math.hypot(b[0]-a[0],b[1]-a[1])<0.68 || Math.hypot(p[0]-(a[0]+b[0])/2,p[1]-(a[1]+b[1])/2)>0.06) continue;\n        if(fittings.some(function(f){return Math.hypot(f.p[0]-p[0],f.p[2]-p[1])<0.60;})) continue;\n        var tangent=unit(b[0]-a[0],b[1]-a[1]), inward=[-tangent[1],tangent[0]];\n        var q=[p[0]+inward[0]*0.31,p[1]+inward[1]*0.31];\n        if(!inRing(q,R.poly) || G.sectors.some(function(s){return inRing(q,s.g.pts);})) continue;\n        var depth=G.P.depth(q), count=Math.min(4,Math.floor((depth-0.12)/0.25));\n        if(count<2) continue;\n        options.push({mid:mid,p:p,t:tangent,n:inward,count:count,rank:depth});\n      }\n      G[cache]=options;return options.slice();\n    }\n    function placedLadder(G) {\n      var d=settings(); if(!Number.isFinite(d.ladder) || d.sectors.steps) return null;\n      var options=ladderOptions(G);\n      function distance(o){var v=wrap(o.mid-d.ladder);return Math.min(v,1-v);}\n      return options.sort(function(a,b){return distance(a)-distance(b);})[0] || null;\n    }\n    function buildEntry(ctx, anchors) {\n      var T=ctx.THREE,G=basin(T), model=placedLadder(G), layer=anchors?'gunite-ladder-sockets':'gunite-ladder';\n      billReset(layer);if(!model)return;\n      var label=anchors?'Install ladder anchor sockets':'Install pool ladder';\n      add(layer,anchors?'Ladder deck socket pair':'Pool entry ladder set',1);\n      C._asmMark(ctx,layer,'top',label,'',true);\n      if(C._planWanted())return;\n      var group=new T.Group(),mat=new T.MeshStandardMaterial({color:0xa7bac6,metalness:0.55,roughness:0.32});\n      function point(x,y,z){return new T.Vector3(model.p[0]+model.t[0]*x+model.n[0]*z,y,model.p[1]+model.t[1]*x+model.n[1]*z);}\n      function tube(path,r){group.add(new T.Mesh(new T.TubeGeometry(path,28,r,8,false),mat));}\n      [-0.24,0.24].forEach(function(x){\n        if(anchors){tube(new T.LineCurve3(point(x,-0.12,-0.15),point(x,COPE_T,-0.15)),0.035);return;}\n        var path=new T.CurvePath();\n        path.add(new T.LineCurve3(point(x,COPE_T,-0.15),point(x,0.52,-0.15)));\n        path.add(new T.CubicBezierCurve3(point(x,0.52,-0.15),point(x,0.85,-0.15),point(x,0.85,0.31),point(x,0.52,0.31)));\n        path.add(new T.LineCurve3(point(x,0.52,0.31),point(x,-0.25*model.count,0.31)));\n        tube(path,0.022);\n      });\n      if(!anchors)for(var k=1;k<=model.count;k++) {\n        var pt=point(0,-0.25*k,0.31), rung=new T.Mesh(new T.BoxGeometry(0.48,0.035,0.09),mat);\n        rung.position.copy(pt);rung.rotation.y=-Math.atan2(model.t[1],model.t[0]);group.add(rung);\n      }\n      group.name=label;group.userData.poolSpread=[0,anchors?0.55:1.6,0];ctx.group.add(group);\n    }\n\n    function tri3(p, yp, q, yq, r, yr) {\n      var ux = q[0] - p[0], uy = yq - yp, uz = q[1] - p[1], vx = r[0] - p[0], vy = yr - yp, vz = r[1] - p[1];\n      return Math.hypot(uy * vz - uz * vy, uz * vx - ux * vz, ux * vy - uy * vx) / 2;\n    }\n    var _G = null, _GKey = '', _endSync='';\n    function basin(T3) {\n      var d = settings(), R = ring();\n      var syncKey=_ringKey+'|'+JSON.stringify(d.sectors);\n      if(syncKey!==_endSync){resolveEnds(d,R);_endSync=_ringKey+'|'+JSON.stringify(d.sectors);}\n      var key = _ringKey + '|' + d.shallow + '|' + d.deep + '|' + JSON.stringify(d.sectors) + '|' + dividerMode() + '|' + d.plantMode + '|' + JSON.stringify(d.plantOffset) + '|' + (d.padSide === -1 ? -1 : 1);\n      if (_G && _GKey === key) return _G;\n      var B=boxOf(R.poly),P0=occupiedProfile(R.poly,d.sectors),poly=refine(R.poly,P0),water=-DROP;\n      function floorY(p) { return water - P0.depth(p); }\n      var rings = [], k;\n      for (k = 0; k <= COVE_N; k++) {\n        var th = k / COVE_N * Math.PI / 2;\n        rings.push({ o: COVE * (1 - Math.cos(th)), h: COVE * (1 - Math.sin(th)), th: th, p: offsetRing(poly, COVE * (1 - Math.cos(th))) });\n      }\n      var floorRing = rings[COVE_N].p, tri = bands(T3, floorRing, P0);\n      /* what the shell holds: the volume under the water line and the wetted area */\n      var vol = 0, wet = 0, flr = 0, i, n = poly.length;\n      tri.forEach(function (t) {\n        var ya = floorY(t[0]), yb = floorY(t[1]), yc = floorY(t[2]);\n        var ax = t[1][0] - t[0][0], az = t[1][1] - t[0][1], bx = t[2][0] - t[0][0], bz = t[2][1] - t[0][1];\n        var a2 = Math.abs(ax * bz - az * bx) / 2;\n        vol += a2 * (water - (ya + yb + yc) / 3);\n        var ux = ax, uy = yb - ya, uz = az, vx = bx, vy = yc - ya, vz = bz;\n        var a3 = Math.hypot(uy * vz - uz * vy, uz * vx - ux * vz, ux * vy - uy * vx) / 2;\n        wet += a3; flr += a3;\n      });\n      for (k = 0; k < COVE_N; k++) {\n        var r0 = rings[k], r1 = rings[k + 1];\n        for (i = 0; i < n; i++) {\n          var j = (i + 1) % n, a0 = r0.p[i], b0 = r0.p[j], a1 = r1.p[i], b1 = r1.p[j];\n          /* the quad between the rings, by its own area: at a mitred corner\n             the step from ring to ring runs on the diagonal */\n          var ya0 = floorY(a0) + r0.h, yb0 = floorY(b0) + r0.h, ya1 = floorY(a1) + r1.h, yb1 = floorY(b1) + r1.h;\n          wet += tri3(a0, ya0, b0, yb0, b1, yb1) + tri3(a0, ya0, b1, yb1, a1, ya1);\n          /* the plan's strip between the rings, under the water */\n          var ar = polyArea([a0, b0, b1, a1]);\n          vol += ar * ((P0.depth(a0) + P0.depth(b0)) / 2 - (r0.h + r1.h) / 2);\n        }\n      }\n      var wallA = 0;\n      for (i = 0; i < n; i++) {\n        var pa = poly[i], pb = poly[(i + 1) % n];\n        var hh = (P0.depth(pa) + P0.depth(pb)) / 2 - COVE;\n        wallA += Math.hypot(pb[0] - pa[0], pb[1] - pa[1]) * Math.max(0, hh);\n      }\n      wet += wallA;\n      /* WHAT THE SHELL IS, FROM THE SAME RINGS THE MESHES USE. The outside is\n         the ring out by the shell, down to the floor less the shell, with no\n         cove (the drawn back of the shell); less the inside up to the ground,\n         the shell's solid: the cove's fill is in it. Shot against the soil, so\n         the pit is that outside plus the stone, with no working space and no\n         backfill behind the wall. */\n      var outer = offsetRing(poly, -SHELL), solid = 0, planO = 0, mid = offsetRing(poly, -(COPE_W - COPE_LIP) / 2);\n      bands(T3, outer, P0).forEach(function (t) {\n        var ax = t[1][0] - t[0][0], az = t[1][1] - t[0][1], bx = t[2][0] - t[0][0], bz = t[2][1] - t[0][1];\n        var a2 = Math.abs(ax * bz - az * bx) / 2;\n        planO += a2;\n        solid += a2 * (SHELL - (floorY(t[0]) + floorY(t[1]) + floorY(t[2])) / 3);\n      });\n      var area = polyArea(poly), perim = polyPerim(poly), inside = vol + area * DROP;\n      /* what the sectors change, from their own treads and the arc behind them */\n      var cove0 = wet - flr - wallA, secs = [], offV = 0, wet0 = wet, noseA = 0, cR = cumOf(R.poly), CF = (1 - Math.PI / 4) * COVE * COVE;\n      SEC_ORDER.forEach(function (kind) {\n        var sx = d.sectors[kind];\n        if (!sx) return;\n        if (!secOk(R.poly, cR, kind, sx, d.sectors)) { log('sector ' + kind + ' does not fit the outline now, left out'); return; }\n        var neighborDepth=parentLevel(R.poly,cR,kind,d.sectors),parentDepth=kind==='steps'?neighborDepth:null;\n        if(d.sectors.steps && d.sectors.steps.from===kind){\n          var entry=secs.find(function(s){return s.kind==='steps';});\n          if(entry)neighborDepth=entry.treads[entry.treads.length-1].depth;\n        }\n        var g = shelfGeometry(R.poly,cR,kind,d.sectors), M0 = secModel(P0, g, kind,parentDepth), risers = [], topA = 0, under = 0, Vt = 0, q2;\n        M0.treads.forEach(function (tr, j) {\n          tr.tri = bands(T3, tr.poly, P0);\n          tr.tri.forEach(function (t) {\n            var ax = t[1][0] - t[0][0], az = t[1][1] - t[0][1], bx = t[2][0] - t[0][0], bz = t[2][1] - t[0][1], a2 = Math.abs(ax * bz - az * bx) / 2;\n            var dp = parentDepth || (P0.depth(t[0]) + P0.depth(t[1]) + P0.depth(t[2])) / 3;\n            topA += a2;\n            under += parentDepth?a2:tri3(t[0], floorY(t[0]), t[1], floorY(t[1]), t[2], floorY(t[2]));\n            Vt += a2 * Math.max(0, dp - tr.depth);\n          });\n          if (kind === 'steps') {\n            tr.noses=[];\n            if(j)tr.noses.push(clipHalf(tr.poly,g.A,g.m,tr.t0+NOSE,false));\n            else g.edge.slice(1).forEach(function(b,i){\n              var a=g.edge[i],dir=unit(b[0]-a[0],b[1]-a[1]),normal=[dir[1],-dir[0]];\n              // Restrict the nose to this edge interval and the actual tread surface.\n              var lo=(a[0]-g.A[0])*g.e[0]+(a[1]-g.A[1])*g.e[1];\n              var hi=(b[0]-g.A[0])*g.e[0]+(b[1]-g.A[1])*g.e[1];\n              if(hi<=lo)return;\n              var strip=clipHalf(clipHalf(tr.poly,g.A,g.e,lo,true),g.A,g.e,hi,false);\n              strip=clipHalf(clipHalf(strip,a,normal,0,true),a,normal,NOSE,false);\n              if(strip.length>=3)tr.noses.push(strip);\n            });\n            tr.noses.forEach(function(p){noseA+=polyArea(p);});\n          }\n          /* the riser at this tread's front: down to the tread before, or to\n             the floor at the first chord */\n          (j ? chordRuns(g.pts, g.A, g.m, g.e, tr.t0) : g.edge.slice(1).map(function(p,i){return [g.edge[i],p];})).forEach(function (run) {\n            var mid0 = [(run[0][0] + run[1][0]) / 2, (run[0][1] + run[1][1]) / 2], low = j ? M0.treads[j - 1].depth : (neighborDepth || P0.depth(mid0));\n            risers.push({ a: run[0], b: run[1], top: tr.depth, bot: j || neighborDepth ? low : null, area: Math.hypot(run[1][0] - run[0][0], run[1][1] - run[0][1]) * Math.abs(low - tr.depth) });\n          });\n        });\n        /* the wall and the cove the sector covers, along its arc */\n        var offW = 0, offC = 0, strip0 = 0, fillC = 0, rA = 0;\n        g.rims.forEach(function(rim){for (q2 = 0; q2 + 1 < rim.length; q2++) {\n          var u0 = rim[q2], v0 = rim[q2 + 1], len0 = Math.hypot(v0[0] - u0[0], v0[1] - u0[1]), md = [(u0[0] + v0[0]) / 2, (u0[1] + v0[1]) / 2], h0 = (parentDepth || P0.depth(md)) - secLevel(M0, g, md), part = Math.max(0, Math.min(1, h0 / COVE));\n          if(parentDepth){offW+=len0*Math.max(0,h0);continue;}\n          offW += len0 * Math.max(0, h0 - COVE);\n          offC += len0 * COVE * Math.PI / 2 * part;\n          strip0 += len0 * COVE * part;\n          fillC += len0 * CF * part;\n        }\n        });\n        risers.forEach(function (r0) { rA += r0.area; });\n        offV += Vt - fillC;\n        flr += topA - Math.max(0, under - strip0);\n        cove0 -= offC;\n        wallA += rA - offW;\n        secs.push({ kind: kind, g: g, treads: M0.treads, risers: risers, rise: M0.rise, area: topA });\n      });\n      vol -= offV;\n      wet = flr + cove0 + wallA;\n      /* a real corner of the outline: convex takes the outer corner piece,\n         concave the inner one, as on the old POOL */\n      var turn = 0, ext = 0, int0 = 0, sh0 = sharpAt(poly);\n      for (i = 0; i < n; i++) { var q0 = poly[(i + 1) % n]; turn += poly[i][0] * q0[1] - q0[0] * poly[i][1]; }\n      for (i = 0; i < n; i++) {\n        if (!sh0[i]) continue;\n        var p0 = poly[(i - 1 + n) % n], c0 = poly[i], q1 = poly[(i + 1) % n];\n        var cr = (c0[0] - p0[0]) * (q1[1] - c0[1]) - (c0[1] - p0[1]) * (q1[0] - c0[0]);\n        if ((cr > 0) === (turn > 0)) ext++; else int0++;\n      }\n      _G = { poly: poly, B: B, P: P0, rings: rings, tri: tri, water: water, floorY: floorY, sharp: sh0,\n             area: area, perim: perim, volume: vol, wetted: wet, floorArea: flr, wallArea: wallA, coveArea: cove0, sectors: secs, noseArea: noseA,\n             shellArea: planO, shellVolume: solid - inside + SHELL * (wet - wet0), pit: solid + planO * GRAVEL - offV, gravel: planO * GRAVEL, outerPerim: polyPerim(outer),\n             copingMid: polyPerim(mid), copingArea: polyArea(offsetRing(poly, -COPE_W)) - polyArea(offsetRing(poly, COPE_LIP)),\n             cornersExt: ext, cornersInt: int0 };\n      dividerTakeoff(_G);\n      _GKey = key;\n      return _G;\n    }\n\n    /* ---- THE BILL --------------------------------------------------------\n       Metric here, the budget turns each row by the catalogue's own unit pair.\n       Checked against EXECUTION 2 on 2026-11-04. Rates are the line's where the\n       line has one (the old POOL's plaster, waste, tying wire and membrane, the\n       ADU's bed and grout, the slab's spacers). The steel and the shell are an\n       engineer's in the end: these are a builder's usual figures, walls about\n       8 in, #4 bars at 12 in each way, 6 in on the floor and the cove, and four\n       longitudinal bars with links in the bond beam.\n       There is no shotcrete row: the shell bills as PWC00001, 4500 psi with\n       3/8 in stone, the mix the sprayed wall takes, as the old POOL's gunite\n       does. Plaster goes straight on the shell (no membrane, the US way); the\n       tile band gets the 2K membrane behind it. */\n    var BAR_WALL = 12 * IN, BAR_FLOOR = 6 * IN;\n    var W_SHOT = 1.10, W_LAP = 1.10, WIRE_CUT = 0.30, WIRE_DIAMETER = 0.0016;\n    var PLASTER_KG_M2 = 20, W_PLASTER = 1.05, W_TILE = 1.10, MEMB_KG_M2 = 3.5, GLUE_KG_M2 = 4, GROUT_KG_M2 = 0.24, W_COPE = 1.05;\n    var CODES = {\n      FFR30001:['pcs','3 x 2 m welded reinforcement mesh, 8 mm'],PEE00002:['m3','Pool equipment shaft excavation'],PPE00001:['pcs','Pool electrical control panel'],PPT10001:['pcs','Pool technology shaft'],BKR00010:['set','Modular pipe penetration seal'],\n      BKR00007:['pcs','High-water float alarm'],BKR00008:['pcs','Sump discharge check valve'],BKR00009:['m','32 mm sump discharge pipe'],\n      FEC00013:['pcs','Bent reinforcing stirrup'], FEC00041:['L','PVC primer'], FEC00042:['L','PVC solvent cement'],\n      BKR00145:['m3','Backfill compaction plant'], FFG00001:['m3','Pea gravel bedding'],\n      PPS00001:['pcs','Skimmer'], PPP00002:['pcs','Return jet'], PPP00003:['pcs','Circulation pump'],\n      PPF00001:['pcs','Filter set'], PPE00634:['m','DN63 pressure pipe'], PPE00632:['pcs','DN63 elbow'],\n      PPE00633:['pcs','DN63 tee'], PPP00632:['pcs','DN63 isolation valve'], PBW00001:['m3','Concrete base slab'],\n      BKR00144: ['m3', 'Excavator plant allowance'], BKR00146: ['m3', 'Clean soil haul and disposal allowance'], PBG32601: ['m3', 'Gravel base'],\n      PWC00001: ['m3', 'Concrete - walls'], PWC00002: ['m', 'Rebar'], FEC00026: ['kg', 'Tying wire'], FFM00004: ['pcs', 'Rebar spacer'],\n      PFP00002: ['kg', 'Pool plaster'], PFP00003: ['m2', 'Pool tiles'], FEC00025: ['kg', 'Waterproofing membrane 2K'],\n      FEC00018: ['kg', 'Flex tile adhesive'], SBG00001: ['kg', 'Grout'], PFP00014: ['m', 'Bullnose edge tile'],\n      PFP00015: ['pcs', 'Bullnose corner internal'], PFP00016: ['pcs', 'Bullnose corner external']\n    };\n    /* what the catalogue still lacks: the key billed, its unit, what it is */\n    // Named takeoff items awaiting a central code and supplier price.\n    var MISSING = {\n      'Vault service hatch':['set','Lockable removable cover and frame'],\n      'Vault sump set':['set','Automatic sump pump and float; match the selected vault duty'],\n      'Vault ventilation set':['set','Powered exhaust and separate intake with weather hoods'],\n      'Vault anchors':['pcs','Vault foundation anchorage allowance'],\n      'Vault electrical provisions':['set','Internal equipment connections, local protection and bonding; incoming site feed measured separately'],\n      'Vault installation':['lot','Set, anchor, seal and commission the vault'],\n      'Pressure pipe straight coupling':['pcs','DN63 straight coupling, plain-ended 6 m pipe assumption'],\n      'Pump and filter service union':['pcs','DN63 detachable equipment connection; check supply with pump/filter'],\n      'Pool entry ladder set':['set','Stainless pool ladder with rails and treads'],\n      'Ladder deck socket pair':['pair','Two compatible deck sockets for pool ladder'],\n      'Shotcrete mobilization':['lot','Incremental spray rig and nozzle crew; reconcile with concrete placement labor']\n    };\n    function catalog() {\n      Object.keys(CODES).forEach(function (k) { if (!C.CATALOG[k]) C.CATALOG[k] = { code: k, unit: CODES[k][0], label: CODES[k][1] }; });\n    }\n    var missing = {};\n    function billReset(layer) {\n      C._bill[layer] = {};\n      Object.keys(missing).forEach(function (k) { var m = missing[k]; delete m.by[layer]; if (!Object.keys(m.by).length) delete missing[k]; });\n    }\n    function missQty(m) { var q = 0; Object.keys(m.by).forEach(function (L) { q += m.by[L]; }); return q; }\n    function add(layer, key, qty) {\n      if (!(qty > 0)) return;\n      if (!C.CATALOG[key] || C.CATALOG[key].quoteRequired) {\n        var M0 = MISSING[key] || ['?', key];\n        if (!missing[key]) missing[key] = { unit: M0[0], what: M0[1], by: {} };\n        missing[key].by[layer] = (missing[key].by[layer] || 0) + qty;\n        try { if (C._notBilled && C._notBilled.indexOf(key) < 0) C._notBilled.push(key); } catch (e) {}\n        if(layer!=='gunite-vault')return;\n        // Preserve the measured line in the BOQ and assembly export. Its\n        // descriptive key has no vendor price and remains in the quotation list.\n        if(!C.CATALOG[key])C.CATALOG[key]={code:key,unit:M0[0],label:M0[1],quoteRequired:true};\n      }\n      if (!C._bill[layer]) C._bill[layer] = {};\n      C._bill[layer][key] = (C._bill[layer][key] || 0) + qty;\n    }\n    function rows(layer) { return C._rows(layer); }\n    /* The estimator and Steps consume the same developed centre lines. A run\n       can span several stock lengths; the purchase allowance is applied once. */\n    // Estimating section inside the existing 8 in shell. The four longitudinal\n    // bars and their links follow corresponding stations on the two offset rings.\n    function wallStations(G,wall,chain,count) {\n      var perimeter=chain[wall.length], blocked=[];\n      var ports=circulation(G).rough.filter(function(item){return item.kind==='skimmer' || item.kind==='jet';});\n      wall.forEach(function(a,i){\n        var b=wall[(i+1)%wall.length], edgeLength=chain[i+1]-chain[i];\n        ports.forEach(function(port){\n          var half=port.kind==='skimmer'?0.22:0.105;\n          var lo=0,hi=1;\n          [[0,port.p[0],0.65],[1,port.p[2],half]].forEach(function(axis){\n            var k=axis[0], min=axis[1]-axis[2], max=axis[1]+axis[2], delta=b[k]-a[k];\n            if(Math.abs(delta)<1e-9) {if(a[k]<min || a[k]>max) hi=-1;return;}\n            var u=(min-a[k])/delta, v=(max-a[k])/delta;\n            lo=Math.max(lo,Math.min(u,v)); hi=Math.min(hi,Math.max(u,v));\n          });\n          if(hi>lo) blocked.push([chain[i]+lo*edgeLength,chain[i]+hi*edgeLength]);\n        });\n      });\n      if(!blocked.length) return Array.from({length:count},function(_,i){return (i+0.5)*perimeter/count;});\n      var spans=[];\n      blocked.sort(function(a,b){return a[0]-b[0];}).forEach(function(interval){\n        var prev=spans[spans.length-1];\n        if(prev && interval[0]<=prev[1]+1e-6) prev[1]=Math.max(prev[1],interval[1]);\n        else spans.push(interval.slice());\n      });\n      var jambs=[];\n      spans.forEach(function(span,spanIndex){\n        // Do not create a false pair at the seam of the perimeter.\n        if(span[0]>1e-6 || spans[spans.length-1][1]<perimeter-1e-6) jambs.push(span[0]);\n        if(span[1]<perimeter-1e-6 || spans[0][0]>1e-6) jambs.push(span[1]%perimeter);\n      });\n      var stations=jambs.slice();\n      for(var i=0;i<count;i++){\n        var s=(i+0.5)*perimeter/count;\n        if(spans.some(function(span){return s>=span[0] && s<=span[1];})) continue;\n        var near=jambs.some(function(j){var d=Math.abs(j-s);return Math.min(d,perimeter-d)<0.08;});\n        if(!near) stations.push(s);\n      }\n      return stations.sort(function(a,b){return a-b;});\n    }\n\n    function beamSteel(G, record) {\n      var inner=offsetRing(G.poly,-SHELL/3), outer=offsetRing(G.poly,-2*SHELL/3);\n      var centre=offsetRing(G.poly,-SHELL/2), chain=cumOf(centre), length=chain[centre.length];\n      var barRadius=0.00635, linkRadius=0.004, clearance=barRadius+linkRadius;\n      var upper=-0.068, lower=-0.22, embed=circulation(G).rough.filter(function(i){return i.kind==='jet'||i.kind==='skimmer';});\n      function station(i,t) {\n        var j=(i+1)%centre.length;\n        function interp(r){return [r[i][0]+t*(r[j][0]-r[i][0]),r[i][1]+t*(r[j][1]-r[i][1])];}\n        var a=interp(inner), b=interp(outer), c=interp(centre);\n        // Local drop under a wall fitting. The sloping portions are included\n        // in the material length; final opening reinforcement is job-specific.\n        var drop=0;\n        embed.forEach(function(item){\n          var half=item.kind==='skimmer'?0.23:0.10;\n          if(Math.abs(c[0]-item.p[0])>0.65) return;\n          var f=Math.max(0,Math.min(1,1-(Math.abs(c[1]-item.p[2])-half)/0.40));\n          var bottom=item.kind==='skimmer'?item.p[1]-0.27:item.p[1]-0.06;\n          drop=Math.max(drop,f*(upper-bottom+0.065));\n        });\n        return {inner:a,outer:b,c:c,hi:upper-drop,lo:lower-drop};\n      }\n      var rails=[[],[],[],[]];\n      for(var i=0;i<centre.length;i++){\n        var segments=Math.max(1,Math.ceil((chain[i+1]-chain[i])/0.08));\n        for(var k=0;k<segments;k++){\n          var s=station(i,k/segments);\n          [s.inner,s.outer].forEach(function(p,j){\n            rails[j].push([p[0],s.hi,p[1]]); rails[j+2].push([p[0],s.lo,p[1]]);\n          });\n        }\n      }\n      rails.forEach(function(path){record(4,path.concat([path[0]]));});\n      var count=Math.ceil(length/BAR_WALL), links=[], contacts=[];\n      for(var n=0,edge=0;n<count;n++){\n        var distance=(n+0.5)*length/count;\n        while(edge+1<centre.length && chain[edge+1]<distance) edge++;\n        var s=station(edge,(distance-chain[edge])/(chain[edge+1]-chain[edge] || 1));\n        var dx=s.outer[0]-s.inner[0], dz=s.outer[1]-s.inner[1], span=Math.hypot(dx,dz), normal=unit(dx,dz);\n        var w=span/2+clearance, hi=s.hi+clearance, lo=s.lo-clearance;\n        var bend=Math.min(0.022,w*0.45), path=[];\n        function point(v,y){path.push([s.c[0]+normal[0]*v,y,s.c[1]+normal[1]*v]);}\n        // Bent link with overlapping inward tails at the top corner.\n        point(-w+0.060,hi-0.060);point(-w+bend,hi);\n        function clockwise(v,y,start){for(var q=0;q<=5;q++){var t=(start-q*18)*Math.PI/180;point(v+bend*Math.cos(t),y+bend*Math.sin(t));}}\n        clockwise(w-bend,hi-bend,90);clockwise(w-bend,lo+bend,0);\n        clockwise(-w+bend,lo+bend,-90);clockwise(-w+bend,hi-bend,180);\n        point(-w+bend+0.045,hi-0.045);\n        var mm=Math.round(1000*path.slice(1).reduce(function(sum,p,i){var a=path[i];return sum+Math.hypot(p[0]-a[0],p[1]-a[1],p[2]-a[2]);},0));\n        links.push({path:path,mm:mm,outward:normal});\n        [s.inner,s.outer].forEach(function(p){[s.hi,s.lo].forEach(function(y){contacts.push([p[0],y,p[1],normal]);});});\n      }\n      return {links:links,contacts:contacts};\n    }\n\n    function cage(G) {\n      if (G.cage) return G.cage;\n      var families = ['Floor X', 'Floor Z', 'Wall vertical', 'Wall horizontal', 'Bond beam', 'Divider dowel'];\n      var groups = new Map(),\n        net = 0,\n        radius = 0.25 * IN,\n        cover = SHELL / 2;\n      // Use a 6 m estimating stock length across both unit systems. The\n      // existing lap allowance is on the purchase row, not an engineered splice.\n      var maxNetPiece = 6 / W_LAP;\n\n      function record(f, path, outward) {\n        if (path.length < 2) return;\n        var total = 0;\n        for (var i = 1; i < path.length; i++) {\n          var a = path[i - 1],\n            b = path[i];\n          total += Math.hypot(b[0] - a[0], b[1] - a[1], b[2] - a[2]);\n        }\n        if (total < 0.001) return;\n        // Balance the pieces so the last bar is not a millimetre-long offcut.\n        var pieceLength = total / Math.ceil(total / maxNetPiece);\n        var piece = [path[0]],\n          used = 0;\n        for (var j = 1; j < path.length; j++) {\n          var a = path[j - 1],\n            b = path[j],\n            length = Math.hypot(b[0] - a[0], b[1] - a[1], b[2] - a[2]);\n          while (used + length > pieceLength + 1e-8) {\n            var t = (pieceLength - used) / length;\n            var cut = [a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t, a[2] + (b[2] - a[2]) * t];\n            if (t > 1e-8) piece.push(cut);\n            addPiece(f, piece, outward);\n            length -= pieceLength - used;\n            used = 0;\n            a = cut;\n            piece = [cut];\n          }\n          piece.push(b);\n          used += length;\n        }\n        addPiece(f, piece, outward);\n      }\n\n      function addPiece(f, path, outward) {\n        var len = 0;\n        for (var j = 1; j < path.length; j++) len += Math.hypot(path[j][0] - path[j - 1][0], path[j][1] - path[j - 1][1], path[j][2] -\n          path[j - 1][2]);\n        if (!(len > 0.001)) return;\n        var mm = Math.round(len * 1000),\n          key = f + '-' + mm;\n        if (!groups.has(key)) groups.set(key, { family: f, label: families[f], mm: mm, key: key, net: 0, runs: [] });\n        var g = groups.get(key);\n        if (f === 3) {\n          var a = path[0],\n            b = path[path.length - 1];\n          outward = unit(b[2] - a[2], a[0] - b[0]);\n        }\n        g.runs.push({ path: path, outward: outward });\n        g.net += len;\n        net += len;\n      }\n      var treads = [];\n      G.sectors.forEach(function(s) { s.treads.forEach(function(t) { treads.push(t); }); });\n\n      function treadAt(p) {\n        for (var i = 0; i < treads.length; i++)\n          if (inRing(p, treads[i].poly)) return treads[i];\n        return null;\n      }\n\n      function surface(p, tread) {\n        if (tread) return G.water - tread.depth;\n        var dist = COVE;\n        for (var i = 0; i < G.poly.length; i++) {\n          var a = G.poly[i],\n            b = G.poly[(i + 1) % G.poly.length],\n            dx = b[0] - a[0],\n            dz = b[1] - a[1];\n          var u = Math.max(0, Math.min(1, ((p[0] - a[0]) * dx + (p[1] - a[1]) * dz) / (dx * dx + dz * dz || 1)));\n          dist = Math.min(dist, Math.hypot(p[0] - a[0] - u * dx, p[1] - a[1] - u * dz));\n        }\n        return G.floorY(p) + COVE - Math.sqrt(Math.max(0, COVE * COVE - (COVE - dist) * (COVE - dist)));\n      }\n      [0, 1].forEach(function(axis) {\n        var m = axis ? [1, 0] : [0, 1],\n          e = axis ? [0, 1] : [1, 0];\n        var start = axis ? G.B.x0 : G.B.z0,\n          span = axis ? G.B.w : G.B.l;\n        var count = Math.ceil(span / BAR_FLOOR);\n        for (var k = 0; k < count; k++) {\n          var station = start + (k + 0.5) * span / count;\n          var breaks = [];\n          treads.forEach(function(t) {\n            chordRuns(t.poly, [0, 0], m, e, station).forEach(function(pair) { breaks.push(pair[0][axis], pair[1][axis]); });\n          });\n          if (G.P.ax === axis) breaks = breaks.concat(G.P.cuts);\n          chordRuns(G.poly, [0, 0], m, e, station).forEach(function(pair) {\n            var lo = pair[0][axis],\n              hi = pair[1][axis],\n              path = [];\n            var cuts = [lo].concat(breaks.filter(function(b) { return b > lo && b < hi; }).sort(function(a, b) { return a -\n                b; }), [hi]);\n\n            function pt(v) { return axis ? [station, v] : [v, station]; }\n            for (var j = 1; j < cuts.length; j++) {\n              var a = cuts[j - 1],\n                b = cuts[j];\n              if (b - a < 1e-7) continue;\n              var tread = treadAt(pt((a + b) / 2)),\n                n = Math.ceil((b - a) / 0.12);\n              for (var s = 0; s <= n; s++) {\n                var p = pt(a + (b - a) * s / n),\n                  y = surface(p, tread) - cover + axis * 2 * radius;\n                var last = path[path.length - 1];\n                if (!last || Math.hypot(p[0] - last[0], y - last[1], p[1] - last[2]) > 1e-7) path.push([p[0], y, p[1]]);\n              }\n            }\n            record(axis, path);\n          });\n        }\n      });\n      var wall = offsetRing(G.poly, -cover),\n        c = cumOf(wall),\n        n = Math.ceil(c[c.length - 1] / BAR_WALL);\n      var inside = offsetRing(G.poly, 0.003), wallContacts=[], wallChairs=[];\n\n      function wallBase(i, u) {\n        var j = (i + 1) % inside.length,\n          p = [inside[i][0] + (inside[j][0] - inside[i][0]) * u, inside[i][1] + (inside[j][1] - inside[i][1]) * u];\n        return surface(p, treadAt(p)) - cover;\n      }\n      var stations=wallStations(G,wall,c,n);\n      for (var i = 0, edge = 0; i < stations.length; i++) {\n        var s=stations[i];\n        while (edge + 1 < wall.length && c[edge + 1] < s) edge++;\n        var p = ptAt(wall, c, s / c[c.length - 1]),\n          u = (s - c[edge]) / (c[edge + 1] - c[edge] || 1);\n        var a = wall[edge],\n          b = wall[(edge + 1) % wall.length],\n          normal = unit(b[1] - a[1], a[0] - b[0]);\n        var toe = [p[0] - normal[0] * (cover + COVE), p[1] - normal[1] * (cover + COVE)];\n        var next = (edge + 1) % inside.length;\n        var wallPoint = [inside[edge][0] + (inside[next][0] - inside[edge][0]) * u, inside[edge][1] + (inside[next][1] - inside[edge][\n          1\n        ]) * u];\n        var path = [];\n        for (var h = 0; h <= 6; h++) {\n          var q = [toe[0] + (p[0] - toe[0]) * h / 6, toe[1] + (p[1] - toe[1]) * h / 6];\n          path.push([q[0], surface(q, treadAt(inRing(q, G.poly) ? q : wallPoint)) - cover, q[1]]);\n        }\n        path.push([p[0], -cover, p[1]]);\n        record(2, path, normal);\n        var bottom=wallBase(edge,u);\n        for(var row=1,y=-cover-BAR_WALL;y>=bottom;y-=BAR_WALL,row++) {\n          var contact=[p[0]+normal[0]*radius,y,p[1]+normal[1]*radius];\n          contact.push(normal);\n          wallContacts.push(contact);\n          if(i%2===0 && row%2===1) wallChairs.push({p:contact,normal:normal});\n        }\n      }\n      /* Clip level rows against the bottom at each edge, including the deep\n         end of a sloping wall. Join first and last only across a closed seam. */\n      var rowRing = offsetRing(G.poly, -cover - 2 * radius);\n      for (var y = -cover - BAR_WALL; y > G.water - settings().deep - cover; y -= BAR_WALL) {\n        var paths = [],\n          run = null;\n        for (var i = 0; i < rowRing.length; i++) {\n          var j = (i + 1) % rowRing.length,\n            a = rowRing[i],\n            b = rowRing[j];\n          var low = wallBase(i, 0),\n            high = wallBase(i, 1);\n          if (low > y && high > y) { run = null; continue; }\n          var u = low > y ? (y - low) / (high - low) : 0,\n            v = high > y ? (y - low) / (high - low) : 1;\n          if (!run || u > 0) { run = [];\n            paths.push(run);\n            run.push([a[0] + u * (b[0] - a[0]), y, a[1] + u * (b[1] - a[1])]); }\n          run.push([a[0] + v * (b[0] - a[0]), y, a[1] + v * (b[1] - a[1])]);\n          if (v < 1) run = null;\n        }\n        if (paths.length > 1 && run && Math.hypot(paths[0][0][0] - run[run.length - 1][0], paths[0][0][2] - run[run.length - 1][2]) <\n          1e-7) {\n          paths[0] = paths.pop().concat(paths[0].slice(1));\n        }\n        paths.forEach(function(path) { record(3, path); });\n      }\n      G.posts.forEach(function(p){\n        [-0.07,0.07].forEach(function(dx){var x=p.x+p.e[0]*dx,z=p.z+p.e[1]*dx;\n          record(5,[[x+p.e[0]*0.16,p.base-0.085,z+p.e[1]*0.16],[x,p.base-0.085,z],[x,p.base+p.height-0.05,z]]);\n        });\n      });\n      var beam=beamSteel(G,record);\n      G.cage = {groups:Array.from(groups.values()).sort(function(a,b){return a.family-b.family || a.mm-b.mm;}),\n        net:net, links:beam.links, contacts:wallContacts.concat(beam.contacts), wallChairs:wallChairs};\n      return G.cage;\n    }\n\n    function barLength(G) { return cage(G).net * W_LAP; }\n\n    /* A six-sided tube around the actual bar path. One geometry per run lets\n       wall uprights on opposite sides travel out independently. */\n    function barMesh(T, path, mat, profileRadius) {\n      var pos = [],\n        ix = [],\n        radius = profileRadius || (S.isMetric === false ? 0.25 * IN : 0.006);\n      for (var i = 0; i < path.length; i++) {\n        var a = path[Math.max(0, i - 1)],\n          b = path[Math.min(i + 1, path.length - 1)],\n          p = path[i];\n        var t = new T.Vector3(b[0] - a[0], b[1] - a[1], b[2] - a[2]).normalize();\n        var u = new T.Vector3().crossVectors(t, Math.abs(t.y) > 0.98 ? new T.Vector3(0, 0, 1) : new T.Vector3(0, 1, 0)).normalize();\n        var v = new T.Vector3().crossVectors(t, u);\n        for (var k = 0; k < 6; k++) {\n          var co = radius * Math.cos(k * Math.PI / 3),\n            si = radius * Math.sin(k * Math.PI / 3);\n          pos.push(p[0] + co * u.x + si * v.x, p[1] + co * u.y + si * v.y, p[2] + co * u.z + si * v.z);\n          if (i) { var n = i * 6 + k,\n              m = i * 6 + (k + 1) % 6;\n            ix.push(n - 6, m - 6, m, n - 6, m, n); }\n        }\n      }\n      var geo = new T.BufferGeometry();\n      geo.setAttribute('position', new T.Float32BufferAttribute(pos, 3));\n      geo.setIndex(ix);\n      geo.computeVertexNormals();\n      return new T.Mesh(geo, mat);\n    }\n\n    function buildSteel(ctx) {\n      var T = ctx.THREE,\n        G = basin(T),\n        L = 'gunite-steel',\n        previous = 0;\n      billReset(L);\n      add(L, 'PWC00002', barLength(G));\n      var groups = cage(G).groups;\n      groups.forEach(function(g) {\n        var label = g.label + (S.isMetric === false ? ' #4 - ' : ' \\u00d812 mm - ') + (S.isMetric === false ? (g.mm / 304.8)\n          .toFixed(2) + ' ft' : g.mm + ' mm') + ' x ' + g.runs.length;\n        C._asmMark(ctx, 'gunite-bar-' + g.key, g.family === 2 || g.family === 3 ? 'side' : 'top', label, 'PWC00002', true);\n        // Use differences of cumulative rounded shares to match the catalogue row.\n        var next = previous + g.net * W_LAP;\n        if (ctx.item) ctx.item.qty = (Math.round(next * 100) - Math.round(previous * 100)) / 100;\n        previous = next;\n        if (C._planWanted()) return;\n        var color = barColor(T,g.mm);\n        var mat = new T.MeshStandardMaterial({ color: color, roughness: 0.68, side: T.DoubleSide });\n        g.runs.forEach(function(run) {\n          var body = barMesh(T, run.path, mat, A.viz().key==='steel' ? 0.012 : 0);\n          body.userData.steelLength=g.mm;\n          body.name = label;\n          body.userData.poolSpread = run.outward ? [run.outward[0], 0, run.outward[1]] : [0, [-0.85, -0.45, 0, 0.40, 0.85, 0.65][g\n            .family\n          ], 0];\n          ctx.group.add(body);\n        });\n      });\n    }\n\n    function buildBase(ctx, pit) {\n      var T = ctx.THREE,\n        G = basin(T),\n        L = pit ? 'gunite-pit' : 'gunite-gravel';\n      billReset(L);\n      if (pit) { add(L, 'BKR00144', G.pit);\n        add(L, 'BKR00146', G.pit); } else add(L, 'PBG32601', G.gravel);\n      C._asmMark(ctx, L, 'bottom', pit ? 'Excavate and haul soil' : 'Place gravel base', '', true);\n      var out = offsetRing(G.poly, -SHELL),\n        mat = new T.MeshStandardMaterial({ color: pit ? 0x81694c : 0x99918a, side: T.DoubleSide });\n      var base = fanMesh(T, bands(T, out, G.P), function(p) { return G.floorY(p) - SHELL - (pit ? GRAVEL : 0.002); }, mat, L);\n      ctx.group.add(base);\n      var sectorStart = ctx.group.children.length;\n      buildSectors(ctx, G, mat);\n      for (var i = sectorStart; i < ctx.group.children.length; i++) ctx.group.children[i].position.y = -SHELL - (pit ? GRAVEL :\n      0.002);\n    }\n\n    var LINK_COLOR=0xe56617, WIRE_COLOR=0xbf1978, CHAIR_COLOR=0x697580;\n    function barColor(T,mm) {\n      // Keep bar-length colors in the cool range, away from links and wire.\n      return new T.Color().setHSL(0.49+0.25*((mm*0.61803398875)%1),0.90,0.42);\n    }\n    function buildStirrups(ctx) {\n      var G=basin(ctx.THREE), links=cage(G).links, L='gunite-stirrups', groups=new Map();\n      billReset(L); add(L,'FEC00013',links.length);\n      links.forEach(function(link) {\n        if(!groups.has(link.mm)) groups.set(link.mm,[]);\n        groups.get(link.mm).push(link);\n      });\n      var T=ctx.THREE, stage=A.viz().key==='steel';\n      var mat=new T.MeshBasicMaterial({color:LINK_COLOR,side:T.DoubleSide});\n      groups.forEach(function(items,mm) {\n        var label='Beam stirrup '+(S.isMetric===false?'3/8 in.':'\\u00d88 mm')+' - '+\n          (S.isMetric===false?(mm/304.8).toFixed(2)+' ft':mm+' mm')+' x '+items.length;\n        C._asmMark(ctx,'gunite-link-'+mm,'side',label,'FEC00013',true);\n        if(ctx.item) ctx.item.qty=items.length;\n        if(C._planWanted()) return;\n        items.forEach(function(link){\n          var body=barMesh(T,link.path,mat,stage?0.014:(S.isMetric===false?0.00476:0.004));\n          body.name=label;\n          body.userData.poolSpread=[link.outward[0],0.45,link.outward[1]];\n          ctx.group.add(body);\n        });\n      });\n    }\n\n    function fixingSchedule(G) {\n      if(G.fixings) return G.fixings;\n      var steel=cage(G), ties=steel.contacts.slice(), chairs=steel.wallChairs.slice();\n      var floorZ=[], visited=new Set(), chairCells=new Set();\n      steel.groups.forEach(function(g){\n        if(g.family===1) g.runs.forEach(function(run){floorZ.push(run.path);});\n      });\n      steel.groups.forEach(function(g) {\n        if(g.family!==0) return;\n        g.runs.forEach(function(run){\n          var floor=run.path, z=floor[0][2];\n          floorZ.forEach(function(cross){\n            var x=cross[0][0];\n            if(x<floor[0][0] || x>floor[floor.length-1][0] || z<cross[0][2] || z>cross[cross.length-1][2]) return;\n            var key=Math.round(x*1000)+'/'+Math.round(z*1000);\n            if(visited.has(key)) return;\n            visited.add(key);\n            var i=1;\n            while(i<floor.length-1 && floor[i][0]<x) i++;\n            var a=floor[i-1], b=floor[i], t=(x-a[0])/(b[0]-a[0] || 1);\n            var p=[x,a[1]+t*(b[1]-a[1])+0.006,z];\n            ties.push(p);\n            var cell=Math.floor((x-G.B.x0)/0.60)+'/'+Math.floor((z-G.B.z0)/0.60);\n            if(!chairCells.has(cell)) {chairCells.add(cell);chairs.push({p:p});}\n          });\n        });\n      });\n      var mass=ties.length*WIRE_CUT*Math.PI*Math.pow(WIRE_DIAMETER/2,2)*7850*1.10;\n      G.fixings={ties:ties,chairs:chairs,mass:mass};\n      return G.fixings;\n    }\n\n    function buildFixings(ctx,ties) {\n      var G=basin(ctx.THREE), f=fixingSchedule(G), T=ctx.THREE;\n      var L=ties?'gunite-ties':'gunite-spacers', code=ties?'FEC00026':'FFM00004';\n      var items=ties?f.ties:f.chairs, stage=A.viz().key==='steel';\n      billReset(L); add(L,code,ties?f.mass:items.length);\n      C._asmMark(ctx,L,'top',(ties?'Tie floor, wall and beam intersections':'Place floor chairs and wall spacers')+\n        ' x '+items.length,code,true);\n      if(C._planWanted() || !items.length) return;\n      var geo=ties?new T.TorusGeometry(stage?0.024:0.013,stage?0.006:WIRE_DIAMETER/2,5,12):\n          new T.BoxGeometry(0.042,0.075,0.042);\n      var mat=new T.MeshBasicMaterial({color:ties?WIRE_COLOR:CHAIR_COLOR});\n      var mesh=new T.InstancedMesh(geo,mat,items.length), obj=new T.Object3D();\n      items.forEach(function(item,i) {\n        var p=ties?item:item.p, normal=ties?p[3]:item.normal;\n        obj.position.set(p[0],p[1],p[2]); obj.rotation.set(0,Math.PI/4,0);\n        if(normal) {\n          obj.rotation.y=Math.atan2(normal[1],-normal[0]);\n          if(!ties) {obj.rotation.z=Math.PI/2;obj.position.x+=normal[0]*0.045;obj.position.z+=normal[1]*0.045;}\n        } else if(!ties) obj.position.y-=0.05;\n        obj.updateMatrix(); mesh.setMatrixAt(i,obj.matrix);\n      });\n      mesh.name=ties?'Tie wire at bar intersections':'Bar supports';\n      mesh.instanceMatrix.needsUpdate=true;mesh.computeBoundingSphere();\n      ctx.group.add(mesh);\n    }\n    function dividerLabel(v){\n      return v===1?pointLabel('1 \u00B7 Wider spacing','1 \u00B7 V\u011Bt\u0161\u00ED rozte\u010D'):v===2?pointLabel('2 \u00B7 Closer spacing','2 \u00B7 Men\u0161\u00ED rozte\u010D'):'3 \u00B7 OFF';\n    }\n    function dividerMode(){var v=settings().divider;return v===2 || v===3?v:1;}\n    function dividerTakeoff(G) {\n      var posts=[],tile=0,wetSides=0,foot=0,concrete=0,displaced=0,d=settings();\n      var s=G.sectors.find(function(z){return z.kind==='kids';});\n      if(s && dividerMode()!==3){\n        var g=s.g,edge=g.edge,depth=SEC.kids.level,width=.32,cap=.62,thick=.065,height=depth+.045-thick;\n        var pitch=dividerMode()===1?1.04:.82,offset=cap/2+.02;\n        var centres=edge.map(function(p,i){\n          var a=edge[Math.max(0,i-1)],b=edge[Math.min(edge.length-1,i+1)],t=unit(b[0]-a[0],b[1]-a[1]);\n          return [p[0]+t[1]*offset,p[1]-t[0]*offset];\n        });\n        var c=cumOf(centres),len=c[centres.length-1];\n        function pier(at){\n          var i=1;while(i<centres.length-1 && c[i]<at)i++;\n          var a=centres[i-1],b=centres[i],e=unit(b[0]-a[0],b[1]-a[1]),t=at-c[i-1],x=a[0]+e[0]*t,z=a[1]+e[1]*t;\n          for(var inset=0;inset<=.12;inset+=.03){\n          var px=x+e[1]*inset,pz=z-e[0]*inset;\n          var corners=[[-1,-1],[-1,1],[1,1],[1,-1]].map(function(q){return [px+cap/2*(q[0]*e[0]+q[1]*e[1]),pz+cap/2*(q[0]*e[1]-q[1]*e[0])];});\n          if(corners.some(function(p,j){var q=corners[(j+1)%4];return !inRing(p,g.pts) || crosses(p,q,g.pts) || G.sectors.some(function(o){return o.kind==='steps' && (inRing(p,o.g.pts) || crosses(p,q,o.g.pts) || inRing(o.g.A,corners));});}))continue;\n          return {x:px,z:pz,e:e,station:at,base:G.water-depth,height:height,width:width,kind:'kids',cap:cap,thick:thick};\n          }\n          return null;\n        }\n        var spans=[],run=null,samples=Math.max(8,Math.ceil(len/.045));\n        for(var i=0;i<=samples;i++){\n          var at=len*i/samples;\n          if(pier(at)){if(!run){run=[at,at];spans.push(run);}run[1]=at;}else run=null;\n        }\n        spans.forEach(function(span,spanIndex){\n          var available=span[1]-span[0],count=Math.max(1,Math.min(Math.floor(available/(cap+.12))+1,Math.round(available/pitch)+1));\n          var placed=[];\n          while(count>0){\n            placed=Array.from({length:count},function(_,j){return pier(count===1?(span[0]+span[1])/2:span[0]+available*j/(count-1));});\n            if(placed.every(function(p,j){return p && posts.concat(placed.slice(0,j)).every(function(q){\n              var axes=[p.e,[-p.e[1],p.e[0]],q.e,[-q.e[1],q.e[0]]];\n              return axes.some(function(a){\n                function half(e){return cap/2*(Math.abs(a[0]*e[0]+a[1]*e[1])+Math.abs(a[0]*e[1]-a[1]*e[0]));}\n                return Math.abs((p.x-q.x)*a[0]+(p.z-q.z)*a[1])>=half(p.e)+half(q.e)+.04;\n              });\n            });}))break;\n            count--;\n          }\n          if(count)placed.forEach(function(p){\n          p.span=spanIndex;posts.push(p);\n          var submerged=depth-height;\n          foot+=width*width;wetSides+=4*width*height+cap*cap-width*width+4*cap*submerged;\n          concrete+=width*width*height+cap*cap*thick;displaced+=width*width*height+cap*cap*submerged;\n          tile+=4*width*height+2*cap*cap-width*width+4*cap*thick;\n          });\n        });\n      }\n      G.posts=posts;G.edgeStrips=[];G.postTile=tile;G.nonPlaster=wetSides;\n      G.wetted+=wetSides-foot;G.volume-=displaced;G.shellVolume+=concrete;\n    }\n    function buildPosts(ctx,G,material,tiled) {\n      G.posts.forEach(function(p){\n        var skin=tiled?0.003:0, T=ctx.THREE;\n        var m=new T.Mesh(new T.BoxGeometry(p.width+skin*2,p.height+skin,p.width+skin*2),material);\n        m.name=p.kind+(tiled?' divider tile':' divider concrete');\n        m.position.set(p.x,p.base+(p.height+skin)/2,p.z);m.rotation.y=-Math.atan2(p.e[1],p.e[0]);ctx.group.add(m);\n        var capMesh=new T.Mesh(new T.BoxGeometry(p.cap+skin*2,p.thick+skin,p.cap+skin*2),material);\n        capMesh.name=tiled?'Divider tiled walking surface':'Divider cap';capMesh.rotation.y=m.rotation.y;\n        capMesh.position.set(p.x,p.base+p.height+p.thick/2,p.z);ctx.group.add(capMesh);\n      });\n    }\n    function billTile(G0) {\n      /* the band and the contrasting edge on every step */\n      var L = 'gunite-tile', a = G0.perim * TILE + G0.noseArea + G0.postTile;\n      billReset(L);\n      add(L, 'PFP00003', a * W_TILE);\n      add(L, 'FEC00025', a * MEMB_KG_M2);\n      add(L, 'FEC00018', a * GLUE_KG_M2);\n      add(L, 'SBG00001', a * GROUT_KG_M2);\n    }\n    function billCoping(G0) {\n      var L = 'gunite-coping', n = G0.cornersExt + G0.cornersInt;\n      billReset(L);\n      /* the corner pieces take a coping's width off each of their two legs */\n      add(L, 'PFP00014', Math.max(0, G0.copingMid - n * 2 * COPE_W) * W_COPE);\n      add(L, 'PFP00016', G0.cornersExt);\n      add(L, 'PFP00015', G0.cornersInt);\n      add(L, 'FEC00018', G0.copingArea * GLUE_KG_M2);\n      add(L, 'SBG00001', G0.copingArea * GROUT_KG_M2);\n    }\n\n    /* Surface-skimming estimating layout. No submerged suction outlet. The\n       station on each wall is the outermost intersection of a horizontal ray,\n       which also guarantees an unobstructed pipe route to the exterior rail. */\n    function serviceStation(G, side, low, high, ideal) {\n      var best = null;\n      for (var i = 0; i <= 24; i++) {\n        var f = low + (high - low) * i / 24, z = G.B.z0 + f * G.B.l;\n        var runs = chordRuns(G.poly, [0,0], [0,1], [1,0], z);\n        if (!runs.length) continue;\n        var p = side < 0 ? runs[0][0] : runs[runs.length - 1][1];\n        var test = [p[0] - side * 0.10, z];\n        if (!inRing(test,G.poly)) continue;\n        var shelf = G.sectors.some(function(s) { return inRing(test,s.g.pts); });\n        var score = (shelf ? 2 : 0) + Math.abs(f-ideal);\n        if (!best || score < best.score) best = {p:p, score:score, shelf:shelf};\n      }\n      if (!best) {\n        var z = G.B.z0 + ideal * G.B.l;\n        var runs = chordRuns(G.poly,[0,0],[0,1],[1,0],z);\n        var p = side < 0 ? runs[0][0] : runs[runs.length-1][1];\n        best = {p:p, shelf:true};\n      }\n      return best;\n    }\n\n    // Offsets are relative to the pool centre and survive a move of the pool itself.\n    function equipmentSite(B){\n      var d=settings(),vault=d.plantMode==='vault',w=vault?3.2:2.85,l=vault?2:1.2;\n      var side=d.padSide===-1?-1:1,custom=Array.isArray(d.plantOffset) && d.plantOffset.length===2 && d.plantOffset.every(Number.isFinite);\n      var x=custom?B.cx+d.plantOffset[0]:B.cx,z=custom?B.cz+d.plantOffset[1]:side>0?B.z1+l/2+.85:B.z0-l/2-.85;\n      var xmin=B.x0-w/2-.65,xmax=B.x1+w/2+.65,zmin=B.z0-l/2-.65,zmax=B.z1+l/2+.65;\n      if(x>xmin && x<xmax && z>zmin && z<zmax){\n        var poly=ring().poly,hw=w/2+.65,hl=l/2+.65;\n        var corners=[[-hw,-hl],[hw,-hl],[hw,hl],[-hw,hl]].map(function(v){return [x+v[0],z+v[1]];});\n        var conflicts=corners.some(function(q,i){return inRing(q,poly) || crosses(q,corners[(i+1)%4],poly);}) ||\n          poly.some(function(q){return Math.abs(q[0]-x)<hw && Math.abs(q[1]-z)<hl;});\n        var bypass=z>=B.cz?B.z1+.68:B.z0-.68;\n        if(!conflicts)conflicts=[x-1.17,x+1.18].some(function(px){return crosses([px,z],[px,bypass],poly);});\n        if(conflicts){\n          var gaps=[x-xmin,xmax-x,z-zmin,zmax-z],i=gaps.indexOf(Math.min.apply(null,gaps));\n          if(i===0)x=xmin;else if(i===1)x=xmax;else if(i===2)z=zmin;else z=zmax;\n        }\n      }\n      return {x:x,z:z,w:w,l:l,vault:vault,level:vault?-1.38:0};\n    }\n    function circulation(G) {\n      if (G.circulation) return G.circulation;\n      var rows = {rough:[], pad:[], equipment:[],vault:[]},site=equipmentSite(G.B);rows.site=site;\n      var take = serviceStation(G,-1,0.18,0.82,0.50);\n      var jets = [serviceStation(G,1,0.10,0.44,0.24),serviceStation(G,1,0.56,0.90,0.76)];\n      var side=site.z<G.B.cz?-1:1;\n      var west = G.B.x0-0.65, east = G.B.x1+0.65, padZ=site.z;\n      var bypass=side>0?Math.max(padZ,G.B.z1+.68):Math.min(padZ,G.B.z0-.68);\n      var pumpX = site.x-0.48, filterX = site.x+0.48;\n      var suctionY = G.water-0.52, returnY = G.water-0.19;\n      var rough = rows.rough, equipment = rows.equipment;\n      function solid(list,code,name,kind,p,size,color,spread,quantity) {\n        list.push({code:code,name:name,kind:kind,p:p,size:size,color:color,spread:spread,qty:quantity || 1});\n      }\n      function line(list,a,b,color,spread) {\n        var len = Math.hypot(b[0]-a[0],b[1]-a[1],b[2]-a[2]);\n        if (len > 0.0001) list.push({code:'PPE00634',name:'DN63 pipe',kind:'pipe',a:a,b:b,color:color,spread:spread,qty:len});\n      }\n      function fitting(list,code,name,p,dirs,color,spread) {\n        list.push({code:code,name:name,kind:'fitting',p:p,dirs:dirs,color:color,spread:spread,qty:1});\n      }\n      function direction(a,b) {\n        var len = Math.hypot(b[0]-a[0],b[1]-a[1],b[2]-a[2]);\n        return [(b[0]-a[0])/len,(b[1]-a[1])/len,(b[2]-a[2])/len];\n      }\n      function route(list,path,color,spread) {\n        path=path.filter(function(p,i){return !i || p.some(function(v,k){return Math.abs(v-path[i-1][k])>1e-6;});});\n        for (var i=1;i<path.length;i++) {\n          line(list,path[i-1],path[i],color,spread);\n          if (i<path.length-1) {\n            var d0=direction(path[i],path[i-1]), d1=direction(path[i],path[i+1]);\n            if (Math.abs(d0[0]*d1[0]+d0[1]*d1[1]+d0[2]*d1[2])<0.001)\n              fitting(list,'PPE00632','DN63 elbow',path[i],[d0,d1],color,spread);\n          }\n        }\n      }\n      var blue=0x236bcb, green=0x169e88, westward=[-1,0,0], eastward=[1,0,0], padward=[0,0,side];\n      var sx=take.p[0], sz=take.p[1];\n      solid(rough,'PPS00001','Surface skimmer','skimmer',[sx,G.water,sz],[0.32,0.18,0.34],0xe3e9ee,westward);\n      // The skimmer body opens to the water. Its bottom socket meets the riser.\n      var outletX=sx-0.21, suctionRiser=pumpX-0.69;\n      route(rough,[[outletX,G.water-0.27,sz],[outletX,suctionY,sz],[west,suctionY,sz],\n        [west,suctionY,bypass],[suctionRiser,suctionY,bypass],[suctionRiser,suctionY,padZ],[suctionRiser,site.level+0.30,padZ]],blue,westward);\n      line(equipment,[suctionRiser,0.30,padZ],[pumpX-0.23,0.30,padZ],blue,padward);\n      fitting(equipment,'PPE00632','Pump inlet elbow',[suctionRiser,0.30,padZ],[[0,Math.sign(suctionY-(site.level+.30)),0],[1,0,0]],blue,padward);\n      fitting(equipment,'PPP00632','Suction isolation valve',[suctionRiser+0.22,0.30,padZ],[[-1,0,0],[1,0,0]],blue,padward);\n      solid(equipment,'PPP00003','Circulation pump','pump',[pumpX,0.30,padZ],[0.46,0.36,0.30],0x35536a,padward);\n      var filterRadius=0.28;\n      route(equipment,[[pumpX,0.48,padZ],[pumpX,0.65,padZ],[filterX-filterRadius,0.65,padZ]],green,padward);\n      solid(equipment,'PPF00001','Sand filter and multiport valve','filter',[filterX,0.48,padZ],[filterRadius,0.72],0x63838d,padward);\n      var pressureRiser=filterX+0.70;\n      line(equipment,[filterX+filterRadius,0.65,padZ],[pressureRiser,0.65,padZ],green,padward);\n      fitting(equipment,'PPP00632','Return isolation valve',[filterX+0.49,0.65,padZ],[[-1,0,0],[1,0,0]],green,padward);\n      fitting(equipment,'PPE00632','Filter outlet elbow',[pressureRiser,0.65,padZ],[[-1,0,0],[0,Math.sign(returnY-(site.level+.65)),0]],green,padward);\n      var nearJet=jets[side>0?1:0], farJet=jets[side>0?0:1];\n      var nearZ=nearJet.p[1], farZ=farJet.p[1];\n      route(rough,[[pressureRiser,site.level+0.65,padZ],[pressureRiser,returnY,padZ],[pressureRiser,returnY,bypass],[east,returnY,bypass],\n        [east,returnY,nearZ],[east,returnY,farZ],[farJet.p[0]-0.035,returnY,farZ]],green,eastward);\n      fitting(rough,'PPE00633','Return header tee',[east,returnY,nearZ],[[0,0,-1],[0,0,1],[-1,0,0]],green,eastward);\n      line(rough,[east,returnY,nearZ],[nearJet.p[0]-0.035,returnY,nearZ],green,eastward);\n      jets.forEach(function(j) {\n        solid(rough,'PPP00002','Wall return jet','jet',[j.p[0]-0.035,returnY,j.p[1]],[0.06,0.07],0xf2f4f4,eastward);\n      });\n      var padWidth=2.85, padDepth=1.20, padThickness=0.12;\n      if(!site.vault)solid(rows.pad,'PBW00001','Equipment pad concrete','box',[site.x,.06,padZ],\n        [padWidth,padThickness,padDepth],0xb0aca5,[0,-.65,0],padWidth*padDepth*padThickness);\n      else vaultItems(rows.vault,site);\n      // Field joints on plain-ended stock, placed on the actual segment.\n      [rough,equipment].forEach(function(list){\n        list.filter(function(it){return it.kind==='pipe';}).forEach(function(it){\n          var count=Math.ceil(it.qty/6-1e-8);\n          for(var i=1;i<count;i++) {\n            var p=it.a.map(function(x,k){return x+(it.b[k]-x)*i/count;});\n            fitting(list,'Pressure pipe straight coupling','Straight pressure coupling',p,\n              [direction(p,it.a),direction(p,it.b)],it.color,it.spread);\n          }\n        });\n      });\n      var ports=[\n        [pumpX-0.25,0.30,padZ], [pumpX,0.56,padZ],\n        [filterX-filterRadius-0.09,0.65,padZ], [filterX+filterRadius+0.06,0.65,padZ]\n      ];\n      ports.forEach(function(p,i) {\n        var dirs=i===1?[[0,-1,0],[0,1,0]]:[[-1,0,0],[1,0,0]];\n        fitting(equipment,'Pump and filter service union','Equipment service union',p,dirs,i===0?blue:green,padward);\n      });\n      if(site.level)equipment.forEach(function(it){\n        [it.p,it.a,it.b].forEach(function(p){if(p)p[1]+=site.level;});\n      });\n      var cabinetZ=padZ+(site.vault?site.l/2+.15:.42)*side;\n      solid(equipment,'PPE00001','Pool control panel','box',[site.x,.83,cabinetZ],[.46,.54,.20],0x667481,padward);\n      // Cabinet and its mounting bracket are counted as one panel assembly.\n      equipment.push({name:'Control panel pedestal',kind:'box',p:[site.x,.28,cabinetZ],size:[.10,.56,.10],color:0x666b70,spread:padward});\n      G.circulation=rows;\n      return rows;\n    }\n\n    function vaultItems(list,site){\n      var w=site.w,l=site.l,x=site.x,z=site.z;\n      function box(code,name,p,size,color,qty){\n        list.push({code:code,name:name,p:p,size:size,color:color,kind:'box',qty:qty,spread:[0,-.65,0]});\n      }\n      box('PBW00001','Vault anchor slab',[x,-1.57,z],[w+.16,.18,l+.16],0xaaa7a2,(w+.16)*(l+.16)*.18);\n      box('PBW00001','Equipment housekeeping plinth',[x,-1.34,z],[2.60,.16,.86],0xb0aca5,2.60*.16*.86);\n      // Single estimating mat with 40 mm cover. Two stock sheets span the\n      // anchor slab with an overlap; the structural supplier confirms detailing.\n      var mx=w+.16-.08,mz=l+.16-.08;\n      for(var axis=0;axis<2;axis++){\n        var span=axis?mx:mz,runs=Math.ceil(span/.15);\n        for(var j=0;j<=runs;j++){\n          var t=span*(j/runs-.5),a=axis?[x+t,-1.61,z-mz/2]:[x-mx/2,-1.617,z+t],b=axis?[x+t,-1.61,z+mz/2]:[x+mx/2,-1.617,z+t];\n          list.push({kind:'shaftBar',a:a,b:b,name:'Anchor slab mesh',color:0x56647b,spread:[0,-.65,0]});\n        }\n      }\n      box('PPT10001','FRP vault base',[x,-1.45,z],[w,.06,l],0x667d82,1);\n      [-1,1].forEach(function(sign){\n        box(null,'Vault end wall',[x+sign*(w-.05)/2,-.72,z],[.05,1.44,l],0x667d82,0);\n        box(null,'Vault side wall',[x,-.72,z+sign*(l-.05)/2],[w-.10,1.44,.05],0x667d82,0);\n      });\n      box('Vault service hatch','Lockable removable service cover',[x,.015,z],[w,.03,l],0x72828a,1);\n      box('Vault sump set','Automatic sump pump',[x+w/2-.25,-1.26,z+l/2-.25],[.24,.28,.24],0x3c5260,1);\n      var drainX=x+w/2-.25,drainZ=z+l/2-.25;\n      box('BKR00007','High-water float alarm',[drainX-.16,-1.04,drainZ],[.06,.09,.06],0xd3ab43,1);\n      box('BKR00008','Sump discharge check valve',[drainX,-1.06,drainZ],[.07,.10,.07],0x466d70,1);\n      box('BKR00009','32 mm discharge riser',[drainX,-.79,drainZ],[.032,.90,.032],0x5b8981,.90);\n      box('BKR00009','32 mm discharge to external connection',[drainX,-.34,drainZ+.25],[.032,.032,.50],0x5b8981,.50);\n      box('Vault ventilation set','Powered vent and intake',[x+w/2-.22,.12,z-l/2+.22],[.22,.22,.22],0x6b7d80,1);\n      box(null,'Vent intake',[x-w/2+.22,.12,z+l/2-.22],[.18,.22,.18],0x6b7d80,0);\n    }\n    /* Integrate the union of the pipe trenches outside the shell. Orthogonal\n       branches share the excavation at elbows and tees. Within each strip the\n       polygon edges are straight, so each exposed piece is a trapezoid. */\n    function serviceTrench(G) {\n      if (G.trench) return G.trench;\n      var outer=offsetRing(G.poly,-SHELL), trenches=[], xs=[], zs=[];\n      var result={faces:[],cut:0,stone:0,reuse:0,haul:0};\n      circulation(G).rough.forEach(function(item) {\n        if (item.kind!=='pipe' || Math.abs(item.a[1]-item.b[1])>1e-7 || item.a[1]>=0) return;\n        var a=item.a, b=item.b, half=0.20;\n        var rect={x0:Math.min(a[0],b[0])-half,x1:Math.max(a[0],b[0])+half,\n          z0:Math.min(a[2],b[2])-half,z1:Math.max(a[2],b[2])+half,depth:-a[1]+0.0315+0.10};\n        trenches.push(rect); xs.push(rect.x0,rect.x1); zs.push(rect.z0,rect.z1);\n      });\n      function cuts(values) {\n        return values.sort(function(a,b){return a-b;}).filter(function(a,i,list){return !i || a-list[i-1]>1e-7;});\n      }\n      var site=equipmentSite(G.B),exc=null;\n      if(site.vault){\n        exc={x0:site.x-site.w/2-.30,x1:site.x+site.w/2+.30,z0:site.z-site.l/2-.30,z1:site.z+site.l/2+.30};\n        xs.push(exc.x0,exc.x1);zs.push(exc.z0,exc.z1);\n      }\n      xs=cuts(xs);\n      outer.forEach(function(a,i) {\n        zs.push(a[1]);\n        var b=outer[(i+1)%outer.length];\n        xs.forEach(function(x) {\n          if ((a[0]<x)!==(b[0]<x)) zs.push(a[1]+(b[1]-a[1])*(x-a[0])/(b[0]-a[0]));\n        });\n      });\n      zs=cuts(zs);\n      function exposed(left,right,hits) {\n        var runs=[], head=left;\n        hits.forEach(function(pair) {\n          var a=Math.max(left,pair[0][0]), b=Math.min(right,pair[1][0]);\n          if (b<=a) return;\n          if (a>head) runs.push([head,a]);\n          head=Math.max(head,b);\n        });\n        if(right>head) runs.push([head,right]);\n        return runs;\n      }\n      for(var j=1;j<zs.length;j++) {\n        var z0=zs[j-1], z1=zs[j], dz=z1-z0, z=(z0+z1)/2;\n        var active=trenches.filter(function(r){return r.z0<z && z<r.z1;});\n        if(!active.length) continue;\n        var low=chordRuns(outer,[0,0],[0,1],[1,0],z0+dz*0.25);\n        var high=chordRuns(outer,[0,0],[0,1],[1,0],z0+dz*0.75);\n        for(var i=1;i<xs.length;i++) {\n          var x=(xs[i-1]+xs[i])/2, depth=0;\n          active.forEach(function(r){if(r.x0<x && x<r.x1) depth=Math.max(depth,r.depth);});\n          if(!depth || exc && x>exc.x0 && x<exc.x1 && z>exc.z0 && z<exc.z1)continue;\n          var lo=exposed(xs[i-1],xs[i],low), hi=exposed(xs[i-1],xs[i],high);\n          lo.forEach(function(a,k) {\n            var b=hi[k]; if(!b) return;\n            var face=[[1.5*a[0]-0.5*b[0],z0],[1.5*a[1]-0.5*b[1],z0],\n                      [1.5*b[1]-0.5*a[1],z1],[1.5*b[0]-0.5*a[0],z1]];\n            var area=polyArea(face);\n            result.faces.push({p:face,depth:depth});\n            result.cut+=area*depth;\n            result.stone+=area*0.10;\n          });\n        }\n      }\n      // The spoil that cannot return is the imported bed and pipe displacement.\n      var pipeVolume=0;\n      circulation(G).rough.forEach(function(item) {\n        if(item.kind!=='pipe' || item.a[1]!==item.b[1] || item.a[1]>=0) return;\n        var ax=item.a[0]!==item.b[0]?0:1, coord=ax===0?2:0, fixed=item.a[coord];\n        var hits=chordRuns(outer,[0,0],ax===0?[0,1]:[1,0],ax===0?[1,0]:[0,1],fixed);\n        var ia=ax===0?0:2;\n        var overlap=0,left=Math.min(item.a[ia],item.b[ia]),right=Math.max(item.a[ia],item.b[ia]);\n        hits.forEach(function(h){overlap+=Math.max(0,Math.min(right,h[1][ax])-Math.max(left,h[0][ax]));});\n        if(exc && fixed>(ax===0?exc.z0:exc.x0) && fixed<(ax===0?exc.z1:exc.x1))\n          overlap+=Math.max(0,Math.min(right,ax===0?exc.x1:exc.z1)-Math.max(left,ax===0?exc.x0:exc.z0));\n        pipeVolume+=Math.max(0,right-left-overlap)*Math.PI*0.0315*0.0315;\n      });\n      var displaced=0;\n      if(exc){\n        var area=(exc.x1-exc.x0)*(exc.z1-exc.z0);\n        result.faces.push({p:[[exc.x0,exc.z0],[exc.x1,exc.z0],[exc.x1,exc.z1],[exc.x0,exc.z1]],depth:1.81,vault:site});\n        result.shaftCut=area*1.81;result.cut+=result.shaftCut;result.stone+=area*.15;\n        displaced=site.w*site.l*1.48+(site.w+.16)*(site.l+.16)*.18;\n      }\n      result.haul=Math.min(result.cut,result.stone+pipeVolume+displaced);\n      result.reuse=result.cut-result.haul;\n      G.trench=result;\n      return result;\n    }\n\n    function buildTrench(ctx,phase) {\n      var layer='gunite-'+phase, trench=serviceTrench(basin(ctx.THREE)), cut=phase==='trench', bed=phase==='bed';\n      billReset(layer);\n      if(cut) { add(layer,'PEE00002',trench.shaftCut || 0);add(layer,'BKR00144',trench.cut-(trench.shaftCut || 0)); add(layer,'BKR00146',trench.haul); }\n      else if(bed) add(layer,'FFG00001',trench.stone);\n      else add(layer,'BKR00145',trench.reuse);\n      C._asmMark(ctx,layer,'bottom',cut?'Excavate pipe trenches':bed?'Place pipe bedding':'Backfill and compact tested lines','',true);\n      if(C._planWanted()) return;\n      var pos=[];\n      trench.faces.forEach(function(f){\n        if(f.vault && !bed && !cut){\n          var site=f.vault,ring=[[site.x-site.w/2,site.z-site.l/2],[site.x+site.w/2,site.z-site.l/2],[site.x+site.w/2,site.z+site.l/2],[site.x-site.w/2,site.z+site.l/2]];\n          for(var j=0;j<4;j++){var k=(j+1)%4;[f.p[j],ring[k],ring[j],f.p[j],f.p[k],ring[k]].forEach(function(q){pos.push(q[0],-.016,q[1]);});}\n          return;\n        }\n        var y=cut?-f.depth:bed?-f.depth+(f.vault ? .15 : .10):-.016;\n        [0,2,1,0,3,2].forEach(function(k){pos.push(f.p[k][0],y,f.p[k][1]);});\n      });\n      if(pos.length) {\n        var mat=new ctx.THREE.MeshStandardMaterial({color:cut?0x866a50:bed?0xb2a38a:0x87775f,side:ctx.THREE.DoubleSide});\n        var body=meshOf(ctx.THREE,pos,null,mat,layer);\n        body.userData.poolSpread=[0,cut?-1.8:bed?-1.45:-0.85,0]; ctx.group.add(body);\n      }\n    }\n\n    function jointCount(items) {\n      // Field solvent sockets: two per elbow/valve, three per tee, one at\n      // each wall fitting. Equipment adapters depend on the selected unit.\n      var sockets={PPE00632:2,PPE00633:3,PPP00632:2,PPS00001:1,PPP00002:1,'Pressure pipe straight coupling':2,'Pump and filter service union':1};\n      return items.reduce(function(sum,item){return sum+(sockets[item.code] || 0);},0);\n    }\n\n    function buildCirculation(ctx, phase) {\n      var T=ctx.THREE, layer='gunite-'+phase, items=circulation(basin(T))[phase];\n      var materials={};\n      function material(color) {\n        if (!materials[color]) materials[color]=new T.MeshStandardMaterial({color:color,roughness:0.7});\n        return materials[color];\n      }\n      function box(p,size,color) {\n        var body=new T.Mesh(new T.BoxGeometry(size[0],size[1],size[2]),material(color));\n        body.position.set(p[0],p[1],p[2]);\n        return body;\n      }\n      function tube(a,b,r,color) {\n        var start=new T.Vector3().fromArray(a), end=new T.Vector3().fromArray(b), axis=end.clone().sub(start);\n        var body=new T.Mesh(new T.CylinderGeometry(r,r,axis.length(),12),material(color));\n        body.position.copy(start.add(end).multiplyScalar(0.5));\n        body.quaternion.setFromUnitVectors(new T.Vector3(0,1,0),axis.normalize());\n        return body;\n      }\n      billReset(layer);\n      var joints=jointCount(items);\n      // Budget allowance per DN63 field socket, including application losses.\n      add(layer,'FEC00041',joints*0.012);\n      add(layer,'FEC00042',joints*0.018);\n      if(phase==='vault' && !items.length || phase==='pad' && !items.length)return;\n      if(phase==='vault'){add(layer,'FFR30001',2);add(layer,'FFM00004',12);add(layer,'Vault anchors',4);add(layer,'BKR00010',3);add(layer,'Vault electrical provisions',1);add(layer,'Vault installation',1);}\n      var labels={vault:'Install equipment vault, anchor slab, drainage and ventilation',rough:'Embed skimmer, return jets and pressure-test pipework',pad:'Cast equipment pad',equipment:'Install pump, filter and isolation valves'};\n      C._asmMark(ctx,layer,'top',labels[phase],'',true);\n      items.forEach(function(item) {\n        if(item.code)add(layer,item.code,item.qty);\n        if (C._planWanted()) return;\n        var body, p=item.p, c=item.color;\n        if(item.kind==='shaftBar')body=tube(item.a,item.b,.004,c);\n        else if (item.kind==='pipe') body=tube(item.a,item.b,0.0315,c);\n        else if (item.kind==='fitting') {\n          body=new T.Group();\n          item.dirs.forEach(function(d) {\n            body.add(tube(p,[p[0]+d[0]*0.072,p[1]+d[1]*0.072,p[2]+d[2]*0.072],0.042,c));\n          });\n          if(item.code==='PPP00632') body.add(box([p[0],p[1]+0.065,p[2]],[0.15,0.03,0.04],0xde772e));\n        } else if (item.kind==='skimmer') {\n          body=new T.Group();\n          body.add(box([p[0]-0.16,p[1],p[2]],item.size,c));\n          body.add(box([p[0]-0.21,p[1]-0.14,p[2]],[0.20,0.26,0.20],c));\n          body.add(box([p[0]+0.016,p[1],p[2]],[0.045,0.12,0.25],0x344652));\n          body.add(box([p[0]-0.21,0.035,p[2]],[0.26,0.05,0.26],c));\n        } else if (item.kind==='jet') {\n          body=new T.Group();\n          body.add(tube([p[0]-0.035,p[1],p[2]],[p[0]+0.05,p[1],p[2]],0.06,c));\n          body.add(tube([p[0]-0.039,p[1],p[2]],[p[0]-0.034,p[1],p[2]],0.021,0x203949));\n        } else if (item.kind==='filter') {\n          body=tube([p[0],p[1]-.36,p[2]],[p[0],p[1]+.36,p[2]],item.size[0],c);\n        } else body=box(p,item.size,c);\n        body.name=item.name;\n        body.userData.poolSpread=item.spread;\n        if(item.code==='Vault service hatch'){\n          body.userData.poolSpread=[0,1.4,0];\n          if(A.viz().key==='circulation')body.visible=false;\n        }\n        body.userData.poolItem=item.code;\n        ctx.group.add(body);\n      });\n    }\n\n    /* ---- THE COLOURS: the core's own slots and dots ---------------------- */\n    var PALETTE = {\n      gpWhite: 0xEEF3F2, gpAqua: 0xBFE3E6, gpPearl: 0xC4CCCF, gpBlue: 0x7FA6BC, gpMidnight: 0x37454F,\n      gtCobalt: 0x2D6F92, gtAqua: 0x4FA3B0, gtSlate: 0x5A6670, gtStone: 0xB9AE9C, gtBlack: 0x23262A,\n      gcTravertine: 0xD8D0C2, gcLimestone: 0xBEB9AE, gcConcrete: 0xA9A7A2, gcBluestone: 0x6E7B85, gcCharcoal: 0x3F4245\n    };\n    var SLOTS = [\n      { key: 'plaster', labelKey: 'pool_surface_plaster', def: 'Plaster', pal: ['gpWhite', 'gpAqua', 'gpPearl', 'gpBlue', 'gpMidnight'] },\n      { key: 'tile', labelKey: 'pool_surface_tiles', def: 'Tiles', pal: ['gtCobalt', 'gtAqua', 'gtSlate', 'gtStone', 'gtBlack'] },\n      { key: 'coping', labelKey: 'pool_coping', def: 'Coping', pal: ['gcTravertine', 'gcLimestone', 'gcConcrete', 'gcBluestone', 'gcCharcoal'] }\n    ];\n\n    /* ---- THE MESHES ----------------------------------------------------- */\n    var _mats = null;\n    function mats(T3) {\n      if (_mats) { paint(); return _mats; }\n      function std(c, o) { var q = { color: c, roughness: (o && o.r) || 0.85, metalness: 0, side: T3.DoubleSide }; if (o && o.op) { q.transparent = true; q.opacity = o.op; q.depthWrite = false; q.roughness = 0.12; } return new T3.MeshStandardMaterial(q); }\n      _mats = { plaster: std(0xdcecf2), shell: std(0xa9a7a2, { r: 0.95 }), tile: std(0x2d6f92, { r: 0.35 }), coping: std(0xd8d0c2), water: std(0x57b6e6, { op: 0.5 }) };\n      _mats.plaster.polygonOffset=true; _mats.plaster.polygonOffsetFactor=-1; _mats.plaster.polygonOffsetUnits=-1;\n      paint();\n      return _mats;\n    }\n    function paint() {\n      _mats.plaster.color.setHex(A.colorSlotOf('plaster'));\n      _mats.tile.color.setHex(A.colorSlotOf('tile'));\n      _mats.coping.color.setHex(A.colorSlotOf('coping'));\n    }\n    function meshOf(T3, pos, nor, mat, name) {\n      var g = new T3.BufferGeometry();\n      g.setAttribute('position', new T3.Float32BufferAttribute(pos, 3));\n      if (nor) g.setAttribute('normal', new T3.Float32BufferAttribute(nor, 3)); else g.computeVertexNormals();\n      var m = new T3.Mesh(g, mat);\n      m.name = name || '';\n      return m;\n    }\n    /* a band between two rings of the same length: a ring here is a list of\n       [x, y, z], and the normals keep a real corner hard */\n    function strip(T3, a, b, sharp, nor, pos, nrm) {\n      var n = a.length, i;\n      /* a triangle is wound to face its normal: a double sided material turns\n         the normal of a face seen from its back, and the lighting with it */\n      function tri(p, q, r, Np, Nq, Nr) {\n        var ux = q[0] - p[0], uy = q[1] - p[1], uz = q[2] - p[2], vx = r[0] - p[0], vy = r[1] - p[1], vz = r[2] - p[2];\n        var fx = uy * vz - uz * vy, fy = uz * vx - ux * vz, fz = ux * vy - uy * vx;\n        var ok = fx * (Np[0] + Nq[0] + Nr[0]) + fy * (Np[1] + Nq[1] + Nr[1]) + fz * (Np[2] + Nq[2] + Nr[2]) >= 0;\n        var L = ok ? [p, q, r] : [p, r, q], M0 = ok ? [Np, Nq, Nr] : [Np, Nr, Nq], k;\n        for (k = 0; k < 3; k++) { pos.push(L[k][0], L[k][1], L[k][2]); nrm.push(M0[k][0], M0[k][1], M0[k][2]); }\n      }\n      for (i = 0; i < n; i++) {\n        var j = (i + 1) % n, Na = nor(i, j, 0, sharp[i]), Nb = nor(j, i, 0, sharp[j]), Ma = nor(i, j, 1, sharp[i]), Mb = nor(j, i, 1, sharp[j]);\n        tri(a[i], b[i], b[j], Na, Ma, Mb);\n        tri(a[i], b[j], a[j], Na, Mb, Nb);\n      }\n    }\n    /* the inward horizontal normal at point i, on the edge to j: a corner takes\n       the edge's own, a curve the two edges' mean */\n    function normalAt(poly) {\n      var n = poly.length;\n      function edgeN(i) { var q = poly[(i + 1) % n], c = poly[i], e = unit(q[0] - c[0], q[1] - c[1]); return [-e[1], e[0]]; }\n      return function (i, j, hard) {\n        var e0 = (j === (i + 1) % n) ? edgeN(i) : edgeN(j);\n        if (hard) return e0;\n        var a = edgeN((i - 1 + n) % n), b = edgeN(i), u = unit(a[0] + b[0], a[1] + b[1]);\n        return u;\n      };\n    }\n    function fanMesh(T3, tri, yOf, mat, name) {\n      var pos = [];\n      tri.forEach(function (t) { t.forEach(function (p) { pos.push(p[0], yOf(p), p[1]); }); });\n      return meshOf(T3, pos, null, mat, name);\n    }\n    function buildShell(ctx, finish) {\n      var T3 = ctx.THREE, G0 = basin(T3), M = mats(T3), poly = G0.poly, n = poly.length, N0 = normalAt(poly), i, k;\n      var pos = [], nrm = [];\n      var L=finish?'gunite-plaster':'gunite-shell';\n      billReset(L);\n      if(finish) add(L,'PFP00002',Math.max(0,G0.wetted-G0.perim*(TILE-DROP)-G0.noseArea-G0.nonPlaster)*PLASTER_KG_M2*W_PLASTER);\n      else { add(L,'PWC00001',G0.shellVolume*W_SHOT); add(L,'Shotcrete mobilization',1); }\n      C._asmMark(ctx,L,'top',finish?'Apply pool plaster':'Place and cure shotcrete shell',finish?'PFP00002':'PWC00001',true);\n      var face=finish?M.plaster:M.shell;\n      function ringAt(k0) {\n        var r = G0.rings[k0], out = [];\n        for (i = 0; i < n; i++) out.push([r.p[i][0], G0.floorY(r.p[i]) + r.h, r.p[i][1]]);\n        return out;\n      }\n      /* the wall: the top of the shell down to the head of the cove */\n      var top = poly.map(function (p) { return [p[0], 0, p[1]]; });\n      strip(T3, top, ringAt(0), G0.sharp, function (a, b, lvl, hard) { var h = N0(a, b, hard); return [h[0], 0, h[1]]; }, pos, nrm);\n      /* the cove */\n      for (k = 0; k < COVE_N; k++) {\n        (function (k0) {\n          var th0 = G0.rings[k0].th, th1 = G0.rings[k0 + 1].th;\n          strip(T3, ringAt(k0), ringAt(k0 + 1), G0.sharp, function (a, b, lvl, hard) {\n            var h = N0(a, b, hard), th = lvl ? th1 : th0, c = Math.cos(th), s = Math.sin(th);\n            return [h[0] * c, s, h[1] * c];\n          }, pos, nrm);\n        })(k);\n      }\n      ctx.group.add(meshOf(T3, pos, nrm, face, 'gunite-wall'));\n      ctx.group.add(fanMesh(T3, G0.tri, G0.floorY, face, 'gunite-floor'));\n      buildSectors(ctx, G0, face);\n      if(finish) return;\n      buildPosts(ctx,G0,M.shell,false);\n      /* the back of the shell: its outside face, the rim and the underside */\n      var out = offsetRing(poly, -SHELL), posO = [], nrmO = [], outerSharp = G0.sharp, N1 = normalAt(out);\n      var a0 = out.map(function (p) { return [p[0], 0, p[1]]; });\n      var a1 = out.map(function (p, q) { return [p[0], G0.floorY(poly[q]) - SHELL, p[1]]; });\n      strip(T3, a0, a1, outerSharp, function (a, b, lvl, hard) { var h = N1(a, b, hard); return [-h[0], 0, -h[1]]; }, posO, nrmO);\n      strip(T3, a0, top, outerSharp, function () { return [0, 1, 0]; }, posO, nrmO);\n      ctx.group.add(meshOf(T3, posO, nrmO, M.shell, 'gunite-back'));\n      ctx.group.add(fanMesh(T3, bands(T3, out, G0.P), function (p) { return G0.floorY(p) - SHELL; }, M.shell, 'gunite-under'));\n      ctx.log('GUNITE shell ' + n + ' points, water ' + (Math.round(G0.area * 10) / 10) + ' m2, wet ' + (Math.round(G0.wetted * 10) / 10) + ' m2, ' + (Math.round(G0.volume * 10) / 10) + ' m3');\n    }\n    /* a triangle wound to face its normal, as in strip() */\n    function faceTri(pos, nrm, p, q, r, N) {\n      var ux = q[0] - p[0], uy = q[1] - p[1], uz = q[2] - p[2], vx = r[0] - p[0], vy = r[1] - p[1], vz = r[2] - p[2];\n      var ok = (uy * vz - uz * vy) * N[0] + (uz * vx - ux * vz) * N[1] + (ux * vy - uy * vx) * N[2] >= 0;\n      var L = ok ? [p, q, r] : [p, r, q], k;\n      for (k = 0; k < 3; k++) { pos.push(L[k][0], L[k][1], L[k][2]); nrm.push(N[0], N[1], N[2]); }\n    }\n    /* the treads stand on the basin as solids: a flat top up to the wall and a\n       riser at each chord, its foot under the floor */\n    function buildSectors(ctx, G0, face) {\n      var pos = [], nrm = [], up = [0, 1, 0];\n      G0.sectors.forEach(function (s0) {\n        s0.treads.forEach(function (tr) {\n          var y = G0.water - tr.depth;\n          tr.tri.forEach(function (t) { faceTri(pos, nrm, [t[0][0], y, t[0][1]], [t[1][0], y, t[1][1]], [t[2][0], y, t[2][1]], up); });\n        });\n        \n        s0.risers.forEach(function (r0) {\n          var yT = G0.water - r0.top, yB = (r0.bot != null) ? (G0.water - r0.bot) : (Math.min(G0.floorY(r0.a), G0.floorY(r0.b), G0.floorY([(r0.a[0] + r0.b[0]) / 2, (r0.a[1] + r0.b[1]) / 2])) - 0.02);\n          var a0 = [r0.a[0], yT, r0.a[1]], b0 = [r0.b[0], yT, r0.b[1]], a1 = [r0.a[0], yB, r0.a[1]], b1 = [r0.b[0], yB, r0.b[1]];\n          var e=unit(r0.b[0]-r0.a[0],r0.b[1]-r0.a[1]),sign=yT>=yB?1:-1,N=[-e[1]*sign,0,e[0]*sign];\n          faceTri(pos, nrm, a0, b0, b1, N);\n          faceTri(pos, nrm, a0, b1, a1, N);\n        });\n      });\n      if (pos.length) ctx.group.add(meshOf(ctx.THREE, pos, nrm, face, 'gunite-sectors'));\n    }\n    function buildTile(ctx) {\n      var T3 = ctx.THREE, G0 = basin(T3), M = mats(T3), poly = offsetRing(G0.poly, 0.004), N0 = normalAt(G0.poly), pos = [], nrm = [];\n      billTile(G0);\n      C._asmMark(ctx,'gunite-tile','top','Waterline and step tiles','',true);\n      var a = poly.map(function (p) { return [p[0], -0.001, p[1]]; }), b = poly.map(function (p) { return [p[0], -TILE, p[1]]; });\n      strip(T3, a, b, G0.sharp, function (i, j, lvl, hard) { var h = N0(i, j, hard); return [h[0], 0, h[1]]; }, pos, nrm);\n      ctx.group.add(meshOf(T3, pos, nrm, M.tile, 'gunite-tile'));\n      /* the steps' edges */\n      var pN = [], nN = [], up = [0, 1, 0];\n      G0.sectors.forEach(function (s0) {\n        s0.treads.forEach(function (tr) {\n          if (!tr.noses) return;\n          var y = G0.water - tr.depth + 0.002;\n          tr.noses.forEach(function(nose){triangles(T3, nose).forEach(function (t) { faceTri(pN, nN, [t[0][0], y, t[0][1]], [t[1][0], y, t[1][1]], [t[2][0], y, t[2][1]], up); });});\n        });\n      });\n      buildPosts(ctx,G0,M.tile,true);\n      G0.edgeStrips.forEach(function(s){\n        ctx.group.add(fanMesh(T3,triangles(T3,s.poly),function(){return G0.water-s.depth+0.002;},M.tile,'zone boundary tile'));\n      });\n      if (pN.length) ctx.group.add(meshOf(T3, pN, nN, M.tile, 'gunite-nosing'));\n    }\n    function buildCoping(ctx) {\n      var T3 = ctx.THREE, G0 = basin(T3), M = mats(T3), inn = offsetRing(G0.poly, COPE_LIP), out = offsetRing(G0.poly, -COPE_W), N0 = normalAt(G0.poly), pos = [], nrm = [];\n      billCoping(G0);\n      C._asmMark(ctx,'gunite-coping','top','Install coping','',true);\n      function lvl(r, y) { return r.map(function (p) { return [p[0], y, p[1]]; }); }\n      var up = function () { return [0, 1, 0]; };\n      strip(T3, lvl(inn, COPE_T), lvl(out, COPE_T), G0.sharp, up, pos, nrm);\n      strip(T3, lvl(inn, 0), lvl(inn, COPE_T), G0.sharp, function (i, j, l0, hard) { var h = N0(i, j, hard); return [h[0], 0, h[1]]; }, pos, nrm);\n      strip(T3, lvl(out, 0), lvl(out, COPE_T), G0.sharp, function (i, j, l0, hard) { var h = N0(i, j, hard); return [-h[0], 0, -h[1]]; }, pos, nrm);\n      strip(T3, lvl(inn, 0), lvl(out, 0), G0.sharp, function () { return [0, -1, 0]; }, pos, nrm);\n      ctx.group.add(meshOf(T3, pos, nrm, M.coping, 'gunite-coping'));\n    }\n    /* THE GROUND OVER THE SHELL: nothing drawn, only depth. From above the shell\n       under the ground is hidden and the page's own ground stays as it is; the\n       inside of the pool shows through the hole. It stands in the scene, not in\n       the model's group, which the camera is fitted to; off in the plan. */\n    var _occ = null, _occKey = '', _waterOutline = null;\n    function syncPoolGrid(st){\n      // The pool owns the 3D ground mask. The house grid belongs only to the plan.\n      var plan=st.view==='2d' && !global.LEVA_NO_GRID;\n      st._gridOff=!plan;\n      if(st._gridHelper)st._gridHelper.visible=plan;\n      if(st._gridAxes)st._gridAxes.visible=plan;\n      if(st._fadePad)st._fadePad.visible=false;\n    }\n    function groundSync() {\n      var T3 = global.THREE, st = A._stage();\n      if (!T3 || !st || !st.scene) return;\n      var G0 = basin(T3), off = C._planWanted() || S.view === '2d';\n      if (_occ && _occKey !== _GKey) {\n        st.scene.remove(_occ, _waterOutline);\n        _occ.geometry.dispose(); _occ.material.dispose();\n        _waterOutline.geometry.dispose(); _waterOutline.material.dispose();\n        _occ = null; _waterOutline = null;\n      }\n      if (!_occ) {\n        var out = offsetRing(G0.poly, -COPE_W), R = 60, sh = new T3.Shape(), h = new T3.Path(), i;\n        sh.moveTo(-R, -R); sh.lineTo(R, -R); sh.lineTo(R, R); sh.lineTo(-R, R); sh.closePath();\n        for (i = 0; i < out.length; i++) { if (i) h.lineTo(out[i][0], -out[i][1]); else h.moveTo(out[i][0], -out[i][1]); }\n        h.closePath();\n        sh.holes.push(h);\n        _occ = new T3.Mesh(new T3.ShapeGeometry(sh), new T3.MeshBasicMaterial({ colorWrite: false, side: T3.DoubleSide }));\n        _occ.rotation.x = -Math.PI / 2;\n        _occ.position.y = -0.012;\n        _occ.renderOrder = -5;\n        _occ.name = 'gunite-ground';\n        _occ.onBeforeRender=function(){ this.material.depthWrite=!(A.explode() || (C._asm2 && C._asm2.k) || (A.viz().key==='steel' || A.viz().key==='circulation')); };\n        _occ.userData.arSkip = true;\n        _occ.raycast = function () {};\n        _occKey = _GKey;\n        var outlineGeometry = new T3.BufferGeometry().setFromPoints(G0.poly.map(function(p) {\n          return new T3.Vector3(p[0],G0.water,p[1]);\n        }));\n        _waterOutline = new T3.LineLoop(outlineGeometry,new T3.LineBasicMaterial({color:0x586c7a,transparent:true,opacity:0.65}));\n        _waterOutline.name='gunite-circulation-waterline';\n        _waterOutline.userData.arSkip=true;\n        _waterOutline.raycast=function(){};\n        st.scene.add(_occ,_waterOutline);\n      }\n      _occ.visible = !off;\n      _waterOutline.visible = !off && A.viz().key==='circulation';\n      syncPoolGrid(st);\n\n    }\n    function buildWater(ctx) {\n      var T3 = ctx.THREE, G0 = basin(T3), M = mats(T3), m = fanMesh(T3, triangles(T3, G0.poly), function () { return G0.water; }, M.water, 'gunite-water');\n      C._asmMark(ctx,'gunite-water','top','Fill pool','',true);\n      m.renderOrder = 6;\n      ctx.group.add(m);\n    }\n\n    /* ---- THE PLAN ------------------------------------------------------- */\n    P.beforeBuild = function () {\n      var d = settings();\n      limits();\n      S.polygon = ring().poly;\n      S.storeys = 1;\n      S.openings = []; S.parts = []; S.doors = [];\n      void d;\n    };\n    /* A DRAG IN THE PLAN ONLY REPAINTS: the core drops STATE.polygon at the first\n       move of the footprint's grips and beforeBuild waits for the release, so\n       the plan showed the box until the finger came up. The plan asks here. */\n    P._planPoly = function () { return ring().poly; };\n    /* A POOL IS NOT ON THE WALLS' MODULE: the core's snap took 30 x 15 ft to\n       9.375 x 4.375 m at a switch of units, and back to 30 x 14 ft. Sizes go in\n       6 in or 10 cm. */\n    P._planSnap = function (v, kind) {\n      if (kind !== 'w' && kind !== 'l') return null;\n      var st = (S.isMetric === false) ? 6 * IN : 0.1;\n      return Math.round(v / st) * st;\n    };\n    /* the sectors on the plan, through the asset's ink (floorplan-lib-v218) */\n    function planInk() {\n      var d = settings(), R0 = ring(), c = cumOf(R0.poly), P0 = basin(global.THREE).P, out = [];\n      SEC_ORDER.forEach(function (kind) {\n        var sx = d.sectors[kind];\n        if (!sx || !secOk(R0.poly, c, kind, sx, d.sectors)) return;\n        var g = shelfGeometry(R0.poly,c,kind,d.sectors), M0 = secModel(P0,g,kind,parentLevel(R0.poly,c,kind,d.sectors));\n        var selected=global.document.querySelector('#cf-sx-strip [data-k^=\"cyc:gunite\"].cf-sel');\n        var activeKey=selected && selected.dataset.k;\n        var on=activeKey?activeKey==='cyc:guniteFeatures' && feature===kind:d.mode===kind;\n        var ink = on ? '#C49A4A' : '#3B3B3B';\n        out.push({ pts: g.pts, closed: true, fill: kind==='kids'?'rgba(27,164,184,0.55)':kind==='relax'?'rgba(223,162,61,0.58)':'rgba(255,255,255,0.5)', stroke: ink, width: on ? 2 : 1.2,\n                   label: tr(SEC[kind].key, SEC[kind].def), fit: [g.chord, g.apex], at: [(g.A[0] + g.B[0]) / 2 + g.m[0] * g.apex * 0.45, (g.A[1] + g.B[1]) / 2 + g.m[1] * g.apex * 0.45] });\n        M0.treads.forEach(function (t0, j) {\n          if (!j) return;\n          chordRuns(g.pts, g.A, g.m, g.e, t0.t0).forEach(function (run) { out.push({ pts: run, stroke: ink, width: 1 }); });\n        });\n      });\n      if (global.THREE) {\n        var G=basin(global.THREE), ladder=placedLadder(G);\n        G.posts.forEach(function(p){\n          var v=[-p.e[1],p.e[0]], r=p.cap/2;\n          var pts=[[-r,-r],[r,-r],[r,r],[-r,r]].map(function(c){return [p.x+c[0]*p.e[0]+c[1]*v[0],p.z+c[0]*p.e[1]+c[1]*v[1]];});\n          out.push({pts:pts,closed:true,fill:'#336783',stroke:'#233e50',width:1});\n        });\n        if(ladder){\n          function lp(x,z){return [ladder.p[0]+ladder.t[0]*x+ladder.n[0]*z,ladder.p[1]+ladder.t[1]*x+ladder.n[1]*z];}\n          out.push({pts:[lp(-0.24,-0.15),lp(-0.24,0.31),lp(0.24,0.31),lp(0.24,-0.15)],stroke:'#38566b',width:2});\n        }\n        var service=circulation(G);\n        service.rough.forEach(function(item) {\n          if(item.kind!=='pipe' || item.a[1]!==item.b[1]) return;\n          out.push({pts:[[item.a[0],item.a[2]],[item.b[0],item.b[2]]],stroke:item.color===0x236bcb?'#236bcb':'#168874',width:1.4});\n        });\n        var site=service.site,x=site.x,z=site.z,w=site.w/2,l=site.l/2;\n        out.push({pts:[[x-w,z-l],[x+w,z-l],[x+w,z+l],[x-w,z+l]],closed:true,stroke:'#475662',\n          fill:'rgba(120,140,145,0.18)',width:1.2,label:site.vault?pointLabel('Equipment vault','\u0160achta'):pointLabel('Pump / filter','Filtrace'),fit:[2*w,2*l],at:[x,z]});\n      }\n      return out;\n    }\n    P._planOut = function () { return COPE_W; };\n    P._handleOffset = 0.15;\n    /* the grips over the plan's ink, the houseboat's way: the nodes stand on the\n       drawn wall */\n    P._handleOverlay = true;\n    /* A POOL IS NOT ON THE WALLS' MODULE: the core's snap took 30 x 15 ft to\n       9.375 x 4.375 m at a switch of units, and back to 30 x 14 ft. Sizes go in\n       6 in or 10 cm. */\n    P._planSnap = function (v, kind) {\n      if (kind !== 'w' && kind !== 'l') return null;\n      var st = (S.isMetric === false) ? 6 * IN : 0.1;\n      return Math.round(v / st) * st;\n    };\n    /* one kota for the length and one for the width, not one per point of a\n       curve; the water's own size, drawn outside the coping */\n    P._planKoty = function () {\n      var B = boxOf(ring().poly), zt = B.z0 - COPE_W, xr = B.x1 + COPE_W;\n      return [{ a: [B.x0, zt], b: [B.x1, zt], nx: 0, nz: -1, len: B.w, horiz: true },\n              { a: [xr, B.z0], b: [xr, B.z1], nx: 1, nz: 0, len: B.l, horiz: false }];\n    };\n\n    /* SIZE AND SHAPE ARE TWO MODES OF THE FLOORPLAN (Marek 2026-11-04 18:08). In\n       SIZE the core's own footprint grips scale the whole shape. In SHAPE the\n       grips are the outline's nodes, one per node on the core's own rects (a\n       rect of no size with its four corners on the node), and one between each\n       two nodes: dragging that one adds a node there. */\n    var SNAP = 2 * IN;\n    function segMid(i) {\n      var R = ring(), n = R.ctrl.length, a = R.ctrl[i], b = R.ctrl[(i + 1) % n], len = R.poly.length;\n      var span = (b - a + len) % len || len, p0;\n      if (span === 1) {\n        var A0 = R.poly[a], B0 = R.poly[(a + 1) % len];\n        return [(A0[0] + B0[0]) / 2, (A0[1] + B0[1]) / 2];\n      }\n      p0 = R.poly[(a + Math.floor(span / 2)) % len];\n      return [p0[0], p0[1]];\n    }\n    function pointRect(key, p, style) {\n      return { key: key, x0: p[0], x1: p[0], z0: p[1], z1: p[1], snap: SNAP, movable: false, solo: true,\n               noGrip: ['x0', 'x1', 'z0', 'z1'], style: style };\n    }\n    P._rects = function (step) {\n      if (step !== 'layout') return [];\n      var d0 = settings();\n      var editingFeatures=featureOpen();\n      if(editingFeatures)return [];\n      if ((editingFeatures?feature==='steps':d0.mode==='steps') && d0.sectors.steps) {\n        /* a sector's two ends slide along the outline, its middle moves it whole */\n        var R1 = ring(), c1 = cumOf(R1.poly), sx1 = d0.sectors.steps, pmS = pointRect('p:sm', ptAt(R1.poly, c1, sx1.a + wrap(sx1.b - sx1.a) / 2), 'secondary');\n        pmS.gripR = 5; pmS.gripFill = '#ffffff'; pmS.gripEdge = '#C49A4A';\n        return [pointRect('p:sa', ptAt(R1.poly, c1, sx1.a), 'primary'), pointRect('p:sb', ptAt(R1.poly, c1, sx1.b), 'primary'), pmS];\n      }\n      if (d0.mode !== 'shape') return [];\n      var R = ring(), out = [], i;\n      for (i = 0; i < R.ctrl.length; i++) out.push(pointRect('p:n' + i, R.poly[R.ctrl[i]], 'primary'));\n      for (i = 0; i < R.ctrl.length; i++) {\n        var pm = pointRect('p:m' + i, segMid(i), 'secondary');\n        pm.gripR = 5; pm.gripFill = '#ffffff'; pm.gripEdge = '#C49A4A';\n        out.push(pm);\n      }\n      return out;\n    };\n    var _pin = null;\n    function pinOff() { _pin = null; }\n    global.addEventListener('pointerup', pinOff, true);\n    global.addEventListener('pointercancel', pinOff, true);\n    P._rectApply = function (key, r) {\n      var sm = /^p:s([abm])$/.exec(key);\n      if (sm) {\n        var d1 = settings(), R2 = ring(), c2 = cumOf(R2.poly), sx2 = d1.sectors.steps;\n        if (!sx2) return;\n        if (!_pin || _pin.key !== key) {\n          var at0 = sm[1] === 'a' ? sx2.a : (sm[1] === 'b' ? sx2.b : sx2.a + wrap(sx2.b - sx2.a) / 2), p0 = ptAt(R2.poly, c2, at0);\n          _pin = { key: key, x: p0[0], z: p0[1], s: wrap(at0), a: sx2.a, b: sx2.b };\n        }\n        var fx = (Math.abs(r.x0 - _pin.x) > Math.abs(r.x1 - _pin.x)) ? r.x0 : r.x1, fz = (Math.abs(r.z0 - _pin.z) > Math.abs(r.z1 - _pin.z)) ? r.z0 : r.z1;\n        var v = nearS(R2.poly, c2, [fx, fz]), next = { a: sx2.a, b: sx2.b,toe:true }, ds = wrap(v - _pin.s + 0.5) - 0.5;\n        if (sm[1] === 'a') next.a = v;\n        else if (sm[1] === 'b') next.b = v;\n        else { next.a = wrap(_pin.a + ds); next.b = wrap(_pin.b + ds); }\n        if (secOk(R2.poly,c2,'steps',next,d1.sectors)) d1.sectors.steps = next;\n        return;\n      }\n      var m = /^p:([nm])(\\d+)$/.exec(key);\n      if (!m) return;\n      var i = +m[2], W = worldNodes(), R = ring();\n      if (!_pin || _pin.key !== key) {\n        if (m[1] === 'm') {\n          /* a new node on the curve: it joins smooth where the segment curves;\n             a straight segment splits into two straight ones */\n          var a0 = W[i], mid = segMid(i);\n          W.splice(i + 1, 0, [mid[0], mid[1], a0[3] ? 0 : 1, a0[3]]);\n          _pin = { key: key, node: i + 1, x: mid[0], z: mid[1] };\n        } else {\n          var q = R.poly[R.ctrl[i]];\n          _pin = { key: key, node: i, x: q[0], z: q[1] };\n        }\n        /* the ring's own points, not the footprint's: the fit is inside them */\n        _pin.W = W;\n      }\n      var nx = (Math.abs(r.x0 - _pin.x) > Math.abs(r.x1 - _pin.x)) ? r.x0 : r.x1;\n      var nz = (Math.abs(r.z0 - _pin.z) > Math.abs(r.z1 - _pin.z)) ? r.z0 : r.z1;\n      var W2 = _pin.W.map(function (q2) { return q2.slice(); });\n      W2[_pin.node][0] = nx; W2[_pin.node][1] = nz;\n      if (setWorld(W2)) { _pin.W = W2; _ring = null; S.polygon = ring().poly; }\n    };\n    P._rectDims = function () { return []; };\n    function setMode(m, why) {\n      var d = settings();\n      if (d.mode === m) return;\n      d.mode = m;\n      log('plan mode ' + m + ' (' + (why || 'strip') + ')');\n      try { A.rebuild(); A.savePref(); } catch (e) {}\n    }\n\n    /* a sector's tile: the first tap makes it and picks it, a tap on another\n       picks it, a second tap takes it away */\n    function secTap(kind) {\n      var d = settings();\n      if (d.sectors[kind] && d.mode === kind) {\n        A.undoPush();\n        delete d.sectors[kind];\n        d.mode = 'size';\n        log('sector ' + kind + ' taken away');\n      } else {\n        if (!d.sectors[kind]) {\n          var sx = preferredSector(kind) || (kind==='steps'?null:secPlace(kind));\n          if (!sx) { log('sector ' + kind + ': no room for it on this outline'); return; }\n          A.undoPush(); if(kind==='steps') delete d.ladder;\n          d.sectors[kind] = sx;\n          log('sector ' + kind + ' at ' + sx.a.toFixed(3) + ' to ' + sx.b.toFixed(3));\n        }\n        d.mode = kind;\n      }\n      try { A.rebuild(); A.savePref(); } catch (e) {}\n    }\n\n    /* ---- THE SHAPES IN THE PLAN LIBRARY, the houses' own drawer ---------- */\n    function shapeTile(key) {\n      var Sh = SHAPES[key], us = S.isMetric === false, w = us ? Sh.ft[0] * FT : Sh.m[0], l = us ? Sh.ft[1] * FT : Sh.m[1];\n      var T = tessellate(Sh.n.map(function (q) { return [q[0] * w / 2, q[1] * l / 2, q[2], q[3]]; })), B = boxOf(T.poly), o = [];\n      T.poly.forEach(function (p) { o.push(Math.round((p[0] - B.x0) * 100) / 100, Math.round((p[1] - B.z0) * 100) / 100); });\n      return { id: 'gunite-' + key, shape: key, w: w, d: l, floor: Math.round(polyArea(T.poly) * (w / B.w) * (l / B.l) * 10) / 10, name: tr(Sh.key, Sh.name), cap: tr(Sh.key, Sh.name),\n               leva: true, noMirror: !(key === 'kidney' || key === 'lshape' || key === 'freeform'), thumb: { o: o } };\n    }\n    P._libraryItems = function () { return SHAPE_ORDER.map(shapeTile); };\n    P._libraryPick = function (it, mirror) {\n      if (!it || !SHAPES[it.shape]) return false;\n      try { A.undoPush(); } catch (e) {}\n      applyShape(it.shape, !!mirror);\n      settings().mode = 'size';\n      resettle();\n      log('shape ' + it.shape + (mirror ? ' mirrored' : '') + ' -- ' + S.footprint.w.toFixed(2) + ' x ' + S.footprint.l.toFixed(2) + ' m');\n      try { A.rebuild(); A.savePref(); } catch (e2) {}\n      try { var st = A._stage(); if (st && st.fitCameraToFootprint) st.fitCameraToFootprint(); } catch (e3) {}\n      return true;\n    };\n    /* a new outline: the sectors go where they fit on it */\n    function resettle() {\n      var d = settings(), had = d.sectors;\n      d.sectors = {};\n      (had.steps && had.steps.from?['kids','relax','steps']:SEC_ORDER).forEach(function (k) {\n        if (!had[k]) return;\n        var attached=k==='steps' && had.steps.from && d.sectors[had.steps.from] && shelfStairs(had.steps.from,d.sectors);\n        var sx = attached?attached.sx:preferredSector(k) || (k==='steps'?null:secPlace(k));\n        if (sx) d.sectors[k] = sx;\n      });\n    }\n    /* THE BAR AS ON THE HOUSES (Marek 2026-11-04 19:11): upload, voice, the field.\n       The upload opens the drawer of shapes, with the camera and the device. */\n    P._cmdPlain = false;\n\n    /* WORDS FIRST WITHOUT A MODEL: a shape and a size are read here and cost\n       nothing; anything more goes to the worker's pool reader, like a picture */\n    function plain(t) { return String(t || '').normalize('NFD').replace(/[\\u0300-\\u036f]/g, '').toLowerCase(); }\n    var WORDS = { roundrect:['rounded rectangle','rounded rectangular','zaobleny obdelnik'], lap:['lap pool','lap','plavecky bazen','plavecka draha'], rectangle: ['rectangle', 'rectangular', 'obdelnik', 'obdelnikovy'], roman: ['roman', 'rimsky'], grecian: ['grecian', 'greek', 'recky'],\n                  oval: ['oval', 'ovalny'], kidney: ['kidney', 'bean', 'ledvina', 'ledvinovy'], lshape: ['l-shape', 'l-shaped', 'l shape', 'l shaped', 'tvar l', 'tvaru l'],\n                  figure8: ['figure 8', 'figure-8', 'figure eight', 'figure of eight', 'osmicka'], freeform: ['freeform', 'free form', 'free-form', 'lagoon', 'volny tvar'] };\n    var STOP = /^(a|an|the|pool|swimming|inground|in-ground|gunite|concrete|with|of|in|please|make|want|i|shape|shaped|size|bazen|bazenu|bazenovy|tvar|tvaru|ve|v|s|chci|udelej|prosim|o|rozmeru)$/;\n    P._planWords = function (text) {\n      var t = plain(text), key = '', i, hit = '';\n      SHAPE_ORDER.forEach(function (sk) {\n        var L0 = (WORDS[sk] || []).concat([plain(tr(SHAPES[sk].key, SHAPES[sk].name))]);\n        for (i = 0; i < L0.length; i++) if (L0[i] && L0[i].length > 1 && t.indexOf(L0[i]) >= 0 && L0[i].length > hit.length) { key = sk; hit = L0[i]; }\n      });\n      var U = \"(m|ft|feet|foot|'|metru|metry|metr|meters?|metres?|stop)?\";\n      var D = new RegExp('(\\\\d+(?:[.,]\\\\d+)?)\\\\s*' + U + '\\\\s*(?:x|by|\\\\*|\\\\u00d7|na|krat)\\\\s*(\\\\d+(?:[.,]\\\\d+)?)\\\\s*' + U).exec(t);\n      if (!key && !D) return false;\n      var rest = t, Wd = 0, Ln = 0;\n      if (hit) rest = rest.replace(hit, ' ');\n      if (D) {\n        rest = rest.replace(D[0], ' ');\n        var unit = D[2] || D[4] || '', feet = /^(ft|feet|foot|'|stop)$/.test(unit) || (!unit && S.isMetric === false);\n        var aV = parseFloat(D[1].replace(',', '.')) * (feet ? FT : 1), bV = parseFloat(D[3].replace(',', '.')) * (feet ? FT : 1);\n        Wd = Math.max(aV, bV); Ln = Math.min(aV, bV);\n      }\n      /* more than a shape and a size: the reader's */\n      var left = rest.split(/[\\s,.;:!?]+/).filter(function (w) { return w && !STOP.test(w); });\n      if (left.length > 1) return false;\n      try { A.undoPush(); } catch (e) {}\n      if (key) applyShape(key);\n      if (Wd > 0 && Ln > 0) {\n        S.footprint = { w: Math.max(LIM.min, Math.min(LIM.maxW, Wd)), l: Math.max(LIM.min, Math.min(LIM.maxL, Ln)) };\n        _ring = null;\n      }\n      settings().mode = 'size';\n      resettle();\n      log('words: ' + (key || settings().shape) + (Wd ? (' ' + Wd.toFixed(2) + ' x ' + Ln.toFixed(2) + ' m') : '') + ' -- no model');\n      laidOut();\n      return true;\n    };\n    /* the reader's answer: nodes 0..1 across the outline's box, clockwise, and\n       the box's size in metres */\n    P._planRead = function (a) {\n      if (!a || !Array.isArray(a.nodes) || a.nodes.length < 3 || !(a.w > 0) || !(a.l > 0)) return false;\n      var fit = Math.min(1, LIM.maxW / a.w, LIM.maxL / a.l), up = Math.max(1, LIM.min / a.w, LIM.min / a.l), s0 = fit < 1 ? fit : up, w = a.w * s0, l = a.l * s0;\n      var N = a.nodes.map(function (q) { return [(q.x - 0.5) * w, (q.y - 0.5) * l, q.smooth ? SM : CN, q.straight ? 1 : 0]; });\n      var sum = 0, i, n = N.length;\n      for (i = 0; i < n; i++) { var q2 = N[(i + 1) % n]; sum += N[i][0] * q2[1] - q2[0] * N[i][1]; }\n      if (sum < 0) { var back = []; for (i = n - 1; i >= 0; i--) back.push([N[i][0], N[i][1], N[i][2], N[(i - 1 + n) % n][3]]); N = back; }\n      try { A.undoPush(); } catch (e) {}\n      var d = settings(), keep = { n: d.nodes, f: S.footprint, x: S.origin.x, z: S.origin.z };\n      S.origin.x = 0; S.origin.z = 0;\n      if (!setWorld(N)) {\n        d.nodes = keep.n; S.footprint = keep.f; S.origin.x = keep.x; S.origin.z = keep.z;\n        if (!SHAPES[a.preset]) return false;\n        applyShape(a.preset);\n        S.footprint = { w: w, l: l };\n      } else d.shape = SHAPES[a.preset] ? a.preset : 'freeform';\n      _ring = null;\n      d.mode = 'shape';\n      resettle();\n      log('read: ' + d.shape + ', ' + N.length + ' nodes, ' + w.toFixed(2) + ' x ' + l.toFixed(2) + ' m' + (a.sized ? '' : ' (size assumed)'));\n      laidOut();\n      return true;\n    };\n    function laidOut() {\n      try { A.rebuild(); A.savePref(); } catch (e2) {}\n      try { var st = A._stage(); if (st && st.fitCameraToFootprint) st.fitCameraToFootprint(); } catch (e3) {}\n      try { var Wz = A.wizard && A.wizard(); if (Wz && Wz.refresh) Wz.refresh(); } catch (e4) {}\n    }\n\n    /* ---- THE FLOORPLAN'S TILES ------------------------------------------ */\n    function glyph(d) { return '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">' + d + '</svg>'; }\n    var GLYPH = {\n      size: glyph('<path d=\"M4 9V4h5\"/><path d=\"M20 15v5h-5\"/><path d=\"M4 4l6.500 6.500\"/><path d=\"M20 20l-6.500-6.500\"/>'),\n      shape: glyph('<path d=\"M5 17C7 9 9.500 6 12 6s5 3 7 11\"/><circle cx=\"5\" cy=\"17.500\" r=\"2\" fill=\"currentColor\"/><circle cx=\"12\" cy=\"6\" r=\"2\" fill=\"currentColor\"/><circle cx=\"19\" cy=\"17.500\" r=\"2\" fill=\"currentColor\"/>'),\n      steps: glyph('<path d=\"M4 20c0-9 7-16 16-16\"/><path d=\"M9 20c0-6 5-11 11-11\"/><path d=\"M14 20c0-3 3-6 6-6\"/>'),\n      kids: glyph('<path d=\"M3 16c2-1.500 4-1.500 6 0s4 1.500 6 0 4-1.500 6 0\"/><circle cx=\"12\" cy=\"6.500\" r=\"2.500\"/><path d=\"M12 9v4\"/>'),\n      relax: glyph('<path d=\"M3 17c2-1.500 4-1.500 6 0s4 1.500 6 0 4-1.500 6 0\"/><path d=\"M5 12l5-1 3 2h5\"/><circle cx=\"7\" cy=\"7.500\" r=\"2\"/>'),\n      depth: glyph('<path d=\"M3 6h18\"/><path d=\"M4 6v5l4 1 8 5h4V6\"/><path d=\"M12 9v4\"/><path d=\"M10.500 11.500L12 13l1.500-1.500\"/>')\n    };\n    /* THE DEPTHS, TWO THUMBS ON ONE TRACK (the core's two-thumb bar): the left\n       one the shallow end, the right one the deep end. The deep end stays below\n       the shallow end's own fall. Moves rebuild; letting go keeps it. They ride\n       the core's second building step, the one the strip gives a product's\n       rows as icons of their own, so the bar stands on the canvas over the\n       model; there is no roof here, and the step wears the depth's name. */\n    var DEPTH = { min: 2.5 * FT, max: 10 * FT, mMin: 0.75, mMax: 3 };\n    function depthRange() { var us = S.isMetric === false; return { lo: us ? DEPTH.min : DEPTH.mMin, hi: us ? DEPTH.max : DEPTH.mMax, st: us ? 3 * IN : 0.05 }; }\n    /* an undo rebuilds the model and not the bar: the figures follow here */\n    var _depthHeld = false;\n    function depthBarSync() {\n      var box = global.document.querySelector('#cf-sx-sl .cf-sx-dual'), d = settings(), i;\n      if (!box || _depthHeld) return;\n      var I = box.querySelectorAll('input'), V = box.querySelectorAll('.cf-sx-dv'), W = box.clientWidth || 0;\n      for (i = 0; i < 2 && I[i] && V[i]; i++) {\n        var v = i ? d.deep : d.shallow, lo = +I[i].min, hi = +I[i].max;\n        I[i].value = String(v);\n        V[i].textContent = A.fmtLen(v);\n        V[i].style.left = (8 + ((hi > lo) ? (v - lo) / (hi - lo) : 0) * Math.max(0, W - 16)) + 'px';\n      }\n    }\n    function depthSet(i, v, done) {\n      var d = settings(), R0 = depthRange();\n      _depthHeld = !done;\n      if (i) d.deep = Math.max(d.shallow + SHALLOW_FALL, Math.min(R0.hi, v));\n      else d.shallow = Math.max(R0.lo, Math.min(d.deep - SHALLOW_FALL, v));\n      /* a thumb held back stands where it stopped, under its figure */\n      try { var I0 = global.document.querySelector('#cf-sx-sl .cf-sx-d' + i); if (I0) I0.value = String(i ? d.deep : d.shallow); } catch (e0) {}\n      try { A.rebuild(); } catch (e) {}\n      if (done) { try { A.savePref(); } catch (e2) {} log('depth ' + Math.round(d.shallow * 1000) + ' to ' + Math.round(d.deep * 1000) + ' mm'); }\n    }\n    var DEPTH_SLIDER = {\n      min: function () { return depthRange().lo; }, max: function () { return depthRange().hi; }, step: function () { return depthRange().st; },\n      get: function (i) { var d = settings(); return i ? d.deep : d.shallow; }, set: depthSet,\n      read: function (i) { var d = settings(); return A.fmtLen(i ? d.deep : d.shallow); },\n      on: function () { return true; }, color: ['#7FC4E8', '#2D6F92'], name: ['Shallow end', 'Deep end']\n    };\n    A.setGunitePadSide = function(side) {\n      if (side !== -1 && side !== 1) return;\n      var d=settings();\n      if (!d.plantOffset && (d.padSide === -1 ? -1 : 1) === side) return;\n      A.undoPush();\n      delete d.plantOffset;d.padSide=side;\n      A.rebuild();\n      A.savePref();\n    };\n    function guniteGroups(step) {\n      if (step === 'roof') {\n        var lab = tr('pool_depth', 'Depth');\n        return [{ key: 'guniteDepth', label: lab, step: true, slider2: DEPTH_SLIDER,\n                  items: [{ key: 'gDepth', label: lab, title: lab, svg: GLYPH.depth, on: function () { return true; }, tap: function () {} }] }];\n      }\n      if (step !== 'layout') return [];\n      return [{ key: 'guniteShape', label: tr('wiz_layout', 'FLOORPLAN'), items: [\n        { key: 'gSize', label: tr('pool_msg_size', 'Size'), title: tr('pool_msg_size', 'Size'), svg: GLYPH.size, fn: true,\n          on: function () { return settings().mode === 'size'; }, tap: function () { setMode('size'); } },\n        { key: 'gShape', label: tr('pool_shape_edit', 'Shape'), title: tr('pool_shape_edit', 'Shape'), svg: GLYPH.shape, fn: true,\n          on: function () { return settings().mode === 'shape'; }, tap: function () { setMode('shape'); } }\n      ] }].concat(planChoices());\n    }\n    var featureOrder=['steps','relax','divider','kids'],feature='kids';\n    function featureOpen(){\n      return !!global.document.querySelector('#cf-sx-strip [data-k=\"cyc:guniteFeatures\"].cf-sel');\n    }\n    function featureName(k){\n      if(k==='steps')return pointLabel('Stairs','Schody');\n      if(k==='divider')return pointLabel('Crossing','P\u0159echod');\n      return labelOf(k);\n    }\n    function featureState(){\n      var d=settings();\n      if(feature==='divider')return featureName(feature)+' '+dividerLabel(dividerMode());\n      return featureName(feature)+' '+(d.sectors[feature]?'ON':'OFF');\n    }\n    function toggleFeature(){\n      var d=settings(),err;\n      if(feature==='divider'){\n        A.undoPush();d.divider=dividerMode()%3+1;A.rebuild();A.savePref();A.undoPush();\n      }else if(feature==='steps'){\n        var action=d.sectors.steps?'none':'steps';\n        err=zoneAction('entry',action);\n      }else err=zoneAction(feature,d.sectors[feature]?'none':'add');\n      if(err)showZoneNotice(err);\n      syncZoneSwitch();C.drawPlan();\n    }\n    function planChoices() {\n      var d=settings();\n      function row(key,title,label,svg,values,on,go) {\n        return {key:key,label:title,items:[{label:label,svg:svg,choices:values.map(function(v){\n          return {on:function(){return on(v);},go:function(){go(v);}};\n        })}]};\n      }\n      return [\n        row('gunitePresets',labelOf('library'),SHAPES[d.shape].name,GLYPH.shape,SHAPE_ORDER,\n          function(v){return d.shape===v;},function(v){P._libraryPick({shape:v});}),\n        row('guniteFeatures',featureName(feature),featureState(),GLYPH[feature] || GLYPH.steps,featureOrder,\n          function(k){return feature===k;},function(k){feature=k;C.drawPlan();syncZoneSwitch();}),\n        row('gunitePad',labelOf('pad'),d.plantMode==='vault'?pointLabel('Underground vault','Podzemn\u00ED \u0161achta'):pointLabel('Surface pad','Nadzemn\u00ED deska'),GLYPH.size,['surface','vault'],\n          function(v){return (d.plantMode || 'surface')===v;},function(v){A.undoPush();d.plantMode=v;A.rebuild();A.savePref();A.undoPush();global.requestAnimationFrame(fitPoolPlan);})\n      ];\n    }\n\n    /* the shapes are simple drawings: three across on a desktop, two on a\n       phone (Marek 2026-11-04 23:42). The drawer's own sheet comes later, so\n       this one stands by the body. */\n    function libraryCss() {\n      var doc = global.document;\n      if (doc.getElementById('gunite-plib-css')) return;\n      var st = doc.createElement('style');\n      st.id = 'gunite-plib-css';\n      st.textContent = 'body #cf-plib .cf-plib-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}' +\n        'body #cf-plib .cf-plib-svg{aspect-ratio:3/2;}' +\n        '@media (max-width:599px){body #cf-plib .cf-plib-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}';\n      doc.head.appendChild(st);\n    }\n\n    var cagePanel=null,cageButton=null,cageTable=null, cageSelect=null, cageList=null, cageData=null, treeVisibility=null;\n    function syncCageView() {\n      var doc=global.document, root=doc.getElementById('cf-root'), stage=A._stage();\n      if(!root || !stage || !stage.group) return;\n      var steelView=A.viz().key==='steel' && !C._planWanted() && !A.asmWalking();\n      if(!steelView) {\n        if(treeVisibility!==null && stage._fadeTree) {\n          stage._fadeTree.visible=treeVisibility && !C._planWanted() && S.view!=='2d';\n          treeVisibility=null;\n        }\n        if(cagePanel){if(cagePanel.open)cagePanel.close();cagePanel.hidden=true;cageButton.hidden=true;cageSelect.value='all';}\n        return;\n      }\n      if(stage._fadeTree) {\n        if(treeVisibility===null) treeVisibility=stage._fadeTree.visible;\n        stage._fadeTree.visible=false;\n      }\n      if(!cagePanel) {\n        var style=doc.createElement('style');\n        style.textContent='#gunite-cage-button{position:absolute;top:44px;left:12px;z-index:10;border:0;border-radius:25px;padding:9px 15px;background:#1a1c1d;color:#fff;font:600 12px Montserrat,sans-serif;cursor:pointer}#gunite-cage-panel{box-sizing:border-box;width:min(520px,92vw);max-height:76vh;overflow:auto;background:white;color:#2c2d2e;border:1px solid #dadce0;border-radius:16px;padding:20px;font:13px Montserrat,sans-serif;box-shadow:0 12px 40px #0003}#gunite-cage-panel::backdrop{background:#1a1c1d38}#gunite-cage-panel header{display:flex;align-items:center;justify-content:space-between;font-size:18px;font-weight:600;margin-bottom:12px}#gunite-cage-panel header button{border:0;border-radius:50%;width:36px;height:36px;cursor:pointer}#gunite-cage-panel select{margin:12px 0;width:100%;padding:8px;font:inherit}#gunite-cage-panel .gp-key{display:flex;align-items:center;gap:6px;margin:3px 0}#gunite-cage-panel .gp-dot{width:9px;height:9px;border-radius:50%}#gunite-cage-panel .leva-table{overflow:auto;max-height:42vh}#gunite-cage-panel table{width:100%;border-collapse:collapse;border-top:2px solid #c5a579;font-size:14px}#gunite-cage-panel tbody tr:nth-child(even){background:#f6f3ef}#gunite-cage-panel th,#gunite-cage-panel td{text-align:left;border:0;padding:7px 5px}#gunite-cage-panel th{position:sticky;top:0;background:#f5f5f5;font-size:11px;text-transform:uppercase}#gunite-cage-panel td:not(:first-child){font-family:\"DM Mono\",monospace}';\n        doc.head.appendChild(style);\n        cagePanel=doc.createElement('dialog');cagePanel.id='gunite-cage-panel';\n        var cs=(doc.documentElement.lang || '').toLowerCase().indexOf('cs')===0;\n        cageButton=doc.createElement('button');cageButton.id='gunite-cage-button';cageButton.type='button';\n        cageButton.textContent=pointLabel('Reinforcement schedule','V\u00FDpis v\u00FDztu\u017Ee');root.appendChild(cageButton);\n        cagePanel.setAttribute('aria-label',cageButton.textContent);\n        cageButton.onclick=function(){if(!cagePanel.open)cagePanel.showModal();};\n        var header=doc.createElement('header'),dismiss=doc.createElement('button');header.textContent=cageButton.textContent;\n        dismiss.type='button';dismiss.textContent='\u00D7';dismiss.setAttribute('aria-label',pointLabel('Close','Zav\u0159\u00EDt'));\n        dismiss.onclick=function(){cagePanel.close();};header.appendChild(dismiss);cagePanel.appendChild(header);\n        function key(color,en,cz) {\n          var row=doc.createElement('span'), dot=doc.createElement('i');\n          row.className='gp-key';dot.className='gp-dot';dot.style.background=color;\n          row.append(dot,doc.createTextNode(cs?cz:en));cagePanel.appendChild(row);\n        }\n        key('linear-gradient(90deg,#00a4ba,#583bd5)','Bars by length','Pruty podle d\\u00e9lky');\n        key('#e56617','Beam stirrups','T\\u0159m\\u00ednky v\\u011bnce');\n        key('#bf1978','Tie wire','V\\u00e1zac\\u00ed dr\\u00e1t');\n        key('#697580','Spacers','Distan\\u010dn\\u00ed prvky');\n        cageSelect=doc.createElement('select');\n        cageSelect.setAttribute('aria-label',cs?'Zobrazit v\\u00fdztu\\u017e':'Show reinforcement');\n        function option(parent,value,label) {\n          var opt=doc.createElement('option');opt.value=value;opt.textContent=label;parent.appendChild(opt);\n        }\n        option(cageSelect,'all',cs?'Cel\\u00e9 armov\\u00e1n\\u00ed':'All reinforcement');\n        option(cageSelect,'bars',cs?'Pruty':'Bars');option(cageSelect,'stirrups',cs?'T\\u0159m\\u00ednky':'Stirrups');\n        option(cageSelect,'ties',cs?'V\\u00e1zac\\u00ed dr\\u00e1t':'Tie wire');option(cageSelect,'spacers',cs?'Distan\\u010dn\\u00ed prvky':'Spacers');\n        cageList=doc.createElement('optgroup');cageList.label=cs?'D\\u00e9lka prutu':'Bar length';\n        cageSelect.appendChild(cageList);cagePanel.appendChild(cageSelect);root.appendChild(cagePanel);\n        var wrapTable=doc.createElement('div');wrapTable.className='leva-table';var table=doc.createElement('table');\n        var tr=table.createTHead().insertRow();\n        [pointLabel('Bar group','Skupina prut\u016F'),'mm',pointLabel('Count','Po\u010Det'),pointLabel('Total m','Celkem m')].forEach(function(t){var cell=doc.createElement('th');cell.textContent=t;tr.appendChild(cell);});\n        cageTable=table.createTBody();wrapTable.appendChild(table);cagePanel.appendChild(wrapTable);\n        cageSelect.addEventListener('change',syncCageView);\n      }\n      cagePanel.hidden=false;cageButton.hidden=false;\n      var G=basin(global.THREE);\n      if(cageData!==G) {\n        var selected=cageSelect.value;\n        cageData=G;cageList.replaceChildren();cageTable.replaceChildren();\n        function scheduleRow(kind,label,mm,count,total,color){\n          var row=cageTable.insertRow();row.dataset.mm=mm;row.dataset.kind=kind;\n          [label,mm || '\u2013',count,Number.isFinite(total)?total.toFixed(2):'\u2013'].forEach(function(v){row.insertCell().textContent=v;});\n          row.cells[0].style.borderLeft='4px solid '+color;\n        }\n        var steel=cage(G),f=fixingSchedule(G);\n        steel.groups.forEach(function(g){scheduleRow('bars',g.label,g.mm,g.runs.length,g.net,'#'+barColor(global.THREE,g.mm).getHexString());});\n        var links=new Map();steel.links.forEach(function(link){links.set(link.mm,(links.get(link.mm) || 0)+1);});\n        links.forEach(function(count,mm){scheduleRow('stirrups',pointLabel('Beam stirrup','T\u0159m\u00EDnek'),mm,count,mm*count/1000,'#e56617');});\n        scheduleRow('ties',pointLabel('Tie wire','V\u00E1zac\u00ED dr\u00E1t'),WIRE_CUT*1000,f.ties.length,WIRE_CUT*f.ties.length,'#bf1978');\n        scheduleRow('spacers',pointLabel('Spacer','Distan\u010Dn\u00ED prvek'),0,f.chairs.length,null,'#697580');\n        Array.from(new Set(cage(G).groups.map(function(g){return g.mm;}))).sort(function(a,b){return a-b;}).forEach(function(mm){\n          var opt=doc.createElement('option');opt.value=String(mm);\n          opt.textContent=S.isMetric===false?'#4 x '+(mm/304.8).toFixed(3)+' ft':'\\u00d812 x '+mm+' mm';\n          cageList.appendChild(opt);\n        });\n        cageSelect.value=selected;if(!cageSelect.value)cageSelect.value='all';\n      }\n      var choice=cageSelect.value;\n      Array.from(cageTable.rows).forEach(function(row){row.hidden=choice!=='all' && row.dataset.kind!==choice && !(row.dataset.kind==='bars' && row.dataset.mm===choice);});\n      stage.group.children.forEach(function(layer){\n        var id=layer.userData.layer;\n        if(!id) return;\n        layer.children.forEach(function(body){\n          body.visible=choice==='all' || (choice==='bars' && id==='gunite-steel') ||\n            id==='gunite-'+choice || String(body.userData.steelLength)===choice;\n        });\n      });\n    }\n\n    function pointLabel(en,cs) {\n      return /^cs/i.test(global.document.documentElement.lang || '')?cs:en;\n    }\n    var pointLabels={\n      library:['Floorplan','V\\u00fdb\\u011br p\\u016fdorysu'],plan:['Shape & size','Tvar a rozm\\u011bry'],place:['Location','Um\\u00edst\\u011bn\\u00ed'],\n      depth:['Depth','Hloubka'],colors:['Finishes','Povrchy'],kids:['Kids zone','D\\u011btsk\\u00e1 z\\u00f3na'],\n      relax:['Relax zone','Relax z\\u00f3na'],entry:['Pool entry','Vstup'],pad:['Equipment','Technologie']\n    };\n    function labelOf(key){return pointLabel.apply(null,pointLabels[key]);}\n    \n    function commitZones(next,ladder,mode,remember) {\n      var d=settings(); A.undoPush();\n      if(remember){d.shelfLayout=Object.assign({},d.shelfLayout);d.shelfLayout[remember]=d.sectors[remember];}\n      d.sectors=next;d.mode=mode;\n      if(Number.isFinite(ladder))d.ladder=ladder;else delete d.ladder;\n      A.rebuild();A.savePref();A.undoPush();\n    }\n    function zoneAction(kind,action) {\n      var d=settings(), next=Object.assign({},d.sectors), ladder=d.ladder, mode='size', sx, o;\n      var fail=pointLabel('No other position fits this outline and its occupied zones.','Na tomto obrysu nen\\u00ed jin\\u00e1 voln\\u00e1 poloha.');\n      if((action==='add' && next[kind]) || (action==='none' && kind!=='entry' && !next[kind]))return '';\n      if(action==='none') {\n        if(kind==='entry'){delete next.steps;ladder=null;}else {delete next[kind];if(next.steps && next.steps.from===kind)delete next.steps;}\n      } else if(action==='ladder' && Number.isFinite(ladder) && !next.steps) {\n        return '';\n      } else if(action==='steps' && next.steps) {\n        return '';\n      } else if(action==='ladder' || (kind==='entry' && action==='move' && Number.isFinite(ladder) && !next.steps)) {\n        var G=basin(global.THREE), options=ladderOptions(G,action==='ladder'), current=placedLadder(G);\n        o=nextPosition(options,action==='move' && current?current.mid:null);\n        if(!o)return fail;\n        delete next.steps; ladder=o.mid;\n      } else {\n        var k=kind==='entry'?'steps':kind;\n        var last=action==='add' && d.shelfLayout && d.shelfLayout[k],R=ring();\n        var saved=last && {a:last.a,b:last.b,line:true};\n        if(saved && secOk(R.poly,cumOf(R.poly),k,saved,next)){\n          next[k]=saved;commitZones(next,ladder,k);return '';\n        }\n        sx=next[k];\n        o=nextPosition(shelfPositions(k,next,action!=='move'),action==='move' && sx?sectorMid(sx):null);\n        if(!o && action==='move') o=nextPosition(zonePositions(k,next,false,true),sectorMid(sx));\n        if(!o && k==='steps'){\n          ['kids','relax'].some(function(source){if(next[source] && !next[source].unplaced)o=shelfStairs(source,next);return !!o;});\n        }\n        if(!o)return fail;\n        next[k]=o.sx;mode=k;if(k==='steps')ladder=null;\n      }\n      commitZones(next,ladder,mode,action==='none' && kind!=='entry'?kind:null);return '';\n    }\n    function bindZoneOverlay(root,st) {\n      var doc=global.document,ns='http://www.w3.org/2000/svg',T=global.THREE;\n      function el(tag){return doc.createElementNS(ns,tag);}\n      var svg=el('svg'),line=el('polyline'),hit=el('polyline'),drag=null;\n      svg.classList.add('gp-zone-overlay');svg.style.touchAction='none';svg.setAttribute('data-cf-nopinch','1');svg.setAttribute('aria-label','Pool boundary handles');\n      line.setAttribute('fill','none');line.setAttribute('stroke-width','3');line.style.pointerEvents='none';\n      hit.setAttribute('fill','none');hit.setAttribute('stroke','transparent');hit.setAttribute('stroke-width','22');hit.style.pointerEvents='stroke';\n      hit.dataset.grip='line';svg.append(line,hit);\n      var groups=[0,1,2,3,4,5].map(function(i){\n        var g=el('g'),target=el('circle'),dot=el('circle');\n        target.setAttribute('fill','transparent');target.setAttribute('r','20');\n        dot.setAttribute('r','6');dot.setAttribute('fill',i>0 && i<5?'#fff':'#c49a4a');\n        dot.setAttribute('stroke','#393c38');dot.setAttribute('stroke-width','2');dot.style.pointerEvents='none';\n        g.dataset.grip=String(i);g.append(target,dot);svg.appendChild(g);return g;\n      });\n      var plantHit=el('polygon');plantHit.setAttribute('fill','transparent');plantHit.dataset.grip='plant';svg.insertBefore(plantHit,line);\n      root.appendChild(svg);\n      // The SVG is a sibling of the orbit canvas. Block native one-finger page\n      // panning on the handles, including browsers that ignore touch-action on <g>.\n      ['touchstart','touchmove'].forEach(function(type){\n        svg.addEventListener(type,function(e){if(e.touches.length===1 && e.cancelable)e.preventDefault();},{passive:false});\n      });\n      function world(e){\n        var cv=st.renderer.domElement.getBoundingClientRect(),ray=new T.Raycaster();\n        ray.setFromCamera(new T.Vector2(2*(e.clientX-cv.left)/cv.width-1,1-2*(e.clientY-cv.top)/cv.height),st.camera);\n        var p=ray.ray.intersectPlane(new T.Plane(new T.Vector3(0,1,0),0),new T.Vector3());\n        return p?[p.x,p.z]:null;\n      }\n      function active(){\n        if(doc.querySelector('#cf-sx-strip [data-k=\"cyc:gunitePad\"].cf-sel'))return 'plant';\n        if(!featureOpen())return null;\n        if(feature==='steps')return settings().sectors.steps?'steps':'entry';\n        return feature==='divider'?null:feature;\n      }\n      var lastPaint='';\n      function paint(){\n        if(S.view!=='2d'){root.classList.remove('gp-edit-boundary');svg.style.display='none';lastPaint='';return;}\n        var k=active(),d=settings(),R=ring(),G=_G,lad=k==='entry' && Number.isFinite(d.ladder) && G?placedLadder(G):null;\n        var sx=d.sectors[k];\n        var plant=k==='plant'?equipmentSite(G.B):null;plantHit.style.display=plant?'':'none';\n        var visible=S.view==='2d' && (plant || lad || sx && !sx.unplaced);\n        root.classList.toggle('gp-edit-boundary',!!visible);svg.style.display=visible?'block':'none';if(!visible){lastPaint='';return;}\n        var cv=st.renderer.domElement.getBoundingClientRect(),r=root.getBoundingClientRect();\n        var signature=[k,plant && [plant.x,plant.z,plant.w,plant.l],drag && drag.flip,_ringKey,JSON.stringify(sx),lad && lad.mid,cv.width,cv.height,cv.left-r.left,cv.top-r.top,\n          st.camera.matrixWorld.elements,st.camera.projectionMatrix.elements].join('|');\n        if(signature===lastPaint)return;\n        lastPaint=signature;\n        function px(p){var v=new T.Vector3(p[0],0,p[1]).project(st.camera);return [(1+v.x)*cv.width/2+cv.left-r.left,(1-v.y)*cv.height/2+cv.top-r.top];}\n        if(plant)plantHit.setAttribute('points',[[-1,-1],[1,-1],[1,1],[-1,1]].map(function(v){return px([plant.x+v[0]*plant.w/2,plant.z+v[1]*plant.l/2]).join(',');}).join(' '));\n        var edge=plant?[[plant.x,plant.z]]:lad?[lad.p]:secGeo(R.poly,cumOf(R.poly),sx).edge;\n        var coords=edge.map(px),points=coords.map(function(p){return p.join(',');}).join(' ');\n        line.setAttribute('points',points);hit.setAttribute('points',points);\n        line.setAttribute('stroke',k==='kids'?'#197e97':'#ab802d');\n        groups.forEach(function(g,i){\n          g.style.display=(plant || lad) && i?'none':'';\n          var index=drag && drag.flip?5-i:i;var q=coords[Math.round((coords.length-1)*index/5)];g.setAttribute('transform','translate('+q.join(' ')+')');\n        });\n      }\n      function down(e){\n        if(drag || e.button!==0)return;\n        var k=active(),p=world(e),sx=settings().sectors[k];\n        if(!p || k!=='entry' && k!=='plant' && !sx)return;\n        e.preventDefault();e.stopPropagation();\n        var grip=e.currentTarget.dataset.grip,offset=[0,0];\n        if(k!=='plant' && k!=='entry'){\n          // Touch targets overlap on a narrow phone. Pick the closest visible centre.\n          var best=Infinity,nearest=null;\n          groups.forEach(function(group){\n            var r=group.getBoundingClientRect(),dist=Math.hypot(e.clientX-r.x-r.width/2,e.clientY-r.y-r.height/2);\n            if(dist<best){best=dist;nearest=group.dataset.grip;}\n          });\n          var R=ring(),edge=secGeo(R.poly,cumOf(R.poly),sx).edge,metrics=groups.map(function(group){return group.getBoundingClientRect();});\n          var gap=Infinity;\n          for(var j=1;j<metrics.length;j++)gap=Math.min(gap,Math.hypot(metrics[j].x-metrics[j-1].x,metrics[j].y-metrics[j-1].y));\n          var cv=st.renderer.domElement.getBoundingClientRect(),v0=new T.Vector3(p[0],0,p[1]),nearLine=edge.some(function(_,i){\n            if(!i)return false;\n            var a=edge[i-1],b=edge[i],dx=b[0]-a[0],dz=b[1]-a[1],f=Math.max(0,Math.min(1,((p[0]-a[0])*dx+(p[1]-a[1])*dz)/(dx*dx+dz*dz || 1)));\n            var q=new T.Vector3(a[0]+dx*f,0,a[1]+dz*f).project(st.camera),v=v0.clone().project(st.camera);\n            return Math.hypot((v.x-q.x)*cv.width/2,(v.y-q.y)*cv.height/2)<8;\n          });\n          grip=nearLine && best>Math.max(5,Math.min(13,gap*0.39))?'line':nearest;\n          if(grip!=='line'){\n            var anchor=edge[Math.round((edge.length-1)*Number(grip)/5)];\n            offset=[anchor[0]-p[0],anchor[1]-p[1]];\n          }\n        }\n        drag={site:k==='plant'?equipmentSite(_G.B):null,oldOffset:settings().plantOffset,id:e.pointerId,k:k,grip:grip,start:p,offset:offset,sx:sx,stairs:settings().sectors.steps,ladder:settings().ladder,changed:false};\n        e.currentTarget.setPointerCapture(e.pointerId);\n      }\n      function fitGrip(poly,c,kind,trial,all,grip){\n        function fit(candidate){\n          var normalized=kind==='steps'?candidate:smallerShelf(poly,c,candidate);\n          if(kind==='steps' && !stairFits(poly,c,normalized,all))return null;\n          if(kind!=='steps' && all.steps && all.steps.from){\n            var neighbors=Object.assign({},all);neighbors[kind]=normalized;\n            if(!stairFits(poly,c,all.steps,neighbors))return null;\n          }\n          return secOk(poly,c,kind,normalized,all)?normalized:null;\n        }\n        var result=fit(trial);if(result)return result;\n        if(grip!=='0' && grip!=='5' && grip!=='line')return null;\n        var free=grip==='5'?'a':'b',origin=trial[free];\n        for(var j=1;j<48;j++){\n          for(var dir=-1;dir<=1;dir+=2){\n            var next=Object.assign({},trial);next[free]=wrap(origin+dir*j/96);\n            result=fit(next);if(result)return result;\n          }\n        }\n        return null;\n      }\n      function moveStairs(poly,c,old,all){\n        // Retain the original span and prefer its nearest valid position.\n        var P=profile(boxOf(poly));\n        for(var j=1;j<=32;j++)for(var dir=-1;dir<=1;dir+=2){\n          var shift=dir*j/64,next={a:wrap(old.a+shift),b:wrap(old.b+shift),toe:true};\n          if(!secOk(poly,c,'steps',next,all))continue;\n          var g=secGeo(poly,c,next);\n          var base=parentLevel(poly,c,'steps',Object.assign({},all,{steps:next}));\n          var model=secModel(P,g,'steps',base);\n          if(g.apex/model.treads.length>=TREAD_MIN && model.rise<=0.305 &&\n            (base || Math.max(P.depth(g.A),P.depth(g.B)))-model.treads[0].depth<=0.33)return next;\n        }\n        var options=zonePositions('steps',all,false,true);\n        var mid=sectorMid(old);\n        options.sort(function(a,b){return Math.abs(wrap(a.mid-mid+0.5)-0.5)-Math.abs(wrap(b.mid-mid+0.5)-0.5);});\n        return options.length?options[0].sx:null;\n      }\n      function move(e){\n        if(!drag || drag.id!==e.pointerId)return;\n        e.preventDefault();e.stopPropagation();\n        var p=world(e),d=settings(),R=ring(),c=cumOf(R.poly);if(!p)return;\n        var changed=function(){if(!drag.changed)A.undoPush();drag.changed=true;};\n        if(drag.k==='plant'){\n          changed();d.plantOffset=[drag.site.x-_G.B.cx+p[0]-drag.start[0],drag.site.z-_G.B.cz+p[1]-drag.start[1]];\n          var site=equipmentSite(_G.B);d.plantOffset=[site.x-_G.B.cx,site.z-_G.B.cz];\n        }else if(drag.k==='entry'){\n          var target=nearS(R.poly,c,p),options=ladderOptions(basin(T));\n          function distance(o){var delta=wrap(o.mid-target);return Math.min(delta,1-delta);}\n          options.sort(function(a,b){return distance(a)-distance(b);});\n          if(!options.length || options[0].mid===d.ladder)return;\n          changed();d.ladder=options[0].mid;\n        }else{\n          var src=drag.sx,g=secGeo(R.poly,c,src),handles=fifths(src),sx={line:true,a:src.a,b:src.b,bend:handles.bend.slice(),along:handles.along.slice()},i=drag.grip;\n          sx.shaped=!!src.shaped;sx.from=src.from;\n          p=[p[0]+drag.offset[0],p[1]+drag.offset[1]];\n          if(i==='0' || i==='5')sx[i==='0'?'a':'b']=nearS(R.poly,c,p);\n          else if(i==='line'){\n            var dx=p[0]-drag.start[0],dz=p[1]-drag.start[1];\n            var q=[g.A[0]+dx,g.A[1]+dz],r=[g.B[0]+dx,g.B[1]+dz];\n            sx.a=nearS(R.poly,c,q);sx.b=nearS(R.poly,c,r);\n            // Against one wall, translate around its perimeter instead of collapsing both ends.\n            var near=nearS(R.poly,c,p),wall=ptAt(R.poly,c,near);\n            if(Math.hypot(p[0]-wall[0],p[1]-wall[1])<0.45){\n              var span=wrap(src.b-src.a);sx.a=wrap(near-span/2);sx.b=wrap(near+span/2);\n            }else if(Math.min(wrap(sx.b-sx.a),wrap(sx.a-sx.b))<0.065){\n              var shift=wrap(nearS(R.poly,c,p)-nearS(R.poly,c,drag.start)+0.5)-0.5;\n              sx.a=wrap(src.a+shift);sx.b=wrap(src.b+shift);\n            }\n          }else{\n            sx.shaped=true;\n            var rise=((p[0]-g.A[0])*g.m[0]+(p[1]-g.A[1])*g.m[1]);\n            var idx=Number(i)-1,along=((p[0]-g.A[0])*g.e[0]+(p[1]-g.A[1])*g.e[1])/g.chord;\n            sx.along[idx]=Math.max(idx?sx.along[idx-1]+0.025:0.025,Math.min(idx===3?0.975:sx.along[idx+1]-0.025,along));\n            sx.bend[idx]=Math.abs(rise)<0.035?0:rise/g.chord;\n          }\n          var all=Object.assign({},d.sectors),steps=drag.stairs;\n          if(steps)all.steps=steps;\n          var fitted=fitGrip(R.poly,c,drag.k,sx,all,i);\n          if(!fitted && steps && drag.k!=='steps' && !steps.from){\n            delete all.steps;\n            var free=fitGrip(R.poly,c,drag.k,sx,all,i);\n            if(free){\n              all[drag.k]=free;\n              var relocated=moveStairs(R.poly,c,steps,all);\n              if(relocated){fitted=free;steps=relocated;}\n            }\n            all.steps=steps;\n          }\n          if(!fitted && (Number(i)>0 && Number(i)<5)){\n            // Slide up to the nearest legal point when a finger moves beyond a wall.\n            var lo=0,hi=1,idx0=Number(i)-1;\n            for(var j=0;j<9;j++){\n              var t=(lo+hi)/2,test=Object.assign({},sx,{bend:sx.bend.slice(),along:sx.along.slice()});\n              var originB=handles.bend[idx0],originT=handles.along[idx0];\n              test.bend[idx0]=originB+(sx.bend[idx0]-originB)*t;\n              test.along[idx0]=originT+(sx.along[idx0]-originT)*t;\n              var candidate=fitGrip(R.poly,c,drag.k,test,all,i);\n              if(candidate){fitted=candidate;lo=t;}else hi=t;\n            }\n          }\n          if(!fitted)return;\n          drag.flip=i==='0'?Math.abs(fitted.b-sx.a)<1e-7:Math.abs(fitted.a-sx.b)<1e-7;\n          sx=fitted;\n          changed();if(steps)d.sectors.steps=steps;d.sectors[drag.k]=sx;\n        }\n        C.drawPlan();paint();\n      }\n      function up(e){\n        if(!drag || drag.id!==e.pointerId)return;\n        var held=drag;drag=null;e.preventDefault();e.stopPropagation();\n        if(!held.changed)return;\n        if(e.type==='pointercancel'){\n          if(held.k==='plant'){if(held.oldOffset)settings().plantOffset=held.oldOffset;else delete settings().plantOffset;}\n          else if(held.k==='entry')settings().ladder=held.ladder;else {settings().sectors[held.k]=held.sx;if(held.stairs)settings().sectors.steps=held.stairs;}\n        }\n        if(held.k!=='steps' && held.stairs && settings().sectors.steps!==held.stairs)\n          showZoneNotice(pointLabel('Stairs moved along the rim','Schody posunuty po obvodu'));\n        A.rebuild();A.savePref();A.undoPush();\n      }\n      groups.concat(hit,plantHit).forEach(function(node){\n        node.style.touchAction='none';node.addEventListener('pointerdown',down);node.addEventListener('pointermove',move);\n        node.addEventListener('pointerup',up);node.addEventListener('pointercancel',up);\n      });\n      return paint;\n    }\n    function showZoneNotice(msg){\n      var root=global.document.getElementById('cf-root'),el=root.querySelector('.gunite-status');\n      if(!el){el=global.document.createElement('span');el.className='gunite-status';el.setAttribute('role','status');root.appendChild(el);}\n      el.textContent=msg;clearTimeout(el.timer);el.timer=setTimeout(function(){el.remove();},3500);\n    }\n    function syncZoneSwitch(){\n      var doc=global.document, bar=doc.getElementById('cf-sx-bar');\n      if(!bar)return;\n      var row=bar.querySelector('.gunite-state-row'),cur=bar.querySelector(':scope > .cf-sx-cur');\n      if(!featureOpen()){if(row)row.remove();if(cur)cur.hidden=false;return;}\n      if(!row){\n        row=doc.createElement('div');row.className='gunite-state-row';\n        bar.insertBefore(row,bar.querySelector('.cf-sx-pill'));\n      }\n      if(cur)cur.hidden=true;\n      function button(cls,action){\n        var b=row.querySelector('.'+cls);\n        if(!b){b=doc.createElement('button');b.type='button';b.className='cf-sx-cur '+cls;b.onclick=action;row.appendChild(b);}\n        return b;\n      }\n      var b=button('gunite-zone-switch',toggleFeature),label=bar.querySelector('.cf-sx-lbl'),name=featureName(feature),value=featureState();\n      if(label && label.textContent!==name)label.textContent=name;\n      if(b.textContent!==value)b.textContent=value;\n      if(feature==='divider')b.removeAttribute('aria-pressed');\n      else b.setAttribute('aria-pressed',String(!!settings().sectors[feature]));\n      var ladder=row.querySelector('.gunite-ladder-switch');\n      var source=row.querySelector('.gunite-entry-source'),d=settings();\n      if(feature!=='steps' || !d.sectors.steps || !(d.sectors.kids || d.sectors.relax)){\n        if(source)source.remove();\n      }else{\n        \n        source=button('gunite-entry-source',function(){\n          var options=['rim','kids','relax'].filter(function(k){return k==='rim' || settings().sectors[k] && !settings().sectors[k].unplaced;});\n          var all=Object.assign({},settings().sectors),index=options.indexOf(all.steps.from || 'rim');delete all.steps;\n          for(var i=1;i<options.length;i++){\n            var kind=options[(index+i)%options.length],s=kind==='rim'?nextPosition(zonePositions('steps',all),null):shelfStairs(kind,all);\n            if(!s)continue;\n            all.steps=s.sx;commitZones(all,null,'steps');syncZoneSwitch();return;\n          }\n          showZoneNotice(pointLabel('No stair run fits the available shelves.','Na dostupne plosiny se schody nevejdou.'));\n        });\n        var k=d.sectors.steps.from;\n        var sourceText=pointLabel('From ','Od ')+(k?featureName(k):pointLabel('pool rim','okraje'));\n        if(source.textContent!==sourceText)source.textContent=sourceText;\n      }\n      if(feature!=='steps'){if(ladder)ladder.remove();return;}\n      ladder=button('gunite-ladder-switch',function(){\n        var err=zoneAction('entry',Number.isFinite(settings().ladder)?'none':'ladder');if(err)showZoneNotice(err);syncZoneSwitch();\n      });\n      var installed=Number.isFinite(settings().ladder),ladderText=pointLabel('Ladder','\u017Deb\u0159\u00EDk')+' '+(installed?'ON':'OFF');\n      if(ladder.textContent!==ladderText)ladder.textContent=ladderText;\n      ladder.setAttribute('aria-pressed',String(installed));\n    }\n    function planBounds(){\n      var B=boxOf(ring().poly);\n      if(global.document.querySelector('#cf-sx-strip [data-k=\"cyc:gunitePad\"].cf-sel')){\n        var site=equipmentSite(B);\n        B=boxOf([[Math.min(B.x0,site.x-site.w/2),Math.min(B.z0,site.z-site.l/2)],\n                 [Math.max(B.x1,site.x+site.w/2),Math.max(B.z1,site.z+site.l/2)]]);\n      }\n      return B;\n    }\n    P._planFocus=function(){var B=planBounds();return {cx:B.cx,cz:B.cz,spanX:B.w+1.3,spanZ:B.l+1.4};};\n    function planFraming(st){\n      var cv=st.renderer.domElement.getBoundingClientRect(),rail=global.document.getElementById('cf-sx-strip');\n      if(cv.width<64 || cv.height<96)return null;\n      var right=rail?Math.min(cv.right,rail.getBoundingClientRect().left):cv.right,left=Math.min(58,cv.width*.15);\n      var usable=Math.max(cv.width*.42,right-cv.left-left-16),B=planBounds();\n      var scale=Math.min(usable/(B.w+1.3),Math.max(64,cv.height-120)/(B.l+1.4));\n      return {width:cv.width,height:cv.height,span:cv.width/scale,cx:B.cx+(cv.width-usable-2*left)/2/scale,cz:B.cz};\n    }\n    function fitPoolPlan(saved){\n      var st=A._stage(),cam=st.orthoCam,ctl=st.orthoControls;\n      if(!cam || !ctl || S.view!=='2d')return;\n      var f=planFraming(st);if(!f)return;\n      var view=saved && saved.ratio?saved:{ratio:1,x:0,z:0};\n      var x=f.cx+view.x,z=f.cz+view.z;\n      cam.position.x+=x-ctl.target.x;cam.position.z+=z-ctl.target.z;\n      ctl.target.x=x;ctl.target.z=z;ctl.update();\n      cam.zoom=(cam.right-cam.left)/(f.span*view.ratio);cam.updateProjectionMatrix();C.drawPlan();st.wake(300);\n    }\n    function bindPlanSize(st,root){\n      var previous=st.setView,saved=null,hold=0,signature='';\n      function restore(){\n        if(S.view!=='2d' || document.hidden)return;\n        hold=Date.now()+3800;global.requestAnimationFrame(function(){if(hold && S.view==='2d')fitPoolPlan(saved);});\n        st.wake(320);\n      }\n      // The pool plan renders ink while its 3D group is empty. Give the house\n      // resize path the actual basin extents every time it recreates the camera.\n      st.setView=function(mode,focus){\n        if(mode==='2d' && !focus)focus=P._planFocus();\n        return previous.call(st,mode,focus);\n      };\n      global.addEventListener('resize',restore);global.addEventListener('focus',restore);\n      global.document.addEventListener('visibilitychange',restore);\n      function allowGesture(){hold=0;}\n      root.addEventListener('pointerdown',allowGesture,true);root.addEventListener('wheel',allowGesture,true);\n      return function(){\n        if(S.view!=='2d'){saved=null;hold=0;signature='';return;}\n        if(document.hidden)return;\n        var f=planFraming(st),cam=st.orthoCam,ctl=st.orthoControls;if(!f || !cam || !ctl)return;\n        var size=f.width+'x'+f.height;\n        if(signature && size!==signature)hold=Date.now()+3800;\n        signature=size;\n        var span=(cam.right-cam.left)/cam.zoom;\n        if(hold>Date.now() && saved){\n          if(Math.abs(span/f.span-saved.ratio)>.001 || Math.abs(ctl.target.x-f.cx-saved.x)>.01 || Math.abs(ctl.target.z-f.cz-saved.z)>.01)fitPoolPlan(saved);\n        }else if(isFinite(span) && span>0)saved={ratio:span/f.span,x:ctl.target.x-f.cx,z:ctl.target.z-f.cz};\n      };\n    }\n    function nativePlanPoint(row){\n      var doc=global.document,w=A.wizard();if(w.isOpen())w.close();\n      doc.querySelector('#cf-cmdbar .cf-cmd-plan').click();\n      var target=doc.querySelector('#cf-sx-strip [data-k=\"cyc:'+row+'\"]');\n      if(target)target.click();\n\n      global.requestAnimationFrame(fitPoolPlan);syncZoneSwitch();\n    }\n    function openPoolPoint(key) {\n      var doc=global.document,w=A.wizard();if(w.isOpen())w.close();\n      if(key==='library'||key==='zones'||key==='pad'){\n        nativePlanPoint({library:'gunitePresets',zones:'guniteFeatures',pad:'gunitePad'}[key]);return;\n      }\n      w.open();\n      var icon=key==='depth'?'step:guniteDepth':key;\n      var b=doc.querySelector('#cf-sx-strip [data-k=\"'+icon+'\"]');if(b)b.click();\n    }\n    function bindPoolReadout(){\n      var doc=global.document,root=doc.getElementById('cf-root'),st=A._stage();\n      if(!root || !st)return;\n      var style=doc.createElement('style');\n      style.textContent='#gunite-water-volume{display:block;pointer-events:none;text-align:center;color:#1a1c1d;text-shadow:0 1px 3px #fffe;white-space:nowrap}#cf-root>#gunite-water-volume{position:absolute;left:50%;top:14px;transform:translateX(-50%);z-index:8}#gunite-water-volume span{display:block}#gunite-water-volume .gp-volume-title{font:700 11px Montserrat,sans-serif;letter-spacing:.08em;text-transform:uppercase;color:#9ca3af}#gunite-water-volume .gp-volume-value{font:800 22px/1.15 Montserrat,sans-serif}#cf-plan-area.gp-volume-anchor>#cf-plan-area-t,#cf-plan-area.gp-volume-anchor>#cf-plan-area-v{display:none}';\n      doc.head.appendChild(style);\n      var volume=doc.createElement('div'),title=doc.createElement('span'),value=doc.createElement('span');\n      volume.id='gunite-water-volume';title.className='gp-volume-title';value.className='gp-volume-value';\n      title.textContent=pointLabel('Water volume','Objem vody');volume.append(title,value);root.appendChild(volume);\n      var lastVolume=null;\n      function update(){\n        var anchor=doc.getElementById('cf-plan-area'),useAnchor=S.view==='2d' && anchor && anchor.style.display!=='none';\n        if(anchor)anchor.classList.toggle('gp-volume-anchor',!!useAnchor);\n        var parent=useAnchor?anchor:root;\n        if(volume.parentElement!==parent)parent.appendChild(volume);\n        if(_G && _G.volume!==lastVolume){\n          lastVolume=_G.volume;\n          value.textContent=lastVolume.toLocaleString(doc.documentElement.lang || 'en',{minimumFractionDigits:1,maximumFractionDigits:1})+' m\u00B3';\n        }\n        if(useAnchor){\n          // When the fitted plan fills the tablet canvas, the house anchor\n          // can be above the viewport. Keep the number inside its top edge.\n          var box=anchor.getBoundingClientRect(),frame=root.getBoundingClientRect(),margin=10;\n          var dx=Math.max(0,frame.left+margin-box.left)+Math.min(0,frame.right-margin-box.right);\n          var dy=Math.max(0,frame.top+margin-box.top)+Math.min(0,frame.bottom-margin-box.bottom);\n          var move='translate('+Math.round(dx)+'px,'+Math.round(dy)+'px)';\n          if(volume.style.transform!==move)volume.style.transform=move;\n        }else if(volume.style.transform)volume.style.removeProperty('transform');\n      }\n      // The shared unit switch rebuilds this geometry. An even number of exact\n      // steps puts the central grid lines at the model origin in both systems.\n      var rebuild=st.rebuildGrid;\n      st.rebuildGrid=function(opts){\n        var step=S.isMetric===false?FT:1;\n        var size=2*Math.ceil(((opts && opts.size) || 60)/(2*step))*step;\n        rebuild.call(st,Object.assign({},opts,{step:step,size:size}));syncPoolGrid(st);\n      };\n      st.rebuildGrid({size:60});\n      var setView=st.setView;\n      st.setView=function(){var result=setView.apply(st,arguments);syncPoolGrid(st);update();return result;};\n      var native=st._onFrame;\n      st._onFrame=function(){if(native)native.call(st);update();};\n      A.afterBuild.push(update);update();\n    }\n    function bindPoolPoints() {\n      var doc=global.document,root=doc.getElementById('cf-root'),st=A._stage();\n      if(!root || !st || global.LEVA_NO_GRID || /[?&]hs=0(?:&|$)/.test(global.location.search))return;\n      root.classList.add('gunite-points');\n      var style=doc.createElement('style');\n      style.textContent='.gunite-points .cf-hs[data-hs]:not([data-hs=\"place\"]){display:none!important}.gunite-points .cf-hs-t{display:none!important}.gunite-state-row{display:flex;align-items:center;justify-content:center;gap:6px}.gunite-state-row button{border:0;pointer-events:auto;cursor:pointer}#cf-sx-bar .cf-sx-lbl[hidden],#cf-sx-bar .cf-sx-cur[hidden]{display:none}.gunite-status{pointer-events:none;position:absolute;left:10%;right:18%;bottom:105px;text-align:center;background:white;color:#333;padding:6px;border-radius:8px;z-index:12;font:13px system-ui}#cf-root.gp-edit-boundary{touch-action:none}.gp-zone-overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:11}.gp-zone-overlay polygon,.gp-zone-overlay circle{pointer-events:all;touch-action:none;cursor:grab}';\n      doc.head.appendChild(style);\n      var buttons={},T=global.THREE,v=new T.Vector3(), native=st._onFrame;\n      ['library','depth','colors','zones','pad'].forEach(function(key){\n        var b=doc.createElement('button');b.type='button';b.className='cf-hs';b.dataset.poolPoint=key;\n        b.setAttribute('aria-label',key==='zones'?pointLabel('Pool zones','Z\\u00f3ny baz\\u00e9nu'):labelOf(key));\n        b.innerHTML='<span class=\"cf-hs-r\"></span><span class=\"cf-hs-d\"></span>';\n        b.onpointerdown=function(e){e.stopPropagation();};b.onclick=function(e){e.stopPropagation();openPoolPoint(key);};\n        root.appendChild(b);buttons[key]=b;\n      });\n      var overlay=bindZoneOverlay(root,st),checkPlanSize=bindPlanSize(st,root);\n      function frame(){\n        var G=_G;if(!G || !st.camera||!st.renderer)return;\n        checkPlanSize();overlay(); syncZoneSwitch();\n        var visible=S.view!=='2d';\n        var B=G.B, anchors={library:[0.18,0.35],depth:[0.88,0.30],colors:[0.75,0.92],zones:[0.52,0.48]};\n        var cv=st.renderer.domElement.getBoundingClientRect(),r=root.getBoundingClientRect(),placed=[];\n\n        Object.keys(buttons).forEach(function(k){\n          var b=buttons[k],row=k==='depth'?'step:guniteDepth':k;\n          b.classList.toggle('cf-sel',visible && !!doc.querySelector('#cf-sx-strip [data-k=\"'+row+'\"].cf-sel'));b.classList.toggle('cf-on',visible);b.hidden=!visible;if(!visible)return;\n          var pos;\n          if(k==='pad'){var site=circulation(G).site;pos=[site.x,.12,site.z];}\n          else pos=[B.x0+B.w*anchors[k][0],0.10,B.z0+B.l*anchors[k][1]];\n          v.fromArray(pos).project(st.camera);\n          var x=(v.x+1)*cv.width/2+cv.left-r.left,y=(1-v.y)*cv.height/2+cv.top-r.top;\n          if(v.z>1 || x<0 || y<0 || x>cv.width || y>cv.height){b.hidden=true;return;}\n          var baseY=y;\n          for(var i=0;i<15 && placed.some(function(p){return Math.hypot(p.x-x,p.y-y)<43;});i++){\n            y=baseY+(i%2?1:-1)*Math.ceil((i+1)/2)*18;\n          }\n          placed.push({x:x,y:y});b.style.transform='translate3d('+Math.round(x)+'px,'+Math.round(y)+'px,0)';\n        });\n      }\n      var canvas=st.renderer.domElement,start=null;\n      canvas.addEventListener('pointerdown',function(e){start=e.isPrimary && e.button===0?{x:e.clientX,y:e.clientY,id:e.pointerId}:null;});\n      canvas.addEventListener('pointercancel',function(){start=null;});\n      canvas.addEventListener('pointerup',function(e){\n        var tap=start;start=null;\n        if(!tap || tap.id!==e.pointerId || Math.hypot(e.clientX-tap.x,e.clientY-tap.y)>6 ||\n          S.view==='2d' || S.vizStage || A.asmWalking() || A.explode() || A.wizardOpen())return;\n        var tree=st._fadeTree;if(!tree || !tree.visible)return;\n        var cv=canvas.getBoundingClientRect(),ray=new T.Raycaster(),hits=[];\n        ray.setFromCamera(new T.Vector2((e.clientX-cv.left)/cv.width*2-1,1-(e.clientY-cv.top)/cv.height*2),st.camera);\n        T.Mesh.prototype.raycast.call(tree,ray,hits);\n        if(hits.length){\n          var treeDistance=Math.min.apply(null,hits.map(function(h){return h.distance;}));\n          var blocked=ray.intersectObject(st.group,true).some(function(h){\n            if(h.distance>=treeDistance)return false;\n            for(var o=h.object;o;o=o.parent)if(!o.visible)return false;\n            return true;\n          });\n          var place=doc.querySelector('[data-hs=\"place\"]');\n          if(!blocked && place)place.click();\n        }\n      });\n      st._onFrame=function(){if(native)native.call(st);frame();};\n      A.afterBuild.push(function(){global.requestAnimationFrame(frame);});\n      root.addEventListener('click',function(){global.requestAnimationFrame(frame);},true);\n      frame();if(st.wake)st.wake(600);\n    }\n    function bindEyeNumber() {\n      var badge=global.document.getElementById('cf-stat-viz');\n      if(!badge) return;\n      function number() {\n        var index=A.vizStages().findIndex(function(v){return v.key===A.viz().key;});\n        var n=String(Math.max(0,index));\n        if(badge.textContent!==n) badge.textContent=n;\n      }\n      // The shared rail counts the full model as 1. Here it is the overview;\n      // label the first tap (reinforcement) 1 and the next (circulation) 2.\n      new MutationObserver(number).observe(badge,{childList:true,characterData:true,subtree:true});\n      number();\n    }\n\n\n    function unpricedTakeoff() {\n      var drawer=global.document.querySelector('#Budget-Drawer .budget-section__inner');\n      if(!drawer) return;\n      var box=drawer.querySelector('[data-gunite-unpriced]');\n      if(!box){box=global.document.createElement('details');box.dataset.guniteUnpriced='true';drawer.prepend(box);}\n      var summary=global.document.createElement('summary'), list=global.document.createElement('ul');\n      var keys=Object.keys(missing).sort();box.hidden=!keys.length;\n      summary.textContent='Measured items awaiting prices ('+keys.length+')';\n      keys.forEach(function(key){\n        var row=global.document.createElement('li'), m=missing[key];\n        row.textContent=missQty(m)+' '+m.unit+' - '+m.what;\n        list.appendChild(row);\n      });\n      box.replaceChildren(summary,list);\n    }\n\n    function budgetPriceNote() {\n      var drawer = global.document.querySelector('#Budget-Drawer .budget-section__inner');\n      if (!drawer) return;\n      var note = drawer.querySelector('[data-gunite-price-note]');\n      var prices=global.LEVA_CATALOG_PRICES || {}, quote=prices.PWC00002, messages=[];\n      if (quote && quote.cur==='USD' && quote.unit==='FT' && Number(quote.unitPrice)===0.003 &&\n          Number(quote.pkgPrice)===8 && quote.merchant==='Blackland Building Supply') {\n        messages.push('PWC00002: the $0.003/ft rebar offer treats $8 as the price of 150 bars.');\n      }\n      var mismatches=[\n        ['PPP00003',/pool pump motor.*square flange/i,'The listed motor does not include a complete pump.'],\n        ['PPE00634',/water hose/i,'The offer is for a hose; the layout uses rigid pressure pipe.'],\n        ['PPE00632',/\\bDWV\\b/i,'Select an elbow rated for the circulation pressure line.'],\n        ['PPS00001',/trim skim/i,'Verify that the offer includes the skimmer body, not just trim.'],\n        ['PPP00002',/1-5pack/i,'Confirm the selected pack quantity and whether it includes the wall body.']\n      ];\n      mismatches.forEach(function(rule) {\n        var offer=prices[rule[0]];\n        if(offer && offer.cur==='USD' && rule[1].test(offer.title || '')) messages.push(rule[0]+': '+rule[2]);\n      });\n      if(!messages.length) { if(note) note.remove(); return; }\n      if(!note) {\n        note=global.document.createElement('div');\n        note.dataset.gunitePriceNote='true';\n        drawer.prepend(note);\n      }\n      var heading=global.document.createElement('strong'), list=global.document.createElement('ul');\n      heading.textContent='Catalogue offers to verify';\n      messages.forEach(function(message) {\n        var row=global.document.createElement('li'); row.textContent=message; list.appendChild(row);\n      });\n      note.replaceChildren(heading,list);\n    }\n\n    /* Freeform pools have many distinct run lengths. Jump within the native\n       walk while retaining its visibility, banner, cost and animation logic. */\n    function bindStepPicker() {\n      var doc = global.document,\n        root = doc.getElementById('cf-root');\n      if (!root || doc.getElementById('gunite-step-picker')) return;\n      var pick = doc.createElement('select'),\n        listed = null;\n      pick.id = 'gunite-step-picker';\n      pick.setAttribute('aria-label', 'Choose assembly step');\n      pick.style.cssText =\n        'position:absolute;top:12px;left:12px;z-index:12;max-width:calc(100% - 100px);padding:7px 9px;border:1px solid #ddd;border-radius:7px;background:white;color:#222;font:13px system-ui';\n      pick.hidden = true;\n      root.appendChild(pick);\n\n      function sync(e) {\n        var state = C._asm2;\n        pick.hidden = !e.detail.walking;\n        if (pick.hidden) return;\n        if (listed !== state.steps) {\n          listed = state.steps;\n          pick.replaceChildren();\n\n          function add(k, label) { var opt = doc.createElement('option');\n            opt.value = k;\n            opt.textContent = k + '. ' + label;\n            pick.appendChild(opt); }\n          add(1, tr('exploded_view', 'Exploded view'));\n          add(2, tr('viz_full', 'Full build'));\n          state.steps.forEach(function(step, i) { add(i + 3, C._asmStepLabel(step)); });\n        }\n        pick.value = String(e.detail.k);\n      }\n      global.addEventListener('configurator:assembly-step', sync);\n      pick.addEventListener('change', function() {\n        var k = Number(pick.value);\n        if (!C._asm2.k || k < 1 || k > C._asm2.steps.length + 2) return;\n        if (k === 1) { C._asm2.k = C._asm2.steps.length + 2;\n          A.asmNext(); }\n        C._asm2.k = k - 1;\n        A.asmNext();\n      });\n    }\n    /* ---- WHO THIS IS ---------------------------------------------------- */\n    C.PRODUCT = 'gunite'; C.LOG_TAG = 'gunite'; C.DEFAULT_PROJECT = ''; C.FOCUS = 'GUNITE';\n    C.ASM_ORDER = ['gunite-pit','gunite-trench','gunite-gravel','gunite-bed','gunite-vault','gunite-spacers','gunite-steel','gunite-stirrups','gunite-rough','gunite-ties','gunite-shell','gunite-backfill','gunite-ladder-sockets','gunite-tile','gunite-coping','gunite-pad','gunite-equipment','gunite-plaster','gunite-ladder','gunite-water'];\n    P._rebarStage=false; // Gunite supplies its own inspection view and color key.\n    P._viewDir = function() { return { x: 1, y: 0.78, z: 1, rail: true }; };\n    P._assemblySpread = function(steps) {\n      var\n    lift = { 'gunite-pit': -2, 'gunite-gravel': -1.6, 'gunite-spacers': -1.2, 'gunite-ties': 0.2, 'gunite-shell': 0, 'gunite-tile': 1.1, 'gunite-coping': 1.55, 'gunite-plaster': 0.8, 'gunite-water': 2.1 };\n      var out = [];\n      steps.forEach(function(step) {\n        step.meshes.forEach(function(body) {\n          var rest = body.userData.__asmPos || (body.userData.__asmPos = body.position.clone());\n          var d = body.userData.poolSpread || [0, lift[step.layer] || 0, 0];\n          out.push({ m: body, p: rest, v: { x: d[0], y: d[1], z: d[2] }, l: { x: 0, y: 0, z: 0 } });\n        });\n      });\n      return out;\n    };\n    C.ASM_GLOBAL_ORDER = C.ASM_ORDER.map(function (p) { return p + '|*'; }); C.ASM_STEP_ORDER = {};\n    P.VERSION = VERSION; P._oneStorey = true; P._iconUi = true; P._tour = false; P._pergolaFree = false;\n    P._productSlab = function () { return 0; };\n    P._productCladThk = function () { return 0; }; P._productOverCap = function () { return 0; };\n    P._openFitouts = null; P._fitGroupOf = null;\n    C.ROOM_KEYS = ['pool'];\n    C.ROOM_ROWS = [{ i18n: 'pool', def: 'Pool', col: '#A9D4EC' }];\n    P._asmLayers = function () { return []; };\n    P.WALL_CLAD = null; P.WALL_MEMB = null; P.WALL_FBATT = null; P.WALL_EPS = null; P.WALL_COAT = null; P.WALL_REND = null;\n    P._noWallHeight = true;\n    C.FIT_PLUS_SKIP = function () { return true; };\n    A.VERSION = VERSION; A.PRODUCT = 'gunite';\n    A.proposedCodes = function () { return []; };\n    function facts() {\n      var d = settings(), G0 = basin(global.THREE), m = S.isMetric !== false, ladder=placedLadder(G0);\n      return { product: 'gunite', version: VERSION, shape: d.shape, mode: d.mode, nodes: d.nodes.length, ringPoints: G0.poly.length,\n               units: m ? 'metric' : 'imperial', length: Math.round(S.footprint.w * 1000) / 1000, width: Math.round(S.footprint.l * 1000) / 1000,\n               waterSurface: Math.round(G0.area * 100) / 100, perimeter: Math.round(G0.perim * 100) / 100, wetted: Math.round(G0.wetted * 100) / 100,\n               volume: Math.round(G0.volume * 100) / 100, shallow: d.shallow, deep: d.deep,\n               shell: Math.round(G0.shellVolume * 100) / 100, pit: Math.round(G0.pit * 100) / 100, bars: Math.round(barLength(G0)), corners: [G0.cornersExt, G0.cornersInt],\n               entry: ladder?{type:'ladder',rungs:ladder.count,position:ladder.mid}:\n                 {type:G0.sectors.some(function(s){return s.kind==='steps';})?'steps':'none'},\n               sectors: G0.sectors.map(function (s0) { return s0.kind + ' ' + s0.treads.length + ' x ' + Math.round((s0.rise || s0.treads[0].depth) * 1000) + ' mm, ' + (Math.round(s0.area * 100) / 100) + ' m2'; }),\n               colors: { plaster: A.colorSlotKey('plaster'), tile: A.colorSlotKey('tile'), coping: A.colorSlotKey('coping') } };\n    }\n    A.guniteFacts = facts;\n    A._testShape = function (k, mirror) { return P._libraryPick({ shape: k }, mirror); };\n    A._basin = function () { return basin(global.THREE); };\n    A._testSector = function (k) { secTap(k); return settings().sectors[k] || null; };\n    A._testRead = function (a) { return P._planRead(a); };\n    A.facts = function () {\n      var f = facts();\n      return { product: 'gunite', version: VERSION, units: f.units, width: f.width, length: f.length, footprintArea: f.waterSurface, storeys: 1,\n               site: { address: S.address || '', frostDepth: S.climateZone || 0 },\n               extra: ['Gunite pool, ' + SHAPES[f.shape].name + ' shape: ' + f.length + ' x ' + f.width + ' m overall, water surface ' + f.waterSurface + ' m2, ' + f.volume + ' m3 of water.'],\n               changeable: ['The shape (the plan library), its overall size (Size) and its outline (Shape), the depth of the shallow and the deep end, built-in steps or a movable ladder, a kids zone and a relax zone along the outline, the equipment pad side, the colours of the plaster, the tile and the coping, map placement, units, saved project.'],\n               fixed: ['Steel is an estimating layout with 6 m stock and a 10% lap allowance. The four-rail beam uses bent links at nominal 305 mm centers; tie wire uses 300 mm per modeled connection plus 10%. Confirm reinforcement, joints, penetrations and bonding against the project design. Circulation assumes one surface skimmer, two wall returns, DN63 PVC and an above-ground pump/filter pad. Hydraulic sizing, electrical supply, bonding, hardscape reinstatement and water treatment need project-specific allowances.'] };\n    };\n    A.wizSteps = function () {\n      var lab = tr('pool_depth', 'Depth');\n      return A.wizardSteps({ skip: ['structure', 'openings', 'exterior', 'video'], override: { roof: { label: lab, hint: lab } } });\n    };\n    P.KIT = function () { return A.kitDefault({ groups: guniteGroups, kinds: [] }); };\n    A.boot = function () {\n      if (mounted) return true;\n      settings();\n      applyShape(settings().shape);\n      if(newPool){\n        var entry=preferredSector('steps');\n        if(entry)settings().sectors.steps=entry;\n        newPool=false;\n      }\n      limits();\n      catalog();\n      A.colorSlots(SLOTS, PALETTE);\n      libraryCss();\n      try { global.FloorplanLib.plan.ink(planInk); } catch (eI) { log('no ink on the plan: ' + (eI && eI.message)); }\n      A.setWallThickness(0.001); A.setPlateZone(0);\n      A.setDefaultModel('');\n      A.setVizStages([{ key: 'full', label: 'viz_full', keep: C.ASM_ORDER },{key:'steel',label:tr('viz_rebar','Reinforcement'),only:['gunite-steel','gunite-stirrups','gunite-spacers','gunite-ties']},{key:'circulation',label:'Pool circulation',only:['gunite-rough','gunite-vault','gunite-pad','gunite-equipment']}]);\n      function planSafe(fn) {\n        return function (ctx) {\n          if (!C._planWanted()) return fn(ctx);\n          var c2 = {}, k;\n          for (k in ctx) { if (ctx.hasOwnProperty(k)) c2[k] = ctx[k]; }\n          c2.group = new ctx.THREE.Group();\n          return fn(c2);\n        };\n      }\n      function poolLayer(id,fn) {\n        A.registerLayer({id:id,version:VERSION,role:'nosna',claims:[],build3d:planSafe(fn),boq:function(){return rows(id);}});\n      }\n      ['trench','bed','backfill'].forEach(function(phase) {\n        poolLayer('gunite-'+phase,function(ctx){buildTrench(ctx,phase);});\n      });\n      ['rough','vault','pad','equipment'].forEach(function(phase) {\n        poolLayer('gunite-'+phase,function(ctx){buildCirculation(ctx,phase);});\n      });\n      poolLayer('gunite-ladder-sockets',function(ctx){buildEntry(ctx,true);});\n      poolLayer('gunite-ladder',function(ctx){buildEntry(ctx,false);});\n      poolLayer('gunite-pit',function(ctx){buildBase(ctx,true);});\n      poolLayer('gunite-gravel',function(ctx){buildBase(ctx,false);});\n      poolLayer('gunite-spacers',function(ctx){buildFixings(ctx,false);});\n      poolLayer('gunite-steel',buildSteel);\n      poolLayer('gunite-stirrups',buildStirrups);\n      poolLayer('gunite-ties',function(ctx){buildFixings(ctx,true);});\n      poolLayer('gunite-plaster',function(ctx){buildShell(ctx,true);});\n      A.registerLayer({ id: 'gunite-shell', version: VERSION, role: 'nosna', claims: ['wall', 'base', 'floor', 'roof', 'ceiling', 'partitions', 'parapet', 'joinery'], build3d: planSafe(buildShell), boq: function () { return rows('gunite-shell'); } });\n      A.registerLayer({ id: 'gunite-tile', version: VERSION, role: 'oplasteni', claims: [], build3d: planSafe(buildTile), boq: function () { return rows('gunite-tile'); } });\n      A.registerLayer({ id: 'gunite-coping', version: VERSION, role: 'oplasteni', claims: [], build3d: planSafe(buildCoping), boq: function () { return rows('gunite-coping'); } });\n      A.registerLayer({ id: 'gunite-water', version: VERSION, role: 'fitout', claims: [], build3d: planSafe(buildWater), boq: function () { return []; } });\n      A.afterBuild.push(function () { try { groundSync(); depthBarSync(); syncCageView(); unpricedTakeoff(); } catch (eG) { log('ground threw ' + (eG && eG.message)); } });\n      /* the plan's title is the water, not a floor */\n      var tBoot = function (k, f) {\n        if (k === 'inner_floor_area') return tr('pdf_pool_legend_water_surface', 'Water surface');\n        if (k === 'cmd_placeholder' || k === 'cmd_change') return tr('pool_describe', 'Describe your pool...');\n        var X = global.LEVA_I18N_X, v = X ? X[k] : null;\n        return (typeof v === 'string' && v && v.indexOf('ranslation missing') < 0) ? v : C.t(k, f);\n      };\n      if (!A._coreBoot({ t: tBoot, prefKey: 'leva:gunite:' + (C.BOOTDATA().productId || '0'), handlesActive: function () { return A.editing('layout'); }, blueprint: !!C.BOOTDATA().blueprint })) return false;\n      mounted = true;\n      if (C.BOOTDATA().blueprint) { log('blueprint boot -- headless, ' + VERSION); return true; }\n      bindStepPicker();\n      bindEyeNumber();\n      budgetPriceNote();\n      unpricedTakeoff();\n      global.addEventListener('leva:catalog-prices-loaded',function(){budgetPriceNote(); unpricedTakeoff();});\n      A.railBind({});\n      A.wizardMount(A.wizSteps());\n      bindPoolPoints();bindPoolReadout();\n      try { var st = A._stage(); if (st && st.fitCameraToFootprint) st.fitCameraToFootprint(); } catch (eF) {}\n      var budgetReady = function () { try { A.publishBoq(); } catch (eB) { log('publish threw ' + (eB && eB.message)); } };\n      if (global.document.readyState === 'complete') budgetReady(); else global.addEventListener('load', budgetReady, { once: true });\n      log('booted ' + VERSION + ' -- ' + settings().shape);\n      return true;\n    };\n    A.baseSnapshot = A.snapshot;\n    A.snapshot = function () {\n      var f = facts();\n      return '===== ' + VERSION + ' on ' + A.CORE_VERSION + ' =====\\n' +\n        'GUNITE shape ' + f.shape + ' | mode ' + f.mode + ' | ' + f.nodes + ' nodes, ' + f.ringPoints + ' ring points\\n' +\n        'GUNITE ' + f.length + ' x ' + f.width + ' m | water ' + f.waterSurface + ' m2, perimeter ' + f.perimeter + ' m, wetted ' + f.wetted + ' m2, volume ' + f.volume + ' m3\\n' +\n        'GUNITE depth ' + Math.round(f.shallow * 1000) + ' to ' + Math.round(f.deep * 1000) + ' mm | shell ' + f.shell + ' m3, pit ' + f.pit + ' m3, bars ' + f.bars + ' m, corners ' + f.corners.join(' + ') + '\\n' +\n        'GUNITE colours ' + f.colors.plaster + ', ' + f.colors.tile + ', ' + f.colors.coping + '\\n' +\n        'GUNITE NOT BILLED: ' + (Object.keys(missing).map(function (k) { var m = missing[k]; return k + ' ' + (Math.round(missQty(m) * 100) / 100) + ' ' + m.unit + ' (' + m.what + ')'; }).join(', ') || 'nothing') + '\\n' +\n        JSON.stringify({ facts: A.facts(), layers: A.layers() }, null, 2);\n    };\n    global.GuniteLib = A;\n  };\n})(window);\n\n(function () {\n  /* THE OUTERMOST NET. Everything below runs inside this, so even a\n     failure in the wrapper itself -- not in build(), not in the core --\n     ends up on the screen instead of in a blank page. */\n  try {\n  (function (global) {\n\n    /* ADU CONFIGURATOR -- assets/configurator-adu-lib.js\n\n         Accessory Dwelling Unit: a detached one-bedroom dwelling in the back\n         garden of a house. Single storey, plain gable, stud frame, on a slab.\n\n         FIRST PRODUCT OF THE HOUSE LINE, and chosen for that on purpose. A\n         rectangle under a plain gable is not a simplification of an ADU, it is\n         what an ADU IS -- so nothing on screen will be something we know is\n         wrong. Every later product adds one capability to what is here rather\n         than working around it.\n\n         Exposes window.HouseLib, which is the name snippets/configurator-house.liquid\n         looks for. Every house product exposes that same name whatever its file is\n         called, so the shared liquid never learns a product's name.\n\n         HOW THIS FILE IS ORGANISED\n\n           CORE BLOCK core-v72     the envelope: plan polygon, storey stack, named\n                                  wall segments, roof planes, layer registry,\n                                  floorplan contract, stage, wizard wiring, prefs,\n                                  snapshot. IDENTICAL BYTES in every house lib.\n                                  Copy it whole; never edit it in one product only.\n\n           PRODUCT SECTION        everything under END CORE BLOCK. This product's\n                                  wizard steps, its rail, its materials, its BoQ.\n\n         WHAT MAY NOT GO IN THE BLOCK\n           a material, a catalogue code, a product name, or a DOM id that only one\n           product has. The three ids the block does use -- cf-root, cf-canvas and\n           its own cf-house-pitch -- are the line's contract: the shared liquid\n           guarantees the first two for every product, and the third the block\n           creates itself. If a fix needs anything else it is product code and\n           belongs under the line. An unclean block cannot be copied, and the\n           moment it cannot be copied the whole arrangement is just twelve forks\n           again.\n\n         WHICH PRODUCTS ARE BEHIND: grep core-v across the libs.\n\n         WHAT THE NEXT PRODUCTS TAKE FROM HERE\n           studio     the whole box; swaps the gable for a flat roof and a parapet\n           garage     the whole box at a bigger span; adds a lintel and a door\n           aframe     the stud frame and the openings; the roof reaches the ground\n           barndo     everything but the wall; posts and steel skin instead\n           clt cabin  everything but the wall; panels instead\n           bungalow   everything but the wall; blocks instead\n\n         LOADED ALONGSIDE (by the router and by configurator-house.liquid)\n           configurator-ui.js             ConfiguratorUI + ConfiguratorStage + MapManager\n           configurator-floorplan-lib.js  FloorplanLib\n           configurator-core.js           purchase gate, window.LEVA_PRODUCT\n           configurator-debug.js          Configurator.log\n         */\n\n    'use strict';\n\n    /* Patch anchors: search for the banner line ===== ZONE -- a run of them,\n       nested, each running from its own banner to the LAST line of the file.\n       The review switches live under the LAST banner, so a colour or a step\n       changes with a delivery of thirty lines, not of the file. */\n    /* VERSION is DECLARED in the switch block at the end of the file, so that\n       a bump travels with a zone delivery instead of the whole file. */\n    /* WHO THIS IS -- SET BY THE PRODUCT, NOT HERE.\n\n       The three of them used to be written into the core block, which meant the\n       core knew the name of the building it was serving. It does not need to and\n       it must not: the same core is about to serve every product in the line, so\n       anything that names one of them belongs under END CORE BLOCK. The product\n       fills these in its own config block, before anything reads them. */\n\n    var PRODUCT_NAME = 'gunite';\n\n    /* __CORE, not C: the product already uses C as a local name in ten\n       places -- _colors(), _covDef(), the wall catalogue, reach(C) -- and\n       every one of them shadowed the bag inside its own function. */\n    function build(__CORE) {\n      /* THE PRELUDE. 88 names bound back to locals, so the\n         seventeen thousand lines below are the same text they always were. */\n      var $ = __CORE.$, API = __CORE.API, BOOTDATA = __CORE.BOOTDATA, CLADDINGS = __CORE.CLADDINGS,\n          CLAD_T = __CORE.CLAD_T, CLEAR_LIM = __CORE.CLEAR_LIM, CORE_VERSION = __CORE.CORE_VERSION, FOUNDATIONS = __CORE.FOUNDATIONS,\n          FT = __CORE.FT, GRID = __CORE.GRID, ICO = __CORE.ICO, ICO_FREEZE_G = __CORE.ICO_FREEZE_G,\n          IN = __CORE.IN, LIMITS = __CORE.LIMITS, OVER_LIM = __CORE.OVER_LIM, SHEET = __CORE.SHEET,\n          STATE = __CORE.STATE, STORE_KEY = __CORE.STORE_KEY, _FL = __CORE._FL, _P = __CORE._P,\n          _UI = __CORE._UI, _asm2 = __CORE._asm2, _asmCode = __CORE._asmCode, _asmCollect = __CORE._asmCollect,\n          _asmLeave = __CORE._asmLeave, _asmMark = __CORE._asmMark, _asmStepLabel = __CORE._asmStepLabel, _bill = __CORE._bill,\n          _box = __CORE._box, _buildRect = __CORE._buildRect, _cap = __CORE._cap, _cladThk = __CORE._cladThk,\n          _footFull = __CORE._footFull, _heightLabel = __CORE._heightLabel, _initHeight = __CORE._initHeight, _initPitch = __CORE._initPitch,\n          _isTrussed = __CORE._isTrussed, _log = __CORE._log, _navControls = __CORE._navControls, _pan2D = __CORE._pan2D,\n          _partFramed = __CORE._partFramed, _paverSize = __CORE._paverSize, _pitchLabel = __CORE._pitchLabel, _planRemember = __CORE._planRemember,\n          _planTaps = __CORE._planTaps, _planWanted = __CORE._planWanted, _roofOver = __CORE._roofOver, _rows = __CORE._rows,\n          _shareWorker = __CORE._shareWorker, _stage = __CORE._stage, _store = __CORE._store, _t = __CORE._t,\n          _tCap = __CORE._tCap, _terrace = __CORE._terrace, _terraceRect = __CORE._terraceRect, _terraceSheltered = __CORE._terraceSheltered,\n          _terraceSnapToTiles = __CORE._terraceSnapToTiles, _trace = __CORE._trace, _traceIcon = __CORE._traceIcon, _traceRepaint = __CORE._traceRepaint,\n          _traceTitle = __CORE._traceTitle, _trees = __CORE._trees, _why = __CORE._why, apexY = __CORE.apexY,\n          boq = __CORE.boq, clamp = __CORE.clamp, drawPlan = __CORE.drawPlan, editing = __CORE.editing,\n          fitEdit = __CORE.fitEdit, fmtLen = __CORE.fmtLen, hipAt = __CORE.hipAt, hipEnds = __CORE.hipEnds,\n          inPoly = __CORE.inPoly, opEdit = __CORE.opEdit, poly = __CORE.poly, polyArea = __CORE.polyArea,\n          roofPlanes = __CORE.roofPlanes, savePref = __CORE.savePref, scheme = __CORE.scheme, segments = __CORE.segments,\n          sheet = __CORE.sheet, showExplode = __CORE.showExplode, storeys = __CORE.storeys, t = __CORE.t,\n          toggleTrees = __CORE.toggleTrees, viz = __CORE.viz, wallThickness = __CORE.wallThickness, wallTop = __CORE.wallTop;\n      var __PROD = __CORE.__PROD;\n\n\n      /* =========================================================================\n         WHAT THIS PRODUCT IS -- the first thing under the line, and the only\n         place a product name appears outside the layers themselves. Everything\n         here was inside the core block until the core was made shared; nothing\n         about it changed except where it lives.\n         ========================================================================= */\n      __CORE.PRODUCT = 'adu';\n      __CORE.LOG_TAG = __CORE.PRODUCT;\n      /* the fixed snapshot a first visit opens with (a leva-share id) */\n      __CORE.DEFAULT_PROJECT = 'muhfexrz';\n\n      __CORE.ROOM_KEYS = [\n        'rooms.livingroom',    /* LIVING ROOM     */\n        'rooms.kitchen',    /* KITCHEN         */\n        'rooms.bedroom',    /* BEDROOM         */\n        'rooms.bathroom',    /* BATHROOM        */\n        'rooms.hallway',   /* HALLWAY / ENTRY */\n        'container_room_7',    /* KIDS ROOM       */\n        'rooms.office',    /* OFFICE          */\n        'rooms.loft',   /* LOFT            */\n        'rooms.storage',   /* STORAGE         */\n        'rooms.laundry',   /* LAUNDRY         */\n        'rooms.pantry',   /* PANTRY          */\n        'container_room_6',    /* TECHNICAL       */\n        /* adu-v1403 (Marek: DINING, WC, WALK-IN CLOSET, GARAGE + MUDROOM) --\n           the asset's rows since floorplan-lib-v105, the locale's own keys */\n        'rooms.diningroom',  /* DINING ROOM     */\n        'rooms.wc',          /* WC              */\n        'rooms.wardrobe',    /* WARDROBE        */\n        'rooms.mudroom',     /* MUDROOM         */\n        'rooms.garage',      /* GARAGE          */\n        /* adu-v1407 (Marek: uprostred domu, kde je spojovaci cast, mas hallway /\n           entry, coz je nesmysl) -- the hall in the middle of a house is a HALL;\n           HALLWAY / ENTRY stays for the way in. The asset has had the row\n           (rooms.hall, its own colour) all along and the locale the word;\n           appended, as a saved name is an index into this list. */\n        'rooms.hall'         /* HALL            */\n      ];\n\n      __CORE.ASM_ORDER = ['adu-overhead', 'adu-base', 'adu-floor', 'adu-stud-wall', 'adu-joinery', 'adu-blinds', 'adu-wall', 'adu-ceiling', 'adu-partitions', 'adu-elec', 'adu-heat', 'adu-water', 'adu-waste', 'adu-fitout', 'adu-terrace', 'adu-lps', 'adu-roof', 'adu-postwall'];\n      __CORE.ASM_STEP_ORDER = {\n        /* the base: excavation and gravel, the bars, THEN the concrete over them, the sill and the rest */\n        'adu-base': ['grd.excavation', 'grd.gravel', 'grd.geotextile', 'grd.drain', 'FCO00003', 'WWR00061', 'grd_concrete', 'grd.concrete', 'grd.padBlock', 'steel.screwPile', 'base_screws', 'base_pads', 'base_piers', 'base_strips', 'sill_plate', 'foundation_vents', 'layer_vapour_barrier'],\n        'adu-floor': ['layer_floor_joists', 'layer_floor_rail', 'layer_floor_cover_osb', 'layer_breather_membrane', 'layer_mineral_wool', 'layer_floor_wool', 'layer_vapour_barrier', 'layer_floor_subfloor', 'layer_floor_finish', 'layer_floor_skirting'],\n        'adu-stud-wall': ['INS01003', 'KVH60160', 'KVH10200', 'KVH60200'],\n        /* inside out, the way it is fitted: vapour barrier, service battens, the\n           cavity's wool, the board, then the batts in the frame, then outward */\n        'adu-wall': [{ id: 'layer_vapour_barrier', dir: 'in' }, { id: 'layer_service_battens', dir: 'in' }, { id: 'layer_mineral_wool', dir: 'in' }, { id: 'layer_plasterboard', dir: 'in' },\n                     { id: 'layer_studs_wool', dir: 'side' }, 'layer_osb', 'layer_breather_membrane', { id: 'layer_vented_battens', dir: 'side' }, 'sauna_ui_cladding', 'skirt',\n                     'window_sill', { id: 'window_sill_int', dir: 'in' }, 'corner_trim', { id: 'eave_closure', dir: 'in' }, { id: 'eave_vent_strip', dir: 'top' }, { id: 'eave_baffle', dir: 'top' }],\n        /* the trusses are one step (viz_trusses, the core groups them) and go\n           first in the roof: the eave header they bear on, then the trusses */\n        'adu-roof': ['KVH10200', 'viz_trusses', 'roof_framing', 'roof_framing_hip', 'roof_sheathing', 'roof_underlay', 'roof_battens', 'roof_edges', 'roof_covering', 'roof_ridge', 'gutters']\n      };\n      /* the walk across layers: base, the floor's structure, the frame, the\n         openings, the floor's finishes, the partitions, the interiors, the\n         wall's inside layers, the roof structure, the ceiling, the roof's skin\n         to the covering, the facade, and the rest of the roof last */\n      /* AS IT IS BUILT (T house thread, 2026-11-06, Marek 18:04: \"Stavet by se\n         mel tak, jak se realizuje..plati pro vsechny projekty\"): the walk in the\n         order of a real build -- the foundation, the floor's structure, the\n         frame, the roof structure and its skin (the house closed), the wall's\n         sheathing, the windows and doors, the facade, the gutters, then the\n         services, the insulation and linings, the ceilings, the floor's finish,\n         the partitions on it and the skirting along them, the outside works and\n         the furniture last. Kept from before: the floor's layers before the\n         partitions (adu-v1400), the roof's skin before the wall's OSB and the\n         facade (adu-v1401), the eave closures right after the ceiling's blown\n         fill (adu-v1402). */\n      __CORE.ASM_GLOBAL_ORDER = [\n        'adu-overhead|*',\n        'adu-base|*',\n        'adu-floor|layer_floor_joists', 'adu-floor|layer_floor_rail', 'adu-floor|layer_floor_cover_osb', 'adu-floor|layer_breather_membrane', 'adu-floor|layer_mineral_wool', 'adu-floor|layer_floor_wool', 'adu-floor|layer_vapour_barrier', 'adu-floor|layer_floor_subfloor',\n        'adu-stud-wall|*',\n        'adu-roof|KVH10200', 'adu-roof|viz_trusses', 'adu-roof|roof_framing', 'adu-roof|roof_framing_hip', 'adu-ceiling|layer_ceiling_joists',\n        'adu-roof|roof_sheathing', 'adu-roof|roof_underlay', 'adu-roof|roof_counter_battens', 'adu-roof|roof_battens', 'adu-roof|roof_edges', 'adu-roof|FVW02660', 'adu-roof|ROM02401', 'adu-roof|roof_covering', 'adu-roof|roof_ridge',\n        'adu-wall|layer_osb', 'adu-wall|layer_breather_membrane',\n        'adu-joinery|*',\n        'adu-wall|layer_vented_battens', 'adu-wall|sauna_ui_cladding', 'adu-wall|layer_eps', 'adu-wall|layer_base_coat', 'adu-wall|layer_render', 'adu-wall|skirt', 'adu-wall|window_sill', 'adu-wall|corner_trim', 'adu-blinds|*', 'adu-postwall|*',\n        'adu-roof|*', 'adu-lps|*',\n        'adu-elec|*', 'adu-heat|*', 'adu-water|*', 'adu-waste|*',\n        'adu-wall|layer_vapour_barrier', 'adu-wall|layer_service_battens', 'adu-wall|layer_mineral_wool', 'adu-wall|layer_plasterboard', 'adu-wall|layer_studs_wool', 'adu-wall|window_sill_int',\n        'adu-ceiling|layer_vapour_barrier', 'adu-ceiling|layer_ceiling_battens', 'adu-ceiling|layer_plasterboard', 'adu-ceiling|layer_ceiling_insulation', 'adu-wall|eave_closure', 'adu-wall|eave_vent_strip', 'adu-wall|eave_baffle', 'adu-wall|*', 'adu-ceiling|*',\n        'adu-floor|layer_floor_finish',\n        'adu-partitions|*',\n        'adu-floor|*',\n        'adu-terrace|terrace_supports', 'adu-terrace|terrace_frame', 'adu-terrace|decking', 'adu-terrace|terrace_base', 'adu-terrace|terrace_edge', 'adu-terrace|terrace_tiles', 'adu-terrace|pergola_posts', 'adu-terrace|pergola_beams', 'adu-terrace|pergola_slats', 'adu-terrace|*',\n        'adu-fitout|*'];\n      __CORE.ASM_STEP_ORDER['adu-terrace'] = [{ id: 'terrace_supports', dir: 'top', xdir: 'side' }, { id: 'terrace_frame', dir: 'side' }, { id: 'decking', dir: 'side' },\n                                       { id: 'terrace_base', dir: 'side' }, { id: 'terrace_edge', dir: 'side' }, { id: 'terrace_tiles', dir: 'side' },\n                                       { id: 'pergola_posts', dir: 'side' }, { id: 'pergola_beams', dir: 'side' }, { id: 'pergola_slats', dir: 'side' }];\n      __CORE.ASM_LABELS = { 'adu-base': ['base', 'BASE'], 'adu-floor': ['floor_label', 'Floor'], 'adu-stud-wall': ['structure_v2', 'Timber frame'],\n                     'adu-roof': ['roof', 'Roof'], 'adu-joinery': ['windows_doors', 'Windows & doors'], 'adu-wall': ['walls', 'Walls'],\n                     'adu-ceiling': ['grp_ceiling', 'Ceiling'], 'adu-partitions': ['partitions', 'PARTITIONS'], 'adu-elec': ['viz_elec', 'Electrics'], 'adu-heat': ['mep_heating', 'Heating'],\n                     'adu-water': ['mep_water', 'Water supply'], 'adu-waste': ['mep_drain', 'Drainage'],\n                     'adu-fitout': ['container_int_fitout', 'FITOUT'], 'adu-terrace': ['rooms.terrace', 'Terrace'], 'adu-lps': ['lps_label', 'Lightning protection'] };\n      /* THE THREE VIEWS, AND WHAT EACH ONE IS FOR.\n\n         A view is a question, not a filter: what somebody wants to see when\n         they switch to it.\n\n           panels   how the walls break into panels -- one layer, coloured\n           timber   every stick of structural timber in the building, each\n                    profile in its own colour, everything else out of the way:\n                    this is what goes on the order to the sawmill\n           services the services solid inside a building faded to five per cent,\n                    so a pipe run reads against the structure without the\n                    structure hiding it\n\n         The last two work across the WHOLE building, so they name no layers at\n         all -- the core does the work on the finished model (Marek). */\n      function vizList() {\n        /* THE THREE STAGE VIEWS THE WHOLE LINE HAS (adu-v1376). Six of them had\n           grown here, two of which -- the trusses plain and the trusses by role\n           -- differed only in colour. The core owns the set now and every\n           product shows the same three in the same order (Marek). The frame\n           view is the old panels and truss views in one. */\n        /* THE HEATING SHOWS WITH THE ELECTRICS (adu-v1422): one services view\n           for every trade, told apart by colour (Marek, tiny) -- the heads, the\n           outdoor unit and the rail stay solid there with the cables */\n        var VL = API.stageViews('adu'), iv;\n        for (iv = 0; iv < VL.length; iv++) {\n          if (VL[iv].key === 'services' && VL[iv].keep && VL[iv].keep.indexOf('adu-heat') < 0) VL[iv].keep.push('adu-heat');\n          /* adu-v1426: the water and waste bodies (heater, entry valves, vent\n             stack, air admittance valves) stay solid there too */\n          if (VL[iv].key === 'services' && VL[iv].keep && VL[iv].keep.indexOf('adu-water') < 0) VL[iv].keep.push('adu-water', 'adu-waste');\n        }\n        return VL;\n      }\n\n\n      /* --------------------------------------------------------------------------\n         WHAT AN ADU IS, as numbers. Everything here is a product decision: the\n         core has no opinion about any of it.\n         -------------------------------------------------------------------------- */\n      var ADU = {\n        storeys:  1,\n        roofType: 'gable',\n        pitch:    26,                       /* about 6:12, mid of the 15-45 range */\n        /* The ridge runs the long way and the entry is on a long side, so the unit\n           presents its wide face to the garden and its gable end to the fence. */\n        axis:     'l',\n        /* 24 x 32 ft = 768 sq ft. Under the 800 sq ft that most Californian\n           ordinances exempt from extra review, and under the 1200 sq ft ceiling\n           almost all of them set -- so the default the page opens on is a unit that\n           can actually be permitted, not one that has to be shrunk first. */\n        footprint: { w: 24 * FT, l: 32 * FT },\n        /* EXACTLY EIGHT FEET, WHICH IS 2438 MM AND NOT 2440.\n\n           Rounded up by 1.6 mm, the wall stood taller than the board meant to cover\n           it -- so every column of sheathing needed a second board for a strip two\n           millimetres wide, and the takeoff quietly doubled: 60 boards for a\n           building that takes 28. Nothing looked wrong on screen.\n\n           This is exactly why the sheet is the module. The dimension is written as\n           the sheet, not as a number that rounds to it. */\n        clear:    8 * FT,\n        /* MEASURED PAST THE CLADDING, NOT PAST THE STUDS. 450 clear of the\n           finished face, and the core adds the facade's own 145 on top, so the roof\n           reaches just under 600 from the frame -- which is what it takes to keep\n           rain off an insulated wall. */\n        eave:     0.45,\n        rake:     0.30,\n        /* ON, so a flat roof shows the parapet rather than a bare edge. It is still\n           a switch in ROOF: a plain eave with a drip and a gutter is cheaper and\n           leaks less, and for a garden unit that is often the better answer. */\n        parapet:  true\n      };\n      /* HOW NARROW AND HOW LONG (adu-v1418, plan 1000075645, a 40 x 8 ft unit,\n         Marek: vim, ze se to vymyka, ale vlastne to do ADU zapada -- nechal bych\n         omezeni sirky, tam je to dulezite kvuli statice). The widest stays\n         8.00 m, the span the trusses carry. The narrowest goes down to 8 ft, a\n         container's width, and the longest up to 40 ft, so a 40 x 8 ft plan is\n         built as drawn. The core's own were 4..8 x 4..12 m. */\n      LIMITS.minW = 8 * FT;\n      LIMITS.maxL = 40 * FT;\n\n      /* THE VIDEO IS HARD-CODED PER PRODUCT. Empty means the step does not exist --\n         its skip() takes it out of the wizard entirely, so there is no tab leading\n         to a black rectangle. Paste the id here when the video is cut. */\n      var VIDEO_ID = '';\n\n      /* --------------------------------------------------------------------------\n         EVERY BUTTON AND EVERY TAB IS PRESENT FROM THE START, and most of them do\n         nothing yet. That is deliberate: the shape of the product is easier to\n         judge whole than in pieces, and taking a control away later is a smaller\n         job than discovering halfway through that the rail has no room for it.\n\n         But an inert control that gives no answer is worse than no control -- you\n         cannot tell \"not built\" from \"broken\". So every unwired tap goes through\n         stub(): it records itself, logs a line, and flashes the button, and the\n         snapshot prints the whole list of what is still a stub and how many times\n         each was pressed. Nothing here is silent.\n         -------------------------------------------------------------------------- */\n      var _stubs = {};\n\n      /* Every name stub() has ever been handed, so the snapshot can report what is\n         still scaffolding without anybody keeping a second list in step. */\n      var _stubNames = {};\n\n\n      /* Counters that move even while the thing behind them does not, so a tap on a\n         stub still reads as \"the button works, the feature is not here yet\". */\n\n      /* Nothing is hidden on an ADU. A shared rail carries every button the line\n         might want and the product decides -- this product wants to see them all\n         while the shape is being settled. Add an id here to take one away. */\n      var HIDE_BUTTONS = [];\n\n      /* The oldest shared liquid this lib is willing to be judged against. Raise it\n         whenever the liquid gains something the lib depends on. */\n      /* WHAT THE LIB ACTUALLY DEPENDS ON, which is the rail without the storeys\n         button -- liquid v4. It was raised to 9 while the lib was correcting the\n         price card; it does not touch the card any more, so demanding v9 was crying\n         wolf at a page that is perfectly fine. */\n      var LIQUID_MIN = 4;\n\n      /* --------------------------------------------------------------------------\n         ONE LIST OF CHOICES PER STEP, AND TWO WAYS TO DRAW IT.\n\n         Every step names its options here, grouped by subject -- roof and base,\n         walls and tools, and so on. Nothing below this decides what the options\n         ARE; it only decides how they are shown:\n\n           drawer   labelled rows, everything visible at once\n           bar      a carousel that scrolls forever, with a hairline between groups\n\n         The two renderings read the same array, so a new option appears in both\n         without being written twice.\n         -------------------------------------------------------------------------- */\n\n\n      /* WHAT THIS PRODUCT OFFERS: the shared catalogue, filtered.\n\n         The list itself is ConfiguratorUI.OPENING_CATALOG -- every window and door\n         the central BoQ stocks, with its real code and its real size. An ADU sells\n         four of the six groups; interior doors come with the partitions and roof\n         windows want a pitched plane to sit in, so neither is offered yet.\n\n         Nothing about sizes lives here any more. A new unit in the sheet reaches\n         every product at once, which is the only way a catalogue this size stays\n         true. */\n      var ADU_OPENING_KINDS = ['window', 'door', 'french', 'garage'];\n\n      /* One tile. Same markup both ways, so a choice cannot look like two different\n         controls depending on the width of the screen. */\n      /* --------------------------------------------------------------------------\n         ICONS. Inline so the rail and the wizard draw the same glyph, and so a\n         missing theme snippet cannot leave a blank button.\n         -------------------------------------------------------------------------- */\n      /* THE ICONS COME FROM THE SHARED UI.\n\n         This was thirty-odd little SVGs written out here, and the container had its\n         own thirty -- seven of which shared a name with one of these and drew\n         something else. A door has to mean a door on every page of the site, and\n         the only way that holds is one drawing in one place.\n\n         Weight is asked for here because it is this product's look, not the\n         drawing: the paths are shared, the stroke is not. Anything this product\n         needs that nobody else does is added below, which is the whole reason this\n         is a merge rather than a replacement. */\n      /* THE WHOLE INTERFACE IN ONE CALL.\n\n         This used to be three separate hookups -- fill the icon set, draw the edit\n         panel, open the openings drawer -- each of which a new product had to know\n         about and get right. That is a recipe, and recipes get copied and drift.\n         ConfiguratorUI.kit takes what this product OFFERS and hands back the\n         interface; there is no styling decision left in here to get wrong.\n\n         It is built lazily because the shared asset may load after this file: read\n         at parse time it came back empty and every glyph rendered as the literal\n         text \"undefined\". */\n\n\n\n      /* THE KIT IS THE CORE'S DEFAULT (core-v319): this product hands it its tiles and its kinds */\n      function KIT() { return API.kitDefault({ groups: GROUPS, kinds: ADU_OPENING_KINDS }); }\n\n\n      /* --------------------------------------------------------------------------\n         WIZARD STEPS. The whole path, in the order somebody actually walks it.\n         FLOORPLAN and ROOF are wired; the rest are the shape of the product with\n         stubs behind them, so the steps that come later already have their place\n         and their icons and nothing has to be squeezed in afterwards.\n         -------------------------------------------------------------------------- */\n      /* --------------------------------------------------------------------------\n         WIZARD STEPS. The whole path, in the order somebody actually walks it.\n\n         A step no longer lists its own buttons. It names itself and its key, and\n         the options come from GROUPS(key) -- drawn as labelled rows in the drawer\n         and as the looping strip on the bar. One definition, two renderings, every\n         step the same.\n         -------------------------------------------------------------------------- */\n\n\n      /* A partition dropped across the middle of the plan, the way every other\n         product does it. The plan module owns what happens to it afterwards. */\n      /* EVERY WAY THE PLAN CAN CHANGE HAS TO REACH THE DRAWING.\n\n         The model rebuilds through one function and the drawing is a second\n         surface, so a change that only called rebuild left the plan showing the\n         building before the change. Rather than remember to repaint at each call\n         site -- which is how one of them gets forgotten -- the repaint hangs off\n         rebuild itself. */\n      /* addPartition IS BACK, AND IT IS TINY'S. It was removed for arming plus a\n         tap on the plan, which looked tidier and was worse: the button lit nothing,\n         nothing appeared until the drawing was touched, and the wall had to be\n         dragged off whatever it landed on. Tiny divides the biggest room that will\n         take a wall and puts it there. armPartition stays for the tap path but no\n         button arms any more. */\n\n      /* --------------------------------------------------------------------------\n         THE BILL.\n\n         Every layer already counts what it builds -- metres of stud, boards of\n         sheathing, cubic metres of concrete. Until now those numbers only reached\n         the log, and the budget stayed empty.\n\n         THE POINT OF THIS TABLE IS THE MISSING CODES, NOT THE PRESENT ONES.\n\n         A catalogue code is a promise that a supplier can price the line. Invent\n         one and the customer gets a budget that looks complete and cannot be\n         bought. So every item the model produces is listed here whether or not its\n         code is known, and the ones still waiting carry null.\n\n         Rows with a code go to the budget. Rows without one are counted just the\n         same and reported in the snapshot, so the scope is visible and what is\n         missing is a short list rather than a silence. When the central CSV\n         arrives, this table is the only thing that changes -- no layer has to be\n         touched.\n\n         The codes that ARE here were lifted from the roof configurator, where they\n         are already shipping. They still want checking.\n\n         ONE THING TO SETTLE BEFORE THIS CAN SHIP: the confirmed timber codes are\n         European KVH sections -- 60x120, 60x160 -- and this product is framed in\n         North American ones, 38x140 and 38x235. They are not the same stick. The\n         timber rows are deliberately left uncoded rather than mapped onto the\n         nearest European section, because the nearest is still the wrong one.\n         -------------------------------------------------------------------------- */\n      __CORE.CATALOG = {\n        /* TIMBER, straight off the catalogue's dimensional lumber. Nothing here is\n           an approximation of a section the model wanted -- the model is built from\n           these. */\n        'KVH60120':       { code: 'KVH60120', unit: 'm', label: 'Dimensional lumber 60x120' },\n        'KVH60160':       { code: 'KVH60160', unit: 'm', label: 'Dimensional lumber 60x160' },\n        'KVH60200':       { code: 'KVH60200', unit: 'm', label: 'Dimensional lumber 60x200' },\n        'KVH60240':       { code: 'KVH60240', unit: 'm', label: 'Dimensional lumber 60x240' },\n        'KVH10200':       { code: 'KVH10200', unit: 'm', label: 'Dimensional lumber 100x200' },\n        'KVL20040':       { code: 'KVL20040', unit: 'm', label: 'Timber batten 20x40' },\n        'ROG01251':       { code: 'ROG01251', unit: 'm', label: 'Rainwater gutter' },\n        'ROA01251':       { code: 'ROA01251', unit: 'pcs', label: 'Gutter bracket' },\n        'ROG00001':       { code: 'ROG00001', unit: 'pcs', label: 'Gutter end cap' },\n        'ROG00005':       { code: 'ROG00005', unit: 'pcs', label: 'Gutter hopper' },\n        'ROG01252':       { code: 'ROG01252', unit: 'm', label: 'Rainwater downspout' },\n        'ROG00006':       { code: 'ROG00006', unit: 'pcs', label: 'Downspout elbow' },\n        'ROG00009':       { code: 'ROG00009', unit: 'pcs', label: 'Downspout outlet elbow' },\n        'ROG00011':       { code: 'ROG00011', unit: 'pcs', label: 'Downspout bracket' },\n        /* THE PARAPET'S OWN ITEMS. Nine of the fifteen codes it bills were not in\n           this map, and a code that is not here never reaches the bill -- so the\n           ballast, the coping, the termination bar, the outlet and the membrane\n           were all being added to nothing. Units taken from the catalogue rather\n           than assumed: the gravel is m3, the flashings are m, the screws are pcs. */\n        'ROR00004':       { code: 'ROR00004', unit: 'm3',   label: 'Backfill gravel' },\n        'ROT00001':       { code: 'ROT00001', unit: 'm',    label: 'Dimensional lumber 60x160' },\n        'ROT00002':       { code: 'ROT00002', unit: 'm',    label: 'Dimensional lumber 60x120' },\n        'ROT00003':       { code: 'ROT00003', unit: 'm',    label: 'Dimensional lumber 120x160' },\n        'ROT00004':       { code: 'ROT00004', unit: 'm',    label: 'Furring strip 30x100' },\n        'ROT00005':       { code: 'ROT00005', unit: 'pcs',  label: 'Truss connector plate 150x100' },\n        'ROT00006':       { code: 'ROT00006', unit: 'pcs',  label: 'Truss connector plate 250x150' },\n        'ROT00007':       { code: 'ROT00007', unit: 'pcs',  label: 'Hurricane tie' },\n        'ROA00001':       { code: 'ROA00001', unit: 'm',    label: 'Aluminium termination bar 30x3' },\n        'ROA00002':       { code: 'ROA00002', unit: 'm',    label: 'Parapet coping flashing 500x0.6' },\n        'ROR01251':       { code: 'ROR01251', unit: 'pcs',  label: 'Roof drain' },\n        'FAS45070':       { code: 'FAS45070', unit: 'pcs',  label: 'Stainless steel screw (a2)' },\n        'FEC00038':       { code: 'FEC00038', unit: 'pcs',  label: 'Polyurethane construction sealant' },\n        'ROR00002':       { code: 'ROR00002', unit: 'm2',   label: 'Roof hydrofoil' },\n        'FEC00003':       { code: 'FEC00003', unit: 'm2',   label: 'Geotextile' },\n        'OSB25002':       { code: 'OSB25002', unit: 'm2',   label: 'Osb board' },\n        'ROR00012':       { code: 'ROR00012', unit: 'm',    label: 'Self adhesive flashing tape' },\n\n        'INS00003':       { code: 'INS00003', unit: 'm3', label: 'Loose-fill blown insulation' },\n        'KVR50030':       { code: 'KVR50030', unit: 'm',  label: 'Counter batten 50x30' },\n        'KVH40060':       { code: 'KVH40060', unit: 'm',  label: 'Timber batten 40x60' },\n        'INS01005':       { code: 'INS01005', unit: 'm',  label: 'Sealing tape for membranes' },\n        'WDD24001':       { code: 'WDD24001', unit: 'm2',  label: 'Gypsum board 12.5 mm' },\n        'WDD24002':       { code: 'WDD24002', unit: 'm2',  label: 'Moisture-resistant gypsum board' },\n        'WDF00008':       { code: 'WDF00008', unit: 'm',   label: 'Drywall tape' },\n        'WDF00009':       { code: 'WDF00009', unit: 'kg',  label: 'Drywall joint compound' },\n        'WDS00001':       { code: 'WDS00001', unit: 'pcs', label: 'Drywall ceiling screws' },\n\n        /* THE BUILD-UP'S OWN CODES, AND WHY THEY WERE MISSING.\n\n           _add refuses a code this table does not carry, so every row of the floor\n           build-up was drawn, measured and then thrown away -- the rails, the board,\n           both membranes, the wool, the screws. It says so in the log, once per\n           code, and I did not read it.\n\n           Every one of these is a code tiny already buys. Nothing here is proposed:\n           the labels and units are tiny's. */\n        'OSB25001':       { code: 'OSB25001', unit: 'm2',  label: 'OSB board 15 mm' },\n        'INS00002':       { code: 'INS00002', unit: 'm2',  label: 'Breathable membrane' },\n        'ROV00001':       { code: 'ROV00001', unit: 'm2',  label: 'Vapour barrier foil' },\n        'INS02001':       { code: 'INS02001', unit: 'm2',  label: 'Mineral wool 200' },\n        'INS01601':       { code: 'INS01601', unit: 'm2',  label: 'Mineral wool 160' },\n        'INS01201':       { code: 'INS01201', unit: 'm2',  label: 'Mineral wool 120' },\n        'INS01151':       { code: 'INS01151', unit: 'm2',  label: 'Mineral wool 115' },\n        'INS00601':       { code: 'INS00601', unit: 'm2',  label: 'Mineral wool 60' },\n        /* INS01502 is the sheet's FLAT 150 mm EPS board, 1200 x 600, by the m2 --\n           not a tapered one. FLAT_ROOF carried it under the taper for a long time\n           and nothing ever billed it; it is the constant layer of the flat roof */\n        'INS01502':       { code: 'INS01502', unit: 'm2',  label: 'EPS insulation board 150' },\n        /* his row for the wedge (Sep 2026): sold by the m3, so the lib bills area\n           times the mean thickness -- the average of the thin end and the thick */\n        'ROP20002':       { code: 'ROP20002', unit: 'm3',  label: 'Tapered EPS insulation board' },\n        'FAS60100':       { code: 'FAS60100', unit: 'pcs', label: 'Wood screw 6x100' },\n        'FAS10075':       { code: 'FAS10075', unit: 'pcs', label: 'Concrete screw anchor' },\n        'FAT10001':       { code: 'FAT10001', unit: 'pcs', label: 'Hex bolt with nut and washers' },\n        'FAT10002':       { code: 'FAT10002', unit: 'pcs', label: 'Hex bolt with nut and washers' },\n        'FAS50040':       { code: 'FAS50040', unit: 'pcs', label: 'Structural connector screw' },\n        'TST00003':       { code: 'TST00003', unit: 'm2',  label: 'Shade cloth' },\n        'FCO00004':       { code: 'FCO00004', unit: 'pcs', label: 'Post base anchor U type' },\n        'KVH10100':       { code: 'KVH10100', unit: 'm',   label: 'Dimensional lumber 100x100' },\n        /* the pergola's steel (adu-v1362) */\n        'FAT00017':       { code: 'FAT00017', unit: 'pcs', label: 'Post base connector' },\n        'FAT00018':       { code: 'FAT00018', unit: 'pcs', label: 'Corner post connector' },\n        'FAT00019':       { code: 'FAT00019', unit: 'pcs', label: 'T post connector' },\n        'INS01004':       { code: 'INS01004', unit: 'm2',  label: 'Impact sound underlay' },\n        'FFC00005':       { code: 'FFC00005', unit: 'm2',  label: 'Vinyl flooring (LVF)' },\n        'FFC00003':       { code: 'FFC00003', unit: 'm2',  label: 'Ceramic floor tiles' },\n        'FFC00004':       { code: 'FFC00004', unit: 'm',   label: 'Ceramic plinth tile' },\n        'FEC00018':       { code: 'FEC00018', unit: 'kg',  label: 'Flex tile adhesive' },\n        'FEC00025':       { code: 'FEC00025', unit: 'kg',  label: 'Waterproofing membrane 2K' },\n        'SBG00001':       { code: 'SBG00001', unit: 'kg',  label: 'Grout' },\n        'FFW00002':       { code: 'FFW00002', unit: 'm',   label: 'Skirting boards' },\n\n        /* ALL THREE I-JOISTS ARE IN THE CENTRAL CATALOGUE -- CHECKED, NOT\n           ASSUMED. */\n        'KVI45400':       { code: 'KVI45400', unit: 'm', label: 'I-joist 45x400' },\n        'KVI45300':       { code: 'KVI45300', unit: 'm', label: 'I-joist 45x300' },\n        'KVI45360':       { code: 'KVI45360', unit: 'm', label: 'I-joist 45x360' },\n\n        /* BOARDS. Sold by area in the catalogue, so the bill carries area -- the\n           sheet count stays in the log, where it says something about waste. */\n        'sheet.osb18':    { code: 'OSB25002', unit: 'm2', label: 'OSB board 18 mm' },\n        'KVH10060':       { code: 'KVH10060', unit: 'm',  label: 'Dimensional lumber 60x100' },\n        /* the board is not in the catalogue yet, so it counts and cannot be bought */\n\n        /* STEEL. All three are the catalogue's own parts, at the sizes drawn. */\n        'steel.trussPlate': { code: 'FAT00001', unit: 'pcs', label: 'Carpentry connector plate 200x100x5' },\n        'steel.saddle':     { code: 'FGR00002', unit: 'pcs', label: 'U head post adapter' },\n        'steel.screwPile':  { code: 'FGR00004', unit: 'pcs', label: 'Ground screw 1500x102' },\n\n        /* GROUNDWORKS */\n        'grd.excavation': { code: 'FEE00001', unit: 'm3',  label: 'Excavation' },\n        /* the footing rows come from the sheet's CONCRETE PIERS block for piers\n           and from MONOLITHIC SLAB for a raft -- the fence's gravel row was\n           standing in for both (Marek: as in Foundations) */\n        'grd.gravel':     { code: 'FCO00001', unit: 'm3',  label: 'Gravel base 16-32 (piers)' },\n        'grd.gravelSlab': { code: 'FFG00001', unit: 'm3',  label: 'Pea gravel (slab)' },\n        'grd.concrete':   { code: 'FCO00002', unit: 'm3',  label: 'Structural concrete C20/25 (piers)' },\n        'grd.concreteSlab': { code: 'FFM00001', unit: 'm3', label: 'Cast-in-place concrete C20/25 (slab)' },\n        'grd.padBlock':   { code: 'FCO00009', unit: 'pcs', label: 'Precast concrete footing 400x400' },\n        'grd.geotextile': { code: 'FEC00003', unit: 'm2',  label: 'Geotextile' },\n        'grd.drain':      { code: 'SMR01102', unit: 'm',   label: 'PVC drain pipe SN4 110' },\n\n        /* FASTENERS AND CONSUMABLES, ALL OFF THE CENTRAL SHEET.\n\n           Every one of these was either missing or standing on the wrong code. A\n           roofing nail is 18 mm: it was holding down 18 mm sheathing, which means\n           it was holding nothing. The sizes below are the ones the sheet actually\n           carries, so a quantity that was right lands on an item that is too. */\n        'FAS70000':  { code: 'FAS70000', unit: 'pcs', label: 'Nails 70 (10d 3In.)' },\n        'FAS45145':  { code: 'FAS45145', unit: 'pcs', label: 'Nails 145 (20d)' },\n        'FAS50060':  { code: 'FAS50060', unit: 'pcs', label: 'Wood screw 5x60 (#10 2-1/2In.)' },\n        'FAS00318':  { code: 'FAS00318', unit: 'pcs', label: 'Roofing nails 18 (3/4In.)' },\n        'FAS00225':  { code: 'FAS00225', unit: 'pcs', label: 'Sealing screws 25 (1In.)' },\n        'FAS55050':  { code: 'FAS55050', unit: 'pcs', label: 'Stainless steel screw (a2) 5.5x50' },\n        'FAS75132':  { code: 'FAS75132', unit: 'pcs', label: 'Full thread screw 7.5x132' },\n        'FAS38038':  { code: 'FAS38038', unit: 'pcs', label: 'Structural connector nail 3.8x38' },\n        'FAT00012':  { code: 'FAT00012', unit: 'pcs', label: 'Hold down strap 40x400x2' },\n        'ROT00005':  { code: 'ROT00005', unit: 'pcs', label: 'Truss connector plate 150x100x1' },\n        'ROT00006':  { code: 'ROT00006', unit: 'pcs', label: 'Truss connector plate 250x150x1.2' },\n        'ROT00007':  { code: 'ROT00007', unit: 'pcs', label: 'Hurricane tie 250x40x2' },\n        'ODP00001':  { code: 'ODP00001', unit: 'pcs', label: 'PU foam' },\n        'FEC00027':  { code: 'FEC00027', unit: 'm',   label: 'Waterproofing tape' },\n        'FEC00033':  { code: 'FEC00033', unit: 'pcs', label: 'Aluminium foil tape' },\n\n        /* OVERHEAD -- WHAT THE BUILDING COSTS BESIDE ITS MATERIALS.\n\n           Lump sums, one each, because none of them scales with a dimension in\n           this model: a permit costs what the jurisdiction charges whether the ADU\n           is 30 or 60 square metres. They are here so the number the buyer sees is\n           the number they will pay, rather than a materials total that somebody\n           else then doubles.\n\n           The list is the subset that applies to a HABITABLE unit in somebody's\n           back yard. Left out on purpose: on-site water and wastewater (an ADU\n           ties into the house's, not a septic field of its own), site facilities\n           and security (the house next door has both), bonds, contractor markup\n           and administration (this bill is the owner's, not a general\n           contractor's), and financing, which is a personal arrangement rather\n           than a line in a takeoff. */\n        'OVH01001': { code: 'OVH01001', unit: 'ls', label: 'Site survey and soil testing' },\n        'OVH01002': { code: 'OVH01002', unit: 'ls', label: 'Project documentation and engineering' },\n        'OVH02001': { code: 'OVH02001', unit: 'ls', label: 'Zoning and land use approval' },\n        'OVH02002': { code: 'OVH02002', unit: 'ls', label: 'Building and trade permits' },\n        'OVH02003': { code: 'OVH02003', unit: 'ls', label: 'Municipal and impact fees' },\n        'OVH03001': { code: 'OVH03001', unit: 'ls', label: 'Utility connections and tap fees' },\n        'OVH03003': { code: 'OVH03003', unit: 'ls', label: 'Service trenching and locates' },\n        'OVH04001': { code: 'OVH04001', unit: 'ls', label: 'Temporary utilities' },\n        'OVH04003': { code: 'OVH04003', unit: 'ls', label: 'Site protection and erosion control' },\n        'OVH05001': { code: 'OVH05001', unit: 'ls', label: 'Equipment and lift rental' },\n        'OVH05002': { code: 'OVH05002', unit: 'ls', label: 'Mobilization and delivery' },\n        'OVH05003': { code: 'OVH05003', unit: 'ls', label: 'Fuel and consumables' },\n        'OVH06001': { code: 'OVH06001', unit: 'ls', label: 'Construction insurance' },\n        'OVH07001': { code: 'OVH07001', unit: 'ls', label: 'Code inspections' },\n        'OVH07002': { code: 'OVH07002', unit: 'ls', label: 'Performance and compliance testing' },\n        'OVH08004': { code: 'OVH08004', unit: 'ls', label: 'Sales tax on materials' },\n        'OVH08005': { code: 'OVH08005', unit: 'ls', label: 'Contingency reserve' },\n        'OVH10001': { code: 'OVH10001', unit: 'ls', label: 'Waste removal and disposal' },\n        'OVH10002': { code: 'OVH10002', unit: 'ls', label: 'Final cleaning and handover' },\n        /* TEN ROWS THE ADU BILLED INTO NOTHING (adu-v1428): a default build\n           reported them under NOT BILLED -- the piers' rebar and formwork, the\n           sill seal, the roof skin's underlay, staples, edges, covering and\n           ridge vent, and the fascia trim the roof bills before the wall layer\n           mints it. All ten are rows of the central EXECUTION 2 sheet; labels\n           and units as there, the same set barndo-v6 registers (_pfCat). */\n        'INS01003': { code: 'INS01003', unit: 'm',   label: 'Sill seal under bottom plate' },\n        'FCO00003': { code: 'FCO00003', unit: 'm',   label: 'Reinforcing steel bar 14' },\n        'FCO00007': { code: 'FCO00007', unit: 'ls',  label: 'Foundation formwork' },\n        'ROR00008': { code: 'ROR00008', unit: 'm2',  label: 'Breathable roof underlay' },\n        'FAS63000': { code: 'FAS63000', unit: 'pcs', label: 'Staples 63' },\n        'FVW02660': { code: 'FVW02660', unit: 'm',   label: 'Wood corner trim profile' },\n        'ROM02401': { code: 'ROM02401', unit: 'm',   label: 'Drip edge flashing 240' },\n        'ROR00006': { code: 'ROR00006', unit: 'm',   label: 'Gable flashing' },\n        'ROR00001': { code: 'ROR00001', unit: 'm2',  label: 'Roof tiles / covering' },\n        'ROR00007': { code: 'ROR00007', unit: 'm',   label: 'Ridge ventilation strip' }\n      };\n\n\n      function _billReset(layer) { _bill[layer] = {}; }\n      function _add(layer, key, qty) {\n        if (!(qty > 0)) return;\n        if (!__CORE.CATALOG[key]) {\n          /* A LINE NOBODY READS IS THE SAME AS NO LINE.\n\n             This has always logged and always carried on, and that is how three\n             products were drawn for a week and bought by nobody. The prefix makes\n             it findable and the wording says what it costs, so the next one is\n             caught in the snapshot rather than in the budget. */\n          _log('BILL  NOT BILLED -- no catalogue entry for ' + key +\n               ' (drawn and priced against nothing)');\n          if (__CORE._notBilled.indexOf(key) < 0) __CORE._notBilled.push(key);\n          return;\n        }\n        if (!_bill[layer]) _bill[layer] = {};\n        _bill[layer][key] = (_bill[layer][key] || 0) + qty;\n      }\n\n\n      /* Codes this file proposes but the catalogue has never heard of. */\n      function _proposed() {\n        var out = [], layer, k;\n        for (layer in _bill) {\n          if (!_bill.hasOwnProperty(layer)) continue;\n          for (k in _bill[layer]) {\n            if (!_bill[layer].hasOwnProperty(k)) continue;\n            var c = __CORE.CATALOG[k];\n            if (c && c.pending && out.indexOf(c.code) < 0) out.push(c.code + ' (' + c.label + ')');\n          }\n        }\n        return out;\n      }\n\n      /* Everything counted but not yet buyable, for the snapshot. */\n      function _pending() {\n        var out = [], layer, k;\n        for (layer in _bill) {\n          if (!_bill.hasOwnProperty(layer)) continue;\n          for (k in _bill[layer]) {\n            if (!_bill[layer].hasOwnProperty(k)) continue;\n            var c = __CORE.CATALOG[k];\n            if (!c || c.code) continue;\n            out.push(c.label + ' ' + (Math.round(_bill[layer][k] * 10) / 10) + ' ' + c.unit);\n          }\n        }\n        return out;\n      }\n\n      /* --------------------------------------------------------------------------\n         LAYER 0 -- THE FOUNDATION. Five of them, because no one of them covers the\n         market and they are not variations on a theme:\n\n           screws   helical piles wound into the ground. No concrete, no curing, no\n                    spoil, and they work on a slope -- which is most back gardens.\n           pads     small precast blocks set on gravel. Cheapest and quickest, and\n                    the one most likely NOT to be accepted for a dwelling.\n           piers    a poured footing with a pier on it, below frost. The default:\n                    permitted everywhere, and it is what a raised timber floor\n                    expects to sit on.\n           strips   a continuous footing under every wall. European habit, and the\n                    right answer under masonry.\n           slab     a raft the building stands on directly.\n\n         AND THE SLAB TAKES THE FLOOR WITH IT. The other four hold the timber floor\n         up in the air; the slab IS the floor, so the joists, the beam and the deck\n         all go. That is why the choice sits in the core rather than in here -- the\n         floor layer has to hear about it too.\n\n         FROST DEPTH COMES FROM THE ADDRESS. The climate zone picked on the map is\n         how deep the ground freezes, and a footing above that line lifts in winter.\n         Nothing else in the model changes with geography; this does.\n         -------------------------------------------------------------------------- */\n      /* THE BRACKET THE TIMBER LANDS IN.\n\n         A pier is not the thing the building stands on -- a galvanised saddle on\n         top of it is, and the rim drops between its two cheeks. That is what holds\n         the frame down against wind, keeps the end grain off the concrete, and\n         gives somewhere to shim.\n\n         Its base plate is therefore the level that matters: the pier stops one\n         plate below the underside of the timber, not somewhere up inside the floor\n         as it was. */\n      var SADDLE = { plate: 0.006, cheek: 0.15, t: 0.005 };\n\n      /* WHAT IS PACKED ROUND A FOOTING, and it is not decoration -- it is most of\n         what stops the thing moving.\n\n           geotextile  between the dug ground and the stone, so the two never mix.\n                       Without it the stone works its way into the soil over a few\n                       winters and the bed it was doing the work as stops existing.\n           hardcore    the load spreads through it and water leaves through it\n           drain       a perforated pipe in the stone at the bottom of the dig,\n                       because a hole full of water in a frost zone is a jack\n\n         They are drawn because the BASE step is where somebody decides how deep to\n         go, and depth without the layers is a number with nothing behind it. */\n      /* GRAVEL LOOKS LIKE GRAVEL: a canvas of stones in three greys on a darker\n         bed, repeated over every gravel box. Made once. */\n      var _stoneTex = null;\n      function _stoneMat(T) {\n        if (!_stoneTex) {\n          try {\n            var n = 256, cv = global.document.createElement('canvas');\n            cv.width = n; cv.height = n;\n            var c = cv.getContext('2d');\n            c.fillStyle = '#6F6A62'; c.fillRect(0, 0, n, n);\n            var cols = ['#9C958A', '#8A8378', '#B0A99C', '#7D776E'], k;\n            var seed = 12345;\n            function rnd() { seed = (seed * 1103515245 + 12345) & 0x7fffffff; return seed / 0x7fffffff; }\n            for (k = 0; k < 900; k++) {\n              var rx = rnd() * n, ry = rnd() * n, rr = 3 + rnd() * 7;\n              c.fillStyle = cols[k % cols.length];\n              c.beginPath();\n              c.ellipse(rx, ry, rr, rr * (0.6 + rnd() * 0.5), rnd() * Math.PI, 0, Math.PI * 2);\n              c.fill();\n            }\n            _stoneTex = new T.CanvasTexture(cv);\n            _stoneTex.wrapS = _stoneTex.wrapT = T.RepeatWrapping;\n            _stoneTex.repeat.set(3, 3);\n          } catch (eS) { _stoneTex = null; }\n        }\n        return _stoneTex\n          ? new T.MeshStandardMaterial({ map: _stoneTex, roughness: 1.0, metalness: 0.0 })\n          : new T.MeshStandardMaterial({ color: FND_LAYERS.stone.colour, roughness: 1.0 });\n      }\n\n      var FND_LAYERS = {\n        geo:   { t: 0.002, colour: 0x6E7B6B },\n        stone: { colour: 0x8C8377 },\n        drain: { d: 0.100, colour: 0x2E2E2E }\n      };\n\n      /* The flight of a ground screw, as a ribbon wound down the shaft. Lifted from\n         the tiny lib, where the shape was already settled: a strip swept between an\n         inner and an outer radius while the angle turns and the height falls. It\n         matters because a screw pile is the one foundation whose whole argument is\n         the shape -- it is what makes it hold without concrete. */\n      function _helix(T, rTop, rBot, flight, yTop, yBot, turns, mat) {\n        var steps = Math.max(24, Math.round(turns * 26));\n        var pos = [], i;\n        function pt(k, out) {\n          var t = k / steps;\n          var ang = t * turns * Math.PI * 2;\n          var rIn = rTop + (rBot - rTop) * t;\n          var r = out ? rIn + flight : rIn - 0.002;\n          var y = yTop + (yBot - yTop) * t + (out ? -0.008 : 0);\n          return [Math.cos(ang) * r, y, Math.sin(ang) * r];\n        }\n        for (i = 0; i < steps; i++) {\n          var a = pt(i, false), b = pt(i, true), c = pt(i + 1, false), d = pt(i + 1, true);\n          pos.push(a[0], a[1], a[2], b[0], b[1], b[2], d[0], d[1], d[2]);\n          pos.push(a[0], a[1], a[2], d[0], d[1], d[2], c[0], c[1], c[2]);\n        }\n        var geo = new T.BufferGeometry();\n        geo.setAttribute('position', new T.Float32BufferAttribute(pos, 3));\n        geo.computeVertexNormals();\n        return new T.Mesh(geo, mat);\n      }\n\n      var FOOT = {\n        spacing: 1.83,     /* 6 ft between point supports under a rim joist */\n        padW:    0.40,     /* precast block */\n        padH:    0.20,\n        footW:   0.40,     /* a poured pier is one 400 x 400 column, top to bottom */\n        footH:   0.25,     /* (kept for the tally of older projects; not drawn) */\n        pierW:   0.40,\n        screwR:   0.051,   /* the shaft, as tiny draws it */\n        screwLen: 1.50,    /* a pile holds down its length, not at a frost depth */\n        stripW:  0.40,\n        slabH:   0.20,\n        edgeH:   0.50,     /* thickened edge of a raft */\n        gravel:  0.15\n      };\n      var CONCRETE = 0x9E9B93;\n      var STEEL_G  = 0x7C838A;\n\n      /* MAGENTA IS WHATEVER THIS VERSION CHANGED, AND THERE IS ONE SWITCH FOR IT.\n\n         Four layers had each grown their own boolean, their own ternary and their\n         own clause of log -- BASE_IS_NEW, HDR_NEW, DOOR_NEW, CEIL_NEW -- and three\n         were still true long after the thing had been accepted, so half the model\n         was magenta for nothing.\n\n         Name the layer under review here and nowhere else. Empty means every layer\n         is in its own colour. */\n      /* A SUB-ID WORKS HERE TOO. 'adu-ceiling' would turn the joists and the ledger\n         magenta as well, and those were accepted three versions ago -- what is new\n         is the fill. The switch compares a string, so naming the part is enough. */\n      /* NOTHING IS UNDER REVIEW. The roof build-up is accepted end to end, so every\n         layer draws in its own colour. One switch, 25 call sites, and they all go\n         quiet together. */\n\n      /* WHICH SUBJECT THE SNAPSHOT IS ABOUT: FOCUS, space-separated prefixes,\n         empty means everything. It is DECLARED in the switch block at the end of\n         the file, with the other review switches, so that it can be changed\n         without sending the file. Read when a snapshot is taken, never at load. */\n\n      /* ONE LAYER AT A TIME, AND THIS IS THE ONE: the partitions. Everything else\n         draws in its own colour, so what is magenta is what is being looked at. */\n      /* the mono-pitch build-up, first layer: the OSB deck */\n      /* the parapet's tapered insulation -- the layer that makes its fall */\n      /* the parapet's insulation, one solid for now */\n      /* the waterproofing, and its turn-up */\n      /* the hip roof, being built */\n      /* The deck is the layer under review, so it wears the colour. */\n      /* MAGENTA_LAYER names the roof layer under review; it is DECLARED in the\n         switch block at the end of the file. Read at build time only. */\n\n      /* a comma list, like WALL_MAGENTA, so two roof or base layers can be\n         under review at once */\n      function isNew(id) {\n        if (!MAGENTA_LAYER) return false;\n        return (',' + MAGENTA_LAYER + ',').indexOf(',' + id + ',') >= 0;\n      }\n\n      var _footTally = null;\n\n      /* Below the frost line, or a token depth where the ground does not freeze. */\n      /* HOW DEEP: 500 mm at the least, and 150 below the frost line where the\n         address says the ground freezes deeper than that. 450 was the floor and\n         it read as shallow (Marek); a cast footing, a strip and a raft's edge all\n         go to this same number. */\n      function _footDepth() {\n        var z = API.STATE.climateZone || 0;\n        return Math.max(0.60, z + 0.15);   /* 600 of concrete at the least (Marek) */\n      }\n\n      /* GRADE IS ZERO, AND BELOW IT IS NORMALLY NOT THERE.\n\n         A building shown standing on its own footings looks like a building on\n         stilts: the eye reads the concrete as part of the object rather than as\n         something buried. So everything under the ground is drawn only while the\n         BASE step is open -- which is the one moment somebody is deciding about it\n         and needs to see how deep it goes and what is packed round it.\n\n         The cut is a real cut, not a hidden flag: a box straddling grade is drawn\n         as the part above it, so the pier still meets the ground where it should. */\n\n      /* The same grade cut for a round member. Cylinders are built from the\n         centre, so a straddling one is redrawn shorter with its centre moved. */\n      function _cyl(T, g, mat, rTop, rBot, h, x, y, z, seg) {\n        var lo = y - h / 2, hi = y + h / 2;\n        if (!_footFull()) {\n          if (hi <= 0.001) return;\n          if (lo < 0) {\n            /* interpolate the radius at the cut so a taper stays a taper */\n            var f = (0 - lo) / h;\n            rBot = rBot + (rTop - rBot) * 0;\n            var rAtCut = rBot + (rTop - rBot) * f;\n            rBot = rAtCut;\n            h = hi; y = hi / 2;\n          }\n        }\n        var m = new T.Mesh(new T.CylinderGeometry(rTop, rBot, h, seg || 14), mat);\n        m.position.set(x, y, z);\n        g.add(m);\n      }\n\n      /* A GROUND SCREW, DRAWN THE WAY THE TINY LIB DRAWS IT.\n\n         Mine was a square post with a peg on the end -- which is not what this is,\n         and the shape is the whole argument for the foundation. The real one is a\n         round shaft, a long cone below it, a point, and a flight wound down the\n         cone; a collar at the ground and a saddle on top. Proportions and turns\n         lifted from tiny, where they were already settled.\n\n         ROUND, AND LONG. A pile is 1.5 m of shaft, not the 450 mm of frost cover a\n         footing needs -- it holds by friction down its length, so its depth has\n         nothing to do with the frost line.\n\n         IT LIVES HERE SO THERE IS ONE OF IT. Anything that stands on a screw calls\n         this; the eave posts had their own and the two did not match. */\n      function _screwPile(T, g, steel, px, pz, headY, size) {\n        /* size: { r, len } for a screw other than the house's -- the terrace's\n           small 1200 x 76 is drawn by the same hand, flight and collar and all */\n        var rad = (size && size.r) || FOOT.screwR;\n        var totalLen = (size && size.len) || FOOT.screwLen;\n        var aboveLen = headY;\n        var belowLen = totalLen - aboveLen;\n        var cylLen = aboveLen + belowLen * 0.42;\n        var taperLen = belowLen * 0.58 - 0.06;\n        var tipRad = rad * 0.22;\n\n        _cyl(T, g, steel, rad, rad, cylLen, px, headY - cylLen / 2, pz);\n\n        var taperTopY = headY - cylLen;\n        _cyl(T, g, steel, rad, tipRad, taperLen, px, taperTopY - taperLen / 2, pz);\n        _cyl(T, g, steel, tipRad, 0.002, 0.06, px, taperTopY - taperLen - 0.03, pz, 10);\n\n        if (_footFull()) {\n          var hx = _helix(T, rad, tipRad + 0.004, rad * 1.15,\n                          taperTopY + belowLen * 0.06, taperTopY - taperLen + 0.02, 3, steel);\n          hx.position.set(px, 0, pz);\n          g.add(hx);\n        }\n        /* the collar at the ground, which is what it is driven by */\n        _cyl(T, g, steel, rad + 0.014, rad + 0.03, 0.10, px, 0.05, pz, 12);\n      }\n\n\n      function _buildFoundation(ctx) {\n        if (typeof API.foundation !== 'function') { ctx.log('base     THREW the shared foundation module is missing -- configurator-ui.js core-v764 or later'); return; }\n        return API.foundation(ctx, {\n          api: API, FOOT: FOOT, JOIST: JOIST, SADDLE: SADDLE, FND_LAYERS: FND_LAYERS, STUD: STUD,\n          CONCRETE: CONCRETE, STEEL_G: STEEL_G, MAGENTA: MAGENTA,\n          isNew: function () { return isNew('adu-base'); },\n          footDepth: _footDepth, stoneMat: _stoneMat, screwPile: _screwPile,\n          /* adu-v1455: THE GROUND AS DUG (RANCH's, ranch-v81 / v80 / v2, Marek 2026-11-04: prenest\n             vsem) -- the trenches and holes drawn, the excavation billed as drawn, the\n             stone / sheet / saddle under their own codes, a pier as tall as a raised\n             floor needs */\n          dig: { mat: function (T) { return new T.MeshStandardMaterial({ color: isNew('adu-base') ? MAGENTA : 0x7A6248, roughness: 1.0, transparent: true, opacity: 0.30, depthWrite: false }); } },\n          billReset: function () { _billReset('adu-base'); },\n          setTally: function (t) { _footTally = t; },\n          add: function (code, q) { _add('adu-base', code, q); }\n        });\n      }\n\n      /* Codes lifted from the roof configurator, where they are already shipping.\n         Nothing here is invented; what has no confirmed code emits no row. */\n      function _footBoq() { return _rows('adu-base'); }\n\n      /* --------------------------------------------------------------------------\n         LAYER 1 -- THE STUD WALL. The first real construction in this line, and the\n         one the most products inherit: studio, garage, farmhouse and cape cod all\n         frame their walls exactly this way. Barndominium, CLT and brick are the\n         three that replace it, and they replace THIS and nothing else.\n\n         WHAT IT BUILDS, per named wall segment, bottom up:\n           sole plate     one 2x6 laid flat on the deck\n           studs          2x6 on edge at the grid, plus one at each end\n           top plate      two 2x6 laid flat, doubled as every plated wall is\n\n         WHERE IT SITS. The plan polygon is the OUTER FACE of the building, so the\n         frame hangs inward from that line rather than straddling it. Straddling\n         would put half the wall outside the footprint the customer dragged, and\n         every area on the drawing would be wrong by half a wall all round.\n\n         WHAT IT DOES NOT DO YET, on purpose: no openings. STATE.openings is empty\n         until the DOORS & WINDOWS step is wired, and framing a hole that nothing\n         can create would be scaffolding pretending to be construction. Cripples,\n         headers and trimmers arrive with that step.\n\n         NO CATALOGUE CODES. The bill stays empty until the codes come out of the\n         central BoQ CSV -- inventing one would put a line in a customer's budget\n         that no supplier can price. The QUANTITIES are computed and printed in the\n         snapshot, so the codes can be matched to real numbers when they arrive.\n         -------------------------------------------------------------------------- */\n      /* --------------------------------------------------------------------------\n         EVERY SECTION IS A CATALOGUE SECTION.\n\n         The frame was drawn in North American sizes -- 38x140, 38x235 -- and the\n         catalogue stocks European KVH. So the biggest item on the building, the\n         timber, counted its metres and could not be bought, and I kept reporting\n         that as something to decide rather than something to fix.\n\n         It was the wrong way round. The catalogue is the real constraint: it is\n         what a supplier can deliver. So the frame is built from what is IN it, and\n         each section carries its own code, which means the drawing and the bill\n         cannot drift apart -- change a section here and both move together.\n\n           KVH60160  60x160  studs, plates, truss chords\n           KVH60240  60x240  joists, rim, blocking, ledger, deep rafters\n           KVH60120  60x120  truss webs\n           KVH60200  60x200  rafters where 240 is more than the span needs\n           KVH10200 100x200  the deepest rafter the catalogue holds\n\n         Two consequences worth saying out loud rather than discovering later: the\n         wall is now 160 mm rather than 140, and a rafter roof spans less, because\n         there are no engineered joists in the catalogue at all.\n         -------------------------------------------------------------------------- */\n      /* OSB IS NAILED THE SAME WAY WHEREVER IT IS.\n\n         22 to the square metre is 150 mm at the sheet edges and 300 mm through the\n         field on 610 centres, and that is as true of a wall panel as it is of the\n         roof deck -- the sheet does not know which way up it is. The roof had this\n         number written into its own layer; a second copy in the wall is a second\n         number to keep in step, so there is one and both read it.\n\n         The framing rate is separate because it counts junctions, not area: two\n         nails through the plate into each end of every stud. */\n      /* THE SIZES CAME OFF THE CENTRAL SHEET AND THEY CHANGED THE ANSWER.\n\n         Sheathing was on FAS00318, an 18 mm roofing nail, through 18 mm of OSB --\n         nothing left over to hold anything. It is a 70. Framing is end-nailed\n         through a 60 mm plate into the stud, so a 70 leaves 10 mm of grip and it\n         is the 145. Same quantities, real items. */\n      var SHEATH_NAIL = { code: 'FAS70000', perM2: 22 };\n      var FRAME_NAIL  = { code: 'FAS45145', perStudEnd: 2, ends: 2 };\n      var DECK_SCREW  = { code: 'FAS50060', perM2: 22 };\n      /* AND THE TIE IS THE SHEET'S HURRICANE TIE, NOT A HOLD DOWN STRAP.\n\n         ROT00007, 250 x 40 x 2, 18 gauge, pre-punched -- the row is even filed\n         under ROOF TRUSSES, which is what it is for. FAT00012 is a hold down\n         strap: a longer, flatter thing for tying a post down through a floor. Both\n         exist and both hold something down; only one of them is what goes over a\n         truss heel. */\n      var TRUSS_TIE   = { code: 'ROT00007', nail: 'FAS38038', nailsPerTie: 10 };\n      var JOIN_FIX    = { anchor: 'FAS75132', spacing: 0.700, foam: 'ODP00001',\n                          foamPerM: 10, tapeOut: 'FEC00027', tapeIn: 'FEC00033',\n                          tapePerRoll: 50 };\n\n      /* the foam strip under the sole plate: 150 x 5, by the metre (his row) */\n      var SILL_SEAL = { code: 'INS01003', w: 0.150, t: 0.005 };\n\n      var STUD = {\n        t: 0.060,      /* the thin way, what the spacing is measured on */\n        d: 0.160,      /* KVH60160 -- a 160 mm wall, which takes the insulation an\n                          ADU has to show to be permitted */\n        code: 'KVH60160'\n      };\n\n      /* A WALL IS NOT ONE FRAME, IT IS PANELS. Twelve feet is what two people can\n         stand up, what fits on a trailer, and what the sheet lengths suit. Panels\n         are always whole bays so every joint lands on a stud and no sheet needs a\n         rip. */\n      var PANEL_MAX = 3.6576;   /* 12 ft */\n\n      /* HOW FAR THE PARAPET STANDS ABOVE THE FINISHED DECK. That is the dimension\n         that matters, because it is what the covering turns up against. */\n      var PARAPET_UPSTAND = 0.55;\n\n      /* The ledger the roof hangs off when the studs run past it. Thickness of a\n         board, depth of the joist it carries. */\n      var LEDGER = { t: 0.060, code: 'KVH60240' };\n\n      /* THE CHAMFER ON THE UPPER PLATE. Two plates the same width read as one thick\n         one, and there is no way to count them on screen. Taking a few millimetres\n         off the top one draws a shadow line along the joint, so a doubled plate is\n         doubled to look at. It is drawn, not built -- an eased arris is what the\n         timber arrives with anyway. */\n      var CHAMFER = 0.008;\n\n\n      /* WHAT MAKES A HOLE IN A STUD WALL.\n\n         A header over it, a king stud full height either side, a jack inside each\n         king carrying the header's end, and a sill under a window. The clear\n         opening is what the customer asked for; all of this sits OUTSIDE it, so the\n         rough opening is bigger than the hole by a jack each side and a header\n         above -- which is the difference every joiner asks about and the model has\n         to get right or the window will not fit.\n\n         THE HEADER IS DOUBLED AND LAID FLAT, and it was neither.\n\n         It was two 60x240 members standing on edge, one against each face, with a\n         40 mm gap down the middle -- 60 + 40 + 60 across a 160 wall. Nothing is\n         built that way: the two plies of a header are face to face so they act as\n         one member, and a gap in the middle is a cold bridge with nothing in it.\n\n         Flat means the wide dimension goes ACROSS the wall, so a ply is the wall's\n         own depth and the pair fills it with no gap and nothing proud of either\n         face. Two plies of 60 make a header 120 deep, which is why the timber is\n         the wall stud rather than a 240. */\n      var HEADER = { ply: 0.060, plies: 2, d: 0.120, code: 'KVH60160' };\n      var SILL   = { d: 0.060 };\n\n      /* THE FRAME ROUND AN OPENING IS DOUBLE ON BOTH AXES, and it always was --\n         I was only drawing half of it.\n\n         Vertically that was already true and easy to miss: the jack and the king\n         stand side by side, which IS the doubled post. Horizontally it was not. A\n         header spanning an opening carries the roof over a gap in the wall, and one\n         member of it does not; it is two, side by side across the depth of the\n         wall, with a spacer between them so the pair finishes flush with the studs.\n         I was billing two and drawing one, which is the worst way round to be\n         wrong -- the price was right and the drawing said something else.\n\n         The sill under a window is doubled for the same reason: it carries the\n         cripples above it down into the wall. */\n\n      /* Which opening, if any, this position falls into. Positions are along the\n         wall from its start, the same as everything else in this layer. */\n      function _openingAt(ctx, seg, at) {\n        var ops = seg.openings || [], i;\n        for (i = 0; i < ops.length; i++) {\n          var o = ops[i];\n          /* the rough opening, not the clear one -- a stud landing on the jack is\n             still in the way */\n          var half = o.w / 2 + STUD.t;\n          if (at > o.at - half && at < o.at + half) return o;\n        }\n        return null;\n      }\n\n      /* THE FRAME OF A WALL IS PLANNED BY THE CORE (WALL_LAYOUT, core-v252).\n\n         The doubled posts round an opening, its header and sill, what is left of\n         the studs it crosses and the frames the wall travels as used to be worked\n         out here. They moved to configurator-ui.js so the shed and the sauna\n         frame a wall from the same copy of the arithmetic (Marek: sdilene prvky\n         do spolecneho ui). This file hands the core its own section -- STUD.t,\n         HEADER.ply, HEADER.plies -- and draws and bills what comes back.\n\n         A core older than core-v252 has none of it: the planners then return\n         nothing (no opening frames, no joints, whole studs) and say so on an\n         ERROR line the snapshot always prints, rather than the wall layer\n         throwing and the whole wall vanishing. */\n      var _WLF = (API.wallLayout && API.wallLayout.frame) || null;\n      var DBL_STITCH = _WLF ? _WLF.stitch : 0.400;\n      var DBL_SEAM   = _WLF ? _WLF.seam   : 0.006;\n      var FRAME_LEN  = _WLF ? _WLF.len    : 3.500;\n      var FRAME_TOL  = _WLF ? _WLF.tol    : 0.175;\n      var _wlMissSaid = false;\n      function _wlHas(fn) {\n        var ok = !!(API.wallLayout && typeof API.wallLayout[fn] === 'function');\n        if (!ok && !_wlMissSaid) {\n          _wlMissSaid = true;\n          try { API.noteError && API.noteError('ERROR frame planners missing -- configurator-ui.js is older than core-v252'); } catch (eNE) {}\n        }\n        return ok;\n      }\n      function _framePlan(s, studs, topAt, base) {\n        if (!_wlHas('framePlan')) return [];\n        return API.wallLayout.framePlan(s, studs, topAt, base, { t: STUD.t, ply: HEADER.ply, plies: HEADER.plies });\n      }\n      function _studPieces(x, base, top, frames) {\n        if (!_wlHas('studPieces')) return { pcs: [[base, top]], role: 'full' };\n        return API.wallLayout.studPieces(x, base, top, frames, STUD.t);\n      }\n      function _frameJoints(len, from, to, studs, frames) {\n        if (!_wlHas('frameJoints')) return [];\n        return API.wallLayout.frameJoints(len, from, to, studs, frames, STUD.t);\n      }\n\n      var WOOD = 0xC8A870;\n      var MAGENTA = 0xFF00FF;\n\n      /* Eight, and adjacent panels never share one because they are handed out in\n         order round the building. */\n      var PANEL_COLOURS = [\n        0xE05C4A, 0x4A90E0, 0x5CB85C, 0xE0B24A,\n        0x9B59B6, 0x1ABC9C, 0xE07CA8, 0x596273\n      ];\n\n      var _wallTally = null;\n\n      /* WHERE THE STUDS ACTUALLY ENDED UP, on the walls a flat roof bears on.\n\n         The rafters have to sit face to face with a stud, and guessing the layout\n         from the module was not enough: near the ends of a wall there are extra\n         studs -- the corner post and the panel's own end stud, 51 mm apart -- so a\n         single offset that suited the middle overlapped at both ends. The wall\n         writes down what it built and the roof reads it.\n\n         The wall layer is registered first, so this is always the current build. */\n      var _bearStuds = [];\n      /* WHAT THE STUD PASS SAW EACH OPENING AT, so the joinery can say whether the\n         number it draws from is the same one -- one pair per opening, by object */\n      var _atSeen = [];\n      var _roofMembers = 0;   /* so the ceiling can say whether it agrees with the roof */\n\n      /* EVERY STUD, WITH THE WALL IT IS IN.\n\n         _bearStuds is only the studs on the walls a flat roof BEARS ON, and it says\n         nothing about which wall each one came from -- so anything else that wants\n         a stud line has to guess from the coordinates. The ceiling guessed, guessed\n         wrong, fell through to stepping the module instead, and a module pitch that\n         is not the built pitch drifts: the first joist lands right and every one\n         after it is further out until it is inside a stud. That is exactly what he\n         described, and it is a guess, not a rounding error.\n\n         This is every stud with its segment id on it. No guessing. */\n      var _wallStuds = [];\n      /* every body of the wall frame, as it was set down -- the wool is laid\n         round these (the frame's marks are only put on later, so they cannot be\n         searched for by role when the wool is built) */\n      var _frameBodies = [];\n\n      /* --------------------------------------------------------------------------\n         THE CORNER. Two walls meet and they cannot both occupy it.\n\n         One wall RUNS THROUGH to the outer face; the other stops one frame depth\n         short and butts into its end post. That is how it is built, and it is also\n         the only way the timber comes out right: framed as four full-length walls,\n         every corner would have two studs in the same 140 mm of air and the takeoff\n         would count them twice.\n\n         WHICH ONE RUNS THROUGH: the walls that carry the roof. On a gable those are\n         the eave walls -- they take the rafters, so they want to be continuous --\n         and the gable ends butt into them. The test is the segment's own outward\n         normal against the slope direction, so it holds however the plan is turned\n         and whichever way the ridge runs.\n         -------------------------------------------------------------------------- */\n      function _runsThrough(seg) {\n        var R = API.STATE.roof;\n        /* WHICH WALLS RUN THROUGH THE CORNER: the ones carrying the roof. On a\n           gable those are the eave walls; on the other two there is no slope to\n           ask, so the long walls do it, as they would on site. */\n        /* A HIP ASKS THE SLOPE, LIKE A GABLE. Both have a ridge and eave walls, so\n           the question of which walls carry the roof has the same answer. Named\n           'gable' this sent a hip down the mono path, where the LONG walls decide\n           -- a different pair, and the frame comes out crosswise. */\n        if (!_isTrussed()) {\n          var f = API.STATE.footprint;\n          var alongZ = Math.abs(seg.nx) > 0.5;   /* normal in x -> the wall runs in z */\n          return alongZ ? (f.l >= f.w) : (f.w > f.l);\n        }\n        /* the slope falls across the axis the ridge does NOT run along */\n        return (R.axis === 'l') ? (Math.abs(seg.nx) > 0.5) : (Math.abs(seg.nz) > 0.5);\n      }\n\n      /* THE CORE LAYS THE STUDS; THIS TELLS IT WHICH WALLS BUTT.\n\n         A wall that butts into a through wall frames between the two through\n         walls' inner faces, a frame depth in from each outer corner, and its end\n         studs belong to that frame (Marek: rohove svislice maji byt soucasti\n         panelu). Answered per call, so a roof turned the other way changes which\n         walls these are without anything cached. */\n      if (API.wallLayout) {\n        API.wallLayout.endInset = function (seg) {\n          return _runsThrough(seg) ? null : [STUD.d, STUD.d];\n        };\n      }\n      /* every stud of this wall, from the one layout the core owns */\n      function _studsOf(s) {\n        if (API.wallLayout && typeof API.wallLayout.studsFor === 'function') return API.wallLayout.studsFor(s);\n        return _studPositions(s.len, 0);\n      }\n\n      /* _studPositions: the studs of a panel, every bay the same -- the core's houseStudPositions (core-v808, status/modules.md 12) */\n      function _studPositions(len, datum) {\n        return API.houseStudPositions(len, datum, { api: API, STUD: STUD });\n      }\n\n\n      /* WHAT THE BUILDING COSTS BESIDE ITS MATERIALS.\n\n         One lump sum each, because not one of them scales with a dimension in this\n         model -- a jurisdiction charges for a permit whether the unit is 30 square\n         metres or 60. A takeoff that stops at timber and screws is the reason a\n         self-builder's number and the real number are so far apart, and it is the\n         part nobody can look up afterwards.\n\n         The list is the subset that applies to a habitable unit in somebody's back\n         yard, and what is NOT here was left out on purpose: on-site water and\n         wastewater, because an ADU ties into the house's; site facilities and\n         security, because the house next door has both; bonds, contractor markup\n         and project administration, because this bill belongs to the owner; and\n         financing, which is an arrangement rather than a line in a takeoff. */\n      var OVERHEAD = [\n        'OVH01001', 'OVH01002',\n        'OVH02001', 'OVH02002', 'OVH02003',\n        'OVH03001', 'OVH03003',\n        'OVH04001', 'OVH04003',\n        'OVH05001', 'OVH05002', 'OVH05003',\n        'OVH06001',\n        'OVH07001', 'OVH07002',\n        'OVH08004', 'OVH08005',\n        'OVH10001', 'OVH10002'\n      ];\n\n      function _buildOverhead(ctx) {\n        var q;\n        /* THE BUCKET IS EMPTIED FIRST, LIKE EVERY OTHER LAYER DOES.\n\n           _add ACCUMULATES -- it is (existing || 0) + qty -- so a layer that does\n           not clear its own bucket adds a whole second copy of itself on every\n           rebuild. Eight layers call _billReset on the way in; the two I wrote did\n           not, and that is the total climbing with every edit. */\n        _billReset('adu-overhead');\n        for (q = 0; q < OVERHEAD.length; q++) _add('adu-overhead', OVERHEAD[q], 1);\n        ctx.log('FIX  overhead ' + OVERHEAD.length + ' lump sum(s): ' +\n                OVERHEAD.join(' ') + ' -- survey, permits and fees, utility ' +\n                'connection, site setup, plant and delivery, insurance, ' +\n                'inspections, sales tax, contingency, waste and handover');\n        _why(ctx, 'overhead a permit costs what the jurisdiction charges whatever the ' +\n                'unit measures, so these are lump sums and not rates');\n      }\n\n      /* THE MONO'S PLANE, WITHOUT THE CLAMP. API.bearingY clamps t to the plane's\n         own edge; the raked caps run about 150 mm past it, so a plate set out\n         from bearingY landed some 40 mm off. This is the same arithmetic without\n         the clamp (shed-v9, Marek). */\n      function _planeYAt(x, z) {\n        var R = API.STATE.roof || {};\n        if (R.type !== 'mono') return API.wallTop();\n        var pl = API.roofPlanes ? API.roofPlanes()[0] : null;\n        if (!pl || !pl.ridge || !pl.eave) return API.wallTop();\n        var lo = pl.eave[0], hi = pl.ridge[0];\n        var dx = hi[0] - lo[0], dz = hi[2] - lo[2];\n        var len2 = dx * dx + dz * dz;\n        if (len2 < 1e-9) return API.wallTop();\n        var t = ((x - lo[0]) * dx + (z - lo[2]) * dz) / len2;\n        return lo[1] + (hi[1] - lo[1]) * t;\n      }\n      /* WHICH FRAME A PIECE BELONGS TO AND WHAT IT IS IN IT -- marked by the\n         core (WALL_LAYOUT.frameMarker, core-v253), which the shed and the sauna\n         use the same way. This file tells it the wall's frames and the role of\n         the piece it is about to place, and paints the panels view with its own\n         palette from the frame number that comes back. The frame section is\n         this product's stud; the ledger and the seal are not that section. */\n      var _FM = (API.wallLayout && typeof API.wallLayout.frameMarker === 'function')\n        ? API.wallLayout.frameMarker({ sect: Math.round(STUD.t * 1000) + 'x' + Math.round(STUD.d * 1000),\n                                       noSect: ['ledger', 'seal'] })\n        : null;\n      if (!_FM) {\n        /* a core older than core-v253: nothing is marked, and the snapshot says so */\n        _FM = { missing: true, beginBuild: function () {}, beginWall: function () {}, setSpans: function () {},\n                on: function () {}, off: function () {}, role: function () {}, markAt: function () {},\n                mark: function () { return -1; }, check: function () { return { frames: 0, bad: [] }; },\n                stats: function () { return { bodies: 0, seen: 0, off: 0, noHit: 0, missAt: [], offWhat: [], stat: {}, roles: {} }; } };\n      }\n      function _buildStudWall(ctx) {\n        /* THE STUD WALL FROM THE SHARED MODULE (core-v773, status/modules.md 5):\n           the frame of every wall is written once in configurator-ui.js; this\n           product hands in its own pieces. */\n        if (typeof API.studWall !== 'function') { ctx.log('wall     THREW the shared stud wall module is missing -- configurator-ui.js core-v773 or later'); return; }\n        API.studWall(ctx, {\n          api: API, layer: 'adu-stud-wall', wood: STRUCT_WOOD,\n          STUD: STUD, PLATE: PLATE, HEADER: HEADER, SILL_SEAL: SILL_SEAL, LEDGER: LEDGER, RAFTER: RAFTER,\n          EAVE_POST: EAVE_POST, SHEATH_NAIL: SHEATH_NAIL, FRAME_NAIL: FRAME_NAIL, CHAMFER: CHAMFER,\n          DBL_SEAM: DBL_SEAM, DBL_STITCH: DBL_STITCH, FRAME_LEN: FRAME_LEN, FRAME_TOL: FRAME_TOL,\n          PANEL_COLOURS: PANEL_COLOURS, PANEL_MAX: PANEL_MAX, PARAPET_UPSTAND: PARAPET_UPSTAND, MAGENTA: MAGENTA,\n          FM: _FM, billReset: _billReset, frameJoints: _frameJoints, framePlan: _framePlan, openingAt: _openingAt,\n          planeYAt: _planeYAt, plateEndReach: _plateEndReach, plateTrussReach: _plateTrussReach,\n          runsThrough: _runsThrough, studPieces: _studPieces, studsOf: _studsOf, wlHas: _wlHas,\n          isNew: isNew, roofSection: roofSection,\n          publish: function (P) { _frameBodies = P.frameBodies; _bearStuds = P.bearStuds; _wallStuds = P.wallStuds; _atSeen = P.atSeen; },\n          setTally: function (t) { _wallTally = t; },\n          add: function (code, q) { _add('adu-stud-wall', code, q); }\n        });\n      }\n\n      /* --------------------------------------------------------------------------\n         LAYER 2 -- THE FLOOR. A raised timber deck, which is what a garden ADU\n         stands on: the ground is rarely level, a slab needs a concrete pour and an\n         inspection, and a deck on piers can be built by the people who buy these\n         plans. Studio, garage and cabin take this unchanged.\n\n         WHAT IT BUILDS, in the zone between grade and the deck the walls stand on:\n           rim joists     one round the whole outline\n           centre beam    down the long axis\n           joists         across the SHORT direction at the grid, both sides\n           subfloor       the deck the wall plates sit on\n\n         WHY THE BEAM. The short side is 24 ft. Nothing in a 2x10 spans that, so a\n         floor drawn as one clear span would be a drawing of something that falls\n         down. The beam halves it to 12 ft, which a 2x10 at 24 in centres does carry,\n         and it is also how anybody would actually frame it.\n\n         No catalogue codes, same as the wall: quantities in the snapshot, rows when\n         the codes come out of the central CSV.\n         -------------------------------------------------------------------------- */\n      /*\n         =========================================================================\n         THE FLOOR BUILD-UP, BOTTOM TO TOP. */\n      var FLOOR_LAYERS = [\n        /* code, size and label all come from RAIL below. They were written out here\n           as well and the two drifted: the drawing used RAIL (20 x 40, KVL20040)\n           while the bill used this row (60 x 100, KVH10060), so the rails were\n           charged as beams and KVL20040 never appeared at all. */\n        { on: true, code: null,        label: null,                t: null,  col: 0xC8A870, where: 'rail', viz: 'layer_floor_rail' },\n        { on: true, code: 'OSB25001',  label: 'Cover board OSB',   t: 0.015, col: 0xC9A97A, where: 'bay',  viz: 'layer_floor_osb' },\n        { on: true, code: 'INS00002',  label: 'Breather membrane', t: 0.001, col: 0xDCDFD8, where: 'bay',  viz: 'layer_floor_membrane' },\n        { on: true, code: '@wool',     label: 'Mineral wool',      t: 0,     col: 0xE8D9A0, where: 'bay',  viz: 'layer_floor_wool' },\n        { on: true, code: 'ROV00001',  label: 'Vapour barrier',    t: 0.001, col: 0x4A5560, where: 'over', viz: 'layer_floor_membrane' },\n        { on: true, code: 'OSB25002',  label: 'Subfloor OSB',      t: 0.018, col: 0xC9A97A, where: 'over', viz: 'layer_floor_osb' },\n        { on: true, code: '',          label: 'Floor finish',      t: 0.013, col: 0xD8CDBE, where: 'over', viz: 'layer_floor_finish', room: 'finish' },\n        { on: true, code: '',          label: 'Skirting',          t: 0.070, col: 0xE4DED2, where: 'over', viz: 'layer_floor_skirt', room: 'skirt' }\n      ];\n\n      /* HOW FAR UP THE BUILD-UP IS DRAWN. The index of the highest layer drawn;\n         negative means all of them. Every layer has to be watchable going on, and\n         a layer under four others cannot be looked at.\n\n         It hides from the DRAWING only -- the bill is untouched, because a layer\n         being looked at is still a layer being bought. That is tiny's rule and the\n         one place the drawn-equals-billed principle is deliberately suspended. */\n      /* THE RAIL IS ROW 0, NOT SOMETHING DRAWN BESIDE THE TABLE.\n\n         It was built outside the loop, so it was always there -- and the board that\n         lands ON it is drawn at step 0 and covers it completely from above. Two\n         magenta things at once and the one being looked at underneath the other.\n         A rail is a layer of the build-up: it is bought, it is fixed, and it goes\n         on before anything else. So it gets its own step, like everything else. */\n      /* -1 NOW: THE FLOOR IS DONE. Every row draws, in its own colour, and none of\n         them is magenta -- the build-up has been walked through and accepted, so\n         the mark moves on to whatever is being looked at next. */\n      var FLOOR_SHOW = -1;\n\n      /* THE RAIL THE BOARD LANDS ON. 50 x 30, down both sides of every joist near\n         the bottom, so the bay has a shelf and the board can be dropped in from\n         above. Tiny's section, and its screw is the one the frame already uses. */\n      /* AND IT SITS 10 mm UP FROM THE BOTTOM OF THE JOIST. */\n      var RAIL = { proj: 0.040, h: 0.020, drop: 0.010, code: 'KVL20040', screw: 'FAS60100' };\n\n      /* HOW FAR THE TRAY CARRIES OUT PAST THE FRAME. Enough to be caught under the\n         wall's sole plate and turned down the outside of the rim, so the floor and\n         the wall are sealed to each other by one sheet rather than butted. */\n      var MEM_LAP = 0.10;\n\n      /* and how far it runs on flat past the outer face before it breaks -- a fold\n         lands next to the arris, not on it */\n      var MEM_FLAT = 0.030;\n\n      /* AND A HAIR OFF EVERY SURFACE IT LIES ON. A 1 mm sheet whose face is exactly\n         in the face of the timber is two surfaces at the same depth, and the card\n         picks whichever it likes per pixel -- which is the flicker. Half a\n         millimetre proud and there is nothing to argue about. */\n      var MEM_EPS = 0.0005;\n\n      /* WHAT GOES ON THE DECK, AND IT IS NOT THE SAME IN EVERY ROOM.\n\n         A bathroom is tiled on a waterproofed deck; everywhere else is vinyl on an\n         underlay. They are different trades, different codes and different heights\n         -- 13 mm of tile against 10 mm of vinyl -- so the threshold at the door has\n         3 mm to take up. Measured as one number over the plan, all of that is lost.\n\n         WET IS DECIDED BY THE ROOM'S OWN NAME, not by a list of room numbers, so it\n         survives the rooms being renamed, split or dragged about. */\n      /* adu-v1403: a WC is wet like a bathroom -- tiled floor, wet board, tile band */\n      var WET_ROOMS = { 'rooms.bathroom': 1, 'rooms.laundry': 1, 'rooms.wc': 1 };\n      /* HOW HIGH THE TILING GOES IN A WET ROOM: 1200 mm, four 12-inch tiles, the\n         ordinary wainscot height. Up to there the board stays unpainted (and\n         green, so the band reads); the shower's full-height tiling belongs to the\n         fitout, where the shower wall is known. No tile row yet, so the band is\n         logged and not billed (Marek: standard height, his call left to me). */\n      var WET_TILE_H = 1.200;\n      /* THE WALL TILE ITSELF, from the sheet: SBC00001 by the m2, on a flex\n         adhesive bed (FEC00018, kg) with grouted joints (SBG00001, kg). The tile\n         is 600 x 400 x 8 with a 4 mm joint -- tiny's WTILE, the same rates: 3.5\n         kg of adhesive a square metre, and grout as arithmetic (joint run per\n         square metre times joint width times tile depth at 1800 kg/m3, about\n         0.24 kg). Drawn 12 mm proud of the board, bed and tile, over the band the\n         board leaves unpainted. */\n      var WALL_TILE = { code: 'SBC00001', glue: 'FEC00018', grout: 'SBG00001',\n                        w: 0.600, h: 0.300, t: 0.008, bed: 0.004, gap: 0.003,\n                        kgM2: 3.5, groutKgM2: 0.3,\n                        col: 0xF4EFE1, groutCol: '#C9C4B8', tileCol: '#F4EFE1' };\n      var _wallTileTex = null;\n      /* THE TILE READS AS TILES: 300 x 600 laid across (12 x 24, the common US\n         bathroom format), a 3 mm grout line round each one, ivory until the\n         colours step gives it a choice. One canvas tile the size of one ceramic\n         tile, repeated; each piece's texture is offset by where the piece starts\n         along the wall and how high it sits, so the joints line through from\n         piece to piece and from wall to partition. */\n      function _tileMat(T, magenta, runL, runH, u0, v0) {\n        if (magenta) {\n          return new T.MeshStandardMaterial({ color: MAGENTA, roughness: 0.35, metalness: 0.0 });\n        }\n        /* the tile is the colour the buyer picked: the texture is drawn once per\n           colour and cached under it */\n        var tKey = colorKey('bathTiles');\n        if (_wallTileTex && _wallTileTex.__col !== tKey) _wallTileTex = null;\n        if (!_wallTileTex) {\n          try {\n            var n = 256, cv = global.document.createElement('canvas');\n            cv.width = n * 2; cv.height = n;\n            var c = cv.getContext('2d');\n            c.fillStyle = WALL_TILE.groutCol; c.fillRect(0, 0, n * 2, n);\n            var gpx = Math.max(2, Math.round(n * WALL_TILE.gap / WALL_TILE.h));\n            c.fillStyle = _hex(colorOf('bathTiles'));\n            c.fillRect(gpx / 2, gpx / 2, n * 2 - gpx, n - gpx);\n            _wallTileTex = new T.CanvasTexture(cv);\n            _wallTileTex.__col = tKey;\n            _wallTileTex.wrapS = _wallTileTex.wrapT = T.RepeatWrapping;\n          } catch (eT) { _wallTileTex = null; }\n        }\n        if (!_wallTileTex) {\n          return new T.MeshStandardMaterial({ color: colorOf('bathTiles'), roughness: 0.35, metalness: 0.0 });\n        }\n        var tx = _wallTileTex.clone();\n        tx.needsUpdate = true;\n        tx.wrapS = tx.wrapT = T.RepeatWrapping;\n        tx.repeat.set(runL / WALL_TILE.w, runH / WALL_TILE.h);\n        tx.offset.set(u0 / WALL_TILE.w, v0 / WALL_TILE.h);\n        return new T.MeshStandardMaterial({ map: tx, roughness: 0.35, metalness: 0.0 });\n      }\n      function _wallTileBill(layer, area, ctx, where) {\n        if (!(area > 0.01)) return;\n        /* grout at a fixed rate (Marek): 0.3 kg/m2 is the makers' table figure\n           for a 300 x 600 tile with a 3 mm joint 8 deep */\n        var grout = area * WALL_TILE.groutKgM2;\n        _add(layer, WALL_TILE.code, area);\n        _add(layer, WALL_TILE.glue, Math.ceil(area * WALL_TILE.kgM2));\n        _add(layer, WALL_TILE.grout, Math.round(grout * 10) / 10);\n        ctx.log('TIL  ' + where + ': ' + API.fmtArea(area) + ' of ' + WALL_TILE.code +\n                ' (' + Math.round(WALL_TILE.w * 1000) + 'x' + Math.round(WALL_TILE.h * 1000) +\n                ' laid across, ' + Math.round(WALL_TILE.gap * 1000) + ' mm joints, ivory) to ' +\n                Math.round(WET_TILE_H * 1000) + ' mm, ' + Math.ceil(area * WALL_TILE.kgM2) +\n                ' kg ' + WALL_TILE.glue + ', ' + (Math.round(grout * 10) / 10) + ' kg ' +\n                WALL_TILE.grout + ' -- on the unpainted band of the board, ' +\n                Math.round((WALL_TILE.t + WALL_TILE.bed) * 1000) + ' mm proud');\n      }\n\n      var FINISH = {\n        dry: { h: 0.010, get col() { return colorOf('floor'); }, piece: 'plank', label: 'vinyl plank 800x180 on underlay',\n               lays: [{ code: 'INS01004', per: 'area', label: 'Impact underlay' },\n                      { code: 'FFC00005', per: 'area', label: 'Vinyl (LVF)' }],\n               skirt: { code: 'FFW00002', label: 'Skirting board' } },\n        wet: { h: 0.013, get col() { return colorOf('bathFloor'); }, piece: 'tile', label: 'white tile 400x400 on a tanked deck',\n               lays: [{ code: 'FEC00025', per: 'tank', kgM2: 1.5, label: 'Waterproofing membrane 2K' },\n                      /* the sheet sells adhesive and grout by the KILOGRAM; billing\n                         them by the square metre put a m2 figure in a kg row. A\n                         notched bed under a floor tile is about 4 kg/m2; grout is\n                         the joint run times its width and the tile's depth at\n                         1800 kg/m3 -- a 400 tile with a 3 mm joint 9 deep is 0.24 */\n                      { code: 'FEC00018', per: 'kg', kgM2: 4.0, label: 'Flex tile adhesive' },\n                      { code: 'FFC00003', per: 'area', label: 'Ceramic floor tiles' },\n                      { code: 'SBG00001', per: 'kg', kgM2: 0.24, label: 'Grout' }],\n               skirt: { code: 'FFC00004', label: 'Ceramic plinth tile' } }\n      };\n\n      /* how far the tanking turns up the wall behind the tile */\n      var TANK_UP = 0.15;\n\n      /* A FINISH HAS A PATTERN, AND THE PATTERN IS THE SIZE OF THE PIECE.\n\n         A flat colour says \"there is a floor here\"; a plank size says which floor,\n         and it is what somebody recognises when they look at their own. So the\n         finish carries the real piece -- 800 x 180 planks in light oak, 400 x 400\n         tiles in white -- and the drawing repeats it at that size in metres.\n\n         Drawn on a canvas and repeated, not built as three hundred little boxes:\n         the pattern is the same either way and one of them costs nothing.\n\n         Copied from tiny's OSB material, which does exactly this for the deck. */\n      var FIN_TEX = {};\n\n      /* GRAIN IN A COLOUR. A render is a fine speckle, a shingle a coarser one\n         of granules; both are drawn on the colour the buyer picked and cached\n         under it, so a colour change redraws them (Marek: the two textures that\n         make sense, and both have to follow the colour). */\n      function _grainTex(T, kind, hex) {\n        var key = 'grain:' + kind + ':' + hex;\n        if (FIN_TEX[key]) return FIN_TEX[key];\n        try {\n          var n = 256, cv = global.document.createElement('canvas');\n          cv.width = n; cv.height = n;\n          var c = cv.getContext('2d');\n          var r0 = (hex >> 16) & 255, g0 = (hex >> 8) & 255, b0 = hex & 255;\n          c.fillStyle = 'rgb(' + r0 + ',' + g0 + ',' + b0 + ')'; c.fillRect(0, 0, n, n);\n          var seed = kind === 'shingle' ? 777 : 4242, i;\n          var rnd = function () { seed = (seed * 1103515245 + 12345) & 0x7fffffff; return seed / 0x7fffffff; };\n          var count = kind === 'shingle' ? 2600 : 5000, amp = kind === 'shingle' ? 0.34 : 0.14;\n          var dmin = kind === 'shingle' ? 1.2 : 0.6, dvar = kind === 'shingle' ? 2.2 : 1.0;\n          for (i = 0; i < count; i++) {\n            var lum = 1 + (rnd() - 0.5) * 2 * amp;\n            var rr = Math.max(0, Math.min(255, Math.round(r0 * lum)));\n            var gg = Math.max(0, Math.min(255, Math.round(g0 * lum)));\n            var bb = Math.max(0, Math.min(255, Math.round(b0 * lum)));\n            c.fillStyle = 'rgb(' + rr + ',' + gg + ',' + bb + ')';\n            var d = dmin + rnd() * dvar;\n            c.fillRect(rnd() * n, rnd() * n, d, d);\n          }\n          var tx = new T.CanvasTexture(cv);\n          if (T.SRGBColorSpace) tx.colorSpace = T.SRGBColorSpace;\n          tx.wrapS = tx.wrapT = T.RepeatWrapping;\n          FIN_TEX[key] = tx;\n          return tx;\n        } catch (e) { return null; }\n      }\n\n      /* _finTex: the plank / tile / OSB texture -- the core's houseFinTex (core-v808, status/modules.md 12) */\n      function _finTex(T, kind, col) {\n        return API.houseFinTex(T, kind, col, FIN_TEX);\n      }\n\n      /* the piece the repeat is measured in */\n      var FIN_PIECE = { plank: { w: 0.80, l: 0.18 }, tile: { w: 0.40, l: 0.40 },\n                        /* a flake mat has no course, so the repeat is the sheet */\n                        osb: { w: 1.20, l: 1.20 } };\n\n      /* the OSB material every OSB piece shares: white base under the flake map */\n      function _osbMat(T, magenta) {\n        var tx = _finTex(T, 'osb');\n        return _finMat(T, new T.MeshStandardMaterial({ color: magenta ? MAGENTA : (tx ? 0xFFFFFF : 0xC8A063), roughness: 0.95, metalness: 0.0 }), 'osb', 1.2, 1.2);\n      }\n      function _finMat(T, base, kind, rw, rl) {\n        var tx = _finTex(T, kind, (base && base.color && kind !== 'osb') ? base.color.getHex() : null);\n        if (!tx) return base;\n        try {\n          var m = base.clone();\n          m.map = tx.clone();\n          m.map.wrapS = m.map.wrapT = T.RepeatWrapping;\n          var P = FIN_PIECE[kind];\n          /* the plank texture holds four courses, so a repeat is four planks deep */\n          m.map.repeat.set(Math.max(0.4, rw / P.w), Math.max(0.4, rl / (kind === 'tile' ? P.l : P.l * 4)));\n          m.map.needsUpdate = true;\n          m.color = new T.Color(0xffffff);\n          return m;\n        } catch (e) { return base; }\n      }\n\n      /* THE ROOMS, AS THE ASSET CUTS THEM. It splits the plan at the partitions and\n         hands back a rectangle each, so a finish laid room by room is laid on the\n         same rooms the drawing shows -- not on a second division of the same floor\n         that could disagree with it. */\n      /* DOES ANOTHER PIECE OF THE SAME ROOM SIT AGAINST THIS EDGE?\n\n         Two rectangles of one room touch along a line that is not a wall -- it is\n         only where the plan happened to cut the room up. Anything that belongs\n         against a wall (skirting today, cladding or trim later) has to ask this\n         first, and count its quantity the same way. */\n      /* AN EDGE ON A ROOM LINE HAS NO WALL TO RUN A SKIRTING BOARD ALONG\n         (adu-v1403): most of the edge lies on a partition marked sep */\n      function _onRoomLine(ax0, ax1, az0, az1, horiz) {\n        var ps = API.STATE.parts || [], q, T = 0.08;\n        for (q = 0; q < ps.length; q++) {\n          var P = ps[q];\n          if (!P || !P.sep || ((P.dir || P.o) === 'h') !== !!horiz) continue;\n          var c = (typeof P.at === 'number') ? P.at : P.c, sp = API.partSpan ? API.partSpan(P) : null;\n          if (!sp || Math.abs(c - (horiz ? az0 : ax0)) > T) continue;\n          var e0 = horiz ? ax0 : az0, e1 = horiz ? ax1 : az1, ov = Math.min(sp[1], e1) - Math.max(sp[0], e0);\n          if (ov > 0.5 * (e1 - e0)) return true;\n        }\n        return false;\n      }\n      /* _skirtCuts: where the skirting stops at a doorway -- the core's houseSkirtCuts (core-v813, status/modules.md 14) */\n      function _skirtCuts(horiz, line, a, b) {\n        return API.houseSkirtCuts(horiz, line, a, b, { api: API, PART: PART, DOOR_W_DEF: DOOR_W_DEF });\n      }\n      function _sharedEdge(rects, self, ax0, ax1, az0, az1, horiz) {\n        var q, T = 0.02;\n        for (q = 0; q < rects.length; q++) {\n          if (q === self) continue;\n          var O = rects[q];\n          if (typeof O.x0 !== 'number') continue;\n          if (horiz) {\n            if (Math.abs(O.z1 - az0) > T && Math.abs(O.z0 - az0) > T) continue;\n            if (Math.min(O.x1, ax1) - Math.max(O.x0, ax0) > T) return true;\n          } else {\n            if (Math.abs(O.x1 - ax0) > T && Math.abs(O.x0 - ax0) > T) continue;\n            if (Math.min(O.z1, az1) - Math.max(O.z0, az0) > T) return true;\n          }\n        }\n        return false;\n      }\n\n      function _roomRects() {\n        var F = _P();\n        if (!F || !F.rooms) return [];\n        try { return F.rooms() || []; } catch (e) { return []; }\n      }\n\n      /* THE SPACES THE WALLS REALLY CLOSE OFF (adu-v1414).\n\n         The plan's rooms are cut at the square partitions only. A slanted\n         wall across a corner leaves the corner's triangle in the rectangle of\n         the room BEHIND it: the bathroom's rectangle runs on past its own\n         slanted wall into the hall's V. So everything that asked \"which room\n         is this point in\" next to a slanted wall got the room behind the wall\n         -- both faces wet, no switch at the door, no threshold.\n\n         The floor is laid out on a 50 mm grid with every real wall drawn into\n         it -- the square partitions, the slanted ones, the shell -- and the\n         room lines left open, and each piece of floor the walls close off is\n         one space. A room is at home in the space that holds most of it; its\n         cells in any other space are a wedge a slanted wall cut off, and they\n         take the room of the nearest floor in that space that is at home\n         there -- the hall, across the room line. A wedge closed all round by\n         real walls keeps its room. Worked out once per layout. */\n      var _spaceMemo = { key: null, map: null };\n      function _spaceMap() {\n        var SL = _slantRaw();\n        if (!SL.length) return null;\n        /* the layout's fingerprint -- numbers only, it is asked a few hundred\n           times a rebuild */\n        var PS = API.STATE.parts || [], key = null, q, fp = PS.length + 0.5;\n        try {\n          for (q = 0; q < PS.length; q++) {\n            var P = PS[q];\n            if (!P) continue;\n            fp = (fp * 31 + ((typeof P.at === 'number') ? P.at : (P.c || 0)) * 1009 + (P.a || 0) * 37 + (P.b || 0) * 101 + (P.sep ? 7 : 0) + (((P.dir || P.o) === 'v') ? 3 : 0)) % 1e9;\n          }\n          for (q = 0; q < SL.length; q++) fp = (fp * 31 + SL[q].a[0] * 1009 + SL[q].a[1] * 37 + SL[q].b[0] * 101 + SL[q].b[1] * 13) % 1e9;\n          var PO2 = API.poly ? (API.poly() || []) : [];\n          for (q = 0; q < PO2.length; q++) fp = (fp * 31 + PO2[q][0] * 1009 + PO2[q][1] * 37) % 1e9;\n          key = PS.length + '|' + SL.length + '|' + PO2.length + '|' + fp + '|' + (API.wallThickness ? API.wallThickness() : 0);\n        } catch (eK) { key = null; }\n        if (key && _spaceMemo.key === key) return _spaceMemo.map;\n        var map = null;\n        try { map = _spaceBuild(SL, PS); } catch (eB) { map = null; }\n        /* no rooms to read yet (the floorplan asset still loading) is not\n           remembered: the next rebuild asks again */\n        _spaceMemo.key = map ? key : null; _spaceMemo.map = map;\n        return map;\n      }\n      /* _spaceBuild: the rooms on a grid, cut by the walls (slanted ones too) -- the core's houseSpaceBuild (core-v807, status/modules.md 11) */\n      function _spaceBuild(SL, PS) {\n        return API.houseSpaceBuild(SL, PS, { api: API, PART: PART, roomLabel: _roomLabel, roomRects: _roomRects });\n      }\n      /* the space under a point: its own cell, or -- right against a wall,\n         where the cell is wall -- the nearest floor cell beside it */\n      function _spaceCell(M, x, z) {\n        var ii = Math.floor((x - M.X0) / M.h), kk = Math.floor((z - M.Z0) / M.h), best = -1, bd = 1e9, di, dk;\n        if (ii < -1 || kk < -1 || ii > M.NX || kk > M.NZ) return -1;\n        for (dk = -1; dk <= 1; dk++) for (di = -1; di <= 1; di++) {\n          var ni = ii + di, nk = kk + dk;\n          if (ni < 0 || nk < 0 || ni >= M.NX || nk >= M.NZ) continue;\n          var c = nk * M.NX + ni;\n          if (M.comp[c] < 0) continue;\n          if (!di && !dk) return c;\n          var ex = M.X0 + (ni + 0.5) * M.h - x, ez = M.Z0 + (nk + 0.5) * M.h - z, d2 = ex * ex + ez * ez;\n          if (d2 < bd) { bd = d2; best = c; }\n        }\n        return best;\n      }\n      /* the room a point in a wedge really belongs to, or -1 when the plan's\n         own room is right (no slanted wall, not a wedge, a closed wedge) */\n      function _wedgeRoomAt(x, z) {\n        var M = _spaceMap();\n        if (!M || !M.nW) return -1;\n        var c = _spaceCell(M, x, z);\n        if (c < 0 || !M.wedge[c] || M.room[c] < 0 || M.room[c] === M.lab[c]) return -1;\n        return M.room[c];\n      }\n      /* is the floor under a point clear of every wall (true with no map) */\n      function _spaceFree(x, z) {\n        var M = _spaceMap();\n        if (!M) return true;\n        var ii = Math.floor((x - M.X0) / M.h), kk = Math.floor((z - M.Z0) / M.h);\n        if (ii < 0 || kk < 0 || ii >= M.NX || kk >= M.NZ) return false;\n        return M.comp[kk * M.NX + ii] >= 0;\n      }\n\n      /* THE ROOT, NOT THE PLAN. draw and plan are both children of it, so asking\n         the plan for its own .plan gets undefined -- which is why every room came\n         back called \"room 1\" instead of BATHROOM, and why no room was ever wet. */\n      /* A CLOSET IS NOT A ROOM (adu-v1415, Marek: satny z planu jako satny).\n         The asset marks a closet the plan names (closet, storage, W/D) and\n         under 3 m2 -- drawn grey and unnamed -- but its name index is only\n         its place in the list, so here it borrowed a room's name by chance:\n         BEDROOM, KIDS ROOM, and LAUNDRY for the store behind the double door,\n         which made it wet -- tiles, green board, a wet room's socket. A\n         closet has no row: no name, dry, no plus. */\n      var CLOSET_ROW = { i18n: '', def: 'closet', closet: true };\n      function _roomRow(r, i) {\n        if (r && r.closet) return CLOSET_ROW;\n        var F = _FL(), TB = [];\n        if (!F) return null;\n        try { TB = (F.draw && F.draw.roomTable) ? (F.draw.roomTable() || []) : []; } catch (e1) {}\n        if (!TB.length) return null;\n        var idx = null;\n        try { idx = (F.plan && F.plan.roomNameIdx) ? (F.plan.roomNameIdx(r, i) | 0) : null; } catch (e2) {}\n        if (idx == null) return null;\n        return TB[idx % TB.length] || null;\n      }\n\n      function _roomKey(r, i) { var w = _roomRow(r, i); return (w && w.i18n) || ''; }\n\n      /* WHICH ROOM A POINT IS IN, and whether that room is wet.\n\n         A partition has two faces and they belong to two different rooms. The board\n         is not a property of the wall, it is a property of the SIDE -- the bathroom\n         gets the green sheet, the bedroom on the other side of the same studs gets\n         the plain one. Asking the wall would give one answer for two faces. */\n      /* A SHOWER TAKES ITS WALLS TO THE CEILING. Is a shower standing against\n         this face -- a piece of wall from (ax,az) to (bx,bz)? Its footprint has\n         to come within tol of the line and overlap the piece's run. The wet band\n         stops at WET_TILE_H everywhere else; on these faces the tiles go up to\n         the top of the board. */\n      function _showerOnFace(ax, az, bx, bz, tol) {\n        var PL = _P(), P = STATE.product || {}, L = P.fixtures || [];\n        if (!PL || !PL.fixtures || !L.length) return false;\n        var cat = PL.fixtures.catalog(), i;\n        var dx = bx - ax, dz = bz - az, len = Math.hypot(dx, dz);\n        if (!(len > 0.05)) return false;\n        var ux = dx / len, uz = dz / len, nx = -uz, nz = ux;\n        for (i = 0; i < L.length; i++) {\n          var f = L[i], D = cat[f.kind];\n          if (!D || !D.tiled) continue;\n          var r = PL.fixtures.rect(f);\n          var cs = [[r.x0, r.z0], [r.x1, r.z0], [r.x1, r.z1], [r.x0, r.z1]], q, dmin = 1e9, u0 = 1e9, u1 = -1e9;\n          for (q = 0; q < 4; q++) {\n            var d = Math.abs((cs[q][0] - ax) * nx + (cs[q][1] - az) * nz);\n            var u = (cs[q][0] - ax) * ux + (cs[q][1] - az) * uz;\n            if (d < dmin) dmin = d;\n            if (u < u0) u0 = u; if (u > u1) u1 = u;\n          }\n          if (dmin <= tol && u1 > 0.05 && u0 < len - 0.05) return true;\n        }\n        return false;\n      }\n\n      function _wetAt(px, pz) {\n        var RM = _roomRects(), i, j;\n        /* in a wedge a slanted wall cut off, the room it really is (adu-v1414) */\n        var wq = _wedgeRoomAt(px, pz);\n        if (wq >= 0 && RM[wq]) return !!WET_ROOMS[_roomKey(RM[wq], wq)];\n        for (i = 0; i < RM.length; i++) {\n          var RS = RM[i].rects || (typeof RM[i].x0 === 'number' ? [RM[i]] : []);\n          for (j = 0; j < RS.length; j++) {\n            var R = RS[j];\n            if (typeof R.x0 !== 'number') continue;\n            if (px >= R.x0 - 0.02 && px <= R.x1 + 0.02 &&\n                pz >= R.z0 - 0.02 && pz <= R.z1 + 0.02) {\n              return !!WET_ROOMS[_roomKey(RM[i], i)];\n            }\n          }\n        }\n        return false;\n      }\n\n      function _roomLabel(r, i) {\n        var w = _roomRow(r, i);\n        if (w && w.closet) return 'closet ' + (Math.round(_roomArea(r) * 10) / 10) + ' m2';\n        return (w && (w.def || w.i18n)) || ('room ' + (i + 1));\n      }\n      function _roomArea(r) {\n        var a = 0, j, RS = (r && r.rects) || [];\n        for (j = 0; j < RS.length; j++) a += (RS[j].x1 - RS[j].x0) * (RS[j].z1 - RS[j].z0);\n        return a;\n      }\n\n      /* WHAT A BOARD LOOKS LIKE ONCE THE INSIDE IS PAINTED. The paint has no\n         thickness to draw, so it is the colour of every board it covers -- white\n         over plain and green alike, which is what a painted bathroom looks like\n         until the tiling goes on. INT_PAINT.show off gives the boards back their\n         own colours, so the green can still be checked. */\n      function _boardCol(K, unpainted) {\n        return (INT_PAINT.show && INT_PAINT.code && !unpainted) ? colorOf('walls') : K.col;\n      }\n\n\n\n      /* WHAT THICKNESS OF WOOL ACTUALLY GOES IN, out of what the catalogue carries.\n\n         Copied from tiny, including the rule that decides it: A SHORTFALL IS WORSE\n         THAN AN OVERFILL. Wool compresses; 20 mm of air under a floor does not, and\n         that gap is exactly where the cold comes through. So coming up short is\n         scored four times as harshly as going over, and only then do the fewest\n         layers win.\n\n         Only depths the catalogue stocks. Reaching for a size that is not there is\n         how a layer ends up in the model and nowhere in the bill. */\n      var WOOL_STOCK = [['INS02001', 0.200], ['INS01601', 0.160], ['INS01201', 0.120],\n                        ['INS01151', 0.115], ['INS00601', 0.060]];\n\n      function woolFill(hM) {\n        var best = null, i, j, n, m;\n        function look(mix, t) {\n          var short = hM - t;\n          if (short > 0.05 || short < -0.05) return;\n          var nL = 0, q;\n          for (q = 0; q < mix.length; q++) nL += mix[q].n;\n          var score = (short > 0 ? short * 400 : -short * 80) + nL * 3;\n          if (!best || score < best.score) best = { mix: mix, score: score, t: t };\n        }\n        for (i = 0; i < WOOL_STOCK.length; i++) {\n          for (n = 1; n <= 4; n++) {\n            look([{ code: WOOL_STOCK[i][0], mm: Math.round(WOOL_STOCK[i][1] * 1000), n: n }],\n                 WOOL_STOCK[i][1] * n);\n            for (j = i + 1; j < WOOL_STOCK.length; j++) {\n              for (m = 1; m <= 2; m++) {\n                look([{ code: WOOL_STOCK[i][0], mm: Math.round(WOOL_STOCK[i][1] * 1000), n: n },\n                      { code: WOOL_STOCK[j][0], mm: Math.round(WOOL_STOCK[j][1] * 1000), n: m }],\n                     WOOL_STOCK[i][1] * n + WOOL_STOCK[j][1] * m);\n              }\n            }\n          }\n        }\n        return best || { mix: [{ code: 'INS01601', mm: 160, n: 1 }], t: 0.160 };\n      }\n\n      var JOIST = {\n        t: 0.060,\n        d: 0.240,      /* KVH60240 */\n        deck: 0.018,   /* OSB25002 */\n        code: 'KVH60240'\n      };\n\n      var _floorTally = null;\n\n      function _buildFloor(ctx) {\n        /* THE FLOOR FROM THE SHARED MODULE (core-v779, status/modules.md 6):\n           the frame, the deck, the build-up and the rooms' finishes are written\n           once in configurator-ui.js; this product hands in its own pieces. */\n        if (typeof API.houseFloor !== 'function') { ctx.log('floor    THREW the shared floor module is missing -- configurator-ui.js core-v779 or later'); return; }\n        API.houseFloor(ctx, {\n          api: API, layer: 'adu-floor', wood: STRUCT_WOOD, layers: FLOOR_LAYERS, show: FLOOR_SHOW,\n          JOIST: JOIST, RAIL: RAIL, DECK_SCREW: DECK_SCREW, FRAME_NAIL: FRAME_NAIL,\n          MEM_EPS: MEM_EPS, MEM_FLAT: MEM_FLAT, MEM_LAP: MEM_LAP, MAGENTA: MAGENTA,\n          FINISH: FINISH, WET_ROOMS: WET_ROOMS, TANK_UP: TANK_UP, PART: PART, PART_BOARD: PART_BOARD,\n          billReset: _billReset, finMat: _finMat, finTex: _finTex, osbMat: _osbMat,\n          roomRects: _roomRects, roomKey: _roomKey, roomLabel: _roomLabel, sharedEdge: _sharedEdge,\n          onRoomLine: _onRoomLine, polyArea: _polyArea,\n          woolFill: woolFill,\n          skirtCuts: _skirtCuts,\n          slants: { raw: _slantRaw, spaceMap: _spaceMap, wedgeRoomAt: _wedgeRoomAt },\n          setTally: function (t) { _floorTally = t; },\n          add: function (code, q) { _add('adu-floor', code, q); }\n        });\n      }\n\n      /* --------------------------------------------------------------------------\n         THE TRUSS. A Fink, which is what a gable of this span is built with in the\n         United States: four houses in five, and the same on garden units, garages\n         and sheds. It arrives made, goes up in a morning, and its bottom chord IS\n         the tie -- so the walls stop being pushed apart, which a ridge board never\n         stopped them doing.\n\n         AND THE SPAN COMES FREE. 7.3 m with nothing underneath it means the plan\n         inside is unobstructed, which matters more here than anywhere: the person\n         draws their partitions wherever they like and no post ever lands in one.\n\n         THE MEMBER LAYOUT IS THE ROOF CONFIGURATOR'S, lifted rather than reinvented\n         -- top chords, tie, king post, and a fan of webs per panel, with the\n         connection count at every node so the plates can be counted from it.\n\n         WHAT IS NOT DIY: the plates are pressed in a works, not nailed on site. A\n         truss roof is ordered to the drawing. That is normal in the US even for a\n         shed, but it is a real change to what the plan asks of the buyer.\n         -------------------------------------------------------------------------- */\n      var CHORD = { t: 0.060, d: 0.160, code: 'KVH60160' };\n      var WEB   = { t: 0.060, d: 0.120, code: 'KVH60120' };\n      var TRUSS_PANELS = 3;\n      /* the longest and shortest panel a short truss may be divided into */\n      /* TWO THINGS CALLED PANEL, ONE NAME, AND THE WALL PAID FOR IT.\n\n         These are the web spacings of a TRUSS, and they sat in the same scope as\n         the wall's own panel limit, which is 12 ft. Being var, the later\n         assignment won: every wall in the building was being broken every 1.2 m,\n         so a 6.9 m wall came out as six panels and no rule I wrote about openings\n         could have changed that (Marek: porad 6 panelu na sirku 6,9 metru). */\n      var TRUSS_PANEL_MAX = 1.500;\n      var TRUSS_PANEL_MIN = 0.600;\n\n      /* Steel connector plates.\n\n         FSP00001 IS A GHOST AND HAS BEEN ALL ALONG. I carried it over from the\n         roof configurator on the grounds that it was \"already shipping\" and wrote\n         that it still wanted checking against the central sheet. It was checked\n         now and it is not in the sheet -- so every hip end has been pricing its\n         plates against nothing. That is exactly what a code in a lib and not in\n         the catalogue does, quietly.\n\n         The sheet has two, and they are the two sizes this roof already draws:\n\n           ROT00005  150 x 100 x 1,   20 gauge -- the ordinary joint\n           ROT00006  250 x 150 x 1.2, 18 gauge -- the big one at a girder\n\n         So the pair goes on the pair, instead of both landing on one made-up\n         line. The face of the drawn plate follows the big one, 250 x 150, because\n         that is what the catalogue sells; the DRAWN thickness stays 12 mm, since\n         1.2 mm of steel on a nine metre roof is invisible and the row is per\n         piece, so nothing is bought by it. */\n      /* THE SQUARE ONE IS A TEN INCH PLATE, NOT A 250 MM ONE.\n\n         250 mm is 9 27/32 in, which is nothing a US merchant stocks; the square\n         nail plate on that market is 10 x 10. The rectangular plate keeps its own\n         250 x 150, because that one is an item the catalogue already carries\n         (Marek: urcite prepnout na inch 10/10). */\n      var PLATE     = { l: 0.250, w: 0.150, t: 0.012, sq: 0.254,\n                        code: 'ROT00005', codeBig: 'ROT00006' };\n      var STEEL = 0x9AA3AB;\n\n      /* the brand gold, the one the sliders and the counters already use */\n\n      var _trussTally = null;\n      /* WHAT THE BODIES MEASURE, read off each one as it is made.\n\n         Every reader of this model takes a member's three sides off its own\n         geometry -- the cut list, the quantity audit, the section colours in\n         stage view, the length in the drawer, and the points the truss sheet is\n         drawn from. So the honest check is that same reading, taken here where\n         the asked-for numbers are still in hand, and printed once per build. */\n      var _trussGeom = [];\n      /* ONE COLOUR PER COMPONENT, THE SAME ON EVERY TRUSS IN THE BUILDING.\n\n         A view that paints each PIECE differently is a fruit salad: it says\n         nothing about which member is which. These are keyed to what the piece\n         DOES, so every top chord in the roof is the same magenta and a member\n         can be named across the whole building by pointing at a colour (Marek:\n         kazda jedna barva pro stejny komponent).\n\n         The names are printed beside the counts in the log, so the colour in\n         the picture and the line in the snapshot are the same word. */\n      /* ONLY THE HIP IS PAINTED NOW.\n\n         The straight trusses are done and their colours have served their\n         purpose -- left on, they only compete with the end that is still being\n         worked on. So they are drawn in plain timber like everything else and\n         every piece of the California end gets a colour of its own, which is\n         what makes a member nameable in one look (Marek: obarvit jen narozni\n         vazniky, kazdy prvek jinou barvou).\n\n         Three families meet at a hip end: the truss that runs down the middle of\n         it, the four hips themselves, and the jacks cut against them. Each has a\n         rafter, a bottom chord, a post and its webs, so the name says which\n         family and which piece. */\n      /* NOW ONLY THE SHORT TRUSSES ARE PAINTED.\n\n         The centre truss and the hips are settled, so they go back to plain\n         timber; what is left to work on are the jacks cut against the hips, and\n         those are coloured BY ROLE -- every first upright in the roof shares one\n         colour, every second diagonal another. That is what makes a rule visible:\n         if one of them is wrong, it is wrong in the same colour everywhere\n         (Marek: kazdy profil jinou barvou, skupiny stejnou barvou). */\n      /* THE WHOLE HIP END IN COLOUR AGAIN, one per role, so the last details can\n         be talked about the same way the rest were (Marek: znovu prvky na\n         california hip obarvi at to doladime). The plates keep their steel, which\n         is what makes a plate in the wrong place obvious. */\n      var TRUSS_PAINT = {\n        cal_rafter:  0xFF00FF,\n        cal_bottom:  0xB6FF00,\n        cal_post:    0x00E5FF,\n        cal_vert:    0xFF7A00,\n        cal_diag:    0x1E90FF,\n        hip_rafter:  0xFFD400,\n        hip_bottom:  0xE6194B,\n        hip_vert:    0xA05CFF,\n        hip_diag:    0x00B050,\n        jack_rafter: 0x8B5A2B,\n        jack_bottom: 0x00C8B4,\n        jack_post:   0xF5F5F5,\n        jack_vert1:  0xFF9BD2,\n        jack_diag1:  0x2A2AA5,\n        jack_vert2:  0x808000,\n        jack_diag2:  0xFF7F6E\n      };\n      var TRUSS_PAINT_NAME = {\n        cal_rafter:  'END TRUSS RAFTER magenta',\n        cal_bottom:  'END TRUSS BOTTOM CHORD acid green',\n        cal_post:    'END TRUSS POST cyan',\n        cal_vert:    'END TRUSS UPRIGHT orange',\n        cal_diag:    'END TRUSS DIAGONAL blue',\n        hip_rafter:  'HIP RAFTER yellow',\n        hip_bottom:  'HIP BOTTOM CHORD red',\n        hip_vert:    'HIP UPRIGHT violet',\n        hip_diag:    'HIP DIAGONAL green',\n        jack_rafter: 'JACK RAFTER brown',\n        jack_bottom: 'JACK BOTTOM CHORD turquoise',\n        jack_post:   'JACK HEEL POST white',\n        jack_vert1:  'JACK FIRST UPRIGHT pink',\n        jack_diag1:  'JACK FIRST DIAGONAL navy',\n        jack_vert2:  'JACK SECOND UPRIGHT olive',\n        jack_diag2:  'JACK SECOND DIAGONAL salmon'\n      };\n      var TRUSS_PAINT_ORDER = ['cal_rafter', 'cal_bottom', 'cal_post', 'cal_vert', 'cal_diag',\n                               'hip_rafter', 'hip_bottom', 'hip_vert', 'hip_diag',\n                               'jack_rafter', 'jack_bottom', 'jack_post',\n                               'jack_vert1', 'jack_diag1', 'jack_vert2', 'jack_diag2'];\n      var TRUSS_PLAIN = ['chord', 'tie', 'post', 'wvert', 'web'];\n      /* what the underside trim took off, reported once per build */\n      /* WHICH HIP A MEMBER BELONGS TO, AND WHERE IT SITS IN IT.\n\n         The two longest hips are the ones being worked on, and in them every\n         single piece has to be tellable from every other -- not a colour per\n         kind, a colour per MEMBER, so a diagonal and an upright never share one\n         (Marek: ani pricne vzpery a kolme prvky ani jeden stejnou barvu). So\n         each hip member is stamped with its hip's number, its own place in that\n         hip, and the hip's length; the stage then paints the two longest and\n         leaves everything else in plain timber. */\n      var _hipNo = 0, _hipSeq = 0, _calSeq = 0, _hipPostsDropped = 0;\n      /* the hip's head stays yellow and the centre truss's stays magenta, because\n         that is how he names them; the two lists share no other colour, so a\n         piece of one can never be read as a piece of the other */\n      var HIP_SEQ_PAINT = [0xFFD400, 0xE6194B, 0xA05CFF, 0xF5F5F5, 0x00B050, 0x8B5A2B,\n                           0x00C8B4, 0x2A2AA5, 0xFF7F6E, 0x808000, 0x4F6D7A, 0xB8860B];\n      var HIP_SEQ_NAME = ['yellow', 'red', 'violet', 'white', 'green', 'brown',\n                          'turquoise', 'navy', 'salmon', 'olive', 'slate', 'dark gold'];\n      var CAL_SEQ_PAINT = [0xFF00FF, 0xB6FF00, 0x00E5FF, 0xFF7A00, 0x1E90FF, 0xFF9BD2,\n                           0x00FFB0, 0xC9A0FF, 0xFF5050, 0xE8C87E];\n      var CAL_SEQ_NAME = ['magenta', 'acid green', 'cyan', 'orange', 'blue', 'pink',\n                          'mint', 'lavender', 'coral', 'sand'];\n      var _trussFloorCut = { n: 0, max: 0 };   /* the core kit keeps these now; read through _TK */\n      /* what the members measure against the faces they were cut to */\n      var _trussFit = {};\n      var _trussPaintOn = false;\n      var _trussPaintMats = null;\n      /* THE TWO ENDS OF A SLOPING WEB, WORKED OUT IN THE TRUSS'S OWN PLANE.\n\n         Every truss in this roof -- the straight ones, the one down the middle of\n         a hip end, and each hip -- is the same picture in its own vertical plane:\n         a chord falling at some slope, a level bottom chord, and uprights at the\n         panel points. A sloping web dies between them, and the rule is the one\n         the straight truss already uses:\n\n           the foot on the bottom chord's TOP FACE and on the cheek of its own\n           upright, the head on the top chord's UNDERSIDE and on the cheek of the\n           upright it runs back to, each point of the end carried to whichever of\n           the two it meets FIRST, and the head laid down far enough that the two\n           bearings come out the same length.\n\n         d is measured along the run from the peak, y is height. It returns both\n         ends as a point plus three offsets along the member's own length, for the\n         near edge, the corner and the far edge (Marek: souhlas sikme vzpery). */\n      /* HOW FAR THE FOOT IS SET INTO THE BOTTOM CHORD'S TOP FACE.\n\n         With the foot's axis exactly on that face, only half the member's depth\n         lies against it and the bearing comes out short. Dropping the axis a\n         little puts more of the end face on the chord -- the timber below the\n         face is cut away by it, as it always was, so nothing is buried; the piece\n         simply gets a longer flat to sit on (Marek: jeste o 2 cm nize, at ma\n         vetsi dosedaci plochu s red pasnici). */\n      var WEB_FOOT_DROP = 0.020;\n      /* AND A FIXED DROP IS THE WRONG KIND OF ANSWER.\n\n         20 mm bought 28 mm of bearing at 26 degrees and 73 mm at 15 -- the same\n         number does a different job at every pitch, because a steep web lands on\n         a level chord across almost nothing. What he actually asked for, twice,\n         is a bearing he can see. So the drop is solved for instead: it is taken\n         as far as it needs to go to bed the foot on the chord over the web's own\n         depth, and no further than half the chord, which keeps the axis in the\n         chord's upper half (Marek: je mala stycna plocha modre a acid green). */\n      var WEB_FOOT_BEAR = 0.120;\n      function _webPlaneEnds(dF, dH, tanS, yTop0, tieTop, hu, hd, ckHAbs, tight) {\n        var lo8 = 0, hi8 = 0.080, mid8, best8 = null, q8;\n        for (q8 = 0; q8 < 9; q8++) {\n          mid8 = (q8 === 0) ? hi8 : (lo8 + hi8) / 2;\n          var r8 = _webPlaneOnce(dF, dH, tanS, yTop0, tieTop, hu, hd, ckHAbs, mid8, tight);\n          if (!r8) break;\n          best8 = r8;\n          if (q8 === 0 && r8.bear <= WEB_FOOT_BEAR) break;   /* even the deepest is short */\n          if (r8.bear > WEB_FOOT_BEAR) hi8 = mid8; else lo8 = mid8;\n        }\n        return best8 || _webPlaneOnce(dF, dH, tanS, yTop0, tieTop, hu, hd, ckHAbs,\n                                      WEB_FOOT_DROP, tight);\n      }\n      /* _webPlaneOnce: a truss web laid between its chord and upright -- the core's houseWebPlane (core-v807, status/modules.md 11) */\n      function _webPlaneOnce(dF, dH, tanS, yTop0, tieTop, hu, hd, ckHAbs, drop, tight) {\n        return API.houseWebPlane(dF, dH, tanS, yTop0, tieTop, hu, hd, ckHAbs, drop, tight);\n      }\n      /* _seatOnHip: a jack truss seated on the hip it runs into -- the core's houseSeatOnHip (core-v807, status/modules.md 11) */\n      function _seatOnHip(mesh, hx, hz, ex, ez, halfT, topA, tanH, side, headPlus) {\n        return API.houseSeatOnHip(mesh, hx, hz, ex, ez, halfT, topA, tanH, side, headPlus, CHORD);\n      }\n      /* THE OUTLINE OF A PIECE, TAKEN OFF THE PIECE ITSELF.\n\n         Every cut we made lives in the body's vertices and nowhere else: the\n         plane that planed a chord on its tie, the peak notched into a post, the\n         corner where a web meets two faces at once. The drawing was getting the\n         AXIS and a section, so it drew a rectangle with square ends -- the piece\n         as it was before any of that.\n\n         This reads one side face of the finished body and returns its corners in\n         the member's own flat coordinates: distance along its length, and depth\n         across it. The points are ordered around their own centre rather than\n         hulled, because the post's head is a notch and a hull would fill it in\n         (Marek: mohly by nakresy odpovidat presne tomu co jsme postavili). */\n      /* the body most recently made, so a caller can take its outline without\n         every builder having to hand one back */\n      var _lastBody = null;\n      var _TK = (typeof API.trussKit === 'function')\n        ? API.trussKit({ sections: function () { return { chord: CHORD, web: WEB, plate: PLATE }; } })\n        : null;\n      if (!_TK) {\n        /* a core older than core-v257: no truss is built, and the log says so */\n        _TK = { missing: true, fink: function () { return { members: [], nodes: [] }; },\n                inTruss: function () { return null; }, reset: function () {},\n                geom: function () { return []; }, floorCut: function () { return { n: 0, max: 0 }; },\n                fit: function () { return {}; }, lastBody: function () { return null; } };\n      }\n      function _faceOutline(geo, lenAxis, thickHalf) {\n        /* the core's reader since core-v254 -- the shed and the sauna read their\n           truss members with the same one */\n        return (API.faceOutline) ? API.faceOutline(geo, lenAxis, thickHalf) : null;\n      }\n      /* a heel post: a box whose head is cut to the rafter it meets, sloping\n         across its own depth the way every other upright in this roof now is */\n      /* A RAFTER PLANED OFF ON ITS OWN BOTTOM CHORD.\n\n         Wherever two chords of one truss converge -- the centre truss at the\n         eave, a hip at its corner, a jack at its foot -- the rafter's underside\n         drops below the bottom chord's top face over the last stretch and the\n         very end lies wholly inside it. The piece keeps full depth to where its\n         underside meets that face, follows the face from there, and finishes\n         where its top face meets it too, so nothing is left buried and no spike\n         hangs off the end.\n\n         The member must be built with a break across it (two segments along its\n         length) for the underside to bend at the right place. */\n      /* how flat the planed undersides came out, over the whole roof */\n      var _footFlat = { n: 0, worst: 0, ends: 0, endWorst: 0, oneCut: 0 };\n      /* _footOnChord: a rafter's foot planed onto the chord (the product's tally in _footFlat) -- the core's houseFootOnChord (core-v807, status/modules.md 11) */\n      function _footOnChord(mesh, floorB, cyB, hLen, hDep) {\n        return API.houseFootOnChord(mesh, floorB, cyB, hLen, hDep, _footFlat);\n      }\n      /* HOW FAR ALONG THE JACK THE HEEL POST STARTS.\n\n         Cut hard against the hip, the post loses most of its depth on the side\n         where the plan angle bites -- on a shallow jack the end face eats nearly\n         the whole 120 mm and what is left is a wedge. Standing it a little further\n         out keeps the piece a piece: only the corner that would still be inside\n         the hip gets taken off, the rest of the end stays square (Marek: jsou moc\n         uzke, vytahnout dal, aspon 3 cm, pod uhlem jen cast steny). */\n      var HEEL_SET = 0.030;\n      /* and how far below the rafter's top face the heel plate hangs: enough of it\n         has to be on the post, which is the piece the joint turns on */\n      var HEEL_PLATE_DROP = 0.050;\n      /* and how much further along the jack the pair is pushed, to keep clear of\n         the hip's chord: the plate still laps most of the post, it just stops\n         crowding the piece next to it (Marek: posun dal od yellow pasnice) */\n      var HEEL_PLATE_OUT = 0.040;\n      function _heelPost(T, h, tanJ, yaw, cx, cz, hx, hz, ex, ez, halfT, side) {\n        var g = new T.BoxGeometry(WEB.t, h, WEB.d);\n        var pos = g.attributes.position, i;\n        /* AND ITS END IS CUT ON THE HIP, not stood off it.\n\n           Standing the post clear leaves it touching by an arris at best, and any\n           error in the clearance shows as a collision. The hip's cheek is the same\n           vertical plane the chords are cut on, so the post's end goes on it too --\n           and because the jack crosses the hip at an angle in PLAN, that cut runs\n           across the post's 60 mm of thickness, not across its height. One corner\n           of the end is further forward than the other, which is what a carpenter\n           would cut (Marek: cela svislych bilych profilu take seriznuta pod uhlem\n           at dosedaji na narozni vaznik). */\n        var cw = Math.cos(yaw || 0), sw = Math.sin(yaw || 0);\n        var sx = (ez == null) ? 0 : ez, sz = (ex == null) ? 0 : -ex;\n        var dSdZ = sx * sw + sz * cw;\n        var near = -WEB.d / 2, seat = (ex != null && Math.abs(dSdZ) > 1e-6);\n        for (i = 0; i < pos.count; i++) {\n          var lx = pos.getX(i), lz = pos.getZ(i);\n          if (seat && Math.abs(lz - near) < 1e-6) {\n            var wx = cx + lx * cw + lz * sw;\n            var wz = cz - lx * sw + lz * cw;\n            var sNow = sx * (wx - hx) + sz * (wz - hz);\n            var dz = (side * halfT - sNow) / dSdZ;\n            if (dz > 0 && dz < WEB.d * 0.9) { lz += dz; pos.setZ(i, lz); }\n          }\n          if (pos.getY(i) > h / 2 - 1e-6) pos.setY(i, h / 2 - pos.getZ(i) * tanJ);\n        }\n        pos.needsUpdate = true;\n        g.computeVertexNormals();\n        return g;\n      }\n      /* the three sides of a body, largest first -- the same reading every\n         downstream list takes, so the log says what they will say */\n      function _trussSides(o) {\n        var gg = o.geometry;\n        if (!gg) return [0, 0, 0];\n        if (!gg.boundingBox) gg.computeBoundingBox();\n        var bb = gg.boundingBox, sc = o.scale || { x: 1, y: 1, z: 1 };\n        var dd = [Math.abs(bb.max.x - bb.min.x) * (sc.x || 1),\n                  Math.abs(bb.max.y - bb.min.y) * (sc.y || 1),\n                  Math.abs(bb.max.z - bb.min.z) * (sc.z || 1)];\n        dd.sort(function (a, b) { return b - a; });\n        return dd;\n      }\n      /* PUBLISHED MEMBER POSITIONS, and they are declared HERE, at the top, on\n         purpose. The reading half of this lives 4000 lines below in the roof skin,\n         and I have now twice shipped a zone that carried the reader without the\n         writer -- the layer then throws on a name that does not exist and draws\n         nothing, which looks exactly like a layer that broke.\n\n         A pair of halves this far apart cannot go out as a tail patch. It is a\n         whole-file change, and saying so is part of the change. */\n      /* WHERE THE ROOF MEMBERS STAND -- PUBLISHED BY THE FRAME, AND STALE BY\n         CONSTRUCTION.\n\n         The frame fills this while it builds. Anything that runs BEFORE the roof\n         in the layer order therefore reads either nothing on the first pass or,\n         worse, the PREVIOUS rebuild's positions on every pass after -- which is a\n         reader that is permanently one edit behind. His words for it were exact:\n         the insulation lands where the members ought to be and the members are\n         somewhere else, fixed at some old positions.\n\n         The snapshot proved it: at the wall's turn this list came back \"none\n         published\", so the wall runs first and the roof has not written yet.\n\n         So it is COMPUTED when asked, from the same set-out the frame builds on,\n         and the published array is only a cache of that. Order stops mattering,\n         because there is nothing left to be early for. */\n      var _memberPts = null;\n      /* the side-slope jacks of a hip, as stations along the ridge axis, for the\n         eave closures on the bearing walls beyond the girders */\n      var _hipSideJacks = [], _hipSideJacksUsed = '', _hipRerun = false;\n      /* counted where the trusses are painted, read where the wall reports */\n      var gabMarkLo = 0, gabMarkHi = 0;\n\n      /* what the TRUSSES built, for anything that has to meet them */\n      var _trussTop = null;\n      var _postPts = null;\n      var _intPaintA = 0;\n      /* targets already claimed by an outlet, cleared with every roof build -- so\n         two runs cannot both drain to the same post */\n      var _outletTaken = [];\n\n      /* The Fink layout in the truss's own plane: p across the span, y up.\n         Returns members and the nodes where two or more of them meet. */\n      /* TWO TAILS, AND THE RIDGE MOVES BETWEEN THEM. */\n      function _fink(hWall, eaveY, ridgeY, nPanel, tail, tailB) {\n        /* THE TRUSS SHAPE IS THE CORE'S (trussKit, core-v257): the ADU, the shed\n           and the sauna lay out one truss from one copy. This file hands it its\n           sections and builds what comes back. */\n        return _TK.fink(hWall, eaveY, ridgeY, nPanel, tail, tailB);\n      }\n\n      /* One member of a truss standing in a vertical plane. ang is its slope in\n         that plane, yaw turns the whole plane to face down the building. */\n      /* A MEMBER CUT TO THE ANGLE IT MEETS, NOT SAWN OFF SQUARE.\n\n         Trimming the webs to the chord faces put their ends in the right place;\n         they were still cut at right angles to their own length, so against a\n         sloping chord each one left a wedge of daylight. A saw cuts to the line\n         it meets -- so the end face is sheared to the angle between this member\n         and the one it lands on.\n\n         The shear moves the two vertices at one end along the member's own\n         length, which is the same thing the cladding does at a rake. No angle\n         is computed here: the caller knows both slopes and passes the\n         difference (Marek: profily na sebe nejsou napojene pod uhlem). */\n      function _inTruss(T, g, mat, len, sect, ang, yaw, cx, cy, cz, cutA, cutB, part, floorY, peak, endHi, endLo, clip) {\n        /* and every member's body and its cuts -- the core's too */\n        var mI = _TK.inTruss(T, g, mat, len, sect, ang, yaw, cx, cy, cz, cutA, cutB, part, floorY, peak, endHi, endLo, clip);\n        _lastBody = _TK.lastBody();\n        return mI;\n      }\n\n      /* _gableFaces: where the gable walls stand for the trusses -- the core's houseGableFaces (core-v808, status/modules.md 12) */\n      function _gableFaces() {\n        return API.houseGableFaces({ api: API, CHORD: CHORD, rakeReach: _rakeReach });\n      }\n      /* _trussStations: where the trusses stand -- the core's houseTrussStations (core-v808, status/modules.md 12) */\n      function _trussStations() {\n        return API.houseTrussStations({ api: API, CHORD: CHORD, PLATE: PLATE, gableFaces: _gableFaces });\n      }\n\n      /* THE TRUSS SHEETS ARE RECORDED BY THE CORE (trussRecorder, core-v254).\n\n         The distinct shapes with their counts, the hip end's members grouped\n         into the short trusses they are, the marks every body carries so one\n         instance can be photographed -- all of it moved to configurator-ui.js,\n         so the shed and the sauna record their trusses the same way. This file\n         still builds its roof and writes each truss and each hip member into the\n         recorder as it goes; the sections it hands over are its own. On a core\n         older than core-v254 nothing is recorded, the roof still builds, and the\n         truss list line says ERROR. */\n      var _TR = (typeof API.trussRecorder === 'function')\n        ? API.trussRecorder({ sections: function () { return { web: WEB, chord: CHORD }; },\n                              hipCodes: { web: 'ROT00002', chord: 'ROT00001' } })\n        : null;\n      if (!_TR) {\n        _TR = { missing: true, faceOutline: function () { return null; }, reset: function () {},\n                add: function () { return ''; }, sig: function () { return ''; }, collect: function () {},\n                hipRec: function () {}, hipPush: function () {}, hipGroup: function () {}, tag: function () {},\n                shapes: function () { return []; }, hipSheet: function () { return []; },\n                tagged: function () { return 0; }, grpSig: function () { return {}; } };\n      }\n      function _hipRec(a, b, dep, wid, tag, mesh, noPoly) { _TR.hipRec(a, b, dep, wid, tag, mesh, noPoly); }\n      function _hipGroup() { _TR.hipGroup(); }\n      function _trussSig(T2, big) { return _TR.sig(T2, big); }\n      function _trussCollect(T2, big) { _TR.collect(T2, big); }\n\n      function _buildTrusses(ctx, planes) {\n        _footFlat = { n: 0, worst: 0, ends: 0, endWorst: 0, oneCut: 0 };\n        _hipNo = 0; _hipSeq = 0; _calSeq = 0; _hipPostsDropped = 0;\n        if (typeof API.trusses !== 'function') { ctx.log('roof     THREW the shared truss module is missing -- configurator-ui.js core-v765 or later'); return null; }\n        return API.trusses(ctx, planes, {\n          api: API, CHORD: CHORD, PLATE: PLATE, STEEL: STEEL, WEB: WEB, TRUSS_PANELS: TRUSS_PANELS, TRUSS_TIE: TRUSS_TIE,\n          wood: STRUCT_WOOD,\n          TK: _TK, TR: _TR, fink: _fink, inTruss: _inTruss, hipGroup: _hipGroup, trussCollect: _trussCollect, trussSig: _trussSig,\n          stations: _trussStations, planes: roofPlanes,\n          lastBody: function () { return _lastBody; },\n          setTop: function (t) { _trussTop = t; }, setMemberPts: function (a) { _memberPts = a; }, setTally: function (t) { _trussTally = t; },\n          add: function (code, q) { _add('adu-roof', code, q); }\n        });\n      }\n\n      function _trussBoq() { return _rows('adu-roof'); }\n\n      /* --------------------------------------------------------------------------\n         PARTITIONS. The walls that divide the inside.\n\n         They were already in the state -- a direction, a position, and the two ends\n         -- because the floorplan step has been dropping them in for a while. Nobody\n         built them, so the plan said there were rooms and the model was one space.\n\n         THEY ARE NOT THE OUTSIDE WALL MADE THINNER. An exterior wall is a panel\n         that carries a roof, keeps weather out and holds insulation; a partition\n         divides a room. It gets a lighter stud, no sheathing, and a single top\n         plate, because there is nothing above it to spread a load into. Building it\n         from the same code as the shell would have been quicker here and wrong\n         everywhere after.\n\n         A LOAD-BEARING PARTITION IS A DIFFERENT THING and this is not it. When one\n         is needed -- a long span split in two, a wall under a beam -- it is an\n         exterior-grade panel standing inside, and it will say so.\n         -------------------------------------------------------------------------- */\n\n      var PART = {\n        t: 0.060,       /* the thin way, what the spacing is measured on */\n        d: 0.100,       /* 100 mm deep: room enough for services and a door lining */\n        code: 'KVH10060',\n        board: 0.0125   /* one plasterboard layer a side */\n      };\n\n      var _partTally = null;\n\n      /* the asset owns the door sizes; these are only what to fall back on when it\n         has not loaded yet */\n      var DOOR_W_DEF = 0.80;\n      var DOOR_H_DEF = 2.00;\n\n      function _inHole(holes, at) {\n        for (var i = 0; i < holes.length; i++) {\n          if (at > holes[i].a0 - PART.t && at < holes[i].a1 + PART.t) return true;\n        }\n        return false;\n      }\n\n      /* THE LINING AND THE LEAF.\n\n         A doorway with nothing in it reads as a hole in a stud wall; what somebody\n         recognises as a door is the white lining round the opening and a leaf\n         standing a little off the shut. Ajar rather than closed on purpose -- a\n         closed leaf flush in its frame is indistinguishable from a filled panel\n         from any angle the model is ever seen at.\n\n         A pass doorway gets the lining and no leaf, because that is what it is.\n\n         White: the placement was checked against the plan and accepted. */\n\n      /* THE UNIT AN INTERIOR DOOR IS BOUGHT AS (adu-v1404), one answer for the\n         exploded view's mark and for the bill. A hinged leaf by width and hand,\n         a double leaf, and the closet doors from the catalogue's closet round:\n         a bifold by the unit (an opening over 1.0 m takes two units of half\n         its width), a bypass by the set. */\n      function _intDoorUnit(H0) {\n        var wmm = Math.round(((H0.a1 - H0.a0) || H0.w || 0.8) * 1000), hand = (H0.hand === 'L') ? 1 : 2;\n        if (H0.kind === 'pair') return { code: (wmm >= 1680) ? 'ODI18001' : (wmm >= 1370) ? 'ODI16001' : 'ODI12001', n: 1 };\n        if (H0.kind === 'bifold') {\n          var two = wmm > 1000, uw = two ? wmm / 2 : wmm;\n          return { code: (uw >= 850) ? 'ODI09007' : (uw >= 700) ? 'ODI08007' : 'ODI06007', n: two ? 2 : 1 };\n        }\n        if (H0.kind === 'bypass') return { code: (wmm >= 1680) ? 'ODI18002' : (wmm >= 1370) ? 'ODI16002' : 'ODI12002', n: 1 };\n        return { code: (wmm >= 1750) ? 'ODI18001' : (wmm >= 1450) ? 'ODI16001' : (wmm >= 1150) ? 'ODI12001'\n                     : (wmm >= 850) ? ('ODI090' + '0' + hand) : (wmm >= 700) ? ('ODI080' + '0' + hand) : ('ODI060' + '0' + hand), n: 1 };\n      }\n      function _doorSet3D(T, g, p, vert, lo, hole, dh, y0) {\n        /* THE DOOR SET FROM THE SHARED MODULE (core-v783, status/modules.md 7b):\n           the lining, the casing, the leaf, the slider and the closet doors. */\n        if (typeof API.houseDoorSet !== 'function') return;\n        API.houseDoorSet(T, g, p, vert, lo, hole, dh, y0, {\n          layer: 'adu-partitions', MAGENTA: MAGENTA, PART: PART, isNew: isNew\n        });\n      }\n\n      /* THESE LIVE INSIDE THE ZONE THAT USES THEM.\n\n         PART_BOARD was declared above the banner, so the patch brought the code\n         that reads it and not the line that creates it: the whole partition layer\n         threw on the first frame and the snapshot said so --\n         \"SKIPPED adu-partitions THREW PART_BOARD is not defined\". No studs, no\n         wool, no board, and partitions present in the plan and absent in 3D.\n\n         A zone has to be self-contained or it is not a zone. */\n\n      /* 60 mm in a 100 mm stud: friction-fitted, and NOT squeezed against both\n         boards -- wool touching each face carries sound across instead of stopping\n         it, which is the only job it has in a partition. */\n      var PART_WOOL = { code: 'INS00601', t: 0.060 };\n\n      /* AND WHAT FIXES IT, WHICH THIS DID NOT HAVE.\n\n         The board was billed and nothing that holds it was: no screws, no tape, no\n         filler. The ceiling has all three and has had them for versions -- same\n         board, same 12.5 mm, same trade -- so the codes are the ones already in\n         use rather than a new family invented for the partitions. */\n      /* the transition strip at an interior door between two floor finishes:\n         ODD00003 by the metre, 40 wide, 5 thick, sits on the higher finish */\n      var DOOR_STRIP = { code: 'ODD00003', w: 0.040, t: 0.005 };\n\n      var PART_BOARD = {\n        t: 0.0125,\n        dry: { code: 'WDD24001', col: 0xEDEAE3 },\n        wet: { code: 'WDD24002', col: 0x7FA86B },\n        tape: 'WDF00008', filler: 'WDF00009', screw: 'WDS00001'\n      };\n\n      var _partDoorList = [];\n      /* THE PROJECT'S SLANTED WALLS (adu-v1410), ready to build: direction,\n         normal and angle, each end set where its corner closes, the doors as\n         holes in the wall's own along-coordinate. Ground floor only.\n\n         A SQUARE-CUT END ON A SLANT LEAVES A WEDGE. Stopped at the face it\n         meets, one corner of the end is in the other wall and the other\n         stands off it -- 35 mm at 45 degrees. So an end on a partition stops\n         where its far corner just touches that partition's face (the rest is\n         hidden in the other wall's core, which gets a stud to fix to), and an\n         end on an outer wall runs on until its board corner reaches the\n         inner face. A square partition comes out exactly as before: half a\n         thickness short of the centre line. */\n      /* THE SLANTED WALLS AS THE PLAN HOLDS THEM (adu-v1411), for the layers\n         that only need where they stand -- the floor and the electrics: the\n         centre line, its direction and normal, and the doors along it */\n      function _slantRaw() {\n        var L = (API.STATE.product && API.STATE.product.diagWalls) || [], out = [], i;\n        for (i = 0; i < L.length; i++) {\n          var gw = L[i];\n          if (!gw || !gw.a || !gw.b || (gw.st | 0) !== 0) continue;\n          var dx = gw.b[0] - gw.a[0], dz = gw.b[1] - gw.a[1], Ln = Math.hypot(dx, dz);\n          if (!(Ln > 0.3)) continue;\n          var ux = dx / Ln, uz = dz / Ln;\n          out.push({ id: gw.id || ('g' + (i + 1)), a: gw.a, b: gw.b, len: Ln, ux: ux, uz: uz, nx: -uz, nz: ux, ang: Math.atan2(uz, ux),\n                     mx: gw.a[0] + ux * Ln / 2, mz: gw.a[1] + uz * Ln / 2, doors: gw.doors || [] });\n        }\n        return out;\n      }\n      /* _diagWalls: the slanted partitions as built -- the core's houseDiagWalls (core-v807, status/modules.md 11) */\n      function _diagWalls(ctx) {\n        return API.houseDiagWalls(ctx, { api: API, DOOR_W_DEF: DOOR_W_DEF, PART: PART, PART_BOARD: PART_BOARD, spaceMap: _spaceMap });\n      }\n      function _buildPartitions(ctx) {\n        /* THE PARTITIONS FROM THE SHARED MODULE (core-v782, status/modules.md 6c):\n           the frame, the wool, the board, the doorways and the bill are written\n           once in configurator-ui.js; this product hands in its own pieces. */\n        if (typeof API.houseParts !== 'function') { ctx.log('partitions THREW the shared partitions module is missing -- configurator-ui.js core-v782 or later'); return; }\n        API.houseParts(ctx, {\n          api: API, layer: 'adu-partitions', wood: WOOD, MAGENTA: MAGENTA, PART: PART, PART_BOARD: PART_BOARD,\n          DOOR_W_DEF: DOOR_W_DEF, DOOR_H_DEF: DOOR_H_DEF, FINISH: FINISH, FRAME_NAIL: FRAME_NAIL,\n          billReset: _billReset, isNew: isNew, roomRects: _roomRects, inHole: _inHole, doorSet3D: _doorSet3D,\n          PART_WOOL: PART_WOOL, DOOR_STRIP: DOOR_STRIP, WALL_TILE: WALL_TILE, WET_TILE_H: WET_TILE_H,\n          FILLER_KG_M2: FILLER_KG_M2, boardCol: _boardCol, tileMat: _tileMat, wetAt: _wetAt,\n          showerOnFace: _showerOnFace, wallTileBill: _wallTileBill, intDoorUnit: _intDoorUnit, soffit: _ceilingSoffit,\n          diagWalls: _diagWalls,\n          paintReset: function () { _intPaintA = 0; }, paintAdd: function (a) { _intPaintA += a; },\n          doorListNew: function () { _partDoorList = []; return _partDoorList; },\n          setTally: function (t) { _partTally = t; }, framed: function () { _partFramed = true; },\n          add: function (code, q) { _add('adu-partitions', code, q); }\n        });\n      }\n\n      function _partitionsBoq() { return _rows('adu-partitions'); }\n\n      /* --------------------------------------------------------------------------\n         THE CEILING, AND ONLY WHERE THE ROOF DOES NOT ALREADY MAKE ONE.\n\n         A trussed gable comes with its ceiling: the bottom chord IS the ceiling\n         joist, level, spanning the whole width, which is most of why a truss is\n         worth its plates. A flat roof comes with one too -- its rafters are level,\n         so the underside is already a ceiling.\n\n         A MONO-PITCH HAS NEITHER. Its rafters slope, so the room under it either\n         follows the slope or gets a ceiling of its own, and that is a decision\n         somebody makes rather than a consequence. Until now the mono roof simply\n         had nothing underneath, which reads as a cathedral ceiling by accident --\n         the one outcome nobody chose.\n\n         Both are real: a raked soffit is the reason to build a mono-pitch at all,\n         and a flat ceiling is what you want over a bedroom. So it is a switch, and\n         the switch only exists on the roof that has the question.\n\n         The joists span between the two walls the rafters bear on, level at the\n         LOW wall's head, because that is the height the room has everywhere.\n         -------------------------------------------------------------------------- */\n      var CEIL_JOIST = { t: 0.060, d: 0.240, code: 'KVH60240' };\n\n      /* how far the roof drops across the room, which is what the choice is about */\n      var _ceilTally = null;\n\n      /* A FLAT CEILING IS ONLY A QUESTION ONCE THE ROOF LEANS ENOUGH TO NOTICE.\n\n         Below about five degrees the fall over a room is a few centimetres: the\n         soffit already reads as flat, and a separate ceiling under it would be a\n         whole layer of joists to hide a slope nobody can see. So the choice does\n         not exist there -- not greyed out, absent, because an option that never\n         makes sense is not a choice being withheld. */\n\n      /* A MONO-PITCH HAS A LEVEL CEILING, FULL STOP.\n\n         This used to ask two questions -- is the pitch steep enough to be worth\n         offering, and did the user say yes -- and a no to either left the roof with\n         no ceiling frame, which is what took the vapour barrier, the battens and\n         the plasterboard with it.\n\n         The frame exists whenever there is a mono roof over the room. Other things\n         still read the underside of it, so the answer has to come from here rather\n         than from deleting the function. */\n      function _ceilingWanted() {\n        return API.STATE.roof.type === 'mono';\n      }\n\n      /* THE UNDERSIDE OF THE CEILING FRAME, or null when there is no frame.\n\n         Asked by anything that has to stop below it. The joists are level with the\n         LOW wall head and hang down from it, so their soffit is a joist depth below\n         that -- and the number lives here rather than being worked out again by\n         whoever needs it, because two copies of it is how a partition ends up\n         through the ceiling. */\n      function _ceilingSoffit() {\n        if (!_ceilingWanted()) return null;\n        var lowY = Math.min(API.STATE.roof.eaveY != null ? API.STATE.roof.eaveY : API.wallTop(),\n                            API.wallTop());\n        return lowY - CEIL_JOIST.d;\n      }\n\n      var BLOWN = { code: 'INS00003', depth: 0.30, lam: 0.040 };\n\n      /* =========================================================================\n         THE BLOWN FILL, AND IT IS ONE SOLID STOOD ON THE BARRIER.\n\n         Brought over from tiny, including the decision that took it five attempts\n         to reach: loose fill is POURED, so it envelops the frame. The drawing does\n         not carve round the joists -- what the timber displaces comes off the BILL\n         instead, out of lengths already registered while the frame was built. It\n         is right plus or minus, and nobody is playing this to the centimetre.\n\n         AND IT LIVES OUT HERE, NOT INSIDE THE MONO-PITCH BRANCH.\n\n         I wrote it inside the part of the ceiling that only exists for a mono with\n         a flat ceiling ticked. Every other roof returns from that function on its\n         second line -- so on a gable the fill was never built, and a gable's\n         ceiling is exactly where loose fill belongs: a flat deck of bottom chords\n         with an attic over it, which is the classic case for blowing rather than\n         cutting batts.\n\n         Insulation belongs to whatever ceiling there IS. The caller says where the\n         deck is and how much timber is standing in it; this fills it.\n         ========================================================================= */\n      var CEIL_VB = { code: 'ROV00001', tape: 'INS01005', roll: 1.50, lap: 0.10 };\n      var CEIL_BATTEN = { code: 'KVR50030', w: 0.050, h: 0.030, spacing: 0.40, screw: 'FAS60100' };\n\n      /* =========================================================================\n         UNDER THE CEILING: THE BARRIER, THEN THE BATTENS.\n\n         THE BARRIER IS ON THE WARM SIDE, WHICH IS UNDERNEATH. The fill sits on the\n         deck and the barrier hangs below the frame -- if it went above the\n         insulation it would be trapping moisture in it rather than keeping moisture\n         out of it, which is the one way round that matters.\n\n         It is bought by the roll, not by the plan: a 1.5 m roll lapped 100 mm\n         covers 1.4 m, so the area on the drawing is not the area anyone buys. And\n         every lap is taped, so the tape follows from the number of runs rather than\n         being a percentage somebody guessed.\n\n         THE BATTENS RUN ACROSS THE MEMBERS, at 400 for plasterboard rather than the\n         600 the frame is on -- a ceiling board carries its own weight downwards and\n         sags between wider centres. They also hold the barrier up mechanically, so\n         it is pinched along every batten instead of hanging on its fixings, and the\n         30 mm they leave is where a cable goes without anyone piercing the barrier\n         to run it. That gap is the reason to batten a ceiling at all. */\n      /* THE ARGUMENT IS WHICH WAY THE MEMBERS RUN, NOT WHICH WAY THE BATTENS DO.\n\n         It used to be the batten direction, and the two callers disagreed about the\n         sense of it: the mono passed one, the gable passed the other, and on the\n         gable the battens came out PARALLEL to the chords -- lying along them\n         instead of crossing them, holding nothing and bridging nothing.\n\n         Perpendicular is not a decision, it is what a counter-batten IS. So the\n         caller says where the timber is and this works out the other way itself;\n         there is no longer a sense to get backwards. */\n      var CEIL_BOARD = {\n        dry: { code: 'WDD24001', col: 0xEDEAE3, label: 'gypsum board' },\n        wet: { code: 'WDD24002', col: 0x7FA86B, label: 'moisture-resistant board' },\n        t: 0.0125,\n        tape: 'WDF00008', filler: 'WDF00009', screw: 'WDS00001'\n      };\n\n      /* =========================================================================\n         THE BOARD, AND A BATHROOM GETS A DIFFERENT ONE.\n\n         The ceiling over a shower takes the steam the whole house makes, so it is\n         the one place a plain board goes soft. The catalogue carries the green one\n         -- WDD24002, MOISTURE-RESISTANT GYPSUM BOARD -- and it is drawn green here\n         for the same reason it is green in real life: so it is obvious from across\n         the room whether the right sheet went up.\n\n         WHICH ROOM IS WET IS THE FLOOR'S ANSWER, ASKED AGAIN. WET_ROOMS already\n         decides this for the tiling downstairs; a ceiling that made its own list\n         would be a second opinion about the same bathroom, and the two would part\n         company the first time a room was renamed.\n\n         Screws, tape and filler come out of the area rather than being a line\n         somebody adds later: 20 screws a square metre, the joints from the board\n         size, and the filler by area. */\n      /* _ceilBoard: in the shared ceiling module now (core-v780, API.houseCeiling) */\n\n      /* _ceilUnder: in the shared ceiling module now (core-v780, API.houseCeiling) */\n\n      function box2(T, g, mat, w, h, d, x, y, z) {\n        var mm = new T.Mesh(new T.BoxGeometry(w, h, d), mat);\n        mm.position.set(x, y, z);\n        g.add(mm);\n        return mm;\n      }\n\n      /* _ceilFill: in the shared ceiling module now (core-v780, API.houseCeiling) */\n\n      /* THE ATTIC HATCH (adu-v1454, carried from GARAGE APT garageapt-v29 / BARNDO\n         barndo-v26, IRC R807.1: an attic of 30 sq ft and 30 in. high wants one):\n         22 x 30 in., in a hall, the laundry or a closet, else the biggest dry\n         room, between two trusses -- none under a flat roof, whose rafter void\n         is no attic (as ANY HOUSE, anyhouse-lib-v40) */\n      var ADU_HATCH = { code: 'SIS00004', w: 22 * IN, l: 30 * IN };\n      /* and its catalogue row, as GARAGE APT registers it (garageapt-v29) */\n      if (!__CORE.CATALOG['SIS00004']) __CORE.CATALOG['SIS00004'] = { code: 'SIS00004', unit: 'pcs', label: 'Attic access hatch' };\n      function _buildCeiling(ctx) {\n        /* THE CEILING FROM THE SHARED MODULE (core-v780, status/modules.md 6b):\n           the fill, the joists, the barrier, the battens and the board are\n           written once in configurator-ui.js; this product hands in its own pieces. */\n        if (typeof API.houseCeiling !== 'function') { ctx.log('ceiling THREW the shared ceiling module is missing -- configurator-ui.js core-v780 or later'); return; }\n        API.houseCeiling(ctx, {\n          api: API, layer: 'adu-ceiling', wood: WOOD, MAGENTA: MAGENTA, CEIL_JOIST: CEIL_JOIST, CHORD: CHORD,\n          LEDGER: LEDGER, STUD: STUD, BLOWN: BLOWN, CEIL_BOARD: CEIL_BOARD, CEIL_VB: CEIL_VB, CEIL_BATTEN: CEIL_BATTEN,\n          FILLER_KG_M2: FILLER_KG_M2, INT_PAINT: INT_PAINT, WET_ROOMS: WET_ROOMS,\n          billReset: _billReset, isNew: isNew, box2: box2, boardCol: _boardCol, roomRects: _roomRects,\n          roomKey: _roomKey, roomLabel: _roomLabel, roofPlaneYAt: _roofPlaneYAt, skinLift: _skinLift,\n          trussStations: _trussStations, soffit: _ceilingSoffit, roofMembers: _roofMembers,\n          hatch: ((API.STATE.roof || {}).type === 'flat') ? null : ADU_HATCH,\n          setTally: function (t) { _ceilTally = t; },\n          paintTake: function (a) { var t = _intPaintA + a; _intPaintA = 0; return t; },\n          add: function (code, q) { _add('adu-ceiling', code, q); }\n        });\n      }\n\n      function _ceilingBoq() { return _rows('adu-ceiling'); }\n\n      /* --------------------------------------------------------------------------\n         THE JOINERY. What actually fills the hole.\n\n         Up to now an opening was a gap in the framing, which is the right thing for\n         the frame to know about and the wrong thing to show anybody: a house with\n         holes in it does not read as a house, and you cannot judge a window you\n         cannot see.\n\n         IT IS ITS OWN LAYER, not part of the wall. A window is bought, not built --\n         different trade, different lead time, different line in the budget -- and\n         keeping it separate means the stage view can strip it off to show the frame\n         underneath, which is exactly what somebody checking the structure wants.\n\n         THE UNIT SITS IN THE CLEAR OPENING, not the rough one. The frame fills the\n         hole the framing left; the gap around it is the fitting tolerance and the\n         insulation, and pretending it is not there is how a model ends up showing a\n         window that will not go in.\n         -------------------------------------------------------------------------- */\n      var JOINERY = {\n        frame: 0.070,     /* the visible face of a frame section */\n        depth: 0.080,\n        glass: 0.024,     /* a sealed double unit */\n        leaf:  0.045,     /* a door leaf */\n        tol:   0.010      /* the gap the unit is fitted into */\n      };\n      var GLASS_C = 0xBFD4DC, FRAME_C = 0xF2F0EC, LEAF_C = 0xD9D2C7;\n      var ACCENT_N = 0xD2A878;   /* the guide's gold, as a number for a material */\n\n      var _joinTally = null;\n\n      var _joinChk = [], _joinSeat = [];\n      function _buildJoinery(ctx) {\n        /* THE JOINERY FROM THE SHARED MODULE (core-v783, status/modules.md 7a):\n           the units, their frames, leaves and panes, the walk-through, the bill\n           and the fixings are written once in configurator-ui.js; this product\n           hands in its own pieces. */\n        if (typeof API.houseJoinery !== 'function') { ctx.log('joinery THREW the shared joinery module is missing -- configurator-ui.js core-v783 or later'); return; }\n        API.houseJoinery(ctx, {\n          api: API, layer: 'adu-joinery', MAGENTA: MAGENTA, JOINERY: JOINERY, JOIN_FIX: JOIN_FIX,\n          frameCol: colorOf('joinery'), leafCol: LEAF_C, glassCol: GLASS_C, accent: ACCENT_N,\n          opEdit: function () { return (typeof opEdit === 'function') ? opEdit() : false; },\n          billReset: _billReset, isNew: isNew, setTally: function (t) { _joinTally = t; },\n          atSeen: function () { return _atSeen; },\n          add: function (code, q) { _add('adu-joinery', code, q); }\n        });\n      }\n\n      function _joineryBoq() { return _rows('adu-joinery'); }\n\n      /* --------------------------------------------------------------------------\n         LAYER 3 -- THE ROOF.\n\n         EVERY MEMBER IS PLACED THE SAME WAY: take a box lying along +X, tilt it by\n         the pitch, turn it to face down the slope, and drop it on the plane. Two\n         rotations applied to the geometry, in that order, every time.\n\n         That replaces building each member from a direction vector and letting\n         three.js work out the rotation. It cannot: a direction fixes two of the\n         three angles and leaves the ROLL free, so every rafter came out spun a\n         random amount about its own length. That is the whole list of defects at\n         once -- rafters leaning, the sheathing warped, and one plane's boards\n         landing above the rafters while the other's sank below them, because the\n         roll that happened to come out was different on each side.\n\n         The flat roof is the same code with the pitch at zero.\n\n         Simple geometry, so: no quaternions, no interpolation helpers, and about\n         forty lines less than it replaces.\n         -------------------------------------------------------------------------- */\n      var RAFTER = {\n        t: 0.060,\n        d: 0.240,      /* the starting section; the span picks the real one below */\n        deck: 0.018,\n        code: 'KVH60240'\n      };\n\n      /* WHAT SPANS WHAT.\n\n         A mono-pitch rafter crosses the building in one piece -- it has no ridge to\n         land on halfway, which is exactly why the beam down the middle was wrong:\n         it cut through every rafter it was meant to help. A member either reaches\n         or it does not.\n\n         So the SECTION is chosen from the span, rather than the span being broken\n         to suit the section. The rule of thumb is about twenty times the depth for\n         a roof member at 600 centres -- deliberately conservative, and it wants\n         checking against a real span table before any of this is sold.\n\n         The deepest one runs out around 8 m, and that is where the building has to\n         stop getting wider. A gable has no such limit: its trusses are engineered\n         to the span, which is the honest reason to offer a wider building on one.\n         ------------------------------------------------------------------------ */\n      /* SOLID TIMBER FIRST, THEN I-JOISTS. Solid stops at 100x200 -- about 4 m --\n         which is not a roof anybody wants to sell. An I-joist is the standard\n         answer to exactly this span and is what a rafter roof of this width is\n         built from, so the deeper sections are there and the shallow ones are still\n         preferred where they reach.\n\n         THE FOUR KVI CODES DO NOT EXIST IN THE CSV YET. They follow the catalogue's\n         own shape -- three letters and five digits, flange then depth, the way KVH\n         reads -- but somebody has to create the rows before a supplier can price\n         them. The snapshot says so on every build rather than letting them look\n         settled. */\n      var MONO_SECTIONS = [\n        { t: 0.060, d: 0.200, code: 'KVH60200', label: '60x200' },\n        { t: 0.060, d: 0.240, code: 'KVH60240', label: '60x240' },\n        { t: 0.045, d: 0.300, code: 'KVI45300', label: 'I-joist 45x300' },\n        { t: 0.045, d: 0.360, code: 'KVI45360', label: 'I-joist 45x360' },\n        { t: 0.045, d: 0.400, code: 'KVI45400', label: 'I-joist 45x400' }\n      ];\n      var SPAN_PER_DEPTH = 20;\n\n      function _monoSection(span) {\n        var best = MONO_SECTIONS[0], i;\n        for (i = 0; i < MONO_SECTIONS.length; i++) {\n          if (MONO_SECTIONS[i].d * SPAN_PER_DEPTH >= span) return MONO_SECTIONS[i];\n          if (MONO_SECTIONS[i].d > best.d) best = MONO_SECTIONS[i];\n        }\n        return best;\n      }\n      function _monoMaxSpan() {\n        var d = 0, i;\n        for (i = 0; i < MONO_SECTIONS.length; i++) if (MONO_SECTIONS[i].d > d) d = MONO_SECTIONS[i].d;\n        return d * SPAN_PER_DEPTH;\n      }\n\n      /* THE SECTION THE WALL AND THE ROOF BOTH HAVE TO AGREE ON.\n\n         The parapet's height is the rafter depth plus the deck plus the upstand, so\n         the WALL needs the rafter section -- and the wall is built before the roof.\n         Reading it off RAFTER.d, which the roof sets while it builds, gave the wall\n         last rebuild's number: a parapet sized for the section the building used to\n         have. Both ask this instead, and it depends on nothing but the plan. */\n      function roofSection() {\n        var f = API.STATE.footprint;\n        var alongL = (API.STATE.roof.axis === 'l');\n        var span = (alongL ? f.w : f.l) + 2 * (API.STATE.roof.eave + API.facadeThk());\n        return _monoSection(span);\n      }\n\n      /* WHAT A 2x12 AT 24 IN CENTRES ACTUALLY CROSSES on a roof, with a margin.\n         A rafter roof is capped at this; a trussed one is not capped at all. */\n\n      /* One member on a sloping plane.\n           len   along the slope        w   across it, horizontally\n           thk   square to the plane    slope, yaw  where the plane faces\n           above  how far off the plane, square to it -- negative is under */\n      function _onPlane(T, g, mat, len, w, thk, slope, yaw, cx, cy, cz, above) {\n        var geo = new T.BoxGeometry(len, thk, w);\n        geo.rotateZ(slope);\n        geo.rotateY(yaw);\n        var s = Math.sin(slope), c = Math.cos(slope);\n        /* the plane's normal, in the vertical plane that contains the fall */\n        var nx = -s * Math.cos(yaw), ny = c, nz = s * Math.sin(yaw);\n        geo.translate(cx + nx * above, cy + ny * above, cz + nz * above);\n        g.add(new T.Mesh(geo, mat));\n      }\n\n      /* Turn the recorded stud positions into rafter positions along the low edge:\n         each one shifted just clear of its stud, and any that would then land on\n         ANOTHER stud dropped -- which is what happens at the ends, where two studs\n         stand 51 mm apart and only one of them can have a rafter beside it. */\n    /* ===== ZONE B -- replace from here to the END of the file ============ */\n\n      /* The roof from its geometry up: sections, rafter set-out, plane\n         heights, eave posts, gutters and the whole build-up. */\n\n      function _monoSection(span) {\n        var best = MONO_SECTIONS[0], i;\n        for (i = 0; i < MONO_SECTIONS.length; i++) {\n          if (MONO_SECTIONS[i].d * SPAN_PER_DEPTH >= span) return MONO_SECTIONS[i];\n          if (MONO_SECTIONS[i].d > best.d) best = MONO_SECTIONS[i];\n        }\n        return best;\n      }\n      function _monoMaxSpan() {\n        var d = 0, i;\n        for (i = 0; i < MONO_SECTIONS.length; i++) if (MONO_SECTIONS[i].d > d) d = MONO_SECTIONS[i].d;\n        return d * SPAN_PER_DEPTH;\n      }\n\n      /* THE SECTION THE WALL AND THE ROOF BOTH HAVE TO AGREE ON.\n\n         The parapet's height is the rafter depth plus the deck plus the upstand, so\n         the WALL needs the rafter section -- and the wall is built before the roof.\n         Reading it off RAFTER.d, which the roof sets while it builds, gave the wall\n         last rebuild's number: a parapet sized for the section the building used to\n         have. Both ask this instead, and it depends on nothing but the plan. */\n      function roofSection() {\n        var f = API.STATE.footprint;\n        var alongL = (API.STATE.roof.axis === 'l');\n        var span = (alongL ? f.w : f.l) + 2 * (API.STATE.roof.eave + API.facadeThk());\n        return _monoSection(span);\n      }\n\n      /* WHAT A 2x12 AT 24 IN CENTRES ACTUALLY CROSSES on a roof, with a margin.\n         A rafter roof is capped at this; a trussed one is not capped at all. */\n\n      /* One member on a sloping plane.\n           len   along the slope        w   across it, horizontally\n           thk   square to the plane    slope, yaw  where the plane faces\n           above  how far off the plane, square to it -- negative is under */\n      function _onPlane(T, g, mat, len, w, thk, slope, yaw, cx, cy, cz, above) {\n        var geo = new T.BoxGeometry(len, thk, w);\n        geo.rotateZ(slope);\n        geo.rotateY(yaw);\n        var s = Math.sin(slope), c = Math.cos(slope);\n        /* the plane's normal, in the vertical plane that contains the fall */\n        var nx = -s * Math.cos(yaw), ny = c, nz = s * Math.sin(yaw);\n        geo.translate(cx + nx * above, cy + ny * above, cz + nz * above);\n        g.add(new T.Mesh(geo, mat));\n      }\n\n      /* _rafterStepsFromStuds: a flat roof's rafters set out from the studs -- the core's houseRafterSteps (core-v807, status/modules.md 11) */\n      function _rafterStepsFromStuds(lo, runLen) {\n        return API.houseRafterSteps(lo, runLen, { api: API, STUD: STUD, RAFTER: RAFTER, bearStuds: _bearStuds });\n      }\n\n      /* =========================================================================\n         POSTS UNDER A DEEP EAVE, AND THEY ARE FOUNDED LIKE THE BUILDING.\n\n         Copied from the shed, which has this settled and settled for reasons worth\n         keeping:\n\n           a post appears only past a threshold overhang -- a 600 mm eave carries\n           itself, a 2 m one does not, and putting a post under every eave would be\n           a porch nobody asked for;\n\n           it is tucked IN from the edge, so it reads as sheltered rather than\n           standing on the lip;\n\n           and its footing is whatever the building stands on. STATE.foundation is\n           read, not assumed: screws get a screw, piers get a pier, pads get a pad.\n           A post on a different footing from the house it belongs to is the kind\n           of thing that looks fine on screen and is nonsense on site.\n\n         The socket is the shed's too -- a galvanised cradle standing proud so the\n         timber never touches the ground. Its own comment is blunt about why.\n         ========================================================================= */\n      var EAVE_POST = {\n        trigger: 1.5,          /* an overhang past this earns a post */\n        w:       0.100,        /* 4x4 -- the same post as the pergola's (adu-v1363, Marek) */\n        postCode: 'KVH10100',  /* 4x4 dimensional lumber, by the metre */\n        base:    'FAT00017',   /* black steel post base on whatever footing is under it */\n        inset:   0.15,         /* tucked in from the roof edge */\n        spacing: 2.4,          /* along the eave */\n        code:    'KVH10200',   /* 100x200, the nearest section the catalogue stocks */\n        socket:  'FGR00002',   /* U head post adapter -- the building's own */\n        screw:   'FGR00004'    /* AND ITS OWN SCREW: 1500x102, the same one under\n                                  the house. It was drawn and never billed, which\n                                  is what looked odd -- a post standing on nothing\n                                  anybody paid for. */\n      };\n\n      /* _roofPlaneYAt: the lowest roof plane over a point -- the core's houseRoofPlaneYAt (core-v807, status/modules.md 11) */\n      function _roofPlaneYAt(px, pz) {\n        return API.houseRoofPlaneYAt(px, pz);\n      }\n\n      /* THE PLANE IS ALREADY THE UNDERSIDE. This subtracted a rafter depth from it,\n         which put every header a whole rafter low -- the gap he could see under the\n         trusses. The roof builder says so twelve lines away, in its own words:\n\n           \"ON THE PLANE, NOT UNDER IT. The plane the core hands back is the BEARING\n            line -- the top of the plate the rafter lands on -- so the rafter stands\n            on it.\"\n\n         So the plane is three things at once and they are all the same line: the\n         top of the wall plate, the underside of the rafter, and what a post has to\n         reach. Nothing is subtracted.\n\n         THE PLATE IS THE ONE EXCEPTION. A post that bears on the PLATE rather than\n         on a rafter has to stop at the plate's UNDERSIDE, which is one plate down\n         from that line -- and on a mono the plate is raked, so it is one plate down\n         from the plane AT THAT POINT, not from the low wall head. */\n      function _rafterSoffitAt(px, pz) {\n        return _roofPlaneYAt(px, pz);\n      }\n\n      /* AND THE PLATE IS ONLY RAKED ON A MONO.\n\n         This read the roof plane for the plate as well, which is right on a\n         mono-pitch -- there the plane IS the plate top, climbing with the wall. On\n         a gable it is not: the plate sits LEVEL on the wall head and the plane\n         above it is the SLOPE, rising toward the ridge. A post 700 mm in from the\n         eave was therefore given the slope's height at that point and came out\n         that much too tall.\n\n         Level on a gable, plane on a mono, and one plate down from either. */\n      function _plateSoffitAt(px, pz) {\n        var y = _isTrussed() ? API.wallTop() : _roofPlaneYAt(px, pz);\n        return (y == null) ? null : (y - API.plateZone());\n      }\n\n      /* HOW FAR THE PLATE REACHES: to the OUTER FACE OF THE LAST TRUSS, which is\n         what it is there to carry -- and nothing past it.\n\n         The end station is set out from the frame: overhang, in by a nail plate\n         and half a chord (_trussStations). Its outer face is therefore the\n         overhang less a nail plate from the frame, and that is where the plate\n         ends. It used to add the facade thickness as well, which is what the\n         ROOF EDGE does and the truss does not: 145 mm of plate ran past the last\n         truss into the air and out through the facade at every small overhang,\n         on the gable and on the hip alike. The posts and the profile across them\n         stand under this same line, so they move in with it. */\n      /* AND NEVER THROUGH THE FACADE. With the smallest overhang the end truss\n         would stand 88 mm past the frame, which is inside the render and 13 mm\n         through the boards. His call: hide it, do not let it out -- so when the\n         outermost member would land inside the facade or within 50 mm of its\n         face, it is pulled back to 10 mm inside that face and the plates end\n         there with it. Anything deeper than that is a real overhang and keeps\n         its full reach: v855 capped every overhang and took the trusses and the\n         posts off a 1.5 m rake with it, which was wrong. */\n      /* AND THE NAIL PLATES ARE INSIDE TOO. The member was pulled 10 mm inside\n         the boards and its plates, 12 mm proud of its face, came out 2 mm in\n         front of them -- a row of steel squares on a boarded gable with no\n         overhang. The plate is part of the member: it is the plate that stays\n         10 mm inside the face. */\n      function _rakeReach(ovv) {\n        var natural = ovv - PLATE.t, face = API.facadeThk();\n        if (natural <= face + 0.050) return Math.min(natural, face - 0.010 - PLATE.t);\n        return natural;\n      }\n      function _plateEndReach(ovv) {\n        return _rakeReach(ovv);\n      }\n      /* HOW FAR PAST THE FRAME THE OUTERMOST TRUSS AT ONE END STANDS, to its\n         outer face, read off the stations the roof is built on (adu-v1402);\n         0 when none stands past the frame, null when the roof is not trussed */\n      function _plateTrussReach(lowEnd) {\n        if (!_isTrussed()) return null;\n        var st = [];\n        try { st = _trussStations() || []; } catch (e) { st = []; }\n        if (!st.length) return 0;\n        var R = API.STATE.roof || {}, B = _buildRect(), alongL = (R.axis === 'l');\n        var mn = Math.min.apply(null, st), mx = Math.max.apply(null, st);\n        var e = lowEnd ? ((alongL ? B.z0 : B.x0) - (mn - CHORD.t / 2))\n                       : ((mx + CHORD.t / 2) - (alongL ? B.z1 : B.x1));\n        return (e > 0.005) ? e : 0;\n      }\n\n      function _eavePosts(ctx) {\n        if (typeof API.eavePosts !== 'function') { ctx.log('posts    THREW the shared eave posts module is missing -- configurator-ui.js core-v762 or later'); _postPts = []; return null; }\n        return API.eavePosts(ctx, {\n          api: API, EAVE_POST: EAVE_POST, WEB: WEB, CHORD: CHORD, PLATE: PLATE,\n          over: _roofOver, rect: _buildRect, screwPile: _screwPile,\n          plateEndReach: _plateEndReach, rafterSoffitAt: _rafterSoffitAt, plateSoffitAt: _plateSoffitAt,\n          timber: isNew('adu-roof') ? MAGENTA : colorOf('timber'),\n          setPts: function (a) { _postPts = a; },\n          add: function (code, q) { _add('adu-roof', code, q); }\n        });\n      }\n\n    /* ===== ZONE C -- replace from here to the END of the file ============ */\n\n      /* The roof itself: trusses, rafters, posts, gutters and the skin */\n\n      function _buildRoof(ctx) {\n        /* THE ROOF FRAME FROM THE SHARED MODULE (core-v784, status/modules.md 8a):\n           the hand-over to the trusses, the rafters, the ridge board, the ties and\n           the order of posts, build-up and gutters are written once in\n           configurator-ui.js; this product hands in its own pieces. */\n        if (typeof API.houseRoof !== 'function') { ctx.log('roof     THREW the shared roof frame module is missing -- configurator-ui.js core-v784 or later'); return; }\n        API.houseRoof(ctx, {\n          api: API, layer: 'adu-roof', wood: STRUCT_WOOD, RAFTER: RAFTER, STUD: STUD, TRUSS_TIE: TRUSS_TIE,\n          EAVE_POST: EAVE_POST, GUT: GUT, show: { trusses: SHOW_TRUSSES, posts: SHOW_POSTS, gutters: SHOW_GUTTERS },\n          billReset: _billReset, TR: _TR, TK: _TK, trussSides: _trussSides, onPlane: _onPlane,\n          rafterSteps: _rafterStepsFromStuds, trussStations: _trussStations, roofSection: roofSection,\n          bearStuds: function () { return _bearStuds; }, memberPts: function (a) { _memberPts = a; },\n          members: function (m) { _roofMembers = m; }, frameMark: true,\n          buildTrusses: _buildTrusses, eavePosts: _eavePosts, roofSkin: _roofSkin, gutters: _gutters,\n          outletReset: function () { _outletTaken = []; },\n          paint: { on: function (v) { _trussPaintOn = v; _trussPaintMats = null; }, isOn: function () { return _trussPaintOn; },\n                   ORDER: TRUSS_PAINT_ORDER, NAME: TRUSS_PAINT_NAME, PLAIN: TRUSS_PLAIN },\n          add: function (code, q) { _add('adu-roof', code, q); }\n        });\n      }\n\n      /* --------------------------------------------------------------------------\n         THE RAIL. Three buttons do their job, the rest report themselves as stubs.\n         No budget button: the money lives in the floating bar and in the price\n         widget now, so nothing here opens that drawer.\n         -------------------------------------------------------------------------- */\n\n      /* THE RAIL AND UNDO ARE THE CORE'S (core-v316): railBind(), undoPush(), railCounters() */\n\n      /* --------------------------------------------------------------------------\n         SHARE. The liquid asks the lib for the dimensions rather than scraping them\n         off the screen, because a shared liquid cannot know which product's numbers\n         are in which element.\n         -------------------------------------------------------------------------- */\n      function shareDims() {\n        return {\n          L: API.STATE.footprint.l,\n          W: API.STATE.footprint.w,\n          H: API.apexY(),\n          unit: API.STATE.isMetric ? 'm' : 'ft'\n        };\n      }\n\n      /* --------------------------------------------------------------------------\n         SNAPSHOT. The core's report, plus what only this product knows -- and above\n         all, WHAT IS STILL A STUB. While most of the interface is scaffolding, the\n         most useful line in the whole snapshot is the one saying which parts are\n         scaffolding.\n         -------------------------------------------------------------------------- */\n      /* snapshotAdu: the snapshot -- the core's houseSnapshot (core-v810, status/modules.md 13) */\n      function snapshotAdu() {\n        return API.houseSnapshot({ api: API, VERSION: VERSION, LIQUID_MIN: LIQUID_MIN, VIDEO_ID: VIDEO_ID,\n          stubs: _stubs, stubNames: _stubNames, wizSteps: wizSteps });\n      }\n\n      /* --------------------------------------------------------------------------\n         BOOT\n         -------------------------------------------------------------------------- */\n      function bootAdu() {\n        var B = BOOTDATA();\n\n        /* A fresh page opens as the default unit. A saved project keeps whatever it\n           saved -- loadPref runs inside the core boot and overwrites these. */\n        API.STATE.storeys = ADU.storeys;\n        /* SNAPPED TO THE SHEET OF WHATEVER SYSTEM IS IN FORCE. The size is written\n           in feet, and 24 ft left alone under metric boards is 6.096 of them -- so\n           the supports and the sheathing both came off the module and the plan\n           quietly stopped being whole while still reading as a round number. */\n        API.STATE.footprint.w = API.snapDim(ADU.footprint.w);\n        API.STATE.footprint.l = API.snapDim(ADU.footprint.l);\n        API.STATE.clearH[0] = ADU.clear;\n        API.STATE.roof.type = ADU.roofType;\n        API.STATE.roof.pitch = ADU.pitch;\n        API.STATE.roof.axis = ADU.axis;\n        API.STATE.roof.eave = ADU.eave;\n        API.STATE.roof.rake = ADU.rake;\n        /* ONLY A FLAT ROOF HAS A PARAPET (adu-v1409, Marek: porad nejde presah\n           strechy u ADU, ktery fungoval; u sauny a shedu to neni problem). The\n           default said parapet ON with a gable roof -- meant as \"a flat roof\n           gets its parapet\" -- and the core reads the flag as it stands: no\n           overhang ghost on Roof & Base, no posts under a deep eave, no rake\n           reach on the plates. The sauna and the shed default it off, which is\n           why only the ADU lost the drag. The Parapet tile sets it again with\n           the flat roof, so nothing is lost by keeping it off otherwise. */\n        API.STATE.roof.parapet = !!(ADU.parapet && ADU.roofType === 'flat');\n        /* A GABLE IS TRUSSED AND ITS TRUSSES ARE ENGINEERED TO THE SPAN, so it has\n           no cap. The other two carry rafters, and a rafter reaches only as far as\n           the deepest section on the shelf. */\n        API.setSpanRule(function (kind) {\n          /* A HIP SPANS WHAT A GABLE SPANS, and both stop at the width an ordinary\n             truss is made in -- LIMITS.maxW rather than nothing at all. A mono is\n             held by its own rafter depth, which is the tighter of the two. */\n          if (kind === 'gable' || kind === 'hip') return LIMITS.maxW;\n          return Math.min(_monoMaxSpan(), LIMITS.maxW);\n        });\n        if (ADU.parapet && ADU.roofType === 'flat') API.STATE.roof.eave = 0;\n\n        /* REGISTERED BEFORE BOOT, so the first build already has it: a layer added\n           afterwards is only picked up by the next rebuild, and nothing guarantees\n           one happens. */\n        /* THE MODEL THIS PAGE OPENS ON. A bare /products/adu came up on the bare\n           defaults -- a box -- and the first thing anybody sees should be the\n           house. The id is the one the share link carries, so replacing it is a\n           matter of configuring a model, sharing it and pasting the id here\n           (Marek: zapect jako default model pri nacteni).\n\n           A visitor who arrives with their own ?p= or #c= keeps theirs; this\n           only fills the gap when the URL names nothing. */\n        try { API.setDefaultModel('u96aq6gj'); } catch (eDM) {}\n\n        API.setVizStages(vizList());\n\n        /* ONE TRIGGER, NOT TWO -- AND THE SLATS HUNG ON THE DIFFERENCE.\n\n           The shared asset carries its own idea of when a side earns posts\n           (1.0 m of overhang) and this product stands one past 1.5 m. Between\n           those two numbers the asset divided the side into bays and clad them\n           while the roof builder had put up no post at all: slats standing in\n           the air, tied to timber that does not exist. Neither half was wrong\n           on its own; they were answering the same question with two numbers.\n\n           The asset has a setter for exactly this, so the product's own numbers\n           go in and the rule stops being written twice (Marek: jsou vazane na\n           sloupy). Spacing goes with it -- it is what the asset divides a side\n           by when it has to guess. */\n        try { API.setPostTrigger(EAVE_POST.trigger); } catch (ePT) {}\n        try { API.setPostSpan(EAVE_POST.spacing); } catch (ePS) {}\n\n        /* --------------------------------------------------------------------\n           IN PLAN MODE, ONLY THE PLAN IS BUILT.\n\n           The plan layer went in and the model stayed exactly where it was, so\n           looking down showed rafters and joists with four flat slabs somewhere\n           underneath. Of course it did: adding a layer adds a layer, and the eight\n           already there had no reason to stand down.\n\n           A plan is not a view of the model, it is a DIFFERENT DRAWING of the same\n           building -- one that shows the walls cut through at waist height and\n           nothing above. So every layer but the plan is skipped while it is up,\n           through one wrapper at registration rather than an early return written\n           into each of them, because the eighth one would be the one somebody\n           forgets.\n\n           THE BILL IS MADE EITHER WAY, AND IT WAS NOT.\n\n           The line above used to say the BoQ was untouched because it ran off the\n           same tallies. That was wrong about this file: nearly every layer calls\n           _add INSIDE its build3d, so returning early threw the bill away with the\n           geometry. Drag the plan about and the price sat still; step away from the\n           floorplan, the layers built, and the number jumped -- which is exactly\n           what he reports.\n\n           So plan mode no longer skips the builder. It runs it into a group that\n           is never added to the stage: the bill is made, the geometry is not seen.\n           Nothing is disposed on the way out on purpose -- a mesh that was never\n           rendered has no buffer on the card to free, and calling dispose on\n           materials that a cached texture is hanging off is a way to break the\n           next 3D pass for no gain. The group is simply dropped. */\n        var _reg = API.registerLayer;\n        API.registerLayer = function (def) {\n          if (def && def.build3d) {\n            var inner = def.build3d;\n            def.build3d = function (ctx) {\n              if (!_planWanted()) return inner(ctx);\n              var T = ctx && ctx.THREE;\n              if (!T || !T.Group) return;\n              var spare = new T.Group(), c2 = {}, k;\n              for (k in ctx) { if (ctx.hasOwnProperty(k)) c2[k] = ctx[k]; }\n              c2.group = spare;\n              return inner(c2);\n            };\n          }\n          return _reg.call(API, def);\n        };\n\n        /* OVERHEAD FIRST, AND NOT THROUGH THE WRAPPER ABOVE.\n\n           Two reasons, and they are the same reason twice. It is registered first\n           so the build step can never gate it out: a half-built model still costs\n           its permits. And it goes through _reg directly rather than the wrapper,\n           because the wrapper returns early in plan mode -- which is right for\n           anything that draws, and wrong for the one layer whose build3d IS its\n           takeoff. The comment above says a plan on screen still prices a whole\n           building; this is what keeps that true.\n\n           It draws nothing. There is nothing to draw: these are the costs that sit\n           beside the materials rather than on the site. */\n        /* AND A SAVED PROJECT THAT CARRIES THE OLD FLAG WITH A PITCHED ROOF IS\n           PUT RIGHT ON ITS FIRST BUILD (adu-v1409): the overhead layer is built\n           first on every build, so this runs before anything reads the roof. */\n        /* AND THE OTHER WAY ROUND (adu-v1423, Marek: u atiky se nam negeneruji\n           vrstvy fasady az po oplechovani atiky). On the ADU a flat roof IS the\n           parapet roof -- the Parapet tile sets the type and the flag together.\n           A flat roof that came without the flag (a saved project, a script\n           setting only the type) got the parapet studs, which follow the TYPE,\n           but no facade above the head, which follows the FLAG: raw timber\n           between the render or boarding and the coping. The flag is set here\n           with the tile's other two values, before anything reads the roof. */\n        function _roofFlagFix(ctx) {\n          var Rf = API.STATE.roof;\n          if (!Rf) return;\n          if (Rf.type === 'flat' && !Rf.parapet) {\n            Rf.parapet = true; Rf.eave = 0; Rf.pitch = 0;\n            try { ctx.log('ROOF parapet flag SET -- a flat roof on the ADU is the parapet roof (eave 0, pitch 0), so the facade runs up the parapet to the coping (adu-v1423)'); } catch (eRs) {}\n            return;\n          }\n          if (Rf.type === 'flat' || !Rf.parapet) return;\n          Rf.parapet = false;\n          try { ctx.log('ROOF parapet flag cleared -- the roof is ' + Rf.type + ' and only a flat roof has a parapet; the overhang ghost is back on Roof & Base'); } catch (eRf) {}\n        }\n        _reg.call(API, {\n          id: 'adu-overhead',\n          version: VERSION,\n          role: 'rezie',\n          claims: [],\n          build3d: function (ctx) { _roofFlagFix(ctx); return _buildOverhead(ctx); },\n          boq: function () { return _rows('adu-overhead'); }\n        });\n\n        API.registerLayer({\n          id: 'adu-stud-wall',\n          version: VERSION,\n          role: 'nosna',\n          claims: ['wall', 'parapet'],\n          build3d: _buildStudWall,\n          boq: function () { return _rows('adu-stud-wall'); }\n        });\n        API.registerLayer({\n          id: 'adu-base',\n          version: VERSION,\n          role: 'nosna',\n          claims: ['base'],\n          build3d: _buildFoundation,\n          boq: _footBoq\n        });\n\n        API.registerLayer({\n          id: 'adu-floor',\n          version: VERSION,\n          role: 'nosna',\n          claims: ['floor'],\n          build3d: _buildFloor,\n          boq: function () { return _rows('adu-floor'); }\n        });\n        API.registerLayer({\n          id: 'adu-partitions',\n          version: VERSION,\n          role: 'pricky',\n          claims: ['partitions'],\n          build3d: _buildPartitions,\n          boq: _partitionsBoq\n        });\n\n        /* THE WALL SKIN BUILDS AFTER THE ROOF (the closures read the hip's\n           jacks and the roof profile) -- the registration below is deferred to\n           the end of this list */\n        var _wallLayerDef = {\n          id: 'adu-wall',\n          version: VERSION,\n          role: 'nosna',\n          claims: [],\n          build3d: _buildWallBattens,\n          boq: function () { return _rows('adu-wall'); }\n        };\n\n        API.registerLayer({\n          id: 'adu-ceiling',\n          version: VERSION,\n          role: 'nosna',\n          claims: ['ceiling'],\n          build3d: _buildCeiling,\n          boq: _ceilingBoq\n        });\n\n        API.registerLayer({\n          id: 'adu-joinery',\n          version: VERSION,\n          role: 'otvory',\n          claims: ['joinery'],\n          build3d: _buildJoinery,\n          boq: _joineryBoq\n        });\n\n        API.registerLayer({\n          id: 'adu-roof',\n          version: VERSION,\n          role: 'strecha',\n          claims: ['roof'],\n          build3d: _buildRoof,\n          boq: _trussBoq\n        });\n        API.registerLayer(_wallLayerDef);   /* the wall skin, after the roof it reads */\n        API.registerLayer({\n          id: 'adu-fitout',\n          version: VERSION,\n          role: 'fitout',\n          claims: ['fitout'],\n          build3d: _buildFitout,\n          boq: function () { return _rows('adu-fitout'); }\n        });\n        API.registerLayer({\n          id: 'adu-elec',\n          version: VERSION,\n          role: 'tzb',\n          claims: ['elec'],\n          build3d: _buildElec,\n          boq: function () { return _rows('adu-elec'); }\n        });\n        /* THE HEATING, from the shared MEP asset (adu-v1421): a multi-split by\n           calculation. Registered right after the electrics, so it builds\n           after them and its feed starts from the board they placed. */\n        API.registerLayer({\n          id: 'adu-heat',\n          version: VERSION,\n          role: 'tzb',\n          claims: ['heat'],\n          build3d: _buildHeat,\n          boq: function () { return _rows('adu-heat'); }\n        });\n        /* THE WATER, from the shared MEP asset (adu-v1424): cold and hot by\n           calculation. After the electrics, whose board feeds the heater. */\n        API.registerLayer({\n          id: 'adu-water',\n          version: VERSION,\n          role: 'tzb',\n          claims: ['water'],\n          build3d: _buildWater,\n          boq: function () { return _rows('adu-water'); }\n        });\n        /* THE WASTE, from the shared MEP asset (adu-v1425): traps, drain, vent\n           stack by calculation, after the water. */\n        API.registerLayer({\n          id: 'adu-waste',\n          version: VERSION,\n          role: 'tzb',\n          claims: ['waste'],\n          build3d: _buildWaste,\n          boq: function () { return _rows('adu-waste'); }\n        });\n        API.registerLayer({\n          id: 'adu-terrace',\n          version: VERSION,\n          role: 'exterier',\n          claims: ['terrace'],\n          build3d: _buildTerrace,\n          boq: function () { return _rows('adu-terrace'); }\n        });\n        API.registerLayer({\n          id: 'adu-lps',\n          version: VERSION,\n          role: 'tzb',\n          claims: ['lps'],\n          build3d: _buildLps,\n          boq: _lpsBoq\n        });\n        /* THE WALL BETWEEN THE POSTS IS A LAYER LIKE ANY OTHER, so it is drawn\n           with the model, billed with the model and steps with the model. The\n           geometry is the core's -- every product would otherwise have its own\n           copy of the same boards -- and only the colour comes from here,\n           because the palette is this product's (Marek). */\n        /* EXTERNAL SHUTTERS, AND ONLY HERE. The shed and the sauna have no use\n           for them -- a garden store and a sauna are not shaded at the glass --\n           so the core keeps the geometry and only this product asks for it\n           (Marek: budou jen u ADU). */\n        API.registerLayer({\n          id: 'adu-blinds',\n          version: VERSION,\n          role: 'exterier',\n          claims: ['blinds'],\n          build3d: function (ctx) {\n            var c = null;\n            try { c = colorOf('blinds'); } catch (e) {}\n            return API.buildBlinds(ctx, c);\n          },\n          boq: function () { return _rows('adu-blinds'); }\n        });\n        API.registerLayer({\n          id: 'adu-postwall',\n          version: VERSION,\n          role: 'exterier',\n          claims: ['postwall'],\n          build3d: function (ctx) {\n            /* THE POSTS ARE REPORTED, NOT GUESSED. The core divides a side into\n               bays and needs the real post line to do it. This layer is built\n               AFTER the posts -- that is what the assembly order is for -- so\n               the list is handed over here, where it is certainly full, rather\n               than from a hook whose turn might come later (Marek: mame 3\n               sloupy = dve pole). */\n            try { API.reportPosts(_postPts || []); } catch (eRP) {}\n            /* AND NOTHING IS CLAD WITHOUT THEM.\n\n               The asset falls back to a post line of its own when none is\n               reported -- a side divided at its own span, boarded between marks\n               where no timber stands. A slat wall belongs to the posts it is\n               fixed to, so when this roof built none there is nothing to clad,\n               and the log says so rather than leaving a wall to explain. */\n            if (!(_postPts && _postPts.length >= 2)) {\n              ctx.log('PWL  no posts built, so nothing clad -- a post appears once ' +\n                      'the roof reaches past ' + API.fmtLen(EAVE_POST.trigger) +\n                      ' and the slats come with it');\n              return;\n            }\n            var c = null;\n            try { c = colorOf('postWall'); } catch (e) {}\n            return API.buildPostWalls(ctx, c);\n          },\n          boq: function () { return _rows('adu-postwall'); }\n        });\n        API.setWallThickness(STUD.d);\n        /* the cap plate IS the plate zone -- one 2x, not a guessed 140 mm */\n        API.setPlateZone(STUD.t);\n\n        var ok = API._coreBoot({\n          t: t,\n          prefKey: 'leva:' + __CORE.PRODUCT + ':' + (B.productId || '0'),\n          /* THE PLAN IS EDITED IN THE PLAN. THE ROOF IS EDITED ON THE ROOF.\n\n             This was editing('layout') and nothing else, for a good reason: the\n             footprint was draggable on ROOF and BASE too, so a size could be set in\n             a 3D view where the grips are small, the ground is foreshortened and\n             the dimension is the hardest thing on screen to read.\n\n             That reason is about the BUILDING rect. The roof rect is a different\n             thing: it is the roof, and ROOF is the step where the roof is what you\n             are looking at -- the shed says exactly this about its own. Turning the\n             handles off for the whole step turned that one off with it, so it was\n             built every frame and drawn never.\n\n             Which rect appears on which step is decided in _rects(), where it can\n             be seen. */\n          /* adu-v1430: a pergola of its own has a ghost too, with no terrace and no pool */\n          handlesActive: function () { return API.editing('layout') || API.editing('roof') || (API.editing('exterior') && (!!_terrace().on || !!(API.poolOn && API.poolOn()) || !!(API.pergolaOn && API.pergolaOn()))); },\n          blueprint: !!B.blueprint\n        });\n        if (!ok) return false;\n\n        if (B.blueprint) {\n          /* the blueprints page: no rail, no wizard, no strip; the page drives\n             the views and the layers through the API */\n          try { snapshotAdu(); } catch (e0) {}\n          _log('blueprint boot -- headless, ' + __CORE.PRODUCT + ' ' + VERSION);\n          return true;\n        }\n\n        API.railBind({ hide: HIDE_BUTTONS });\n        /* THE WIZARD IS MOUNTED BY THE CORE (core-v317): Edit as its title, a\n           rebuild on every step, the tools put down when the drawer closes */\n        API.wizardMount(wizSteps());\n        /* sample the plan's framing continuously, so a resize has something to\n           restore that is not the default */\n        try { global.setInterval(_planRemember, 400); } catch (eK) {}\n\n        try {\n          var bV = document.getElementById('cf-btn-view');\n          if (bV) bV.title = (bV.title || '') + ' \\u00B7 ' + VERSION;\n        } catch (e) {}\n\n        try { snapshotAdu(); } catch (e) {}\n        return true;\n      }\n\n\n      /* WHAT LEAVES THIS FILE, and nothing else. Everything here is called from\n         outside: boot and snapshot by the liquid, shareDims by the share sheet,\n         undo by the rail. The rest -- the timber sizes, the tallies, the partition\n         helper, the stub counter -- was exported on the chance somebody might want\n         it, and nothing ever did. An export is a promise to keep something working;\n         making eleven of them for one caller is how a lib becomes impossible to\n         change. */\n      /* API.VERSION is set in the switch block at the end of the file, where\n         VERSION itself is declared -- set here it was undefined and the page's\n         badge read NO LIB from v849 to v880 */\n      API.PRODUCT = __CORE.PRODUCT;\n      API.boot = bootAdu;\n      API.snapshot = snapshotAdu;\n      API.shareDims = shareDims;\n      API.undo = API.undoPop;   /* the core's history (core-v316) */\n      API.wizSteps = wizSteps;\n      API.__stud = function () { return STUD; };\n      API.pendingBill = _pending;\n      API.proposedCodes = _proposed;\n      API.__bearStuds = function () { return _bearStuds; };\n      API.__wallStuds = function () { return _wallStuds; };\n\n      /* =========================================================================\n         GUTTERS, AND THEY HOLD THE EAVE LINE RATHER THAN GUESSING AT IT.\n\n         Ported from the shed, whose comment is the whole design:\n\n           \"the gutter reads these, never its own arithmetic\"\n\n         The roof publishes where its eave is -- two points with a real height, per\n         plane. The gutter hangs off THAT. So when the roof is dragged out on one\n         side and left tight on the other, the trough follows without anyone\n         re-deriving it from pitch and overhang, and the two cannot drift apart.\n         That is the property worth copying; the shed learnt it the hard way when\n         the roof stopped at its minimum overhang and the gutter kept tracking.\n\n         It hangs just OUTBOARD of the fascia and just BELOW the eave, so the\n         covering sheds into it from above and its top never rises into the rafter\n         zone at a shallow overhang.\n\n         NOT ON A PARAPET. There the roof turns up against the wall and drains\n         inward to an outlet -- there is no eave to hang anything on.\n         ========================================================================= */\n      var GUT = {\n        h: 0.127, w: 0.127, drop: 0.09, board: 0.025,\n        bracket: 0.60, standoff: 0.05,\n        gutter: 'ROG01251', brk: 'ROA01251', cap: 'ROG00001',\n        hopper: 'ROG00005', pipe: 'ROG01252', elbow: 'ROG00006',\n        shoe: 'ROG00009', clip: 'ROG00011',\n        /* ROG00003 -- the fitting that turns a gutter round an external corner.\n           It was in the catalogue and unused, which is why hips came out with\n           four separate runs and four stop ends where two continuous ones belong. */\n        corner: 'ROG00003'\n      };\n\n\n\n\n      /* THE DOWNSPOUT SECTION: A RECTANGLE WITH ROUNDED CORNERS, AND HOLLOW.\n\n         The catalogue calls it dia 80 / 3 inch, which is the round European pipe --\n         but the American product at that size is a rectangular section with the\n         corners rolled, and that is what a buyer in the US will actually hang. The\n         two hold the same water and take the same fittings, so the row stays dia 80\n         and the drawing shows the section the market uses. Same argument as the\n         gutter: one catalogue line, both markets.\n\n         HOLLOW, for the same reason the trough is. A solid stick would hide every\n         bracket behind it and would make the bends read as blocks. 1.2 mm of wall.\n\n         Sized to hold what a dia 80 round holds: 80 mm round is 5027 mm2, and\n         60 x 87 with 10 mm corners comes to 5100 -- near enough that the pipe is\n         not quietly smaller than the item being bought. */\n      var DSP = { w: 0.060, d: 0.087, r: 0.010, wall: 0.0012 };\n\n      function _roundRect(T, w, d, r) {\n        var sh = new T.Shape();\n        var hw = w / 2, hd = d / 2;\n        sh.moveTo(-hw + r, -hd);\n        sh.lineTo(hw - r, -hd);\n        sh.quadraticCurveTo(hw, -hd, hw, -hd + r);\n        sh.lineTo(hw, hd - r);\n        sh.quadraticCurveTo(hw, hd, hw - r, hd);\n        sh.lineTo(-hw + r, hd);\n        sh.quadraticCurveTo(-hw, hd, -hw, hd - r);\n        sh.lineTo(-hw, -hd + r);\n        sh.quadraticCurveTo(-hw, -hd, -hw + r, -hd);\n        return sh;\n      }\n\n      function _dspShell(T) {\n        var out = _roundRect(T, DSP.w, DSP.d, DSP.r);\n        var wall = DSP.wall;\n        var inner = _roundRect(T, DSP.w - wall * 2, DSP.d - wall * 2, Math.max(0.001, DSP.r - wall));\n        out.holes.push(new T.Path(inner.getPoints(24)));\n        return out;\n      }\n\n      /* ONE SWEPT PIPE, WITH THE CORNERS ROUNDED -- NOT A STACK OF PRISMS.\n\n         Each leg used to be its own extrusion, butted end to end. Two prisms\n         meeting at an angle do not close: one ends on a flat face square to its own\n         run and the next starts square to a different one, so a wedge of daylight\n         opens on the outside of every bend and the pipe reads as three pieces\n         lying near each other.\n\n         A real swan neck is one continuous run of the same section, bent. So the\n         whole thing is now a single path -- down, across, down, out -- with an arc\n         at each corner, and the section is swept along it. The bends come out\n         closed because there is nothing to close: it never stops being one pipe.\n\n         The arc radius is small on purpose. These are pressed fittings with a tight\n         throat, not plumbing sweeps; a big radius would look like waste pipe. */\n      function _dspPath(T, pts, r) {\n        var path = new T.CurvePath(), i;\n        var V = function (p) { return new T.Vector3(p[0], p[1], p[2]); };\n        if (pts.length < 2) return null;\n        var cur = V(pts[0]);\n        for (i = 1; i < pts.length - 1; i++) {\n          var a = V(pts[i - 1]), b = V(pts[i]), c = V(pts[i + 1]);\n          var ab = new T.Vector3().subVectors(b, a), bc = new T.Vector3().subVectors(c, b);\n          var la = ab.length(), lc = bc.length();\n          var rr = Math.min(r, la * 0.45, lc * 0.45);\n          var pIn = new T.Vector3().copy(b).addScaledVector(ab.clone().normalize(), -rr);\n          var pOut = new T.Vector3().copy(b).addScaledVector(bc.clone().normalize(), rr);\n          if (cur.distanceTo(pIn) > 1e-4) path.add(new T.LineCurve3(cur.clone(), pIn));\n          path.add(new T.QuadraticBezierCurve3(pIn, b, pOut));\n          cur = pOut;\n        }\n        var last = V(pts[pts.length - 1]);\n        if (cur.distanceTo(last) > 1e-4) path.add(new T.LineCurve3(cur.clone(), last));\n        return path;\n      }\n\n      function _dspSweep(T, g, mat, pts) {\n        var path = _dspPath(T, pts, 0.075);\n        if (!path) return 0;\n        var geo = new T.ExtrudeGeometry(_dspShell(T), {\n          extrudePath: path, steps: Math.max(24, pts.length * 14), bevelEnabled: false\n        });\n        g.add(new T.Mesh(geo, mat));\n        return path.getLength();\n      }\n\n      /* a length of pipe from one point to another, in the section above */\n\n      /* ---------- STEP 5: THE COVERING --------------------------------------\n         All three are drawn on the deck plane, above whatever the last step left\n         there -- nothing on a shingle roof, two bars of batten under a sheet -- so\n         none of them needs to know what is underneath.\n\n         ONE MESH PER COURSE OR PER PLANE, NOT ONE PER TAB. A shingle roof at true\n         size is twenty-odd tabs across and nearly thirty courses up: drawn as\n         separate objects that is over a thousand of them per plane, on a page that\n         already carries the frame. Each course builds its tabs into a single\n         buffer, so the roof reads at full detail and costs one object a course.\n\n         WHAT IS BUILT IS NOT ALWAYS WHAT WAS PICKED -- if the pitch is below the\n         chosen covering's minimum the build-up gets the steepest one still allowed,\n         and the log names both. */\n      /* HOW FAR THE COVERING SITS ABOVE WHAT IT IS FIXED TO.\n\n         It was 3 mm under a sheet and 4 mm under a shingle -- two numbers, neither\n         of them anywhere, and a batten still showing through. A single named\n         clearance is one thing to look at when it is wrong, and 10 mm is a gap you\n         can see rather than a rounding you cannot. */\n      var COV_GAP = 0.014;\n\n\n\n      /* AND AT THE RIDGE IT STOPS SHORT INSTEAD.\n\n         I extended it past the top as well, so the two sheets ran over the apex and\n         through each other -- that crossing is the asymmetric grey mess up there,\n         and it is mine.\n\n         They must not meet. The gap between them is the ventilation OUTLET: a cold\n         roof takes air in at the eave and lets it out at the ridge, and two sheets\n         touching seal the cavity that everything below depends on. It is also why\n         there is a vent strip in the bill and why the cap stands off.\n\n         Out at the eave, back at the ridge. */\n      var COV_RIDGE_GAP = 0.030;\n      /* AND A MONO HAS NO RIDGE TO LEAVE A GAP UNDER. Its high edge is the end of\n         the deck with a flashing on it, and the covering runs OVER that edge --\n         50 mm past it -- the way it runs past the eave; stopping 30 short there\n         left a band of bare deck along the top of every mono (Marek). The vent\n         at a mono's top is the flashing's business, not a gap in the sheet. */\n      var COV_MONO_OVER = 0.050;\n\n      /* WHERE THE COVERING'S UNDERSIDE SITS, AND IT IS NOT THE SAME QUESTION FOR\n         ALL THREE.\n\n         A sheet is held off its battens -- that is the air gap, and COV_GAP is it.\n         A shingle is not held off anything: it is nailed flat onto the felt, which\n         is nailed flat onto the deck. Giving it the sheet's clearance floated it\n         10 mm above the roof.\n\n           shingle   the top of the underlay, and no more\n           sheet     the top of the batten grid plus the gap\n\n         And the TOP of the covering, which is what the ridge cap has to sit on. */\n      function _covBase(slope) {\n        if (_covDef().key === 'shingle') return _batBase(slope);\n        return _batTop(slope) + COV_GAP;\n      }\n\n      function _covTop(slope) {\n        var k = _covDef().key;\n        if (k === 'shingle') return _covBase(slope) + COV_SHINGLE.t;\n        if (k === 'seam') return _covBase(slope) + COV_SEAM.seamH;\n        return _covBase(slope) + COV_TRAPEZ.ribH;\n      }\n\n      var COV_SHINGLE = { exposure: 0.143, tab: 0.333, slot: 0.006, t: 0.005,\n                          nail: 'FAS00318', nailsPerM2: 20 };\n      var COV_TRAPEZ  = { pitch: 0.333, ribW: 0.075, ribH: 0.038, t: 0.0007,\n                          screw: 'FAS60100', screwPerM2: 7 };\n      var COV_SEAM    = { pan: 0.530, seamW: 0.022, seamH: 0.025, t: 0.0006,\n                          clip: 'FAS60100', clipPerM2: 5 };\n\n      /* THE COVERING IS BUILT BY THE SHARED DRAWER (adu-v1393, K5), step 5;\n         _covFrame, _covBase and the tables stay for the ridge and the edges */\n      function _skinCovering(ctx, planes) {\n        API.roofSkin(ctx, _skinSpec(ctx, planes, ['covering']));\n      }\n      /* _covShingle and _covSheet moved to the drawer (adu-v1393) */\n      var ROOF_RIDGE = { code: 'ROR00009', vent: 'ROR00007', width: 0.250,\n                         t: 0.0007, stand: 0.006,\n                         fix: 'FAS00225', fixSpacing: 0.300 };\n\n      /* THE RIDGE AND THE HIP CAPS ARE BUILT BY THE SHARED DRAWER (adu-v1394, K6), step 6 */\n      function _skinRidge(ctx, planes) {\n        API.roofSkin(ctx, _skinSpec(ctx, planes, ['ridge']));\n      }\n\n\n\n\n      /* THE GUTTERS COME FROM THE SHARED MODULE (core-v759, API.gutters in\n         configurator-ui.js -- THE GUTTERS MODULE). This product hands in only\n         what is its own; the runs, the corners, the outlets, the downspouts and\n         their bill are built there, once for the whole house line. */\n      function _gutters(ctx) {\n        if (typeof API.gutters !== 'function') { ctx.log('gutter   THREW the shared gutters module is missing -- configurator-ui.js core-v759 or later'); return; }\n        API.gutters(ctx, {\n          planes: roofPlanes, deckPlane: _deckPlane,\n          deckT: function () { return ROOF_DECK.t; }, dripFace: ROOF_EDGE.drip.face,\n          color: isNew('adu-roof.gutter') ? MAGENTA : colorOf('metal'), metal: colorOf('metal'),\n          grid: function () { return API.grid(); }, facadeThk: function () { return API.facadeThk(); },\n          EAVE_POST: EAVE_POST, posts: _postPts, taken: _outletTaken,\n          add: function (code, q) { _add('adu-roof', code, q); }\n        });\n      }\n\n      /* The version is set in the INNERMOST zone, so every patch carries it,\n         whichever one is sent. It is only DECLARED at the top of the file, which no\n         zone covers -- which is why patches used to leave the old number on screen. */\n\n      /* =========================================================================\n         THE ROOF BUILD-UP, IN THE ORDER IT IS LAID.\n\n         Not bottom-to-top as a section drawing would list it -- the order a roofer\n         works in, which is not the same thing and is the order this has to animate\n         in later. The drip edge is the example: it sits ON the underlay and UNDER\n         the covering, so it is neither first nor last.\n\n           1  deck        sheathing over the rafters\n           2  underlay    from the eave up, courses lapping uphill\n           3  drip edge   and the verge\n           4  covering\n           5  ridge\n\n         ROOF_STEP is the gate. Everything past it is left off, so a step can be\n         looked at with nothing on top of it -- the same way the floor build-up was\n         walked through. -1 means all of them.\n         ========================================================================= */\n      /* THESE WERE DECLARED INSIDE LOOPS. A function statement in a block is not\n         something to rely on across engines, and it is invisible when it bites --\n         which is the shape of bug that has cost this file the most time. At file\n         scope they are just functions. */\n      function quad(v, a, b, c, d) {\n        v.push(a[0], a[1], a[2], b[0], b[1], b[2], c[0], c[1], c[2]);\n        v.push(a[0], a[1], a[2], c[0], c[1], c[2], d[0], d[1], d[2]);\n      }\n\n      /* an edge cut back to the fractions the plane allows at that height */\n\n\n      /* THE PLANE IS THE SOFFIT. EVERYTHING HERE SITS A MEMBER ABOVE IT.\n\n         Third time this has caught me, so it is a function now rather than a number\n         written out at each layer. roofPlanes() publishes the BEARING line -- the\n         top of the wall plate, which is where a rafter LANDS -- and the timber\n         stands on it. So the deck goes on top of the rafter, a full depth up, and\n         the underlay and the flashings follow the deck.\n\n         Drawn at the plane itself, the sheathing lay inside the trusses, the\n         underlay under the top chord, and the drip edge came out low enough to\n         foul the gutter. All one mistake wearing three faces. */\n      function _skinLift() {\n        return _isTrussed() ? CHORD.d : RAFTER.d;\n      }\n\n      /* =========================================================================\n         THE DECK PLANE: THE PUBLISHED PLANE OFFSET ALONG ITS OWN NORMAL.\n\n         Everything on the roof was reaching this surface by its own route -- the\n         deck by a vertical shear, the flashings by a lift plus a push, the gutter\n         by a third arithmetic -- and the three only agreed at nought degrees. The\n         numbers say why:\n\n            sklon | vodorovne | svisle | muj svisly zdvih | chyba\n                2 |     14 mm | 400 mm |           400 mm |   0\n               15 |    104    | 386    |           414    |  28\n               35 |    229    | 328    |           488    | 161\n\n         A rafter cut square to its own axis has its top face at plane + n*d. That\n         is ONE move with a horizontal part AND a vertical part, and they are\n         d*sin(p) and d*cos(p) -- not d/cos(p), which is what a vertical shear\n         gives and which grows the wrong way.\n\n         So the plane is offset once, here, and the deck, the underlay, both\n         flashings and the gutter are all drawn from the result. They cannot drift\n         apart with the pitch because there is nothing left to drift: they are the\n         same four corners.\n         ========================================================================= */\n      /* LIFTED PLUMB, DIRECTLY ABOVE THE PLANE'S OWN CORNERS.\n\n         Offsetting along the normal moves a sloped plane sideways as well as up,\n         by the lift times the sine of the pitch -- 75 mm at 15 degrees. The deck\n         pass undid that sideways part for itself and drew its slab exactly above\n         the plane; the covering, the battens and the flashings were built on the\n         offset points as they came, 75 mm down the slope from the slab. So on a\n         mono the covering ended 75 mm short of the deck's top edge whatever\n         overhang it was given, and the bare board showed (Marek). One lift for\n         everybody: straight up by the plumb thickness, so every layer's corner\n         stands over the plane's corner and the deck pass has nothing to undo. */\n      function _deckPlane(pl) {\n        if (!pl) return null;\n        var n = pl.n || [0, 1, 0];\n        var d = _skinLift() / Math.max(0.2, Math.abs(n[1]));\n        function off(a) { return [a[0], a[1] + d, a[2]]; }\n        function offEdge(e) { return e ? [off(e[0]), off(e[1])] : null; }\n        var pts = [], q;\n        for (q = 0; q < (pl.pts || []).length; q++) pts.push(off(pl.pts[q]));\n        return { pts: pts, eave: offEdge(pl.eave), ridge: offEdge(pl.ridge),\n                 n: n, area: pl.area, pitch: pl.pitch };\n      }\n\n      /* =========================================================================\n         THREE LIGHT COVERINGS, AND THE PITCH DECIDES WHICH ARE ALLOWED.\n\n         Ported from tiny, table and reasoning both. They differ in the battens\n         under them, in the fixings, in the price and in the minimum pitch, so they\n         cannot share a row in the bill -- and the build-up is the thing about to\n         read this field.\n\n         WHAT A ROOF TOO FLAT FOR THE CHOSEN COVERING FALLS BACK TO: the STEEPEST\n         one it is still allowed, not the shallowest. A 6 degree roof loses the\n         shingle and becomes a trapezoidal sheet, which is the ordinary roof at\n         that pitch -- dropping it all the way to standing seam would sell the\n         dearest metal there is to somebody who only lost the shingle.\n\n         Below every minimum -- a mono at its own 2 degrees -- nothing is allowed\n         and it hands back the shallowest as the least wrong, and the log shows\n         picked and built disagreeing rather than pretending. */\n      /* THE KEYS ARE THE CANONICAL ONES, NOT TINY'S.\n\n         The table came over from tiny with tiny's key names on it -- tiny_cov_*,\n         which live in that product's namespace. They exist in en.default.json, but\n         the theme hands this page the mc_cov_* family, so every caption fell back\n         to its English default and the picker read English on a Czech page.\n\n         Same chain, same failure, third time: locale has it, liquid emits it, and\n         the LIB has to ask for the one that was emitted. */\n        /* EACH COVERING SAYS HOW FAR APART ITS BATTENS GO.\n\n         None of them did, so C.batten was undefined everywhere and the batten step\n         drew the counter-battens and then silently produced no cross battens at\n         all -- an undefined gauge fails the pitch test and returns zero. That is\n         the missing horizontal set (Marek).\n\n           shingle  none: it is nailed to the deck, and the step already returns\n           trapez   1.0 m -- the profile spans it; purlins normally go 1.0 to 1.5\n           seam     0.6 m -- a thinner panel wants closer support */\n      /* THE COVERINGS ARE THE CORE'S (core-v320): the table and its helpers, under\n         the names this file has always used them by */\n      var COVERINGS = API.ROOF_COVERINGS;\n      function _covKey(k) { return API.covKey(k); }\n      function _covDef() { return API.covDef(); }\n\n      /* 4: THE FLASHINGS, WHICH IS WHAT IS BEING LOOKED AT.\n\n         Under it sit the deck, the underlay, the counter-battens and -- on a\n         shingle roof -- the boarding, all in their own colours. Only the metal is\n         magenta.\n\n         THE BOARDING IS WHY THE LAST ONE WENT ENTIRELY PINK. It is a full-plane\n         sheet and it belonged to the batten layer, so marking the battens marked\n         the whole roof surface with them and there was nothing left to see. It has\n         its own name now, so reviewing the battens shows BARS. */\n      /* 0 FOR NOW: THE SKIN IS OFF SO THE FRAME CAN BE SEEN.\n\n         Nothing from the build-up is drawn at this setting -- no deck, no felt, no\n         battens, no covering. It is temporary, to look at the first row of rafters\n         without a roof over them. Back to -1 when that is settled. */\n      /* NOTHING IS TILED WHILE THIS IS TRUE. The build-up is switched off and the\n         planes are drawn as themselves -- see the shell in _roofSkin. Set it false\n         and everything comes back exactly as it was. */\n      /* The shell is off. It was a solid drawn INSTEAD of the six skin layers, for\n         every roof type -- so switching it off restores the gable and the mono\n         completely and lets the hip take its first layer. */\n      var SHELL_ONLY = false;\n\n      /* THE HIP FRAMING HAS ITS OWN SWITCH.\n\n         It is drawn before the shell question and was gated by nothing, so it stayed\n         on screen whatever else was hidden. While one layer is being judged,\n         everything that is not that layer has to be able to go away -- that is what\n         these switches are for, and this was the one piece without one (Marek). */\n      var HIP_FRAME = true;\n\n      /* AND SO DOES EVERYTHING ELSE ON THE ROOF.\n\n         While one layer is being judged the rest has to be able to disappear -- the\n         trusses, the gutters and the eave posts as much as the shell. Each is one\n         flag, all four default to showing, and they go back on together (Marek). */\n      var SHOW_TRUSSES = true;\n      var SHOW_GUTTERS = true;\n      var SHOW_POSTS   = true;\n\n      /* Only the deck. Set back to -1 for the whole build-up. */\n      var ROOF_STEP = 6;\n      var ROOF_DECK = { code: 'OSB25002', t: 0.018,\n                        nail: SHEATH_NAIL.code, nailPerM2: SHEATH_NAIL.perM2 };\n\n      /* THE SECOND VERSION ASSIGNMENT IS GONE.\n\n         There were two: the var at the top and this bare assignment, which runs\n         later and overwrites it. So every bump I made moved the first one and the\n         snapshot printed the second -- 'lib adu-v668' in one line and\n         '=== adu-v608 ===' in the next, which is exactly what he is looking at.\n\n         One place, at the top, where a version belongs (Marek). */\n\n      /* The build-up alone: deck, underlay, battens, flashings, covering, ridge,\n         and the parapet's warm deck */\n\n      /* DECLARED ABOVE ITS READERS, not below them. _roofSkin names the PIR depth\n         in its opening line and this sat forty lines further down -- which works,\n         because var hoisting means the assignment has run by build time, and which\n         is exactly the shape that has bitten this file twice today. Order that has\n         to be reasoned about is order worth fixing. */\n      var FLAT_ROOF = {\n        deck:   { code: 'OSB25002', t: 0.018 },\n        vb:     { code: 'ROV00001' },\n        /* THE CONSTANT LAYER AND THE TAPER ARE TWO DIFFERENT THINGS, and the\n           sheet now has both. INS01502 is a flat 1200 x 600 x 150 board, sold by\n           the m2 (his row, pasted); the taper was billed against it for years,\n           which is a wedge priced as a slab. The board is the constant layer and\n           the wedge is ROP20002, his row, sold by the m3. */\n        eps:    { code: 'INS01502', t: 0.150, w: 1.200, h: 0.600 },\n        taper:  { code: 'ROP20002', min: 0.040, fall: 0.02 },\n        /* THE FULL RAFTER DEPTH, OUT OF STOCK BOARDS.\n\n           There is no 240 or 400 PIR in the catalogue and I am not inventing one.\n           400 mm comes out of two 150s and a 100, all three of which are real\n           rows -- so the bill lists what a merchant would actually deliver:\n\n             INS01501  150    x2\n             ROP12001  100    x1\n\n           It is billed by area per board, which is how insulation is sold. */\n        /* INS02001, the row he added: mineral wool 200 mm, friction fitted between\n           members. Two of them fill a 400 mm rafter, and wool is about a third the\n           price of PIR for the same R in a cavity -- there is no reason to pay for\n           PIR's thinness where the depth is already there. */\n        pir:    { code: 'INS02001', t: 0.200, plies: 2 },\n        geo:    { code: 'FEC00003' },\n        /* ROR00002 ROOF HYDROFOIL -- the row I said was missing when the parapet\n           was first built. It is there; I searched for TPO and PVC and not for\n           what it is actually called. */\n        mem:    { code: 'ROR00002', lap: 0.10 },\n        /* ROA00001 -- the bar that holds the membrane where it is turned up.\n           Without it the upstand is a sheet leaning against a wall. */\n        bar:    { code: 'ROA00001', w: 0.030, t: 0.003,\n                  /* A SCREW INTO TIMBER, NOT AN ANCHOR INTO MASONRY. */\n                  anchor: 'FAS45070', spacing: 0.250,\n                  sealant: 'FEC00038', mPerTube: 12 },\n        /* ROA00002, THE REAL ITEM. The parapet was capped with ROR00009 -- a RIDGE\n           cap -- because nothing else was close and 250 mm fitted. It billed the\n           parapet together with the ridges of gable roofs, which is two different\n           details under one line, and I said so at the time.\n\n           300 mm of developed width: 160 across the parapet, 60 turned in over the\n           membrane, 80 out with a drip. Two workers, because a two-metre sheet does\n           not hold itself on a wall head. */\n        /* 500 NOW, BECAUSE THE ROW SAYS 500.\n\n           The cap has to reach over whatever facade is on the parapet and still\n           turn down inside: 394 on the ventilated wall, 434 with vertical\n           boarding and its counter-batten, 491 on the contact wall. The row was\n           300 and the drawing said so every rebuild.\n\n           He has changed it to 2000 x 500 x 0.6, which covers the worst of the\n           three with something left for the folds, so the constant follows the\n           catalogue rather than the catalogue following me. */\n        coping: { code: 'ROA00002', w: 0.500, clip: 'FAS45070', spacing: 0.500 },\n        /* THE OUTLET AND WHAT IT DRAINS INTO. The drain was billed once and lost\n           when the build-up was rewritten -- a flat roof with no outlet is a tank.\n           It sits at the LOW corner, which is where the taper has been falling to\n           all along, and the tape seals the membrane around its flange. */\n        ballast: { code: 'ROR00004', t: 0.050 },\n        drain:  { code: 'ROR01251', d: 0.125, pipeD: 0.080,\n                  pipe: 'ROG01252', tape: 'ROR00012', elbow: 'ROG00009',\n                  clip: 'ROG00011', bend: 'ROG00006' },\n        tape:   { code: 'ROR00012' }\n      };\n\n\n      /* =========================================================================\n         THE FITOUT IN 3D -- adu-fitout. Blocks, no detail: it is a layout. Each\n         piece is the box of its plan size and its height on the floor finish; an L\n         and a U are two and three boxes. A shower is glass, and later takes the\n         wall tiles up to full height behind it. Every piece is billed with its\n         catalogue row and the rows that go with it (a faucet with a sink, a\n         mattress with a bed, four chairs with a table).\n         ========================================================================= */\n      function _buildFitout(ctx) {\n        /* THE FITOUT FROM THE SHARED MODULE (core-v790, status/modules.md 9):\n           the plan's pieces built, placed and billed are written once in\n           configurator-ui.js; this product hands in its own pieces. */\n        if (typeof API.houseFitout !== 'function') { ctx.log('FIT  THREW the shared fitout module is missing -- configurator-ui.js core-v790 or later'); return; }\n        API.houseFitout(ctx, {\n          api: API, layer: 'adu-fitout', MAGENTA: MAGENTA, FINISH: FINISH, isNew: isNew, billReset: _billReset,\n          add: function (code, q) { _add('adu-fitout', code, q); }\n        });\n      }\n\n\n      /* =========================================================================\n         ELECTRICS -- adu-elec, BUILT BY THE SHARED MEP ASSET (adu-v1420).\n\n         The rules, the codes and the whole build moved word for word into\n         assets/configurator-mep.js (window.MepLib, mep-v1), so every product of\n         the line takes its services from one file instead of a copy each\n         (Marek, 2026-10-08: one shared asset, the ADU first). The BoQ is to come out\n         byte-identical. This product hands the asset what it knows: its layer\n         id and its own objects and helpers, under the names the body has\n         always used. env is made fresh on every build, so it reads what is\n         current.\n\n         If the asset has not arrived when the model builds, nothing is billed\n         for the electrics, the log says so, and the model is rebuilt once it\n         is here (window.__mepWait). Status: status/mep.md.\n         ========================================================================= */\n      function _mepEnv() {\n        return { layerId: 'adu-elec',\n                 API: API, STATE: STATE, FINISH: FINISH, PART: PART, MAGENTA: MAGENTA,\n                 _P: _P, _add: _add, _billReset: _billReset, _asmCode: _asmCode,\n                 _buildRect: _buildRect, wallThickness: wallThickness, isNew: isNew,\n                 _onRoomLine: _onRoomLine, _roomLabel: _roomLabel, _sharedEdge: _sharedEdge,\n                 _slantRaw: _slantRaw, _spaceFree: _spaceFree, _wedgeRoomAt: _wedgeRoomAt };\n      }\n      var _mepAsked = false;\n      function _buildElec(ctx) {\n        var M = global.MepLib;\n        if (!M || typeof M.elec !== 'function') {\n          _billReset('adu-elec');\n          ctx.log('ELEC SKIPPED -- configurator-mep.js is not loaded (yet): nothing billed for the electrics; the model rebuilds when it arrives');\n          if (!_mepAsked) {\n            _mepAsked = true;\n            try { (global.__mepWait = global.__mepWait || []).push(function () { try { API.rebuild(); } catch (eR) {} }); } catch (eW) {}\n          }\n          return;\n        }\n        ctx.log('MEP  electrics for adu-elec built by configurator-mep.js ' + (M.VERSION || '?') + ' (moved from this lib in adu-v1420, BoQ to be unchanged)');\n        return M.elec(_mepEnv(), ctx);\n      }\n      /* THE HEATING -- adu-heat (adu-v1421). A multi-split by calculation in\n         the MEP asset: a head in the living room and every bedroom, one\n         outdoor unit, a towel rail in the bathroom (Marek, 2026-10-08). This\n         product hands over its rooms, walls and catalogue map; the asset\n         mints its own rows into the map, as the wall zone does. */\n      function _mepHeatEnv() {\n        return { layerId: 'adu-heat', elecId: 'adu-elec',\n                 API: API, STATE: STATE, CATALOG: __CORE.CATALOG, FINISH: FINISH,\n                 _P: _P, _add: _add, _billReset: _billReset, _buildRect: _buildRect,\n                 wallThickness: wallThickness, _roomKey: _roomKey, _roomLabel: _roomLabel,\n                 _terraceRect: _terraceRect,\n                 /* adu-v1422: what the bodies need -- the assembly marks and the review colour */\n                 _asmCode: _asmCode, isNew: isNew, MAGENTA: MAGENTA };\n      }\n      function _buildHeat(ctx) {\n        var M = global.MepLib;\n        if (!M || typeof M.heat !== 'function') {\n          _billReset('adu-heat');\n          ctx.log('HEAT SKIPPED -- configurator-mep.js ' + (M ? (M.VERSION || '?') : 'is not loaded') + ' has no heating (needs mep-v2): nothing billed for the heating');\n          return;\n        }\n        return M.heat(_mepHeatEnv(), ctx);\n      }\n      /* THE WATER -- adu-water (adu-v1424). Cold and hot by calculation in the\n         MEP asset: every wet piece of the fitout, an electric storage heater\n         (200 l, Marek 2026-10-08) in the laundry / the closet nearest the\n         bathroom / the bathroom, the entry on the nearest exterior wall. This\n         product hands over its rooms, fixtures (STATE), walls and catalogue\n         map; nothing is drawn yet. */\n      function _mepWaterEnv() {\n        return { layerId: 'adu-water', elecId: 'adu-elec',\n                 API: API, STATE: STATE, CATALOG: __CORE.CATALOG, FINISH: FINISH,\n                 _P: _P, _add: _add, _billReset: _billReset, _buildRect: _buildRect,\n                 wallThickness: wallThickness, _roomKey: _roomKey, _roomLabel: _roomLabel,\n                 /* adu-v1426: what the bodies need -- the assembly marks and the review colour */\n                 _asmCode: _asmCode, isNew: isNew, MAGENTA: MAGENTA };\n      }\n      function _buildWater(ctx) {\n        var M = global.MepLib;\n        if (!M || typeof M.water !== 'function') {\n          _billReset('adu-water');\n          ctx.log('WATER SKIPPED -- configurator-mep.js ' + (M ? (M.VERSION || '?') : 'is not loaded') + ' has no water (needs mep-v6): nothing billed for the water');\n          return;\n        }\n        return M.water(_mepWaterEnv(), ctx);\n      }\n      /* THE WASTE -- adu-waste (adu-v1425). Traps and branches from the fitout,\n         a building drain 110 out through the wall nearest the wet points, a\n         vent stack 75 through the roof, air admittance valves, by calculation\n         in the MEP asset; the water's env plus the roof planes for the stack's\n         height. Nothing drawn yet. */\n      function _buildWaste(ctx) {\n        var M = global.MepLib;\n        if (!M || typeof M.waste !== 'function') {\n          _billReset('adu-waste');\n          ctx.log('WASTE SKIPPED -- configurator-mep.js ' + (M ? (M.VERSION || '?') : 'is not loaded') + ' has no waste (needs mep-v7): nothing billed for the waste');\n          return;\n        }\n        var E = _mepWaterEnv();\n        E.layerId = 'adu-waste';\n        E._roofPlaneYAt = _roofPlaneYAt;\n        return M.waste(E, ctx);\n      }\n\n      function _asmLayers() {\n        /* outside in, at the z1 wall: the offsets from the OUTER face inward */\n        var off = STATE.cladding || 'horizontal', L = [], d = 0;\n        function push(name, t, key) { L.push({ name: name, t: t, at: d + t / 2, key: key }); d += t; }\n        if (off === 'off') {\n          /* canonical layer names -- layer_<material> -- shared by every build-up */\n          push(t('layer_render', 'Render'), WALL_REND.t + WALL_REND.pt, 'render');\n          push(t('layer_base_coat', 'Base coat with mesh'), WALL_COAT.t + WALL_COAT.gap, 'coat');\n          push(t('layer_eps', 'EPS insulation'), WALL_EPS.t, 'eps');\n        } else {\n          push(t('sauna_ui_cladding', 'Cladding'), WALL_CLAD.t, 'cladding');\n          if (off === 'vertical') push(t('layer_counter_battens', 'Counter battens'), WALL_FBATT.d, 'counter');\n          push(t('layer_vented_battens', 'Ventilated battens'), WALL_FBATT.d, 'fbatt');\n          push(t('layer_breather_membrane', 'Breather membrane'), Math.max(WALL_MEMB.t, 0.004), 'membrane');\n        }\n        push(t('layer_osb', 'OSB sheathing'), 0.018, 'sheathing');\n        push(t('layer_studs_wool', 'Studs with mineral wool'), wallThickness(), 'frame');\n        push(t('layer_vapour_barrier', 'Vapour barrier'), Math.max(VB_T, 0.004), 'vb');\n        push(t('layer_service_battens', 'Service battens'), WALL_BATTEN.d, 'service');\n        push(t('layer_plasterboard', 'Plasterboard'), WALL_BOARD.t, 'board');\n        return L;\n      }\n\n      /* =========================================================================\n         THE TERRACE -- adu-terrace. A platform on one side of the house at the\n         finished floor less a step: decking boards on joists on pads (the base's\n         own pad block), or pavers on a bed. Ported from the shed's terrace in its\n         simplest form; a pergola over it and a rail on its open edges come next.\n         ========================================================================= */\n      var TERR = { board: 'TST00002', joist: JOIST.code, boardT: 0.025, boardW: 0.145, gap: 0.006,\n                   joistT: 0.060, joistD: 0.160, joistSpacing: 0.50, pad: 'grd.padBlock', padSpacing: 1.80,\n                   /* the catalogue's tile: SFF00002 is 500 x 500 by the piece */\n                   paverT: 0.060, paverW: 0.50, bedT: 0.040 };\n      /* adu-v1430 (core-v597, Marek: pergola on / off jako bazen, presun\n         prstenem): the pergola is built on its own after the terrace -- over\n         the terrace while it follows it, on a place of its own once moved, on\n         a paved terrace too (it was only ever built with a deck) */\n      function _buildTerrace(ctx) {\n        _billReset('adu-terrace');\n        _billReset('adu-pergola');   /* its own bill, cleared with the terrace's */\n        try { _buildTerraceDeck(ctx); } catch (eTD) { ctx.log('TER  terrace THREW ' + ((eTD && eTD.message) || eTD)); }\n        _buildPergola(ctx);\n      }\n      /* _buildTerraceDeck: the terrace -- the core's houseTerraceDeck (core-v808, status/modules.md 12) */\n      function _buildTerraceDeck(ctx) {\n        return API.houseTerraceDeck(ctx, { api: API, MAGENTA: MAGENTA, TERR: TERR, add: _add, isNew: isNew, colorOf: colorOf, screwPile: _screwPile, layer: 'adu-terrace' });\n      }\n      /* the pergola where the core says it stands: over the terrace (on the\n         deck or the tiles) or on the ground on a place of its own */\n      function _buildPergola(ctx) {\n        var PR = API.pergolaRect ? API.pergolaRect() : null, Td = _terrace();\n        if (!PR) {\n          if (!API.pergolaRect && Td.on && Td.pergola && Td.pergola !== 'none') PR = _terraceRect();\n          if (!PR) return;\n        }\n        var TR = _terraceRect(), yTop = 0, over = false;\n        if (TR && PR.x0 >= TR.x0 - 0.02 && PR.x1 <= TR.x1 + 0.02 && PR.z0 >= TR.z0 - 0.02 && PR.z1 <= TR.z1 + 0.02) {\n          over = true;\n          yTop = (Td.surface === 'pavers') ? (TERR.bedT + TERR.paverT) : (API.storeys()[0].y0 - 0.02);\n        }\n        var g = ctx.group, T = ctx.THREE;\n        function box(bw, bh, bd, x, y, z, m) { var b = new T.Mesh(new T.BoxGeometry(bw, bh, bd), m); b.position.set(x, y, z); b.name = 'terrace'; g.add(b); }\n        ctx.log('TER  pergola ' + (PR.own ? 'on a place of its own' : 'over the terrace') + ' ' + (PR.x1 - PR.x0).toFixed(2) + ' x ' + (PR.z1 - PR.z0).toFixed(2) + ' m, standing on ' +\n                (over ? (Td.surface === 'pavers' ? 'the tiles' : 'the deck') : 'the ground') + ' (adu-v1430)');\n        _terraceExtras(ctx, { x0: PR.x0, x1: PR.x1, z0: PR.z0, z1: PR.z1 }, PR.own ? { pergola: Td.pergola, side: null, own: true } : Td, yTop, box, null);\n      }\n      /* THE PERGOLA over the whole terrace: posts on the corners and along the\n         sides at no more than 3 m, two beams, slats across; FOU00008 as one\n         piece. (A rail was here and is gone -- the deck stands 330 above grade\n         and nobody asked for one.) */\n      var TERR_PERG = { post: 0.100, h: 2.40, beam: [0.060, 0.200], slat: [0.040, 0.060], slatGap: { wood: 0.40, alu: 0.30 }, postMax: 3.0 };\n      function _terraceExtras(ctx, R, Td, yTop, box, mBoard) {\n        var T = ctx.THREE, mag = isNew('adu-terrace');\n        var w = R.x1 - R.x0, l = R.z1 - R.z0, cx = (R.x0 + R.x1) / 2, cz = (R.z0 + R.z1) / 2, i, j;\n        _asmMark(ctx, 'pergola', 'top', 'Pergola', 'KVH10200');\n        if (Td.pergola && Td.pergola !== 'none' && !Td.own && _terraceSheltered()) {\n          ctx.log('TER  pergola off -- the roof overhangs this side by ' + Math.round(_terraceSheltered() * 1000) + ', which is the shelter');\n        } else if (Td.pergola && Td.pergola !== 'none') {\n          /* THE PERGOLA IS THE CORE'S NOW (adu-v1362): timber, 4x4 posts in black steel\n             post bases, a ring of beams on corner and tee connectors, slats on top;\n             the rows it hands back are billed here, with this terrace */\n          if (!API.buildPergola) { ctx.log('TER  pergola: the core has no pergola -- needs core-v284'); }\n          else {\n            var screwMat = new T.MeshStandardMaterial({ color: STEEL_G, roughness: 0.5, metalness: 0.7 });\n            var PG = API.buildPergola(ctx, R, yTop, { side: Td.side, color: mag ? MAGENTA : colorOf('timber'), fabric: Td.pergola === 'fabric',\n              /* the house's own ground screw -- flight, collar, cut at grade outside the base step --\n                 at the shortest the catalogue has, 1200 x 76 (adu-v1366) */\n              screw: function (x, z, top) { _screwPile(T, ctx.group, screwMat, x, z, top, { r: 0.038, len: 1.20 }); } });\n            var pk;\n            /* THE PERGOLA HAS ITS OWN BILL. It is billed into a bucket of its\n               own so the PDF can print the building, the terrace and the pergola\n               as three separate bills (Marek). Nothing else about it changes:\n               it is still drawn with the terrace and belongs to its layer. */\n            for (pk in PG.rows) if (PG.rows.hasOwnProperty(pk) && PG.rows[pk] > 0) _add('adu-pergola', pk, PG.rows[pk]);\n            ctx.log('TER  ' + PG.log);\n          }\n        }\n      }\n\n      /* =========================================================================\n         LIGHTNING PROTECTION -- adu-lps. Generic over the roof planes and the plan\n         outline, so every product of the line can carry it as it is.\n\n         THE RULES (NFPA 780 / UL 96, the US practice): air terminals stand on the\n         ridge -- one within 600 mm of each end and none more than 6 m apart; the\n         main conductor runs the ridge and comes down the rake or hip edges to the\n         eave corners; at least two down conductors, at corners as far apart as\n         the building allows, straight down the wall to a ground rod 2.4 m long\n         driven 600 mm out from the footing; a clip every 900 mm on the cable; a\n         connector at every terminal base and every corner or junction; a guard\n         over each down conductor for the first 2.4 m above ground; and a bond to\n         every metal part of the roof.\n\n         THE ROWS ARE NOT IN THE CATALOGUE YET: the codes below are null until he\n         sends them, and until then every quantity is counted and logged as NOT\n         BILLED. Nothing is invented. Drawn magenta while under review.\n         ========================================================================= */\n      var LPS = {\n        on: true,\n        rod: 'LPS00001', cable: 'LPS00002', clip: 'LPS00003', conn: 'LPS00004',\n        ground: 'LPS00005', gclamp: 'LPS00006', bond: 'LPS00007', guard: 'LPS00008',\n        rodH: 0.300, rodD: 0.010, baseW: 0.060, cableD: 0.013,\n        termMax: 6.0, termEnd: 0.6, clipStep: 0.9,   /* NFPA 780: within 2 ft of the ends, not over 20 ft apart */\n        groundL: 2.4, groundD: 0.016, groundOut: 0.6, guardL: 2.4, guardD: 0.030,\n        cableLift: 0.030\n      };\n\n      function _lpsOn() {\n        var P = API.STATE.product || {};\n        return (P.lps === undefined) ? LPS.on : !!P.lps;\n      }\n      /* _buildLps: the lightning protection -- the core's houseLps (core-v810, status/modules.md 13) */\n      function _buildLps(ctx) {\n        return API.houseLps(ctx, { api: API, EAVE_POST: EAVE_POST, LPS: LPS, MAGENTA: MAGENTA, add: _add, billReset: _billReset,\n          covDef: _covDef, covTop: _covTop, lpsOn: _lpsOn, postPts: _postPts, skinLift: _skinLift, wallSkin: _wallSkin,\n          isNew: isNew, layer: 'adu-lps' });\n      }\n      function _lpsBoq() { return _rows('adu-lps'); }\n\n    /* ===== ZONE E -- replace from here to the END of the file ============ */\n\n      /* The build-up and the hip work: the shell, the centre trusses, the deck,\n         felt, battens, flashings, covering and the parapet */\n\n      var _jackBare = 0;\n      function _roofSkin(ctx) {\n        /* THE ROOF SKIN FROM THE SHARED MODULE (core-v787, status/modules.md 8b):\n           the hip end framed and billed, the outline shell, and the build-up\n           deck, underlay, battens, edges, covering, ridge are written once in\n           configurator-ui.js; this product hands in its own pieces. */\n        if (typeof API.houseRoofSkin !== 'function') { ctx.log('skin     THREW the shared roof skin module is missing -- configurator-ui.js core-v787 or later'); return; }\n        API.houseRoofSkin(ctx, {\n          api: API, layer: 'adu-roof', wood: STRUCT_WOOD, RAFTER: RAFTER, CHORD: CHORD, WEB: WEB, PLATE: PLATE, STEEL: STEEL,\n          TRUSS_PANELS: TRUSS_PANELS, TRUSS_PANEL_MAX: TRUSS_PANEL_MAX, TRUSS_PANEL_MIN: TRUSS_PANEL_MIN, HEEL_SET: HEEL_SET,\n          HEEL_PLATE_DROP: HEEL_PLATE_DROP, HEEL_PLATE_OUT: HEEL_PLATE_OUT, HIP_FRAME: HIP_FRAME, SHELL_ONLY: SHELL_ONLY,\n          ROOF_STEP: ROOF_STEP, ROOF_DECK: ROOF_DECK, ROOF_UL: ROOF_UL, ROOF_BATTEN: ROOF_BATTEN, ROOF_EDGE: ROOF_EDGE,\n          ROOF_RIDGE: ROOF_RIDGE, FLAT_ROOF: FLAT_ROOF, COVERINGS: COVERINGS, roofPlanes: roofPlanes, TR: _TR, TK: _TK,\n          covDef: _covDef, covKey: _covKey, deckPlane: _deckPlane, faceOutline: _faceOutline, footOnChord: _footOnChord,\n          heelPost: _heelPost, hipGroup: _hipGroup, hipRec: _hipRec, seatOnHip: _seatOnHip, webPlaneEnds: _webPlaneEnds,\n          quad: quad, trussStations: _trussStations, skinDeck: _skinDeck, skinUnderlay: _skinUnderlay,\n          skinBattens: _skinBattens, skinEdges: _skinEdges, skinCovering: _skinCovering, skinRidge: _skinRidge,\n          skinFlat: _skinFlat,\n          vars: {\n            get calSeq() { return _calSeq; }, set calSeq(x) { _calSeq = x; },\n            get hipNo() { return _hipNo; }, set hipNo(x) { _hipNo = x; },\n            get hipSeq() { return _hipSeq; }, set hipSeq(x) { _hipSeq = x; },\n            get hipPostsDropped() { return _hipPostsDropped; }, set hipPostsDropped(x) { _hipPostsDropped = x; },\n            get hipSideJacks() { return _hipSideJacks; }, set hipSideJacks(x) { _hipSideJacks = x; },\n            get jackBare() { return _jackBare; }, set jackBare(x) { _jackBare = x; },\n            get footFlat() { return _footFlat; },\n            get memberPts() { return _memberPts; },\n            get trussTop() { return _trussTop; }\n          },\n          add: function (code, q) { _add('adu-roof', code, q); }\n        });\n      }\n\n      /* =========================================================================\n         THE PARAPET ROOF: A WARM DECK, AND EVERYTHING IS ABOVE THE FRAME.\n\n         The other two roofs are cold -- insulation in the ceiling, a vented cavity\n         over it, covering on battens. This one is the opposite, and it is not a\n         variation on the same theme: the whole build-up sits ON the deck, there is\n         nothing to ventilate, and the frame stays inside the warm envelope. That is\n         why it waited until last and why it is its own function rather than a flag.\n\n           deck OSB 18      the structural boarding\n           vapour barrier   UNDER the insulation, because the warm side is below\n           tapered EPS      which is also where the fall comes from\n           PIR 140          the constant layer doing the work\n           geotextile       so the membrane is not dragged over board edges\n           membrane         the waterproofing\n           coping           over the parapet, falling INWARD\n\n         THE FALL IS MADE IN THE INSULATION, NOT IN THE FRAME. That was settled when\n         the parapet was built: the rafters stay dead level and the tapered boards\n         give the slope, so the ceiling below is flat and the parapet is one height\n         all the way round. It is the whole reason a tapered item exists.\n\n         AND THE COPING FALLS INWARD. Water off the top of a parapet goes either\n         onto the roof, where there is a membrane and an outlet to take it, or down\n         the face of the building, where there is render. That is not a nicety; it\n         is the difference between a wall that stains and one that does not.\n\n         WHAT IS NOT IN THE CATALOGUE: the single-ply membrane. There is no TPO, PVC\n         or EPDM row, and I am not inventing a code for the one layer that makes\n         this roof waterproof. It is drawn, named in the log, and left unbilled --\n         so the roof is short of exactly one item and says which. */\n\n      /* THE PARAPET HAS ITS OWN STEP GATE, for the same reason the pitched\n         roofs do: a layer with 250 mm of board over it cannot be judged. */\n      /* 3 FOR NOW: deck, vapour barrier, tapered insulation, and nothing above it.\n         The PIR, the geotextile and the membrane are built and billed but not\n         drawn, so the layer being looked at is the top one on screen. */\n      /* -1: the parapet is complete, so all of it draws */\n      /* FLAT_STEP is DECLARED in the switch block at the end of the file. The\n         steps: deck 1, barrier 2, flat EPS 3, taper 4, geotextile 5, membrane 6,\n         ballast 7, coping 8; -1 draws everything. */\n\n      /* INSULATION BETWEEN THE RAFTERS, NOT ACROSS THEM.\n\n         One box per bay, cut to the gap between two members with 4 mm clear of the\n         timber on each side, running the full rafter depth. It reaches OUT to the\n         outline while the deck stops at the inside face -- that overhang is what\n         carries the insulation over the wall head, which is where a parapet roof\n         bridges if it stops short. */\n      function _flatBays(ctx, x0, x1, z0, z1, top, wtR) {\n        var T = ctx.THREE, g = ctx.group;\n        var depth = RAFTER.d;\n        var mat = new T.MeshStandardMaterial({\n          color: isNew('adu-roof.pir') ? MAGENTA : 0xE2C98A,\n          roughness: 1.0, metalness: 0.0, side: T.DoubleSide });\n\n        /* _memberPts HOLDS PAIRS, NOT OBJECTS. It is filled as [x, z] by both the\n           truss builder and the rafter loop, and this read .z off it -- undefined\n           every time, so the bay list came out empty and nothing was drawn at all.\n           No error, no log, just no insulation.\n\n           AND THE BAYS RUN ACROSS THE MEMBERS, whichever way those go. The spread\n           tells us: the axis the stations vary along is the one to cut bays on. */\n        var pts = [], q;\n        if (_memberPts && _memberPts.length > 1) {\n          for (q = 0; q < _memberPts.length; q++) {\n            var P = _memberPts[q];\n            if (P && typeof P[0] === 'number') pts.push(P);\n          }\n        }\n        if (pts.length < 2) {\n          ctx.log('FLAT  insulation NOT DRAWN -- ' +\n                  (_memberPts ? _memberPts.length : 'no') + ' member point(s) available');\n          return;\n        }\n\n        var sx = 0, sz = 0, q2;\n        for (q2 = 1; q2 < pts.length; q2++) {\n          sx += Math.abs(pts[q2][0] - pts[q2 - 1][0]);\n          sz += Math.abs(pts[q2][1] - pts[q2 - 1][1]);\n        }\n        var alongZ = sz >= sx;   /* stations vary in z -> bays are z-slices */\n\n        var lines = [];\n        for (q = 0; q < pts.length; q++) lines.push(alongZ ? pts[q][1] : pts[q][0]);\n        lines.sort(function (a, b) { return a - b; });\n\n        var ox0 = x0 - wtR, ox1 = x1 + wtR, oz0 = z0 - wtR, oz1 = z1 + wtR;\n        var area2 = 0, bays = 0;\n\n        for (q = 0; q + 1 < lines.length; q++) {\n          var a2 = lines[q] + RAFTER.t / 2 + 0.004;\n          var b2 = lines[q + 1] - RAFTER.t / 2 - 0.004;\n          if (!(b2 - a2 > 0.05)) continue;\n          var wBox = alongZ ? (ox1 - ox0) : (b2 - a2);\n          var dBox = alongZ ? (b2 - a2) : (oz1 - oz0);\n          var m = new T.Mesh(new T.BoxGeometry(wBox, depth, dBox), mat);\n          m.position.set(alongZ ? (ox0 + ox1) / 2 : (a2 + b2) / 2,\n                         top + depth / 2,\n                         alongZ ? (a2 + b2) / 2 : (oz0 + oz1) / 2);\n          g.add(m);\n          area2 += wBox * dBox;\n          bays++;\n        }\n        if (!bays) {\n          ctx.log('FLAT  insulation NOT DRAWN -- no member positions published, so the bays ' +\n                  'could not be found');\n          return;\n        }\n        _add('adu-roof', FLAT_ROOF.pir.code, area2 * FLAT_ROOF.pir.plies);\n        ctx.log('FLAT  insulation ' + Math.round(depth * 1000) + ' mm in ' + bays + ' bay(s), ' +\n                API.fmtArea(area2) + ' x' + FLAT_ROOF.pir.plies + ' of ' + FLAT_ROOF.pir.code +\n                ' (' + Math.round(FLAT_ROOF.pir.t * 1000) + ' mm wool) -- between the rafters, ' +\n                'out to the outline so it carries over the wall head');\n      }\n\n      /* THE MEMBRANE DOES NOT STOP AT THE EDGE. */\n      /* ON THE SLOPE. yAt(x) is the top of whatever the membrane lies on, and it\n         climbs from the outlet wall to the far one, so the field is one sheet\n         tilted to that fall and the turn-up is TALLER at the low wall than at\n         the high one -- which is the point of the fall: the water and the\n         upstand height both end up where the outlets are. The two side walls\n         get a trapezium, bottom on the slope, top on the parapet line. */\n      function _flatMembrane(ctx, x0, x1, z0, z1, yAt, top) {\n        var T = ctx.THREE, g = ctx.group;\n        var t = 0.0015;\n        var w = x1 - x0, d = z1 - z0;\n        var yLo = yAt(x0), yHi = yAt(x1), yMid = yAt((x0 + x1) / 2);\n        var ang = Math.atan2(yHi - yLo, w);\n        /* THE TOP OF THE PARAPET IS NOT PARAPET_UPSTAND. */\n        var upTo = top + roofSection().d + RAFTER.deck + PARAPET_UPSTAND;\n        var upLo = Math.max(0.05, upTo - yLo), upHi = Math.max(0.05, upTo - yHi);\n        var mat = new T.MeshStandardMaterial({\n          color: isNew('adu-roof.covering') ? MAGENTA : colorOf('roof'),\n          roughness: 0.6, metalness: 0.0, side: T.DoubleSide });\n\n        var field = new T.Mesh(new T.BoxGeometry(w / Math.cos(ang), t, d), mat);\n        field.position.set((x0 + x1) / 2, yMid + t / 2, (z0 + z1) / 2);\n        field.rotation.z = ang;\n        g.add(field);\n\n        /* the two walls square to the fall: a box each, its own height */\n        function upX(cx, h2) {\n          var m = new T.Mesh(new T.BoxGeometry(t, h2, d), mat);\n          m.position.set(cx, upTo - h2 / 2, (z0 + z1) / 2);\n          g.add(m);\n        }\n        upX(x0 + t / 2, upLo);\n        upX(x1 - t / 2, upHi);\n\n        /* the two walls along the fall: a trapezium, its foot on the slope */\n        function upZ(cz) {\n          var vv = [];\n          quad(vv, [x0, yLo, cz], [x1, yHi, cz], [x1, upTo, cz], [x0, upTo, cz]);\n          var bg = new T.BufferGeometry();\n          bg.setAttribute('position', new T.Float32BufferAttribute(vv, 3));\n          bg.computeVertexNormals();\n          g.add(new T.Mesh(bg, mat));\n        }\n        upZ(z0 + t);\n        upZ(z1 - t);\n\n        /* AND THE BAR THAT HOLDS IT THERE.\n\n           The membrane is turned up and terminated at the top -- it is not folded\n           over the parapet, because the coping is what sheds the water and a second\n           fold under it seals nothing and gets drilled through anyway. What the\n           upstand does need is something to hold it: an aluminium bar through the\n           membrane into the parapet, sealed along its top edge.\n\n           Aluminium rather than galvanised steel: the bar is cut to length on site\n           and a galvanised cut end is where the rust starts. */\n        var B = FLAT_ROOF.bar;\n        var bm = new T.MeshStandardMaterial({\n          color: isNew('adu-roof.bar') ? MAGENTA : 0xB6BCC2,\n          roughness: 0.35, metalness: 0.75, side: T.DoubleSide });\n        function bar(w2, d2, cx, cz) {\n          var m = new T.Mesh(new T.BoxGeometry(w2, B.w, d2), bm);\n          m.position.set(cx, upTo - B.w / 2 - 0.010, cz);\n          g.add(m);\n        }\n        bar(x1 - x0, B.t, (x0 + x1) / 2, z0 + B.t / 2 + t);\n        bar(x1 - x0, B.t, (x0 + x1) / 2, z1 - B.t / 2 - t);\n        bar(B.t, z1 - z0, x0 + B.t / 2 + t, (z0 + z1) / 2);\n        bar(B.t, z1 - z0, x1 - B.t / 2 - t, (z0 + z1) / 2);\n\n        var fieldA = (w / Math.cos(ang)) * d;\n        var upA = d * upLo + d * upHi + 2 * w * (upLo + upHi) / 2;\n        var per2 = 2 * (w + d);\n        _add('adu-roof', FLAT_ROOF.mem.code, (fieldA + upA) * (1 + FLAT_ROOF.mem.lap));\n        _add('adu-roof', B.code, per2);\n        var anch = Math.ceil(per2 / B.spacing);\n        _add('adu-roof', B.anchor, anch);\n        _add('adu-roof', B.sealant, Math.ceil(per2 / B.mPerTube));\n\n        ctx.log('FLAT  membrane ' + API.fmtArea(fieldA) + ' field on the slope (' +\n                Math.round(yLo * 1000) + ' at the outlet wall to ' + Math.round(yHi * 1000) +\n                ' at the far one) + ' + API.fmtArea(upA) + ' turned up: ' +\n                Math.round(upLo * 1000) + ' mm at the low wall, ' + Math.round(upHi * 1000) +\n                ' mm at the high one, the two side walls between, all to the parapet top at ' +\n                Math.round((upTo - top) * 1000) + ' mm -- under the coping, which is the ' +\n                'joint the whole detail exists to close');\n        ctx.log('FLAT  ' + Math.round(per2 * 10) / 10 + ' m of ' + B.code + ' termination bar, ' +\n                anch + ' x ' + B.anchor + ' (stainless, into the stud frame) at ' +\n                Math.round(B.spacing * 1000) + ' mm and ' +\n                Math.ceil(per2 / B.mPerTube) + ' x ' + B.sealant + ' along the top edge');\n        ctx.log('FLAT  the membrane is TERMINATED there, not folded over the parapet -- the ' +\n                'coping sheds the water, and a second fold under it seals nothing and gets ' +\n                'drilled through anyway');\n        return yMid + t;\n      }\n\n      /* ===== ZONE F -- replace from here to the END of the file ============ */\n\n      /* The flat/parapet build-up and the six pitched skin layers */\n\n      /* THE TAPERED EPS, WHICH THE LOG HAS DESCRIBED FOR MONTHS AND NOBODY BUILT.\n\n         FLAT_ROOF.taper has sat in the constants since the parapet was written --\n         40 mm at the thin end, a 2 per cent fall -- and the closing log line\n         reported a tMean that was never computed, because the layer it belonged\n         to was never drawn. That is the THREW FLAT: the one line at the end of\n         _skinFlat naming a number nothing had produced.\n\n         IT SITS ON THE FLAT BOARD, NOT ON THE BARRIER. On its own the wedge is 40\n         mm at the outlets, which is no insulation at all there; the constant\n         layer under it -- INS01502, the sheet's flat 150 board -- is what carries\n         the roof's R, and the wedge only makes the fall. The wool between the\n         rafters stays: an unvented timber roof with foam over the deck and wool\n         under it is the ordinary US assembly, as long as the foam over the deck\n         is enough to keep the deck warm, and 150 plus the wedge is.\n\n         BILLED BY VOLUME. A wedge has no one thickness, so the row sells it by\n         the m3 and the quantity is the area times the MEAN -- thin end plus half\n         the climb -- which is exactly the solid that is drawn.\n\n         THE FALL GOES TO THE OUTLETS. The two outlets stand on the x0 wall, which\n         the drain code already calls the low wall, so the wedge is thinnest there\n         and climbs across the width to x1 -- one-way, the same over the whole\n         length, which is what a single row of outlets along one wall wants. The\n         mean is the thin end plus half the climb, and that is the number the\n         stack above it grows by.\n\n         ONLY THE WEDGE THIS STEP. The geotextile, the membrane, the outlets and\n         the ballast still sit on a level line at the mean height; putting them on\n         the slope is the next step and the log says so. It is drawn as one solid\n         with a sloping top rather than a stack of boxes, because a stack of boxes\n         is what makes a fall read as stairs. */\n      function _flatTaper(ctx, x0, x1, z0, z1, yB, draw) {\n        var T = ctx.THREE, g = ctx.group;\n        var TP = FLAT_ROOF.taper;\n        var w = x1 - x0, d = z1 - z0;\n        var code = TP.code || 'tapered EPS';\n        var tMin = TP.min, tMax = TP.min + TP.fall * w;\n        var tMean = (tMin + tMax) / 2;\n        var area = w * d;\n\n        if (draw) {\n          var mat = new T.MeshStandardMaterial({\n            color: isNew('adu-roof.taper') ? MAGENTA : 0xF2EFE8,\n            roughness: 0.95, metalness: 0.0, side: T.DoubleSide });\n          var A0 = [x0, yB, z0], A1 = [x1, yB, z0], A2 = [x1, yB, z1], A3 = [x0, yB, z1];\n          var T0 = [x0, yB + tMin, z0], T1 = [x1, yB + tMax, z0];\n          var T2 = [x1, yB + tMax, z1], T3 = [x0, yB + tMin, z1];\n          var vv = [];\n          quad(vv, A0, A3, A2, A1);\n          quad(vv, T0, T1, T2, T3);\n          quad(vv, A0, A1, T1, T0);\n          quad(vv, A1, A2, T2, T1);\n          quad(vv, A2, A3, T3, T2);\n          quad(vv, A3, A0, T0, T3);\n          var geo = new T.BufferGeometry();\n          geo.setAttribute('position', new T.Float32BufferAttribute(vv, 3));\n          geo.computeVertexNormals();\n          var m = new T.Mesh(geo, mat);\n          m.name = 'flat-taper';\n          g.add(m);\n        }\n\n        var vol = area * tMean;\n        if (TP.code) _add('adu-roof', TP.code, vol);\n        ctx.log('FLAT  taper ' + API.fmtArea(area) + ' = ' + (Math.round(vol * 100) / 100) +\n                ' m3 of ' + code + ': ' +\n                Math.round(tMin * 1000) + ' at the low wall x ' + Math.round(x0 * 1000) +\n                ' rising ' + Math.round(TP.fall * 100) + ' per cent across ' +\n                Math.round(w * 1000) + ' to ' + Math.round(tMax * 1000) + ' at x ' +\n                Math.round(x1 * 1000) + ', mean ' + Math.round(tMean * 1000) +\n                ' -- one-way fall to the outlet wall, the same along the whole length; ' +\n                'one wedge from ' + Math.round(yB * 1000) + ' up, on the flat EPS, ' +\n                (draw ? 'drawn' : 'NOT drawn (FLAT_STEP)') +\n                (TP.code ? ', billed by VOLUME: area x mean thickness'\n                         : ' -- NOT BILLED: no tapered row in the sheet; INS01502 is the flat ' +\n                           '150 board under it, not this'));\n        return tMean;\n      }\n\n      function _skinFlat(ctx, planes) {\n        /* THE FLAT ROOF FROM THE SHARED MODULE (core-v789, status/modules.md 8c):\n           deck, barrier, tapered EPS + PIR, membrane, parapet and coping,\n           scupper and downspout, ballast are written once in configurator-ui.js;\n           this product hands in its own pieces. */\n        if (typeof API.houseFlatRoof !== 'function') { ctx.log('FLAT  THREW the shared flat roof module is missing -- configurator-ui.js core-v789 or later'); return; }\n        API.houseFlatRoof(ctx, planes, {\n          api: API, layer: 'adu-roof', MAGENTA: MAGENTA, FLAT_ROOF: FLAT_ROOF, FLAT_STEP: FLAT_STEP,\n          PARAPET_UPSTAND: PARAPET_UPSTAND, RAFTER: RAFTER, STUD: STUD, GUT: GUT, isNew: isNew, quad: quad,\n          roofSection: roofSection, flatBays: _flatBays, flatMembrane: _flatMembrane, flatTaper: _flatTaper,\n          facadeFace: _facadeFace, dspSweep: _dspSweep, wallStuds: function () { return _wallStuds; },\n          add: function (code, q) { _add('adu-roof', code, q); }\n        });\n      }\n\n      /* ---------- STEP 1: THE DECK ------------------------------------------\n         Written from scratch. The previous one had three faults at once, which is\n         why it kept looking wrong in a different way each time:\n\n           IT SAT EXACTLY ON THE RAFTER TOPS. The deck plane IS the rafter top, so\n           the board's underside and the timber's top face were the same surface --\n           two coplanar faces fighting for the same pixels. That is the glitching,\n           and no amount of adjusting the boards would ever have fixed it.\n\n           THE CHAMFER WAS MINE AND IT BACKFIRED. I sloped the top edge to make the\n           joints read; what it produced was a leaning face at every sheet edge,\n           standing proud. He is right that it looked like the joints were sticking\n           up, because they were.\n\n           AND THE WINDING WAS LEFT TO LUCK. Faces were emitted in whatever order\n           the corners came out, so some rendered inside-out.\n\n         So: a plain box per sheet, its true 18 mm, lifted one millimetre clear of\n         the timber, drawn double-sided so winding cannot betray it, and the joints\n         are simply the 4 mm gaps between boards. Nothing clever. */\n      /* ===== ZONE G -- replace from here to the END of the file ============ */\n\n      /* The six skin layers only: deck, underlay, battens, edges, covering, ridge.\n         The smallest zone -- a change to one layer lands here */\n\n      /* THE SHEET GRID IS SQUARE, AND THE OUTLINE CUTS IT.\n\n         I ran each joint by interpolating between two opposite EDGES of the plane.\n         On a trapezoid those edges converge, so the joints leaned with them; on a\n         triangle it was worse. But a board is a rectangle -- what converges is the\n         roof, not the boards on it.\n\n         So the grid is built on two perpendicular axes lying IN the plane: one\n         along the eave, one straight up the slope. Lines are laid out on that grid\n         and then CLIPPED by the plane's outline, which is the way round it happens\n         on a roof -- you set out square and cut to fit (Marek). */\n      /* THE DECK IS BUILT BY THE SHARED DRAWER (adu-v1391, K3): the body that\n         stood here is in configurator-ui.js as the roof skin's step 1, copied\n         line for line; this product only says what the deck is made of. */\n      function _skinSpec(ctx, planes, only) {\n        var SS = STATE.isMetric ? SHEET.metric : SHEET.imperial;\n        return {\n          layer: 'adu-roof', planes: planes, only: only,\n          lift: function () { return _skinLift(); },\n          deck: ROOF_DECK, underlay: ROOF_UL, sheet: { l: SS.l, w: SS.w },\n          battens: { counter: ROOF_BATTEN.counter, batten: ROOF_BATTEN.batten, screw: ROOF_BATTEN.screw, col: STRUCT_WOOD },\n          covering: (function () {\n            var C = _covDef();\n            return { kind: C.key, picked: _covKey(API.STATE.covering || 'shingle'), gauge: C.batten, code: C.code, def: C.def, color: colorOf('roof'),\n                     table: { gap: COV_GAP, ridgeGap: COV_RIDGE_GAP, monoOver: COV_MONO_OVER, shingle: COV_SHINGLE, trapez: COV_TRAPEZ, seam: COV_SEAM } };\n          })(),\n          members: _memberPts, spacing: _batSpacing(),\n          edges: { drip: ROOF_EDGE.drip, verge: ROOF_EDGE.verge, fix: ROOF_EDGE.fix, fixSpacing: ROOF_EDGE.fixSpacing, color: colorOf('metal'),\n                   fascia: { code: WALL_SOFF.trim, h: 0.200, t: 0.025, color: colorOf('timber') } },\n          ridge: ROOF_RIDGE,\n          isNew: isNew,\n          mark: function (k, d, l, c) { _asmMark(ctx, k, d, l, c); },\n          tex: function (kind, col) { return (kind === 'shingle') ? _grainTex(ctx.THREE, 'shingle', col) : _finTex(ctx.THREE, kind); },\n          why: function (line) { _why(ctx, line); }\n        };\n      }\n      function _skinDeck(ctx, planes) {\n        API.roofSkin(ctx, _skinSpec(ctx, planes, ['deck']));\n      }\n\n      /* ---------- STEP 2: THE UNDERLAY --------------------------------------\n         ROR00008 on the deck, and it is the layer that keeps the building dry\n         between the frame going up and the covering going on -- which on a real\n         site can be weeks. After that it is the second line of defence: anything\n         that gets past the covering runs down this to the eave.\n\n         LAID FROM THE EAVE UP, courses along the contour, each one lapping the one\n         below. That order is not decoration -- lap them the other way and every\n         joint faces uphill and collects the water it is meant to shed. It is also\n         why this has to be drawn as courses rather than one sheet: the direction\n         of the lap IS the detail, and a single rectangle cannot show it.\n\n         THE ROLL IS MEASURED ON THE SLOPE, THE PLAN IS NOT. A 1.5 m roll laid on a\n         pitched plane only covers 1.5 x cos(pitch) of ground. Here the courses are\n         stepped along the plane itself rather than in plan, so the roll width is\n         already the slope measurement and there is no factor to apply -- get that\n         backwards on a plan-based layout and a steep roof is short of underlay by\n         exactly the amount it needs most (tiny).\n\n         NO TAPE. On a cold roof the laps are held by what goes on top of them;\n         taping is for a sealed warm deck, which this is not. What it does get is\n         staples, because until the covering arrives the wind has it. */\n      /* THE LAP FOLLOWS THE PITCH, because a flatter roof gives water longer to\n         find the seam: over 30 degrees 100-150 mm is enough, 22-30 wants 150-200,\n         and below 22 it is 200 and often taped. At this roof's 26 degrees 150 was\n         the bottom of the range, which is not where a membrane lap belongs. */\n      var ROOF_UL = { code: 'ROR00008', roll: 1.50, lap: 0.20, staple: 'FAS63000',\n                      t: 0.0006 };\n      function _ulLap() {\n        var p = (STATE.roof && STATE.roof.pitch) || 26;\n        return (p >= 30) ? 0.15 : ((p >= 22) ? 0.20 : 0.25);\n      }\n\n      /* THE UNDERLAY IS BUILT BY THE SHARED DRAWER (adu-v1391, K3), step 2 */\n      function _skinUnderlay(ctx, planes) {\n        API.roofSkin(ctx, _skinSpec(ctx, planes, ['underlay']));\n      }\n\n      /* ---------- STEP 3: WHAT THE COVERING IS FIXED TO ----------------------\n         The first layer DECIDED BY A CHOICE the person made. The covering switch\n         has been carrying its answer around and this is what reads it. */\n      var ROOF_BATTEN = {\n        counter: { code: 'KVR50030', w: 0.050, h: 0.030 },\n        batten:  { code: 'KVR50031', w: 0.050, h: 0.030 },\n        screw: 'FAS60100'\n      };\n\n      /* how far the fixing layer stands off the deck -- nothing under a shingle,\n         two bars under a sheet */\n      /* WHERE THE BATTEN GRID REALLY STARTS, computed once and used by both the\n         battens and whatever lands on them.\n\n         This returned the two batten depths measured from the DECK -- 60 mm -- but\n         the bars do not start at the deck. They start on top of the underlay, at\n         26 mm, because the felt goes on first. So the grid's real top is 86 and the\n         covering was being laid at 81, and the battens stood 5 mm proud of the\n         sheet they are supposed to be under.\n\n         Five millimetres is small and it is still two layers in the wrong order.\n         One function, both callers. */\n      function _batBase(slope) {\n        var ulTop = 0.001 + ROOF_DECK.t + 0.002 + ROOF_UL.t;\n        /* the same lap the membrane was actually laid with -- it now follows the\n           pitch, and this was still reading the old flat constant */\n        var courses = Math.max(1, Math.ceil((slope || 4) / (ROOF_UL.roll - _ulLap())));\n        return ulTop + courses * 0.0012 + 0.001;\n      }\n\n      function _batTop(slope) {\n        var C = _covDef();\n        if (C.key === 'shingle') return ROOF_DECK.t + 0.004;\n        return _batBase(slope) + ROOF_BATTEN.counter.h + ROOF_BATTEN.batten.h;\n      }\n\n      /* THE BATTENS ARE BUILT BY THE SHARED DRAWER (adu-v1392, K4), step 3;\n         _batBase, _batTop and _batSpacing stay for the layers still built here */\n      function _skinBattens(ctx, planes) {\n        API.roofSkin(ctx, _skinSpec(ctx, planes, ['battens']));\n      }\n      function _batSpacing() {\n        if (_memberPts && _memberPts.length > 1) {\n          var d = Math.hypot(_memberPts[1][0] - _memberPts[0][0],\n                             _memberPts[1][1] - _memberPts[0][1]);\n          if (d > 0.05) return d;\n        }\n        var st = _trussStations();\n        return (st.length > 1) ? Math.abs(st[1] - st[0]) : API.grid();\n      }\n\n      /* A GRID OF BARS IN THE PLANE, CLIPPED BY ITS OUTLINE.\n\n         Same shape of solution as _deckGrid: two perpendicular axes lying in the\n         plane, lines laid out on them, each cut to where the outline actually is.\n         upSlope picks which of the two directions the bars run in. */\n\n      /* CLIP THE ROOF QUAD WITH THE TRUSS'S OWN VERTICAL PLANE.\n\n         For each published member: the cutting plane passes through it and is\n         square to the eave. A corner of the roof quad is on one side or the other\n         of that plane; wherever consecutive corners differ, the edge crosses it and\n         the crossing point is on the batten. Two crossings make the bar.\n\n         Everything is world coordinates throughout -- the truss coordinate goes in\n         and the bar ends come out, with no intermediate space to get wrong. */\n      /* _batCut and _batGrid moved to the drawer (adu-v1392) */\n      var ROOF_EDGE = {\n        fix: 'FAS00318', fixSpacing: 0.300,\n        drip: { code: 'ROM02401', face: 0.055, top: 0.060, t: 0.0007 },\n        verge: { code: 'ROR00006', face: 0.060, top: 0.070, t: 0.0007, rake: true,\n                 ridgeGap: 0.030, eaveOut: 0.050 }\n      };\n\n      /* THE DRIP EDGES, VERGES AND FASCIA ARE BUILT BY THE SHARED DRAWER (adu-v1394, K6), step 4 */\n      function _skinEdges(ctx, planes) {\n        API.roofSkin(ctx, _skinSpec(ctx, planes, ['edges']));\n      }\n\n      var WALL_STEP = 9;\n\n      /* THE MAGENTA FOR THIS WALL IS DECIDED HERE, NOT IN THE SWITCH BLOCK.\n\n         MAGENTA_LAYER lives at the top of the file, a long way outside this zone,\n         so every wall version has needed a second hand edit that has now been\n         forgotten twice -- the battens stayed magenta through two layers that were\n         supposed to have taken it. The wall names its own, in the zone that is\n         being sent, so the colour and the layer arrive together.\n\n         MAGENTA_LAYER still wins if it is pointed at a wall layer: one switch does\n         not get to silently ignore the other. */\n      /* NO MAGENTA THIS TIME, ON HIS CALL: the whole point of the sheathing is\n         the board layout and the flake texture, and magenta hides both. */\n      /* NO MAGENTA AGAIN, on his call: he is looking at the boards under it. */\n      /* A LIST, NOT ONE NAME.\n\n         A version usually adds one thing, so one name was enough. This one has\n         four pieces he cannot find -- the sills, the corner trim and the reveal\n         lining -- and colouring them one at a time would be four rounds to answer\n         one question. Comma separated, and it goes back to empty as soon as each\n         is accepted. */\n      /* ONE LOOKING SWITCH FOR THE WHOLE WALL.\n\n         He has asked three times now to hide something so he can see what is\n         behind it, and each time I have reached into a different function and\n         turned one thing off. That is how we ended up with an x-ray on the\n         vertical boards and nothing on the horizontal ones.\n\n         One name, read everywhere:\n\n           'all'      the wall as built\n           'ghost'    the boarding at half strength, BOTH directions, and no coat\n                      or render -- so on a ventilated wall you see the film and the\n                      battens through the boards, and on a contact wall you see the\n                      EPS, its joints, the mesh and the anchors with nothing over\n                      them\n           'eps'      the insulation on its own -- no mesh, no coat, no render, no\n                      boarding, and the joints drawn twice as wide and dark so the\n                      bond reads at a glance along with the plates in it\n           'frame'    nothing outside the sheathing at all\n\n         GHOST, NOT HIDDEN, and that is him correcting me. Turning the boarding off\n         took away the one thing that says which layer is which: with the cladding\n         gone the film and the battens are two objects with nothing to read them\n         against, and switching the direction changed what was VISIBLE rather than\n         what was there -- which is why the wall looked as if it changed volume.\n         (It does change, by 40 mm, and for a real reason: vertical boards need a\n         counter-batten. But that is not what he was seeing.)\n\n         Half strength keeps the reference and lets you look past it.\n\n         It hides. It does not stop anything being billed, because what is behind\n         the boarding costs the same whether you can see it or not. */\n      /* WALL_SHOW is DECLARED in the switch block at the end of the file. */\n\n\n      /* WALL_MAGENTA is DECLARED in the switch block at the end of the file. */\n\n\n      /* THE SAME BARRIER AS THE CEILING. One product, one roll, one lap.\n\n         AND IT HAS A DRAWN THICKNESS OF ITS OWN, WHICH IS THE POINT.\n\n         It was drawn at the frame face and the battens and the wool started at the\n         same plane, so two surfaces sat in exactly the same place and the renderer\n         had nothing to decide between them -- that is the flicker, and no amount of\n         material tuning fixes it. A film's TRUE thickness is a fraction of a\n         millimetre and would flicker just as badly; a film needs a DRAWN thickness.\n\n         1 mm, and everything in front of it starts 1 mm further in: battens, wool\n         and board all move out by VB_T together. Nothing is lost in the bill,\n         because the cavity wool is bought by the SQUARE METRE -- the row stays the\n         catalogue's 40 mm INS00403 whatever the drawing does with the last\n         millimetre. His suggestion, and it is the right one. */\n      var WALL_VB = CEIL_VB;\n      var VB_T = 0.001;\n\n      /* AND THE BREATHER, WHICH IS THE OTHER FILM AND NOT THE SAME ONE.\n\n         They look alike in a drawing and do opposite jobs. The barrier is on the\n         WARM face and stops vapour getting into the insulation; this one is on the\n         COLD face and lets whatever got in anyway back out, while keeping wind and\n         rain off the sheathing. Put either on the wrong side and the wall rots --\n         which is why they are two constants with two codes rather than one film\n         with a flag.\n\n         INS00002 is the sheet's own breathable membrane, 1500 wide, and it laps\n         and tapes exactly like the barrier does. Same arithmetic, deliberately:\n         bought is drawn times roll / (roll - lap), and the tape run is that extra\n         area folded back over itself. */\n      var WALL_MEMB = { code: 'INS00002', tape: 'INS01005', roll: 1.50, lap: 0.10,\n                        t: 0.001 };\n\n      /* THE SAME BOARD AS THE CEILING, NOT A SECOND TABLE OF IT.\n\n         It is the same product, the same 12.5 mm, the same screws, tape and\n         filler, and the same green sheet in a wet room. A wall copy would be a\n         second opinion waiting to drift the first time a code changes -- which is\n         exactly how the drawn thickness and the billed section came apart on the\n         partitions. One table, read twice. */\n      var WALL_BOARD = CEIL_BOARD;\n\n      /* THE WOOL THAT FILLS THE VOID THE BATTENS LEAVE.\n\n         A 40 mm service cavity left empty is 40 mm of convection loop behind the\n         board, so it is filled -- and with WOOL rather than the 40 mm PIR the\n         sheet also carries, because this cavity has cables and boxes in it and\n         wool takes a cut round a box where a rigid board leaves a gap.\n\n         INS00403 is the sheet's own 40 mm mineral wool. */\n      var WALL_WOOL = { code: 'INS00403', t: 0.040 };\n\n      /* AND THE BAYS OF THE FRAME ITSELF.\n\n         STUD.d is 160, and INS01601 is the sheet's own 160 mm mineral wool -- the\n         depth of the wall and the depth of the batt are the same number because\n         the wall was sized round the insulation an ADU has to show to be\n         permitted. Friction-fit between the studs: nothing holds it, the bay\n         holds it, which is why the bay width matters more than the area does. */\n      var WALL_BATT = { code: 'INS01601', t: STUD.d };\n\n      /* THE FACADE BATTEN, WHICH IS WHAT MAKES A RAINSCREEN A RAINSCREEN.\n\n         Same section as the service batten inside -- KVH40060 -- because it is the\n         same job the other way round: hold something off a surface and leave a\n         void behind it. 40 deep is the cavity, and a cavity is not decoration:\n         water that gets past the cladding runs down the membrane and out at the\n         bottom instead of into the wall.\n\n         VERTICAL, AND ON THE STUDS. It has to be screwed into something, and the\n         only thing behind it is the frame -- 18 mm of sheathing will not hold a\n         facade. So the positions are _wallStuds again, the frame's own published\n         list, which is also what decides the cladding module further out.\n\n         Vertical battens drain. Horizontal ones dam, and want a slot cut in every\n         one of them; that argument only comes back if the cladding is boarded\n         vertically, and this product is not there yet. */\n      var WALL_FBATT = { code: 'KVH40060', d: 0.040, f: 0.060, screw: 'FAS60100',\n                         screwStep: 0.600 };\n\n      /* THE CLADDING, AND IT RUNS EITHER WAY.\n\n         FVW01351 is the sheet's own ventilated-facade board: 135 wide, 15 thick,\n         6 m long, bought by the square metre. One product for both directions --\n         which way it is laid is a choice, not a different plank.\n\n         HORIZONTAL is the default and the simple case: the boards cross the\n         vertical battens and every board is caught on every batten.\n\n         VERTICAL COSTS A SECOND SET OF BATTENS and there is no way round it. The\n         facade battens under this are vertical, for drainage; a vertical board\n         laid straight onto them touches nothing but air between them. So a\n         horizontal counter-batten goes on first and the boards fix to that. It is\n         a real 40 mm and a real row in the bill, not a detail to wave through:\n         choosing vertical cladding makes the wall 40 mm thicker.\n\n         A 6 mm gap between boards, drawn: on a rainscreen the joint is open on\n         purpose -- it is what lets the cavity breathe -- and a cladding drawn\n         without it reads as a slab, which is the mistake the sheathing made. */\n      var WALL_CLAD = { code: 'FVW01351', w: 0.135, t: CLAD_T, gap: 0.006,\n                        nail: 'FAS70000', nailStep: 0.600 };\n\n      /* THE CONTACT FACADE, WHICH IS THE OTHER ANSWER TO THE SAME QUESTION.\n\n         A rainscreen holds the cladding off the wall and drains the gap behind it.\n         A contact facade has no gap at all: the insulation is stuck straight onto\n         the sheathing and the render goes on the insulation. So the two are not\n         layers that stack -- they are alternatives, and the OFF state of the\n         cladding tile is what chooses this one.\n\n         THE BOARD IS 1200 x 600, and the format is the point: that is 48 x 24\n         inches, the module the US market is built on, and it settles the anchor\n         count by itself. 0.72 m2 a board takes 3 anchors on the joints and 2 in\n         the field, which is 6.9 per square metre against a recommended 6.\n\n         ONE CONDITION, said rather than assumed: EPS is vapour closed, so the\n         outer layer has to be thick enough to keep the sheathing above the dew\n         point. 140 outside against 160 in the bays carries about half the wall's\n         resistance, which is safe. Thinner than about 100 and the argument for\n         mineral wool comes back -- tiny's rule, and it holds here (Marek).\n\n         A can of foam does about 10 square metres of board on the ribbon-and-dab\n         it is used for. */\n      /* THE REINFORCING MESH, BEDDED IN THE COAT.\n\n         GTM00001, the sheet's own glass fibre textile. It is not a covering: it is\n         what stops the render cracking where the boards move against each other,\n         so it laps 100 on a 1000 roll and the lap is the point -- an unlapped\n         joint in the mesh is a crack line waiting for the first cold night.\n\n         Red with the same print as the breather, on his call. It reads instantly\n         as a different film from the grey one two layers in, which is what a\n         colour is for here. */\n      var WALL_MESH = { code: 'GTM00001', t: 0.0012, roll: 1.00, lap: 0.10 };\n\n      /* THE BASE COAT, WHICH IS WHAT ALL OF THAT WAS FOR.\n\n         FFR00051, five millimetres over the whole insulated face and round every\n         reveal. The mesh does not sit ON it and it does not sit on the mesh: the\n         mesh is bedded IN it, which is why the coat goes on in two passes on site\n         and why it is one item here.\n\n         AND EVERYTHING UNDER IT HAS TO FIT INSIDE FIVE MILLIMETRES. The beads were\n         drawn six out from the board so they could be seen while they were the\n         subject; with the coat on, six out of a five-thick coat is a bead standing\n         proud of the render, which is a defect rather than a detail. They come in\n         to where they really are and the coat buries them, which is the point of\n         doing the layers in this order.\n\n         AND THE UNIT IS THE SHEET'S, WHICHEVER IT IS.\n\n         He asked where things get converted and whether there is a shared asset\n         for it. There is not, in any product: the BBQ does it in its own lib, in\n         the row's own qtyFrom -- tying wire is rebar metres times 1.21 kg a metre\n         times one and a half per cent -- and the catalogue is only told the unit.\n         So the pattern is one lib, one derivation, written next to the code.\n\n         Done here by ASKING the catalogue rather than deciding: FFR00051 is M2 on\n         the sheet today, so square metres go out. Change that row to KG and this\n         multiplies by the spread rate instead, without anyone editing the lib. A\n         coat of this kind goes on at about 5 kg to the square metre over the mesh,\n         and that number lives here because it is a property of the material, not\n         of the wall. */\n      var WALL_COAT = { code: 'FFR00051', t: 0.0055, gap: 0.0006, kgPerM2: 5.0 };\n\n      /* THE FINISH, AND IT IS TWO PRODUCTS PLUS A THIRD AT THE BOTTOM.\n\n         PEN00001 primer, then FCP00001 render. The primer is the one nobody sees\n         and the one that decides whether the render stays on: it keys the two\n         coats together and stops the base coat drinking the water out of the\n         render before it has set. Billed and drawn, thin, because a layer in the\n         bill that is nowhere in the model is exactly what this programme exists to\n         stop.\n\n         AND THE PLINTH IS ITS OWN PRODUCT. FCP00002 over the bottom 300, because\n         that band gets splashed, kicked and snowed against, and the ordinary\n         render is not made for it. Drawn 3 mm proud so the change of material\n         reads as a change of material rather than a change of colour -- which is\n         also how it looks on a wall. */\n      /* THE SKIRT: WHAT CLOSES THE GAP UNDER THE FLOOR.\n\n         The walls stand on the finished deck, so below their base there is the\n         deck, the joists and open air down to the ground. Tiny closes it with a\n         cement board on the facade battens carried down, and that is right for a\n         ventilated wall: the board is the cladding of that band and the cavity\n         behind it drains with the rest.\n\n         A CONTACT FACADE CANNOT DO THAT, because it has no battens and no cavity.\n         There the sheathing is what runs down over the rim, and the ETICS carries\n         on over it to the starter track -- which is where the track was always\n         going to want to be. So: OSB down, and the plinth build-up on it. His\n         question, and both answers are the same principle -- the skirt is whatever\n         the wall above it is, continued.\n\n         The band is plain: no openings, no courses, no bond. It is one storey's\n         floor structure deep and it stops below the joists. */\n      /* SKIRT_SHOW is a LOOKING gate, not a build step.\n\n         'all'   everything, the way it is built\n         'frame' only what the covering hangs on -- the sheathing and, on a\n                 ventilated wall, the battens. The board, the EPS, the coat and the\n                 render are skipped in the drawing ONLY.\n\n         The bill stays whole either way, and that is the difference between this\n         and WALL_STEP: a step that has not been reviewed is not drawn and not\n         billed, but hiding something to look behind it must not change the price.\n         Set it back to 'all' once the substrate has been checked. */\n      var SKIRT_SHOW = 'all';\n\n      /* THE SILLS AND THE TRIM -- TINY'S NUMBERS, NOT MINE.\n\n         All three exist in the tiny house and are settled there, so the sections\n         are copied rather than invented: OWW00002 outside, OWW00001 inside,\n         FVW02660 for the corner. The only thing adapted is WHERE the outside one\n         ends, because tiny's facade is one build-up and this product has two. */\n      var WALL_ESILL = { code: 'OWW00002', out: 0.050, t: 0.022, side: 0.035, fall: 0.06 };\n      var WALL_ISILL = { code: 'OWW00001', out: 0.040, t: 0.020, side: 0.030 };\n      var WALL_CTRIM = { code: 'FVW02660', leg: 0.070, t: 0.019 };\n\n      var WALL_SKIRT = { board: 'FCB00013', screw: 'FAT16012',\n                         boardT: 0.012, screwPerM2: 12, clear: 0.030 };\n\n      var WALL_REND = { prim: 'PEN00001', code: 'FCP00001',\n                        plinth: 'FCP00002', plinthH: 0.300, plinthProud: 0.003,\n                        pt: 0.0005, t: 0.006 };\n\n      /* THE CORNER BEAD, WHICH IS WHY AN ETICS CORNER SURVIVES BEING WALKED INTO.\n\n         FCP00006 -- the sheet's own bead, 100 and 150 mm legs with the mesh\n         already bonded to it. It does two jobs at once and both matter: the nose\n         gives the render a straight arris to finish against, and the two mesh\n         wings carry the reinforcement round the corner, which is where a rendered\n         facade cracks first because that is where the two planes move against\n         each other.\n\n         Its mesh wings ARE the mesh at a corner, so the field mesh laps onto them\n         rather than being cut short -- and that is why it goes on BEFORE the field\n         mesh on site, even though it is drawn after here. */\n      /* AND THE REAL PROPORTIONS OF ONE.\n\n         The bead itself is a galvanised angle with short legs -- the catalogue's\n         100 and 150 -- and the mesh bonded to it runs a good deal further than the\n         metal does, out to about 225 from the arris, because its job is to reach\n         PAST the corner and be lapped by the field mesh well clear of the angle.\n         Drawn as one piece it read as neither: too small to see and the wrong\n         shape. So the angle and the wings are two things, which is what they are.\n\n         The metal is zinc, not white: at a glance that is what tells a bead from\n         a strip of render (Marek). */\n      /* THREE PROFILES, THREE JOBS, THREE ROWS.\n\n         They are not interchangeable and billing them as one would be the same\n         mistake as billing the foam and the anchors as one fixing:\n\n           FCP00006  the corner bead -- every external arris: the building's own\n                     corners and both jambs of every opening.\n           FCP00008  the drip bead -- the HEAD of every opening only. Its nose\n                     throws water clear instead of letting it run back along the\n                     soffit and down the glass, which is what the plain corner\n                     bead would do there.\n           FCP00007  the APU, the window connection profile -- round the whole\n                     perimeter of every opening where the render meets the frame.\n                     It is not an arris piece at all: it takes the movement between\n                     two different materials and carries the mesh onto the frame.\n\n         Each is measured off what is drawn, and each run is its own. */\n      var WALL_BEAD = { code: 'FCP00006', drip: 'FCP00008', apu: 'FCP00007',\n                        legA: 0.100, legB: 0.150,\n                        wing: 0.225, t: 0.0012, metalT: 0.0012,\n                        turn: 0.030 };\n\n      var WALL_EPS = { code: 'INS01402', t: 0.140, w: 1.200, h: 0.600,\n                       foam: 'FCP00005', foamPerM2: 0.10,\n                       anchor: 'FAT00016', anchorPerBoard: 5,\n                       track: 'FCP00004', joint: 0.004 };\n\n      var WALL_BATTEN = {\n        code: 'KVH40060',\n        d: 0.040,        /* off the face of the frame -- the service void */\n        f: 0.060,        /* the face the board is screwed to */\n        spacing: 0.400,\n        screw: 'FAS60100'\n      };\n\n\n\n\n      /* THE ONE NAME THE BOOT BLOCK KNOWS, AND EVERYTHING ELSE HANGS OFF IT.\n\n         The layer is registered up in the boot block as _buildWallBattens, and the\n         boot block is nowhere near this zone. Adding the board by changing the\n         registration meant the change landed OUTSIDE the zone that was sent -- so\n         the battens ran, the board did not, and the file looked correct in every\n         other way. That is the whole failure and it will repeat on layer three,\n         four and five unless the seam moves.\n\n         So the registered name is the entry point and it calls the layers in\n         order. Nine layers are coming; not one of them needs the boot block\n         touched again, and a zone delivery is the whole change. */\n      /* AND THE ZONE CARRIES ITS OWN CODES.\n\n         The catalogue mirror is up at line 7800 and out of reach of this zone, so\n         a layer that needed a new code needed the whole file again. The joinery\n         already mints its opening codes on the way past for the same reason, so\n         this is that habit rather than a new one: the wall names the rows it\n         bills, here, next to the layers that bill them. */\n      function _wallCat() {\n        var C = {\n          'KVH40060': { unit: 'm',  label: 'Timber batten 40x60' },\n          'INS00403': { unit: 'm2', label: 'Mineral wool 40' },\n          'INS01402': { unit: 'm2', label: 'EPS insulation board 140' },\n          'FCP00005': { unit: 'pcs', label: 'Low expansion adhesive foam 750ml' },\n          'FAT00016': { unit: 'pcs', label: 'Insulation plate anchor 60' },\n          'FCP00004': { unit: 'm',  label: 'Insulation starter track 120' },\n          'FCP00006': { unit: 'm',  label: 'ETICS corner bead with mesh 100x150' },\n          'FCP00007': { unit: 'm',  label: 'Window connection profile with mesh 9' },\n          'FCP00008': { unit: 'm',  label: 'Drip bead with mesh 100' },\n          'GTM00001': { unit: 'm2', label: 'Glass fiber textile mesh' },\n          'FFR00051': { unit: 'm2', label: 'Reinforcing base coat 5' },\n          'FVW01351': { unit: 'm2', label: 'Wood facade cladding 135x15' },\n          'PEN00001': { unit: 'm2', label: 'Penetrating primer' },\n          'FCP00001': { unit: 'm2', label: 'Facade render 6' },\n          'FCP00002': { unit: 'm2', label: 'Plinth render 6' },\n          'OWW00002': { unit: 'm',  label: 'Exterior window sill' },\n          'OWW00001': { unit: 'm',  label: 'Interior window sill' },\n          'FVW02660': { unit: 'm',  label: 'Wood corner trim profile' },\n          'FCB00013': { unit: 'm2', label: 'Cement board' },\n          'FEC00034': { unit: 'm',  label: 'Rodent mesh' },\n          'ROV00100': { unit: 'm',  label: 'Eaves ventilation strip 100' },\n          'ROV00101': { unit: 'm',  label: 'Eave vent baffle' },\n          'MFP00002': { unit: 'm2', label: 'Exterior wood coating' },\n          'WIS00001': { unit: 'm2', label: 'Interior paint' },\n          'SBC00001': { unit: 'm2', label: 'Ceramic wall tile' },\n          'ODD00003': { unit: 'm',  label: 'Door transition strip' },\n          'LPS00001': { unit: 'pcs', label: 'Lightning air terminal' },\n          'LPS00002': { unit: 'm',   label: 'Lightning conductor cable' },\n          'LPS00003': { unit: 'pcs', label: 'Conductor clip' },\n          'LPS00004': { unit: 'pcs', label: 'Conductor connector' },\n          'LPS00005': { unit: 'pcs', label: 'Ground rod' },\n          'LPS00006': { unit: 'pcs', label: 'Ground rod clamp' },\n          'LPS00007': { unit: 'pcs', label: 'Bonding clamp' },\n          'LPS00008': { unit: 'pcs', label: 'Down conductor guard' },\n          'EEE00001': { unit: 'm',   label: 'Cable 3x2.5' },\n          'EES00001': { unit: 'pcs', label: 'Socket outlet' },\n          'EEC00002': { unit: 'pcs', label: 'Ceiling light' },\n          'EEL00001': { unit: 'pcs', label: 'Light switch' },\n          'EED00001': { unit: 'pcs', label: 'Consumer unit' },\n          'EEC00003': { unit: 'pcs', label: 'Circuit breaker' },\n          'EER00001': { unit: 'pcs', label: 'RCD' },\n          'TST00002': { unit: 'm2',  label: 'Decking boards' },\n          'SFF00002': { unit: 'pcs', label: 'Concrete tile' },\n          'FCO00012': { unit: 'pcs', label: 'Deck block 300x300x200' },\n          'FCO00011': { unit: 'pcs', label: 'Foundation vent 400x200' },\n          /* THE ROOF SKIN, REGISTERED. Every one of these was billed by the roof\n             and dropped here for want of an entry -- the covering, the underlay,\n             the battens, the edges, the ridge, the gutter corners, the posts'\n             hardware: a whole roof drawn and priced against nothing (Marek:\n             the covering is not in the budget at all). */\n          'ROR00001': { unit: 'm2',  label: 'Roof tiles / covering' },\n          'ROR12003': { unit: 'm2',  label: 'Lightweight roof covering (standing seam)' },\n          'ROR12004': { unit: 'm2',  label: 'Corrugated roofing panels 3650x660' },\n          'ROR00008': { unit: 'm2',  label: 'Breathable roof underlay' },\n          'FAS63000': { unit: 'pcs', label: 'Staples 63' },\n          'KVR50031': { unit: 'm',   label: 'Roof batten 50x30' },\n          'ROM02401': { unit: 'm',   label: 'Drip edge flashing 240' },\n          'ROR00006': { unit: 'm',   label: 'Gable flashing (verge)' },\n          'ROR00009': { unit: 'm',   label: 'Ridge cap flashing 250' },\n          'ROR00007': { unit: 'm',   label: 'Ridge ventilation strip' },\n          'ROG00003': { unit: 'pcs', label: 'External gutter corner 125' },\n          'FGR00002': { unit: 'pcs', label: 'U head post adapter' },\n          /* consumables the audit found undrawn AND unbilled (Marek: everything\n             in the model, and what fixes it, into the bill) */\n          'INS01005': { unit: 'm',   label: 'Sealing tape for membranes 60 mm' },\n          'FCO00003': { unit: 'm',   label: 'Reinforcing steel bar 14' },\n          'WWR00061': { unit: 'pcs', label: 'Reinforcing stirrups 250x200' },\n          'FFM00004': { unit: 'pcs', label: 'Rebar spacer' },\n          'FEC00026': { unit: 'kg',  label: 'Tying wire' },\n          'FCO00007': { unit: 'ls',  label: 'Foundation formwork' },\n          'FCO00013': { unit: 'pcs', label: 'Crawl space access door 600x450' },\n          'SES28011': { unit: 'pcs', label: 'Exterior straight stairs' },\n          'ODD00002': { unit: 'pcs', label: 'Exterior security door handle set' },\n          'EEJ00001': { unit: 'pcs', label: 'Junction box' },\n          'EES00003': { unit: 'pcs', label: 'Screw and quick connectors' },\n          'EEG00001': { unit: 'pcs', label: 'Grounding set' },\n          /* interior door units, by leaf width and hand (the frame depth 140 suits a 100 mm partition) */\n          'ODI06001': { unit: 'pcs', label: 'Interior door 600 LH' },\n          'ODI06002': { unit: 'pcs', label: 'Interior door 600 RH' },\n          'ODI08001': { unit: 'pcs', label: 'Interior door 800 LH' },\n          'ODI08002': { unit: 'pcs', label: 'Interior door 800 RH' },\n          'ODI09001': { unit: 'pcs', label: 'Interior door 900 LH' },\n          'ODI09002': { unit: 'pcs', label: 'Interior door 900 RH' },\n          'ODI12001': { unit: 'pcs', label: 'Double interior door 1220' },\n          'ODI16001': { unit: 'pcs', label: 'Double interior door 1520' },\n          /* adu-v1403: the closet doors and the sliding hardware (catalogue rows\n             from the closet round) */\n          'ODI18001': { unit: 'pcs', label: 'Double interior door 1830' },\n          'ODI06007': { unit: 'pcs', label: 'Bifold door 600' },\n          'ODI08007': { unit: 'pcs', label: 'Bifold door 800' },\n          'ODI09007': { unit: 'pcs', label: 'Bifold door 900' },\n          'ODI12002': { unit: 'pcs', label: 'Bypass sliding door 1220' },\n          'ODI16002': { unit: 'pcs', label: 'Bypass sliding door 1520' },\n          'ODI18002': { unit: 'pcs', label: 'Bypass sliding door 1830' },\n          'ODD00007': { unit: 'pcs', label: 'Bypass door track kit 1220' },\n          'ODD00008': { unit: 'pcs', label: 'Bypass door track kit 1520' },\n          'ODD00009': { unit: 'pcs', label: 'Bypass door track kit 1830' },\n          'ODD00010': { unit: 'pcs', label: 'Sliding door track kit 600' },\n          'ODD00011': { unit: 'pcs', label: 'Sliding door track kit 800' },\n          'ODD00012': { unit: 'pcs', label: 'Sliding door track kit 900' },\n          'ODD00013': { unit: 'pcs', label: 'Double sliding door track kit 1220' },\n          'ODD00014': { unit: 'pcs', label: 'Double sliding door track kit 1520' },\n          'ODD00015': { unit: 'pcs', label: 'Double sliding door track kit 1830' },\n          'ODD00016': { unit: 'pcs', label: 'Dummy door knob' },\n          'ODD00017': { unit: 'pcs', label: 'Ball catch' },\n          'ODD00018': { unit: 'pcs', label: 'Flush bolt' },\n          'ODD00019': { unit: 'pcs', label: 'Flush cup pull' },\n          'ODD00020': { unit: 'pcs', label: 'Bifold door aligner' },\n          'ODD00001': { unit: 'pcs', label: 'Interior door handle set' },\n          'ODD00005': { unit: 'pcs', label: 'Door hinge' },\n          'FAT00011': { unit: 'pcs', label: 'Joist hanger 60x240' },\n          'FCO00004': { unit: 'pcs', label: 'Post base anchor U type' },\n          'FAS80200': { unit: 'pcs', label: 'Washer head screw 8x200' },\n          'FAS50060': { unit: 'pcs', label: 'Wood screw 5x60' },\n          'ROR00012': { unit: 'm',   label: 'Self adhesive flashing tape 150' },\n          'FEC00040': { unit: 'pcs', label: 'Sanitary silicone 310 ml' },\n          'FAS60080': { unit: 'pcs', label: 'Wood screw 6x80' },\n          'FGR00004': { unit: 'pcs', label: 'Load bearing ground screw 1200 (post)' },\n          'FGR00001': { unit: 'pcs', label: 'Ground screw 1200x76' },\n          'INS01003': { unit: 'm',   label: 'Sill seal under bottom plate' },\n          'FEC00039': { unit: 'pcs', label: 'Anchor bolt M16' },\n          'ROV00001': { unit: 'm2',  label: 'Vapour barrier foil 0.15' },\n          'KVH60160': { unit: 'm',   label: 'Timber 60x160' },\n          'FEC00002': { unit: 'm3',  label: 'Gravel base' },\n          'SBG00001': { unit: 'kg', label: 'Grout' },\n          'INS01003': { unit: 'm',  label: 'Sill seal' },\n          'FAT16012': { unit: 'pcs', label: 'Cement board screw 4x32' }\n        }, k;\n        for (k in C) {\n          if (!C.hasOwnProperty(k) || __CORE.CATALOG[k]) continue;\n          __CORE.CATALOG[k] = { code: k, unit: C[k].unit, label: C[k].label };\n        }\n\n        /* AND IT SAYS WHAT IT MINTED, BECAUSE THE ALTERNATIVE IS SILENCE.\n\n           Three of these were missing -- the mesh, the base coat and the cladding\n           -- and _add refuses a key the catalogue has never heard of. It logs one\n           line and carries on, so the layer drew, the log said how much of it\n           there was, and the budget simply never mentioned it. Three whole\n           products drawn and not bought.\n\n           That is the failure mode this list exists to prevent, so from here the\n           list checks itself: every code the wall bills is named here, and the\n           count is printed where it can be read. */\n        var have = 0, kk;\n        for (kk in C) { if (C.hasOwnProperty(kk) && __CORE.CATALOG[kk]) have++; }\n        _log('WAL  catalogue: ' + have + ' wall code(s) registered');\n      }\n\n      /* EVERY SQUARE METRE OF TIMBER ON THE OUTSIDE IS FINISHED, AND NONE OF IT\n         HAS EVER BEEN PRICED.\n\n         Tiny bills MFP00002 for exactly this and says in its own comment that it\n         is not small money. The ADU draws cladding, reveal linings, soffits and\n         trims -- all of it timber, all of it outdoors, all of it coated before it\n         goes up and again after -- and the bill has never carried a litre of it.\n\n         It is billed by the SURFACE, once. How many coats is a specification\n         question and belongs in the row, not in the quantity.\n\n         On a contact facade the wall is render, so only the soffit and the trims\n         are timber and the wall drops out of the sum by itself: this counts what\n         was DRAWN, so a wall that was never boarded contributes nothing. */\n      var _extCoatA = 0;\n\n      /* WHAT IS STANDING IN AN OPENING -- ASKED OF THE SCENE, NOT OF THE CODE.\n\n         This version measures; it does not fix anything. Five openings, one of\n         them with textile over its head and the other four clean, and every\n         candidate the code offers has already been ruled out on paper: the\n         coursed mesh is clipped against the opening rectangle at draw time and\n         cannot cross a hole, the gable skin starts AT the wall head and never\n         reaches down, and the reveal bead is drawn the same way at all five. One\n         of those three statements is false on this model, and reading the code\n         again will not say which.\n\n         So the pieces are asked directly. Every object in the wall group whose\n         name carries the word mesh is projected into each opening's own frame --\n         along the wall, up the wall, out through the build-up -- and anything\n         that lands INSIDE the hole is named, measured and painted magenta.\n\n         The tail of each line is the coat over that head, because if nothing is\n         intruding then what he is looking at is textile that was never covered,\n         which is the opposite fault in a different layer. */\n      function _wallOpeningScan(ctx) { var WK = _wk(ctx); if (WK) WK.openingScan(ctx); }\n\n      function _buildWallBattens(ctx) {\n        _extCoatA = 0;\n\n        /* SAY WHICH WALL IS BEING BUILT, FIRST LINE, EVERY TIME.\n\n           Twice now we have spent a round with him looking at one facade and me\n           reasoning about the other. The tile cycles off / horizontal / vertical\n           and OFF is the contact facade, which is not obvious from the tile and is\n           impossible to see once the render is hidden. */\n        _log('WAL  FACADE = ' + (_cladOff() ? 'CONTACT (EPS, foam, plates, mesh, render)'\n              : ('VENTILATED, boards ' + (_cladVertical() ? 'VERTICAL' : 'HORIZONTAL'))) +\n             '; WALL_SHOW = ' + WALL_SHOW);\n        /* AND THE WALL EMPTIES ITS OWN BUCKET TOO. Same fault, same line: nine\n           layers do this and the wall was the tenth that did not, so every edit\n           bought the cladding, the batts and the boards over again. */\n        _billReset('adu-wall');\n        _wallCat();\n        _asmMark(ctx, 'layer_service_battens', 'in', 'Service battens', WALL_BATTEN.code);\n        _wallBattens(ctx);\n        _asmMark(ctx, 'layer_plasterboard', 'in', 'Plasterboard', (WALL_BOARD.dry && WALL_BOARD.dry.code) || 'WDD24001');\n        _wallBoard(ctx);\n        _asmMark(ctx, 'layer_mineral_wool', 'in', 'Mineral wool', 'INS00403');\n        _wallWool(ctx);\n        _asmMark(ctx, 'layer_vapour_barrier', 'side', 'Vapour barrier', 'ROV00001');\n        _wallVB(ctx);\n        _asmMark(ctx, 'layer_studs_wool', 'side', 'Mineral wool', 'INS01601');\n        _wallBatt(ctx);\n        _asmMark(ctx, 'layer_osb', 'side', 'OSB sheathing', 'OSB25002');\n        _wallSheathing(ctx);\n        _asmMark(ctx, 'layer_breather_membrane', 'side', 'Breather membrane', WALL_MEMB.code);\n        _wallMemb(ctx);\n        _asmMark(ctx, 'layer_vented_battens', 'side', 'Ventilated battens', WALL_FBATT.code);\n        _wallFacadeBattens(ctx);\n        _asmMark(ctx, 'sauna_ui_cladding', 'side', 'Cladding', WALL_CLAD.code);\n        _wallCladding(ctx);\n        _asmMark(ctx, 'layer_eps', 'side', 'EPS insulation', WALL_EPS.code);\n        _wallEps(ctx);\n        _asmMark(ctx, 'layer_base_coat', 'side', 'Base coat with mesh', WALL_COAT.code);\n        _wallMesh(ctx);\n        _wallCoat(ctx);\n        /* THE COATING WAS BILLED HERE AND AGAIN AT THE END, and the function\n           adds whatever has accumulated each time it is called -- so on a boarded\n           wall every square metre of timber was in the row twice, 77 here and\n           84 at the end. One call, the last one, after everything that paints. */\n        _asmMark(ctx, 'layer_render', 'side', 'Render', WALL_REND.code);\n        _wallRender(ctx);\n        _asmMark(ctx, 'skirt', 'side', 'Skirt', WALL_SKIRT.board);\n        _wallSkirt(ctx);\n        _asmMark(ctx, 'window_sill', 'side', 'Window sills', WALL_ESILL.code);\n        _wallExtSills(ctx);\n        _asmMark(ctx, 'window_sill_int', 'in', 'Interior sills', WALL_ISILL.code);\n        _wallIntSills(ctx);\n        _asmMark(ctx, 'corner_trim', 'side', 'Corner trims', WALL_CTRIM.code);\n        _wallCornerTrim(ctx);\n        _wallRevealLining(ctx);\n        /* NO INSULATION ABOVE THE WALL HEAD. The thermal line of this house is\n           the ceiling, with blown insulation over it; the triangle above the head\n           is the cold attic's wall and stays empty (Marek). _wallGableBatts drew\n           flat-topped batts there that stood out through the roof on a slope, and\n           it is gone rather than fixed. */\n        ctx.log('WAL  gable batts none -- the thermal line is the ceiling and its blown ' +\n                'insulation; the triangle above the head is a cold attic wall and stays ' +\n                'empty. INS01601 above the head is out of the bill with it');\n        _wallGable(ctx);\n        _wallGableSkin(ctx);\n\n        /* THE CORNER BEADS GO LAST, AND THAT IS WHY THEY KEPT FLICKERING.\n\n           His words: one corner had it and the others did not, then the other way\n           round. That is not geometry -- geometry does not change when you walk\n           round a building. It is draw order on a transparent material.\n\n           The bead's wings are textile: transparent, and drawn with depthWrite\n           off, because a mesh that writes depth punches a hole in everything\n           behind it. The cost of that is they cannot win against anything drawn\n           LATER at the same place -- and the gable skin, which draws the EPS above\n           the head, ran after them. So above the ceiling the wings were behind\n           insulation that had no business being in front of them, and which corner\n           lost depended on where the camera was.\n\n           Drawn last, they are in front of everything they are supposed to be in\n           front of, on every corner, from every angle. */\n        _wallCornerBeads(ctx);\n\n        _asmCode(ctx, 'OSB25002', 'in');\n        _wallEaveBlocks(ctx);\n        _asmMark(ctx, 'soffit', 'top', 'Soffit', WALL_SOFF.rail);\n        _wallSoffit(ctx);\n        _wallExtCoating(ctx);\n\n        /* LAST, BECAUSE IT READS WHAT THE OTHERS DREW. */\n        _wallOpeningScan(ctx);\n      }\n\n      /* the finish on all of it, once, after everything that could add to it */\n      function _wallExtCoating(ctx) { var WK = _wk(ctx); if (WK) WK.extCoating(ctx); }\n\n      /* THE TRIANGLE ABOVE THE WALL HEAD, AND WHICH WALLS HAVE ONE.\n\n         Only a gable roof has one, and only on the two walls the ridge runs INTO.\n         A hip folds its ends down to the eave, so all four walls stop at the head\n         and there is nothing above them -- that is the next step and it is a\n         different shape, not this one with a flag on it.\n\n         The apex is the ridge, the feet are the wall head, and the line between\n         them is the underside of the roof. Height at any point along the wall is\n         linear from foot to apex, which is all a triangle is. */\n      function _gableOf(s) {\n        var R = API.STATE.roof || {};\n        if (!(s.len > 0.2)) return null;\n\n        /* A PARAPET IS A WALL THAT CARRIES ON, AND IT GETS WHAT A WALL GETS.\n\n           On a flat roof the studs run past the head to hold the coping, and until\n           now the facade stopped at the head and left them bare -- render or\n           boarding to the head and raw timber above it, which is not a detail\n           anybody builds.\n\n           Its profile is the simplest of all: the same height everywhere, right\n           round the building. So it comes back through the same door as the gable\n           and the mono, and every layer above follows it without knowing what it\n           is standing on.\n\n           The rise is the roof's own section plus its deck plus the upstand -- the\n           same three numbers the frame used to make the studs, asked again rather\n           than written down twice. */\n        if (R.type === 'flat') {\n          if (!R.parapet) return null;\n          var pTop = s.y0 + s.h;\n          var pRise = roofSection().d + RAFTER.deck + PARAPET_UPSTAND;\n          if (!(pRise > 0.05)) return null;\n          return { top: pTop, rise: pRise, at: s.len / 2, parapet: true,\n                   hAt: function () { return pRise; },\n                   spanAtH: function (h) {\n                     return (h <= pRise + 0.001) ? [0, s.len] : null;\n                   } };\n        }\n\n        /* THE PROFILE IS READ OFF THE ROOF, POINT BY POINT.\n\n           The old version knew one shape: an apex, a half span, and a straight run\n           to each eave. That is a gable and nothing else, which is why a MONO had\n           no triangle anywhere -- not on the raked sides and not on the tall front\n           -- and why every fix to the apex had to be made twice.\n\n           There is no shape here now. The roof is asked how high it is at a point,\n           the wall is walked, and whatever comes back is the profile. A gable\n           gives a triangle, a mono gives a wedge on the sides and a rectangle on\n           the high wall, and a hip will give what a hip gives. Nothing in the\n           layers above needs to know which. */\n        var top = s.y0 + s.h;\n        var ux = (s.x1 - s.x0) / s.len, uz = (s.z1 - s.z0) / s.len;\n\n        function hAt(u) {\n          /* past the wall's own end the profile is whatever the roof does THERE,\n             so a layer carried round the corner is still cut to the roof */\n          var uu = Math.max(-0.5, Math.min(s.len + 0.5, u));\n          var y = _roofYAtXZ(s.x0 + ux * uu, s.z0 + uz * uu);\n          if (y === null) {\n            y = _roofYAtXZ(s.x0 + ux * Math.max(0, Math.min(s.len, u)),\n                           s.z0 + uz * Math.max(0, Math.min(s.len, u)));\n          }\n          if (y === null) return 0;\n          return Math.max(0, y - top);\n        }\n\n        /* the tallest point, and where it is -- sampled, because a ridge or a\n           hip line can land anywhere along the wall */\n        var N = 96, q, best = 0, bestAt = 0;\n        for (q = 0; q <= N; q++) {\n          var u = s.len * q / N, h = hAt(u);\n          if (h > best) { best = h; bestAt = u; }\n        }\n        if (!(best > 0.05)) return null;\n\n        /* how far along the wall the roof is at least this high */\n        function spanAtH(h) {\n          var a = null, b = null, k;\n          for (k = 0; k <= N; k++) {\n            var uu = s.len * k / N;\n            if (hAt(uu) >= h - 0.0005) { if (a === null) a = uu; b = uu; }\n          }\n          if (a === null) return null;\n          return [Math.max(0, a - s.len / N), Math.min(s.len, b + s.len / N)];\n        }\n\n        return { top: top, rise: best, at: bestAt, hAt: hAt, spanAtH: spanAtH };\n      }\n\n      /* _roofYAtXZ: the roof over a point, inside a plane's outline -- the core's houseRoofYAtXZ (core-v807, status/modules.md 11) */\n      function _roofYAtXZ(x, z) {\n        return API.houseRoofYAtXZ(x, z);\n      }\n\n      /* HOW FAR THE FINISHED FACE STANDS OFF THE SHEATHING, whichever facade is\n         on. Everything that has to reach THROUGH the facade -- a sill, a trim, a\n         bracket -- needs this one number, and it is worked out from the layers\n         that are actually drawn rather than from facadeThk, which is a plan-level\n         figure the roof uses. */\n      function _facadeFace() {\n        return _cladThk((API.STATE && API.STATE.cladding) || 'horizontal');\n      }\n\n      /* WHICH WAY THE BOARDS RUN. The edit menu's cladding tile is still a stub\n         and it lives in the boot block, a long way outside this zone -- so the\n         choice is read from STATE here and defaults to horizontal. Wiring the tile\n         and saving the choice is one small patch up there, and it is the next\n         thing. */\n      function _cladVertical() {\n        return (API.STATE && API.STATE.cladding) === 'vertical';\n      }\n\n      /* OFF IS NOT NOTHING, IT IS THE CONTACT FACADE. */\n      function _cladOff() {\n        return (API.STATE && API.STATE.cladding) === 'off';\n      }\n\n\n\n    /* ===== ZONE I -- replace from here to the END of the file ============ */\n\n      /* THE WALL'S INSIDE FROM THE SHARED KIT (core-v775, status/modules.md 5): the\n         service battens, the board, the wool, the vapour barrier, the batts and the\n         interior sills are written once in configurator-ui.js (API.wallKit); this\n         product hands in its own pieces. The order stays in _buildWallBattens. */\n      function _wkH() {\n        return {\n          api: API, layer: 'adu-wall', MAGENTA: MAGENTA, VB_T: VB_T, WALL_BATTEN: WALL_BATTEN, WOOD: WOOD,\n          FILLER_KG_M2: FILLER_KG_M2, JOINERY: JOINERY, PART: PART, STUD: STUD, WALL_BATT: WALL_BATT,\n          WALL_BOARD: WALL_BOARD, WALL_ISILL: WALL_ISILL, WALL_TILE: WALL_TILE, WALL_VB: WALL_VB,\n          WALL_WOOL: WALL_WOOL, WET_TILE_H: WET_TILE_H,\n          boardCol: _boardCol, roomRects: _roomRects, showerOnFace: _showerOnFace, tileMat: _tileMat,\n          wetAt: _wetAt, runsThrough: _runsThrough,\n          magenta: function () { return WALL_MAGENTA; }, step: function () { return WALL_STEP; },\n          frameBodies: function () { return _frameBodies; }, wallStuds: function () { return _wallStuds; },\n          paint: function (a) { _intPaintA += a; },\n          /* the outside (core-v776) */\n          CHORD: CHORD, JOIST: JOIST, PARAPET_UPSTAND: PARAPET_UPSTAND, RAFTER: RAFTER,\n          SHEATH_NAIL: SHEATH_NAIL, WALL_CLAD: WALL_CLAD, WALL_COAT: WALL_COAT, WALL_CTRIM: WALL_CTRIM,\n          WALL_EAVE: WALL_EAVE, WALL_EPS: WALL_EPS, WALL_EPS_REV: WALL_EPS_REV, WALL_ESILL: WALL_ESILL,\n          WALL_FBATT: WALL_FBATT, WALL_MEMB: WALL_MEMB, WALL_MESH: WALL_MESH, WALL_REND: WALL_REND,\n          WALL_SKIRT: WALL_SKIRT,\n          core: __CORE, finTex: _finTex, grainTex: _grainTex, membTex: _membTex, polyArea: _polyArea,\n          revealBack: _revealBack, roofYAtXZ: _roofYAtXZ, underRoof: _underRoof, vertRuns: _vertRuns, colorOf: colorOf,\n          roofSection: roofSection, cladOff: _cladOff, cladVertical: _cladVertical,\n          show: function () { return WALL_SHOW; }, cladShow: function () { return CLAD_SHOW; },\n          skirtShow: function () { return SKIRT_SHOW; }, texLog: function () { return WALL_TEX_LOG; },\n          extCoat: function (a) { _extCoatA += a; },\n          /* the gables, eaves and soffits (core-v778) */\n          EAVE_POST: EAVE_POST, WALL_BEAD: WALL_BEAD, WALL_SOFF: WALL_SOFF,\n          plateEndReach: _plateEndReach, trussStations: _trussStations,\n          memberPts: function () { return _memberPts; },\n          hipJacks: { get: function () { return _hipSideJacks; }, setUsed: function (v) { _hipSideJacksUsed = v; } },\n          extCoatA: function () { return _extCoatA; },\n          add: function (code, q) { _add('adu-wall', code, q); }\n        };\n      }\n      function _wk(ctx) {\n        if (typeof API.wallKit === 'function') return API.wallKit(_wkH());\n        ctx.log('WAL  THREW the shared wall kit is missing -- configurator-ui.js core-v778 or later');\n        return null;\n      }\n      function _wallBattens(ctx) { var WK = _wk(ctx); if (WK) WK.battens(ctx); }\n\n      /* THE WALL IS BOARDED IN BANDS, AND THE BANDS COME FROM THE OPENINGS.\n\n         A wall face is a rectangle with holes in it, and the holes do not line up\n         with each other: a window sill at 900 and a door head at 2100 cut the face\n         at four different heights. Split it at every one of those heights and each\n         band is a plain strip -- and inside a band the very same _battenRuns that\n         cuts the battens cuts the board, because it is the same question asked\n         about the same holes. Two functions for it would be two answers.\n\n         WHICH ROOM IS BEHIND THE FACE decides the sheet, and it is asked ALONG the\n         wall rather than once for the whole segment: one exterior wall can have a\n         bathroom at one end and a bedroom at the other, and the join between the\n         two sheets belongs on the partition between them, not at the corner of the\n         building. _wetAt is the floor's own answer, the same one the ceiling and\n         the tiling ask. */\n      function _wallBoard(ctx) { var WK = _wk(ctx); if (WK) WK.board(ctx); }\n\n      /* THE SERVICE CAVITY, FILLED BETWEEN THE BATTENS.\n\n         Drawn as the gaps rather than as a blanket over the wall: the battens are\n         in the way and their face is not insulated, so a blanket would bill about\n         15 per cent of timber as wool. The gaps come from the same _battenCourses\n         the battens were struck on, and each one is cut at the openings by the\n         same _battenRuns -- so the wool cannot claim area the battens are standing\n         on, and it cannot run across a window.\n\n         It sits ON the frame, behind the board: the void is exactly the batten\n         depth, so a 40 fills it flush and there is nothing left to convect in. */\n      function _wallWool(ctx) { var WK = _wk(ctx); if (WK) WK.wool(ctx); }\n\n      /* THE VAPOUR CONTROL LAYER, ON THE WARM FACE OF THE FRAME.\n\n         It goes on the inside of the studs and the battens go over it -- which is\n         the reason the battens are there at all. Every board screw then lands in a\n         batten instead of in the barrier, and the cables run in front of it rather\n         than through it. A barrier behind the board with the services inside it is\n         punctured a hundred times before anybody moves in.\n\n         BOUGHT IS NOT DRAWN, AND THE DIFFERENCE IS THE LAP. Rolls overlap by 100\n         on a 1500 roll, so the area to buy is the developed area times\n         roll / (roll - lap), and the taped run is what that extra area becomes\n         when it is folded back on itself: (bought - drawn) / lap. The tape then\n         cannot disagree with the sheet, because both fall out of one piece of\n         arithmetic rather than a coefficient each.\n\n         Same product and the same roll as the ceiling, read from CEIL_VB. */\n      function _wallVB(ctx) { var WK = _wk(ctx); if (WK) WK.vb(ctx); }\n\n      /* THE MAIN INSULATION, IN THE BAYS THE FRAME ACTUALLY BUILT.\n\n         The studs are not on a grid by the time they are standing. A king beside a\n         window moves the module stud that was near it, a cripple stack replaces\n         one, and a wall that meets another gains one at the corner -- so a batt\n         laid out on API.grid() would be laid out on a wall that does not exist.\n         _wallStuds is the frame publishing every stud it really placed, the same\n         habit the roof needed for its battens, and the bays come from THAT.\n\n         Where a bay meets an opening it is cut by _wallFaces -- the same face\n         minus its holes that the board and the barrier are drawn on, so a batt\n         cannot claim the area of a window and the three layers cannot disagree\n         about where one is.\n\n         A millimetre off the frame face, like the cavity wool, so no two surfaces\n         share a plane. The row is the catalogue's 160 either way: it is bought by\n         the square metre. */\n      function _wallBatt(ctx) { var WK = _wk(ctx); if (WK) WK.batt(ctx); }\n\n    /* ===== ZONE J -- replace from here to the END of the file ============ */\n\n      /* THE SKIN REACHES THE TOP EDGE OF THE TRUSS, NOT ITS UNDERSIDE.\n\n         _gableOf reads the roof plane, and the plane is the bearing line -- the\n         underside of the top chord, or of the rafter. Every facade layer took\n         that as its top, so on the two rake walls the sheathing, the film, the\n         battens, the boards, the EPS and the render all stopped a chord depth\n         under the deck and the outer face of the last truss stood bare above\n         them: 160 mm of timber, measured plumb 178 at 26 degrees, on every\n         gable. His rule, and it is the site rule too: the facade ends on the TOP\n         edge of the truss or the rafter.\n\n         Only on a rake wall. On the walls the roof bears on, the trusses cross\n         the wall and the bay between them is closed by the eave blocks with the\n         vent slot and its mesh -- boarding over that would seal the roof. A hip\n         bears on all four walls and its ends have no members yet, so a hip gets\n         nothing here until the fill is built. The parapet already goes to its\n         coping. And the insulation between the studs above the head stays on the\n         structural profile: there are no studs a chord higher, only the truss.\n\n         One wrapper, so the layers do not each add the depth: the profile with\n         the lift folded into it, and the layers ask for THAT. */\n      function _wallLift(s) {\n        var R = API.STATE.roof || {};\n        /* a gable end gets the lift -- on a gable roof, a mono, and on the gable\n           end of a half-hip (Marek: the truss profile showed above the facade\n           there); a hipped end has no gable to lift */\n        if (R.type !== 'gable' && R.type !== 'mono' && R.type !== 'hip') return 0;\n        if (R.type === 'hip') {\n          var endH = API.ridgeEndOf ? API.ridgeEndOf(s) : null;\n          if (!endH || API.hipAt(endH)) return 0;\n        }\n        var rake = (R.type === 'hip') ? true : ((R.axis === 'l') ? (Math.abs(s.nz) > 0.5) : (Math.abs(s.nx) > 0.5));\n        if (!rake) return 0;\n        var sect = _isTrussed() ? CHORD.d : roofSection().d;\n        return sect / Math.cos((R.pitch || 0) * Math.PI / 180);\n      }\n\n      function _polyArea(poly) {\n        var a = 0, k, n = poly.length;\n        for (k = 0; k < n; k++) {\n          var P = poly[k], Q = poly[(k + 1) % n];\n          a += P[0] * Q[1] - Q[0] * P[1];\n        }\n        return Math.abs(a) / 2;\n      }\n\n      function _wallSkin(s) {\n        var G = _gableOf(s);\n        if (!G || G.parapet) return G;\n        var lift = _wallLift(s);\n        /* AND AN EAVE WALL HAS A RISE TOO. Over an eave the roof's plane sits\n           barely above the wall head, so the rise came out near zero and every\n           finish above the mesh -- the base coat, the render, the primer --\n           stopped at the head, which on screen is the ceiling line, while the\n           cladding and the EPS carried on (Marek). The finish goes up to the\n           top of the members over the wall, where the fascia and the drip edge\n           are: the same lift a rake gets, measured plumb. */\n        if (!(lift > 0) && !(G.rise > 0.02)) {\n          var R9 = API.STATE.roof || {};\n          if (R9.type !== 'flat') {\n            var sect9 = _isTrussed() ? CHORD.d : roofSection().d;\n            lift = sect9 / Math.cos((R9.pitch || 0) * Math.PI / 180);\n          }\n        }\n        if (!(lift > 0)) return G;\n        var S = {}, k;\n        for (k in G) { if (G.hasOwnProperty(k)) S[k] = G[k]; }\n        S.lift = lift;\n        S.rise = G.rise + lift;\n        S.hAt = function (u) { return G.hAt(u) + lift; };\n        S.spanAtH = function (h) {\n          return (h <= lift + 0.001) ? [0, s.len] : G.spanAtH(h - lift);\n        };\n        return S;\n      }\n\n      /* THE SHEATHING, AS BOARDS RATHER THAN AS A SLAB.\n\n         It has been in the bill since the frame existed and has never been drawn.\n         A slab the shape of the wall would have been quicker and would have taught\n         nobody anything: what makes sheathing legible is the LAYOUT -- where the\n         joints fall, that every course is offset half a board so no joint runs\n         the full height, and that the last board in a run is a rip.\n\n         AND IT STANDS UP, WHICH IS THE WHOLE REASON THE STUDS ARE AT 600.\n\n         The module is half a board because a board is 1200 wide and its SIDE edges\n         have to land on studs. Laid the long way that is thrown away -- the\n         vertical edges meet a stud only by accident, and the horizontal joint runs\n         across the bays with nothing under it. On a wall that is bracing the\n         building that joint is the one carrying the shear, so a horizontal joint\n         with no blocking behind it is a structural fault rather than an untidy\n         drawing. His point, and it is the right one.\n\n         So one board per 1200 of wall, floor to head, no horizontal joint at all.\n         Where the wall is taller than the board's nominal length it is still drawn\n         as one piece: sheathing comes in several standard heights, the row is\n         bought by the SQUARE METRE, and which format to order is a line in the\n         documentation rather than a joint invented here. This product has one wall\n         height everywhere, so it is one board tall everywhere (Marek).\n\n         Each board is clipped to the face minus its holes -- the same _wallFaces\n         the batt, the barrier and the plasterboard are drawn on -- so a window\n         makes a real cut in a real board instead of a hole in a slab.\n\n         THE JOINT IS DRAWN AT 6 mm, not at the 3 it is built at. Three millimetres\n         on a nine metre elevation is under a pixel and the wall read as one sheet,\n         which is exactly what drawing the boards was supposed to stop. Nothing is\n         bought by the joint, so widening the drawn one costs nothing and the\n         layout is unchanged: the boards still land on the module.\n\n         THE ROW STAYS WITH THE FRAME for now. _buildStudWall bills sheet.osb18 by\n         area and it resets its own bucket every pass, so billing it again from\n         here would either double it or fight over the same key. The log prints\n         both numbers side by side; when they agree the row can move down here and\n         be bought in WHOLE BOARDS, which is what a builder orders. */\n      function _wallSheathing(ctx) { var WK = _wk(ctx); if (WK) WK.sheathing(ctx); }\n\n      /* THE BREATHER MEMBRANE, ON THE COLD FACE OF THE SHEATHING.\n\n         Outside the OSB and under the facade battens, so the cavity behind the\n         cladding drains and dries against it. It is the last continuous layer\n         before the wall stops being a wall and starts being a rainscreen.\n\n         Drawn a millimetre thick and sitting ON the boards rather than in the same\n         plane as them, for the reason the barrier needed: two surfaces in one\n         place is a flicker, and a film has no true thickness worth drawing.\n\n         The area comes off _wallFaces like every other sheet on this wall, so it\n         stops at the same reveals the board and the batts do. */\n      /* THE PRINT ON THE MEMBRANE.\n\n         Every breather on site is printed with the maker's name, and it is the one\n         thing that tells you at a glance which film you are looking at -- so on\n         this one it says ours. Diagonal because that is how they are printed, and\n         because the lap bands are horizontal: a horizontal line of text would sit\n         alongside them and the two would read as a grid.\n\n         Large and sparse on his call. One string to a metre and a half, so it is\n         legible from where a building is normally looked at and does not turn the\n         wall into wallpaper.\n\n         ITS OWN LITTLE CACHE, and only because _finTex is up at line 9800 and\n         outside this zone -- a second texture factory is not something to be proud\n         of. When the wall work settles it moves in beside the OSB flakes. */\n      var WALL_TEX = {};\n\n      /* ONE PRINTED FILM RECIPE, TWO FILMS.\n\n         The breather is grey with black ink; the mesh is red with the same ink and\n         a weave under it. Everything else about them is identical, so the recipe\n         takes the colours rather than being written out twice. */\n      var WALL_TEX_LOG = [];\n\n      /* _membTex: the membrane / sheet texture (the product hands in its cache and its log) -- the core's houseMembTex (core-v807, status/modules.md 11) */\n      function _membTex(T, key, bg, ink, weave) {\n        return API.houseMembTex(T, key, bg, ink, weave, WALL_TEX, WALL_TEX_LOG);\n      }\n\n      function _wallMemb(ctx) { var WK = _wk(ctx); if (WK) WK.memb(ctx); }\n\n      /* THE VERTICAL RUNS LEFT ON A LINE ONCE THE HOLES ARE TAKEN OUT.\n\n         _battenRuns answers the horizontal question -- what is left of a course\n         once the openings are cut out of it. This is the same question stood on\n         end: what is left of a vertical line. A facade batten is interrupted by\n         every opening it passes behind, and it starts again above the head. */\n      function _vertRuns(s, at) {\n        var cuts = [], q, ops = s.openings || [];\n        for (q = 0; q < ops.length; q++) {\n          var oa = ops[q].at - ops[q].w / 2, ob = ops[q].at + ops[q].w / 2;\n          if (at <= oa - 0.001 || at >= ob + 0.001) continue;\n          cuts.push([s.y0 + ops[q].sill, s.y0 + ops[q].sill + ops[q].h]);\n        }\n        cuts.sort(function (p1, p2) { return p1[0] - p2[0]; });\n        var out = [], y = s.y0, top = s.y0 + s.h;\n        for (q = 0; q < cuts.length; q++) {\n          if (cuts[q][0] > y + 0.05) out.push([y, Math.min(cuts[q][0], top)]);\n          y = Math.max(y, cuts[q][1]);\n        }\n        if (top > y + 0.05) out.push([y, top]);\n        return out;\n      }\n\n      function _wallFacadeBattens(ctx) { var WK = _wk(ctx); if (WK) WK.facadeBattens(ctx); }\n\n      /* THE CLADDING ITSELF.\n\n         Boards struck from the bottom of the wall when they run across it, and\n         from the start of the wall when they run up it, so the module is the\n         BUILDING's and two walls meeting at a corner line their boards up. Struck\n         from each piece instead, the courses would step at every reveal.\n\n         Cut at the openings by the same two cutters everything else on this wall\n         uses -- _battenRuns across, _vertRuns up -- so a board stops at a reveal\n         and starts again on the other side rather than running through the glass.\n\n         The counter-batten for the vertical case is drawn here rather than in the\n         batten pass, because it exists only when this choice is made and it is\n         this layer's cost. */\n      function _wallCladding(ctx) { var WK = _wk(ctx); if (WK) WK.cladding(ctx); }\n\n    /* ===== ZONE K -- replace from here to the END of the file ============ */\n\n      /* THE REVEAL STRIP OF A CONTACT FACADE: a 30 mm piece of the same EPS on\n         each jamb and on the head, from the frame's outer face out to the face of\n         the wall board, so the reveal is insulated rather than a run of bare\n         frame and sheathing edge with render on it. The strip covers the outer\n         30 of the frame section, which is what an ETICS reveal does and why the\n         frame is set back into the wall. The coat, the render and the corner\n         beads in the reveal sit on this strip, 30 mm further in than they did. */\n      var WALL_EPS_REV = 0.030;\n\n      /* _underRoof: a band under a roof line -- the core's houseUnderRoof (core-v807, status/modules.md 11) */\n      function _underRoof(uA, uB, yLo, yHi, roofY, extra) {\n        return API.houseUnderRoof(uA, uB, yLo, yHi, roofY, extra);\n      }\n\n      /* CONTACT FACADE, STEP ONE: THE BOARDS, WHAT STICKS THEM AND WHAT HOLDS THEM.\n\n         Both fixings are billed because both are used and neither does the other's\n         job. The foam grabs the board while it is being placed and closes the\n         joint behind it; the anchors are what stop it leaving in a gale, and they\n         go in once the foam has gone off. A board on foam alone is a board that\n         comes off, and a board on anchors alone has a draught behind it.\n\n         Laid in courses from the bottom with every other course offset half a\n         board, the same bond the sheathing wants and for the same reason: a joint\n         that runs the full height of a wall is a crack in the render waiting to\n         happen.\n\n         The starter track carries the first course while the foam cures and sets\n         it dead level -- every course above inherits that line -- so it is one run\n         along the bottom of every wall and it is measured, not estimated. */\n      function _wallEps(ctx) { var WK = _wk(ctx); if (WK) WK.eps(ctx); }\n\n    /* ===== ZONE L -- replace from here to the END of the file ============ */\n\n      /* THE BOARDS ON OR OFF, IN ONE NAME.\n\n         The boarding is the outermost thing on a ventilated wall and it is opaque,\n         so anything wrong behind it -- at the head, above the ceiling, anywhere --\n         can only be looked at by taking the boards off. This does that to the\n         BOARDS and to nothing else: the battens stay, the counter-battens stay,\n         the film stays, the trims stay. Off the wall and off the gable in one\n         name, because boarding that stops at the wall head and carries on above\n         it is one skin and not two.\n\n         IT HIDES. IT DOES NOT STOP ANYTHING BEING BILLED: every board is still\n         struck, ripped to its reveal, measured, nailed and counted -- it simply\n         does not reach the scene. A board nobody can see costs what it costs.\n\n         AND IT LIVES DOWN HERE ON PURPOSE. It was declared beside the cladding\n         pass, a hundred lines under the ZONE G banner, so turning the boards off\n         and on again -- which is a LOOK, done constantly -- cost six thousand\n         lines every time. A declaration is read when the file loads and nothing\n         asks for it until a build runs, so where it sits changes nothing except\n         how much of the file has to travel to flip it. */\n      var CLAD_SHOW = true;\n\n\n      /* CONTACT FACADE, STEP TWO: THE MESH.\n\n         Laid exactly the way the breather is -- courses struck from the bottom of\n         the wall, cut at the openings, slivers over the heads put back, the print\n         anchored to the course so only a reveal ever cuts a string. That is not a\n         coincidence: it is a roll of film on a wall, and there is only one right\n         way to hang one. Same arithmetic for what to buy, too: bought is drawn\n         times roll / (roll - lap).\n\n         It sits on the FACE of the insulation. In the wall it is buried in the\n         base coat, which is the next step -- so when that arrives this becomes the\n         middle of a sandwich and stops being visible, which is the point of doing\n         them in this order. */\n      function _wallMesh(ctx) { var WK = _wk(ctx); if (WK) WK.mesh(ctx); }\n\n      /* CONTACT FACADE, STEP THREE: THE CORNER BEADS.\n\n         One per external corner, from the top of the starter track to the wall\n         head. The corners come from the SEGMENTS meeting each other rather than\n         from the plan's vertices, because the bead sits on the face of the\n         insulation and that face is one board thickness out from the plan on both\n         walls -- asking the polygon would put every bead 140 mm inside the corner\n         it is supposed to be protecting.\n\n         BILLED THE WAY THE FILM IS: the run is the sum of what was drawn, and\n         nothing else. No allowance, no rounding up to a stock length -- if a bead\n         is cut from a 2.5 m length that is the buyer's cutting list, and the\n         number here is the metres of corner the building actually has. */\n      /* CONTACT FACADE, STEP FOUR: THE BASE COAT.\n\n         Over the whole insulated face and round every reveal, five millimetres,\n         burying the mesh and the beads. Cut at the openings by the same faces the\n         board and the batts are drawn on, so it cannot claim the area of a window.\n\n         THE REVEALS ARE COUNTED, and they are not a rounding error: on six\n         openings the returns are several square metres of coat that a takeoff\n         measuring only the elevation would miss entirely -- and every one of them\n         is troweled by hand, which is where the hours go. */\n      /* WHERE THE BACK OF A REVEAL IS, MEASURED RATHER THAN ASSUMED.\n\n         Both wet layers returned WALL_EPS.t into the opening -- 140, the thickness\n         of the board, because that was the number to hand. The hole is not 140\n         deep. The joinery stands the unit on the MIDDLE of the structural wall and\n         the section is JOINERY.depth thick, so the face the render dies against is\n         half a wall in and half a frame back out: 40 mm BEHIND the plan line on a\n         160 stud. Out from there to the finished face is 18 of sheathing, 140 of\n         foam and the wet layers themselves -- close to 205, not 140.\n\n         So the coat stopped 65 mm short of the frame and 6 mm short of its own\n         arris, and the render did the same. That is the bare band down both jambs\n         and across every head.\n\n         Asked ONCE, here, so the coat and the render cannot each pick a different\n         number again. Each layer takes it back from its OWN outer face, which is\n         what makes the render sit on the coat in the reveal exactly as it does on\n         the elevation. */\n      function _revealBack() {\n        return -API.wallThickness() / 2 + JOINERY.depth / 2;\n      }\n\n      function _wallCoat(ctx) { var WK = _wk(ctx); if (WK) WK.coat(ctx); }\n\n      /* CONTACT FACADE, THE LAST LAYER: PRIMER AND RENDER.\n\n         Over the base coat and round every reveal, the same shape the coat has --\n         including its return past both sides of each corner, because a render that\n         stops where the coat stopped leaves the corner grey.\n\n         The plinth band is cut out of the render and given its own product, so the\n         two areas are two rows and neither is guessed from the other. */\n      function _wallRender(ctx) { var WK = _wk(ctx); if (WK) WK.render(ctx); }\n\n\n      function _wallSkirt(ctx) { var WK = _wk(ctx); if (WK) WK.skirt(ctx); }\n\n    /* ===== ZONE M -- replace from here to the END of the file ============ */\n\n      /* THE EXTERIOR SILL.\n\n         One under every window, none under a door -- a door has a threshold, which\n         belongs to the door. It runs 35 past each jamb on both sides so the water\n         leaves the reveal rather than running back into it, and it falls outward,\n         which is the whole reason the piece exists.\n\n         ITS DEPTH IS THE FACADE'S, and that is the one thing tiny could not tell\n         me: there the build-up is one thickness. Here it reaches from the frame\n         out through whichever facade is on, plus the 50 it stands proud -- so the\n         same window gets a deeper sill on the contact wall than on the ventilated\n         one, which is correct and is why the number is asked for rather than\n         written down. */\n      function _wallExtSills(ctx) { var WK = _wk(ctx); if (WK) WK.extSills(ctx); }\n\n      /* THE INTERIOR SILL -- THE WINDOW BOARD.\n\n         OWW00001, tiny's section, and one thing from tiny that is worth carrying\n         over word for word because it cost him a version: it sits ON the rough\n         sill and tucks UNDER the frame. Hung with its TOP on the opening's sill\n         line -- which is where the OUTSIDE one belongs, since there the frame\n         lands on top of it -- the board is buried a whole thickness inside the\n         timber below and you can barely see it.\n\n         Its depth is the interior lining's: the service batten and the board on\n         it, plus the 40 it stands proud into the room. */\n      function _wallIntSills(ctx) { var WK = _wk(ctx); if (WK) WK.intSills(ctx); }\n\n      /* THE EXTERNAL CORNER TRIM -- VENTILATED ONLY.\n\n         FVW02660, tiny's section: two legs meeting at a right angle over the\n         boards, so the joint is covered from both sides and the cavity is shut. It\n         is the piece that makes a boarded facade look finished rather than cut --\n         without it what you see at a corner is end grain and a hole.\n\n         NOT ON A CONTACT FACADE. There every corner already has a bead with mesh\n         under the render; a timber trim on top of that would be a second corner\n         over the first.\n\n         ONLY THE CONVEX ONES. An internal corner is closed by the boards running\n         into it, and a trim there would be a stick in a groove. Convex is tested\n         rather than assumed: the corner pushed along both outward normals lands\n         OUTSIDE the outline on an external corner and inside on a return.\n\n         It runs the height the cladding runs -- from the foot of the skirt to the\n         wall head -- because a trim that stops where the boards do not is a trim\n         with a gap under it. */\n      function _wallCornerTrim(ctx) { var WK = _wk(ctx); if (WK) WK.cornerTrim(ctx); }\n\n      /* THE REVEAL, LINED IN THE CLADDING ITSELF -- HIS CALL, AND THE RIGHT ONE.\n\n         Cut the boards at an opening and what is left facing you is their end\n         grain and the cavity behind them: on a 140 mm facade that is a 140 mm deep\n         slot round every window. Something has to close it, and a separate profile\n         would be a second material at the one place the eye goes.\n\n         So the same board is ripped to the depth of the reveal and returned into\n         it -- two jambs and a head. One product, one colour, one weathering, and\n         the corner where it meets the face is a joint between two pieces of the\n         same thing rather than a junction between two.\n\n         NO SILL PIECE. The metal sill is already there, it is the piece that\n         throws the water, and boarding over it would dam it.\n\n         VENTILATED ONLY: on a contact facade the reveal is rendered, and it\n         already is.\n\n         The depth is asked for rather than written down, because it is the whole\n         facade and that changes with the cladding direction -- vertical boards\n         carry a counter-batten and a 40 mm deeper reveal with it. */\n      function _wallRevealLining(ctx) { var WK = _wk(ctx); if (WK) WK.revealLining(ctx); }\n\n      /* THE GABLE TRIANGLE, SHEATHED.\n\n         Boards standing, cut on the rake, exactly as the wall below is boarded --\n         because it is the same wall, it just runs out of storey. The set-out is\n         the wall's, carried straight up, so the vertical joints line through from\n         the head to the apex instead of restarting at the ceiling.\n\n         THE TRUSS ON THE WALL FACE IS WHAT THIS IS SCREWED TO, and that is why it\n         was moved there first. Without it the triangle is a sheet of board holding\n         on to a plate along one edge.\n\n         A board here is cut to the rake, so its area is the trapezium under the\n         roof line and not the rectangle it was cut from. Both are said: the bill\n         buys sheets, the drawing shows what is left of them. */\n      function _wallGable(ctx) { var WK = _wk(ctx); if (WK) WK.gable(ctx); }\n\n      /* WHAT IS LEFT ABOVE THE WALL HEAD, WHICH IS ALMOST NOTHING.\n\n         This pass used to be the whole gable: sheathing, film, battens, boards,\n         EPS, mesh, coat and render above the head, each on its own set-out --\n         and every one of them has since become the top of the wall's own piece,\n         drawn and billed by the pass that draws it below the head (sheathing,\n         breather, battens, cladding across and up, EPS, mesh, base coat, render).\n         Two objects for one layer was two set-outs, two laps that never lined\n         through, a seam at the storey line and once a bill paid twice; the EPS\n         above the head was billed here AND by _wallEps until this version.\n\n         One thing has no pass of its own: the cap over the TOP EDGE of the EPS\n         on a contact facade -- 140 mm of open foam under a coping or a verge\n         that the coat and the render turn over, the way they turn into a reveal.\n         That stays here, and so does the record of where everything else went. */\n      function _wallGableSkin(ctx) { var WK = _wk(ctx); if (WK) WK.gableSkin(ctx); }\n\n      /* THE EAVES CLOSURE -- AND THE GAP IT MUST NOT CLOSE.\n\n         Over the wall plate, between one truss and the next, there is an open bay\n         the height of the chord. Left open it is a door for wind, rain, birds,\n         wasps and mice, and the insulation ends up on the ceiling. Closed solid it\n         is worse: the roof space has no way to breathe and the deck rots from\n         underneath.\n\n         So it is closed and NOT closed. A board fills the bay from the plate up to\n         within 25 mm of the deck, and that 25 mm runs the whole length of the\n         building as the intake. Over the slot goes a mesh, because the gap that\n         lets air in lets everything else in too -- and a rodent needs less room\n         than a bird.\n\n         ONLY THE WALLS THE TRUSSES SIT ON. A gable wall has a truss lying flat\n         against it and no bay at all; putting a closure there would be filling a\n         hole that is already timber. */\n      /* FEC00034 IS THE MESH, AND TINY HAD IT ALL ALONG.\n\n         I drew it twice and billed it neither time, on the grounds that the sheet\n         had no row for it. It has: tiny bills FEC00034 by the metre for exactly\n         this -- a slot round a building that has to let air through and nothing\n         else. Asking the product that already solved it would have taken a minute\n         and I did not. */\n      /* THE EAVE, AS TINY DOES IT: the slot in the closure carries the catalogue's\n         own eaves strip, ROV00100 -- a 100 mm expanded-mesh strip, birds, mice and\n         driven snow -- and every bay gets a vent baffle, ROV00101. On a trussed\n         roof with the insulation blown onto the ceiling the baffle is a DAM at the\n         inner face of the wall, so the fill cannot run out into the eave, and a\n         CHUTE under the deck from the closure inward over the top of the fill, 50\n         mm clear of the deck, so the air the slot lets in has a way over the\n         insulation into the attic. Both by the metre of bay, as tiny bills them.\n         The rodent mesh FEC00034 stays where it belongs, over the cavity foot. */\n      var WALL_EAVE = { vent: 0.050, boardT: 0.018, mesh: 'FEC00034',\n                        strip: 'ROV00100', baffle: 'ROV00101',\n                        baffleT: 0.010, chute: 0.050, chuteRun: 0.600 };\n\n      var bayNote = [];\n      function _wallEaveBlocks(ctx) { var WK = _wk(ctx); if (WK) WK.eaveBlocks(ctx); }\n\n      /* THE SOFFIT -- WHAT YOU SEE STANDING UNDER THE OVERHANG.\n\n         Boarded in the same cladding as the walls, because it is the same building\n         seen from below and a second material there is a second decision nobody\n         asked for. On a rail behind it, since a 15 mm board spanning 600 mm of\n         fresh air is a board that sags in the first summer.\n\n         WHICH WALLS GET ONE IS A PRODUCT DECISION AND HE MADE IT:\n\n           mono and gable   the eave walls only, out to the outer corners of the\n                            wall panels. The rake has no soffit -- there the gable\n                            wall itself climbs to the roof and the overhang is\n                            closed by the verge, not from below.\n           hip              none on the eaves: the trusses stay open from below,\n                            as on a gable. The projecting END is boarded between\n                            the plates, level, by _wallHipSoffit below.\n\n         Its depth is what sticks out PAST THE FINISHED FACADE, not past the frame:\n         the facade already fills the first 130 or 240 mm of the overhang, and\n         boarding over that would be boarding over the cladding. */\n      var WALL_SOFF = { rail: 'KVH40060', railD: 0.040, railF: 0.060,\n                        railStep: 0.600, screw: 'FAS60100',\n                        vent: 0.025, trim: 'FVW02660' };\n\n      function _wallSoffit(ctx) { var WK = _wk(ctx); if (WK) WK.soffit(ctx); }\n\n\n      /* what the ends actually are, for when no two of them meet */\n\n      /* THE CORNER BEAD, WRITTEN AGAIN FROM NOTHING.\n\n         The old one had a convexity test, a polygon lookup, a neighbour search, an\n         arris computed from two normals at once, a texture cloned per corner, and\n         a climb worked out three different ways over four versions. Every fix\n         added one more way for it to be almost right. He has asked five times for\n         one thing -- an angle with its mesh, the whole length of the corner -- and\n         the honest answer is to stop repairing it.\n\n         No tests, no lookups, nothing inferred:\n\n           WHERE   every junction of two wall segments that turns outward.\n           FROM    the foot of the contact facade, which is the bottom of the\n                   skirt, because that is where the insulation starts.\n           TO      the top of it: the wall head plus whatever the roof leaves over\n                   that wall. Parapet upstand, mono rake, or nothing.\n           WHAT    two metal legs on the render face and a mesh wing outside each,\n                   drawn SOLID enough to win a depth test -- a bead that vanishes\n                   behind the insulation it is bedded on is the fault we spent four\n                   versions chasing.\n\n         One pass, one height. */\n      function _wallCornerBeads(ctx) { var WK = _wk(ctx); if (WK) WK.cornerBeads(ctx); }\n\n    /* ===== ZONE N -- replace from here to the END of the file ============ */\n\n      /* THE PRODUCT'S OWN UI: the wizard steps, the rows in each step, the\n         colours and the fitout catalogue -- kept together at the end of the file\n         so a change to what the buyer sees is a zone delivery, not the file. */\n\n\n      /* THE STEPS ARE THE LINE'S (core-v319): Place, Floorplan, Roof & Base,\n         Doors & Windows, Color, Exterior, and Video when there is a video */\n      function wizSteps() { return API.wizardSteps({ videoId: VIDEO_ID }); }\n\n      function GROUPS(key) {\n        var S = API.STATE;\n        /* THE PLACE STEP IS THE CORE'S (core-v312): the same address tile and the\n           same tree switches in every product, kept in one place\n           so the products cannot drift apart. */\n        if (key === 'place') return API.placeGroups({ trees: true });\n        /* FLOORPLAN IS THE CORE'S (core-v315): the plan tools and the walls are the\n           same in every product, and this one adds nothing of its own. */\n        if (key === 'layout') return API.layoutGroups();\n\n        /* ROOF & BASE IS THE CORE'S (core-v320): the shapes, the coverings and the\n           footings; this product says which shapes it sells, its eave and its pitch */\n        if (key === 'roof') return API.roofGroups({ hip: true, parapet: true, eave: ADU.eave, pitch: 26 });\n\n        /* DOORS & WINDOWS IS THE CORE'S (core-v314): the tiles, the picker and Edit\n           are the same in every product; what this one sells is the list. */\n        if (key === 'openings') return API.openingsGroups({ kinds: ADU_OPENING_KINDS });\n\n\n        /* EXTERIOR IS THE CORE'S (core-v321): the facade, the terrace, the pergola,\n           the pool and the slats are the same in every product; the ADU is the one\n           with blinds */\n        if (key === 'exterior') return API.exteriorGroups({ blinds: true });\n\n        /* the assembly panel went with the step -- nothing asks for this key\n           any more, and a panel nobody can reach is a trap for the next reader */\n        if (key === 'video') return API.videoGroups(VIDEO_ID);\n\n        return [];\n      }\n\n      /* =========================================================================\n         COLOURS. One slot per thing a buyer wants to pick a colour or texture for;\n         each slot has a short palette; the choice lives in STATE.product.colors and\n         the layers ask colorOf(slot) instead of carrying a constant. The step in\n         the wizard shows a swatch per slot. Textures come later as palette entries\n         with a canvas; today every entry is a colour.\n         ========================================================================= */\n      /* THE FRAME IS NOT A COLOUR CHOICE.\n\n         The base, the wall panels and the roof structure were all drawn in the\n         buyer's TIMBER colour, so picking charcoal cladding turned the studs and\n         the trusses charcoal too. Nobody paints a truss: it is inside the\n         building, and in the views where it IS shown the point is to read the\n         frame, not the finish. These keep one timber of their own, the same cedar\n         the slot starts on, so the default looks exactly as it did and the swatch\n         no longer reaches them (Marek: konstrukcni prvky excluded z color scheme).\n\n         The pieces a buyer actually sees -- cladding, soffits, fascias, the eave\n         posts, the slat wall, decking -- still follow the slot. */\n      var STRUCT_WOOD = 0xB98B57;\n      /* THE PALETTE IS THE CORE'S (core-v313); this product changes only what it lists below */\n      var COLOR_SLOTS = [\n        { key: 'roof',    grp: 'exterior', labelKey: 'roof',          def: 'Roof',\n          pal: ['anthracite', 'graphite', 'terracotta', 'moss', 'copper', 'patina'] },\n        /* the render of a contact facade only; boards are timber (Marek) */\n        { key: 'facade',  grp: 'exterior', labelKey: 'facade_toggle', def: 'Facade finish',\n          pal: ['white', 'sand', 'greige', 'stone', 'graphite'] },\n        { key: 'joinery', grp: 'exterior', labelKey: 'windows_doors', def: 'Windows & doors',\n          pal: ['anthracite', 'lightGrey', 'white', 'oak', 'walnut'] },\n        /* every piece of timber outdoors: cladding, trims, linings, soffits,\n           rafters and trusses, posts and braces, the skirt */\n        { key: 'timber',  grp: 'exterior', labelKey: 'bbq_v2',        def: 'Timber',\n          pal: ['cedar', 'larch', 'walnut', 'charcoal', 'lightGrey', 'white'] },\n        /* the metal: drip edges, verges, gutters and downpipes */\n        /* THE WALL BETWEEN THE POSTS, its own colour row so the slats can be a\n           different timber from the facade. Offered only when a side actually\n           has posts -- a colour for something that is not there is a dead\n           control (Marek). */\n        /* THE SHUTTERS GET THEIR OWN COLOUR. They are aluminium, so the timber\n           palette is the wrong list -- a shutter is white, grey, anthracite or\n           a dark brown, and only offered when they are switched on (Marek). */\n        { key: 'blinds', grp: 'exterior', labelKey: 'blinds', def: 'Blinds',\n          pal: ['white', 'lightGrey', 'stone', 'charcoal', 'walnut', 'cream'],\n          when: function () { try { return API.blindsOn(); } catch (e) { return false; } } },\n        { key: 'postWall', grp: 'exterior', labelKey: 'post_wall_slats', def: 'Slats',\n          pal: ['cedar', 'larch', 'walnut', 'charcoal', 'lightGrey', 'white'],\n          when: function () { try { return API.postBaySides().length > 0; } catch (e) { return false; } } },\n        { key: 'metal',   grp: 'exterior', labelKey: 'pdf_pool_cat_accessories', def: 'Accessories',\n          pal: ['anthracite', 'graphite', 'zinc', 'white', 'copper', 'patina'] },\n        { key: 'floor',   grp: 'interior', labelKey: 'floor_label',   def: 'Floor',\n          pal: ['vinylOak', 'vinylGrey', 'walnut', 'stone'] },\n        { key: 'walls',   grp: 'interior', labelKey: 'walls',         def: 'Walls',\n          pal: ['white', 'cream', 'greige', 'sand'] },\n        /* composed labels from keys every locale already has: room + part */\n        { key: 'bathTiles', grp: 'interior', labelKey: 'rooms.bathroom', def: 'Bathroom', label2Key: 'pool_surface_tiles', def2: 'Tiles',\n          pal: ['ivory', 'white', 'lightGreen', 'lightBlue', 'pink', 'stone', 'graphite'] },\n        { key: 'bathFloor', grp: 'interior', labelKey: 'rooms.bathroom', def: 'Bathroom', label2Key: 'floor_label', def2: 'Floor',\n          pal: ['ivory', 'white', 'lightGreen', 'lightBlue', 'pink', 'greige', 'graphite'] },\n        /* the terrace, only when it is on: its boards, or its tiles */\n        { key: 'terrDeck', grp: 'exterior', labelKey: 'rooms.terrace', def: 'Terrace', label2Key: 'decking', def2: 'decking',\n          pal: ['cedar', 'larch', 'oak', 'walnut', 'charcoal', 'greige'],\n          when: function () { var T = _terrace(); return !!(T.on && T.surface !== 'pavers'); } },\n        { key: 'terrPavers', grp: 'exterior', labelKey: 'rooms.terrace', def: 'Terrace', label2Key: 'pool_surface_tiles', def2: 'Tiles',\n          pal: ['stone', 'greige', 'sand', 'graphite', 'anthracite'],\n          when: function () { var T = _terrace(); return !!(T.on && T.surface === 'pavers'); } }\n      ];\n      API.colorSlots(COLOR_SLOTS);\n      /* THE COLOUR MACHINERY IS THE CORE'S (core-v313): the choice, the fallback to\n         a slot's first colour, the rows of dots. What stays here is WHICH slots\n         this product has, handed over once above. The names below are kept so\n         every colorOf('timber') in this file reads as it always did. */\n      function colorKey(slot) { return API.colorSlotKey(slot); }\n      function colorOf(slot) { return API.colorSlotOf(slot); }\n      function _hex(v) { return API.colorHex(v); }\n\n      /* =========================================================================\n         FITOUTS. The pieces a room is furnished with, the biggest ones only -- it\n         is a layout tool, not a shop. Each kind has plan dimensions and, later, a\n         catalogue row; the placement in the plan and the 3D block come with the\n         next steps. Today: the catalogue and the drawer that offers it.\n         ========================================================================= */\n      /* which group of pieces a room's name asks for; null means all of them */\n      function _fitGroupOf(name) {\n        var n = String(name || '').toLowerCase();\n        if (/bath|shower|toilet|wc|utility|laundry/.test(n)) return ['bathroom'];\n        /* adu-v1403: a dining room gets the tables, a walk-in the wardrobes */\n        if (/diningroom|dining room/.test(n)) return ['dining'];\n        if (/wardrobe|walk-in/.test(n)) return ['bedroom'];\n        if (/kitchen|dining|kitchenette/.test(n)) return ['kitchen', 'dining'];\n        if (/bed|kids|nursery|children|office|study/.test(n)) return ['bedroom'];\n        if (/living|lounge|hall|entry|entrance/.test(n)) return ['living', 'dining'];\n        return null;\n      }\n      /* _openFitouts: the FITOUT picker -- the core's houseOpenFitouts (core-v810, status/modules.md 13) */\n      function _openFitouts(groups) {\n        return API.houseOpenFitouts(groups, API);\n      }\n\n\n    /* ===== ZONE O -- replace from here to the END of the file ============ */\n\n      /* -------------------------------------------------------------------------\n         WHAT THIS BUILDING IS, FOR THE ASSISTANT.\n\n         The bill of quantities says what the building is made of and never what it\n         IS. Without this the agent cannot tell a bench from a two storey house,\n         and every answer about saving money, sequencing or what to change next is\n         guesswork -- it is how a second floor got recommended on a product that\n         has one.\n\n         Read straight off STATE and off the tables the wizard itself offers, so\n         the menu cannot drift from what the buyer can actually tap. Nothing here\n         is computed twice: the area is polyArea, the ridge is apexY, the covering\n         is _covDef -- the same functions the model is drawn from.\n\n         CHANGEABLE AND FIXED ARE THE HALF THAT MATTERS. English on purpose: these\n         lines are read by the model, never by a buyer, so they carry no locale\n         key.\n         ------------------------------------------------------------------------- */\n      function _factCoverings() {\n        var out = [], i, pit = (STATE.roof && STATE.roof.pitch) || 0;\n        for (i = 0; i < COVERINGS.length; i++) {\n          out.push({\n            key: COVERINGS[i].key,\n            name: _t(COVERINGS[i].i18n, COVERINGS[i].def),\n            minPitch: COVERINGS[i].minPitch,\n            allowedHere: (pit + 1e-6) >= COVERINGS[i].minPitch\n          });\n        }\n        return out;\n      }\n\n      /* The rooms come from the shared floorplan asset, and so does the name --\n         a room's name is an index into the asset's table, not a string on the\n         room, which is why they used to arrive unnamed. */\n      function _factRooms() {\n        var out = [], PL, R, i, j, a, r, nm;\n        try {\n          PL = _P();\n          R = (PL && PL.rooms) ? (PL.rooms() || []) : [];\n        } catch (e) { return out; }\n        for (i = 0; i < R.length && i < 24; i++) {\n          a = 0;\n          for (j = 0; j < (R[i].rects || []).length; j++) {\n            r = R[i].rects[j];\n            a += (r.x1 - r.x0) * (r.z1 - r.z0);\n          }\n          nm = '';\n          try { nm = (PL.roomName ? (PL.roomName(R[i], i) || '') : ''); } catch (e2) { nm = ''; }\n          /* a closet by what it is, never by a borrowed name (adu-v1415) */\n          if (R[i].closet) { out.push({ name: 'closet', area: Math.round(a * 10) / 10, wet: false, closet: true }); continue; }\n          out.push({ name: nm, area: Math.round(a * 10) / 10, wet: /bath|shower|toilet|wc/i.test(nm) });\n        }\n        return out;\n      }\n\n      /* GLAZED IS NOT THE SAME AS OPEN. A sill above the floor is the lib's own\n         test for a window (see dimAnchors), and a french door is glass standing on\n         the floor. A plain door is neither. */\n      function _factOpenings(floorArea) {\n        var ops = STATE.openings || [], i, o, w, h, ar;\n        var glazed = 0, big = null, bigA = -1;\n        for (i = 0; i < ops.length; i++) {\n          o = ops[i];\n          w = Number(o.w) || 0; h = Number(o.h) || 0; ar = w * h;\n          if ((Number(o.sill) || 0) > 0.05 || o.kind === 'french') glazed += ar;\n          if (ar > bigA) { bigA = ar; big = { w: Math.round(w * 100) / 100, h: Math.round(h * 100) / 100 }; }\n        }\n        return {\n          count: ops.length,\n          glazedArea: Math.round(glazed * 10) / 10,\n          glazedShareOfFloor: floorArea > 0 ? Math.round((glazed / floorArea) * 1000) / 10 : 0,\n          largest: big\n        };\n      }\n\n      API.facts = function () {\n        var S = STATE, fa = 0, i, ov = 0, ridge = null, cov = null;\n        try { fa = polyArea(poly()); } catch (e) {\n          fa = (Number(S.footprint.w) || 0) * (Number(S.footprint.l) || 0);\n        }\n        var storeys = Number(S.storeys) || 1;\n        var floorArea = Math.round(fa * storeys * 10) / 10;\n\n        var over = (S.roof && S.roof.over) || {};\n        var reach = [over.x0, over.x1, over.z0, over.z1];\n        for (i = 0; i < reach.length; i++) if ((Number(reach[i]) || 0) > ov) ov = Number(reach[i]) || 0;\n        if (!ov) ov = Number((S.roof && S.roof.eave) || 0) || 0;\n\n        try { ridge = Math.round(apexY() * 100) / 100; } catch (e2) { ridge = null; }\n\n        /* WHAT WILL ACTUALLY BE BUILT, not what was picked. A covering the pitch\n           does not allow is replaced at build time, and reporting the picked one\n           would have the agent talking about a roof nobody is getting. */\n        try { cov = _covDef(); } catch (e3) { cov = null; }\n\n        return {\n          product: __CORE.PRODUCT,\n          version: VERSION,\n          units: S.isMetric ? 'metric' : 'imperial',\n          width: Math.round((Number(S.footprint.w) || 0) * 100) / 100,\n          length: Math.round((Number(S.footprint.l) || 0) * 100) / 100,\n          footprintArea: Math.round(fa * 10) / 10,\n          storeys: storeys,\n          floorArea: floorArea,\n          clearHeight: (S.clearH && S.clearH[0]) || null,\n          ridgeHeight: ridge,\n          roof: {\n            type: (S.roof && S.roof.type) || '',\n            pitch: (S.roof && (S.roof.pitch === 0 || S.roof.pitch)) ? S.roof.pitch : null,\n            parapet: !!(S.roof && S.roof.parapet),\n            overhang: Math.round(ov * 100) / 100,\n            covering: cov ? _t(cov.i18n, cov.def) : ''\n          },\n          coveringOptions: _factCoverings(),\n          foundation: S.foundation || '',\n          foundationOptions: FOUNDATIONS.slice(),\n          openings: _factOpenings(floorArea),\n          rooms: _factRooms(),\n          /* THE ADDRESS IS NOT KEPT ANYWHERE IN THIS LIB. The map places the\n             building and the frost depth is what comes back from it; the text of\n             the address is read by nobody and stored by nobody. The field is here\n             so that the day the place step writes STATE.address, the agent has it\n             without another change. */\n          site: {\n            address: String(S.address || ''),\n            frostDepth: Number(S.climateZone) || 0\n          },\n          /* EXTRA LINES ARE PRINTED AS GIVEN by the agent's building block, so\n             what this product has beyond the common shape goes here in words:\n             the terrace, the trees, the assembly walk, and how the configurator\n             is driven (Marek: the agent must be able to tell someone how) */\n          extra: (function () {\n            var L = [];\n            try { var Tt = _terrace(); L.push(Tt.on ? ('TERRACE: on wall ' + Tt.side + ', ' + Math.round(Tt.w * 100) / 100 + ' x ' + Math.round(Tt.d * 100) / 100 + ' m, ' + (Tt.surface === 'pavers' ? 'concrete tiles' : 'timber decking') + (Tt.pergola && Tt.pergola !== 'none' ? (', pergola ' + Tt.pergola) : ', no pergola')) : 'TERRACE: none (a terrace can be switched on in the Exterior step)'); } catch (e) {}\n            try { var K = _trees(); L.push('TREES on the site: ' + (K ? K.count() : 0)); } catch (e2) {}\n            try { L.push('ASSEMBLY WALK: ' + ((_asm2.steps.length ? _asm2.steps.length : _asmCollect().length) + 2) + ' steps, one catalogue item each, named as in the budget'); } catch (e3) {}\n            L.push('HOW THE CONFIGURATOR IS DRIVEN - tell people this when they ask how to do something:');\n            L.push('- The drawer (pencil button) walks the steps: Place, Floorplan, Roof and Base, Doors and Windows, Colors, Exterior, Assembly. The rail on the right: 2D/3D switch, the eye cycles the visualisation (full, structure, panels, electrics), the scissors are section cuts dragged in the model, undo, units, share, the assembly button, the PDF export.');\n            L.push('- In 2D one finger pans the map under the house and two fingers zoom about the centre; the inner floor area is written above the plan.');\n            L.push('- Floorplan: drag a wall of the outline to resize; drag a partition to move it; tap a room name to rename; the red plus in a room opens the fitout catalogue, and a placed piece is dragged, turned, mirrored or binned from the bar.');\n            L.push('- Roof and Base: one pitched-roof tile cycles gable, hip at one end, hip at the other end, hip at both; mono and flat are their own tiles; the Wall height and Pitch sliders sit over the model; the eaves overhang is dragged on the plan, and past 1.5 m it stands on posts; the foundation tiles are screws, pads, piers and strips (a crawl space).');\n            L.push('- Exterior: the terrace on/off, its wall (1-4), decking or concrete tiles, size and place dragged on the plan; a pergola (wooden or aluminium slats) unless the roof already shelters that side.');\n            L.push('- Place: the address sets the map and the frost depth; Scenery 1-3 put trees round the site, each dragged by tapping it.');\n            L.push('- The assembly button steps through the building the way it is built, one item per tap; step 1 is the exploded view with a slider (0-4), step 2 puts the building back together in the view it started from, the items follow; past the last step the whole building is back. The Assembly step in the drawer shows a section with the wall build-up named layer by layer.');\n            L.push('- Everything is saved automatically; the share button gives a short link (?p=...) that opens exactly this project; the drawings page /pages/blueprints?p=... draws views, sections and layers from it. Electrics and lightning protection are placed automatically and billed.');\n            return L;\n          })(),\n          changeable: [\n            'the footprint - its size and its shape, dragged on the plan',\n            'the clear wall height, 2.40 to 3.20 m, with the Wall height slider on the Roof and Base step',\n            'interior partitions (dragged on the plan), the doors in them, and the name of every room (tap the name)',\n            'the roof type - one pitched-roof tile that cycles gable, hip at one end, hip at the other end, hip at both; plus mono pitch and flat with a parapet',\n            'the roof pitch (slider) and the eaves overhang (dragged on the plan on the Roof and Base step); an overhang past 1.5 m stands on posts',\n            'the roof covering, from the three listed above, at a pitch that allows it',\n            'what it stands on, from the four listed above (strips build a crawl space: stem wall, sill, vents)',\n            'windows and doors - added, moved, resized, removed, on the Doors and Windows step',\n            'the exterior colours, the terrace colours and which way the cladding runs, on the Colors step',\n            'the fitout pieces placed in each room - the red plus in a room opens the catalogue; a piece is dragged, turned, mirrored or binned from the bar',\n            'a terrace on one side of the house (Exterior step): on or off, which wall (1-4), decking or concrete tiles, size and place dragged on the plan; a pergola over it (wooden or aluminium slats) unless the roof already shelters that side',\n            'trees round the site (Place step, Scenery 1-3): each is dragged by tapping it, nothing else',\n            'where it stands on the map, and the climate zone that sets the footing depth',\n            'metric or imperial display'\n          ],\n          fixed: [\n            'a second storey - this product builds one storey and there is no control for another',\n            'a basement or a cellar - what it stands on is one of screws, pads, piers or strips (no slab on this product)',\n            'the structural system - it is a timber stud frame with a trussed or rafter roof throughout',\n            'a garage, a carport or an attached annexe',\n            'any roof covering other than the three offered'\n          ]\n        };\n      };\n\n      /* THE REVIEW SWITCHES, ALL OF THEM, LAST IN THE FILE.\n\n         Every one of these used to sit beside the thing it switches -- the wall's\n         colour in the wall zone, the roof's in the roof's, the snapshot filter up\n         by the snapshot -- which was tidy and cost a whole-file delivery every\n         time a layer was accepted, because a colour changed in three zones at\n         once. He asked for zone deliveries again and this is what makes them\n         possible: the page calls API.boot AFTER this file has run, so a var down\n         here is assigned before any build or snapshot reads it, and being last\n         costs nothing. Nothing else in the file assigns these.\n\n           VERSION        the lib's own version string, bumped on every change\n           FOCUS          which log prefixes the snapshot prints; '' is all\n           MAGENTA_LAYER  the roof layer under review (isNew), '' is none\n           WALL_MAGENTA   the wall layer(s) under review (_wallNew), comma list\n           WALL_SHOW      all | ghost | eps | frame | coat -- how much wall to draw\n           FLAT_STEP      how many steps of the flat build-up to draw, -1 is all */\n      var VERSION = 'gunite-v16';   /* the ADU lib's infrastructure, configureGunite at the top of this file */\n      API.VERSION = VERSION;\n      /* NARROWED TO THE ONE SUBJECT, because a snapshot he cannot send is a\n         snapshot that does not exist: six prefixes printed 28 lines and several\n         of them run to a paragraph, so the log had to go through Word and a PDF\n         to reach me. One prefix and it pastes straight into a message (Marek:\n         zkus zkratit log, at ho muzu poslat rovnou sem).\n\n         Widen it back the moment the subject changes -- the other prefixes are\n         HIP, qty, cut, PWL, posts, assembly, state. */\n      /* the doubled posts round the openings: which side each opening is\n         pushed against (frame opening), what the joinery draws from (frame\n         seat), the jack and king each side (frame pair) and the count and nails\n         (frame total). Put truss back for the stud lists and the panel marks. */\n      /* trusses and their sheets are the subject now, the frame and its wool stay on */\n      /* adu-v1406: the plan import test -- partitions, room lines, the doors and what they bill, the floors and the switches */\n      /* adu-v1416: the double door in the joinery and the new fitout pieces\n         (the tables of six and eight, the islands with stools, the dryer) --\n         what is billed and what has no row yet */\n      /* adu-v1420: the electrics now come from configurator-mep.js -- ELEC is\n         the build as before, MEP the line naming the asset and its version;\n         adu-v1421: HEAT, the multi-split by calculation; adu-v1424: WATER; adu-v1425: WASTE */\n      /* adu-v1433 (corner window thread): the corner window is the subject --\n         corner (the set, the corner post, the bracing panel on each wall, what\n         was skipped and why) and joinery (the units as built and billed) */\n      __CORE.FOCUS = 'corner joinery';\n      /* the interior paint: his row WIS00001, by the m2 (Sep 2026); its\n         catalogue line is in _wallCat with the others */\n      var INT_PAINT = { code: 'WIS00001', show: true, col: 0xF4F3EE };\n      /* THE SHEET SELLS JOINT COMPOUND BY THE KILOGRAM, and the bill was putting\n         square metres of board into a kilogram row -- the same class of mistake\n         the tile adhesive had. Joints, corners and two passes over every screw\n         head come to about 0.45 kg for each square metre of board (Marek). */\n      var FILLER_KG_M2 = 0.45;\n      var MAGENTA_LAYER = '';\n      var WALL_MAGENTA = '';\n      var WALL_SHOW = 'all';\n      var FLAT_STEP = -1;\n\n      /* =========================================================================\n         WHAT THIS PRODUCT HANDS BACK TO THE CORE. The other direction of the\n         boundary, and the whole of it: twelve names. When the core moves into its\n         own file this block is what build() returns instead of assigning.\n         ========================================================================= */\n      __PROD.VERSION         = VERSION;\n      /* ONE STOREY, ALWAYS (adu-v1398): the wall height slider stretches the\n         wall -- studs, inside layers and facade -- and never opens a second\n         storey over the first (Marek: wall height nema pridavat vodorovny\n         profil). The core reads this in the slider and on every build. */\n      __PROD._oneStorey      = true;\n      /* THE ICON STRIP INSTEAD OF THE WIDE DRAWER (adu-v1429, core-v591,\n         Marek: misto sirokeho draweru uzky drawer s ikonami) -- the ADU first;\n         ?ui=drawer on the address brings the old drawer back for a test */\n      __PROD._iconUi         = true;\n      /* THE GUIDED TOUR (adu-v1432, core-v631, Marek: pro ADU zkusit udelat\n         pruvodce z prvnich mp3) -- the play / stop icon in the canvas bar */\n      __PROD._tour           = true;\n      /* THE PERGOLA STANDS ANYWHERE (adu-v1430, core-v597, Marek: pergola on /\n         off jako bazen, presun prsten) -- _buildPergola draws it on the\n         terrace or on a place of its own; the core gives it its own ghost */\n      __PROD._pergolaFree    = true;\n      __PROD.KIT             = KIT;\n      __PROD._asmLayers      = _asmLayers;\n      __PROD.RAFTER          = RAFTER;\n      __PROD.WALL_CLAD       = WALL_CLAD;\n      __PROD.WALL_MEMB       = WALL_MEMB;\n      __PROD.WALL_FBATT      = WALL_FBATT;\n      __PROD.WALL_EPS        = (typeof WALL_EPS  !== 'undefined') ? WALL_EPS  : null;\n      __PROD.WALL_COAT       = (typeof WALL_COAT !== 'undefined') ? WALL_COAT : null;\n      __PROD.WALL_REND       = (typeof WALL_REND !== 'undefined') ? WALL_REND : null;\n      __PROD._productCladThk = (typeof _productCladThk === 'function') ? _productCladThk : null;\n      __PROD._productOverCap = (typeof _productOverCap === 'function') ? _productOverCap : null;\n      __PROD._openFitouts    = (typeof _openFitouts    === 'function') ? _openFitouts    : null;\n      __PROD._fitGroupOf     = (typeof _fitGroupOf     === 'function') ? _fitGroupOf     : null;\n      /* THE PLUS ONLY IN THE ROOMS THAT ARE FURNISHED (adu-v1408, Marek: plus\n         u mistnosti by melo byt jen u tech hlavnich, kde mame fitouts --\n         uprostred mame 3x plus v miste, kde to nedava smysl). A hall, an\n         entry, a store, a pantry, a mudroom, a garage or a technical room has\n         no piece in the catalogue, and a scrap under 1.5 m2 has no room for\n         one: none of them gets the button. A room whose key cannot be read\n         keeps it, so nothing is lost if the asset answers nothing. */\n      var FIT_MAIN = { 'rooms.livingroom': 1, 'rooms.kitchen': 1, 'rooms.bedroom': 1, 'rooms.bathroom': 1, 'container_room_7': 1,\n                       'rooms.office': 1, 'rooms.laundry': 1, 'rooms.loft': 1, 'rooms.diningroom': 1, 'rooms.wc': 1, 'rooms.wardrobe': 1 };\n      __CORE.FIT_PLUS_SKIP = function (R, i) {\n        if (!R) return false;\n        /* a closet gets no furniture (adu-v1415) */\n        if (R.closet) return true;\n        if (typeof R.area === 'number' && R.area < 1.5) return true;\n        if (typeof _roomKey !== 'function') return false;\n        var k = '';\n        try { k = _roomKey(R, i); } catch (eK) { k = ''; }\n        return k ? !FIT_MAIN[k] : false;\n      };\n\n\n      /* THE POOL (gunite-v1): its own boot, layers and shapes -- configureGunite\n         at the top of this file, called where the dome calls its own */\n      global.configureGunite(__CORE);\n\n\n      try {\n        if (global.Configurator && global.Configurator.log) {\n          global.Configurator.log.log('[' + __CORE.LOG_TAG + '] loaded ' + VERSION + ' on ' + CORE_VERSION);\n        }\n      } catch (e) {}\n    }\n\n    /* -----------------------------------------------------------------------\n       AND IF THE CORE IS NOT THERE, SAY WHICH FILE IS MISSING.\n\n       Since core-v80 this product is nothing without ConfiguratorCore, which\n       lives in configurator-ui.js. If that file is stale -- cached by the CDN,\n       cached by the phone, or simply not uploaded -- then the line below threw\n       a TypeError on undefined and the script died there: no HouseLib, a blank\n       page, and nothing in the log, because the log is inside the thing that\n       never got built. That is the one failure that leaves no trace, so it\n       gets its own message.\n       ----------------------------------------------------------------------- */\n    if (!global.ConfiguratorCore || typeof global.ConfiguratorCore.create !== 'function') {\n      var m = '[' + PRODUCT_NAME + '] ConfiguratorCore is MISSING -- configurator-ui.js is ' +\n              'not loaded, or the one that loaded is older than core-v80. Nothing can ' +\n              'be built. Upload configurator-ui.js and hard-refresh.';\n      try { global.__levaLogs = global.__levaLogs || []; global.__levaLogs.push(m); } catch (e1) {}\n      try { if (global.console) (global.console.error || global.console.log)(m); } catch (e2) {}\n      try {\n        var dd = global.document.createElement('div');\n        dd.setAttribute('style', 'position:fixed;left:0;right:0;top:0;z-index:2147483647;' +\n          'background:#B3261E;color:#fff;font:12px/1.45 ui-monospace,Menlo,monospace;padding:10px 12px;white-space:pre-wrap');\n        dd.textContent = m;\n        var hh = global.document.body || global.document.documentElement;\n        if (hh) hh.appendChild(dd);\n      } catch (e4) {}\n      try { global.__coreMissing = true; } catch (e3) {}\n    } else {\n      global.GuniteLib = global.HouseLib = global.ConfiguratorCore.create(build);\n    }\n\n  })(window);\n  } catch (eTop) {\n    try {\n      var mm = 'CONFIGURATOR FILE THREW WHILE LOADING -- ' + ((eTop && eTop.message) || eTop) +\n               (eTop && eTop.stack ? ('\\n' + String(eTop.stack).split('\\n').slice(0, 4).join('\\n')) : '');\n      if (window.console) (console.error || console.log)(mm);\n      var e0 = document.createElement('div');\n      e0.setAttribute('style', 'position:fixed;left:0;right:0;top:0;z-index:2147483647;' +\n        'background:#7A0C16;color:#fff;font:12px/1.45 ui-monospace,Menlo,monospace;padding:10px 12px;white-space:pre-wrap');\n      e0.textContent = mm;\n      (document.body || document.documentElement).appendChild(e0);\n    } catch (e9) {}\n  }\n})();"],
  "mappings": "CA4BC,SAAU,OAAQ,CACjB,aACA,OAAO,gBAAkB,SAAU,EAAG,CACpC,IAAI,EAAI,EAAE,IAAK,EAAI,EAAE,MAAO,EAAI,EAAE,OAC9B,QAAU,aACV,QAAU,GACV,GAAK,MAAQ,GAAK,MAGtB,SAAS,GAAG,EAAG,SAAU,CACvB,IAAI,EAAI,OAAO,YAAa,EAAI,EAAI,EAAE,CAAC,EAAI,KAC3C,GAAI,OAAO,GAAM,UAAY,GAAK,EAAE,QAAQ,oBAAoB,EAAI,EAAG,OAAO,EAC9E,GAAI,CAAE,EAAI,EAAE,GAAG,EAAG,EAAE,CAAG,MAAY,CAAE,EAAI,EAAI,CAC7C,OAAO,GAAK,UAAY,CAC1B,CACA,SAAS,IAAI,EAAG,CAAE,GAAI,CAAE,E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,OAAO,QAAQ,OAAS,OAAO,QAAQ,KAAK,CAAC,CAAG,MAAa,CAAC,CACzF,GAAI,CACF,IAAI,GAAK,OAAO,SAAS,cAAc,KAAK,EAC5C,GAAG,aAAa,QAAS,yKAC2F,EACpH,GAAG,YAAc,EACjB,IAAI,GAAK,OAAO,SAAS,MAAQ,OAAO,SAAS,gBAC7C,IAAI,GAAG,YAAY,EAAE,CAC3B,MAAa,CAAC,CACd,GAAI,CAAE,OAAO,cAAgB,EAAM,MAAa,CAAC,CACnD,MACE,OAAO,UAAY,OAAO,SAAW,OAAO,iBAAiB,OAAO,KAAK,CAG7E,GAAG,MAAM,CACT,OAAS,KAAM,CACb,GAAI,CACF,IAAI,GAAK,6CAAgD,MAAQ,KAAK,SAAY,OACxE,MAAQ,KAAK,MAAS;AAAA,EAAO,OAAO,KAAK,KAAK,EAAE,MAAM;AAAA,CAAI,EAAE,MAAM,EAAG,CAAC,EAAE,KAAK;AAAA,CAAI,EAAK,IAC5F,OAAO,UAAU,QAAQ,OAAS,QAAQ,KAAK,EAAE,EACrD,IAAI,GAAK,SAAS,cAAc,KAAK,EACrC,GAAG,aAAa,QAAS,yKAC2F,EACpH,GAAG,YAAc,IAChB,SAAS,MAAQ,SAAS,iBAAiB,YAAY,EAAE,CAC5D,MAAa,CAAC,CAChB,CACF,GAAG",
  "names": ["i", "a", "b", "t", "c", "v", "j", "k", "P", "tr", "strip", "r0", "path", "s", "p", "u", "n", "y", "at", "rows", "x", "area", "ring", "out", "z", "unit", "paint", "add", "m", "e0", "dd", "mm", "h", "poly", "storeys"]
}
