venuekit 0.10.3 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react.cjs CHANGED
@@ -45,7 +45,9 @@
45
45
 
46
46
 
47
47
 
48
- var _chunkUWCMN6Q7cjs = require('./chunk-UWCMN6Q7.cjs');
48
+
49
+
50
+ var _chunkYLV7JK57cjs = require('./chunk-YLV7JK57.cjs');
49
51
 
50
52
  // ../canvas/src/camera.ts
51
53
  var MIN_ZOOM = 0.05;
@@ -133,7 +135,7 @@ function reduceGesture(state, camera, viewport, input) {
133
135
  const [a, b] = list2;
134
136
  return {
135
137
  // Con dos dedos ya no hay tap posible: `moved` queda en true a propósito.
136
- state: { pointers, origin: null, moved: true, pinchDistance: _chunkUWCMN6Q7cjs.distance.call(void 0, a, b) },
138
+ state: { pointers, origin: null, moved: true, pinchDistance: _chunkYLV7JK57cjs.distance.call(void 0, a, b) },
137
139
  camera
138
140
  };
139
141
  }
@@ -146,7 +148,7 @@ function reduceGesture(state, camera, viewport, input) {
146
148
  const [a, b] = list2;
147
149
  const previousA = state.pointers[a.id];
148
150
  const previousB = state.pointers[b.id];
149
- const nextDistance = _chunkUWCMN6Q7cjs.distance.call(void 0, a, b);
151
+ const nextDistance = _chunkYLV7JK57cjs.distance.call(void 0, a, b);
150
152
  const previousDistance = state.pinchDistance;
151
153
  if (!previousA || !previousB || !previousDistance || previousDistance < 1e-6 || nextDistance < 1e-6) {
152
154
  return { state: { ...state, pointers, pinchDistance: nextDistance }, camera };
@@ -159,7 +161,7 @@ function reduceGesture(state, camera, viewport, input) {
159
161
  camera: panBy(zoomed, nextMid.x - previousMid.x, nextMid.y - previousMid.y)
160
162
  };
161
163
  }
162
- const movedEnough = state.moved || state.origin !== null && _chunkUWCMN6Q7cjs.distance.call(void 0, state.origin, pointer) > TAP_SLOP;
164
+ const movedEnough = state.moved || state.origin !== null && _chunkYLV7JK57cjs.distance.call(void 0, state.origin, pointer) > TAP_SLOP;
163
165
  if (!movedEnough) return { state: { ...state, pointers }, camera };
164
166
  return {
165
167
  state: { ...state, pointers, moved: true },
@@ -199,7 +201,12 @@ var defaultPalette = {
199
201
  unitLabel: "#0b0b0d",
200
202
  landmark: "#23232a",
201
203
  landmarkStroke: "#34343c",
202
- landmarkLabel: "#d6d6dc"
204
+ landmarkLabel: "#d6d6dc",
205
+ courtesy: "#7c3aed",
206
+ courtesyLabel: "#ffffff",
207
+ heldFor: "#f59e0b",
208
+ heldForLabel: "#0b0b0d",
209
+ statusMark: "#ffffff"
203
210
  };
204
211
  var PALETTE_VARIABLES = {
205
212
  taken: "--vk-taken",
@@ -219,7 +226,12 @@ var PALETTE_VARIABLES = {
219
226
  unitLabel: "--vk-unit-fg",
220
227
  landmark: "--vk-landmark",
221
228
  landmarkStroke: "--vk-landmark-stroke",
222
- landmarkLabel: "--vk-landmark-fg"
229
+ landmarkLabel: "--vk-landmark-fg",
230
+ courtesy: "--vk-courtesy",
231
+ courtesyLabel: "--vk-courtesy-fg",
232
+ heldFor: "--vk-held-for",
233
+ heldForLabel: "--vk-held-for-fg",
234
+ statusMark: "--vk-status-mark"
223
235
  };
224
236
  function paletteFromVariables(read, base = defaultPalette) {
225
237
  const out = { ...base };
@@ -262,7 +274,7 @@ function centredBox(at, width, height, rotation) {
262
274
  return { minX: at.x - hw, minY: at.y - hh, maxX: at.x + hw, maxY: at.y + hh };
263
275
  }
264
276
  function tableBodyBox(table) {
265
- const size = _chunkUWCMN6Q7cjs.tableSize.call(void 0, table.shape, table.places);
277
+ const size = _chunkYLV7JK57cjs.tableSize.call(void 0, table.shape, table.places);
266
278
  const k = _nullishCoalesce(table.scale, () => ( 1));
267
279
  const [w, h] = "radius" in size ? [size.radius * 2 * k, size.radius * 2 * k] : [size.width * k, size.height * k];
268
280
  return centredBox(table.transform, w, h, table.transform.rotation);
@@ -279,12 +291,12 @@ function pieceBounds(element) {
279
291
  return box;
280
292
  }
281
293
  function computeBounds(element) {
282
- if (element.type === "zone") return _chunkUWCMN6Q7cjs.zoneBounds.call(void 0, element);
294
+ if (element.type === "zone") return _chunkYLV7JK57cjs.zoneBounds.call(void 0, element);
283
295
  if (element.type === "landmark") {
284
296
  return centredBox(element.transform, element.width, element.height, element.transform.rotation);
285
297
  }
286
- const units = element.type === "seatBlock" ? _chunkUWCMN6Q7cjs.expandSeatBlock.call(void 0, element) : _chunkUWCMN6Q7cjs.expandTable.call(void 0, element);
287
- const own = units.length > 0 ? _chunkUWCMN6Q7cjs.bbox.call(void 0, units.map((u) => ({ x: u.x, y: u.y }))) : null;
298
+ const units = element.type === "seatBlock" ? _chunkYLV7JK57cjs.expandSeatBlock.call(void 0, element) : _chunkYLV7JK57cjs.expandTable.call(void 0, element);
299
+ const own = units.length > 0 ? _chunkYLV7JK57cjs.bbox.call(void 0, units.map((u) => ({ x: u.x, y: u.y }))) : null;
288
300
  if (element.type === "table") {
289
301
  const body = tableBodyBox(element);
290
302
  return own ? {
@@ -304,9 +316,9 @@ function elementAt(layout, screen, camera, viewport, options = {}) {
304
316
  const element = layout.elements[i];
305
317
  const box = elementBounds(layout, element);
306
318
  const ownsRadius = element.type === "seatBlock" || element.type === "table" && element.mode === "perPlace";
307
- const pad = element.type === "seatBlock" || element.type === "table" ? (ownsRadius ? _nullishCoalesce(_optionalChain([options, 'access', _ => _.radii, 'optionalAccess', _2 => _2.get, 'call', _3 => _3(element.id)]), () => ( 0)) : 0) + slop : 0;
319
+ const pad = element.type === "seatBlock" || element.type === "table" ? (ownsRadius ? _nullishCoalesce(_optionalChain([options, 'access', _2 => _2.radii, 'optionalAccess', _3 => _3.get, 'call', _4 => _4(element.id)]), () => ( 0)) : 0) + slop : 0;
308
320
  if (box && world.x >= box.minX - pad && world.x <= box.maxX + pad && world.y >= box.minY - pad && world.y <= box.maxY + pad) {
309
- if (element.type === "zone" && !_chunkUWCMN6Q7cjs.pointInZone.call(void 0, element, world)) continue;
321
+ if (element.type === "zone" && !_chunkYLV7JK57cjs.pointInZone.call(void 0, element, world)) continue;
310
322
  return element;
311
323
  }
312
324
  }
@@ -340,12 +352,13 @@ function unitRadii(layout) {
340
352
  out.set(el.id, DEFAULT_UNIT_RADIUS * k);
341
353
  continue;
342
354
  }
343
- const size = _chunkUWCMN6Q7cjs.tableSize.call(void 0, el.shape, el.places);
355
+ const size = _chunkYLV7JK57cjs.tableSize.call(void 0, el.shape, el.places);
344
356
  out.set(el.id, ("radius" in size ? size.radius : Math.max(size.width, size.height) / 2) * k);
345
357
  }
346
358
  }
347
359
  return out;
348
360
  }
361
+ var RESERVED_DASH_PX = 3;
349
362
  var MIN_NUMBERED_RADIUS_PX = 8;
350
363
  var LABEL_INSET_PX = 12;
351
364
  var TWO_LINES_PX = 40;
@@ -369,13 +382,13 @@ function buildScene(input) {
369
382
  })
370
383
  );
371
384
  const colorOf = (ref) => ref === null ? null : _nullishCoalesce(placeTypeColors.get(ref), () => ( null));
372
- const dim = (ref) => mode === "map" && (colorOf(ref) === null || input.focusRef != null && ref !== input.focusRef || ref !== null && !!_optionalChain([input, 'access', _4 => _4.dimmedRefs, 'optionalAccess', _5 => _5.has, 'call', _6 => _6(ref)]));
385
+ const dim = (ref) => mode === "map" && (colorOf(ref) === null || input.focusRef != null && ref !== input.focusRef || ref !== null && !!_optionalChain([input, 'access', _5 => _5.dimmedRefs, 'optionalAccess', _6 => _6.has, 'call', _7 => _7(ref)]));
373
386
  const bg = layout.meta.background;
374
387
  const background = bg ? { src: bg.src, box: { minX: bg.x, minY: bg.y, maxX: bg.x + bg.width, maxY: bg.y + bg.height }, opacity: bg.opacity } : null;
375
388
  const shapes = [];
376
389
  const labels = [];
377
390
  const chip = { fill: palette.shapeFill, stroke: palette.shape };
378
- const refOf = (el) => el.type === "landmark" ? null : _optionalChain([el, 'access', _7 => _7.placeType, 'optionalAccess', _8 => _8.ref]) || null;
391
+ const refOf = (el) => el.type === "landmark" ? null : _optionalChain([el, 'access', _8 => _8.placeType, 'optionalAccess', _9 => _9.ref]) || null;
379
392
  for (const el of layout.elements) {
380
393
  if (el.type === "landmark") {
381
394
  const b = centredBox(el.transform, el.width, el.height, el.transform.rotation);
@@ -433,24 +446,24 @@ function buildScene(input) {
433
446
  const ref = refOf(el);
434
447
  const color = _nullishCoalesce(colorOf(ref), () => ( palette.unassigned));
435
448
  const b = centredBox(el.transform, el.width, el.height, el.transform.rotation);
436
- const strong = mode === "map" && ref !== null && !!_optionalChain([input, 'access', _9 => _9.highlightRefs, 'optionalAccess', _10 => _10.has, 'call', _11 => _11(ref)]);
449
+ const strong = mode === "map" && ref !== null && !!_optionalChain([input, 'access', _10 => _10.highlightRefs, 'optionalAccess', _11 => _11.has, 'call', _12 => _12(ref)]);
437
450
  const paint2 = {
438
451
  fill: translucent(color, strong ? palette.zoneSelectedAlpha : palette.zoneAlpha),
439
452
  stroke: color,
440
453
  strokeWidth: strong ? 2.5 : 1.5,
441
454
  ...dim(ref) ? { alpha: DIMMED_ALPHA } : {}
442
455
  };
443
- const outline = _chunkUWCMN6Q7cjs.zoneOutline.call(void 0, el, ZONE_CORNER);
456
+ const outline = _chunkYLV7JK57cjs.zoneOutline.call(void 0, el, ZONE_CORNER);
444
457
  if (outline.length > 0) shapes.push({ kind: "polygon", points: outline, ...paint2 });
445
458
  else shapes.push({ kind: "rect", x: b.minX, y: b.minY, width: b.maxX - b.minX, height: b.maxY - b.minY, cornerRadius: ZONE_CORNER, ...paint2 });
446
- const room = _chunkUWCMN6Q7cjs.zoneLabelSize.call(void 0, el);
459
+ const room = _chunkYLV7JK57cjs.zoneLabelSize.call(void 0, el);
447
460
  const swap = el.transform.rotation === 90 || el.transform.rotation === 270;
448
461
  const roomW = (swap ? room.height : room.width) * camera.zoom;
449
462
  const roomH = (swap ? room.width : room.height) * camera.zoom;
450
- const text = colorOf(ref) !== null ? _nullishCoalesce(_optionalChain([el, 'access', _12 => _12.placeType, 'optionalAccess', _13 => _13.name]), () => ( "")) : mode === "designer" ? input.unassignedLabel : "";
463
+ const text = colorOf(ref) !== null ? _nullishCoalesce(_optionalChain([el, 'access', _13 => _13.placeType, 'optionalAccess', _14 => _14.name]), () => ( "")) : mode === "designer" ? input.unassignedLabel : "";
451
464
  if (text && mode === "map") {
452
465
  const maxWidth = roomW - LABEL_INSET_PX;
453
- const price = ref !== null ? _optionalChain([input, 'access', _14 => _14.placeTypePrices, 'optionalAccess', _15 => _15.get, 'call', _16 => _16(ref)]) : void 0;
466
+ const price = ref !== null ? _optionalChain([input, 'access', _15 => _15.placeTypePrices, 'optionalAccess', _16 => _16.get, 'call', _17 => _17(ref)]) : void 0;
454
467
  const twoLines = !!price && roomH >= TWO_LINES_PX;
455
468
  const shift = twoLines ? 9 / camera.zoom : 0;
456
469
  const maxHeight = twoLines ? void 0 : roomH - LABEL_INSET_PX;
@@ -495,7 +508,7 @@ function buildScene(input) {
495
508
  }
496
509
  const chipped = mode === "designer" ? layout.elements.filter((el) => el.type !== "landmark" && colorOf(refOf(el)) === null) : [];
497
510
  const byElement = new Map(chipped.map((el) => [el.id, []]));
498
- if (byElement.size > 0) for (const u of units) _optionalChain([byElement, 'access', _17 => _17.get, 'call', _18 => _18(u.elementId), 'optionalAccess', _19 => _19.push, 'call', _20 => _20(u)]);
511
+ if (byElement.size > 0) for (const u of units) _optionalChain([byElement, 'access', _18 => _18.get, 'call', _19 => _19(u.elementId), 'optionalAccess', _20 => _20.push, 'call', _21 => _21(u)]);
499
512
  for (const el of chipped) {
500
513
  const own = byElement.get(el.id);
501
514
  if (!own || own.length === 0) continue;
@@ -529,7 +542,9 @@ function buildScene(input) {
529
542
  const maxWidth = (body.maxX - body.minX) * camera.zoom - 4;
530
543
  if (maxWidth < MIN_NUMBERED_RADIUS_PX * 2) continue;
531
544
  const ref = refOf(el);
532
- const color = el.mode === "whole" ? dim(ref) ? palette.soldLabel : mapUnitPaint(_nullishCoalesce(states.get(el.id), () => ( "free")), "", palette).label : palette.landmarkLabel;
545
+ const state = _nullishCoalesce(states.get(el.id), () => ( "free"));
546
+ const mark = state !== "selected" && state !== "held" ? _optionalChain([input, 'access', _22 => _22.unitMarks, 'optionalAccess', _23 => _23.get, 'call', _24 => _24(el.id)]) : void 0;
547
+ const color = el.mode === "whole" ? dim(ref) ? palette.soldLabel : (mark ? markPaint(mark, palette) : mapUnitPaint(state, "", palette)).label : palette.landmarkLabel;
533
548
  labels.push({ x, y, text: el.label, size: 13, weight: 700, color, align: "centre", maxWidth });
534
549
  }
535
550
  const elementsById = new Map(layout.elements.map((el) => [el.id, el]));
@@ -538,9 +553,11 @@ function buildScene(input) {
538
553
  if (!visible.has(u.id)) continue;
539
554
  visibleUnitIds.push(u.id);
540
555
  const color = _nullishCoalesce(colorOf(u.placeTypeRef), () => ( palette.unassigned));
541
- const state = mode === "designer" && _optionalChain([input, 'access', _21 => _21.locked, 'optionalAccess', _22 => _22.has, 'call', _23 => _23(u.id)]) ? "taken" : _nullishCoalesce(states.get(u.id), () => ( "free"));
542
- const mapPaint = mode === "map" ? mapUnitPaint(state, color, palette) : null;
543
- const paint2 = mapPaint ? { fill: mapPaint.fill, stroke: mapPaint.stroke, strokeWidth: mapPaint.strokeWidth } : unitPaint(state, color, palette);
556
+ const state = mode === "designer" && _optionalChain([input, 'access', _25 => _25.locked, 'optionalAccess', _26 => _26.has, 'call', _27 => _27(u.id)]) ? "taken" : _nullishCoalesce(states.get(u.id), () => ( "free"));
557
+ const mark = mode === "map" && state !== "selected" && state !== "held" ? _optionalChain([input, 'access', _28 => _28.unitMarks, 'optionalAccess', _29 => _29.get, 'call', _30 => _30(u.id)]) : void 0;
558
+ const mapPaint = mode === "map" ? mark ? markPaint(mark, palette) : mapUnitPaint(state, color, palette) : null;
559
+ const base = mapPaint ? { fill: mapPaint.fill, stroke: mapPaint.stroke, strokeWidth: mapPaint.strokeWidth } : unitPaint(state, color, palette);
560
+ const paint2 = u.inviteOnly && state === "free" && !mark ? { ...base, stroke: palette.label, strokeWidth: 2, dash: RESERVED_DASH_PX } : base;
544
561
  const dimmed = dim(u.placeTypeRef);
545
562
  const alpha = dimmed ? { alpha: DIMMED_ALPHA } : {};
546
563
  const el = elementsById.get(u.elementId);
@@ -550,15 +567,33 @@ function buildScene(input) {
550
567
  const size = Math.min(13, Math.max(8, radius * camera.zoom * 0.9));
551
568
  labels.push({ x: u.x, y: u.y, text: number, size, weight: 700, color: mapPaint.label, align: "centre", maxWidth: radius * camera.zoom * 1.7 });
552
569
  }
553
- if (_optionalChain([el, 'optionalAccess', _24 => _24.type]) === "table" && el.mode === "whole" && el.shape === "rect") {
570
+ if (_optionalChain([el, 'optionalAccess', _31 => _31.type]) === "table" && el.mode === "whole" && el.shape === "rect") {
554
571
  const b = tableBodyBox(el);
555
572
  shapes.push({ kind: "rect", x: b.minX, y: b.minY, width: b.maxX - b.minX, height: b.maxY - b.minY, ...paint2, ...alpha });
573
+ if (mark) shapes.push(...markBadge(mark, b.maxX - radius * 0.25, b.minY + radius * 0.25, radius, palette));
556
574
  continue;
557
575
  }
558
576
  shapes.push({ kind: "circle", x: u.x, y: u.y, radius, ...paint2, ...alpha });
577
+ if (mark) shapes.push(...markBadge(mark, u.x + radius * 0.65, u.y - radius * 0.65, radius, palette));
559
578
  }
560
579
  return { background, shapes, labels, visibleUnitIds };
561
580
  }
581
+ function markPaint(mark, palette) {
582
+ switch (mark) {
583
+ case "sold":
584
+ return mapUnitPaint("taken", "", palette);
585
+ case "courtesy":
586
+ return { fill: palette.courtesy, stroke: palette.soldStroke, strokeWidth: 1, label: palette.courtesyLabel };
587
+ case "held":
588
+ return { fill: palette.heldFor, stroke: palette.soldStroke, strokeWidth: 1, label: palette.heldForLabel };
589
+ }
590
+ }
591
+ function markBadge(mark, x, y, radius, palette) {
592
+ if (mark === "sold") return [];
593
+ const r = radius * 0.4;
594
+ if (mark === "courtesy") return [{ kind: "circle", x, y, radius: r, fill: palette.statusMark, stroke: palette.soldStroke, strokeWidth: 1 }];
595
+ return [{ kind: "rect", x: x - r, y: y - r, width: r * 2, height: r * 2, fill: palette.statusMark, stroke: palette.soldStroke, strokeWidth: 1 }];
596
+ }
562
597
 
563
598
  // ../canvas/src/label-fit.ts
564
599
  var MIN_LEGIBLE_PX = 11;
@@ -629,7 +664,7 @@ function paint(ctx, fill, stroke, strokeWidth, zoom) {
629
664
  }
630
665
  function drawBackground(ctx, scene, images) {
631
666
  const bg = scene.background;
632
- const bitmap = bg ? _optionalChain([images, 'optionalAccess', _25 => _25.get, 'call', _26 => _26(bg.src)]) : void 0;
667
+ const bitmap = bg ? _optionalChain([images, 'optionalAccess', _32 => _32.get, 'call', _33 => _33(bg.src)]) : void 0;
633
668
  if (!bg || !bitmap) return;
634
669
  const previous = ctx.globalAlpha;
635
670
  ctx.globalAlpha = bg.opacity;
@@ -646,7 +681,10 @@ function drawShape(ctx, shape, zoom) {
646
681
  shape.points.forEach((p, i) => i === 0 ? ctx.moveTo(p.x, p.y) : ctx.lineTo(p.x, p.y));
647
682
  ctx.closePath();
648
683
  } else ctx.arc(shape.x, shape.y, shape.radius, 0, Math.PI * 2);
684
+ const dash = shape.kind !== "polygon" ? shape.dash : void 0;
685
+ if (dash) ctx.setLineDash([dash / zoom, dash / zoom]);
649
686
  paint(ctx, shape.fill, shape.stroke, shape.strokeWidth, zoom);
687
+ if (dash) ctx.setLineDash([]);
650
688
  ctx.globalAlpha = previous;
651
689
  }
652
690
  function renderScene(scene, target) {
@@ -738,7 +776,7 @@ function hitUnit(input) {
738
776
  const unit = unitById.get(id);
739
777
  if (!unit) continue;
740
778
  const radius = _nullishCoalesce(radii.get(unit.elementId), () => ( 0));
741
- const d = _chunkUWCMN6Q7cjs.distance.call(void 0, world, unit);
779
+ const d = _chunkYLV7JK57cjs.distance.call(void 0, world, unit);
742
780
  if (d > reach + radius) continue;
743
781
  const score = d - radius;
744
782
  if (score < bestScore) {
@@ -763,7 +801,7 @@ function cornerPoint(box, corner) {
763
801
  var clamp = (v, min, max) => Math.min(max, Math.max(min, v));
764
802
  function resizeElement(el, corner, from, to) {
765
803
  if (el.type === "zone" || el.type === "landmark") {
766
- const box2 = el.type === "zone" ? _chunkUWCMN6Q7cjs.zoneBounds.call(void 0, el) : centredBox(el.transform, el.width, el.height, el.transform.rotation);
804
+ const box2 = el.type === "zone" ? _chunkYLV7JK57cjs.zoneBounds.call(void 0, el) : centredBox(el.transform, el.width, el.height, el.transform.rotation);
767
805
  const east = corner === "ne" || corner === "se";
768
806
  const south = corner === "se" || corner === "sw";
769
807
  const start = cornerPoint(box2, corner);
@@ -774,11 +812,11 @@ function resizeElement(el, corner, from, to) {
774
812
  const swap = el.transform.rotation === 90 || el.transform.rotation === 270;
775
813
  const [w, h] = swap ? [worldH, worldW] : [worldW, worldH];
776
814
  if (el.type === "zone" && (_nullishCoalesce(el.curve, () => ( 0))) > 0) {
777
- const sized = _chunkUWCMN6Q7cjs.zoneWithLocalSize.call(void 0, el, w, h);
815
+ const sized = _chunkYLV7JK57cjs.zoneWithLocalSize.call(void 0, el, w, h);
778
816
  const width = Math.round(clamp(sized.width, RESIZE_MIN, RESIZE_MAX));
779
817
  const height = Math.round(clamp(sized.height, RESIZE_MIN, RESIZE_MAX));
780
818
  const next = { ...sized, width, height };
781
- const b = _chunkUWCMN6Q7cjs.zoneBounds.call(void 0, next);
819
+ const b = _chunkYLV7JK57cjs.zoneBounds.call(void 0, next);
782
820
  const dx = east ? box2.minX - b.minX : box2.maxX - b.maxX;
783
821
  const dy = south ? box2.minY - b.minY : box2.maxY - b.maxY;
784
822
  return { ...next, transform: { ...el.transform, x: el.transform.x + dx, y: el.transform.y + dy } };
@@ -790,11 +828,11 @@ function resizeElement(el, corner, from, to) {
790
828
  const box = pieceBounds(el);
791
829
  if (!box) return el;
792
830
  const centre = { x: (box.minX + box.maxX) / 2, y: (box.minY + box.maxY) / 2 };
793
- const reach = _chunkUWCMN6Q7cjs.distance.call(void 0, from, centre);
831
+ const reach = _chunkYLV7JK57cjs.distance.call(void 0, from, centre);
794
832
  if (reach < 1) return el;
795
- const scale = _chunkUWCMN6Q7cjs.snapScale.call(void 0, (_nullishCoalesce(el.scale, () => ( 1))) * (_chunkUWCMN6Q7cjs.distance.call(void 0, to, centre) / reach), RESIZE_SCALE_STEP);
833
+ const scale = _chunkYLV7JK57cjs.snapScale.call(void 0, (_nullishCoalesce(el.scale, () => ( 1))) * (_chunkYLV7JK57cjs.distance.call(void 0, to, centre) / reach), RESIZE_SCALE_STEP);
796
834
  if (scale === (_nullishCoalesce(el.scale, () => ( 1)))) return el;
797
- return _chunkUWCMN6Q7cjs.scalePiece.call(void 0, el, scale);
835
+ return _chunkYLV7JK57cjs.scalePiece.call(void 0, el, scale);
798
836
  }
799
837
 
800
838
  // ../canvas/src/a11y.ts
@@ -806,12 +844,12 @@ var defaultA11yLabels = {
806
844
  row: "fila",
807
845
  seat: "asiento"
808
846
  };
809
- function buildA11yNodes(units, states, placeTypeNames, labels = defaultA11yLabels) {
847
+ function buildA11yNodes(units, states, placeTypeNames, labels = defaultA11yLabels, stateWords) {
810
848
  return units.map((u) => {
811
849
  const state = _nullishCoalesce(states.get(u.id), () => ( "free"));
812
850
  const where = u.row !== void 0 && u.seat !== void 0 ? `${labels.row} ${u.row}, ${labels.seat} ${u.seat}` : u.label;
813
851
  const typeName = u.placeTypeRef === null ? void 0 : placeTypeNames.get(u.placeTypeRef);
814
- const name = [typeName, where, labels[state]].filter(Boolean).join(", ");
852
+ const name = [typeName, where, _nullishCoalesce(_optionalChain([stateWords, 'optionalAccess', _34 => _34.get, 'call', _35 => _35(u.id)]), () => ( labels[state]))].filter(Boolean).join(", ");
815
853
  return {
816
854
  id: u.id,
817
855
  name,
@@ -838,7 +876,7 @@ function nearestInDirection(nodes, from, direction) {
838
876
  const d = Math.hypot(dx, dy);
839
877
  if (!best2 || d < best2.d) best2 = { id: n.id, d };
840
878
  }
841
- return _nullishCoalesce(_optionalChain([best2, 'optionalAccess', _27 => _27.id]), () => ( null));
879
+ return _nullishCoalesce(_optionalChain([best2, 'optionalAccess', _36 => _36.id]), () => ( null));
842
880
  }
843
881
  function navigateA11y(nodes, fromId, direction) {
844
882
  const from = nodes.find((n) => n.id === fromId);
@@ -874,10 +912,10 @@ function initialEditGesture() {
874
912
  return { g: initialGestureState, press: null };
875
913
  }
876
914
  function isArmed(state) {
877
- return !!_optionalChain([state, 'access', _28 => _28.press, 'optionalAccess', _29 => _29.armed]) && state.press.movable !== null;
915
+ return !!_optionalChain([state, 'access', _37 => _37.press, 'optionalAccess', _38 => _38.armed]) && state.press.movable !== null;
878
916
  }
879
917
  function isMarqueeArmed(state) {
880
- return !!_optionalChain([state, 'access', _30 => _30.press, 'optionalAccess', _31 => _31.armed]) && !!state.press.marquee;
918
+ return !!_optionalChain([state, 'access', _39 => _39.press, 'optionalAccess', _40 => _40.armed]) && !!state.press.marquee;
881
919
  }
882
920
  var sample = (p) => ({ id: p.id, x: p.x, y: p.y });
883
921
  function reduceEditGesture(state, camera, viewport, input) {
@@ -904,9 +942,9 @@ function reduceEditGesture(state, camera, viewport, input) {
904
942
  if (input.kind === "down") {
905
943
  const r2 = delegate(state.g, { type: "pointerdown", pointer: sample(p) });
906
944
  if (Object.keys(r2.state.pointers).length >= 2) {
907
- const effects2 = _optionalChain([press, 'optionalAccess', _32 => _32.moving]) && press.movable ? [{ type: "moveEnd", elementId: press.movable }] : [];
908
- if (_optionalChain([press, 'optionalAccess', _33 => _33.resize, 'optionalAccess', _34 => _34.active]) && press.elementId) effects2.push({ type: "resizeCancel", elementId: press.elementId });
909
- if (_optionalChain([press, 'optionalAccess', _35 => _35.marquee, 'optionalAccess', _36 => _36.active])) effects2.push({ type: "marqueeCancel" });
945
+ const effects2 = _optionalChain([press, 'optionalAccess', _41 => _41.moving]) && press.movable ? [{ type: "moveEnd", elementId: press.movable }] : [];
946
+ if (_optionalChain([press, 'optionalAccess', _42 => _42.resize, 'optionalAccess', _43 => _43.active]) && press.elementId) effects2.push({ type: "resizeCancel", elementId: press.elementId });
947
+ if (_optionalChain([press, 'optionalAccess', _44 => _44.marquee, 'optionalAccess', _45 => _45.active])) effects2.push({ type: "marqueeCancel" });
910
948
  return {
911
949
  state: {
912
950
  g: r2.state,
@@ -961,9 +999,9 @@ function reduceEditGesture(state, camera, viewport, input) {
961
999
  };
962
1000
  }
963
1001
  if (input.kind === "move") {
964
- if (_optionalChain([press, 'optionalAccess', _37 => _37.marquee]) && Object.keys(state.g.pointers).length === 1) {
1002
+ if (_optionalChain([press, 'optionalAccess', _46 => _46.marquee]) && Object.keys(state.g.pointers).length === 1) {
965
1003
  const { origin } = press.marquee;
966
- const active = press.marquee.active || press.armed || _chunkUWCMN6Q7cjs.distance.call(void 0, origin, p) > TAP_SLOP;
1004
+ const active = press.marquee.active || press.armed || _chunkYLV7JK57cjs.distance.call(void 0, origin, p) > TAP_SLOP;
967
1005
  if (!active) return { state, camera, effects: [] };
968
1006
  return {
969
1007
  state: { g: state.g, press: { ...press, last: { x: p.x, y: p.y }, marquee: { origin, active: true } } },
@@ -971,7 +1009,7 @@ function reduceEditGesture(state, camera, viewport, input) {
971
1009
  effects: [{ type: "marquee", from: screenToWorld(camera, viewport, origin), to: screenToWorld(camera, viewport, p) }]
972
1010
  };
973
1011
  }
974
- if (_optionalChain([press, 'optionalAccess', _38 => _38.resize]) && press.elementId) {
1012
+ if (_optionalChain([press, 'optionalAccess', _47 => _47.resize]) && press.elementId) {
975
1013
  if (Object.keys(state.g.pointers).length !== 1) return { state, camera, effects: [] };
976
1014
  const { corner, from } = press.resize;
977
1015
  return {
@@ -981,7 +1019,7 @@ function reduceEditGesture(state, camera, viewport, input) {
981
1019
  };
982
1020
  }
983
1021
  if (press && press.movable && Object.keys(state.g.pointers).length === 1) {
984
- const dragging = press.pointerType === "touch" ? press.armed : press.moving || _chunkUWCMN6Q7cjs.distance.call(void 0,
1022
+ const dragging = press.pointerType === "touch" ? press.armed : press.moving || _chunkYLV7JK57cjs.distance.call(void 0,
985
1023
  _nullishCoalesce(state.g.origin, () => ( press.last)),
986
1024
  p
987
1025
  ) > TAP_SLOP;
@@ -997,7 +1035,7 @@ function reduceEditGesture(state, camera, viewport, input) {
997
1035
  if (press.pointerType !== "touch") return { state, camera, effects: [] };
998
1036
  }
999
1037
  const r2 = delegate(state.g, { type: "pointermove", pointer: sample(p) });
1000
- const lostPiece = _optionalChain([press, 'optionalAccess', _39 => _39.movable]) && r2.state.moved && !press.moving;
1038
+ const lostPiece = _optionalChain([press, 'optionalAccess', _48 => _48.movable]) && r2.state.moved && !press.moving;
1001
1039
  return {
1002
1040
  state: { g: r2.state, press: press && lostPiece ? { ...press, movable: null } : press },
1003
1041
  camera: r2.camera,
@@ -1007,19 +1045,19 @@ function reduceEditGesture(state, camera, viewport, input) {
1007
1045
  const r = delegate(state.g, { type: input.kind === "up" ? "pointerup" : "pointercancel", pointer: sample(p) });
1008
1046
  const idle = Object.keys(r.state.pointers).length === 0;
1009
1047
  const effects = [];
1010
- if (_optionalChain([press, 'optionalAccess', _40 => _40.resize]) && press.elementId) {
1048
+ if (_optionalChain([press, 'optionalAccess', _49 => _49.resize]) && press.elementId) {
1011
1049
  if (press.resize.active) {
1012
1050
  effects.push({ type: input.kind === "up" ? "resizeEnd" : "resizeCancel", elementId: press.elementId });
1013
1051
  }
1014
1052
  return { state: { g: r.state, press: idle ? null : { ...press, resize: void 0 } }, camera: r.camera, effects };
1015
1053
  }
1016
- if (_optionalChain([press, 'optionalAccess', _41 => _41.marquee, 'optionalAccess', _42 => _42.active])) {
1054
+ if (_optionalChain([press, 'optionalAccess', _50 => _50.marquee, 'optionalAccess', _51 => _51.active])) {
1017
1055
  const from = screenToWorld(camera, viewport, press.marquee.origin);
1018
1056
  const to = screenToWorld(camera, viewport, press.last);
1019
1057
  effects.push(input.kind === "up" ? { type: "marqueeEnd", from, to, additive: !!press.additive } : { type: "marqueeCancel" });
1020
1058
  return { state: { g: r.state, press: idle ? null : { ...press, marquee: void 0, canMarquee: false } }, camera: r.camera, effects };
1021
1059
  }
1022
- if (_optionalChain([press, 'optionalAccess', _43 => _43.moving]) && press.movable) effects.push({ type: "moveEnd", elementId: press.movable });
1060
+ if (_optionalChain([press, 'optionalAccess', _52 => _52.moving]) && press.movable) effects.push({ type: "moveEnd", elementId: press.movable });
1023
1061
  else if (r.tap && press) {
1024
1062
  const world = screenToWorld(camera, viewport, r.tap);
1025
1063
  effects.push(press.additive ? { type: "tap", world, elementId: press.elementId, additive: true } : { type: "tap", world, elementId: press.elementId });
@@ -1152,11 +1190,11 @@ function snapMove(moving, others, threshold, opts = {}) {
1152
1190
  const pick = (axis) => best([...alignCandidates(moving, others, axis, threshold, opts.sheet), ...gapCandidates(moving, others, axis, threshold)]);
1153
1191
  const x = pick("x");
1154
1192
  const y = pick("y");
1155
- const dx = _nullishCoalesce(_optionalChain([x, 'optionalAccess', _44 => _44.delta]), () => ( 0));
1156
- const dy = _nullishCoalesce(_optionalChain([y, 'optionalAccess', _45 => _45.delta]), () => ( 0));
1193
+ const dx = _nullishCoalesce(_optionalChain([x, 'optionalAccess', _53 => _53.delta]), () => ( 0));
1194
+ const dy = _nullishCoalesce(_optionalChain([y, 'optionalAccess', _54 => _54.delta]), () => ( 0));
1157
1195
  const moved = shiftBox(moving, dx, dy);
1158
1196
  const guides = alignmentGuides(moved, others, opts.sheet);
1159
- const gaps = [..._nullishCoalesce(_optionalChain([x, 'optionalAccess', _46 => _46.gaps, 'call', _47 => _47(moved)]), () => ( [])), ..._nullishCoalesce(_optionalChain([y, 'optionalAccess', _48 => _48.gaps, 'call', _49 => _49(moved)]), () => ( []))];
1197
+ const gaps = [..._nullishCoalesce(_optionalChain([x, 'optionalAccess', _55 => _55.gaps, 'call', _56 => _56(moved)]), () => ( [])), ..._nullishCoalesce(_optionalChain([y, 'optionalAccess', _57 => _57.gaps, 'call', _58 => _58(moved)]), () => ( []))];
1160
1198
  return { dx, dy, guides, gaps };
1161
1199
  }
1162
1200
  function snapResize(box, edges, others, threshold, opts = {}) {
@@ -1279,7 +1317,7 @@ function focusBox(layout, units, radii, ref) {
1279
1317
  maxY = Math.max(maxY, u.y + r);
1280
1318
  }
1281
1319
  for (const el of layout.elements) {
1282
- if (el.type !== "zone" || _optionalChain([el, 'access', _50 => _50.placeType, 'optionalAccess', _51 => _51.ref]) !== ref) continue;
1320
+ if (el.type !== "zone" || _optionalChain([el, 'access', _59 => _59.placeType, 'optionalAccess', _60 => _60.ref]) !== ref) continue;
1283
1321
  const b = pieceBounds(el);
1284
1322
  if (!b) continue;
1285
1323
  minX = Math.min(minX, b.minX);
@@ -1345,7 +1383,18 @@ var es = {
1345
1383
  backToMap: "Todo el mapa",
1346
1384
  focusHintSeats: "Toc\xE1 las butacas que quer\xE9s.",
1347
1385
  focusHintPlaces: "Toc\xE1 los lugares que quer\xE9s en cada mesa.",
1348
- focusHintTables: "Toc\xE1 las mesas que quer\xE9s."
1386
+ focusHintTables: "Toc\xE1 las mesas que quer\xE9s.",
1387
+ notForSale: "no est\xE1 a la venta",
1388
+ inviteOnlySeat: "Esa butaca no est\xE1 a la venta",
1389
+ inviteOnlyTable: "Esa mesa no est\xE1 a la venta",
1390
+ inviteOnlyPlace: "Ese lugar no est\xE1 a la venta",
1391
+ inviteOnly: "s\xF3lo con invitaci\xF3n",
1392
+ legendInviteOnly: "S\xF3lo con invitaci\xF3n",
1393
+ statusSold: "vendida",
1394
+ statusCourtesy: "regalada",
1395
+ statusHeld: "apartada",
1396
+ legendCourtesy: "Regalada",
1397
+ legendHeld: "Apartada"
1349
1398
  };
1350
1399
  var en = {
1351
1400
  free: "available",
@@ -1390,7 +1439,18 @@ var en = {
1390
1439
  backToMap: "Whole map",
1391
1440
  focusHintSeats: "Tap the seats you want.",
1392
1441
  focusHintPlaces: "Tap the places you want at each table.",
1393
- focusHintTables: "Tap the tables you want."
1442
+ focusHintTables: "Tap the tables you want.",
1443
+ notForSale: "not for sale",
1444
+ inviteOnlySeat: "That seat is not for sale",
1445
+ inviteOnlyTable: "That table is not for sale",
1446
+ inviteOnlyPlace: "That place is not for sale",
1447
+ inviteOnly: "invitation only",
1448
+ legendInviteOnly: "Invitation only",
1449
+ statusSold: "sold",
1450
+ statusCourtesy: "complimentary",
1451
+ statusHeld: "held",
1452
+ legendCourtesy: "Complimentary",
1453
+ legendHeld: "Held"
1394
1454
  };
1395
1455
  function format(template, vars) {
1396
1456
  return template.replace(
@@ -1476,6 +1536,12 @@ var PICKER_CSS = `
1476
1536
  --vk-landmark:#23232a;
1477
1537
  --vk-landmark-stroke:#34343c;
1478
1538
  --vk-landmark-fg:#d6d6dc;
1539
+ /* Panel de la productora: regalada, apartada y la marca que las distingue sin color. */
1540
+ --vk-courtesy:#7c3aed;
1541
+ --vk-courtesy-fg:#ffffff;
1542
+ --vk-held-for:#f59e0b;
1543
+ --vk-held-for-fg:#0b0b0d;
1544
+ --vk-status-mark:#ffffff;
1479
1545
  }
1480
1546
  .vk-root{display:flex;flex-direction:column;gap:12px;font:var(--vk-font);
1481
1547
  color:var(--vk-fg);background:var(--vk-bg);position:relative;box-sizing:border-box;
@@ -1516,6 +1582,9 @@ var PICKER_CSS = `
1516
1582
  .vk-dot{width:14px;height:14px;border-radius:50%;flex:none;box-sizing:border-box}
1517
1583
  .vk-dot[data-state="selected"]{background:var(--vk-mine);border:3px solid var(--vk-accent)}
1518
1584
  .vk-dot[data-state="taken"]{background:var(--vk-sold);border:1px solid var(--vk-sold-stroke)}
1585
+ .vk-dot[data-state="courtesy"]{background:radial-gradient(circle at 70% 30%,var(--vk-status-mark,#fff) 0 2.5px,transparent 3px),var(--vk-courtesy,#7c3aed);border:1px solid var(--vk-sold-stroke)}
1586
+ .vk-dot[data-state="held-for"]{background:linear-gradient(var(--vk-status-mark,#fff),var(--vk-status-mark,#fff)) 80% 20%/5px 5px no-repeat,var(--vk-held-for,#f59e0b);border:1px solid var(--vk-sold-stroke)}
1587
+ .vk-dot[data-state="invite-only"]{border:2px dashed var(--vk-fg)}
1519
1588
  .vk-cta{border:1px solid var(--vk-accent);background:var(--vk-accent);color:var(--vk-accent-fg);
1520
1589
  border-radius:var(--vk-radius);padding:10px 16px;cursor:pointer;font-size:14px;font-weight:600;min-height:44px}
1521
1590
  .vk-cta:disabled{opacity:.5;cursor:default}
@@ -1560,6 +1629,38 @@ var PICKER_CSS = `
1560
1629
  .vk-type-btn[data-selected="true"]{border-color:var(--vk-accent)}
1561
1630
  `;
1562
1631
 
1632
+ // ../react/src/unit-status.ts
1633
+ var KINDS = ["sold", "courtesy", "held"];
1634
+ function unitMarks(status) {
1635
+ const out = /* @__PURE__ */ new Map();
1636
+ if (!status) return out;
1637
+ for (const [id, s] of Object.entries(status)) {
1638
+ if (s && KINDS.includes(s.kind)) out.set(id, s.kind);
1639
+ }
1640
+ return out;
1641
+ }
1642
+ function presentStatusKinds(marks, units) {
1643
+ const seen = /* @__PURE__ */ new Set();
1644
+ for (const u of units) {
1645
+ const k = marks.get(u.id);
1646
+ if (k) seen.add(k);
1647
+ }
1648
+ return KINDS.filter((k) => seen.has(k));
1649
+ }
1650
+ function statusWord(kind, m) {
1651
+ return kind === "sold" ? m.statusSold : kind === "courtesy" ? m.statusCourtesy : m.statusHeld;
1652
+ }
1653
+ function statusA11y(s, m) {
1654
+ const word = statusWord(s.kind, m);
1655
+ return s.label ? `${word}, ${s.label}` : word;
1656
+ }
1657
+ function statusAnnouncement(unit, s, m) {
1658
+ return `${unitName(unit, m)}: ${s.label || statusWord(s.kind, m)}`;
1659
+ }
1660
+ function blockedInviteOnly(units, allow) {
1661
+ return allow ? [] : units.filter((u) => u.inviteOnly).map((u) => u.id);
1662
+ }
1663
+
1563
1664
  // ../react/src/useImage.ts
1564
1665
 
1565
1666
  function useImage(src) {
@@ -1581,7 +1682,7 @@ function useImage(src) {
1581
1682
  img.onerror = null;
1582
1683
  };
1583
1684
  }, [src]);
1584
- if (!src || _optionalChain([loaded, 'optionalAccess', _52 => _52.src]) !== src) return { image: null, failed: false };
1685
+ if (!src || _optionalChain([loaded, 'optionalAccess', _61 => _61.src]) !== src) return { image: null, failed: false };
1585
1686
  return { image: loaded.image, failed: loaded.failed };
1586
1687
  }
1587
1688
 
@@ -1668,7 +1769,8 @@ function VenueCanvas(props) {
1668
1769
  unassignedLabel: messages.unassigned,
1669
1770
  ...props.dimmedRefs ? { dimmedRefs: props.dimmedRefs } : {},
1670
1771
  ...props.placeTypePrices ? { placeTypePrices: props.placeTypePrices } : {},
1671
- ...props.highlightRefs ? { highlightRefs: props.highlightRefs } : {}
1772
+ ...props.highlightRefs ? { highlightRefs: props.highlightRefs } : {},
1773
+ ...props.unitMarks ? { unitMarks: props.unitMarks } : {}
1672
1774
  }),
1673
1775
  [
1674
1776
  layout,
@@ -1683,6 +1785,7 @@ function VenueCanvas(props) {
1683
1785
  props.dimmedRefs,
1684
1786
  props.placeTypePrices,
1685
1787
  props.highlightRefs,
1788
+ props.unitMarks,
1686
1789
  messages.unassigned
1687
1790
  ]
1688
1791
  );
@@ -1761,9 +1864,9 @@ function VenueCanvas(props) {
1761
1864
  _react.useEffect.call(void 0, () => {
1762
1865
  const id = pendingFocus.current;
1763
1866
  if (!id) return;
1764
- const button = _optionalChain([wrapRef, 'access', _53 => _53.current, 'optionalAccess', _54 => _54.querySelector, 'call', _55 => _55(`[data-unit-id="${id}"]`)]);
1867
+ const button = _optionalChain([wrapRef, 'access', _62 => _62.current, 'optionalAccess', _63 => _63.querySelector, 'call', _64 => _64(`[data-unit-id="${id}"]`)]);
1765
1868
  pendingFocus.current = null;
1766
- _optionalChain([(_nullishCoalesce(button, () => ( chooseRef.current))), 'optionalAccess', _56 => _56.focus, 'call', _57 => _57()]);
1869
+ _optionalChain([(_nullishCoalesce(button, () => ( chooseRef.current))), 'optionalAccess', _65 => _65.focus, 'call', _66 => _66()]);
1767
1870
  }, [visibleNodes]);
1768
1871
  const send = (input) => {
1769
1872
  const result = reduceGesture(gesture.current, camera, viewport, input);
@@ -1772,11 +1875,12 @@ function VenueCanvas(props) {
1772
1875
  if (!result.tap) return;
1773
1876
  const unitId = hitUnit({ index, camera, viewport, screenPoint: result.tap, units, radii: props.radii });
1774
1877
  if (!unitId) {
1775
- _optionalChain([props, 'access', _58 => _58.onTapEmpty, 'optionalCall', _59 => _59(result.tap)]);
1878
+ _optionalChain([props, 'access', _67 => _67.onTapEmpty, 'optionalCall', _68 => _68(result.tap)]);
1776
1879
  return;
1777
1880
  }
1778
1881
  const unit = unitById.get(unitId);
1779
- if (unit && props.focusRef !== null && unit.placeTypeRef === props.focusRef) {
1882
+ const choosable = unit && unit.placeTypeRef !== null && (props.focusRef !== null && unit.placeTypeRef === props.focusRef || !!_optionalChain([props, 'access', _69 => _69.selectableRefs, 'optionalAccess', _70 => _70.has, 'call', _71 => _71(unit.placeTypeRef)]));
1883
+ if (unit && choosable) {
1780
1884
  const closer = tapZoom(camera, viewport, result.tap, (_nullishCoalesce(props.radii.get(unit.elementId), () => ( DEFAULT_UNIT_RADIUS))) * camera.zoom);
1781
1885
  if (closer) {
1782
1886
  props.onCameraChange(closer);
@@ -1808,12 +1912,12 @@ function VenueCanvas(props) {
1808
1912
  const node = a11yNodes.find((n) => n.id === next);
1809
1913
  if (node) props.onCameraChange({ ...camera, x: node.x, y: node.y });
1810
1914
  } else {
1811
- _optionalChain([wrapRef, 'access', _60 => _60.current, 'optionalAccess', _61 => _61.querySelector, 'call', _62 => _62(`[data-unit-id="${next}"]`), 'optionalAccess', _63 => _63.focus, 'call', _64 => _64()]);
1915
+ _optionalChain([wrapRef, 'access', _72 => _72.current, 'optionalAccess', _73 => _73.querySelector, 'call', _74 => _74(`[data-unit-id="${next}"]`), 'optionalAccess', _75 => _75.focus, 'call', _76 => _76()]);
1812
1916
  pendingFocus.current = null;
1813
1917
  }
1814
1918
  };
1815
1919
  const zoomButton = (factor) => () => props.onCameraChange(zoomAt(camera, viewport, { x: viewport.width / 2, y: viewport.height / 2 }, factor));
1816
- const tabbableId = _nullishCoalesce((activeId !== null && visible.has(activeId) ? activeId : _optionalChain([visibleNodes, 'access', _65 => _65[0], 'optionalAccess', _66 => _66.id])), () => ( null));
1920
+ const tabbableId = _nullishCoalesce((activeId !== null && visible.has(activeId) ? activeId : _optionalChain([visibleNodes, 'access', _77 => _77[0], 'optionalAccess', _78 => _78.id])), () => ( null));
1817
1921
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1818
1922
  "div",
1819
1923
  {
@@ -1879,7 +1983,7 @@ function VenueCanvas(props) {
1879
1983
  var NONE = [];
1880
1984
  var EMPTY_SET = /* @__PURE__ */ new Set();
1881
1985
  function byKind(u, seat, table, place) {
1882
- return _optionalChain([u, 'optionalAccess', _67 => _67.kind]) === "table" ? table : _optionalChain([u, 'optionalAccess', _68 => _68.kind]) === "place" ? place : seat;
1986
+ return _optionalChain([u, 'optionalAccess', _79 => _79.kind]) === "table" ? table : _optionalChain([u, 'optionalAccess', _80 => _80.kind]) === "place" ? place : seat;
1883
1987
  }
1884
1988
  function a11yLabel(u, m) {
1885
1989
  const table = format(m.summaryTable, { table: _nullishCoalesce(u.table, () => ( u.label)) });
@@ -1889,13 +1993,13 @@ function a11yLabel(u, m) {
1889
1993
  }
1890
1994
  function SeatMap(props) {
1891
1995
  const { layout, focusRef, selection, onSelectionChange } = props;
1892
- const maxSelection = _nullishCoalesce(props.maxSelection, () => ( _chunkUWCMN6Q7cjs.DEFAULT_MAX_SELECTION));
1996
+ const maxSelection = _nullishCoalesce(props.maxSelection, () => ( _chunkYLV7JK57cjs.DEFAULT_MAX_SELECTION));
1893
1997
  const messages = _react.useMemo.call(void 0,
1894
1998
  () => mergeMessages({ ...props.messages, ...props.continueLabel ? { continueLabel: props.continueLabel } : {} }),
1895
1999
  [props.messages, props.continueLabel]
1896
2000
  );
1897
- const units = _react.useMemo.call(void 0, () => _chunkUWCMN6Q7cjs.expand.call(void 0, layout), [layout]);
1898
- const index = _react.useMemo.call(void 0, () => new (0, _chunkUWCMN6Q7cjs.SpatialIndex)(units), [units]);
2001
+ const units = _react.useMemo.call(void 0, () => _chunkYLV7JK57cjs.expand.call(void 0, layout), [layout]);
2002
+ const index = _react.useMemo.call(void 0, () => new (0, _chunkYLV7JK57cjs.SpatialIndex)(units), [units]);
1899
2003
  const radii = _react.useMemo.call(void 0, () => unitRadii(layout), [layout]);
1900
2004
  const unitById = _react.useMemo.call(void 0, () => new Map(units.map((u) => [u.id, u])), [units]);
1901
2005
  const placeTypeColors = _react.useMemo.call(void 0, () => new Map(props.placeTypes.map((p) => [p.ref, p.color])), [props.placeTypes]);
@@ -1928,24 +2032,43 @@ function SeatMap(props) {
1928
2032
  const first = unitById.get(ids[0]);
1929
2033
  announce(byKind(first, messages.conflictSeat, messages.conflictTable, messages.conflictPlace), true);
1930
2034
  }, [props.conflictUnitIds, unitById, messages, announce]);
2035
+ const marks = _react.useMemo.call(void 0, () => unitMarks(props.unitStatus), [props.unitStatus]);
2036
+ const allowInviteOnly = props.allowInviteOnly === true;
2037
+ const blocked = _react.useMemo.call(void 0, () => new Set(blockedInviteOnly(units, allowInviteOnly)), [units, allowInviteOnly]);
1931
2038
  const taken = _react.useMemo.call(void 0,
1932
- () => /* @__PURE__ */ new Set([...props.takenUnitIds, ...conflicted]),
1933
- [props.takenUnitIds, conflicted]
2039
+ () => /* @__PURE__ */ new Set([...props.takenUnitIds, ...conflicted, ...marks.keys(), ...blocked]),
2040
+ [props.takenUnitIds, conflicted, marks, blocked]
1934
2041
  );
1935
2042
  const held = _react.useMemo.call(void 0, () => new Set(_nullishCoalesce(props.heldUnitIds, () => ( NONE))), [props.heldUnitIds]);
1936
- const states = _react.useMemo.call(void 0, () => _chunkUWCMN6Q7cjs.unitStates.call(void 0, units, taken, selection, held), [units, taken, selection, held]);
1937
- const selectable = _react.useMemo.call(void 0, () => units.filter((u) => u.placeTypeRef === focusRef), [units, focusRef]);
2043
+ const states = _react.useMemo.call(void 0, () => _chunkYLV7JK57cjs.unitStates.call(void 0, units, taken, selection, held), [units, taken, selection, held]);
2044
+ const multiType = props.multiType === true;
2045
+ const selectableRefs = _react.useMemo.call(void 0, () => multiType ? new Set(placeTypeNames.keys()) : void 0, [multiType, placeTypeNames]);
2046
+ const selectable = _react.useMemo.call(void 0,
2047
+ () => units.filter((u) => selectableRefs ? u.placeTypeRef !== null && selectableRefs.has(u.placeTypeRef) : u.placeTypeRef === focusRef),
2048
+ [units, focusRef, selectableRefs]
2049
+ );
2050
+ const stateWords = _react.useMemo.call(void 0, () => {
2051
+ const out = /* @__PURE__ */ new Map();
2052
+ for (const u of selectable) {
2053
+ const s = _optionalChain([props, 'access', _81 => _81.unitStatus, 'optionalAccess', _82 => _82[u.id]]);
2054
+ if (s && marks.has(u.id)) out.set(u.id, statusA11y(s, messages));
2055
+ else if (blocked.has(u.id)) out.set(u.id, messages.notForSale);
2056
+ else if (u.inviteOnly && states.get(u.id) === "free") out.set(u.id, `${messages.free}, ${messages.inviteOnly}`);
2057
+ }
2058
+ return out;
2059
+ }, [selectable, props.unitStatus, marks, blocked, states, messages]);
1938
2060
  const a11yNodes = _react.useMemo.call(void 0,
1939
2061
  () => buildA11yNodes(
1940
2062
  selectable.map((u) => u.kind === "seat" ? u : { ...u, label: a11yLabel(u, messages) }),
1941
2063
  states,
1942
2064
  placeTypeNames,
1943
- { free: messages.free, taken: messages.taken, selected: messages.selected, held: messages.held, row: messages.row, seat: messages.seat }
2065
+ { free: messages.free, taken: messages.taken, selected: messages.selected, held: messages.held, row: messages.row, seat: messages.seat },
2066
+ stateWords
1944
2067
  ),
1945
- [selectable, states, placeTypeNames, messages]
2068
+ [selectable, states, placeTypeNames, messages, stateWords]
1946
2069
  );
1947
2070
  const bg = layout.meta.background;
1948
- const background = useImage(_nullishCoalesce(_optionalChain([bg, 'optionalAccess', _69 => _69.src]), () => ( null)));
2071
+ const background = useImage(_nullishCoalesce(_optionalChain([bg, 'optionalAccess', _83 => _83.src]), () => ( null)));
1949
2072
  const images = _react.useMemo.call(void 0,
1950
2073
  () => new Map(bg && background.image ? [[bg.src, background.image]] : []),
1951
2074
  [bg, background.image]
@@ -1956,7 +2079,7 @@ function SeatMap(props) {
1956
2079
  const framedFor = _react.useRef.call(void 0, null);
1957
2080
  _react.useEffect.call(void 0, () => {
1958
2081
  if (viewport.width === 0 || viewport.height === 0) return;
1959
- if (_optionalChain([framedFor, 'access', _70 => _70.current, 'optionalAccess', _71 => _71.layout]) === layout && framedFor.current.focusRef === focusRef) return;
2082
+ if (_optionalChain([framedFor, 'access', _84 => _84.current, 'optionalAccess', _85 => _85.layout]) === layout && framedFor.current.focusRef === focusRef) return;
1960
2083
  framedFor.current = { layout, focusRef };
1961
2084
  const box = _nullishCoalesce(focusBox(layout, units, radii, focusRef), () => ( { minX: 0, minY: 0, maxX: layout.meta.width, maxY: layout.meta.height }));
1962
2085
  setCamera(fitBox(box, viewport, props.embedded ? 16 : 24));
@@ -1974,20 +2097,30 @@ function SeatMap(props) {
1974
2097
  const onTapEmpty = _react.useCallback.call(void 0, (screen) => {
1975
2098
  const el = elementAt(layout, screen, cameraRef.current, viewportRef.current);
1976
2099
  if (!el || el.type === "landmark") return;
1977
- switchTo(_optionalChain([el, 'access', _72 => _72.placeType, 'optionalAccess', _73 => _73.ref]) || null);
2100
+ switchTo(_optionalChain([el, 'access', _86 => _86.placeType, 'optionalAccess', _87 => _87.ref]) || null);
1978
2101
  }, [layout, switchTo]);
1979
2102
  const activateUnit = _react.useCallback.call(void 0, (unitId) => {
1980
2103
  const unit = unitById.get(unitId);
1981
2104
  if (!unit) return;
1982
- if (unit.placeTypeRef !== focusRef) {
2105
+ const ownType = unit.placeTypeRef === focusRef || !!selectableRefs && unit.placeTypeRef !== null && selectableRefs.has(unit.placeTypeRef);
2106
+ if (!ownType) {
1983
2107
  switchTo(unit.placeTypeRef);
1984
2108
  return;
1985
2109
  }
2110
+ const status = _optionalChain([props, 'access', _88 => _88.unitStatus, 'optionalAccess', _89 => _89[unitId]]);
2111
+ if (status && marks.has(unitId) && !selection.includes(unitId)) {
2112
+ announce(statusAnnouncement(unit, status, messages), true);
2113
+ return;
2114
+ }
2115
+ if (blocked.has(unitId) && !selection.includes(unitId)) {
2116
+ announce(byKind(unit, messages.inviteOnlySeat, messages.inviteOnlyTable, messages.inviteOnlyPlace), true);
2117
+ return;
2118
+ }
1986
2119
  if (states.get(unitId) === "held" && !selection.includes(unitId)) {
1987
2120
  announce(messages.heldSeat, true);
1988
2121
  return;
1989
2122
  }
1990
- const result = _chunkUWCMN6Q7cjs.toggleUnit.call(void 0, selection, unitId, states, maxSelection);
2123
+ const result = _chunkYLV7JK57cjs.toggleUnit.call(void 0, selection, unitId, states, maxSelection);
1991
2124
  if (result.rejected === "taken") {
1992
2125
  announce(byKind(unit, messages.takenSeat, messages.takenTable, messages.takenPlace), true);
1993
2126
  return;
@@ -1999,13 +2132,29 @@ function SeatMap(props) {
1999
2132
  const added = result.selection.includes(unitId);
2000
2133
  announce(`${unitName(unit, messages)}: ${added ? messages.selected : messages.free}`);
2001
2134
  onSelectionChange(result.selection);
2002
- }, [unitById, focusRef, states, selection, maxSelection, messages, announce, onSelectionChange, switchTo]);
2135
+ }, [
2136
+ unitById,
2137
+ focusRef,
2138
+ selectableRefs,
2139
+ props.unitStatus,
2140
+ marks,
2141
+ blocked,
2142
+ states,
2143
+ selection,
2144
+ maxSelection,
2145
+ messages,
2146
+ announce,
2147
+ onSelectionChange,
2148
+ switchTo
2149
+ ]);
2003
2150
  const summary = _react.useMemo.call(void 0, () => selectionSummary(units, selection, messages), [units, selection, messages]);
2004
2151
  const focusColor = _nullishCoalesce(placeTypeColors.get(focusRef), () => ( "var(--vk-unassigned)"));
2005
2152
  const focusType = props.placeTypes.find((p) => p.ref === focusRef);
2006
2153
  const embedded = props.embedded === true;
2007
2154
  const kind = _react.useMemo.call(void 0, () => focusKind(units, focusRef), [units, focusRef]);
2008
2155
  const hint = kind === "seat" ? messages.focusHintSeats : kind === "place" ? messages.focusHintPlaces : messages.focusHintTables;
2156
+ const statusKinds = _react.useMemo.call(void 0, () => presentStatusKinds(marks, units), [marks, units]);
2157
+ const showInviteOnly = _react.useMemo.call(void 0, () => allowInviteOnly && units.some((u) => u.inviteOnly && !marks.has(u.id)), [allowInviteOnly, units, marks]);
2009
2158
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2010
2159
  "div",
2011
2160
  {
@@ -2047,7 +2196,9 @@ function SeatMap(props) {
2047
2196
  onActivateUnit: activateUnit,
2048
2197
  messages,
2049
2198
  placeTypeColors,
2050
- focusRef,
2199
+ focusRef: multiType ? null : focusRef,
2200
+ ...selectableRefs ? { selectableRefs } : {},
2201
+ ...marks.size > 0 ? { unitMarks: marks } : {},
2051
2202
  onTapEmpty,
2052
2203
  placeTypePrices,
2053
2204
  ...props.height !== void 0 ? { height: props.height } : {},
@@ -2068,7 +2219,19 @@ function SeatMap(props) {
2068
2219
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "li", { children: [
2069
2220
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "vk-dot", "data-state": "taken" }),
2070
2221
  messages.legendTaken
2071
- ] })
2222
+ ] }),
2223
+ statusKinds.includes("courtesy") ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "li", { children: [
2224
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "vk-dot", "data-state": "courtesy" }),
2225
+ messages.legendCourtesy
2226
+ ] }) : null,
2227
+ statusKinds.includes("held") ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "li", { children: [
2228
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "vk-dot", "data-state": "held-for" }),
2229
+ messages.legendHeld
2230
+ ] }) : null,
2231
+ showInviteOnly ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "li", { children: [
2232
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "vk-dot", "data-state": "invite-only", style: { background: focusColor } }),
2233
+ messages.legendInviteOnly
2234
+ ] }) : null
2072
2235
  ] }),
2073
2236
  announcement.blocking && announcement.text ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "vk-notice", "data-testid": "notice", children: announcement.text }) : null,
2074
2237
  embedded ? null : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-bar", "data-testid": "summary-bar", children: [
@@ -2100,7 +2263,7 @@ function overviewBox(layout, radii) {
2100
2263
  for (const el of layout.elements) {
2101
2264
  const b = elementBounds(layout, el);
2102
2265
  if (!b) continue;
2103
- const r = el.type === "seatBlock" || el.type === "table" ? _nullishCoalesce(_optionalChain([radii, 'optionalAccess', _74 => _74.get, 'call', _75 => _75(el.id)]), () => ( 0)) : 0;
2266
+ const r = el.type === "seatBlock" || el.type === "table" ? _nullishCoalesce(_optionalChain([radii, 'optionalAccess', _90 => _90.get, 'call', _91 => _91(el.id)]), () => ( 0)) : 0;
2104
2267
  box = box ? {
2105
2268
  minX: Math.min(box.minX, b.minX - r),
2106
2269
  minY: Math.min(box.minY, b.minY - r),
@@ -2122,8 +2285,8 @@ var NO_NODES = [];
2122
2285
  function VenueOverview(props) {
2123
2286
  const { layout, placeTypes, onSelect } = props;
2124
2287
  const messages = _react.useMemo.call(void 0, () => mergeMessages(props.messages), [props.messages]);
2125
- const units = _react.useMemo.call(void 0, () => _chunkUWCMN6Q7cjs.expand.call(void 0, layout), [layout]);
2126
- const index = _react.useMemo.call(void 0, () => new (0, _chunkUWCMN6Q7cjs.SpatialIndex)(units), [units]);
2288
+ const units = _react.useMemo.call(void 0, () => _chunkYLV7JK57cjs.expand.call(void 0, layout), [layout]);
2289
+ const index = _react.useMemo.call(void 0, () => new (0, _chunkYLV7JK57cjs.SpatialIndex)(units), [units]);
2127
2290
  const radii = _react.useMemo.call(void 0, () => unitRadii(layout), [layout]);
2128
2291
  const unitById = _react.useMemo.call(void 0, () => new Map(units.map((u) => [u.id, u])), [units]);
2129
2292
  const placeTypeColors = _react.useMemo.call(void 0, () => new Map(placeTypes.map((p) => [p.ref, p.color])), [placeTypes]);
@@ -2139,9 +2302,11 @@ function VenueOverview(props) {
2139
2302
  const highlightRefs = _react.useMemo.call(void 0, () => new Set(selectedRefs), [selectedRefs]);
2140
2303
  const takenIds = _nullishCoalesce(props.takenUnitIds, () => ( NONE2));
2141
2304
  const selectedIds = _nullishCoalesce(props.selectedUnitIds, () => ( NONE2));
2305
+ const marks = _react.useMemo.call(void 0, () => unitMarks(props.unitStatus), [props.unitStatus]);
2306
+ const allowInviteOnly = props.allowInviteOnly === true;
2142
2307
  const states = _react.useMemo.call(void 0,
2143
- () => _chunkUWCMN6Q7cjs.unitStates.call(void 0, units, new Set(takenIds), selectedIds, NO_HELD),
2144
- [units, takenIds, selectedIds]
2308
+ () => _chunkYLV7JK57cjs.unitStates.call(void 0, units, /* @__PURE__ */ new Set([...takenIds, ...blockedInviteOnly(units, allowInviteOnly)]), selectedIds, NO_HELD),
2309
+ [units, takenIds, selectedIds, allowInviteOnly]
2145
2310
  );
2146
2311
  const hideList = props.hideList === true;
2147
2312
  const canvasMessages = _react.useMemo.call(void 0,
@@ -2153,12 +2318,12 @@ function VenueOverview(props) {
2153
2318
  const tap = overviewTap(ref, placeTypes);
2154
2319
  if (tap.kind === "select") onSelect(tap.ref);
2155
2320
  else if (tap.kind === "soldOut") {
2156
- const name = _nullishCoalesce(_optionalChain([placeTypes, 'access', _76 => _76.find, 'call', _77 => _77((p) => p.ref === tap.ref), 'optionalAccess', _78 => _78.label]), () => ( ""));
2321
+ const name = _nullishCoalesce(_optionalChain([placeTypes, 'access', _92 => _92.find, 'call', _93 => _93((p) => p.ref === tap.ref), 'optionalAccess', _94 => _94.label]), () => ( ""));
2157
2322
  setNotice((n) => ({ text: format(messages.soldOutNotice, { name }), seq: n.seq + 1 }));
2158
2323
  }
2159
2324
  }, [placeTypes, onSelect, messages]);
2160
2325
  const bg = layout.meta.background;
2161
- const background = useImage(_nullishCoalesce(_optionalChain([bg, 'optionalAccess', _79 => _79.src]), () => ( null)));
2326
+ const background = useImage(_nullishCoalesce(_optionalChain([bg, 'optionalAccess', _95 => _95.src]), () => ( null)));
2162
2327
  const images = _react.useMemo.call(void 0,
2163
2328
  () => new Map(bg && background.image ? [[bg.src, background.image]] : []),
2164
2329
  [bg, background.image]
@@ -2185,7 +2350,7 @@ function VenueOverview(props) {
2185
2350
  const onTapEmpty = _react.useCallback.call(void 0, (screen) => {
2186
2351
  const el = elementAt(layout, screen, cameraRef.current, viewportRef.current);
2187
2352
  if (!el || el.type === "landmark") return;
2188
- choose(_optionalChain([el, 'access', _80 => _80.placeType, 'optionalAccess', _81 => _81.ref]) || null);
2353
+ choose(_optionalChain([el, 'access', _96 => _96.placeType, 'optionalAccess', _97 => _97.ref]) || null);
2189
2354
  }, [layout, choose]);
2190
2355
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2191
2356
  "div",
@@ -2210,7 +2375,7 @@ function VenueOverview(props) {
2210
2375
  onCameraChange: setCamera,
2211
2376
  viewport,
2212
2377
  onViewportChange: setViewport,
2213
- onActivateUnit: (id) => choose(_nullishCoalesce(_optionalChain([unitById, 'access', _82 => _82.get, 'call', _83 => _83(id), 'optionalAccess', _84 => _84.placeTypeRef]), () => ( null))),
2378
+ onActivateUnit: (id) => choose(_nullishCoalesce(_optionalChain([unitById, 'access', _98 => _98.get, 'call', _99 => _99(id), 'optionalAccess', _100 => _100.placeTypeRef]), () => ( null))),
2214
2379
  onTapEmpty,
2215
2380
  messages: canvasMessages,
2216
2381
  placeTypeColors,
@@ -2218,6 +2383,7 @@ function VenueOverview(props) {
2218
2383
  dimmedRefs,
2219
2384
  placeTypePrices,
2220
2385
  highlightRefs,
2386
+ ...marks.size > 0 ? { unitMarks: marks } : {},
2221
2387
  ...props.height !== void 0 ? { height: props.height } : {},
2222
2388
  ratio: contentRatio,
2223
2389
  cooperative: true,
@@ -2305,9 +2471,9 @@ function withWorldSize(el, axis, size) {
2305
2471
  const swap = el.transform.rotation === 90 || el.transform.rotation === 270;
2306
2472
  const field = axis === "x" !== swap ? "width" : "height";
2307
2473
  if (el.type === "zone" && (_nullishCoalesce(el.curve, () => ( 0))) > 0) {
2308
- const now = _chunkUWCMN6Q7cjs.zoneLocalSize.call(void 0, el);
2474
+ const now = _chunkYLV7JK57cjs.zoneLocalSize.call(void 0, el);
2309
2475
  if (Math.abs(now[field] - size) < 1e-6) return el;
2310
- const next = _chunkUWCMN6Q7cjs.zoneWithLocalSize.call(void 0, el, field === "width" ? size : now.width, field === "height" ? size : now.height);
2476
+ const next = _chunkYLV7JK57cjs.zoneWithLocalSize.call(void 0, el, field === "width" ? size : now.width, field === "height" ? size : now.height);
2311
2477
  return { ...next, width: Math.round(next.width), height: Math.round(next.height) };
2312
2478
  }
2313
2479
  return el[field] === size ? el : { ...el, [field]: size };
@@ -2333,7 +2499,7 @@ function arrangeCommands(layout, ids, action) {
2333
2499
  const scale = _nullishCoalesce(model.el.scale, () => ( 1));
2334
2500
  return scaled.slice(1).flatMap(({ el }) => {
2335
2501
  const piece = el;
2336
- return (_nullishCoalesce(piece.scale, () => ( 1))) === scale ? [] : [{ type: "replaceElement", element: _chunkUWCMN6Q7cjs.scalePiece.call(void 0, piece, scale) }];
2502
+ return (_nullishCoalesce(piece.scale, () => ( 1))) === scale ? [] : [{ type: "replaceElement", element: _chunkYLV7JK57cjs.scalePiece.call(void 0, piece, scale) }];
2337
2503
  });
2338
2504
  }
2339
2505
  const shifts = action === "distributeX" ? distributeBoxes(boxes, "x") : action === "distributeY" ? distributeBoxes(boxes, "y") : alignBoxes(boxes, action);
@@ -2490,7 +2656,7 @@ function splitUnits(units, changed) {
2490
2656
  const still = [];
2491
2657
  const moving = [];
2492
2658
  for (const u of units) (changed.has(u.elementId) ? moving : still).push(u);
2493
- return { changed, still, stillIndex: new (0, _chunkUWCMN6Q7cjs.SpatialIndex)(still), moving, movingIndex: new (0, _chunkUWCMN6Q7cjs.SpatialIndex)(moving) };
2659
+ return { changed, still, stillIndex: new (0, _chunkYLV7JK57cjs.SpatialIndex)(still), moving, movingIndex: new (0, _chunkYLV7JK57cjs.SpatialIndex)(moving) };
2494
2660
  }
2495
2661
  function boxesOf(layout) {
2496
2662
  const out = /* @__PURE__ */ new Map();
@@ -2526,21 +2692,21 @@ function previewFrame(base, split, baseBoxes, preview) {
2526
2692
  }
2527
2693
  const { element } = preview;
2528
2694
  const layout = { ...base, elements: base.elements.map((el) => el.id === element.id ? element : el) };
2529
- const own = _chunkUWCMN6Q7cjs.expand.call(void 0, { ...base, elements: [element] });
2695
+ const own = _chunkYLV7JK57cjs.expand.call(void 0, { ...base, elements: [element] });
2530
2696
  const b = pieceBounds(element);
2531
2697
  if (b) boxes.set(element.id, b);
2532
2698
  else boxes.delete(element.id);
2533
- return { layout, units: split.still.concat(own), index: joined(split.stillIndex, new (0, _chunkUWCMN6Q7cjs.SpatialIndex)(own), 0, 0), boxes };
2699
+ return { layout, units: split.still.concat(own), index: joined(split.stillIndex, new (0, _chunkYLV7JK57cjs.SpatialIndex)(own), 0, 0), boxes };
2534
2700
  }
2535
2701
 
2536
2702
  // ../react/src/designer/sizing.ts
2537
2703
  var SIZE_STEP = 0.1;
2538
2704
  var KEY_RESIZE_STEP = 20;
2539
2705
  function steppedScale(scale, direction) {
2540
- return _chunkUWCMN6Q7cjs.snapScale.call(void 0, scale + direction * SIZE_STEP);
2706
+ return _chunkYLV7JK57cjs.snapScale.call(void 0, scale + direction * SIZE_STEP);
2541
2707
  }
2542
2708
  function keyboardResize(el, corner, direction) {
2543
- if (el.type === "seatBlock" || el.type === "table") return _chunkUWCMN6Q7cjs.scalePiece.call(void 0, el, steppedScale(_nullishCoalesce(el.scale, () => ( 1)), direction));
2709
+ if (el.type === "seatBlock" || el.type === "table") return _chunkYLV7JK57cjs.scalePiece.call(void 0, el, steppedScale(_nullishCoalesce(el.scale, () => ( 1)), direction));
2544
2710
  const box = pieceBounds(el);
2545
2711
  if (!box) return el;
2546
2712
  const from = cornerPoint(box, corner);
@@ -2574,29 +2740,29 @@ function frame(layout, viewport) {
2574
2740
  function pieceName(el, placeTypes, m) {
2575
2741
  if (el.type === "landmark") return el.name;
2576
2742
  if (el.type === "zone") {
2577
- const ref2 = _optionalChain([el, 'access', _85 => _85.placeType, 'optionalAccess', _86 => _86.ref]) || null;
2578
- return _nullishCoalesce((ref2 ? _optionalChain([placeTypes, 'access', _87 => _87.find, 'call', _88 => _88((p) => p.ref === ref2), 'optionalAccess', _89 => _89.label]) : void 0), () => ( m.unassigned));
2743
+ const ref2 = _optionalChain([el, 'access', _101 => _101.placeType, 'optionalAccess', _102 => _102.ref]) || null;
2744
+ return _nullishCoalesce((ref2 ? _optionalChain([placeTypes, 'access', _103 => _103.find, 'call', _104 => _104((p) => p.ref === ref2), 'optionalAccess', _105 => _105.label]) : void 0), () => ( m.unassigned));
2579
2745
  }
2580
2746
  const own = el.type === "seatBlock" ? (() => {
2581
- const rows = _chunkUWCMN6Q7cjs.expandLabels.call(void 0, el.rowLabels, el.rows);
2747
+ const rows = _chunkYLV7JK57cjs.expandLabels.call(void 0, el.rowLabels, el.rows);
2582
2748
  return format(m.pieceBlockName, { from: _nullishCoalesce(rows[0], () => ( "")), to: _nullishCoalesce(rows[rows.length - 1], () => ( "")) });
2583
2749
  })() : format(m.pieceTableName, { label: el.label });
2584
- const ref = _optionalChain([el, 'access', _90 => _90.placeType, 'optionalAccess', _91 => _91.ref]) || null;
2585
- const type = ref ? _optionalChain([placeTypes, 'access', _92 => _92.find, 'call', _93 => _93((p) => p.ref === ref), 'optionalAccess', _94 => _94.label]) : void 0;
2750
+ const ref = _optionalChain([el, 'access', _106 => _106.placeType, 'optionalAccess', _107 => _107.ref]) || null;
2751
+ const type = ref ? _optionalChain([placeTypes, 'access', _108 => _108.find, 'call', _109 => _109((p) => p.ref === ref), 'optionalAccess', _110 => _110.label]) : void 0;
2586
2752
  return `${own}, ${_nullishCoalesce(type, () => ( m.unassigned))}`;
2587
2753
  }
2588
2754
  function fullBlock(layout, id) {
2589
2755
  const el = id ? layout.elements.find((e) => e.id === id) : void 0;
2590
- return _optionalChain([el, 'optionalAccess', _95 => _95.type]) === "seatBlock" ? _chunkUWCMN6Q7cjs.expandSeatBlock.call(void 0, { ...el, removed: [] }) : [];
2756
+ return _optionalChain([el, 'optionalAccess', _111 => _111.type]) === "seatBlock" ? _chunkYLV7JK57cjs.expandSeatBlock.call(void 0, { ...el, removed: [] }) : [];
2591
2757
  }
2592
2758
  var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ designer, placeTypes, lockedUnitIds, messages, frameKey, onPieceTap, backgroundImage = null, compact = false, overlay, theme }, ref) {
2593
2759
  const { ui } = designer;
2594
2760
  const [preview, setPreview] = _react.useState.call(void 0, null);
2595
2761
  const resizingRef = _react.useRef.call(void 0, null);
2596
- const resizing = _optionalChain([preview, 'optionalAccess', _96 => _96.kind]) === "replace" ? preview.element : null;
2762
+ const resizing = _optionalChain([preview, 'optionalAccess', _112 => _112.kind]) === "replace" ? preview.element : null;
2597
2763
  const base = designer.layout;
2598
- const baseUnits = _react.useMemo.call(void 0, () => _chunkUWCMN6Q7cjs.expand.call(void 0, base), [base]);
2599
- const baseIndex = _react.useMemo.call(void 0, () => new (0, _chunkUWCMN6Q7cjs.SpatialIndex)(baseUnits), [baseUnits]);
2764
+ const baseUnits = _react.useMemo.call(void 0, () => _chunkYLV7JK57cjs.expand.call(void 0, base), [base]);
2765
+ const baseIndex = _react.useMemo.call(void 0, () => new (0, _chunkYLV7JK57cjs.SpatialIndex)(baseUnits), [baseUnits]);
2600
2766
  const baseBoxes = _react.useMemo.call(void 0, () => boxesOf(base), [base]);
2601
2767
  const changedKey = preview ? changedIds(preview).join("\0") : "";
2602
2768
  const split = _react.useMemo.call(void 0, () => changedKey ? splitUnits(baseUnits, new Set(changedKey.split("\0"))) : null, [baseUnits, changedKey]);
@@ -2635,7 +2801,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
2635
2801
  );
2636
2802
  const placeTypeColors = _react.useMemo.call(void 0, () => new Map(placeTypes.map((p) => [p.ref, p.color])), [placeTypes]);
2637
2803
  const seatEditUnits = _react.useMemo.call(void 0, () => fullBlock(base, ui.seatEditId), [base, ui.seatEditId]);
2638
- const seatEditIndex = _react.useMemo.call(void 0, () => new (0, _chunkUWCMN6Q7cjs.SpatialIndex)(seatEditUnits), [seatEditUnits]);
2804
+ const seatEditIndex = _react.useMemo.call(void 0, () => new (0, _chunkYLV7JK57cjs.SpatialIndex)(seatEditUnits), [seatEditUnits]);
2639
2805
  const seatEditById = _react.useMemo.call(void 0, () => new Map(seatEditUnits.map((u) => [u.id, u])), [seatEditUnits]);
2640
2806
  const elementBoxes = _react.useMemo.call(void 0,
2641
2807
  () => layout.elements.flatMap((el) => {
@@ -2712,7 +2878,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
2712
2878
  [layout, units, index, camera, viewport, palette, placeTypeColors, lockedUnitIds, messages.unassigned]
2713
2879
  );
2714
2880
  _react.useEffect.call(void 0, () => {
2715
- const ctx = _optionalChain([canvasRef, 'access', _97 => _97.current, 'optionalAccess', _98 => _98.getContext, 'call', _99 => _99("2d")]);
2881
+ const ctx = _optionalChain([canvasRef, 'access', _113 => _113.current, 'optionalAccess', _114 => _114.getContext, 'call', _115 => _115("2d")]);
2716
2882
  if (!ctx || viewport.width === 0) return;
2717
2883
  renderScene(scene, { ctx, camera, viewport, dpr, images });
2718
2884
  ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
@@ -2786,7 +2952,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
2786
2952
  }, [scene, camera, viewport, dpr, images, bg, ui.backgroundEditing, ui.selection, ui.seatEditId, boxes, radii, palette, seatEditUnits, removed, lifted, hints, marquee]);
2787
2953
  _react.useImperativeHandle.call(void 0, ref, () => ({
2788
2954
  clientToWorld: (clientX, clientY) => {
2789
- const r = _optionalChain([stageRef, 'access', _100 => _100.current, 'optionalAccess', _101 => _101.getBoundingClientRect, 'call', _102 => _102()]);
2955
+ const r = _optionalChain([stageRef, 'access', _116 => _116.current, 'optionalAccess', _117 => _117.getBoundingClientRect, 'call', _118 => _118()]);
2790
2956
  if (!r || clientX < r.left || clientX > r.right || clientY < r.top || clientY > r.bottom) return null;
2791
2957
  const { camera: c, viewport: v } = latest.current;
2792
2958
  return screenToWorld(c, v, { x: clientX - r.left, y: clientY - r.top });
@@ -2864,7 +3030,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
2864
3030
  if (fx.elementId) d.dispatchUi({ type: "toggleSelect", id: fx.elementId });
2865
3031
  } else {
2866
3032
  d.dispatchUi({ type: "select", id: fx.elementId });
2867
- if (fx.elementId) _optionalChain([onPieceTapRef, 'access', _103 => _103.current, 'optionalCall', _104 => _104(fx.elementId)]);
3033
+ if (fx.elementId) _optionalChain([onPieceTapRef, 'access', _119 => _119.current, 'optionalCall', _120 => _120(fx.elementId)]);
2868
3034
  }
2869
3035
  };
2870
3036
  const sheetBox = (l) => ({ minX: 0, minY: 0, maxX: l.meta.width, maxY: l.meta.height });
@@ -2882,7 +3048,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
2882
3048
  }
2883
3049
  current.raw = { x: current.raw.x + dx, y: current.raw.y + dy };
2884
3050
  const snap = altHeld.current ? null : snapMove(shiftBox(current.start, current.raw.x, current.raw.y), current.others, SNAP_PX / zoom, { sheet: sheetBox(d.layout) });
2885
- const target = { x: current.raw.x + (_nullishCoalesce(_optionalChain([snap, 'optionalAccess', _105 => _105.dx]), () => ( 0))), y: current.raw.y + (_nullishCoalesce(_optionalChain([snap, 'optionalAccess', _106 => _106.dy]), () => ( 0))) };
3051
+ const target = { x: current.raw.x + (_nullishCoalesce(_optionalChain([snap, 'optionalAccess', _121 => _121.dx]), () => ( 0))), y: current.raw.y + (_nullishCoalesce(_optionalChain([snap, 'optionalAccess', _122 => _122.dy]), () => ( 0))) };
2886
3052
  if (target.x !== current.applied.x || target.y !== current.applied.y) {
2887
3053
  current.applied = target;
2888
3054
  setPreview({ kind: "move", ids: current.ids, dx: target.x, dy: target.y });
@@ -2904,7 +3070,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
2904
3070
  if (isScaled2(next) && isScaled2(start)) {
2905
3071
  const same = d.layout.elements.filter((el) => el.id !== start.id && el.type === next.type);
2906
3072
  const match = snapScaleTo(_nullishCoalesce(next.scale, () => ( 1)), same.map((el) => _nullishCoalesce(el.scale, () => ( 1))));
2907
- const sized2 = match !== null && match !== (_nullishCoalesce(next.scale, () => ( 1))) ? _chunkUWCMN6Q7cjs.scalePiece.call(void 0, start, match) : next;
3073
+ const sized2 = match !== null && match !== (_nullishCoalesce(next.scale, () => ( 1))) ? _chunkYLV7JK57cjs.scalePiece.call(void 0, start, match) : next;
2908
3074
  const now = _nullishCoalesce(sized2.scale, () => ( 1));
2909
3075
  const matches = same.filter((el) => (_nullishCoalesce(el.scale, () => ( 1))) === now).flatMap((el) => _nullishCoalesce(pieceBounds(el), () => ( [])));
2910
3076
  setHints(matches.length > 0 ? { guides: [], gaps: [], matches } : null);
@@ -2930,7 +3096,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
2930
3096
  const nowMarquee = isMarqueeArmed(r.state);
2931
3097
  if (nowMarquee && !marqueeArmed.current) {
2932
3098
  try {
2933
- _optionalChain([navigator, 'access', _107 => _107.vibrate, 'optionalCall', _108 => _108(10)]);
3099
+ _optionalChain([navigator, 'access', _123 => _123.vibrate, 'optionalCall', _124 => _124(10)]);
2934
3100
  } catch (e2) {
2935
3101
  }
2936
3102
  }
@@ -2939,7 +3105,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
2939
3105
  if (nowLifted !== liftedRef.current) {
2940
3106
  if (nowLifted) {
2941
3107
  try {
2942
- _optionalChain([navigator, 'access', _109 => _109.vibrate, 'optionalCall', _110 => _110(10)]);
3108
+ _optionalChain([navigator, 'access', _125 => _125.vibrate, 'optionalCall', _126 => _126(10)]);
2943
3109
  } catch (e3) {
2944
3110
  }
2945
3111
  }
@@ -3011,7 +3177,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
3011
3177
  }
3012
3178
  const d = latest.current.designer;
3013
3179
  const { camera: c, viewport: v } = latest.current;
3014
- const hit = kind === "down" ? _nullishCoalesce(_nullishCoalesce(backgroundAt(d.layout.meta.background, screenToWorld(c, v, p), d.ui.backgroundEditing), () => ( _optionalChain([elementAt, 'call', _111 => _111(d.layout, p, c, v, { radii, slopPx: EDIT_HIT_SLOP_PX }), 'optionalAccess', _112 => _112.id]))), () => ( null)) : null;
3180
+ const hit = kind === "down" ? _nullishCoalesce(_nullishCoalesce(backgroundAt(d.layout.meta.background, screenToWorld(c, v, p), d.ui.backgroundEditing), () => ( _optionalChain([elementAt, 'call', _127 => _127(d.layout, p, c, v, { radii, slopPx: EDIT_HIT_SLOP_PX }), 'optionalAccess', _128 => _128.id]))), () => ( null)) : null;
3015
3181
  const elementLocked = d.ui.armed !== null || hit !== null && hit === d.ui.seatEditId;
3016
3182
  if (kind !== "down") {
3017
3183
  feed({ kind, p, hitElementId: hit, elementLocked });
@@ -3072,7 +3238,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
3072
3238
  const id = pendingFocus.current;
3073
3239
  if (!id) return;
3074
3240
  pendingFocus.current = null;
3075
- _optionalChain([stageRef, 'access', _113 => _113.current, 'optionalAccess', _114 => _114.querySelector, 'call', _115 => _115(`[data-element-id="${id}"]`), 'optionalAccess', _116 => _116.focus, 'call', _117 => _117()]);
3241
+ _optionalChain([stageRef, 'access', _129 => _129.current, 'optionalAccess', _130 => _130.querySelector, 'call', _131 => _131(`[data-element-id="${id}"]`), 'optionalAccess', _132 => _132.focus, 'call', _133 => _133()]);
3076
3242
  });
3077
3243
  const armedName = ui.armed ? armedLabel(ui.armed, messages) : null;
3078
3244
  const selectedEl = ui.selectedId ? layout.elements.find((e) => e.id === ui.selectedId) : void 0;
@@ -3161,7 +3327,7 @@ var DesignerCanvas = _react.forwardRef.call(void 0, function DesignerCanvas2({ d
3161
3327
  return;
3162
3328
  }
3163
3329
  designer.dispatchUi({ type: "select", id: el.id });
3164
- if (plain) _optionalChain([onPieceTap, 'optionalCall', _118 => _118(el.id)]);
3330
+ if (plain) _optionalChain([onPieceTap, 'optionalCall', _134 => _134(el.id)]);
3165
3331
  },
3166
3332
  children: pieceName(el, placeTypes, messages)
3167
3333
  },
@@ -3217,7 +3383,7 @@ function armedLabel(kind, m) {
3217
3383
  if (kind === "roundTable") return m.pieceRoundTable;
3218
3384
  if (kind === "rectTable") return m.pieceRectTable;
3219
3385
  if (kind === "zone") return m.pieceZone;
3220
- return _nullishCoalesce(_optionalChain([_chunkUWCMN6Q7cjs.landmarkById.call(void 0, kind.slice("landmark:".length)), 'optionalAccess', _119 => _119.name]), () => ( kind));
3386
+ return _nullishCoalesce(_optionalChain([_chunkYLV7JK57cjs.landmarkById.call(void 0, kind.slice("landmark:".length)), 'optionalAccess', _135 => _135.name]), () => ( kind));
3221
3387
  }
3222
3388
  function drawHints(ctx, hints, camera, viewport, color) {
3223
3389
  const at = (x, y) => worldToScreen(camera, viewport, { x, y });
@@ -3356,7 +3522,7 @@ function anchorPanel(piece, panel, viewport, margin = 12) {
3356
3522
  return docked;
3357
3523
  }
3358
3524
  function range(rule, count) {
3359
- const labels = _chunkUWCMN6Q7cjs.labelSequence.call(void 0, rule, count);
3525
+ const labels = _chunkYLV7JK57cjs.labelSequence.call(void 0, rule, count);
3360
3526
  return { from: _nullishCoalesce(labels[0], () => ( "")), to: _nullishCoalesce(labels[labels.length - 1], () => ( "")) };
3361
3527
  }
3362
3528
  function blockRangeText(block, templates) {
@@ -3366,25 +3532,28 @@ function blockRangeText(block, templates) {
3366
3532
  }
3367
3533
  function reshapeBlock(block, patch) {
3368
3534
  const next = { ...block, ...patch };
3369
- if (block.removed.length === 0) return next;
3370
- const oldRows = _chunkUWCMN6Q7cjs.expandLabels.call(void 0, block.rowLabels, block.rows);
3371
- const oldSeats = _chunkUWCMN6Q7cjs.expandLabels.call(void 0, block.seatLabels, block.cols);
3372
- const newRows = _chunkUWCMN6Q7cjs.expandLabels.call(void 0, next.rowLabels, next.rows);
3373
- const newSeats = _chunkUWCMN6Q7cjs.expandLabels.call(void 0, next.seatLabels, next.cols);
3374
- const removed = [];
3375
- for (const id of block.removed) {
3376
- const [, row, seat] = _chunkUWCMN6Q7cjs.parseUnitId.call(void 0, id);
3377
- const r = row === void 0 ? -1 : oldRows.indexOf(row);
3378
- const c = seat === void 0 ? -1 : oldSeats.indexOf(seat);
3379
- if (r < 0 || c < 0 || r >= next.rows || c >= next.cols) continue;
3380
- removed.push(_chunkUWCMN6Q7cjs.seatUnitId.call(void 0, block.id, newRows[r], newSeats[c]));
3381
- }
3382
- return { ...next, removed };
3535
+ if (block.removed.length === 0 && !_optionalChain([block, 'access', _136 => _136.reserved, 'optionalAccess', _137 => _137.length])) return next;
3536
+ const oldRows = _chunkYLV7JK57cjs.expandLabels.call(void 0, block.rowLabels, block.rows);
3537
+ const oldSeats = _chunkYLV7JK57cjs.expandLabels.call(void 0, block.seatLabels, block.cols);
3538
+ const newRows = _chunkYLV7JK57cjs.expandLabels.call(void 0, next.rowLabels, next.rows);
3539
+ const newSeats = _chunkYLV7JK57cjs.expandLabels.call(void 0, next.seatLabels, next.cols);
3540
+ const remap = (ids) => {
3541
+ const out = [];
3542
+ for (const id of ids) {
3543
+ const [, row, seat] = _chunkYLV7JK57cjs.parseUnitId.call(void 0, id);
3544
+ const r = row === void 0 ? -1 : oldRows.indexOf(row);
3545
+ const c = seat === void 0 ? -1 : oldSeats.indexOf(seat);
3546
+ if (r < 0 || c < 0 || r >= next.rows || c >= next.cols) continue;
3547
+ out.push(_chunkYLV7JK57cjs.seatUnitId.call(void 0, block.id, newRows[r], newSeats[c]));
3548
+ }
3549
+ return out;
3550
+ };
3551
+ return { ...next, removed: remap(block.removed), ...block.reserved ? { reserved: remap(block.reserved) } : {} };
3383
3552
  }
3384
3553
  function labelStart(kind, raw, alphabet) {
3385
3554
  const start = kind === "letters" ? raw.trim().toUpperCase() : raw.trim();
3386
3555
  const rule = kind === "letters" && alphabet ? { kind, start, direction: "ltr", alphabet } : { kind, start, direction: "ltr" };
3387
- return _chunkUWCMN6Q7cjs.labelRuleSchema.safeParse(rule).success ? start : null;
3556
+ return _chunkYLV7JK57cjs.labelRuleSchema.safeParse(rule).success ? start : null;
3388
3557
  }
3389
3558
  function switchLabelKind(rule, kind) {
3390
3559
  if (rule.kind === kind) return rule;
@@ -3403,7 +3572,7 @@ function setLabelAlphabet(rule, alphabet) {
3403
3572
  if (rule.kind !== "letters") return rule;
3404
3573
  const { alphabet: _old, ...rest } = rule;
3405
3574
  if (alphabet === "es") return { ...rest, alphabet };
3406
- const skip = _optionalChain([rest, 'access', _120 => _120.skip, 'optionalAccess', _121 => _121.filter, 'call', _122 => _122((s) => !/ñ/i.test(s))]);
3575
+ const skip = _optionalChain([rest, 'access', _138 => _138.skip, 'optionalAccess', _139 => _139.filter, 'call', _140 => _140((s) => !/ñ/i.test(s))]);
3407
3576
  const { skip: _skip, ...noSkip } = rest;
3408
3577
  return {
3409
3578
  ...skip && skip.length > 0 ? { ...noSkip, skip } : noSkip,
@@ -3429,10 +3598,10 @@ function withSkip(rule, skip) {
3429
3598
  var plural = (n, one, many) => n === 1 ? one : format(many, { n });
3430
3599
  function placeTypeStatus(option, layout, summary, m) {
3431
3600
  const s = summary.byRef[option.ref];
3432
- const pieces = layout.elements.filter((e) => e.type !== "landmark" && (_optionalChain([e, 'access', _123 => _123.placeType, 'optionalAccess', _124 => _124.ref]) || null) === option.ref).length;
3433
- const units = _nullishCoalesce(_optionalChain([s, 'optionalAccess', _125 => _125.units]), () => ( 0));
3601
+ const pieces = layout.elements.filter((e) => e.type !== "landmark" && (_optionalChain([e, 'access', _141 => _141.placeType, 'optionalAccess', _142 => _142.ref]) || null) === option.ref).length;
3602
+ const units = _nullishCoalesce(_optionalChain([s, 'optionalAccess', _143 => _143.units]), () => ( 0));
3434
3603
  if (option.accepts === "zone") {
3435
- const zones = _nullishCoalesce(_optionalChain([s, 'optionalAccess', _126 => _126.zones]), () => ( 0));
3604
+ const zones = _nullishCoalesce(_optionalChain([s, 'optionalAccess', _144 => _144.zones]), () => ( 0));
3436
3605
  return {
3437
3606
  units,
3438
3607
  pieces,
@@ -3454,15 +3623,21 @@ function joinNames(names, m) {
3454
3623
  return format(m.summaryAnd, { a: names.slice(0, -1).join(", "), b: names[names.length - 1] });
3455
3624
  }
3456
3625
  function missingPlaceTypes(placeTypes, summary) {
3457
- return placeTypes.filter((o) => o.accepts !== "zone" && (_nullishCoalesce(_optionalChain([summary, 'access', _127 => _127.byRef, 'access', _128 => _128[o.ref], 'optionalAccess', _129 => _129.units]), () => ( 0))) === 0);
3626
+ return placeTypes.filter((o) => o.accepts !== "zone" && (_nullishCoalesce(_optionalChain([summary, 'access', _145 => _145.byRef, 'access', _146 => _146[o.ref], 'optionalAccess', _147 => _147.units]), () => ( 0))) === 0);
3458
3627
  }
3459
3628
  function unitsOnSale(placeTypes, summary) {
3460
- return placeTypes.reduce((n, o) => o.accepts === "zone" ? n : n + (_nullishCoalesce(_optionalChain([summary, 'access', _130 => _130.byRef, 'access', _131 => _131[o.ref], 'optionalAccess', _132 => _132.units]), () => ( 0))), 0);
3629
+ return placeTypes.reduce((n, o) => o.accepts === "zone" ? n : n + (_nullishCoalesce(_optionalChain([summary, 'access', _148 => _148.byRef, 'access', _149 => _149[o.ref], 'optionalAccess', _150 => _150.units]), () => ( 0))), 0);
3461
3630
  }
3462
3631
  function numberingCounts(block, m) {
3463
3632
  const removed = block.removed.length;
3464
- const onSale = format(m.resultOnSale, { seats: plural(block.rows * block.cols - removed, m.countSeat, m.countSeats) });
3465
- return removed === 0 ? onSale : `${onSale} \xB7 ${plural(removed, m.removedOne, m.removedMany)}`;
3633
+ const out = new Set(block.removed);
3634
+ const reserved = (_nullishCoalesce(block.reserved, () => ( []))).filter((id) => !out.has(id)).length;
3635
+ const onSale = format(m.resultOnSale, { seats: plural(block.rows * block.cols - removed - reserved, m.countSeat, m.countSeats) });
3636
+ return [
3637
+ onSale,
3638
+ ...reserved > 0 ? [plural(reserved, m.reservedOne, m.reservedMany)] : [],
3639
+ ...removed > 0 ? [plural(removed, m.removedOne, m.removedMany)] : []
3640
+ ].join(" \xB7 ");
3466
3641
  }
3467
3642
 
3468
3643
  // ../react/src/designer/FloatingPanel.tsx
@@ -3489,9 +3664,9 @@ function FloatingPanel(props) {
3489
3664
  ref,
3490
3665
  className: "vk-d-float",
3491
3666
  "aria-labelledby": props.labelledBy,
3492
- "data-docked": _optionalChain([pos, 'optionalAccess', _133 => _133.docked]) || void 0,
3667
+ "data-docked": _optionalChain([pos, 'optionalAccess', _151 => _151.docked]) || void 0,
3493
3668
  "data-testid": "piece-panel",
3494
- style: { width, left: _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _134 => _134.left]), () => ( 0)), top: _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _135 => _135.top]), () => ( 0)), visibility: pos ? "visible" : "hidden" },
3669
+ style: { width, left: _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _152 => _152.left]), () => ( 0)), top: _nullishCoalesce(_optionalChain([pos, 'optionalAccess', _153 => _153.top]), () => ( 0)), visibility: pos ? "visible" : "hidden" },
3495
3670
  children: props.children
3496
3671
  }
3497
3672
  );
@@ -3499,29 +3674,29 @@ function FloatingPanel(props) {
3499
3674
 
3500
3675
  // ../react/src/designer/capacity.ts
3501
3676
  function capacityRejections(before, after, placeTypes) {
3502
- const over = _chunkUWCMN6Q7cjs.capacityViolations.call(void 0, before, after, placeTypes);
3677
+ const over = _chunkYLV7JK57cjs.capacityViolations.call(void 0, before, after, placeTypes);
3503
3678
  if (over.length === 0) return [];
3504
- const was = _chunkUWCMN6Q7cjs.summarize.call(void 0, before).byRef;
3505
- return over.map((v) => ({ ref: v.ref, label: v.label, capacity: v.capacity, placed: _nullishCoalesce(_optionalChain([was, 'access', _136 => _136[v.ref], 'optionalAccess', _137 => _137.units]), () => ( 0)) }));
3679
+ const was = _chunkYLV7JK57cjs.summarize.call(void 0, before).byRef;
3680
+ return over.map((v) => ({ ref: v.ref, label: v.label, capacity: v.capacity, placed: _nullishCoalesce(_optionalChain([was, 'access', _154 => _154[v.ref], 'optionalAccess', _155 => _155.units]), () => ( 0)) }));
3506
3681
  }
3507
3682
  function placedUnits(option, summary) {
3508
- return _nullishCoalesce(_optionalChain([summary, 'access', _138 => _138.byRef, 'access', _139 => _139[option.ref], 'optionalAccess', _140 => _140.units]), () => ( 0));
3683
+ return _nullishCoalesce(_optionalChain([summary, 'access', _156 => _156.byRef, 'access', _157 => _157[option.ref], 'optionalAccess', _158 => _158.units]), () => ( 0));
3509
3684
  }
3510
3685
  function nextPiece(option, placed) {
3511
3686
  if (option.accepts === "zone") return { units: 1 };
3512
- if (option.accepts === "seats") return { units: _chunkUWCMN6Q7cjs.nextBlockUnits.call(void 0, option, placed) };
3513
- const capacity = _chunkUWCMN6Q7cjs.placeTypeCapacity.call(void 0, option);
3687
+ if (option.accepts === "seats") return { units: _chunkYLV7JK57cjs.nextBlockUnits.call(void 0, option, placed) };
3688
+ const capacity = _chunkYLV7JK57cjs.placeTypeCapacity.call(void 0, option);
3514
3689
  const left = capacity === null ? Infinity : Math.max(0, capacity - placed);
3515
3690
  if (option.accepts === "tableWhole") return { units: Math.min(1, left) };
3516
- return { units: Math.min(_chunkUWCMN6Q7cjs.DEFAULT_TABLE_PLACES, left) };
3691
+ return { units: Math.min(_chunkYLV7JK57cjs.DEFAULT_TABLE_PLACES, left) };
3517
3692
  }
3518
3693
  function capacityText(option, summary, m) {
3519
- const capacity = _chunkUWCMN6Q7cjs.placeTypeCapacity.call(void 0, option);
3694
+ const capacity = _chunkYLV7JK57cjs.placeTypeCapacity.call(void 0, option);
3520
3695
  if (capacity === null || option.accepts === "zone") return null;
3521
3696
  return format(m.capacityCount, { placed: placedUnits(option, summary), capacity });
3522
3697
  }
3523
3698
  function capacityFullText(option, summary, m) {
3524
- const capacity = _chunkUWCMN6Q7cjs.placeTypeCapacity.call(void 0, option);
3699
+ const capacity = _chunkYLV7JK57cjs.placeTypeCapacity.call(void 0, option);
3525
3700
  if (capacity === null || option.accepts === "zone") return null;
3526
3701
  const placed = placedUnits(option, summary);
3527
3702
  if (placed > capacity) return format(m.capacityOver, { over: placed - capacity, capacity, name: option.label });
@@ -3529,20 +3704,20 @@ function capacityFullText(option, summary, m) {
3529
3704
  return format(m.capacityFull, { capacity, name: option.label });
3530
3705
  }
3531
3706
  function overCapacity(option, summary) {
3532
- const capacity = _chunkUWCMN6Q7cjs.placeTypeCapacity.call(void 0, option);
3707
+ const capacity = _chunkYLV7JK57cjs.placeTypeCapacity.call(void 0, option);
3533
3708
  if (capacity === null || option.accepts === "zone") return 0;
3534
3709
  return Math.max(0, placedUnits(option, summary) - capacity);
3535
3710
  }
3536
3711
  function trimPlan(layout, option, locked) {
3537
- let left = overCapacity(option, _chunkUWCMN6Q7cjs.summarize.call(void 0, layout));
3712
+ let left = overCapacity(option, _chunkYLV7JK57cjs.summarize.call(void 0, layout));
3538
3713
  if (left === 0) return null;
3539
3714
  const commands = [];
3540
3715
  let removed = 0;
3541
3716
  for (let i = layout.elements.length - 1; i >= 0 && left > 0; i--) {
3542
3717
  const el = layout.elements[i];
3543
- if (el.type === "landmark" || el.type === "zone" || (_optionalChain([el, 'access', _141 => _141.placeType, 'optionalAccess', _142 => _142.ref]) || null) !== option.ref) continue;
3718
+ if (el.type === "landmark" || el.type === "zone" || (_optionalChain([el, 'access', _159 => _159.placeType, 'optionalAccess', _160 => _160.ref]) || null) !== option.ref) continue;
3544
3719
  if (el.type === "seatBlock") {
3545
- const units = _chunkUWCMN6Q7cjs.expandSeatBlock.call(void 0, el);
3720
+ const units = _chunkYLV7JK57cjs.expandSeatBlock.call(void 0, el);
3546
3721
  const take = units.filter((u) => !locked.has(u.id)).sort((a, b) => b.rowIndex - a.rowIndex || b.colIndex - a.colIndex).slice(0, left);
3547
3722
  if (take.length === 0) continue;
3548
3723
  commands.push(
@@ -3557,7 +3732,7 @@ function trimPlan(layout, option, locked) {
3557
3732
  left--;
3558
3733
  } else {
3559
3734
  let lastLocked = 0;
3560
- for (let n = 1; n <= el.places; n++) if (locked.has(_chunkUWCMN6Q7cjs.placeUnitId.call(void 0, el.id, n))) lastLocked = n;
3735
+ for (let n = 1; n <= el.places; n++) if (locked.has(_chunkYLV7JK57cjs.placeUnitId.call(void 0, el.id, n))) lastLocked = n;
3561
3736
  if (lastLocked === 0 && left >= el.places) {
3562
3737
  commands.push({ type: "removeElement", id: el.id });
3563
3738
  removed += el.places;
@@ -3578,7 +3753,7 @@ function trimPlan(layout, option, locked) {
3578
3753
  function piecesByRef(layout) {
3579
3754
  const out = {};
3580
3755
  for (const el of layout.elements) {
3581
- const ref = el.type === "landmark" ? "" : _optionalChain([el, 'access', _143 => _143.placeType, 'optionalAccess', _144 => _144.ref]) || "";
3756
+ const ref = el.type === "landmark" ? "" : _optionalChain([el, 'access', _161 => _161.placeType, 'optionalAccess', _162 => _162.ref]) || "";
3582
3757
  if (ref) out[ref] = (_nullishCoalesce(out[ref], () => ( 0))) + 1;
3583
3758
  }
3584
3759
  return out;
@@ -3591,8 +3766,8 @@ function hostReads(placeTypes, summary, pieces, m) {
3591
3766
  return o ? nextPiece(o, placedUnits(o, summary)).units : 0;
3592
3767
  },
3593
3768
  placed: (ref) => ({
3594
- units: _nullishCoalesce(_optionalChain([summary, 'access', _145 => _145.byRef, 'access', _146 => _146[ref], 'optionalAccess', _147 => _147.units]), () => ( 0)),
3595
- zones: _nullishCoalesce(_optionalChain([summary, 'access', _148 => _148.byRef, 'access', _149 => _149[ref], 'optionalAccess', _150 => _150.zones]), () => ( 0)),
3769
+ units: _nullishCoalesce(_optionalChain([summary, 'access', _163 => _163.byRef, 'access', _164 => _164[ref], 'optionalAccess', _165 => _165.units]), () => ( 0)),
3770
+ zones: _nullishCoalesce(_optionalChain([summary, 'access', _166 => _166.byRef, 'access', _167 => _167[ref], 'optionalAccess', _168 => _168.zones]), () => ( 0)),
3596
3771
  pieces: _nullishCoalesce(pieces[ref], () => ( 0))
3597
3772
  }),
3598
3773
  capacityText: (ref) => {
@@ -3631,17 +3806,17 @@ function syncPlaceTypes(layout, previous, placeTypes) {
3631
3806
  const before = new Set(previous.map((o) => o.ref));
3632
3807
  let changed = false;
3633
3808
  const elements = layout.elements.map((el) => {
3634
- if (el.type === "landmark" || !_optionalChain([el, 'access', _151 => _151.placeType, 'optionalAccess', _152 => _152.ref])) return el;
3809
+ if (el.type === "landmark" || !_optionalChain([el, 'access', _169 => _169.placeType, 'optionalAccess', _170 => _170.ref])) return el;
3635
3810
  const option = byRef.get(el.placeType.ref);
3636
3811
  if (!option && !before.has(el.placeType.ref)) return el;
3637
- if (!option || !_chunkUWCMN6Q7cjs.canAssign.call(void 0, el, option)) {
3812
+ if (!option || !_chunkYLV7JK57cjs.canAssign.call(void 0, el, option)) {
3638
3813
  changed = true;
3639
3814
  return { ...el, placeType: { ref: "", name: el.placeType.name } };
3640
3815
  }
3641
3816
  const mode = option.accepts === "tablePerPlace" ? "perPlace" : "whole";
3642
3817
  if (el.placeType.name === option.label && (el.type !== "table" || el.mode === mode)) return el;
3643
3818
  changed = true;
3644
- return _chunkUWCMN6Q7cjs.assignPlaceType.call(void 0, el, option);
3819
+ return _chunkYLV7JK57cjs.assignPlaceType.call(void 0, el, option);
3645
3820
  });
3646
3821
  return changed ? { ...layout, elements } : layout;
3647
3822
  }
@@ -3795,7 +3970,7 @@ function LandmarkPicker({ messages: m, onPick }) {
3795
3970
  const groups = LANDMARK_GROUPS.map(({ group, key }) => ({
3796
3971
  group,
3797
3972
  title: m[key],
3798
- items: _chunkUWCMN6Q7cjs.landmarks.filter((l) => l.group === group && (q === "" || fold(l.name).includes(q)))
3973
+ items: _chunkYLV7JK57cjs.landmarks.filter((l) => l.group === group && (q === "" || fold(l.name).includes(q)))
3799
3974
  })).filter((g) => g.items.length > 0);
3800
3975
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-d-landmarks", children: [
3801
3976
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "label", { className: "vk-d-search", htmlFor: searchId, children: [
@@ -3955,7 +4130,7 @@ var designerEs = {
3955
4130
  blockRangeOneRow: "Fila {row} \xB7 butacas {seatFrom} a {seatTo}",
3956
4131
  numbering: "Numeraci\xF3n y pasillos",
3957
4132
  numberingTitle: "Numeraci\xF3n y pasillos \xB7 {name}",
3958
- numberingHint: "As\xED lo va a ver quien compra. Toc\xE1 una butaca para sacarla (pasillo o columna); los n\xFAmeros de las dem\xE1s no cambian.",
4133
+ numberingHint: "As\xED lo va a ver quien compra. Toc\xE1 una butaca para reservarla, o eleg\xED \xABSacar (pasillo)\xBB para sacarla; los n\xFAmeros de las dem\xE1s no cambian.",
3959
4134
  numberingTooBig: "El bloque es muy grande para mostrarlo ac\xE1. La numeraci\xF3n se puede cambiar igual.",
3960
4135
  numberingFailed: "No se pudo aplicar este cambio.",
3961
4136
  rowsNamed: "Las filas se llaman",
@@ -3991,6 +4166,17 @@ var designerEs = {
3991
4166
  seatName: "Fila {row}, butaca {seat}",
3992
4167
  seatNameRemoved: "Fila {row}, butaca {seat} sacada",
3993
4168
  seatNameSold: "Fila {row}, butaca {seat}, ya vendida",
4169
+ seatNameReserved: "Fila {row}, butaca {seat}, reservada",
4170
+ tapMode: "Al tocar",
4171
+ tapReserve: "Reservar",
4172
+ tapRemove: "Sacar (pasillo)",
4173
+ reservedNotice: "Una butaca reservada se ve en el mapa pero no se vende al p\xFAblico: queda para cortes\xEDas y cupos apartados.",
4174
+ legendReserved: "Reservada",
4175
+ reservedOne: "1 reservada",
4176
+ reservedMany: "{n} reservadas",
4177
+ tableInviteOnly: "Mesa s\xF3lo con invitaci\xF3n",
4178
+ placesInviteOnly: "Lugares s\xF3lo con invitaci\xF3n",
4179
+ placeInviteOnly: "Lugar {n} s\xF3lo con invitaci\xF3n",
3994
4180
  assignTitle: "\xBFDe qu\xE9 entrada es?",
3995
4181
  noPlaceTypes: "No hay entradas que le sirvan a esta pieza.",
3996
4182
  capacityCount: "{placed} de {capacity} lugares",
@@ -4175,7 +4361,7 @@ var designerEn = {
4175
4361
  blockRangeOneRow: "Row {row} \xB7 seats {seatFrom} to {seatTo}",
4176
4362
  numbering: "Numbering and aisles",
4177
4363
  numberingTitle: "Numbering and aisles \xB7 {name}",
4178
- numberingHint: "This is how buyers will see it. Tap a seat to remove it (an aisle or a pillar); the other numbers don't change.",
4364
+ numberingHint: "This is how buyers will see it. Tap a seat to reserve it, or pick \xABRemove (aisle)\xBB to remove it; the other numbers don't change.",
4179
4365
  numberingTooBig: "The block is too big to show here. You can still change the numbering.",
4180
4366
  numberingFailed: "This change couldn't be applied.",
4181
4367
  rowsNamed: "Rows are named",
@@ -4211,6 +4397,17 @@ var designerEn = {
4211
4397
  seatName: "Row {row}, seat {seat}",
4212
4398
  seatNameRemoved: "Row {row}, seat {seat} removed",
4213
4399
  seatNameSold: "Row {row}, seat {seat}, already sold",
4400
+ seatNameReserved: "Row {row}, seat {seat}, reserved",
4401
+ tapMode: "On tap",
4402
+ tapReserve: "Reserve",
4403
+ tapRemove: "Remove (aisle)",
4404
+ reservedNotice: "A reserved seat shows on the map but isn't sold to the public: it's kept for complimentary tickets and held allocations.",
4405
+ legendReserved: "Reserved",
4406
+ reservedOne: "1 reserved",
4407
+ reservedMany: "{n} reserved",
4408
+ tableInviteOnly: "Invitation-only table",
4409
+ placesInviteOnly: "Invitation-only places",
4410
+ placeInviteOnly: "Place {n} invitation only",
4214
4411
  assignTitle: "Which ticket is it for?",
4215
4412
  noPlaceTypes: "No tickets fit this piece.",
4216
4413
  capacityCount: "{placed} of {capacity} spots",
@@ -4324,13 +4521,13 @@ function SizeStepper(props) {
4324
4521
  const { piece, messages: m } = props;
4325
4522
  const scale = _nullishCoalesce(piece.scale, () => ( 1));
4326
4523
  const id = _react.useId.call(void 0, );
4327
- const set = (direction) => props.onRun({ type: "replaceElement", element: _chunkUWCMN6Q7cjs.scalePiece.call(void 0, piece, steppedScale(scale, direction)) });
4524
+ const set = (direction) => props.onRun({ type: "replaceElement", element: _chunkYLV7JK57cjs.scalePiece.call(void 0, piece, steppedScale(scale, direction)) });
4328
4525
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-d-field", role: "group", "aria-labelledby": id, children: [
4329
4526
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { id, children: m.pieceSize }),
4330
4527
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-d-stepper", children: [
4331
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", "aria-label": m.sizeLess, disabled: scale <= _chunkUWCMN6Q7cjs.MIN_SCALE, onClick: () => set(-1), children: "\u2212" }),
4528
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", "aria-label": m.sizeLess, disabled: scale <= _chunkYLV7JK57cjs.MIN_SCALE, onClick: () => set(-1), children: "\u2212" }),
4332
4529
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "output", { className: "vk-d-stepper-value", "aria-live": "polite", children: format(m.pieceSizeValue, { n: Math.round(scale * 100) }) }),
4333
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", "aria-label": m.sizeMore, disabled: scale >= _chunkUWCMN6Q7cjs.MAX_SCALE, onClick: () => set(1), children: "+" })
4530
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", "aria-label": m.sizeMore, disabled: scale >= _chunkYLV7JK57cjs.MAX_SCALE, onClick: () => set(1), children: "+" })
4334
4531
  ] })
4335
4532
  ] });
4336
4533
  }
@@ -4375,12 +4572,44 @@ var ZONE_MAX = 4e3;
4375
4572
  var ZONE_STEP = 20;
4376
4573
  function pieceHeading(el, placeTypes, m) {
4377
4574
  if (el.type === "landmark") return { color: null, text: el.name };
4378
- const ref = _optionalChain([el, 'access', _153 => _153.placeType, 'optionalAccess', _154 => _154.ref]) || null;
4575
+ const ref = _optionalChain([el, 'access', _171 => _171.placeType, 'optionalAccess', _172 => _172.ref]) || null;
4379
4576
  const option = ref ? placeTypes.find((p) => p.ref === ref) : void 0;
4380
- const name = _nullishCoalesce(_optionalChain([option, 'optionalAccess', _155 => _155.label]), () => ( m.unassigned));
4381
- if (el.type === "zone") return { color: _nullishCoalesce(_optionalChain([option, 'optionalAccess', _156 => _156.color]), () => ( null)), text: name };
4382
- const count = el.type === "seatBlock" ? plural2(_chunkUWCMN6Q7cjs.expandSeatBlock.call(void 0, el).length, m.countSeat, m.countSeats) : el.mode === "whole" ? plural2(1, m.countTable, m.countTables) : plural2(el.places, m.countPlace, m.countPlaces);
4383
- return { color: _nullishCoalesce(_optionalChain([option, 'optionalAccess', _157 => _157.color]), () => ( null)), text: `${name} \xB7 ${count}` };
4577
+ const name = _nullishCoalesce(_optionalChain([option, 'optionalAccess', _173 => _173.label]), () => ( m.unassigned));
4578
+ if (el.type === "zone") return { color: _nullishCoalesce(_optionalChain([option, 'optionalAccess', _174 => _174.color]), () => ( null)), text: name };
4579
+ const count = el.type === "seatBlock" ? plural2(_chunkYLV7JK57cjs.expandSeatBlock.call(void 0, el).length, m.countSeat, m.countSeats) : el.mode === "whole" ? plural2(1, m.countTable, m.countTables) : plural2(el.places, m.countPlace, m.countPlaces);
4580
+ return { color: _nullishCoalesce(_optionalChain([option, 'optionalAccess', _175 => _175.color]), () => ( null)), text: `${name} \xB7 ${count}` };
4581
+ }
4582
+ function TableInviteOnly(props) {
4583
+ const { table: t, messages: m } = props;
4584
+ const reserved = new Set(_nullishCoalesce(t.reservedPlaces, () => ( [])));
4585
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-d-num-group", "data-testid": "table-invite-only", style: { ["--vk-type"]: _nullishCoalesce(props.color, () => ( "var(--vk-unassigned, #9ca3af)")) }, children: [
4586
+ t.mode === "whole" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "label", { className: "vk-d-check", children: [
4587
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4588
+ "input",
4589
+ {
4590
+ type: "checkbox",
4591
+ checked: t.reserved === true,
4592
+ onChange: () => props.onRun({ type: "replaceElement", element: _chunkYLV7JK57cjs.toggleReservedTable.call(void 0, t) })
4593
+ }
4594
+ ),
4595
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: m.tableInviteOnly })
4596
+ ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { role: "group", "aria-label": m.placesInviteOnly, children: [
4597
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "vk-d-sub", children: m.placesInviteOnly }),
4598
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "vk-d-places", children: Array.from({ length: t.places }, (_, i) => i + 1).map((n) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4599
+ "button",
4600
+ {
4601
+ type: "button",
4602
+ className: "vk-d-place",
4603
+ "aria-pressed": reserved.has(n),
4604
+ "aria-label": format(m.placeInviteOnly, { n }),
4605
+ onClick: () => props.onRun({ type: "replaceElement", element: _chunkYLV7JK57cjs.toggleReservedTable.call(void 0, t, n) }),
4606
+ children: n
4607
+ },
4608
+ n
4609
+ )) })
4610
+ ] }),
4611
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "vk-d-hint", children: m.reservedNotice })
4612
+ ] });
4384
4613
  }
4385
4614
  function PieceInspector(props) {
4386
4615
  const { element: el, messages: m } = props;
@@ -4398,8 +4627,8 @@ function PieceInspector(props) {
4398
4627
  setLabelError(null);
4399
4628
  patch("label", label, `label:${el.id}`);
4400
4629
  };
4401
- const assigned = el.type !== "landmark" && !!_optionalChain([el, 'access', _158 => _158.placeType, 'optionalAccess', _159 => _159.ref]);
4402
- const options = el.type === "landmark" ? [] : props.placeTypes.filter((o) => _chunkUWCMN6Q7cjs.canAssign.call(void 0, el, o));
4630
+ const assigned = el.type !== "landmark" && !!_optionalChain([el, 'access', _176 => _176.placeType, 'optionalAccess', _177 => _177.ref]);
4631
+ const options = el.type === "landmark" ? [] : props.placeTypes.filter((o) => _chunkYLV7JK57cjs.canAssign.call(void 0, el, o));
4403
4632
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-d-inspector", children: [
4404
4633
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-d-insp-head", children: [
4405
4634
  el.type !== "landmark" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "vk-d-dot", "aria-hidden": "true", style: { ["--vk-type"]: _nullishCoalesce(heading.color, () => ( "var(--vk-unassigned, #9ca3af)")) } }),
@@ -4453,7 +4682,7 @@ function PieceInspector(props) {
4453
4682
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SizeStepper, { piece: el, messages: m, onRun: props.onRun })
4454
4683
  ] }),
4455
4684
  el.type === "table" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
4456
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TextField, { label: m.tableNumber, maxLength: _chunkUWCMN6Q7cjs.MAX_TABLE_LABEL_LENGTH, value: el.label, onCommit: tableLabelCommit }),
4685
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TextField, { label: m.tableNumber, maxLength: _chunkYLV7JK57cjs.MAX_TABLE_LABEL_LENGTH, value: el.label, onCommit: tableLabelCommit }),
4457
4686
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4458
4687
  Stepper,
4459
4688
  {
@@ -4518,12 +4747,13 @@ function PieceInspector(props) {
4518
4747
  ] }),
4519
4748
  el.type === "landmark" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TextField, { label: m.landmarkName, wide: true, maxLength: 60, value: el.name, onCommit: (v) => v.trim() && patch("name", v.trim(), `name:${el.id}`) })
4520
4749
  ] }, el.id),
4521
- _optionalChain([labelError, 'optionalAccess', _160 => _160.id]) === el.id && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "vk-d-error", role: "alert", children: labelError.text }),
4750
+ _optionalChain([labelError, 'optionalAccess', _178 => _178.id]) === el.id && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "vk-d-error", role: "alert", children: labelError.text }),
4522
4751
  el.type === "seatBlock" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-d-insp-foot", children: [
4523
4752
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "data-testid": "block-range", children: blockRangeText(el, { many: m.blockRange, one: m.blockRangeOneRow }) }),
4524
4753
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "vk-d-link", "aria-haspopup": "dialog", onClick: props.onNumbering, children: m.numbering })
4525
4754
  ] }),
4526
- el.type === "table" && assigned && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "vk-d-hint", children: el.mode === "whole" ? m.sellWhole : m.sellPerPlace })
4755
+ el.type === "table" && assigned && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "vk-d-hint", children: el.mode === "whole" ? m.sellWhole : m.sellPerPlace }),
4756
+ el.type === "table" && assigned && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableInviteOnly, { table: el, color: heading.color, messages: m, onRun: props.onRun })
4527
4757
  ] });
4528
4758
  }
4529
4759
 
@@ -4585,12 +4815,14 @@ function NumberingDialog(props) {
4585
4815
  const m = props.messages;
4586
4816
  const [draft, setDraft] = _react.useState.call(void 0, props.block);
4587
4817
  const [failed, setFailed] = _react.useState.call(void 0, false);
4588
- const rowLabels = _chunkUWCMN6Q7cjs.expandLabels.call(void 0, draft.rowLabels, draft.rows);
4589
- const seatLabels = _chunkUWCMN6Q7cjs.expandLabels.call(void 0, draft.seatLabels, draft.cols);
4818
+ const rowLabels = _chunkYLV7JK57cjs.expandLabels.call(void 0, draft.rowLabels, draft.rows);
4819
+ const seatLabels = _chunkYLV7JK57cjs.expandLabels.call(void 0, draft.seatLabels, draft.cols);
4590
4820
  const removed = new Set(draft.removed);
4591
- const origRows = _chunkUWCMN6Q7cjs.expandLabels.call(void 0, props.block.rowLabels, props.block.rows);
4592
- const origSeats = _chunkUWCMN6Q7cjs.expandLabels.call(void 0, props.block.seatLabels, props.block.cols);
4593
- const soldAt = (r, c) => r < origRows.length && c < origSeats.length && props.lockedUnitIds.has(_chunkUWCMN6Q7cjs.seatUnitId.call(void 0, props.block.id, origRows[r], origSeats[c]));
4821
+ const reserved = new Set(_nullishCoalesce(draft.reserved, () => ( [])));
4822
+ const [tapMode, setTapMode] = _react.useState.call(void 0, "reserve");
4823
+ const origRows = _chunkYLV7JK57cjs.expandLabels.call(void 0, props.block.rowLabels, props.block.rows);
4824
+ const origSeats = _chunkYLV7JK57cjs.expandLabels.call(void 0, props.block.seatLabels, props.block.cols);
4825
+ const soldAt = (r, c) => r < origRows.length && c < origSeats.length && props.lockedUnitIds.has(_chunkYLV7JK57cjs.seatUnitId.call(void 0, props.block.id, origRows[r], origSeats[c]));
4594
4826
  const tooBig = draft.rows * draft.cols > MAX_PREVIEW_SEATS;
4595
4827
  const pattern = draft.seatLabels.kind === "numbers" ? _nullishCoalesce(draft.seatLabels.pattern, () => ( "sequential")) : "sequential";
4596
4828
  const patternId = _react.useId.call(void 0, );
@@ -4612,22 +4844,24 @@ function NumberingDialog(props) {
4612
4844
  tooBig ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "vk-d-hint", children: m.numberingTooBig }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "vk-d-num-grid", role: "group", "aria-label": m.numbering, children: rowLabels.map((row, r) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-d-num-row", children: [
4613
4845
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "vk-d-num-label", "aria-hidden": "true", children: row }),
4614
4846
  seatLabels.map((seat, c) => {
4615
- const id = _chunkUWCMN6Q7cjs.seatUnitId.call(void 0, draft.id, row, seat);
4847
+ const id = _chunkYLV7JK57cjs.seatUnitId.call(void 0, draft.id, row, seat);
4616
4848
  const sold = soldAt(r, c) && !removed.has(id);
4617
4849
  const out = removed.has(id);
4850
+ const held = !out && reserved.has(id);
4618
4851
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4619
4852
  "button",
4620
4853
  {
4621
4854
  type: "button",
4622
4855
  className: "vk-d-num-seat",
4623
4856
  "data-removed": out || void 0,
4857
+ "data-reserved": held || void 0,
4624
4858
  "data-sold": sold || void 0,
4625
4859
  disabled: sold,
4626
- "aria-pressed": out,
4627
- "aria-label": format(sold ? m.seatNameSold : out ? m.seatNameRemoved : m.seatName, { row, seat }),
4860
+ "aria-pressed": tapMode === "reserve" ? held : out,
4861
+ "aria-label": format(sold ? m.seatNameSold : out ? m.seatNameRemoved : held ? m.seatNameReserved : m.seatName, { row, seat }),
4628
4862
  onClick: () => {
4629
4863
  setFailed(false);
4630
- setDraft((d) => _chunkUWCMN6Q7cjs.toggleRemovedSeat.call(void 0, d, id));
4864
+ setDraft((d) => tapMode === "remove" || out ? _chunkYLV7JK57cjs.toggleRemovedSeat.call(void 0, d, id) : _chunkYLV7JK57cjs.toggleReservedSeat.call(void 0, d, id));
4631
4865
  },
4632
4866
  children: seat
4633
4867
  },
@@ -4640,6 +4874,10 @@ function NumberingDialog(props) {
4640
4874
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "vk-d-legend-dot", "aria-hidden": "true" }),
4641
4875
  m.legendOnSale
4642
4876
  ] }),
4877
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
4878
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "vk-d-legend-dot vk-d-legend-reserved", "aria-hidden": "true" }),
4879
+ m.legendReserved
4880
+ ] }),
4643
4881
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
4644
4882
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "vk-d-legend-dot vk-d-legend-out", "aria-hidden": "true" }),
4645
4883
  m.legendRemoved
@@ -4648,6 +4886,18 @@ function NumberingDialog(props) {
4648
4886
  ] })
4649
4887
  ] }),
4650
4888
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-d-num-side", children: [
4889
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-d-num-group", "data-testid": "tap-mode", children: [
4890
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4891
+ Segmented,
4892
+ {
4893
+ label: m.tapMode,
4894
+ value: tapMode,
4895
+ options: [{ value: "reserve", label: m.tapReserve }, { value: "remove", label: m.tapRemove }],
4896
+ onChange: setTapMode
4897
+ }
4898
+ ),
4899
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "vk-d-hint", "data-testid": "reserved-notice", children: m.reservedNotice })
4900
+ ] }),
4651
4901
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "vk-d-num-group", children: [
4652
4902
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4653
4903
  Segmented,
@@ -4766,7 +5016,7 @@ function listOf(items, m) {
4766
5016
  function duplicateWarnings(placeTypes, summary, m) {
4767
5017
  const out = [];
4768
5018
  for (const o of placeTypes) {
4769
- const d = _optionalChain([summary, 'access', _161 => _161.byRef, 'access', _162 => _162[o.ref], 'optionalAccess', _163 => _163.duplicates]);
5019
+ const d = _optionalChain([summary, 'access', _179 => _179.byRef, 'access', _180 => _180[o.ref], 'optionalAccess', _181 => _181.duplicates]);
4770
5020
  if (!d) continue;
4771
5021
  if (d.seats.length > 0) {
4772
5022
  const items = d.seats.map((s) => {
@@ -4818,10 +5068,10 @@ function PlaceTypePanel(props) {
4818
5068
  const capped = capacityText(o, summary, m);
4819
5069
  const fullText = capacityFullText(o, summary, m);
4820
5070
  const done = fullText !== null;
4821
- const cap = _chunkUWCMN6Q7cjs.placeTypeCapacity.call(void 0, o);
5071
+ const cap = _chunkYLV7JK57cjs.placeTypeCapacity.call(void 0, o);
4822
5072
  const over = cap !== null && placedUnits(o, summary) > cap;
4823
5073
  const excess = over ? overCapacity(o, summary) : 0;
4824
- const trimmable = excess > 0 && props.onTrim ? _nullishCoalesce(_optionalChain([trimPlan, 'call', _164 => _164(props.layout, o, _nullishCoalesce(props.lockedUnitIds, () => ( NOTHING))), 'optionalAccess', _165 => _165.removed]), () => ( 0)) : 0;
5074
+ const trimmable = excess > 0 && props.onTrim ? _nullishCoalesce(_optionalChain([trimPlan, 'call', _182 => _182(props.layout, o, _nullishCoalesce(props.lockedUnitIds, () => ( NOTHING))), 'optionalAccess', _183 => _183.removed]), () => ( 0)) : 0;
4825
5075
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
4826
5076
  "li",
4827
5077
  {
@@ -4851,7 +5101,7 @@ function PlaceTypePanel(props) {
4851
5101
  className: "vk-d-btn vk-d-trim",
4852
5102
  "data-testid": "capacity-trim",
4853
5103
  "aria-label": format(m.trimToCapacityLabel, { over: trimmable, name: o.label }),
4854
- onClick: () => _optionalChain([props, 'access', _166 => _166.onTrim, 'optionalCall', _167 => _167(o)]),
5104
+ onClick: () => _optionalChain([props, 'access', _184 => _184.onTrim, 'optionalCall', _185 => _185(o)]),
4855
5105
  children: m.trimToCapacity
4856
5106
  }
4857
5107
  ),
@@ -4909,18 +5159,18 @@ function Popover({ title, onClose, anchorRef, children, className }) {
4909
5159
  const close = _react.useRef.call(void 0, onClose);
4910
5160
  close.current = onClose;
4911
5161
  _react.useEffect.call(void 0, () => {
4912
- const first = _optionalChain([ref, 'access', _168 => _168.current, 'optionalAccess', _169 => _169.querySelector, 'call', _170 => _170("input, button, select, [href]")]);
4913
- _optionalChain([(_nullishCoalesce(first, () => ( ref.current))), 'optionalAccess', _171 => _171.focus, 'call', _172 => _172()]);
5162
+ const first = _optionalChain([ref, 'access', _186 => _186.current, 'optionalAccess', _187 => _187.querySelector, 'call', _188 => _188("input, button, select, [href]")]);
5163
+ _optionalChain([(_nullishCoalesce(first, () => ( ref.current))), 'optionalAccess', _189 => _189.focus, 'call', _190 => _190()]);
4914
5164
  const onDown = (e) => {
4915
5165
  const t = e.target;
4916
- if (_optionalChain([ref, 'access', _173 => _173.current, 'optionalAccess', _174 => _174.contains, 'call', _175 => _175(t)]) || _optionalChain([anchorRef, 'access', _176 => _176.current, 'optionalAccess', _177 => _177.contains, 'call', _178 => _178(t)])) return;
5166
+ if (_optionalChain([ref, 'access', _191 => _191.current, 'optionalAccess', _192 => _192.contains, 'call', _193 => _193(t)]) || _optionalChain([anchorRef, 'access', _194 => _194.current, 'optionalAccess', _195 => _195.contains, 'call', _196 => _196(t)])) return;
4917
5167
  close.current();
4918
5168
  };
4919
5169
  document.addEventListener("pointerdown", onDown);
4920
5170
  const anchor = anchorRef.current;
4921
5171
  return () => {
4922
5172
  document.removeEventListener("pointerdown", onDown);
4923
- if (_optionalChain([anchor, 'optionalAccess', _179 => _179.isConnected]) && (!document.activeElement || document.activeElement === document.body)) anchor.focus();
5173
+ if (_optionalChain([anchor, 'optionalAccess', _197 => _197.isConnected]) && (!document.activeElement || document.activeElement === document.body)) anchor.focus();
4924
5174
  };
4925
5175
  }, [anchorRef]);
4926
5176
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -4934,7 +5184,7 @@ function Popover({ title, onClose, anchorRef, children, className }) {
4934
5184
  onKeyDown: (e) => {
4935
5185
  if (e.key === "Escape") {
4936
5186
  e.stopPropagation();
4937
- _optionalChain([anchorRef, 'access', _180 => _180.current, 'optionalAccess', _181 => _181.focus, 'call', _182 => _182()]);
5187
+ _optionalChain([anchorRef, 'access', _198 => _198.current, 'optionalAccess', _199 => _199.focus, 'call', _200 => _200()]);
4938
5188
  close.current();
4939
5189
  }
4940
5190
  },
@@ -5015,9 +5265,9 @@ function Sheet({
5015
5265
  if (!shown) return;
5016
5266
  const active = document.activeElement instanceof HTMLElement && document.activeElement !== document.body ? document.activeElement : null;
5017
5267
  const opener = _nullishCoalesce(returnTo.current, () => ( active));
5018
- _optionalChain([panelRef, 'access', _183 => _183.current, 'optionalAccess', _184 => _184.focus, 'call', _185 => _185()]);
5268
+ _optionalChain([panelRef, 'access', _201 => _201.current, 'optionalAccess', _202 => _202.focus, 'call', _203 => _203()]);
5019
5269
  return () => {
5020
- if (_optionalChain([opener, 'optionalAccess', _186 => _186.isConnected])) opener.focus();
5270
+ if (_optionalChain([opener, 'optionalAccess', _204 => _204.isConnected])) opener.focus();
5021
5271
  };
5022
5272
  }, [shown]);
5023
5273
  const onKeyDown = (e) => {
@@ -5266,10 +5516,15 @@ var DESIGNER_CSS = `
5266
5516
  .vk-d-num-seat{flex:none;width:34px;height:34px;border-radius:999px;border:0;padding:0;background:var(--vk-type);
5267
5517
  color:#fff;font:inherit;font-size:12px;font-weight:600;cursor:pointer}
5268
5518
  .vk-d-num-seat[data-removed]{background:transparent;border:2px dashed var(--vk-unassigned,#5a5a66);color:var(--vk-muted)}
5519
+ .vk-d-num-seat[data-reserved]{background:repeating-linear-gradient(45deg,var(--vk-type) 0 4px,var(--vk-surface,#fff) 4px 7px);border:2px solid var(--vk-fg);color:var(--vk-fg)}
5269
5520
  .vk-d-num-seat[data-sold]{cursor:not-allowed;opacity:.55}
5270
- .vk-d-legend{display:flex;gap:18px;font-size:13px;color:var(--vk-muted)}
5521
+ .vk-d-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 18px;font-size:13px;color:var(--vk-muted)}
5271
5522
  .vk-d-legend > span{display:flex;align-items:center;gap:6px}
5272
5523
  .vk-d-legend-dot{width:12px;height:12px;border-radius:999px;background:var(--vk-type)}
5524
+ .vk-d-places{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
5525
+ .vk-d-place{min-width:44px;min-height:44px;border-radius:999px;border:1px solid var(--vk-line);background:var(--vk-seg,transparent);color:var(--vk-fg);font:inherit;font-weight:600;cursor:pointer}
5526
+ .vk-d-place[aria-pressed="true"]{background:repeating-linear-gradient(45deg,var(--vk-type,#9ca3af) 0 4px,var(--vk-surface,#fff) 4px 7px);border:2px solid var(--vk-fg)}
5527
+ .vk-d-legend-reserved{background:repeating-linear-gradient(45deg,var(--vk-type) 0 3px,var(--vk-surface,#fff) 3px 5px);border:2px solid var(--vk-fg)}
5273
5528
  .vk-d-legend-out{background:transparent;border:2px dashed var(--vk-unassigned,#5a5a66)}
5274
5529
  .vk-d-num-side{width:340px;flex:none;border-left:1px solid var(--vk-line);padding:24px;display:flex;flex-direction:column;gap:20px;overflow:auto;background:var(--vk-surface)}
5275
5530
  .vk-d-num-group{display:flex;flex-direction:column;gap:8px}
@@ -5398,12 +5653,12 @@ function TopBar(props) {
5398
5653
  function guardedStep(history, step, locked) {
5399
5654
  const candidate = step === "undo" ? history.peekUndo() : history.peekRedo();
5400
5655
  if (!candidate) return null;
5401
- const violations = _chunkUWCMN6Q7cjs.findLockViolations.call(void 0, history.present, candidate, locked);
5656
+ const violations = _chunkYLV7JK57cjs.findLockViolations.call(void 0, history.present, candidate, locked);
5402
5657
  if (violations.length > 0) return { ok: false, rejection: { violations } };
5403
5658
  return { ok: true, layout: step === "undo" ? history.undo() : history.redo() };
5404
5659
  }
5405
5660
  function guardedLoad(history, next, locked, placeTypes = []) {
5406
- const violations = _chunkUWCMN6Q7cjs.findLockViolations.call(void 0, history.present, next, locked);
5661
+ const violations = _chunkYLV7JK57cjs.findLockViolations.call(void 0, history.present, next, locked);
5407
5662
  if (violations.length > 0) return { ok: false, rejection: { violations } };
5408
5663
  const capacity = capacityRejections(history.present, next, placeTypes);
5409
5664
  if (capacity.length > 0) return { ok: false, rejection: { violations: [], capacity } };
@@ -5426,7 +5681,7 @@ function elementPrefix(el) {
5426
5681
  return el.type === "seatBlock" ? "b" : el.type === "table" ? "m" : el.type === "zone" ? "z" : "r";
5427
5682
  }
5428
5683
  function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5429
- const [history] = _react.useState.call(void 0, () => new (0, _chunkUWCMN6Q7cjs.History)(initial));
5684
+ const [history] = _react.useState.call(void 0, () => new (0, _chunkYLV7JK57cjs.History)(initial));
5430
5685
  const historyRef = _react.useRef.call(void 0, history);
5431
5686
  const [layout, setLayout] = _react.useState.call(void 0, initial);
5432
5687
  const [rejection, setRejectionState] = _react.useState.call(void 0, null);
@@ -5443,7 +5698,7 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5443
5698
  (next) => {
5444
5699
  setLayout(next);
5445
5700
  setRejection(null);
5446
- _optionalChain([onChange, 'optionalCall', _187 => _187(next)]);
5701
+ _optionalChain([onChange, 'optionalCall', _205 => _205(next)]);
5447
5702
  },
5448
5703
  [onChange, setRejection]
5449
5704
  );
@@ -5464,13 +5719,13 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5464
5719
  const before = historyRef.current.present;
5465
5720
  let candidate;
5466
5721
  try {
5467
- candidate = _chunkUWCMN6Q7cjs.applyCommand.call(void 0, before, command);
5722
+ candidate = _chunkYLV7JK57cjs.applyCommand.call(void 0, before, command);
5468
5723
  } catch (error) {
5469
5724
  setRejection({ violations: [], invalid: error instanceof Error ? error.message : String(error) });
5470
5725
  return false;
5471
5726
  }
5472
5727
  const moveOnly = keepsCount(command);
5473
- const violations = moveOnly ? [] : _chunkUWCMN6Q7cjs.findLockViolations.call(void 0, before, candidate, locked);
5728
+ const violations = moveOnly ? [] : _chunkYLV7JK57cjs.findLockViolations.call(void 0, before, candidate, locked);
5474
5729
  if (violations.length > 0) {
5475
5730
  setRejection({ violations });
5476
5731
  return false;
@@ -5489,8 +5744,8 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5489
5744
  const place = _react.useCallback.call(void 0,
5490
5745
  (kind, at) => {
5491
5746
  const current = historyRef.current.present;
5492
- const id = _chunkUWCMN6Q7cjs.newElementId.call(void 0, current, idPrefix(kind));
5493
- if (!run({ type: "addElement", element: _chunkUWCMN6Q7cjs.createPiece.call(void 0, kind, id, at, current) })) return null;
5747
+ const id = _chunkYLV7JK57cjs.newElementId.call(void 0, current, idPrefix(kind));
5748
+ if (!run({ type: "addElement", element: _chunkYLV7JK57cjs.createPiece.call(void 0, kind, id, at, current) })) return null;
5494
5749
  dispatchUi({ type: "select", id });
5495
5750
  return id;
5496
5751
  },
@@ -5499,10 +5754,10 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5499
5754
  const addFor = _react.useCallback.call(void 0,
5500
5755
  (kind, option, near, opts = {}) => {
5501
5756
  const current = historyRef.current.present;
5502
- const id = _chunkUWCMN6Q7cjs.newElementId.call(void 0, current, idPrefix(kind));
5503
- let piece = _chunkUWCMN6Q7cjs.createPiece.call(void 0, kind, id, near, current, opts.seats === void 0 ? {} : { seats: opts.seats });
5757
+ const id = _chunkYLV7JK57cjs.newElementId.call(void 0, current, idPrefix(kind));
5758
+ let piece = _chunkYLV7JK57cjs.createPiece.call(void 0, kind, id, near, current, opts.seats === void 0 ? {} : { seats: opts.seats });
5504
5759
  if (piece.type === "table" && opts.places !== void 0) piece = { ...piece, places: opts.places };
5505
- if (option && piece.type !== "landmark" && _chunkUWCMN6Q7cjs.canAssign.call(void 0, piece, option)) piece = _chunkUWCMN6Q7cjs.assignPlaceType.call(void 0, piece, option);
5760
+ if (option && piece.type !== "landmark" && _chunkYLV7JK57cjs.canAssign.call(void 0, piece, option)) piece = _chunkYLV7JK57cjs.assignPlaceType.call(void 0, piece, option);
5506
5761
  const own = elementBounds({ ...current, elements: [...current.elements, piece] }, piece);
5507
5762
  if (own) {
5508
5763
  const occupied = current.elements.flatMap((e) => _nullishCoalesce(elementBounds(current, e), () => ( [])));
@@ -5520,8 +5775,8 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5520
5775
  const el = find(id);
5521
5776
  if (!el) return;
5522
5777
  const current = historyRef.current.present;
5523
- const newId = _chunkUWCMN6Q7cjs.newElementId.call(void 0, current, elementPrefix(el));
5524
- if (run({ type: "addElement", element: _chunkUWCMN6Q7cjs.duplicatePiece.call(void 0, el, newId, current) })) {
5778
+ const newId = _chunkYLV7JK57cjs.newElementId.call(void 0, current, elementPrefix(el));
5779
+ if (run({ type: "addElement", element: _chunkYLV7JK57cjs.duplicatePiece.call(void 0, el, newId, current) })) {
5525
5780
  dispatchUi({ type: "select", id: newId });
5526
5781
  }
5527
5782
  },
@@ -5530,7 +5785,7 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5530
5785
  const rotate = _react.useCallback.call(void 0,
5531
5786
  (id) => {
5532
5787
  const el = find(id);
5533
- if (el) run({ type: "replaceElement", element: _chunkUWCMN6Q7cjs.rotatePiece.call(void 0, el) });
5788
+ if (el) run({ type: "replaceElement", element: _chunkYLV7JK57cjs.rotatePiece.call(void 0, el) });
5534
5789
  },
5535
5790
  [run]
5536
5791
  );
@@ -5565,7 +5820,7 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5565
5820
  for (const id of ids) {
5566
5821
  const el = current.elements.find((e) => e.id === id);
5567
5822
  if (!el) continue;
5568
- const copy = _chunkUWCMN6Q7cjs.duplicatePiece.call(void 0, el, _chunkUWCMN6Q7cjs.newElementId.call(void 0, current, elementPrefix(el)), current);
5823
+ const copy = _chunkYLV7JK57cjs.duplicatePiece.call(void 0, el, _chunkYLV7JK57cjs.newElementId.call(void 0, current, elementPrefix(el)), current);
5569
5824
  current = { ...current, elements: [...current.elements, copy] };
5570
5825
  commands.push({ type: "addElement", element: copy });
5571
5826
  created.push(copy.id);
@@ -5591,7 +5846,7 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5591
5846
  const toggleSeat = _react.useCallback.call(void 0,
5592
5847
  (blockId, unitId) => {
5593
5848
  const el = find(blockId);
5594
- if (_optionalChain([el, 'optionalAccess', _188 => _188.type]) === "seatBlock") run({ type: "replaceElement", element: _chunkUWCMN6Q7cjs.toggleRemovedSeat.call(void 0, el, unitId) });
5849
+ if (_optionalChain([el, 'optionalAccess', _206 => _206.type]) === "seatBlock") run({ type: "replaceElement", element: _chunkYLV7JK57cjs.toggleRemovedSeat.call(void 0, el, unitId) });
5595
5850
  },
5596
5851
  [run]
5597
5852
  );
@@ -5599,8 +5854,8 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5599
5854
  (id, option) => {
5600
5855
  const el = find(id);
5601
5856
  if (!el || el.type === "landmark") return;
5602
- if (option && !_chunkUWCMN6Q7cjs.canAssign.call(void 0, el, option)) return;
5603
- run({ type: "replaceElement", element: _chunkUWCMN6Q7cjs.assignPlaceType.call(void 0, el, option) });
5857
+ if (option && !_chunkYLV7JK57cjs.canAssign.call(void 0, el, option)) return;
5858
+ run({ type: "replaceElement", element: _chunkYLV7JK57cjs.assignPlaceType.call(void 0, el, option) });
5604
5859
  },
5605
5860
  [run]
5606
5861
  );
@@ -5666,7 +5921,7 @@ function useDesigner({ initial, lockedUnitIds, onChange, placeTypes }) {
5666
5921
  var NOTHING_LOCKED = /* @__PURE__ */ new Set();
5667
5922
  function blankLayout(name) {
5668
5923
  return {
5669
- meta: { id: "plan", name, version: _chunkUWCMN6Q7cjs.CURRENT_VERSION, width: 1200, height: 800, background: null },
5924
+ meta: { id: "plan", name, version: _chunkYLV7JK57cjs.CURRENT_VERSION, width: 1200, height: 800, background: null },
5670
5925
  elements: []
5671
5926
  };
5672
5927
  }
@@ -5690,13 +5945,13 @@ function VenueDesigner(props) {
5690
5945
  const loadingExternal = _react.useRef.call(void 0, false);
5691
5946
  const onChange = _react.useCallback.call(void 0, (layout2) => {
5692
5947
  lastEmitted.current = layout2;
5693
- if (!loadingExternal.current) _optionalChain([onChangeRef, 'access', _189 => _189.current, 'optionalCall', _190 => _190(layout2)]);
5948
+ if (!loadingExternal.current) _optionalChain([onChangeRef, 'access', _207 => _207.current, 'optionalCall', _208 => _208(layout2)]);
5694
5949
  }, []);
5695
5950
  const designer = useDesigner({ initial, lockedUnitIds: locked, onChange, placeTypes: props.placeTypes });
5696
5951
  const { layout, ui, dispatchUi } = designer;
5697
5952
  const messages = _react.useMemo.call(void 0, () => mergeDesignerMessages(props.messages), [props.messages]);
5698
5953
  const m = messages;
5699
- const summary = _react.useMemo.call(void 0, () => _chunkUWCMN6Q7cjs.summarize.call(void 0, layout), [layout]);
5954
+ const summary = _react.useMemo.call(void 0, () => _chunkYLV7JK57cjs.summarize.call(void 0, layout), [layout]);
5700
5955
  const selected = ui.selectedId ? _nullishCoalesce(layout.elements.find((e) => e.id === ui.selectedId), () => ( null)) : null;
5701
5956
  const canvasRef = _react.useRef.call(void 0, null);
5702
5957
  const otherTableLabels = _react.useMemo.call(void 0,
@@ -5765,7 +6020,7 @@ function VenueDesigner(props) {
5765
6020
  if (compact && popover !== null) setPopover(null);
5766
6021
  }, [sheet, selected, compact, popover]);
5767
6022
  const bg = layout.meta.background;
5768
- const current = useImage(_nullishCoalesce(_optionalChain([bg, 'optionalAccess', _191 => _191.src]), () => ( null)));
6023
+ const current = useImage(_nullishCoalesce(_optionalChain([bg, 'optionalAccess', _209 => _209.src]), () => ( null)));
5769
6024
  const [incomingSrc, setIncomingSrc] = _react.useState.call(void 0, null);
5770
6025
  const incoming = useImage(incomingSrc);
5771
6026
  const { run } = designer;
@@ -5787,7 +6042,7 @@ function VenueDesigner(props) {
5787
6042
  };
5788
6043
  const adoptBackground = (src) => {
5789
6044
  if (!src) return;
5790
- if (src === _optionalChain([bg, 'optionalAccess', _192 => _192.src]) && incomingSrc === null) return;
6045
+ if (src === _optionalChain([bg, 'optionalAccess', _210 => _210.src]) && incomingSrc === null) return;
5791
6046
  setIncomingSrc(src);
5792
6047
  };
5793
6048
  const bgProp = props.background;
@@ -5803,7 +6058,7 @@ function VenueDesigner(props) {
5803
6058
  }
5804
6059
  adoptBackground(src);
5805
6060
  } : null;
5806
- const suggestedSrc = _optionalChain([bgProp, 'optionalAccess', _193 => _193.suggestedSrc]) || null;
6061
+ const suggestedSrc = _optionalChain([bgProp, 'optionalAccess', _211 => _211.suggestedSrc]) || null;
5807
6062
  const bgStatus = incomingSrc ? incoming.failed ? "failed" : "loading" : current.failed ? "failed" : "idle";
5808
6063
  const showBackground = bgProp !== void 0 || bg !== null;
5809
6064
  const latest = _react.useRef.call(void 0, { summary, placeTypes: props.placeTypes, compact, meta: layout.meta });
@@ -5814,9 +6069,9 @@ function VenueDesigner(props) {
5814
6069
  const { summary: summary2, placeTypes, compact: compact2, meta } = latest.current;
5815
6070
  const request = pieceRequest(kind, ref, placeTypes, summary2);
5816
6071
  if (!request) return null;
5817
- const centre = _nullishCoalesce(_optionalChain([canvasRef, 'access', _194 => _194.current, 'optionalAccess', _195 => _195.centre, 'call', _196 => _196()]), () => ( { x: meta.width / 2, y: meta.height / 2 }));
6072
+ const centre = _nullishCoalesce(_optionalChain([canvasRef, 'access', _212 => _212.current, 'optionalAccess', _213 => _213.centre, 'call', _214 => _214()]), () => ( { x: meta.width / 2, y: meta.height / 2 }));
5818
6073
  const id = designerAddFor(kind, request.option, centre, request.opts);
5819
- if (id) _optionalChain([canvasRef, 'access', _197 => _197.current, 'optionalAccess', _198 => _198.reveal, 'call', _199 => _199(id)]);
6074
+ if (id) _optionalChain([canvasRef, 'access', _215 => _215.current, 'optionalAccess', _216 => _216.reveal, 'call', _217 => _217(id)]);
5820
6075
  if (id && compact2) setSheet("piece");
5821
6076
  return id;
5822
6077
  },
@@ -5826,12 +6081,12 @@ function VenueDesigner(props) {
5826
6081
  (id) => {
5827
6082
  dispatchUi({ type: "select", id });
5828
6083
  if (!id) return;
5829
- _optionalChain([canvasRef, 'access', _200 => _200.current, 'optionalAccess', _201 => _201.reveal, 'call', _202 => _202(id)]);
6084
+ _optionalChain([canvasRef, 'access', _218 => _218.current, 'optionalAccess', _219 => _219.reveal, 'call', _220 => _220(id)]);
5830
6085
  if (latest.current.compact) setSheet("piece");
5831
6086
  },
5832
6087
  [dispatchUi]
5833
6088
  );
5834
- const revealPiece = _react.useCallback.call(void 0, (id) => _optionalChain([canvasRef, 'access', _203 => _203.current, 'optionalAccess', _204 => _204.reveal, 'call', _205 => _205(id)]), []);
6089
+ const revealPiece = _react.useCallback.call(void 0, (id) => _optionalChain([canvasRef, 'access', _221 => _221.current, 'optionalAccess', _222 => _222.reveal, 'call', _223 => _223(id)]), []);
5835
6090
  const trimToCapacity = _react.useCallback.call(void 0,
5836
6091
  (ref) => {
5837
6092
  const option = latest.current.placeTypes.find((o) => o.ref === ref);
@@ -5847,7 +6102,7 @@ function VenueDesigner(props) {
5847
6102
  () => hostReads(latest.current.placeTypes, facts.summary, facts.pieces, m),
5848
6103
  [typesKey, facts, m]
5849
6104
  );
5850
- const selectedRef = selected && selected.type !== "landmark" ? _optionalChain([selected, 'access', _206 => _206.placeType, 'optionalAccess', _207 => _207.ref]) || null : null;
6105
+ const selectedRef = selected && selected.type !== "landmark" ? _optionalChain([selected, 'access', _224 => _224.placeType, 'optionalAccess', _225 => _225.ref]) || null : null;
5851
6106
  const hostApi = _react.useMemo.call(void 0,
5852
6107
  () => ({ ...reads, addPiece, trimToCapacity, select: selectPiece, reveal: revealPiece, selectedRef }),
5853
6108
  [reads, addPiece, trimToCapacity, selectPiece, revealPiece, selectedRef]
@@ -5912,7 +6167,7 @@ function VenueDesigner(props) {
5912
6167
  editing: ui.backgroundEditing,
5913
6168
  compact,
5914
6169
  onPick: pickBackground ? () => void pickBackground() : null,
5915
- onUseSuggested: suggestedSrc && suggestedSrc !== _optionalChain([bg, 'optionalAccess', _208 => _208.src]) ? () => adoptBackground(suggestedSrc) : null,
6170
+ onUseSuggested: suggestedSrc && suggestedSrc !== _optionalChain([bg, 'optionalAccess', _226 => _226.src]) ? () => adoptBackground(suggestedSrc) : null,
5916
6171
  onSet: setBackground,
5917
6172
  onEditing: (on) => {
5918
6173
  dispatchUi({ type: "backgroundEdit", on });
@@ -5976,8 +6231,8 @@ function VenueDesigner(props) {
5976
6231
  const panel = _nullishCoalesce(inspector, () => ( multiPanel));
5977
6232
  const numberingTitleId = _react.useId.call(void 0, );
5978
6233
  const numberingBlock = numberingId ? layout.elements.find((e) => e.id === numberingId) : void 0;
5979
- const numberingTarget = _optionalChain([numberingBlock, 'optionalAccess', _209 => _209.type]) === "seatBlock" ? numberingBlock : null;
5980
- const numberingRef = _optionalChain([numberingTarget, 'optionalAccess', _210 => _210.placeType, 'optionalAccess', _211 => _211.ref]) || null;
6234
+ const numberingTarget = _optionalChain([numberingBlock, 'optionalAccess', _227 => _227.type]) === "seatBlock" ? numberingBlock : null;
6235
+ const numberingRef = _optionalChain([numberingTarget, 'optionalAccess', _228 => _228.placeType, 'optionalAccess', _229 => _229.ref]) || null;
5981
6236
  const numberingType = numberingRef ? props.placeTypes.find((p) => p.ref === numberingRef) : void 0;
5982
6237
  const closeNumbering = _react.useCallback.call(void 0, () => setNumberingId(null), []);
5983
6238
  const canvas = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -6079,8 +6334,8 @@ function VenueDesigner(props) {
6079
6334
  NumberingDialog,
6080
6335
  {
6081
6336
  block: numberingTarget,
6082
- typeName: _nullishCoalesce(_optionalChain([numberingType, 'optionalAccess', _212 => _212.label]), () => ( m.unassigned)),
6083
- color: _nullishCoalesce(_optionalChain([numberingType, 'optionalAccess', _213 => _213.color]), () => ( null)),
6337
+ typeName: _nullishCoalesce(_optionalChain([numberingType, 'optionalAccess', _230 => _230.label]), () => ( m.unassigned)),
6338
+ color: _nullishCoalesce(_optionalChain([numberingType, 'optionalAccess', _231 => _231.color]), () => ( null)),
6084
6339
  lockedUnitIds: locked,
6085
6340
  messages: m,
6086
6341
  titleId: numberingTitleId,
@@ -6102,7 +6357,7 @@ function VenueDesigner(props) {
6102
6357
  }
6103
6358
 
6104
6359
  // ../react/src/index.ts
6105
- var VERSION = "0.10.3";
6360
+ var VERSION = "0.11.0";
6106
6361
 
6107
6362
 
6108
6363